From: Daniele Cinti Date: Wed, 14 Sep 2016 16:32:13 +0000 (+0200) Subject: Built motion from commit 7da723c.|0.0.141 X-Git-Tag: 20/10/16~69 X-Git-Url: http://repos.xcallymotion.com/base/%22angular-material.themes.css/%22thisimagedoesnotexist.png/%22javascript:;//%22https:?a=commitdiff_plain;h=a3238512b873401166dd5adf3801a715e3531371;p=motion.git Built motion from commit 7da723c.|0.0.141 --- diff --git a/public/assets/plugins/jscripty/js/Actions.js b/public/assets/plugins/jscripty/js/Actions.js index aeaa420..af005e8 100644 --- a/public/assets/plugins/jscripty/js/Actions.js +++ b/public/assets/plugins/jscripty/js/Actions.js @@ -1,634 +1 @@ -'use strict'; -/** - * $Id: Actions.js,v 1.7 2013-02-14 07:48:01 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Constructs the actions object for the given UI. - */ -function Actions(editorUi) { - this.editorUi = editorUi; - this.actions = new Object(); - this.init(); -}; - -/** - * Adds the default actions. - */ -Actions.prototype.init = function() { - var ui = this.editorUi; - var editor = ui.editor; - var graph = editor.graph; - - // File actions - this.addAction('new', function() { - ui.showDialog(new NewDialog(ui).container, 300, 180, true, true); - }); - this.addAction('open', function() { - ui.showDialog(new OpenDialog(ui).container, 300, 180, true, true); - }); - this.addAction('save', function() { - ui.saveFile(false); - }, null, null, 'Ctrl+S'); - this.addAction('saveAs', function() { - ui.saveFile(true); - }, null, null, 'Ctrl+Shift-S'); - this.addAction('publish', function() { - ui.publishFile(false); - }, null, null, 'Ctrl+Shift+P'); - this.addAction('variable', function() { - ui.showDialog(new VariableDialog(ui).container, 300, 180, true, true); - }); - this.addAction('import', function() { - ui.showDialog(new ImportDialog(ui).container, 300, 200, true, true); - }); - this.addAction('export', function() { - ui.showDialog(new ExportDialog(ui).container, 300, 200, true, true); - }, null, null, 'Ctrl+E'); - this.put('editFile', new Action(mxResources.get('edit'), mxUtils.bind(this, - function() { - this.editorUi.showDialog(new EditFileDialog(ui).container, 620, 420, - true, true); - }))); - this.addAction('rename', function() { - ui.showDialog(new RenameDialog(ui).container, 300, 180, true, true); - }); - this.addAction('print', function() { - mxUtils.printScreen(graph); - }, null, 'sprite-print', 'Ctrl+P'); - this.addAction('preview', function() { - mxUtils.show(graph, null, 10, 10); - }); - - // Edit actions - this.addAction('undo', function() { - editor.undoManager.undo(); - }, null, 'sprite-undo', 'Ctrl+Z'); - this.addAction('redo', function() { - editor.undoManager.redo(); - }, null, 'sprite-redo', 'Ctrl+Y'); - this.addAction('cut', function() { - mxClipboard.cut(graph); - }, null, 'sprite-cut', 'Ctrl+X'); - this.addAction('copy', function() { - mxClipboard.copy(graph); - }, null, 'sprite-copy', 'Ctrl+C'); - this.addAction('paste', function() { - mxClipboard.paste(graph); - }, false, 'sprite-paste', 'Ctrl+V'); - this.addAction('delete', function() { - graph.removeCells(); - }, null, null, 'Delete'); - this.addAction('duplicate', function() { - var s = graph.gridSize; - graph.setSelectionCells(graph.moveCells(graph.getSelectionCells(), s, s, - true)); - }, null, null, 'Ctrl+D'); - this.addAction('selectVertices', function() { - graph.selectVertices(); - }, null, null, 'Ctrl+Shift+V'); - this.addAction('selectEdges', function() { - graph.selectEdges(); - }, null, null, 'Ctrl+Shift+E'); - this.addAction('selectAll', function() { - graph.selectAll(); - }, null, null, 'Ctrl+A'); - - // Navigation actions - this.addAction('home', function() { - graph.home(); - }, null, null, 'Home'); - this.addAction('exitGroup', function() { - graph.exitGroup(); - }, null, null, 'Page Up'); - this.addAction('enterGroup', function() { - graph.enterGroup(); - }, null, null, 'Page Down'); - this.addAction('expand', function() { - graph.foldCells(false); - }, null, null, 'Enter'); - this.addAction('collapse', function() { - graph.foldCells(true); - }, null, null, 'Backspace'); - - // Arrange actions - this.addAction('toFront', function() { - graph.orderCells(false); - }, null, null, 'Ctrl+F'); - this.addAction('toBack', function() { - graph.orderCells(true); - }, null, null, 'Ctrl+B'); - this.addAction('group', function() { - graph.setSelectionCell(graph.groupCells(null, 0)); - }, null, null, 'Ctrl+G'); - this.addAction('ungroup', function() { - graph.setSelectionCells(graph.ungroupCells()); - }, null, null, 'Ctrl+U'); - this.addAction('removeFromGroup', function() { - graph.removeCellsFromParent(); - }); - this.addAction('editLink', function() { - var cell = graph.getSelectionCell(); - var link = graph.getLinkForCell(cell); - - if (link == null) { - link = ''; - } - - link = mxUtils.prompt(mxResources.get('enterValue'), link); - - if (link != null) { - graph.setLinkForCell(cell, link); - } - }); - this.addAction('openLink', function() { - var cell = graph.getSelectionCell(); - var link = graph.getLinkForCell(cell); - - if (link != null) { - window.open(link); - } - }); - this.addAction('autosize', function() { - var cells = graph.getSelectionCells(); - - if (cells != null) { - graph.getModel().beginUpdate(); - try { - for (var i = 0; i < cells.length; i++) { - var cell = cells[i]; - - if (graph.getModel().getChildCount(cell)) { - graph.updateGroupBounds([cell], 20); - } else { - graph.updateCellSize(cell); - } - } - } finally { - graph.getModel().endUpdate(); - } - } - }); - this.addAction('wordWrap', function() { - var state = graph.getView().getState(graph.getSelectionCell()); - var value = 'wrap'; - - if (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap') { - value = null; - } - - graph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value); - }); - this.addAction('rotation', function() { - var value = '0'; - var state = graph.getView().getState(graph.getSelectionCell()); - - if (state != null) { - value = state.style[mxConstants.STYLE_ROTATION] || value; - } - - value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + - mxResources.get('rotation') + ' 0-360)', value); - - if (value != null) { - graph.setCellStyles(mxConstants.STYLE_ROTATION, value); - } - }); - this.addAction('tilt', function() { - var cells = graph.getSelectionCells(); - - if (cells != null) { - graph.getModel().beginUpdate(); - try { - for (var i = 0; i < cells.length; i++) { - var cell = cells[i]; - - if (graph.getModel().isVertex(cell) && graph.getModel().getChildCount( - cell) == 0) { - var geo = graph.getCellGeometry(cell); - - if (geo != null) { - // Rotates the size and position in the geometry - geo = geo.clone(); - geo.x += geo.width / 2 - geo.height / 2; - geo.y += geo.height / 2 - geo.width / 2; - var tmp = geo.width; - geo.width = geo.height; - geo.height = tmp; - graph.getModel().setGeometry(cell, geo); - - // Reads the current direction and advances by 90 degrees - var state = graph.view.getState(cell); - - if (state != null) { - var dir = state.style[mxConstants.STYLE_DIRECTION] || 'east' /*default*/ ; - - if (dir == 'east') { - dir = 'south'; - } else if (dir == 'south') { - dir = 'west'; - } else if (dir == 'west') { - dir = 'north'; - } else if (dir == 'north') { - dir = 'east'; - } - - graph.setCellStyles(mxConstants.STYLE_DIRECTION, dir, [cell]); - } - } - } - } - } finally { - graph.getModel().endUpdate(); - } - } - }, null, null, 'Ctrl+R'); - - // View actions - this.addAction('actualSize', function() { - graph.zoomTo(1); - }); - this.addAction('zoomIn', function() { - graph.zoomIn(); - }, null, null, 'Add'); - this.addAction('zoomOut', function() { - graph.zoomOut(); - }, null, null, 'Subtract'); - this.addAction('fitWindow', function() { - graph.fit(); - }); - - this.addAction('fitPage', mxUtils.bind(this, function() { - if (!graph.pageVisible) { - this.get('pageView').funct(); - } - - var fmt = graph.pageFormat; - var ps = graph.pageScale; - var cw = graph.container.clientWidth - 20; - var ch = graph.container.clientHeight - 20; - - var scale = Math.floor(100 * Math.min(cw / fmt.width / ps, ch / fmt.height / - ps)) / 100; - graph.zoomTo(scale); - - graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2) - ); - graph.container.scrollTop = Math.round(graph.view.translate.y * scale - - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / - 2)); - })); - this.addAction('fitPageWidth', mxUtils.bind(this, function() { - if (!graph.pageVisible) { - this.get('pageView').funct(); - } - - var fmt = graph.pageFormat; - var ps = graph.pageScale; - var cw = graph.container.clientWidth - 20; - - var scale = Math.floor(100 * cw / fmt.width / ps) / 100; - graph.zoomTo(scale); - - graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2) - ); - graph.container.scrollTop = Math.round(graph.view.translate.y * scale - - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / - 2)); - })); - this.put('customZoom', new Action(mxResources.get('custom'), function() { - var value = mxUtils.prompt(mxResources.get('enterValue') + ' (%)', - parseInt(graph.getView().getScale() * 100)); - - if (value != null && value.length > 0 && !isNaN(parseInt(value))) { - graph.zoomTo(parseInt(value) / 100); - } - })); - - // Option actions - var action = null; - action = this.addAction('grid', function() { - graph.setGridEnabled(!graph.isGridEnabled()); - editor.updateGraphComponents(); - }, null, null, 'Ctrl+Shift+G'); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.isGridEnabled(); - }); - action = this.addAction('guides', function() { - graph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled; - }); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.graphHandler.guidesEnabled; - }); - action = this.addAction('tooltips', function() { - graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled()); - }); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.tooltipHandler.isEnabled(); - }); - action = this.addAction('navigation', function() { - graph.foldingEnabled = !graph.foldingEnabled; - graph.view.revalidate(); - }); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.foldingEnabled; - }); - action = this.addAction('scrollbars', function() { - graph.scrollbars = !graph.scrollbars; - editor.updateGraphComponents(); - - if (!graph.scrollbars) { - var t = graph.view.translate; - graph.view.setTranslate(t.x - graph.container.scrollLeft / graph.view.scale, - t.y - graph.container.scrollTop / graph.view.scale); - graph.container.scrollLeft = 0; - graph.container.scrollTop = 0; - graph.sizeDidChange(); - } else { - var dx = graph.view.translate.x; - var dy = graph.view.translate.y; - - graph.view.translate.x = 0; - graph.view.translate.y = 0; - graph.sizeDidChange(); - graph.container.scrollLeft -= Math.round(dx * graph.view.scale); - graph.container.scrollTop -= Math.round(dy * graph.view.scale); - } - }, !mxClient.IS_TOUCH); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.container.style.overflow == 'auto'; - }); - action = this.addAction('pageView', mxUtils.bind(this, function() { - graph.pageVisible = !graph.pageVisible; - graph.pageBreaksVisible = graph.pageVisible; - graph.preferPageSize = graph.pageBreaksVisible; - graph.view.validate(); - graph.sizeDidChange(); - - editor.updateGraphComponents(); - editor.outline.update(); - - if (mxUtils.hasScrollbars(graph.container)) { - if (graph.pageVisible) { - graph.container.scrollLeft -= 20; - graph.container.scrollTop -= 20; - } else { - graph.container.scrollLeft += 20; - graph.container.scrollTop += 20; - } - } - })); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.pageVisible; - }); - action = this.addAction('connect', function() { - graph.setConnectable(!graph.connectionHandler.isEnabled()); - }, null, null, 'Ctrl+Q'); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.connectionHandler.isEnabled(); - }); - action = this.addAction('copyConnect', function() { - graph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget()); - }); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.connectionHandler.isCreateTarget(); - }); - - // Help actions - this.addAction('help', function() { - var ext = ''; - - if (mxResources.isLanguageSupported(mxClient.language)) { - ext = '_' + mxClient.language; - } - - window.open(RESOURCES_PATH + '/help' + ext + '.html'); - }); - this.put('about', new Action(mxResources.get('about') + ' Cally Square', - function() { - ui.showDialog(new AboutDialog(ui).container, 320, 280, true, true); - }, null, null, 'F1')); - - // Font style actions - var toggleFontStyle = mxUtils.bind(this, function(key, style) { - this.addAction(key, function() { - graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style); - }); - }); - - toggleFontStyle('bold', mxConstants.FONT_BOLD); - toggleFontStyle('italic', mxConstants.FONT_ITALIC); - toggleFontStyle('underline', mxConstants.FONT_UNDERLINE); - - // Format actions - this.addAction('shadow', function() { - graph.toggleCellStyles(mxConstants.STYLE_SHADOW); - }); - this.addAction('dashed', function() { - graph.toggleCellStyles(mxConstants.STYLE_DASHED); - }); - this.addAction('rounded', function() { - graph.toggleCellStyles(mxConstants.STYLE_ROUNDED); - }); - this.addAction('curved', function() { - graph.toggleCellStyles(mxConstants.STYLE_CURVED); - }); - this.addAction('style', function() { - var cells = graph.getSelectionCells(); - - if (cells != null && cells.length > 0) { - var model = graph.getModel(); - var style = mxUtils.prompt(mxResources.get('enterValue') + ' (' + - mxResources.get('style') + ')', - model.getStyle(cells[0]) || ''); - - if (style != null) { - graph.setCellStyle(style, cells); - } - } - }); - this.addAction('setAsDefaultEdge', function() { - graph.setDefaultEdge(graph.getSelectionCell()); - }); - this.addAction('addWaypoint', function() { - var cell = graph.getSelectionCell(); - - if (cell != null && graph.getModel().isEdge(cell)) { - var handler = editor.graph.selectionCellsHandler.getHandler(cell); - - if (handler instanceof mxEdgeHandler) { - var t = graph.view.translate; - var s = graph.view.scale; - var dx = t.x; - var dy = t.y; - - var parent = graph.getModel().getParent(cell); - var pgeo = graph.getCellGeometry(parent); - - if (graph.getModel().isVertex(parent) && pgeo != null) { - dx += pgeo.x; - dy += pgeo.y; - } - - handler.addPointAt(handler.state, graph.panningHandler.triggerX / s - dx, - graph.panningHandler.triggerY / s - dy); - } - } - }); - this.addAction('removeWaypoint', function() { - // TODO: Action should run with "this" set to action - var rmWaypointAction = ui.actions.get('removeWaypoint'); - - if (rmWaypointAction.handler != null) { - // NOTE: Popupevent handled and action updated in Menus.createPopupMenu - rmWaypointAction.handler.removePoint(rmWaypointAction.handler.state, - rmWaypointAction.index); - } - }); - this.addAction('image', function() { - function updateImage(value, w, h) { - var select = null; - var cells = graph.getSelectionCells(); - - graph.getModel().beginUpdate(); - try { - // Inserts new cell if no cell is selected - if (cells.length == 0) { - var gs = graph.getGridSize(); - cells = [graph.insertVertex(graph.getDefaultParent(), null, '', gs, gs, - w, h)]; - select = cells; - } - - graph.setCellStyles(mxConstants.STYLE_IMAGE, value, cells); - graph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells); - - if (graph.getSelectionCount() == 1) { - if (w != null && h != null) { - var cell = cells[0]; - var geo = graph.getModel().getGeometry(cell); - - if (geo != null) { - geo = geo.clone(); - geo.width = w; - geo.height = h; - graph.getModel().setGeometry(cell, geo); - } - } - } - } finally { - graph.getModel().endUpdate(); - } - - if (select != null) { - graph.setSelectionCells(select); - graph.scrollCellToVisible(select[0]); - } - }; - - var value = ''; - var state = graph.getView().getState(graph.getSelectionCell()); - - if (state != null) { - value = state.style[mxConstants.STYLE_IMAGE] || value; - } - - value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get( - 'url') + ')', value); - - if (value != null) { - if (value.length > 0) { - var img = new Image(); - - img.onload = function() { - updateImage(value, img.width, img.height); - }; - img.onerror = function() { - mxUtils.alert(mxResources.get('fileNotFound')); - }; - - img.src = value; - } - } - }); -}; - -/** - * Registers the given action under the given name. - */ -Actions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut) { - return this.put(key, new Action(mxResources.get(key), funct, enabled, iconCls, - shortcut)); -}; - -/** - * Registers the given action under the given name. - */ -Actions.prototype.put = function(name, action) { - this.actions[name] = action; - - return action; -}; - -/** - * Returns the action for the given name or null if no such action exists. - */ -Actions.prototype.get = function(name) { - return this.actions[name]; -}; - -/** - * Constructs a new action for the given parameters. - */ -function Action(label, funct, enabled, iconCls, shortcut) { - mxEventSource.call(this); - this.label = label; - this.funct = funct; - this.enabled = (enabled != null) ? enabled : true; - this.iconCls = iconCls; - this.shortcut = shortcut; -}; - -// Action inherits from mxEventSource -mxUtils.extend(Action, mxEventSource); - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Action.prototype.setEnabled = function(value) { - if (this.enabled != value) { - this.enabled = value; - this.fireEvent(new mxEventObject('stateChanged')); - } -}; - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Action.prototype.setToggleAction = function(value) { - this.toggleAction = value; -}; - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Action.prototype.setSelectedCallback = function(funct) { - this.selectedCallback = funct; -}; - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Action.prototype.isSelected = function() { - return this.selectedCallback(); -}; +var _0xc546=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x61\x63\x74\x69\x6F\x6E\x73","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x64\x69\x74\x6F\x72","\x67\x72\x61\x70\x68","\x6E\x65\x77","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53","\x73\x61\x76\x65\x41\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2D\x53","\x70\x75\x62\x6C\x69\x73\x68","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x50","\x76\x61\x72\x69\x61\x62\x6C\x65","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x43\x74\x72\x6C\x2B\x45","\x65\x64\x69\x74\x46\x69\x6C\x65","\x65\x64\x69\x74","\x67\x65\x74","\x62\x69\x6E\x64","\x70\x75\x74","\x72\x65\x6E\x61\x6D\x65","\x70\x72\x69\x6E\x74","\x70\x72\x69\x6E\x74\x53\x63\x72\x65\x65\x6E","\x73\x70\x72\x69\x74\x65\x2D\x70\x72\x69\x6E\x74","\x43\x74\x72\x6C\x2B\x50","\x70\x72\x65\x76\x69\x65\x77","\x73\x68\x6F\x77","\x75\x6E\x64\x6F","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x70\x72\x69\x74\x65\x2D\x75\x6E\x64\x6F","\x43\x74\x72\x6C\x2B\x5A","\x72\x65\x64\x6F","\x73\x70\x72\x69\x74\x65\x2D\x72\x65\x64\x6F","\x43\x74\x72\x6C\x2B\x59","\x63\x75\x74","\x73\x70\x72\x69\x74\x65\x2D\x63\x75\x74","\x43\x74\x72\x6C\x2B\x58","\x63\x6F\x70\x79","\x73\x70\x72\x69\x74\x65\x2D\x63\x6F\x70\x79","\x43\x74\x72\x6C\x2B\x43","\x70\x61\x73\x74\x65","\x73\x70\x72\x69\x74\x65\x2D\x70\x61\x73\x74\x65","\x43\x74\x72\x6C\x2B\x56","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x44\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x44","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x56","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x45","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x43\x74\x72\x6C\x2B\x41","\x68\x6F\x6D\x65","\x48\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x55\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x44\x6F\x77\x6E","\x65\x78\x70\x61\x6E\x64","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x45\x6E\x74\x65\x72","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x42\x61\x63\x6B\x73\x70\x61\x63\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x6F\x72\x64\x65\x72\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x46","\x74\x6F\x42\x61\x63\x6B","\x43\x74\x72\x6C\x2B\x42","\x67\x72\x6F\x75\x70","\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x43\x74\x72\x6C\x2B\x47","\x75\x6E\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x55","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x70\x72\x6F\x6D\x70\x74","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x75\x70\x64\x61\x74\x65\x47\x72\x6F\x75\x70\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x43\x65\x6C\x6C\x53\x69\x7A\x65","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x77\x72\x61\x70","\x53\x54\x59\x4C\x45\x5F\x57\x48\x49\x54\x45\x5F\x53\x50\x41\x43\x45","\x73\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x30","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x54\x41\x54\x49\x4F\x4E","\x20\x28","\x20\x30\x2D\x33\x36\x30\x29","\x74\x69\x6C\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x63\x6C\x6F\x6E\x65","\x78","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x79","\x73\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x76\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x65\x61\x73\x74","\x73\x6F\x75\x74\x68","\x77\x65\x73\x74","\x6E\x6F\x72\x74\x68","\x43\x74\x72\x6C\x2B\x52","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x41\x64\x64","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x53\x75\x62\x74\x72\x61\x63\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x66\x69\x74","\x66\x69\x74\x50\x61\x67\x65","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x66\x75\x6E\x63\x74","\x70\x61\x67\x65\x56\x69\x65\x77","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x6D\x61\x78","\x72\x6F\x75\x6E\x64","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x63\x75\x73\x74\x6F\x6D","\x20\x28\x25\x29","\x67\x65\x74\x53\x63\x61\x6C\x65","\x67\x72\x69\x64","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x47","\x73\x65\x74\x54\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x67\x75\x69\x64\x65\x73","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x73\x63\x61\x6C\x65","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x61\x75\x74\x6F","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x43\x74\x72\x6C\x2B\x51","\x63\x6F\x70\x79\x43\x6F\x6E\x6E\x65\x63\x74","\x69\x73\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x68\x65\x6C\x70","\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x73\x4C\x61\x6E\x67\x75\x61\x67\x65\x53\x75\x70\x70\x6F\x72\x74\x65\x64","\x5F","\x2F\x68\x65\x6C\x70","\x2E\x68\x74\x6D\x6C","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x46\x31","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x73\x68\x61\x64\x6F\x77","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x63\x75\x72\x76\x65\x64","\x29","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x73\x74\x61\x74\x65","\x74\x72\x69\x67\x67\x65\x72\x58","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x74\x72\x69\x67\x67\x65\x72\x59","\x61\x64\x64\x50\x6F\x69\x6E\x74\x41\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x72\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74","\x69\x6D\x61\x67\x65","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x69\x6E\x73\x65\x72\x74\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45","\x75\x72\x6C","\x6F\x6E\x6C\x6F\x61\x64","\x6F\x6E\x65\x72\x72\x6F\x72","\x66\x69\x6C\x65\x4E\x6F\x74\x46\x6F\x75\x6E\x64","\x61\x6C\x65\x72\x74","\x73\x72\x63","\x63\x61\x6C\x6C","\x6C\x61\x62\x65\x6C","\x65\x6E\x61\x62\x6C\x65\x64","\x69\x63\x6F\x6E\x43\x6C\x73","\x73\x68\x6F\x72\x74\x63\x75\x74","\x65\x78\x74\x65\x6E\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64"];_0xc546[0];function Actions(_0xa8dcx2){this[_0xc546[1]]= _0xa8dcx2;this[_0xc546[2]]= new Object();this[_0xc546[3]]()}Actions[_0xc546[4]][_0xc546[3]]= function(){var _0xa8dcx3=this[_0xc546[1]];var _0xa8dcx4=_0xa8dcx3[_0xc546[5]];var _0xa8dcx5=_0xa8dcx4[_0xc546[6]];this[_0xc546[10]](_0xc546[7],function(){_0xa8dcx3[_0xc546[9]]( new NewDialog(_0xa8dcx3)[_0xc546[8]],300,180,true,true)});this[_0xc546[10]](_0xc546[11],function(){_0xa8dcx3[_0xc546[9]]( new OpenDialog(_0xa8dcx3)[_0xc546[8]],300,180,true,true)});this[_0xc546[10]](_0xc546[12],function(){_0xa8dcx3[_0xc546[13]](false)},null,null,_0xc546[14]);this[_0xc546[10]](_0xc546[15],function(){_0xa8dcx3[_0xc546[13]](true)},null,null,_0xc546[16]);this[_0xc546[10]](_0xc546[17],function(){_0xa8dcx3[_0xc546[18]](false)},null,null,_0xc546[19]);this[_0xc546[10]](_0xc546[20],function(){_0xa8dcx3[_0xc546[9]]( new VariableDialog(_0xa8dcx3)[_0xc546[8]],300,180,true,true)});this[_0xc546[10]](_0xc546[21],function(){_0xa8dcx3[_0xc546[9]]( new ImportDialog(_0xa8dcx3)[_0xc546[8]],300,200,true,true)});this[_0xc546[10]](_0xc546[22],function(){_0xa8dcx3[_0xc546[9]]( new ExportDialog(_0xa8dcx3)[_0xc546[8]],300,200,true,true)},null,null,_0xc546[23]);this[_0xc546[28]](_0xc546[24], new Action(mxResources[_0xc546[26]](_0xc546[25]),mxUtils[_0xc546[27]](this,function(){this[_0xc546[1]][_0xc546[9]]( new EditFileDialog(_0xa8dcx3)[_0xc546[8]],620,420,true,true)})));this[_0xc546[10]](_0xc546[29],function(){_0xa8dcx3[_0xc546[9]]( new RenameDialog(_0xa8dcx3)[_0xc546[8]],300,180,true,true)});this[_0xc546[10]](_0xc546[30],function(){mxUtils[_0xc546[31]](_0xa8dcx5)},null,_0xc546[32],_0xc546[33]);this[_0xc546[10]](_0xc546[34],function(){mxUtils[_0xc546[35]](_0xa8dcx5,null,10,10)});this[_0xc546[10]](_0xc546[36],function(){_0xa8dcx4[_0xc546[37]][_0xc546[36]]()},null,_0xc546[38],_0xc546[39]);this[_0xc546[10]](_0xc546[40],function(){_0xa8dcx4[_0xc546[37]][_0xc546[40]]()},null,_0xc546[41],_0xc546[42]);this[_0xc546[10]](_0xc546[43],function(){mxClipboard[_0xc546[43]](_0xa8dcx5)},null,_0xc546[44],_0xc546[45]);this[_0xc546[10]](_0xc546[46],function(){mxClipboard[_0xc546[46]](_0xa8dcx5)},null,_0xc546[47],_0xc546[48]);this[_0xc546[10]](_0xc546[49],function(){mxClipboard[_0xc546[49]](_0xa8dcx5)},false,_0xc546[50],_0xc546[51]);this[_0xc546[10]](_0xc546[52],function(){_0xa8dcx5[_0xc546[53]]()},null,null,_0xc546[54]);this[_0xc546[10]](_0xc546[55],function(){var _0xa8dcx6=_0xa8dcx5[_0xc546[56]];_0xa8dcx5[_0xc546[59]](_0xa8dcx5[_0xc546[58]](_0xa8dcx5[_0xc546[57]](),_0xa8dcx6,_0xa8dcx6,true))},null,null,_0xc546[60]);this[_0xc546[10]](_0xc546[61],function(){_0xa8dcx5[_0xc546[61]]()},null,null,_0xc546[62]);this[_0xc546[10]](_0xc546[63],function(){_0xa8dcx5[_0xc546[63]]()},null,null,_0xc546[64]);this[_0xc546[10]](_0xc546[65],function(){_0xa8dcx5[_0xc546[65]]()},null,null,_0xc546[66]);this[_0xc546[10]](_0xc546[67],function(){_0xa8dcx5[_0xc546[67]]()},null,null,_0xc546[68]);this[_0xc546[10]](_0xc546[69],function(){_0xa8dcx5[_0xc546[69]]()},null,null,_0xc546[70]);this[_0xc546[10]](_0xc546[71],function(){_0xa8dcx5[_0xc546[71]]()},null,null,_0xc546[72]);this[_0xc546[10]](_0xc546[73],function(){_0xa8dcx5[_0xc546[74]](false)},null,null,_0xc546[75]);this[_0xc546[10]](_0xc546[76],function(){_0xa8dcx5[_0xc546[74]](true)},null,null,_0xc546[77]);this[_0xc546[10]](_0xc546[78],function(){_0xa8dcx5[_0xc546[79]](false)},null,null,_0xc546[80]);this[_0xc546[10]](_0xc546[81],function(){_0xa8dcx5[_0xc546[79]](true)},null,null,_0xc546[82]);this[_0xc546[10]](_0xc546[83],function(){_0xa8dcx5[_0xc546[85]](_0xa8dcx5[_0xc546[84]](null,0))},null,null,_0xc546[86]);this[_0xc546[10]](_0xc546[87],function(){_0xa8dcx5[_0xc546[59]](_0xa8dcx5[_0xc546[88]]())},null,null,_0xc546[89]);this[_0xc546[10]](_0xc546[90],function(){_0xa8dcx5[_0xc546[91]]()});this[_0xc546[10]](_0xc546[92],function(){var _0xa8dcx7=_0xa8dcx5[_0xc546[93]]();var _0xa8dcx8=_0xa8dcx5[_0xc546[94]](_0xa8dcx7);if(_0xa8dcx8== null){_0xa8dcx8= _0xc546[95]};_0xa8dcx8= mxUtils[_0xc546[97]](mxResources[_0xc546[26]](_0xc546[96]),_0xa8dcx8);if(_0xa8dcx8!= null){_0xa8dcx5[_0xc546[98]](_0xa8dcx7,_0xa8dcx8)}});this[_0xc546[10]](_0xc546[99],function(){var _0xa8dcx7=_0xa8dcx5[_0xc546[93]]();var _0xa8dcx8=_0xa8dcx5[_0xc546[94]](_0xa8dcx7);if(_0xa8dcx8!= null){window[_0xc546[11]](_0xa8dcx8)}});this[_0xc546[10]](_0xc546[100],function(){var _0xa8dcx9=_0xa8dcx5[_0xc546[57]]();if(_0xa8dcx9!= null){_0xa8dcx5[_0xc546[102]]()[_0xc546[101]]();try{for(var _0xa8dcxa=0;_0xa8dcxa< _0xa8dcx9[_0xc546[103]];_0xa8dcxa++){var _0xa8dcx7=_0xa8dcx9[_0xa8dcxa];if(_0xa8dcx5[_0xc546[102]]()[_0xc546[104]](_0xa8dcx7)){_0xa8dcx5[_0xc546[105]]([_0xa8dcx7],20)}else {_0xa8dcx5[_0xc546[106]](_0xa8dcx7)}}}finally{_0xa8dcx5[_0xc546[102]]()[_0xc546[107]]()}}});this[_0xc546[10]](_0xc546[108],function(){var _0xa8dcxb=_0xa8dcx5[_0xc546[110]]()[_0xc546[109]](_0xa8dcx5[_0xc546[93]]());var _0xa8dcxc=_0xc546[111];if(_0xa8dcxb!= null&& _0xa8dcxb[_0xc546[113]][mxConstants[_0xc546[112]]]== _0xc546[111]){_0xa8dcxc= null};_0xa8dcx5[_0xc546[114]](mxConstants.STYLE_WHITE_SPACE,_0xa8dcxc)});this[_0xc546[10]](_0xc546[115],function(){var _0xa8dcxc=_0xc546[116];var _0xa8dcxb=_0xa8dcx5[_0xc546[110]]()[_0xc546[109]](_0xa8dcx5[_0xc546[93]]());if(_0xa8dcxb!= null){_0xa8dcxc= _0xa8dcxb[_0xc546[113]][mxConstants[_0xc546[117]]]|| _0xa8dcxc};_0xa8dcxc= mxUtils[_0xc546[97]](mxResources[_0xc546[26]](_0xc546[96])+ _0xc546[118]+ mxResources[_0xc546[26]](_0xc546[115])+ _0xc546[119],_0xa8dcxc);if(_0xa8dcxc!= null){_0xa8dcx5[_0xc546[114]](mxConstants.STYLE_ROTATION,_0xa8dcxc)}});this[_0xc546[10]](_0xc546[120],function(){var _0xa8dcx9=_0xa8dcx5[_0xc546[57]]();if(_0xa8dcx9!= null){_0xa8dcx5[_0xc546[102]]()[_0xc546[101]]();try{for(var _0xa8dcxa=0;_0xa8dcxa< _0xa8dcx9[_0xc546[103]];_0xa8dcxa++){var _0xa8dcx7=_0xa8dcx9[_0xa8dcxa];if(_0xa8dcx5[_0xc546[102]]()[_0xc546[121]](_0xa8dcx7)&& _0xa8dcx5[_0xc546[102]]()[_0xc546[104]](_0xa8dcx7)== 0){var _0xa8dcxd=_0xa8dcx5[_0xc546[122]](_0xa8dcx7);if(_0xa8dcxd!= null){_0xa8dcxd= _0xa8dcxd[_0xc546[123]]();_0xa8dcxd[_0xc546[124]]+= _0xa8dcxd[_0xc546[125]]/ 2- _0xa8dcxd[_0xc546[126]]/ 2;_0xa8dcxd[_0xc546[127]]+= _0xa8dcxd[_0xc546[126]]/ 2- _0xa8dcxd[_0xc546[125]]/ 2;var _0xa8dcxe=_0xa8dcxd[_0xc546[125]];_0xa8dcxd[_0xc546[125]]= _0xa8dcxd[_0xc546[126]];_0xa8dcxd[_0xc546[126]]= _0xa8dcxe;_0xa8dcx5[_0xc546[102]]()[_0xc546[128]](_0xa8dcx7,_0xa8dcxd);var _0xa8dcxb=_0xa8dcx5[_0xc546[129]][_0xc546[109]](_0xa8dcx7);if(_0xa8dcxb!= null){var _0xa8dcxf=_0xa8dcxb[_0xc546[113]][mxConstants[_0xc546[130]]]|| _0xc546[131];if(_0xa8dcxf== _0xc546[131]){_0xa8dcxf= _0xc546[132]}else {if(_0xa8dcxf== _0xc546[132]){_0xa8dcxf= _0xc546[133]}else {if(_0xa8dcxf== _0xc546[133]){_0xa8dcxf= _0xc546[134]}else {if(_0xa8dcxf== _0xc546[134]){_0xa8dcxf= _0xc546[131]}}}};_0xa8dcx5[_0xc546[114]](mxConstants.STYLE_DIRECTION,_0xa8dcxf,[_0xa8dcx7])}}}}}finally{_0xa8dcx5[_0xc546[102]]()[_0xc546[107]]()}}},null,null,_0xc546[135]);this[_0xc546[10]](_0xc546[136],function(){_0xa8dcx5[_0xc546[137]](1)});this[_0xc546[10]](_0xc546[138],function(){_0xa8dcx5[_0xc546[138]]()},null,null,_0xc546[139]);this[_0xc546[10]](_0xc546[140],function(){_0xa8dcx5[_0xc546[140]]()},null,null,_0xc546[141]);this[_0xc546[10]](_0xc546[142],function(){_0xa8dcx5[_0xc546[143]]()});this[_0xc546[10]](_0xc546[144],mxUtils[_0xc546[27]](this,function(){if(!_0xa8dcx5[_0xc546[145]]){this[_0xc546[26]](_0xc546[147])[_0xc546[146]]()};var _0xa8dcx10=_0xa8dcx5[_0xc546[148]];var _0xa8dcx11=_0xa8dcx5[_0xc546[149]];var _0xa8dcx12=_0xa8dcx5[_0xc546[8]][_0xc546[150]]- 20;var _0xa8dcx13=_0xa8dcx5[_0xc546[8]][_0xc546[151]]- 20;var _0xa8dcx14=Math[_0xc546[153]](100* Math[_0xc546[152]](_0xa8dcx12/ _0xa8dcx10[_0xc546[125]]/ _0xa8dcx11,_0xa8dcx13/ _0xa8dcx10[_0xc546[126]]/ _0xa8dcx11))/ 100;_0xa8dcx5[_0xc546[137]](_0xa8dcx14);_0xa8dcx5[_0xc546[8]][_0xc546[154]]= Math[_0xc546[157]](_0xa8dcx5[_0xc546[129]][_0xc546[155]][_0xc546[124]]* _0xa8dcx14- Math[_0xc546[156]](10,(_0xa8dcx5[_0xc546[8]][_0xc546[150]]- _0xa8dcx10[_0xc546[125]]* _0xa8dcx11* _0xa8dcx14)/ 2));_0xa8dcx5[_0xc546[8]][_0xc546[158]]= Math[_0xc546[157]](_0xa8dcx5[_0xc546[129]][_0xc546[155]][_0xc546[127]]* _0xa8dcx14- Math[_0xc546[156]](10,(_0xa8dcx5[_0xc546[8]][_0xc546[151]]- _0xa8dcx10[_0xc546[126]]* _0xa8dcx11* _0xa8dcx14)/ 2))}));this[_0xc546[10]](_0xc546[159],mxUtils[_0xc546[27]](this,function(){if(!_0xa8dcx5[_0xc546[145]]){this[_0xc546[26]](_0xc546[147])[_0xc546[146]]()};var _0xa8dcx10=_0xa8dcx5[_0xc546[148]];var _0xa8dcx11=_0xa8dcx5[_0xc546[149]];var _0xa8dcx12=_0xa8dcx5[_0xc546[8]][_0xc546[150]]- 20;var _0xa8dcx14=Math[_0xc546[153]](100* _0xa8dcx12/ _0xa8dcx10[_0xc546[125]]/ _0xa8dcx11)/ 100;_0xa8dcx5[_0xc546[137]](_0xa8dcx14);_0xa8dcx5[_0xc546[8]][_0xc546[154]]= Math[_0xc546[157]](_0xa8dcx5[_0xc546[129]][_0xc546[155]][_0xc546[124]]* _0xa8dcx14- Math[_0xc546[156]](10,(_0xa8dcx5[_0xc546[8]][_0xc546[150]]- _0xa8dcx10[_0xc546[125]]* _0xa8dcx11* _0xa8dcx14)/ 2));_0xa8dcx5[_0xc546[8]][_0xc546[158]]= Math[_0xc546[157]](_0xa8dcx5[_0xc546[129]][_0xc546[155]][_0xc546[127]]* _0xa8dcx14- Math[_0xc546[156]](10,(_0xa8dcx5[_0xc546[8]][_0xc546[151]]- _0xa8dcx10[_0xc546[126]]* _0xa8dcx11* _0xa8dcx14)/ 2))}));this[_0xc546[28]](_0xc546[160], new Action(mxResources[_0xc546[26]](_0xc546[161]),function(){var _0xa8dcxc=mxUtils[_0xc546[97]](mxResources[_0xc546[26]](_0xc546[96])+ _0xc546[162],parseInt(_0xa8dcx5[_0xc546[110]]()[_0xc546[163]]()* 100));if(_0xa8dcxc!= null&& _0xa8dcxc[_0xc546[103]]> 0&& !isNaN(parseInt(_0xa8dcxc))){_0xa8dcx5[_0xc546[137]](parseInt(_0xa8dcxc)/ 100)}}));var _0xa8dcx15=null;_0xa8dcx15= this[_0xc546[10]](_0xc546[164],function(){_0xa8dcx5[_0xc546[166]](!_0xa8dcx5[_0xc546[165]]());_0xa8dcx4[_0xc546[167]]()},null,null,_0xc546[168]);_0xa8dcx15[_0xc546[169]](true);_0xa8dcx15[_0xc546[170]](function(){return _0xa8dcx5[_0xc546[165]]()});_0xa8dcx15= this[_0xc546[10]](_0xc546[171],function(){_0xa8dcx5[_0xc546[173]][_0xc546[172]]= !_0xa8dcx5[_0xc546[173]][_0xc546[172]]});_0xa8dcx15[_0xc546[169]](true);_0xa8dcx15[_0xc546[170]](function(){return _0xa8dcx5[_0xc546[173]][_0xc546[172]]});_0xa8dcx15= this[_0xc546[10]](_0xc546[174],function(){_0xa8dcx5[_0xc546[176]][_0xc546[177]](!_0xa8dcx5[_0xc546[176]][_0xc546[175]]())});_0xa8dcx15[_0xc546[169]](true);_0xa8dcx15[_0xc546[170]](function(){return _0xa8dcx5[_0xc546[176]][_0xc546[175]]()});_0xa8dcx15= this[_0xc546[10]](_0xc546[178],function(){_0xa8dcx5[_0xc546[179]]= !_0xa8dcx5[_0xc546[179]];_0xa8dcx5[_0xc546[129]][_0xc546[180]]()});_0xa8dcx15[_0xc546[169]](true);_0xa8dcx15[_0xc546[170]](function(){return _0xa8dcx5[_0xc546[179]]});_0xa8dcx15= this[_0xc546[10]](_0xc546[181],function(){_0xa8dcx5[_0xc546[181]]= !_0xa8dcx5[_0xc546[181]];_0xa8dcx4[_0xc546[167]]();if(!_0xa8dcx5[_0xc546[181]]){var _0xa8dcx16=_0xa8dcx5[_0xc546[129]][_0xc546[155]];_0xa8dcx5[_0xc546[129]][_0xc546[183]](_0xa8dcx16[_0xc546[124]]- _0xa8dcx5[_0xc546[8]][_0xc546[154]]/ _0xa8dcx5[_0xc546[129]][_0xc546[182]],_0xa8dcx16[_0xc546[127]]- _0xa8dcx5[_0xc546[8]][_0xc546[158]]/ _0xa8dcx5[_0xc546[129]][_0xc546[182]]);_0xa8dcx5[_0xc546[8]][_0xc546[154]]= 0;_0xa8dcx5[_0xc546[8]][_0xc546[158]]= 0;_0xa8dcx5[_0xc546[184]]()}else {var _0xa8dcx17=_0xa8dcx5[_0xc546[129]][_0xc546[155]][_0xc546[124]];var _0xa8dcx18=_0xa8dcx5[_0xc546[129]][_0xc546[155]][_0xc546[127]];_0xa8dcx5[_0xc546[129]][_0xc546[155]][_0xc546[124]]= 0;_0xa8dcx5[_0xc546[129]][_0xc546[155]][_0xc546[127]]= 0;_0xa8dcx5[_0xc546[184]]();_0xa8dcx5[_0xc546[8]][_0xc546[154]]-= Math[_0xc546[157]](_0xa8dcx17* _0xa8dcx5[_0xc546[129]][_0xc546[182]]);_0xa8dcx5[_0xc546[8]][_0xc546[158]]-= Math[_0xc546[157]](_0xa8dcx18* _0xa8dcx5[_0xc546[129]][_0xc546[182]])}},!mxClient.IS_TOUCH);_0xa8dcx15[_0xc546[169]](true);_0xa8dcx15[_0xc546[170]](function(){return _0xa8dcx5[_0xc546[8]][_0xc546[113]][_0xc546[185]]== _0xc546[186]});_0xa8dcx15= this[_0xc546[10]](_0xc546[147],mxUtils[_0xc546[27]](this,function(){_0xa8dcx5[_0xc546[145]]= !_0xa8dcx5[_0xc546[145]];_0xa8dcx5[_0xc546[187]]= _0xa8dcx5[_0xc546[145]];_0xa8dcx5[_0xc546[188]]= _0xa8dcx5[_0xc546[187]];_0xa8dcx5[_0xc546[129]][_0xc546[189]]();_0xa8dcx5[_0xc546[184]]();_0xa8dcx4[_0xc546[167]]();_0xa8dcx4[_0xc546[191]][_0xc546[190]]();if(mxUtils[_0xc546[192]](_0xa8dcx5[_0xc546[8]])){if(_0xa8dcx5[_0xc546[145]]){_0xa8dcx5[_0xc546[8]][_0xc546[154]]-= 20;_0xa8dcx5[_0xc546[8]][_0xc546[158]]-= 20}else {_0xa8dcx5[_0xc546[8]][_0xc546[154]]+= 20;_0xa8dcx5[_0xc546[8]][_0xc546[158]]+= 20}}}));_0xa8dcx15[_0xc546[169]](true);_0xa8dcx15[_0xc546[170]](function(){return _0xa8dcx5[_0xc546[145]]});_0xa8dcx15= this[_0xc546[10]](_0xc546[193],function(){_0xa8dcx5[_0xc546[195]](!_0xa8dcx5[_0xc546[194]][_0xc546[175]]())},null,null,_0xc546[196]);_0xa8dcx15[_0xc546[169]](true);_0xa8dcx15[_0xc546[170]](function(){return _0xa8dcx5[_0xc546[194]][_0xc546[175]]()});_0xa8dcx15= this[_0xc546[10]](_0xc546[197],function(){_0xa8dcx5[_0xc546[194]][_0xc546[199]](!_0xa8dcx5[_0xc546[194]][_0xc546[198]]())});_0xa8dcx15[_0xc546[169]](true);_0xa8dcx15[_0xc546[170]](function(){return _0xa8dcx5[_0xc546[194]][_0xc546[198]]()});this[_0xc546[10]](_0xc546[200],function(){var _0xa8dcx19=_0xc546[95];if(mxResources[_0xc546[202]](mxClient[_0xc546[201]])){_0xa8dcx19= _0xc546[203]+ mxClient[_0xc546[201]]};window[_0xc546[11]](RESOURCES_PATH+ _0xc546[204]+ _0xa8dcx19+ _0xc546[205])});this[_0xc546[28]](_0xc546[206], new Action(mxResources[_0xc546[26]](_0xc546[206])+ _0xc546[207],function(){_0xa8dcx3[_0xc546[9]]( new AboutDialog(_0xa8dcx3)[_0xc546[8]],320,280,true,true)},null,null,_0xc546[208]));var _0xa8dcx1a=mxUtils[_0xc546[27]](this,function(_0xa8dcx1b,_0xa8dcx1c){this[_0xc546[10]](_0xa8dcx1b,function(){_0xa8dcx5[_0xc546[209]](mxConstants.STYLE_FONTSTYLE,_0xa8dcx1c)})});_0xa8dcx1a(_0xc546[210],mxConstants.FONT_BOLD);_0xa8dcx1a(_0xc546[211],mxConstants.FONT_ITALIC);_0xa8dcx1a(_0xc546[212],mxConstants.FONT_UNDERLINE);this[_0xc546[10]](_0xc546[213],function(){_0xa8dcx5[_0xc546[214]](mxConstants.STYLE_SHADOW)});this[_0xc546[10]](_0xc546[215],function(){_0xa8dcx5[_0xc546[214]](mxConstants.STYLE_DASHED)});this[_0xc546[10]](_0xc546[216],function(){_0xa8dcx5[_0xc546[214]](mxConstants.STYLE_ROUNDED)});this[_0xc546[10]](_0xc546[217],function(){_0xa8dcx5[_0xc546[214]](mxConstants.STYLE_CURVED)});this[_0xc546[10]](_0xc546[113],function(){var _0xa8dcx9=_0xa8dcx5[_0xc546[57]]();if(_0xa8dcx9!= null&& _0xa8dcx9[_0xc546[103]]> 0){var _0xa8dcx1d=_0xa8dcx5[_0xc546[102]]();var _0xa8dcx1c=mxUtils[_0xc546[97]](mxResources[_0xc546[26]](_0xc546[96])+ _0xc546[118]+ mxResources[_0xc546[26]](_0xc546[113])+ _0xc546[218],_0xa8dcx1d[_0xc546[219]](_0xa8dcx9[0])|| _0xc546[95]);if(_0xa8dcx1c!= null){_0xa8dcx5[_0xc546[220]](_0xa8dcx1c,_0xa8dcx9)}}});this[_0xc546[10]](_0xc546[221],function(){_0xa8dcx5[_0xc546[222]](_0xa8dcx5[_0xc546[93]]())});this[_0xc546[10]](_0xc546[223],function(){var _0xa8dcx7=_0xa8dcx5[_0xc546[93]]();if(_0xa8dcx7!= null&& _0xa8dcx5[_0xc546[102]]()[_0xc546[224]](_0xa8dcx7)){var _0xa8dcx1e=_0xa8dcx4[_0xc546[6]][_0xc546[226]][_0xc546[225]](_0xa8dcx7);if(_0xa8dcx1e instanceof mxEdgeHandler){var _0xa8dcx16=_0xa8dcx5[_0xc546[129]][_0xc546[155]];var _0xa8dcx6=_0xa8dcx5[_0xc546[129]][_0xc546[182]];var _0xa8dcx17=_0xa8dcx16[_0xc546[124]];var _0xa8dcx18=_0xa8dcx16[_0xc546[127]];var _0xa8dcx1f=_0xa8dcx5[_0xc546[102]]()[_0xc546[227]](_0xa8dcx7);var _0xa8dcx20=_0xa8dcx5[_0xc546[122]](_0xa8dcx1f);if(_0xa8dcx5[_0xc546[102]]()[_0xc546[121]](_0xa8dcx1f)&& _0xa8dcx20!= null){_0xa8dcx17+= _0xa8dcx20[_0xc546[124]];_0xa8dcx18+= _0xa8dcx20[_0xc546[127]]};_0xa8dcx1e[_0xc546[232]](_0xa8dcx1e[_0xc546[228]],_0xa8dcx5[_0xc546[230]][_0xc546[229]]/ _0xa8dcx6- _0xa8dcx17,_0xa8dcx5[_0xc546[230]][_0xc546[231]]/ _0xa8dcx6- _0xa8dcx18)}}});this[_0xc546[10]](_0xc546[233],function(){var _0xa8dcx21=_0xa8dcx3[_0xc546[2]][_0xc546[26]](_0xc546[233]);if(_0xa8dcx21[_0xc546[234]]!= null){_0xa8dcx21[_0xc546[234]][_0xc546[236]](_0xa8dcx21[_0xc546[234]][_0xc546[228]],_0xa8dcx21[_0xc546[235]])}});this[_0xc546[10]](_0xc546[237],function(){function _0xa8dcx22(_0xa8dcxc,_0xa8dcx23,_0xa8dcx24){var _0xa8dcx25=null;var _0xa8dcx9=_0xa8dcx5[_0xc546[57]]();_0xa8dcx5[_0xc546[102]]()[_0xc546[101]]();try{if(_0xa8dcx9[_0xc546[103]]== 0){var _0xa8dcx26=_0xa8dcx5[_0xc546[238]]();_0xa8dcx9= [_0xa8dcx5[_0xc546[240]](_0xa8dcx5[_0xc546[239]](),null,_0xc546[95],_0xa8dcx26,_0xa8dcx26,_0xa8dcx23,_0xa8dcx24)];_0xa8dcx25= _0xa8dcx9};_0xa8dcx5[_0xc546[114]](mxConstants.STYLE_IMAGE,_0xa8dcxc,_0xa8dcx9);_0xa8dcx5[_0xc546[114]](mxConstants.STYLE_SHAPE,_0xc546[237],_0xa8dcx9);if(_0xa8dcx5[_0xc546[241]]()== 1){if(_0xa8dcx23!= null&& _0xa8dcx24!= null){var _0xa8dcx7=_0xa8dcx9[0];var _0xa8dcxd=_0xa8dcx5[_0xc546[102]]()[_0xc546[242]](_0xa8dcx7);if(_0xa8dcxd!= null){_0xa8dcxd= _0xa8dcxd[_0xc546[123]]();_0xa8dcxd[_0xc546[125]]= _0xa8dcx23;_0xa8dcxd[_0xc546[126]]= _0xa8dcx24;_0xa8dcx5[_0xc546[102]]()[_0xc546[128]](_0xa8dcx7,_0xa8dcxd)}}}}finally{_0xa8dcx5[_0xc546[102]]()[_0xc546[107]]()};if(_0xa8dcx25!= null){_0xa8dcx5[_0xc546[59]](_0xa8dcx25);_0xa8dcx5[_0xc546[243]](_0xa8dcx25[0])}}var _0xa8dcxc=_0xc546[95];var _0xa8dcxb=_0xa8dcx5[_0xc546[110]]()[_0xc546[109]](_0xa8dcx5[_0xc546[93]]());if(_0xa8dcxb!= null){_0xa8dcxc= _0xa8dcxb[_0xc546[113]][mxConstants[_0xc546[244]]]|| _0xa8dcxc};_0xa8dcxc= mxUtils[_0xc546[97]](mxResources[_0xc546[26]](_0xc546[96])+ _0xc546[118]+ mxResources[_0xc546[26]](_0xc546[245])+ _0xc546[218],_0xa8dcxc);if(_0xa8dcxc!= null){if(_0xa8dcxc[_0xc546[103]]> 0){var _0xa8dcx27= new Image();_0xa8dcx27[_0xc546[246]]= function(){_0xa8dcx22(_0xa8dcxc,_0xa8dcx27[_0xc546[125]],_0xa8dcx27[_0xc546[126]])};_0xa8dcx27[_0xc546[247]]= function(){mxUtils[_0xc546[249]](mxResources[_0xc546[26]](_0xc546[248]))};_0xa8dcx27[_0xc546[250]]= _0xa8dcxc}}})};Actions[_0xc546[4]][_0xc546[10]]= function(_0xa8dcx1b,_0xa8dcx28,_0xa8dcx29,_0xa8dcx2a,_0xa8dcx2b){return this[_0xc546[28]](_0xa8dcx1b, new Action(mxResources[_0xc546[26]](_0xa8dcx1b),_0xa8dcx28,_0xa8dcx29,_0xa8dcx2a,_0xa8dcx2b))};Actions[_0xc546[4]][_0xc546[28]]= function(_0xa8dcx2c,_0xa8dcx15){this[_0xc546[2]][_0xa8dcx2c]= _0xa8dcx15;return _0xa8dcx15};Actions[_0xc546[4]][_0xc546[26]]= function(_0xa8dcx2c){return this[_0xc546[2]][_0xa8dcx2c]};function Action(_0xa8dcx2e,_0xa8dcx28,_0xa8dcx29,_0xa8dcx2a,_0xa8dcx2b){mxEventSource[_0xc546[251]](this);this[_0xc546[252]]= _0xa8dcx2e;this[_0xc546[146]]= _0xa8dcx28;this[_0xc546[253]]= (_0xa8dcx29!= null)?_0xa8dcx29:true;this[_0xc546[254]]= _0xa8dcx2a;this[_0xc546[255]]= _0xa8dcx2b}mxUtils[_0xc546[256]](Action,mxEventSource);Action[_0xc546[4]][_0xc546[177]]= function(_0xa8dcxc){if(this[_0xc546[253]]!= _0xa8dcxc){this[_0xc546[253]]= _0xa8dcxc;this[_0xc546[258]]( new mxEventObject(_0xc546[257]))}};Action[_0xc546[4]][_0xc546[169]]= function(_0xa8dcxc){this[_0xc546[259]]= _0xa8dcxc};Action[_0xc546[4]][_0xc546[170]]= function(_0xa8dcx28){this[_0xc546[260]]= _0xa8dcx28};Action[_0xc546[4]][_0xc546[261]]= function(){return this[_0xc546[260]]()} \ No newline at end of file diff --git a/public/assets/plugins/jscripty/js/Dialogs.js b/public/assets/plugins/jscripty/js/Dialogs.js index 791874e..f8c5c36 100644 --- a/public/assets/plugins/jscripty/js/Dialogs.js +++ b/public/assets/plugins/jscripty/js/Dialogs.js @@ -1,1194 +1 @@ -'use strict'; -/** - * $Id: Dialogs.js,v 1.5 2013-01-29 17:23:31 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Constructs a new dialog. - */ - -function createCheckbox(value) { - var input = document.createElement('input'); - input.setAttribute('type', 'checkbox'); - if (value) { - input.setAttribute('checked', true); - } - return input; -} - -function createDropdownFromApi(path, value, option_name, option_value, editorUi, - keys, pattern) { - var req = new XMLHttpRequest(); - req.open('GET', path, false); // `false` makes the request synchronous - req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token); - req.send(null); - var res = []; - if (req.status === 200) { - res = JSON.parse(req.response); - } - var input = document.createElement('select'); - var option = document.createElement('option'); - option.text = '-- None --'; - option.value = '-1'; - input.appendChild(option); - res.rows.forEach(function(elem) { - option = document.createElement('option'); - option.text = elem[option_name]; - if (keys && pattern) { - keys.forEach(function(key) { - pattern = pattern.replace('%' + key + '%', elem[key]); - }); - option.value = pattern; - option.selected = (pattern == value); - } else { - option.value = elem[option_value]; - option.selected = (elem[option_value] == value); - } - input.appendChild(option); - }); - input.className = 'form-control select2'; - - return input; -} - -function createGroupedDropdownFromApi(path, value, option_name, option_value, editorUi, paginated, associationField) { - var req = new XMLHttpRequest(); - req.open('GET', path, false); // `false` makes the request synchronous - req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token); - req.send(null); - var res = []; - if (req.status === 200) { - res = JSON.parse(req.response); - } - var input = document.createElement('select'); - var option = document.createElement('option'); - option.text = '-- None --'; - option.value = '0'; - input.appendChild(option); - var selectValues = paginated ? res.rows : res; - var mainFilter = {}; - var groupFilter = {}; - mainFilter[associationField] = null; - var mainValues = _.filter(selectValues, mainFilter); - var groupValues = {}; - mainValues.forEach(function(elem) { - option = document.createElement('option'); - option.className = 'select-group-father'; - option.text = elem[option_name].toUpperCase(); - option.value = elem[option_value]; - option.selected = (elem[option_value] == value); - input.appendChild(option); - groupFilter[associationField] = elem[option_value]; - groupValues = _.filter(selectValues, groupFilter); - groupValues.forEach(function(elem) { - option = document.createElement('option'); - option.className = 'select-group-son'; - option.text = '-' + _.capitalize(elem[option_name]); - option.value = elem[option_value]; - option.selected = (elem[option_value] == value); - input.appendChild(option); - }); - }) - input.className = 'form-control select2'; - - return input; -} - -function createDropdownFromArray(array, value) { - var input = document.createElement('select'); - - for (var item in array) { - var option = document.createElement('option'); - option.text = array[item]; - option.value = item; - if (value > 0 || value != '') - option.selected = (value === item) ? true : false; - - input.appendChild(option); - } - - input.className = 'form-control select2'; - - return input; -} - -function Dialog(editorUi, elt, w, h, modal, closable, onClose) { - var dx = 0; - - if (mxClient.IS_IE && document.documentMode != 9) { - dx = 60; - } - - w += dx; - h += dx; - - var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2)); - var top = Math.max(0, Math.round((Math.max(document.body.scrollHeight, - document.documentElement.scrollHeight) - h) / 3)); - - var div = editorUi.createDiv('geDialog'); - div.className = 'modal fade in center'; - div.style.display = 'block'; - div.style.paddingRight = '12px'; - // div.style.width = w + 'px'; - // div.style.height = h + 'px'; - // div.style.left = left + 'px'; - // div.style.top = top + 'px'; - - var divModalDialog = editorUi.createDiv('geModalDialog'); - divModalDialog.className = 'modal-dialog'; - divModalDialog.appendChild(elt); - div.appendChild(divModalDialog); - - if (this.bg == null) { - this.bg = editorUi.createDiv('background'); - this.bg.className = 'modal-backdrop fade in'; - - if (mxClient.IS_QUIRKS) { - new mxDivResizer(this.bg); - } - } - - if (modal) { - document.body.appendChild(this.bg); - } - - document.body.appendChild(div); - - this.onDialogClose = onClose; - this.container = div; -}; - -/** - * Removes the dialog from the DOM. - */ -Dialog.prototype.close = function() { - if (this.onDialogClose != null) { - this.onDialogClose(); - this.onDialogClose = null; - } - - this.container.parentNode.removeChild(this.container); - this.bg.parentNode.removeChild(this.bg); -}; - -/** - * Constructs a new open dialog. - */ -function ImportDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('import') + ' XML'); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-12'); - - var textarea = document.createElement('textarea'); - textarea.style.width = '100%'; - textarea.style.height = '374px'; - - var input = document.createElement('input'); - input.type = 'file'; - input.setAttribute('accept', 'text/xml'); - - input.addEventListener('change', function readSingleFile(evt) { - //Retrieve the first (and only!) File from the FileList object - var f = evt.target.files[0]; - console.log(f); - if (f) { - if (f.type === 'text/xml') { - var r = new FileReader(); - r.onload = function(e) { - var contents = e.target.result; - mxUtils.write(textarea, contents); - }; - r.readAsText(f); - } else { - alert('Failed to load format file'); - } - } else { - alert('Failed to load file'); - } - }, false); - - col1.appendChild(input); - col1.appendChild(textarea); - - row.appendChild(col1); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('import'), mxUtils.bind(this, - function(data) { - var doc = mxUtils.parseXml(textarea.value); - editorUi.editor.setGraphXml(doc.documentElement); - editorUi.hideDialog(); - })); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - -}; - -/** - * Constructs a new about dialog. - */ -function AboutDialog(editorUi) { - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('about') + ' Cally Square'); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var img = document.createElement('img'); - img.style.border = '0px'; - img.setAttribute('width', '176'); - img.setAttribute('width', '151'); - img.setAttribute('src', IMAGE_PATH + '/logo.png'); - body.appendChild(img); - mxUtils.br(body); - mxUtils.write(body, 'Powered by Xenialab ' + mxClient.VERSION); - mxUtils.br(body); - var link = document.createElement('a'); - link.setAttribute('href', 'http://www.callysquare.com/'); - link.setAttribute('target', '_blank'); - mxUtils.write(link, 'www.callysquare.com'); - body.appendChild(link); - mxUtils.br(body); - mxUtils.br(body); - //--- END BODY - - var close = mxUtils.button(mxResources.get('close'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; -}; - -/** - * Constructs a new save dialog. - */ -function SaveDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('saveAs')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var name = 'name'; - var id = '_' + name; - var value = editorUi.editor.getOrCreateFilename(); - - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-4'); - var col2 = editorUi.createDiv('col-md-8'); - - var label = document.createElement('label'); - label.className = 'control-label pull-right'; - mxUtils.write(label, mxResources.get(name)); - col1.appendChild(label); - - var select = document.createElement('input'); - select.setAttribute('value', value + '_copy'); - select.setAttribute('id', id) - select.className = 'form-control'; - col2.appendChild(select); - - row.appendChild(col1); - row.appendChild(col2); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('save'), function() { - editorUi.saveAs(select.value); - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename()); -}; - -/** - * Constructs a new save dialog. - */ -function NewDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('new')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var name = 'name'; - var id = '_' + name; - var value = editorUi.editor.getOrCreateFilename(); - - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-4'); - var col2 = editorUi.createDiv('col-md-8'); - - var label = document.createElement('label'); - label.className = 'control-label pull-right'; - mxUtils.write(label, mxResources.get(name)); - col1.appendChild(label); - - var select = document.createElement('input'); - select.setAttribute('value', value + '_new'); - select.setAttribute('id', id) - select.className = 'form-control'; - col2.appendChild(select); - - row.appendChild(col1); - row.appendChild(col2); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('new'), function() { - editorUi.new(select.value); - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename()); -}; - -/** - * Constructs a new save dialog. - */ -function VariableDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('variable')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var name = 'name'; - var id = '_' + name; - var value = editorUi.editor.getOrCreateFilename(); - - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-4'); - var col2 = editorUi.createDiv('col-md-8'); - - var label = document.createElement('label'); - label.className = 'control-label pull-right'; - mxUtils.write(label, mxResources.get(name)); - col1.appendChild(label); - - var select = document.createElement('input'); - select.setAttribute('value', 'variable name'); - select.setAttribute('id', id) - select.className = 'form-control'; - col2.appendChild(select); - - row.appendChild(col1); - row.appendChild(col2); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('new'), function() { - editorUi.variable(select.value); - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename()); -}; - -/** - * Constructs a new save dialog. - */ -function OpenDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('open')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-4'); - var col2 = editorUi.createDiv('col-md-8'); - - var label = document.createElement('label'); - label.className = 'control-label pull-right'; - mxUtils.write(label, mxResources.get('name')); - col1.appendChild(label); - - var req = new XMLHttpRequest(); - req.open('GET', '/api/jscripty/projects', false); // `false` makes the request synchronous - req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token); - req.send(null); - var res = []; - if (req.status === 200) { - res = JSON.parse(req.response).rows; - } - - var select = document.createElement('select'); - - for (var j = 0; j < res.length; j++) { - var option = document.createElement('option'); - option.text = res[j].name; - option.value = res[j].id; - select.appendChild(option); - } - select.className = 'form-control'; - col2.appendChild(select); - - row.appendChild(col1); - row.appendChild(col2); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('open'), function() { - console.log(select); - console.log(select.value); - window.open('jscripty/projects/view/' + select.value, '_blank'); - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename()); -}; - -/** - * Constructs a new rename dialog. - */ -function RenameDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('rename')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-4'); - var col2 = editorUi.createDiv('col-md-8'); - - var label = document.createElement('label'); - label.className = 'control-label pull-right'; - mxUtils.write(label, mxResources.get('name')); - col1.appendChild(label); - var name = editorUi.editor.filename; - var input = document.createElement('input'); - input.setAttribute('value', name); - input.className = 'form-control'; - - col2.appendChild(input); - - row.appendChild(col1); - row.appendChild(col2); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('save'), function() { - var req = new XMLHttpRequest(); - - req.open("PUT", SAVE_URL + editorUi.editor.data.id, true); - req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token); - req.send('name=' + input.value); - - req.onload = function(e) { - if (req.status === 200) { - editorUi.editor.setStatus('Project successfully renamed'); - editorUi.editor.filename = input.value; - - } else { - editorUi.editor.setStatus(JSON.parse(req.response).errors[0].message) - } - } - req.onerror = function(e) { - mxUtils.alert(req.statusText); - }; - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename()); -}; -/** - * Constructs a new edit file dialog. - */ -function EditFileDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('edit')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-12'); - - var textarea = document.createElement('textarea'); - textarea.style.width = '100%'; - textarea.style.height = '374px'; - textarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml()); - - // Enables dropping files - if (fileSupport) { - function handleDrop(evt) { - evt.stopPropagation(); - evt.preventDefault(); - - if (evt.dataTransfer.files.length > 0) { - var file = evt.dataTransfer.files[0]; - - var reader = new FileReader(); - reader.onload = function(e) { - textarea.value = e.target.result; - }; - reader.readAsText(file); - } - }; - - function handleDragOver(evt) { - evt.stopPropagation(); - evt.preventDefault(); - }; - - // Setup the dnd listeners. - textarea.addEventListener('dragover', handleDragOver, false); - textarea.addEventListener('drop', handleDrop, false); - } - col1.appendChild(textarea); - - row.appendChild(col1); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('save'), function() { - var doc = mxUtils.parseXml(textarea.value); - editorUi.editor.setGraphXml(doc.documentElement); - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; -}; - -/** - * Constructs a new export dialog. - */ -function ExportDialog(editorUi) { - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body form'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('export') + ' XML'); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var form = editorUi.createDiv('form-horizontal form-row-seperated'); - var group = editorUi.createDiv('form-group last'); - - var label = document.createElement('label'); - label.className = 'col-sm-4 control-label'; - mxUtils.write(label, mxResources.get('filename')); - - var input = document.createElement('input'); - input.setAttribute('value', editorUi.editor.getOrCreateFilename()); - input.className = 'form-control'; - - var div = editorUi.createDiv('col-sm-8'); - div.appendChild(input); - - group.appendChild(label); - group.appendChild(div); - form.appendChild(group); - - body.appendChild(form); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('export'), mxUtils.bind(this, - function(data) { - editorUi.save(false); - - var xml = encodeURIComponent(mxUtils.getXml(editorUi.editor.getGraphXml())); - new mxXmlRequest(SAVE_URL + editorUi.editor.data.id + '/download', - 'filename=' + input.value, 'GET').simulate(document, "_blank"); - editorUi.hideDialog(); - })); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; -}; - -/** - * Giuseppe Careri - * Constructs a new general dialog. - */ - -function GeneralDialog(editorUi, cell) { - var graph = editorUi.editor.graph; - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body form modal-body-scroll'); - var footer = editorUi.createDiv('modal-footer'); - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('edit') + ' ' + mxResources.get(cell.value - .nodeName)); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var inputGroup = editorUi.createDiv('form-horizontal form-row-seperated'); - inputGroup.setAttribute('id', 'inputGroup'); - var length = cell.value.attributes.length; - var form = editorUi.createDiv('form-horizontal form-row-seperated'); - - for (var i = 0; i < length; i++) { - var name = cell.value.attributes[i].name; - var id = '_' + name; - var value = cell.value.attributes[i].value; - console.log(name); - var group = editorUi.createDiv((i == length - 1) ? 'form-group last' : - 'form-group'); - - var label = document.createElement('label'); - label.className = 'col-sm-4 control-label'; - mxUtils.write(label, mxResources.get(name)); - group.appendChild(label); - - var input; - - switch (name) { - case 'id': - input = document.createElement('input'); - value = cell.id; - input.setAttribute('value', value); - input.setAttribute('disabled', true) - input.className = 'form-control'; - break; - case 'state': - input = document.createElement('input'); - input.setAttribute('type', 'button') - input.onclick = function() { - if (this.value == 'ON') { - this.setAttribute('value', 'OFF'); - this.className = 'btn btn-danger btn-md'; - } else { - this.className = 'btn btn-success btn-md'; - this.setAttribute('value', 'ON'); - } - - }; - input.setAttribute('value', value); - input.className = (value == 'ON' ? 'btn btn-success btn-md' : 'btn btn-danger btn-md'); - - break; - case 'text': - input = document.createElement('textarea'); - input.innerHTML = value; - input.className = 'form-control'; - break; - case 'Body': - input = document.createElement('textarea'); - input.innerHTML = value; - input.className = 'form-control'; - break; - case 'question': - input = document.createElement('textarea'); - input.innerHTML = value; - input.className = 'form-control'; - - break; - case 'other': - input = document.createElement('input'); - input.setAttribute('value', value); - input.setAttribute('placeholder', 'Insert label for "Other" answer option'); - input.className = 'form-control'; - break; - // case 'addtext': - // var input = document.createElement('input'); - // input.setAttribute('type', 'checkbox'); - // console.log('value', value); - // if (value == 'true') { - // input.setAttribute('checked', true); - // - // } else { - // input.removeAttribute("checked"); - // - // } - // // input.value = input.checked; - // - // input.onclick = function() { - // this.value = this.checked; - // - // console.log(input); - // if (this.checked) { - // console.log(this.checked); - // var rowdiv = editorUi.createDiv('form-group'); - // rowdiv.setAttribute('id', 'rowdiv'); - // var col1 = editorUi.createDiv('col-md-4'); - // var col2 = editorUi.createDiv('col-md-8'); - // var label = document.createElement('label'); - // // input.setAttribute('placeholder', 'Insert label'); - // label.className = 'pull-right control-label'; - // mxUtils.write(label, 'Texarea Label'); - // col1.appendChild(label); - // var input = document.createElement('input'); - // // input.setAttribute('placeholder', 'Insert label'); - // // input.value = inputValue; - // input.className = 'form-control'; - // col2.appendChild(input); - // rowdiv.appendChild(col1); - // rowdiv.appendChild(col2); - // inputGroup.appendChild(rowdiv); - // body.appendChild(inputGroup); - // } else { - // console.log(this.checked); - // document.getElementById('inputGroup').removeChild(document.getElementById('rowdiv')); - // } - // }; - // - // - // input.className = 'btn green'; - // break; - case 'account_id': - input = createDropdownFromApi('/api/sms/accounts', value, 'name', 'id', - editorUi); - break; - case 'sms_text': - input = document.createElement('textarea'); - input.innerHTML = value; - input.className = 'form-control'; - input.setAttribute('maxlength', "160"); - - break; - case 'add': - var input = mxUtils.button('+', function() { - var rowdiv = createDynamicInput(null, null, editorUi); - inputGroup.appendChild(rowdiv); - body.appendChild(inputGroup); - }) - - input.className = 'btn green'; - break; - default: - input = document.createElement('input'); - input.setAttribute('value', value); - input.className = 'form-control'; - break; - } - - input.setAttribute('id', id) - var div = editorUi.createDiv('col-sm-8'); - div.appendChild(input); - // Help - if (mxResources.get('help_' + name)) { - var help = editorUi.createDiv('p'); - help.className = 'help-block'; - mxUtils.write(help, mxResources.get('help_' + name)); - div.appendChild(help); - } - - group.appendChild(div); - form.appendChild(group); - } - body.appendChild(form); - // console.log(cell); - if (cell.value.nodeName == 'input') { - - if (cell.children) { - for (var j = 0; j < cell.children.length; j++) { - var selectValue = ''; - var inputValue = ''; - _.forEach(cell.children[j].value.attributes, function(element) { - // console.log(element); - if (element.name == 'type') { - selectValue = element.value; - - } else if (element.name == 'label') { - inputValue = element.value; - - } - }) - var rowdiv = createDynamicInput(selectValue, inputValue, editorUi); - inputGroup.appendChild(rowdiv); - - } - } - - } - body.appendChild(inputGroup); - - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('save'), mxUtils.bind(this, - function(data) { - for (var i = 0; i < cell.value.attributes.length; i++) { - var id = '_' + cell.value.attributes[i].name; - var name = cell.value.attributes[i].name; - console.log(name); - - cell.setAttribute(name, document.getElementById(id).value); - console.log(document.getElementById(id).value); - - - }; - - if (cell.value.nodeName == 'input') { - if (graph.model.getChildCount(cell)) { - cell.children = []; - } - if (document.getElementById('inputGroup')) { - var inputGroup = document.getElementById('inputGroup').children; - for (var j = 0; j < inputGroup.length; j++) { - - var divSelect = inputGroup[j].children[1]; - var divInput = inputGroup[j].children[0]; - var doc = mxUtils.createXmlDocument(); - var node = doc.createElement('inputGroup'); - node.setAttribute('type', inputGroup[j].getElementsByTagName('select')[0].value); - node.setAttribute('label', inputGroup[j].getElementsByTagName('input')[0].value); - var cells = new mxCell(node); - graph.model.add(cell, cells); - } - } - } - - graph.refresh(cell); - editorUi.hideDialog(); - })); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; -}; - - - -function createDynamicInput(selectValue, inputValue, editorUi) { - - var rowdiv = editorUi.createDiv('form-group'); - var col1 = editorUi.createDiv('col-md-5'); - var col2 = editorUi.createDiv('col-md-5'); - var col3 = editorUi.createDiv('col-md-2'); - - var input = document.createElement('input'); - input.setAttribute('placeholder', 'Insert label'); - input.value = inputValue; - input.className = 'form-control'; - col1.appendChild(input); - - var select = document.createElement('select'); - var option = document.createElement('option'); - option.text = '-- None --'; - option.value = ''; - select.appendChild(option); - - var selectValues = ['text', 'number', 'textarea', 'checkbox']; - selectValues.forEach(function(elem) { - option = document.createElement('option'); - option.text = elem; - option.value = elem; - option.selected = (elem == selectValue); - select.appendChild(option); - }) - select.className = 'form-control'; - col2.appendChild(select); - var button = mxUtils.button('x', function() { - var buttonParent = button.parentElement; - var divParent = buttonParent.parentElement; - document.getElementById('inputGroup').removeChild(divParent); - }) - - button.className = 'btn red'; - col3.appendChild(button); - rowdiv.appendChild(col1); - rowdiv.appendChild(col2); - rowdiv.appendChild(col3); - return rowdiv; - - -} +var _0xd7b4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x6E\x70\x75\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x79\x70\x65","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x68\x65\x63\x6B\x65\x64","\x47\x45\x54","\x6F\x70\x65\x6E","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x64\x61\x74\x61","\x65\x64\x69\x74\x6F\x72","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x73\x65\x6C\x65\x63\x74","\x6F\x70\x74\x69\x6F\x6E","\x74\x65\x78\x74","\x2D\x2D\x20\x4E\x6F\x6E\x65\x20\x2D\x2D","\x76\x61\x6C\x75\x65","\x2D\x31","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x25","\x72\x65\x70\x6C\x61\x63\x65","\x66\x6F\x72\x45\x61\x63\x68","\x73\x65\x6C\x65\x63\x74\x65\x64","\x72\x6F\x77\x73","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x73\x65\x6C\x65\x63\x74\x32","\x30","\x66\x69\x6C\x74\x65\x72","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x66\x61\x74\x68\x65\x72","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6F\x6E","\x2D","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x73\x63\x72\x6F\x6C\x6C\x57\x69\x64\x74\x68","\x62\x6F\x64\x79","\x72\x6F\x75\x6E\x64","\x6D\x61\x78","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x44\x69\x61\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x20\x63\x65\x6E\x74\x65\x72","\x64\x69\x73\x70\x6C\x61\x79","\x73\x74\x79\x6C\x65","\x62\x6C\x6F\x63\x6B","\x70\x61\x64\x64\x69\x6E\x67\x52\x69\x67\x68\x74","\x31\x32\x70\x78","\x67\x65\x4D\x6F\x64\x61\x6C\x44\x69\x61\x6C\x6F\x67","\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67","\x62\x67","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x6D\x6F\x64\x61\x6C\x2D\x62\x61\x63\x6B\x64\x72\x6F\x70\x20\x66\x61\x64\x65\x20\x69\x6E","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x6E\x44\x69\x61\x6C\x6F\x67\x43\x6C\x6F\x73\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x6C\x6F\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x64\x61\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74","\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79","\x6D\x6F\x64\x61\x6C\x2D\x66\x6F\x6F\x74\x65\x72","\x68\x34","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x69\x6D\x70\x6F\x72\x74","\x67\x65\x74","\x20\x58\x4D\x4C","\x77\x72\x69\x74\x65","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x62\x75\x74\x74\x6F\x6E","\x72\x6F\x77","\x63\x6F\x6C\x2D\x6D\x64\x2D\x31\x32","\x74\x65\x78\x74\x61\x72\x65\x61","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x68\x65\x69\x67\x68\x74","\x33\x37\x34\x70\x78","\x66\x69\x6C\x65","\x61\x63\x63\x65\x70\x74","\x74\x65\x78\x74\x2F\x78\x6D\x6C","\x63\x68\x61\x6E\x67\x65","\x66\x69\x6C\x65\x73","\x74\x61\x72\x67\x65\x74","\x6C\x6F\x67","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x73\x75\x6C\x74","\x72\x65\x61\x64\x41\x73\x54\x65\x78\x74","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x6F\x72\x6D\x61\x74\x20\x66\x69\x6C\x65","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x69\x6C\x65","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x62\x69\x6E\x64","\x62\x74\x6E\x20\x62\x6C\x75\x65","\x63\x61\x6E\x63\x65\x6C","\x62\x74\x6E\x20\x64\x65\x66\x61\x75\x6C\x74","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x69\x6D\x67","\x62\x6F\x72\x64\x65\x72","\x30\x70\x78","\x31\x37\x36","\x31\x35\x31","\x73\x72\x63","\x2F\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x62\x72","\x50\x6F\x77\x65\x72\x65\x64\x20\x62\x79\x20\x58\x65\x6E\x69\x61\x6C\x61\x62\x20","\x56\x45\x52\x53\x49\x4F\x4E","\x61","\x68\x72\x65\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D\x2F","\x5F\x62\x6C\x61\x6E\x6B","\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D","\x73\x61\x76\x65\x41\x73","\x6E\x61\x6D\x65","\x5F","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x63\x6F\x6C\x2D\x6D\x64\x2D\x34","\x63\x6F\x6C\x2D\x6D\x64\x2D\x38","\x6C\x61\x62\x65\x6C","\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C\x20\x70\x75\x6C\x6C\x2D\x72\x69\x67\x68\x74","\x5F\x63\x6F\x70\x79","\x69\x64","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C","\x73\x61\x76\x65","\x6E\x65\x77","\x5F\x6E\x65\x77","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x6E\x61\x6D\x65","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x76\x69\x65\x77\x2F","\x72\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x50\x55\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6E\x61\x6D\x65\x3D","\x50\x72\x6F\x6A\x65\x63\x74\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x72\x65\x6E\x61\x6D\x65\x64","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72\x73","\x6F\x6E\x65\x72\x72\x6F\x72","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x6C\x65\x72\x74","\x65\x64\x69\x74","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x73\x74\x6F\x70\x50\x72\x6F\x70\x61\x67\x61\x74\x69\x6F\x6E","\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74","\x64\x61\x74\x61\x54\x72\x61\x6E\x73\x66\x65\x72","\x64\x72\x61\x67\x6F\x76\x65\x72","\x64\x72\x6F\x70","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D","\x65\x78\x70\x6F\x72\x74","\x66\x6F\x72\x6D\x2D\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x20\x66\x6F\x72\x6D\x2D\x72\x6F\x77\x2D\x73\x65\x70\x65\x72\x61\x74\x65\x64","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70\x20\x6C\x61\x73\x74","\x63\x6F\x6C\x2D\x73\x6D\x2D\x34\x20\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C","\x63\x6F\x6C\x2D\x73\x6D\x2D\x38","\x67\x65\x74\x58\x6D\x6C","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D","\x67\x72\x61\x70\x68","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D\x20\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x2D\x73\x63\x72\x6F\x6C\x6C","\x20","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x69\x6E\x70\x75\x74\x47\x72\x6F\x75\x70","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70","\x64\x69\x73\x61\x62\x6C\x65\x64","\x6F\x6E\x63\x6C\x69\x63\x6B","\x4F\x4E","\x4F\x46\x46","\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x20\x62\x74\x6E\x2D\x6D\x64","\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x20\x62\x74\x6E\x2D\x6D\x64","\x73\x74\x61\x74\x65","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x42\x6F\x64\x79","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x49\x6E\x73\x65\x72\x74\x20\x6C\x61\x62\x65\x6C\x20\x66\x6F\x72\x20\x22\x4F\x74\x68\x65\x72\x22\x20\x61\x6E\x73\x77\x65\x72\x20\x6F\x70\x74\x69\x6F\x6E","\x6F\x74\x68\x65\x72","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x6D\x61\x78\x6C\x65\x6E\x67\x74\x68","\x31\x36\x30","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x2B","\x62\x74\x6E\x20\x67\x72\x65\x65\x6E","\x61\x64\x64","\x68\x65\x6C\x70\x5F","\x70","\x68\x65\x6C\x70\x2D\x62\x6C\x6F\x63\x6B","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x6D\x6F\x64\x65\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x72\x65\x66\x72\x65\x73\x68","\x63\x6F\x6C\x2D\x6D\x64\x2D\x35","\x63\x6F\x6C\x2D\x6D\x64\x2D\x32","\x49\x6E\x73\x65\x72\x74\x20\x6C\x61\x62\x65\x6C","\x6E\x75\x6D\x62\x65\x72","\x78","\x70\x61\x72\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x62\x74\x6E\x20\x72\x65\x64"];_0xd7b4[0];function createCheckbox(_0x3518x2){var _0x3518x3=document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x3[_0xd7b4[5]](_0xd7b4[3],_0xd7b4[4]);if(_0x3518x2){_0x3518x3[_0xd7b4[5]](_0xd7b4[6],true)};return _0x3518x3}function createDropdownFromApi(_0x3518x5,_0x3518x2,_0x3518x6,_0x3518x7,_0x3518x8,_0x3518x9,_0x3518xa){var _0x3518xb= new XMLHttpRequest();_0x3518xb[_0xd7b4[8]](_0xd7b4[7],_0x3518x5,false);_0x3518xb[_0xd7b4[14]](_0xd7b4[9],_0xd7b4[10]+ _0x3518x8[_0xd7b4[13]][_0xd7b4[12]][_0xd7b4[11]]);_0x3518xb[_0xd7b4[15]](null);var _0x3518xc=[];if(_0x3518xb[_0xd7b4[16]]=== 200){_0x3518xc= JSON[_0xd7b4[18]](_0x3518xb[_0xd7b4[17]])};var _0x3518x3=document[_0xd7b4[2]](_0xd7b4[19]);var _0x3518xd=document[_0xd7b4[2]](_0xd7b4[20]);_0x3518xd[_0xd7b4[21]]= _0xd7b4[22];_0x3518xd[_0xd7b4[23]]= _0xd7b4[24];_0x3518x3[_0xd7b4[25]](_0x3518xd);_0x3518xc[_0xd7b4[30]][_0xd7b4[28]](function(_0x3518xe){_0x3518xd= document[_0xd7b4[2]](_0xd7b4[20]);_0x3518xd[_0xd7b4[21]]= _0x3518xe[_0x3518x6];if(_0x3518x9&& _0x3518xa){_0x3518x9[_0xd7b4[28]](function(_0x3518xf){_0x3518xa= _0x3518xa[_0xd7b4[27]](_0xd7b4[26]+ _0x3518xf+ _0xd7b4[26],_0x3518xe[_0x3518xf])});_0x3518xd[_0xd7b4[23]]= _0x3518xa;_0x3518xd[_0xd7b4[29]]= (_0x3518xa== _0x3518x2)}else {_0x3518xd[_0xd7b4[23]]= _0x3518xe[_0x3518x7];_0x3518xd[_0xd7b4[29]]= (_0x3518xe[_0x3518x7]== _0x3518x2)};_0x3518x3[_0xd7b4[25]](_0x3518xd)});_0x3518x3[_0xd7b4[31]]= _0xd7b4[32];return _0x3518x3}function createGroupedDropdownFromApi(_0x3518x5,_0x3518x2,_0x3518x6,_0x3518x7,_0x3518x8,_0x3518x11,_0x3518x12){var _0x3518xb= new XMLHttpRequest();_0x3518xb[_0xd7b4[8]](_0xd7b4[7],_0x3518x5,false);_0x3518xb[_0xd7b4[14]](_0xd7b4[9],_0xd7b4[10]+ _0x3518x8[_0xd7b4[13]][_0xd7b4[12]][_0xd7b4[11]]);_0x3518xb[_0xd7b4[15]](null);var _0x3518xc=[];if(_0x3518xb[_0xd7b4[16]]=== 200){_0x3518xc= JSON[_0xd7b4[18]](_0x3518xb[_0xd7b4[17]])};var _0x3518x3=document[_0xd7b4[2]](_0xd7b4[19]);var _0x3518xd=document[_0xd7b4[2]](_0xd7b4[20]);_0x3518xd[_0xd7b4[21]]= _0xd7b4[22];_0x3518xd[_0xd7b4[23]]= _0xd7b4[33];_0x3518x3[_0xd7b4[25]](_0x3518xd);var _0x3518x13=_0x3518x11?_0x3518xc[_0xd7b4[30]]:_0x3518xc;var _0x3518x14={};var _0x3518x15={};_0x3518x14[_0x3518x12]= null;var _0x3518x16=_[_0xd7b4[34]](_0x3518x13,_0x3518x14);var _0x3518x17={};_0x3518x16[_0xd7b4[28]](function(_0x3518xe){_0x3518xd= document[_0xd7b4[2]](_0xd7b4[20]);_0x3518xd[_0xd7b4[31]]= _0xd7b4[35];_0x3518xd[_0xd7b4[21]]= _0x3518xe[_0x3518x6][_0xd7b4[36]]();_0x3518xd[_0xd7b4[23]]= _0x3518xe[_0x3518x7];_0x3518xd[_0xd7b4[29]]= (_0x3518xe[_0x3518x7]== _0x3518x2);_0x3518x3[_0xd7b4[25]](_0x3518xd);_0x3518x15[_0x3518x12]= _0x3518xe[_0x3518x7];_0x3518x17= _[_0xd7b4[34]](_0x3518x13,_0x3518x15);_0x3518x17[_0xd7b4[28]](function(_0x3518xe){_0x3518xd= document[_0xd7b4[2]](_0xd7b4[20]);_0x3518xd[_0xd7b4[31]]= _0xd7b4[37];_0x3518xd[_0xd7b4[21]]= _0xd7b4[38]+ _[_0xd7b4[39]](_0x3518xe[_0x3518x6]);_0x3518xd[_0xd7b4[23]]= _0x3518xe[_0x3518x7];_0x3518xd[_0xd7b4[29]]= (_0x3518xe[_0x3518x7]== _0x3518x2);_0x3518x3[_0xd7b4[25]](_0x3518xd)})});_0x3518x3[_0xd7b4[31]]= _0xd7b4[32];return _0x3518x3}function createDropdownFromArray(_0x3518x19,_0x3518x2){var _0x3518x3=document[_0xd7b4[2]](_0xd7b4[19]);for(var _0x3518x1a in _0x3518x19){var _0x3518xd=document[_0xd7b4[2]](_0xd7b4[20]);_0x3518xd[_0xd7b4[21]]= _0x3518x19[_0x3518x1a];_0x3518xd[_0xd7b4[23]]= _0x3518x1a;if(_0x3518x2> 0|| _0x3518x2!= _0xd7b4[40]){_0x3518xd[_0xd7b4[29]]= (_0x3518x2=== _0x3518x1a)?true:false};_0x3518x3[_0xd7b4[25]](_0x3518xd)};_0x3518x3[_0xd7b4[31]]= _0xd7b4[32];return _0x3518x3}function Dialog(_0x3518x8,_0x3518x1c,_0x3518x1d,_0x3518x1e,_0x3518x1f,_0x3518x20,_0x3518x21){var _0x3518x22=0;if(mxClient[_0xd7b4[41]]&& document[_0xd7b4[42]]!= 9){_0x3518x22= 60};_0x3518x1d+= _0x3518x22;_0x3518x1e+= _0x3518x22;var _0x3518x23=Math[_0xd7b4[46]](0,Math[_0xd7b4[45]]((document[_0xd7b4[44]][_0xd7b4[43]]- _0x3518x1d)/ 2));var _0x3518x24=Math[_0xd7b4[46]](0,Math[_0xd7b4[45]]((Math[_0xd7b4[46]](document[_0xd7b4[44]][_0xd7b4[47]],document[_0xd7b4[48]][_0xd7b4[47]])- _0x3518x1e)/ 3));var _0x3518x25=_0x3518x8[_0xd7b4[50]](_0xd7b4[49]);_0x3518x25[_0xd7b4[31]]= _0xd7b4[51];_0x3518x25[_0xd7b4[53]][_0xd7b4[52]]= _0xd7b4[54];_0x3518x25[_0xd7b4[53]][_0xd7b4[55]]= _0xd7b4[56];var _0x3518x26=_0x3518x8[_0xd7b4[50]](_0xd7b4[57]);_0x3518x26[_0xd7b4[31]]= _0xd7b4[58];_0x3518x26[_0xd7b4[25]](_0x3518x1c);_0x3518x25[_0xd7b4[25]](_0x3518x26);if(this[_0xd7b4[59]]== null){this[_0xd7b4[59]]= _0x3518x8[_0xd7b4[50]](_0xd7b4[60]);this[_0xd7b4[59]][_0xd7b4[31]]= _0xd7b4[61];if(mxClient[_0xd7b4[62]]){ new mxDivResizer(this[_0xd7b4[59]])}};if(_0x3518x1f){document[_0xd7b4[44]][_0xd7b4[25]](this[_0xd7b4[59]])};document[_0xd7b4[44]][_0xd7b4[25]](_0x3518x25);this[_0xd7b4[63]]= _0x3518x21;this[_0xd7b4[64]]= _0x3518x25}Dialog[_0xd7b4[66]][_0xd7b4[65]]= function(){if(this[_0xd7b4[63]]!= null){this[_0xd7b4[63]]();this[_0xd7b4[63]]= null};this[_0xd7b4[64]][_0xd7b4[68]][_0xd7b4[67]](this[_0xd7b4[64]]);this[_0xd7b4[59]][_0xd7b4[68]][_0xd7b4[67]](this[_0xd7b4[59]])};function ImportDialog(_0x3518x8){var _0x3518x28=_0x3518x8[_0xd7b4[50]](_0xd7b4[69]);var _0x3518x29=_0x3518x8[_0xd7b4[50]](_0xd7b4[70]);var _0x3518x2a=_0x3518x8[_0xd7b4[50]](_0xd7b4[71]);var _0x3518x2b=_0x3518x8[_0xd7b4[50]](_0xd7b4[72]);var _0x3518x2c=_0x3518x8[_0xd7b4[74]](_0xd7b4[73]);mxUtils[_0xd7b4[78]](_0x3518x2c,mxResources[_0xd7b4[76]](_0xd7b4[75])+ _0xd7b4[77]);var _0x3518x2d=mxUtils[_0xd7b4[80]](_0xd7b4[40],function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x2d[_0xd7b4[31]]= _0xd7b4[65];_0x3518x29[_0xd7b4[25]](_0x3518x2d);_0x3518x29[_0xd7b4[25]](_0x3518x2c);var _0x3518x2e=_0x3518x8[_0xd7b4[50]](_0xd7b4[81]);var _0x3518x2f=_0x3518x8[_0xd7b4[50]](_0xd7b4[82]);var _0x3518x30=document[_0xd7b4[2]](_0xd7b4[83]);_0x3518x30[_0xd7b4[53]][_0xd7b4[84]]= _0xd7b4[85];_0x3518x30[_0xd7b4[53]][_0xd7b4[86]]= _0xd7b4[87];var _0x3518x3=document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x3[_0xd7b4[3]]= _0xd7b4[88];_0x3518x3[_0xd7b4[5]](_0xd7b4[89],_0xd7b4[90]);_0x3518x3[_0xd7b4[100]](_0xd7b4[91],function _0x3518x31(_0x3518x32){var _0x3518x33=_0x3518x32[_0xd7b4[93]][_0xd7b4[92]][0];console[_0xd7b4[94]](_0x3518x33);if(_0x3518x33){if(_0x3518x33[_0xd7b4[3]]=== _0xd7b4[90]){var _0x3518x34= new FileReader();_0x3518x34[_0xd7b4[95]]= function(_0x3518x35){var _0x3518x36=_0x3518x35[_0xd7b4[93]][_0xd7b4[96]];mxUtils[_0xd7b4[78]](_0x3518x30,_0x3518x36)};_0x3518x34[_0xd7b4[97]](_0x3518x33)}else {alert(_0xd7b4[98])}}else {alert(_0xd7b4[99])}},false);_0x3518x2f[_0xd7b4[25]](_0x3518x3);_0x3518x2f[_0xd7b4[25]](_0x3518x30);_0x3518x2e[_0xd7b4[25]](_0x3518x2f);_0x3518x2a[_0xd7b4[25]](_0x3518x2e);var _0x3518x37=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[75]),mxUtils[_0xd7b4[103]](this,function(_0x3518x38){var _0x3518x39=mxUtils[_0xd7b4[101]](_0x3518x30[_0xd7b4[23]]);_0x3518x8[_0xd7b4[13]][_0xd7b4[102]](_0x3518x39[_0xd7b4[48]]);_0x3518x8[_0xd7b4[79]]()}));_0x3518x37[_0xd7b4[31]]= _0xd7b4[104];var _0x3518x3a=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[105]),function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x3a[_0xd7b4[31]]= _0xd7b4[106];_0x3518x2b[_0xd7b4[25]](_0x3518x37);_0x3518x2b[_0xd7b4[25]](_0x3518x3a);_0x3518x28[_0xd7b4[25]](_0x3518x29);_0x3518x28[_0xd7b4[25]](_0x3518x2a);_0x3518x28[_0xd7b4[25]](_0x3518x2b);this[_0xd7b4[64]]= _0x3518x28}function AboutDialog(_0x3518x8){var _0x3518x28=_0x3518x8[_0xd7b4[50]](_0xd7b4[69]);var _0x3518x29=_0x3518x8[_0xd7b4[50]](_0xd7b4[70]);var _0x3518x2a=_0x3518x8[_0xd7b4[50]](_0xd7b4[71]);var _0x3518x2b=_0x3518x8[_0xd7b4[50]](_0xd7b4[72]);var _0x3518x2c=_0x3518x8[_0xd7b4[74]](_0xd7b4[73]);mxUtils[_0xd7b4[78]](_0x3518x2c,mxResources[_0xd7b4[76]](_0xd7b4[107])+ _0xd7b4[108]);var _0x3518x2d=mxUtils[_0xd7b4[80]](_0xd7b4[40],function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x2d[_0xd7b4[31]]= _0xd7b4[65];_0x3518x29[_0xd7b4[25]](_0x3518x2d);_0x3518x29[_0xd7b4[25]](_0x3518x2c);var _0x3518x3c=document[_0xd7b4[2]](_0xd7b4[109]);_0x3518x3c[_0xd7b4[53]][_0xd7b4[110]]= _0xd7b4[111];_0x3518x3c[_0xd7b4[5]](_0xd7b4[84],_0xd7b4[112]);_0x3518x3c[_0xd7b4[5]](_0xd7b4[84],_0xd7b4[113]);_0x3518x3c[_0xd7b4[5]](_0xd7b4[114],IMAGE_PATH+ _0xd7b4[115]);_0x3518x2a[_0xd7b4[25]](_0x3518x3c);mxUtils[_0xd7b4[116]](_0x3518x2a);mxUtils[_0xd7b4[78]](_0x3518x2a,_0xd7b4[117]+ mxClient[_0xd7b4[118]]);mxUtils[_0xd7b4[116]](_0x3518x2a);var _0x3518x3d=document[_0xd7b4[2]](_0xd7b4[119]);_0x3518x3d[_0xd7b4[5]](_0xd7b4[120],_0xd7b4[121]);_0x3518x3d[_0xd7b4[5]](_0xd7b4[93],_0xd7b4[122]);mxUtils[_0xd7b4[78]](_0x3518x3d,_0xd7b4[123]);_0x3518x2a[_0xd7b4[25]](_0x3518x3d);mxUtils[_0xd7b4[116]](_0x3518x2a);mxUtils[_0xd7b4[116]](_0x3518x2a);var _0x3518x3a=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[65]),function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x3a[_0xd7b4[31]]= _0xd7b4[106];_0x3518x2b[_0xd7b4[25]](_0x3518x3a);_0x3518x28[_0xd7b4[25]](_0x3518x29);_0x3518x28[_0xd7b4[25]](_0x3518x2a);_0x3518x28[_0xd7b4[25]](_0x3518x2b);this[_0xd7b4[64]]= _0x3518x28}function SaveDialog(_0x3518x8){var _0x3518x28=_0x3518x8[_0xd7b4[50]](_0xd7b4[69]);var _0x3518x29=_0x3518x8[_0xd7b4[50]](_0xd7b4[70]);var _0x3518x2a=_0x3518x8[_0xd7b4[50]](_0xd7b4[71]);var _0x3518x2b=_0x3518x8[_0xd7b4[50]](_0xd7b4[72]);var _0x3518x2c=_0x3518x8[_0xd7b4[74]](_0xd7b4[73]);mxUtils[_0xd7b4[78]](_0x3518x2c,mxResources[_0xd7b4[76]](_0xd7b4[124]));var _0x3518x2d=mxUtils[_0xd7b4[80]](_0xd7b4[40],function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x2d[_0xd7b4[31]]= _0xd7b4[65];_0x3518x29[_0xd7b4[25]](_0x3518x2d);_0x3518x29[_0xd7b4[25]](_0x3518x2c);var _0x3518x3f=_0xd7b4[125];var _0x3518x40=_0xd7b4[126]+ _0x3518x3f;var _0x3518x2=_0x3518x8[_0xd7b4[13]][_0xd7b4[127]]();var _0x3518x2e=_0x3518x8[_0xd7b4[50]](_0xd7b4[81]);var _0x3518x2f=_0x3518x8[_0xd7b4[50]](_0xd7b4[128]);var _0x3518x41=_0x3518x8[_0xd7b4[50]](_0xd7b4[129]);var _0x3518x42=document[_0xd7b4[2]](_0xd7b4[130]);_0x3518x42[_0xd7b4[31]]= _0xd7b4[131];mxUtils[_0xd7b4[78]](_0x3518x42,mxResources[_0xd7b4[76]](_0x3518x3f));_0x3518x2f[_0xd7b4[25]](_0x3518x42);var _0x3518x43=document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x43[_0xd7b4[5]](_0xd7b4[23],_0x3518x2+ _0xd7b4[132]);_0x3518x43[_0xd7b4[5]](_0xd7b4[133],_0x3518x40);_0x3518x43[_0xd7b4[31]]= _0xd7b4[134];_0x3518x41[_0xd7b4[25]](_0x3518x43);_0x3518x2e[_0xd7b4[25]](_0x3518x2f);_0x3518x2e[_0xd7b4[25]](_0x3518x41);_0x3518x2a[_0xd7b4[25]](_0x3518x2e);var _0x3518x37=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[135]),function(){_0x3518x8[_0xd7b4[124]](_0x3518x43[_0xd7b4[23]]);_0x3518x8[_0xd7b4[79]]()});_0x3518x37[_0xd7b4[31]]= _0xd7b4[104];var _0x3518x3a=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[105]),function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x3a[_0xd7b4[31]]= _0xd7b4[106];_0x3518x2b[_0xd7b4[25]](_0x3518x37);_0x3518x2b[_0xd7b4[25]](_0x3518x3a);_0x3518x28[_0xd7b4[25]](_0x3518x29);_0x3518x28[_0xd7b4[25]](_0x3518x2a);_0x3518x28[_0xd7b4[25]](_0x3518x2b);this[_0xd7b4[64]]= _0x3518x28}function NewDialog(_0x3518x8){var _0x3518x28=_0x3518x8[_0xd7b4[50]](_0xd7b4[69]);var _0x3518x29=_0x3518x8[_0xd7b4[50]](_0xd7b4[70]);var _0x3518x2a=_0x3518x8[_0xd7b4[50]](_0xd7b4[71]);var _0x3518x2b=_0x3518x8[_0xd7b4[50]](_0xd7b4[72]);var _0x3518x2c=_0x3518x8[_0xd7b4[74]](_0xd7b4[73]);mxUtils[_0xd7b4[78]](_0x3518x2c,mxResources[_0xd7b4[76]](_0xd7b4[136]));var _0x3518x2d=mxUtils[_0xd7b4[80]](_0xd7b4[40],function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x2d[_0xd7b4[31]]= _0xd7b4[65];_0x3518x29[_0xd7b4[25]](_0x3518x2d);_0x3518x29[_0xd7b4[25]](_0x3518x2c);var _0x3518x3f=_0xd7b4[125];var _0x3518x40=_0xd7b4[126]+ _0x3518x3f;var _0x3518x2=_0x3518x8[_0xd7b4[13]][_0xd7b4[127]]();var _0x3518x2e=_0x3518x8[_0xd7b4[50]](_0xd7b4[81]);var _0x3518x2f=_0x3518x8[_0xd7b4[50]](_0xd7b4[128]);var _0x3518x41=_0x3518x8[_0xd7b4[50]](_0xd7b4[129]);var _0x3518x42=document[_0xd7b4[2]](_0xd7b4[130]);_0x3518x42[_0xd7b4[31]]= _0xd7b4[131];mxUtils[_0xd7b4[78]](_0x3518x42,mxResources[_0xd7b4[76]](_0x3518x3f));_0x3518x2f[_0xd7b4[25]](_0x3518x42);var _0x3518x43=document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x43[_0xd7b4[5]](_0xd7b4[23],_0x3518x2+ _0xd7b4[137]);_0x3518x43[_0xd7b4[5]](_0xd7b4[133],_0x3518x40);_0x3518x43[_0xd7b4[31]]= _0xd7b4[134];_0x3518x41[_0xd7b4[25]](_0x3518x43);_0x3518x2e[_0xd7b4[25]](_0x3518x2f);_0x3518x2e[_0xd7b4[25]](_0x3518x41);_0x3518x2a[_0xd7b4[25]](_0x3518x2e);var _0x3518x37=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[136]),function(){_0x3518x8[_0xd7b4[136]](_0x3518x43[_0xd7b4[23]]);_0x3518x8[_0xd7b4[79]]()});_0x3518x37[_0xd7b4[31]]= _0xd7b4[104];var _0x3518x3a=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[105]),function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x3a[_0xd7b4[31]]= _0xd7b4[106];_0x3518x2b[_0xd7b4[25]](_0x3518x37);_0x3518x2b[_0xd7b4[25]](_0x3518x3a);_0x3518x28[_0xd7b4[25]](_0x3518x29);_0x3518x28[_0xd7b4[25]](_0x3518x2a);_0x3518x28[_0xd7b4[25]](_0x3518x2b);this[_0xd7b4[64]]= _0x3518x28}function VariableDialog(_0x3518x8){var _0x3518x28=_0x3518x8[_0xd7b4[50]](_0xd7b4[69]);var _0x3518x29=_0x3518x8[_0xd7b4[50]](_0xd7b4[70]);var _0x3518x2a=_0x3518x8[_0xd7b4[50]](_0xd7b4[71]);var _0x3518x2b=_0x3518x8[_0xd7b4[50]](_0xd7b4[72]);var _0x3518x2c=_0x3518x8[_0xd7b4[74]](_0xd7b4[73]);mxUtils[_0xd7b4[78]](_0x3518x2c,mxResources[_0xd7b4[76]](_0xd7b4[138]));var _0x3518x2d=mxUtils[_0xd7b4[80]](_0xd7b4[40],function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x2d[_0xd7b4[31]]= _0xd7b4[65];_0x3518x29[_0xd7b4[25]](_0x3518x2d);_0x3518x29[_0xd7b4[25]](_0x3518x2c);var _0x3518x3f=_0xd7b4[125];var _0x3518x40=_0xd7b4[126]+ _0x3518x3f;var _0x3518x2=_0x3518x8[_0xd7b4[13]][_0xd7b4[127]]();var _0x3518x2e=_0x3518x8[_0xd7b4[50]](_0xd7b4[81]);var _0x3518x2f=_0x3518x8[_0xd7b4[50]](_0xd7b4[128]);var _0x3518x41=_0x3518x8[_0xd7b4[50]](_0xd7b4[129]);var _0x3518x42=document[_0xd7b4[2]](_0xd7b4[130]);_0x3518x42[_0xd7b4[31]]= _0xd7b4[131];mxUtils[_0xd7b4[78]](_0x3518x42,mxResources[_0xd7b4[76]](_0x3518x3f));_0x3518x2f[_0xd7b4[25]](_0x3518x42);var _0x3518x43=document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x43[_0xd7b4[5]](_0xd7b4[23],_0xd7b4[139]);_0x3518x43[_0xd7b4[5]](_0xd7b4[133],_0x3518x40);_0x3518x43[_0xd7b4[31]]= _0xd7b4[134];_0x3518x41[_0xd7b4[25]](_0x3518x43);_0x3518x2e[_0xd7b4[25]](_0x3518x2f);_0x3518x2e[_0xd7b4[25]](_0x3518x41);_0x3518x2a[_0xd7b4[25]](_0x3518x2e);var _0x3518x37=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[136]),function(){_0x3518x8[_0xd7b4[138]](_0x3518x43[_0xd7b4[23]]);_0x3518x8[_0xd7b4[79]]()});_0x3518x37[_0xd7b4[31]]= _0xd7b4[104];var _0x3518x3a=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[105]),function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x3a[_0xd7b4[31]]= _0xd7b4[106];_0x3518x2b[_0xd7b4[25]](_0x3518x37);_0x3518x2b[_0xd7b4[25]](_0x3518x3a);_0x3518x28[_0xd7b4[25]](_0x3518x29);_0x3518x28[_0xd7b4[25]](_0x3518x2a);_0x3518x28[_0xd7b4[25]](_0x3518x2b);this[_0xd7b4[64]]= _0x3518x28}function OpenDialog(_0x3518x8){var _0x3518x28=_0x3518x8[_0xd7b4[50]](_0xd7b4[69]);var _0x3518x29=_0x3518x8[_0xd7b4[50]](_0xd7b4[70]);var _0x3518x2a=_0x3518x8[_0xd7b4[50]](_0xd7b4[71]);var _0x3518x2b=_0x3518x8[_0xd7b4[50]](_0xd7b4[72]);var _0x3518x2c=_0x3518x8[_0xd7b4[74]](_0xd7b4[73]);mxUtils[_0xd7b4[78]](_0x3518x2c,mxResources[_0xd7b4[76]](_0xd7b4[8]));var _0x3518x2d=mxUtils[_0xd7b4[80]](_0xd7b4[40],function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x2d[_0xd7b4[31]]= _0xd7b4[65];_0x3518x29[_0xd7b4[25]](_0x3518x2d);_0x3518x29[_0xd7b4[25]](_0x3518x2c);var _0x3518x2e=_0x3518x8[_0xd7b4[50]](_0xd7b4[81]);var _0x3518x2f=_0x3518x8[_0xd7b4[50]](_0xd7b4[128]);var _0x3518x41=_0x3518x8[_0xd7b4[50]](_0xd7b4[129]);var _0x3518x42=document[_0xd7b4[2]](_0xd7b4[130]);_0x3518x42[_0xd7b4[31]]= _0xd7b4[131];mxUtils[_0xd7b4[78]](_0x3518x42,mxResources[_0xd7b4[76]](_0xd7b4[125]));_0x3518x2f[_0xd7b4[25]](_0x3518x42);var _0x3518xb= new XMLHttpRequest();_0x3518xb[_0xd7b4[8]](_0xd7b4[7],_0xd7b4[140],false);_0x3518xb[_0xd7b4[14]](_0xd7b4[9],_0xd7b4[10]+ _0x3518x8[_0xd7b4[13]][_0xd7b4[12]][_0xd7b4[11]]);_0x3518xb[_0xd7b4[15]](null);var _0x3518xc=[];if(_0x3518xb[_0xd7b4[16]]=== 200){_0x3518xc= JSON[_0xd7b4[18]](_0x3518xb[_0xd7b4[17]])[_0xd7b4[30]]};var _0x3518x43=document[_0xd7b4[2]](_0xd7b4[19]);for(var _0x3518x47=0;_0x3518x47< _0x3518xc[_0xd7b4[141]];_0x3518x47++){var _0x3518xd=document[_0xd7b4[2]](_0xd7b4[20]);_0x3518xd[_0xd7b4[21]]= _0x3518xc[_0x3518x47][_0xd7b4[125]];_0x3518xd[_0xd7b4[23]]= _0x3518xc[_0x3518x47][_0xd7b4[133]];_0x3518x43[_0xd7b4[25]](_0x3518xd)};_0x3518x43[_0xd7b4[31]]= _0xd7b4[134];_0x3518x41[_0xd7b4[25]](_0x3518x43);_0x3518x2e[_0xd7b4[25]](_0x3518x2f);_0x3518x2e[_0xd7b4[25]](_0x3518x41);_0x3518x2a[_0xd7b4[25]](_0x3518x2e);var _0x3518x37=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[8]),function(){console[_0xd7b4[94]](_0x3518x43);console[_0xd7b4[94]](_0x3518x43[_0xd7b4[23]]);window[_0xd7b4[8]](_0xd7b4[142]+ _0x3518x43[_0xd7b4[23]],_0xd7b4[122]);_0x3518x8[_0xd7b4[79]]()});_0x3518x37[_0xd7b4[31]]= _0xd7b4[104];var _0x3518x3a=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[105]),function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x3a[_0xd7b4[31]]= _0xd7b4[106];_0x3518x2b[_0xd7b4[25]](_0x3518x37);_0x3518x2b[_0xd7b4[25]](_0x3518x3a);_0x3518x28[_0xd7b4[25]](_0x3518x29);_0x3518x28[_0xd7b4[25]](_0x3518x2a);_0x3518x28[_0xd7b4[25]](_0x3518x2b);this[_0xd7b4[64]]= _0x3518x28}function RenameDialog(_0x3518x8){var _0x3518x28=_0x3518x8[_0xd7b4[50]](_0xd7b4[69]);var _0x3518x29=_0x3518x8[_0xd7b4[50]](_0xd7b4[70]);var _0x3518x2a=_0x3518x8[_0xd7b4[50]](_0xd7b4[71]);var _0x3518x2b=_0x3518x8[_0xd7b4[50]](_0xd7b4[72]);var _0x3518x2c=_0x3518x8[_0xd7b4[74]](_0xd7b4[73]);mxUtils[_0xd7b4[78]](_0x3518x2c,mxResources[_0xd7b4[76]](_0xd7b4[143]));var _0x3518x2d=mxUtils[_0xd7b4[80]](_0xd7b4[40],function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x2d[_0xd7b4[31]]= _0xd7b4[65];_0x3518x29[_0xd7b4[25]](_0x3518x2d);_0x3518x29[_0xd7b4[25]](_0x3518x2c);var _0x3518x2e=_0x3518x8[_0xd7b4[50]](_0xd7b4[81]);var _0x3518x2f=_0x3518x8[_0xd7b4[50]](_0xd7b4[128]);var _0x3518x41=_0x3518x8[_0xd7b4[50]](_0xd7b4[129]);var _0x3518x42=document[_0xd7b4[2]](_0xd7b4[130]);_0x3518x42[_0xd7b4[31]]= _0xd7b4[131];mxUtils[_0xd7b4[78]](_0x3518x42,mxResources[_0xd7b4[76]](_0xd7b4[125]));_0x3518x2f[_0xd7b4[25]](_0x3518x42);var _0x3518x3f=_0x3518x8[_0xd7b4[13]][_0xd7b4[144]];var _0x3518x3=document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x3[_0xd7b4[5]](_0xd7b4[23],_0x3518x3f);_0x3518x3[_0xd7b4[31]]= _0xd7b4[134];_0x3518x41[_0xd7b4[25]](_0x3518x3);_0x3518x2e[_0xd7b4[25]](_0x3518x2f);_0x3518x2e[_0xd7b4[25]](_0x3518x41);_0x3518x2a[_0xd7b4[25]](_0x3518x2e);var _0x3518x37=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[135]),function(){var _0x3518xb= new XMLHttpRequest();_0x3518xb[_0xd7b4[8]](_0xd7b4[145],SAVE_URL+ _0x3518x8[_0xd7b4[13]][_0xd7b4[12]][_0xd7b4[133]],true);_0x3518xb[_0xd7b4[14]](_0xd7b4[146],_0xd7b4[147]);_0x3518xb[_0xd7b4[14]](_0xd7b4[9],_0xd7b4[10]+ _0x3518x8[_0xd7b4[13]][_0xd7b4[12]][_0xd7b4[11]]);_0x3518xb[_0xd7b4[15]](_0xd7b4[148]+ _0x3518x3[_0xd7b4[23]]);_0x3518xb[_0xd7b4[95]]= function(_0x3518x35){if(_0x3518xb[_0xd7b4[16]]=== 200){_0x3518x8[_0xd7b4[13]][_0xd7b4[150]](_0xd7b4[149]);_0x3518x8[_0xd7b4[13]][_0xd7b4[144]]= _0x3518x3[_0xd7b4[23]]}else {_0x3518x8[_0xd7b4[13]][_0xd7b4[150]](JSON[_0xd7b4[18]](_0x3518xb[_0xd7b4[17]])[_0xd7b4[152]][0][_0xd7b4[151]])}};_0x3518xb[_0xd7b4[153]]= function(_0x3518x35){mxUtils[_0xd7b4[155]](_0x3518xb[_0xd7b4[154]])};_0x3518x8[_0xd7b4[79]]()});_0x3518x37[_0xd7b4[31]]= _0xd7b4[104];var _0x3518x3a=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[105]),function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x3a[_0xd7b4[31]]= _0xd7b4[106];_0x3518x2b[_0xd7b4[25]](_0x3518x37);_0x3518x2b[_0xd7b4[25]](_0x3518x3a);_0x3518x28[_0xd7b4[25]](_0x3518x29);_0x3518x28[_0xd7b4[25]](_0x3518x2a);_0x3518x28[_0xd7b4[25]](_0x3518x2b);this[_0xd7b4[64]]= _0x3518x28}function EditFileDialog(_0x3518x8){var _0x3518x28=_0x3518x8[_0xd7b4[50]](_0xd7b4[69]);var _0x3518x29=_0x3518x8[_0xd7b4[50]](_0xd7b4[70]);var _0x3518x2a=_0x3518x8[_0xd7b4[50]](_0xd7b4[71]);var _0x3518x2b=_0x3518x8[_0xd7b4[50]](_0xd7b4[72]);var _0x3518x2c=_0x3518x8[_0xd7b4[74]](_0xd7b4[73]);mxUtils[_0xd7b4[78]](_0x3518x2c,mxResources[_0xd7b4[76]](_0xd7b4[156]));var _0x3518x2d=mxUtils[_0xd7b4[80]](_0xd7b4[40],function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x2d[_0xd7b4[31]]= _0xd7b4[65];_0x3518x29[_0xd7b4[25]](_0x3518x2d);_0x3518x29[_0xd7b4[25]](_0x3518x2c);var _0x3518x2e=_0x3518x8[_0xd7b4[50]](_0xd7b4[81]);var _0x3518x2f=_0x3518x8[_0xd7b4[50]](_0xd7b4[82]);var _0x3518x30=document[_0xd7b4[2]](_0xd7b4[83]);_0x3518x30[_0xd7b4[53]][_0xd7b4[84]]= _0xd7b4[85];_0x3518x30[_0xd7b4[53]][_0xd7b4[86]]= _0xd7b4[87];_0x3518x30[_0xd7b4[23]]= mxUtils[_0xd7b4[158]](_0x3518x8[_0xd7b4[13]][_0xd7b4[157]]());if(fileSupport){function _0x3518x4a(_0x3518x32){_0x3518x32[_0xd7b4[159]]();_0x3518x32[_0xd7b4[160]]();if(_0x3518x32[_0xd7b4[161]][_0xd7b4[92]][_0xd7b4[141]]> 0){var _0x3518x4b=_0x3518x32[_0xd7b4[161]][_0xd7b4[92]][0];var _0x3518x4c= new FileReader();_0x3518x4c[_0xd7b4[95]]= function(_0x3518x35){_0x3518x30[_0xd7b4[23]]= _0x3518x35[_0xd7b4[93]][_0xd7b4[96]]};_0x3518x4c[_0xd7b4[97]](_0x3518x4b)}}function _0x3518x4d(_0x3518x32){_0x3518x32[_0xd7b4[159]]();_0x3518x32[_0xd7b4[160]]()}_0x3518x30[_0xd7b4[100]](_0xd7b4[162],_0x3518x4d,false);_0x3518x30[_0xd7b4[100]](_0xd7b4[163],_0x3518x4a,false)};_0x3518x2f[_0xd7b4[25]](_0x3518x30);_0x3518x2e[_0xd7b4[25]](_0x3518x2f);_0x3518x2a[_0xd7b4[25]](_0x3518x2e);var _0x3518x37=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[135]),function(){var _0x3518x39=mxUtils[_0xd7b4[101]](_0x3518x30[_0xd7b4[23]]);_0x3518x8[_0xd7b4[13]][_0xd7b4[102]](_0x3518x39[_0xd7b4[48]]);_0x3518x8[_0xd7b4[79]]()});_0x3518x37[_0xd7b4[31]]= _0xd7b4[104];var _0x3518x3a=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[105]),function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x3a[_0xd7b4[31]]= _0xd7b4[106];_0x3518x2b[_0xd7b4[25]](_0x3518x37);_0x3518x2b[_0xd7b4[25]](_0x3518x3a);_0x3518x28[_0xd7b4[25]](_0x3518x29);_0x3518x28[_0xd7b4[25]](_0x3518x2a);_0x3518x28[_0xd7b4[25]](_0x3518x2b);this[_0xd7b4[64]]= _0x3518x28}function ExportDialog(_0x3518x8){var _0x3518x28=_0x3518x8[_0xd7b4[50]](_0xd7b4[69]);var _0x3518x29=_0x3518x8[_0xd7b4[50]](_0xd7b4[70]);var _0x3518x2a=_0x3518x8[_0xd7b4[50]](_0xd7b4[164]);var _0x3518x2b=_0x3518x8[_0xd7b4[50]](_0xd7b4[72]);var _0x3518x2c=_0x3518x8[_0xd7b4[74]](_0xd7b4[73]);mxUtils[_0xd7b4[78]](_0x3518x2c,mxResources[_0xd7b4[76]](_0xd7b4[165])+ _0xd7b4[77]);var _0x3518x2d=mxUtils[_0xd7b4[80]](_0xd7b4[40],function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x2d[_0xd7b4[31]]= _0xd7b4[65];_0x3518x29[_0xd7b4[25]](_0x3518x2d);_0x3518x29[_0xd7b4[25]](_0x3518x2c);var _0x3518x4f=_0x3518x8[_0xd7b4[50]](_0xd7b4[166]);var _0x3518x50=_0x3518x8[_0xd7b4[50]](_0xd7b4[167]);var _0x3518x42=document[_0xd7b4[2]](_0xd7b4[130]);_0x3518x42[_0xd7b4[31]]= _0xd7b4[168];mxUtils[_0xd7b4[78]](_0x3518x42,mxResources[_0xd7b4[76]](_0xd7b4[144]));var _0x3518x3=document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x3[_0xd7b4[5]](_0xd7b4[23],_0x3518x8[_0xd7b4[13]][_0xd7b4[127]]());_0x3518x3[_0xd7b4[31]]= _0xd7b4[134];var _0x3518x25=_0x3518x8[_0xd7b4[50]](_0xd7b4[169]);_0x3518x25[_0xd7b4[25]](_0x3518x3);_0x3518x50[_0xd7b4[25]](_0x3518x42);_0x3518x50[_0xd7b4[25]](_0x3518x25);_0x3518x4f[_0xd7b4[25]](_0x3518x50);_0x3518x2a[_0xd7b4[25]](_0x3518x4f);var _0x3518x37=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[165]),mxUtils[_0xd7b4[103]](this,function(_0x3518x38){_0x3518x8[_0xd7b4[135]](false);var _0x3518x51=encodeURIComponent(mxUtils[_0xd7b4[170]](_0x3518x8[_0xd7b4[13]][_0xd7b4[157]]())); new mxXmlRequest(SAVE_URL+ _0x3518x8[_0xd7b4[13]][_0xd7b4[12]][_0xd7b4[133]]+ _0xd7b4[172],_0xd7b4[173]+ _0x3518x3[_0xd7b4[23]],_0xd7b4[7])[_0xd7b4[171]](document,_0xd7b4[122]);_0x3518x8[_0xd7b4[79]]()}));_0x3518x37[_0xd7b4[31]]= _0xd7b4[104];var _0x3518x3a=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[105]),function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x3a[_0xd7b4[31]]= _0xd7b4[106];_0x3518x2b[_0xd7b4[25]](_0x3518x37);_0x3518x2b[_0xd7b4[25]](_0x3518x3a);_0x3518x28[_0xd7b4[25]](_0x3518x29);_0x3518x28[_0xd7b4[25]](_0x3518x2a);_0x3518x28[_0xd7b4[25]](_0x3518x2b);this[_0xd7b4[64]]= _0x3518x28}function GeneralDialog(_0x3518x8,_0x3518x53){var _0x3518x54=_0x3518x8[_0xd7b4[13]][_0xd7b4[174]];var _0x3518x28=_0x3518x8[_0xd7b4[50]](_0xd7b4[69]);var _0x3518x29=_0x3518x8[_0xd7b4[50]](_0xd7b4[70]);var _0x3518x2a=_0x3518x8[_0xd7b4[50]](_0xd7b4[175]);var _0x3518x2b=_0x3518x8[_0xd7b4[50]](_0xd7b4[72]);var _0x3518x2c=_0x3518x8[_0xd7b4[74]](_0xd7b4[73]);mxUtils[_0xd7b4[78]](_0x3518x2c,mxResources[_0xd7b4[76]](_0xd7b4[156])+ _0xd7b4[176]+ mxResources[_0xd7b4[76]](_0x3518x53[_0xd7b4[23]][_0xd7b4[177]]));var _0x3518x2d=mxUtils[_0xd7b4[80]](_0xd7b4[40],function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x2d[_0xd7b4[31]]= _0xd7b4[65];_0x3518x29[_0xd7b4[25]](_0x3518x2d);_0x3518x29[_0xd7b4[25]](_0x3518x2c);var _0x3518x55=_0x3518x8[_0xd7b4[50]](_0xd7b4[166]);_0x3518x55[_0xd7b4[5]](_0xd7b4[133],_0xd7b4[178]);var _0x3518x56=_0x3518x53[_0xd7b4[23]][_0xd7b4[179]][_0xd7b4[141]];var _0x3518x4f=_0x3518x8[_0xd7b4[50]](_0xd7b4[166]);for(var _0x3518x57=0;_0x3518x57< _0x3518x56;_0x3518x57++){var _0x3518x3f=_0x3518x53[_0xd7b4[23]][_0xd7b4[179]][_0x3518x57][_0xd7b4[125]];var _0x3518x40=_0xd7b4[126]+ _0x3518x3f;var _0x3518x2=_0x3518x53[_0xd7b4[23]][_0xd7b4[179]][_0x3518x57][_0xd7b4[23]];console[_0xd7b4[94]](_0x3518x3f);var _0x3518x50=_0x3518x8[_0xd7b4[50]]((_0x3518x57== _0x3518x56- 1)?_0xd7b4[167]:_0xd7b4[180]);var _0x3518x42=document[_0xd7b4[2]](_0xd7b4[130]);_0x3518x42[_0xd7b4[31]]= _0xd7b4[168];mxUtils[_0xd7b4[78]](_0x3518x42,mxResources[_0xd7b4[76]](_0x3518x3f));_0x3518x50[_0xd7b4[25]](_0x3518x42);var _0x3518x3;switch(_0x3518x3f){case _0xd7b4[133]:_0x3518x3= document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x2= _0x3518x53[_0xd7b4[133]];_0x3518x3[_0xd7b4[5]](_0xd7b4[23],_0x3518x2);_0x3518x3[_0xd7b4[5]](_0xd7b4[181],true);_0x3518x3[_0xd7b4[31]]= _0xd7b4[134];break;case _0xd7b4[187]:_0x3518x3= document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x3[_0xd7b4[5]](_0xd7b4[3],_0xd7b4[80]);_0x3518x3[_0xd7b4[182]]= function(){if(this[_0xd7b4[23]]== _0xd7b4[183]){this[_0xd7b4[5]](_0xd7b4[23],_0xd7b4[184]);this[_0xd7b4[31]]= _0xd7b4[185]}else {this[_0xd7b4[31]]= _0xd7b4[186];this[_0xd7b4[5]](_0xd7b4[23],_0xd7b4[183])}};_0x3518x3[_0xd7b4[5]](_0xd7b4[23],_0x3518x2);_0x3518x3[_0xd7b4[31]]= (_0x3518x2== _0xd7b4[183]?_0xd7b4[186]:_0xd7b4[185]);break;case _0xd7b4[21]:_0x3518x3= document[_0xd7b4[2]](_0xd7b4[83]);_0x3518x3[_0xd7b4[188]]= _0x3518x2;_0x3518x3[_0xd7b4[31]]= _0xd7b4[134];break;case _0xd7b4[189]:_0x3518x3= document[_0xd7b4[2]](_0xd7b4[83]);_0x3518x3[_0xd7b4[188]]= _0x3518x2;_0x3518x3[_0xd7b4[31]]= _0xd7b4[134];break;case _0xd7b4[190]:_0x3518x3= document[_0xd7b4[2]](_0xd7b4[83]);_0x3518x3[_0xd7b4[188]]= _0x3518x2;_0x3518x3[_0xd7b4[31]]= _0xd7b4[134];break;case _0xd7b4[193]:_0x3518x3= document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x3[_0xd7b4[5]](_0xd7b4[23],_0x3518x2);_0x3518x3[_0xd7b4[5]](_0xd7b4[191],_0xd7b4[192]);_0x3518x3[_0xd7b4[31]]= _0xd7b4[134];break;case _0xd7b4[195]:_0x3518x3= createDropdownFromApi(_0xd7b4[194],_0x3518x2,_0xd7b4[125],_0xd7b4[133],_0x3518x8);break;case _0xd7b4[198]:_0x3518x3= document[_0xd7b4[2]](_0xd7b4[83]);_0x3518x3[_0xd7b4[188]]= _0x3518x2;_0x3518x3[_0xd7b4[31]]= _0xd7b4[134];_0x3518x3[_0xd7b4[5]](_0xd7b4[196],_0xd7b4[197]);break;case _0xd7b4[201]:var _0x3518x3=mxUtils[_0xd7b4[80]](_0xd7b4[199],function(){var _0x3518x58=createDynamicInput(null,null,_0x3518x8);_0x3518x55[_0xd7b4[25]](_0x3518x58);_0x3518x2a[_0xd7b4[25]](_0x3518x55)});_0x3518x3[_0xd7b4[31]]= _0xd7b4[200];break;default:_0x3518x3= document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x3[_0xd7b4[5]](_0xd7b4[23],_0x3518x2);_0x3518x3[_0xd7b4[31]]= _0xd7b4[134];break};_0x3518x3[_0xd7b4[5]](_0xd7b4[133],_0x3518x40);var _0x3518x25=_0x3518x8[_0xd7b4[50]](_0xd7b4[169]);_0x3518x25[_0xd7b4[25]](_0x3518x3);if(mxResources[_0xd7b4[76]](_0xd7b4[202]+ _0x3518x3f)){var _0x3518x59=_0x3518x8[_0xd7b4[50]](_0xd7b4[203]);_0x3518x59[_0xd7b4[31]]= _0xd7b4[204];mxUtils[_0xd7b4[78]](_0x3518x59,mxResources[_0xd7b4[76]](_0xd7b4[202]+ _0x3518x3f));_0x3518x25[_0xd7b4[25]](_0x3518x59)};_0x3518x50[_0xd7b4[25]](_0x3518x25);_0x3518x4f[_0xd7b4[25]](_0x3518x50)};_0x3518x2a[_0xd7b4[25]](_0x3518x4f);if(_0x3518x53[_0xd7b4[23]][_0xd7b4[177]]== _0xd7b4[1]){if(_0x3518x53[_0xd7b4[205]]){for(var _0x3518x47=0;_0x3518x47< _0x3518x53[_0xd7b4[205]][_0xd7b4[141]];_0x3518x47++){var _0x3518x5a=_0xd7b4[40];var _0x3518x5b=_0xd7b4[40];_[_0xd7b4[28]](_0x3518x53[_0xd7b4[205]][_0x3518x47][_0xd7b4[23]][_0xd7b4[179]],function(_0x3518x5c){if(_0x3518x5c[_0xd7b4[125]]== _0xd7b4[3]){_0x3518x5a= _0x3518x5c[_0xd7b4[23]]}else {if(_0x3518x5c[_0xd7b4[125]]== _0xd7b4[130]){_0x3518x5b= _0x3518x5c[_0xd7b4[23]]}}});var _0x3518x58=createDynamicInput(_0x3518x5a,_0x3518x5b,_0x3518x8);_0x3518x55[_0xd7b4[25]](_0x3518x58)}}};_0x3518x2a[_0xd7b4[25]](_0x3518x55);var _0x3518x37=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[135]),mxUtils[_0xd7b4[103]](this,function(_0x3518x38){for(var _0x3518x57=0;_0x3518x57< _0x3518x53[_0xd7b4[23]][_0xd7b4[179]][_0xd7b4[141]];_0x3518x57++){var _0x3518x40=_0xd7b4[126]+ _0x3518x53[_0xd7b4[23]][_0xd7b4[179]][_0x3518x57][_0xd7b4[125]];var _0x3518x3f=_0x3518x53[_0xd7b4[23]][_0xd7b4[179]][_0x3518x57][_0xd7b4[125]];console[_0xd7b4[94]](_0x3518x3f);_0x3518x53[_0xd7b4[5]](_0x3518x3f,document[_0xd7b4[206]](_0x3518x40)[_0xd7b4[23]]);console[_0xd7b4[94]](document[_0xd7b4[206]](_0x3518x40)[_0xd7b4[23]])};if(_0x3518x53[_0xd7b4[23]][_0xd7b4[177]]== _0xd7b4[1]){if(_0x3518x54[_0xd7b4[208]][_0xd7b4[207]](_0x3518x53)){_0x3518x53[_0xd7b4[205]]= []};if(document[_0xd7b4[206]](_0xd7b4[178])){var _0x3518x55=document[_0xd7b4[206]](_0xd7b4[178])[_0xd7b4[205]];for(var _0x3518x47=0;_0x3518x47< _0x3518x55[_0xd7b4[141]];_0x3518x47++){var _0x3518x5d=_0x3518x55[_0x3518x47][_0xd7b4[205]][1];var _0x3518x5e=_0x3518x55[_0x3518x47][_0xd7b4[205]][0];var _0x3518x39=mxUtils[_0xd7b4[209]]();var _0x3518x5f=_0x3518x39[_0xd7b4[2]](_0xd7b4[178]);_0x3518x5f[_0xd7b4[5]](_0xd7b4[3],_0x3518x55[_0x3518x47][_0xd7b4[210]](_0xd7b4[19])[0][_0xd7b4[23]]);_0x3518x5f[_0xd7b4[5]](_0xd7b4[130],_0x3518x55[_0x3518x47][_0xd7b4[210]](_0xd7b4[1])[0][_0xd7b4[23]]);var _0x3518x60= new mxCell(_0x3518x5f);_0x3518x54[_0xd7b4[208]][_0xd7b4[201]](_0x3518x53,_0x3518x60)}}};_0x3518x54[_0xd7b4[211]](_0x3518x53);_0x3518x8[_0xd7b4[79]]()}));_0x3518x37[_0xd7b4[31]]= _0xd7b4[104];var _0x3518x3a=mxUtils[_0xd7b4[80]](mxResources[_0xd7b4[76]](_0xd7b4[105]),function(){_0x3518x8[_0xd7b4[79]]()});_0x3518x3a[_0xd7b4[31]]= _0xd7b4[106];_0x3518x2b[_0xd7b4[25]](_0x3518x37);_0x3518x2b[_0xd7b4[25]](_0x3518x3a);_0x3518x28[_0xd7b4[25]](_0x3518x29);_0x3518x28[_0xd7b4[25]](_0x3518x2a);_0x3518x28[_0xd7b4[25]](_0x3518x2b);this[_0xd7b4[64]]= _0x3518x28}function createDynamicInput(_0x3518x5a,_0x3518x5b,_0x3518x8){var _0x3518x58=_0x3518x8[_0xd7b4[50]](_0xd7b4[180]);var _0x3518x2f=_0x3518x8[_0xd7b4[50]](_0xd7b4[212]);var _0x3518x41=_0x3518x8[_0xd7b4[50]](_0xd7b4[212]);var _0x3518x62=_0x3518x8[_0xd7b4[50]](_0xd7b4[213]);var _0x3518x3=document[_0xd7b4[2]](_0xd7b4[1]);_0x3518x3[_0xd7b4[5]](_0xd7b4[191],_0xd7b4[214]);_0x3518x3[_0xd7b4[23]]= _0x3518x5b;_0x3518x3[_0xd7b4[31]]= _0xd7b4[134];_0x3518x2f[_0xd7b4[25]](_0x3518x3);var _0x3518x43=document[_0xd7b4[2]](_0xd7b4[19]);var _0x3518xd=document[_0xd7b4[2]](_0xd7b4[20]);_0x3518xd[_0xd7b4[21]]= _0xd7b4[22];_0x3518xd[_0xd7b4[23]]= _0xd7b4[40];_0x3518x43[_0xd7b4[25]](_0x3518xd);var _0x3518x13=[_0xd7b4[21],_0xd7b4[215],_0xd7b4[83],_0xd7b4[4]];_0x3518x13[_0xd7b4[28]](function(_0x3518xe){_0x3518xd= document[_0xd7b4[2]](_0xd7b4[20]);_0x3518xd[_0xd7b4[21]]= _0x3518xe;_0x3518xd[_0xd7b4[23]]= _0x3518xe;_0x3518xd[_0xd7b4[29]]= (_0x3518xe== _0x3518x5a);_0x3518x43[_0xd7b4[25]](_0x3518xd)});_0x3518x43[_0xd7b4[31]]= _0xd7b4[134];_0x3518x41[_0xd7b4[25]](_0x3518x43);var _0x3518x63=mxUtils[_0xd7b4[80]](_0xd7b4[216],function(){var _0x3518x64=_0x3518x63[_0xd7b4[217]];var _0x3518x65=_0x3518x64[_0xd7b4[217]];document[_0xd7b4[206]](_0xd7b4[178])[_0xd7b4[67]](_0x3518x65)});_0x3518x63[_0xd7b4[31]]= _0xd7b4[218];_0x3518x62[_0xd7b4[25]](_0x3518x63);_0x3518x58[_0xd7b4[25]](_0x3518x2f);_0x3518x58[_0xd7b4[25]](_0x3518x41);_0x3518x58[_0xd7b4[25]](_0x3518x62);return _0x3518x58} \ No newline at end of file diff --git a/public/assets/plugins/jscripty/js/Editor.js b/public/assets/plugins/jscripty/js/Editor.js index 9858989..554a2c8 100644 --- a/public/assets/plugins/jscripty/js/Editor.js +++ b/public/assets/plugins/jscripty/js/Editor.js @@ -1,888 +1 @@ -/** - * $Id: Editor.js,v 1.14 2013/03/06 17:57:10 boris Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -// Specifies if local storage should be used (eg. on the iPad which has no filesystem) -var useLocalStorage = (mxClient.IS_TOUCH || urlParams['storage'] == 'local') && typeof(localStorage) != 'undefined'; -var fileSupport = window.File != null && window.FileReader != null && window.FileList != null; - -// Specifies if connector should be shown on selected cells -var touchStyle = mxClient.IS_TOUCH || urlParams['touch'] == '1'; - -// Counts open editor tabs (must be global for cross-window access) -var counter = 0; - -// Cross-domain window access is not allowed in FF, so if we -// were opened from another domain then this will fail. -try { - var op = window; - - while (op.opener != null && !isNaN(op.opener.counter)) { - op = op.opener; - } - - // Increments the counter in the first opener in the chain - if (op != null) { - op.counter++; - counter = op.counter; - } -} catch (e) { - // ignore -} - -/** - * Editor constructor executed on page load. - */ -Editor = function() { - mxEventSource.call(this); - this.init(); - this.initStencilRegistry(); - this.graph = new Graph(); - this.outline = new mxOutline(this.graph); - this.outline.updateOnPan = true; - this.undoManager = this.createUndoManager(); - this.status = ''; - - // Contains the name which was used for the last save. Default value is null. - this.filename = null; - - this.getOrCreateFilename = function() { - return this.filename || mxResources.get('drawing', [counter]) + '.xml'; - }; - - this.getFilename = function() { - return this.filename; - }; - - // Sets the status and fires a statusChanged event - this.setStatus = function(value) { - this.status = value; - this.fireEvent(new mxEventObject('statusChanged')); - }; - - // Returns the current status - this.getStatus = function() { - return this.status; - }; - - // Contains the current modified state of the diagram. This is false for - // new diagrams and after the diagram was saved. - this.modified = false; - - // Updates modified state if graph changes - this.graphChangeListener = function() { - this.modified = true; - }; - this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function() { - this.graphChangeListener.apply(this, arguments); - })); - - // Installs dialog if browser window is closed without saving - // This must be disabled during save and image export - window.onbeforeunload = mxUtils.bind(this, function() { - if (this.modified) { - return mxResources.get('allChangesLost'); - } - }); - - // Sets persistent graph state defaults - this.graph.resetViewOnRootChange = false; - this.graph.scrollbars = true; - this.graph.background = null; -}; - -// Editor inherits from mxEventSource -mxUtils.extend(Editor, mxEventSource); - -/** - * Specifies the image URL to be used for the grid. - */ -Editor.prototype.gridImage = IMAGE_PATH + '/grid.gif'; - -/** - * Specifies the image URL to be used for the transparent background. - */ -Editor.prototype.transparentImage = IMAGE_PATH + '/transparent.gif'; - -/** - * Sets the XML node for the current diagram. - */ -Editor.prototype.setGraphXml = function(node) { - var dec = new mxCodec(node.ownerDocument); - - if (node.nodeName == 'mxGraphModel') { - this.graph.view.scale = 1; - this.graph.gridEnabled = node.getAttribute('grid') != '0'; - this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0'; - this.graph.setTooltips(node.getAttribute('tooltips') != '0'); - this.graph.setConnectable(node.getAttribute('connect') != '0'); - this.graph.foldingEnabled = node.getAttribute('fold') != '0'; - this.graph.scrollbars = node.getAttribute('scrollbars') != '0'; - - if (!this.graph.scrollbars) { - this.graph.container.scrollLeft = 0; - this.graph.container.scrollTop = 0; - this.graph.view.translate.x = Number(node.getAttribute('dx') || 0); - this.graph.view.translate.y = Number(node.getAttribute('dy') || 0); - } - - this.graph.pageVisible = node.getAttribute('page') == '1'; - this.graph.pageBreaksVisible = this.graph.pageVisible; - this.graph.preferPageSize = this.graph.pageBreaksVisible; - - // Loads the persistent state settings - var ps = node.getAttribute('pageScale'); - - if (ps != null) { - this.graph.pageScale = ps; - } else { - this.graph.pageScale = 1.5; - } - - var pw = node.getAttribute('pageWidth'); - var ph = node.getAttribute('pageHeight'); - - if (pw != null && ph != null) { - this.graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph)); - this.outline.outline.pageFormat = this.graph.pageFormat; - } - - // Loads the persistent state settings - var bg = node.getAttribute('background'); - - if (bg != null && bg.length > 0) { - this.graph.background = bg; - } - - dec.decode(node, this.graph.getModel()); - this.updateGraphComponents(); - } -}; - -/** - * Returns the XML node that represents the current diagram. - */ -Editor.prototype.getGraphXml = function() { - var enc = new mxCodec(mxUtils.createXmlDocument()); - var node = enc.encode(this.graph.getModel()); - - if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0) { - node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100); - node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100); - } - - node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0'); - node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0'); - node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0'); - node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0'); - node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0'); - node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0'); - node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0'); - node.setAttribute('pageScale', this.graph.pageScale); - node.setAttribute('pageWidth', this.graph.pageFormat.width); - node.setAttribute('pageHeight', this.graph.pageFormat.height); - - if (!this.graph.scrollbars) { - node.setAttribute('scrollbars', '0'); - } - - if (this.graph.background != null) { - node.setAttribute('background', this.graph.background); - } - - return node; -}; - -/** - * Keeps the graph container in sync with the persistent graph state - */ -Editor.prototype.updateGraphComponents = function() { - var graph = this.graph; - var outline = this.outline; - - if (graph.container != null && outline.outline.container != null) { - if (graph.background != null) { - if (graph.background == 'none') { - graph.container.style.backgroundColor = 'transparent'; - } else { - if (graph.view.backgroundPageShape != null) { - graph.view.backgroundPageShape.fill = graph.background; - graph.view.backgroundPageShape.reconfigure(); - } - - graph.container.style.backgroundColor = graph.background; - } - } else { - graph.container.style.backgroundColor = ''; - } - - if (graph.pageVisible) { - graph.container.style.backgroundColor = '#ebebeb'; - graph.container.style.borderStyle = 'solid'; - graph.container.style.borderColor = '#e5e5e5'; - graph.container.style.borderTopWidth = '1px'; - graph.container.style.borderLeftWidth = '1px'; - graph.container.style.borderRightWidth = '0px'; - graph.container.style.borderBottomWidth = '0px'; - } else { - graph.container.style.border = ''; - } - - outline.outline.container.style.backgroundColor = graph.container.style.backgroundColor; - - if (outline.outline.pageVisible != graph.pageVisible || - outline.outline.pageScale != graph.pageScale) { - outline.outline.pageScale = graph.pageScale; - outline.outline.pageVisible = graph.pageVisible; - outline.outline.view.validate(); - } - - if (graph.scrollbars && graph.container.style.overflow == 'hidden' && !touchStyle) { - graph.container.style.overflow = 'auto'; - } else if (!graph.scrollbars || touchStyle) { - graph.container.style.overflow = 'hidden'; - } - - // Transparent.gif is a workaround for focus repaint problems in IE - var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.transparentImage + ')' : 'none'; - graph.container.style.backgroundImage = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : noBackground; - - if (graph.view.backgroundPageShape != null) { - graph.view.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : 'none'; - } - } -}; - -/** - * Initializes the environment. - */ -Editor.prototype.init = function() { - // Adds stylesheet for IE6 - if (mxClient.IS_IE6) { - mxClient.link('stylesheet', CSS_PATH + '/grapheditor-ie6.css'); - } - - // Adds required resources (disables loading of fallback properties, this can only - // be used if we know that all keys are defined in the language specific file) - mxResources.loadDefaultBundle = false; - mxResources.add(RESOURCE_BASE); - - // Makes the connection hotspot smaller - mxConstants.DEFAULT_HOTSPOT = 0.3; - - var mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker; - mxConnectionHandler.prototype.createMarker = function() { - var marker = mxConnectionHandlerCreateMarker.apply(this, arguments); - - // Overrides to ignore hotspot only for target terminal - marker.intersects = mxUtils.bind(this, function(state, evt) { - if (this.isConnecting()) { - return true; - } - - return mxCellMarker.prototype.intersects.apply(marker, arguments); - }); - - return marker; - }; - - // Makes the shadow brighter - mxConstants.SHADOWCOLOR = '#d0d0d0'; - - // Changes some default colors - mxConstants.HANDLE_FILLCOLOR = '#99ccff'; - mxConstants.HANDLE_STROKECOLOR = '#0088cf'; - mxConstants.VERTEX_SELECTION_COLOR = '#00a8ff'; - mxConstants.OUTLINE_COLOR = '#00a8ff'; - mxConstants.OUTLINE_HANDLE_FILLCOLOR = '#99ccff'; - mxConstants.OUTLINE_HANDLE_STROKECOLOR = '#00a8ff'; - mxConstants.CONNECT_HANDLE_FILLCOLOR = '#cee7ff'; - mxConstants.EDGE_SELECTION_COLOR = '#00a8ff'; - mxConstants.DEFAULT_VALID_COLOR = '#00a8ff'; - mxConstants.LABEL_HANDLE_FILLCOLOR = '#cee7ff'; - mxConstants.GUIDE_COLOR = '#0088cf'; - - mxGraph.prototype.pageBreakColor = '#c0c0c0'; - mxGraph.prototype.pageScale = 1; - - // Increases default rubberband opacity (default is 20) - mxRubberband.prototype.defaultOpacity = 30; - - // Changes border color of background page shape - mxGraphView.prototype.createBackgroundPageShape = function(bounds) { - return new mxRectangleShape(bounds, this.graph.background || 'white', '#cacaca'); - }; - - // Fits the number of background pages to the graph - mxGraphView.prototype.getBackgroundPageBounds = function() { - var gb = this.getGraphBounds(); - - // Computes unscaled, untranslated graph bounds - var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0; - var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0; - var w = gb.width / this.scale; - var h = gb.height / this.scale; - - var fmt = this.graph.pageFormat; - var ps = this.graph.pageScale; - - var pw = fmt.width * ps; - var ph = fmt.height * ps; - - var x0 = Math.floor(Math.min(0, x) / pw); - var y0 = Math.floor(Math.min(0, y) / ph); - var xe = Math.ceil(Math.max(1, x + w) / pw); - var ye = Math.ceil(Math.max(1, y + h) / ph); - - var rows = xe - x0; - var cols = ye - y0; - - var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale * - (this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph); - - return bounds; - }; - - // Add panning for background page in VML - var graphPanGraph = mxGraph.prototype.panGraph; - mxGraph.prototype.panGraph = function(dx, dy) { - graphPanGraph.apply(this, arguments); - - if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) && - (!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container))) { - this.view.backgroundPageShape.node.style.marginLeft = dx + 'px'; - this.view.backgroundPageShape.node.style.marginTop = dy + 'px'; - } - }; - - var editor = this; - - // Uses HTML for background pages (to support grid background image) - mxGraphView.prototype.validateBackground = function() { - var bg = this.graph.getBackgroundImage(); - - if (bg != null) { - if (this.backgroundImage == null || this.backgroundImage.image != bg.src) { - if (this.backgroundImage != null) { - this.backgroundImage.destroy(); - } - - var bounds = new mxRectangle(0, 0, 1, 1); - - this.backgroundImage = new mxImageShape(bounds, bg.src); - this.backgroundImage.dialect = this.graph.dialect; - this.backgroundImage.init(this.backgroundPane); - this.backgroundImage.redraw(); - } - - this.redrawBackgroundImage(this.backgroundImage, bg); - } else if (this.backgroundImage != null) { - this.backgroundImage.destroy(); - this.backgroundImage = null; - } - - if (this.graph.pageVisible) { - var bounds = this.getBackgroundPageBounds(); - - if (this.backgroundPageShape == null) { - this.backgroundPageShape = this.createBackgroundPageShape(bounds); - this.backgroundPageShape.scale = 1; - this.backgroundPageShape.isShadow = true; - this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML; - this.backgroundPageShape.init(this.graph.container); - // Required for the browser to render the background page in correct order - this.graph.container.firstChild.style.position = 'absolute'; - this.graph.container.insertBefore(this.backgroundPageShape.node, this.graph.container.firstChild); - this.backgroundPageShape.redraw(); - - this.backgroundPageShape.node.className = 'geBackgroundPage'; - this.backgroundPageShape.node.style.backgroundPosition = '-1px -1px'; - - // Adds listener for double click handling on background - mxEvent.addListener(this.backgroundPageShape.node, 'dblclick', - mxUtils.bind(this, function(evt) { - this.graph.dblClick(evt); - }) - ); - - // Adds basic listeners for graph event dispatching outside of the - // container and finishing the handling of a single gesture - mxEvent.addGestureListeners(this.backgroundPageShape.node, - mxUtils.bind(this, function(evt) { - this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt)); - }), - mxUtils.bind(this, function(evt) { - // Hides the tooltip if mouse is outside container - if (this.graph.tooltipHandler != null && - this.graph.tooltipHandler.isHideOnHover()) { - this.graph.tooltipHandler.hide(); - } - - if (this.graph.isMouseDown && - !mxEvent.isConsumed(evt)) { - this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, - new mxMouseEvent(evt)); - } - }), - mxUtils.bind(this, function(evt) { - this.graph.fireMouseEvent(mxEvent.MOUSE_UP, - new mxMouseEvent(evt)); - })); - } else { - this.backgroundPageShape.scale = 1; - this.backgroundPageShape.bounds = bounds; - this.backgroundPageShape.redraw(); - } - - this.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? - 'url(' + editor.gridImage + ')' : 'none'; - } else if (this.backgroundPageShape != null) { - this.backgroundPageShape.destroy(); - this.backgroundPageShape = null; - } - }; - - // Draws page breaks only within the page - mxGraph.prototype.updatePageBreaks = function(visible, width, height) { - var scale = this.view.scale; - var tr = this.view.translate; - var fmt = this.pageFormat; - var ps = scale * this.pageScale; - - var bounds2 = this.view.getBackgroundPageBounds(); - - width = bounds2.width; - height = bounds2.height; - var bounds = new mxRectangle(scale * tr.x, scale * tr.y, - fmt.width * ps, fmt.height * ps); - - // Does not show page breaks if the scale is too small - visible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist; - - var horizontalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0; - var verticalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0; - var right = bounds2.x + width; - var bottom = bounds2.y + height; - - if (this.horizontalPageBreaks == null && horizontalCount > 0) { - this.horizontalPageBreaks = []; - } - - if (this.horizontalPageBreaks != null) { - for (var i = 0; i <= horizontalCount; i++) { - var pts = [new mxPoint(bounds2.x + (i + 1) * bounds.width, bounds2.y), - new mxPoint(bounds2.x + (i + 1) * bounds.width, bottom) - ]; - - if (this.horizontalPageBreaks[i] != null) { - this.horizontalPageBreaks[i].scale = 1; - this.horizontalPageBreaks[i].points = pts; - this.horizontalPageBreaks[i].redraw(); - } else { - var pageBreak = new mxPolyline(pts, this.pageBreakColor, this.scale); - pageBreak.dialect = this.dialect; - pageBreak.isDashed = this.pageBreakDashed; - pageBreak.addPipe = false; - pageBreak.scale = scale; - pageBreak.init(this.view.backgroundPane); - pageBreak.redraw(); - - this.horizontalPageBreaks[i] = pageBreak; - } - } - - for (var i = horizontalCount; i < this.horizontalPageBreaks.length; i++) { - this.horizontalPageBreaks[i].destroy(); - } - - this.horizontalPageBreaks.splice(horizontalCount, this.horizontalPageBreaks.length - horizontalCount); - } - - if (this.verticalPageBreaks == null && verticalCount > 0) { - this.verticalPageBreaks = []; - } - - if (this.verticalPageBreaks != null) { - for (var i = 0; i <= verticalCount; i++) { - var pts = [new mxPoint(bounds2.x, bounds2.y + (i + 1) * bounds.height), - new mxPoint(right, bounds2.y + (i + 1) * bounds.height) - ]; - - if (this.verticalPageBreaks[i] != null) { - this.verticalPageBreaks[i].scale = 1; //scale; - this.verticalPageBreaks[i].points = pts; - this.verticalPageBreaks[i].redraw(); - } else { - var pageBreak = new mxPolyline(pts, this.pageBreakColor, scale); - pageBreak.dialect = this.dialect; - pageBreak.isDashed = this.pageBreakDashed; - pageBreak.addPipe = false; - pageBreak.scale = scale; - pageBreak.init(this.view.backgroundPane); - pageBreak.redraw(); - - this.verticalPageBreaks[i] = pageBreak; - } - } - - for (var i = verticalCount; i < this.verticalPageBreaks.length; i++) { - this.verticalPageBreaks[i].destroy(); - } - - this.verticalPageBreaks.splice(verticalCount, this.verticalPageBreaks.length - verticalCount); - } - }; - - // Enables snapping to off-grid terminals for edge waypoints - mxEdgeHandler.prototype.snapToTerminals = true; - - // Enables guides - mxGraphHandler.prototype.guidesEnabled = true; - - // Disables removing relative children from parents - var mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent; - mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt) { - for (var i = 0; i < cells.length; i++) { - if (this.graph.getModel().isVertex(cells[i])) { - var geo = this.graph.getCellGeometry(cells[i]); - - if (geo != null && geo.relative) { - return false; - } - } - } - - return mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments); - }; - - // Alt-move disables guides - mxGuide.prototype.isEnabledForEvent = function(evt) { - return !mxEvent.isAltDown(evt); - }; - - // Consumes click events for disabled menu items - mxPopupMenuAddItem = mxPopupMenu.prototype.addItem; - mxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled) { - var result = mxPopupMenuAddItem.apply(this, arguments); - - if (enabled != null && !enabled) { - mxEvent.addListener(result, 'mousedown', function(evt) { - mxEvent.consume(evt); - }); - } - - return result; - }; - - // Selects descendants before children selection mode - var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent; - mxGraphHandler.prototype.getInitialCellForEvent = function(me) { - var model = this.graph.getModel(); - var psel = model.getParent(this.graph.getSelectionCell()); - var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments); - var parent = model.getParent(cell); - - if (psel == null || (psel != cell && psel != parent)) { - while (!this.graph.isCellSelected(cell) && !this.graph.isCellSelected(parent) && - model.isVertex(parent) && !this.graph.isValidRoot(parent)) { - cell = parent; - parent = this.graph.getModel().getParent(cell); - } - } - - return cell; - }; - - // Selection is delayed to mouseup if child selected - var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection; - mxGraphHandler.prototype.isDelayedSelection = function(cell) { - var result = graphHandlerIsDelayedSelection.apply(this, arguments); - var model = this.graph.getModel(); - var psel = model.getParent(this.graph.getSelectionCell()); - var parent = model.getParent(cell); - - if (psel == null || (psel != cell && psel != parent)) { - if (!this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) { - result = true; - } - } - - return result; - }; - - // Delayed selection of parent group - mxGraphHandler.prototype.selectDelayed = function(me) { - var cell = me.getCell(); - - if (cell == null) { - cell = this.cell; - } - - var model = this.graph.getModel(); - var parent = model.getParent(cell); - - while (this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) { - cell = parent; - parent = model.getParent(cell); - } - - this.graph.selectCellForEvent(cell, me.getEvent()); - }; - - // Returns last selected ancestor - mxPanningHandler.prototype.getCellForPopupEvent = function(me) { - var cell = me.getCell(); - var model = this.graph.getModel(); - var parent = model.getParent(cell); - - while (model.isVertex(parent) && !this.graph.isValidRoot(parent)) { - if (this.graph.isCellSelected(parent)) { - cell = parent; - } - - parent = model.getParent(parent); - } - - return cell; - }; -}; - -/** - * Creates and returns a new undo manager. - */ -Editor.prototype.createUndoManager = function() { - var graph = this.graph; - var undoMgr = new mxUndoManager(); - - // Installs the command history - var listener = function(sender, evt) { - undoMgr.undoableEditHappened(evt.getProperty('edit')); - }; - - graph.getModel().addListener(mxEvent.UNDO, listener); - graph.getView().addListener(mxEvent.UNDO, listener); - - // Keeps the selection in sync with the history - var undoHandler = function(sender, evt) { - var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes); - var cells = []; - - for (var i = 1; i < cand.length; i++) { - if (graph.view.getState(cand[i]) != null) { - cells.push(cand[i]); - } - } - - graph.setSelectionCells(cells); - }; - - undoMgr.addListener(mxEvent.UNDO, undoHandler); - undoMgr.addListener(mxEvent.REDO, undoHandler); - - return undoMgr; -}; - -/** - * Adds basic stencil set (no namespace). - */ -Editor.prototype.initStencilRegistry = function() { - // Loads default stencils - mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/general.xml'); -}; - -/** - * Overrides stencil registry for dynamic loading of stencils. - */ -(function() { - /** - * Maps from library names to an array of Javascript filenames, - * which are synchronously loaded. Currently only stencil files - * (.xml) and JS files (.js) are supported. - * IMPORTANT: For embedded diagrams to work entries must also - * be added in EmbedServlet.java. - */ - mxStencilRegistry.libraries = {}; - - /** - * Stores all package names that have been dynamically loaded. - * Each package is only loaded once. - */ - mxStencilRegistry.packages = []; - - // Extends the default stencil registry to add dynamic loading - mxStencilRegistry.getStencil = function(name) { - var result = mxStencilRegistry.stencils[name]; - - if (result == null) { - var basename = mxStencilRegistry.getBasenameForStencil(name); - - // Loads stencil files and tries again - if (basename != null) { - var libs = mxStencilRegistry.libraries[basename]; - - if (libs != null) { - if (mxStencilRegistry.packages[basename] == null) { - mxStencilRegistry.packages[basename] = 1; - - for (var i = 0; i < libs.length; i++) { - var fname = libs[i]; - - if (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml') { - mxStencilRegistry.loadStencilSet(fname, null); - } else if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js') { - var req = mxUtils.load(fname); - - if (req != null) { - eval.call(window, req.getText()); - } - } else { - // FIXME: This does not yet work as the loading is triggered after - // the shape was used in the graph, at which point the keys have - // typically been translated in the calling method. - //mxResources.add(fname); - } - } - } - } else { - mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null); - } - - result = mxStencilRegistry.stencils[name]; - } - } - - return result; - }; - - // Returns the basename for the given stencil or null if no file must be - // loaded to render the given stencil. - mxStencilRegistry.getBasenameForStencil = function(name) { - var parts = name.split('.'); - var tmp = null; - - if (parts.length > 0 && parts[0] == 'mxgraph') { - tmp = parts[1]; - - for (var i = 2; i < parts.length - 1; i++) { - tmp += '/' + parts[i]; - } - } - - return tmp; - }; - - // Loads the given stencil set - mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force) { - force = (force != null) ? force : false; - - // Uses additional cache for detecting previous load attempts - var xmlDoc = mxStencilRegistry.packages[stencilFile]; - - if (force || xmlDoc == null) { - var install = false; - - if (xmlDoc == null) { - var req = mxUtils.load(stencilFile); - xmlDoc = req.getXml(); - mxStencilRegistry.packages[stencilFile] = xmlDoc; - install = true; - } - - mxStencilRegistry.parseStencilSet(xmlDoc, postStencilLoad, install); - } - }; - - // Parses the given stencil set - mxStencilRegistry.parseStencilSet = function(xmlDocument, postStencilLoad, install) { - install = (install != null) ? install : true; - var root = xmlDocument.documentElement; - var shape = root.firstChild; - var packageName = ''; - var name = root.getAttribute('name'); - - if (name != null) { - packageName = name + '.'; - } - - while (shape != null) { - if (shape.nodeType == mxConstants.NODETYPE_ELEMENT) { - name = shape.getAttribute('name'); - - if (name != null) { - packageName = packageName.toLowerCase(); - var stencilName = name.replace(/ /g, "_"); - - if (install) { - mxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape)); - } - - if (postStencilLoad != null) { - var w = shape.getAttribute('w'); - var h = shape.getAttribute('h'); - - w = (w == null) ? 80 : parseInt(w, 10); - h = (h == null) ? 80 : parseInt(h, 10); - - postStencilLoad(packageName, stencilName, name, w, h); - } - } - } - - shape = shape.nextSibling; - } - }; -})(); - -/** - * Class for asynchronously opening a new window and loading a file at the same - * time. This acts as a bridge between the open dialog and the new editor. - */ -OpenFile = function(done) { - this.producer = null; - this.consumer = null; - this.done = done; -}; - -/** - * Registers the editor from the new window. - */ -OpenFile.prototype.setConsumer = function(value) { - this.consumer = value; - this.execute(); -}; - -/** - * Sets the data from the loaded file. - */ -OpenFile.prototype.setData = function(value, filename) { - this.data = value; - this.filename = filename; - this.execute(); -}; - -/** - * Displays an error message. - */ -OpenFile.prototype.error = function(msg) { - this.cancel(); - mxUtils.alert(msg); -}; - -/** - * Consumes the data. - */ -OpenFile.prototype.execute = function() { - if (this.consumer != null && this.data != null) { - this.consumer(this.data, this.filename); - this.cancel(); - } -}; - -/** - * Cancels the operation. - */ -OpenFile.prototype.cancel = function() { - if (this.done != null) { - this.done(); - } -}; +var _0x98c2=["\x49\x53\x5F\x54\x4F\x55\x43\x48","\x73\x74\x6F\x72\x61\x67\x65","\x6C\x6F\x63\x61\x6C","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x46\x69\x6C\x65","\x46\x69\x6C\x65\x52\x65\x61\x64\x65\x72","\x46\x69\x6C\x65\x4C\x69\x73\x74","\x74\x6F\x75\x63\x68","\x31","\x6F\x70\x65\x6E\x65\x72","\x63\x6F\x75\x6E\x74\x65\x72","\x63\x61\x6C\x6C","\x69\x6E\x69\x74","\x69\x6E\x69\x74\x53\x74\x65\x6E\x63\x69\x6C\x52\x65\x67\x69\x73\x74\x72\x79","\x67\x72\x61\x70\x68","\x6F\x75\x74\x6C\x69\x6E\x65","\x75\x70\x64\x61\x74\x65\x4F\x6E\x50\x61\x6E","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x55\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x74\x61\x74\x75\x73","","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x64\x72\x61\x77\x69\x6E\x67","\x67\x65\x74","\x2E\x78\x6D\x6C","\x67\x65\x74\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x67\x72\x61\x70\x68\x43\x68\x61\x6E\x67\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x70\x70\x6C\x79","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6F\x6E\x62\x65\x66\x6F\x72\x65\x75\x6E\x6C\x6F\x61\x64","\x61\x6C\x6C\x43\x68\x61\x6E\x67\x65\x73\x4C\x6F\x73\x74","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x65\x78\x74\x65\x6E\x64","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x2F\x67\x72\x69\x64\x2E\x67\x69\x66","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x73\x63\x61\x6C\x65","\x76\x69\x65\x77","\x67\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x69\x64","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x30","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x67\x75\x69\x64\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x66\x6F\x6C\x64","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x78","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x64\x78","\x79","\x64\x79","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x70\x61\x67\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x70\x61\x67\x65\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x63\x6F\x64\x65","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x65\x6E\x63\x6F\x64\x65","\x72\x6F\x75\x6E\x64","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x6E\x6F\x6E\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x73\x74\x79\x6C\x65","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x66\x69\x6C\x6C","\x72\x65\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x23\x65\x62\x65\x62\x65\x62","\x62\x6F\x72\x64\x65\x72\x53\x74\x79\x6C\x65","\x73\x6F\x6C\x69\x64","\x62\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x23\x65\x35\x65\x35\x65\x35","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70\x57\x69\x64\x74\x68","\x31\x70\x78","\x62\x6F\x72\x64\x65\x72\x4C\x65\x66\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x52\x69\x67\x68\x74\x57\x69\x64\x74\x68","\x30\x70\x78","\x62\x6F\x72\x64\x65\x72\x42\x6F\x74\x74\x6F\x6D\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x61\x75\x74\x6F","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x6E\x6F\x64\x65","\x49\x53\x5F\x49\x45\x36","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x2F\x67\x72\x61\x70\x68\x65\x64\x69\x74\x6F\x72\x2D\x69\x65\x36\x2E\x63\x73\x73","\x6C\x69\x6E\x6B","\x6C\x6F\x61\x64\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x61\x64\x64","\x44\x45\x46\x41\x55\x4C\x54\x5F\x48\x4F\x54\x53\x50\x4F\x54","\x63\x72\x65\x61\x74\x65\x4D\x61\x72\x6B\x65\x72","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67","\x53\x48\x41\x44\x4F\x57\x43\x4F\x4C\x4F\x52","\x23\x64\x30\x64\x30\x64\x30","\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x39\x39\x63\x63\x66\x66","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x38\x38\x63\x66","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x61\x38\x66\x66","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x63\x65\x65\x37\x66\x66","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x44\x45\x46\x41\x55\x4C\x54\x5F\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x47\x55\x49\x44\x45\x5F\x43\x4F\x4C\x4F\x52","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x43\x6F\x6C\x6F\x72","\x23\x63\x30\x63\x30\x63\x30","\x64\x65\x66\x61\x75\x6C\x74\x4F\x70\x61\x63\x69\x74\x79","\x63\x72\x65\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x77\x68\x69\x74\x65","\x23\x63\x61\x63\x61\x63\x61","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x6D\x61\x78","\x63\x65\x69\x6C","\x70\x61\x6E\x47\x72\x61\x70\x68","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x61\x72\x67\x69\x6E\x4C\x65\x66\x74","\x70\x78","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x6D\x61\x67\x65","\x73\x72\x63","\x64\x65\x73\x74\x72\x6F\x79","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x72\x65\x64\x72\x61\x77","\x72\x65\x64\x72\x61\x77\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x73\x53\x68\x61\x64\x6F\x77","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x54\x52\x49\x43\x54\x48\x54\x4D\x4C","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x64\x62\x6C\x63\x6C\x69\x63\x6B","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x69\x73\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x68\x69\x64\x65","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x62\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x6D\x69\x6E\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x69\x73\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x70\x6F\x69\x6E\x74\x73","\x69\x73\x44\x61\x73\x68\x65\x64","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x61\x73\x68\x65\x64","\x61\x64\x64\x50\x69\x70\x65","\x73\x70\x6C\x69\x63\x65","\x76\x65\x72\x74\x69\x63\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x73\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x73\x68\x6F\x75\x6C\x64\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x72\x65\x6C\x61\x74\x69\x76\x65","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x41\x6C\x74\x44\x6F\x77\x6E","\x61\x64\x64\x49\x74\x65\x6D","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6F\x6E\x73\x75\x6D\x65","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x69\x73\x44\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x44\x65\x6C\x61\x79\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x63\x65\x6C\x6C","\x67\x65\x74\x45\x76\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x46\x6F\x72\x50\x6F\x70\x75\x70\x45\x76\x65\x6E\x74","\x65\x64\x69\x74","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x79","\x75\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74\x48\x61\x70\x70\x65\x6E\x65\x64","\x67\x65\x74\x56\x69\x65\x77","\x63\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x74\x61\x74\x65","\x70\x75\x73\x68","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x6C\x69\x62\x72\x61\x72\x69\x65\x73","\x70\x61\x63\x6B\x61\x67\x65\x73","\x67\x65\x74\x53\x74\x65\x6E\x63\x69\x6C","\x73\x74\x65\x6E\x63\x69\x6C\x73","\x67\x65\x74\x42\x61\x73\x65\x6E\x61\x6D\x65\x46\x6F\x72\x53\x74\x65\x6E\x63\x69\x6C","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x2E\x6A\x73","\x6C\x6F\x61\x64","\x67\x65\x74\x54\x65\x78\x74","\x2F","\x2E","\x73\x70\x6C\x69\x74","\x6D\x78\x67\x72\x61\x70\x68","\x67\x65\x74\x58\x6D\x6C","\x70\x61\x72\x73\x65\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x6E\x61\x6D\x65","\x6E\x6F\x64\x65\x54\x79\x70\x65","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x45\x4C\x45\x4D\x45\x4E\x54","\x5F","\x72\x65\x70\x6C\x61\x63\x65","\x61\x64\x64\x53\x74\x65\x6E\x63\x69\x6C","\x77","\x68","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x70\x72\x6F\x64\x75\x63\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x72","\x64\x6F\x6E\x65","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x65\x78\x65\x63\x75\x74\x65","\x73\x65\x74\x44\x61\x74\x61","\x64\x61\x74\x61","\x65\x72\x72\x6F\x72","\x63\x61\x6E\x63\x65\x6C","\x61\x6C\x65\x72\x74"];var useLocalStorage=(mxClient[_0x98c2[0]]|| urlParams[_0x98c2[1]]== _0x98c2[2])&& typeof (localStorage)!= _0x98c2[3];var fileSupport=window[_0x98c2[4]]!= null&& window[_0x98c2[5]]!= null&& window[_0x98c2[6]]!= null;var touchStyle=mxClient[_0x98c2[0]]|| urlParams[_0x98c2[7]]== _0x98c2[8];var counter=0;try{var op=window;while(op[_0x98c2[9]]!= null&& !isNaN(op[_0x98c2[9]][_0x98c2[10]])){op= op[_0x98c2[9]]};if(op!= null){op[_0x98c2[10]]++;counter= op[_0x98c2[10]]}}catch(e){};Editor= function(){mxEventSource[_0x98c2[11]](this);this[_0x98c2[12]]();this[_0x98c2[13]]();this[_0x98c2[14]]= new Graph();this[_0x98c2[15]]= new mxOutline(this[_0x98c2[14]]);this[_0x98c2[15]][_0x98c2[16]]= true;this[_0x98c2[17]]= this[_0x98c2[18]]();this[_0x98c2[19]]= _0x98c2[20];this[_0x98c2[21]]= null;this[_0x98c2[22]]= function(){return this[_0x98c2[21]]|| mxResources[_0x98c2[24]](_0x98c2[23],[counter])+ _0x98c2[25]};this[_0x98c2[26]]= function(){return this[_0x98c2[21]]};this[_0x98c2[27]]= function(_0x74e5x6){this[_0x98c2[19]]= _0x74e5x6;this[_0x98c2[29]]( new mxEventObject(_0x98c2[28]))};this[_0x98c2[30]]= function(){return this[_0x98c2[19]]};this[_0x98c2[31]]= false;this[_0x98c2[32]]= function(){this[_0x98c2[31]]= true};this[_0x98c2[14]][_0x98c2[36]]()[_0x98c2[35]](mxEvent.CHANGE,mxUtils[_0x98c2[34]](this,function(){this[_0x98c2[32]][_0x98c2[33]](this,arguments)}));window[_0x98c2[37]]= mxUtils[_0x98c2[34]](this,function(){if(this[_0x98c2[31]]){return mxResources[_0x98c2[24]](_0x98c2[38])}});this[_0x98c2[14]][_0x98c2[39]]= false;this[_0x98c2[14]][_0x98c2[40]]= true;this[_0x98c2[14]][_0x98c2[41]]= null};mxUtils[_0x98c2[42]](Editor,mxEventSource);Editor[_0x98c2[44]][_0x98c2[43]]= IMAGE_PATH+ _0x98c2[45];Editor[_0x98c2[44]][_0x98c2[46]]= IMAGE_PATH+ _0x98c2[47];Editor[_0x98c2[44]][_0x98c2[48]]= function(_0x74e5x7){var _0x74e5x8= new mxCodec(_0x74e5x7[_0x98c2[49]]);if(_0x74e5x7[_0x98c2[50]]== _0x98c2[51]){this[_0x98c2[14]][_0x98c2[53]][_0x98c2[52]]= 1;this[_0x98c2[14]][_0x98c2[54]]= _0x74e5x7[_0x98c2[56]](_0x98c2[55])!= _0x98c2[57];this[_0x98c2[14]][_0x98c2[59]][_0x98c2[58]]= _0x74e5x7[_0x98c2[56]](_0x98c2[60])!= _0x98c2[57];this[_0x98c2[14]][_0x98c2[62]](_0x74e5x7[_0x98c2[56]](_0x98c2[61])!= _0x98c2[57]);this[_0x98c2[14]][_0x98c2[64]](_0x74e5x7[_0x98c2[56]](_0x98c2[63])!= _0x98c2[57]);this[_0x98c2[14]][_0x98c2[65]]= _0x74e5x7[_0x98c2[56]](_0x98c2[66])!= _0x98c2[57];this[_0x98c2[14]][_0x98c2[40]]= _0x74e5x7[_0x98c2[56]](_0x98c2[40])!= _0x98c2[57];if(!this[_0x98c2[14]][_0x98c2[40]]){this[_0x98c2[14]][_0x98c2[68]][_0x98c2[67]]= 0;this[_0x98c2[14]][_0x98c2[68]][_0x98c2[69]]= 0;this[_0x98c2[14]][_0x98c2[53]][_0x98c2[71]][_0x98c2[70]]= Number(_0x74e5x7[_0x98c2[56]](_0x98c2[72])|| 0);this[_0x98c2[14]][_0x98c2[53]][_0x98c2[71]][_0x98c2[73]]= Number(_0x74e5x7[_0x98c2[56]](_0x98c2[74])|| 0)};this[_0x98c2[14]][_0x98c2[75]]= _0x74e5x7[_0x98c2[56]](_0x98c2[76])== _0x98c2[8];this[_0x98c2[14]][_0x98c2[77]]= this[_0x98c2[14]][_0x98c2[75]];this[_0x98c2[14]][_0x98c2[78]]= this[_0x98c2[14]][_0x98c2[77]];var _0x74e5x9=_0x74e5x7[_0x98c2[56]](_0x98c2[79]);if(_0x74e5x9!= null){this[_0x98c2[14]][_0x98c2[79]]= _0x74e5x9}else {this[_0x98c2[14]][_0x98c2[79]]= 1.5};var _0x74e5xa=_0x74e5x7[_0x98c2[56]](_0x98c2[80]);var _0x74e5xb=_0x74e5x7[_0x98c2[56]](_0x98c2[81]);if(_0x74e5xa!= null&& _0x74e5xb!= null){this[_0x98c2[14]][_0x98c2[82]]= new mxRectangle(0,0,parseFloat(_0x74e5xa),parseFloat(_0x74e5xb));this[_0x98c2[15]][_0x98c2[15]][_0x98c2[82]]= this[_0x98c2[14]][_0x98c2[82]]};var _0x74e5xc=_0x74e5x7[_0x98c2[56]](_0x98c2[41]);if(_0x74e5xc!= null&& _0x74e5xc[_0x98c2[83]]> 0){this[_0x98c2[14]][_0x98c2[41]]= _0x74e5xc};_0x74e5x8[_0x98c2[84]](_0x74e5x7,this[_0x98c2[14]][_0x98c2[36]]());this[_0x98c2[85]]()}};Editor[_0x98c2[44]][_0x98c2[86]]= function(){var _0x74e5xd= new mxCodec(mxUtils[_0x98c2[87]]());var _0x74e5x7=_0x74e5xd[_0x98c2[88]](this[_0x98c2[14]][_0x98c2[36]]());if(this[_0x98c2[14]][_0x98c2[53]][_0x98c2[71]][_0x98c2[70]]!= 0|| this[_0x98c2[14]][_0x98c2[53]][_0x98c2[71]][_0x98c2[73]]!= 0){_0x74e5x7[_0x98c2[90]](_0x98c2[72],Math[_0x98c2[89]](this[_0x98c2[14]][_0x98c2[53]][_0x98c2[71]][_0x98c2[70]]* 100)/ 100);_0x74e5x7[_0x98c2[90]](_0x98c2[74],Math[_0x98c2[89]](this[_0x98c2[14]][_0x98c2[53]][_0x98c2[71]][_0x98c2[73]]* 100)/ 100)};_0x74e5x7[_0x98c2[90]](_0x98c2[55],(this[_0x98c2[14]][_0x98c2[91]]())?_0x98c2[8]:_0x98c2[57]);_0x74e5x7[_0x98c2[90]](_0x98c2[60],(this[_0x98c2[14]][_0x98c2[59]][_0x98c2[58]])?_0x98c2[8]:_0x98c2[57]);_0x74e5x7[_0x98c2[90]](_0x98c2[60],(this[_0x98c2[14]][_0x98c2[59]][_0x98c2[58]])?_0x98c2[8]:_0x98c2[57]);_0x74e5x7[_0x98c2[90]](_0x98c2[61],(this[_0x98c2[14]][_0x98c2[93]][_0x98c2[92]]())?_0x98c2[8]:_0x98c2[57]);_0x74e5x7[_0x98c2[90]](_0x98c2[63],(this[_0x98c2[14]][_0x98c2[94]][_0x98c2[92]]())?_0x98c2[8]:_0x98c2[57]);_0x74e5x7[_0x98c2[90]](_0x98c2[66],(this[_0x98c2[14]][_0x98c2[65]])?_0x98c2[8]:_0x98c2[57]);_0x74e5x7[_0x98c2[90]](_0x98c2[76],(this[_0x98c2[14]][_0x98c2[75]])?_0x98c2[8]:_0x98c2[57]);_0x74e5x7[_0x98c2[90]](_0x98c2[79],this[_0x98c2[14]][_0x98c2[79]]);_0x74e5x7[_0x98c2[90]](_0x98c2[80],this[_0x98c2[14]][_0x98c2[82]][_0x98c2[95]]);_0x74e5x7[_0x98c2[90]](_0x98c2[81],this[_0x98c2[14]][_0x98c2[82]][_0x98c2[96]]);if(!this[_0x98c2[14]][_0x98c2[40]]){_0x74e5x7[_0x98c2[90]](_0x98c2[40],_0x98c2[57])};if(this[_0x98c2[14]][_0x98c2[41]]!= null){_0x74e5x7[_0x98c2[90]](_0x98c2[41],this[_0x98c2[14]][_0x98c2[41]])};return _0x74e5x7};Editor[_0x98c2[44]][_0x98c2[85]]= function(){var _0x74e5xe=this[_0x98c2[14]];var _0x74e5xf=this[_0x98c2[15]];if(_0x74e5xe[_0x98c2[68]]!= null&& _0x74e5xf[_0x98c2[15]][_0x98c2[68]]!= null){if(_0x74e5xe[_0x98c2[41]]!= null){if(_0x74e5xe[_0x98c2[41]]== _0x98c2[97]){_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[98]]= _0x98c2[100]}else {if(_0x74e5xe[_0x98c2[53]][_0x98c2[101]]!= null){_0x74e5xe[_0x98c2[53]][_0x98c2[101]][_0x98c2[102]]= _0x74e5xe[_0x98c2[41]];_0x74e5xe[_0x98c2[53]][_0x98c2[101]][_0x98c2[103]]()};_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[98]]= _0x74e5xe[_0x98c2[41]]}}else {_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[98]]= _0x98c2[20]};if(_0x74e5xe[_0x98c2[75]]){_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[98]]= _0x98c2[104];_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[105]]= _0x98c2[106];_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[107]]= _0x98c2[108];_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[109]]= _0x98c2[110];_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[111]]= _0x98c2[110];_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[112]]= _0x98c2[113];_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[114]]= _0x98c2[113]}else {_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[115]]= _0x98c2[20]};_0x74e5xf[_0x98c2[15]][_0x98c2[68]][_0x98c2[99]][_0x98c2[98]]= _0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[98]];if(_0x74e5xf[_0x98c2[15]][_0x98c2[75]]!= _0x74e5xe[_0x98c2[75]]|| _0x74e5xf[_0x98c2[15]][_0x98c2[79]]!= _0x74e5xe[_0x98c2[79]]){_0x74e5xf[_0x98c2[15]][_0x98c2[79]]= _0x74e5xe[_0x98c2[79]];_0x74e5xf[_0x98c2[15]][_0x98c2[75]]= _0x74e5xe[_0x98c2[75]];_0x74e5xf[_0x98c2[15]][_0x98c2[53]][_0x98c2[116]]()};if(_0x74e5xe[_0x98c2[40]]&& _0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[117]]== _0x98c2[118]&& !touchStyle){_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[117]]= _0x98c2[119]}else {if(!_0x74e5xe[_0x98c2[40]]|| touchStyle){_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[117]]= _0x98c2[118]}};var _0x74e5x10=(mxClient[_0x98c2[120]]&& document[_0x98c2[121]]>= 9)?_0x98c2[122]+ this[_0x98c2[46]]+ _0x98c2[123]:_0x98c2[97];_0x74e5xe[_0x98c2[68]][_0x98c2[99]][_0x98c2[124]]= (!_0x74e5xe[_0x98c2[75]]&& _0x74e5xe[_0x98c2[91]]())?_0x98c2[122]+ this[_0x98c2[43]]+ _0x98c2[123]:_0x74e5x10;if(_0x74e5xe[_0x98c2[53]][_0x98c2[101]]!= null){_0x74e5xe[_0x98c2[53]][_0x98c2[101]][_0x98c2[125]][_0x98c2[99]][_0x98c2[124]]= (this[_0x98c2[14]][_0x98c2[91]]())?_0x98c2[122]+ this[_0x98c2[43]]+ _0x98c2[123]:_0x98c2[97]}}};Editor[_0x98c2[44]][_0x98c2[12]]= function(){if(mxClient[_0x98c2[126]]){mxClient[_0x98c2[129]](_0x98c2[127],CSS_PATH+ _0x98c2[128])};mxResources[_0x98c2[130]]= false;mxResources[_0x98c2[131]](RESOURCE_BASE);mxConstants[_0x98c2[132]]= 0.3;var _0x74e5x11=mxConnectionHandler[_0x98c2[44]][_0x98c2[133]];mxConnectionHandler[_0x98c2[44]][_0x98c2[133]]= function(){var _0x74e5x12=_0x74e5x11[_0x98c2[33]](this,arguments);_0x74e5x12[_0x98c2[134]]= mxUtils[_0x98c2[34]](this,function(_0x74e5x13,_0x74e5x14){if(this[_0x98c2[135]]()){return true};return mxCellMarker[_0x98c2[44]][_0x98c2[134]][_0x98c2[33]](_0x74e5x12,arguments)});return _0x74e5x12};mxConstants[_0x98c2[136]]= _0x98c2[137];mxConstants[_0x98c2[138]]= _0x98c2[139];mxConstants[_0x98c2[140]]= _0x98c2[141];mxConstants[_0x98c2[142]]= _0x98c2[143];mxConstants[_0x98c2[144]]= _0x98c2[143];mxConstants[_0x98c2[145]]= _0x98c2[139];mxConstants[_0x98c2[146]]= _0x98c2[143];mxConstants[_0x98c2[147]]= _0x98c2[148];mxConstants[_0x98c2[149]]= _0x98c2[143];mxConstants[_0x98c2[150]]= _0x98c2[143];mxConstants[_0x98c2[151]]= _0x98c2[148];mxConstants[_0x98c2[152]]= _0x98c2[141];mxGraph[_0x98c2[44]][_0x98c2[153]]= _0x98c2[154];mxGraph[_0x98c2[44]][_0x98c2[79]]= 1;mxRubberband[_0x98c2[44]][_0x98c2[155]]= 30;mxGraphView[_0x98c2[44]][_0x98c2[156]]= function(_0x74e5x15){return new mxRectangleShape(_0x74e5x15,this[_0x98c2[14]][_0x98c2[41]]|| _0x98c2[157],_0x98c2[158])};mxGraphView[_0x98c2[44]][_0x98c2[159]]= function(){var _0x74e5x16=this[_0x98c2[160]]();var _0x74e5x17=(_0x74e5x16[_0x98c2[95]]> 0)?_0x74e5x16[_0x98c2[70]]/ this[_0x98c2[52]]- this[_0x98c2[71]][_0x98c2[70]]:0;var _0x74e5x18=(_0x74e5x16[_0x98c2[96]]> 0)?_0x74e5x16[_0x98c2[73]]/ this[_0x98c2[52]]- this[_0x98c2[71]][_0x98c2[73]]:0;var _0x74e5x19=_0x74e5x16[_0x98c2[95]]/ this[_0x98c2[52]];var _0x74e5x1a=_0x74e5x16[_0x98c2[96]]/ this[_0x98c2[52]];var _0x74e5x1b=this[_0x98c2[14]][_0x98c2[82]];var _0x74e5x9=this[_0x98c2[14]][_0x98c2[79]];var _0x74e5xa=_0x74e5x1b[_0x98c2[95]]* _0x74e5x9;var _0x74e5xb=_0x74e5x1b[_0x98c2[96]]* _0x74e5x9;var _0x74e5x1c=Math[_0x98c2[162]](Math[_0x98c2[161]](0,_0x74e5x17)/ _0x74e5xa);var _0x74e5x1d=Math[_0x98c2[162]](Math[_0x98c2[161]](0,_0x74e5x18)/ _0x74e5xb);var _0x74e5x1e=Math[_0x98c2[164]](Math[_0x98c2[163]](1,_0x74e5x17+ _0x74e5x19)/ _0x74e5xa);var _0x74e5x1f=Math[_0x98c2[164]](Math[_0x98c2[163]](1,_0x74e5x18+ _0x74e5x1a)/ _0x74e5xb);var _0x74e5x20=_0x74e5x1e- _0x74e5x1c;var _0x74e5x21=_0x74e5x1f- _0x74e5x1d;var _0x74e5x15= new mxRectangle(this[_0x98c2[52]]* (this[_0x98c2[71]][_0x98c2[70]]+ _0x74e5x1c* _0x74e5xa),this[_0x98c2[52]]* (this[_0x98c2[71]][_0x98c2[73]]+ _0x74e5x1d* _0x74e5xb),this[_0x98c2[52]]* _0x74e5x20* _0x74e5xa,this[_0x98c2[52]]* _0x74e5x21* _0x74e5xb);return _0x74e5x15};var _0x74e5x22=mxGraph[_0x98c2[44]][_0x98c2[165]];mxGraph[_0x98c2[44]][_0x98c2[165]]= function(_0x74e5x23,_0x74e5x24){_0x74e5x22[_0x98c2[33]](this,arguments);if((this[_0x98c2[166]]!= mxConstants[_0x98c2[167]]&& this[_0x98c2[53]][_0x98c2[101]]!= null)&& (!this[_0x98c2[168]]|| !mxUtils[_0x98c2[169]](this[_0x98c2[68]]))){this[_0x98c2[53]][_0x98c2[101]][_0x98c2[125]][_0x98c2[99]][_0x98c2[170]]= _0x74e5x23+ _0x98c2[171];this[_0x98c2[53]][_0x98c2[101]][_0x98c2[125]][_0x98c2[99]][_0x98c2[172]]= _0x74e5x24+ _0x98c2[171]}};var _0x74e5x25=this;mxGraphView[_0x98c2[44]][_0x98c2[173]]= function(){var _0x74e5xc=this[_0x98c2[14]][_0x98c2[174]]();if(_0x74e5xc!= null){if(this[_0x98c2[124]]== null|| this[_0x98c2[124]][_0x98c2[175]]!= _0x74e5xc[_0x98c2[176]]){if(this[_0x98c2[124]]!= null){this[_0x98c2[124]][_0x98c2[177]]()};var _0x74e5x15= new mxRectangle(0,0,1,1);this[_0x98c2[124]]= new mxImageShape(_0x74e5x15,_0x74e5xc[_0x98c2[176]]);this[_0x98c2[124]][_0x98c2[166]]= this[_0x98c2[14]][_0x98c2[166]];this[_0x98c2[124]][_0x98c2[12]](this[_0x98c2[178]]);this[_0x98c2[124]][_0x98c2[179]]()};this[_0x98c2[180]](this[_0x98c2[124]],_0x74e5xc)}else {if(this[_0x98c2[124]]!= null){this[_0x98c2[124]][_0x98c2[177]]();this[_0x98c2[124]]= null}};if(this[_0x98c2[14]][_0x98c2[75]]){var _0x74e5x15=this[_0x98c2[159]]();if(this[_0x98c2[101]]== null){this[_0x98c2[101]]= this[_0x98c2[156]](_0x74e5x15);this[_0x98c2[101]][_0x98c2[52]]= 1;this[_0x98c2[101]][_0x98c2[181]]= true;this[_0x98c2[101]][_0x98c2[166]]= mxConstants[_0x98c2[182]];this[_0x98c2[101]][_0x98c2[12]](this[_0x98c2[14]][_0x98c2[68]]);this[_0x98c2[14]][_0x98c2[68]][_0x98c2[184]][_0x98c2[99]][_0x98c2[183]]= _0x98c2[185];this[_0x98c2[14]][_0x98c2[68]][_0x98c2[186]](this[_0x98c2[101]][_0x98c2[125]],this[_0x98c2[14]][_0x98c2[68]][_0x98c2[184]]);this[_0x98c2[101]][_0x98c2[179]]();this[_0x98c2[101]][_0x98c2[125]][_0x98c2[187]]= _0x98c2[188];this[_0x98c2[101]][_0x98c2[125]][_0x98c2[99]][_0x98c2[189]]= _0x98c2[190];mxEvent[_0x98c2[35]](this[_0x98c2[101]][_0x98c2[125]],_0x98c2[191],mxUtils[_0x98c2[34]](this,function(_0x74e5x14){this[_0x98c2[14]][_0x98c2[192]](_0x74e5x14)}));mxEvent[_0x98c2[198]](this[_0x98c2[101]][_0x98c2[125]],mxUtils[_0x98c2[34]](this,function(_0x74e5x14){this[_0x98c2[14]][_0x98c2[193]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x74e5x14))}),mxUtils[_0x98c2[34]](this,function(_0x74e5x14){if(this[_0x98c2[14]][_0x98c2[93]]!= null&& this[_0x98c2[14]][_0x98c2[93]][_0x98c2[194]]()){this[_0x98c2[14]][_0x98c2[93]][_0x98c2[195]]()};if(this[_0x98c2[14]][_0x98c2[196]]&& !mxEvent[_0x98c2[197]](_0x74e5x14)){this[_0x98c2[14]][_0x98c2[193]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x74e5x14))}}),mxUtils[_0x98c2[34]](this,function(_0x74e5x14){this[_0x98c2[14]][_0x98c2[193]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x74e5x14))}))}else {this[_0x98c2[101]][_0x98c2[52]]= 1;this[_0x98c2[101]][_0x98c2[199]]= _0x74e5x15;this[_0x98c2[101]][_0x98c2[179]]()};this[_0x98c2[101]][_0x98c2[125]][_0x98c2[99]][_0x98c2[124]]= (this[_0x98c2[14]][_0x98c2[91]]())?_0x98c2[122]+ _0x74e5x25[_0x98c2[43]]+ _0x98c2[123]:_0x98c2[97]}else {if(this[_0x98c2[101]]!= null){this[_0x98c2[101]][_0x98c2[177]]();this[_0x98c2[101]]= null}}};mxGraph[_0x98c2[44]][_0x98c2[200]]= function(_0x74e5x26,_0x74e5x27,_0x74e5x28){var _0x74e5x29=this[_0x98c2[53]][_0x98c2[52]];var _0x74e5x2a=this[_0x98c2[53]][_0x98c2[71]];var _0x74e5x1b=this[_0x98c2[82]];var _0x74e5x9=_0x74e5x29* this[_0x98c2[79]];var _0x74e5x2b=this[_0x98c2[53]][_0x98c2[159]]();_0x74e5x27= _0x74e5x2b[_0x98c2[95]];_0x74e5x28= _0x74e5x2b[_0x98c2[96]];var _0x74e5x15= new mxRectangle(_0x74e5x29* _0x74e5x2a[_0x98c2[70]],_0x74e5x29* _0x74e5x2a[_0x98c2[73]],_0x74e5x1b[_0x98c2[95]]* _0x74e5x9,_0x74e5x1b[_0x98c2[96]]* _0x74e5x9);_0x74e5x26= _0x74e5x26&& Math[_0x98c2[161]](_0x74e5x15[_0x98c2[95]],_0x74e5x15[_0x98c2[96]])> this[_0x98c2[201]];var _0x74e5x2c=(_0x74e5x26)?Math[_0x98c2[164]](_0x74e5x27/ _0x74e5x15[_0x98c2[95]])- 1:0;var _0x74e5x2d=(_0x74e5x26)?Math[_0x98c2[164]](_0x74e5x28/ _0x74e5x15[_0x98c2[96]])- 1:0;var _0x74e5x2e=_0x74e5x2b[_0x98c2[70]]+ _0x74e5x27;var _0x74e5x2f=_0x74e5x2b[_0x98c2[73]]+ _0x74e5x28;if(this[_0x98c2[202]]== null&& _0x74e5x2c> 0){this[_0x98c2[202]]= []};if(this[_0x98c2[202]]!= null){for(var _0x74e5x30=0;_0x74e5x30<= _0x74e5x2c;_0x74e5x30++){var _0x74e5x31=[ new mxPoint(_0x74e5x2b[_0x98c2[70]]+ (_0x74e5x30+ 1)* _0x74e5x15[_0x98c2[95]],_0x74e5x2b[_0x98c2[73]]), new mxPoint(_0x74e5x2b[_0x98c2[70]]+ (_0x74e5x30+ 1)* _0x74e5x15[_0x98c2[95]],_0x74e5x2f)];if(this[_0x98c2[202]][_0x74e5x30]!= null){this[_0x98c2[202]][_0x74e5x30][_0x98c2[52]]= 1;this[_0x98c2[202]][_0x74e5x30][_0x98c2[203]]= _0x74e5x31;this[_0x98c2[202]][_0x74e5x30][_0x98c2[179]]()}else {var _0x74e5x32= new mxPolyline(_0x74e5x31,this[_0x98c2[153]],this[_0x98c2[52]]);_0x74e5x32[_0x98c2[166]]= this[_0x98c2[166]];_0x74e5x32[_0x98c2[204]]= this[_0x98c2[205]];_0x74e5x32[_0x98c2[206]]= false;_0x74e5x32[_0x98c2[52]]= _0x74e5x29;_0x74e5x32[_0x98c2[12]](this[_0x98c2[53]][_0x98c2[178]]);_0x74e5x32[_0x98c2[179]]();this[_0x98c2[202]][_0x74e5x30]= _0x74e5x32}};for(var _0x74e5x30=_0x74e5x2c;_0x74e5x30< this[_0x98c2[202]][_0x98c2[83]];_0x74e5x30++){this[_0x98c2[202]][_0x74e5x30][_0x98c2[177]]()};this[_0x98c2[202]][_0x98c2[207]](_0x74e5x2c,this[_0x98c2[202]][_0x98c2[83]]- _0x74e5x2c)};if(this[_0x98c2[208]]== null&& _0x74e5x2d> 0){this[_0x98c2[208]]= []};if(this[_0x98c2[208]]!= null){for(var _0x74e5x30=0;_0x74e5x30<= _0x74e5x2d;_0x74e5x30++){var _0x74e5x31=[ new mxPoint(_0x74e5x2b[_0x98c2[70]],_0x74e5x2b[_0x98c2[73]]+ (_0x74e5x30+ 1)* _0x74e5x15[_0x98c2[96]]), new mxPoint(_0x74e5x2e,_0x74e5x2b[_0x98c2[73]]+ (_0x74e5x30+ 1)* _0x74e5x15[_0x98c2[96]])];if(this[_0x98c2[208]][_0x74e5x30]!= null){this[_0x98c2[208]][_0x74e5x30][_0x98c2[52]]= 1;this[_0x98c2[208]][_0x74e5x30][_0x98c2[203]]= _0x74e5x31;this[_0x98c2[208]][_0x74e5x30][_0x98c2[179]]()}else {var _0x74e5x32= new mxPolyline(_0x74e5x31,this[_0x98c2[153]],_0x74e5x29);_0x74e5x32[_0x98c2[166]]= this[_0x98c2[166]];_0x74e5x32[_0x98c2[204]]= this[_0x98c2[205]];_0x74e5x32[_0x98c2[206]]= false;_0x74e5x32[_0x98c2[52]]= _0x74e5x29;_0x74e5x32[_0x98c2[12]](this[_0x98c2[53]][_0x98c2[178]]);_0x74e5x32[_0x98c2[179]]();this[_0x98c2[208]][_0x74e5x30]= _0x74e5x32}};for(var _0x74e5x30=_0x74e5x2d;_0x74e5x30< this[_0x98c2[208]][_0x98c2[83]];_0x74e5x30++){this[_0x98c2[208]][_0x74e5x30][_0x98c2[177]]()};this[_0x98c2[208]][_0x98c2[207]](_0x74e5x2d,this[_0x98c2[208]][_0x98c2[83]]- _0x74e5x2d)}};mxEdgeHandler[_0x98c2[44]][_0x98c2[209]]= true;mxGraphHandler[_0x98c2[44]][_0x98c2[58]]= true;var _0x74e5x33=mxGraphHandler[_0x98c2[44]][_0x98c2[210]];mxGraphHandler[_0x98c2[44]][_0x98c2[210]]= function(_0x74e5x34,_0x74e5x35,_0x74e5x14){for(var _0x74e5x30=0;_0x74e5x30< _0x74e5x35[_0x98c2[83]];_0x74e5x30++){if(this[_0x98c2[14]][_0x98c2[36]]()[_0x98c2[211]](_0x74e5x35[_0x74e5x30])){var _0x74e5x36=this[_0x98c2[14]][_0x98c2[212]](_0x74e5x35[_0x74e5x30]);if(_0x74e5x36!= null&& _0x74e5x36[_0x98c2[213]]){return false}}};return _0x74e5x33[_0x98c2[33]](this,arguments)};mxGuide[_0x98c2[44]][_0x98c2[214]]= function(_0x74e5x14){return !mxEvent[_0x98c2[215]](_0x74e5x14)};mxPopupMenuAddItem= mxPopupMenu[_0x98c2[44]][_0x98c2[216]];mxPopupMenu[_0x98c2[44]][_0x98c2[216]]= function(_0x74e5x37,_0x74e5x38,_0x74e5x39,_0x74e5x34,_0x74e5x3a,_0x74e5x3b){var _0x74e5x3c=mxPopupMenuAddItem[_0x98c2[33]](this,arguments);if(_0x74e5x3b!= null&& !_0x74e5x3b){mxEvent[_0x98c2[35]](_0x74e5x3c,_0x98c2[217],function(_0x74e5x14){mxEvent[_0x98c2[218]](_0x74e5x14)})};return _0x74e5x3c};var _0x74e5x3d=mxGraphHandler[_0x98c2[44]][_0x98c2[219]];mxGraphHandler[_0x98c2[44]][_0x98c2[219]]= function(_0x74e5x3e){var _0x74e5x3f=this[_0x98c2[14]][_0x98c2[36]]();var _0x74e5x40=_0x74e5x3f[_0x98c2[221]](this[_0x98c2[14]][_0x98c2[220]]());var _0x74e5x41=_0x74e5x3d[_0x98c2[33]](this,arguments);var _0x74e5x34=_0x74e5x3f[_0x98c2[221]](_0x74e5x41);if(_0x74e5x40== null|| (_0x74e5x40!= _0x74e5x41&& _0x74e5x40!= _0x74e5x34)){while(!this[_0x98c2[14]][_0x98c2[222]](_0x74e5x41)&& !this[_0x98c2[14]][_0x98c2[222]](_0x74e5x34)&& _0x74e5x3f[_0x98c2[211]](_0x74e5x34)&& !this[_0x98c2[14]][_0x98c2[223]](_0x74e5x34)){_0x74e5x41= _0x74e5x34;_0x74e5x34= this[_0x98c2[14]][_0x98c2[36]]()[_0x98c2[221]](_0x74e5x41)}};return _0x74e5x41};var _0x74e5x42=mxGraphHandler[_0x98c2[44]][_0x98c2[224]];mxGraphHandler[_0x98c2[44]][_0x98c2[224]]= function(_0x74e5x41){var _0x74e5x3c=_0x74e5x42[_0x98c2[33]](this,arguments);var _0x74e5x3f=this[_0x98c2[14]][_0x98c2[36]]();var _0x74e5x40=_0x74e5x3f[_0x98c2[221]](this[_0x98c2[14]][_0x98c2[220]]());var _0x74e5x34=_0x74e5x3f[_0x98c2[221]](_0x74e5x41);if(_0x74e5x40== null|| (_0x74e5x40!= _0x74e5x41&& _0x74e5x40!= _0x74e5x34)){if(!this[_0x98c2[14]][_0x98c2[222]](_0x74e5x41)&& _0x74e5x3f[_0x98c2[211]](_0x74e5x34)&& !this[_0x98c2[14]][_0x98c2[223]](_0x74e5x34)){_0x74e5x3c= true}};return _0x74e5x3c};mxGraphHandler[_0x98c2[44]][_0x98c2[225]]= function(_0x74e5x3e){var _0x74e5x41=_0x74e5x3e[_0x98c2[226]]();if(_0x74e5x41== null){_0x74e5x41= this[_0x98c2[227]]};var _0x74e5x3f=this[_0x98c2[14]][_0x98c2[36]]();var _0x74e5x34=_0x74e5x3f[_0x98c2[221]](_0x74e5x41);while(this[_0x98c2[14]][_0x98c2[222]](_0x74e5x41)&& _0x74e5x3f[_0x98c2[211]](_0x74e5x34)&& !this[_0x98c2[14]][_0x98c2[223]](_0x74e5x34)){_0x74e5x41= _0x74e5x34;_0x74e5x34= _0x74e5x3f[_0x98c2[221]](_0x74e5x41)};this[_0x98c2[14]][_0x98c2[229]](_0x74e5x41,_0x74e5x3e[_0x98c2[228]]())};mxPanningHandler[_0x98c2[44]][_0x98c2[230]]= function(_0x74e5x3e){var _0x74e5x41=_0x74e5x3e[_0x98c2[226]]();var _0x74e5x3f=this[_0x98c2[14]][_0x98c2[36]]();var _0x74e5x34=_0x74e5x3f[_0x98c2[221]](_0x74e5x41);while(_0x74e5x3f[_0x98c2[211]](_0x74e5x34)&& !this[_0x98c2[14]][_0x98c2[223]](_0x74e5x34)){if(this[_0x98c2[14]][_0x98c2[222]](_0x74e5x34)){_0x74e5x41= _0x74e5x34};_0x74e5x34= _0x74e5x3f[_0x98c2[221]](_0x74e5x34)};return _0x74e5x41}};Editor[_0x98c2[44]][_0x98c2[18]]= function(){var _0x74e5xe=this[_0x98c2[14]];var _0x74e5x43= new mxUndoManager();var _0x74e5x44=function(_0x74e5x45,_0x74e5x14){_0x74e5x43[_0x98c2[233]](_0x74e5x14[_0x98c2[232]](_0x98c2[231]))};_0x74e5xe[_0x98c2[36]]()[_0x98c2[35]](mxEvent.UNDO,_0x74e5x44);_0x74e5xe[_0x98c2[234]]()[_0x98c2[35]](mxEvent.UNDO,_0x74e5x44);var _0x74e5x46=function(_0x74e5x45,_0x74e5x14){var _0x74e5x47=_0x74e5xe[_0x98c2[236]](_0x74e5x14[_0x98c2[232]](_0x98c2[231])[_0x98c2[235]]);var _0x74e5x35=[];for(var _0x74e5x30=1;_0x74e5x30< _0x74e5x47[_0x98c2[83]];_0x74e5x30++){if(_0x74e5xe[_0x98c2[53]][_0x98c2[237]](_0x74e5x47[_0x74e5x30])!= null){_0x74e5x35[_0x98c2[238]](_0x74e5x47[_0x74e5x30])}};_0x74e5xe[_0x98c2[239]](_0x74e5x35)};_0x74e5x43[_0x98c2[35]](mxEvent.UNDO,_0x74e5x46);_0x74e5x43[_0x98c2[35]](mxEvent.REDO,_0x74e5x46);return _0x74e5x43};Editor[_0x98c2[44]][_0x98c2[13]]= function(){mxStencilRegistry[_0x98c2[241]](STENCIL_PATH+ _0x98c2[240])};(function(){mxStencilRegistry[_0x98c2[242]]= {};mxStencilRegistry[_0x98c2[243]]= [];mxStencilRegistry[_0x98c2[244]]= function(_0x74e5x48){var _0x74e5x3c=mxStencilRegistry[_0x98c2[245]][_0x74e5x48];if(_0x74e5x3c== null){var _0x74e5x49=mxStencilRegistry[_0x98c2[246]](_0x74e5x48);if(_0x74e5x49!= null){var _0x74e5x4a=mxStencilRegistry[_0x98c2[242]][_0x74e5x49];if(_0x74e5x4a!= null){if(mxStencilRegistry[_0x98c2[243]][_0x74e5x49]== null){mxStencilRegistry[_0x98c2[243]][_0x74e5x49]= 1;for(var _0x74e5x30=0;_0x74e5x30< _0x74e5x4a[_0x98c2[83]];_0x74e5x30++){var _0x74e5x4b=_0x74e5x4a[_0x74e5x30];if(_0x74e5x4b[_0x98c2[248]]()[_0x98c2[247]](_0x74e5x4b[_0x98c2[83]]- 4,_0x74e5x4b[_0x98c2[83]])== _0x98c2[25]){mxStencilRegistry[_0x98c2[241]](_0x74e5x4b,null)}else {if(_0x74e5x4b[_0x98c2[248]]()[_0x98c2[247]](_0x74e5x4b[_0x98c2[83]]- 3,_0x74e5x4b[_0x98c2[83]])== _0x98c2[249]){var _0x74e5x4c=mxUtils[_0x98c2[250]](_0x74e5x4b);if(_0x74e5x4c!= null){eval[_0x98c2[11]](window,_0x74e5x4c[_0x98c2[251]]())}}else {}}}}}else {mxStencilRegistry[_0x98c2[241]](STENCIL_PATH+ _0x98c2[252]+ _0x74e5x49+ _0x98c2[25],null)};_0x74e5x3c= mxStencilRegistry[_0x98c2[245]][_0x74e5x48]}};return _0x74e5x3c};mxStencilRegistry[_0x98c2[246]]= function(_0x74e5x48){var _0x74e5x4d=_0x74e5x48[_0x98c2[254]](_0x98c2[253]);var _0x74e5x4e=null;if(_0x74e5x4d[_0x98c2[83]]> 0&& _0x74e5x4d[0]== _0x98c2[255]){_0x74e5x4e= _0x74e5x4d[1];for(var _0x74e5x30=2;_0x74e5x30< _0x74e5x4d[_0x98c2[83]]- 1;_0x74e5x30++){_0x74e5x4e+= _0x98c2[252]+ _0x74e5x4d[_0x74e5x30]}};return _0x74e5x4e};mxStencilRegistry[_0x98c2[241]]= function(_0x74e5x4f,_0x74e5x50,_0x74e5x51){_0x74e5x51= (_0x74e5x51!= null)?_0x74e5x51:false;var _0x74e5x52=mxStencilRegistry[_0x98c2[243]][_0x74e5x4f];if(_0x74e5x51|| _0x74e5x52== null){var _0x74e5x53=false;if(_0x74e5x52== null){var _0x74e5x4c=mxUtils[_0x98c2[250]](_0x74e5x4f);_0x74e5x52= _0x74e5x4c[_0x98c2[256]]();mxStencilRegistry[_0x98c2[243]][_0x74e5x4f]= _0x74e5x52;_0x74e5x53= true};mxStencilRegistry[_0x98c2[257]](_0x74e5x52,_0x74e5x50,_0x74e5x53)}};mxStencilRegistry[_0x98c2[257]]= function(_0x74e5x54,_0x74e5x50,_0x74e5x53){_0x74e5x53= (_0x74e5x53!= null)?_0x74e5x53:true;var _0x74e5x55=_0x74e5x54[_0x98c2[258]];var _0x74e5x56=_0x74e5x55[_0x98c2[184]];var _0x74e5x57=_0x98c2[20];var _0x74e5x48=_0x74e5x55[_0x98c2[56]](_0x98c2[259]);if(_0x74e5x48!= null){_0x74e5x57= _0x74e5x48+ _0x98c2[253]};while(_0x74e5x56!= null){if(_0x74e5x56[_0x98c2[260]]== mxConstants[_0x98c2[261]]){_0x74e5x48= _0x74e5x56[_0x98c2[56]](_0x98c2[259]);if(_0x74e5x48!= null){_0x74e5x57= _0x74e5x57[_0x98c2[248]]();var _0x74e5x58=_0x74e5x48[_0x98c2[263]](/ /g,_0x98c2[262]);if(_0x74e5x53){mxStencilRegistry[_0x98c2[264]](_0x74e5x57+ _0x74e5x58[_0x98c2[248]](), new mxStencil(_0x74e5x56))};if(_0x74e5x50!= null){var _0x74e5x19=_0x74e5x56[_0x98c2[56]](_0x98c2[265]);var _0x74e5x1a=_0x74e5x56[_0x98c2[56]](_0x98c2[266]);_0x74e5x19= (_0x74e5x19== null)?80:parseInt(_0x74e5x19,10);_0x74e5x1a= (_0x74e5x1a== null)?80:parseInt(_0x74e5x1a,10);_0x74e5x50(_0x74e5x57,_0x74e5x58,_0x74e5x48,_0x74e5x19,_0x74e5x1a)}}};_0x74e5x56= _0x74e5x56[_0x98c2[267]]}}})();OpenFile= function(_0x74e5x59){this[_0x98c2[268]]= null;this[_0x98c2[269]]= null;this[_0x98c2[270]]= _0x74e5x59};OpenFile[_0x98c2[44]][_0x98c2[271]]= function(_0x74e5x6){this[_0x98c2[269]]= _0x74e5x6;this[_0x98c2[272]]()};OpenFile[_0x98c2[44]][_0x98c2[273]]= function(_0x74e5x6,_0x74e5x5a){this[_0x98c2[274]]= _0x74e5x6;this[_0x98c2[21]]= _0x74e5x5a;this[_0x98c2[272]]()};OpenFile[_0x98c2[44]][_0x98c2[275]]= function(_0x74e5x5b){this[_0x98c2[276]]();mxUtils[_0x98c2[277]](_0x74e5x5b)};OpenFile[_0x98c2[44]][_0x98c2[272]]= function(){if(this[_0x98c2[269]]!= null&& this[_0x98c2[274]]!= null){this[_0x98c2[269]](this[_0x98c2[274]],this[_0x98c2[21]]);this[_0x98c2[276]]()}};OpenFile[_0x98c2[44]][_0x98c2[276]]= function(){if(this[_0x98c2[270]]!= null){this[_0x98c2[270]]()}} \ No newline at end of file diff --git a/public/assets/plugins/jscripty/js/EditorUi.js b/public/assets/plugins/jscripty/js/EditorUi.js index 8d5d72b..d9b0797 100644 --- a/public/assets/plugins/jscripty/js/EditorUi.js +++ b/public/assets/plugins/jscripty/js/EditorUi.js @@ -1,1345 +1 @@ -/** - * $Id: EditorUi.js,v 1.21 2013/03/14 20:46:36 david Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Constructs a new graph editor - */ -EditorUi = function(editor, container) { - this.editor = editor || new Editor(); - this.container = container || document.getElementById('geEditor'); - var graph = editor.graph; - var self = this; - - // Disables scrollbars - this.container.style.overflow = 'hidden'; - - // Pre-fetches submenu image - new Image().src = mxPopupMenu.prototype.submenuImage; - - // Pre-fetches connect image - if (mxConnectionHandler.prototype.connectImage != null) { - new Image().src = mxConnectionHandler.prototype.connectImage.src; - } - - // Creates the user interface - this.actions = new Actions(this); - this.menus = new Menus(this); - this.createDivs(); - this.refresh(); - this.createUi(); - - // Disables HTML and text selection - var textEditing = mxUtils.bind(this, function(evt) { - if (evt == null) { - evt = window.event; - } - - if (this.isSelectionAllowed(evt)) { - return true; - } - - return graph.isEditing(); - }); - - // Disables text selection while not editing and no dialog visible - if (this.container == document.body) { - this.menubarContainer.onselectstart = textEditing; - this.menubarContainer.onmousedown = textEditing; - this.toolbarContainer.onselectstart = textEditing; - this.toolbarContainer.onmousedown = textEditing; - this.diagramContainer.onselectstart = textEditing; - this.diagramContainer.onmousedown = textEditing; - this.sidebarContainer.onselectstart = textEditing; - this.sidebarContainer.onmousedown = textEditing; - this.footerContainer.onselectstart = textEditing; - this.footerContainer.onmousedown = textEditing; - } - - // And uses built-in context menu while editing - if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' || - document.documentMode < 9)) { - mxEvent.addListener(this.diagramContainer, 'contextmenu', textEditing); - mxEvent.addListener(this.sidebarContainer, 'contextmenu', textEditing); - } else { - // Allows browser context menu outside of diagram and sidebar - this.diagramContainer.oncontextmenu = textEditing; - this.sidebarContainer.oncontextmenu = textEditing; - } - - // Contains the main graph instance inside the given panel - graph.init(this.diagramContainer); - graph.refresh(); - - // Enables scrollbars and sets cursor style for the container - graph.container.setAttribute('tabindex', '0'); - // graph.container.style.overflow = (touchStyle) ? 'hidden' : 'auto'; - graph.container.style.cursor = 'default'; - graph.container.style.backgroundImage = 'url(' + editor.gridImage + ')'; - graph.container.style.backgroundPosition = '-1px -1px'; - graph.container.focus(); - - // Keeps graph container focused on mouse down - var graphFireMouseEvent = graph.fireMouseEvent; - graph.fireMouseEvent = function(evtName, me, sender) { - if (evtName == mxEvent.MOUSE_DOWN) { - this.container.focus(); - } - - graphFireMouseEvent.apply(this, arguments); - }; - - // Giuseppe Careri - // Defines invalid connections along with the error messages that they produce. - - this.createMultiplicities(graph.multiplicities, ['start', 'end', 'input', - 'question', 'email' - ], [ - [1, 1], - [0, 0], - [1, 1], - [1, 'n'], - [1, 'n'] - ], [ - [0, 0], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'] - - ]); - - - // Giuseppe Careri - // Processes a doubleclick on an optional cell and fires a event. - // The event is fired initially. - // If the graph is enabled and the event has not been consumed, then is called with the given cell. - // The event is ignored if no cell was specified. - graph.dblClick = function(evt, cell) { - var edges = ['question']; - var mxe = new mxEventObject(mxEvent.DOUBLE_CLICK, 'event', evt, 'cell', - cell); - this.fireEvent(mxe); - - if (this.isEnabled() && !mxEvent.isConsumed(evt) && !mxe.isConsumed()) { - // Override dblClick Vertices and Edges - if (this.getModel().isEdge(cell)) { - if (edges.indexOf(cell.source.value.tagName) >= 0) - this.startEditingAtCell(cell); - } else if (this.getModel().isVertex(cell)) { - console.log(self); - console.log(cell); - self.showDialog(new GeneralDialog(self, cell).container, 320, 280, true, - true); - } - mxe.consume(); - } - } - - // Configures automatic expand on mouseover - graph.panningHandler.autoExpand = true; - - // Installs context menu - graph.panningHandler.factoryMethod = mxUtils.bind(this, function(menu, cell, - evt) { - this.menus.createPopupMenu(menu, cell, evt); - }); - - // Initializes the outline - editor.outline.init(this.outlineContainer); - - // Hides context menu - mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) { - graph.panningHandler.hideMenu(); - })); - - // Adds gesture handling (pinch to zoom) - if (mxClient.IS_TOUCH) { - mxEvent.addListener(graph.container, 'gesturechange', - mxUtils.bind(this, function(evt) { - graph.view.getDrawPane().setAttribute('transform', 'scale(' + evt.scale + - ')'); - graph.view.getOverlayPane().style.visibility = 'hidden'; - }) - ); - - mxEvent.addListener(graph.container, 'gestureend', - mxUtils.bind(this, function(evt) { - graph.view.getDrawPane().removeAttribute('transform'); - graph.zoomToCenter = true; - graph.zoom(evt.scale); - graph.view.getOverlayPane().style.visibility = 'visible'; - }) - ); - } - - // Create handler for key events - var keyHandler = this.createKeyHandler(editor); - - // Getter for key handler - this.getKeyHandler = function() { - return keyHandler; - }; - - // Updates the editor UI after the window has been resized - mxEvent.addListener(window, 'resize', mxUtils.bind(this, function() { - this.refresh(); - graph.sizeDidChange(); - this.editor.outline.update(false); - this.editor.outline.outline.sizeDidChange(); - })); - - // Updates action and menu states - this.init(); - this.open(); -}; - -/** - * Specifies the size of the split bar. - */ -EditorUi.prototype.splitSize = (mxClient.IS_TOUCH) ? 16 : 8; - -/** - * Specifies the height of the menubar. Default is 34. - */ -EditorUi.prototype.menubarHeight = 33; - -/** - * Specifies the height of the toolbar. Default is 36. - */ -EditorUi.prototype.toolbarHeight = 36; - -/** - * Specifies the height of the footer. Default is 28. - */ -EditorUi.prototype.footerHeight = 28; - -/** - * Specifies the position of the horizontal split bar. Default is 212. - */ -EditorUi.prototype.hsplitPosition = 204; - -/** - * Specifies the position of the vertical split bar. Default is 190. - */ -EditorUi.prototype.vsplitPosition = 190; - -/** - * Installs the listeners to update the action states. - */ -EditorUi.prototype.init = function() { - // Updates action states - this.addUndoListener(); - this.addSelectionListener(); - - // Overrides clipboard to update paste action state - var paste = this.actions.get('paste'); - - var updatePaste = function() { - paste.setEnabled(!mxClipboard.isEmpty()); - }; - - var mxClipboardCut = mxClipboard.cut; - mxClipboard.cut = function() { - mxClipboardCut.apply(this, arguments); - updatePaste(); - }; - - var mxClipboardCopy = mxClipboard.copy; - mxClipboard.copy = function() { - mxClipboardCopy.apply(this, arguments); - updatePaste(); - }; -}; - -/** - * Hook for allowing selection and context menu for certain events. - */ -EditorUi.prototype.isSelectionAllowed = function(evt) { - return false; -}; - -/** - * Opens the current diagram via the window.opener if one exists. - */ -EditorUi.prototype.open = function() { - // Cross-domain window access is not allowed in FF, so if we - // were opened from another domain then this will fail. - try { - if (window.opener != null && window.opener.openFile != null) { - window.opener.openFile.setConsumer(mxUtils.bind(this, function(xml, - filename) { - try { - var doc = mxUtils.parseXml(xml); - this.editor.setGraphXml(doc.documentElement); - this.editor.modified = false; - this.editor.undoManager.clear(); - - if (filename != null) { - this.editor.filename = filename; - } - } catch (e) { - mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message); - } - })); - } - } catch (e) { - // ignore - } -}; - -/** - * Giuseppe Careri - * Opens the current diagram via string. - */ -EditorUi.prototype.openString = function(xml, filename, data) { - try { - var doc = mxUtils.parseXml(xml); - this.editor.setGraphXml(doc.documentElement); - this.editor.modified = false; - this.editor.undoManager.clear(); - - if (filename != null) { - this.editor.filename = filename; - } - - if (data != null) { - this.editor.data = data; - } - } catch (e) { - mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message); - } -}; - -/** - * Saves As the current graph under the given project name. - */ -EditorUi.prototype.new = function(name) { - var editor = this.editor; - - if (name != null) { - var xml = mxUtils.getPrettyXml(this.editor.getGraphXml()); - try { - if (useLocalStorage) { - if (localStorage.getItem(name) != null && - !mxUtils.confirm(mxResources.get('replace', [name]))) { - return; - } - - localStorage.setItem(name, xml); - this.editor.setStatus(mxResources.get('saved') + ' ' + new Date()); - } else { - console.log(xml.length); - console.log(MAX_REQUEST_SIZE); - if (xml.length < MAX_REQUEST_SIZE) { - xml = encodeURIComponent(xml); - name = encodeURIComponent(name); - - var xhr = new XMLHttpRequest(); - xhr.open("POST", SAVE_URL, true); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token); - xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 201) { - editor.setStatus('Project ' + JSON.parse(xhr.response).name + - ' is opening in new window!'); - setTimeout(function() { - window.open('jscripty/projects/view/' + JSON.parse(xhr.response).id, - '_blank'); - }, 1500); - } else { - try { - var response = JSON.parse(xhr.response); - editor.setStatus('Error creating project: ' + response.errors[0].message); - } catch (e) { - editor.setStatus('Error creating project' + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } - } - } - }; - xhr.onerror = function(e) { - mxUtils.alert(xhr.statusText); - }; - xhr.send('description=project_new&name=' + name); - } else { - mxUtils.alert(mxResources.get('drawingTooLarge')); - mxUtils.popup(xml); - - return; - } - } - - this.editor.filename = name; - this.editor.modified = false; - } catch (e) { - this.editor.setStatus('Error creating project'); - } - } else { - this.editor.setStatus('Error creating project'); - } -}; - - -/** - * Saves the current graph under the given project name. - */ -EditorUi.prototype.save = function(name) { - var editor = this.editor; - - if (name != null) { - var xml = mxUtils.getPrettyXml(this.editor.getGraphXml()); - try { - if (useLocalStorage) { - if (localStorage.getItem(name) != null && - !mxUtils.confirm(mxResources.get('replace', [name]))) { - return; - } - - localStorage.setItem(name, xml); - this.editor.setStatus(mxResources.get('saved') + ' ' + new Date()); - } else { - console.log(xml.length); - console.log(MAX_REQUEST_SIZE); - if (xml.length < MAX_REQUEST_SIZE) { - xml = encodeURIComponent(xml); - - var xhr = new XMLHttpRequest(); - xhr.open("PUT", SAVE_URL + this.editor.data.id, true); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token); - xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 200) { - editor.setStatus('Updated at ' + JSON.parse(xhr.response).updatedAt + - ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } else { - try { - var response = JSON.parse(xhr.response); - editor.setStatus('Error saving project: ' + response.errors[0].message); - } catch (e) { - editor.setStatus('Error saving project' + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } - } - } - }; - xhr.onerror = function(e) { - mxUtils.alert(xhr.statusText); - }; - xhr.send('draft=' + xml); - } else { - mxUtils.alert(mxResources.get('drawingTooLarge')); - mxUtils.popup(xml); - - return; - } - } - - this.editor.filename = name; - this.editor.modified = false; - } catch (e) { - this.editor.setStatus('Error saving file'); - } - } else { - this.editor.setStatus('Error saving file'); - } -}; - -/** - * Saves As the current graph under the given project name. - */ -EditorUi.prototype.saveAs = function(name) { - var editor = this.editor; - console.log(name); - if (name != null) { - var xml = mxUtils.getPrettyXml(this.editor.getGraphXml()); - try { - if (useLocalStorage) { - if (localStorage.getItem(name) != null && - !mxUtils.confirm(mxResources.get('replace', [name]))) { - return; - } - - localStorage.setItem(name, xml); - this.editor.setStatus(mxResources.get('saved') + ' ' + new Date()); - } else { - console.log(xml.length); - console.log(MAX_REQUEST_SIZE); - if (xml.length < MAX_REQUEST_SIZE) { - xml = encodeURIComponent(xml); - name = encodeURIComponent(name); - - var xhr = new XMLHttpRequest(); - xhr.open("POST", SAVE_URL, true); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token); - xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 201) { - editor.setStatus('Project ' + JSON.parse(xhr.response).name + - ' is opening in new window!'); - setTimeout(function() { - window.open('jscripty/project/' + JSON.parse(xhr.response).id, - '_blank'); - }, 1500); - } else { - try { - var response = JSON.parse(xhr.response); - editor.setStatus('Error cloning project: ' + response.errors[0].message); - } catch (e) { - editor.setStatus('Error cloning project' + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } - } - } - }; - xhr.onerror = function(e) { - mxUtils.alert(xhr.statusText); - }; - xhr.send('description=project_cloned&name=' + name + - '&draft=' + xml + '&production=' + xml); - } else { - mxUtils.alert(mxResources.get('drawingTooLarge')); - mxUtils.popup(xml); - - return; - } - } - - this.editor.filename = name; - this.editor.modified = false; - } catch (e) { - this.editor.setStatus('Error saving file'); - } - } else { - this.editor.setStatus('Error saving file'); - } -}; - -/** - * Plush the current graph under the given project name. - */ -EditorUi.prototype.validate = function(a, b) { - var graph = this.editor.graph; - a = null != a ? a : graph.model.getRoot(); - b = null != b ? b : {}; - for (var c = !0, d = graph.model.getChildCount(a), e = 0; e < d; e++) { - var f = graph.model.getChildAt(a, e), - g = b; - graph.isValidRoot(f) && (g = {}); - g = this.validate(f, g); - null != g ? graph.setCellWarning(f, g.replace(/\n/g, "\x3cbr\x3e")) : graph.setCellWarning(f, null); - c = c && null == g - } - d = ""; - if (graph.model.isVertex(a)) { - switch (a.value.nodeName) { - case 'question': - d = (a.value.getAttribute('question') !== "") ? "" : - 'Question can not be empty' + "\n"; - d += (a.value.getAttribute('label') !== "") ? "" : 'Label can not be empty' + "\n"; - - break; - case 'input': - d = (a.value.getAttribute('question') !== "") ? "" : 'Question can not be empty' + "\n"; - d += (a.value.getAttribute('label') !== "") ? "" : 'Label can not be empty' + "\n"; - - break; - case 'start': - d = this.validateBlock('start') ? '' : "Only one Start block is allowed" + "\n"; - d += (a.value.getAttribute('label') !== "") ? "" : 'Label can not be empty' + "\n"; - - break; - } - } - - if (graph.model.isEdge(a)) { - var z = graph.model.getCell(a.source.getId()); - switch (z.value.nodeName) { - case 'question': - // var patt = /^[a-zA-Z0-9][a-zA-Z0-9\s]*$/; - var str = String(a.getValue()); - console.log(str); - if (str === 'null' || str === 'undefined') { - d = "Value can not be empty" + "\n"; - } else { - var result = str.split(","); - result.forEach(function(entry, key) { - d = d + ((entry.trim() !== "") ? "" : 'Value' + (key + 1) + ' can not be empty' + "\n"); - }); - } - // console.log(a.getValue()); - // if ((str == 'undefined') || (str == 'null')) { - // str = ' '; - // } - // d = ((a.getValue() !== "") && (a.getValue() !== 'undefined') && (a.getValue() !== null)) ? '' : "Value can not be empty" + "\n"; - // d = d + ((patt.test(str.trim())) ? "" : 'Value can not be empty' + "\n"); - // - // res.forEach(function(entry) { - // d = d + ((patt.test(entry.trim())) ? "" : 'Can not be empty' + "\n"); - // }); - break; - - } - } - - graph.isCellCollapsed(a) && !c && (d += (mxResources.get(graph.containsValidationErrorsResource) || graph.containsValidationErrorsResource) + "\n"); - d = graph.model.isEdge(a) ? d + (graph.getEdgeValidationError(a, graph.model.getTerminal(a, !0), graph.model.getTerminal(a, !1)) || "") : d + (graph.getCellValidationError(a) || ""); - e = graph.validateCell(a, b); - null != e && (d += e); - null == graph.model.getParent(a) && graph.view.validate(); - return 0 < d.length || !c ? d : null -} - -EditorUi.prototype.validateBlock = function(blockName) { - var graph = this.editor.graph; - var parent = graph.getDefaultParent(); - var count = 0; - // var model = graph.getModel(); - //We can also use model.getChildren(parent) - parent.children.forEach(function(n) { - if (graph.model.isVertex(n) && n.value.nodeName == blockName) { - count++; - } - }); - return count > 1 ? false : true; -} - -EditorUi.prototype.publish = function(name) { - - var editor = this.editor; - - if (name != null) { - - var response = this.validate(); - if (response === null) { - var xml = mxUtils.getPrettyXml(this.editor.getGraphXml()); - try { - if (useLocalStorage) { - if (localStorage.getItem(name) != null && - !mxUtils.confirm(mxResources.get('replace', [name]))) { - return; - } - - localStorage.setItem(name, xml); - this.editor.setStatus(mxResources.get('saved') + ' ' + new Date()); - } else { - console.log(xml.length); - console.log(MAX_REQUEST_SIZE); - if (xml.length < MAX_REQUEST_SIZE) { - xml = encodeURIComponent(xml); - - var xhr = new XMLHttpRequest(); - xhr.open("PUT", SAVE_URL + this.editor.data.id, true); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token); - xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 200) { - editor.setStatus('Published at ' + JSON.parse(xhr.response).updatedAt + - ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } else { - try { - var response = JSON.parse(xhr.response); - editor.setStatus('Error publishing project: ' + response.errors[0].message); - } catch (e) { - editor.setStatus('Error publishing project' + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } - } - } - }; - xhr.onerror = function(e) { - mxUtils.alert(xhr.statusText); - }; - xhr.send('draft=' + xml + '&production=' + xml); - } else { - mxUtils.alert(mxResources.get('drawingTooLarge')); - mxUtils.popup(xml); - - return; - } - } - - this.editor.filename = name; - this.editor.modified = false; - } catch (e) { - this.editor.setStatus('Error publishing file'); - } - } else { - editor.setStatus('Error publishing project: '); - } - } else { - this.editor.setStatus('Error publishing file'); - } - // } - - - -}; - -/** - * Create variable - */ -EditorUi.prototype.variable = function(name) { - var editor = this.editor; - - if (name != null) { - try { - - var xhr = new XMLHttpRequest(); - xhr.open("POST", VARIABLE_URL, true); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token); - xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 201) { - editor.setStatus('Variable created at ' + JSON.parse(xhr.response).createdAt + - ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } else { - try { - var response = JSON.parse(xhr.response); - editor.setStatus('Error creating variable: ' + response.errors[0].message); - } catch (e) { - editor.setStatus('Error creating variable' + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } - } - } - }; - xhr.onerror = function(e) { - mxUtils.alert(xhr.statusText); - }; - xhr.send('name=' + name); - } catch (e) { - this.editor.setStatus('Error creating variable'); - } - } else { - this.editor.setStatus('Error creating variable'); - } -}; - -/** - * Returns the URL for a copy of this editor with no state. - */ -EditorUi.prototype.getUrl = function(pathname) { - var href = (pathname != null) ? pathname : window.location.pathname; - var parms = (href.indexOf('?') > 0) ? 1 : 0; - - // Removes template URL parameter for new blank diagram - for (var key in urlParams) { - if (parms == 0) { - href += '?'; - } else { - href += '&'; - } - - href += key + '=' + urlParams[key]; - parms++; - } - - return href; -}; - -/** - * Updates the states of the given undo/redo items. - */ -EditorUi.prototype.addUndoListener = function() { - var undo = this.actions.get('undo'); - var redo = this.actions.get('redo'); - - var undoMgr = this.editor.undoManager; - - var undoListener = function() { - undo.setEnabled(undoMgr.canUndo()); - redo.setEnabled(undoMgr.canRedo()); - }; - - undoMgr.addListener(mxEvent.ADD, undoListener); - undoMgr.addListener(mxEvent.UNDO, undoListener); - undoMgr.addListener(mxEvent.REDO, undoListener); - undoMgr.addListener(mxEvent.CLEAR, undoListener); - - // Updates the button states once - undoListener(); -}; - -/** - * Updates the states of the given toolbar items based on the selection. - */ -EditorUi.prototype.addSelectionListener = function() { - var selectionListener = mxUtils.bind(this, function() { - var graph = this.editor.graph; - var selected = !graph.isSelectionEmpty(); - var vertexSelected = false; - var edgeSelected = false; - - var cells = graph.getSelectionCells(); - - if (cells != null) { - for (var i = 0; i < cells.length; i++) { - var cell = cells[i]; - - if (graph.getModel().isEdge(cell)) { - edgeSelected = true; - } - - if (graph.getModel().isVertex(cell)) { - vertexSelected = true; - } - - if (edgeSelected && vertexSelected) { - break; - } - } - } - - // Updates action states - var actions = ['cut', 'copy', 'delete', 'duplicate', 'bold', 'italic', - 'style', 'underline', 'toFront', 'toBack', 'dashed', 'rounded', - 'shadow', - 'tilt', 'autosize' - ]; - - for (var i = 0; i < actions.length; i++) { - this.actions.get(actions[i]).setEnabled(selected); - } - - this.actions.get('curved').setEnabled(edgeSelected); - this.actions.get('rotation').setEnabled(vertexSelected); - this.actions.get('wordWrap').setEnabled(vertexSelected); - this.actions.get('group').setEnabled(graph.getSelectionCount() > 1); - this.actions.get('ungroup').setEnabled(graph.getSelectionCount() == 1 && - graph.getModel().getChildCount(graph.getSelectionCell()) > 0); - var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1; - this.actions.get('removeFromGroup').setEnabled(oneVertexSelected && - graph.getModel().isVertex(graph.getModel().getParent(graph.getSelectionCell())) - ); - - // Updates menu states - var menus = ['fontFamily', 'fontSize', 'alignment', 'position', 'text', - 'format', - 'arrange', 'linewidth', 'spacing' - ]; - - for (var i = 0; i < menus.length; i++) { - this.menus.get(menus[i]).setEnabled(selected); - } - - menus = ['line', 'lineend', 'linestart']; - - for (var i = 0; i < menus.length; i++) { - this.menus.get(menus[i]).setEnabled(edgeSelected); - } - - this.actions.get('setAsDefaultEdge').setEnabled(edgeSelected); - - this.menus.get('align').setEnabled(graph.getSelectionCount() > 1); - this.menus.get('direction').setEnabled(vertexSelected || (edgeSelected && - graph.isLoop(graph.view.getState(graph.getSelectionCell())))); - this.menus.get('navigation').setEnabled(graph.foldingEnabled && ((graph.view - .currentRoot != null) || - (graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell())) - )); - this.actions.get('home').setEnabled(graph.view.currentRoot != null); - this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null); - var groupEnabled = graph.getSelectionCount() == 1 && graph.isValidRoot( - graph.getSelectionCell()); - this.actions.get('enterGroup').setEnabled(groupEnabled); - this.actions.get('expand').setEnabled(groupEnabled); - this.actions.get('collapse').setEnabled(groupEnabled); - this.actions.get('editLink').setEnabled(graph.getSelectionCount() == 1); - this.actions.get('openLink').setEnabled(graph.getSelectionCount() == 1 && - graph.getLinkForCell(graph.getSelectionCell()) != null); - }); - - this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE, - selectionListener); - selectionListener(); -}; - -/** - * Refreshes the viewport. - */ -EditorUi.prototype.refresh = function() { - var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode == - 5); - var w = this.container.clientWidth; - var h = this.container.clientHeight; - - if (this.container == document.body) { - w = document.body.clientWidth || document.documentElement.clientWidth; - h = (quirks) ? document.body.clientHeight || document.documentElement.clientHeight : - document.documentElement.clientHeight; - } - - var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize - - 20)); - var effVsplitPosition = Math.max(0, Math.min(this.vsplitPosition, h - this.menubarHeight - - this.toolbarHeight - this.footerHeight - this.splitSize - 1)); - - this.menubarContainer.style.height = this.menubarHeight + 'px'; - this.toolbarContainer.style.top = this.menubarHeight + 'px'; - this.toolbarContainer.style.height = this.toolbarHeight + 'px'; - - var tmp = this.menubarHeight + this.toolbarHeight; - - if (!mxClient.IS_QUIRKS) { - tmp += 1; - } - - this.sidebarContainer.style.top = tmp + 'px'; - this.sidebarContainer.style.width = effHsplitPosition + 'px'; - this.outlineContainer.style.width = effHsplitPosition + 'px'; - this.outlineContainer.style.height = effVsplitPosition + 'px'; - this.outlineContainer.style.bottom = this.footerHeight + 'px'; - this.diagramContainer.style.left = (effHsplitPosition + this.splitSize) + - 'px'; - this.diagramContainer.style.top = this.sidebarContainer.style.top; - this.footerContainer.style.height = this.footerHeight + 'px'; - this.footerContainer.style.display = 'none'; - this.hsplit.style.top = this.sidebarContainer.style.top; - this.hsplit.style.bottom = this.outlineContainer.style.bottom; - this.hsplit.style.left = effHsplitPosition + 'px'; - this.vsplit.style.width = this.sidebarContainer.style.width; - this.vsplit.style.bottom = (effVsplitPosition + this.footerHeight) + 'px'; - - if (quirks) { - this.menubarContainer.style.width = w + 'px'; - this.toolbarContainer.style.width = this.menubarContainer.style.width; - var sidebarHeight = (h - effVsplitPosition - this.splitSize - this.footerHeight - - this.menubarHeight - this.toolbarHeight); - this.sidebarContainer.style.height = sidebarHeight + 'px'; - this.diagramContainer.style.width = (w - effHsplitPosition - this.splitSize) + - 'px'; - var diagramHeight = (h - this.footerHeight - this.menubarHeight - this.toolbarHeight); - this.diagramContainer.style.height = diagramHeight + 'px'; - this.footerContainer.style.width = this.menubarContainer.style.width; - this.hsplit.style.height = diagramHeight + 'px'; - } else { - this.sidebarContainer.style.bottom = (effVsplitPosition + this.splitSize + - this.footerHeight) + 'px'; - this.diagramContainer.style.bottom = this.outlineContainer.style.bottom; - } -}; - -/** - * Creates the required containers. - */ -EditorUi.prototype.createDivs = function() { - this.menubarContainer = this.createDiv('geMenubarContainer'); - this.toolbarContainer = this.createDiv('geToolbarContainer'); - this.sidebarContainer = this.createDiv('geSidebarContainer'); - this.outlineContainer = this.createDiv('geOutlineContainer'); - this.diagramContainer = this.createDiv('geDiagramContainer'); - this.footerContainer = this.createDiv('geFooterContainer'); - this.hsplit = this.createDiv('geHsplit'); - this.vsplit = this.createDiv('geVsplit'); - - // Sets static style for containers - this.menubarContainer.style.top = '0px'; - this.menubarContainer.style.left = '0px'; - this.menubarContainer.style.right = '0px'; - this.toolbarContainer.style.left = '0px'; - this.toolbarContainer.style.right = '0px'; - this.sidebarContainer.style.left = '0px'; - this.outlineContainer.style.left = '0px'; - this.diagramContainer.style.right = '0px'; - this.footerContainer.style.left = '0px'; - this.footerContainer.style.right = '0px'; - this.footerContainer.style.bottom = '0px'; - this.vsplit.style.left = '0px'; - this.vsplit.style.height = this.splitSize + 'px'; - this.hsplit.style.width = this.splitSize + 'px'; -}; - -/** - * Creates the required containers. - */ -EditorUi.prototype.createUi = function() { - // Creates menubar - this.menubar = this.menus.createMenubar(this.createDiv('geMenubar')); - this.menubarContainer.appendChild(this.menubar.container); - - // Creates toolbar - this.toolbar = this.createToolbar(this.createDiv('geToolbar')); - this.toolbarContainer.appendChild(this.toolbar.container); - - // Creates the sidebar - this.sidebar = this.createSidebar(this.sidebarContainer); - - // Creates the footer - this.footerContainer.appendChild(this.createFooter()); - - // Adds status bar in menubar - this.statusContainer = this.createStatusContainer(); - - // Connects the status bar to the editor status - this.editor.addListener('statusChanged', mxUtils.bind(this, function() { - this.setStatusText(this.editor.getStatus()); - })); - - this.setStatusText(this.editor.getStatus()); - this.menubar.container.appendChild(this.statusContainer); - - // Inserts into DOM - this.container.appendChild(this.menubarContainer); - this.container.appendChild(this.toolbarContainer); - this.container.appendChild(this.sidebarContainer); - this.container.appendChild(this.outlineContainer); - this.container.appendChild(this.diagramContainer); - this.container.appendChild(this.footerContainer); - this.container.appendChild(this.hsplit); - this.container.appendChild(this.vsplit); - - // HSplit - this.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function( - value) { - this.hsplitPosition = value; - this.refresh(); - this.editor.graph.sizeDidChange(); - this.editor.outline.update(false); - this.editor.outline.outline.sizeDidChange(); - })); - - // VSplit - this.addSplitHandler(this.vsplit, false, this.footerHeight, mxUtils.bind( - this, - function(value) { - this.vsplitPosition = value; - this.refresh(); - this.editor.outline.update(false); - this.editor.outline.outline.sizeDidChange(); - })); -}; - -/** - * Creates a new toolbar for the given container. - */ -EditorUi.prototype.createStatusContainer = function() { - var container = document.createElement('a'); - container.className = 'geItem geStatus'; - - return container; -}; - -/** - * Creates a new toolbar for the given container. - */ -EditorUi.prototype.createStatusContainer = function() { - var container = document.createElement('a'); - container.className = 'geItem geStatus'; - - return container; -}; - -/** - * Creates a new toolbar for the given container. - */ -EditorUi.prototype.setStatusText = function(value) { - this.statusContainer.innerHTML = value; -}; - -/** - * Creates a new toolbar for the given container. - */ -EditorUi.prototype.createToolbar = function(container) { - return new Toolbar(this, container); -}; - -/** - * Creates a new sidebar for the given container. - */ -EditorUi.prototype.createSidebar = function(container) { - return new Sidebar(this, container); -}; - -/** - * Creates and returns a new footer. - */ -EditorUi.prototype.createFooter = function() { - return this.createDiv('geFooter'); -}; - -/** - * Creates the actual toolbar for the toolbar container. - */ -EditorUi.prototype.createDiv = function(classname) { - var elt = document.createElement('div'); - elt.className = classname; - - return elt; -}; - -/** - * Creates the custom header. - */ -EditorUi.prototype.createHeader = function(classname) { - var elt = document.createElement(classname); - return elt; -}; - -/** - * Creates the custom header. - */ -EditorUi.prototype.createForm = function(classname) { - var elt = document.createElement('form'); - elt.className = classname; - - return elt; -}; - -/** - * Updates the states of the given undo/redo items. - */ -EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange) { - var start = null; - var initial = null; - - function getValue() { - return parseInt(((horizontal) ? elt.style.left : elt.style.bottom)); - }; - - function moveHandler(evt) { - if (start != null) { - var pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y - - pt.y)) - dx)); - mxEvent.consume(evt); - } - }; - - function dropHandler(evt) { - moveHandler(evt); - start = null; - initial = null; - }; - - mxEvent.addGestureListeners(elt, function(evt) { - start = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - initial = getValue(); - mxEvent.consume(evt); - }); - - mxEvent.addListener(document, 'mousemove', moveHandler); - mxEvent.addListener(document, 'touchmove', moveHandler); - mxEvent.addListener(document, 'mouseup', dropHandler); - mxEvent.addListener(document, 'touchend', dropHandler); -}; - -/** - * Displays a print dialog. - */ -EditorUi.prototype.showDialog = function(elt, w, h, modal, closable, onClose) { - this.hideDialog(); - this.dialog = new Dialog(this, elt, w, (mxClient.IS_VML) ? h - 12 : h, - modal, - closable, onClose); -}; - -/** - * Displays a print dialog. - */ -EditorUi.prototype.hideDialog = function() { - if (this.dialog != null) { - this.dialog.close(); - this.dialog = null; - this.editor.graph.container.focus(); - } -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -EditorUi.prototype.saveFile = function(forceDialog) { - if (!forceDialog && this.editor.filename != null) { - this.save(this.editor.getOrCreateFilename()); - } else { - this.showDialog(new SaveDialog(this).container, 300, 100, true, true); - } -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -EditorUi.prototype.publishFile = function(forceDialog) { - if (!forceDialog && this.editor.filename != null) { - this.publish(this.editor.getOrCreateFilename()); - } else { - //this.showDialog(new SaveDialog(this).container, 300, 100, true, true); - } -}; - -/** - * Executes the given layout. - */ -EditorUi.prototype.executeLayout = function(layout, animate, ignoreChildCount) { - var graph = this.editor.graph; - var cell = graph.getSelectionCell(); - - // Allow global overridding of animation - animate = this.animate != null ? this.animate : animate; - - graph.getModel().beginUpdate(); - try { - layout.execute(graph.getDefaultParent(), cell); - } catch (e) { - throw e; - } finally { - // Animates the changes in the graph model except - // for Camino, where animation is too slow - if (animate && navigator.userAgent.indexOf('Camino') < 0) { - // New API for animating graph layout results asynchronously - var morph = new mxMorphing(graph); - morph.addListener(mxEvent.DONE, mxUtils.bind(this, function() { - graph.getModel().endUpdate(); - })); - - morph.startAnimation(); - } else { - graph.getModel().endUpdate(); - } - } -}; - -/** - * Creates the keyboard event handler for the current graph and history. - */ -EditorUi.prototype.createKeyHandler = function(editor) { - var graph = this.editor.graph; - var keyHandler = new mxKeyHandler(graph); - - // Routes command-key to control-key on Mac - keyHandler.isControlDown = function(evt) { - return mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey); - }; - - // Helper function to move cells with the cursor keys - function nudge(keyCode) { - if (!graph.isSelectionEmpty()) { - var dx = 0; - var dy = 0; - - if (keyCode == 37) { - dx = -1; - } else if (keyCode == 38) { - dy = -1; - } else if (keyCode == 39) { - dx = 1; - } else if (keyCode == 40) { - dy = 1; - } - - graph.moveCells(graph.getSelectionCells(), dx, dy); - graph.scrollCellToVisible(graph.getSelectionCell()); - } - }; - - // Binds keystrokes to actions - var bindAction = mxUtils.bind(this, function(code, control, key, shift) { - var action = this.actions.get(key); - - if (action != null) { - var f = function() { - if (action.enabled) { - action.funct(); - } - }; - - if (control) { - if (shift) { - keyHandler.bindControlShiftKey(code, f); - } else { - keyHandler.bindControlKey(code, f); - } - } else { - if (shift) { - keyHandler.bindShiftKey(code, f); - } else { - keyHandler.bindKey(code, f); - } - } - } - }); - - var ui = this; - var keyHandleEscape = keyHandler.escape; - keyHandler.escape = function(evt) { - ui.hideDialog(); - keyHandleEscape.apply(this, arguments); - }; - - // Ignores enter keystroke. Remove this line if you want the - // enter keystroke to stop editing. - keyHandler.enter = function() {}; - keyHandler.bindKey(8, function() { - graph.foldCells(true); - }); // Backspace - keyHandler.bindKey(13, function() { - graph.foldCells(false); - }); // Enter - keyHandler.bindKey(33, function() { - graph.exitGroup(); - }); // Page Up - keyHandler.bindKey(34, function() { - graph.enterGroup(); - }); // Page Down - keyHandler.bindKey(36, function() { - graph.home(); - }); // Home - keyHandler.bindKey(35, function() { - graph.refresh(); - }); // End - keyHandler.bindKey(37, function() { - nudge(37); - }); // Left arrow - keyHandler.bindKey(38, function() { - nudge(38); - }); // Up arrow - keyHandler.bindKey(39, function() { - nudge(39); - }); // Right arrow - keyHandler.bindKey(40, function() { - nudge(40); - }); // Down arrow - keyHandler.bindKey(113, function() { - graph.startEditingAtCell(); - }); - bindAction(46, false, 'delete'); // Delete - bindAction(82, true, 'tilt'); // Ctrl+R - bindAction(83, true, 'save'); // Ctrl+S - bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S - bindAction(107, false, 'zoomIn'); // Add - bindAction(109, false, 'zoomOut'); // Subtract - bindAction(65, true, 'selectAll'); // Ctrl+A - bindAction(86, true, 'selectVertices', true); // Ctrl+Shift+V - bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E - bindAction(69, true, 'export'); // Ctrl+Shift+E - bindAction(66, true, 'toBack'); // Ctrl+B - bindAction(70, true, 'toFront'); // Ctrl+F - bindAction(68, true, 'duplicate'); // Ctrl+D - bindAction(90, true, 'undo'); // Ctrl+Z - bindAction(89, true, 'redo'); // Ctrl+Y - bindAction(88, true, 'cut'); // Ctrl+X - bindAction(67, true, 'copy'); // Ctrl+C - bindAction(81, true, 'connect'); // Ctrl+Q - bindAction(86, true, 'paste'); // Ctrl+V - bindAction(71, true, 'group'); // Ctrl+G - bindAction(71, true, 'grid', true); // Ctrl+Shift+G - bindAction(85, true, 'ungroup'); // Ctrl+U - bindAction(112, false, 'about'); // F1 - bindAction(80, true, 'publish', true); // Ctrl+Shift+P - - return keyHandler; -}; - -/** - * Giuseppe Careri - * Creates a new toolbar for the given container. - */ -EditorUi.prototype.createMultiplicities = function(graph, cells, source, - target) { - for (var i = 0; i < cells.length; i++) { - graph.push(new mxMultiplicity(true, cells[i], null, null, source[i][0], - source[i][1], null, mxResources.get(cells[i]) + ' must have ' + source[i][0] + ' outgoing edge.', null)); - graph.push(new mxMultiplicity(false, cells[i], null, null, target[i][0], - target[i][1], null, mxResources.get(cells[i]) + ' must have ' + target[i][0] + ' incoming edge.', null)); - }; -}; +var _0xdb8c=["\x65\x64\x69\x74\x6F\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x45\x64\x69\x74\x6F\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x67\x72\x61\x70\x68","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x73\x72\x63","\x73\x75\x62\x6D\x65\x6E\x75\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x65\x6E\x75\x73","\x63\x72\x65\x61\x74\x65\x44\x69\x76\x73","\x72\x65\x66\x72\x65\x73\x68","\x63\x72\x65\x61\x74\x65\x55\x69","\x65\x76\x65\x6E\x74","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x41\x6C\x6C\x6F\x77\x65\x64","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x62\x69\x6E\x64","\x62\x6F\x64\x79","\x6F\x6E\x73\x65\x6C\x65\x63\x74\x73\x74\x61\x72\x74","\x6D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x6E\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x74\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x64\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x66\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6F\x6E\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x69\x6E\x69\x74","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x75\x72\x73\x6F\x72","\x64\x65\x66\x61\x75\x6C\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x66\x6F\x63\x75\x73","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x61\x70\x70\x6C\x79","\x6D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x73\x74\x61\x72\x74","\x65\x6E\x64","\x69\x6E\x70\x75\x74","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x65\x6D\x61\x69\x6C","\x6E","\x63\x72\x65\x61\x74\x65\x4D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x65\x6C\x6C","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x74\x61\x67\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x73\x6F\x75\x72\x63\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67\x41\x74\x43\x65\x6C\x6C","\x69\x73\x56\x65\x72\x74\x65\x78","\x6C\x6F\x67","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x63\x6F\x6E\x73\x75\x6D\x65","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x6F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x67\x65\x73\x74\x75\x72\x65\x63\x68\x61\x6E\x67\x65","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x73\x63\x61\x6C\x65\x28","\x73\x63\x61\x6C\x65","\x67\x65\x74\x44\x72\x61\x77\x50\x61\x6E\x65","\x76\x69\x65\x77","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x73\x74\x75\x72\x65\x65\x6E\x64","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x7A\x6F\x6F\x6D\x54\x6F\x43\x65\x6E\x74\x65\x72","\x7A\x6F\x6F\x6D","\x76\x69\x73\x69\x62\x6C\x65","\x63\x72\x65\x61\x74\x65\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x73\x69\x7A\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x75\x70\x64\x61\x74\x65","\x6F\x70\x65\x6E","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6D\x65\x6E\x75\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x74\x6F\x6F\x6C\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x66\x6F\x6F\x74\x65\x72\x48\x65\x69\x67\x68\x74","\x68\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x55\x6E\x64\x6F\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x73\x74\x65","\x67\x65\x74","\x69\x73\x45\x6D\x70\x74\x79","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x74","\x63\x6F\x70\x79","\x6F\x70\x65\x6E\x65\x72","\x6F\x70\x65\x6E\x46\x69\x6C\x65","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x63\x6C\x65\x61\x72","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x69\x6E\x76\x61\x6C\x69\x64\x4F\x72\x4D\x69\x73\x73\x69\x6E\x67\x46\x69\x6C\x65","\x3A\x20","\x6D\x65\x73\x73\x61\x67\x65","\x61\x6C\x65\x72\x74","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x6F\x70\x65\x6E\x53\x74\x72\x69\x6E\x67","\x64\x61\x74\x61","\x6E\x65\x77","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x67\x65\x74\x49\x74\x65\x6D","\x72\x65\x70\x6C\x61\x63\x65","\x63\x6F\x6E\x66\x69\x72\x6D","\x73\x65\x74\x49\x74\x65\x6D","\x73\x61\x76\x65\x64","\x20","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x50\x4F\x53\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x50\x72\x6F\x6A\x65\x63\x74\x20","\x6E\x61\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x20\x69\x73\x20\x6F\x70\x65\x6E\x69\x6E\x67\x20\x69\x6E\x20\x6E\x65\x77\x20\x77\x69\x6E\x64\x6F\x77\x21","\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x76\x69\x65\x77\x2F","\x69\x64","\x5F\x62\x6C\x61\x6E\x6B","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x65\x72\x72\x6F\x72\x73","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x20\x28","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x6F\x6E\x65\x72\x72\x6F\x72","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x65\x77\x26\x6E\x61\x6D\x65\x3D","\x73\x65\x6E\x64","\x64\x72\x61\x77\x69\x6E\x67\x54\x6F\x6F\x4C\x61\x72\x67\x65","\x70\x6F\x70\x75\x70","\x73\x61\x76\x65","\x50\x55\x54","\x55\x70\x64\x61\x74\x65\x64\x20\x61\x74\x20","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x64\x72\x61\x66\x74\x3D","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x66\x69\x6C\x65","\x73\x61\x76\x65\x41\x73","\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x2F","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x6E\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x6E\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x63\x6C\x6F\x6E\x65\x64\x26\x6E\x61\x6D\x65\x3D","\x26\x64\x72\x61\x66\x74\x3D","\x26\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x76\x61\x6C\x69\x64\x61\x74\x65","\x67\x65\x74\x52\x6F\x6F\x74","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x41\x74","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x3C\x62\x72\x3E","\x73\x65\x74\x43\x65\x6C\x6C\x57\x61\x72\x6E\x69\x6E\x67","","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x51\x75\x65\x73\x74\x69\x6F\x6E\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x0A","\x6C\x61\x62\x65\x6C","\x4C\x61\x62\x65\x6C\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x6C\x6F\x63\x6B","\x4F\x6E\x6C\x79\x20\x6F\x6E\x65\x20\x53\x74\x61\x72\x74\x20\x62\x6C\x6F\x63\x6B\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x67\x65\x74\x49\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x67\x65\x74\x56\x61\x6C\x75\x65","\x6E\x75\x6C\x6C","\x56\x61\x6C\x75\x65\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x2C","\x73\x70\x6C\x69\x74","\x74\x72\x69\x6D","\x56\x61\x6C\x75\x65","\x20\x63\x61\x6E\x20\x6E\x6F\x74\x20\x62\x65\x20\x65\x6D\x70\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x67\x65\x74\x45\x64\x67\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x67\x65\x74\x43\x65\x6C\x6C\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x70\x75\x62\x6C\x69\x73\x68","\x50\x75\x62\x6C\x69\x73\x68\x65\x64\x20\x61\x74\x20","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x66\x69\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x61\x74\x20","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x3A\x20","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65\x3D","\x67\x65\x74\x55\x72\x6C","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x26","\x3D","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x61\x6E\x55\x6E\x64\x6F","\x63\x61\x6E\x52\x65\x64\x6F","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x73\x68\x61\x64\x6F\x77","\x74\x69\x6C\x74","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x63\x75\x72\x76\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x72\x6F\x75\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x74\x65\x78\x74","\x66\x6F\x72\x6D\x61\x74","\x61\x72\x72\x61\x6E\x67\x65","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x73\x70\x61\x63\x69\x6E\x67","\x6C\x69\x6E\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x6C\x69\x67\x6E","\x67\x65\x74\x53\x74\x61\x74\x65","\x69\x73\x4C\x6F\x6F\x70","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x6D\x61\x78","\x68\x65\x69\x67\x68\x74","\x70\x78","\x74\x6F\x70","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x77\x69\x64\x74\x68","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x64\x69\x73\x70\x6C\x61\x79","\x6E\x6F\x6E\x65","\x68\x73\x70\x6C\x69\x74","\x76\x73\x70\x6C\x69\x74","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x4F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x44\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x46\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x48\x73\x70\x6C\x69\x74","\x67\x65\x56\x73\x70\x6C\x69\x74","\x30\x70\x78","\x72\x69\x67\x68\x74","\x6D\x65\x6E\x75\x62\x61\x72","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x74\x6F\x6F\x6C\x62\x61\x72","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x73\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x53\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x6F\x74\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x74\x53\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x64\x64\x53\x70\x6C\x69\x74\x48\x61\x6E\x64\x6C\x65\x72","\x61","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D\x20\x67\x65\x53\x74\x61\x74\x75\x73","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x67\x65\x46\x6F\x6F\x74\x65\x72","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x72\x6D","\x66\x6F\x72\x6D","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x78","\x79","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x74\x6F\x75\x63\x68\x6D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x75\x70","\x74\x6F\x75\x63\x68\x65\x6E\x64","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x64\x69\x61\x6C\x6F\x67","\x49\x53\x5F\x56\x4D\x4C","\x63\x6C\x6F\x73\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x61\x6E\x69\x6D\x61\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x65\x78\x65\x63\x75\x74\x65","\x43\x61\x6D\x69\x6E\x6F","\x75\x73\x65\x72\x41\x67\x65\x6E\x74","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x49\x53\x5F\x4D\x41\x43","\x6D\x65\x74\x61\x4B\x65\x79","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x65\x6E\x61\x62\x6C\x65\x64","\x66\x75\x6E\x63\x74","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79","\x62\x69\x6E\x64\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x4B\x65\x79","\x65\x73\x63\x61\x70\x65","\x65\x6E\x74\x65\x72","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x65\x78\x70\x6F\x72\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x67\x72\x69\x64","\x61\x62\x6F\x75\x74","\x20\x6D\x75\x73\x74\x20\x68\x61\x76\x65\x20","\x20\x6F\x75\x74\x67\x6F\x69\x6E\x67\x20\x65\x64\x67\x65\x2E","\x70\x75\x73\x68","\x20\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x20\x65\x64\x67\x65\x2E"];EditorUi= function(_0xe9cax1,_0xe9cax2){this[_0xdb8c[0]]= _0xe9cax1|| new Editor();this[_0xdb8c[1]]= _0xe9cax2|| document[_0xdb8c[3]](_0xdb8c[2]);var _0xe9cax3=_0xe9cax1[_0xdb8c[4]];var _0xe9cax4=this;this[_0xdb8c[1]][_0xdb8c[6]][_0xdb8c[5]]= _0xdb8c[7]; new Image()[_0xdb8c[8]]= mxPopupMenu[_0xdb8c[10]][_0xdb8c[9]];if(mxConnectionHandler[_0xdb8c[10]][_0xdb8c[11]]!= null){ new Image()[_0xdb8c[8]]= mxConnectionHandler[_0xdb8c[10]][_0xdb8c[11]][_0xdb8c[8]]};this[_0xdb8c[12]]= new Actions(this);this[_0xdb8c[13]]= new Menus(this);this[_0xdb8c[14]]();this[_0xdb8c[15]]();this[_0xdb8c[16]]();var _0xe9cax5=mxUtils[_0xdb8c[20]](this,function(_0xe9cax6){if(_0xe9cax6== null){_0xe9cax6= window[_0xdb8c[17]]};if(this[_0xdb8c[18]](_0xe9cax6)){return true};return _0xe9cax3[_0xdb8c[19]]()});if(this[_0xdb8c[1]]== document[_0xdb8c[21]]){this[_0xdb8c[23]][_0xdb8c[22]]= _0xe9cax5;this[_0xdb8c[23]][_0xdb8c[24]]= _0xe9cax5;this[_0xdb8c[25]][_0xdb8c[22]]= _0xe9cax5;this[_0xdb8c[25]][_0xdb8c[24]]= _0xe9cax5;this[_0xdb8c[26]][_0xdb8c[22]]= _0xe9cax5;this[_0xdb8c[26]][_0xdb8c[24]]= _0xe9cax5;this[_0xdb8c[27]][_0xdb8c[22]]= _0xe9cax5;this[_0xdb8c[27]][_0xdb8c[24]]= _0xe9cax5;this[_0xdb8c[28]][_0xdb8c[22]]= _0xe9cax5;this[_0xdb8c[28]][_0xdb8c[24]]= _0xe9cax5};if(mxClient[_0xdb8c[29]]&& ( typeof (document[_0xdb8c[30]])=== _0xdb8c[31]|| document[_0xdb8c[30]]< 9)){mxEvent[_0xdb8c[33]](this[_0xdb8c[26]],_0xdb8c[32],_0xe9cax5);mxEvent[_0xdb8c[33]](this[_0xdb8c[27]],_0xdb8c[32],_0xe9cax5)}else {this[_0xdb8c[26]][_0xdb8c[34]]= _0xe9cax5;this[_0xdb8c[27]][_0xdb8c[34]]= _0xe9cax5};_0xe9cax3[_0xdb8c[35]](this[_0xdb8c[26]]);_0xe9cax3[_0xdb8c[15]]();_0xe9cax3[_0xdb8c[1]][_0xdb8c[38]](_0xdb8c[36],_0xdb8c[37]);_0xe9cax3[_0xdb8c[1]][_0xdb8c[6]][_0xdb8c[39]]= _0xdb8c[40];_0xe9cax3[_0xdb8c[1]][_0xdb8c[6]][_0xdb8c[41]]= _0xdb8c[42]+ _0xe9cax1[_0xdb8c[43]]+ _0xdb8c[44];_0xe9cax3[_0xdb8c[1]][_0xdb8c[6]][_0xdb8c[45]]= _0xdb8c[46];_0xe9cax3[_0xdb8c[1]][_0xdb8c[47]]();var _0xe9cax7=_0xe9cax3[_0xdb8c[48]];_0xe9cax3[_0xdb8c[48]]= function(_0xe9cax8,_0xe9cax9,_0xe9caxa){if(_0xe9cax8== mxEvent[_0xdb8c[49]]){this[_0xdb8c[1]][_0xdb8c[47]]()};_0xe9cax7[_0xdb8c[50]](this,arguments)};this[_0xdb8c[58]](_0xe9cax3[_0xdb8c[51]],[_0xdb8c[52],_0xdb8c[53],_0xdb8c[54],_0xdb8c[55],_0xdb8c[56]],[[1,1],[0,0],[1,1],[1,_0xdb8c[57]],[1,_0xdb8c[57]]],[[0,0],[1,_0xdb8c[57]],[1,_0xdb8c[57]],[1,_0xdb8c[57]],[1,_0xdb8c[57]]]);_0xe9cax3[_0xdb8c[59]]= function(_0xe9cax6,_0xe9caxb){var _0xe9caxc=[_0xdb8c[55]];var _0xe9caxd= new mxEventObject(mxEvent.DOUBLE_CLICK,_0xdb8c[17],_0xe9cax6,_0xdb8c[60],_0xe9caxb);this[_0xdb8c[61]](_0xe9caxd);if(this[_0xdb8c[62]]()&& !mxEvent[_0xdb8c[63]](_0xe9cax6)&& !_0xe9caxd[_0xdb8c[63]]()){if(this[_0xdb8c[65]]()[_0xdb8c[64]](_0xe9caxb)){if(_0xe9caxc[_0xdb8c[69]](_0xe9caxb[_0xdb8c[68]][_0xdb8c[67]][_0xdb8c[66]])>= 0){this[_0xdb8c[70]](_0xe9caxb)}}else {if(this[_0xdb8c[65]]()[_0xdb8c[71]](_0xe9caxb)){console[_0xdb8c[72]](_0xe9cax4);console[_0xdb8c[72]](_0xe9caxb);_0xe9cax4[_0xdb8c[73]]( new GeneralDialog(_0xe9cax4,_0xe9caxb)[_0xdb8c[1]],320,280,true,true)}};_0xe9caxd[_0xdb8c[74]]()}};_0xe9cax3[_0xdb8c[76]][_0xdb8c[75]]= true;_0xe9cax3[_0xdb8c[76]][_0xdb8c[77]]= mxUtils[_0xdb8c[20]](this,function(_0xe9caxe,_0xe9caxb,_0xe9cax6){this[_0xdb8c[13]][_0xdb8c[78]](_0xe9caxe,_0xe9caxb,_0xe9cax6)});_0xe9cax1[_0xdb8c[80]][_0xdb8c[35]](this[_0xdb8c[79]]);mxEvent[_0xdb8c[82]](document,mxUtils[_0xdb8c[20]](this,function(_0xe9cax6){_0xe9cax3[_0xdb8c[76]][_0xdb8c[81]]()}));if(mxClient[_0xdb8c[83]]){mxEvent[_0xdb8c[33]](_0xe9cax3[_0xdb8c[1]],_0xdb8c[84],mxUtils[_0xdb8c[20]](this,function(_0xe9cax6){_0xe9cax3[_0xdb8c[89]][_0xdb8c[88]]()[_0xdb8c[38]](_0xdb8c[85],_0xdb8c[86]+ _0xe9cax6[_0xdb8c[87]]+ _0xdb8c[44]);_0xe9cax3[_0xdb8c[89]][_0xdb8c[91]]()[_0xdb8c[6]][_0xdb8c[90]]= _0xdb8c[7]}));mxEvent[_0xdb8c[33]](_0xe9cax3[_0xdb8c[1]],_0xdb8c[92],mxUtils[_0xdb8c[20]](this,function(_0xe9cax6){_0xe9cax3[_0xdb8c[89]][_0xdb8c[88]]()[_0xdb8c[93]](_0xdb8c[85]);_0xe9cax3[_0xdb8c[94]]= true;_0xe9cax3[_0xdb8c[95]](_0xe9cax6[_0xdb8c[87]]);_0xe9cax3[_0xdb8c[89]][_0xdb8c[91]]()[_0xdb8c[6]][_0xdb8c[90]]= _0xdb8c[96]}))};var _0xe9caxf=this[_0xdb8c[97]](_0xe9cax1);this[_0xdb8c[98]]= function(){return _0xe9caxf};mxEvent[_0xdb8c[33]](window,_0xdb8c[99],mxUtils[_0xdb8c[20]](this,function(){this[_0xdb8c[15]]();_0xe9cax3[_0xdb8c[100]]();this[_0xdb8c[0]][_0xdb8c[80]][_0xdb8c[101]](false);this[_0xdb8c[0]][_0xdb8c[80]][_0xdb8c[80]][_0xdb8c[100]]()}));this[_0xdb8c[35]]();this[_0xdb8c[102]]()};EditorUi[_0xdb8c[10]][_0xdb8c[103]]= (mxClient[_0xdb8c[83]])?16:8;EditorUi[_0xdb8c[10]][_0xdb8c[104]]= 33;EditorUi[_0xdb8c[10]][_0xdb8c[105]]= 36;EditorUi[_0xdb8c[10]][_0xdb8c[106]]= 28;EditorUi[_0xdb8c[10]][_0xdb8c[107]]= 204;EditorUi[_0xdb8c[10]][_0xdb8c[108]]= 190;EditorUi[_0xdb8c[10]][_0xdb8c[35]]= function(){this[_0xdb8c[109]]();this[_0xdb8c[110]]();var _0xe9cax10=this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[111]);var _0xe9cax11=function(){_0xe9cax10[_0xdb8c[114]](!mxClipboard[_0xdb8c[113]]())};var _0xe9cax12=mxClipboard[_0xdb8c[115]];mxClipboard[_0xdb8c[115]]= function(){_0xe9cax12[_0xdb8c[50]](this,arguments);_0xe9cax11()};var _0xe9cax13=mxClipboard[_0xdb8c[116]];mxClipboard[_0xdb8c[116]]= function(){_0xe9cax13[_0xdb8c[50]](this,arguments);_0xe9cax11()}};EditorUi[_0xdb8c[10]][_0xdb8c[18]]= function(_0xe9cax6){return false};EditorUi[_0xdb8c[10]][_0xdb8c[102]]= function(){try{if(window[_0xdb8c[117]]!= null&& window[_0xdb8c[117]][_0xdb8c[118]]!= null){window[_0xdb8c[117]][_0xdb8c[118]][_0xdb8c[130]](mxUtils[_0xdb8c[20]](this,function(_0xe9cax14,_0xe9cax15){try{var _0xe9cax16=mxUtils[_0xdb8c[119]](_0xe9cax14);this[_0xdb8c[0]][_0xdb8c[121]](_0xe9cax16[_0xdb8c[120]]);this[_0xdb8c[0]][_0xdb8c[122]]= false;this[_0xdb8c[0]][_0xdb8c[124]][_0xdb8c[123]]();if(_0xe9cax15!= null){this[_0xdb8c[0]][_0xdb8c[125]]= _0xe9cax15}}catch(e){mxUtils[_0xdb8c[129]](mxResources[_0xdb8c[112]](_0xdb8c[126])+ _0xdb8c[127]+ e[_0xdb8c[128]])}}))}}catch(e){}};EditorUi[_0xdb8c[10]][_0xdb8c[131]]= function(_0xe9cax14,_0xe9cax15,_0xe9cax17){try{var _0xe9cax16=mxUtils[_0xdb8c[119]](_0xe9cax14);this[_0xdb8c[0]][_0xdb8c[121]](_0xe9cax16[_0xdb8c[120]]);this[_0xdb8c[0]][_0xdb8c[122]]= false;this[_0xdb8c[0]][_0xdb8c[124]][_0xdb8c[123]]();if(_0xe9cax15!= null){this[_0xdb8c[0]][_0xdb8c[125]]= _0xe9cax15};if(_0xe9cax17!= null){this[_0xdb8c[0]][_0xdb8c[132]]= _0xe9cax17}}catch(e){mxUtils[_0xdb8c[129]](mxResources[_0xdb8c[112]](_0xdb8c[126])+ _0xdb8c[127]+ e[_0xdb8c[128]])}};EditorUi[_0xdb8c[10]][_0xdb8c[133]]= function(_0xe9cax18){var _0xe9cax1=this[_0xdb8c[0]];if(_0xe9cax18!= null){var _0xe9cax14=mxUtils[_0xdb8c[135]](this[_0xdb8c[0]][_0xdb8c[134]]());try{if(useLocalStorage){if(localStorage[_0xdb8c[136]](_0xe9cax18)!= null&& !mxUtils[_0xdb8c[138]](mxResources[_0xdb8c[112]](_0xdb8c[137],[_0xe9cax18]))){return};localStorage[_0xdb8c[139]](_0xe9cax18,_0xe9cax14);this[_0xdb8c[0]][_0xdb8c[142]](mxResources[_0xdb8c[112]](_0xdb8c[140])+ _0xdb8c[141]+ new Date())}else {console[_0xdb8c[72]](_0xe9cax14[_0xdb8c[143]]);console[_0xdb8c[72]](MAX_REQUEST_SIZE);if(_0xe9cax14[_0xdb8c[143]]< MAX_REQUEST_SIZE){_0xe9cax14= encodeURIComponent(_0xe9cax14);_0xe9cax18= encodeURIComponent(_0xe9cax18);var _0xe9cax19= new XMLHttpRequest();_0xe9cax19[_0xdb8c[102]](_0xdb8c[144],SAVE_URL,true);_0xe9cax19[_0xdb8c[147]](_0xdb8c[145],_0xdb8c[146]);_0xe9cax19[_0xdb8c[147]](_0xdb8c[148],_0xdb8c[149]+ _0xe9cax1[_0xdb8c[132]][_0xdb8c[150]]);_0xe9cax19[_0xdb8c[151]]= function(_0xe9cax1a){if(_0xe9cax19[_0xdb8c[152]]=== 4){if(_0xe9cax19[_0xdb8c[153]]=== 201){_0xe9cax1[_0xdb8c[142]](_0xdb8c[154]+ JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]])[_0xdb8c[155]]+ _0xdb8c[158]);setTimeout(function(){window[_0xdb8c[102]](_0xdb8c[159]+ JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]])[_0xdb8c[160]],_0xdb8c[161])},1500)}else {try{var _0xe9cax1b=JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]]);_0xe9cax1[_0xdb8c[142]](_0xdb8c[162]+ _0xe9cax1b[_0xdb8c[163]][0][_0xdb8c[128]])}catch(_0xe9cax1a){_0xe9cax1[_0xdb8c[142]](_0xdb8c[164]+ _0xdb8c[165]+ _0xe9cax19[_0xdb8c[153]]+ _0xdb8c[141]+ _0xe9cax19[_0xdb8c[166]]+ _0xdb8c[44])}}}};_0xe9cax19[_0xdb8c[167]]= function(_0xe9cax1a){mxUtils[_0xdb8c[129]](_0xe9cax19[_0xdb8c[166]])};_0xe9cax19[_0xdb8c[169]](_0xdb8c[168]+ _0xe9cax18)}else {mxUtils[_0xdb8c[129]](mxResources[_0xdb8c[112]](_0xdb8c[170]));mxUtils[_0xdb8c[171]](_0xe9cax14);return}};this[_0xdb8c[0]][_0xdb8c[125]]= _0xe9cax18;this[_0xdb8c[0]][_0xdb8c[122]]= false}catch(e){this[_0xdb8c[0]][_0xdb8c[142]](_0xdb8c[164])}}else {this[_0xdb8c[0]][_0xdb8c[142]](_0xdb8c[164])}};EditorUi[_0xdb8c[10]][_0xdb8c[172]]= function(_0xe9cax18){var _0xe9cax1=this[_0xdb8c[0]];if(_0xe9cax18!= null){var _0xe9cax14=mxUtils[_0xdb8c[135]](this[_0xdb8c[0]][_0xdb8c[134]]());try{if(useLocalStorage){if(localStorage[_0xdb8c[136]](_0xe9cax18)!= null&& !mxUtils[_0xdb8c[138]](mxResources[_0xdb8c[112]](_0xdb8c[137],[_0xe9cax18]))){return};localStorage[_0xdb8c[139]](_0xe9cax18,_0xe9cax14);this[_0xdb8c[0]][_0xdb8c[142]](mxResources[_0xdb8c[112]](_0xdb8c[140])+ _0xdb8c[141]+ new Date())}else {console[_0xdb8c[72]](_0xe9cax14[_0xdb8c[143]]);console[_0xdb8c[72]](MAX_REQUEST_SIZE);if(_0xe9cax14[_0xdb8c[143]]< MAX_REQUEST_SIZE){_0xe9cax14= encodeURIComponent(_0xe9cax14);var _0xe9cax19= new XMLHttpRequest();_0xe9cax19[_0xdb8c[102]](_0xdb8c[173],SAVE_URL+ this[_0xdb8c[0]][_0xdb8c[132]][_0xdb8c[160]],true);_0xe9cax19[_0xdb8c[147]](_0xdb8c[145],_0xdb8c[146]);_0xe9cax19[_0xdb8c[147]](_0xdb8c[148],_0xdb8c[149]+ _0xe9cax1[_0xdb8c[132]][_0xdb8c[150]]);_0xe9cax19[_0xdb8c[151]]= function(_0xe9cax1a){if(_0xe9cax19[_0xdb8c[152]]=== 4){if(_0xe9cax19[_0xdb8c[153]]=== 200){_0xe9cax1[_0xdb8c[142]](_0xdb8c[174]+ JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]])[_0xdb8c[175]]+ _0xdb8c[165]+ _0xe9cax19[_0xdb8c[153]]+ _0xdb8c[141]+ _0xe9cax19[_0xdb8c[166]]+ _0xdb8c[44])}else {try{var _0xe9cax1b=JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]]);_0xe9cax1[_0xdb8c[142]](_0xdb8c[176]+ _0xe9cax1b[_0xdb8c[163]][0][_0xdb8c[128]])}catch(_0xe9cax1a){_0xe9cax1[_0xdb8c[142]](_0xdb8c[177]+ _0xdb8c[165]+ _0xe9cax19[_0xdb8c[153]]+ _0xdb8c[141]+ _0xe9cax19[_0xdb8c[166]]+ _0xdb8c[44])}}}};_0xe9cax19[_0xdb8c[167]]= function(_0xe9cax1a){mxUtils[_0xdb8c[129]](_0xe9cax19[_0xdb8c[166]])};_0xe9cax19[_0xdb8c[169]](_0xdb8c[178]+ _0xe9cax14)}else {mxUtils[_0xdb8c[129]](mxResources[_0xdb8c[112]](_0xdb8c[170]));mxUtils[_0xdb8c[171]](_0xe9cax14);return}};this[_0xdb8c[0]][_0xdb8c[125]]= _0xe9cax18;this[_0xdb8c[0]][_0xdb8c[122]]= false}catch(e){this[_0xdb8c[0]][_0xdb8c[142]](_0xdb8c[179])}}else {this[_0xdb8c[0]][_0xdb8c[142]](_0xdb8c[179])}};EditorUi[_0xdb8c[10]][_0xdb8c[180]]= function(_0xe9cax18){var _0xe9cax1=this[_0xdb8c[0]];console[_0xdb8c[72]](_0xe9cax18);if(_0xe9cax18!= null){var _0xe9cax14=mxUtils[_0xdb8c[135]](this[_0xdb8c[0]][_0xdb8c[134]]());try{if(useLocalStorage){if(localStorage[_0xdb8c[136]](_0xe9cax18)!= null&& !mxUtils[_0xdb8c[138]](mxResources[_0xdb8c[112]](_0xdb8c[137],[_0xe9cax18]))){return};localStorage[_0xdb8c[139]](_0xe9cax18,_0xe9cax14);this[_0xdb8c[0]][_0xdb8c[142]](mxResources[_0xdb8c[112]](_0xdb8c[140])+ _0xdb8c[141]+ new Date())}else {console[_0xdb8c[72]](_0xe9cax14[_0xdb8c[143]]);console[_0xdb8c[72]](MAX_REQUEST_SIZE);if(_0xe9cax14[_0xdb8c[143]]< MAX_REQUEST_SIZE){_0xe9cax14= encodeURIComponent(_0xe9cax14);_0xe9cax18= encodeURIComponent(_0xe9cax18);var _0xe9cax19= new XMLHttpRequest();_0xe9cax19[_0xdb8c[102]](_0xdb8c[144],SAVE_URL,true);_0xe9cax19[_0xdb8c[147]](_0xdb8c[145],_0xdb8c[146]);_0xe9cax19[_0xdb8c[147]](_0xdb8c[148],_0xdb8c[149]+ _0xe9cax1[_0xdb8c[132]][_0xdb8c[150]]);_0xe9cax19[_0xdb8c[151]]= function(_0xe9cax1a){if(_0xe9cax19[_0xdb8c[152]]=== 4){if(_0xe9cax19[_0xdb8c[153]]=== 201){_0xe9cax1[_0xdb8c[142]](_0xdb8c[154]+ JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]])[_0xdb8c[155]]+ _0xdb8c[158]);setTimeout(function(){window[_0xdb8c[102]](_0xdb8c[181]+ JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]])[_0xdb8c[160]],_0xdb8c[161])},1500)}else {try{var _0xe9cax1b=JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]]);_0xe9cax1[_0xdb8c[142]](_0xdb8c[182]+ _0xe9cax1b[_0xdb8c[163]][0][_0xdb8c[128]])}catch(_0xe9cax1a){_0xe9cax1[_0xdb8c[142]](_0xdb8c[183]+ _0xdb8c[165]+ _0xe9cax19[_0xdb8c[153]]+ _0xdb8c[141]+ _0xe9cax19[_0xdb8c[166]]+ _0xdb8c[44])}}}};_0xe9cax19[_0xdb8c[167]]= function(_0xe9cax1a){mxUtils[_0xdb8c[129]](_0xe9cax19[_0xdb8c[166]])};_0xe9cax19[_0xdb8c[169]](_0xdb8c[184]+ _0xe9cax18+ _0xdb8c[185]+ _0xe9cax14+ _0xdb8c[186]+ _0xe9cax14)}else {mxUtils[_0xdb8c[129]](mxResources[_0xdb8c[112]](_0xdb8c[170]));mxUtils[_0xdb8c[171]](_0xe9cax14);return}};this[_0xdb8c[0]][_0xdb8c[125]]= _0xe9cax18;this[_0xdb8c[0]][_0xdb8c[122]]= false}catch(e){this[_0xdb8c[0]][_0xdb8c[142]](_0xdb8c[179])}}else {this[_0xdb8c[0]][_0xdb8c[142]](_0xdb8c[179])}};EditorUi[_0xdb8c[10]][_0xdb8c[187]]= function(_0xe9cax1c,_0xe9cax1d){var _0xe9cax3=this[_0xdb8c[0]][_0xdb8c[4]];_0xe9cax1c= null!= _0xe9cax1c?_0xe9cax1c:_0xe9cax3[_0xdb8c[189]][_0xdb8c[188]]();_0xe9cax1d= null!= _0xe9cax1d?_0xe9cax1d:{};for(var _0xe9cax1e=!0,_0xe9cax1f=_0xe9cax3[_0xdb8c[189]][_0xdb8c[190]](_0xe9cax1c),_0xe9cax1a=0;_0xe9cax1a< _0xe9cax1f;_0xe9cax1a++){var _0xe9cax20=_0xe9cax3[_0xdb8c[189]][_0xdb8c[191]](_0xe9cax1c,_0xe9cax1a),_0xe9cax21=_0xe9cax1d;_0xe9cax3[_0xdb8c[192]](_0xe9cax20)&& (_0xe9cax21= {});_0xe9cax21= this[_0xdb8c[187]](_0xe9cax20,_0xe9cax21);null!= _0xe9cax21?_0xe9cax3[_0xdb8c[194]](_0xe9cax20,_0xe9cax21[_0xdb8c[137]](/\n/g,_0xdb8c[193])):_0xe9cax3[_0xdb8c[194]](_0xe9cax20,null);_0xe9cax1e= _0xe9cax1e&& null== _0xe9cax21};_0xe9cax1f= _0xdb8c[195];if(_0xe9cax3[_0xdb8c[189]][_0xdb8c[71]](_0xe9cax1c)){switch(_0xe9cax1c[_0xdb8c[67]][_0xdb8c[203]]){case _0xdb8c[55]:_0xe9cax1f= (_0xe9cax1c[_0xdb8c[67]][_0xdb8c[196]](_0xdb8c[55])!== _0xdb8c[195])?_0xdb8c[195]:_0xdb8c[197]+ _0xdb8c[198];_0xe9cax1f+= (_0xe9cax1c[_0xdb8c[67]][_0xdb8c[196]](_0xdb8c[199])!== _0xdb8c[195])?_0xdb8c[195]:_0xdb8c[200]+ _0xdb8c[198];break;case _0xdb8c[54]:_0xe9cax1f= (_0xe9cax1c[_0xdb8c[67]][_0xdb8c[196]](_0xdb8c[55])!== _0xdb8c[195])?_0xdb8c[195]:_0xdb8c[197]+ _0xdb8c[198];_0xe9cax1f+= (_0xe9cax1c[_0xdb8c[67]][_0xdb8c[196]](_0xdb8c[199])!== _0xdb8c[195])?_0xdb8c[195]:_0xdb8c[200]+ _0xdb8c[198];break;case _0xdb8c[52]:_0xe9cax1f= this[_0xdb8c[201]](_0xdb8c[52])?_0xdb8c[195]:_0xdb8c[202]+ _0xdb8c[198];_0xe9cax1f+= (_0xe9cax1c[_0xdb8c[67]][_0xdb8c[196]](_0xdb8c[199])!== _0xdb8c[195])?_0xdb8c[195]:_0xdb8c[200]+ _0xdb8c[198];break}};if(_0xe9cax3[_0xdb8c[189]][_0xdb8c[64]](_0xe9cax1c)){var _0xe9cax22=_0xe9cax3[_0xdb8c[189]][_0xdb8c[205]](_0xe9cax1c[_0xdb8c[68]][_0xdb8c[204]]());switch(_0xe9cax22[_0xdb8c[67]][_0xdb8c[203]]){case _0xdb8c[55]:var _0xe9cax23=String(_0xe9cax1c[_0xdb8c[206]]());console[_0xdb8c[72]](_0xe9cax23);if(_0xe9cax23=== _0xdb8c[207]|| _0xe9cax23=== _0xdb8c[31]){_0xe9cax1f= _0xdb8c[208]+ _0xdb8c[198]}else {var _0xe9cax24=_0xe9cax23[_0xdb8c[210]](_0xdb8c[209]);_0xe9cax24[_0xdb8c[214]](function(_0xe9cax25,_0xe9cax26){_0xe9cax1f= _0xe9cax1f+ ((_0xe9cax25[_0xdb8c[211]]()!== _0xdb8c[195])?_0xdb8c[195]:_0xdb8c[212]+ (_0xe9cax26+ 1)+ _0xdb8c[213]+ _0xdb8c[198])})};break}};_0xe9cax3[_0xdb8c[215]](_0xe9cax1c)&& !_0xe9cax1e&& (_0xe9cax1f+= (mxResources[_0xdb8c[112]](_0xe9cax3[_0xdb8c[216]])|| _0xe9cax3[_0xdb8c[216]])+ _0xdb8c[198]);_0xe9cax1f= _0xe9cax3[_0xdb8c[189]][_0xdb8c[64]](_0xe9cax1c)?_0xe9cax1f+ (_0xe9cax3[_0xdb8c[218]](_0xe9cax1c,_0xe9cax3[_0xdb8c[189]][_0xdb8c[217]](_0xe9cax1c,!0),_0xe9cax3[_0xdb8c[189]][_0xdb8c[217]](_0xe9cax1c,!1))|| _0xdb8c[195]):_0xe9cax1f+ (_0xe9cax3[_0xdb8c[219]](_0xe9cax1c)|| _0xdb8c[195]);_0xe9cax1a= _0xe9cax3[_0xdb8c[220]](_0xe9cax1c,_0xe9cax1d);null!= _0xe9cax1a&& (_0xe9cax1f+= _0xe9cax1a);null== _0xe9cax3[_0xdb8c[189]][_0xdb8c[221]](_0xe9cax1c)&& _0xe9cax3[_0xdb8c[89]][_0xdb8c[187]]();return 0< _0xe9cax1f[_0xdb8c[143]]|| !_0xe9cax1e?_0xe9cax1f:null};EditorUi[_0xdb8c[10]][_0xdb8c[201]]= function(_0xe9cax27){var _0xe9cax3=this[_0xdb8c[0]][_0xdb8c[4]];var _0xe9cax28=_0xe9cax3[_0xdb8c[222]]();var _0xe9cax29=0;_0xe9cax28[_0xdb8c[223]][_0xdb8c[214]](function(_0xe9cax2a){if(_0xe9cax3[_0xdb8c[189]][_0xdb8c[71]](_0xe9cax2a)&& _0xe9cax2a[_0xdb8c[67]][_0xdb8c[203]]== _0xe9cax27){_0xe9cax29++}});return _0xe9cax29> 1?false:true};EditorUi[_0xdb8c[10]][_0xdb8c[224]]= function(_0xe9cax18){var _0xe9cax1=this[_0xdb8c[0]];if(_0xe9cax18!= null){var _0xe9cax1b=this[_0xdb8c[187]]();if(_0xe9cax1b=== null){var _0xe9cax14=mxUtils[_0xdb8c[135]](this[_0xdb8c[0]][_0xdb8c[134]]());try{if(useLocalStorage){if(localStorage[_0xdb8c[136]](_0xe9cax18)!= null&& !mxUtils[_0xdb8c[138]](mxResources[_0xdb8c[112]](_0xdb8c[137],[_0xe9cax18]))){return};localStorage[_0xdb8c[139]](_0xe9cax18,_0xe9cax14);this[_0xdb8c[0]][_0xdb8c[142]](mxResources[_0xdb8c[112]](_0xdb8c[140])+ _0xdb8c[141]+ new Date())}else {console[_0xdb8c[72]](_0xe9cax14[_0xdb8c[143]]);console[_0xdb8c[72]](MAX_REQUEST_SIZE);if(_0xe9cax14[_0xdb8c[143]]< MAX_REQUEST_SIZE){_0xe9cax14= encodeURIComponent(_0xe9cax14);var _0xe9cax19= new XMLHttpRequest();_0xe9cax19[_0xdb8c[102]](_0xdb8c[173],SAVE_URL+ this[_0xdb8c[0]][_0xdb8c[132]][_0xdb8c[160]],true);_0xe9cax19[_0xdb8c[147]](_0xdb8c[145],_0xdb8c[146]);_0xe9cax19[_0xdb8c[147]](_0xdb8c[148],_0xdb8c[149]+ _0xe9cax1[_0xdb8c[132]][_0xdb8c[150]]);_0xe9cax19[_0xdb8c[151]]= function(_0xe9cax1a){if(_0xe9cax19[_0xdb8c[152]]=== 4){if(_0xe9cax19[_0xdb8c[153]]=== 200){_0xe9cax1[_0xdb8c[142]](_0xdb8c[225]+ JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]])[_0xdb8c[175]]+ _0xdb8c[165]+ _0xe9cax19[_0xdb8c[153]]+ _0xdb8c[141]+ _0xe9cax19[_0xdb8c[166]]+ _0xdb8c[44])}else {try{var _0xe9cax1b=JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]]);_0xe9cax1[_0xdb8c[142]](_0xdb8c[226]+ _0xe9cax1b[_0xdb8c[163]][0][_0xdb8c[128]])}catch(_0xe9cax1a){_0xe9cax1[_0xdb8c[142]](_0xdb8c[227]+ _0xdb8c[165]+ _0xe9cax19[_0xdb8c[153]]+ _0xdb8c[141]+ _0xe9cax19[_0xdb8c[166]]+ _0xdb8c[44])}}}};_0xe9cax19[_0xdb8c[167]]= function(_0xe9cax1a){mxUtils[_0xdb8c[129]](_0xe9cax19[_0xdb8c[166]])};_0xe9cax19[_0xdb8c[169]](_0xdb8c[178]+ _0xe9cax14+ _0xdb8c[186]+ _0xe9cax14)}else {mxUtils[_0xdb8c[129]](mxResources[_0xdb8c[112]](_0xdb8c[170]));mxUtils[_0xdb8c[171]](_0xe9cax14);return}};this[_0xdb8c[0]][_0xdb8c[125]]= _0xe9cax18;this[_0xdb8c[0]][_0xdb8c[122]]= false}catch(e){this[_0xdb8c[0]][_0xdb8c[142]](_0xdb8c[228])}}else {_0xe9cax1[_0xdb8c[142]](_0xdb8c[226])}}else {this[_0xdb8c[0]][_0xdb8c[142]](_0xdb8c[228])}};EditorUi[_0xdb8c[10]][_0xdb8c[229]]= function(_0xe9cax18){var _0xe9cax1=this[_0xdb8c[0]];if(_0xe9cax18!= null){try{var _0xe9cax19= new XMLHttpRequest();_0xe9cax19[_0xdb8c[102]](_0xdb8c[144],VARIABLE_URL,true);_0xe9cax19[_0xdb8c[147]](_0xdb8c[145],_0xdb8c[146]);_0xe9cax19[_0xdb8c[147]](_0xdb8c[148],_0xdb8c[149]+ _0xe9cax1[_0xdb8c[132]][_0xdb8c[150]]);_0xe9cax19[_0xdb8c[151]]= function(_0xe9cax1a){if(_0xe9cax19[_0xdb8c[152]]=== 4){if(_0xe9cax19[_0xdb8c[153]]=== 201){_0xe9cax1[_0xdb8c[142]](_0xdb8c[230]+ JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]])[_0xdb8c[231]]+ _0xdb8c[165]+ _0xe9cax19[_0xdb8c[153]]+ _0xdb8c[141]+ _0xe9cax19[_0xdb8c[166]]+ _0xdb8c[44])}else {try{var _0xe9cax1b=JSON[_0xdb8c[157]](_0xe9cax19[_0xdb8c[156]]);_0xe9cax1[_0xdb8c[142]](_0xdb8c[232]+ _0xe9cax1b[_0xdb8c[163]][0][_0xdb8c[128]])}catch(_0xe9cax1a){_0xe9cax1[_0xdb8c[142]](_0xdb8c[233]+ _0xdb8c[165]+ _0xe9cax19[_0xdb8c[153]]+ _0xdb8c[141]+ _0xe9cax19[_0xdb8c[166]]+ _0xdb8c[44])}}}};_0xe9cax19[_0xdb8c[167]]= function(_0xe9cax1a){mxUtils[_0xdb8c[129]](_0xe9cax19[_0xdb8c[166]])};_0xe9cax19[_0xdb8c[169]](_0xdb8c[234]+ _0xe9cax18)}catch(e){this[_0xdb8c[0]][_0xdb8c[142]](_0xdb8c[233])}}else {this[_0xdb8c[0]][_0xdb8c[142]](_0xdb8c[233])}};EditorUi[_0xdb8c[10]][_0xdb8c[235]]= function(_0xe9cax2b){var _0xe9cax2c=(_0xe9cax2b!= null)?_0xe9cax2b:window[_0xdb8c[237]][_0xdb8c[236]];var _0xe9cax2d=(_0xe9cax2c[_0xdb8c[69]](_0xdb8c[238])> 0)?1:0;for(var _0xe9cax26 in urlParams){if(_0xe9cax2d== 0){_0xe9cax2c+= _0xdb8c[238]}else {_0xe9cax2c+= _0xdb8c[239]};_0xe9cax2c+= _0xe9cax26+ _0xdb8c[240]+ urlParams[_0xe9cax26];_0xe9cax2d++};return _0xe9cax2c};EditorUi[_0xdb8c[10]][_0xdb8c[109]]= function(){var _0xe9cax2e=this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[241]);var _0xe9cax2f=this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[242]);var _0xe9cax30=this[_0xdb8c[0]][_0xdb8c[124]];var _0xe9cax31=function(){_0xe9cax2e[_0xdb8c[114]](_0xe9cax30[_0xdb8c[243]]());_0xe9cax2f[_0xdb8c[114]](_0xe9cax30[_0xdb8c[244]]())};_0xe9cax30[_0xdb8c[33]](mxEvent.ADD,_0xe9cax31);_0xe9cax30[_0xdb8c[33]](mxEvent.UNDO,_0xe9cax31);_0xe9cax30[_0xdb8c[33]](mxEvent.REDO,_0xe9cax31);_0xe9cax30[_0xdb8c[33]](mxEvent.CLEAR,_0xe9cax31);_0xe9cax31()};EditorUi[_0xdb8c[10]][_0xdb8c[110]]= function(){var _0xe9cax32=mxUtils[_0xdb8c[20]](this,function(){var _0xe9cax3=this[_0xdb8c[0]][_0xdb8c[4]];var _0xe9cax33=!_0xe9cax3[_0xdb8c[245]]();var _0xe9cax34=false;var _0xe9cax35=false;var _0xe9cax36=_0xe9cax3[_0xdb8c[246]]();if(_0xe9cax36!= null){for(var _0xe9cax37=0;_0xe9cax37< _0xe9cax36[_0xdb8c[143]];_0xe9cax37++){var _0xe9caxb=_0xe9cax36[_0xe9cax37];if(_0xe9cax3[_0xdb8c[65]]()[_0xdb8c[64]](_0xe9caxb)){_0xe9cax35= true};if(_0xe9cax3[_0xdb8c[65]]()[_0xdb8c[71]](_0xe9caxb)){_0xe9cax34= true};if(_0xe9cax35&& _0xe9cax34){break}}};var _0xe9cax38=[_0xdb8c[115],_0xdb8c[116],_0xdb8c[247],_0xdb8c[248],_0xdb8c[249],_0xdb8c[250],_0xdb8c[6],_0xdb8c[251],_0xdb8c[252],_0xdb8c[253],_0xdb8c[254],_0xdb8c[255],_0xdb8c[256],_0xdb8c[257],_0xdb8c[258]];for(var _0xe9cax37=0;_0xe9cax37< _0xe9cax38[_0xdb8c[143]];_0xe9cax37++){this[_0xdb8c[12]][_0xdb8c[112]](_0xe9cax38[_0xe9cax37])[_0xdb8c[114]](_0xe9cax33)};this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[259])[_0xdb8c[114]](_0xe9cax35);this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[260])[_0xdb8c[114]](_0xe9cax34);this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[261])[_0xdb8c[114]](_0xe9cax34);this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[263])[_0xdb8c[114]](_0xe9cax3[_0xdb8c[262]]()> 1);this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[265])[_0xdb8c[114]](_0xe9cax3[_0xdb8c[262]]()== 1&& _0xe9cax3[_0xdb8c[65]]()[_0xdb8c[190]](_0xe9cax3[_0xdb8c[264]]())> 0);var _0xe9cax39=_0xe9cax34&& _0xe9cax3[_0xdb8c[262]]()== 1;this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[266])[_0xdb8c[114]](_0xe9cax39&& _0xe9cax3[_0xdb8c[65]]()[_0xdb8c[71]](_0xe9cax3[_0xdb8c[65]]()[_0xdb8c[221]](_0xe9cax3[_0xdb8c[264]]())));var _0xe9cax3a=[_0xdb8c[267],_0xdb8c[268],_0xdb8c[269],_0xdb8c[270],_0xdb8c[271],_0xdb8c[272],_0xdb8c[273],_0xdb8c[274],_0xdb8c[275]];for(var _0xe9cax37=0;_0xe9cax37< _0xe9cax3a[_0xdb8c[143]];_0xe9cax37++){this[_0xdb8c[13]][_0xdb8c[112]](_0xe9cax3a[_0xe9cax37])[_0xdb8c[114]](_0xe9cax33)};_0xe9cax3a= [_0xdb8c[276],_0xdb8c[277],_0xdb8c[278]];for(var _0xe9cax37=0;_0xe9cax37< _0xe9cax3a[_0xdb8c[143]];_0xe9cax37++){this[_0xdb8c[13]][_0xdb8c[112]](_0xe9cax3a[_0xe9cax37])[_0xdb8c[114]](_0xe9cax35)};this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[279])[_0xdb8c[114]](_0xe9cax35);this[_0xdb8c[13]][_0xdb8c[112]](_0xdb8c[280])[_0xdb8c[114]](_0xe9cax3[_0xdb8c[262]]()> 1);this[_0xdb8c[13]][_0xdb8c[112]](_0xdb8c[283])[_0xdb8c[114]](_0xe9cax34|| (_0xe9cax35&& _0xe9cax3[_0xdb8c[282]](_0xe9cax3[_0xdb8c[89]][_0xdb8c[281]](_0xe9cax3[_0xdb8c[264]]()))));this[_0xdb8c[13]][_0xdb8c[112]](_0xdb8c[286])[_0xdb8c[114]](_0xe9cax3[_0xdb8c[284]]&& ((_0xe9cax3[_0xdb8c[89]][_0xdb8c[285]]!= null)|| (_0xe9cax3[_0xdb8c[262]]()== 1&& _0xe9cax3[_0xdb8c[192]](_0xe9cax3[_0xdb8c[264]]()))));this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[287])[_0xdb8c[114]](_0xe9cax3[_0xdb8c[89]][_0xdb8c[285]]!= null);this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[288])[_0xdb8c[114]](_0xe9cax3[_0xdb8c[89]][_0xdb8c[285]]!= null);var _0xe9cax3b=_0xe9cax3[_0xdb8c[262]]()== 1&& _0xe9cax3[_0xdb8c[192]](_0xe9cax3[_0xdb8c[264]]());this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[289])[_0xdb8c[114]](_0xe9cax3b);this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[290])[_0xdb8c[114]](_0xe9cax3b);this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[291])[_0xdb8c[114]](_0xe9cax3b);this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[292])[_0xdb8c[114]](_0xe9cax3[_0xdb8c[262]]()== 1);this[_0xdb8c[12]][_0xdb8c[112]](_0xdb8c[294])[_0xdb8c[114]](_0xe9cax3[_0xdb8c[262]]()== 1&& _0xe9cax3[_0xdb8c[293]](_0xe9cax3[_0xdb8c[264]]())!= null)});this[_0xdb8c[0]][_0xdb8c[4]][_0xdb8c[295]]()[_0xdb8c[33]](mxEvent.CHANGE,_0xe9cax32);_0xe9cax32()};EditorUi[_0xdb8c[10]][_0xdb8c[15]]= function(){var _0xe9cax3c=mxClient[_0xdb8c[29]]&& (document[_0xdb8c[30]]== null|| document[_0xdb8c[30]]== 5);var _0xe9cax3d=this[_0xdb8c[1]][_0xdb8c[296]];var _0xe9cax3e=this[_0xdb8c[1]][_0xdb8c[297]];if(this[_0xdb8c[1]]== document[_0xdb8c[21]]){_0xe9cax3d= document[_0xdb8c[21]][_0xdb8c[296]]|| document[_0xdb8c[120]][_0xdb8c[296]];_0xe9cax3e= (_0xe9cax3c)?document[_0xdb8c[21]][_0xdb8c[297]]|| document[_0xdb8c[120]][_0xdb8c[297]]:document[_0xdb8c[120]][_0xdb8c[297]]};var _0xe9cax3f=Math[_0xdb8c[299]](0,Math[_0xdb8c[298]](this[_0xdb8c[107]],_0xe9cax3d- this[_0xdb8c[103]]- 20));var _0xe9cax40=Math[_0xdb8c[299]](0,Math[_0xdb8c[298]](this[_0xdb8c[108]],_0xe9cax3e- this[_0xdb8c[104]]- this[_0xdb8c[105]]- this[_0xdb8c[106]]- this[_0xdb8c[103]]- 1));this[_0xdb8c[23]][_0xdb8c[6]][_0xdb8c[300]]= this[_0xdb8c[104]]+ _0xdb8c[301];this[_0xdb8c[25]][_0xdb8c[6]][_0xdb8c[302]]= this[_0xdb8c[104]]+ _0xdb8c[301];this[_0xdb8c[25]][_0xdb8c[6]][_0xdb8c[300]]= this[_0xdb8c[105]]+ _0xdb8c[301];var _0xe9cax41=this[_0xdb8c[104]]+ this[_0xdb8c[105]];if(!mxClient[_0xdb8c[303]]){_0xe9cax41+= 1};this[_0xdb8c[27]][_0xdb8c[6]][_0xdb8c[302]]= _0xe9cax41+ _0xdb8c[301];this[_0xdb8c[27]][_0xdb8c[6]][_0xdb8c[304]]= _0xe9cax3f+ _0xdb8c[301];this[_0xdb8c[79]][_0xdb8c[6]][_0xdb8c[304]]= _0xe9cax3f+ _0xdb8c[301];this[_0xdb8c[79]][_0xdb8c[6]][_0xdb8c[300]]= _0xe9cax40+ _0xdb8c[301];this[_0xdb8c[79]][_0xdb8c[6]][_0xdb8c[305]]= this[_0xdb8c[106]]+ _0xdb8c[301];this[_0xdb8c[26]][_0xdb8c[6]][_0xdb8c[306]]= (_0xe9cax3f+ this[_0xdb8c[103]])+ _0xdb8c[301];this[_0xdb8c[26]][_0xdb8c[6]][_0xdb8c[302]]= this[_0xdb8c[27]][_0xdb8c[6]][_0xdb8c[302]];this[_0xdb8c[28]][_0xdb8c[6]][_0xdb8c[300]]= this[_0xdb8c[106]]+ _0xdb8c[301];this[_0xdb8c[28]][_0xdb8c[6]][_0xdb8c[307]]= _0xdb8c[308];this[_0xdb8c[309]][_0xdb8c[6]][_0xdb8c[302]]= this[_0xdb8c[27]][_0xdb8c[6]][_0xdb8c[302]];this[_0xdb8c[309]][_0xdb8c[6]][_0xdb8c[305]]= this[_0xdb8c[79]][_0xdb8c[6]][_0xdb8c[305]];this[_0xdb8c[309]][_0xdb8c[6]][_0xdb8c[306]]= _0xe9cax3f+ _0xdb8c[301];this[_0xdb8c[310]][_0xdb8c[6]][_0xdb8c[304]]= this[_0xdb8c[27]][_0xdb8c[6]][_0xdb8c[304]];this[_0xdb8c[310]][_0xdb8c[6]][_0xdb8c[305]]= (_0xe9cax40+ this[_0xdb8c[106]])+ _0xdb8c[301];if(_0xe9cax3c){this[_0xdb8c[23]][_0xdb8c[6]][_0xdb8c[304]]= _0xe9cax3d+ _0xdb8c[301];this[_0xdb8c[25]][_0xdb8c[6]][_0xdb8c[304]]= this[_0xdb8c[23]][_0xdb8c[6]][_0xdb8c[304]];var _0xe9cax42=(_0xe9cax3e- _0xe9cax40- this[_0xdb8c[103]]- this[_0xdb8c[106]]- this[_0xdb8c[104]]- this[_0xdb8c[105]]);this[_0xdb8c[27]][_0xdb8c[6]][_0xdb8c[300]]= _0xe9cax42+ _0xdb8c[301];this[_0xdb8c[26]][_0xdb8c[6]][_0xdb8c[304]]= (_0xe9cax3d- _0xe9cax3f- this[_0xdb8c[103]])+ _0xdb8c[301];var _0xe9cax43=(_0xe9cax3e- this[_0xdb8c[106]]- this[_0xdb8c[104]]- this[_0xdb8c[105]]);this[_0xdb8c[26]][_0xdb8c[6]][_0xdb8c[300]]= _0xe9cax43+ _0xdb8c[301];this[_0xdb8c[28]][_0xdb8c[6]][_0xdb8c[304]]= this[_0xdb8c[23]][_0xdb8c[6]][_0xdb8c[304]];this[_0xdb8c[309]][_0xdb8c[6]][_0xdb8c[300]]= _0xe9cax43+ _0xdb8c[301]}else {this[_0xdb8c[27]][_0xdb8c[6]][_0xdb8c[305]]= (_0xe9cax40+ this[_0xdb8c[103]]+ this[_0xdb8c[106]])+ _0xdb8c[301];this[_0xdb8c[26]][_0xdb8c[6]][_0xdb8c[305]]= this[_0xdb8c[79]][_0xdb8c[6]][_0xdb8c[305]]}};EditorUi[_0xdb8c[10]][_0xdb8c[14]]= function(){this[_0xdb8c[23]]= this[_0xdb8c[312]](_0xdb8c[311]);this[_0xdb8c[25]]= this[_0xdb8c[312]](_0xdb8c[313]);this[_0xdb8c[27]]= this[_0xdb8c[312]](_0xdb8c[314]);this[_0xdb8c[79]]= this[_0xdb8c[312]](_0xdb8c[315]);this[_0xdb8c[26]]= this[_0xdb8c[312]](_0xdb8c[316]);this[_0xdb8c[28]]= this[_0xdb8c[312]](_0xdb8c[317]);this[_0xdb8c[309]]= this[_0xdb8c[312]](_0xdb8c[318]);this[_0xdb8c[310]]= this[_0xdb8c[312]](_0xdb8c[319]);this[_0xdb8c[23]][_0xdb8c[6]][_0xdb8c[302]]= _0xdb8c[320];this[_0xdb8c[23]][_0xdb8c[6]][_0xdb8c[306]]= _0xdb8c[320];this[_0xdb8c[23]][_0xdb8c[6]][_0xdb8c[321]]= _0xdb8c[320];this[_0xdb8c[25]][_0xdb8c[6]][_0xdb8c[306]]= _0xdb8c[320];this[_0xdb8c[25]][_0xdb8c[6]][_0xdb8c[321]]= _0xdb8c[320];this[_0xdb8c[27]][_0xdb8c[6]][_0xdb8c[306]]= _0xdb8c[320];this[_0xdb8c[79]][_0xdb8c[6]][_0xdb8c[306]]= _0xdb8c[320];this[_0xdb8c[26]][_0xdb8c[6]][_0xdb8c[321]]= _0xdb8c[320];this[_0xdb8c[28]][_0xdb8c[6]][_0xdb8c[306]]= _0xdb8c[320];this[_0xdb8c[28]][_0xdb8c[6]][_0xdb8c[321]]= _0xdb8c[320];this[_0xdb8c[28]][_0xdb8c[6]][_0xdb8c[305]]= _0xdb8c[320];this[_0xdb8c[310]][_0xdb8c[6]][_0xdb8c[306]]= _0xdb8c[320];this[_0xdb8c[310]][_0xdb8c[6]][_0xdb8c[300]]= this[_0xdb8c[103]]+ _0xdb8c[301];this[_0xdb8c[309]][_0xdb8c[6]][_0xdb8c[304]]= this[_0xdb8c[103]]+ _0xdb8c[301]};EditorUi[_0xdb8c[10]][_0xdb8c[16]]= function(){this[_0xdb8c[322]]= this[_0xdb8c[13]][_0xdb8c[324]](this[_0xdb8c[312]](_0xdb8c[323]));this[_0xdb8c[23]][_0xdb8c[325]](this[_0xdb8c[322]][_0xdb8c[1]]);this[_0xdb8c[326]]= this[_0xdb8c[328]](this[_0xdb8c[312]](_0xdb8c[327]));this[_0xdb8c[25]][_0xdb8c[325]](this[_0xdb8c[326]][_0xdb8c[1]]);this[_0xdb8c[329]]= this[_0xdb8c[330]](this[_0xdb8c[27]]);this[_0xdb8c[28]][_0xdb8c[325]](this[_0xdb8c[331]]());this[_0xdb8c[332]]= this[_0xdb8c[333]]();this[_0xdb8c[0]][_0xdb8c[33]](_0xdb8c[334],mxUtils[_0xdb8c[20]](this,function(){this[_0xdb8c[336]](this[_0xdb8c[0]][_0xdb8c[335]]())}));this[_0xdb8c[336]](this[_0xdb8c[0]][_0xdb8c[335]]());this[_0xdb8c[322]][_0xdb8c[1]][_0xdb8c[325]](this[_0xdb8c[332]]);this[_0xdb8c[1]][_0xdb8c[325]](this[_0xdb8c[23]]);this[_0xdb8c[1]][_0xdb8c[325]](this[_0xdb8c[25]]);this[_0xdb8c[1]][_0xdb8c[325]](this[_0xdb8c[27]]);this[_0xdb8c[1]][_0xdb8c[325]](this[_0xdb8c[79]]);this[_0xdb8c[1]][_0xdb8c[325]](this[_0xdb8c[26]]);this[_0xdb8c[1]][_0xdb8c[325]](this[_0xdb8c[28]]);this[_0xdb8c[1]][_0xdb8c[325]](this[_0xdb8c[309]]);this[_0xdb8c[1]][_0xdb8c[325]](this[_0xdb8c[310]]);this[_0xdb8c[337]](this[_0xdb8c[309]],true,0,mxUtils[_0xdb8c[20]](this,function(_0xe9cax44){this[_0xdb8c[107]]= _0xe9cax44;this[_0xdb8c[15]]();this[_0xdb8c[0]][_0xdb8c[4]][_0xdb8c[100]]();this[_0xdb8c[0]][_0xdb8c[80]][_0xdb8c[101]](false);this[_0xdb8c[0]][_0xdb8c[80]][_0xdb8c[80]][_0xdb8c[100]]()}));this[_0xdb8c[337]](this[_0xdb8c[310]],false,this[_0xdb8c[106]],mxUtils[_0xdb8c[20]](this,function(_0xe9cax44){this[_0xdb8c[108]]= _0xe9cax44;this[_0xdb8c[15]]();this[_0xdb8c[0]][_0xdb8c[80]][_0xdb8c[101]](false);this[_0xdb8c[0]][_0xdb8c[80]][_0xdb8c[80]][_0xdb8c[100]]()}))};EditorUi[_0xdb8c[10]][_0xdb8c[333]]= function(){var _0xe9cax2=document[_0xdb8c[339]](_0xdb8c[338]);_0xe9cax2[_0xdb8c[340]]= _0xdb8c[341];return _0xe9cax2};EditorUi[_0xdb8c[10]][_0xdb8c[333]]= function(){var _0xe9cax2=document[_0xdb8c[339]](_0xdb8c[338]);_0xe9cax2[_0xdb8c[340]]= _0xdb8c[341];return _0xe9cax2};EditorUi[_0xdb8c[10]][_0xdb8c[336]]= function(_0xe9cax44){this[_0xdb8c[332]][_0xdb8c[342]]= _0xe9cax44};EditorUi[_0xdb8c[10]][_0xdb8c[328]]= function(_0xe9cax2){return new Toolbar(this,_0xe9cax2)};EditorUi[_0xdb8c[10]][_0xdb8c[330]]= function(_0xe9cax2){return new Sidebar(this,_0xe9cax2)};EditorUi[_0xdb8c[10]][_0xdb8c[331]]= function(){return this[_0xdb8c[312]](_0xdb8c[343])};EditorUi[_0xdb8c[10]][_0xdb8c[312]]= function(_0xe9cax45){var _0xe9cax46=document[_0xdb8c[339]](_0xdb8c[344]);_0xe9cax46[_0xdb8c[340]]= _0xe9cax45;return _0xe9cax46};EditorUi[_0xdb8c[10]][_0xdb8c[345]]= function(_0xe9cax45){var _0xe9cax46=document[_0xdb8c[339]](_0xe9cax45);return _0xe9cax46};EditorUi[_0xdb8c[10]][_0xdb8c[346]]= function(_0xe9cax45){var _0xe9cax46=document[_0xdb8c[339]](_0xdb8c[347]);_0xe9cax46[_0xdb8c[340]]= _0xe9cax45;return _0xe9cax46};EditorUi[_0xdb8c[10]][_0xdb8c[337]]= function(_0xe9cax46,_0xe9cax47,_0xe9cax48,_0xe9cax49){var _0xe9cax4a=null;var _0xe9cax4b=null;function _0xe9cax4c(){return parseInt(((_0xe9cax47)?_0xe9cax46[_0xdb8c[6]][_0xdb8c[306]]:_0xe9cax46[_0xdb8c[6]][_0xdb8c[305]]))}function _0xe9cax4d(_0xe9cax6){if(_0xe9cax4a!= null){var _0xe9cax4e= new mxPoint(mxEvent[_0xdb8c[348]](_0xe9cax6),mxEvent[_0xdb8c[349]](_0xe9cax6));_0xe9cax49(Math[_0xdb8c[299]](0,_0xe9cax4b+ ((_0xe9cax47)?(_0xe9cax4e[_0xdb8c[350]]- _0xe9cax4a[_0xdb8c[350]]):(_0xe9cax4a[_0xdb8c[351]]- _0xe9cax4e[_0xdb8c[351]]))- _0xe9cax48));mxEvent[_0xdb8c[74]](_0xe9cax6)}}function _0xe9cax4f(_0xe9cax6){_0xe9cax4d(_0xe9cax6);_0xe9cax4a= null;_0xe9cax4b= null}mxEvent[_0xdb8c[82]](_0xe9cax46,function(_0xe9cax6){_0xe9cax4a= new mxPoint(mxEvent[_0xdb8c[348]](_0xe9cax6),mxEvent[_0xdb8c[349]](_0xe9cax6));_0xe9cax4b= _0xe9cax4c();mxEvent[_0xdb8c[74]](_0xe9cax6)});mxEvent[_0xdb8c[33]](document,_0xdb8c[352],_0xe9cax4d);mxEvent[_0xdb8c[33]](document,_0xdb8c[353],_0xe9cax4d);mxEvent[_0xdb8c[33]](document,_0xdb8c[354],_0xe9cax4f);mxEvent[_0xdb8c[33]](document,_0xdb8c[355],_0xe9cax4f)};EditorUi[_0xdb8c[10]][_0xdb8c[73]]= function(_0xe9cax46,_0xe9cax3d,_0xe9cax3e,_0xe9cax50,_0xe9cax51,_0xe9cax52){this[_0xdb8c[356]]();this[_0xdb8c[357]]= new Dialog(this,_0xe9cax46,_0xe9cax3d,(mxClient[_0xdb8c[358]])?_0xe9cax3e- 12:_0xe9cax3e,_0xe9cax50,_0xe9cax51,_0xe9cax52)};EditorUi[_0xdb8c[10]][_0xdb8c[356]]= function(){if(this[_0xdb8c[357]]!= null){this[_0xdb8c[357]][_0xdb8c[359]]();this[_0xdb8c[357]]= null;this[_0xdb8c[0]][_0xdb8c[4]][_0xdb8c[1]][_0xdb8c[47]]()}};EditorUi[_0xdb8c[10]][_0xdb8c[360]]= function(_0xe9cax53){if(!_0xe9cax53&& this[_0xdb8c[0]][_0xdb8c[125]]!= null){this[_0xdb8c[172]](this[_0xdb8c[0]][_0xdb8c[361]]())}else {this[_0xdb8c[73]]( new SaveDialog(this)[_0xdb8c[1]],300,100,true,true)}};EditorUi[_0xdb8c[10]][_0xdb8c[362]]= function(_0xe9cax53){if(!_0xe9cax53&& this[_0xdb8c[0]][_0xdb8c[125]]!= null){this[_0xdb8c[224]](this[_0xdb8c[0]][_0xdb8c[361]]())}else {}};EditorUi[_0xdb8c[10]][_0xdb8c[363]]= function(_0xe9cax54,_0xe9cax55,_0xe9cax56){var _0xe9cax3=this[_0xdb8c[0]][_0xdb8c[4]];var _0xe9caxb=_0xe9cax3[_0xdb8c[264]]();_0xe9cax55= this[_0xdb8c[364]]!= null?this[_0xdb8c[364]]:_0xe9cax55;_0xe9cax3[_0xdb8c[65]]()[_0xdb8c[365]]();try{_0xe9cax54[_0xdb8c[366]](_0xe9cax3[_0xdb8c[222]](),_0xe9caxb)}catch(e){throw e}finally{if(_0xe9cax55&& navigator[_0xdb8c[368]][_0xdb8c[69]](_0xdb8c[367])< 0){var _0xe9cax57= new mxMorphing(_0xe9cax3);_0xe9cax57[_0xdb8c[33]](mxEvent.DONE,mxUtils[_0xdb8c[20]](this,function(){_0xe9cax3[_0xdb8c[65]]()[_0xdb8c[369]]()}));_0xe9cax57[_0xdb8c[370]]()}else {_0xe9cax3[_0xdb8c[65]]()[_0xdb8c[369]]()}}};EditorUi[_0xdb8c[10]][_0xdb8c[97]]= function(_0xe9cax1){var _0xe9cax3=this[_0xdb8c[0]][_0xdb8c[4]];var _0xe9caxf= new mxKeyHandler(_0xe9cax3);_0xe9caxf[_0xdb8c[371]]= function(_0xe9cax6){return mxEvent[_0xdb8c[371]](_0xe9cax6)|| (mxClient[_0xdb8c[372]]&& _0xe9cax6[_0xdb8c[373]])};function _0xe9cax58(_0xe9cax59){if(!_0xe9cax3[_0xdb8c[245]]()){var _0xe9cax48=0;var _0xe9cax5a=0;if(_0xe9cax59== 37){_0xe9cax48= -1}else {if(_0xe9cax59== 38){_0xe9cax5a= -1}else {if(_0xe9cax59== 39){_0xe9cax48= 1}else {if(_0xe9cax59== 40){_0xe9cax5a= 1}}}};_0xe9cax3[_0xdb8c[374]](_0xe9cax3[_0xdb8c[246]](),_0xe9cax48,_0xe9cax5a);_0xe9cax3[_0xdb8c[375]](_0xe9cax3[_0xdb8c[264]]())}}var _0xe9cax5b=mxUtils[_0xdb8c[20]](this,function(_0xe9cax5c,_0xe9cax5d,_0xe9cax26,_0xe9cax5e){var _0xe9cax5f=this[_0xdb8c[12]][_0xdb8c[112]](_0xe9cax26);if(_0xe9cax5f!= null){var _0xe9cax20=function(){if(_0xe9cax5f[_0xdb8c[376]]){_0xe9cax5f[_0xdb8c[377]]()}};if(_0xe9cax5d){if(_0xe9cax5e){_0xe9caxf[_0xdb8c[378]](_0xe9cax5c,_0xe9cax20)}else {_0xe9caxf[_0xdb8c[379]](_0xe9cax5c,_0xe9cax20)}}else {if(_0xe9cax5e){_0xe9caxf[_0xdb8c[380]](_0xe9cax5c,_0xe9cax20)}else {_0xe9caxf[_0xdb8c[381]](_0xe9cax5c,_0xe9cax20)}}}});var _0xe9cax60=this;var _0xe9cax61=_0xe9caxf[_0xdb8c[382]];_0xe9caxf[_0xdb8c[382]]= function(_0xe9cax6){_0xe9cax60[_0xdb8c[356]]();_0xe9cax61[_0xdb8c[50]](this,arguments)};_0xe9caxf[_0xdb8c[383]]= function(){};_0xe9caxf[_0xdb8c[381]](8,function(){_0xe9cax3[_0xdb8c[384]](true)});_0xe9caxf[_0xdb8c[381]](13,function(){_0xe9cax3[_0xdb8c[384]](false)});_0xe9caxf[_0xdb8c[381]](33,function(){_0xe9cax3[_0xdb8c[288]]()});_0xe9caxf[_0xdb8c[381]](34,function(){_0xe9cax3[_0xdb8c[289]]()});_0xe9caxf[_0xdb8c[381]](36,function(){_0xe9cax3[_0xdb8c[287]]()});_0xe9caxf[_0xdb8c[381]](35,function(){_0xe9cax3[_0xdb8c[15]]()});_0xe9caxf[_0xdb8c[381]](37,function(){_0xe9cax58(37)});_0xe9caxf[_0xdb8c[381]](38,function(){_0xe9cax58(38)});_0xe9caxf[_0xdb8c[381]](39,function(){_0xe9cax58(39)});_0xe9caxf[_0xdb8c[381]](40,function(){_0xe9cax58(40)});_0xe9caxf[_0xdb8c[381]](113,function(){_0xe9cax3[_0xdb8c[70]]()});_0xe9cax5b(46,false,_0xdb8c[247]);_0xe9cax5b(82,true,_0xdb8c[257]);_0xe9cax5b(83,true,_0xdb8c[172]);_0xe9cax5b(83,true,_0xdb8c[180],true);_0xe9cax5b(107,false,_0xdb8c[385]);_0xe9cax5b(109,false,_0xdb8c[386]);_0xe9cax5b(65,true,_0xdb8c[387]);_0xe9cax5b(86,true,_0xdb8c[388],true);_0xe9cax5b(69,true,_0xdb8c[389],true);_0xe9cax5b(69,true,_0xdb8c[390]);_0xe9cax5b(66,true,_0xdb8c[253]);_0xe9cax5b(70,true,_0xdb8c[252]);_0xe9cax5b(68,true,_0xdb8c[248]);_0xe9cax5b(90,true,_0xdb8c[241]);_0xe9cax5b(89,true,_0xdb8c[242]);_0xe9cax5b(88,true,_0xdb8c[115]);_0xe9cax5b(67,true,_0xdb8c[116]);_0xe9cax5b(81,true,_0xdb8c[391]);_0xe9cax5b(86,true,_0xdb8c[111]);_0xe9cax5b(71,true,_0xdb8c[263]);_0xe9cax5b(71,true,_0xdb8c[392],true);_0xe9cax5b(85,true,_0xdb8c[265]);_0xe9cax5b(112,false,_0xdb8c[393]);_0xe9cax5b(80,true,_0xdb8c[224],true);return _0xe9caxf};EditorUi[_0xdb8c[10]][_0xdb8c[58]]= function(_0xe9cax3,_0xe9cax36,_0xe9cax62,_0xe9cax63){for(var _0xe9cax37=0;_0xe9cax37< _0xe9cax36[_0xdb8c[143]];_0xe9cax37++){_0xe9cax3[_0xdb8c[396]]( new mxMultiplicity(true,_0xe9cax36[_0xe9cax37],null,null,_0xe9cax62[_0xe9cax37][0],_0xe9cax62[_0xe9cax37][1],null,mxResources[_0xdb8c[112]](_0xe9cax36[_0xe9cax37])+ _0xdb8c[394]+ _0xe9cax62[_0xe9cax37][0]+ _0xdb8c[395],null));_0xe9cax3[_0xdb8c[396]]( new mxMultiplicity(false,_0xe9cax36[_0xe9cax37],null,null,_0xe9cax63[_0xe9cax37][0],_0xe9cax63[_0xe9cax37][1],null,mxResources[_0xdb8c[112]](_0xe9cax36[_0xe9cax37])+ _0xdb8c[394]+ _0xe9cax63[_0xe9cax37][0]+ _0xdb8c[397],null))}} \ No newline at end of file diff --git a/public/assets/plugins/jscripty/js/Graph.js b/public/assets/plugins/jscripty/js/Graph.js index dda2a33..451a5f2 100644 --- a/public/assets/plugins/jscripty/js/Graph.js +++ b/public/assets/plugins/jscripty/js/Graph.js @@ -1,644 +1 @@ -/** - * $Id: Graph.js,v 1.14 2013-02-16 10:19:54 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Constructs a new graph instance. Note that the constructor does not take a - * container because the graph instance is needed for creating the UI, which - * in turn will create the container for the graph. Hence, the container is - * assigned later in EditorUi. - */ -Graph = function(container, model, renderHint, stylesheet) { - mxGraph.call(this, container, model, renderHint, stylesheet); - - this.setConnectable(true); - this.setDropEnabled(false); - this.setPanning(true); - this.setTooltips(!mxClient.IS_TOUCH); - this.setAllowLoops(false); - this.setMultigraph(false); - this.allowAutoPanning = true; - this.resetEdgesOnConnect = false; - this.constrainChildren = false; - - // Centers the port icon on the target port - this.connectionHandler.targetConnectImage = true; - - // Does not allow dangling edges - this.setAllowDanglingEdges(false); - - // Enables cloning of connection sources - this.connectionHandler.setCreateTarget(false); - - // Disables built-in connection starts - this.connectionHandler.isValidSource = function() { - return mxConnectionHandler.prototype.isValidSource.apply(this, arguments) && urlParams['connect'] != '2'; - }; - - // Sets the style to be used when an elbow edge is double clicked - this.alternateEdgeStyle = 'vertical'; - - if (stylesheet == null) { - this.loadStylesheet(); - } - - // Creates rubberband selection - var rubberband = new mxRubberband(this); - - this.getRubberband = function() { - return rubberband; - }; - - // Shows hand cursor while panning - this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function() { - this.container.style.cursor = 'pointer'; - })); - - this.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function() { - this.container.style.cursor = 'default'; - })); - - // Adds support for HTML labels via style. Note: Currently, only the Java - // backend supports HTML labels but CSS support is limited to the following: - // http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html - this.isHtmlLabel = function(cell) { - var state = this.view.getState(cell); - var style = (state != null) ? state.style : this.getCellStyle(cell); - - return style['html'] == '1' || style['whiteSpace'] == 'wrap'; - }; - - // HTML entities are displayed as plain text in wrapped plain text labels - this.cellRenderer.getLabelValue = function(state) { - var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments); - - if (state.style['whiteSpace'] == 'wrap' && state.style['html'] != 1) { - result = mxUtils.htmlEntities(result, false); - } - - return result; - }; - - // Unlocks all cells - this.isCellLocked = function(cell) { - return false; - }; - - // Tap and hold brings up context menu. - // Tolerance slightly below graph tolerance is better. - this.connectionHandler.tapAndHoldTolerance = 16; - - // Tap and hold on background starts rubberband on cell starts connecting - var connectionHandlerTapAndHold = this.connectionHandler.tapAndHold; - this.connectionHandler.tapAndHold = function(me, state) { - if (state == null) { - if (!this.graph.panningHandler.active) { - rubberband.start(me.getGraphX(), me.getGraphY()); - this.graph.panningHandler.panningTrigger = false; - } - } else if (tapAndHoldStartsConnection) { - connectionHandlerTapAndHold.apply(this, arguments); - } else if (this.graph.isCellSelected(state.cell) && this.graph.getSelectionCount() > 1) { - this.graph.removeSelectionCell(state.cell); - } - }; - - if (touchStyle) { - this.initTouch(); - } -}; - -// Graph inherits from mxGraph -mxUtils.extend(Graph, mxGraph); - -/** - * Allows to all values in fit. - */ -Graph.prototype.minFitScale = null; - -/** - * Allows to all values in fit. - */ -Graph.prototype.maxFitScale = null; - -/** - * Loads the stylesheet for this graph. - */ -Graph.prototype.loadStylesheet = function() { - var node = mxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement(); - var dec = new mxCodec(node.ownerDocument); - dec.decode(node, this.getStylesheet()); -}; - -/** - * Inverts the elbow edge style without removing existing styles. - */ -Graph.prototype.flipEdge = function(edge) { - if (edge != null) { - var state = this.view.getState(edge); - var style = (state != null) ? state.style : this.getCellStyle(edge); - - if (style != null) { - var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW, - mxConstants.ELBOW_HORIZONTAL); - var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ? - mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL; - this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]); - } - } -}; - -/** - * Sets the default edge for future connections. - */ -Graph.prototype.setDefaultEdge = function(cell) { - if (cell != null && this.getModel().isEdge(cell)) { - // Take a snapshot of the cell at the moment of calling - var proto = this.getModel().cloneCells([cell])[0]; - - // Delete existing points - if (proto.geometry != null) { - proto.geometry.points = null; - } - - // Delete entry-/exitXY styles - var style = proto.getStyle(); - style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_X, null); - style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_Y, null); - style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_X, null); - style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_Y, null); - proto.setStyle(style); - - // Uses edge template for connect preview - this.connectionHandler.createEdgeState = function(me) { - return this.graph.view.createState(proto); - }; - - // Creates new connections from edge template - this.connectionHandler.factoryMethod = function() { - return this.graph.cloneCells([proto])[0]; - }; - } -}; - -/** - * Disables folding for non-swimlanes. - */ -Graph.prototype.isCellFoldable = function(cell) { - return this.foldingEnabled && this.isSwimlane(cell); -}; - -/** - * Disables drill-down for non-swimlanes. - */ -Graph.prototype.isValidRoot = function(cell) { - return this.isSwimlane(cell); -}; - -/** - * Overrides createGroupCell to set the group style for new groups to 'group'. - */ -Graph.prototype.createGroupCell = function() { - var group = mxGraph.prototype.createGroupCell.apply(this, arguments); - group.setStyle('group'); - - return group; -}; - -/** - * Giuseppe Careri - * Overrides tooltips to show position and size - */ -Graph.prototype.getTooltipForCell = function(cell) { - var tip = ''; - - if (this.getModel().isVertex(cell)) { - // var geo = this.getCellGeometry(cell); - - // var f2 = function(x) - // { - // return Math.round(parseFloat(x) * 100) / 100; - // }; - - // if (geo != null) - // { - // if (tip == null) - // { - // tip = ''; - // } - // else if (tip.length > 0) - // { - // tip += '\n'; - // } - - // tip += 'X: ' + f2(geo.x) + '\nY: ' + f2(geo.y) + '\nW: ' + f2(geo.width) + '\nH: ' + f2(geo.height); - // } - - tip += mxResources.get('description_' + cell.value.nodeName) || ''; - } else if (this.getModel().isEdge(cell)) { - tip = mxGraph.prototype.getTooltipForCell.apply(this, arguments); - } - - return tip; -}; - -/** - * Giuseppe Careri - * Returns the label for the given cell. - */ -Graph.prototype.convertValueToString = function(cell) { - if (cell.value != null && typeof(cell.value) == 'object') { - return cell.value.getAttribute('label'); - } - - return mxGraph.prototype.convertValueToString.apply(this, arguments); -}; - -/** - * Giuseppe Careri - * Handles label changes for XML user objects. - */ -Graph.prototype.cellLabelChanged = function(cell, value, autoSize) { - if (cell.value != null && typeof(cell.value) == 'object') { - var tmp = cell.value.cloneNode(true); - tmp.setAttribute('label', value); - value = tmp; - } - - mxGraph.prototype.cellLabelChanged.apply(this, arguments); -}; - -/** - * Sets the link for the given cell. - */ -Graph.prototype.setLinkForCell = function(cell, link) { - var value = null; - - if (cell.value != null && typeof(cell.value) == 'object') { - value = cell.value.cloneNode(true); - } else { - var doc = mxUtils.createXmlDocument(); - - value = doc.createElement('UserObject'); - value.setAttribute('label', cell.value); - } - - if (link != null && link.length > 0) { - value.setAttribute('link', link); - } else { - value.removeAttribute('link'); - } - - this.model.setValue(cell, value); -}; - -/** - * Returns the link for the given cell. - */ -Graph.prototype.getLinkForCell = function(cell) { - if (cell.value != null && typeof(cell.value) == 'object') { - return cell.value.getAttribute('link'); - } - - return null; -}; - -/** - * Customized graph for touch devices. - */ -Graph.prototype.initTouch = function() { - // Disables new connections via "hotspot" - this.connectionHandler.marker.isEnabled = function() { - return this.graph.connectionHandler.first != null; - }; - - // Hides menu when editing starts - this.addListener(mxEvent.START_EDITING, function(sender, evt) { - this.panningHandler.hideMenu(); - }); - - // Context menu for touchstyle - var showMenu = false; - var menuCell = null; - - // Checks if native hit detection did not return anything and does custom - // hit detection for edges to take into account the tolerance - this.updateMouseEvent = function(me) { - mxGraph.prototype.updateMouseEvent.apply(this, arguments); - - if (me.getState() == null) { - var cell = this.getCellAt(me.graphX, me.graphY); - - if (this.getModel().isEdge(cell)) { - me.state = this.view.getState(cell); - - if (me.state != null && me.state.shape != null) { - this.container.style.cursor = me.state.shape.node.style.cursor; - } - } - } - - if (me.getState() == null) { - this.container.style.cursor = 'default'; - } - }; - - // Handles popup menu on touch devices (tap selected cell) - this.fireMouseEvent = function(evtName, me, sender) { - if (evtName == mxEvent.MOUSE_DOWN) { - if (!this.panningHandler.isMenuShowing()) { - menuCell = me.getCell(); - showMenu = (menuCell != null) ? this.isCellSelected(menuCell) : this.isSelectionEmpty(); - } else { - showMenu = false; - menuCell = null; - } - } else if (evtName == mxEvent.MOUSE_UP) { - if (showMenu && !this.isEditing()) { - if (!this.panningHandler.isMenuShowing()) { - var x = mxEvent.getClientX(me.getEvent()); - var y = mxEvent.getClientY(me.getEvent()); - - this.panningHandler.popup(x + 16, y, menuCell, me.getEvent()); - } - - showMenu = false; - menuCell = null; - me.consume(); - - return; - } - - showMenu = false; - menuCell = null; - } - - mxGraph.prototype.fireMouseEvent.apply(this, arguments); - - if (evtName == mxEvent.MOUSE_MOVE && me.isConsumed()) { - showMenu = false; - menuCell = null; - } - }; -}; - -/** - * Implements touch devices. - */ -(function() { - // Enables rotation handle - mxVertexHandler.prototype.rotationEnabled = true; - - // Matches label positions of mxGraph 1.x - mxText.prototype.baseSpacingTop = 5; - mxText.prototype.baseSpacingBottom = 1; - - // Touch-specific static overrides - if (touchStyle) { - // Sets constants for touch style - mxConstants.HANDLE_SIZE = 16; - mxConstants.LABEL_HANDLE_SIZE = 7; - - // Larger tolerance and grid for real touch devices - if (mxClient.IS_TOUCH) { - mxVertexHandler.prototype.tolerance = 4; - mxEdgeHandler.prototype.tolerance = 6; - Graph.prototype.tolerance = 14; - Graph.prototype.gridSize = 20; - - // One finger pans (no rubberband selection) must start regardless of mouse button - mxPanningHandler.prototype.selectOnPopup = false; - mxPanningHandler.prototype.useLeftButtonForPanning = true; - mxPanningHandler.prototype.isPanningTrigger = function(me) { - var evt = me.getEvent(); - - return (this.useLeftButtonForPanning && (this.ignoreCell || me.getState() == null) - /* && - mxEvent.isLeftMouseButton(evt)*/ - ) || (mxEvent.isControlDown(evt) && - mxEvent.isShiftDown(evt)) || (this.usePopupTrigger && - mxEvent.isPopupTrigger(evt)); - }; - } - - // Don't clear selection if multiple cells selected - var graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown; - mxGraphHandler.prototype.mouseDown = function(sender, me) { - graphHandlerMouseDown.apply(this, arguments); - - if (this.graph.isCellSelected(me.getCell()) && this.graph.getSelectionCount() > 1) { - this.delayedSelection = false; - } - }; - - // Changes order of panninghandler - Graph.prototype.createHandlers = function(container) { - this.tooltipHandler = new mxTooltipHandler(this); - this.tooltipHandler.setEnabled(false); - // Selection cells first - this.selectionCellsHandler = new mxSelectionCellsHandler(this); - this.panningHandler = new mxPanningHandler(this); - this.panningHandler.panningEnabled = false; - this.connectionHandler = new mxConnectionHandler(this); - this.connectionHandler.setEnabled(false); - this.graphHandler = new mxGraphHandler(this); - }; - - // On connect the target is selected and we clone the cell of the preview edge for insert - mxConnectionHandler.prototype.selectCells = function(edge, target) { - if (touchStyle && target != null) { - this.graph.setSelectionCell(target); - } else { - this.graph.setSelectionCell(edge); - } - }; - - // Overrides double click handling to use the tolerance - // FIXME: Double click on edges in iPad needs focus on textarea - var graphDblClick = mxGraph.prototype.dblClick; - Graph.prototype.dblClick = function(evt, cell) { - if (cell == null) { - var pt = mxUtils.convertPoint(this.container, - mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - cell = this.getCellAt(pt.x, pt.y); - } - - graphDblClick.call(this, evt, cell); - }; - - // Rounded edge and vertex handles - var touchHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16); - mxVertexHandler.prototype.handleImage = touchHandle; - mxEdgeHandler.prototype.handleImage = touchHandle; - mxOutline.prototype.sizerImage = touchHandle; - - // Pre-fetches touch handle - new Image().src = touchHandle.src; - - // Adds connect icon to selected vertices - var connectorSrc = IMAGE_PATH + '/touch-connector.png'; - - var vertexHandlerInit = mxVertexHandler.prototype.init; - mxVertexHandler.prototype.init = function() { - vertexHandlerInit.apply(this, arguments); - - // Only show connector image on one cell and do not show on containers - if (showConnectorImg && this.graph.connectionHandler.isEnabled() && - this.graph.isCellConnectable(this.state.cell) && - !this.graph.isValidRoot(this.state.cell) && - this.graph.getSelectionCount() == 1) { - this.connectorImg = mxUtils.createImage(connectorSrc); - this.connectorImg.style.cursor = 'pointer'; - this.connectorImg.style.width = '29px'; - this.connectorImg.style.height = '29px'; - this.connectorImg.style.position = 'absolute'; - - if (!mxClient.IS_TOUCH) { - this.connectorImg.setAttribute('title', mxResources.get('connect')); - mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state); - } - - // Adds 2px tolerance - this.connectorImg.style.padding = '2px'; - - // Starts connecting on touch/mouse down - mxEvent.addGestureListeners(this.connectorImg, - mxUtils.bind(this, function(evt) { - this.graph.panningHandler.hideMenu(); - var pt = mxUtils.convertPoint(this.graph.container, - mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - this.graph.connectionHandler.start(this.state, pt.x, pt.y); - this.graph.isMouseDown = true; - mxEvent.consume(evt); - }) - ); - - this.graph.container.appendChild(this.connectorImg); - } - - this.redrawTools(); - }; - - var vertexHandlerRedraw = mxVertexHandler.prototype.redraw; - mxVertexHandler.prototype.redraw = function() { - vertexHandlerRedraw.apply(this); - this.redrawTools(); - }; - - mxVertexHandler.prototype.redrawTools = function() { - if (this.state != null && this.connectorImg != null) { - // Top right for single-sizer - if (mxVertexHandler.prototype.singleSizer) { - this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px'; - this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px'; - } else { - this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 4 /* - 2 padding*/ ) + 'px'; - this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px'; - } - } - }; - - var vertexHandlerDestroy = mxVertexHandler.prototype.destroy; - mxVertexHandler.prototype.destroy = function(sender, me) { - vertexHandlerDestroy.apply(this, arguments); - - if (this.connectorImg != null) { - this.connectorImg.parentNode.removeChild(this.connectorImg); - this.connectorImg = null; - } - }; - - // Pre-fetches touch connector - new Image().src = connectorSrc; - } else { - var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15); - mxConnectionHandler.prototype.connectImage = img; - - // Pre-fetches img - new Image().src = img.src; - - if (urlParams['connect'] == '2') // not touchStyle - { - var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15); - - var vertexHandlerInit = mxVertexHandler.prototype.init; - mxVertexHandler.prototype.init = function() { - vertexHandlerInit.apply(this, arguments); - - // Only show connector image on one cell and do not show on containers - if (showConnectorImg && this.graph.connectionHandler.isEnabled() && - this.graph.isCellConnectable(this.state.cell) && - !this.graph.isValidRoot(this.state.cell) && - this.graph.getSelectionCount() == 1) { - // Workaround for event redirection via image tag in quirks and IE8 - if (mxClient.IS_IE && !mxClient.IS_SVG) { - this.connectorImg = document.createElement('div'); - this.connectorImg.style.backgroundImage = 'url(' + img.src + ')'; - this.connectorImg.style.backgroundPosition = 'center'; - this.connectorImg.style.backgroundRepeat = 'no-repeat'; - this.connectorImg.style.width = (img.width + 4) + 'px'; - this.connectorImg.style.height = (img.height + 4) + 'px'; - this.connectorImg.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block'; - } else { - this.connectorImg = mxUtils.createImage(img.src); - this.connectorImg.style.width = img.width + 'px'; - this.connectorImg.style.height = img.height + 'px'; - } - - this.connectorImg.style.cursor = 'pointer'; - this.connectorImg.style.position = 'absolute'; - this.connectorImg.setAttribute('title', mxResources.get('connect')); - mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state); - - // Adds 2px tolerance - this.connectorImg.style.padding = '2px'; - - // Starts connecting on touch/mouse down - mxEvent.addListener(this.connectorImg, 'mousedown', - mxUtils.bind(this, function(evt) { - this.graph.panningHandler.hideMenu(); - var pt = mxUtils.convertPoint(this.graph.container, - mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - this.graph.connectionHandler.start(this.state, pt.x, pt.y); - this.graph.isMouseDown = true; - mxEvent.consume(evt); - }) - ); - - this.graph.container.appendChild(this.connectorImg); - } - - this.redrawTools(); - }; - - var vertexHandlerRedraw = mxVertexHandler.prototype.redraw; - mxVertexHandler.prototype.redraw = function() { - vertexHandlerRedraw.apply(this); - this.redrawTools(); - }; - - mxVertexHandler.prototype.redrawTools = function() { - if (this.state != null && this.connectorImg != null) { - // Top right for single-sizer - if (mxVertexHandler.prototype.singleSizer) { - this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px'; - this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px'; - } else { - this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 2 /* - 2 padding*/ ) + 'px'; - this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px'; - } - } - }; - - var vertexHandlerDestroy = mxVertexHandler.prototype.destroy; - mxVertexHandler.prototype.destroy = function(sender, me) { - vertexHandlerDestroy.apply(this, arguments); - - if (this.connectorImg != null) { - this.connectorImg.parentNode.removeChild(this.connectorImg); - this.connectorImg = null; - } - }; - } - } -})(); +var _0x4441=["\x63\x61\x6C\x6C","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x61\x6C\x6C\x6F\x77\x41\x75\x74\x6F\x50\x61\x6E\x6E\x69\x6E\x67","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x43\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x74\x61\x72\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x69\x73\x56\x61\x6C\x69\x64\x53\x6F\x75\x72\x63\x65","\x61\x70\x70\x6C\x79","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x32","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6C\x6F\x61\x64\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x67\x65\x74\x52\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x63\x75\x72\x73\x6F\x72","\x73\x74\x79\x6C\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x65\x66\x61\x75\x6C\x74","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x76\x69\x65\x77","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x68\x74\x6D\x6C","\x31","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x77\x72\x61\x70","\x67\x65\x74\x4C\x61\x62\x65\x6C\x56\x61\x6C\x75\x65","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x68\x74\x6D\x6C\x45\x6E\x74\x69\x74\x69\x65\x73","\x69\x73\x43\x65\x6C\x6C\x4C\x6F\x63\x6B\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64","\x61\x63\x74\x69\x76\x65","\x67\x72\x61\x70\x68","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x73\x74\x61\x72\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x63\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x69\x6E\x69\x74\x54\x6F\x75\x63\x68","\x65\x78\x74\x65\x6E\x64","\x6D\x69\x6E\x46\x69\x74\x53\x63\x61\x6C\x65","\x6D\x61\x78\x46\x69\x74\x53\x63\x61\x6C\x65","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x2F\x64\x65\x66\x61\x75\x6C\x74\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x64\x65\x63\x6F\x64\x65","\x66\x6C\x69\x70\x45\x64\x67\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x45\x4C\x42\x4F\x57\x5F\x48\x4F\x52\x49\x5A\x4F\x4E\x54\x41\x4C","\x45\x4C\x42\x4F\x57\x5F\x56\x45\x52\x54\x49\x43\x41\x4C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x73","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x70\x6F\x69\x6E\x74\x73","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x69\x73\x43\x65\x6C\x6C\x46\x6F\x6C\x64\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70\x43\x65\x6C\x6C","\x67\x72\x6F\x75\x70","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x43\x65\x6C\x6C","","\x69\x73\x56\x65\x72\x74\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x5F","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x67\x65\x74","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x6F\x62\x6A\x65\x63\x74","\x6C\x61\x62\x65\x6C","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x65\x6C\x6C\x4C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x55\x73\x65\x72\x4F\x62\x6A\x65\x63\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6E\x6B","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x56\x61\x6C\x75\x65","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x6D\x61\x72\x6B\x65\x72","\x66\x69\x72\x73\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x75\x70\x64\x61\x74\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x67\x72\x61\x70\x68\x58","\x67\x72\x61\x70\x68\x59","\x67\x65\x74\x43\x65\x6C\x6C\x41\x74","\x73\x74\x61\x74\x65","\x73\x68\x61\x70\x65","\x6E\x6F\x64\x65","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x69\x73\x4D\x65\x6E\x75\x53\x68\x6F\x77\x69\x6E\x67","\x67\x65\x74\x43\x65\x6C\x6C","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x4D\x4F\x55\x53\x45\x5F\x55\x50","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x67\x65\x74\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x4D\x4F\x55\x53\x45\x5F\x4D\x4F\x56\x45","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x73\x65\x6C\x65\x63\x74\x4F\x6E\x50\x6F\x70\x75\x70","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x69\x67\x6E\x6F\x72\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E","\x75\x73\x65\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x64\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x6F\x6E\x76\x65\x72\x74\x50\x6F\x69\x6E\x74","\x78","\x79","\x2F\x74\x6F\x75\x63\x68\x2D\x68\x61\x6E\x64\x6C\x65\x2E\x70\x6E\x67","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x69\x7A\x65\x72\x49\x6D\x61\x67\x65","\x73\x72\x63","\x2F\x74\x6F\x75\x63\x68\x2D\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x69\x6E\x69\x74","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x49\x6D\x67","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x32\x39\x70\x78","\x68\x65\x69\x67\x68\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x74\x69\x74\x6C\x65","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x70\x61\x64\x64\x69\x6E\x67","\x32\x70\x78","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x72\x65\x64\x72\x61\x77\x54\x6F\x6F\x6C\x73","\x72\x65\x64\x72\x61\x77","\x73\x69\x6E\x67\x6C\x65\x53\x69\x7A\x65\x72","\x6C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x78","\x74\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x49\x53\x5F\x49\x45","\x49\x53\x5F\x53\x56\x47","\x64\x69\x76","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x65\x6E\x74\x65\x72","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x64\x69\x73\x70\x6C\x61\x79","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x69\x6E\x6C\x69\x6E\x65","\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E"];Graph= function(_0xb13ax1,_0xb13ax2,_0xb13ax3,_0xb13ax4){mxGraph[_0x4441[0]](this,_0xb13ax1,_0xb13ax2,_0xb13ax3,_0xb13ax4);this[_0x4441[1]](true);this[_0x4441[2]](false);this[_0x4441[3]](true);this[_0x4441[4]](!mxClient.IS_TOUCH);this[_0x4441[5]](false);this[_0x4441[6]](false);this[_0x4441[7]]= true;this[_0x4441[8]]= false;this[_0x4441[9]]= false;this[_0x4441[11]][_0x4441[10]]= true;this[_0x4441[12]](false);this[_0x4441[11]][_0x4441[13]](false);this[_0x4441[11]][_0x4441[14]]= function(){return mxConnectionHandler[_0x4441[16]][_0x4441[14]][_0x4441[15]](this,arguments)&& urlParams[_0x4441[17]]!= _0x4441[18]};this[_0x4441[19]]= _0x4441[20];if(_0xb13ax4== null){this[_0x4441[21]]()};var _0xb13ax5= new mxRubberband(this);this[_0x4441[22]]= function(){return _0xb13ax5};this[_0x4441[29]][_0x4441[28]](mxEvent.PAN_START,mxUtils[_0x4441[27]](this,function(){this[_0x4441[25]][_0x4441[24]][_0x4441[23]]= _0x4441[26]}));this[_0x4441[29]][_0x4441[28]](mxEvent.PAN_END,mxUtils[_0x4441[27]](this,function(){this[_0x4441[25]][_0x4441[24]][_0x4441[23]]= _0x4441[30]}));this[_0x4441[31]]= function(_0xb13ax6){var _0xb13ax7=this[_0x4441[33]][_0x4441[32]](_0xb13ax6);var _0xb13ax8=(_0xb13ax7!= null)?_0xb13ax7[_0x4441[24]]:this[_0x4441[34]](_0xb13ax6);return _0xb13ax8[_0x4441[35]]== _0x4441[36]|| _0xb13ax8[_0x4441[37]]== _0x4441[38]};this[_0x4441[40]][_0x4441[39]]= function(_0xb13ax7){var _0xb13ax9=mxCellRenderer[_0x4441[16]][_0x4441[39]][_0x4441[15]](this,arguments);if(_0xb13ax7[_0x4441[24]][_0x4441[37]]== _0x4441[38]&& _0xb13ax7[_0x4441[24]][_0x4441[35]]!= 1){_0xb13ax9= mxUtils[_0x4441[41]](_0xb13ax9,false)};return _0xb13ax9};this[_0x4441[42]]= function(_0xb13ax6){return false};this[_0x4441[11]][_0x4441[43]]= 16;var _0xb13axa=this[_0x4441[11]][_0x4441[44]];this[_0x4441[11]][_0x4441[44]]= function(_0xb13axb,_0xb13ax7){if(_0xb13ax7== null){if(!this[_0x4441[46]][_0x4441[29]][_0x4441[45]]){_0xb13ax5[_0x4441[49]](_0xb13axb[_0x4441[47]](),_0xb13axb[_0x4441[48]]());this[_0x4441[46]][_0x4441[29]][_0x4441[50]]= false}}else {if(tapAndHoldStartsConnection){_0xb13axa[_0x4441[15]](this,arguments)}else {if(this[_0x4441[46]][_0x4441[52]](_0xb13ax7[_0x4441[51]])&& this[_0x4441[46]][_0x4441[53]]()> 1){this[_0x4441[46]][_0x4441[54]](_0xb13ax7[_0x4441[51]])}}}};if(touchStyle){this[_0x4441[55]]()}};mxUtils[_0x4441[56]](Graph,mxGraph);Graph[_0x4441[16]][_0x4441[57]]= null;Graph[_0x4441[16]][_0x4441[58]]= null;Graph[_0x4441[16]][_0x4441[21]]= function(){var _0xb13axc=mxUtils[_0x4441[61]](STYLE_PATH+ _0x4441[60])[_0x4441[59]]();var _0xb13axd= new mxCodec(_0xb13axc[_0x4441[62]]);_0xb13axd[_0x4441[64]](_0xb13axc,this[_0x4441[63]]())};Graph[_0x4441[16]][_0x4441[65]]= function(_0xb13axe){if(_0xb13axe!= null){var _0xb13ax7=this[_0x4441[33]][_0x4441[32]](_0xb13axe);var _0xb13ax8=(_0xb13ax7!= null)?_0xb13ax7[_0x4441[24]]:this[_0x4441[34]](_0xb13axe);if(_0xb13ax8!= null){var _0xb13axf=mxUtils[_0x4441[66]](_0xb13ax8,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL);var _0xb13ax10=(_0xb13axf== mxConstants[_0x4441[67]])?mxConstants[_0x4441[68]]:mxConstants[_0x4441[67]];this[_0x4441[69]](mxConstants.STYLE_ELBOW,_0xb13ax10,[_0xb13axe])}}};Graph[_0x4441[16]][_0x4441[70]]= function(_0xb13ax6){if(_0xb13ax6!= null&& this[_0x4441[72]]()[_0x4441[71]](_0xb13ax6)){var _0xb13ax11=this[_0x4441[72]]()[_0x4441[73]]([_0xb13ax6])[0];if(_0xb13ax11[_0x4441[74]]!= null){_0xb13ax11[_0x4441[74]][_0x4441[75]]= null};var _0xb13ax8=_0xb13ax11[_0x4441[76]]();_0xb13ax8= mxUtils[_0x4441[77]](_0xb13ax8,mxConstants.STYLE_ENTRY_X,null);_0xb13ax8= mxUtils[_0x4441[77]](_0xb13ax8,mxConstants.STYLE_ENTRY_Y,null);_0xb13ax8= mxUtils[_0x4441[77]](_0xb13ax8,mxConstants.STYLE_EXIT_X,null);_0xb13ax8= mxUtils[_0x4441[77]](_0xb13ax8,mxConstants.STYLE_EXIT_Y,null);_0xb13ax11[_0x4441[77]](_0xb13ax8);this[_0x4441[11]][_0x4441[78]]= function(_0xb13axb){return this[_0x4441[46]][_0x4441[33]][_0x4441[79]](_0xb13ax11)};this[_0x4441[11]][_0x4441[80]]= function(){return this[_0x4441[46]][_0x4441[73]]([_0xb13ax11])[0]}}};Graph[_0x4441[16]][_0x4441[81]]= function(_0xb13ax6){return this[_0x4441[82]]&& this[_0x4441[83]](_0xb13ax6)};Graph[_0x4441[16]][_0x4441[84]]= function(_0xb13ax6){return this[_0x4441[83]](_0xb13ax6)};Graph[_0x4441[16]][_0x4441[85]]= function(){var _0xb13ax12=mxGraph[_0x4441[16]][_0x4441[85]][_0x4441[15]](this,arguments);_0xb13ax12[_0x4441[77]](_0x4441[86]);return _0xb13ax12};Graph[_0x4441[16]][_0x4441[87]]= function(_0xb13ax6){var _0xb13ax13=_0x4441[88];if(this[_0x4441[72]]()[_0x4441[89]](_0xb13ax6)){_0xb13ax13+= mxResources[_0x4441[93]](_0x4441[90]+ _0xb13ax6[_0x4441[92]][_0x4441[91]])|| _0x4441[88]}else {if(this[_0x4441[72]]()[_0x4441[71]](_0xb13ax6)){_0xb13ax13= mxGraph[_0x4441[16]][_0x4441[87]][_0x4441[15]](this,arguments)}};return _0xb13ax13};Graph[_0x4441[16]][_0x4441[94]]= function(_0xb13ax6){if(_0xb13ax6[_0x4441[92]]!= null&& typeof (_0xb13ax6[_0x4441[92]])== _0x4441[95]){return _0xb13ax6[_0x4441[92]][_0x4441[97]](_0x4441[96])};return mxGraph[_0x4441[16]][_0x4441[94]][_0x4441[15]](this,arguments)};Graph[_0x4441[16]][_0x4441[98]]= function(_0xb13ax6,_0xb13ax10,_0xb13ax14){if(_0xb13ax6[_0x4441[92]]!= null&& typeof (_0xb13ax6[_0x4441[92]])== _0x4441[95]){var _0xb13ax15=_0xb13ax6[_0x4441[92]][_0x4441[99]](true);_0xb13ax15[_0x4441[100]](_0x4441[96],_0xb13ax10);_0xb13ax10= _0xb13ax15};mxGraph[_0x4441[16]][_0x4441[98]][_0x4441[15]](this,arguments)};Graph[_0x4441[16]][_0x4441[101]]= function(_0xb13ax6,_0xb13ax16){var _0xb13ax10=null;if(_0xb13ax6[_0x4441[92]]!= null&& typeof (_0xb13ax6[_0x4441[92]])== _0x4441[95]){_0xb13ax10= _0xb13ax6[_0x4441[92]][_0x4441[99]](true)}else {var _0xb13ax17=mxUtils[_0x4441[102]]();_0xb13ax10= _0xb13ax17[_0x4441[104]](_0x4441[103]);_0xb13ax10[_0x4441[100]](_0x4441[96],_0xb13ax6[_0x4441[92]])};if(_0xb13ax16!= null&& _0xb13ax16[_0x4441[105]]> 0){_0xb13ax10[_0x4441[100]](_0x4441[106],_0xb13ax16)}else {_0xb13ax10[_0x4441[107]](_0x4441[106])};this[_0x4441[109]][_0x4441[108]](_0xb13ax6,_0xb13ax10)};Graph[_0x4441[16]][_0x4441[110]]= function(_0xb13ax6){if(_0xb13ax6[_0x4441[92]]!= null&& typeof (_0xb13ax6[_0x4441[92]])== _0x4441[95]){return _0xb13ax6[_0x4441[92]][_0x4441[97]](_0x4441[106])};return null};Graph[_0x4441[16]][_0x4441[55]]= function(){this[_0x4441[11]][_0x4441[112]][_0x4441[111]]= function(){return this[_0x4441[46]][_0x4441[11]][_0x4441[113]]!= null};this[_0x4441[28]](mxEvent.START_EDITING,function(_0xb13ax18,_0xb13ax19){this[_0x4441[29]][_0x4441[114]]()});var _0xb13ax1a=false;var _0xb13ax1b=null;this[_0x4441[115]]= function(_0xb13axb){mxGraph[_0x4441[16]][_0x4441[115]][_0x4441[15]](this,arguments);if(_0xb13axb[_0x4441[32]]()== null){var _0xb13ax6=this[_0x4441[118]](_0xb13axb[_0x4441[116]],_0xb13axb[_0x4441[117]]);if(this[_0x4441[72]]()[_0x4441[71]](_0xb13ax6)){_0xb13axb[_0x4441[119]]= this[_0x4441[33]][_0x4441[32]](_0xb13ax6);if(_0xb13axb[_0x4441[119]]!= null&& _0xb13axb[_0x4441[119]][_0x4441[120]]!= null){this[_0x4441[25]][_0x4441[24]][_0x4441[23]]= _0xb13axb[_0x4441[119]][_0x4441[120]][_0x4441[121]][_0x4441[24]][_0x4441[23]]}}};if(_0xb13axb[_0x4441[32]]()== null){this[_0x4441[25]][_0x4441[24]][_0x4441[23]]= _0x4441[30]}};this[_0x4441[122]]= function(_0xb13ax1c,_0xb13axb,_0xb13ax18){if(_0xb13ax1c== mxEvent[_0x4441[123]]){if(!this[_0x4441[29]][_0x4441[124]]()){_0xb13ax1b= _0xb13axb[_0x4441[125]]();_0xb13ax1a= (_0xb13ax1b!= null)?this[_0x4441[52]](_0xb13ax1b):this[_0x4441[126]]()}else {_0xb13ax1a= false;_0xb13ax1b= null}}else {if(_0xb13ax1c== mxEvent[_0x4441[127]]){if(_0xb13ax1a&& !this[_0x4441[128]]()){if(!this[_0x4441[29]][_0x4441[124]]()){var _0xb13ax1d=mxEvent[_0x4441[130]](_0xb13axb[_0x4441[129]]());var _0xb13ax1e=mxEvent[_0x4441[131]](_0xb13axb[_0x4441[129]]());this[_0x4441[29]][_0x4441[132]](_0xb13ax1d+ 16,_0xb13ax1e,_0xb13ax1b,_0xb13axb[_0x4441[129]]())};_0xb13ax1a= false;_0xb13ax1b= null;_0xb13axb[_0x4441[133]]();return};_0xb13ax1a= false;_0xb13ax1b= null}};mxGraph[_0x4441[16]][_0x4441[122]][_0x4441[15]](this,arguments);if(_0xb13ax1c== mxEvent[_0x4441[134]]&& _0xb13axb[_0x4441[135]]()){_0xb13ax1a= false;_0xb13ax1b= null}}};(function(){mxVertexHandler[_0x4441[16]][_0x4441[136]]= true;mxText[_0x4441[16]][_0x4441[137]]= 5;mxText[_0x4441[16]][_0x4441[138]]= 1;if(touchStyle){mxConstants[_0x4441[139]]= 16;mxConstants[_0x4441[140]]= 7;if(mxClient[_0x4441[141]]){mxVertexHandler[_0x4441[16]][_0x4441[142]]= 4;mxEdgeHandler[_0x4441[16]][_0x4441[142]]= 6;Graph[_0x4441[16]][_0x4441[142]]= 14;Graph[_0x4441[16]][_0x4441[143]]= 20;mxPanningHandler[_0x4441[16]][_0x4441[144]]= false;mxPanningHandler[_0x4441[16]][_0x4441[145]]= true;mxPanningHandler[_0x4441[16]][_0x4441[146]]= function(_0xb13axb){var _0xb13ax19=_0xb13axb[_0x4441[129]]();return (this[_0x4441[145]]&& (this[_0x4441[147]]|| _0xb13axb[_0x4441[32]]()== null))|| (mxEvent[_0x4441[148]](_0xb13ax19)&& mxEvent[_0x4441[149]](_0xb13ax19))|| (this[_0x4441[150]]&& mxEvent[_0x4441[151]](_0xb13ax19))}};var _0xb13ax1f=mxGraphHandler[_0x4441[16]][_0x4441[152]];mxGraphHandler[_0x4441[16]][_0x4441[152]]= function(_0xb13ax18,_0xb13axb){_0xb13ax1f[_0x4441[15]](this,arguments);if(this[_0x4441[46]][_0x4441[52]](_0xb13axb[_0x4441[125]]())&& this[_0x4441[46]][_0x4441[53]]()> 1){this[_0x4441[153]]= false}};Graph[_0x4441[16]][_0x4441[154]]= function(_0xb13ax1){this[_0x4441[155]]= new mxTooltipHandler(this);this[_0x4441[155]][_0x4441[156]](false);this[_0x4441[157]]= new mxSelectionCellsHandler(this);this[_0x4441[29]]= new mxPanningHandler(this);this[_0x4441[29]][_0x4441[158]]= false;this[_0x4441[11]]= new mxConnectionHandler(this);this[_0x4441[11]][_0x4441[156]](false);this[_0x4441[159]]= new mxGraphHandler(this)};mxConnectionHandler[_0x4441[16]][_0x4441[160]]= function(_0xb13axe,_0xb13ax20){if(touchStyle&& _0xb13ax20!= null){this[_0x4441[46]][_0x4441[161]](_0xb13ax20)}else {this[_0x4441[46]][_0x4441[161]](_0xb13axe)}};var _0xb13ax21=mxGraph[_0x4441[16]][_0x4441[162]];Graph[_0x4441[16]][_0x4441[162]]= function(_0xb13ax19,_0xb13ax6){if(_0xb13ax6== null){var _0xb13ax22=mxUtils[_0x4441[163]](this[_0x4441[25]],mxEvent[_0x4441[130]](_0xb13ax19),mxEvent[_0x4441[131]](_0xb13ax19));_0xb13ax6= this[_0x4441[118]](_0xb13ax22[_0x4441[164]],_0xb13ax22[_0x4441[165]])};_0xb13ax21[_0x4441[0]](this,_0xb13ax19,_0xb13ax6)};var _0xb13ax23= new mxImage(IMAGE_PATH+ _0x4441[166],16,16);mxVertexHandler[_0x4441[16]][_0x4441[167]]= _0xb13ax23;mxEdgeHandler[_0x4441[16]][_0x4441[167]]= _0xb13ax23;mxOutline[_0x4441[16]][_0x4441[168]]= _0xb13ax23; new Image()[_0x4441[169]]= _0xb13ax23[_0x4441[169]];var _0xb13ax24=IMAGE_PATH+ _0x4441[170];var _0xb13ax25=mxVertexHandler[_0x4441[16]][_0x4441[171]];mxVertexHandler[_0x4441[16]][_0x4441[171]]= function(){_0xb13ax25[_0x4441[15]](this,arguments);if(showConnectorImg&& this[_0x4441[46]][_0x4441[11]][_0x4441[111]]()&& this[_0x4441[46]][_0x4441[172]](this[_0x4441[119]][_0x4441[51]])&& !this[_0x4441[46]][_0x4441[84]](this[_0x4441[119]][_0x4441[51]])&& this[_0x4441[46]][_0x4441[53]]()== 1){this[_0x4441[173]]= mxUtils[_0x4441[174]](_0xb13ax24);this[_0x4441[173]][_0x4441[24]][_0x4441[23]]= _0x4441[26];this[_0x4441[173]][_0x4441[24]][_0x4441[175]]= _0x4441[176];this[_0x4441[173]][_0x4441[24]][_0x4441[177]]= _0x4441[176];this[_0x4441[173]][_0x4441[24]][_0x4441[178]]= _0x4441[179];if(!mxClient[_0x4441[141]]){this[_0x4441[173]][_0x4441[100]](_0x4441[180],mxResources[_0x4441[93]](_0x4441[17]));mxEvent[_0x4441[181]](this[_0x4441[173]],this[_0x4441[46]],this[_0x4441[119]])};this[_0x4441[173]][_0x4441[24]][_0x4441[182]]= _0x4441[183];mxEvent[_0x4441[185]](this[_0x4441[173]],mxUtils[_0x4441[27]](this,function(_0xb13ax19){this[_0x4441[46]][_0x4441[29]][_0x4441[114]]();var _0xb13ax22=mxUtils[_0x4441[163]](this[_0x4441[46]][_0x4441[25]],mxEvent[_0x4441[130]](_0xb13ax19),mxEvent[_0x4441[131]](_0xb13ax19));this[_0x4441[46]][_0x4441[11]][_0x4441[49]](this[_0x4441[119]],_0xb13ax22[_0x4441[164]],_0xb13ax22[_0x4441[165]]);this[_0x4441[46]][_0x4441[184]]= true;mxEvent[_0x4441[133]](_0xb13ax19)}));this[_0x4441[46]][_0x4441[25]][_0x4441[186]](this[_0x4441[173]])};this[_0x4441[187]]()};var _0xb13ax26=mxVertexHandler[_0x4441[16]][_0x4441[188]];mxVertexHandler[_0x4441[16]][_0x4441[188]]= function(){_0xb13ax26[_0x4441[15]](this);this[_0x4441[187]]()};mxVertexHandler[_0x4441[16]][_0x4441[187]]= function(){if(this[_0x4441[119]]!= null&& this[_0x4441[173]]!= null){if(mxVertexHandler[_0x4441[16]][_0x4441[189]]){this[_0x4441[173]][_0x4441[24]][_0x4441[190]]= (this[_0x4441[119]][_0x4441[164]]+ this[_0x4441[119]][_0x4441[175]]- this[_0x4441[173]][_0x4441[191]]/ 2)+ _0x4441[192];this[_0x4441[173]][_0x4441[24]][_0x4441[193]]= (this[_0x4441[119]][_0x4441[165]]- this[_0x4441[173]][_0x4441[194]]/ 2)+ _0x4441[192]}else {this[_0x4441[173]][_0x4441[24]][_0x4441[190]]= (this[_0x4441[119]][_0x4441[164]]+ this[_0x4441[119]][_0x4441[175]]+ mxConstants[_0x4441[139]]/ 2+ 4)+ _0x4441[192];this[_0x4441[173]][_0x4441[24]][_0x4441[193]]= (this[_0x4441[119]][_0x4441[165]]+ (this[_0x4441[119]][_0x4441[177]]- this[_0x4441[173]][_0x4441[194]])/ 2)+ _0x4441[192]}}};var _0xb13ax27=mxVertexHandler[_0x4441[16]][_0x4441[195]];mxVertexHandler[_0x4441[16]][_0x4441[195]]= function(_0xb13ax18,_0xb13axb){_0xb13ax27[_0x4441[15]](this,arguments);if(this[_0x4441[173]]!= null){this[_0x4441[173]][_0x4441[197]][_0x4441[196]](this[_0x4441[173]]);this[_0x4441[173]]= null}}; new Image()[_0x4441[169]]= _0xb13ax24}else {var _0xb13ax28= new mxImage(IMAGE_PATH+ _0x4441[198],15,15);mxConnectionHandler[_0x4441[16]][_0x4441[199]]= _0xb13ax28; new Image()[_0x4441[169]]= _0xb13ax28[_0x4441[169]];if(urlParams[_0x4441[17]]== _0x4441[18]){var _0xb13ax28= new mxImage(IMAGE_PATH+ _0x4441[198],15,15);var _0xb13ax25=mxVertexHandler[_0x4441[16]][_0x4441[171]];mxVertexHandler[_0x4441[16]][_0x4441[171]]= function(){_0xb13ax25[_0x4441[15]](this,arguments);if(showConnectorImg&& this[_0x4441[46]][_0x4441[11]][_0x4441[111]]()&& this[_0x4441[46]][_0x4441[172]](this[_0x4441[119]][_0x4441[51]])&& !this[_0x4441[46]][_0x4441[84]](this[_0x4441[119]][_0x4441[51]])&& this[_0x4441[46]][_0x4441[53]]()== 1){if(mxClient[_0x4441[200]]&& !mxClient[_0x4441[201]]){this[_0x4441[173]]= document[_0x4441[104]](_0x4441[202]);this[_0x4441[173]][_0x4441[24]][_0x4441[203]]= _0x4441[204]+ _0xb13ax28[_0x4441[169]]+ _0x4441[205];this[_0x4441[173]][_0x4441[24]][_0x4441[206]]= _0x4441[207];this[_0x4441[173]][_0x4441[24]][_0x4441[208]]= _0x4441[209];this[_0x4441[173]][_0x4441[24]][_0x4441[175]]= (_0xb13ax28[_0x4441[175]]+ 4)+ _0x4441[192];this[_0x4441[173]][_0x4441[24]][_0x4441[177]]= (_0xb13ax28[_0x4441[177]]+ 4)+ _0x4441[192];this[_0x4441[173]][_0x4441[24]][_0x4441[210]]= (mxClient[_0x4441[211]])?_0x4441[212]:_0x4441[213]}else {this[_0x4441[173]]= mxUtils[_0x4441[174]](_0xb13ax28[_0x4441[169]]);this[_0x4441[173]][_0x4441[24]][_0x4441[175]]= _0xb13ax28[_0x4441[175]]+ _0x4441[192];this[_0x4441[173]][_0x4441[24]][_0x4441[177]]= _0xb13ax28[_0x4441[177]]+ _0x4441[192]};this[_0x4441[173]][_0x4441[24]][_0x4441[23]]= _0x4441[26];this[_0x4441[173]][_0x4441[24]][_0x4441[178]]= _0x4441[179];this[_0x4441[173]][_0x4441[100]](_0x4441[180],mxResources[_0x4441[93]](_0x4441[17]));mxEvent[_0x4441[181]](this[_0x4441[173]],this[_0x4441[46]],this[_0x4441[119]]);this[_0x4441[173]][_0x4441[24]][_0x4441[182]]= _0x4441[183];mxEvent[_0x4441[28]](this[_0x4441[173]],_0x4441[214],mxUtils[_0x4441[27]](this,function(_0xb13ax19){this[_0x4441[46]][_0x4441[29]][_0x4441[114]]();var _0xb13ax22=mxUtils[_0x4441[163]](this[_0x4441[46]][_0x4441[25]],mxEvent[_0x4441[130]](_0xb13ax19),mxEvent[_0x4441[131]](_0xb13ax19));this[_0x4441[46]][_0x4441[11]][_0x4441[49]](this[_0x4441[119]],_0xb13ax22[_0x4441[164]],_0xb13ax22[_0x4441[165]]);this[_0x4441[46]][_0x4441[184]]= true;mxEvent[_0x4441[133]](_0xb13ax19)}));this[_0x4441[46]][_0x4441[25]][_0x4441[186]](this[_0x4441[173]])};this[_0x4441[187]]()};var _0xb13ax26=mxVertexHandler[_0x4441[16]][_0x4441[188]];mxVertexHandler[_0x4441[16]][_0x4441[188]]= function(){_0xb13ax26[_0x4441[15]](this);this[_0x4441[187]]()};mxVertexHandler[_0x4441[16]][_0x4441[187]]= function(){if(this[_0x4441[119]]!= null&& this[_0x4441[173]]!= null){if(mxVertexHandler[_0x4441[16]][_0x4441[189]]){this[_0x4441[173]][_0x4441[24]][_0x4441[190]]= (this[_0x4441[119]][_0x4441[164]]+ this[_0x4441[119]][_0x4441[175]]- this[_0x4441[173]][_0x4441[191]]/ 2)+ _0x4441[192];this[_0x4441[173]][_0x4441[24]][_0x4441[193]]= (this[_0x4441[119]][_0x4441[165]]- this[_0x4441[173]][_0x4441[194]]/ 2)+ _0x4441[192]}else {this[_0x4441[173]][_0x4441[24]][_0x4441[190]]= (this[_0x4441[119]][_0x4441[164]]+ this[_0x4441[119]][_0x4441[175]]+ mxConstants[_0x4441[139]]/ 2+ 2)+ _0x4441[192];this[_0x4441[173]][_0x4441[24]][_0x4441[193]]= (this[_0x4441[119]][_0x4441[165]]+ (this[_0x4441[119]][_0x4441[177]]- this[_0x4441[173]][_0x4441[194]])/ 2)+ _0x4441[192]}}};var _0xb13ax27=mxVertexHandler[_0x4441[16]][_0x4441[195]];mxVertexHandler[_0x4441[16]][_0x4441[195]]= function(_0xb13ax18,_0xb13axb){_0xb13ax27[_0x4441[15]](this,arguments);if(this[_0x4441[173]]!= null){this[_0x4441[173]][_0x4441[197]][_0x4441[196]](this[_0x4441[173]]);this[_0x4441[173]]= null}}}}})() \ No newline at end of file diff --git a/public/assets/plugins/jscripty/js/Menus.js b/public/assets/plugins/jscripty/js/Menus.js index 7d33b9e..d3ee577 100644 --- a/public/assets/plugins/jscripty/js/Menus.js +++ b/public/assets/plugins/jscripty/js/Menus.js @@ -1,716 +1 @@ -/** - * $Id: Menus.js,v 1.13 2013-02-20 16:21:29 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Constructs a new graph editor - */ -Menus = function(editorUi) { - this.editorUi = editorUi; - this.menus = new Object(); - this.init(); - - // Pre-fetches checkmark image - new Image().src = IMAGE_PATH + '/checkmark.gif'; -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -Menus.prototype.init = function() { - var graph = this.editorUi.editor.graph; - - this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent) { - var fonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond', - 'Comic Sans MS', - 'Courier New', 'Georgia', 'Lucida Console', 'Tahoma' - ]; - - for (var i = 0; i < fonts.length; i++) { - var tr = this.styleChange(menu, fonts[i], [mxConstants.STYLE_FONTFAMILY], [ - fonts[i] - ], null, parent); - tr.firstChild.nextSibling.style.fontFamily = fonts[i]; - } - - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('custom'), '', mxConstants.DEFAULT_FONTFAMILY, - mxConstants.STYLE_FONTFAMILY, parent); - }))); - this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent) { - var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72]; - - for (var i = 0; i < sizes.length; i++) { - this.styleChange(menu, sizes[i], [mxConstants.STYLE_FONTSIZE], [sizes[i]], - null, parent); - } - - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('custom'), '(pt)', '12', - mxConstants.STYLE_FONTSIZE, parent); - }))); - this.put('linewidth', new Menu(mxUtils.bind(this, function(menu, parent) { - var sizes = [1, 2, 3, 4, 8, 12, 16, 24]; - - for (var i = 0; i < sizes.length; i++) { - this.styleChange(menu, sizes[i] + 'px', [mxConstants.STYLE_STROKEWIDTH], [ - sizes[i] - ], null, parent); - } - - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('custom'), '(px)', '1', - mxConstants.STYLE_STROKEWIDTH, parent); - }))); - this.put('line', new Menu(mxUtils.bind(this, function(menu, parent) { - this.styleChange(menu, mxResources.get('straight'), [mxConstants.STYLE_EDGE], [ - null - ], null, parent); - this.styleChange(menu, mxResources.get('entityRelation'), [mxConstants.STYLE_EDGE], [ - 'entityRelationEdgeStyle' - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('horizontal'), [mxConstants.STYLE_EDGE, - mxConstants.STYLE_ELBOW - ], ['elbowEdgeStyle', 'horizontal'], null, parent); - this.styleChange(menu, mxResources.get('vertical'), [mxConstants.STYLE_EDGE, - mxConstants.STYLE_ELBOW - ], ['elbowEdgeStyle', 'vertical'], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('manual'), [mxConstants.STYLE_EDGE], [ - 'segmentEdgeStyle' - ], null, parent); - this.styleChange(menu, mxResources.get('automatic'), [mxConstants.STYLE_EDGE], [ - 'orthogonalEdgeStyle' - ], null, parent); - }))); - this.put('lineend', new Menu(mxUtils.bind(this, function(menu, parent) { - this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_CLASSIC - ], null, parent); - this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_OPEN - ], null, parent); - this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_BLOCK - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_OVAL - ], null, parent); - this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_DIAMOND - ], null, parent); - this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_DIAMOND_THIN - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.NONE - ], null, parent); - menu.addSeparator(parent); - menu.addItem(mxResources.get('transparent'), null, function() { - graph.toggleCellStyles('endFill', true); - }, parent, null, true); - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE, - mxConstants.STYLE_ENDSIZE, parent); - }))); - this.put('linestart', new Menu(mxUtils.bind(this, function(menu, parent) { - this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_CLASSIC - ], null, parent); - this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_OPEN - ], null, parent); - this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_BLOCK - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_OVAL - ], null, parent); - this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_DIAMOND - ], null, parent); - this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_DIAMOND_THIN - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.NONE - ], null, parent); - menu.addSeparator(parent); - menu.addItem(mxResources.get('transparent'), null, function() { - graph.toggleCellStyles('startFill', true); - }, parent, null, true); - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE, - mxConstants.STYLE_STARTSIZE, parent); - }))); - this.put('spacing', new Menu(mxUtils.bind(this, function(menu, parent) { - // Uses shadow action and line menu to analyze selection - var vertexSelected = this.editorUi.actions.get('shadow').enabled; - var edgeSelected = this.get('line').enabled; - - if (vertexSelected || menu.showDisabled) { - this.promptChange(menu, mxResources.get('top'), '(px)', '0', - mxConstants.STYLE_SPACING_TOP, parent, vertexSelected); - this.promptChange(menu, mxResources.get('right'), '(px)', '0', - mxConstants.STYLE_SPACING_RIGHT, parent, vertexSelected); - this.promptChange(menu, mxResources.get('bottom'), '(px)', '0', - mxConstants.STYLE_SPACING_BOTTOM, parent, vertexSelected); - this.promptChange(menu, mxResources.get('left'), '(px)', '0', - mxConstants.STYLE_SPACING_LEFT, parent, vertexSelected); - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('global'), '(px)', '0', - mxConstants.STYLE_SPACING, parent, vertexSelected); - this.promptChange(menu, mxResources.get('perimeter'), '(px)', '0', - mxConstants.STYLE_PERIMETER_SPACING, parent, vertexSelected); - } - - if (edgeSelected || menu.showDisabled) { - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('sourceSpacing'), '(px)', '0', - mxConstants.STYLE_SOURCE_PERIMETER_SPACING, parent, edgeSelected); - this.promptChange(menu, mxResources.get('targetSpacing'), '(px)', '0', - mxConstants.STYLE_TARGET_PERIMETER_SPACING, parent, edgeSelected); - } - }))); - this.put('format', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItem(menu, 'style', parent); - }))); - this.put('text', new Menu(mxUtils.bind(this, function(menu, parent) { - var enabled = this.get('text').enabled; - menu.addSeparator(parent); - this.addSubmenu('fontFamily', menu, parent); - this.addSubmenu('fontSize', menu, parent); - this.addMenuItems(menu, ['-', 'bold', 'italic', 'underline', '-'], - parent); - this.addSubmenu('alignment', menu, parent); - this.addMenuItem(menu, 'wordWrap', parent); - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('textOpacity'), '(%)', '100', - mxConstants.STYLE_TEXT_OPACITY, parent, enabled); - menu.addItem(mxResources.get('hide'), null, function() { - graph.toggleCellStyles(mxConstants.STYLE_NOLABEL, false); - }, parent, null, enabled); - }))); - this.put('alignment', new Menu(mxUtils.bind(this, function(menu, parent) { - this.styleChange(menu, mxResources.get('leftAlign'), [mxConstants.STYLE_ALIGN], [ - mxConstants.ALIGN_LEFT - ], null, parent); - this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_ALIGN], [ - mxConstants.ALIGN_CENTER - ], null, parent); - this.styleChange(menu, mxResources.get('rightAlign'), [mxConstants.STYLE_ALIGN], [ - mxConstants.ALIGN_RIGHT - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('topAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [ - mxConstants.ALIGN_TOP - ], null, parent); - this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_ALIGN], [ - mxConstants.ALIGN_MIDDLE - ], null, parent); - this.styleChange(menu, mxResources.get('bottomAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [ - mxConstants.ALIGN_BOTTOM - ], null, parent); - menu.addSeparator(parent); - this.addSubmenu('position', menu, parent); - this.addSubmenu('spacing', menu, parent); - menu.addSeparator(parent); - var enabled = this.get('text').enabled; - menu.addItem(mxResources.get('vertical'), null, function() { - graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true); - }, parent, null, enabled); - }))); - this.put('position', new Menu(mxUtils.bind(this, function(menu, parent) { - this.styleChange(menu, mxResources.get('left'), [mxConstants.STYLE_LABEL_POSITION, - mxConstants.STYLE_ALIGN - ], [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_RIGHT], null, parent); - this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_LABEL_POSITION, - mxConstants.STYLE_ALIGN - ], [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_CENTER], null, parent); - this.styleChange(menu, mxResources.get('right'), [mxConstants.STYLE_LABEL_POSITION, - mxConstants.STYLE_ALIGN - ], [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_LEFT], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('top'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, - mxConstants.STYLE_VERTICAL_ALIGN - ], [mxConstants.ALIGN_TOP, mxConstants.ALIGN_BOTTOM], null, parent); - this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, - mxConstants.STYLE_VERTICAL_ALIGN - ], [mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_MIDDLE], null, parent); - this.styleChange(menu, mxResources.get('bottom'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, - mxConstants.STYLE_VERTICAL_ALIGN - ], [mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_TOP], null, parent); - }))); - this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent) { - menu.addItem(mxResources.get('flipH'), null, function() { - graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false); - }, parent); - menu.addItem(mxResources.get('flipV'), null, function() { - graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false); - }, parent); - this.addMenuItems(menu, ['-', 'tilt', 'rotation'], parent); - }))); - this.put('align', new Menu(mxUtils.bind(this, function(menu, parent) { - menu.addItem(mxResources.get('leftAlign'), null, function() { - graph.alignCells(mxConstants.ALIGN_LEFT); - }, parent); - menu.addItem(mxResources.get('center'), null, function() { - graph.alignCells(mxConstants.ALIGN_CENTER); - }, parent); - menu.addItem(mxResources.get('rightAlign'), null, function() { - graph.alignCells(mxConstants.ALIGN_RIGHT); - }, parent); - menu.addSeparator(parent); - menu.addItem(mxResources.get('topAlign'), null, function() { - graph.alignCells(mxConstants.ALIGN_TOP); - }, parent); - menu.addItem(mxResources.get('middle'), null, function() { - graph.alignCells(mxConstants.ALIGN_MIDDLE); - }, parent); - menu.addItem(mxResources.get('bottomAlign'), null, function() { - graph.alignCells(mxConstants.ALIGN_BOTTOM); - }, parent); - }))); - this.put('layout', new Menu(mxUtils.bind(this, function(menu, parent) { - // menu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function() - // { - // if (!graph.isSelectionEmpty()) - // { - // var layout = new mxCompactTreeLayout(graph, true); - // layout.edgeRouting = false; - // layout.levelDistance = 30; - // this.editorUi.executeLayout(layout, true, true); - // } - // }), parent); - // menu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function() - // { - // if (!graph.isSelectionEmpty()) - // { - // var layout = new mxCompactTreeLayout(graph, false); - // layout.edgeRouting = false; - // layout.levelDistance = 30; - // this.editorUi.executeLayout(layout, true, true); - // } - // }), parent); - // menu.addSeparator(parent); - menu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this, - function() { - var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST); - this.editorUi.executeLayout(layout, true, true); - }), parent); - menu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this, - function() { - var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH); - this.editorUi.executeLayout(layout, true, true); - }), parent); - //menu.addSeparator(parent); - // menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function() - // { - // var layout = new mxFastOrganicLayout(graph); - // this.editorUi.executeLayout(layout, true, true); - // }), parent); - // menu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function() - // { - // var layout = new mxCircleLayout(graph); - // this.editorUi.executeLayout(layout, true, true, graph.getSelectionCells()); - // }), parent); - }))); - this.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-', - 'expand', 'collapse' - ], parent); - }))); - this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent); - //this.addSubmenu('direction', menu, parent); - this.addSubmenu('layout', menu, parent); - //this.addSubmenu('align', menu, parent); - menu.addSeparator(parent); - //this.addSubmenu('navigation', menu, parent); - this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup'], - parent); - //this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'autosize'], parent); - }))); - this.put('view', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['actualSize'], parent); - menu.addSeparator(); - var scales = [0.25, 0.5, 0.75, 1, 2, 4]; - - for (var i = 0; i < scales.length; i++) { - (function(scale) { - menu.addItem((scale * 100) + '%', null, function() { - graph.zoomTo(scale); - }, parent); - })(scales[i]); - } - - this.addMenuItems(menu, ['-', 'zoomIn', 'zoomOut', '-', 'fitWindow', - 'customZoom', '-', 'fitPage', 'fitPageWidth' - ], parent); - }))); - this.put('file', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', 'publish', - '-', 'variable', '-', 'import', 'export', '-', 'editFile', 'rename', '-', - 'print' - ], parent); - }))); - this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste', - 'delete', '-', 'duplicate', '-', - 'selectVertices', 'selectEdges', 'selectAll' - ]); - }))); - this.put('help', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['help', '-', 'about']); - }))); -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -Menus.prototype.put = function(name, menu) { - this.menus[name] = menu; -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -Menus.prototype.get = function(name) { - return this.menus[name]; -}; - -/** - * Adds the given submenu. - */ -Menus.prototype.addSubmenu = function(name, menu, parent) { - var enabled = this.get(name).enabled; - - if (menu.showDisabled || enabled) { - var submenu = menu.addItem(mxResources.get(name), null, null, parent, null, - enabled); - this.addMenu(name, menu, submenu); - } -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -Menus.prototype.addMenu = function(name, popupMenu, parent) { - var menu = this.get(name); - - if (menu != null && (popupMenu.showDisabled || menu.enabled)) { - this.get(name).execute(popupMenu, parent); - } -}; - -/** - * Adds a style change item to the given menu. - */ -Menus.prototype.styleChange = function(menu, label, keys, values, sprite, - parent) { - return menu.addItem(label, null, mxUtils.bind(this, function() { - var graph = this.editorUi.editor.graph; - - graph.getModel().beginUpdate(); - try { - for (var i = 0; i < keys.length; i++) { - graph.setCellStyles(keys[i], values[i]); - } - } finally { - graph.getModel().endUpdate(); - } - }), parent, sprite); -}; - -/** - * Adds a style change item with a prompt to the given menu. - */ -Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, - parent, enabled) { - return menu.addItem(label, null, mxUtils.bind(this, function() { - var graph = this.editorUi.editor.graph; - var value = defaultValue; - var state = graph.getView().getState(graph.getSelectionCell()); - - if (state != null) { - value = state.style[key] || value; - } - - value = mxUtils.prompt(mxResources.get('enterValue') + ((hint.length > 0) ? - (' ' + hint) : ''), value); - - if (value != null && value.length > 0) { - graph.setCellStyles(key, value); - } - }), parent, null, enabled); -}; - -/** - * Creates the keyboard event handler for the current graph and history. - */ -Menus.prototype.addMenuItem = function(menu, key, parent) { - var action = this.editorUi.actions.get(key); - - if (action != null && (menu.showDisabled || action.enabled)) { - var item = menu.addItem(action.label, null, action.funct, parent, null, - action.enabled); - - // Adds checkmark image - if (action.toggleAction && action.isSelected()) { - this.addCheckmark(item); - } - - this.addShortcut(item, action); - - return item; - } - - return null; -}; - -/** - * Adds a checkmark to the given menuitem. - */ -Menus.prototype.addShortcut = function(item, action) { - if (action.shortcut != null) { - var td = item.firstChild.nextSibling.nextSibling; - var span = document.createElement('span'); - span.style.color = 'gray'; - mxUtils.write(span, action.shortcut); - td.appendChild(span); - } -}; - -/** - * Adds a checkmark to the given menuitem. - */ -Menus.prototype.addCheckmark = function(item) { - var td = item.firstChild.nextSibling; - td.style.backgroundImage = 'url(' + IMAGE_PATH + '/checkmark.gif)'; - td.style.backgroundRepeat = 'no-repeat'; - td.style.backgroundPosition = '2px 50%'; -}; - -/** - * Creates the keyboard event handler for the current graph and history. - */ -Menus.prototype.addMenuItems = function(menu, keys, parent) { - for (var i = 0; i < keys.length; i++) { - if (keys[i] == '-') { - menu.addSeparator(parent); - } else { - this.addMenuItem(menu, keys[i], parent); - } - } -}; - -/** - * Creates the keyboard event handler for the current graph and history. - */ -Menus.prototype.createPopupMenu = function(menu, cell, evt) { - var graph = this.editorUi.editor.graph; - menu.smartSeparators = true; - - if (graph.isSelectionEmpty()) { - this.addMenuItems(menu, ['undo', 'redo', '-', 'paste', '-']); - } else { - this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate']); - - if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(graph.getSelectionCell())) { - this.addMenuItems(menu, ['setAsDefaultEdge']); - } - - menu.addSeparator(); - } - - if (graph.getSelectionCount() > 0) { - this.addMenuItems(menu, ['toFront', 'toBack', '-']); - - if (graph.getModel().isEdge(graph.getSelectionCell())) { - var isWaypoint = false; - var cell = graph.getSelectionCell(); - - if (cell != null && graph.getModel().isEdge(cell)) { - var handler = graph.selectionCellsHandler.getHandler(cell); - - if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends - .length > 2) { - var index = handler.getHandleForEvent(new mxMouseEvent(evt)); - - // Configures removeWaypoint action before execution - var rmWaypointAction = this.editorUi.actions.get('removeWaypoint'); - rmWaypointAction.handler = handler; - rmWaypointAction.index = index; - - isWaypoint = index > 0 && index < handler.bends.length; - } - } - - this.addMenuItems(menu, ['-', (isWaypoint) ? 'removeWaypoint' : - 'addWaypoint' - ]); - } else if (graph.getSelectionCount() > 1) { - menu.addSeparator(); - this.addMenuItems(menu, ['group']); - } - - menu.addSeparator(); - - if (graph.getSelectionCount() == 1) { - var link = graph.getLinkForCell(graph.getSelectionCell()); - - if (link != null) { - this.addMenuItems(menu, ['openLink']); - } - } - } else { - this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-', - 'selectAll' - ]); - } -}; - -/** - * Creates the keyboard event handler for the current graph and history. - */ -Menus.prototype.createMenubar = function(container) { - var menubar = new Menubar(this.editorUi, container); - // var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange', - // 'help' - // ]; - var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange']; - for (var i = 0; i < menus.length; i++) { - menubar.addMenu(mxResources.get(menus[i]), this.get(menus[i]).funct); - } - - return menubar; -}; - -/** - * Construcs a new menubar for the given editor. - */ -function Menubar(editorUi, container) { - this.editorUi = editorUi; - this.container = container; - - // Global handler to hide the current menu - mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) { - this.hideMenu(); - })); -}; - -/** - * Adds the menubar elements. - */ -Menubar.prototype.hideMenu = function() { - if (this.currentMenu != null) { - this.currentMenu.hideMenu(); - } -}; - -/** - * Adds a submenu to this menubar. - */ -Menubar.prototype.addMenu = function(label, funct) { - var elt = document.createElement('a'); - elt.setAttribute('href', 'javascript:void(0);'); - elt.className = 'geItem'; - mxUtils.write(elt, label); - - this.addMenuHandler(elt, funct); - this.container.appendChild(elt); - - return elt; -}; - -/** - * Adds a handler for showing a menu in the given element. - */ -Menubar.prototype.addMenuHandler = function(elt, funct) { - if (funct != null) { - var show = true; - - var clickHandler = mxUtils.bind(this, function(evt) { - if (show && elt.enabled == null || elt.enabled) { - this.editorUi.editor.graph.panningHandler.hideMenu(); - var menu = new mxPopupMenu(funct); - menu.div.className += ' geMenubarMenu'; - menu.smartSeparators = true; - menu.showDisabled = true; - menu.autoExpand = true; - - // Disables autoexpand and destroys menu when hidden - menu.hideMenu = mxUtils.bind(this, function() { - mxPopupMenu.prototype.hideMenu.apply(menu, arguments); - menu.destroy(); - this.currentMenu = null; - this.currentElt = null; - }); - - // Added width of the page-sidebar - var x = elt.offsetLeft + document.getElementById('page-sidebar').offsetWidth + - 22; - // Added static height of the page-navbar - var y = elt.offsetTop + elt.offsetHeight + 140; - - menu.popup(x, y, null, evt); - - //menu.popup(elt.offsetLeft + 4, elt.offsetTop + elt.offsetHeight + 4, null, evt); - this.currentMenu = menu; - this.currentElt = elt; - } - - show = true; - mxEvent.consume(evt); - }); - - // Shows menu automatically while in expanded state - mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) { - if (this.currentMenu != null && this.currentElt != elt) { - this.hideMenu(); - clickHandler(evt); - } - })); - - // Hides menu if already showing - mxEvent.addListener(elt, 'mousedown', mxUtils.bind(this, function() { - show = this.currentElt != elt; - })); - - mxEvent.addListener(elt, 'click', clickHandler); - } -}; - -/** - * Constructs a new action for the given parameters. - */ -function Menu(funct, enabled) { - mxEventSource.call(this); - this.funct = funct; - this.enabled = (enabled != null) ? enabled : true; -}; - -// Menu inherits from mxEventSource -mxUtils.extend(Menu, mxEventSource); - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Menu.prototype.setEnabled = function(value) { - if (this.enabled != value) { - this.enabled = value; - this.fireEvent(new mxEventObject('stateChanged')); - } -}; - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Menu.prototype.execute = function(menu, parent) { - this.funct(menu, parent); -}; +var _0x1cd7=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x6D\x65\x6E\x75\x73","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x56\x65\x72\x64\x61\x6E\x61","\x54\x69\x6D\x65\x73\x20\x4E\x65\x77\x20\x52\x6F\x6D\x61\x6E","\x47\x61\x72\x61\x6D\x6F\x6E\x64","\x43\x6F\x6D\x69\x63\x20\x53\x61\x6E\x73\x20\x4D\x53","\x43\x6F\x75\x72\x69\x65\x72\x20\x4E\x65\x77","\x47\x65\x6F\x72\x67\x69\x61","\x4C\x75\x63\x69\x64\x61\x20\x43\x6F\x6E\x73\x6F\x6C\x65","\x54\x61\x68\x6F\x6D\x61","\x6C\x65\x6E\x67\x74\x68","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x73\x74\x79\x6C\x65\x43\x68\x61\x6E\x67\x65","\x73\x74\x79\x6C\x65","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D","\x67\x65\x74","","\x70\x72\x6F\x6D\x70\x74\x43\x68\x61\x6E\x67\x65","\x62\x69\x6E\x64","\x70\x75\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x28\x70\x74\x29","\x31\x32","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x70\x78","\x53\x54\x59\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x28\x70\x78\x29","\x31","\x6C\x69\x6E\x65","\x73\x74\x72\x61\x69\x67\x68\x74","\x53\x54\x59\x4C\x45\x5F\x45\x44\x47\x45","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x65\x6C\x62\x6F\x77\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6D\x61\x6E\x75\x61\x6C","\x73\x65\x67\x6D\x65\x6E\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x61\x75\x74\x6F\x6D\x61\x74\x69\x63","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x63\x6C\x61\x73\x73\x69\x63","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x41\x52\x52\x4F\x57","\x41\x52\x52\x4F\x57\x5F\x43\x4C\x41\x53\x53\x49\x43","\x6F\x70\x65\x6E\x41\x72\x72\x6F\x77","\x41\x52\x52\x4F\x57\x5F\x4F\x50\x45\x4E","\x62\x6C\x6F\x63\x6B","\x41\x52\x52\x4F\x57\x5F\x42\x4C\x4F\x43\x4B","\x6F\x76\x61\x6C","\x41\x52\x52\x4F\x57\x5F\x4F\x56\x41\x4C","\x64\x69\x61\x6D\x6F\x6E\x64","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44","\x64\x69\x61\x6D\x6F\x6E\x64\x54\x68\x69\x6E","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44\x5F\x54\x48\x49\x4E","\x6E\x6F\x6E\x65","\x4E\x4F\x4E\x45","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x65\x6E\x64\x46\x69\x6C\x6C","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x61\x64\x64\x49\x74\x65\x6D","\x73\x69\x7A\x65","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x41\x52\x52\x4F\x57","\x73\x74\x61\x72\x74\x46\x69\x6C\x6C","\x73\x70\x61\x63\x69\x6E\x67","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x68\x61\x64\x6F\x77","\x61\x63\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x74\x6F\x70","\x30","\x72\x69\x67\x68\x74","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x67\x6C\x6F\x62\x61\x6C","\x70\x65\x72\x69\x6D\x65\x74\x65\x72","\x73\x6F\x75\x72\x63\x65\x53\x70\x61\x63\x69\x6E\x67","\x74\x61\x72\x67\x65\x74\x53\x70\x61\x63\x69\x6E\x67","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D","\x74\x65\x78\x74","\x61\x64\x64\x53\x75\x62\x6D\x65\x6E\x75","\x2D","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D\x73","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x77\x6F\x72\x64\x57\x72\x61\x70","\x74\x65\x78\x74\x4F\x70\x61\x63\x69\x74\x79","\x28\x25\x29","\x31\x30\x30","\x68\x69\x64\x65","\x6C\x65\x66\x74\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x4C\x45\x46\x54","\x63\x65\x6E\x74\x65\x72","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x72\x69\x67\x68\x74\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x74\x6F\x70\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x54\x4F\x50","\x6D\x69\x64\x64\x6C\x65","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x62\x6F\x74\x74\x6F\x6D\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x74\x69\x6C\x74","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x61\x6C\x69\x67\x6E","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73","\x6C\x61\x79\x6F\x75\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x46\x6C\x6F\x77","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x76\x65\x72\x74\x69\x63\x61\x6C\x46\x6C\x6F\x77","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x61\x72\x72\x61\x6E\x67\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x76\x69\x65\x77","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x25","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x66\x69\x74\x50\x61\x67\x65","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x66\x69\x6C\x65","\x6E\x65\x77","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x41\x73","\x70\x75\x62\x6C\x69\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x65\x64\x69\x74\x46\x69\x6C\x65","\x72\x65\x6E\x61\x6D\x65","\x70\x72\x69\x6E\x74","\x65\x64\x69\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x75\x74","\x63\x6F\x70\x79","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x68\x65\x6C\x70","\x61\x62\x6F\x75\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x65\x78\x65\x63\x75\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x20","\x70\x72\x6F\x6D\x70\x74","\x6C\x61\x62\x65\x6C","\x66\x75\x6E\x63\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x61\x64\x64\x43\x68\x65\x63\x6B\x6D\x61\x72\x6B","\x61\x64\x64\x53\x68\x6F\x72\x74\x63\x75\x74","\x73\x68\x6F\x72\x74\x63\x75\x74","\x73\x70\x61\x6E","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6F\x6C\x6F\x72","\x67\x72\x61\x79","\x77\x72\x69\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x32\x70\x78\x20\x35\x30\x25","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x73\x6D\x61\x72\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72\x73","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x69\x73\x45\x64\x67\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x62\x65\x6E\x64\x73","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x69\x76","\x20\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x4D\x65\x6E\x75","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x61\x70\x70\x6C\x79","\x64\x65\x73\x74\x72\x6F\x79","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x2D\x73\x69\x64\x65\x62\x61\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6C\x69\x63\x6B","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74"];Menus= function(_0x4905x1){this[_0x1cd7[0]]= _0x4905x1;this[_0x1cd7[1]]= new Object();this[_0x1cd7[2]](); new Image()[_0x1cd7[3]]= IMAGE_PATH+ _0x1cd7[4]};Menus[_0x1cd7[5]][_0x1cd7[2]]= function(){var _0x4905x2=this[_0x1cd7[0]][_0x1cd7[7]][_0x1cd7[6]];this[_0x1cd7[30]](_0x1cd7[8], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){var _0x4905x5=[_0x1cd7[9],_0x1cd7[10],_0x1cd7[11],_0x1cd7[12],_0x1cd7[13],_0x1cd7[14],_0x1cd7[15],_0x1cd7[16],_0x1cd7[17]];for(var _0x4905x6=0;_0x4905x6< _0x4905x5[_0x1cd7[18]];_0x4905x6++){var _0x4905x7=this[_0x1cd7[20]](_0x4905x3,_0x4905x5[_0x4905x6],[mxConstants[_0x1cd7[19]]],[_0x4905x5[_0x4905x6]],null,_0x4905x4);_0x4905x7[_0x1cd7[23]][_0x1cd7[22]][_0x1cd7[21]][_0x1cd7[8]]= _0x4905x5[_0x4905x6]};_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[25]),_0x1cd7[27],mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[31], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){var _0x4905x8=[6,8,9,10,11,12,14,18,24,36,48,72];for(var _0x4905x6=0;_0x4905x6< _0x4905x8[_0x1cd7[18]];_0x4905x6++){this[_0x1cd7[20]](_0x4905x3,_0x4905x8[_0x4905x6],[mxConstants[_0x1cd7[32]]],[_0x4905x8[_0x4905x6]],null,_0x4905x4)};_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[25]),_0x1cd7[33],_0x1cd7[34],mxConstants.STYLE_FONTSIZE,_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[35], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){var _0x4905x8=[1,2,3,4,8,12,16,24];for(var _0x4905x6=0;_0x4905x6< _0x4905x8[_0x1cd7[18]];_0x4905x6++){this[_0x1cd7[20]](_0x4905x3,_0x4905x8[_0x4905x6]+ _0x1cd7[36],[mxConstants[_0x1cd7[37]]],[_0x4905x8[_0x4905x6]],null,_0x4905x4)};_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[25]),_0x1cd7[38],_0x1cd7[39],mxConstants.STYLE_STROKEWIDTH,_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[40], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[41]),[mxConstants[_0x1cd7[42]]],[null],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[43]),[mxConstants[_0x1cd7[42]]],[_0x1cd7[44]],null,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[45]),[mxConstants[_0x1cd7[42]],mxConstants[_0x1cd7[46]]],[_0x1cd7[47],_0x1cd7[45]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[48]),[mxConstants[_0x1cd7[42]],mxConstants[_0x1cd7[46]]],[_0x1cd7[47],_0x1cd7[48]],null,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[49]),[mxConstants[_0x1cd7[42]]],[_0x1cd7[50]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[51]),[mxConstants[_0x1cd7[42]]],[_0x1cd7[52]],null,_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[53], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[54]),[mxConstants[_0x1cd7[55]]],[mxConstants[_0x1cd7[56]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[57]),[mxConstants[_0x1cd7[55]]],[mxConstants[_0x1cd7[58]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[59]),[mxConstants[_0x1cd7[55]]],[mxConstants[_0x1cd7[60]]],null,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[61]),[mxConstants[_0x1cd7[55]]],[mxConstants[_0x1cd7[62]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[63]),[mxConstants[_0x1cd7[55]]],[mxConstants[_0x1cd7[64]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[65]),[mxConstants[_0x1cd7[55]]],[mxConstants[_0x1cd7[66]]],null,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[67]),[mxConstants[_0x1cd7[55]]],[mxConstants[_0x1cd7[68]]],null,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[69]),null,function(){_0x4905x2[_0x1cd7[71]](_0x1cd7[70],true)},_0x4905x4,null,true);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[73]),_0x1cd7[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_ENDSIZE,_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[74], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[54]),[mxConstants[_0x1cd7[75]]],[mxConstants[_0x1cd7[56]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[57]),[mxConstants[_0x1cd7[75]]],[mxConstants[_0x1cd7[58]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[59]),[mxConstants[_0x1cd7[75]]],[mxConstants[_0x1cd7[60]]],null,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[61]),[mxConstants[_0x1cd7[75]]],[mxConstants[_0x1cd7[62]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[63]),[mxConstants[_0x1cd7[75]]],[mxConstants[_0x1cd7[64]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[65]),[mxConstants[_0x1cd7[75]]],[mxConstants[_0x1cd7[66]]],null,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[67]),[mxConstants[_0x1cd7[75]]],[mxConstants[_0x1cd7[68]]],null,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[69]),null,function(){_0x4905x2[_0x1cd7[71]](_0x1cd7[76],true)},_0x4905x4,null,true);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[73]),_0x1cd7[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_STARTSIZE,_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[77], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){var _0x4905x9=this[_0x1cd7[0]][_0x1cd7[80]][_0x1cd7[26]](_0x1cd7[79])[_0x1cd7[78]];var _0x4905xa=this[_0x1cd7[26]](_0x1cd7[40])[_0x1cd7[78]];if(_0x4905x9|| _0x4905x3[_0x1cd7[81]]){this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[82]),_0x1cd7[38],_0x1cd7[83],mxConstants.STYLE_SPACING_TOP,_0x4905x4,_0x4905x9);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[84]),_0x1cd7[38],_0x1cd7[83],mxConstants.STYLE_SPACING_RIGHT,_0x4905x4,_0x4905x9);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[85]),_0x1cd7[38],_0x1cd7[83],mxConstants.STYLE_SPACING_BOTTOM,_0x4905x4,_0x4905x9);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[86]),_0x1cd7[38],_0x1cd7[83],mxConstants.STYLE_SPACING_LEFT,_0x4905x4,_0x4905x9);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[87]),_0x1cd7[38],_0x1cd7[83],mxConstants.STYLE_SPACING,_0x4905x4,_0x4905x9);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[88]),_0x1cd7[38],_0x1cd7[83],mxConstants.STYLE_PERIMETER_SPACING,_0x4905x4,_0x4905x9)};if(_0x4905xa|| _0x4905x3[_0x1cd7[81]]){_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[89]),_0x1cd7[38],_0x1cd7[83],mxConstants.STYLE_SOURCE_PERIMETER_SPACING,_0x4905x4,_0x4905xa);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[90]),_0x1cd7[38],_0x1cd7[83],mxConstants.STYLE_TARGET_PERIMETER_SPACING,_0x4905x4,_0x4905xa)}})));this[_0x1cd7[30]](_0x1cd7[91], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[92]](_0x4905x3,_0x1cd7[21],_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[93], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){var _0x4905xb=this[_0x1cd7[26]](_0x1cd7[93])[_0x1cd7[78]];_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[94]](_0x1cd7[8],_0x4905x3,_0x4905x4);this[_0x1cd7[94]](_0x1cd7[31],_0x4905x3,_0x4905x4);this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[95],_0x1cd7[96],_0x1cd7[97],_0x1cd7[98],_0x1cd7[95]],_0x4905x4);this[_0x1cd7[94]](_0x1cd7[100],_0x4905x3,_0x4905x4);this[_0x1cd7[92]](_0x4905x3,_0x1cd7[101],_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[28]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[102]),_0x1cd7[103],_0x1cd7[104],mxConstants.STYLE_TEXT_OPACITY,_0x4905x4,_0x4905xb);_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[105]),null,function(){_0x4905x2[_0x1cd7[71]](mxConstants.STYLE_NOLABEL,false)},_0x4905x4,null,_0x4905xb)})));this[_0x1cd7[30]](_0x1cd7[100], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[106]),[mxConstants[_0x1cd7[107]]],[mxConstants[_0x1cd7[108]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[109]),[mxConstants[_0x1cd7[107]]],[mxConstants[_0x1cd7[110]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[111]),[mxConstants[_0x1cd7[107]]],[mxConstants[_0x1cd7[112]]],null,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[113]),[mxConstants[_0x1cd7[114]]],[mxConstants[_0x1cd7[115]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[116]),[mxConstants[_0x1cd7[114]]],[mxConstants[_0x1cd7[117]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[118]),[mxConstants[_0x1cd7[114]]],[mxConstants[_0x1cd7[119]]],null,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[94]](_0x1cd7[120],_0x4905x3,_0x4905x4);this[_0x1cd7[94]](_0x1cd7[77],_0x4905x3,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);var _0x4905xb=this[_0x1cd7[26]](_0x1cd7[93])[_0x1cd7[78]];_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[48]),null,function(){_0x4905x2[_0x1cd7[71]](mxConstants.STYLE_HORIZONTAL,true)},_0x4905x4,null,_0x4905xb)})));this[_0x1cd7[30]](_0x1cd7[120], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[86]),[mxConstants[_0x1cd7[121]],mxConstants[_0x1cd7[107]]],[mxConstants[_0x1cd7[108]],mxConstants[_0x1cd7[112]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[109]),[mxConstants[_0x1cd7[121]],mxConstants[_0x1cd7[107]]],[mxConstants[_0x1cd7[110]],mxConstants[_0x1cd7[110]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[84]),[mxConstants[_0x1cd7[121]],mxConstants[_0x1cd7[107]]],[mxConstants[_0x1cd7[112]],mxConstants[_0x1cd7[108]]],null,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[82]),[mxConstants[_0x1cd7[122]],mxConstants[_0x1cd7[114]]],[mxConstants[_0x1cd7[115]],mxConstants[_0x1cd7[119]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[116]),[mxConstants[_0x1cd7[122]],mxConstants[_0x1cd7[114]]],[mxConstants[_0x1cd7[117]],mxConstants[_0x1cd7[117]]],null,_0x4905x4);this[_0x1cd7[20]](_0x4905x3,mxResources[_0x1cd7[26]](_0x1cd7[85]),[mxConstants[_0x1cd7[122]],mxConstants[_0x1cd7[114]]],[mxConstants[_0x1cd7[119]],mxConstants[_0x1cd7[115]]],null,_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[123], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[124]),null,function(){_0x4905x2[_0x1cd7[71]](mxConstants.STYLE_FLIPH,false)},_0x4905x4);_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[125]),null,function(){_0x4905x2[_0x1cd7[71]](mxConstants.STYLE_FLIPV,false)},_0x4905x4);this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[95],_0x1cd7[126],_0x1cd7[127]],_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[128], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[106]),null,function(){_0x4905x2[_0x1cd7[129]](mxConstants.ALIGN_LEFT)},_0x4905x4);_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[109]),null,function(){_0x4905x2[_0x1cd7[129]](mxConstants.ALIGN_CENTER)},_0x4905x4);_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[111]),null,function(){_0x4905x2[_0x1cd7[129]](mxConstants.ALIGN_RIGHT)},_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[113]),null,function(){_0x4905x2[_0x1cd7[129]](mxConstants.ALIGN_TOP)},_0x4905x4);_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[116]),null,function(){_0x4905x2[_0x1cd7[129]](mxConstants.ALIGN_MIDDLE)},_0x4905x4);_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[118]),null,function(){_0x4905x2[_0x1cd7[129]](mxConstants.ALIGN_BOTTOM)},_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[130], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[131]),null,mxUtils[_0x1cd7[29]](this,function(){var _0x4905xc= new mxHierarchicalLayout(_0x4905x2,mxConstants.DIRECTION_WEST);this[_0x1cd7[0]][_0x1cd7[132]](_0x4905xc,true,true)}),_0x4905x4);_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x1cd7[133]),null,mxUtils[_0x1cd7[29]](this,function(){var _0x4905xc= new mxHierarchicalLayout(_0x4905x2,mxConstants.DIRECTION_NORTH);this[_0x1cd7[0]][_0x1cd7[132]](_0x4905xc,true,true)}),_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[134], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[135],_0x1cd7[95],_0x1cd7[136],_0x1cd7[137],_0x1cd7[95],_0x1cd7[138],_0x1cd7[139]],_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[140], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[141],_0x1cd7[142],_0x1cd7[95]],_0x4905x4);this[_0x1cd7[94]](_0x1cd7[130],_0x4905x3,_0x4905x4);_0x4905x3[_0x1cd7[24]](_0x4905x4);this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[95],_0x1cd7[143],_0x1cd7[144],_0x1cd7[145]],_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[146], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[147]],_0x4905x4);_0x4905x3[_0x1cd7[24]]();var _0x4905xd=[0.25,0.5,0.75,1,2,4];for(var _0x4905x6=0;_0x4905x6< _0x4905xd[_0x1cd7[18]];_0x4905x6++){(function(_0x4905xe){_0x4905x3[_0x1cd7[72]]((_0x4905xe* 100)+ _0x1cd7[148],null,function(){_0x4905x2[_0x1cd7[149]](_0x4905xe)},_0x4905x4)})(_0x4905xd[_0x4905x6])};this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[95],_0x1cd7[150],_0x1cd7[151],_0x1cd7[95],_0x1cd7[152],_0x1cd7[153],_0x1cd7[95],_0x1cd7[154],_0x1cd7[155]],_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[156], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[157],_0x1cd7[158],_0x1cd7[95],_0x1cd7[159],_0x1cd7[160],_0x1cd7[161],_0x1cd7[95],_0x1cd7[162],_0x1cd7[95],_0x1cd7[163],_0x1cd7[164],_0x1cd7[95],_0x1cd7[165],_0x1cd7[166],_0x1cd7[95],_0x1cd7[167]],_0x4905x4)})));this[_0x1cd7[30]](_0x1cd7[168], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[169],_0x1cd7[170],_0x1cd7[95],_0x1cd7[171],_0x1cd7[172],_0x1cd7[173],_0x1cd7[174],_0x1cd7[95],_0x1cd7[175],_0x1cd7[95],_0x1cd7[176],_0x1cd7[177],_0x1cd7[178]])})));this[_0x1cd7[30]](_0x1cd7[179], new Menu(mxUtils[_0x1cd7[29]](this,function(_0x4905x3,_0x4905x4){this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[179],_0x1cd7[95],_0x1cd7[180]])})))};Menus[_0x1cd7[5]][_0x1cd7[30]]= function(_0x4905xf,_0x4905x3){this[_0x1cd7[1]][_0x4905xf]= _0x4905x3};Menus[_0x1cd7[5]][_0x1cd7[26]]= function(_0x4905xf){return this[_0x1cd7[1]][_0x4905xf]};Menus[_0x1cd7[5]][_0x1cd7[94]]= function(_0x4905xf,_0x4905x3,_0x4905x4){var _0x4905xb=this[_0x1cd7[26]](_0x4905xf)[_0x1cd7[78]];if(_0x4905x3[_0x1cd7[81]]|| _0x4905xb){var _0x4905x10=_0x4905x3[_0x1cd7[72]](mxResources[_0x1cd7[26]](_0x4905xf),null,null,_0x4905x4,null,_0x4905xb);this[_0x1cd7[181]](_0x4905xf,_0x4905x3,_0x4905x10)}};Menus[_0x1cd7[5]][_0x1cd7[181]]= function(_0x4905xf,_0x4905x11,_0x4905x4){var _0x4905x3=this[_0x1cd7[26]](_0x4905xf);if(_0x4905x3!= null&& (_0x4905x11[_0x1cd7[81]]|| _0x4905x3[_0x1cd7[78]])){this[_0x1cd7[26]](_0x4905xf)[_0x1cd7[182]](_0x4905x11,_0x4905x4)}};Menus[_0x1cd7[5]][_0x1cd7[20]]= function(_0x4905x3,_0x4905x12,_0x4905x13,_0x4905x14,_0x4905x15,_0x4905x4){return _0x4905x3[_0x1cd7[72]](_0x4905x12,null,mxUtils[_0x1cd7[29]](this,function(){var _0x4905x2=this[_0x1cd7[0]][_0x1cd7[7]][_0x1cd7[6]];_0x4905x2[_0x1cd7[184]]()[_0x1cd7[183]]();try{for(var _0x4905x6=0;_0x4905x6< _0x4905x13[_0x1cd7[18]];_0x4905x6++){_0x4905x2[_0x1cd7[185]](_0x4905x13[_0x4905x6],_0x4905x14[_0x4905x6])}}finally{_0x4905x2[_0x1cd7[184]]()[_0x1cd7[186]]()}}),_0x4905x4,_0x4905x15)};Menus[_0x1cd7[5]][_0x1cd7[28]]= function(_0x4905x3,_0x4905x12,_0x4905x16,_0x4905x17,_0x4905x18,_0x4905x4,_0x4905xb){return _0x4905x3[_0x1cd7[72]](_0x4905x12,null,mxUtils[_0x1cd7[29]](this,function(){var _0x4905x2=this[_0x1cd7[0]][_0x1cd7[7]][_0x1cd7[6]];var _0x4905x19=_0x4905x17;var _0x4905x1a=_0x4905x2[_0x1cd7[189]]()[_0x1cd7[188]](_0x4905x2[_0x1cd7[187]]());if(_0x4905x1a!= null){_0x4905x19= _0x4905x1a[_0x1cd7[21]][_0x4905x18]|| _0x4905x19};_0x4905x19= mxUtils[_0x1cd7[192]](mxResources[_0x1cd7[26]](_0x1cd7[190])+ ((_0x4905x16[_0x1cd7[18]]> 0)?(_0x1cd7[191]+ _0x4905x16):_0x1cd7[27]),_0x4905x19);if(_0x4905x19!= null&& _0x4905x19[_0x1cd7[18]]> 0){_0x4905x2[_0x1cd7[185]](_0x4905x18,_0x4905x19)}}),_0x4905x4,null,_0x4905xb)};Menus[_0x1cd7[5]][_0x1cd7[92]]= function(_0x4905x3,_0x4905x18,_0x4905x4){var _0x4905x1b=this[_0x1cd7[0]][_0x1cd7[80]][_0x1cd7[26]](_0x4905x18);if(_0x4905x1b!= null&& (_0x4905x3[_0x1cd7[81]]|| _0x4905x1b[_0x1cd7[78]])){var _0x4905x1c=_0x4905x3[_0x1cd7[72]](_0x4905x1b[_0x1cd7[193]],null,_0x4905x1b[_0x1cd7[194]],_0x4905x4,null,_0x4905x1b[_0x1cd7[78]]);if(_0x4905x1b[_0x1cd7[195]]&& _0x4905x1b[_0x1cd7[196]]()){this[_0x1cd7[197]](_0x4905x1c)};this[_0x1cd7[198]](_0x4905x1c,_0x4905x1b);return _0x4905x1c};return null};Menus[_0x1cd7[5]][_0x1cd7[198]]= function(_0x4905x1c,_0x4905x1b){if(_0x4905x1b[_0x1cd7[199]]!= null){var _0x4905x1d=_0x4905x1c[_0x1cd7[23]][_0x1cd7[22]][_0x1cd7[22]];var _0x4905x1e=document[_0x1cd7[201]](_0x1cd7[200]);_0x4905x1e[_0x1cd7[21]][_0x1cd7[202]]= _0x1cd7[203];mxUtils[_0x1cd7[204]](_0x4905x1e,_0x4905x1b[_0x1cd7[199]]);_0x4905x1d[_0x1cd7[205]](_0x4905x1e)}};Menus[_0x1cd7[5]][_0x1cd7[197]]= function(_0x4905x1c){var _0x4905x1d=_0x4905x1c[_0x1cd7[23]][_0x1cd7[22]];_0x4905x1d[_0x1cd7[21]][_0x1cd7[206]]= _0x1cd7[207]+ IMAGE_PATH+ _0x1cd7[208];_0x4905x1d[_0x1cd7[21]][_0x1cd7[209]]= _0x1cd7[210];_0x4905x1d[_0x1cd7[21]][_0x1cd7[211]]= _0x1cd7[212]};Menus[_0x1cd7[5]][_0x1cd7[99]]= function(_0x4905x3,_0x4905x13,_0x4905x4){for(var _0x4905x6=0;_0x4905x6< _0x4905x13[_0x1cd7[18]];_0x4905x6++){if(_0x4905x13[_0x4905x6]== _0x1cd7[95]){_0x4905x3[_0x1cd7[24]](_0x4905x4)}else {this[_0x1cd7[92]](_0x4905x3,_0x4905x13[_0x4905x6],_0x4905x4)}}};Menus[_0x1cd7[5]][_0x1cd7[213]]= function(_0x4905x3,_0x4905x1f,_0x4905x20){var _0x4905x2=this[_0x1cd7[0]][_0x1cd7[7]][_0x1cd7[6]];_0x4905x3[_0x1cd7[214]]= true;if(_0x4905x2[_0x1cd7[215]]()){this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[169],_0x1cd7[170],_0x1cd7[95],_0x1cd7[173],_0x1cd7[95]])}else {this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[174],_0x1cd7[95],_0x1cd7[171],_0x1cd7[172],_0x1cd7[95],_0x1cd7[175]]);if(_0x4905x2[_0x1cd7[216]]()== 1&& _0x4905x2[_0x1cd7[184]]()[_0x1cd7[217]](_0x4905x2[_0x1cd7[187]]())){this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[218]])};_0x4905x3[_0x1cd7[24]]()};if(_0x4905x2[_0x1cd7[216]]()> 0){this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[141],_0x1cd7[142],_0x1cd7[95]]);if(_0x4905x2[_0x1cd7[184]]()[_0x1cd7[217]](_0x4905x2[_0x1cd7[187]]())){var _0x4905x21=false;var _0x4905x1f=_0x4905x2[_0x1cd7[187]]();if(_0x4905x1f!= null&& _0x4905x2[_0x1cd7[184]]()[_0x1cd7[217]](_0x4905x1f)){var _0x4905x22=_0x4905x2[_0x1cd7[220]][_0x1cd7[219]](_0x4905x1f);if(_0x4905x22 instanceof mxEdgeHandler&& _0x4905x22[_0x1cd7[221]]!= null&& _0x4905x22[_0x1cd7[221]][_0x1cd7[18]]> 2){var _0x4905x23=_0x4905x22[_0x1cd7[222]]( new mxMouseEvent(_0x4905x20));var _0x4905x24=this[_0x1cd7[0]][_0x1cd7[80]][_0x1cd7[26]](_0x1cd7[223]);_0x4905x24[_0x1cd7[224]]= _0x4905x22;_0x4905x24[_0x1cd7[225]]= _0x4905x23;_0x4905x21= _0x4905x23> 0&& _0x4905x23< _0x4905x22[_0x1cd7[221]][_0x1cd7[18]]}};this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[95],(_0x4905x21)?_0x1cd7[223]:_0x1cd7[226]])}else {if(_0x4905x2[_0x1cd7[216]]()> 1){_0x4905x3[_0x1cd7[24]]();this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[143]])}};_0x4905x3[_0x1cd7[24]]();if(_0x4905x2[_0x1cd7[216]]()== 1){var _0x4905x25=_0x4905x2[_0x1cd7[227]](_0x4905x2[_0x1cd7[187]]());if(_0x4905x25!= null){this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[228]])}}}else {this[_0x1cd7[99]](_0x4905x3,[_0x1cd7[95],_0x1cd7[176],_0x1cd7[177],_0x1cd7[95],_0x1cd7[178]])}};Menus[_0x1cd7[5]][_0x1cd7[229]]= function(_0x4905x26){var _0x4905x27= new Menubar(this[_0x1cd7[0]],_0x4905x26);var _0x4905x28=[_0x1cd7[156],_0x1cd7[168],_0x1cd7[146],_0x1cd7[91],_0x1cd7[93],_0x1cd7[140]];for(var _0x4905x6=0;_0x4905x6< _0x4905x28[_0x1cd7[18]];_0x4905x6++){_0x4905x27[_0x1cd7[181]](mxResources[_0x1cd7[26]](_0x4905x28[_0x4905x6]),this[_0x1cd7[26]](_0x4905x28[_0x4905x6])[_0x1cd7[194]])};return _0x4905x27};function Menubar(_0x4905x1,_0x4905x26){this[_0x1cd7[0]]= _0x4905x1;this[_0x1cd7[230]]= _0x4905x26;mxEvent[_0x1cd7[232]](document,mxUtils[_0x1cd7[29]](this,function(_0x4905x20){this[_0x1cd7[231]]()}))}Menubar[_0x1cd7[5]][_0x1cd7[231]]= function(){if(this[_0x1cd7[233]]!= null){this[_0x1cd7[233]][_0x1cd7[231]]()}};Menubar[_0x1cd7[5]][_0x1cd7[181]]= function(_0x4905x12,_0x4905x2a){var _0x4905x2b=document[_0x1cd7[201]](_0x1cd7[234]);_0x4905x2b[_0x1cd7[237]](_0x1cd7[235],_0x1cd7[236]);_0x4905x2b[_0x1cd7[238]]= _0x1cd7[239];mxUtils[_0x1cd7[204]](_0x4905x2b,_0x4905x12);this[_0x1cd7[240]](_0x4905x2b,_0x4905x2a);this[_0x1cd7[230]][_0x1cd7[205]](_0x4905x2b);return _0x4905x2b};Menubar[_0x1cd7[5]][_0x1cd7[240]]= function(_0x4905x2b,_0x4905x2a){if(_0x4905x2a!= null){var _0x4905x2c=true;var _0x4905x2d=mxUtils[_0x1cd7[29]](this,function(_0x4905x20){if(_0x4905x2c&& _0x4905x2b[_0x1cd7[78]]== null|| _0x4905x2b[_0x1cd7[78]]){this[_0x1cd7[0]][_0x1cd7[7]][_0x1cd7[6]][_0x1cd7[241]][_0x1cd7[231]]();var _0x4905x3= new mxPopupMenu(_0x4905x2a);_0x4905x3[_0x1cd7[242]][_0x1cd7[238]]+= _0x1cd7[243];_0x4905x3[_0x1cd7[214]]= true;_0x4905x3[_0x1cd7[81]]= true;_0x4905x3[_0x1cd7[244]]= true;_0x4905x3[_0x1cd7[231]]= mxUtils[_0x1cd7[29]](this,function(){mxPopupMenu[_0x1cd7[5]][_0x1cd7[231]][_0x1cd7[245]](_0x4905x3,arguments);_0x4905x3[_0x1cd7[246]]();this[_0x1cd7[233]]= null;this[_0x1cd7[247]]= null});var _0x4905x2e=_0x4905x2b[_0x1cd7[248]]+ document[_0x1cd7[251]](_0x1cd7[250])[_0x1cd7[249]]+ 22;var _0x4905x2f=_0x4905x2b[_0x1cd7[252]]+ _0x4905x2b[_0x1cd7[253]]+ 140;_0x4905x3[_0x1cd7[254]](_0x4905x2e,_0x4905x2f,null,_0x4905x20);this[_0x1cd7[233]]= _0x4905x3;this[_0x1cd7[247]]= _0x4905x2b};_0x4905x2c= true;mxEvent[_0x1cd7[255]](_0x4905x20)});mxEvent[_0x1cd7[257]](_0x4905x2b,_0x1cd7[256],mxUtils[_0x1cd7[29]](this,function(_0x4905x20){if(this[_0x1cd7[233]]!= null&& this[_0x1cd7[247]]!= _0x4905x2b){this[_0x1cd7[231]]();_0x4905x2d(_0x4905x20)}}));mxEvent[_0x1cd7[257]](_0x4905x2b,_0x1cd7[258],mxUtils[_0x1cd7[29]](this,function(){_0x4905x2c= this[_0x1cd7[247]]!= _0x4905x2b}));mxEvent[_0x1cd7[257]](_0x4905x2b,_0x1cd7[259],_0x4905x2d)}};function Menu(_0x4905x2a,_0x4905xb){mxEventSource[_0x1cd7[260]](this);this[_0x1cd7[194]]= _0x4905x2a;this[_0x1cd7[78]]= (_0x4905xb!= null)?_0x4905xb:true}mxUtils[_0x1cd7[261]](Menu,mxEventSource);Menu[_0x1cd7[5]][_0x1cd7[262]]= function(_0x4905x19){if(this[_0x1cd7[78]]!= _0x4905x19){this[_0x1cd7[78]]= _0x4905x19;this[_0x1cd7[264]]( new mxEventObject(_0x1cd7[263]))}};Menu[_0x1cd7[5]][_0x1cd7[182]]= function(_0x4905x3,_0x4905x4){this[_0x1cd7[194]](_0x4905x3,_0x4905x4)} \ No newline at end of file diff --git a/public/assets/plugins/jscripty/js/Shapes.js b/public/assets/plugins/jscripty/js/Shapes.js index 42e13ca..aaa9421 100644 --- a/public/assets/plugins/jscripty/js/Shapes.js +++ b/public/assets/plugins/jscripty/js/Shapes.js @@ -1,1234 +1 @@ -/** - * $Id: Shapes.js,v 1.13 2013-02-02 06:44:30 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ - -/** - * Registers shapes. - */ -(function() -{ - // Cube Shape, supports size style - function CubeShape() { }; - CubeShape.prototype = new mxCylinder(); - CubeShape.prototype.constructor = CubeShape; - CubeShape.prototype.size = 20; - CubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size))); - - if (isForeground) - { - path.moveTo(s, h); - path.lineTo(s, s); - path.lineTo(0, 0); - path.moveTo(s, s); - path.lineTo(w, s); - path.end(); - } - else - { - path.moveTo(0, 0); - path.lineTo(w - s, 0); - path.lineTo(w, s); - path.lineTo(w, h); - path.lineTo(s, h); - path.lineTo(0, h - s); - path.lineTo(0, 0); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['cube'] = CubeShape; - - // Note Shape, supports size style - function NoteShape() { }; - NoteShape.prototype = new mxCylinder(); - NoteShape.prototype.constructor = NoteShape; - NoteShape.prototype.size = 30; - NoteShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size))); - - if (isForeground) - { - path.moveTo(w - s, 0); - path.lineTo(w - s, s); - path.lineTo(w, s); - path.end(); - } - else - { - path.moveTo(0, 0); - path.lineTo(w - s, 0); - path.lineTo(w, s); - path.lineTo(w, h); - path.lineTo(0, h); - path.lineTo(0, 0); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['note'] = NoteShape; - - // Folder Shape, supports tabWidth, tabHeight styles - function FolderShape() { }; - FolderShape.prototype = new mxCylinder(); - FolderShape.prototype.constructor = FolderShape; - FolderShape.prototype.tabWidth = 60; - FolderShape.prototype.tabHeight = 20; - FolderShape.prototype.tabPosition = 'right'; - FolderShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var tw = mxUtils.getValue(this.style, 'tabWidth', this.tabWidth); - var th = mxUtils.getValue(this.style, 'tabHeight', this.tabHeight); - var tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition); - var dx = Math.min(w, tw); - var dy = Math.min(h, th); - - if (isForeground) - { - if (tp == 'left') - { - path.moveTo(0, dy); - path.lineTo(dx, dy); - } - // Right is default - else - { - path.moveTo(w - dx, dy); - path.lineTo(w, dy); - } - - path.end(); - } - else - { - if (tp == 'left') - { - path.moveTo(0, 0); - path.lineTo(dx, 0); - path.lineTo(dx, dy); - path.lineTo(w, dy); - } - // Right is default - else - { - path.moveTo(0, dy); - path.lineTo(w - dx, dy); - path.lineTo(w - dx, 0); - path.lineTo(w, 0); - } - - path.lineTo(w, h); - path.lineTo(0, h); - path.lineTo(0, dy); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['folder'] = FolderShape; - - // Card Shape, supports size style - function CardShape() { }; - CardShape.prototype = new mxCylinder(); - CardShape.prototype.constructor = CardShape; - CardShape.prototype.size = 30; - CardShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size))); - - if (!isForeground) - { - path.moveTo(s, 0); - path.lineTo(w, 0); - path.lineTo(w, h); - path.lineTo(0, h); - path.lineTo(0, s); - path.lineTo(s, 0); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['card'] = CardShape; - - // Tape Shape, supports size style - function TapeShape() { }; - TapeShape.prototype = new mxCylinder(); - TapeShape.prototype.constructor = TapeShape; - TapeShape.prototype.size = 0.4; - TapeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var s = mxUtils.getValue(this.style, 'size', this.size); - var dy = h * s; - var fy = 1.4; - - if (!isForeground) - { - path.moveTo(0, dy / 2); - path.quadTo(w / 4, dy * fy, w / 2, dy / 2); - path.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2); - path.lineTo(w, h - dy / 2); - path.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2); - path.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2); - path.lineTo(0, dy / 2); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['tape'] = TapeShape; - - // Tape Shape, supports size style - function StepShape() { }; - StepShape.prototype = new mxCylinder(); - StepShape.prototype.constructor = StepShape; - StepShape.prototype.size = 0.2; - StepShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var s = w * mxUtils.getValue(this.style, 'size', this.size); - - if (!isForeground) - { - path.moveTo(0, 0); - path.lineTo(w - s, 0); - path.lineTo(w, h / 2); - path.lineTo(w - s, h); - path.lineTo(0, h); - path.lineTo(s, h / 2); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['step'] = StepShape; - - // Plus Shape - function PlusShape() - { - mxRectangleShape.call(this); - }; - mxUtils.extend(PlusShape, mxRectangleShape); - PlusShape.prototype.isHtmlAllowed = function() - { - return false; - }; - PlusShape.prototype.paintForeground = function(c, x, y, w, h) - { - var border = Math.min(w / 5, h / 5) + 1; - - c.begin(); - c.moveTo(x + w / 2, y + border); - c.lineTo(x + w / 2, y + h - border); - c.moveTo(x + border, y + h / 2); - c.lineTo(x + w - border, y + h / 2); - c.end(); - c.stroke(); - mxRectangleShape.prototype.paintForeground.apply(this, arguments); - }; - - mxCellRenderer.prototype.defaultShapes['plus'] = PlusShape; - - // CompositeShape - function ExtendedShape() - { - mxRectangleShape.call(this); - }; - mxUtils.extend(ExtendedShape, mxRectangleShape); - ExtendedShape.prototype.isHtmlAllowed = function() - { - return false; - }; - ExtendedShape.prototype.paintForeground = function(c, x, y, w, h) - { - if (this.style != null) - { - if (this.style['double'] == 1) - { - var inset = Math.max(2, this.strokewidth + 1); - - mxRectangleShape.prototype.paintBackground.call(this, c, x + inset, y + inset, w - 2 * inset, h - 2 * inset); - mxRectangleShape.prototype.paintForeground.apply(this, arguments); - - x += inset; - y += inset; - w -= 2 * inset; - h -= 2 * inset; - } - - c.setDashed(false); - - // Draws the symbols defined in the style. The symbols are - // numbered from 1...n. Possible postfixes are align, - // verticalAlign, spacing, arcSpacing, width, height - var counter = 0; - var shape = null; - - do - { - shape = mxCellRenderer.prototype.defaultShapes[this.style['symbol' + counter]]; - - if (shape != null) - { - var align = this.style['symbol' + counter + 'Align']; - var valign = this.style['symbol' + counter + 'VerticalAlign']; - var width = this.style['symbol' + counter + 'Width']; - var height = this.style['symbol' + counter + 'Height']; - var spacing = this.style['symbol' + counter + 'Spacing'] || 0; - var arcspacing = this.style['symbol' + counter + 'ArcSpacing']; - - if (arcspacing != null) - { - spacing += this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing; - } - - var x2 = x; - var y2 = y; - - if (align == mxConstants.ALIGN_CENTER) - { - x2 += (w - width) / 2; - } - else if (align == mxConstants.ALIGN_RIGHT) - { - x2 += w - width - spacing; - } - else - { - x2 += spacing; - } - - if (valign == mxConstants.ALIGN_MIDDLE) - { - y2 += (h - height) / 2; - } - else if (valign == mxConstants.ALIGN_BOTTOM) - { - y2 += h - height - spacing; - } - else - { - y2 += spacing; - } - - c.save(); - - // Small hack to pass style along into subshape - var tmp = new shape(); - // TODO: Clone style and override settings (eg. strokewidth) - tmp.style = this.style; - shape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height); - c.restore(); - } - - counter++; - } - while (shape != null); - } - }; - - mxCellRenderer.prototype.defaultShapes['ext'] = ExtendedShape; - - // Tape Shape, supports size style - function MessageShape() { }; - MessageShape.prototype = new mxCylinder(); - MessageShape.prototype.constructor = MessageShape; - MessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - if (isForeground) - { - path.moveTo(0, 0); - path.lineTo(w / 2, h / 2); - path.lineTo(w, 0); - path.end(); - } - else - { - path.moveTo(0, 0); - path.lineTo(w, 0); - path.lineTo(w, h); - path.lineTo(0, h); - path.close(); - } - }; - - mxCellRenderer.prototype.defaultShapes['message'] = MessageShape; - - // New Actor Shape - function UmlActorShape() { }; - UmlActorShape.prototype = new mxCylinder(); - UmlActorShape.prototype.constructor = UmlActorShape; - UmlActorShape.prototype.addPipe = true; - UmlActorShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var width = w / 3; - var height = h / 4; - - if (!isForeground) - { - path.moveTo(w / 2, height); - path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0); - path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height); - path.close(); - - path.moveTo(w / 2, height); - path.lineTo(w / 2, 2 * h / 3); - - // Arms - path.moveTo(w / 2, h / 3); - path.lineTo(0, h / 3); - path.moveTo(w / 2, h / 3); - path.lineTo(w, h / 3); - - // Legs - path.moveTo(w / 2, 2 * h / 3); - path.lineTo(0, h); - path.moveTo(w / 2, 2 * h / 3); - path.lineTo(w, h); - path.end(); - } - }; - - // Replaces existing actor shape - mxCellRenderer.prototype.defaultShapes['umlActor'] = UmlActorShape; - - // New Actor Shape - function LollipopShape() { }; - LollipopShape.prototype = new mxCylinder(); - LollipopShape.prototype.constructor = LollipopShape; - LollipopShape.prototype.size = 10; - LollipopShape.prototype.addPipe = true; - LollipopShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var ss = mxUtils.getValue(this.style, 'size', this.size); - var width = ss * 2 / 3; - var height = ss; - - if (!isForeground) - { - path.moveTo(w / 2, height); - path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0); - path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height); - path.close(); - - path.moveTo(w / 2, height); - path.lineTo(w / 2, h); - path.end(); - } - }; - - // Replaces existing actor shape - mxCellRenderer.prototype.defaultShapes['lollipop'] = LollipopShape; - - // Folder Shape, supports tabWidth, tabHeight styles - function ComponentShape() { }; - ComponentShape.prototype = new mxCylinder(); - ComponentShape.prototype.constructor = ComponentShape; - ComponentShape.prototype.jettyWidth = 32; - ComponentShape.prototype.jettyHeight = 12; - ComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var dx = mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth); - var dy = mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight); - var x0 = dx / 2; - var x1 = x0 + dx / 2; - var y0 = 0.3 * h - dy / 2; - var y1 = 0.7 * h - dy / 2; - - if (isForeground) - { - path.moveTo(x0, y0); - path.lineTo(x1, y0); - path.lineTo(x1, y0 + dy); - path.lineTo(x0, y0 + dy); - path.moveTo(x0, y1); - path.lineTo(x1, y1); - path.lineTo(x1, y1 + dy); - path.lineTo(x0, y1 + dy); - path.end(); - } - else - { - path.moveTo(x0, 0); - path.lineTo(w, 0); - path.lineTo(w, h); - path.lineTo(x0, h); - path.lineTo(x0, y1 + dy); - path.lineTo(0, y1 + dy); - path.lineTo(0, y1); - path.lineTo(x0, y1); - path.lineTo(x0, y0 + dy); - path.lineTo(0, y0 + dy); - path.lineTo(0, y0); - path.lineTo(x0, y0); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['component'] = ComponentShape; - - // State Shapes derives from double ellipse - function StateShape() { }; - StateShape.prototype = new mxDoubleEllipse(); - StateShape.prototype.constructor = StateShape; - StateShape.prototype.outerStroke = true; - StateShape.prototype.paintVertexShape = function(c, x, y, w, h) - { - var inset = Math.min(4, Math.min(w / 5, h / 5)); - - if (w > 0 && h > 0) - { - c.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset); - c.fillAndStroke(); - } - - c.setShadow(false); - - if (this.outerStroke) - { - c.ellipse(x, y, w, h); - c.stroke(); - } - }; - - mxCellRenderer.prototype.defaultShapes['endState'] = StateShape; - - function StartStateShape() { }; - StartStateShape.prototype = new StateShape(); - StartStateShape.prototype.constructor = StartStateShape; - StartStateShape.prototype.outerStroke = false; - - mxCellRenderer.prototype.defaultShapes['startState'] = StartStateShape; - - // Image export for state shapes - var imageExportInitShapes = mxImageExport.prototype.initShapes; - mxImageExport.prototype.initShapes = function() - { - imageExportInitShapes.apply(this, arguments); - - function createStateShape(outerStroke) - { - return { - drawShape: function(canvas, state, bounds, background) - { - var x = bounds.x; - var y = bounds.y; - var w = bounds.width; - var h = bounds.height; - - if (background) - { - var inset = Math.min(4, Math.min(w / 5, h / 5)); - x += inset; - y += inset; - w -= 2 * inset; - h -= 2 * inset; - - if (w > 0 && h > 0) - { - canvas.ellipse(x, y, w, h); - } - - return true; - } - else - { - canvas.fillAndStroke(); - - if (outerStroke) - { - canvas.ellipse(x, y, w, h); - canvas.stroke(); - } - } - } - }; - }; - - this.shapes['endState'] = createStateShape(true); - this.shapes['startState'] = createStateShape(false); - }; - - // Defines custom edge shape - function LinkShape() - { - mxArrow.call(this); - }; - mxUtils.extend(LinkShape, mxArrow); - LinkShape.prototype.paintEdgeShape = function(c, pts) - { - var width = 10; - - // Base vector (between end points) - var p0 = pts[0]; - var pe = pts[pts.length - 1]; - - var dx = pe.x - p0.x; - var dy = pe.y - p0.y; - var dist = Math.sqrt(dx * dx + dy * dy); - var length = dist; - - // Computes the norm and the inverse norm - var nx = dx / dist; - var ny = dy / dist; - var basex = length * nx; - var basey = length * ny; - var floorx = width * ny/3; - var floory = -width * nx/3; - - // Computes points - var p0x = p0.x - floorx / 2; - var p0y = p0.y - floory / 2; - var p1x = p0x + floorx; - var p1y = p0y + floory; - var p2x = p1x + basex; - var p2y = p1y + basey; - var p3x = p2x + floorx; - var p3y = p2y + floory; - // p4 not necessary - var p5x = p3x - 3 * floorx; - var p5y = p3y - 3 * floory; - - c.begin(); - c.moveTo(p1x, p1y); - c.lineTo(p2x, p2y); - c.moveTo(p5x + floorx, p5y + floory); - c.lineTo(p0x, p0y); - c.stroke(); - }; - - // Registers the link shape - mxCellRenderer.prototype.defaultShapes['link'] = LinkShape; - - // Registers and defines the custom marker - mxMarker.addMarker('dash', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled) - { - var nx = unitX * (size + sw + 1); - var ny = unitY * (size + sw + 1); - - return function() - { - canvas.begin(); - canvas.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2); - canvas.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2); - canvas.stroke(); - }; - }); - - // Implements custom handlers - var SPECIAL_HANDLE_INDEX = -99; - - // Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph) - if (typeof(mxVertexHandler) != 'undefined') - { - function mxExtVertexHandler(state) - { - mxVertexHandler.call(this, state); - }; - - mxUtils.extend(mxExtVertexHandler, mxVertexHandler); - - mxExtVertexHandler.prototype.useGridForSpecialHandle = false; - - mxExtVertexHandler.prototype.init = function() - { - this.horizontal = mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true); - var graph = this.state.view.graph; - - if (this.handleImage != null) - { - var bounds = new mxRectangle(0, 0, this.handleImage.width, this.handleImage.height); - this.specialHandle = new mxImageShape(bounds, this.handleImage.src); - } - else - { - var size = 10; - var bounds = new mxRectangle(0, 0, size, size); - this.specialHandle = new mxRhombus(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR); - } - - this.specialHandle.dialect = (graph.dialect != mxConstants.DIALECT_SVG) ? - mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG; - this.specialHandle.init(graph.getView().getOverlayPane()); - this.specialHandle.node.style.cursor = this.getSpecialHandleCursor(); - - mxEvent.redirectMouseEvents(this.specialHandle.node, graph, this.state); - mxVertexHandler.prototype.init.apply(this, arguments); - }; - - mxExtVertexHandler.prototype.getSpecialHandleCursor = function() - { - return 'default'; - }; - - mxExtVertexHandler.prototype.redraw = function() - { - mxVertexHandler.prototype.redraw.apply(this, arguments); - - var size = this.specialHandle.bounds.width; - this.specialHandle.bounds = this.getSpecialHandleBounds(size); - this.specialHandle.redraw(); - }; - - mxExtVertexHandler.prototype.destroy = function() - { - mxVertexHandler.prototype.destroy.apply(this, arguments); - - if (this.specialHandle != null) - { - this.specialHandle.destroy(); - this.specialHandle = null; - } - }; - - mxExtVertexHandler.prototype.getHandleForEvent = function(me) - { - if (me.isSource(this.specialHandle)) - { - return SPECIAL_HANDLE_INDEX; - } - - return mxVertexHandler.prototype.getHandleForEvent.apply(this, arguments); - }; - - mxExtVertexHandler.prototype.mouseMove = function(sender, me) - { - if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX) - { - var point = new mxPoint(me.getGraphX(), me.getGraphY()); - this.constrainPoint(point); - var gridEnabled = this.graph.isGridEnabledEvent(me.getEvent()); - var scale = this.graph.getView().scale; - - if (gridEnabled && this.useGridForSpecialHandle) - { - point.x = this.graph.snap(point.x / scale) * scale; - point.y = this.graph.snap(point.y / scale) * scale; - } - - this.updateStyle(point); - this.moveSizerTo(this.specialHandle, point.x, point.y); - this.state.view.graph.cellRenderer.redraw(this.state, true); - me.consume(); - } - else - { - mxVertexHandler.prototype.mouseMove.apply(this, arguments); - } - }; - - mxExtVertexHandler.prototype.mouseUp = function(sender, me) - { - if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX) - { - this.applyStyle(); - this.reset(); - me.consume(); - } - else - { - mxVertexHandler.prototype.mouseUp.apply(this, arguments); - } - }; - - mxExtVertexHandler.prototype.getSpecialHandleBounds = function(size) - { - var rotation = this.state.shape.getShapeRotation(); - var alpha = mxUtils.toRadians(rotation); - var cos = Math.cos(alpha); - var sin = Math.sin(alpha); - - var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height); - - if (this.state.shape.isPaintBoundsInverted()) - { - var t = (bounds.width - bounds.height) / 2; - bounds.x += t; - bounds.y -= t; - var tmp = bounds.width; - bounds.width = bounds.height; - bounds.height = tmp; - } - - var pt = this.getSpecialHandlePoint(bounds); - - if (this.state.shape.flipH) - { - pt.x = 2 * bounds.x + bounds.width - pt.x; - } - - if (this.state.shape.flipV) - { - pt.y = 2 * bounds.y + bounds.height - pt.y; - } - - pt = mxUtils.getRotatedPoint(pt, cos, sin, - new mxPoint(this.state.getCenterX(), this.state.getCenterY())); - - return new mxRectangle(pt.x - size / 2, pt.y - size / 2, size, size); - }; - - mxExtVertexHandler.prototype.getSpecialHandlePoint = function(bounds) - { - // Hook for subclassers - return null; - }; - - mxExtVertexHandler.prototype.updateStyle = function(point) - { - // Hook for subclassers - }; - - mxExtVertexHandler.prototype.constrainPoint = function(point) - { - point.x = Math.max(this.state.x, Math.min(this.state.x + this.state.width, point.x)); - point.y = Math.max(this.state.y, Math.min(this.state.y + this.state.height, point.y)); - }; - - mxExtVertexHandler.prototype.applyStyle = function() - { - // Hook for subclassers - }; - - // Folder Handler - function mxFolderHandler(state) - { - mxExtVertexHandler.call(this, state); - }; - - mxUtils.extend(mxFolderHandler, mxExtVertexHandler); - - mxFolderHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var scale = this.graph.getView().scale; - var tw = Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', 60) * scale); - var th = Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', 20) * scale); - - var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right'); - var x = (tp == 'left') ? bounds.x + tw : bounds.x + bounds.width - tw; - - return new mxPoint(x, bounds.y + th); - }; - - mxFolderHandler.prototype.updateStyle = function(point) - { - var rotation = this.state.shape.getShapeRotation(); - var alpha = mxUtils.toRadians(rotation); - var cos = Math.cos(-alpha); - var sin = Math.sin(-alpha); - - var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height); - - if (this.state.shape.isPaintBoundsInverted()) - { - var t = (bounds.width - bounds.height) / 2; - bounds.x += t; - bounds.y -= t; - var tmp = bounds.width; - bounds.width = bounds.height; - bounds.height = tmp; - } - - var pt = new mxPoint(point.x, point.y); - pt = mxUtils.getRotatedPoint(pt, cos, sin, - new mxPoint(this.state.getCenterX(), this.state.getCenterY())); - - if (this.state.shape.flipH) - { - pt.x = 2 * bounds.x + bounds.width - pt.x; - } - - if (this.state.shape.flipV) - { - pt.y = 2 * bounds.y + bounds.height - pt.y; - } - - var result = this.updateStyleUnrotated(pt, bounds); - - // Modifies point to use rotated coordinates of return value - if (result != null) - { - if (this.state.shape.flipH) - { - result.x = 2 * bounds.x + bounds.width - result.x; - } - - if (this.state.shape.flipV) - { - result.y = 2 * bounds.y + bounds.height - result.y; - } - - cos = Math.cos(alpha); - sin = Math.sin(alpha); - result = mxUtils.getRotatedPoint(result, cos, sin, - new mxPoint(this.state.getCenterX(), this.state.getCenterY())); - point.x = result.x; - point.y = result.y; - } - }; - - mxFolderHandler.prototype.updateStyleUnrotated = function(pt, bounds) - { - var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right'); - var tw = (tp == 'left') ? pt.x - bounds.x : bounds.x + bounds.width - pt.x; - var th = pt.y - bounds.y; - - var scale = this.graph.getView().scale; - this.state.style['tabWidth'] = Math.round(Math.max(1, tw) / scale); - this.state.style['tabHeight'] = Math.round(Math.max(1, th) / scale); - }; - - mxFolderHandler.prototype.applyStyle = function() - { - var model = this.graph.getModel(); - model.beginUpdate(); - try - { - this.state.view.graph.setCellStyles('tabWidth', this.state.style['tabWidth'], [this.state.cell]); - this.state.view.graph.setCellStyles('tabHeight', this.state.style['tabHeight'], [this.state.cell]); - } - finally - { - model.endUpdate(); - } - }; - - // Swimlane Handler - function mxSwimlaneHandler(state) - { - mxFolderHandler.call(this, state); - }; - - mxUtils.extend(mxSwimlaneHandler, mxFolderHandler); - - mxSwimlaneHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var scale = this.graph.getView().scale; - var startSize = mxUtils.getValue(this.state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE); - - return new mxPoint(bounds.x + bounds.width / 2, bounds.y + Math.min(bounds.height, startSize * scale)); - }; - - mxSwimlaneHandler.prototype.updateStyleUnrotated = function(point, bounds) - { - point.x = bounds.x + bounds.width / 2; - startSize = point.y - bounds.y; - var scale = this.graph.getView().scale; - this.state.style['startSize'] = Math.round(Math.max(1, startSize) / scale); - - return point; - }; - - mxSwimlaneHandler.prototype.applyStyle = function() - { - this.state.view.graph.setCellStyles('startSize', this.state.style['startSize'], [this.state.cell]); - }; - - // Cube Handler - function mxCubeHandler(state) - { - mxFolderHandler.call(this, state); - }; - - mxUtils.extend(mxCubeHandler, mxFolderHandler); - - mxCubeHandler.prototype.defaultValue = 20; - - mxCubeHandler.prototype.scaleFactor = 1; - - mxCubeHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var scale = this.graph.getView().scale; - var sz = Math.min(bounds.width, Math.min(bounds.height, - mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor)); - - return new mxPoint(bounds.x + sz, bounds.y + sz); - }; - - mxCubeHandler.prototype.updateStyleUnrotated = function(pt, bounds) - { - var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x), - Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y))); - var scale = this.graph.getView().scale; - this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor; - - // Stays on the diagonal - return new mxPoint(bounds.x + size, bounds.y + size); - }; - - mxCubeHandler.prototype.applyStyle = function() - { - this.state.view.graph.setCellStyles('size', this.state.style['size'], [this.state.cell]); - }; - - // Card Handler - function mxCardHandler(state) - { - mxCubeHandler.call(this, state); - }; - - mxUtils.extend(mxCardHandler, mxCubeHandler); - - mxCardHandler.prototype.defaultValue = 30; - - mxCardHandler.prototype.scaleFactor = 2; - - // Note Handler - function mxNoteHandler(state) - { - mxCubeHandler.call(this, state); - }; - - mxUtils.extend(mxNoteHandler, mxCubeHandler); - - mxNoteHandler.prototype.defaultValue = 30; - - mxNoteHandler.prototype.scaleFactor = 1; - - mxNoteHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var scale = this.graph.getView().scale; - var sz = Math.min(bounds.width, Math.min(bounds.height, - mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor)); - - return new mxPoint(bounds.x + bounds.width - sz, bounds.y + sz); - }; - - mxNoteHandler.prototype.updateStyleUnrotated = function(pt, bounds) - { - var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x + bounds.width), - Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y))); - var scale = this.graph.getView().scale; - this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor; - - // Stays on the diagonal - return new mxPoint(bounds.x + bounds.width - size, bounds.y + size); - }; - - // Step Handler - function mxStepHandler(state) - { - mxCubeHandler.call(this, state); - }; - - mxUtils.extend(mxStepHandler, mxCubeHandler); - - mxStepHandler.prototype.defaultValue = 0.2; - - mxStepHandler.prototype.scaleFactor = 1; - - mxStepHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue); - - return new mxPoint(bounds.x + bounds.width * sz, bounds.y + bounds.height / 2); - }; - - mxStepHandler.prototype.updateStyleUnrotated = function(pt, bounds) - { - var size = Math.min(1, (pt.x - bounds.x) / bounds.width); - this.state.style['size'] = size; - - return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 2); - }; - - // Tape Handler - function mxTapeHandler(state) - { - mxCubeHandler.call(this, state); - }; - - mxUtils.extend(mxTapeHandler, mxCubeHandler); - - mxTapeHandler.prototype.defaultValue = 0.4; - - mxTapeHandler.prototype.scaleFactor = 1; - - mxTapeHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue); - - return new mxPoint(bounds.x + bounds.width / 2, bounds.y + sz * bounds.height / 2); - }; - - mxTapeHandler.prototype.updateStyleUnrotated = function(pt, bounds) - { - var size = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2)); - this.state.style['size'] = size; - - return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size * bounds.height / 2); - }; - - var handlers = {'swimlane': mxSwimlaneHandler, 'folder': mxFolderHandler, 'cube': mxCubeHandler, - 'card': mxCardHandler, 'note': mxNoteHandler, 'step': mxStepHandler, 'tape': mxTapeHandler}; - - var mxGraphCreateHandler = mxGraph.prototype.createHandler; - mxGraph.prototype.createHandler = function(state) - { - if (state != null) - { - var ctor = handlers[state.style['shape']]; - - if (ctor != null) - { - return new ctor(state); - } - } - - return mxGraphCreateHandler.apply(this, arguments); - }; - } - - // Constraints - mxGraph.prototype.getAllConnectionConstraints = function(terminal, source) - { - if (terminal != null && terminal.shape != null) - { - if (terminal.shape.stencil != null) - { - if (terminal.shape.stencil != null) - { - return terminal.shape.stencil.constraints; - } - } - else if (terminal.shape.constraints != null) - { - return terminal.shape.constraints; - } - } - - return null; - }; - - mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.75, 0), true), - new mxConnectionConstraint(new mxPoint(0, 0.25), true), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), - new mxConnectionConstraint(new mxPoint(0, 0.75), true), - new mxConnectionConstraint(new mxPoint(1, 0.25), true), - new mxConnectionConstraint(new mxPoint(1, 0.5), true), - new mxConnectionConstraint(new mxPoint(1, 0.75), true), - new mxConnectionConstraint(new mxPoint(0.25, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.75, 1), true)]; - mxLabel.prototype.constraints = mxRectangleShape.prototype.constraints; - mxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints; - mxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints; - PlusShape.prototype.constraints = mxRectangleShape.prototype.constraints; - NoteShape.prototype.constraints = mxRectangleShape.prototype.constraints; - CardShape.prototype.constraints = mxRectangleShape.prototype.constraints; - CubeShape.prototype.constraints = mxRectangleShape.prototype.constraints; - FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints; - mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.85, 0.05), false), - new mxConnectionConstraint(new mxPoint(0, 0.3), true), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), - new mxConnectionConstraint(new mxPoint(0, 0.7), true), - new mxConnectionConstraint(new mxPoint(1, 0.3), true), - new mxConnectionConstraint(new mxPoint(1, 0.5), true), - new mxConnectionConstraint(new mxPoint(1, 0.7), true), - new mxConnectionConstraint(new mxPoint(0.15, 0.95), false), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)]; - UmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false), - new mxConnectionConstraint(new mxPoint(0.5, 0), false), - new mxConnectionConstraint(new mxPoint(0.75, 0.1), false), - new mxConnectionConstraint(new mxPoint(0, 1/3), false), - new mxConnectionConstraint(new mxPoint(0, 1), false), - new mxConnectionConstraint(new mxPoint(1, 1/3), false), - new mxConnectionConstraint(new mxPoint(1, 1), false), - new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)]; - ComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.75, 0), true), - new mxConnectionConstraint(new mxPoint(0, 0.3), true), - new mxConnectionConstraint(new mxPoint(0, 0.7), true), - new mxConnectionConstraint(new mxPoint(1, 0.25), true), - new mxConnectionConstraint(new mxPoint(1, 0.5), true), - new mxConnectionConstraint(new mxPoint(1, 0.75), true), - new mxConnectionConstraint(new mxPoint(0.25, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.75, 1), true)]; - mxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.25, 0.2), false), - new mxConnectionConstraint(new mxPoint(0.1, 0.5), false), - new mxConnectionConstraint(new mxPoint(0, 0.75), true), - new mxConnectionConstraint(new mxPoint(0.75, 0.25), false), - new mxConnectionConstraint(new mxPoint(0.9, 0.5), false), - new mxConnectionConstraint(new mxPoint(1, 0.75), true), - new mxConnectionConstraint(new mxPoint(0.25, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.75, 1), true)]; - TapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false), - new mxConnectionConstraint(new mxPoint(0, 0.5), false), - new mxConnectionConstraint(new mxPoint(0, 0.65), false), - new mxConnectionConstraint(new mxPoint(1, 0.35), false), - new mxConnectionConstraint(new mxPoint(1, 0.5), false), - new mxConnectionConstraint(new mxPoint(1, 0.65), false), - new mxConnectionConstraint(new mxPoint(0.25, 1), false), - new mxConnectionConstraint(new mxPoint(0.75, 0), false)]; - // TODO: Relative ports - StepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.75, 0), true), - new mxConnectionConstraint(new mxPoint(0.25, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.75, 1), true), - new mxConnectionConstraint(new mxPoint(0.1, 0.25), false), - new mxConnectionConstraint(new mxPoint(0.2, 0.5), false), - new mxConnectionConstraint(new mxPoint(0.1, 0.75), false), - new mxConnectionConstraint(new mxPoint(0.9, 0.25), false), - new mxConnectionConstraint(new mxPoint(1, 0.5), false), - new mxConnectionConstraint(new mxPoint(0.9, 0.75), false)]; - mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false), - new mxConnectionConstraint(new mxPoint(0.25, 0.5), false), - new mxConnectionConstraint(new mxPoint(0.75, 0.5), false), - new mxConnectionConstraint(new mxPoint(1, 0.5), false)]; - LollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false), - new mxConnectionConstraint(new mxPoint(0.5, 1), false)]; - mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true), - new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))]; - mxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints; - mxRhombus.prototype.constraints = mxEllipse.prototype.constraints; - mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), - new mxConnectionConstraint(new mxPoint(0, 0.75), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(1, 0.5), true)]; - mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.625, 0), true), - new mxConnectionConstraint(new mxPoint(0.125, 0.25), false), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), - new mxConnectionConstraint(new mxPoint(0.125, 0.75), false), - new mxConnectionConstraint(new mxPoint(0.875, 0.25), false), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), - new mxConnectionConstraint(new mxPoint(1, 0.5), true), - new mxConnectionConstraint(new mxPoint(0.875, 0.75), false), - new mxConnectionConstraint(new mxPoint(0.375, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.625, 1), true)]; - mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false), - new mxConnectionConstraint(new mxPoint(0.4, 0.1), false), - new mxConnectionConstraint(new mxPoint(0.16, 0.55), false), - new mxConnectionConstraint(new mxPoint(0.07, 0.4), false), - new mxConnectionConstraint(new mxPoint(0.31, 0.8), false), - new mxConnectionConstraint(new mxPoint(0.13, 0.77), false), - new mxConnectionConstraint(new mxPoint(0.8, 0.8), false), - new mxConnectionConstraint(new mxPoint(0.55, 0.95), false), - new mxConnectionConstraint(new mxPoint(0.875, 0.5), false), - new mxConnectionConstraint(new mxPoint(0.96, 0.7), false), - new mxConnectionConstraint(new mxPoint(0.625, 0.2), false), - new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)]; - mxArrow.prototype.constraints = null; -})(); +var _0x82e8=["\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x73\x69\x7A\x65","\x72\x65\x64\x72\x61\x77\x50\x61\x74\x68","\x73\x74\x79\x6C\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x6D\x69\x6E","\x6D\x6F\x76\x65\x54\x6F","\x6C\x69\x6E\x65\x54\x6F","\x65\x6E\x64","\x63\x6C\x6F\x73\x65","\x63\x75\x62\x65","\x64\x65\x66\x61\x75\x6C\x74\x53\x68\x61\x70\x65\x73","\x6E\x6F\x74\x65","\x74\x61\x62\x57\x69\x64\x74\x68","\x74\x61\x62\x48\x65\x69\x67\x68\x74","\x74\x61\x62\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x72\x69\x67\x68\x74","\x6C\x65\x66\x74","\x66\x6F\x6C\x64\x65\x72","\x63\x61\x72\x64","\x71\x75\x61\x64\x54\x6F","\x74\x61\x70\x65","\x73\x74\x65\x70","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x69\x73\x48\x74\x6D\x6C\x41\x6C\x6C\x6F\x77\x65\x64","\x70\x61\x69\x6E\x74\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x62\x65\x67\x69\x6E","\x73\x74\x72\x6F\x6B\x65","\x61\x70\x70\x6C\x79","\x70\x6C\x75\x73","\x64\x6F\x75\x62\x6C\x65","\x73\x74\x72\x6F\x6B\x65\x77\x69\x64\x74\x68","\x6D\x61\x78","\x70\x61\x69\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x73\x65\x74\x44\x61\x73\x68\x65\x64","\x73\x79\x6D\x62\x6F\x6C","\x41\x6C\x69\x67\x6E","\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x57\x69\x64\x74\x68","\x48\x65\x69\x67\x68\x74","\x53\x70\x61\x63\x69\x6E\x67","\x41\x72\x63\x53\x70\x61\x63\x69\x6E\x67","\x67\x65\x74\x41\x72\x63\x53\x69\x7A\x65","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x73\x61\x76\x65","\x70\x61\x69\x6E\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x72\x65\x73\x74\x6F\x72\x65","\x65\x78\x74","\x6D\x65\x73\x73\x61\x67\x65","\x61\x64\x64\x50\x69\x70\x65","\x63\x75\x72\x76\x65\x54\x6F","\x75\x6D\x6C\x41\x63\x74\x6F\x72","\x6C\x6F\x6C\x6C\x69\x70\x6F\x70","\x6A\x65\x74\x74\x79\x57\x69\x64\x74\x68","\x6A\x65\x74\x74\x79\x48\x65\x69\x67\x68\x74","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74","\x6F\x75\x74\x65\x72\x53\x74\x72\x6F\x6B\x65","\x65\x6C\x6C\x69\x70\x73\x65","\x66\x69\x6C\x6C\x41\x6E\x64\x53\x74\x72\x6F\x6B\x65","\x73\x65\x74\x53\x68\x61\x64\x6F\x77","\x65\x6E\x64\x53\x74\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x74\x61\x74\x65","\x69\x6E\x69\x74\x53\x68\x61\x70\x65\x73","\x78","\x79","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x73\x68\x61\x70\x65\x73","\x70\x61\x69\x6E\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x72\x74","\x6C\x69\x6E\x6B","\x64\x61\x73\x68","\x61\x64\x64\x4D\x61\x72\x6B\x65\x72","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x75\x73\x65\x47\x72\x69\x64\x46\x6F\x72\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x69\x6E\x69\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x74\x61\x74\x65","\x67\x72\x61\x70\x68","\x76\x69\x65\x77","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x73\x72\x63","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x44\x49\x41\x4C\x45\x43\x54\x5F\x56\x4D\x4C","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x74\x56\x69\x65\x77","\x63\x75\x72\x73\x6F\x72","\x6E\x6F\x64\x65","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x43\x75\x72\x73\x6F\x72","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x64\x65\x66\x61\x75\x6C\x74","\x72\x65\x64\x72\x61\x77","\x62\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x42\x6F\x75\x6E\x64\x73","\x64\x65\x73\x74\x72\x6F\x79","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x6F\x75\x72\x63\x65","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x50\x6F\x69\x6E\x74","\x67\x65\x74\x45\x76\x65\x6E\x74","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64\x45\x76\x65\x6E\x74","\x73\x63\x61\x6C\x65","\x73\x6E\x61\x70","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65","\x6D\x6F\x76\x65\x53\x69\x7A\x65\x72\x54\x6F","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x55\x70","\x61\x70\x70\x6C\x79\x53\x74\x79\x6C\x65","\x72\x65\x73\x65\x74","\x67\x65\x74\x53\x68\x61\x70\x65\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x73\x68\x61\x70\x65","\x74\x6F\x52\x61\x64\x69\x61\x6E\x73","\x63\x6F\x73","\x73\x69\x6E","\x69\x73\x50\x61\x69\x6E\x74\x42\x6F\x75\x6E\x64\x73\x49\x6E\x76\x65\x72\x74\x65\x64","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x50\x6F\x69\x6E\x74","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x58","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x59","\x67\x65\x74\x52\x6F\x74\x61\x74\x65\x64\x50\x6F\x69\x6E\x74","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65\x55\x6E\x72\x6F\x74\x61\x74\x65\x64","\x72\x6F\x75\x6E\x64","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x63\x65\x6C\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x69\x7A\x65","\x64\x65\x66\x61\x75\x6C\x74\x56\x61\x6C\x75\x65","\x73\x63\x61\x6C\x65\x46\x61\x63\x74\x6F\x72","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x73\x74\x65\x6E\x63\x69\x6C","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73"];(function(){function _0x9939x1(){}_0x9939x1[_0x82e8[0]]= new mxCylinder();_0x9939x1[_0x82e8[0]][_0x82e8[1]]= _0x9939x1;_0x9939x1[_0x82e8[0]][_0x82e8[2]]= 20;_0x9939x1[_0x82e8[0]][_0x82e8[3]]= function(_0x9939x2,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6,_0x9939x7){var _0x9939x8=Math[_0x82e8[6]](_0x9939x5,Math[_0x82e8[6]](_0x9939x6,mxUtils[_0x82e8[5]](this[_0x82e8[4]],_0x82e8[2],this[_0x82e8[2]])));if(_0x9939x7){_0x9939x2[_0x82e8[7]](_0x9939x8,_0x9939x6);_0x9939x2[_0x82e8[8]](_0x9939x8,_0x9939x8);_0x9939x2[_0x82e8[8]](0,0);_0x9939x2[_0x82e8[7]](_0x9939x8,_0x9939x8);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x8);_0x9939x2[_0x82e8[9]]()}else {_0x9939x2[_0x82e8[7]](0,0);_0x9939x2[_0x82e8[8]](_0x9939x5- _0x9939x8,0);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x8);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x6);_0x9939x2[_0x82e8[8]](_0x9939x8,_0x9939x6);_0x9939x2[_0x82e8[8]](0,_0x9939x6- _0x9939x8);_0x9939x2[_0x82e8[8]](0,0);_0x9939x2[_0x82e8[10]]();_0x9939x2[_0x82e8[9]]()}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[11]]= _0x9939x1;function _0x9939x9(){}_0x9939x9[_0x82e8[0]]= new mxCylinder();_0x9939x9[_0x82e8[0]][_0x82e8[1]]= _0x9939x9;_0x9939x9[_0x82e8[0]][_0x82e8[2]]= 30;_0x9939x9[_0x82e8[0]][_0x82e8[3]]= function(_0x9939x2,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6,_0x9939x7){var _0x9939x8=Math[_0x82e8[6]](_0x9939x5,Math[_0x82e8[6]](_0x9939x6,mxUtils[_0x82e8[5]](this[_0x82e8[4]],_0x82e8[2],this[_0x82e8[2]])));if(_0x9939x7){_0x9939x2[_0x82e8[7]](_0x9939x5- _0x9939x8,0);_0x9939x2[_0x82e8[8]](_0x9939x5- _0x9939x8,_0x9939x8);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x8);_0x9939x2[_0x82e8[9]]()}else {_0x9939x2[_0x82e8[7]](0,0);_0x9939x2[_0x82e8[8]](_0x9939x5- _0x9939x8,0);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x8);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x6);_0x9939x2[_0x82e8[8]](0,_0x9939x6);_0x9939x2[_0x82e8[8]](0,0);_0x9939x2[_0x82e8[10]]();_0x9939x2[_0x82e8[9]]()}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[13]]= _0x9939x9;function _0x9939xa(){}_0x9939xa[_0x82e8[0]]= new mxCylinder();_0x9939xa[_0x82e8[0]][_0x82e8[1]]= _0x9939xa;_0x9939xa[_0x82e8[0]][_0x82e8[14]]= 60;_0x9939xa[_0x82e8[0]][_0x82e8[15]]= 20;_0x9939xa[_0x82e8[0]][_0x82e8[16]]= _0x82e8[17];_0x9939xa[_0x82e8[0]][_0x82e8[3]]= function(_0x9939x2,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6,_0x9939x7){var _0x9939xb=mxUtils[_0x82e8[5]](this[_0x82e8[4]],_0x82e8[14],this[_0x82e8[14]]);var _0x9939xc=mxUtils[_0x82e8[5]](this[_0x82e8[4]],_0x82e8[15],this[_0x82e8[15]]);var _0x9939xd=mxUtils[_0x82e8[5]](this[_0x82e8[4]],_0x82e8[16],this[_0x82e8[16]]);var _0x9939xe=Math[_0x82e8[6]](_0x9939x5,_0x9939xb);var _0x9939xf=Math[_0x82e8[6]](_0x9939x6,_0x9939xc);if(_0x9939x7){if(_0x9939xd== _0x82e8[18]){_0x9939x2[_0x82e8[7]](0,_0x9939xf);_0x9939x2[_0x82e8[8]](_0x9939xe,_0x9939xf)}else {_0x9939x2[_0x82e8[7]](_0x9939x5- _0x9939xe,_0x9939xf);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939xf)};_0x9939x2[_0x82e8[9]]()}else {if(_0x9939xd== _0x82e8[18]){_0x9939x2[_0x82e8[7]](0,0);_0x9939x2[_0x82e8[8]](_0x9939xe,0);_0x9939x2[_0x82e8[8]](_0x9939xe,_0x9939xf);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939xf)}else {_0x9939x2[_0x82e8[7]](0,_0x9939xf);_0x9939x2[_0x82e8[8]](_0x9939x5- _0x9939xe,_0x9939xf);_0x9939x2[_0x82e8[8]](_0x9939x5- _0x9939xe,0);_0x9939x2[_0x82e8[8]](_0x9939x5,0)};_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x6);_0x9939x2[_0x82e8[8]](0,_0x9939x6);_0x9939x2[_0x82e8[8]](0,_0x9939xf);_0x9939x2[_0x82e8[10]]();_0x9939x2[_0x82e8[9]]()}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[19]]= _0x9939xa;function _0x9939x10(){}_0x9939x10[_0x82e8[0]]= new mxCylinder();_0x9939x10[_0x82e8[0]][_0x82e8[1]]= _0x9939x10;_0x9939x10[_0x82e8[0]][_0x82e8[2]]= 30;_0x9939x10[_0x82e8[0]][_0x82e8[3]]= function(_0x9939x2,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6,_0x9939x7){var _0x9939x8=Math[_0x82e8[6]](_0x9939x5,Math[_0x82e8[6]](_0x9939x6,mxUtils[_0x82e8[5]](this[_0x82e8[4]],_0x82e8[2],this[_0x82e8[2]])));if(!_0x9939x7){_0x9939x2[_0x82e8[7]](_0x9939x8,0);_0x9939x2[_0x82e8[8]](_0x9939x5,0);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x6);_0x9939x2[_0x82e8[8]](0,_0x9939x6);_0x9939x2[_0x82e8[8]](0,_0x9939x8);_0x9939x2[_0x82e8[8]](_0x9939x8,0);_0x9939x2[_0x82e8[10]]();_0x9939x2[_0x82e8[9]]()}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[20]]= _0x9939x10;function _0x9939x11(){}_0x9939x11[_0x82e8[0]]= new mxCylinder();_0x9939x11[_0x82e8[0]][_0x82e8[1]]= _0x9939x11;_0x9939x11[_0x82e8[0]][_0x82e8[2]]= 0.4;_0x9939x11[_0x82e8[0]][_0x82e8[3]]= function(_0x9939x2,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6,_0x9939x7){var _0x9939x8=mxUtils[_0x82e8[5]](this[_0x82e8[4]],_0x82e8[2],this[_0x82e8[2]]);var _0x9939xf=_0x9939x6* _0x9939x8;var _0x9939x12=1.4;if(!_0x9939x7){_0x9939x2[_0x82e8[7]](0,_0x9939xf/ 2);_0x9939x2[_0x82e8[21]](_0x9939x5/ 4,_0x9939xf* _0x9939x12,_0x9939x5/ 2,_0x9939xf/ 2);_0x9939x2[_0x82e8[21]](_0x9939x5* 3/ 4,_0x9939xf* (1- _0x9939x12),_0x9939x5,_0x9939xf/ 2);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x6- _0x9939xf/ 2);_0x9939x2[_0x82e8[21]](_0x9939x5* 3/ 4,_0x9939x6- _0x9939xf* _0x9939x12,_0x9939x5/ 2,_0x9939x6- _0x9939xf/ 2);_0x9939x2[_0x82e8[21]](_0x9939x5/ 4,_0x9939x6- _0x9939xf* (1- _0x9939x12),0,_0x9939x6- _0x9939xf/ 2);_0x9939x2[_0x82e8[8]](0,_0x9939xf/ 2);_0x9939x2[_0x82e8[10]]();_0x9939x2[_0x82e8[9]]()}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[22]]= _0x9939x11;function _0x9939x13(){}_0x9939x13[_0x82e8[0]]= new mxCylinder();_0x9939x13[_0x82e8[0]][_0x82e8[1]]= _0x9939x13;_0x9939x13[_0x82e8[0]][_0x82e8[2]]= 0.2;_0x9939x13[_0x82e8[0]][_0x82e8[3]]= function(_0x9939x2,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6,_0x9939x7){var _0x9939x8=_0x9939x5* mxUtils[_0x82e8[5]](this[_0x82e8[4]],_0x82e8[2],this[_0x82e8[2]]);if(!_0x9939x7){_0x9939x2[_0x82e8[7]](0,0);_0x9939x2[_0x82e8[8]](_0x9939x5- _0x9939x8,0);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x6/ 2);_0x9939x2[_0x82e8[8]](_0x9939x5- _0x9939x8,_0x9939x6);_0x9939x2[_0x82e8[8]](0,_0x9939x6);_0x9939x2[_0x82e8[8]](_0x9939x8,_0x9939x6/ 2);_0x9939x2[_0x82e8[10]]();_0x9939x2[_0x82e8[9]]()}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[23]]= _0x9939x13;function _0x9939x14(){mxRectangleShape[_0x82e8[24]](this)}mxUtils[_0x82e8[25]](_0x9939x14,mxRectangleShape);_0x9939x14[_0x82e8[0]][_0x82e8[26]]= function(){return false};_0x9939x14[_0x82e8[0]][_0x82e8[27]]= function(_0x9939x15,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6){var _0x9939x16=Math[_0x82e8[6]](_0x9939x5/ 5,_0x9939x6/ 5)+ 1;_0x9939x15[_0x82e8[28]]();_0x9939x15[_0x82e8[7]](_0x9939x3+ _0x9939x5/ 2,_0x9939x4+ _0x9939x16);_0x9939x15[_0x82e8[8]](_0x9939x3+ _0x9939x5/ 2,_0x9939x4+ _0x9939x6- _0x9939x16);_0x9939x15[_0x82e8[7]](_0x9939x3+ _0x9939x16,_0x9939x4+ _0x9939x6/ 2);_0x9939x15[_0x82e8[8]](_0x9939x3+ _0x9939x5- _0x9939x16,_0x9939x4+ _0x9939x6/ 2);_0x9939x15[_0x82e8[9]]();_0x9939x15[_0x82e8[29]]();mxRectangleShape[_0x82e8[0]][_0x82e8[27]][_0x82e8[30]](this,arguments)};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[31]]= _0x9939x14;function _0x9939x17(){mxRectangleShape[_0x82e8[24]](this)}mxUtils[_0x82e8[25]](_0x9939x17,mxRectangleShape);_0x9939x17[_0x82e8[0]][_0x82e8[26]]= function(){return false};_0x9939x17[_0x82e8[0]][_0x82e8[27]]= function(_0x9939x15,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6){if(this[_0x82e8[4]]!= null){if(this[_0x82e8[4]][_0x82e8[32]]== 1){var _0x9939x18=Math[_0x82e8[34]](2,this[_0x82e8[33]]+ 1);mxRectangleShape[_0x82e8[0]][_0x82e8[35]][_0x82e8[24]](this,_0x9939x15,_0x9939x3+ _0x9939x18,_0x9939x4+ _0x9939x18,_0x9939x5- 2* _0x9939x18,_0x9939x6- 2* _0x9939x18);mxRectangleShape[_0x82e8[0]][_0x82e8[27]][_0x82e8[30]](this,arguments);_0x9939x3+= _0x9939x18;_0x9939x4+= _0x9939x18;_0x9939x5-= 2* _0x9939x18;_0x9939x6-= 2* _0x9939x18};_0x9939x15[_0x82e8[36]](false);var _0x9939x19=0;var _0x9939x1a=null;do{_0x9939x1a= mxCellRenderer[_0x82e8[0]][_0x82e8[12]][this[_0x82e8[4]][_0x82e8[37]+ _0x9939x19]];if(_0x9939x1a!= null){var _0x9939x1b=this[_0x82e8[4]][_0x82e8[37]+ _0x9939x19+ _0x82e8[38]];var _0x9939x1c=this[_0x82e8[4]][_0x82e8[37]+ _0x9939x19+ _0x82e8[39]];var _0x9939x1d=this[_0x82e8[4]][_0x82e8[37]+ _0x9939x19+ _0x82e8[40]];var _0x9939x1e=this[_0x82e8[4]][_0x82e8[37]+ _0x9939x19+ _0x82e8[41]];var _0x9939x1f=this[_0x82e8[4]][_0x82e8[37]+ _0x9939x19+ _0x82e8[42]]|| 0;var _0x9939x20=this[_0x82e8[4]][_0x82e8[37]+ _0x9939x19+ _0x82e8[43]];if(_0x9939x20!= null){_0x9939x1f+= this[_0x82e8[44]](_0x9939x5+ this[_0x82e8[33]],_0x9939x6+ this[_0x82e8[33]])* _0x9939x20};var _0x9939x21=_0x9939x3;var _0x9939x22=_0x9939x4;if(_0x9939x1b== mxConstants[_0x82e8[45]]){_0x9939x21+= (_0x9939x5- _0x9939x1d)/ 2}else {if(_0x9939x1b== mxConstants[_0x82e8[46]]){_0x9939x21+= _0x9939x5- _0x9939x1d- _0x9939x1f}else {_0x9939x21+= _0x9939x1f}};if(_0x9939x1c== mxConstants[_0x82e8[47]]){_0x9939x22+= (_0x9939x6- _0x9939x1e)/ 2}else {if(_0x9939x1c== mxConstants[_0x82e8[48]]){_0x9939x22+= _0x9939x6- _0x9939x1e- _0x9939x1f}else {_0x9939x22+= _0x9939x1f}};_0x9939x15[_0x82e8[49]]();var _0x9939x23= new _0x9939x1a();_0x9939x23[_0x82e8[4]]= this[_0x82e8[4]];_0x9939x1a[_0x82e8[0]][_0x82e8[50]][_0x82e8[24]](_0x9939x23,_0x9939x15,_0x9939x21,_0x9939x22,_0x9939x1d,_0x9939x1e);_0x9939x15[_0x82e8[51]]()};_0x9939x19++}while(_0x9939x1a!= null);}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[52]]= _0x9939x17;function _0x9939x24(){}_0x9939x24[_0x82e8[0]]= new mxCylinder();_0x9939x24[_0x82e8[0]][_0x82e8[1]]= _0x9939x24;_0x9939x24[_0x82e8[0]][_0x82e8[3]]= function(_0x9939x2,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6,_0x9939x7){if(_0x9939x7){_0x9939x2[_0x82e8[7]](0,0);_0x9939x2[_0x82e8[8]](_0x9939x5/ 2,_0x9939x6/ 2);_0x9939x2[_0x82e8[8]](_0x9939x5,0);_0x9939x2[_0x82e8[9]]()}else {_0x9939x2[_0x82e8[7]](0,0);_0x9939x2[_0x82e8[8]](_0x9939x5,0);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x6);_0x9939x2[_0x82e8[8]](0,_0x9939x6);_0x9939x2[_0x82e8[10]]()}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[53]]= _0x9939x24;function _0x9939x25(){}_0x9939x25[_0x82e8[0]]= new mxCylinder();_0x9939x25[_0x82e8[0]][_0x82e8[1]]= _0x9939x25;_0x9939x25[_0x82e8[0]][_0x82e8[54]]= true;_0x9939x25[_0x82e8[0]][_0x82e8[3]]= function(_0x9939x2,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6,_0x9939x7){var _0x9939x1d=_0x9939x5/ 3;var _0x9939x1e=_0x9939x6/ 4;if(!_0x9939x7){_0x9939x2[_0x82e8[7]](_0x9939x5/ 2,_0x9939x1e);_0x9939x2[_0x82e8[55]](_0x9939x5/ 2- _0x9939x1d,_0x9939x1e,_0x9939x5/ 2- _0x9939x1d,0,_0x9939x5/ 2,0);_0x9939x2[_0x82e8[55]](_0x9939x5/ 2+ _0x9939x1d,0,_0x9939x5/ 2+ _0x9939x1d,_0x9939x1e,_0x9939x5/ 2,_0x9939x1e);_0x9939x2[_0x82e8[10]]();_0x9939x2[_0x82e8[7]](_0x9939x5/ 2,_0x9939x1e);_0x9939x2[_0x82e8[8]](_0x9939x5/ 2,2* _0x9939x6/ 3);_0x9939x2[_0x82e8[7]](_0x9939x5/ 2,_0x9939x6/ 3);_0x9939x2[_0x82e8[8]](0,_0x9939x6/ 3);_0x9939x2[_0x82e8[7]](_0x9939x5/ 2,_0x9939x6/ 3);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x6/ 3);_0x9939x2[_0x82e8[7]](_0x9939x5/ 2,2* _0x9939x6/ 3);_0x9939x2[_0x82e8[8]](0,_0x9939x6);_0x9939x2[_0x82e8[7]](_0x9939x5/ 2,2* _0x9939x6/ 3);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x6);_0x9939x2[_0x82e8[9]]()}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[56]]= _0x9939x25;function _0x9939x26(){}_0x9939x26[_0x82e8[0]]= new mxCylinder();_0x9939x26[_0x82e8[0]][_0x82e8[1]]= _0x9939x26;_0x9939x26[_0x82e8[0]][_0x82e8[2]]= 10;_0x9939x26[_0x82e8[0]][_0x82e8[54]]= true;_0x9939x26[_0x82e8[0]][_0x82e8[3]]= function(_0x9939x2,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6,_0x9939x7){var _0x9939x27=mxUtils[_0x82e8[5]](this[_0x82e8[4]],_0x82e8[2],this[_0x82e8[2]]);var _0x9939x1d=_0x9939x27* 2/ 3;var _0x9939x1e=_0x9939x27;if(!_0x9939x7){_0x9939x2[_0x82e8[7]](_0x9939x5/ 2,_0x9939x1e);_0x9939x2[_0x82e8[55]](_0x9939x5/ 2- _0x9939x1d,_0x9939x1e,_0x9939x5/ 2- _0x9939x1d,0,_0x9939x5/ 2,0);_0x9939x2[_0x82e8[55]](_0x9939x5/ 2+ _0x9939x1d,0,_0x9939x5/ 2+ _0x9939x1d,_0x9939x1e,_0x9939x5/ 2,_0x9939x1e);_0x9939x2[_0x82e8[10]]();_0x9939x2[_0x82e8[7]](_0x9939x5/ 2,_0x9939x1e);_0x9939x2[_0x82e8[8]](_0x9939x5/ 2,_0x9939x6);_0x9939x2[_0x82e8[9]]()}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[57]]= _0x9939x26;function _0x9939x28(){}_0x9939x28[_0x82e8[0]]= new mxCylinder();_0x9939x28[_0x82e8[0]][_0x82e8[1]]= _0x9939x28;_0x9939x28[_0x82e8[0]][_0x82e8[58]]= 32;_0x9939x28[_0x82e8[0]][_0x82e8[59]]= 12;_0x9939x28[_0x82e8[0]][_0x82e8[3]]= function(_0x9939x2,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6,_0x9939x7){var _0x9939xe=mxUtils[_0x82e8[5]](this[_0x82e8[4]],_0x82e8[58],this[_0x82e8[58]]);var _0x9939xf=mxUtils[_0x82e8[5]](this[_0x82e8[4]],_0x82e8[59],this[_0x82e8[59]]);var _0x9939x29=_0x9939xe/ 2;var _0x9939x2a=_0x9939x29+ _0x9939xe/ 2;var _0x9939x2b=0.3* _0x9939x6- _0x9939xf/ 2;var _0x9939x2c=0.7* _0x9939x6- _0x9939xf/ 2;if(_0x9939x7){_0x9939x2[_0x82e8[7]](_0x9939x29,_0x9939x2b);_0x9939x2[_0x82e8[8]](_0x9939x2a,_0x9939x2b);_0x9939x2[_0x82e8[8]](_0x9939x2a,_0x9939x2b+ _0x9939xf);_0x9939x2[_0x82e8[8]](_0x9939x29,_0x9939x2b+ _0x9939xf);_0x9939x2[_0x82e8[7]](_0x9939x29,_0x9939x2c);_0x9939x2[_0x82e8[8]](_0x9939x2a,_0x9939x2c);_0x9939x2[_0x82e8[8]](_0x9939x2a,_0x9939x2c+ _0x9939xf);_0x9939x2[_0x82e8[8]](_0x9939x29,_0x9939x2c+ _0x9939xf);_0x9939x2[_0x82e8[9]]()}else {_0x9939x2[_0x82e8[7]](_0x9939x29,0);_0x9939x2[_0x82e8[8]](_0x9939x5,0);_0x9939x2[_0x82e8[8]](_0x9939x5,_0x9939x6);_0x9939x2[_0x82e8[8]](_0x9939x29,_0x9939x6);_0x9939x2[_0x82e8[8]](_0x9939x29,_0x9939x2c+ _0x9939xf);_0x9939x2[_0x82e8[8]](0,_0x9939x2c+ _0x9939xf);_0x9939x2[_0x82e8[8]](0,_0x9939x2c);_0x9939x2[_0x82e8[8]](_0x9939x29,_0x9939x2c);_0x9939x2[_0x82e8[8]](_0x9939x29,_0x9939x2b+ _0x9939xf);_0x9939x2[_0x82e8[8]](0,_0x9939x2b+ _0x9939xf);_0x9939x2[_0x82e8[8]](0,_0x9939x2b);_0x9939x2[_0x82e8[8]](_0x9939x29,_0x9939x2b);_0x9939x2[_0x82e8[10]]();_0x9939x2[_0x82e8[9]]()}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[60]]= _0x9939x28;function _0x9939x2d(){}_0x9939x2d[_0x82e8[0]]= new mxDoubleEllipse();_0x9939x2d[_0x82e8[0]][_0x82e8[1]]= _0x9939x2d;_0x9939x2d[_0x82e8[0]][_0x82e8[61]]= true;_0x9939x2d[_0x82e8[0]][_0x82e8[50]]= function(_0x9939x15,_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6){var _0x9939x18=Math[_0x82e8[6]](4,Math[_0x82e8[6]](_0x9939x5/ 5,_0x9939x6/ 5));if(_0x9939x5> 0&& _0x9939x6> 0){_0x9939x15[_0x82e8[62]](_0x9939x3+ _0x9939x18,_0x9939x4+ _0x9939x18,_0x9939x5- 2* _0x9939x18,_0x9939x6- 2* _0x9939x18);_0x9939x15[_0x82e8[63]]()};_0x9939x15[_0x82e8[64]](false);if(this[_0x82e8[61]]){_0x9939x15[_0x82e8[62]](_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6);_0x9939x15[_0x82e8[29]]()}};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[65]]= _0x9939x2d;function _0x9939x2e(){}_0x9939x2e[_0x82e8[0]]= new _0x9939x2d();_0x9939x2e[_0x82e8[0]][_0x82e8[1]]= _0x9939x2e;_0x9939x2e[_0x82e8[0]][_0x82e8[61]]= false;mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[66]]= _0x9939x2e;var _0x9939x2f=mxImageExport[_0x82e8[0]][_0x82e8[67]];mxImageExport[_0x82e8[0]][_0x82e8[67]]= function(){_0x9939x2f[_0x82e8[30]](this,arguments);function _0x9939x30(_0x9939x31){return {drawShape:function(_0x9939x32,_0x9939x33,_0x9939x34,_0x9939x35){var _0x9939x3=_0x9939x34[_0x82e8[68]];var _0x9939x4=_0x9939x34[_0x82e8[69]];var _0x9939x5=_0x9939x34[_0x82e8[70]];var _0x9939x6=_0x9939x34[_0x82e8[71]];if(_0x9939x35){var _0x9939x18=Math[_0x82e8[6]](4,Math[_0x82e8[6]](_0x9939x5/ 5,_0x9939x6/ 5));_0x9939x3+= _0x9939x18;_0x9939x4+= _0x9939x18;_0x9939x5-= 2* _0x9939x18;_0x9939x6-= 2* _0x9939x18;if(_0x9939x5> 0&& _0x9939x6> 0){_0x9939x32[_0x82e8[62]](_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6)};return true}else {_0x9939x32[_0x82e8[63]]();if(_0x9939x31){_0x9939x32[_0x82e8[62]](_0x9939x3,_0x9939x4,_0x9939x5,_0x9939x6);_0x9939x32[_0x82e8[29]]()}}}}}this[_0x82e8[72]][_0x82e8[65]]= _0x9939x30(true);this[_0x82e8[72]][_0x82e8[66]]= _0x9939x30(false)};function _0x9939x36(){mxArrow[_0x82e8[24]](this)}mxUtils[_0x82e8[25]](_0x9939x36,mxArrow);_0x9939x36[_0x82e8[0]][_0x82e8[73]]= function(_0x9939x15,_0x9939x37){var _0x9939x1d=10;var _0x9939x38=_0x9939x37[0];var _0x9939x39=_0x9939x37[_0x9939x37[_0x82e8[74]]- 1];var _0x9939xe=_0x9939x39[_0x82e8[68]]- _0x9939x38[_0x82e8[68]];var _0x9939xf=_0x9939x39[_0x82e8[69]]- _0x9939x38[_0x82e8[69]];var _0x9939x3a=Math[_0x82e8[75]](_0x9939xe* _0x9939xe+ _0x9939xf* _0x9939xf);var _0x9939x3b=_0x9939x3a;var _0x9939x3c=_0x9939xe/ _0x9939x3a;var _0x9939x3d=_0x9939xf/ _0x9939x3a;var _0x9939x3e=_0x9939x3b* _0x9939x3c;var _0x9939x3f=_0x9939x3b* _0x9939x3d;var _0x9939x40=_0x9939x1d* _0x9939x3d/ 3;var _0x9939x41=-_0x9939x1d* _0x9939x3c/ 3;var _0x9939x42=_0x9939x38[_0x82e8[68]]- _0x9939x40/ 2;var _0x9939x43=_0x9939x38[_0x82e8[69]]- _0x9939x41/ 2;var _0x9939x44=_0x9939x42+ _0x9939x40;var _0x9939x45=_0x9939x43+ _0x9939x41;var _0x9939x46=_0x9939x44+ _0x9939x3e;var _0x9939x47=_0x9939x45+ _0x9939x3f;var _0x9939x48=_0x9939x46+ _0x9939x40;var _0x9939x49=_0x9939x47+ _0x9939x41;var _0x9939x4a=_0x9939x48- 3* _0x9939x40;var _0x9939x4b=_0x9939x49- 3* _0x9939x41;_0x9939x15[_0x82e8[28]]();_0x9939x15[_0x82e8[7]](_0x9939x44,_0x9939x45);_0x9939x15[_0x82e8[8]](_0x9939x46,_0x9939x47);_0x9939x15[_0x82e8[7]](_0x9939x4a+ _0x9939x40,_0x9939x4b+ _0x9939x41);_0x9939x15[_0x82e8[8]](_0x9939x42,_0x9939x43);_0x9939x15[_0x82e8[29]]()};mxCellRenderer[_0x82e8[0]][_0x82e8[12]][_0x82e8[76]]= _0x9939x36;mxMarker[_0x82e8[78]](_0x82e8[77],function(_0x9939x32,_0x9939x1a,_0x9939x4c,_0x9939x39,_0x9939x4d,_0x9939x4e,_0x9939x4f,_0x9939x50,_0x9939x51,_0x9939x52){var _0x9939x3c=_0x9939x4d* (_0x9939x4f+ _0x9939x51+ 1);var _0x9939x3d=_0x9939x4e* (_0x9939x4f+ _0x9939x51+ 1);return function(){_0x9939x32[_0x82e8[28]]();_0x9939x32[_0x82e8[7]](_0x9939x39[_0x82e8[68]]- _0x9939x3c/ 2- _0x9939x3d/ 2,_0x9939x39[_0x82e8[69]]- _0x9939x3d/ 2+ _0x9939x3c/ 2);_0x9939x32[_0x82e8[8]](_0x9939x39[_0x82e8[68]]+ _0x9939x3d/ 2- 3* _0x9939x3c/ 2,_0x9939x39[_0x82e8[69]]- 3* _0x9939x3d/ 2- _0x9939x3c/ 2);_0x9939x32[_0x82e8[29]]()}});var _0x9939x53=-99;if( typeof (mxVertexHandler)!= _0x82e8[79]){function _0x9939x54(_0x9939x33){mxVertexHandler[_0x82e8[24]](this,_0x9939x33)}mxUtils[_0x82e8[25]](_0x9939x54,mxVertexHandler);_0x9939x54[_0x82e8[0]][_0x82e8[80]]= false;_0x9939x54[_0x82e8[0]][_0x82e8[81]]= function(){this[_0x82e8[82]]= mxUtils[_0x82e8[5]](this[_0x82e8[83]][_0x82e8[4]],mxConstants.STYLE_HORIZONTAL,true);var _0x9939x55=this[_0x82e8[83]][_0x82e8[85]][_0x82e8[84]];if(this[_0x82e8[86]]!= null){var _0x9939x34= new mxRectangle(0,0,this[_0x82e8[86]][_0x82e8[70]],this[_0x82e8[86]][_0x82e8[71]]);this[_0x82e8[87]]= new mxImageShape(_0x9939x34,this[_0x82e8[86]][_0x82e8[88]])}else {var _0x9939x4f=10;var _0x9939x34= new mxRectangle(0,0,_0x9939x4f,_0x9939x4f);this[_0x82e8[87]]= new mxRhombus(_0x9939x34,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};this[_0x82e8[87]][_0x82e8[89]]= (_0x9939x55[_0x82e8[89]]!= mxConstants[_0x82e8[90]])?mxConstants[_0x82e8[91]]:mxConstants[_0x82e8[90]];this[_0x82e8[87]][_0x82e8[81]](_0x9939x55[_0x82e8[93]]()[_0x82e8[92]]());this[_0x82e8[87]][_0x82e8[95]][_0x82e8[4]][_0x82e8[94]]= this[_0x82e8[96]]();mxEvent[_0x82e8[97]](this[_0x82e8[87]][_0x82e8[95]],_0x9939x55,this[_0x82e8[83]]);mxVertexHandler[_0x82e8[0]][_0x82e8[81]][_0x82e8[30]](this,arguments)};_0x9939x54[_0x82e8[0]][_0x82e8[96]]= function(){return _0x82e8[98]};_0x9939x54[_0x82e8[0]][_0x82e8[99]]= function(){mxVertexHandler[_0x82e8[0]][_0x82e8[99]][_0x82e8[30]](this,arguments);var _0x9939x4f=this[_0x82e8[87]][_0x82e8[100]][_0x82e8[70]];this[_0x82e8[87]][_0x82e8[100]]= this[_0x82e8[101]](_0x9939x4f);this[_0x82e8[87]][_0x82e8[99]]()};_0x9939x54[_0x82e8[0]][_0x82e8[102]]= function(){mxVertexHandler[_0x82e8[0]][_0x82e8[102]][_0x82e8[30]](this,arguments);if(this[_0x82e8[87]]!= null){this[_0x82e8[87]][_0x82e8[102]]();this[_0x82e8[87]]= null}};_0x9939x54[_0x82e8[0]][_0x82e8[103]]= function(_0x9939x56){if(_0x9939x56[_0x82e8[104]](this[_0x82e8[87]])){return _0x9939x53};return mxVertexHandler[_0x82e8[0]][_0x82e8[103]][_0x82e8[30]](this,arguments)};_0x9939x54[_0x82e8[0]][_0x82e8[105]]= function(_0x9939x57,_0x9939x56){if(!_0x9939x56[_0x82e8[106]]()&& this[_0x82e8[107]]== _0x9939x53){var _0x9939x58= new mxPoint(_0x9939x56[_0x82e8[108]](),_0x9939x56[_0x82e8[109]]());this[_0x82e8[110]](_0x9939x58);var _0x9939x59=this[_0x82e8[84]][_0x82e8[112]](_0x9939x56[_0x82e8[111]]());var _0x9939x5a=this[_0x82e8[84]][_0x82e8[93]]()[_0x82e8[113]];if(_0x9939x59&& this[_0x82e8[80]]){_0x9939x58[_0x82e8[68]]= this[_0x82e8[84]][_0x82e8[114]](_0x9939x58[_0x82e8[68]]/ _0x9939x5a)* _0x9939x5a;_0x9939x58[_0x82e8[69]]= this[_0x82e8[84]][_0x82e8[114]](_0x9939x58[_0x82e8[69]]/ _0x9939x5a)* _0x9939x5a};this[_0x82e8[115]](_0x9939x58);this[_0x82e8[116]](this[_0x82e8[87]],_0x9939x58[_0x82e8[68]],_0x9939x58[_0x82e8[69]]);this[_0x82e8[83]][_0x82e8[85]][_0x82e8[84]][_0x82e8[117]][_0x82e8[99]](this[_0x82e8[83]],true);_0x9939x56[_0x82e8[118]]()}else {mxVertexHandler[_0x82e8[0]][_0x82e8[105]][_0x82e8[30]](this,arguments)}};_0x9939x54[_0x82e8[0]][_0x82e8[119]]= function(_0x9939x57,_0x9939x56){if(!_0x9939x56[_0x82e8[106]]()&& this[_0x82e8[107]]== _0x9939x53){this[_0x82e8[120]]();this[_0x82e8[121]]();_0x9939x56[_0x82e8[118]]()}else {mxVertexHandler[_0x82e8[0]][_0x82e8[119]][_0x82e8[30]](this,arguments)}};_0x9939x54[_0x82e8[0]][_0x82e8[101]]= function(_0x9939x4f){var _0x9939x5b=this[_0x82e8[83]][_0x82e8[123]][_0x82e8[122]]();var _0x9939x5c=mxUtils[_0x82e8[124]](_0x9939x5b);var _0x9939x5d=Math[_0x82e8[125]](_0x9939x5c);var _0x9939x5e=Math[_0x82e8[126]](_0x9939x5c);var _0x9939x34= new mxRectangle(this[_0x82e8[83]][_0x82e8[68]],this[_0x82e8[83]][_0x82e8[69]],this[_0x82e8[83]][_0x82e8[70]],this[_0x82e8[83]][_0x82e8[71]]);if(this[_0x82e8[83]][_0x82e8[123]][_0x82e8[127]]()){var _0x9939x5f=(_0x9939x34[_0x82e8[70]]- _0x9939x34[_0x82e8[71]])/ 2;_0x9939x34[_0x82e8[68]]+= _0x9939x5f;_0x9939x34[_0x82e8[69]]-= _0x9939x5f;var _0x9939x23=_0x9939x34[_0x82e8[70]];_0x9939x34[_0x82e8[70]]= _0x9939x34[_0x82e8[71]];_0x9939x34[_0x82e8[71]]= _0x9939x23};var _0x9939x60=this[_0x82e8[128]](_0x9939x34);if(this[_0x82e8[83]][_0x82e8[123]][_0x82e8[129]]){_0x9939x60[_0x82e8[68]]= 2* _0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]- _0x9939x60[_0x82e8[68]]};if(this[_0x82e8[83]][_0x82e8[123]][_0x82e8[130]]){_0x9939x60[_0x82e8[69]]= 2* _0x9939x34[_0x82e8[69]]+ _0x9939x34[_0x82e8[71]]- _0x9939x60[_0x82e8[69]]};_0x9939x60= mxUtils[_0x82e8[133]](_0x9939x60,_0x9939x5d,_0x9939x5e, new mxPoint(this[_0x82e8[83]][_0x82e8[131]](),this[_0x82e8[83]][_0x82e8[132]]()));return new mxRectangle(_0x9939x60[_0x82e8[68]]- _0x9939x4f/ 2,_0x9939x60[_0x82e8[69]]- _0x9939x4f/ 2,_0x9939x4f,_0x9939x4f)};_0x9939x54[_0x82e8[0]][_0x82e8[128]]= function(_0x9939x34){return null};_0x9939x54[_0x82e8[0]][_0x82e8[115]]= function(_0x9939x58){};_0x9939x54[_0x82e8[0]][_0x82e8[110]]= function(_0x9939x58){_0x9939x58[_0x82e8[68]]= Math[_0x82e8[34]](this[_0x82e8[83]][_0x82e8[68]],Math[_0x82e8[6]](this[_0x82e8[83]][_0x82e8[68]]+ this[_0x82e8[83]][_0x82e8[70]],_0x9939x58[_0x82e8[68]]));_0x9939x58[_0x82e8[69]]= Math[_0x82e8[34]](this[_0x82e8[83]][_0x82e8[69]],Math[_0x82e8[6]](this[_0x82e8[83]][_0x82e8[69]]+ this[_0x82e8[83]][_0x82e8[71]],_0x9939x58[_0x82e8[69]]))};_0x9939x54[_0x82e8[0]][_0x82e8[120]]= function(){};function _0x9939x61(_0x9939x33){_0x9939x54[_0x82e8[24]](this,_0x9939x33)}mxUtils[_0x82e8[25]](_0x9939x61,_0x9939x54);_0x9939x61[_0x82e8[0]][_0x82e8[128]]= function(_0x9939x34){var _0x9939x5a=this[_0x82e8[84]][_0x82e8[93]]()[_0x82e8[113]];var _0x9939xb=Math[_0x82e8[6]](_0x9939x34[_0x82e8[70]],mxUtils[_0x82e8[5]](this[_0x82e8[83]][_0x82e8[4]],_0x82e8[14],60)* _0x9939x5a);var _0x9939xc=Math[_0x82e8[6]](_0x9939x34[_0x82e8[71]],mxUtils[_0x82e8[5]](this[_0x82e8[83]][_0x82e8[4]],_0x82e8[15],20)* _0x9939x5a);var _0x9939xd=mxUtils[_0x82e8[5]](this[_0x82e8[83]][_0x82e8[4]],_0x82e8[16],_0x82e8[17]);var _0x9939x3=(_0x9939xd== _0x82e8[18])?_0x9939x34[_0x82e8[68]]+ _0x9939xb:_0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]- _0x9939xb;return new mxPoint(_0x9939x3,_0x9939x34[_0x82e8[69]]+ _0x9939xc)};_0x9939x61[_0x82e8[0]][_0x82e8[115]]= function(_0x9939x58){var _0x9939x5b=this[_0x82e8[83]][_0x82e8[123]][_0x82e8[122]]();var _0x9939x5c=mxUtils[_0x82e8[124]](_0x9939x5b);var _0x9939x5d=Math[_0x82e8[125]](-_0x9939x5c);var _0x9939x5e=Math[_0x82e8[126]](-_0x9939x5c);var _0x9939x34= new mxRectangle(this[_0x82e8[83]][_0x82e8[68]],this[_0x82e8[83]][_0x82e8[69]],this[_0x82e8[83]][_0x82e8[70]],this[_0x82e8[83]][_0x82e8[71]]);if(this[_0x82e8[83]][_0x82e8[123]][_0x82e8[127]]()){var _0x9939x5f=(_0x9939x34[_0x82e8[70]]- _0x9939x34[_0x82e8[71]])/ 2;_0x9939x34[_0x82e8[68]]+= _0x9939x5f;_0x9939x34[_0x82e8[69]]-= _0x9939x5f;var _0x9939x23=_0x9939x34[_0x82e8[70]];_0x9939x34[_0x82e8[70]]= _0x9939x34[_0x82e8[71]];_0x9939x34[_0x82e8[71]]= _0x9939x23};var _0x9939x60= new mxPoint(_0x9939x58[_0x82e8[68]],_0x9939x58[_0x82e8[69]]);_0x9939x60= mxUtils[_0x82e8[133]](_0x9939x60,_0x9939x5d,_0x9939x5e, new mxPoint(this[_0x82e8[83]][_0x82e8[131]](),this[_0x82e8[83]][_0x82e8[132]]()));if(this[_0x82e8[83]][_0x82e8[123]][_0x82e8[129]]){_0x9939x60[_0x82e8[68]]= 2* _0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]- _0x9939x60[_0x82e8[68]]};if(this[_0x82e8[83]][_0x82e8[123]][_0x82e8[130]]){_0x9939x60[_0x82e8[69]]= 2* _0x9939x34[_0x82e8[69]]+ _0x9939x34[_0x82e8[71]]- _0x9939x60[_0x82e8[69]]};var _0x9939x62=this[_0x82e8[134]](_0x9939x60,_0x9939x34);if(_0x9939x62!= null){if(this[_0x82e8[83]][_0x82e8[123]][_0x82e8[129]]){_0x9939x62[_0x82e8[68]]= 2* _0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]- _0x9939x62[_0x82e8[68]]};if(this[_0x82e8[83]][_0x82e8[123]][_0x82e8[130]]){_0x9939x62[_0x82e8[69]]= 2* _0x9939x34[_0x82e8[69]]+ _0x9939x34[_0x82e8[71]]- _0x9939x62[_0x82e8[69]]};_0x9939x5d= Math[_0x82e8[125]](_0x9939x5c);_0x9939x5e= Math[_0x82e8[126]](_0x9939x5c);_0x9939x62= mxUtils[_0x82e8[133]](_0x9939x62,_0x9939x5d,_0x9939x5e, new mxPoint(this[_0x82e8[83]][_0x82e8[131]](),this[_0x82e8[83]][_0x82e8[132]]()));_0x9939x58[_0x82e8[68]]= _0x9939x62[_0x82e8[68]];_0x9939x58[_0x82e8[69]]= _0x9939x62[_0x82e8[69]]}};_0x9939x61[_0x82e8[0]][_0x82e8[134]]= function(_0x9939x60,_0x9939x34){var _0x9939xd=mxUtils[_0x82e8[5]](this[_0x82e8[83]][_0x82e8[4]],_0x82e8[16],_0x82e8[17]);var _0x9939xb=(_0x9939xd== _0x82e8[18])?_0x9939x60[_0x82e8[68]]- _0x9939x34[_0x82e8[68]]:_0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]- _0x9939x60[_0x82e8[68]];var _0x9939xc=_0x9939x60[_0x82e8[69]]- _0x9939x34[_0x82e8[69]];var _0x9939x5a=this[_0x82e8[84]][_0x82e8[93]]()[_0x82e8[113]];this[_0x82e8[83]][_0x82e8[4]][_0x82e8[14]]= Math[_0x82e8[135]](Math[_0x82e8[34]](1,_0x9939xb)/ _0x9939x5a);this[_0x82e8[83]][_0x82e8[4]][_0x82e8[15]]= Math[_0x82e8[135]](Math[_0x82e8[34]](1,_0x9939xc)/ _0x9939x5a)};_0x9939x61[_0x82e8[0]][_0x82e8[120]]= function(){var _0x9939x63=this[_0x82e8[84]][_0x82e8[136]]();_0x9939x63[_0x82e8[137]]();try{this[_0x82e8[83]][_0x82e8[85]][_0x82e8[84]][_0x82e8[139]](_0x82e8[14],this[_0x82e8[83]][_0x82e8[4]][_0x82e8[14]],[this[_0x82e8[83]][_0x82e8[138]]]);this[_0x82e8[83]][_0x82e8[85]][_0x82e8[84]][_0x82e8[139]](_0x82e8[15],this[_0x82e8[83]][_0x82e8[4]][_0x82e8[15]],[this[_0x82e8[83]][_0x82e8[138]]])}finally{_0x9939x63[_0x82e8[140]]()}};function _0x9939x64(_0x9939x33){_0x9939x61[_0x82e8[24]](this,_0x9939x33)}mxUtils[_0x82e8[25]](_0x9939x64,_0x9939x61);_0x9939x64[_0x82e8[0]][_0x82e8[128]]= function(_0x9939x34){var _0x9939x5a=this[_0x82e8[84]][_0x82e8[93]]()[_0x82e8[113]];var _0x9939x65=mxUtils[_0x82e8[5]](this[_0x82e8[83]][_0x82e8[4]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);return new mxPoint(_0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]/ 2,_0x9939x34[_0x82e8[69]]+ Math[_0x82e8[6]](_0x9939x34[_0x82e8[71]],_0x9939x65* _0x9939x5a))};_0x9939x64[_0x82e8[0]][_0x82e8[134]]= function(_0x9939x58,_0x9939x34){_0x9939x58[_0x82e8[68]]= _0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]/ 2;startSize= _0x9939x58[_0x82e8[69]]- _0x9939x34[_0x82e8[69]];var _0x9939x5a=this[_0x82e8[84]][_0x82e8[93]]()[_0x82e8[113]];this[_0x82e8[83]][_0x82e8[4]][_0x82e8[141]]= Math[_0x82e8[135]](Math[_0x82e8[34]](1,startSize)/ _0x9939x5a);return _0x9939x58};_0x9939x64[_0x82e8[0]][_0x82e8[120]]= function(){this[_0x82e8[83]][_0x82e8[85]][_0x82e8[84]][_0x82e8[139]](_0x82e8[141],this[_0x82e8[83]][_0x82e8[4]][_0x82e8[141]],[this[_0x82e8[83]][_0x82e8[138]]])};function _0x9939x66(_0x9939x33){_0x9939x61[_0x82e8[24]](this,_0x9939x33)}mxUtils[_0x82e8[25]](_0x9939x66,_0x9939x61);_0x9939x66[_0x82e8[0]][_0x82e8[142]]= 20;_0x9939x66[_0x82e8[0]][_0x82e8[143]]= 1;_0x9939x66[_0x82e8[0]][_0x82e8[128]]= function(_0x9939x34){var _0x9939x5a=this[_0x82e8[84]][_0x82e8[93]]()[_0x82e8[113]];var _0x9939x67=Math[_0x82e8[6]](_0x9939x34[_0x82e8[70]],Math[_0x82e8[6]](_0x9939x34[_0x82e8[71]],mxUtils[_0x82e8[5]](this[_0x82e8[83]][_0x82e8[4]],_0x82e8[2],this[_0x82e8[142]])* _0x9939x5a/ this[_0x82e8[143]]));return new mxPoint(_0x9939x34[_0x82e8[68]]+ _0x9939x67,_0x9939x34[_0x82e8[69]]+ _0x9939x67)};_0x9939x66[_0x82e8[0]][_0x82e8[134]]= function(_0x9939x60,_0x9939x34){var _0x9939x4f=Math[_0x82e8[34]](0,Math[_0x82e8[6]](Math[_0x82e8[6]](_0x9939x34[_0x82e8[70]]/ this[_0x82e8[143]],_0x9939x60[_0x82e8[68]]- _0x9939x34[_0x82e8[68]]),Math[_0x82e8[6]](_0x9939x34[_0x82e8[71]]/ this[_0x82e8[143]],_0x9939x60[_0x82e8[69]]- _0x9939x34[_0x82e8[69]])));var _0x9939x5a=this[_0x82e8[84]][_0x82e8[93]]()[_0x82e8[113]];this[_0x82e8[83]][_0x82e8[4]][_0x82e8[2]]= Math[_0x82e8[135]](Math[_0x82e8[34]](1,_0x9939x4f)/ _0x9939x5a)* this[_0x82e8[143]];return new mxPoint(_0x9939x34[_0x82e8[68]]+ _0x9939x4f,_0x9939x34[_0x82e8[69]]+ _0x9939x4f)};_0x9939x66[_0x82e8[0]][_0x82e8[120]]= function(){this[_0x82e8[83]][_0x82e8[85]][_0x82e8[84]][_0x82e8[139]](_0x82e8[2],this[_0x82e8[83]][_0x82e8[4]][_0x82e8[2]],[this[_0x82e8[83]][_0x82e8[138]]])};function _0x9939x68(_0x9939x33){_0x9939x66[_0x82e8[24]](this,_0x9939x33)}mxUtils[_0x82e8[25]](_0x9939x68,_0x9939x66);_0x9939x68[_0x82e8[0]][_0x82e8[142]]= 30;_0x9939x68[_0x82e8[0]][_0x82e8[143]]= 2;function _0x9939x69(_0x9939x33){_0x9939x66[_0x82e8[24]](this,_0x9939x33)}mxUtils[_0x82e8[25]](_0x9939x69,_0x9939x66);_0x9939x69[_0x82e8[0]][_0x82e8[142]]= 30;_0x9939x69[_0x82e8[0]][_0x82e8[143]]= 1;_0x9939x69[_0x82e8[0]][_0x82e8[128]]= function(_0x9939x34){var _0x9939x5a=this[_0x82e8[84]][_0x82e8[93]]()[_0x82e8[113]];var _0x9939x67=Math[_0x82e8[6]](_0x9939x34[_0x82e8[70]],Math[_0x82e8[6]](_0x9939x34[_0x82e8[71]],mxUtils[_0x82e8[5]](this[_0x82e8[83]][_0x82e8[4]],_0x82e8[2],this[_0x82e8[142]])* _0x9939x5a/ this[_0x82e8[143]]));return new mxPoint(_0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]- _0x9939x67,_0x9939x34[_0x82e8[69]]+ _0x9939x67)};_0x9939x69[_0x82e8[0]][_0x82e8[134]]= function(_0x9939x60,_0x9939x34){var _0x9939x4f=Math[_0x82e8[34]](0,Math[_0x82e8[6]](Math[_0x82e8[6]](_0x9939x34[_0x82e8[70]]/ this[_0x82e8[143]],_0x9939x60[_0x82e8[68]]- _0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]),Math[_0x82e8[6]](_0x9939x34[_0x82e8[71]]/ this[_0x82e8[143]],_0x9939x60[_0x82e8[69]]- _0x9939x34[_0x82e8[69]])));var _0x9939x5a=this[_0x82e8[84]][_0x82e8[93]]()[_0x82e8[113]];this[_0x82e8[83]][_0x82e8[4]][_0x82e8[2]]= Math[_0x82e8[135]](Math[_0x82e8[34]](1,_0x9939x4f)/ _0x9939x5a)* this[_0x82e8[143]];return new mxPoint(_0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]- _0x9939x4f,_0x9939x34[_0x82e8[69]]+ _0x9939x4f)};function _0x9939x6a(_0x9939x33){_0x9939x66[_0x82e8[24]](this,_0x9939x33)}mxUtils[_0x82e8[25]](_0x9939x6a,_0x9939x66);_0x9939x6a[_0x82e8[0]][_0x82e8[142]]= 0.2;_0x9939x6a[_0x82e8[0]][_0x82e8[143]]= 1;_0x9939x6a[_0x82e8[0]][_0x82e8[128]]= function(_0x9939x34){var _0x9939x67=mxUtils[_0x82e8[5]](this[_0x82e8[83]][_0x82e8[4]],_0x82e8[2],this[_0x82e8[142]]);return new mxPoint(_0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]* _0x9939x67,_0x9939x34[_0x82e8[69]]+ _0x9939x34[_0x82e8[71]]/ 2)};_0x9939x6a[_0x82e8[0]][_0x82e8[134]]= function(_0x9939x60,_0x9939x34){var _0x9939x4f=Math[_0x82e8[6]](1,(_0x9939x60[_0x82e8[68]]- _0x9939x34[_0x82e8[68]])/ _0x9939x34[_0x82e8[70]]);this[_0x82e8[83]][_0x82e8[4]][_0x82e8[2]]= _0x9939x4f;return new mxPoint(_0x9939x34[_0x82e8[68]]+ _0x9939x4f* _0x9939x34[_0x82e8[70]],_0x9939x34[_0x82e8[69]]+ _0x9939x34[_0x82e8[71]]/ 2)};function _0x9939x6b(_0x9939x33){_0x9939x66[_0x82e8[24]](this,_0x9939x33)}mxUtils[_0x82e8[25]](_0x9939x6b,_0x9939x66);_0x9939x6b[_0x82e8[0]][_0x82e8[142]]= 0.4;_0x9939x6b[_0x82e8[0]][_0x82e8[143]]= 1;_0x9939x6b[_0x82e8[0]][_0x82e8[128]]= function(_0x9939x34){var _0x9939x67=mxUtils[_0x82e8[5]](this[_0x82e8[83]][_0x82e8[4]],_0x82e8[2],this[_0x82e8[142]]);return new mxPoint(_0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]/ 2,_0x9939x34[_0x82e8[69]]+ _0x9939x67* _0x9939x34[_0x82e8[71]]/ 2)};_0x9939x6b[_0x82e8[0]][_0x82e8[134]]= function(_0x9939x60,_0x9939x34){var _0x9939x4f=Math[_0x82e8[34]](0,Math[_0x82e8[6]](1,((_0x9939x60[_0x82e8[69]]- _0x9939x34[_0x82e8[69]])/ _0x9939x34[_0x82e8[71]])* 2));this[_0x82e8[83]][_0x82e8[4]][_0x82e8[2]]= _0x9939x4f;return new mxPoint(_0x9939x34[_0x82e8[68]]+ _0x9939x34[_0x82e8[70]]/ 2,_0x9939x34[_0x82e8[69]]+ _0x9939x4f* _0x9939x34[_0x82e8[71]]/ 2)};var _0x9939x6c={"\x73\x77\x69\x6D\x6C\x61\x6E\x65":_0x9939x64,"\x66\x6F\x6C\x64\x65\x72":_0x9939x61,"\x63\x75\x62\x65":_0x9939x66,"\x63\x61\x72\x64":_0x9939x68,"\x6E\x6F\x74\x65":_0x9939x69,"\x73\x74\x65\x70":_0x9939x6a,"\x74\x61\x70\x65":_0x9939x6b};var _0x9939x6d=mxGraph[_0x82e8[0]][_0x82e8[144]];mxGraph[_0x82e8[0]][_0x82e8[144]]= function(_0x9939x33){if(_0x9939x33!= null){var _0x9939x6e=_0x9939x6c[_0x9939x33[_0x82e8[4]][_0x82e8[123]]];if(_0x9939x6e!= null){return new _0x9939x6e(_0x9939x33)}};return _0x9939x6d[_0x82e8[30]](this,arguments)}};mxGraph[_0x82e8[0]][_0x82e8[145]]= function(_0x9939x6f,_0x9939x50){if(_0x9939x6f!= null&& _0x9939x6f[_0x82e8[123]]!= null){if(_0x9939x6f[_0x82e8[123]][_0x82e8[146]]!= null){if(_0x9939x6f[_0x82e8[123]][_0x82e8[146]]!= null){return _0x9939x6f[_0x82e8[123]][_0x82e8[146]][_0x82e8[147]]}}else {if(_0x9939x6f[_0x82e8[123]][_0x82e8[147]]!= null){return _0x9939x6f[_0x82e8[123]][_0x82e8[147]]}}};return null};mxRectangleShape[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxLabel[_0x82e8[0]][_0x82e8[147]]= mxRectangleShape[_0x82e8[0]][_0x82e8[147]];mxImageShape[_0x82e8[0]][_0x82e8[147]]= mxRectangleShape[_0x82e8[0]][_0x82e8[147]];mxSwimlane[_0x82e8[0]][_0x82e8[147]]= mxRectangleShape[_0x82e8[0]][_0x82e8[147]];_0x9939x14[_0x82e8[0]][_0x82e8[147]]= mxRectangleShape[_0x82e8[0]][_0x82e8[147]];_0x9939x9[_0x82e8[0]][_0x82e8[147]]= mxRectangleShape[_0x82e8[0]][_0x82e8[147]];_0x9939x10[_0x82e8[0]][_0x82e8[147]]= mxRectangleShape[_0x82e8[0]][_0x82e8[147]];_0x9939x1[_0x82e8[0]][_0x82e8[147]]= mxRectangleShape[_0x82e8[0]][_0x82e8[147]];_0x9939xa[_0x82e8[0]][_0x82e8[147]]= mxRectangleShape[_0x82e8[0]][_0x82e8[147]];mxCylinder[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0.15,0.05),false), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.85,0.05),false), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.3),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.7),true), new mxConnectionConstraint( new mxPoint(0.15,0.95),false), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.85,0.95),false)];_0x9939x25[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0.1),false), new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.75,0.1),false), new mxConnectionConstraint( new mxPoint(0,1/ 3),false), new mxConnectionConstraint( new mxPoint(0,1),false), new mxConnectionConstraint( new mxPoint(1,1/ 3),false), new mxConnectionConstraint( new mxPoint(1,1),false), new mxConnectionConstraint( new mxPoint(0.5,0.5),false)];_0x9939x28[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxActor[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.25,0.2),false), new mxConnectionConstraint( new mxPoint(0.1,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.75,0.25),false), new mxConnectionConstraint( new mxPoint(0.9,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];_0x9939x11[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.35),false), new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.65),false), new mxConnectionConstraint( new mxPoint(1,0.35),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.65),false), new mxConnectionConstraint( new mxPoint(0.25,1),false), new mxConnectionConstraint( new mxPoint(0.75,0),false)];_0x9939x13[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true), new mxConnectionConstraint( new mxPoint(0.1,0.25),false), new mxConnectionConstraint( new mxPoint(0.2,0.5),false), new mxConnectionConstraint( new mxPoint(0.1,0.75),false), new mxConnectionConstraint( new mxPoint(0.9,0.25),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(0.9,0.75),false)];mxLine[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0.25,0.5),false), new mxConnectionConstraint( new mxPoint(0.75,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.5),false)];_0x9939x26[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.5,1),false)];mxEllipse[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0,0),true), new mxConnectionConstraint( new mxPoint(1,0),true), new mxConnectionConstraint( new mxPoint(0,1),true), new mxConnectionConstraint( new mxPoint(1,1),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5))];mxDoubleEllipse[_0x82e8[0]][_0x82e8[147]]= mxEllipse[_0x82e8[0]][_0x82e8[147]];mxRhombus[_0x82e8[0]][_0x82e8[147]]= mxEllipse[_0x82e8[0]][_0x82e8[147]];mxTriangle[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(1,0.5),true)];mxHexagon[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0.375,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.625,0),true), new mxConnectionConstraint( new mxPoint(0.125,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0.125,0.75),false), new mxConnectionConstraint( new mxPoint(0.875,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(0.875,0.75),false), new mxConnectionConstraint( new mxPoint(0.375,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.625,1),true)];mxCloud[_0x82e8[0]][_0x82e8[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0.25),false), new mxConnectionConstraint( new mxPoint(0.4,0.1),false), new mxConnectionConstraint( new mxPoint(0.16,0.55),false), new mxConnectionConstraint( new mxPoint(0.07,0.4),false), new mxConnectionConstraint( new mxPoint(0.31,0.8),false), new mxConnectionConstraint( new mxPoint(0.13,0.77),false), new mxConnectionConstraint( new mxPoint(0.8,0.8),false), new mxConnectionConstraint( new mxPoint(0.55,0.95),false), new mxConnectionConstraint( new mxPoint(0.875,0.5),false), new mxConnectionConstraint( new mxPoint(0.96,0.7),false), new mxConnectionConstraint( new mxPoint(0.625,0.2),false), new mxConnectionConstraint( new mxPoint(0.88,0.25),false)];mxArrow[_0x82e8[0]][_0x82e8[147]]= null})() \ No newline at end of file diff --git a/public/assets/plugins/jscripty/js/Sidebar.js b/public/assets/plugins/jscripty/js/Sidebar.js index 8b618e6..614b0fc 100644 --- a/public/assets/plugins/jscripty/js/Sidebar.js +++ b/public/assets/plugins/jscripty/js/Sidebar.js @@ -1,793 +1 @@ -'use strict'; - -/** - * Construcs a new sidebar for the given editor. - */ -function Sidebar(editorUi, container) { - this.editorUi = editorUi; - this.container = container; - this.palettes = new Object(); - this.showTooltips = true; - this.graph = new Graph(document.createElement('div'), null, null, this.editorUi - .editor.graph.getStylesheet()); - this.graph.resetViewOnRootChange = false; - this.graph.foldingEnabled = false; - this.graph.setConnectable(false); - this.graph.autoScroll = false; - this.graph.setTooltips(false); - this.graph.setEnabled(false); - - // Container must be in the DOM for correct HTML rendering - this.graph.container.style.visibility = 'hidden'; - this.graph.container.style.position = 'absolute'; - document.body.appendChild(this.graph.container); - - if (!mxClient.IS_TOUCH) { - mxEvent.addListener(document, 'mouseup', mxUtils.bind(this, function() { - this.showTooltips = true; - })); - - // Enables tooltips after scroll - mxEvent.addListener(container, 'scroll', mxUtils.bind(this, function() { - this.showTooltips = true; - })); - - mxEvent.addListener(document, 'mousedown', mxUtils.bind(this, function() { - this.showTooltips = false; - this.hideTooltip(); - })); - - mxEvent.addListener(document, 'mousemove', mxUtils.bind(this, function(evt) { - var src = mxEvent.getSource(evt); - - while (src != null) { - if (src == this.currentElt) { - return; - } - - src = src.parentNode; - } - - this.hideTooltip(); - })); - - // Handles mouse leaving the window - mxEvent.addListener(document, 'mouseout', mxUtils.bind(this, function(evt) { - if (evt.toElement == null && evt.relatedTarget == null) { - this.hideTooltip(); - } - })); - } - - this.init(); - - // Pre-fetches tooltip image - new Image().src = IMAGE_PATH + '/tooltip.png'; -}; - -/** - * Adds all palettes to the sidebar. - */ -Sidebar.prototype.init = function() { - var dir = STENCIL_PATH; - console.log(dir); - - // this.addImagePalette('entry', mxResources.get('application'), dir + '/', - // '_128x128.png', ['start', 'question', 'input', 'end', 'email'], [mxResources.get('start'), - // mxResources.get('question'), mxResources.get('input'), mxResources.get('end'), mxResources.get('email') - // ]); - this.addImagePalette('entry', mxResources.get('application'), dir + '/', - '_128x128.png', ['start', 'question', 'input', 'end'], [mxResources.get('start'), - mxResources.get('question'), mxResources.get('input'), mxResources.get('end') - ]); - // this.addBpmnPalette(dir, false); - -}; - -/** - * Specifies if tooltips should be visible. Default is true. - */ -Sidebar.prototype.enableTooltips = !mxClient.IS_TOUCH; - -/** - * Specifies the delay for the tooltip. Default is 16 px. - */ -Sidebar.prototype.tooltipBorder = 16; - -/** - * Specifies the delay for the tooltip. Default is 3 px. - */ -Sidebar.prototype.thumbBorder = 3; - -/** - * Specifies the delay for the tooltip. Default is 300 ms. - */ -Sidebar.prototype.tooltipDelay = 300; - -/** - * Specifies if edges should be used as templates if clicked. Default is true. - */ -Sidebar.prototype.installEdges = true; - -/** - * Specifies the URL of the gear image. - */ -Sidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png'; - -/** - * Specifies the width of the thumbnails. - */ -Sidebar.prototype.thumbWidth = 34; - -/** - * Specifies the height of the thumbnails. - */ -Sidebar.prototype.thumbHeight = 34; - -/** - * Specifies the padding for the thumbnails. Default is 3. - */ -Sidebar.prototype.thumbPadding = 2; - -/** - * Specifies the size of the sidebar titles. - */ -Sidebar.prototype.sidebarTitleSize = 9; - -/** - * Specifies if titles in the sidebar should be enabled. - */ -Sidebar.prototype.sidebarTitles = false; - -/** - * Specifies if titles in the tooltips should be enabled. - */ -Sidebar.prototype.tooltipTitles = false; - -/** - * Adds all palettes to the sidebar. - */ -Sidebar.prototype.showTooltip = function(elt, cells, title, showLabel) { - if (this.enableTooltips && this.showTooltips) { - if (this.currentElt != elt) { - if (this.thread != null) { - window.clearTimeout(this.thread); - this.thread = null; - } - - var show = mxUtils.bind(this, function() { - // Lazy creation of the DOM nodes and graph instance - if (this.tooltip == null) { - this.tooltip = document.createElement('div'); - this.tooltip.className = 'geSidebarTooltip'; - document.body.appendChild(this.tooltip); - - this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph - .getStylesheet()); - this.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder); - this.graph2.resetViewOnRootChange = false; - this.graph2.foldingEnabled = false; - this.graph2.autoScroll = false; - this.graph2.setTooltips(false); - this.graph2.setConnectable(false); - this.graph2.setEnabled(false); - - if (!mxClient.IS_SVG) { - this.graph2.view.canvas.style.position = 'relative'; - } - - this.tooltipImage = mxUtils.createImage(IMAGE_PATH + '/tooltip.png'); - this.tooltipImage.style.position = 'absolute'; - this.tooltipImage.style.width = '14px'; - this.tooltipImage.style.height = '27px'; - - document.body.appendChild(this.tooltipImage); - } - - this.tooltip.style.display = 'block'; - this.graph2.labelsVisible = (showLabel == null || showLabel); - this.graph2.model.clear(); - this.graph2.addCells(cells); - - var bounds = this.graph2.getGraphBounds(); - var width = bounds.width + 2 * this.tooltipBorder; - var height = bounds.height + 2 * this.tooltipBorder; - - if (mxClient.IS_QUIRKS) { - width += 4; - height += 4; - this.tooltip.style.overflow = 'hidden'; - } else { - this.tooltip.style.overflow = 'visible'; - } - - this.tooltipImage.style.visibility = 'visible'; - this.tooltip.style.width = width + 'px'; - - // Adds title for entry - if (this.tooltipTitles && title != null && title.length > 0) { - if (this.tooltipTitle == null) { - this.tooltipTitle = document.createElement('div'); - this.tooltipTitle.style.borderTop = '1px solid gray'; - this.tooltipTitle.style.textAlign = 'center'; - this.tooltipTitle.style.width = '100%'; - - // Oversize titles are cut-off currently. Should make tooltip wider later. - this.tooltipTitle.style.overflow = 'hidden'; - - if (mxClient.IS_SVG) { - this.tooltipTitle.style.paddingTop = '2px'; - } else { - this.tooltipTitle.style.position = 'absolute'; - this.tooltipTitle.style.paddingTop = '6px'; - } - - this.tooltip.appendChild(this.tooltipTitle); - } else { - this.tooltipTitle.innerHTML = ''; - } - - this.tooltipTitle.style.display = ''; - mxUtils.write(this.tooltipTitle, title); - - var dy = this.tooltipTitle.offsetHeight + 10; - height += dy; - - if (mxClient.IS_SVG) { - this.tooltipTitle.style.marginTop = (-dy) + 'px'; - } else { - height -= 6; - this.tooltipTitle.style.top = (height - dy) + 'px'; - } - } else if (this.tooltipTitle != null && this.tooltipTitle.parentNode != - null) { - this.tooltipTitle.style.display = 'none'; - } - - this.tooltip.style.height = height + 'px'; - var x0 = -Math.min(0, bounds.x - this.tooltipBorder); - var y0 = -Math.min(0, bounds.y - this.tooltipBorder); - - var left = this.container.clientWidth + this.editorUi.splitSize + 3; - var top = Math.max(0, (this.container.offsetTop + elt.offsetTop - this.container - .scrollTop - height / 2 + 16)); - - if (mxClient.IS_SVG) { - this.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 + - ',' + y0 + ')'); - } else { - this.graph2.view.drawPane.style.left = x0 + 'px'; - this.graph2.view.drawPane.style.top = y0 + 'px'; - } - - // Workaround for ignored position CSS style in IE9 - // (changes to relative without the following line) - // Added width of the page-sidebar - // left += document.getElementById('page-sidebar').offsetWidth; - // Added static height of the page-navbar - top += 90; - - this.tooltip.style.position = 'absolute'; - this.tooltip.style.left = left + 'px'; - this.tooltip.style.top = top + 'px'; - this.tooltipImage.style.left = (left - 13) + 'px'; - this.tooltipImage.style.top = (top + height / 2 - 13) + 'px'; - }); - - if (this.tooltip != null && this.tooltip.style.display != 'none') { - show(); - } else { - this.thread = window.setTimeout(show, this.tooltipDelay); - } - - this.currentElt = elt; - } - } -}; - -/** - * Hides the current tooltip. - */ -Sidebar.prototype.hideTooltip = function() { - if (this.thread != null) { - window.clearTimeout(this.thread); - this.thread = null; - } - - if (this.tooltip != null) { - this.tooltip.style.display = 'none'; - this.tooltipImage.style.visibility = 'hidden'; - this.currentElt = null; - } -}; - -/** - * Creates and returns the given title element. - */ -Sidebar.prototype.createTitle = function(label) { - var elt = document.createElement('a'); - elt.setAttribute('href', 'javascript:void(0);'); - elt.className = 'geTitle'; - mxUtils.write(elt, label); - - return elt; -}; - -/** - * Creates a thumbnail for the given cells. - */ -Sidebar.prototype.createThumb = function(cells, width, height, parent, title, - showLabel) { - this.graph.labelsVisible = (showLabel == null || showLabel); - this.graph.view.scaleAndTranslate(1, 0, 0); - this.graph.addCells(cells); - var bounds = this.graph.getGraphBounds(); - var corr = this.thumbBorder; - var s = Math.min((width - 2) / (bounds.width - bounds.x + corr), (height - 2) / - (bounds.height - bounds.y + corr)); - var x0 = -Math.min(bounds.x, 0); - var y0 = -Math.min(bounds.y, 0); - this.graph.view.scaleAndTranslate(s, x0, y0); - - bounds = this.graph.getGraphBounds(); - var dx = Math.max(0, Math.floor((width - bounds.width - bounds.x) / 2)); - var dy = Math.max(0, Math.floor((height - bounds.height - bounds.y) / 2)); - - var node = null; - - // For supporting HTML labels in IE9 standards mode the container is cloned instead - if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO) { - node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true); - } - // LATER: Check if deep clone can be used for quirks if container in DOM - else { - node = this.graph.container.cloneNode(false); - node.innerHTML = this.graph.container.innerHTML; - } - - this.graph.getModel().clear(); - - // Catch-all event handling - if (mxClient.IS_IE6) { - parent.style.backgroundImage = 'url(' + this.editorUi.editor.transparentImage + - ')'; - } - - var dd = 3; - node.style.position = 'relative'; - node.style.overflow = 'hidden'; - node.style.cursor = 'pointer'; - node.style.left = (dx + dd) + 'px'; - node.style.top = (dy + dd) + 'px'; - node.style.width = width + 'px'; - node.style.height = height + 'px'; - node.style.visibility = ''; - node.style.minWidth = ''; - node.style.minHeight = ''; - - parent.appendChild(node); - - // Adds title for sidebar entries - if (this.sidebarTitles && title != null) { - var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2 : 0; - parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) + - 'px'; - - var div = document.createElement('div'); - div.style.fontSize = this.sidebarTitleSize + 'px'; - div.style.textAlign = 'center'; - div.style.whiteSpace = 'nowrap'; - - if (mxClient.IS_IE) { - div.style.height = (this.sidebarTitleSize + 12) + 'px'; - } - - div.style.paddingTop = '4px'; - mxUtils.write(div, title); - parent.appendChild(div); - } -}; - -/** - * Creates and returns a new palette item for the given image. - */ -Sidebar.prototype.createItem = function(cells, title, showLabel) { - var elt = document.createElement('a'); - elt.setAttribute('href', 'javascript:void(0);'); - elt.className = 'geItem'; - elt.style.overflow = 'hidden'; - var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 6; - elt.style.width = (this.thumbWidth + border) + 'px'; - elt.style.height = (this.thumbHeight + border) + 'px'; - elt.style.padding = this.thumbPadding + 'px'; - - // Blocks default click action - mxEvent.addListener(elt, 'click', function(evt) { - mxEvent.consume(evt); - }); - - this.createThumb(cells, this.thumbWidth, this.thumbHeight, elt, title, - showLabel); - - return elt; -}; - - -/** - * Creates a drop handler for inserting the given cells. - */ -Sidebar.prototype.createDropHandler = function(cells, allowSplit) { - return function(graph, evt, target, x, y) { - if (graph.isEnabled()) { - cells = graph.getImportableCells(cells); - - if (cells.length > 0) { - var validDropTarget = (target != null) ? - graph.isValidDropTarget(target, cells, evt) : false; - var select = null; - - if (target != null && !validDropTarget) { - target = null; - } - - // Splits the target edge or inserts into target group - if (allowSplit && graph.isSplitEnabled() && graph.isSplitTarget(target, - cells, evt)) { - graph.splitEdge(target, cells, null, x, y); - select = cells; - } else if (cells.length > 0) { - select = graph.importCells(cells, x, y, target); - } - - if (select != null && select.length > 0) { - graph.scrollCellToVisible(select[0]); - graph.setSelectionCells(select); - } - } - } - }; -}; - -/** - * Creates and returns a preview element for the given width and height. - */ -Sidebar.prototype.createDragPreview = function(width, height) { - var elt = document.createElement('div'); - elt.style.border = '1px dashed black'; - elt.style.width = width + 'px'; - elt.style.height = height + 'px'; - - return elt; -}; - -/** - * Creates a drag source for the given element. - */ -Sidebar.prototype.createDragSource = function(elt, dropHandler, preview) { - var dragSource = mxUtils.makeDraggable(elt, this.editorUi.editor.graph, - dropHandler, - preview, 0, 0, this.editorUi.editor.graph.autoscroll, true, true); - - - - // Allows drop into cell only if target is a valid root - dragSource.getDropTarget = function(graph, x, y) { - var target = mxDragSource.prototype.getDropTarget.apply(this, arguments); - if (!graph.isValidRoot(target)) { - target = null; - } - - return target; - }; - - return dragSource; -}; - - - -/** - * Adds a handler for inserting the cell with a single click. - */ -Sidebar.prototype.addClickHandler = function(elt, ds) { - var graph = this.editorUi.editor.graph; - var first = null; - - mxEvent.addGestureListeners(elt, function(evt) { - first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - }); - - var oldMouseUp = ds.mouseUp; - ds.mouseUp = function(evt) { - if (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null && first != - null) { - var tol = graph.tolerance; - - if (Math.abs(first.x - mxEvent.getClientX(evt)) <= tol && - Math.abs(first.y - mxEvent.getClientY(evt)) <= tol) { - var gs = graph.getGridSize(); - ds.drop(graph, evt, null, gs, gs); - } - } - - oldMouseUp.apply(this, arguments); - first = null; - }; -}; - -/** - * Giuseppe Careri - * Create xml document vertex - */ -Sidebar.prototype.createXmlDocument = function(element, label, variables, - values) { - var doc = mxUtils.createXmlDocument(); - var node = doc.createElement(element) - node.setAttribute('label', label); - - variables.forEach(function(variable, index) { - node.setAttribute(variable, values[index] ? values[index] : ''); - }); - - return node; -} - -/** - * Giuseppe Careri - * Creates a drop handler for inserting the given cells. - */ -Sidebar.prototype.createVertexTemplate = function(style, width, height, value, - title, showLabel) { - var variables = []; - var values = []; - - switch (value) { - case 'start': - variables = ['id', 'text', 'state']; - values = ['0', '', "OFF"]; - break; - case 'end': - variables = ['id', 'text']; - values = ['0', '']; - break; - case 'question': - variables = ['id', 'question', 'other']; - values = ['0', '']; - break; - case 'input': - variables = ['id', 'question', 'add']; - values = ['0', '']; - break; - // case 'email': - // variables = ["Host", "Username", "Password", "To", "Subject", "Body"]; - // values = ['']; - // break; - // case 'sms': - // variables = ['account_id', 'to', 'sms_text']; - // values = ['0']; - // break; - - default: - variables = []; - values = []; - break; - } - - var node = this.createXmlDocument(value, title, variables, values); - - //var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)]; - var cells = [new mxCell(node, new mxGeometry(0, 0, width, height), style)]; - cells[0].vertex = true; - return this.createVertexTemplateFromCells(cells, width, height, title, - showLabel); -}; - - - -/** - * Creates a drop handler for inserting the given cells. - */ -Sidebar.prototype.createVertexTemplateFromCells = function(cells, width, height, - title, showLabel) { - var elt = this.createItem(cells, title, showLabel); - var ds = this.createDragSource(elt, this.createDropHandler(cells, true), this - .createDragPreview(width, height)); - this.addClickHandler(elt, ds); - - // Uses guides for vertices only if enabled in graph - ds.isGuidesEnabled = mxUtils.bind(this, function() { - return this.editorUi.editor.graph.graphHandler.guidesEnabled; - }); - - // Shows a tooltip with the rendered cell - if (!touchStyle) { - mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) { - this.showTooltip(elt, cells, title, showLabel); - })); - } - - return elt; -}; - -/** - * Creates a drop handler for inserting the given cells. - */ -Sidebar.prototype.createEdgeTemplate = function(style, width, height, value, - title, showLabel) { - var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, - width, height), style)]; - cells[0].geometry.setTerminalPoint(new mxPoint(0, height), true); - cells[0].geometry.setTerminalPoint(new mxPoint(width, 0), false); - cells[0].geometry.relative = true; - cells[0].edge = true; - - return this.createEdgeTemplateFromCells(cells, width, height, title, - showLabel); -}; - -/** - * Creates a drop handler for inserting the given cells. - */ -Sidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height, - title, showLabel) { - var elt = this.createItem(cells, title, showLabel); - this.createDragSource(elt, this.createDropHandler(cells, false), this.createDragPreview( - width, height)); - - // Installs the default edge - var graph = this.editorUi.editor.graph; - mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt) { - if (this.installEdges) { - graph.setDefaultEdge(cells[0]); - } - - // Highlights the entry for 200ms - elt.style.backgroundColor = '#ffffff'; - - window.setTimeout(function() { - elt.style.backgroundColor = ''; - }, 300); - - mxEvent.consume(evt); - })); - - // Shows a tooltip with the rendered cell - touchStyle = false; - if (!touchStyle) { - mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) { - this.showTooltip(elt, cells, title, showLabel); - })); - } - - return elt; -}; - -/** - * Adds the given palette. - */ -Sidebar.prototype.addPalette = function(id, title, expanded, onInit) { - var elt = this.createTitle(title); - this.container.appendChild(elt); - - var div = document.createElement('div'); - div.className = 'geSidebar'; - - if (expanded) { - onInit(div); - onInit = null; - } else { - div.style.display = 'none'; - } - - this.addFoldingHandler(elt, div, onInit); - - var outer = document.createElement('div'); - outer.appendChild(div); - this.container.appendChild(outer); - - // Keeps references to the DOM nodes - if (id != null) { - this.palettes[id] = [elt, outer]; - } -}; - -/** - * Create the given title element. - */ -Sidebar.prototype.addFoldingHandler = function(title, content, funct) { - var initialized = false; - - title.style.backgroundImage = (content.style.display == 'none') ? - 'url(' + IMAGE_PATH + '/collapsed.gif)' : 'url(' + IMAGE_PATH + - '/expanded.gif)'; - title.style.backgroundRepeat = 'no-repeat'; - title.style.backgroundPosition = '100% 50%'; - - mxEvent.addListener(title, 'click', function(evt) { - if (content.style.display == 'none') { - if (!initialized) { - initialized = true; - - if (funct != null) { - title.style.cursor = 'wait'; - window.setTimeout(function() { - funct(content); - title.style.cursor = ''; - }, 0); - } - } - - title.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)'; - content.style.display = 'block'; - } else { - title.style.backgroundImage = 'url(' + IMAGE_PATH + '/collapsed.gif)'; - content.style.display = 'none'; - } - - mxEvent.consume(evt); - }); -}; - -/** - * Removes the palette for the given ID. - */ -Sidebar.prototype.removePalette = function(id) { - var elts = this.palettes[id]; - - if (elts != null) { - this.palettes[id] = null; - - for (var i = 0; i < elts.length; i++) { - this.container.removeChild(elts[i]); - } - - return true; - } - - return false; -}; - -/** - * Adds the given image palette. - */ -Sidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items, - titles) { - // Giuseppe Careri - // Expanded Sidebar only entry - this.addPalette(id, title, (id === 'entry'), mxUtils.bind(this, function( - content) { - var showTitles = titles != null; - - for (var i = 0; i < items.length; i++) { - var icon = prefix + items[i] + postfix; - content.appendChild(this.createVertexTemplate('image;image=' + icon, 80, - 80, items[i], (showTitles) ? titles[i] : null, showTitles)); - } - })); -}; -// ***********modified*************** -// Sidebar.prototype.addBpmnPalette = function(dir, expand) { -// //Abigael Dawit -// -// var fns = [ -// this.createVertexTemplate( -// 'text;strokeColor=none;fillColor=none;align=center;verticalAlign=middle;whiteSpace=wrap;overflow=hidden;', -// 40, 20, 'Text', 'Text', null), -// //this.createVertexTemplate('shape=ext;rounded=1;whiteSpace=wrap;dashed=1;dashPattern=1 4;', 120, 80, 'Event\nSub-Process', 'Event Sub-Process', null), -// this.createVertexTemplate('shape=swimlane;whiteSpace=wrap;startSize=60;', -// 120, 160, 'Container', 'Container', null), -// // this.createVertexTemplate('shape=ellipse;', 120, 160, 'Ellips', 'Ellipse', null) -// this.createVertexTemplate( -// 'shape=swimlane;html=1;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;fillColor=none;rounded=1;verticalAlign=middle', -// 300, 120, 'Lane', 'Lane', null) -// -// ] -// -// this.addPalette('utility', 'Utility ', false, mxUtils.bind(this, function( -// content) { -// //var showTitles = titles != null; -// for (var i = 0; i < fns.length; i++) { -// content.appendChild(fns[i]); -// } -// })); -// -// }; +var _0xdae9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x61\x6C\x65\x74\x74\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x67\x72\x61\x70\x68","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x65\x64\x69\x74\x6F\x72","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x61\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x6F\x64\x79","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x6D\x6F\x75\x73\x65\x75\x70","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x68\x69\x64\x65\x54\x6F\x6F\x6C\x74\x69\x70","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x67\x65\x74\x53\x6F\x75\x72\x63\x65","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x75\x73\x65\x6F\x75\x74","\x74\x6F\x45\x6C\x65\x6D\x65\x6E\x74","\x72\x65\x6C\x61\x74\x65\x64\x54\x61\x72\x67\x65\x74","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x74\x6F\x6F\x6C\x74\x69\x70\x2E\x70\x6E\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x6F\x67","\x65\x6E\x74\x72\x79","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x67\x65\x74","\x2F","\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x73\x74\x61\x72\x74","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x69\x6E\x70\x75\x74","\x65\x6E\x64","\x61\x64\x64\x49\x6D\x61\x67\x65\x50\x61\x6C\x65\x74\x74\x65","\x65\x6E\x61\x62\x6C\x65\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x42\x6F\x72\x64\x65\x72","\x74\x68\x75\x6D\x62\x42\x6F\x72\x64\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x44\x65\x6C\x61\x79","\x69\x6E\x73\x74\x61\x6C\x6C\x45\x64\x67\x65\x73","\x67\x65\x61\x72\x49\x6D\x61\x67\x65","\x2F\x63\x6C\x69\x70\x61\x72\x74\x2F\x47\x65\x61\x72\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x74\x68\x75\x6D\x62\x57\x69\x64\x74\x68","\x74\x68\x75\x6D\x62\x48\x65\x69\x67\x68\x74","\x74\x68\x75\x6D\x62\x50\x61\x64\x64\x69\x6E\x67","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x53\x69\x7A\x65","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70","\x74\x68\x72\x65\x61\x64","\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x6F\x75\x74","\x74\x6F\x6F\x6C\x74\x69\x70","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x54\x6F\x6F\x6C\x74\x69\x70","\x67\x72\x61\x70\x68\x32","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x76\x69\x65\x77","\x49\x53\x5F\x53\x56\x47","\x63\x61\x6E\x76\x61\x73","\x72\x65\x6C\x61\x74\x69\x76\x65","\x74\x6F\x6F\x6C\x74\x69\x70\x49\x6D\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x31\x34\x70\x78","\x68\x65\x69\x67\x68\x74","\x32\x37\x70\x78","\x64\x69\x73\x70\x6C\x61\x79","\x62\x6C\x6F\x63\x6B","\x6C\x61\x62\x65\x6C\x73\x56\x69\x73\x69\x62\x6C\x65","\x63\x6C\x65\x61\x72","\x6D\x6F\x64\x65\x6C","\x61\x64\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x76\x69\x73\x69\x62\x6C\x65","\x70\x78","\x6C\x65\x6E\x67\x74\x68","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70","\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x67\x72\x61\x79","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x65\x6E\x74\x65\x72","\x31\x30\x30\x25","\x70\x61\x64\x64\x69\x6E\x67\x54\x6F\x70","\x32\x70\x78","\x36\x70\x78","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","","\x77\x72\x69\x74\x65","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x74\x6F\x70","\x6E\x6F\x6E\x65","\x78","\x6D\x69\x6E","\x79","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x6D\x61\x78","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x2C","\x29","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6C\x65\x66\x74","\x64\x72\x61\x77\x50\x61\x6E\x65","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x54\x69\x74\x6C\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x54\x69\x74\x6C\x65","\x63\x72\x65\x61\x74\x65\x54\x68\x75\x6D\x62","\x73\x63\x61\x6C\x65\x41\x6E\x64\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x66\x6C\x6F\x6F\x72","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x4E\x4F\x5F\x46\x4F","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x6F\x77\x6E\x65\x72\x53\x56\x47\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x43\x61\x6E\x76\x61\x73","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x49\x53\x5F\x49\x45\x36","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x63\x75\x72\x73\x6F\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x6D\x69\x6E\x57\x69\x64\x74\x68","\x6D\x69\x6E\x48\x65\x69\x67\x68\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x6E\x6F\x77\x72\x61\x70","\x49\x53\x5F\x49\x45","\x34\x70\x78","\x63\x72\x65\x61\x74\x65\x49\x74\x65\x6D","\x67\x65\x49\x74\x65\x6D","\x70\x61\x64\x64\x69\x6E\x67","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x63\x72\x65\x61\x74\x65\x44\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x49\x6D\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x56\x61\x6C\x69\x64\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x69\x73\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x70\x6C\x69\x74\x54\x61\x72\x67\x65\x74","\x73\x70\x6C\x69\x74\x45\x64\x67\x65","\x69\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x50\x72\x65\x76\x69\x65\x77","\x62\x6F\x72\x64\x65\x72","\x31\x70\x78\x20\x64\x61\x73\x68\x65\x64\x20\x62\x6C\x61\x63\x6B","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x53\x6F\x75\x72\x63\x65","\x61\x75\x74\x6F\x73\x63\x72\x6F\x6C\x6C","\x6D\x61\x6B\x65\x44\x72\x61\x67\x67\x61\x62\x6C\x65","\x67\x65\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x61\x70\x70\x6C\x79","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x6D\x6F\x75\x73\x65\x55\x70","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x63\x75\x72\x72\x65\x6E\x74\x47\x72\x61\x70\x68","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x61\x62\x73","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x64\x72\x6F\x70","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6C\x61\x62\x65\x6C","\x66\x6F\x72\x45\x61\x63\x68","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65","\x69\x64","\x74\x65\x78\x74","\x73\x74\x61\x74\x65","\x30","\x4F\x46\x46","\x6F\x74\x68\x65\x72","\x61\x64\x64","\x76\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x69\x73\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x65\x64\x67\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x23\x66\x66\x66\x66\x66\x66","\x61\x64\x64\x50\x61\x6C\x65\x74\x74\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72","\x61\x64\x64\x46\x6F\x6C\x64\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x2F\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x2E\x67\x69\x66\x29","\x2F\x65\x78\x70\x61\x6E\x64\x65\x64\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x31\x30\x30\x25\x20\x35\x30\x25","\x77\x61\x69\x74","\x72\x65\x6D\x6F\x76\x65\x50\x61\x6C\x65\x74\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D"];_0xdae9[0];function Sidebar(_0x1856x2,_0x1856x3){this[_0xdae9[1]]= _0x1856x2;this[_0xdae9[2]]= _0x1856x3;this[_0xdae9[3]]= new Object();this[_0xdae9[4]]= true;this[_0xdae9[5]]= new Graph(document[_0xdae9[7]](_0xdae9[6]),null,null,this[_0xdae9[1]][_0xdae9[9]][_0xdae9[5]][_0xdae9[8]]());this[_0xdae9[5]][_0xdae9[10]]= false;this[_0xdae9[5]][_0xdae9[11]]= false;this[_0xdae9[5]][_0xdae9[12]](false);this[_0xdae9[5]][_0xdae9[13]]= false;this[_0xdae9[5]][_0xdae9[14]](false);this[_0xdae9[5]][_0xdae9[15]](false);this[_0xdae9[5]][_0xdae9[2]][_0xdae9[17]][_0xdae9[16]]= _0xdae9[18];this[_0xdae9[5]][_0xdae9[2]][_0xdae9[17]][_0xdae9[19]]= _0xdae9[20];document[_0xdae9[22]][_0xdae9[21]](this[_0xdae9[5]][_0xdae9[2]]);if(!mxClient[_0xdae9[23]]){mxEvent[_0xdae9[26]](document,_0xdae9[24],mxUtils[_0xdae9[25]](this,function(){this[_0xdae9[4]]= true}));mxEvent[_0xdae9[26]](_0x1856x3,_0xdae9[27],mxUtils[_0xdae9[25]](this,function(){this[_0xdae9[4]]= true}));mxEvent[_0xdae9[26]](document,_0xdae9[28],mxUtils[_0xdae9[25]](this,function(){this[_0xdae9[4]]= false;this[_0xdae9[29]]()}));mxEvent[_0xdae9[26]](document,_0xdae9[30],mxUtils[_0xdae9[25]](this,function(_0x1856x4){var _0x1856x5=mxEvent[_0xdae9[31]](_0x1856x4);while(_0x1856x5!= null){if(_0x1856x5== this[_0xdae9[32]]){return};_0x1856x5= _0x1856x5[_0xdae9[33]]};this[_0xdae9[29]]()}));mxEvent[_0xdae9[26]](document,_0xdae9[34],mxUtils[_0xdae9[25]](this,function(_0x1856x4){if(_0x1856x4[_0xdae9[35]]== null&& _0x1856x4[_0xdae9[36]]== null){this[_0xdae9[29]]()}}))};this[_0xdae9[37]](); new Image()[_0xdae9[38]]= IMAGE_PATH+ _0xdae9[39]}Sidebar[_0xdae9[40]][_0xdae9[37]]= function(){var _0x1856x6=STENCIL_PATH;console[_0xdae9[41]](_0x1856x6);this[_0xdae9[51]](_0xdae9[42],mxResources[_0xdae9[44]](_0xdae9[43]),_0x1856x6+ _0xdae9[45],_0xdae9[46],[_0xdae9[47],_0xdae9[48],_0xdae9[49],_0xdae9[50]],[mxResources[_0xdae9[44]](_0xdae9[47]),mxResources[_0xdae9[44]](_0xdae9[48]),mxResources[_0xdae9[44]](_0xdae9[49]),mxResources[_0xdae9[44]](_0xdae9[50])])};Sidebar[_0xdae9[40]][_0xdae9[52]]= !mxClient[_0xdae9[23]];Sidebar[_0xdae9[40]][_0xdae9[53]]= 16;Sidebar[_0xdae9[40]][_0xdae9[54]]= 3;Sidebar[_0xdae9[40]][_0xdae9[55]]= 300;Sidebar[_0xdae9[40]][_0xdae9[56]]= true;Sidebar[_0xdae9[40]][_0xdae9[57]]= STENCIL_PATH+ _0xdae9[58];Sidebar[_0xdae9[40]][_0xdae9[59]]= 34;Sidebar[_0xdae9[40]][_0xdae9[60]]= 34;Sidebar[_0xdae9[40]][_0xdae9[61]]= 2;Sidebar[_0xdae9[40]][_0xdae9[62]]= 9;Sidebar[_0xdae9[40]][_0xdae9[63]]= false;Sidebar[_0xdae9[40]][_0xdae9[64]]= false;Sidebar[_0xdae9[40]][_0xdae9[65]]= function(_0x1856x7,_0x1856x8,_0x1856x9,_0x1856xa){if(this[_0xdae9[52]]&& this[_0xdae9[4]]){if(this[_0xdae9[32]]!= _0x1856x7){if(this[_0xdae9[66]]!= null){window[_0xdae9[67]](this[_0xdae9[66]]);this[_0xdae9[66]]= null};var _0x1856xb=mxUtils[_0xdae9[25]](this,function(){if(this[_0xdae9[68]]== null){this[_0xdae9[68]]= document[_0xdae9[7]](_0xdae9[6]);this[_0xdae9[68]][_0xdae9[69]]= _0xdae9[70];document[_0xdae9[22]][_0xdae9[21]](this[_0xdae9[68]]);this[_0xdae9[71]]= new Graph(this[_0xdae9[68]],null,null,this[_0xdae9[1]][_0xdae9[9]][_0xdae9[5]][_0xdae9[8]]());this[_0xdae9[71]][_0xdae9[73]][_0xdae9[72]](this[_0xdae9[53]],this[_0xdae9[53]]);this[_0xdae9[71]][_0xdae9[10]]= false;this[_0xdae9[71]][_0xdae9[11]]= false;this[_0xdae9[71]][_0xdae9[13]]= false;this[_0xdae9[71]][_0xdae9[14]](false);this[_0xdae9[71]][_0xdae9[12]](false);this[_0xdae9[71]][_0xdae9[15]](false);if(!mxClient[_0xdae9[74]]){this[_0xdae9[71]][_0xdae9[73]][_0xdae9[75]][_0xdae9[17]][_0xdae9[19]]= _0xdae9[76]};this[_0xdae9[77]]= mxUtils[_0xdae9[78]](IMAGE_PATH+ _0xdae9[39]);this[_0xdae9[77]][_0xdae9[17]][_0xdae9[19]]= _0xdae9[20];this[_0xdae9[77]][_0xdae9[17]][_0xdae9[79]]= _0xdae9[80];this[_0xdae9[77]][_0xdae9[17]][_0xdae9[81]]= _0xdae9[82];document[_0xdae9[22]][_0xdae9[21]](this[_0xdae9[77]])};this[_0xdae9[68]][_0xdae9[17]][_0xdae9[83]]= _0xdae9[84];this[_0xdae9[71]][_0xdae9[85]]= (_0x1856xa== null|| _0x1856xa);this[_0xdae9[71]][_0xdae9[87]][_0xdae9[86]]();this[_0xdae9[71]][_0xdae9[88]](_0x1856x8);var _0x1856xc=this[_0xdae9[71]][_0xdae9[89]]();var _0x1856xd=_0x1856xc[_0xdae9[79]]+ 2* this[_0xdae9[53]];var _0x1856xe=_0x1856xc[_0xdae9[81]]+ 2* this[_0xdae9[53]];if(mxClient[_0xdae9[90]]){_0x1856xd+= 4;_0x1856xe+= 4;this[_0xdae9[68]][_0xdae9[17]][_0xdae9[91]]= _0xdae9[18]}else {this[_0xdae9[68]][_0xdae9[17]][_0xdae9[91]]= _0xdae9[92]};this[_0xdae9[77]][_0xdae9[17]][_0xdae9[16]]= _0xdae9[92];this[_0xdae9[68]][_0xdae9[17]][_0xdae9[79]]= _0x1856xd+ _0xdae9[93];if(this[_0xdae9[64]]&& _0x1856x9!= null&& _0x1856x9[_0xdae9[94]]> 0){if(this[_0xdae9[95]]== null){this[_0xdae9[95]]= document[_0xdae9[7]](_0xdae9[6]);this[_0xdae9[95]][_0xdae9[17]][_0xdae9[96]]= _0xdae9[97];this[_0xdae9[95]][_0xdae9[17]][_0xdae9[98]]= _0xdae9[99];this[_0xdae9[95]][_0xdae9[17]][_0xdae9[79]]= _0xdae9[100];this[_0xdae9[95]][_0xdae9[17]][_0xdae9[91]]= _0xdae9[18];if(mxClient[_0xdae9[74]]){this[_0xdae9[95]][_0xdae9[17]][_0xdae9[101]]= _0xdae9[102]}else {this[_0xdae9[95]][_0xdae9[17]][_0xdae9[19]]= _0xdae9[20];this[_0xdae9[95]][_0xdae9[17]][_0xdae9[101]]= _0xdae9[103]};this[_0xdae9[68]][_0xdae9[21]](this[_0xdae9[95]])}else {this[_0xdae9[95]][_0xdae9[104]]= _0xdae9[105]};this[_0xdae9[95]][_0xdae9[17]][_0xdae9[83]]= _0xdae9[105];mxUtils[_0xdae9[106]](this[_0xdae9[95]],_0x1856x9);var _0x1856xf=this[_0xdae9[95]][_0xdae9[107]]+ 10;_0x1856xe+= _0x1856xf;if(mxClient[_0xdae9[74]]){this[_0xdae9[95]][_0xdae9[17]][_0xdae9[108]]= (-_0x1856xf) + _0xdae9[93]}else {_0x1856xe-= 6;this[_0xdae9[95]][_0xdae9[17]][_0xdae9[109]]= (_0x1856xe- _0x1856xf)+ _0xdae9[93]}}else {if(this[_0xdae9[95]]!= null&& this[_0xdae9[95]][_0xdae9[33]]!= null){this[_0xdae9[95]][_0xdae9[17]][_0xdae9[83]]= _0xdae9[110]}};this[_0xdae9[68]][_0xdae9[17]][_0xdae9[81]]= _0x1856xe+ _0xdae9[93];var _0x1856x10=-Math[_0xdae9[112]](0,_0x1856xc[_0xdae9[111]]- this[_0xdae9[53]]);var _0x1856x11=-Math[_0xdae9[112]](0,_0x1856xc[_0xdae9[113]]- this[_0xdae9[53]]);var _0x1856x12=this[_0xdae9[2]][_0xdae9[114]]+ this[_0xdae9[1]][_0xdae9[115]]+ 3;var _0x1856x13=Math[_0xdae9[118]](0,(this[_0xdae9[2]][_0xdae9[116]]+ _0x1856x7[_0xdae9[116]]- this[_0xdae9[2]][_0xdae9[117]]- _0x1856xe/ 2+ 16));if(mxClient[_0xdae9[74]]){this[_0xdae9[71]][_0xdae9[73]][_0xdae9[75]][_0xdae9[123]](_0xdae9[119],_0xdae9[120]+ _0x1856x10+ _0xdae9[121]+ _0x1856x11+ _0xdae9[122])}else {this[_0xdae9[71]][_0xdae9[73]][_0xdae9[125]][_0xdae9[17]][_0xdae9[124]]= _0x1856x10+ _0xdae9[93];this[_0xdae9[71]][_0xdae9[73]][_0xdae9[125]][_0xdae9[17]][_0xdae9[109]]= _0x1856x11+ _0xdae9[93]};_0x1856x13+= 90;this[_0xdae9[68]][_0xdae9[17]][_0xdae9[19]]= _0xdae9[20];this[_0xdae9[68]][_0xdae9[17]][_0xdae9[124]]= _0x1856x12+ _0xdae9[93];this[_0xdae9[68]][_0xdae9[17]][_0xdae9[109]]= _0x1856x13+ _0xdae9[93];this[_0xdae9[77]][_0xdae9[17]][_0xdae9[124]]= (_0x1856x12- 13)+ _0xdae9[93];this[_0xdae9[77]][_0xdae9[17]][_0xdae9[109]]= (_0x1856x13+ _0x1856xe/ 2- 13)+ _0xdae9[93]});if(this[_0xdae9[68]]!= null&& this[_0xdae9[68]][_0xdae9[17]][_0xdae9[83]]!= _0xdae9[110]){_0x1856xb()}else {this[_0xdae9[66]]= window[_0xdae9[126]](_0x1856xb,this[_0xdae9[55]])};this[_0xdae9[32]]= _0x1856x7}}};Sidebar[_0xdae9[40]][_0xdae9[29]]= function(){if(this[_0xdae9[66]]!= null){window[_0xdae9[67]](this[_0xdae9[66]]);this[_0xdae9[66]]= null};if(this[_0xdae9[68]]!= null){this[_0xdae9[68]][_0xdae9[17]][_0xdae9[83]]= _0xdae9[110];this[_0xdae9[77]][_0xdae9[17]][_0xdae9[16]]= _0xdae9[18];this[_0xdae9[32]]= null}};Sidebar[_0xdae9[40]][_0xdae9[127]]= function(_0x1856x14){var _0x1856x7=document[_0xdae9[7]](_0xdae9[128]);_0x1856x7[_0xdae9[123]](_0xdae9[129],_0xdae9[130]);_0x1856x7[_0xdae9[69]]= _0xdae9[131];mxUtils[_0xdae9[106]](_0x1856x7,_0x1856x14);return _0x1856x7};Sidebar[_0xdae9[40]][_0xdae9[132]]= function(_0x1856x8,_0x1856xd,_0x1856xe,_0x1856x15,_0x1856x9,_0x1856xa){this[_0xdae9[5]][_0xdae9[85]]= (_0x1856xa== null|| _0x1856xa);this[_0xdae9[5]][_0xdae9[73]][_0xdae9[133]](1,0,0);this[_0xdae9[5]][_0xdae9[88]](_0x1856x8);var _0x1856xc=this[_0xdae9[5]][_0xdae9[89]]();var _0x1856x16=this[_0xdae9[54]];var _0x1856x17=Math[_0xdae9[112]]((_0x1856xd- 2)/ (_0x1856xc[_0xdae9[79]]- _0x1856xc[_0xdae9[111]]+ _0x1856x16),(_0x1856xe- 2)/ (_0x1856xc[_0xdae9[81]]- _0x1856xc[_0xdae9[113]]+ _0x1856x16));var _0x1856x10=-Math[_0xdae9[112]](_0x1856xc[_0xdae9[111]],0);var _0x1856x11=-Math[_0xdae9[112]](_0x1856xc[_0xdae9[113]],0);this[_0xdae9[5]][_0xdae9[73]][_0xdae9[133]](_0x1856x17,_0x1856x10,_0x1856x11);_0x1856xc= this[_0xdae9[5]][_0xdae9[89]]();var _0x1856x18=Math[_0xdae9[118]](0,Math[_0xdae9[134]]((_0x1856xd- _0x1856xc[_0xdae9[79]]- _0x1856xc[_0xdae9[111]])/ 2));var _0x1856xf=Math[_0xdae9[118]](0,Math[_0xdae9[134]]((_0x1856xe- _0x1856xc[_0xdae9[81]]- _0x1856xc[_0xdae9[113]])/ 2));var _0x1856x19=null;if(this[_0xdae9[5]][_0xdae9[135]]== mxConstants[_0xdae9[136]]&& !mxClient[_0xdae9[137]]){_0x1856x19= this[_0xdae9[5]][_0xdae9[73]][_0xdae9[140]]()[_0xdae9[139]][_0xdae9[138]](true)}else {_0x1856x19= this[_0xdae9[5]][_0xdae9[2]][_0xdae9[138]](false);_0x1856x19[_0xdae9[104]]= this[_0xdae9[5]][_0xdae9[2]][_0xdae9[104]]};this[_0xdae9[5]][_0xdae9[141]]()[_0xdae9[86]]();if(mxClient[_0xdae9[142]]){_0x1856x15[_0xdae9[17]][_0xdae9[143]]= _0xdae9[144]+ this[_0xdae9[1]][_0xdae9[9]][_0xdae9[145]]+ _0xdae9[122]};var _0x1856x1a=3;_0x1856x19[_0xdae9[17]][_0xdae9[19]]= _0xdae9[76];_0x1856x19[_0xdae9[17]][_0xdae9[91]]= _0xdae9[18];_0x1856x19[_0xdae9[17]][_0xdae9[146]]= _0xdae9[147];_0x1856x19[_0xdae9[17]][_0xdae9[124]]= (_0x1856x18+ _0x1856x1a)+ _0xdae9[93];_0x1856x19[_0xdae9[17]][_0xdae9[109]]= (_0x1856xf+ _0x1856x1a)+ _0xdae9[93];_0x1856x19[_0xdae9[17]][_0xdae9[79]]= _0x1856xd+ _0xdae9[93];_0x1856x19[_0xdae9[17]][_0xdae9[81]]= _0x1856xe+ _0xdae9[93];_0x1856x19[_0xdae9[17]][_0xdae9[16]]= _0xdae9[105];_0x1856x19[_0xdae9[17]][_0xdae9[148]]= _0xdae9[105];_0x1856x19[_0xdae9[17]][_0xdae9[149]]= _0xdae9[105];_0x1856x15[_0xdae9[21]](_0x1856x19);if(this[_0xdae9[63]]&& _0x1856x9!= null){var _0x1856x1b=(mxClient[_0xdae9[90]])?2* this[_0xdae9[61]]+ 2:0;_0x1856x15[_0xdae9[17]][_0xdae9[81]]= (this[_0xdae9[60]]+ _0x1856x1b+ this[_0xdae9[62]]+ 8)+ _0xdae9[93];var _0x1856x1c=document[_0xdae9[7]](_0xdae9[6]);_0x1856x1c[_0xdae9[17]][_0xdae9[150]]= this[_0xdae9[62]]+ _0xdae9[93];_0x1856x1c[_0xdae9[17]][_0xdae9[98]]= _0xdae9[99];_0x1856x1c[_0xdae9[17]][_0xdae9[151]]= _0xdae9[152];if(mxClient[_0xdae9[153]]){_0x1856x1c[_0xdae9[17]][_0xdae9[81]]= (this[_0xdae9[62]]+ 12)+ _0xdae9[93]};_0x1856x1c[_0xdae9[17]][_0xdae9[101]]= _0xdae9[154];mxUtils[_0xdae9[106]](_0x1856x1c,_0x1856x9);_0x1856x15[_0xdae9[21]](_0x1856x1c)}};Sidebar[_0xdae9[40]][_0xdae9[155]]= function(_0x1856x8,_0x1856x9,_0x1856xa){var _0x1856x7=document[_0xdae9[7]](_0xdae9[128]);_0x1856x7[_0xdae9[123]](_0xdae9[129],_0xdae9[130]);_0x1856x7[_0xdae9[69]]= _0xdae9[156];_0x1856x7[_0xdae9[17]][_0xdae9[91]]= _0xdae9[18];var _0x1856x1b=(mxClient[_0xdae9[90]])?8+ 2* this[_0xdae9[61]]:6;_0x1856x7[_0xdae9[17]][_0xdae9[79]]= (this[_0xdae9[59]]+ _0x1856x1b)+ _0xdae9[93];_0x1856x7[_0xdae9[17]][_0xdae9[81]]= (this[_0xdae9[60]]+ _0x1856x1b)+ _0xdae9[93];_0x1856x7[_0xdae9[17]][_0xdae9[157]]= this[_0xdae9[61]]+ _0xdae9[93];mxEvent[_0xdae9[26]](_0x1856x7,_0xdae9[158],function(_0x1856x4){mxEvent[_0xdae9[159]](_0x1856x4)});this[_0xdae9[132]](_0x1856x8,this[_0xdae9[59]],this[_0xdae9[60]],_0x1856x7,_0x1856x9,_0x1856xa);return _0x1856x7};Sidebar[_0xdae9[40]][_0xdae9[160]]= function(_0x1856x8,_0x1856x1d){return function(_0x1856x1e,_0x1856x4,_0x1856x1f,_0x1856x20,_0x1856x21){if(_0x1856x1e[_0xdae9[161]]()){_0x1856x8= _0x1856x1e[_0xdae9[162]](_0x1856x8);if(_0x1856x8[_0xdae9[94]]> 0){var _0x1856x22=(_0x1856x1f!= null)?_0x1856x1e[_0xdae9[163]](_0x1856x1f,_0x1856x8,_0x1856x4):false;var _0x1856x23=null;if(_0x1856x1f!= null&& !_0x1856x22){_0x1856x1f= null};if(_0x1856x1d&& _0x1856x1e[_0xdae9[164]]()&& _0x1856x1e[_0xdae9[165]](_0x1856x1f,_0x1856x8,_0x1856x4)){_0x1856x1e[_0xdae9[166]](_0x1856x1f,_0x1856x8,null,_0x1856x20,_0x1856x21);_0x1856x23= _0x1856x8}else {if(_0x1856x8[_0xdae9[94]]> 0){_0x1856x23= _0x1856x1e[_0xdae9[167]](_0x1856x8,_0x1856x20,_0x1856x21,_0x1856x1f)}};if(_0x1856x23!= null&& _0x1856x23[_0xdae9[94]]> 0){_0x1856x1e[_0xdae9[168]](_0x1856x23[0]);_0x1856x1e[_0xdae9[169]](_0x1856x23)}}}}};Sidebar[_0xdae9[40]][_0xdae9[170]]= function(_0x1856xd,_0x1856xe){var _0x1856x7=document[_0xdae9[7]](_0xdae9[6]);_0x1856x7[_0xdae9[17]][_0xdae9[171]]= _0xdae9[172];_0x1856x7[_0xdae9[17]][_0xdae9[79]]= _0x1856xd+ _0xdae9[93];_0x1856x7[_0xdae9[17]][_0xdae9[81]]= _0x1856xe+ _0xdae9[93];return _0x1856x7};Sidebar[_0xdae9[40]][_0xdae9[173]]= function(_0x1856x7,_0x1856x24,_0x1856x25){var _0x1856x26=mxUtils[_0xdae9[175]](_0x1856x7,this[_0xdae9[1]][_0xdae9[9]][_0xdae9[5]],_0x1856x24,_0x1856x25,0,0,this[_0xdae9[1]][_0xdae9[9]][_0xdae9[5]][_0xdae9[174]],true,true);_0x1856x26[_0xdae9[176]]= function(_0x1856x1e,_0x1856x20,_0x1856x21){var _0x1856x1f=mxDragSource[_0xdae9[40]][_0xdae9[176]][_0xdae9[177]](this,arguments);if(!_0x1856x1e[_0xdae9[178]](_0x1856x1f)){_0x1856x1f= null};return _0x1856x1f};return _0x1856x26};Sidebar[_0xdae9[40]][_0xdae9[179]]= function(_0x1856x7,_0x1856x27){var _0x1856x1e=this[_0xdae9[1]][_0xdae9[9]][_0xdae9[5]];var _0x1856x28=null;mxEvent[_0xdae9[182]](_0x1856x7,function(_0x1856x4){_0x1856x28= new mxPoint(mxEvent[_0xdae9[180]](_0x1856x4),mxEvent[_0xdae9[181]](_0x1856x4))});var _0x1856x29=_0x1856x27[_0xdae9[183]];_0x1856x27[_0xdae9[183]]= function(_0x1856x4){if(!mxEvent[_0xdae9[184]](_0x1856x4)&& this[_0xdae9[185]]== null&& _0x1856x28!= null){var _0x1856x2a=_0x1856x1e[_0xdae9[186]];if(Math[_0xdae9[187]](_0x1856x28[_0xdae9[111]]- mxEvent[_0xdae9[180]](_0x1856x4))<= _0x1856x2a&& Math[_0xdae9[187]](_0x1856x28[_0xdae9[113]]- mxEvent[_0xdae9[181]](_0x1856x4))<= _0x1856x2a){var _0x1856x2b=_0x1856x1e[_0xdae9[188]]();_0x1856x27[_0xdae9[189]](_0x1856x1e,_0x1856x4,null,_0x1856x2b,_0x1856x2b)}};_0x1856x29[_0xdae9[177]](this,arguments);_0x1856x28= null}};Sidebar[_0xdae9[40]][_0xdae9[190]]= function(_0x1856x2c,_0x1856x14,_0x1856x2d,_0x1856x2e){var _0x1856x2f=mxUtils[_0xdae9[190]]();var _0x1856x19=_0x1856x2f[_0xdae9[7]](_0x1856x2c);_0x1856x19[_0xdae9[123]](_0xdae9[191],_0x1856x14);_0x1856x2d[_0xdae9[192]](function(_0x1856x30,_0x1856x31){_0x1856x19[_0xdae9[123]](_0x1856x30,_0x1856x2e[_0x1856x31]?_0x1856x2e[_0x1856x31]:_0xdae9[105])});return _0x1856x19};Sidebar[_0xdae9[40]][_0xdae9[193]]= function(_0x1856x32,_0x1856xd,_0x1856xe,_0x1856x33,_0x1856x9,_0x1856xa){var _0x1856x2d=[];var _0x1856x2e=[];switch(_0x1856x33){case _0xdae9[47]:_0x1856x2d= [_0xdae9[194],_0xdae9[195],_0xdae9[196]];_0x1856x2e= [_0xdae9[197],_0xdae9[105],_0xdae9[198]];break;case _0xdae9[50]:_0x1856x2d= [_0xdae9[194],_0xdae9[195]];_0x1856x2e= [_0xdae9[197],_0xdae9[105]];break;case _0xdae9[48]:_0x1856x2d= [_0xdae9[194],_0xdae9[48],_0xdae9[199]];_0x1856x2e= [_0xdae9[197],_0xdae9[105]];break;case _0xdae9[49]:_0x1856x2d= [_0xdae9[194],_0xdae9[48],_0xdae9[200]];_0x1856x2e= [_0xdae9[197],_0xdae9[105]];break;default:_0x1856x2d= [];_0x1856x2e= [];break};var _0x1856x19=this[_0xdae9[190]](_0x1856x33,_0x1856x9,_0x1856x2d,_0x1856x2e);var _0x1856x8=[ new mxCell(_0x1856x19, new mxGeometry(0,0,_0x1856xd,_0x1856xe),_0x1856x32)];_0x1856x8[0][_0xdae9[201]]= true;return this[_0xdae9[202]](_0x1856x8,_0x1856xd,_0x1856xe,_0x1856x9,_0x1856xa)};Sidebar[_0xdae9[40]][_0xdae9[202]]= function(_0x1856x8,_0x1856xd,_0x1856xe,_0x1856x9,_0x1856xa){var _0x1856x7=this[_0xdae9[155]](_0x1856x8,_0x1856x9,_0x1856xa);var _0x1856x27=this[_0xdae9[173]](_0x1856x7,this[_0xdae9[160]](_0x1856x8,true),this[_0xdae9[170]](_0x1856xd,_0x1856xe));this[_0xdae9[179]](_0x1856x7,_0x1856x27);_0x1856x27[_0xdae9[203]]= mxUtils[_0xdae9[25]](this,function(){return this[_0xdae9[1]][_0xdae9[9]][_0xdae9[5]][_0xdae9[205]][_0xdae9[204]]});if(!touchStyle){mxEvent[_0xdae9[26]](_0x1856x7,_0xdae9[30],mxUtils[_0xdae9[25]](this,function(_0x1856x4){this[_0xdae9[65]](_0x1856x7,_0x1856x8,_0x1856x9,_0x1856xa)}))};return _0x1856x7};Sidebar[_0xdae9[40]][_0xdae9[206]]= function(_0x1856x32,_0x1856xd,_0x1856xe,_0x1856x33,_0x1856x9,_0x1856xa){var _0x1856x8=[ new mxCell((_0x1856x33!= null)?_0x1856x33:_0xdae9[105], new mxGeometry(0,0,_0x1856xd,_0x1856xe),_0x1856x32)];_0x1856x8[0][_0xdae9[208]][_0xdae9[207]]( new mxPoint(0,_0x1856xe),true);_0x1856x8[0][_0xdae9[208]][_0xdae9[207]]( new mxPoint(_0x1856xd,0),false);_0x1856x8[0][_0xdae9[208]][_0xdae9[76]]= true;_0x1856x8[0][_0xdae9[209]]= true;return this[_0xdae9[210]](_0x1856x8,_0x1856xd,_0x1856xe,_0x1856x9,_0x1856xa)};Sidebar[_0xdae9[40]][_0xdae9[210]]= function(_0x1856x8,_0x1856xd,_0x1856xe,_0x1856x9,_0x1856xa){var _0x1856x7=this[_0xdae9[155]](_0x1856x8,_0x1856x9,_0x1856xa);this[_0xdae9[173]](_0x1856x7,this[_0xdae9[160]](_0x1856x8,false),this[_0xdae9[170]](_0x1856xd,_0x1856xe));var _0x1856x1e=this[_0xdae9[1]][_0xdae9[9]][_0xdae9[5]];mxEvent[_0xdae9[26]](_0x1856x7,_0xdae9[158],mxUtils[_0xdae9[25]](this,function(_0x1856x4){if(this[_0xdae9[56]]){_0x1856x1e[_0xdae9[211]](_0x1856x8[0])};_0x1856x7[_0xdae9[17]][_0xdae9[212]]= _0xdae9[213];window[_0xdae9[126]](function(){_0x1856x7[_0xdae9[17]][_0xdae9[212]]= _0xdae9[105]},300);mxEvent[_0xdae9[159]](_0x1856x4)}));touchStyle= false;if(!touchStyle){mxEvent[_0xdae9[26]](_0x1856x7,_0xdae9[30],mxUtils[_0xdae9[25]](this,function(_0x1856x4){this[_0xdae9[65]](_0x1856x7,_0x1856x8,_0x1856x9,_0x1856xa)}))};return _0x1856x7};Sidebar[_0xdae9[40]][_0xdae9[214]]= function(_0x1856x34,_0x1856x9,_0x1856x35,_0x1856x36){var _0x1856x7=this[_0xdae9[127]](_0x1856x9);this[_0xdae9[2]][_0xdae9[21]](_0x1856x7);var _0x1856x1c=document[_0xdae9[7]](_0xdae9[6]);_0x1856x1c[_0xdae9[69]]= _0xdae9[215];if(_0x1856x35){_0x1856x36(_0x1856x1c);_0x1856x36= null}else {_0x1856x1c[_0xdae9[17]][_0xdae9[83]]= _0xdae9[110]};this[_0xdae9[216]](_0x1856x7,_0x1856x1c,_0x1856x36);var _0x1856x37=document[_0xdae9[7]](_0xdae9[6]);_0x1856x37[_0xdae9[21]](_0x1856x1c);this[_0xdae9[2]][_0xdae9[21]](_0x1856x37);if(_0x1856x34!= null){this[_0xdae9[3]][_0x1856x34]= [_0x1856x7,_0x1856x37]}};Sidebar[_0xdae9[40]][_0xdae9[216]]= function(_0x1856x9,_0x1856x38,_0x1856x39){var _0x1856x3a=false;_0x1856x9[_0xdae9[17]][_0xdae9[143]]= (_0x1856x38[_0xdae9[17]][_0xdae9[83]]== _0xdae9[110])?_0xdae9[144]+ IMAGE_PATH+ _0xdae9[217]:_0xdae9[144]+ IMAGE_PATH+ _0xdae9[218];_0x1856x9[_0xdae9[17]][_0xdae9[219]]= _0xdae9[220];_0x1856x9[_0xdae9[17]][_0xdae9[221]]= _0xdae9[222];mxEvent[_0xdae9[26]](_0x1856x9,_0xdae9[158],function(_0x1856x4){if(_0x1856x38[_0xdae9[17]][_0xdae9[83]]== _0xdae9[110]){if(!_0x1856x3a){_0x1856x3a= true;if(_0x1856x39!= null){_0x1856x9[_0xdae9[17]][_0xdae9[146]]= _0xdae9[223];window[_0xdae9[126]](function(){_0x1856x39(_0x1856x38);_0x1856x9[_0xdae9[17]][_0xdae9[146]]= _0xdae9[105]},0)}};_0x1856x9[_0xdae9[17]][_0xdae9[143]]= _0xdae9[144]+ IMAGE_PATH+ _0xdae9[218];_0x1856x38[_0xdae9[17]][_0xdae9[83]]= _0xdae9[84]}else {_0x1856x9[_0xdae9[17]][_0xdae9[143]]= _0xdae9[144]+ IMAGE_PATH+ _0xdae9[217];_0x1856x38[_0xdae9[17]][_0xdae9[83]]= _0xdae9[110]};mxEvent[_0xdae9[159]](_0x1856x4)})};Sidebar[_0xdae9[40]][_0xdae9[224]]= function(_0x1856x34){var _0x1856x3b=this[_0xdae9[3]][_0x1856x34];if(_0x1856x3b!= null){this[_0xdae9[3]][_0x1856x34]= null;for(var _0x1856x3c=0;_0x1856x3c< _0x1856x3b[_0xdae9[94]];_0x1856x3c++){this[_0xdae9[2]][_0xdae9[225]](_0x1856x3b[_0x1856x3c])};return true};return false};Sidebar[_0xdae9[40]][_0xdae9[51]]= function(_0x1856x34,_0x1856x9,_0x1856x3d,_0x1856x3e,_0x1856x3f,_0x1856x40){this[_0xdae9[214]](_0x1856x34,_0x1856x9,(_0x1856x34=== _0xdae9[42]),mxUtils[_0xdae9[25]](this,function(_0x1856x38){var _0x1856x41=_0x1856x40!= null;for(var _0x1856x3c=0;_0x1856x3c< _0x1856x3f[_0xdae9[94]];_0x1856x3c++){var _0x1856x42=_0x1856x3d+ _0x1856x3f[_0x1856x3c]+ _0x1856x3e;_0x1856x38[_0xdae9[21]](this[_0xdae9[193]](_0xdae9[226]+ _0x1856x42,80,80,_0x1856x3f[_0x1856x3c],(_0x1856x41)?_0x1856x40[_0x1856x3c]:null,_0x1856x41))}}))} \ No newline at end of file diff --git a/public/assets/plugins/jscripty/js/Toolbar.js b/public/assets/plugins/jscripty/js/Toolbar.js index 7eab562..53e1546 100644 --- a/public/assets/plugins/jscripty/js/Toolbar.js +++ b/public/assets/plugins/jscripty/js/Toolbar.js @@ -1,407 +1 @@ -/** - * $Id: Toolbar.js,v 1.3 2013-02-20 16:21:29 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Construcs a new toolbar for the given editor. - */ -function Toolbar(editorUi, container) -{ - this.editorUi = editorUi; - this.container = container; - this.init(); - - // Global handler to hide the current menu - mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) - { - this.hideMenu(); - })); -}; - -/** - * Adds the toolbar elements. - */ -Toolbar.prototype.init = function() -{ - this.addItems(['save', 'publish', '-', 'print', 'undo', 'redo', '-', 'copy', 'cut', 'paste', 'delete', '-', 'duplicate', '-', 'actualSize', 'zoomIn', 'zoomOut', '-']); - var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily'); - fontElt.style.whiteSpace = 'nowrap'; - fontElt.style.overflow = 'hidden'; - fontElt.style.width = '70px'; - this.addSeparator(); - var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize'); - sizeElt.style.whiteSpace = 'nowrap'; - sizeElt.style.overflow = 'hidden'; - sizeElt.style.width = '30px'; - - this.addItems(['-', 'bold', 'italic', 'underline']); - // Giuseppe Careri - // var align = this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu) - // { - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null).setAttribute('title', mxResources.get('left')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null).setAttribute('title', mxResources.get('center')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null).setAttribute('title', mxResources.get('right')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], 'geIcon geSprite geSprite-top', null).setAttribute('title', mxResources.get('top')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], 'geIcon geSprite geSprite-middle', null).setAttribute('title', mxResources.get('middle')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], 'geIcon geSprite geSprite-bottom', null).setAttribute('title', mxResources.get('bottom')); - // })); - // this.addItems(['fontColor', '-']); - // var line = this.addMenuFunction('geSprite-straight', mxResources.get('line'), false, mxUtils.bind(this, function(menu) - // { - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], [null], 'geIcon geSprite geSprite-straight', null).setAttribute('title', mxResources.get('straight')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], 'geIcon geSprite geSprite-entity', null).setAttribute('title', mxResources.get('entityRelation')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], 'geIcon geSprite geSprite-helbow', null).setAttribute('title', mxResources.get('horizontal')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], 'geIcon geSprite geSprite-velbow', null).setAttribute('title', mxResources.get('vertical')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], 'geIcon geSprite geSprite-segment', null).setAttribute('title', mxResources.get('manual')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], 'geIcon geSprite geSprite-orthogonal', null).setAttribute('title', mxResources.get('automatic')); - // })); - // var linestart = this.addMenuFunction('geSprite-startclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu) - // { - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null).setAttribute('title', mxResources.get('classic')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-startopen', null).setAttribute('title', mxResources.get('openArrow')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null).setAttribute('title', mxResources.get('block')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null).setAttribute('title', mxResources.get('oval')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null).setAttribute('title', mxResources.get('diamond')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null).setAttribute('title', mxResources.get('diamondThin')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null).setAttribute('title', mxResources.get('classic')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null).setAttribute('title', mxResources.get('block')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null).setAttribute('title', mxResources.get('oval')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null).setAttribute('title', mxResources.get('diamond')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin')); - // })); - // var lineend = this.addMenuFunction('geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu) - // { - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null).setAttribute('title', mxResources.get('classic')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-endopen', null).setAttribute('title', mxResources.get('openArrow')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null).setAttribute('title', mxResources.get('block')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null).setAttribute('title', mxResources.get('oval')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null).setAttribute('title', mxResources.get('diamond')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null).setAttribute('title', mxResources.get('diamondThin')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null).setAttribute('title', mxResources.get('classic')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null).setAttribute('title', mxResources.get('block')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null).setAttribute('title', mxResources.get('oval')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null).setAttribute('title', mxResources.get('diamond')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin')); - // })); - // this.addItems(['-', 'strokeColor', 'image', 'fillColor']); - // this.addItem('geSprite-gradientcolor', 'gradientColor').setAttribute('title', mxResources.get('gradient')); - // this.addItems(['shadow']); - - var graph = this.editorUi.editor.graph; - - // Update font size and font family labels - var update = mxUtils.bind(this, function() - { - var ff = 'Helvetica'; - var fs = '12'; - var state = graph.getView().getState(graph.getSelectionCell()); - - if (state != null) - { - ff = state.style[mxConstants.STYLE_FONTFAMILY] || ff; - fs = state.style[mxConstants.STYLE_FONTSIZE] || fs; - - if (ff.length > 10) - { - ff = ff.substring(0, 8) + '...'; - } - - fontElt.innerHTML = ff; - sizeElt.innerHTML = fs; - } - }); - - graph.getSelectionModel().addListener(mxEvent.CHANGE, update); - graph.getModel().addListener(mxEvent.CHANGE, update); - - // Giuseppe Careri - // Updates button states - //this.addEdgeSelectionHandler([line, linestart, lineend]); - //this.addSelectionHandler([align]); -}; - -/** - * Hides the current menu. - */ -Toolbar.prototype.hideMenu = function() -{ - if (this.currentMenu != null) - { - this.currentMenu.hideMenu(); - this.currentMenu.destroy(); - this.currentMenu = null; - } -}; - -/** - * Adds a label to the toolbar. - */ -Toolbar.prototype.addMenu = function(label, tooltip, showLabels, name) -{ - var menu = this.editorUi.menus.get(name); - var elt = this.addMenuFunction(label, tooltip, showLabels, menu.funct); - - menu.addListener('stateChanged', function() - { - elt.setEnabled(menu.enabled); - }); - - return elt; -}; - -/** - * Adds a label to the toolbar. - */ -Toolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct) -{ - var elt = (showLabels) ? this.createLabel(label) : this.createButton(label); - this.initElement(elt, tooltip); - this.addMenuHandler(elt, showLabels, funct); - this.container.appendChild(elt); - - return elt; -}; - -/** - * Adds a separator to the separator. - */ -Toolbar.prototype.addSeparator = function() -{ - var elt = document.createElement('div'); - elt.className = 'geSeparator'; - this.container.appendChild(elt); - - return elt; -}; - -/** - * Adds given action item - */ -Toolbar.prototype.addItems = function(keys) -{ - for (var i = 0; i < keys.length; i++) - { - var key = keys[i]; - - if (key == '-') - { - this.addSeparator(); - } - else - { - this.addItem('geSprite-' + key.toLowerCase(), key); - } - } -}; - -/** - * Adds given action item - */ -Toolbar.prototype.addItem = function(sprite, key) -{ - var action = this.editorUi.actions.get(key); - var elt = null; - - if (action != null) - { - elt = this.addButton(sprite, action.label, action.funct); - elt.setEnabled(action.enabled); - - action.addListener('stateChanged', function() - { - elt.setEnabled(action.enabled); - }); - } - - return elt; -}; - -/** - * Adds a button to the toolbar. - */ -Toolbar.prototype.addButton = function(classname, tooltip, funct) -{ - var elt = this.createButton(classname); - - this.initElement(elt, tooltip); - this.addClickHandler(elt, funct); - this.container.appendChild(elt); - - return elt; -}; - -/** - * Updates the states of the given toolbar items based on the selection. - */ -Toolbar.prototype.addSelectionHandler = function(items) -{ - var graph = this.editorUi.editor.graph; - - var selectionListener = function() - { - var selected = !graph.isSelectionEmpty(); - - for (var i = 0; i < items.length; i++) - { - items[i].setEnabled(selected); - } - }; - - graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener); - selectionListener(); -}; - -/** - * Updates the states of the given toolbar items based on the selection. - */ -Toolbar.prototype.addEdgeSelectionHandler = function(items) -{ - var graph = this.editorUi.editor.graph; - - var selectionListener = function() - { - var edgeSelected = false; - - if (!graph.isSelectionEmpty()) - { - var cells = graph.getSelectionCells(); - - for (var i = 0; i < cells.length; i++) - { - if (graph.getModel().isEdge(cells[i])) - { - edgeSelected = true; - break; - } - } - } - - for (var i = 0; i < items.length; i++) - { - items[i].setEnabled(edgeSelected); - } - }; - - graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener); - selectionListener(); -}; - -/** - * Initializes the given toolbar element. - */ -Toolbar.prototype.initElement = function(elt, tooltip) -{ - elt.setAttribute('tabindex', '0'); - - // Adds tooltip - if (tooltip != null) - { - elt.setAttribute('title', tooltip); - } - - this.addEnabledState(elt); -}; - -/** - * Adds enabled state with setter to DOM node (avoids JS wrapper). - */ -Toolbar.prototype.addEnabledState = function(elt) -{ - var classname = elt.className; - - elt.setEnabled = function(value) - { - elt.enabled = value; - - if (value) - { - elt.className = classname; - } - else - { - elt.className = classname + ' geDisabled'; - } - }; - - elt.setEnabled(true); -}; - -/** - * Adds enabled state with setter to DOM node (avoids JS wrapper). - */ -Toolbar.prototype.addClickHandler = function(elt, funct) -{ - if (funct != null) - { - mxEvent.addListener(elt, 'click', function(evt) - { - if (elt.enabled) - { - funct(evt); - } - - mxEvent.consume(evt); - }); - } -}; - -/** - * Creates and returns a new button. - */ -Toolbar.prototype.createButton = function(classname) -{ - var elt = document.createElement('a'); - elt.setAttribute('href', 'javascript:void(0);'); - elt.className = 'geButton'; - - var inner = document.createElement('div'); - inner.className = 'geSprite ' + classname; - elt.appendChild(inner); - - return elt; -}; - -/** - * Creates and returns a new button. - */ -Toolbar.prototype.createLabel = function(label, tooltip) -{ - var elt = document.createElement('a'); - elt.setAttribute('href', 'javascript:void(0);'); - elt.className = 'geLabel'; - mxUtils.write(elt, label); - - return elt; -}; - -/** - * Adds a handler for showing a menu in the given element. - */ -Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll) -{ - if (funct != null) - { - var graph = this.editorUi.editor.graph; - var menu = null; - - mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt) - { - if (elt.enabled == null || elt.enabled) - { - graph.panningHandler.hideMenu(); - menu = new mxPopupMenu(funct); - menu.div.className += ' geToolbarMenu'; - menu.showDisabled = showAll; - menu.labels = showLabels; - menu.autoExpand = true; - - menu.popup(elt.offsetLeft, elt.offsetTop + elt.offsetHeight + 34, null, evt); - this.currentMenu = menu; - } - - mxEvent.consume(evt); - })); - } -}; +var _0x2193=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x69\x6E\x69\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x62\x69\x6E\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x61\x76\x65","\x70\x75\x62\x6C\x69\x73\x68","\x2D","\x70\x72\x69\x6E\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x6F\x70\x79","\x63\x75\x74","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x61\x64\x64\x49\x74\x65\x6D\x73","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x67\x65\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x73\x74\x79\x6C\x65","\x6E\x6F\x77\x72\x61\x70","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x77\x69\x64\x74\x68","\x37\x30\x70\x78","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x31\x32","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x33\x30\x70\x78","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2E\x2E\x2E","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x6E\x75\x73","\x66\x75\x6E\x63\x74","\x61\x64\x64\x4D\x65\x6E\x75\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x72\x65\x61\x74\x65\x4C\x61\x62\x65\x6C","\x63\x72\x65\x61\x74\x65\x42\x75\x74\x74\x6F\x6E","\x69\x6E\x69\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x67\x65\x53\x70\x72\x69\x74\x65\x2D","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x64\x64\x49\x74\x65\x6D","\x61\x63\x74\x69\x6F\x6E\x73","\x6C\x61\x62\x65\x6C","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x61\x64\x64\x45\x64\x67\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x69\x73\x45\x64\x67\x65","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x74\x69\x74\x6C\x65","\x61\x64\x64\x45\x6E\x61\x62\x6C\x65\x64\x53\x74\x61\x74\x65","\x20\x67\x65\x44\x69\x73\x61\x62\x6C\x65\x64","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x42\x75\x74\x74\x6F\x6E","\x67\x65\x53\x70\x72\x69\x74\x65\x20","\x67\x65\x4C\x61\x62\x65\x6C","\x77\x72\x69\x74\x65","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x20\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x4D\x65\x6E\x75","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x6C\x61\x62\x65\x6C\x73","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70"];function Toolbar(_0x5af2x2,_0x5af2x3){this[_0x2193[0]]= _0x5af2x2;this[_0x2193[1]]= _0x5af2x3;this[_0x2193[2]]();mxEvent[_0x2193[5]](document,mxUtils[_0x2193[4]](this,function(_0x5af2x4){this[_0x2193[3]]()}))}Toolbar[_0x2193[6]][_0x2193[2]]= function(){this[_0x2193[21]]([_0x2193[7],_0x2193[8],_0x2193[9],_0x2193[10],_0x2193[11],_0x2193[12],_0x2193[9],_0x2193[13],_0x2193[14],_0x2193[15],_0x2193[16],_0x2193[9],_0x2193[17],_0x2193[9],_0x2193[18],_0x2193[19],_0x2193[20],_0x2193[9]]);var _0x5af2x5=this[_0x2193[25]](_0x2193[22],mxResources[_0x2193[24]](_0x2193[23]),true,_0x2193[23]);_0x5af2x5[_0x2193[27]][_0x2193[26]]= _0x2193[28];_0x5af2x5[_0x2193[27]][_0x2193[29]]= _0x2193[30];_0x5af2x5[_0x2193[27]][_0x2193[31]]= _0x2193[32];this[_0x2193[33]]();var _0x5af2x6=this[_0x2193[25]](_0x2193[34],mxResources[_0x2193[24]](_0x2193[35]),true,_0x2193[35]);_0x5af2x6[_0x2193[27]][_0x2193[26]]= _0x2193[28];_0x5af2x6[_0x2193[27]][_0x2193[29]]= _0x2193[30];_0x5af2x6[_0x2193[27]][_0x2193[31]]= _0x2193[36];this[_0x2193[21]]([_0x2193[9],_0x2193[37],_0x2193[38],_0x2193[39]]);var _0x5af2x7=this[_0x2193[0]][_0x2193[41]][_0x2193[40]];var _0x5af2x8=mxUtils[_0x2193[4]](this,function(){var _0x5af2x9=_0x2193[22];var _0x5af2xa=_0x2193[34];var _0x5af2xb=_0x5af2x7[_0x2193[44]]()[_0x2193[43]](_0x5af2x7[_0x2193[42]]());if(_0x5af2xb!= null){_0x5af2x9= _0x5af2xb[_0x2193[27]][mxConstants[_0x2193[45]]]|| _0x5af2x9;_0x5af2xa= _0x5af2xb[_0x2193[27]][mxConstants[_0x2193[46]]]|| _0x5af2xa;if(_0x5af2x9[_0x2193[47]]> 10){_0x5af2x9= _0x5af2x9[_0x2193[48]](0,8)+ _0x2193[49]};_0x5af2x5[_0x2193[50]]= _0x5af2x9;_0x5af2x6[_0x2193[50]]= _0x5af2xa}});_0x5af2x7[_0x2193[52]]()[_0x2193[51]](mxEvent.CHANGE,_0x5af2x8);_0x5af2x7[_0x2193[53]]()[_0x2193[51]](mxEvent.CHANGE,_0x5af2x8)};Toolbar[_0x2193[6]][_0x2193[3]]= function(){if(this[_0x2193[54]]!= null){this[_0x2193[54]][_0x2193[3]]();this[_0x2193[54]][_0x2193[55]]();this[_0x2193[54]]= null}};Toolbar[_0x2193[6]][_0x2193[25]]= function(_0x5af2xc,_0x5af2xd,_0x5af2xe,_0x5af2xf){var _0x5af2x10=this[_0x2193[0]][_0x2193[56]][_0x2193[24]](_0x5af2xf);var _0x5af2x11=this[_0x2193[58]](_0x5af2xc,_0x5af2xd,_0x5af2xe,_0x5af2x10[_0x2193[57]]);_0x5af2x10[_0x2193[51]](_0x2193[59],function(){_0x5af2x11[_0x2193[61]](_0x5af2x10[_0x2193[60]])});return _0x5af2x11};Toolbar[_0x2193[6]][_0x2193[58]]= function(_0x5af2xc,_0x5af2xd,_0x5af2xe,_0x5af2x12){var _0x5af2x11=(_0x5af2xe)?this[_0x2193[62]](_0x5af2xc):this[_0x2193[63]](_0x5af2xc);this[_0x2193[64]](_0x5af2x11,_0x5af2xd);this[_0x2193[65]](_0x5af2x11,_0x5af2xe,_0x5af2x12);this[_0x2193[1]][_0x2193[66]](_0x5af2x11);return _0x5af2x11};Toolbar[_0x2193[6]][_0x2193[33]]= function(){var _0x5af2x11=document[_0x2193[68]](_0x2193[67]);_0x5af2x11[_0x2193[69]]= _0x2193[70];this[_0x2193[1]][_0x2193[66]](_0x5af2x11);return _0x5af2x11};Toolbar[_0x2193[6]][_0x2193[21]]= function(_0x5af2x13){for(var _0x5af2x14=0;_0x5af2x14< _0x5af2x13[_0x2193[47]];_0x5af2x14++){var _0x5af2x15=_0x5af2x13[_0x5af2x14];if(_0x5af2x15== _0x2193[9]){this[_0x2193[33]]()}else {this[_0x2193[73]](_0x2193[71]+ _0x5af2x15[_0x2193[72]](),_0x5af2x15)}}};Toolbar[_0x2193[6]][_0x2193[73]]= function(_0x5af2x16,_0x5af2x15){var _0x5af2x17=this[_0x2193[0]][_0x2193[74]][_0x2193[24]](_0x5af2x15);var _0x5af2x11=null;if(_0x5af2x17!= null){_0x5af2x11= this[_0x2193[76]](_0x5af2x16,_0x5af2x17[_0x2193[75]],_0x5af2x17[_0x2193[57]]);_0x5af2x11[_0x2193[61]](_0x5af2x17[_0x2193[60]]);_0x5af2x17[_0x2193[51]](_0x2193[59],function(){_0x5af2x11[_0x2193[61]](_0x5af2x17[_0x2193[60]])})};return _0x5af2x11};Toolbar[_0x2193[6]][_0x2193[76]]= function(_0x5af2x18,_0x5af2xd,_0x5af2x12){var _0x5af2x11=this[_0x2193[63]](_0x5af2x18);this[_0x2193[64]](_0x5af2x11,_0x5af2xd);this[_0x2193[77]](_0x5af2x11,_0x5af2x12);this[_0x2193[1]][_0x2193[66]](_0x5af2x11);return _0x5af2x11};Toolbar[_0x2193[6]][_0x2193[78]]= function(_0x5af2x19){var _0x5af2x7=this[_0x2193[0]][_0x2193[41]][_0x2193[40]];var _0x5af2x1a=function(){var _0x5af2x1b=!_0x5af2x7[_0x2193[79]]();for(var _0x5af2x14=0;_0x5af2x14< _0x5af2x19[_0x2193[47]];_0x5af2x14++){_0x5af2x19[_0x5af2x14][_0x2193[61]](_0x5af2x1b)}};_0x5af2x7[_0x2193[52]]()[_0x2193[51]](mxEvent.CHANGE,_0x5af2x1a);_0x5af2x1a()};Toolbar[_0x2193[6]][_0x2193[80]]= function(_0x5af2x19){var _0x5af2x7=this[_0x2193[0]][_0x2193[41]][_0x2193[40]];var _0x5af2x1a=function(){var _0x5af2x1c=false;if(!_0x5af2x7[_0x2193[79]]()){var _0x5af2x1d=_0x5af2x7[_0x2193[81]]();for(var _0x5af2x14=0;_0x5af2x14< _0x5af2x1d[_0x2193[47]];_0x5af2x14++){if(_0x5af2x7[_0x2193[53]]()[_0x2193[82]](_0x5af2x1d[_0x5af2x14])){_0x5af2x1c= true;break}}};for(var _0x5af2x14=0;_0x5af2x14< _0x5af2x19[_0x2193[47]];_0x5af2x14++){_0x5af2x19[_0x5af2x14][_0x2193[61]](_0x5af2x1c)}};_0x5af2x7[_0x2193[52]]()[_0x2193[51]](mxEvent.CHANGE,_0x5af2x1a);_0x5af2x1a()};Toolbar[_0x2193[6]][_0x2193[64]]= function(_0x5af2x11,_0x5af2xd){_0x5af2x11[_0x2193[85]](_0x2193[83],_0x2193[84]);if(_0x5af2xd!= null){_0x5af2x11[_0x2193[85]](_0x2193[86],_0x5af2xd)};this[_0x2193[87]](_0x5af2x11)};Toolbar[_0x2193[6]][_0x2193[87]]= function(_0x5af2x11){var _0x5af2x18=_0x5af2x11[_0x2193[69]];_0x5af2x11[_0x2193[61]]= function(_0x5af2x1e){_0x5af2x11[_0x2193[60]]= _0x5af2x1e;if(_0x5af2x1e){_0x5af2x11[_0x2193[69]]= _0x5af2x18}else {_0x5af2x11[_0x2193[69]]= _0x5af2x18+ _0x2193[88]}};_0x5af2x11[_0x2193[61]](true)};Toolbar[_0x2193[6]][_0x2193[77]]= function(_0x5af2x11,_0x5af2x12){if(_0x5af2x12!= null){mxEvent[_0x2193[51]](_0x5af2x11,_0x2193[89],function(_0x5af2x4){if(_0x5af2x11[_0x2193[60]]){_0x5af2x12(_0x5af2x4)};mxEvent[_0x2193[90]](_0x5af2x4)})}};Toolbar[_0x2193[6]][_0x2193[63]]= function(_0x5af2x18){var _0x5af2x11=document[_0x2193[68]](_0x2193[91]);_0x5af2x11[_0x2193[85]](_0x2193[92],_0x2193[93]);_0x5af2x11[_0x2193[69]]= _0x2193[94];var _0x5af2x1f=document[_0x2193[68]](_0x2193[67]);_0x5af2x1f[_0x2193[69]]= _0x2193[95]+ _0x5af2x18;_0x5af2x11[_0x2193[66]](_0x5af2x1f);return _0x5af2x11};Toolbar[_0x2193[6]][_0x2193[62]]= function(_0x5af2xc,_0x5af2xd){var _0x5af2x11=document[_0x2193[68]](_0x2193[91]);_0x5af2x11[_0x2193[85]](_0x2193[92],_0x2193[93]);_0x5af2x11[_0x2193[69]]= _0x2193[96];mxUtils[_0x2193[97]](_0x5af2x11,_0x5af2xc);return _0x5af2x11};Toolbar[_0x2193[6]][_0x2193[65]]= function(_0x5af2x11,_0x5af2xe,_0x5af2x12,_0x5af2x20){if(_0x5af2x12!= null){var _0x5af2x7=this[_0x2193[0]][_0x2193[41]][_0x2193[40]];var _0x5af2x10=null;mxEvent[_0x2193[51]](_0x5af2x11,_0x2193[89],mxUtils[_0x2193[4]](this,function(_0x5af2x4){if(_0x5af2x11[_0x2193[60]]== null|| _0x5af2x11[_0x2193[60]]){_0x5af2x7[_0x2193[98]][_0x2193[3]]();_0x5af2x10= new mxPopupMenu(_0x5af2x12);_0x5af2x10[_0x2193[67]][_0x2193[69]]+= _0x2193[99];_0x5af2x10[_0x2193[100]]= _0x5af2x20;_0x5af2x10[_0x2193[101]]= _0x5af2xe;_0x5af2x10[_0x2193[102]]= true;_0x5af2x10[_0x2193[106]](_0x5af2x11[_0x2193[103]],_0x5af2x11[_0x2193[104]]+ _0x5af2x11[_0x2193[105]]+ 34,null,_0x5af2x4);this[_0x2193[54]]= _0x5af2x10};mxEvent[_0x2193[90]](_0x5af2x4)}))}} \ No newline at end of file diff --git a/public/assets/plugins/jscripty/js/custom.js b/public/assets/plugins/jscripty/js/custom.js index a53e30b..490420c 100644 --- a/public/assets/plugins/jscripty/js/custom.js +++ b/public/assets/plugins/jscripty/js/custom.js @@ -1,283 +1 @@ -var urlParams = (function(url) { - var result = new Object(); - var idx = url.lastIndexOf('?'); - - if (idx > 0) { - var params = url.substring(idx + 1).split('&'); - - for (var i = 0; i < params.length; i++) { - idx = params[i].indexOf('='); - - if (idx > 0) { - result[params[i].substring(0, idx)] = params[i].substring(idx + 1); - } - } - } - - return result; -})(window.location.href); - -var t0 = new Date(); - -// Public global variables -var MAX_REQUEST_SIZE = 10485760; -var MAX_WIDTH = 12000; -var MAX_HEIGHT = 12000; - -// CUSTOM_PARAMETERS - URLs for save and export -var EXPORT_URL = 'http://exp.draw.io/ImageExport2/export'; -var SHARE_HOST = 'http://localhost:3000'; - -var SAVE_URL = 'api/jscripty/projects/'; -var VARIABLE_URL = 'api/square/variables/'; - -// Paths and files -var STENCIL_PATH = '/assets/plugins/jscripty/stencils'; -var SHAPES_PATH = '/assets/plugins/mxgraph/shapes'; -var IMAGE_PATH = '/assets/plugins/mxgraph/images'; -// Path for images inside the diagram -//var GRAPH_IMAGE_PATH = 'assets/plugins/mxgraph/img'; -//var ICONFINDER_PATH = 'iconfinder'; -var STYLE_PATH = '/assets/plugins/mxgraph/styles'; -var CSS_PATH = '/assets/plugins/mxgraph/styles'; -var OPEN_FORM = 'api/jscripty/projects/open'; -var TEMPLATE_PATH = '/assets/plugins/jscripty/templates'; - -// Directory for i18 files and basename for main i18n file -var RESOURCES_PATH = '/assets/plugins/jscripty/resources'; -var RESOURCE_BASE = RESOURCES_PATH + '/dia'; - -// Specifies connection mode for touch devices (at least one should be true) -var tapAndHoldStartsConnection = true; -var showConnectorImg = true; - -var mxLoadResources = false; -// var mxLanguage = ''; -console.log('custom', localStorage.getItem("NG_TRANSLATE_LANG_KEY")); -switch (localStorage.getItem("NG_TRANSLATE_LANG_KEY")) { - case 'en_EN': - mxLanguage = 'en'; - break; - case 'it': - mxLanguage = 'it'; - break; - default: - mxLanguage = 'it'; -} -console.log('mxLanguage', mxLanguage); - -var mxLanguages = ['ar', 'bs', 'cs', 'da', 'de', 'el', 'es', 'es-ar', 'fr', - 'hu', 'id', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt-br', 'pt', 'ro', 'ru', - 'sr', 'sv', 'th', 'tr', 'uk', 'zh' -]; -var mxBasePath = 'assets/plugins/mxgraph'; -var geBasePath = 'assets/plugins/mxgraph/js'; - -var ISPEECHLANG = { - usenglishfemale: "US English Female", - usenglishmale: "US English Male", - ukenglishfemale: "UK English Female", - ukenglishmale: "UK English Male", - auenglishfemale: "Australian English", - usspanishfemale: "US Spanish Female", - usspanishmale: "US Spanish Male", - chchinesefemale: "Chinese Female", - chchinesemale: "Chinese Male", - hkchinesefemale: "Hong Kong Cantonese Female", - twchinesefemale: "Taiwan Chinese Female", - jpjapanesefemale: "Japanese Female", - jpjapanesemale: "Japanese Male", - krkoreanfemale: "Korean Female", - krkoreanmale: "Korean Male", - caenglishfemale: "Canadian English Female", - huhungarianfemale: "Hungarian Female", - brportuguesefemale: "Brazilian Portuguese Female", - eurportuguesefemale: "European Portuguese Female", - eurportuguesemale: "European Portuguese Male", - eurspanishfemale: "European Spanish Female", - eurspanishmale: "European Spanish Male", - eurcatalanfemale: "European Catalan Female", - eurczechfemale: "European Czech Female", - eurdanishfemale: "European Danish Female", - eurfinnishfemale: "European Finnish Female", - eurfrenchfemale: "European French Female", - eurfrenchmale: "European French Male", - eurnorwegianfemale: "European Norwegian Female", - eurdutchfemale: "European Dutch Female", - eurpolishfemale: "European Polish Female", - euritalianfemale: "European Italian Female", - eurturkishfemale: "European Turkish Female ", - eurturkishmale: "European Turkish Male", - eurgermanfemale: "European German Female", - eurgermanmale: "European German Male", - rurussianfemale: "Russian Female", - rurussianmale: "Russian Male", - swswedishfemale: "Swedish Female", - cafrenchfemale: "Canadian French Female", - cafrenchmale: "Canadian French Male" -}; - -var ISPEECHASRLANG = { - "en-US": "English (US)", - "en-CA": "English (Canada)", - "en-GB": "English (UK)", - "en-AU": "English (Australia)", - "es-ES": "Spanish (Spain)", - "es-MX": "Spanish (Mexico)", - "it-IT": "Italian (Italy) / Finnish (Finland)", - "fr-FR": "French (France)", - "fr-CA": "French (Canada)", - "pl-PL": "Polish (Poland)", - "pt-PT": "Portuguese (Portugal)", - "ca-ES": "Catalan (Catalan)", - "zh-TW": "Chinese (Taiwan)", - "da-DK": "Danish (Denmark)", - "fr-FR": "German (Germany)", - "ja-JP": "Japanese (Japan)", - "ko-KR": "Korean (Korea)", - "nl-NL": "Dutch (Netherlands)", - "nb-NO": "Norwegian (Norway)", - "pt-BR": "Portuguese (Brazil)", - "ru-RU": "Russian (Russia)", - "sv-SE": "Swedish (Sweden)", - "zh-CN": "Chinese (China)", - "zh-HK": "Chinese (Hong Kong)" -}; - -var ISPEECHASRMODEL = { - 0: "Default", - date: "Date", - usmoney: "US Money", - numbersto9: "Numbers to 9", - numbersto99: "Numbers to 99", - numbersto999: "Numbers to 999", - time: "Time", - phonenumber: "Phone number", - streets: "Streets", - citystate: "US City/States" -}; - -var GOOGLETTSLANG = { - "af": "Afrikaans", - "sq": "Albanian", - "am": "Amharic", - "ar": "Arabic", - "hy": "Armenian", - "az": "Azerbaijani", - "eu": "Basque", - "be": "Belarusian", - "bn": "Bengali", - "bh": "Bihari", - "bs": "Bosnian", - "br": "Breton", - "bg": "Bulgarian", - "km": "Cambodian", - "ca": "Catalan", - "zh-CN": "Chinese (Simplified)", - "zh-TW": "Chinese (Traditional)", - "co": "Corsican", - "hr": "Croatian", - "cs": "Czech", - "da": "Danish", - "nl": "Dutch", - "en": "English", - "eo": "Esperanto", - "et": "Estonian", - "fo": "Faroese", - "tl": "Filipino", - "fi": "Finnish", - "fr": "French", - "fy": "Frisian", - "gl": "Galician", - "ka": "Georgian", - "de": "German", - "el": "Greek", - "gn": "Guarani", - "gu": "Gujarati", - "xx-hacker": "Hacker", - "ha": "Hausa", - "iw": "Hebrew", - "hi": "Hindi", - "hu": "Hungarian", - "is": "Icelandic", - "id": "Indonesian", - "ia": "Interlingua", - "ga": "Irish", - "it": "Italian", - "jw": "Javanese", - "ja": "Japanese", - "kn": "Kannada", - "kk": "Kazakh", - "rw": "Kinyarwanda", - "rn": "Kirundi", - "xx-klingon": "Klingon", - "ku": "Kurdish", - "ko": "Korean", - "ky": "Kyrgyz", - "lo": "Laothian", - "la": "Latin", - "lv": "Latvian", - "ln": "Lingala", - "lt": "Lithuanian", - "mk": "Macedonian", - "mg": "Malagasy", - "ms": "Malay", - "ml": "Malayalam", - "mt": "Maltese", - "mi": "Maori", - "mr": "Marathi", - "mo": "Moldavian", - "mn": "Mongolian", - "sr-ME": "Montenegrin", - "ne": "Nepali", - "no": "Norwegian", - "nn": "Norwegian (Nynorsk)", - "oc": "Occitan", - "or": "Oriya", - "om": "Oromo", - "ps": "Pashto", - "fa": "Persian", - "xx-pirate": "Pirate", - "pl": "Polish", - "pt-BR": "Portuguese (Brazil)", - "pt-PT": "Portuguese (Portugal)", - "pa": "Punjabi", - "qu": "Quechua", - "ro": "Romanian", - "rm": "Romansh", - "ru": "Russian", - "gd": "Scots Gaelic", - "sr": "Serbian", - "sh": "Serbo-Croatian", - "st": "Sesotho", - "sn": "Shona", - "sd": "Sindhi", - "si": "Sinhalese", - "sk": "Slovak", - "sl": "Slovenian", - "so": "Somali", - "es": "Spanish", - "su": "Sundanese", - "sw": "Swahili", - "sv": "Swedish", - "tg": "Tajik", - "ta": "Tamil", - "tt": "Tatar", - "te": "Telugu", - "th": "Thai", - "ti": "Tigrinya", - "to": "Tonga", - "tr": "Turkish", - "tk": "Turkmen", - "tw": "Twi", - "ug": "Uighur", - "uk": "Ukrainian", - "ur": "Urdu", - "uz": "Uzbek", - "vi": "Vietnamese", - "cy": "Welsh", - "xh": "Xhosa", - "yi": "Yiddish", - "yo": "Yoruba", - "zu": "Zulu" -}; +var _0x4f63=["\x68\x72\x65\x66","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x26","\x73\x70\x6C\x69\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x3D","\x69\x6E\x64\x65\x78\x4F\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x65\x78\x70\x2E\x64\x72\x61\x77\x2E\x69\x6F\x2F\x49\x6D\x61\x67\x65\x45\x78\x70\x6F\x72\x74\x32\x2F\x65\x78\x70\x6F\x72\x74","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x33\x30\x30\x30","\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F","\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x2F","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x73\x68\x61\x70\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x69\x6D\x61\x67\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x73\x74\x79\x6C\x65\x73","\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6F\x70\x65\x6E","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73","\x2F\x64\x69\x61","\x63\x75\x73\x74\x6F\x6D","\x4E\x47\x5F\x54\x52\x41\x4E\x53\x4C\x41\x54\x45\x5F\x4C\x41\x4E\x47\x5F\x4B\x45\x59","\x67\x65\x74\x49\x74\x65\x6D","\x6C\x6F\x67","\x65\x6E","\x65\x6E\x5F\x45\x4E","\x69\x74","\x6D\x78\x4C\x61\x6E\x67\x75\x61\x67\x65","\x61\x72","\x62\x73","\x63\x73","\x64\x61","\x64\x65","\x65\x6C","\x65\x73","\x65\x73\x2D\x61\x72","\x66\x72","\x68\x75","\x69\x64","\x6A\x61","\x6B\x6F","\x6E\x6C","\x6E\x6F","\x70\x6C","\x70\x74\x2D\x62\x72","\x70\x74","\x72\x6F","\x72\x75","\x73\x72","\x73\x76","\x74\x68","\x74\x72","\x75\x6B","\x7A\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x6A\x73","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x20\x43\x61\x6E\x74\x6F\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x54\x61\x69\x77\x61\x6E\x20\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x4D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x42\x72\x61\x7A\x69\x6C\x69\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x61\x74\x61\x6C\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x7A\x65\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x75\x74\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x49\x74\x61\x6C\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65\x09","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x4D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x4D\x61\x6C\x65","\x53\x77\x65\x64\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x53\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x4B\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x53\x70\x61\x69\x6E\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x4D\x65\x78\x69\x63\x6F\x29","\x49\x74\x61\x6C\x69\x61\x6E\x20\x28\x49\x74\x61\x6C\x79\x29\x20\x2F\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x28\x46\x69\x6E\x6C\x61\x6E\x64\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x46\x72\x61\x6E\x63\x65\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x50\x6F\x6C\x69\x73\x68\x20\x28\x50\x6F\x6C\x61\x6E\x64\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x50\x6F\x72\x74\x75\x67\x61\x6C\x29","\x43\x61\x74\x61\x6C\x61\x6E\x20\x28\x43\x61\x74\x61\x6C\x61\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x61\x69\x77\x61\x6E\x29","\x44\x61\x6E\x69\x73\x68\x20\x28\x44\x65\x6E\x6D\x61\x72\x6B\x29","\x47\x65\x72\x6D\x61\x6E\x20\x28\x47\x65\x72\x6D\x61\x6E\x79\x29","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x28\x4A\x61\x70\x61\x6E\x29","\x4B\x6F\x72\x65\x61\x6E\x20\x28\x4B\x6F\x72\x65\x61\x29","\x44\x75\x74\x63\x68\x20\x28\x4E\x65\x74\x68\x65\x72\x6C\x61\x6E\x64\x73\x29","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x6F\x72\x77\x61\x79\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x42\x72\x61\x7A\x69\x6C\x29","\x52\x75\x73\x73\x69\x61\x6E\x20\x28\x52\x75\x73\x73\x69\x61\x29","\x53\x77\x65\x64\x69\x73\x68\x20\x28\x53\x77\x65\x64\x65\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x43\x68\x69\x6E\x61\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x29","\x44\x65\x66\x61\x75\x6C\x74","\x44\x61\x74\x65","\x55\x53\x20\x4D\x6F\x6E\x65\x79","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39\x39","\x54\x69\x6D\x65","\x50\x68\x6F\x6E\x65\x20\x6E\x75\x6D\x62\x65\x72","\x53\x74\x72\x65\x65\x74\x73","\x55\x53\x20\x43\x69\x74\x79\x2F\x53\x74\x61\x74\x65\x73","\x41\x66\x72\x69\x6B\x61\x61\x6E\x73","\x41\x6C\x62\x61\x6E\x69\x61\x6E","\x41\x6D\x68\x61\x72\x69\x63","\x41\x72\x61\x62\x69\x63","\x41\x72\x6D\x65\x6E\x69\x61\x6E","\x41\x7A\x65\x72\x62\x61\x69\x6A\x61\x6E\x69","\x42\x61\x73\x71\x75\x65","\x42\x65\x6C\x61\x72\x75\x73\x69\x61\x6E","\x42\x65\x6E\x67\x61\x6C\x69","\x42\x69\x68\x61\x72\x69","\x42\x6F\x73\x6E\x69\x61\x6E","\x42\x72\x65\x74\x6F\x6E","\x42\x75\x6C\x67\x61\x72\x69\x61\x6E","\x43\x61\x6D\x62\x6F\x64\x69\x61\x6E","\x43\x61\x74\x61\x6C\x61\x6E","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x53\x69\x6D\x70\x6C\x69\x66\x69\x65\x64\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x72\x61\x64\x69\x74\x69\x6F\x6E\x61\x6C\x29","\x43\x6F\x72\x73\x69\x63\x61\x6E","\x43\x72\x6F\x61\x74\x69\x61\x6E","\x43\x7A\x65\x63\x68","\x44\x61\x6E\x69\x73\x68","\x44\x75\x74\x63\x68","\x45\x6E\x67\x6C\x69\x73\x68","\x45\x73\x70\x65\x72\x61\x6E\x74\x6F","\x45\x73\x74\x6F\x6E\x69\x61\x6E","\x46\x61\x72\x6F\x65\x73\x65","\x46\x69\x6C\x69\x70\x69\x6E\x6F","\x46\x69\x6E\x6E\x69\x73\x68","\x46\x72\x65\x6E\x63\x68","\x46\x72\x69\x73\x69\x61\x6E","\x47\x61\x6C\x69\x63\x69\x61\x6E","\x47\x65\x6F\x72\x67\x69\x61\x6E","\x47\x65\x72\x6D\x61\x6E","\x47\x72\x65\x65\x6B","\x47\x75\x61\x72\x61\x6E\x69","\x47\x75\x6A\x61\x72\x61\x74\x69","\x48\x61\x63\x6B\x65\x72","\x48\x61\x75\x73\x61","\x48\x65\x62\x72\x65\x77","\x48\x69\x6E\x64\x69","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E","\x49\x63\x65\x6C\x61\x6E\x64\x69\x63","\x49\x6E\x64\x6F\x6E\x65\x73\x69\x61\x6E","\x49\x6E\x74\x65\x72\x6C\x69\x6E\x67\x75\x61","\x49\x72\x69\x73\x68","\x49\x74\x61\x6C\x69\x61\x6E","\x4A\x61\x76\x61\x6E\x65\x73\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65","\x4B\x61\x6E\x6E\x61\x64\x61","\x4B\x61\x7A\x61\x6B\x68","\x4B\x69\x6E\x79\x61\x72\x77\x61\x6E\x64\x61","\x4B\x69\x72\x75\x6E\x64\x69","\x4B\x6C\x69\x6E\x67\x6F\x6E","\x4B\x75\x72\x64\x69\x73\x68","\x4B\x6F\x72\x65\x61\x6E","\x4B\x79\x72\x67\x79\x7A","\x4C\x61\x6F\x74\x68\x69\x61\x6E","\x4C\x61\x74\x69\x6E","\x4C\x61\x74\x76\x69\x61\x6E","\x4C\x69\x6E\x67\x61\x6C\x61","\x4C\x69\x74\x68\x75\x61\x6E\x69\x61\x6E","\x4D\x61\x63\x65\x64\x6F\x6E\x69\x61\x6E","\x4D\x61\x6C\x61\x67\x61\x73\x79","\x4D\x61\x6C\x61\x79","\x4D\x61\x6C\x61\x79\x61\x6C\x61\x6D","\x4D\x61\x6C\x74\x65\x73\x65","\x4D\x61\x6F\x72\x69","\x4D\x61\x72\x61\x74\x68\x69","\x4D\x6F\x6C\x64\x61\x76\x69\x61\x6E","\x4D\x6F\x6E\x67\x6F\x6C\x69\x61\x6E","\x4D\x6F\x6E\x74\x65\x6E\x65\x67\x72\x69\x6E","\x4E\x65\x70\x61\x6C\x69","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x79\x6E\x6F\x72\x73\x6B\x29","\x4F\x63\x63\x69\x74\x61\x6E","\x4F\x72\x69\x79\x61","\x4F\x72\x6F\x6D\x6F","\x50\x61\x73\x68\x74\x6F","\x50\x65\x72\x73\x69\x61\x6E","\x50\x69\x72\x61\x74\x65","\x50\x6F\x6C\x69\x73\x68","\x50\x75\x6E\x6A\x61\x62\x69","\x51\x75\x65\x63\x68\x75\x61","\x52\x6F\x6D\x61\x6E\x69\x61\x6E","\x52\x6F\x6D\x61\x6E\x73\x68","\x52\x75\x73\x73\x69\x61\x6E","\x53\x63\x6F\x74\x73\x20\x47\x61\x65\x6C\x69\x63","\x53\x65\x72\x62\x69\x61\x6E","\x53\x65\x72\x62\x6F\x2D\x43\x72\x6F\x61\x74\x69\x61\x6E","\x53\x65\x73\x6F\x74\x68\x6F","\x53\x68\x6F\x6E\x61","\x53\x69\x6E\x64\x68\x69","\x53\x69\x6E\x68\x61\x6C\x65\x73\x65","\x53\x6C\x6F\x76\x61\x6B","\x53\x6C\x6F\x76\x65\x6E\x69\x61\x6E","\x53\x6F\x6D\x61\x6C\x69","\x53\x70\x61\x6E\x69\x73\x68","\x53\x75\x6E\x64\x61\x6E\x65\x73\x65","\x53\x77\x61\x68\x69\x6C\x69","\x53\x77\x65\x64\x69\x73\x68","\x54\x61\x6A\x69\x6B","\x54\x61\x6D\x69\x6C","\x54\x61\x74\x61\x72","\x54\x65\x6C\x75\x67\x75","\x54\x68\x61\x69","\x54\x69\x67\x72\x69\x6E\x79\x61","\x54\x6F\x6E\x67\x61","\x54\x75\x72\x6B\x69\x73\x68","\x54\x75\x72\x6B\x6D\x65\x6E","\x54\x77\x69","\x55\x69\x67\x68\x75\x72","\x55\x6B\x72\x61\x69\x6E\x69\x61\x6E","\x55\x72\x64\x75","\x55\x7A\x62\x65\x6B","\x56\x69\x65\x74\x6E\x61\x6D\x65\x73\x65","\x57\x65\x6C\x73\x68","\x58\x68\x6F\x73\x61","\x59\x69\x64\x64\x69\x73\x68","\x59\x6F\x72\x75\x62\x61","\x5A\x75\x6C\x75"];var urlParams=(function(_0x1d75x2){var _0x1d75x3= new Object();var _0x1d75x4=_0x1d75x2[_0x4f63[3]](_0x4f63[2]);if(_0x1d75x4> 0){var _0x1d75x5=_0x1d75x2[_0x4f63[6]](_0x1d75x4+ 1)[_0x4f63[5]](_0x4f63[4]);for(var _0x1d75x6=0;_0x1d75x6< _0x1d75x5[_0x4f63[7]];_0x1d75x6++){_0x1d75x4= _0x1d75x5[_0x1d75x6][_0x4f63[9]](_0x4f63[8]);if(_0x1d75x4> 0){_0x1d75x3[_0x1d75x5[_0x1d75x6][_0x4f63[6]](0,_0x1d75x4)]= _0x1d75x5[_0x1d75x6][_0x4f63[6]](_0x1d75x4+ 1)}}};return _0x1d75x3})(window[_0x4f63[1]][_0x4f63[0]]);var t0= new Date();var MAX_REQUEST_SIZE=10485760;var MAX_WIDTH=12000;var MAX_HEIGHT=12000;var EXPORT_URL=_0x4f63[10];var SHARE_HOST=_0x4f63[11];var SAVE_URL=_0x4f63[12];var VARIABLE_URL=_0x4f63[13];var STENCIL_PATH=_0x4f63[14];var SHAPES_PATH=_0x4f63[15];var IMAGE_PATH=_0x4f63[16];var STYLE_PATH=_0x4f63[17];var CSS_PATH=_0x4f63[17];var OPEN_FORM=_0x4f63[18];var TEMPLATE_PATH=_0x4f63[19];var RESOURCES_PATH=_0x4f63[20];var RESOURCE_BASE=RESOURCES_PATH+ _0x4f63[21];var tapAndHoldStartsConnection=true;var showConnectorImg=true;var mxLoadResources=false;console[_0x4f63[25]](_0x4f63[22],localStorage[_0x4f63[24]](_0x4f63[23]));switch(localStorage[_0x4f63[24]](_0x4f63[23])){case _0x4f63[27]:mxLanguage= _0x4f63[26];break;case _0x4f63[28]:mxLanguage= _0x4f63[28];break;default:mxLanguage= _0x4f63[28]};console[_0x4f63[25]](_0x4f63[29],mxLanguage);var mxLanguages=[_0x4f63[30],_0x4f63[31],_0x4f63[32],_0x4f63[33],_0x4f63[34],_0x4f63[35],_0x4f63[36],_0x4f63[37],_0x4f63[38],_0x4f63[39],_0x4f63[40],_0x4f63[28],_0x4f63[41],_0x4f63[42],_0x4f63[43],_0x4f63[44],_0x4f63[45],_0x4f63[46],_0x4f63[47],_0x4f63[48],_0x4f63[49],_0x4f63[50],_0x4f63[51],_0x4f63[52],_0x4f63[53],_0x4f63[54],_0x4f63[55]];var mxBasePath=_0x4f63[56];var geBasePath=_0x4f63[57];var ISPEECHLANG={usenglishfemale:_0x4f63[58],usenglishmale:_0x4f63[59],ukenglishfemale:_0x4f63[60],ukenglishmale:_0x4f63[61],auenglishfemale:_0x4f63[62],usspanishfemale:_0x4f63[63],usspanishmale:_0x4f63[64],chchinesefemale:_0x4f63[65],chchinesemale:_0x4f63[66],hkchinesefemale:_0x4f63[67],twchinesefemale:_0x4f63[68],jpjapanesefemale:_0x4f63[69],jpjapanesemale:_0x4f63[70],krkoreanfemale:_0x4f63[71],krkoreanmale:_0x4f63[72],caenglishfemale:_0x4f63[73],huhungarianfemale:_0x4f63[74],brportuguesefemale:_0x4f63[75],eurportuguesefemale:_0x4f63[76],eurportuguesemale:_0x4f63[77],eurspanishfemale:_0x4f63[78],eurspanishmale:_0x4f63[79],eurcatalanfemale:_0x4f63[80],eurczechfemale:_0x4f63[81],eurdanishfemale:_0x4f63[82],eurfinnishfemale:_0x4f63[83],eurfrenchfemale:_0x4f63[84],eurfrenchmale:_0x4f63[85],eurnorwegianfemale:_0x4f63[86],eurdutchfemale:_0x4f63[87],eurpolishfemale:_0x4f63[88],euritalianfemale:_0x4f63[89],eurturkishfemale:_0x4f63[90],eurturkishmale:_0x4f63[91],eurgermanfemale:_0x4f63[92],eurgermanmale:_0x4f63[93],rurussianfemale:_0x4f63[94],rurussianmale:_0x4f63[95],swswedishfemale:_0x4f63[96],cafrenchfemale:_0x4f63[97],cafrenchmale:_0x4f63[98]};var ISPEECHASRLANG={"\x65\x6E\x2D\x55\x53":_0x4f63[99],"\x65\x6E\x2D\x43\x41":_0x4f63[100],"\x65\x6E\x2D\x47\x42":_0x4f63[101],"\x65\x6E\x2D\x41\x55":_0x4f63[102],"\x65\x73\x2D\x45\x53":_0x4f63[103],"\x65\x73\x2D\x4D\x58":_0x4f63[104],"\x69\x74\x2D\x49\x54":_0x4f63[105],"\x66\x72\x2D\x46\x52":_0x4f63[106],"\x66\x72\x2D\x43\x41":_0x4f63[107],"\x70\x6C\x2D\x50\x4C":_0x4f63[108],"\x70\x74\x2D\x50\x54":_0x4f63[109],"\x63\x61\x2D\x45\x53":_0x4f63[110],"\x7A\x68\x2D\x54\x57":_0x4f63[111],"\x64\x61\x2D\x44\x4B":_0x4f63[112],"\x66\x72\x2D\x46\x52":_0x4f63[113],"\x6A\x61\x2D\x4A\x50":_0x4f63[114],"\x6B\x6F\x2D\x4B\x52":_0x4f63[115],"\x6E\x6C\x2D\x4E\x4C":_0x4f63[116],"\x6E\x62\x2D\x4E\x4F":_0x4f63[117],"\x70\x74\x2D\x42\x52":_0x4f63[118],"\x72\x75\x2D\x52\x55":_0x4f63[119],"\x73\x76\x2D\x53\x45":_0x4f63[120],"\x7A\x68\x2D\x43\x4E":_0x4f63[121],"\x7A\x68\x2D\x48\x4B":_0x4f63[122]};var ISPEECHASRMODEL={0:_0x4f63[123],date:_0x4f63[124],usmoney:_0x4f63[125],numbersto9:_0x4f63[126],numbersto99:_0x4f63[127],numbersto999:_0x4f63[128],time:_0x4f63[129],phonenumber:_0x4f63[130],streets:_0x4f63[131],citystate:_0x4f63[132]};var GOOGLETTSLANG={"\x61\x66":_0x4f63[133],"\x73\x71":_0x4f63[134],"\x61\x6D":_0x4f63[135],"\x61\x72":_0x4f63[136],"\x68\x79":_0x4f63[137],"\x61\x7A":_0x4f63[138],"\x65\x75":_0x4f63[139],"\x62\x65":_0x4f63[140],"\x62\x6E":_0x4f63[141],"\x62\x68":_0x4f63[142],"\x62\x73":_0x4f63[143],"\x62\x72":_0x4f63[144],"\x62\x67":_0x4f63[145],"\x6B\x6D":_0x4f63[146],"\x63\x61":_0x4f63[147],"\x7A\x68\x2D\x43\x4E":_0x4f63[148],"\x7A\x68\x2D\x54\x57":_0x4f63[149],"\x63\x6F":_0x4f63[150],"\x68\x72":_0x4f63[151],"\x63\x73":_0x4f63[152],"\x64\x61":_0x4f63[153],"\x6E\x6C":_0x4f63[154],"\x65\x6E":_0x4f63[155],"\x65\x6F":_0x4f63[156],"\x65\x74":_0x4f63[157],"\x66\x6F":_0x4f63[158],"\x74\x6C":_0x4f63[159],"\x66\x69":_0x4f63[160],"\x66\x72":_0x4f63[161],"\x66\x79":_0x4f63[162],"\x67\x6C":_0x4f63[163],"\x6B\x61":_0x4f63[164],"\x64\x65":_0x4f63[165],"\x65\x6C":_0x4f63[166],"\x67\x6E":_0x4f63[167],"\x67\x75":_0x4f63[168],"\x78\x78\x2D\x68\x61\x63\x6B\x65\x72":_0x4f63[169],"\x68\x61":_0x4f63[170],"\x69\x77":_0x4f63[171],"\x68\x69":_0x4f63[172],"\x68\x75":_0x4f63[173],"\x69\x73":_0x4f63[174],"\x69\x64":_0x4f63[175],"\x69\x61":_0x4f63[176],"\x67\x61":_0x4f63[177],"\x69\x74":_0x4f63[178],"\x6A\x77":_0x4f63[179],"\x6A\x61":_0x4f63[180],"\x6B\x6E":_0x4f63[181],"\x6B\x6B":_0x4f63[182],"\x72\x77":_0x4f63[183],"\x72\x6E":_0x4f63[184],"\x78\x78\x2D\x6B\x6C\x69\x6E\x67\x6F\x6E":_0x4f63[185],"\x6B\x75":_0x4f63[186],"\x6B\x6F":_0x4f63[187],"\x6B\x79":_0x4f63[188],"\x6C\x6F":_0x4f63[189],"\x6C\x61":_0x4f63[190],"\x6C\x76":_0x4f63[191],"\x6C\x6E":_0x4f63[192],"\x6C\x74":_0x4f63[193],"\x6D\x6B":_0x4f63[194],"\x6D\x67":_0x4f63[195],"\x6D\x73":_0x4f63[196],"\x6D\x6C":_0x4f63[197],"\x6D\x74":_0x4f63[198],"\x6D\x69":_0x4f63[199],"\x6D\x72":_0x4f63[200],"\x6D\x6F":_0x4f63[201],"\x6D\x6E":_0x4f63[202],"\x73\x72\x2D\x4D\x45":_0x4f63[203],"\x6E\x65":_0x4f63[204],"\x6E\x6F":_0x4f63[205],"\x6E\x6E":_0x4f63[206],"\x6F\x63":_0x4f63[207],"\x6F\x72":_0x4f63[208],"\x6F\x6D":_0x4f63[209],"\x70\x73":_0x4f63[210],"\x66\x61":_0x4f63[211],"\x78\x78\x2D\x70\x69\x72\x61\x74\x65":_0x4f63[212],"\x70\x6C":_0x4f63[213],"\x70\x74\x2D\x42\x52":_0x4f63[118],"\x70\x74\x2D\x50\x54":_0x4f63[109],"\x70\x61":_0x4f63[214],"\x71\x75":_0x4f63[215],"\x72\x6F":_0x4f63[216],"\x72\x6D":_0x4f63[217],"\x72\x75":_0x4f63[218],"\x67\x64":_0x4f63[219],"\x73\x72":_0x4f63[220],"\x73\x68":_0x4f63[221],"\x73\x74":_0x4f63[222],"\x73\x6E":_0x4f63[223],"\x73\x64":_0x4f63[224],"\x73\x69":_0x4f63[225],"\x73\x6B":_0x4f63[226],"\x73\x6C":_0x4f63[227],"\x73\x6F":_0x4f63[228],"\x65\x73":_0x4f63[229],"\x73\x75":_0x4f63[230],"\x73\x77":_0x4f63[231],"\x73\x76":_0x4f63[232],"\x74\x67":_0x4f63[233],"\x74\x61":_0x4f63[234],"\x74\x74":_0x4f63[235],"\x74\x65":_0x4f63[236],"\x74\x68":_0x4f63[237],"\x74\x69":_0x4f63[238],"\x74\x6F":_0x4f63[239],"\x74\x72":_0x4f63[240],"\x74\x6B":_0x4f63[241],"\x74\x77":_0x4f63[242],"\x75\x67":_0x4f63[243],"\x75\x6B":_0x4f63[244],"\x75\x72":_0x4f63[245],"\x75\x7A":_0x4f63[246],"\x76\x69":_0x4f63[247],"\x63\x79":_0x4f63[248],"\x78\x68":_0x4f63[249],"\x79\x69":_0x4f63[250],"\x79\x6F":_0x4f63[251],"\x7A\x75":_0x4f63[252]} \ No newline at end of file diff --git a/public/assets/plugins/mxgraph/js/mxClient.js b/public/assets/plugins/mxgraph/js/mxClient.js index e795889..166a74b 100644 --- a/public/assets/plugins/mxgraph/js/mxClient.js +++ b/public/assets/plugins/mxgraph/js/mxClient.js @@ -1,18737 +1 @@ -var mxClient = { - VERSION: "2.0.0.0", - IS_IE: 0 <= navigator.userAgent.indexOf("MSIE"), - IS_IE6: 0 <= navigator.userAgent.indexOf("MSIE 6"), - IS_QUIRKS: 0 <= navigator.userAgent.indexOf("MSIE") && (null == document.documentMode || 5 == document.documentMode), - VML_PREFIX: "v", - OFFICE_PREFIX: "o", - IS_NS: 0 <= navigator.userAgent.indexOf("Mozilla/") && 0 > navigator.userAgent.indexOf("MSIE"), - IS_OP: 0 <= navigator.userAgent.indexOf("Opera/"), - IS_OT: 0 > navigator.userAgent.indexOf("Presto/2.4.") && 0 > navigator.userAgent.indexOf("Presto/2.3.") && 0 > navigator.userAgent.indexOf("Presto/2.2.") && - 0 > navigator.userAgent.indexOf("Presto/2.1.") && 0 > navigator.userAgent.indexOf("Presto/2.0.") && 0 > navigator.userAgent.indexOf("Presto/1."), - IS_SF: 0 <= navigator.userAgent.indexOf("AppleWebKit/") && 0 > navigator.userAgent.indexOf("Chrome/"), - IS_GC: 0 <= navigator.userAgent.indexOf("Chrome/"), - IS_MT: 0 <= navigator.userAgent.indexOf("Firefox/") && 0 > navigator.userAgent.indexOf("Firefox/1.") && 0 > navigator.userAgent.indexOf("Firefox/2.") || 0 <= navigator.userAgent.indexOf( - "Iceweasel/") && 0 > navigator.userAgent.indexOf("Iceweasel/1.") && - 0 > navigator.userAgent.indexOf("Iceweasel/2.") || 0 <= navigator.userAgent.indexOf("SeaMonkey/") && 0 > navigator.userAgent.indexOf("SeaMonkey/1.") || 0 <= navigator.userAgent.indexOf( - "Iceape/") && 0 > navigator.userAgent.indexOf("Iceape/1."), - IS_SVG: 0 <= navigator.userAgent.indexOf("Firefox/") || 0 <= navigator.userAgent.indexOf("Iceweasel/") || 0 <= navigator.userAgent.indexOf("Seamonkey/") || 0 <= navigator.userAgent.indexOf( - "Iceape/") || 0 <= navigator.userAgent.indexOf("Galeon/") || 0 <= navigator.userAgent.indexOf("Epiphany/") || 0 <= - navigator.userAgent.indexOf("AppleWebKit/") || 0 <= navigator.userAgent.indexOf("Gecko/") || 0 <= navigator.userAgent.indexOf("Opera/"), - NO_FO: 0 <= navigator.userAgent.indexOf("Firefox/1.") || 0 <= navigator.userAgent.indexOf("Iceweasel/1.") || 0 <= navigator.userAgent.indexOf("Firefox/2.") || 0 <= navigator.userAgent.indexOf( - "Iceweasel/2.") || 0 <= navigator.userAgent.indexOf("SeaMonkey/1.") || 0 <= navigator.userAgent.indexOf("Iceape/1.") || 0 <= navigator.userAgent.indexOf("Camino/1.") || 0 <= navigator.userAgent - .indexOf("Epiphany/2.") || - 0 <= navigator.userAgent.indexOf("Opera/") || 0 <= navigator.userAgent.indexOf("MSIE") || 0 <= navigator.userAgent.indexOf("Mozilla/2."), - IS_VML: "MICROSOFT INTERNET EXPLORER" == navigator.appName.toUpperCase(), - IS_MAC: 0 < navigator.userAgent.toUpperCase().indexOf("MACINTOSH"), - IS_TOUCH: 0 < navigator.userAgent.toUpperCase().indexOf("IPAD") || 0 < navigator.userAgent.toUpperCase().indexOf("IPOD") || 0 < navigator.userAgent.toUpperCase().indexOf("IPHONE") || 0 < - navigator.userAgent.toUpperCase().indexOf("ANDROID"), - IS_LOCAL: 0 > document.location.href.indexOf("http://") && - 0 > document.location.href.indexOf("https://"), - isBrowserSupported: function() { - return mxClient.IS_VML || mxClient.IS_SVG - }, - link: function(a, b, c) { - c = c || document; - if (mxClient.IS_IE6) c.write('\x3clink rel\x3d"' + a + '" href\x3d"' + b + '" charset\x3d"ISO-8859-1" type\x3d"text/css"/\x3e'); - else { - var d = c.createElement("link"); - d.setAttribute("rel", a); - d.setAttribute("href", b); - d.setAttribute("charset", "ISO-8859-1"); - d.setAttribute("type", "text/css"); - c.getElementsByTagName("head")[0].appendChild(d) - } - }, - include: function(a) { - document.write('\x3cscript src\x3d"' + - a + '"\x3e\x3c/script\x3e') - }, - dispose: function() { - for (var a = 0; a < mxEvent.objects.length; a++) null != mxEvent.objects[a].mxListenerList && mxEvent.removeAllListeners(mxEvent.objects[a]) - } -}; -mxClient.IS_OP && mxClient.IS_OT ? mxClient.CSS_PREFIX = "O" : mxClient.IS_SF || mxClient.IS_GC ? mxClient.CSS_PREFIX = "Webkit" : mxClient.IS_MT ? mxClient.CSS_PREFIX = "Moz" : mxClient.IS_IE && 9 <= - document.documentMode && (mxClient.CSS_PREFIX = "ms"); -"undefined" == typeof mxLoadResources && (mxLoadResources = !0); -"undefined" == typeof mxResourceExtension && (mxResourceExtension = ".txt"); -"undefined" == typeof mxLoadStylesheets && (mxLoadStylesheets = !0); -"undefined" != typeof mxBasePath && 0 < mxBasePath.length ? ("/" == mxBasePath.substring(mxBasePath.length - 1) && (mxBasePath = mxBasePath.substring(0, mxBasePath.length - 1)), mxClient.basePath = - mxBasePath) : mxClient.basePath = "."; -"undefined" != typeof mxImageBasePath && 0 < mxImageBasePath.length ? ("/" == mxImageBasePath.substring(mxImageBasePath.length - 1) && (mxImageBasePath = mxImageBasePath.substring(0, mxImageBasePath.length - - 1)), mxClient.imageBasePath = mxImageBasePath) : mxClient.imageBasePath = mxClient.basePath + "/images"; -mxClient.language = "undefined" != typeof mxLanguage ? mxLanguage : mxClient.IS_IE ? navigator.userLanguage : navigator.language; -mxClient.defaultLanguage = "undefined" != typeof mxDefaultLanguage ? mxDefaultLanguage : "en"; -mxLoadStylesheets && mxClient.link("stylesheet", mxClient.basePath + "/css/common.css"); -"undefined" != typeof mxLanguages && (mxClient.languages = mxLanguages); -if (mxClient.IS_IE) { - if (9 <= document.documentMode) mxClient.IS_VML = !1, mxClient.IS_SVG = !0; - else { - 8 == document.documentMode ? (document.namespaces.add(mxClient.VML_PREFIX, "urn:schemas-microsoft-com:vml", "#default#VML"), document.namespaces.add(mxClient.OFFICE_PREFIX, - "urn:schemas-microsoft-com:office:office", "#default#VML")) : (document.namespaces.add(mxClient.VML_PREFIX, "urn:schemas-microsoft-com:vml"), document.namespaces.add(mxClient.OFFICE_PREFIX, - "urn:schemas-microsoft-com:office:office")); - var ss = document.createStyleSheet(); - ss.cssText = "v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}"; - mxLoadStylesheets && mxClient.link("stylesheet", mxClient.basePath + "/css/explorer.css") - } - window.attachEvent("onunload", mxClient.dispose) -} -var mxLog = { - consoleName: "Console", - TRACE: !1, - DEBUG: !0, - WARN: !0, - buffer: "", - init: function() { - if (null == mxLog.window && null != document.body) { - var a = mxLog.consoleName + " - mxGraph " + mxClient.VERSION, - b = document.createElement("table"); - b.setAttribute("width", "100%"); - b.setAttribute("height", "100%"); - var c = document.createElement("tbody"), - d = document.createElement("tr"), - e = document.createElement("td"); - e.style.verticalAlign = "top"; - mxLog.textarea = document.createElement("textarea"); - mxLog.textarea.setAttribute("readOnly", "true"); - mxLog.textarea.style.height = "100%"; - mxLog.textarea.style.resize = "none"; - mxLog.textarea.value = mxLog.buffer; - mxLog.textarea.style.width = mxClient.IS_NS && "BackCompat" != document.compatMode ? "99%" : "100%"; - e.appendChild(mxLog.textarea); - d.appendChild(e); - c.appendChild(d); - d = document.createElement("tr"); - mxLog.td = document.createElement("td"); - mxLog.td.style.verticalAlign = "top"; - mxLog.td.setAttribute("height", "30px"); - d.appendChild(mxLog.td); - c.appendChild(d); - b.appendChild(c); - mxLog.addButton("Info", function(a) { - mxLog.info() - }); - mxLog.addButton("DOM", function(a) { - a = mxUtils.getInnerHtml(document.body); - mxLog.debug(a) - }); - mxLog.addButton("Trace", function(a) { - mxLog.TRACE = !mxLog.TRACE; - mxLog.TRACE ? mxLog.debug("Tracing enabled") : mxLog.debug("Tracing disabled") - }); - mxLog.addButton("Copy", function(a) { - try { - mxUtils.copy(mxLog.textarea.value) - } catch (b) { - mxUtils.alert(b) - } - }); - mxLog.addButton("Show", function(a) { - try { - mxUtils.popup(mxLog.textarea.value) - } catch (b) { - mxUtils.alert(b) - } - }); - mxLog.addButton("Clear", function(a) { - mxLog.textarea.value = "" - }); - d = c = 0; - "number" === typeof window.innerWidth ? (c = window.innerHeight, d = window.innerWidth) : (c = document.documentElement.clientHeight || document.body.clientHeight, d = document.body.clientWidth); - mxLog.window = new mxWindow(a, b, Math.max(0, d - 320), Math.max(0, c - 210), 300, 160); - mxLog.window.setMaximizable(!0); - mxLog.window.setScrollable(!1); - mxLog.window.setResizable(!0); - mxLog.window.setClosable(!0); - mxLog.window.destroyOnClose = !1; - if ((mxClient.IS_NS || mxClient.IS_IE) && !mxClient.IS_GC && !mxClient.IS_SF && "BackCompat" != document.compatMode) { - var f = - mxLog.window.getElement(), - a = function(a, b) { - mxLog.textarea.style.height = Math.max(0, f.offsetHeight - 70) + "px" - }; - mxLog.window.addListener(mxEvent.RESIZE_END, a); - mxLog.window.addListener(mxEvent.MAXIMIZE, a); - mxLog.window.addListener(mxEvent.NORMALIZE, a); - mxLog.textarea.style.height = "92px" - } - } - }, - info: function() { - mxLog.writeln(mxUtils.toString(navigator)) - }, - addButton: function(a, b) { - var c = document.createElement("button"); - mxUtils.write(c, a); - mxEvent.addListener(c, "click", b); - mxLog.td.appendChild(c) - }, - isVisible: function() { - return null != - mxLog.window ? mxLog.window.isVisible() : !1 - }, - show: function() { - mxLog.setVisible(!0) - }, - setVisible: function(a) { - null == mxLog.window && mxLog.init(); - null != mxLog.window && mxLog.window.setVisible(a) - }, - enter: function(a) { - if (mxLog.TRACE) return mxLog.writeln("Entering " + a), (new Date).getTime() - }, - leave: function(a, b) { - if (mxLog.TRACE) { - var c = 0 != b ? " (" + ((new Date).getTime() - b) + " ms)" : ""; - mxLog.writeln("Leaving " + a + c) - } - }, - debug: function() { - mxLog.DEBUG && mxLog.writeln.apply(this, arguments) - }, - warn: function() { - mxLog.WARN && mxLog.writeln.apply(this, - arguments) - }, - write: function() { - for (var a = "", b = 0; b < arguments.length; b++) a += arguments[b], b < arguments.length - 1 && (a += " "); - null != mxLog.textarea ? (mxLog.textarea.value += a, 0 <= navigator.userAgent.indexOf("Presto/2.5") && (mxLog.textarea.style.visibility = "hidden", mxLog.textarea.style.visibility = "visible"), - mxLog.textarea.scrollTop = mxLog.textarea.scrollHeight) : mxLog.buffer += a - }, - writeln: function() { - for (var a = "", b = 0; b < arguments.length; b++) a += arguments[b], b < arguments.length - 1 && (a += " "); - mxLog.write(a + "\n") - } - }, - mxObjectIdentity = { - FIELD_NAME: "mxObjectId", - counter: 0, - get: function(a) { - if ("object" == typeof a && null == a[mxObjectIdentity.FIELD_NAME]) { - var b = mxUtils.getFunctionName(a.constructor); - a[mxObjectIdentity.FIELD_NAME] = b + "#" + mxObjectIdentity.counter++ - } - return a[mxObjectIdentity.FIELD_NAME] - }, - clear: function(a) { - "object" == typeof a && delete a[mxObjectIdentity.FIELD_NAME] - } - }; - -function mxDictionary() { - this.clear() -} -mxDictionary.prototype.map = null; -mxDictionary.prototype.clear = function() { - this.map = {} -}; -mxDictionary.prototype.get = function(a) { - a = mxObjectIdentity.get(a); - return this.map[a] -}; -mxDictionary.prototype.put = function(a, b) { - var c = mxObjectIdentity.get(a), - d = this.map[c]; - this.map[c] = b; - return d -}; -mxDictionary.prototype.remove = function(a) { - a = mxObjectIdentity.get(a); - var b = this.map[a]; - delete this.map[a]; - return b -}; -mxDictionary.prototype.getKeys = function() { - var a = [], - b; - for (b in this.map) a.push(b); - return a -}; -mxDictionary.prototype.getValues = function() { - var a = [], - b; - for (b in this.map) a.push(this.map[b]); - return a -}; -mxDictionary.prototype.visit = function(a) { - for (var b in this.map) a(b, this.map[b]) -}; -var mxResources = { - resources: [], - extension: mxResourceExtension, - resourcesEncoded: !1, - loadDefaultBundle: !0, - loadSpecialBundle: !0, - isLanguageSupported: function(a) { - return null != mxClient.languages ? 0 <= mxUtils.indexOf(mxClient.languages, a) : !0 - }, - getDefaultBundle: function(a, b) { - return mxResources.loadDefaultBundle || !mxResources.isLanguageSupported(b) ? a + mxResources.extension : null - }, - getSpecialBundle: function(a, b) { - if (null == mxClient.languages || !this.isLanguageSupported(b)) { - var c = b.indexOf("-"); - 0 < c && (b = b.substring(0, c)) - } - return mxResources.loadSpecialBundle && - mxResources.isLanguageSupported(b) && b != mxClient.defaultLanguage ? a + "_" + b + mxResources.extension : null - }, - add: function(a, b) { - b = null != b ? b : mxClient.language.toLowerCase(); - if (b != mxConstants.NONE) { - var c = mxResources.getDefaultBundle(a, b); - if (null != c) try { - var d = mxUtils.load(c); - d.isReady() && mxResources.parse(d.getText()) - } catch (e) {} - c = mxResources.getSpecialBundle(a, b); - if (null != c) try { - d = mxUtils.load(c), d.isReady() && mxResources.parse(d.getText()) - } catch (f) {} - } - }, - parse: function(a) { - if (null != a) { - a = a.split("\n"); - for (var b = 0; b < - a.length; b++) - if ("#" != a[b].charAt(0)) { - var c = a[b].indexOf("\x3d"); - if (0 < c) { - var d = a[b].substring(0, c), - e = a[b].length; - 13 == a[b].charCodeAt(e - 1) && e--; - c = a[b].substring(c + 1, e); - this.resourcesEncoded ? (c = c.replace(/\\(?=u[a-fA-F\d]{4})/g, "%"), mxResources.resources[d] = unescape(c)) : mxResources.resources[d] = c - } - } - } - }, - get: function(a, b, c) { - a = mxResources.resources[a]; - null == a && (a = c); - if (null != a && null != b) { - c = []; - for (var d = null, e = 0; e < a.length; e++) { - var f = a.charAt(e); - "{" == f ? d = "" : null != d && "}" == f ? (d = parseInt(d) - 1, 0 <= d && d < b.length && - c.push(b[d]), d = null) : null != d ? d += f : c.push(f) - } - a = c.join("") - } - return a - } -}; - -function mxPoint(a, b) { - this.x = null != a ? a : 0; - this.y = null != b ? b : 0 -} -mxPoint.prototype.x = null; -mxPoint.prototype.y = null; -mxPoint.prototype.equals = function(a) { - return a.x == this.x && a.y == this.y -}; -mxPoint.prototype.clone = function() { - return mxUtils.clone(this) -}; - -function mxRectangle(a, b, c, d) { - mxPoint.call(this, a, b); - this.width = null != c ? c : 0; - this.height = null != d ? d : 0 -} -mxRectangle.prototype = new mxPoint; -mxRectangle.prototype.constructor = mxRectangle; -mxRectangle.prototype.width = null; -mxRectangle.prototype.height = null; -mxRectangle.prototype.setRect = function(a, b, c, d) { - this.x = a; - this.y = b; - this.width = c; - this.height = d -}; -mxRectangle.prototype.getCenterX = function() { - return this.x + this.width / 2 -}; -mxRectangle.prototype.getCenterY = function() { - return this.y + this.height / 2 -}; -mxRectangle.prototype.add = function(a) { - if (null != a) { - var b = Math.min(this.x, a.x), - c = Math.min(this.y, a.y), - d = Math.max(this.x + this.width, a.x + a.width); - a = Math.max(this.y + this.height, a.y + a.height); - this.x = b; - this.y = c; - this.width = d - b; - this.height = a - c - } -}; -mxRectangle.prototype.grow = function(a) { - this.x -= a; - this.y -= a; - this.width += 2 * a; - this.height += 2 * a -}; -mxRectangle.prototype.getPoint = function() { - return new mxPoint(this.x, this.y) -}; -mxRectangle.prototype.equals = function(a) { - return a.x == this.x && a.y == this.y && a.width == this.width && a.height == this.height -}; -var mxEffects = { - animateChanges: function(a, b, c) { - var d = 0, - e = function() { - for (var g = !1, h = 0; h < b.length; h++) { - var k = b[h]; - if (k instanceof mxGeometryChange || k instanceof mxTerminalChange || k instanceof mxValueChange || k instanceof mxChildChange || k instanceof mxStyleChange) { - var l = a.getView().getState(k.cell || k.child, !1); - if (null != l) - if (g = !0, k.constructor != mxGeometryChange || a.model.isEdge(k.cell)) mxUtils.setOpacity(l.shape.node, 100 * d / 10); - else { - var m = a.getView().scale, - n = (k.geometry.x - k.previous.x) * m, - p = (k.geometry.y - - k.previous.y) * m, - q = (k.geometry.width - k.previous.width) * m, - m = (k.geometry.height - k.previous.height) * m; - 0 == d ? (l.x -= n, l.y -= p, l.width -= q, l.height -= m) : (l.x += n / 10, l.y += p / 10, l.width += q / 10, l.height += m / 10); - a.cellRenderer.redraw(l); - mxEffects.cascadeOpacity(a, k.cell, 100 * d / 10) - } - } - } - 10 > d && g ? (d++, window.setTimeout(e, f)) : null != c && c() - }, - f = 30; - e() - }, - cascadeOpacity: function(a, b, c) { - for (var d = a.model.getChildCount(b), e = 0; e < d; e++) { - var f = a.model.getChildAt(b, e), - g = a.getView().getState(f); - null != g && (mxUtils.setOpacity(g.shape.node, - c), mxEffects.cascadeOpacity(a, f, c)) - } - b = a.model.getEdges(b); - if (null != b) - for (e = 0; e < b.length; e++) d = a.getView().getState(b[e]), null != d && mxUtils.setOpacity(d.shape.node, c) - }, - fadeOut: function(a, b, c, d, e, f) { - d = d || 40; - e = e || 30; - var g = b || 100; - mxUtils.setOpacity(a, g); - if (f || null == f) { - var h = function() { - g = Math.max(g - d, 0); - mxUtils.setOpacity(a, g); - 0 < g ? window.setTimeout(h, e) : (a.style.visibility = "hidden", c && a.parentNode && a.parentNode.removeChild(a)) - }; - window.setTimeout(h, e) - } else a.style.visibility = "hidden", c && a.parentNode && a.parentNode.removeChild(a) - } - }, - mxUtils = { - errorResource: "none" != mxClient.language ? "error" : "", - closeResource: "none" != mxClient.language ? "close" : "", - errorImage: mxClient.imageBasePath + "/error.gif", - removeCursors: function(a) { - null != a.style && (a.style.cursor = ""); - a = a.childNodes; - if (null != a) - for (var b = a.length, c = 0; c < b; c += 1) mxUtils.removeCursors(a[c]) - }, - getCurrentStyle: function() { - return mxClient.IS_IE ? function(a) { - return null != a ? a.currentStyle : null - } : function(a) { - return null != a ? window.getComputedStyle(a, "") : null - } - }(), - hasScrollbars: function(a) { - a = mxUtils.getCurrentStyle(a); - return null != a && ("scroll" == a.overflow || "auto" == a.overflow) - }, - bind: function(a, b) { - return function() { - return b.apply(a, arguments) - } - }, - eval: function(a) { - var b = null; - if (0 <= a.indexOf("function")) try { - eval("var _mxJavaScriptExpression\x3d" + a), b = _mxJavaScriptExpression, _mxJavaScriptExpression = null - } catch (c) { - mxLog.warn(c.message + " while evaluating " + a) - } else try { - b = eval(a) - } catch (d) { - mxLog.warn(d.message + " while evaluating " + a) - } - return b - }, - findNode: function(a, b, c) { - var d = a.getAttribute(b); - if (null != d && d == c) return a; - for (a = - a.firstChild; null != a;) { - d = mxUtils.findNode(a, b, c); - if (null != d) return d; - a = a.nextSibling - } - return null - }, - findNodeByAttribute: function() { - return 9 <= document.documentMode ? function(a, b, c) { - var d = null; - if (null != a) - if (a.nodeType == mxConstants.NODETYPE_ELEMENT && a.getAttribute(b) == c) d = a; - else - for (a = a.firstChild; null != a && null == d;) d = mxUtils.findNodeByAttribute(a, b, c), a = a.nextSibling; - return d - } : mxClient.IS_IE ? function(a, b, c) { - return null == a ? null : a.ownerDocument.selectSingleNode("//*[@" + b + "\x3d'" + c + "']") - } : function(a, b, c) { - return null == - a ? null : a.ownerDocument.evaluate("//*[@" + b + "\x3d'" + c + "']", a.ownerDocument, null, XPathResult.ANY_TYPE, null).iterateNext() - } - }(), - getFunctionName: function(a) { - var b = null; - if (null != a) - if (null != a.name) b = a.name; - else { - a = a.toString(); - for (b = 9; - " " == a.charAt(b);) b++; - var c = a.indexOf("(", b), - b = a.substring(b, c) - } - return b - }, - indexOf: function(a, b) { - if (null != a && null != b) - for (var c = 0; c < a.length; c++) - if (a[c] == b) return c; - return -1 - }, - remove: function(a, b) { - var c = null; - if ("object" == typeof b) - for (var d = mxUtils.indexOf(b, a); 0 <= d;) b.splice(d, - 1), c = a, d = mxUtils.indexOf(b, a); - for (var e in b) b[e] == a && (delete b[e], c = a); - return c - }, - isNode: function(a, b, c, d) { - return null != a && !isNaN(a.nodeType) && (null == b || a.nodeName.toLowerCase() == b.toLowerCase()) ? null == c || a.getAttribute(c) == d : !1 - }, - getChildNodes: function(a, b) { - b = b || mxConstants.NODETYPE_ELEMENT; - for (var c = [], d = a.firstChild; null != d;) d.nodeType == b && c.push(d), d = d.nextSibling; - return c - }, - createXmlDocument: function() { - var a = null; - document.implementation && document.implementation.createDocument ? a = document.implementation.createDocument("", - "", null) : window.ActiveXObject && (a = new ActiveXObject("Microsoft.XMLDOM")); - return a - }, - parseXml: function() { - return mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? function(a) { - var b = mxUtils.createXmlDocument(); - b.async = "false"; - b.loadXML(a); - return b - } : function(a) { - return (new DOMParser).parseFromString(a, "text/xml") - } - }(), - clearSelection: function() { - if (document.selection) return function() { - document.selection.empty() - }; - if (window.getSelection) return function() { - window.getSelection().removeAllRanges() - } - }(), - getPrettyXml: function(a, b, c) { - var d = []; - if (null != a) - if (b = b || " ", c = c || "", a.nodeType == mxConstants.NODETYPE_TEXT) d.push(a.nodeValue); - else { - d.push(c + "\x3c" + a.nodeName); - var e = a.attributes; - if (null != e) - for (var f = 0; f < e.length; f++) { - var g = mxUtils.htmlEntities(e[f].nodeValue); - d.push(" " + e[f].nodeName + '\x3d"' + g + '"') - } - e = a.firstChild; - if (null != e) { - for (d.push("\x3e\n"); null != e;) d.push(mxUtils.getPrettyXml(e, b, c + b)), e = e.nextSibling; - d.push(c + "\x3c/" + a.nodeName + "\x3e\n") - } else d.push("/\x3e\n") - } - return d.join("") - }, - removeWhitespace: function(a, - b) { - for (var c = b ? a.previousSibling : a.nextSibling; null != c && c.nodeType == mxConstants.NODETYPE_TEXT;) { - var d = b ? c.previousSibling : c.nextSibling, - e = mxUtils.getTextContent(c); - 0 == mxUtils.trim(e).length && c.parentNode.removeChild(c); - c = d - } - }, - htmlEntities: function(a, b) { - a = (a || "").replace(/&/g, "\x26amp;"); - a = a.replace(/"/g, "\x26quot;"); - a = a.replace(/\'/g, "\x26#39;"); - a = a.replace(//g, "\x26gt;"); - if (null == b || b) a = a.replace(/\n/g, "\x26#xa;"); - return a - }, - isVml: function(a) { - return null != a && "urn:schemas-microsoft-com:vml" == - a.tagUrn - }, - getXml: function(a, b) { - var c = ""; - null != a && (c = a.xml, c = null == c ? a.innerHTML ? a.innerHTML : (new XMLSerializer).serializeToString(a) : c.replace(/\r\n\t[\t]*/g, "").replace(/>\r\n/g, "\x3e").replace(/\r\n/g, "\n")); - return c = c.replace(/\n/g, b || "\x26#xa;") - }, - getTextContent: function(a) { - var b = ""; - null != a && (null != a.firstChild && (a = a.firstChild), b = a.nodeValue || ""); - return b - }, - getInnerHtml: function() { - return mxClient.IS_IE ? function(a) { - return null != a ? a.innerHTML : "" - } : function(a) { - return null != a ? (new XMLSerializer).serializeToString(a) : - "" - } - }(), - getOuterHtml: function() { - return mxClient.IS_IE ? function(a) { - if (null != a) { - if (null != a.outerHTML) return a.outerHTML; - var b = []; - b.push("\x3c" + a.nodeName); - var c = a.attributes; - if (null != c) - for (var d = 0; d < c.length; d++) { - var e = c[d].nodeValue; - null != e && 0 < e.length && (b.push(" "), b.push(c[d].nodeName), b.push('\x3d"'), b.push(e), b.push('"')) - } - 0 == a.innerHTML.length ? b.push("/\x3e") : (b.push("\x3e"), b.push(a.innerHTML), b.push("\x3c/" + a.nodeName + "\x3e")); - return b.join("") - } - return "" - } : function(a) { - return null != a ? (new XMLSerializer).serializeToString(a) : - "" - } - }(), - write: function(a, b) { - var c = a.ownerDocument.createTextNode(b); - null != a && a.appendChild(c); - return c - }, - writeln: function(a, b) { - var c = a.ownerDocument.createTextNode(b); - null != a && (a.appendChild(c), a.appendChild(document.createElement("br"))); - return c - }, - br: function(a, b) { - b = b || 1; - for (var c = null, d = 0; d < b; d++) null != a && (c = a.ownerDocument.createElement("br"), a.appendChild(c)); - return c - }, - button: function(a, b, c) { - c = null != c ? c : document; - c = c.createElement("button"); - mxUtils.write(c, a); - mxEvent.addListener(c, "click", function(a) { - b(a) - }); - return c - }, - para: function(a, b) { - var c = document.createElement("p"); - mxUtils.write(c, b); - null != a && a.appendChild(c); - return c - }, - addTransparentBackgroundFilter: function(a) { - a.style.filter += "progid:DXImageTransform.Microsoft.AlphaImageLoader(src\x3d'" + mxClient.imageBasePath + "/transparent.gif', sizingMethod\x3d'scale')" - }, - linkAction: function(a, b, c, d, e) { - return mxUtils.link(a, b, function() { - c.execute(d) - }, e) - }, - linkInvoke: function(a, b, c, d, e, f) { - return mxUtils.link(a, b, function() { - c[d](e) - }, f) - }, - link: function(a, b, c, d) { - var e = - document.createElement("span"); - e.style.color = "blue"; - e.style.textDecoration = "underline"; - e.style.cursor = "pointer"; - null != d && (e.style.paddingLeft = d + "px"); - mxEvent.addListener(e, "click", c); - mxUtils.write(e, b); - null != a && a.appendChild(e); - return e - }, - fit: function(a) { - var b = parseInt(a.offsetLeft), - c = parseInt(a.offsetWidth), - d = document.body, - e = document.documentElement, - f = (d.scrollLeft || e.scrollLeft) + (d.clientWidth || e.clientWidth); - b + c > f && (a.style.left = Math.max(d.scrollLeft || e.scrollLeft, f - c) + "px"); - b = parseInt(a.offsetTop); - c = parseInt(a.offsetHeight); - f = (d.scrollTop || e.scrollTop) + Math.max(d.clientHeight || 0, e.clientHeight); - b + c > f && (a.style.top = Math.max(d.scrollTop || e.scrollTop, f - c) + "px") - }, - open: function(a) { - if (mxClient.IS_NS) { - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect") - } catch (b) { - return mxUtils.alert("Permission to read file denied."), "" - } - var c = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); - c.initWithPath(a); - if (!c.exists()) return mxUtils.alert("File not found."), - ""; - a = Components.classes["@mozilla.org/network/file-input-stream;1"].createInstance(Components.interfaces.nsIFileInputStream); - a.init(c, 1, 4, null); - c = Components.classes["@mozilla.org/scriptableinputstream;1"].createInstance(Components.interfaces.nsIScriptableInputStream); - c.init(a); - return c.read(c.available()) - } - c = (new ActiveXObject("Scripting.FileSystemObject")).OpenTextFile(a, 1); - a = c.readAll(); - c.close(); - return a - }, - save: function(a, b) { - if (mxClient.IS_NS) { - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect") - } catch (c) { - mxUtils.alert("Permission to write file denied."); - return - } - var d = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); - d.initWithPath(a); - d.exists() || d.create(0, 420); - var e = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream); - e.init(d, 34, 4, null); - e.write(b, b.length); - e.flush(); - e.close() - } else d = (new ActiveXObject("Scripting.FileSystemObject")).CreateTextFile(a, !0), d.Write(b), d.Close() - }, - saveAs: function(a) { - var b = document.createElement("iframe"); - b.setAttribute("src", ""); - b.style.visibility = "hidden"; - document.body.appendChild(b); - try { - if (mxClient.IS_NS) { - var c = b.contentDocument; - c.open(); - c.write(a); - c.close(); - try { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"), b.focus(), saveDocument(c) - } catch (d) { - mxUtils.alert("Permission to save document denied.") - } - } else c = b.contentWindow.document, c.write(a), c.execCommand("SaveAs", !1, document.location) - } finally { - document.body.removeChild(b) - } - }, - copy: function(a) { - if (window.clipboardData) window.clipboardData.setData("Text", - a); - else { - netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - var b = Components.classes["@mozilla.org/widget/clipboard;1"].createInstance(Components.interfaces.nsIClipboard); - if (b) { - var c = Components.classes["@mozilla.org/widget/transferable;1"].createInstance(Components.interfaces.nsITransferable); - if (c) { - c.addDataFlavor("text/unicode"); - var d = Components.classes["@mozilla.org/supports-string;1"].createInstance(Components.interfaces.nsISupportsString); - d.data = a; - c.setTransferData("text/unicode", - d, 2 * a.length); - b.setData(c, null, Components.interfaces.nsIClipboard.kGlobalClipboard) - } - } - } - }, - load: function(a) { - a = new mxXmlRequest(a, null, "GET", !1); - a.send(); - return a - }, - get: function(a, b, c) { - return (new mxXmlRequest(a, null, "GET")).send(b, c) - }, - post: function(a, b, c, d) { - return (new mxXmlRequest(a, b)).send(c, d) - }, - submit: function(a, b, c, d) { - return (new mxXmlRequest(a, b)).simulate(c, d) - }, - loadInto: function(a, b, c) { - mxClient.IS_IE ? b.onreadystatechange = function() { - 4 == b.readyState && c() - } : b.addEventListener("load", c, !1); - b.load(a) - }, - getValue: function(a, b, c) { - a = null != a ? a[b] : null; - null == a && (a = c); - return a - }, - getNumber: function(a, b, c) { - a = null != a ? a[b] : null; - null == a && (a = c || 0); - return Number(a) - }, - getColor: function(a, b, c) { - a = null != a ? a[b] : null; - null == a ? a = c : a == mxConstants.NONE && (a = null); - return a - }, - clone: function(a, b, c) { - c = null != c ? c : !1; - var d = null; - if (null != a && "function" == typeof a.constructor) { - var d = new a.constructor, - e; - for (e in a) - if (e != mxObjectIdentity.FIELD_NAME && (null == b || 0 > mxUtils.indexOf(b, e))) d[e] = !c && "object" == typeof a[e] ? mxUtils.clone(a[e]) : a[e] - } - return d - }, - equalPoints: function(a, b) { - if (null == a && null != b || null != a && null == b || null != a && null != b && a.length != b.length) return !1; - if (null != a && null != b) - for (var c = 0; c < a.length; c++) - if (a[c] == b[c] || null != a[c] && !a[c].equals(b[c])) return !1; - return !0 - }, - equalEntries: function(a, b) { - if (null == a && null != b || null != a && null == b || null != a && null != b && a.length != b.length) return !1; - if (null != a && null != b) - for (var c in a) - if (a[c] != b[c]) return !1; - return !0 - }, - extend: function(a, b) { - var c = function() {}; - c.prototype = b.prototype; - a.prototype = new c; - a.prototype.constructor = - a - }, - toString: function(a) { - var b = "", - c; - for (c in a) try { - if (null == a[c]) b += c + " \x3d [null]\n"; - else if ("function" == typeof a[c]) b += c + " \x3d\x3e [Function]\n"; - else if ("object" == typeof a[c]) var d = mxUtils.getFunctionName(a[c].constructor), - b = b + (c + " \x3d\x3e [" + d + "]\n"); - else b += c + " \x3d " + a[c] + "\n" - } catch (e) { - b += c + "\x3d" + e.message - } - return b - }, - toRadians: function(a) { - return Math.PI * a / 180 - }, - arcToCurves: function(a, b, c, d, e, f, g, h, k) { - h -= a; - k -= b; - if (0 === c || 0 === d) return p; - c = Math.abs(c); - d = Math.abs(d); - var l = -h / 2, - m = -k / 2, - n = Math.cos(e * - Math.PI / 180), - p = Math.sin(e * Math.PI / 180); - e = n * l + p * m; - var l = -1 * p * l + n * m, - m = e * e, - q = l * l, - s = c * c, - r = d * d, - t = m / s + q / r; - 1 < t ? (c *= Math.sqrt(t), d *= Math.sqrt(t), f = 0) : (t = 1, f === g && (t = -1), f = t * Math.sqrt((s * r - s * q - r * m) / (s * q + r * m))); - m = f * c * l / d; - q = -1 * f * d * e / c; - h = n * m - p * q + h / 2; - k = p * m + n * q + k / 2; - s = Math.atan2((l - q) / d, (e - m) / c) - Math.atan2(0, 1); - f = 0 <= s ? s : 2 * Math.PI + s; - s = Math.atan2((-l - q) / d, (-e - m) / c) - Math.atan2((l - q) / d, (e - m) / c); - e = 0 <= s ? s : 2 * Math.PI + s; - 0 == g && 0 < e ? e -= 2 * Math.PI : 0 != g && 0 > e && (e += 2 * Math.PI); - g = 2 * e / Math.PI; - g = Math.ceil(0 > g ? -1 * g : g); - e /= g; - l = 8 / 3 * Math.sin(e / - 4) * Math.sin(e / 4) / Math.sin(e / 2); - m = n * c; - n *= d; - c *= p; - d *= p; - for (var v = Math.cos(f), w = Math.sin(f), q = -l * (m * w + d * v), s = -l * (c * w - n * v), t = r = 0, p = [], u = 0; u < g; ++u) { - f += e; - var v = Math.cos(f), - w = Math.sin(f), - r = m * v - d * w + h, - t = c * v + n * w + k, - y = -l * (m * w + d * v), - v = -l * (c * w - n * v), - w = 6 * u; - p[w] = Number(q + a); - p[w + 1] = Number(s + b); - p[w + 2] = Number(r - y + a); - p[w + 3] = Number(t - v + b); - p[w + 4] = Number(r + a); - p[w + 5] = Number(t + b); - q = r + y; - s = t + v - } - return p - }, - getBoundingBox: function(a, b) { - var c = null; - if (null != a && null != b && 0 != b) { - var d = mxUtils.toRadians(b), - c = Math.cos(d), - e = Math.sin(d), - f = - new mxPoint(a.x + a.width / 2, a.y + a.height / 2), - g = new mxPoint(a.x, a.y), - d = new mxPoint(a.x + a.width, a.y), - h = new mxPoint(d.x, a.y + a.height), - k = new mxPoint(a.x, h.y), - g = mxUtils.getRotatedPoint(g, c, e, f), - d = mxUtils.getRotatedPoint(d, c, e, f), - h = mxUtils.getRotatedPoint(h, c, e, f), - k = mxUtils.getRotatedPoint(k, c, e, f), - c = new mxRectangle(g.x, g.y, 0, 0); - c.add(new mxRectangle(d.x, d.y, 0, 0)); - c.add(new mxRectangle(h.x, h.y, 0, 0)); - c.add(new mxRectangle(k.x, k.y, 0, 0)) - } - return c - }, - getRotatedPoint: function(a, b, c, d) { - d = null != d ? d : new mxPoint; - var e = - a.x - d.x; - a = a.y - d.y; - return new mxPoint(e * b - a * c + d.x, a * b + e * c + d.y) - }, - getPortConstraints: function(a, b, c, d) { - a = mxUtils.getValue(a.style, mxConstants.STYLE_PORT_CONSTRAINT, null); - if (null == a) return d; - d = a.toString(); - a = mxConstants.DIRECTION_MASK_NONE; - 0 <= d.indexOf(mxConstants.DIRECTION_NORTH) && (a |= mxConstants.DIRECTION_MASK_NORTH); - 0 <= d.indexOf(mxConstants.DIRECTION_WEST) && (a |= mxConstants.DIRECTION_MASK_WEST); - 0 <= d.indexOf(mxConstants.DIRECTION_SOUTH) && (a |= mxConstants.DIRECTION_MASK_SOUTH); - 0 <= d.indexOf(mxConstants.DIRECTION_EAST) && - (a |= mxConstants.DIRECTION_MASK_EAST); - return a - }, - reversePortConstraints: function(a) { - var b = 0, - b = (a & mxConstants.DIRECTION_MASK_WEST) << 3, - b = b | (a & mxConstants.DIRECTION_MASK_NORTH) << 1, - b = b | (a & mxConstants.DIRECTION_MASK_SOUTH) >> 1; - return b |= (a & mxConstants.DIRECTION_MASK_EAST) >> 3 - }, - findNearestSegment: function(a, b, c) { - var d = -1; - if (0 < a.absolutePoints.length) - for (var e = a.absolutePoints[0], f = null, g = 1; g < a.absolutePoints.length; g++) { - var h = a.absolutePoints[g], - e = mxUtils.ptSegDistSq(e.x, e.y, h.x, h.y, b, c); - if (null == f || e < f) f = - e, d = g - 1; - e = h - } - return d - }, - rectangleIntersectsSegment: function(a, b, c) { - var d = a.y, - e = a.x, - f = d + a.height, - g = e + a.width; - a = b.x; - var h = c.x; - b.x > c.x && (a = c.x, h = b.x); - h > g && (h = g); - a < e && (a = e); - if (a > h) return !1; - var e = b.y, - g = c.y, - k = c.x - b.x; - 1E-7 < Math.abs(k) && (c = (c.y - b.y) / k, b = b.y - c * b.x, e = c * a + b, g = c * h + b); - e > g && (b = g, g = e, e = b); - g > f && (g = f); - e < d && (e = d); - return e > g ? !1 : !0 - }, - contains: function(a, b, c) { - return a.x <= b && a.x + a.width >= b && a.y <= c && a.y + a.height >= c - }, - intersects: function(a, b) { - var c = a.width, - d = a.height, - e = b.width, - f = b.height; - if (0 >= e || 0 >= f || 0 >= c || - 0 >= d) return !1; - var g = a.x, - h = a.y, - k = b.x, - l = b.y, - e = e + k, - f = f + l, - c = c + g, - d = d + h; - return (e < k || e > g) && (f < l || f > h) && (c < g || c > k) && (d < h || d > l) - }, - intersectsHotspot: function(a, b, c, d, e, f) { - d = null != d ? d : 1; - e = null != e ? e : 0; - f = null != f ? f : 0; - if (0 < d) { - var g = a.getCenterX(), - h = a.getCenterY(), - k = a.width, - l = a.height, - m = mxUtils.getValue(a.style, mxConstants.STYLE_STARTSIZE) * a.view.scale; - 0 < m && (mxUtils.getValue(a.style, mxConstants.STYLE_HORIZONTAL, !0) ? (h = a.y + m / 2, l = m) : (g = a.x + m / 2, k = m)); - k = Math.max(e, k * d); - l = Math.max(e, l * d); - 0 < f && (k = Math.min(k, f), l = Math.min(l, - f)); - d = new mxRectangle(g - k / 2, h - l / 2, k, l); - g = mxUtils.toRadians(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION) || 0); - 0 != g && (e = Math.cos(-g), f = Math.sin(-g), g = new mxPoint(a.getCenterX(), a.getCenterY()), a = mxUtils.getRotatedPoint(new mxPoint(b, c), e, f, g), b = a.x, c = a.y); - return mxUtils.contains(d, b, c) - } - return !0 - }, - getOffset: function(a, b) { - var c = 0, - d = 0; - if (null != b && b) var e = document.body, - f = document.documentElement, - c = c + (e.scrollLeft || f.scrollLeft), - d = d + (e.scrollTop || f.scrollTop); - for (; a.offsetParent;) c += a.offsetLeft, d += - a.offsetTop, a = a.offsetParent; - return new mxPoint(c, d) - }, - getScrollOrigin: function(a) { - for (var b = document.body, c = document.documentElement, d = new mxPoint(b.scrollLeft || c.scrollLeft, b.scrollTop || c.scrollTop); null != a && a != b && a != c;) !isNaN(a.scrollLeft) && ! - isNaN(a.scrollTop) && (d.x += a.scrollLeft, d.y += a.scrollTop), a = a.parentNode; - return d - }, - convertPoint: function(a, b, c) { - var d = mxUtils.getScrollOrigin(a); - a = mxUtils.getOffset(a); - a.x -= d.x; - a.y -= d.y; - return new mxPoint(b - a.x, c - a.y) - }, - ltrim: function(a, b) { - return a.replace(RegExp("^[" + - (b || "\\s") + "]+", "g"), "") - }, - rtrim: function(a, b) { - return a.replace(RegExp("[" + (b || "\\s") + "]+$", "g"), "") - }, - trim: function(a, b) { - return mxUtils.ltrim(mxUtils.rtrim(a, b), b) - }, - isNumeric: function(a) { - return null != a && (null == a.length || 0 < a.length && 0 > a.indexOf("0x") && 0 > a.indexOf("0X")) && !isNaN(a) - }, - mod: function(a, b) { - return (a % b + b) % b - }, - intersection: function(a, b, c, d, e, f, g, h) { - var k = (h - f) * (c - a) - (g - e) * (d - b); - g = ((g - e) * (b - f) - (h - f) * (a - e)) / k; - e = ((c - a) * (b - f) - (d - b) * (a - e)) / k; - return 0 <= g && 1 >= g && 0 <= e && 1 >= e ? new mxPoint(a + g * (c - a), b + g * - (d - b)) : null - }, - ptSegDistSq: function(a, b, c, d, e, f) { - c -= a; - d -= b; - e -= a; - f -= b; - 0 >= e * c + f * d ? c = 0 : (e = c - e, f = d - f, a = e * c + f * d, c = 0 >= a ? 0 : a * a / (c * c + d * d)); - e = e * e + f * f - c; - 0 > e && (e = 0); - return e - }, - relativeCcw: function(a, b, c, d, e, f) { - c -= a; - d -= b; - e -= a; - f -= b; - a = e * d - f * c; - 0 == a && (a = e * c + f * d, 0 < a && (a = (e - c) * c + (f - d) * d, 0 > a && (a = 0))); - return 0 > a ? -1 : 0 < a ? 1 : 0 - }, - animateChanges: function(a, b) { - mxEffects.animateChanges.apply(this, arguments) - }, - cascadeOpacity: function(a, b, c) { - mxEffects.cascadeOpacity.apply(this, arguments) - }, - fadeOut: function(a, b, c, d, e, f) { - mxEffects.fadeOut.apply(this, - arguments) - }, - setOpacity: function(a, b) { - mxUtils.isVml(a) ? a.style.filter = 100 <= b ? null : "alpha(opacity\x3d" + b / 5 + ")" : mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? a.style - .filter = 100 <= b ? null : "alpha(opacity\x3d" + b + ")" : a.style.opacity = b / 100 - }, - createImage: function(a) { - var b = null; - mxClient.IS_IE6 && "CSS1Compat" != document.compatMode ? (b = document.createElement(mxClient.VML_PREFIX + ":image"), b.setAttribute("src", a), b.style.borderStyle = "none") : (b = document.createElement( - "img"), b.setAttribute("src", - a), b.setAttribute("border", "0")); - return b - }, - sortCells: function(a, b) { - b = null != b ? b : !0; - var c = new mxDictionary; - a.sort(function(a, e) { - var f = c.get(a); - null == f && (f = mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR), c.put(a, f)); - var g = c.get(e); - null == g && (g = mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR), c.put(e, g)); - f = mxCellPath.compare(f, g); - return 0 == f ? 0 : 0 < f == b ? 1 : -1 - }); - return a - }, - getStylename: function(a) { - return null != a && (a = a.split(";")[0], 0 > a.indexOf("\x3d")) ? a : "" - }, - getStylenames: function(a) { - var b = []; - if (null != - a) { - a = a.split(";"); - for (var c = 0; c < a.length; c++) 0 > a[c].indexOf("\x3d") && b.push(a[c]) - } - return b - }, - indexOfStylename: function(a, b) { - if (null != a && null != b) - for (var c = a.split(";"), d = 0, e = 0; e < c.length; e++) { - if (c[e] == b) return d; - d += c[e].length + 1 - } - return -1 - }, - addStylename: function(a, b) { - 0 > mxUtils.indexOfStylename(a, b) && (null == a ? a = "" : 0 < a.length && ";" != a.charAt(a.length - 1) && (a += ";"), a += b); - return a - }, - removeStylename: function(a, b) { - var c = []; - if (null != a) - for (var d = a.split(";"), e = 0; e < d.length; e++) d[e] != b && c.push(d[e]); - return c.join(";") - }, - removeAllStylenames: function(a) { - var b = []; - if (null != a) { - a = a.split(";"); - for (var c = 0; c < a.length; c++) 0 <= a[c].indexOf("\x3d") && b.push(a[c]) - } - return b.join(";") - }, - setCellStyles: function(a, b, c, d) { - if (null != b && 0 < b.length) { - a.beginUpdate(); - try { - for (var e = 0; e < b.length; e++) - if (null != b[e]) { - var f = mxUtils.setStyle(a.getStyle(b[e]), c, d); - a.setStyle(b[e], f) - } - } finally { - a.endUpdate() - } - } - }, - setStyle: function(a, b, c) { - var d = null != c && ("undefined" == typeof c.length || 0 < c.length); - if (null == a || 0 == a.length) d && (a = b + "\x3d" + c); - else { - var e = a.indexOf(b + - "\x3d"); - 0 > e ? d && (d = ";" == a.charAt(a.length - 1) ? "" : ";", a = a + d + b + "\x3d" + c) : (b = d ? b + "\x3d" + c : "", c = a.indexOf(";", e), d || c++, a = a.substring(0, e) + b + (c > e ? - a.substring(c) : "")) - } - return a - }, - setCellStyleFlags: function(a, b, c, d, e) { - if (null != b && 0 < b.length) { - a.beginUpdate(); - try { - for (var f = 0; f < b.length; f++) - if (null != b[f]) { - var g = mxUtils.setStyleFlag(a.getStyle(b[f]), c, d, e); - a.setStyle(b[f], g) - } - } finally { - a.endUpdate() - } - } - }, - setStyleFlag: function(a, b, c, d) { - if (null == a || 0 == a.length) a = d || null == d ? b + "\x3d" + c : b + "\x3d0"; - else { - var e = a.indexOf(b + - "\x3d"); - if (0 > e) e = ";" == a.charAt(a.length - 1) ? "" : ";", a = d || null == d ? a + e + b + "\x3d" + c : a + e + b + "\x3d0"; - else { - var f = a.indexOf(";", e), - g = "", - g = 0 > f ? a.substring(e + b.length + 1) : a.substring(e + b.length + 1, f), - g = null == d ? parseInt(g) ^ c : d ? parseInt(g) | c : parseInt(g) & ~c; - a = a.substring(0, e) + b + "\x3d" + g + (0 <= f ? a.substring(f) : "") - } - } - return a - }, - getAlignmentAsPoint: function(a, b) { - var c = 0, - d = 0; - a == mxConstants.ALIGN_CENTER ? c = -0.5 : a == mxConstants.ALIGN_RIGHT && (c = -1); - b == mxConstants.ALIGN_MIDDLE ? d = -0.5 : b == mxConstants.ALIGN_BOTTOM && (d = -1); - return new mxPoint(c, - d) - }, - getSizeForString: function(a, b, c) { - b = null != b ? b : mxConstants.DEFAULT_FONTSIZE; - c = null != c ? c : mxConstants.DEFAULT_FONTFAMILY; - var d = document.createElement("div"); - d.style.fontFamily = c; - d.style.fontSize = Math.round(b) + "px"; - d.style.lineHeight = Math.round(b * mxConstants.LINE_HEIGHT) + "px"; - d.style.position = "absolute"; - d.style.whiteSpace = "nowrap"; - d.style.visibility = "hidden"; - d.style.display = mxClient.IS_QUIRKS ? "inline" : "inline-block"; - d.style.zoom = "1"; - d.innerHTML = a; - document.body.appendChild(d); - a = new mxRectangle(0, 0, - d.offsetWidth, d.offsetHeight); - document.body.removeChild(d); - return a - }, - getViewXml: function(a, b, c, d, e) { - d = null != d ? d : 0; - e = null != e ? e : 0; - b = null != b ? b : 1; - null == c && (c = [a.getModel().getRoot()]); - var f = a.getView(), - g = null, - h = f.isEventsEnabled(); - f.setEventsEnabled(!1); - var k = f.drawPane, - l = f.overlayPane; - a.dialect == mxConstants.DIALECT_SVG ? (f.drawPane = document.createElementNS(mxConstants.NS_SVG, "g"), f.canvas.appendChild(f.drawPane), f.overlayPane = document.createElementNS(mxConstants.NS_SVG, - "g")) : (f.drawPane = f.drawPane.cloneNode(!1), - f.canvas.appendChild(f.drawPane), f.overlayPane = f.overlayPane.cloneNode(!1)); - f.canvas.appendChild(f.overlayPane); - var m = f.getTranslate(); - f.translate = new mxPoint(d, e); - b = new mxTemporaryCellStates(a.getView(), b, c); - try { - g = (new mxCodec).encode(a.getView()) - } finally { - b.destroy(), f.translate = m, f.canvas.removeChild(f.drawPane), f.canvas.removeChild(f.overlayPane), f.drawPane = k, f.overlayPane = l, f.setEventsEnabled(h) - } - return g - }, - getScaleForPageCount: function(a, b, c, d) { - if (1 > a) return 1; - c = null != c ? c : mxConstants.PAGE_FORMAT_A4_PORTRAIT; - d = null != d ? d : 0; - var e = c.width - 2 * d; - c = c.height - 2 * d; - d = b.getGraphBounds().clone(); - b = b.getView().getScale(); - d.width /= b; - d.height /= b; - b = d.width; - c = b / d.height / (e / c); - d = Math.sqrt(a); - var f = Math.sqrt(c); - c = d * f; - d /= f; - if (1 > c && d > a) { - var g = d / a; - d = a; - c /= g - } - 1 > d && c > a && (g = c / a, c = a, d /= g); - g = Math.ceil(c) * Math.ceil(d); - for (f = 0; g > a;) { - var g = Math.floor(c) / c, - h = Math.floor(d) / d; - 1 == g && (g = Math.floor(c - 1) / c); - 1 == h && (h = Math.floor(d - 1) / d); - g = g > h ? g : h; - c *= g; - d *= g; - g = Math.ceil(c) * Math.ceil(d); - f++; - if (10 < f) break - } - return 0.99999 * (e * c / b) - }, - show: function(a, - b, c, d) { - c = null != c ? c : 0; - d = null != d ? d : 0; - null == b ? b = window.open().document : b.open(); - var e = a.getGraphBounds(); - c = -e.x + c; - d = -e.y + d; - if (mxClient.IS_IE) { - for (var e = "\x3chtml\x3e\x3chead\x3e", f = document.getElementsByTagName("base"), g = 0; g < f.length; g++) e += f[g].outerHTML; - e += "\x3cstyle\x3e"; - for (g = 0; g < document.styleSheets.length; g++) try { - e += document.styleSheets(g).cssText - } catch (h) {} - e += "\x3c/style\x3e\x3c/head\x3e"; - e += "\x3cbody\x3e"; - e += a.container.innerHTML; - e += "\x3c/body\x3e"; - e += "\x3chtml\x3e"; - b.writeln(e); - b.close(); - a = - b.body.getElementsByTagName("DIV")[0]; - null != a && (a.style.position = "absolute", a.style.left = c + "px", a.style.top = d + "px") - } else { - b.writeln("\x3chtml"); - b.writeln("\x3chead\x3e"); - f = document.getElementsByTagName("base"); - for (g = 0; g < f.length; g++) b.writeln(mxUtils.getOuterHtml(f[g])); - f = document.getElementsByTagName("link"); - for (g = 0; g < f.length; g++) b.writeln(mxUtils.getOuterHtml(f[g])); - f = document.getElementsByTagName("style"); - for (g = 0; g < f.length; g++) b.writeln(mxUtils.getOuterHtml(f[g])); - b.writeln("\x3c/head\x3e"); - b.writeln("\x3c/html\x3e"); - b.close(); - null == b.body && b.documentElement.appendChild(b.createElement("body")); - b.body.style.overflow = "auto"; - for (a = a.container.firstChild; null != a;) g = a.cloneNode(!0), b.body.appendChild(g), a = a.nextSibling; - a = b.getElementsByTagName("g")[0]; - null != a && (a.setAttribute("transform", "translate(" + c + "," + d + ")"), c = a.ownerSVGElement, c.setAttribute("width", e.width + Math.max(e.x, 0) + 3), c.setAttribute("height", e.height + - Math.max(e.y, 0) + 3)) - } - mxUtils.removeCursors(b.body); - return b - }, - printScreen: function(a) { - var b = window.open(); - mxUtils.show(a, b.document); - a = function() { - b.focus(); - b.print(); - b.close() - }; - mxClient.IS_GC ? b.setTimeout(a, 500) : a() - }, - popup: function(a, b) { - if (b) { - var c = document.createElement("div"); - c.style.overflow = "scroll"; - c.style.width = "636px"; - c.style.height = "460px"; - var d = document.createElement("pre"); - d.innerHTML = mxUtils.htmlEntities(a, !1).replace(/\n/g, "\x3cbr\x3e").replace(/ /g, "\x26nbsp;"); - c.appendChild(d); - c = new mxWindow("Popup Window", c, document.body.clientWidth / 2 - 320, (document.body.clientHeight || document.documentElement.clientHeight) / - 2 - 240, 640, 480, !1, !0); - c.setClosable(!0); - c.setVisible(!0) - } else mxClient.IS_NS ? (c = window.open(), c.document.writeln("\x3cpre\x3e" + mxUtils.htmlEntities(a) + "\x3c/pre"), c.document.close()) : (c = window.open(), d = c.document.createElement( - "pre"), d.innerHTML = mxUtils.htmlEntities(a, !1).replace(/\n/g, "\x3cbr\x3e").replace(/ /g, "\x26nbsp;"), c.document.body.appendChild(d)) - }, - alert: function(a) { - alert(a) - }, - prompt: function(a, b) { - return prompt(a, b) - }, - confirm: function(a) { - return confirm(a) - }, - error: function(a, b, c, d) { - var e = document.createElement("div"); - e.style.padding = "20px"; - var f = document.createElement("img"); - f.setAttribute("src", d || mxUtils.errorImage); - f.setAttribute("valign", "bottom"); - f.style.verticalAlign = "middle"; - e.appendChild(f); - e.appendChild(document.createTextNode("\u00a0")); - e.appendChild(document.createTextNode("\u00a0")); - e.appendChild(document.createTextNode("\u00a0")); - mxUtils.write(e, a); - a = document.body.clientWidth; - d = document.body.clientHeight || document.documentElement.clientHeight; - var g = new mxWindow(mxResources.get(mxUtils.errorResource) || - mxUtils.errorResource, e, (a - b) / 2, d / 4, b, null, !1, !0); - c && (mxUtils.br(e), b = document.createElement("p"), c = document.createElement("button"), mxClient.IS_IE ? c.style.cssText = "float:right" : c.setAttribute("style", "float:right"), mxEvent.addListener( - c, "click", - function(a) { - g.destroy() - }), mxUtils.write(c, mxResources.get(mxUtils.closeResource) || mxUtils.closeResource), b.appendChild(c), e.appendChild(b), mxUtils.br(e), g.setClosable(!0)); - g.setVisible(!0); - return g - }, - makeDraggable: function(a, b, c, d, e, f, g, h, k, l) { - a = new mxDragSource(a, - c); - a.dragOffset = new mxPoint(null != e ? e : 0, null != f ? f : mxConstants.TOOLTIP_VERTICAL_OFFSET); - a.autoscroll = g; - a.setGuidesEnabled(!1); - null != k && (a.highlightDropTargets = k); - null != l && (a.getDropTarget = l); - a.getGraphForEvent = function(a) { - return "function" == typeof b ? b(a) : b - }; - null != d && (a.createDragElement = function() { - return d.cloneNode(!0) - }, h && (a.createPreviewElement = function(a) { - var b = d.cloneNode(!0), - c = parseInt(b.style.width), - e = parseInt(b.style.height); - b.style.width = Math.round(c * a.view.scale) + "px"; - b.style.height = Math.round(e * - a.view.scale) + "px"; - return b - })); - return a - } - }, - mxConstants = { - DEFAULT_HOTSPOT: 0.3, - MIN_HOTSPOT_SIZE: 8, - MAX_HOTSPOT_SIZE: 0, - RENDERING_HINT_EXACT: "exact", - RENDERING_HINT_FASTER: "faster", - RENDERING_HINT_FASTEST: "fastest", - DIALECT_SVG: "svg", - DIALECT_VML: "vml", - DIALECT_MIXEDHTML: "mixedHtml", - DIALECT_PREFERHTML: "preferHtml", - DIALECT_STRICTHTML: "strictHtml", - NS_SVG: "http://www.w3.org/2000/svg", - NS_XHTML: "http://www.w3.org/1999/xhtml", - NS_XLINK: "http://www.w3.org/1999/xlink", - SHADOWCOLOR: "gray", - SHADOW_OFFSET_X: 2, - SHADOW_OFFSET_Y: 3, - SHADOW_OPACITY: 1, - NODETYPE_ELEMENT: 1, - NODETYPE_ATTRIBUTE: 2, - NODETYPE_TEXT: 3, - NODETYPE_CDATA: 4, - NODETYPE_ENTITY_REFERENCE: 5, - NODETYPE_ENTITY: 6, - NODETYPE_PROCESSING_INSTRUCTION: 7, - NODETYPE_COMMENT: 8, - NODETYPE_DOCUMENT: 9, - NODETYPE_DOCUMENTTYPE: 10, - NODETYPE_DOCUMENT_FRAGMENT: 11, - NODETYPE_NOTATION: 12, - TOOLTIP_VERTICAL_OFFSET: 16, - DEFAULT_VALID_COLOR: "#00FF00", - DEFAULT_INVALID_COLOR: "#FF0000", - HIGHLIGHT_STROKEWIDTH: 3, - CURSOR_MOVABLE_VERTEX: "move", - CURSOR_MOVABLE_EDGE: "move", - CURSOR_LABEL_HANDLE: "default", - CURSOR_BEND_HANDLE: "pointer", - CURSOR_CONNECT: "pointer", - HIGHLIGHT_COLOR: "#00FF00", - CONNECT_TARGET_COLOR: "#0000FF", - INVALID_CONNECT_TARGET_COLOR: "#FF0000", - DROP_TARGET_COLOR: "#0000FF", - VALID_COLOR: "#00FF00", - INVALID_COLOR: "#FF0000", - EDGE_SELECTION_COLOR: "#00FF00", - VERTEX_SELECTION_COLOR: "#00FF00", - VERTEX_SELECTION_STROKEWIDTH: 1, - EDGE_SELECTION_STROKEWIDTH: 1, - VERTEX_SELECTION_DASHED: !0, - EDGE_SELECTION_DASHED: !0, - GUIDE_COLOR: "#FF0000", - GUIDE_STROKEWIDTH: 1, - OUTLINE_COLOR: "#0099FF", - OUTLINE_STROKEWIDTH: mxClient.IS_IE ? 2 : 3, - HANDLE_SIZE: 7, - LABEL_HANDLE_SIZE: 4, - HANDLE_FILLCOLOR: "#00FF00", - HANDLE_STROKECOLOR: "black", - LABEL_HANDLE_FILLCOLOR: "yellow", - CONNECT_HANDLE_FILLCOLOR: "#0000FF", - LOCKED_HANDLE_FILLCOLOR: "#FF0000", - OUTLINE_HANDLE_FILLCOLOR: "#00FFFF", - OUTLINE_HANDLE_STROKECOLOR: "#0033FF", - DEFAULT_FONTFAMILY: "Arial,Helvetica", - DEFAULT_FONTSIZE: 11, - LINE_HEIGHT: 1.2, - DEFAULT_FONTSTYLE: 0, - DEFAULT_STARTSIZE: 40, - DEFAULT_MARKERSIZE: 6, - DEFAULT_IMAGESIZE: 24, - ENTITY_SEGMENT: 30, - RECTANGLE_ROUNDING_FACTOR: 0.15, - LINE_ARCSIZE: 20, - ARROW_SPACING: 10, - ARROW_WIDTH: 30, - ARROW_SIZE: 30, - PAGE_FORMAT_A4_PORTRAIT: new mxRectangle(0, - 0, 826, 1169), - PAGE_FORMAT_A4_LANDSCAPE: new mxRectangle(0, 0, 1169, 826), - PAGE_FORMAT_LETTER_PORTRAIT: new mxRectangle(0, 0, 850, 1100), - PAGE_FORMAT_LETTER_LANDSCAPE: new mxRectangle(0, 0, 1100, 850), - NONE: "none", - STYLE_PERIMETER: "perimeter", - STYLE_SOURCE_PORT: "sourcePort", - STYLE_TARGET_PORT: "targetPort", - STYLE_PORT_CONSTRAINT: "portConstraint", - STYLE_OPACITY: "opacity", - STYLE_TEXT_OPACITY: "textOpacity", - STYLE_OVERFLOW: "overflow", - STYLE_ORTHOGONAL: "orthogonal", - STYLE_EXIT_X: "exitX", - STYLE_EXIT_Y: "exitY", - STYLE_EXIT_PERIMETER: "exitPerimeter", - STYLE_ENTRY_X: "entryX", - STYLE_ENTRY_Y: "entryY", - STYLE_ENTRY_PERIMETER: "entryPerimeter", - STYLE_WHITE_SPACE: "whiteSpace", - STYLE_ROTATION: "rotation", - STYLE_FILLCOLOR: "fillColor", - STYLE_SWIMLANE_FILLCOLOR: "swimlaneFillColor", - STYLE_GRADIENTCOLOR: "gradientColor", - STYLE_GRADIENT_DIRECTION: "gradientDirection", - STYLE_STROKECOLOR: "strokeColor", - STYLE_SEPARATORCOLOR: "separatorColor", - STYLE_STROKEWIDTH: "strokeWidth", - STYLE_ALIGN: "align", - STYLE_VERTICAL_ALIGN: "verticalAlign", - STYLE_LABEL_POSITION: "labelPosition", - STYLE_VERTICAL_LABEL_POSITION: "verticalLabelPosition", - STYLE_IMAGE_ASPECT: "imageAspect", - STYLE_IMAGE_ALIGN: "imageAlign", - STYLE_IMAGE_VERTICAL_ALIGN: "imageVerticalAlign", - STYLE_GLASS: "glass", - STYLE_IMAGE: "image", - STYLE_IMAGE_WIDTH: "imageWidth", - STYLE_IMAGE_HEIGHT: "imageHeight", - STYLE_IMAGE_BACKGROUND: "imageBackground", - STYLE_IMAGE_BORDER: "imageBorder", - STYLE_FLIPH: "flipH", - STYLE_FLIPV: "flipV", - STYLE_NOLABEL: "noLabel", - STYLE_NOEDGESTYLE: "noEdgeStyle", - STYLE_LABEL_BACKGROUNDCOLOR: "labelBackgroundColor", - STYLE_LABEL_BORDERCOLOR: "labelBorderColor", - STYLE_LABEL_PADDING: "labelPadding", - STYLE_INDICATOR_SHAPE: "indicatorShape", - STYLE_INDICATOR_IMAGE: "indicatorImage", - STYLE_INDICATOR_COLOR: "indicatorColor", - STYLE_INDICATOR_STROKECOLOR: "indicatorStrokeColor", - STYLE_INDICATOR_GRADIENTCOLOR: "indicatorGradientColor", - STYLE_INDICATOR_SPACING: "indicatorSpacing", - STYLE_INDICATOR_WIDTH: "indicatorWidth", - STYLE_INDICATOR_HEIGHT: "indicatorHeight", - STYLE_INDICATOR_DIRECTION: "indicatorDirection", - STYLE_SHADOW: "shadow", - STYLE_SEGMENT: "segment", - STYLE_ENDARROW: "endArrow", - STYLE_STARTARROW: "startArrow", - STYLE_ENDSIZE: "endSize", - STYLE_STARTSIZE: "startSize", - STYLE_SWIMLANE_LINE: "swimlaneLine", - STYLE_ENDFILL: "endFill", - STYLE_STARTFILL: "startFill", - STYLE_DASHED: "dashed", - STYLE_DASH_PATTERN: "dashPattern", - STYLE_ROUNDED: "rounded", - STYLE_CURVED: "curved", - STYLE_ARCSIZE: "arcSize", - STYLE_SMOOTH: "smooth", - STYLE_SOURCE_PERIMETER_SPACING: "sourcePerimeterSpacing", - STYLE_TARGET_PERIMETER_SPACING: "targetPerimeterSpacing", - STYLE_PERIMETER_SPACING: "perimeterSpacing", - STYLE_SPACING: "spacing", - STYLE_SPACING_TOP: "spacingTop", - STYLE_SPACING_LEFT: "spacingLeft", - STYLE_SPACING_BOTTOM: "spacingBottom", - STYLE_SPACING_RIGHT: "spacingRight", - STYLE_HORIZONTAL: "horizontal", - STYLE_DIRECTION: "direction", - STYLE_ELBOW: "elbow", - STYLE_FONTCOLOR: "fontColor", - STYLE_FONTFAMILY: "fontFamily", - STYLE_FONTSIZE: "fontSize", - STYLE_FONTSTYLE: "fontStyle", - STYLE_AUTOSIZE: "autosize", - STYLE_FOLDABLE: "foldable", - STYLE_EDITABLE: "editable", - STYLE_BENDABLE: "bendable", - STYLE_MOVABLE: "movable", - STYLE_RESIZABLE: "resizable", - STYLE_CLONEABLE: "cloneable", - STYLE_DELETABLE: "deletable", - STYLE_SHAPE: "shape", - STYLE_EDGE: "edgeStyle", - STYLE_LOOP: "loopStyle", - STYLE_ROUTING_CENTER_X: "routingCenterX", - STYLE_ROUTING_CENTER_Y: "routingCenterY", - FONT_BOLD: 1, - FONT_ITALIC: 2, - FONT_UNDERLINE: 4, - FONT_SHADOW: 8, - SHAPE_RECTANGLE: "rectangle", - SHAPE_ELLIPSE: "ellipse", - SHAPE_DOUBLE_ELLIPSE: "doubleEllipse", - SHAPE_RHOMBUS: "rhombus", - SHAPE_LINE: "line", - SHAPE_IMAGE: "image", - SHAPE_ARROW: "arrow", - SHAPE_LABEL: "label", - SHAPE_CYLINDER: "cylinder", - SHAPE_SWIMLANE: "swimlane", - SHAPE_CONNECTOR: "connector", - SHAPE_ACTOR: "actor", - SHAPE_CLOUD: "cloud", - SHAPE_TRIANGLE: "triangle", - SHAPE_HEXAGON: "hexagon", - ARROW_CLASSIC: "classic", - ARROW_BLOCK: "block", - ARROW_OPEN: "open", - ARROW_OVAL: "oval", - ARROW_DIAMOND: "diamond", - ARROW_DIAMOND_THIN: "diamondThin", - ALIGN_LEFT: "left", - ALIGN_CENTER: "center", - ALIGN_RIGHT: "right", - ALIGN_TOP: "top", - ALIGN_MIDDLE: "middle", - ALIGN_BOTTOM: "bottom", - DIRECTION_NORTH: "north", - DIRECTION_SOUTH: "south", - DIRECTION_EAST: "east", - DIRECTION_WEST: "west", - DIRECTION_MASK_NONE: 0, - DIRECTION_MASK_WEST: 1, - DIRECTION_MASK_NORTH: 2, - DIRECTION_MASK_SOUTH: 4, - DIRECTION_MASK_EAST: 8, - DIRECTION_MASK_ALL: 15, - ELBOW_VERTICAL: "vertical", - ELBOW_HORIZONTAL: "horizontal", - EDGESTYLE_ELBOW: "elbowEdgeStyle", - EDGESTYLE_ENTITY_RELATION: "entityRelationEdgeStyle", - EDGESTYLE_LOOP: "loopEdgeStyle", - EDGESTYLE_SIDETOSIDE: "sideToSideEdgeStyle", - EDGESTYLE_TOPTOBOTTOM: "topToBottomEdgeStyle", - EDGESTYLE_ORTHOGONAL: "orthogonalEdgeStyle", - EDGESTYLE_SEGMENT: "segmentEdgeStyle", - PERIMETER_ELLIPSE: "ellipsePerimeter", - PERIMETER_RECTANGLE: "rectanglePerimeter", - PERIMETER_RHOMBUS: "rhombusPerimeter", - PERIMETER_TRIANGLE: "trianglePerimeter" - }; - -function mxEventObject(a) { - this.name = a; - this.properties = []; - for (var b = 1; b < arguments.length; b += 2) null != arguments[b + 1] && (this.properties[arguments[b]] = arguments[b + 1]) -} -mxEventObject.prototype.name = null; -mxEventObject.prototype.properties = null; -mxEventObject.prototype.consumed = !1; -mxEventObject.prototype.getName = function() { - return this.name -}; -mxEventObject.prototype.getProperties = function() { - return this.properties -}; -mxEventObject.prototype.getProperty = function(a) { - return this.properties[a] -}; -mxEventObject.prototype.isConsumed = function() { - return this.consumed -}; -mxEventObject.prototype.consume = function() { - this.consumed = !0 -}; - -function mxMouseEvent(a, b) { - this.evt = a; - this.state = b -} -mxMouseEvent.prototype.consumed = !1; -mxMouseEvent.prototype.evt = null; -mxMouseEvent.prototype.graphX = null; -mxMouseEvent.prototype.graphY = null; -mxMouseEvent.prototype.state = null; -mxMouseEvent.prototype.getEvent = function() { - return this.evt -}; -mxMouseEvent.prototype.getSource = function() { - return mxEvent.getSource(this.evt) -}; -mxMouseEvent.prototype.isSource = function(a) { - if (null != a) - for (var b = this.getSource(); null != b;) { - if (b == a.node) return !0; - b = b.parentNode - } - return !1 -}; -mxMouseEvent.prototype.getX = function() { - return mxEvent.getClientX(this.getEvent()) -}; -mxMouseEvent.prototype.getY = function() { - return mxEvent.getClientY(this.getEvent()) -}; -mxMouseEvent.prototype.getGraphX = function() { - return this.graphX -}; -mxMouseEvent.prototype.getGraphY = function() { - return this.graphY -}; -mxMouseEvent.prototype.getState = function() { - return this.state -}; -mxMouseEvent.prototype.getCell = function() { - var a = this.getState(); - return null != a ? a.cell : null -}; -mxMouseEvent.prototype.isPopupTrigger = function() { - return mxEvent.isPopupTrigger(this.getEvent()) -}; -mxMouseEvent.prototype.isConsumed = function() { - return this.consumed -}; -mxMouseEvent.prototype.consume = function(a) { - (null != a ? a : 1) && this.evt.preventDefault && this.evt.preventDefault(); - this.evt.returnValue = !1; - this.consumed = !0 -}; - -function mxEventSource(a) { - this.setEventSource(a) -} -mxEventSource.prototype.eventListeners = null; -mxEventSource.prototype.eventsEnabled = !0; -mxEventSource.prototype.eventSource = null; -mxEventSource.prototype.isEventsEnabled = function() { - return this.eventsEnabled -}; -mxEventSource.prototype.setEventsEnabled = function(a) { - this.eventsEnabled = a -}; -mxEventSource.prototype.getEventSource = function() { - return this.eventSource -}; -mxEventSource.prototype.setEventSource = function(a) { - this.eventSource = a -}; -mxEventSource.prototype.addListener = function(a, b) { - null == this.eventListeners && (this.eventListeners = []); - this.eventListeners.push(a); - this.eventListeners.push(b) -}; -mxEventSource.prototype.removeListener = function(a) { - if (null != this.eventListeners) - for (var b = 0; b < this.eventListeners.length;) this.eventListeners[b + 1] == a ? this.eventListeners.splice(b, 2) : b += 2 -}; -mxEventSource.prototype.fireEvent = function(a, b) { - if (null != this.eventListeners && this.isEventsEnabled()) { - null == a && (a = new mxEventObject); - null == b && (b = this.getEventSource()); - null == b && (b = this); - for (var c = [b, a], d = 0; d < this.eventListeners.length; d += 2) { - var e = this.eventListeners[d]; - (null == e || e == a.getName()) && this.eventListeners[d + 1].apply(this, c) - } - } -}; -var mxEvent = { - objects: [], - addListener: function() { - var a = function(a, c, d) { - null == a.mxListenerList && (a.mxListenerList = [], mxEvent.objects.push(a)); - a.mxListenerList.push({ - name: c, - f: d - }) - }; - return window.addEventListener ? function(b, c, d) { - b.addEventListener(c, d, !1); - a(b, c, d) - } : function(b, c, d) { - b.attachEvent("on" + c, d); - a(b, c, d) - } - }(), - removeListener: function() { - var a = function(a, c, d) { - if (null != a.mxListenerList) { - c = a.mxListenerList.length; - for (var e = 0; e < c; e++) - if (a.mxListenerList[e].f == d) { - a.mxListenerList.splice(e, 1); - break - } - 0 == - a.mxListenerList.length && (a.mxListenerList = null) - } - }; - return window.removeEventListener ? function(b, c, d) { - b.removeEventListener(c, d, !1); - a(b, c, d) - } : function(b, c, d) { - b.detachEvent("on" + c, d); - a(b, c, d) - } - }(), - removeAllListeners: function(a) { - var b = a.mxListenerList; - if (null != b) - for (; 0 < b.length;) { - var c = b[0]; - mxEvent.removeListener(a, c.name, c.f) - } - }, - addGestureListeners: function(a, b, c, d) { - null != b && mxEvent.addListener(a, "mousedown", b); - null != c && mxEvent.addListener(a, "mousemove", c); - null != d && mxEvent.addListener(a, "mouseup", d); - mxClient.IS_TOUCH && (null != b && mxEvent.addListener(a, "touchstart", b), null != c && mxEvent.addListener(a, "touchmove", c), null != d && mxEvent.addListener(a, "touchend", d)) - }, - removeGestureListeners: function(a, b, c, d) { - null != b && mxEvent.removeListener(a, "mousedown", b); - null != c && mxEvent.removeListener(a, "mousemove", c); - null != d && mxEvent.removeListener(a, "mouseup", d); - mxClient.IS_TOUCH && (null != b && mxEvent.removeListener(a, "touchstart", b), null != c && mxEvent.removeListener(a, "touchmove", c), null != d && mxEvent.removeListener(a, "touchend", - d)) - }, - redirectMouseEvents: function(a, b, c, d, e, f, g) { - var h = function(a) { - return "function" == typeof c ? c(a) : c - }; - mxEvent.addGestureListeners(a, function(a) { - null != d ? d(a) : mxEvent.isConsumed(a) || b.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a, h(a))) - }, function(a) { - null != e ? e(a) : mxEvent.isConsumed(a) || b.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(a, h(a))) - }, function(a) { - null != f ? f(a) : mxEvent.isConsumed(a) || b.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(a, h(a))) - }); - mxEvent.addListener(a, "dblclick", function(a) { - if (null != - g) g(a); - else if (!mxEvent.isConsumed(a)) { - var c = h(a); - b.dblClick(a, null != c ? c.cell : null) - } - }) - }, - release: function(a) { - if (null != a && (mxEvent.removeAllListeners(a), a = a.childNodes, null != a)) - for (var b = a.length, c = 0; c < b; c += 1) mxEvent.release(a[c]) - }, - addMouseWheelListener: function(a) { - if (null != a) { - var b = function(b) { - null == b && (b = window.event); - var d = 0, - d = mxClient.IS_NS && !mxClient.IS_SF && !mxClient.IS_GC ? -b.detail / 2 : b.wheelDelta / 120; - 0 != d && a(b, 0 < d) - }; - mxClient.IS_NS ? mxEvent.addListener(window, mxClient.IS_SF || mxClient.IS_GC ? "mousewheel" : - "DOMMouseScroll", b) : mxEvent.addListener(document, "mousewheel", b) - } - }, - disableContextMenu: function() { - return mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? function(a) { - mxEvent.addListener(a, "contextmenu", function() { - return !1 - }) - } : function(a) { - a.setAttribute("oncontextmenu", "return false;") - } - }(), - getSource: function(a) { - return null != a.srcElement ? a.srcElement : a.target - }, - isConsumed: function(a) { - return null != a.isConsumed && a.isConsumed - }, - isLeftMouseButton: function(a) { - return a.button == - (mxClient.IS_IE && ("undefined" === typeof document.documentMode || 9 > document.documentMode) ? 1 : 0) - }, - isRightMouseButton: function(a) { - return 2 == a.button - }, - isPopupTrigger: function(a) { - return mxEvent.isRightMouseButton(a) || mxEvent.isShiftDown(a) && !mxEvent.isControlDown(a) - }, - isShiftDown: function(a) { - return null != a ? a.shiftKey : !1 - }, - isAltDown: function(a) { - return null != a ? a.altKey : !1 - }, - isControlDown: function(a) { - return null != a ? a.ctrlKey : !1 - }, - isMetaDown: function(a) { - return null != a ? a.metaKey : !1 - }, - getMainEvent: function(a) { - ("touchstart" == - a.type || "touchmove" == a.type) && null != a.touches && null != a.touches[0] ? a = a.touches[0] : "touchend" == a.type && (null != a.changedTouches && null != a.changedTouches[0]) && (a = - a.changedTouches[0]); - return a - }, - getClientX: function(a) { - return mxEvent.getMainEvent(a).clientX - }, - getClientY: function(a) { - return mxEvent.getMainEvent(a).clientY - }, - consume: function(a, b, c) { - c = null != c ? c : !0; - if (null != b ? b : 1) a.preventDefault ? (c && a.stopPropagation(), a.preventDefault()) : c && (a.cancelBubble = !0); - a.isConsumed = !0; - a.returnValue = !1 - }, - LABEL_HANDLE: -1, - ROTATION_HANDLE: -2, - MOUSE_DOWN: "mouseDown", - MOUSE_MOVE: "mouseMove", - MOUSE_UP: "mouseUp", - ACTIVATE: "activate", - RESIZE_START: "resizeStart", - RESIZE: "resize", - RESIZE_END: "resizeEnd", - MOVE_START: "moveStart", - MOVE: "move", - MOVE_END: "moveEnd", - PAN_START: "panStart", - PAN: "pan", - PAN_END: "panEnd", - MINIMIZE: "minimize", - NORMALIZE: "normalize", - MAXIMIZE: "maximize", - HIDE: "hide", - SHOW: "show", - CLOSE: "close", - DESTROY: "destroy", - REFRESH: "refresh", - SIZE: "size", - SELECT: "select", - FIRED: "fired", - GET: "get", - RECEIVE: "receive", - CONNECT: "connect", - DISCONNECT: "disconnect", - SUSPEND: "suspend", - RESUME: "resume", - MARK: "mark", - SESSION: "session", - ROOT: "root", - POST: "post", - OPEN: "open", - SAVE: "save", - BEFORE_ADD_VERTEX: "beforeAddVertex", - ADD_VERTEX: "addVertex", - AFTER_ADD_VERTEX: "afterAddVertex", - DONE: "done", - EXECUTE: "execute", - EXECUTED: "executed", - BEGIN_UPDATE: "beginUpdate", - START_EDIT: "startEdit", - END_UPDATE: "endUpdate", - END_EDIT: "endEdit", - BEFORE_UNDO: "beforeUndo", - UNDO: "undo", - REDO: "redo", - CHANGE: "change", - NOTIFY: "notify", - LAYOUT_CELLS: "layoutCells", - CLICK: "click", - SCALE: "scale", - TRANSLATE: "translate", - SCALE_AND_TRANSLATE: "scaleAndTranslate", - UP: "up", - DOWN: "down", - ADD: "add", - REMOVE: "remove", - CLEAR: "clear", - ADD_CELLS: "addCells", - CELLS_ADDED: "cellsAdded", - MOVE_CELLS: "moveCells", - CELLS_MOVED: "cellsMoved", - RESIZE_CELLS: "resizeCells", - CELLS_RESIZED: "cellsResized", - TOGGLE_CELLS: "toggleCells", - CELLS_TOGGLED: "cellsToggled", - ORDER_CELLS: "orderCells", - CELLS_ORDERED: "cellsOrdered", - REMOVE_CELLS: "removeCells", - CELLS_REMOVED: "cellsRemoved", - GROUP_CELLS: "groupCells", - UNGROUP_CELLS: "ungroupCells", - REMOVE_CELLS_FROM_PARENT: "removeCellsFromParent", - FOLD_CELLS: "foldCells", - CELLS_FOLDED: "cellsFolded", - ALIGN_CELLS: "alignCells", - LABEL_CHANGED: "labelChanged", - CONNECT_CELL: "connectCell", - CELL_CONNECTED: "cellConnected", - SPLIT_EDGE: "splitEdge", - FLIP_EDGE: "flipEdge", - START_EDITING: "startEditing", - ADD_OVERLAY: "addOverlay", - REMOVE_OVERLAY: "removeOverlay", - UPDATE_CELL_SIZE: "updateCellSize", - ESCAPE: "escape", - CLICK: "click", - DOUBLE_CLICK: "doubleClick", - START: "start", - RESET: "reset" -}; - -function mxXmlRequest(a, b, c, d, e, f) { - this.url = a; - this.params = b; - this.method = c || "POST"; - this.async = null != d ? d : !0; - this.username = e; - this.password = f -} -mxXmlRequest.prototype.url = null; -mxXmlRequest.prototype.params = null; -mxXmlRequest.prototype.method = null; -mxXmlRequest.prototype.async = null; -mxXmlRequest.prototype.binary = !1; -mxXmlRequest.prototype.username = null; -mxXmlRequest.prototype.password = null; -mxXmlRequest.prototype.request = null; -mxXmlRequest.prototype.isBinary = function() { - return this.binary -}; -mxXmlRequest.prototype.setBinary = function(a) { - this.binary = a -}; -mxXmlRequest.prototype.getText = function() { - return this.request.responseText -}; -mxXmlRequest.prototype.isReady = function() { - return 4 == this.request.readyState -}; -mxXmlRequest.prototype.getDocumentElement = function() { - var a = this.getXml(); - return null != a ? a.documentElement : null -}; -mxXmlRequest.prototype.getXml = function() { - var a = this.request.responseXML; - if (9 <= document.documentMode || null == a || null == a.documentElement) a = mxUtils.parseXml(this.request.responseText); - return a -}; -mxXmlRequest.prototype.getText = function() { - return this.request.responseText -}; -mxXmlRequest.prototype.getStatus = function() { - return this.request.status -}; -mxXmlRequest.prototype.create = function() { - if (window.XMLHttpRequest) return function() { - var a = new XMLHttpRequest; - this.isBinary() && a.overrideMimeType && a.overrideMimeType("text/plain; charset\x3dx-user-defined"); - return a - }; - if ("undefined" != typeof ActiveXObject) return function() { - return new ActiveXObject("Microsoft.XMLHTTP") - } -}(); -mxXmlRequest.prototype.send = function(a, b) { - this.request = this.create(); - null != this.request && (null != a && (this.request.onreadystatechange = mxUtils.bind(this, function() { - this.isReady() && (a(this), this.onreadystatechaange = null) - })), this.request.open(this.method, this.url, this.async, this.username, this.password), this.setRequestHeaders(this.request, this.params), this.request.send(this.params)) -}; -mxXmlRequest.prototype.setRequestHeaders = function(a, b) { - null != b && a.setRequestHeader("Content-Type", "application/x-www-form-urlencoded") -}; -mxXmlRequest.prototype.simulate = function(a, b) { - a = a || document; - var c = null; - a == document && (c = window.onbeforeunload, window.onbeforeunload = null); - var d = a.createElement("form"); - d.setAttribute("method", this.method); - d.setAttribute("action", this.url); - null != b && d.setAttribute("target", b); - d.style.display = "none"; - d.style.visibility = "hidden"; - for (var e = 0 < this.params.indexOf("\x26") ? this.params.split("\x26") : this.params.split(), f = 0; f < e.length; f++) { - var g = e[f].indexOf("\x3d"); - if (0 < g) { - var h = e[f].substring(0, g), - k = e[f].substring(g + - 1), - g = a.createElement("textarea"); - g.setAttribute("name", h); - k = k.replace(/\n/g, "\x26#xa;"); - h = a.createTextNode(k); - g.appendChild(h); - d.appendChild(g) - } - } - a.body.appendChild(d); - d.submit(); - a.body.removeChild(d); - null != c && (window.onbeforeunload = c) -}; -var mxClipboard = { - STEPSIZE: 10, - insertCount: 1, - cells: null, - isEmpty: function() { - return null == mxClipboard.cells - }, - cut: function(a, b) { - b = mxClipboard.copy(a, b); - mxClipboard.insertCount = 0; - mxClipboard.removeCells(a, b); - return b - }, - removeCells: function(a, b) { - a.removeCells(b) - }, - copy: function(a, b) { - b = b || a.getSelectionCells(); - var c = a.getExportableCells(b); - mxClipboard.insertCount = 1; - mxClipboard.cells = a.cloneCells(c); - return c - }, - paste: function(a) { - if (null != mxClipboard.cells) { - var b = a.getImportableCells(mxClipboard.cells), - c = mxClipboard.insertCount * - mxClipboard.STEPSIZE, - d = a.getDefaultParent(), - b = a.importCells(b, c, c, d); - mxClipboard.insertCount++; - a.setSelectionCells(b) - } - } -}; - -function mxWindow(a, b, c, d, e, f, g, h, k, l) { - null != b && (g = null != g ? g : !0, this.content = b, this.init(c, d, e, f, l), this.installMaximizeHandler(), this.installMinimizeHandler(), this.installCloseHandler(), this.setMinimizable(g), - this.setTitle(a), (null == h || h) && this.installMoveHandler(), null != k && null != k.parentNode ? k.parentNode.replaceChild(this.div, k) : document.body.appendChild(this.div)) -} -mxWindow.prototype = new mxEventSource; -mxWindow.prototype.constructor = mxWindow; -mxWindow.prototype.closeImage = mxClient.imageBasePath + "/close.gif"; -mxWindow.prototype.minimizeImage = mxClient.imageBasePath + "/minimize.gif"; -mxWindow.prototype.normalizeImage = mxClient.imageBasePath + "/normalize.gif"; -mxWindow.prototype.maximizeImage = mxClient.imageBasePath + "/maximize.gif"; -mxWindow.prototype.resizeImage = mxClient.imageBasePath + "/resize.gif"; -mxWindow.prototype.visible = !1; -mxWindow.prototype.content = !1; -mxWindow.prototype.minimumSize = new mxRectangle(0, 0, 50, 40); -mxWindow.prototype.title = !1; -mxWindow.prototype.content = !1; -mxWindow.prototype.destroyOnClose = !0; -mxWindow.prototype.init = function(a, b, c, d, e) { - e = null != e ? e : "mxWindow"; - this.div = document.createElement("div"); - this.div.className = e; - this.div.style.left = a + "px"; - this.div.style.top = b + "px"; - this.table = document.createElement("table"); - this.table.className = e; - null != c && (mxClient.IS_IE || (this.div.style.width = c + "px"), this.table.style.width = c + "px"); - null != d && (mxClient.IS_IE || (this.div.style.height = d + "px"), this.table.style.height = d + "px"); - a = document.createElement("tbody"); - b = document.createElement("tr"); - this.title = document.createElement("td"); - this.title.className = e + "Title"; - b.appendChild(this.title); - a.appendChild(b); - b = document.createElement("tr"); - this.td = document.createElement("td"); - this.td.className = e + "Pane"; - this.contentWrapper = document.createElement("div"); - this.contentWrapper.className = e + "Pane"; - this.contentWrapper.style.width = "100%"; - this.contentWrapper.appendChild(this.content); - if (mxClient.IS_IE || "DIV" != this.content.nodeName.toUpperCase()) this.contentWrapper.style.height = "100%"; - this.td.appendChild(this.contentWrapper); - b.appendChild(this.td); - a.appendChild(b); - this.table.appendChild(a); - this.div.appendChild(this.table); - e = mxUtils.bind(this, function(a) { - this.activate() - }); - mxEvent.addListener(this.title, "mousedown", e); - mxEvent.addListener(this.table, "mousedown", e); - mxClient.IS_TOUCH && (mxEvent.addListener(this.title, "touchstart", e), mxEvent.addListener(this.table, "touchstart", e)); - this.hide() -}; -mxWindow.prototype.setTitle = function(a) { - for (var b = this.title.firstChild; null != b;) { - var c = b.nextSibling; - b.nodeType == mxConstants.NODETYPE_TEXT && b.parentNode.removeChild(b); - b = c - } - mxUtils.write(this.title, a || "") -}; -mxWindow.prototype.setScrollable = function(a) { - 0 > navigator.userAgent.indexOf("Presto/2.5") && (this.contentWrapper.style.overflow = a ? "auto" : "hidden") -}; -mxWindow.prototype.activate = function() { - if (mxWindow.activeWindow != this) { - var a = mxUtils.getCurrentStyle(this.getElement()), - a = null != a ? a.zIndex : 3; - if (mxWindow.activeWindow) { - var b = mxWindow.activeWindow.getElement(); - null != b && null != b.style && (b.style.zIndex = a) - } - b = mxWindow.activeWindow; - this.getElement().style.zIndex = parseInt(a) + 1; - mxWindow.activeWindow = this; - this.fireEvent(new mxEventObject(mxEvent.ACTIVATE, "previousWindow", b)) - } -}; -mxWindow.prototype.getElement = function() { - return this.div -}; -mxWindow.prototype.fit = function() { - mxUtils.fit(this.div) -}; -mxWindow.prototype.isResizable = function() { - return null != this.resize ? "none" != this.resize.style.display : !1 -}; -mxWindow.prototype.setResizable = function(a) { - a ? null == this.resize ? (this.resize = document.createElement("img"), this.resize.style.position = "absolute", this.resize.style.bottom = "2px", this.resize.style.right = "2px", this.resize.setAttribute( - "src", mxClient.imageBasePath + "/resize.gif"), this.resize.style.cursor = "nw-resize", mxEvent.addGestureListeners(this.resize, mxUtils.bind(this, function(a) { - this.activate(); - var c = mxEvent.getClientX(a), - d = mxEvent.getClientY(a), - e = this.div.offsetWidth, - f = this.div.offsetHeight, - g = mxUtils.bind(this, - function(a) { - var b = mxEvent.getClientX(a) - c, - g = mxEvent.getClientY(a) - d; - this.setSize(e + b, f + g); - this.fireEvent(new mxEventObject(mxEvent.RESIZE, "event", a)); - mxEvent.consume(a) - }), - h = mxUtils.bind(this, function(a) { - mxEvent.removeGestureListeners(document, null, g, h); - this.fireEvent(new mxEventObject(mxEvent.RESIZE_END, "event", a)); - mxEvent.consume(a) - }); - mxEvent.addGestureListeners(document, null, g, h); - this.fireEvent(new mxEventObject(mxEvent.RESIZE_START, "event", a)); - mxEvent.consume(a) - }), null, null), this.div.appendChild(this.resize)) : - this.resize.style.display = "inline" : null != this.resize && (this.resize.style.display = "none") -}; -mxWindow.prototype.setSize = function(a, b) { - a = Math.max(this.minimumSize.width, a); - b = Math.max(this.minimumSize.height, b); - mxClient.IS_IE || (this.div.style.width = a + "px", this.div.style.height = b + "px"); - this.table.style.width = a + "px"; - this.table.style.height = b + "px"; - mxClient.IS_IE || (this.contentWrapper.style.height = this.div.offsetHeight - this.title.offsetHeight - 2 + "px") -}; -mxWindow.prototype.setMinimizable = function(a) { - this.minimize.style.display = a ? "" : "none" -}; -mxWindow.prototype.getMinimumSize = function() { - return new mxRectangle(0, 0, 0, this.title.offsetHeight) -}; -mxWindow.prototype.installMinimizeHandler = function() { - this.minimize = document.createElement("img"); - this.minimize.setAttribute("src", this.minimizeImage); - this.minimize.setAttribute("align", "right"); - this.minimize.setAttribute("title", "Minimize"); - this.minimize.style.cursor = "pointer"; - this.minimize.style.marginRight = "1px"; - this.minimize.style.display = "none"; - this.title.appendChild(this.minimize); - var a = !1, - b = null, - c = null, - d = mxUtils.bind(this, function(d) { - this.activate(); - if (a) a = !1, this.minimize.setAttribute("src", - this.minimizeImage), this.minimize.setAttribute("title", "Minimize"), this.contentWrapper.style.display = "", this.maximize.style.display = b, mxClient.IS_IE || (this.div.style.height = - c), this.table.style.height = c, null != this.resize && (this.resize.style.visibility = ""), this.fireEvent(new mxEventObject(mxEvent.NORMALIZE, "event", d)); - else { - a = !0; - this.minimize.setAttribute("src", this.normalizeImage); - this.minimize.setAttribute("title", "Normalize"); - this.contentWrapper.style.display = "none"; - b = this.maximize.style.display; - this.maximize.style.display = "none"; - c = this.table.style.height; - var f = this.getMinimumSize(); - 0 < f.height && (mxClient.IS_IE || (this.div.style.height = f.height + "px"), this.table.style.height = f.height + "px"); - 0 < f.width && (mxClient.IS_IE || (this.div.style.width = f.width + "px"), this.table.style.width = f.width + "px"); - null != this.resize && (this.resize.style.visibility = "hidden"); - this.fireEvent(new mxEventObject(mxEvent.MINIMIZE, "event", d)) - } - mxEvent.consume(d) - }); - mxEvent.addListener(this.minimize, "mousedown", d); - mxClient.IS_TOUCH && - mxEvent.addListener(this.minimize, "touchstart", d) -}; -mxWindow.prototype.setMaximizable = function(a) { - this.maximize.style.display = a ? "" : "none" -}; -mxWindow.prototype.installMaximizeHandler = function() { - this.maximize = document.createElement("img"); - this.maximize.setAttribute("src", this.maximizeImage); - this.maximize.setAttribute("align", "right"); - this.maximize.setAttribute("title", "Maximize"); - this.maximize.style.cursor = "default"; - this.maximize.style.marginLeft = "1px"; - this.maximize.style.cursor = "pointer"; - this.maximize.style.display = "none"; - this.title.appendChild(this.maximize); - var a = !1, - b = null, - c = null, - d = null, - e = null, - f = mxUtils.bind(this, function(f) { - this.activate(); - if ("none" != this.maximize.style.display) { - if (a) { - a = !1; - this.maximize.setAttribute("src", this.maximizeImage); - this.maximize.setAttribute("title", "Maximize"); - this.contentWrapper.style.display = ""; - this.minimize.style.visibility = ""; - this.div.style.left = b + "px"; - this.div.style.top = c + "px"; - if (!mxClient.IS_IE && (this.div.style.height = d, this.div.style.width = e, h = mxUtils.getCurrentStyle(this.contentWrapper), "auto" == h.overflow || null != this.resize)) this.contentWrapper - .style.height = this.div.offsetHeight - this.title.offsetHeight - - 2 + "px"; - this.table.style.height = d; - this.table.style.width = e; - null != this.resize && (this.resize.style.visibility = ""); - this.fireEvent(new mxEventObject(mxEvent.NORMALIZE, "event", f)) - } else { - a = !0; - this.maximize.setAttribute("src", this.normalizeImage); - this.maximize.setAttribute("title", "Normalize"); - this.contentWrapper.style.display = ""; - this.minimize.style.visibility = "hidden"; - b = parseInt(this.div.style.left); - c = parseInt(this.div.style.top); - d = this.table.style.height; - e = this.table.style.width; - this.div.style.left = "0px"; - this.div.style.top = "0px"; - mxClient.IS_IE || (this.div.style.height = document.body.clientHeight - 2 + "px", this.div.style.width = document.body.clientWidth - 2 + "px"); - this.table.style.width = document.body.clientWidth - 2 + "px"; - this.table.style.height = document.body.clientHeight - 2 + "px"; - null != this.resize && (this.resize.style.visibility = "hidden"); - if (!mxClient.IS_IE) { - var h = mxUtils.getCurrentStyle(this.contentWrapper); - if ("auto" == h.overflow || null != this.resize) this.contentWrapper.style.height = this.div.offsetHeight - this.title.offsetHeight - - 2 + "px" - } - this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE, "event", f)) - } - mxEvent.consume(f) - } - }); - mxEvent.addGestureListeners(this.maximize, f); - mxEvent.addListener(this.title, "dblclick", f) -}; -mxWindow.prototype.installMoveHandler = function() { - this.title.style.cursor = "move"; - mxEvent.addGestureListeners(this.title, mxUtils.bind(this, function(a) { - var b = mxEvent.getClientX(a), - c = mxEvent.getClientY(a), - d = this.getX(), - e = this.getY(), - f = mxUtils.bind(this, function(a) { - var f = mxEvent.getClientX(a) - b, - g = mxEvent.getClientY(a) - c; - this.setLocation(d + f, e + g); - this.fireEvent(new mxEventObject(mxEvent.MOVE, "event", a)); - mxEvent.consume(a) - }), - g = mxUtils.bind(this, function(a) { - mxEvent.removeGestureListeners(document, null, f, - g); - this.fireEvent(new mxEventObject(mxEvent.MOVE_END, "event", a)); - mxEvent.consume(a) - }); - mxEvent.addGestureListeners(document, null, f, g); - this.fireEvent(new mxEventObject(mxEvent.MOVE_START, "event", a)); - mxEvent.consume(a) - })) -}; -mxWindow.prototype.setLocation = function(a, b) { - this.div.style.left = a + "px"; - this.div.style.top = b + "px" -}; -mxWindow.prototype.getX = function() { - return parseInt(this.div.style.left) -}; -mxWindow.prototype.getY = function() { - return parseInt(this.div.style.top) -}; -mxWindow.prototype.installCloseHandler = function() { - this.closeImg = document.createElement("img"); - this.closeImg.setAttribute("src", this.closeImage); - this.closeImg.setAttribute("align", "right"); - this.closeImg.setAttribute("title", "Close"); - this.closeImg.style.marginLeft = "2px"; - this.closeImg.style.cursor = "pointer"; - this.closeImg.style.display = "none"; - this.title.insertBefore(this.closeImg, this.title.firstChild); - mxEvent.addGestureListeners(this.closeImg, mxUtils.bind(this, function(a) { - this.fireEvent(new mxEventObject(mxEvent.CLOSE, - "event", a)); - this.destroyOnClose ? this.destroy() : this.setVisible(!1); - mxEvent.consume(a) - })) -}; -mxWindow.prototype.setImage = function(a) { - this.image = document.createElement("img"); - this.image.setAttribute("src", a); - this.image.setAttribute("align", "left"); - this.image.style.marginRight = "4px"; - this.image.style.marginLeft = "0px"; - this.image.style.marginTop = "-2px"; - this.title.insertBefore(this.image, this.title.firstChild) -}; -mxWindow.prototype.setClosable = function(a) { - this.closeImg.style.display = a ? "" : "none" -}; -mxWindow.prototype.isVisible = function() { - return null != this.div ? "hidden" != this.div.style.visibility : !1 -}; -mxWindow.prototype.setVisible = function(a) { - null != this.div && this.isVisible() != a && (a ? this.show() : this.hide()) -}; -mxWindow.prototype.show = function() { - this.div.style.visibility = ""; - this.activate(); - var a = mxUtils.getCurrentStyle(this.contentWrapper); - if (!mxClient.IS_IE && ("auto" == a.overflow || null != this.resize)) this.contentWrapper.style.height = this.div.offsetHeight - this.title.offsetHeight - 2 + "px"; - this.fireEvent(new mxEventObject(mxEvent.SHOW)) -}; -mxWindow.prototype.hide = function() { - this.div.style.visibility = "hidden"; - this.fireEvent(new mxEventObject(mxEvent.HIDE)) -}; -mxWindow.prototype.destroy = function() { - this.fireEvent(new mxEventObject(mxEvent.DESTROY)); - null != this.div && (mxEvent.release(this.div), this.div.parentNode.removeChild(this.div), this.div = null); - this.contentWrapper = this.content = this.title = null -}; - -function mxForm(a) { - this.table = document.createElement("table"); - this.table.className = a; - this.body = document.createElement("tbody"); - this.table.appendChild(this.body) -} -mxForm.prototype.table = null; -mxForm.prototype.body = !1; -mxForm.prototype.getTable = function() { - return this.table -}; -mxForm.prototype.addButtons = function(a, b) { - var c = document.createElement("tr"), - d = document.createElement("td"); - c.appendChild(d); - var d = document.createElement("td"), - e = document.createElement("button"); - mxUtils.write(e, mxResources.get("ok") || "OK"); - d.appendChild(e); - mxEvent.addListener(e, "click", function() { - a() - }); - e = document.createElement("button"); - mxUtils.write(e, mxResources.get("cancel") || "Cancel"); - d.appendChild(e); - mxEvent.addListener(e, "click", function() { - b() - }); - c.appendChild(d); - this.body.appendChild(c) -}; -mxForm.prototype.addText = function(a, b) { - var c = document.createElement("input"); - c.setAttribute("type", "text"); - c.value = b; - return this.addField(a, c) -}; -mxForm.prototype.addCheckbox = function(a, b) { - var c = document.createElement("input"); - c.setAttribute("type", "checkbox"); - this.addField(a, c); - b && (c.checked = !0); - return c -}; -mxForm.prototype.addTextarea = function(a, b, c) { - var d = document.createElement("textarea"); - mxClient.IS_NS && c--; - d.setAttribute("rows", c || 2); - d.value = b; - return this.addField(a, d) -}; -mxForm.prototype.addCombo = function(a, b, c) { - var d = document.createElement("select"); - null != c && d.setAttribute("size", c); - b && d.setAttribute("multiple", "true"); - return this.addField(a, d) -}; -mxForm.prototype.addOption = function(a, b, c, d) { - var e = document.createElement("option"); - mxUtils.writeln(e, b); - e.setAttribute("value", c); - d && e.setAttribute("selected", d); - a.appendChild(e) -}; -mxForm.prototype.addField = function(a, b) { - var c = document.createElement("tr"), - d = document.createElement("td"); - mxUtils.write(d, a); - c.appendChild(d); - d = document.createElement("td"); - d.appendChild(b); - c.appendChild(d); - this.body.appendChild(c); - return b -}; - -function mxImage(a, b, c) { - this.src = a; - this.width = b; - this.height = c -} -mxImage.prototype.src = null; -mxImage.prototype.width = null; -mxImage.prototype.height = null; - -function mxDivResizer(a, b) { - if ("div" == a.nodeName.toLowerCase()) { - null == b && (b = window); - this.div = a; - var c = mxUtils.getCurrentStyle(a); - null != c && (this.resizeWidth = "auto" == c.width, this.resizeHeight = "auto" == c.height); - mxEvent.addListener(b, "resize", mxUtils.bind(this, function(a) { - this.handlingResize || (this.handlingResize = !0, this.resize(), this.handlingResize = !1) - })); - this.resize() - } -} -mxDivResizer.prototype.resizeWidth = !0; -mxDivResizer.prototype.resizeHeight = !0; -mxDivResizer.prototype.handlingResize = !1; -mxDivResizer.prototype.resize = function() { - var a = this.getDocumentWidth(), - b = this.getDocumentHeight(), - c = parseInt(this.div.style.left), - d = parseInt(this.div.style.right), - e = parseInt(this.div.style.top), - f = parseInt(this.div.style.bottom); - this.resizeWidth && (!isNaN(c) && !isNaN(d) && 0 <= c && 0 <= d && 0 < a - d - c) && (this.div.style.width = a - d - c + "px"); - this.resizeHeight && (!isNaN(e) && !isNaN(f) && 0 <= e && 0 <= f && 0 < b - e - f) && (this.div.style.height = b - e - f + "px") -}; -mxDivResizer.prototype.getDocumentWidth = function() { - return document.body.clientWidth -}; -mxDivResizer.prototype.getDocumentHeight = function() { - return document.body.clientHeight -}; - -function mxDragSource(a, b) { - this.element = a; - this.dropHandler = b; - mxEvent.addGestureListeners(a, mxUtils.bind(this, this.mouseDown)) -} -mxDragSource.prototype.element = null; -mxDragSource.prototype.dropHandler = null; -mxDragSource.prototype.dragOffset = null; -mxDragSource.prototype.dragElement = null; -mxDragSource.prototype.previewElement = null; -mxDragSource.prototype.enabled = !0; -mxDragSource.prototype.currentGraph = null; -mxDragSource.prototype.currentDropTarget = null; -mxDragSource.prototype.currentPoint = null; -mxDragSource.prototype.currentGuide = null; -mxDragSource.prototype.currentHighlight = null; -mxDragSource.prototype.autoscroll = !0; -mxDragSource.prototype.guidesEnabled = !0; -mxDragSource.prototype.gridEnabled = !0; -mxDragSource.prototype.highlightDropTargets = !0; -mxDragSource.prototype.dragElementZIndex = 100; -mxDragSource.prototype.dragElementOpacity = 70; -mxDragSource.prototype.isEnabled = function() { - return this.enabled -}; -mxDragSource.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxDragSource.prototype.isGuidesEnabled = function() { - return this.guidesEnabled -}; -mxDragSource.prototype.setGuidesEnabled = function(a) { - this.guidesEnabled = a -}; -mxDragSource.prototype.isGridEnabled = function() { - return this.gridEnabled -}; -mxDragSource.prototype.setGridEnabled = function(a) { - this.gridEnabled = a -}; -mxDragSource.prototype.getGraphForEvent = function(a) { - return null -}; -mxDragSource.prototype.getDropTarget = function(a, b, c) { - return a.getCellAt(b, c) -}; -mxDragSource.prototype.createDragElement = function(a) { - return this.element.cloneNode(!0) -}; -mxDragSource.prototype.createPreviewElement = function(a) { - return null -}; -mxDragSource.prototype.mouseDown = function(a) { - this.enabled && (!mxEvent.isConsumed(a) && null == this.mouseMoveHandler) && (this.startDrag(a), this.mouseMoveHandler = mxUtils.bind(this, this.mouseMove), this.mouseUpHandler = mxUtils.bind( - this, this.mouseUp), mxEvent.addGestureListeners(document, null, this.mouseMoveHandler, this.mouseUpHandler), mxEvent.consume(a, !0, !1)) -}; -mxDragSource.prototype.startDrag = function(a) { - this.dragElement = this.createDragElement(a); - this.dragElement.style.position = "absolute"; - this.dragElement.style.zIndex = this.dragElementZIndex; - mxUtils.setOpacity(this.dragElement, this.dragElementOpacity) -}; -mxDragSource.prototype.stopDrag = function(a) { - null != this.dragElement && (null != this.dragElement.parentNode && this.dragElement.parentNode.removeChild(this.dragElement), this.dragElement = null) -}; -mxDragSource.prototype.graphContainsEvent = function(a, b) { - var c = mxEvent.getClientX(b), - d = mxEvent.getClientY(b), - e = mxUtils.getOffset(a.container), - f = mxUtils.getScrollOrigin(); - return c >= e.x - f.x && d >= e.y - f.y && c <= e.x - f.x + a.container.offsetWidth && d <= e.y - f.y + a.container.offsetHeight -}; -mxDragSource.prototype.mouseMove = function(a) { - var b = this.getGraphForEvent(a); - null != b && !this.graphContainsEvent(b, a) && (b = null); - b != this.currentGraph && (null != this.currentGraph && this.dragExit(this.currentGraph), this.currentGraph = b, null != this.currentGraph && this.dragEnter(this.currentGraph)); - null != this.currentGraph && this.dragOver(this.currentGraph, a); - if (null != this.dragElement && (null == this.previewElement || "visible" != this.previewElement.style.visibility)) { - var b = mxEvent.getClientX(a), - c = mxEvent.getClientY(a); - null == this.dragElement.parentNode && document.body.appendChild(this.dragElement); - this.dragElement.style.visibility = "visible"; - null != this.dragOffset && (b += this.dragOffset.x, c += this.dragOffset.y); - b += document.body.scrollLeft || document.documentElement.scrollLeft; - c += document.body.scrollTop || document.documentElement.scrollTop; - this.dragElement.style.left = b + "px"; - this.dragElement.style.top = c + "px" - } else null != this.dragElement && (this.dragElement.style.visibility = "hidden"); - mxEvent.consume(a) -}; -mxDragSource.prototype.mouseUp = function(a) { - if (null != this.currentGraph) { - if (null != this.currentPoint && (null == this.previewElement || "hidden" != this.previewElement.style.visibility)) { - var b = this.currentGraph.view.scale, - c = this.currentGraph.view.translate; - this.drop(this.currentGraph, a, this.currentDropTarget, this.currentPoint.x / b - c.x, this.currentPoint.y / b - c.y) - } - this.dragExit(this.currentGraph) - } - this.stopDrag(a); - mxEvent.removeGestureListeners(document, null, this.mouseMoveHandler, this.mouseUpHandler); - this.currentGraph = - this.mouseUpHandler = this.mouseMoveHandler = null; - mxEvent.consume(a) -}; -mxDragSource.prototype.dragEnter = function(a) { - a.isMouseDown = !0; - this.previewElement = this.createPreviewElement(a); - this.isGuidesEnabled() && null != this.previewElement && (this.currentGuide = new mxGuide(a, a.graphHandler.getGuideStates())); - this.highlightDropTargets && (this.currentHighlight = new mxCellHighlight(a, mxConstants.DROP_TARGET_COLOR)) -}; -mxDragSource.prototype.dragExit = function(a) { - this.currentPoint = this.currentDropTarget = null; - a.isMouseDown = !1; - null != this.previewElement && (null != this.previewElement.parentNode && this.previewElement.parentNode.removeChild(this.previewElement), this.previewElement = null); - null != this.currentGuide && (this.currentGuide.destroy(), this.currentGuide = null); - null != this.currentHighlight && (this.currentHighlight.destroy(), this.currentHighlight = null) -}; -mxDragSource.prototype.dragOver = function(a, b) { - var c = mxUtils.getOffset(a.container), - d = mxUtils.getScrollOrigin(a.container), - e = mxEvent.getClientX(b) - c.x + d.x, - c = mxEvent.getClientY(b) - c.y + d.y; - a.autoScroll && (null == this.autoscroll || this.autoscroll) && a.scrollPointToVisible(e, c, a.autoExtend); - null != this.currentHighlight && a.isDropEnabled() && (this.currentDropTarget = this.getDropTarget(a, e, c), d = a.getView().getState(this.currentDropTarget), this.currentHighlight.highlight(d)); - if (null != this.previewElement) { - null == this.previewElement.parentNode && - (a.container.appendChild(this.previewElement), this.previewElement.style.zIndex = "3", this.previewElement.style.position = "absolute"); - var d = this.isGridEnabled() && a.isGridEnabledEvent(b), - f = !0; - if (null != this.currentGuide && this.currentGuide.isEnabledForEvent(b)) var f = parseInt(this.previewElement.style.width), - g = parseInt(this.previewElement.style.height), - f = new mxRectangle(0, 0, f, g), - c = new mxPoint(e, c), - c = this.currentGuide.move(f, c, d), - f = !1, - e = c.x, - c = c.y; - else if (d) var d = a.view.scale, - g = a.view.translate, - h = a.gridSize / - 2, - e = (a.snap(e / d - g.x - h) + g.x) * d, - c = (a.snap(c / d - g.y - h) + g.y) * d; - null != this.currentGuide && f && this.currentGuide.hide(); - null != this.previewOffset && (e += this.previewOffset.x, c += this.previewOffset.y); - this.previewElement.style.left = Math.round(e) + "px"; - this.previewElement.style.top = Math.round(c) + "px"; - this.previewElement.style.visibility = "visible" - } - this.currentPoint = new mxPoint(e, c) -}; -mxDragSource.prototype.drop = function(a, b, c, d, e) { - this.dropHandler(a, b, c, d, e); - a.container.focus() -}; - -function mxToolbar(a) { - this.container = a -} -mxToolbar.prototype = new mxEventSource; -mxToolbar.prototype.constructor = mxToolbar; -mxToolbar.prototype.container = null; -mxToolbar.prototype.enabled = !0; -mxToolbar.prototype.noReset = !1; -mxToolbar.prototype.updateDefaultMode = !0; -mxToolbar.prototype.addItem = function(a, b, c, d, e, f) { - var g = document.createElement(null != b ? "img" : "button"), - h = e || (null != f ? "mxToolbarMode" : "mxToolbarItem"); - g.className = h; - g.setAttribute("src", b); - null != a && (null != b ? g.setAttribute("title", a) : mxUtils.write(g, a)); - this.container.appendChild(g); - null != c && (mxEvent.addListener(g, "click", c), mxClient.IS_TOUCH && mxEvent.addListener(g, "touchend", c)); - a = mxUtils.bind(this, function(a) { - null != d ? g.setAttribute("src", b) : g.style.backgroundColor = "" - }); - mxEvent.addGestureListeners(g, - mxUtils.bind(this, function(a) { - null != d ? g.setAttribute("src", d) : g.style.backgroundColor = "gray"; - if (null != f) { - null == this.menu && (this.menu = new mxPopupMenu, this.menu.init()); - var b = this.currentImg; - this.menu.isMenuShowing() && this.menu.hideMenu(); - b != g && (this.currentImg = g, this.menu.factoryMethod = f, b = new mxPoint(g.offsetLeft, g.offsetTop + g.offsetHeight), this.menu.popup(b.x, b.y, null, a), this.menu.isMenuShowing() && - (g.className = h + "Selected", this.menu.hideMenu = function() { - mxPopupMenu.prototype.hideMenu.apply(this); - g.className = h; - this.currentImg = null - })) - } - }), null, a); - mxEvent.addListener(g, "mouseout", a); - return g -}; -mxToolbar.prototype.addCombo = function(a) { - var b = document.createElement("div"); - b.style.display = "inline"; - b.className = "mxToolbarComboContainer"; - var c = document.createElement("select"); - c.className = a || "mxToolbarCombo"; - b.appendChild(c); - this.container.appendChild(b); - return c -}; -mxToolbar.prototype.addActionCombo = function(a, b) { - var c = document.createElement("select"); - c.className = b || "mxToolbarCombo"; - this.addOption(c, a, null); - mxEvent.addListener(c, "change", function(a) { - var b = c.options[c.selectedIndex]; - c.selectedIndex = 0; - null != b.funct && b.funct(a) - }); - this.container.appendChild(c); - return c -}; -mxToolbar.prototype.addOption = function(a, b, c) { - var d = document.createElement("option"); - mxUtils.writeln(d, b); - "function" == typeof c ? d.funct = c : d.setAttribute("value", c); - a.appendChild(d); - return d -}; -mxToolbar.prototype.addSwitchMode = function(a, b, c, d, e) { - var f = document.createElement("img"); - f.initialClassName = e || "mxToolbarMode"; - f.className = f.initialClassName; - f.setAttribute("src", b); - f.altIcon = d; - null != a && f.setAttribute("title", a); - mxEvent.addListener(f, "click", mxUtils.bind(this, function(a) { - a = this.selectedMode.altIcon; - null != a ? (this.selectedMode.altIcon = this.selectedMode.getAttribute("src"), this.selectedMode.setAttribute("src", a)) : this.selectedMode.className = this.selectedMode.initialClassName; - this.updateDefaultMode && - (this.defaultMode = f); - this.selectedMode = f; - a = f.altIcon; - null != a ? (f.altIcon = f.getAttribute("src"), f.setAttribute("src", a)) : f.className = f.initialClassName + "Selected"; - this.fireEvent(new mxEventObject(mxEvent.SELECT)); - c() - })); - this.container.appendChild(f); - null == this.defaultMode && (this.defaultMode = f, this.selectMode(f), c()); - return f -}; -mxToolbar.prototype.addMode = function(a, b, c, d, e, f) { - f = null != f ? f : !0; - var g = document.createElement(null != b ? "img" : "button"); - g.initialClassName = e || "mxToolbarMode"; - g.className = g.initialClassName; - g.setAttribute("src", b); - g.altIcon = d; - null != a && g.setAttribute("title", a); - this.enabled && f && (mxEvent.addListener(g, "click", mxUtils.bind(this, function(a) { - this.selectMode(g, c); - this.noReset = !1 - })), mxEvent.addListener(g, "dblclick", mxUtils.bind(this, function(a) { - this.selectMode(g, c); - this.noReset = !0 - })), null == this.defaultMode && - (this.defaultMode = g, this.defaultFunction = c, this.selectMode(g, c))); - this.container.appendChild(g); - return g -}; -mxToolbar.prototype.selectMode = function(a, b) { - if (this.selectedMode != a) { - if (null != this.selectedMode) { - var c = this.selectedMode.altIcon; - null != c ? (this.selectedMode.altIcon = this.selectedMode.getAttribute("src"), this.selectedMode.setAttribute("src", c)) : this.selectedMode.className = this.selectedMode.initialClassName - } - this.selectedMode = a; - c = this.selectedMode.altIcon; - null != c ? (this.selectedMode.altIcon = this.selectedMode.getAttribute("src"), this.selectedMode.setAttribute("src", c)) : this.selectedMode.className = this.selectedMode.initialClassName + - "Selected"; - this.fireEvent(new mxEventObject(mxEvent.SELECT, "function", b)) - } -}; -mxToolbar.prototype.resetMode = function(a) { - (a || !this.noReset) && this.selectedMode != this.defaultMode && this.selectMode(this.defaultMode, this.defaultFunction) -}; -mxToolbar.prototype.addSeparator = function(a) { - return this.addItem(null, a, null) -}; -mxToolbar.prototype.addBreak = function() { - mxUtils.br(this.container) -}; -mxToolbar.prototype.addLine = function() { - var a = document.createElement("hr"); - a.style.marginRight = "6px"; - a.setAttribute("size", "1"); - this.container.appendChild(a) -}; -mxToolbar.prototype.destroy = function() { - mxEvent.release(this.container); - this.selectedMode = this.defaultFunction = this.defaultMode = this.container = null; - null != this.menu && this.menu.destroy() -}; - -function mxSession(a, b, c, d) { - this.model = a; - this.urlInit = b; - this.urlPoll = c; - this.urlNotify = d; - null != a && (this.codec = new mxCodec, this.codec.lookup = function(b) { - return a.getCell(b) - }); - a.addListener(mxEvent.NOTIFY, mxUtils.bind(this, function(a, b) { - var c = b.getProperty("edit"); - (null != c && this.debug || this.connected && !this.suspended) && this.notify("\x3cedit\x3e" + this.encodeChanges(c.changes, c.undone) + "\x3c/edit\x3e") - })) -} -mxSession.prototype = new mxEventSource; -mxSession.prototype.constructor = mxSession; -mxSession.prototype.model = null; -mxSession.prototype.urlInit = null; -mxSession.prototype.urlPoll = null; -mxSession.prototype.urlNotify = null; -mxSession.prototype.codec = null; -mxSession.prototype.linefeed = "\x26#xa;"; -mxSession.prototype.escapePostData = !0; -mxSession.prototype.significantRemoteChanges = !0; -mxSession.prototype.sent = 0; -mxSession.prototype.received = 0; -mxSession.prototype.debug = !1; -mxSession.prototype.connected = !1; -mxSession.prototype.suspended = !1; -mxSession.prototype.polling = !1; -mxSession.prototype.start = function() { - this.debug ? (this.connected = !0, this.fireEvent(new mxEventObject(mxEvent.CONNECT))) : this.connected || this.get(this.urlInit, mxUtils.bind(this, function(a) { - this.connected = !0; - this.fireEvent(new mxEventObject(mxEvent.CONNECT)); - this.poll() - })) -}; -mxSession.prototype.suspend = function() { - this.connected && !this.suspended && (this.suspended = !0, this.fireEvent(new mxEventObject(mxEvent.SUSPEND))) -}; -mxSession.prototype.resume = function(a, b, c) { - this.connected && this.suspended && (this.suspended = !1, this.fireEvent(new mxEventObject(mxEvent.RESUME)), this.polling || this.poll()) -}; -mxSession.prototype.stop = function(a) { - this.connected && (this.connected = !1); - this.fireEvent(new mxEventObject(mxEvent.DISCONNECT, "reason", a)) -}; -mxSession.prototype.poll = function() { - this.connected && !this.suspended && null != this.urlPoll ? (this.polling = !0, this.get(this.urlPoll, mxUtils.bind(this, function() { - this.poll() - }))) : this.polling = !1 -}; -mxSession.prototype.notify = function(a, b, c) { - null != a && 0 < a.length && (null != this.urlNotify && (this.debug ? (mxLog.show(), mxLog.debug("mxSession.notify: " + this.urlNotify + " xml\x3d" + a)) : (a = "\x3cmessage\x3e\x3cdelta\x3e" + a + - "\x3c/delta\x3e\x3c/message\x3e", this.escapePostData && (a = encodeURIComponent(a)), mxUtils.post(this.urlNotify, "xml\x3d" + a, b, c))), this.sent += a.length, this.fireEvent(new mxEventObject( - mxEvent.NOTIFY, "url", this.urlNotify, "xml", a))) -}; -mxSession.prototype.get = function(a, b, c) { - if ("undefined" != typeof mxUtils) { - var d = mxUtils.bind(this, function(a) { - null != c ? c(a) : this.stop(a) - }); - mxUtils.get(a, mxUtils.bind(this, function(c) { - if ("undefined" != typeof mxUtils) - if (c.isReady() && 404 != c.getStatus()) { - if (this.received += c.getText().length, this.fireEvent(new mxEventObject(mxEvent.GET, "url", a, "request", c)), this.isValidResponse(c)) { - if (0 < c.getText().length) { - var f = c.getDocumentElement(); - null == f ? d("Invalid response: " + c.getText()) : this.receive(f) - } - null != b && b(c) - } - } else d("Response not ready") - }), - function(a) { - d("Transmission error") - }) - } -}; -mxSession.prototype.isValidResponse = function(a) { - return 0 > a.getText().indexOf("\x3c?php") -}; -mxSession.prototype.encodeChanges = function(a, b) { - for (var c = "", d = b ? -1 : 1, e = b ? a.length - 1 : 0; 0 <= e && e < a.length; e += d) var f = this.codec.encode(a[e]), - c = c + mxUtils.getXml(f, this.linefeed); - return c -}; -mxSession.prototype.receive = function(a) { - if (null != a && a.nodeType == mxConstants.NODETYPE_ELEMENT) { - var b = a.getAttribute("namespace"); - null != b && (this.model.prefix = b + "-"); - for (b = a.firstChild; null != b;) { - var c = b.nodeName.toLowerCase(); - "state" == c ? this.processState(b) : "delta" == c && this.processDelta(b); - b = b.nextSibling - } - this.fireEvent(new mxEventObject(mxEvent.RECEIVE, "node", a)) - } -}; -mxSession.prototype.processState = function(a) { - (new mxCodec(a.ownerDocument)).decode(a.firstChild, this.model) -}; -mxSession.prototype.processDelta = function(a) { - for (a = a.firstChild; null != a;) "edit" == a.nodeName && this.processEdit(a), a = a.nextSibling -}; -mxSession.prototype.processEdit = function(a) { - a = this.decodeChanges(a); - if (0 < a.length) { - var b = this.createUndoableEdit(a); - this.model.fireEvent(new mxEventObject(mxEvent.CHANGE, "edit", b, "changes", a)); - this.model.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", b)); - this.fireEvent(new mxEventObject(mxEvent.FIRED, "edit", b)) - } -}; -mxSession.prototype.createUndoableEdit = function(a) { - var b = new mxUndoableEdit(this.model, this.significantRemoteChanges); - b.changes = a; - b.notify = function() { - b.source.fireEvent(new mxEventObject(mxEvent.CHANGE, "edit", b, "changes", b.changes)); - b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY, "edit", b, "changes", b.changes)) - }; - return b -}; -mxSession.prototype.decodeChanges = function(a) { - this.codec.document = a.ownerDocument; - var b = []; - for (a = a.firstChild; null != a;) { - var c = this.decodeChange(a); - null != c && b.push(c); - a = a.nextSibling - } - return b -}; -mxSession.prototype.decodeChange = function(a) { - var b = null; - a.nodeType == mxConstants.NODETYPE_ELEMENT && (b = "mxRootChange" == a.nodeName ? (new mxCodec(a.ownerDocument)).decode(a) : this.codec.decode(a), null != b && (b.model = this.model, b.execute(), - "mxChildChange" == a.nodeName && null == b.parent && this.cellRemoved(b.child))); - return b -}; -mxSession.prototype.cellRemoved = function(a, b) { - this.codec.putObject(a.getId(), a); - for (var c = this.model.getChildCount(a), d = 0; d < c; d++) this.cellRemoved(this.model.getChildAt(a, d)) -}; - -function mxUndoableEdit(a, b) { - this.source = a; - this.changes = []; - this.significant = null != b ? b : !0 -} -mxUndoableEdit.prototype.source = null; -mxUndoableEdit.prototype.changes = null; -mxUndoableEdit.prototype.significant = null; -mxUndoableEdit.prototype.undone = !1; -mxUndoableEdit.prototype.redone = !1; -mxUndoableEdit.prototype.isEmpty = function() { - return 0 == this.changes.length -}; -mxUndoableEdit.prototype.isSignificant = function() { - return this.significant -}; -mxUndoableEdit.prototype.add = function(a) { - this.changes.push(a) -}; -mxUndoableEdit.prototype.notify = function() {}; -mxUndoableEdit.prototype.die = function() {}; -mxUndoableEdit.prototype.undo = function() { - if (!this.undone) { - this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT)); - for (var a = this.changes.length - 1; 0 <= a; a--) { - var b = this.changes[a]; - null != b.execute ? b.execute() : null != b.undo && b.undo(); - this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED, "change", b)) - } - this.undone = !0; - this.redone = !1; - this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT)) - } - this.notify() -}; -mxUndoableEdit.prototype.redo = function() { - if (!this.redone) { - this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT)); - for (var a = this.changes.length, b = 0; b < a; b++) { - var c = this.changes[b]; - null != c.execute ? c.execute() : null != c.redo && c.redo(); - this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED, "change", c)) - } - this.undone = !1; - this.redone = !0; - this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT)) - } - this.notify() -}; - -function mxUndoManager(a) { - this.size = null != a ? a : 100; - this.clear() -} -mxUndoManager.prototype = new mxEventSource; -mxUndoManager.prototype.constructor = mxUndoManager; -mxUndoManager.prototype.size = null; -mxUndoManager.prototype.history = null; -mxUndoManager.prototype.indexOfNextAdd = 0; -mxUndoManager.prototype.isEmpty = function() { - return 0 == this.history.length -}; -mxUndoManager.prototype.clear = function() { - this.history = []; - this.indexOfNextAdd = 0; - this.fireEvent(new mxEventObject(mxEvent.CLEAR)) -}; -mxUndoManager.prototype.canUndo = function() { - return 0 < this.indexOfNextAdd -}; -mxUndoManager.prototype.undo = function() { - for (; 0 < this.indexOfNextAdd;) { - var a = this.history[--this.indexOfNextAdd]; - a.undo(); - if (a.isSignificant()) { - this.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", a)); - break - } - } -}; -mxUndoManager.prototype.canRedo = function() { - return this.indexOfNextAdd < this.history.length -}; -mxUndoManager.prototype.redo = function() { - for (var a = this.history.length; this.indexOfNextAdd < a;) { - var b = this.history[this.indexOfNextAdd++]; - b.redo(); - if (b.isSignificant()) { - this.fireEvent(new mxEventObject(mxEvent.REDO, "edit", b)); - break - } - } -}; -mxUndoManager.prototype.undoableEditHappened = function(a) { - this.trim(); - 0 < this.size && this.size == this.history.length && this.history.shift(); - this.history.push(a); - this.indexOfNextAdd = this.history.length; - this.fireEvent(new mxEventObject(mxEvent.ADD, "edit", a)) -}; -mxUndoManager.prototype.trim = function() { - if (this.history.length > this.indexOfNextAdd) - for (var a = this.history.splice(this.indexOfNextAdd, this.history.length - this.indexOfNextAdd), b = 0; b < a.length; b++) a[b].die() -}; -var mxUrlConverter = function(a) { - var b = !0, - c = null, - d = null; - return { - isEnabled: function() { - return b - }, - setEnabled: function(a) { - b = a - }, - getBaseUrl: function() { - return c - }, - setBaseUrl: function(a) { - c = a - }, - getBaseDomain: function() { - return c - }, - setBaseDomain: function(a) { - c = a - }, - isRelativeUrl: function(a) { - return "http://" != a.substring(0, 7) && "https://" != a.substring(0, 8) && "data:image" != a.substring(0, 10) - }, - convert: function(a) { - if (b && this.isRelativeUrl(a)) { - if (null == c) { - d = location.protocol + "//" + location.host; - c = d + location.pathname; - var f = c.lastIndexOf("/"); - 0 < f && (c = c.substring(0, f + 1)) - } - a = "/" == a.charAt(0) ? d + a : c + a - } - return a - } - } -}; - -function mxPanningManager(a) { - this.thread = null; - this.active = !1; - this.dy = this.dx = this.t0y = this.t0x = this.tdy = this.tdx = 0; - this.scrollbars = !1; - this.scrollTop = this.scrollLeft = 0; - this.mouseListener = { - mouseDown: function(a, b) {}, - mouseMove: function(a, b) {}, - mouseUp: mxUtils.bind(this, function(a, b) { - this.active && this.stop() - }) - }; - a.addMouseListener(this.mouseListener); - mxEvent.addListener(document, "mouseup", mxUtils.bind(this, function() { - this.active && this.stop() - })); - var b = mxUtils.bind(this, function() { - this.scrollbars = mxUtils.hasScrollbars(a.container); - this.scrollLeft = a.container.scrollLeft; - this.scrollTop = a.container.scrollTop; - return window.setInterval(mxUtils.bind(this, function() { - this.tdx -= this.dx; - this.tdy -= this.dy; - if (this.scrollbars) { - var b = -a.container.scrollLeft - Math.ceil(this.dx), - d = -a.container.scrollTop - Math.ceil(this.dy); - a.panGraph(b, d); - a.panDx = this.scrollLeft - a.container.scrollLeft; - a.panDy = this.scrollTop - a.container.scrollTop; - a.fireEvent(new mxEventObject(mxEvent.PAN)) - } else a.panGraph(this.getDx(), this.getDy()) - }), this.delay) - }); - this.isActive = - function() { - return active - }; - this.getDx = function() { - return Math.round(this.tdx) - }; - this.getDy = function() { - return Math.round(this.tdy) - }; - this.start = function() { - this.t0x = a.view.translate.x; - this.t0y = a.view.translate.y; - this.active = !0 - }; - this.panTo = function(c, d, e, f) { - this.active || this.start(); - this.scrollLeft = a.container.scrollLeft; - this.scrollTop = a.container.scrollTop; - f = null != f ? f : 0; - var g = a.container; - this.dx = c + (null != e ? e : 0) - g.scrollLeft - g.clientWidth; - 0 > this.dx && Math.abs(this.dx) < this.border ? this.dx = this.border + this.dx : - this.dx = this.handleMouseOut ? Math.max(this.dx, 0) : 0; - 0 == this.dx && (this.dx = c - g.scrollLeft, this.dx = 0 < this.dx && this.dx < this.border ? this.dx - this.border : this.handleMouseOut ? Math.min(0, this.dx) : 0); - this.dy = d + f - g.scrollTop - g.clientHeight; - 0 > this.dy && Math.abs(this.dy) < this.border ? this.dy = this.border + this.dy : this.dy = this.handleMouseOut ? Math.max(this.dy, 0) : 0; - 0 == this.dy && (this.dy = d - g.scrollTop, this.dy = 0 < this.dy && this.dy < this.border ? this.dy - this.border : this.handleMouseOut ? Math.min(0, this.dy) : 0); - 0 != this.dx || 0 != this.dy ? - (this.dx *= this.damper, this.dy *= this.damper, null == this.thread && (this.thread = b())) : null != this.thread && (window.clearInterval(this.thread), this.thread = null) - }; - this.stop = function() { - if (this.active) - if (this.active = !1, null != this.thread && (window.clearInterval(this.thread), this.thread = null), this.tdy = this.tdx = 0, this.scrollbars) a.panDx = 0, a.panDy = 0, a.fireEvent(new mxEventObject( - mxEvent.PAN)); - else { - var b = a.panDx, - d = a.panDy; - if (0 != b || 0 != d) a.panGraph(0, 0), a.view.setTranslate(this.t0x + b / a.view.scale, this.t0y + d / a.view.scale) - } - }; - this.destroy = function() { - a.removeMouseListener(this.mouseListener) - } -} -mxPanningManager.prototype.damper = 1 / 6; -mxPanningManager.prototype.delay = 10; -mxPanningManager.prototype.handleMouseOut = !0; -mxPanningManager.prototype.border = 0; - -function mxPopupMenu(a) { - this.factoryMethod = a; - null != a && this.init() -} -mxPopupMenu.prototype = new mxEventSource; -mxPopupMenu.prototype.constructor = mxPopupMenu; -mxPopupMenu.prototype.submenuImage = mxClient.imageBasePath + "/submenu.gif"; -mxPopupMenu.prototype.zIndex = 10006; -mxPopupMenu.prototype.factoryMethod = null; -mxPopupMenu.prototype.useLeftButtonForPopup = !1; -mxPopupMenu.prototype.enabled = !0; -mxPopupMenu.prototype.itemCount = 0; -mxPopupMenu.prototype.autoExpand = !1; -mxPopupMenu.prototype.smartSeparators = !1; -mxPopupMenu.prototype.labels = !0; -mxPopupMenu.prototype.init = function() { - this.table = document.createElement("table"); - this.table.className = "mxPopupMenu"; - this.tbody = document.createElement("tbody"); - this.table.appendChild(this.tbody); - this.div = document.createElement("div"); - this.div.className = "mxPopupMenu"; - this.div.style.display = "inline"; - this.div.style.zIndex = this.zIndex; - this.div.appendChild(this.table); - mxEvent.disableContextMenu(this.div) -}; -mxPopupMenu.prototype.isEnabled = function() { - return this.enabled -}; -mxPopupMenu.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxPopupMenu.prototype.isPopupTrigger = function(a) { - return a.isPopupTrigger() || this.useLeftButtonForPopup && mxEvent.isLeftMouseButton(a.getEvent()) -}; -mxPopupMenu.prototype.addItem = function(a, b, c, d, e, f) { - d = d || this; - this.itemCount++; - d.willAddSeparator && (d.containsItems && this.addSeparator(d, !0), d.willAddSeparator = !1); - d.containsItems = !0; - var g = document.createElement("tr"); - g.className = "mxPopupMenuItem"; - var h = document.createElement("td"); - h.className = "mxPopupMenuIcon"; - null != b ? (e = document.createElement("img"), e.src = b, h.appendChild(e)) : null != e && (b = document.createElement("div"), b.className = e, h.appendChild(b)); - g.appendChild(h); - this.labels && (h = document.createElement("td"), - h.className = "mxPopupMenuItem" + (null != f && !f ? " disabled" : ""), mxUtils.write(h, a), h.align = "left", g.appendChild(h), a = document.createElement("td"), a.className = - "mxPopupMenuItem" + (null != f && !f ? " disabled" : ""), a.style.paddingRight = "6px", a.style.textAlign = "right", g.appendChild(a), null == d.div && this.createSubmenu(d)); - d.tbody.appendChild(g); - if (null == f || f) mxEvent.addGestureListeners(g, mxUtils.bind(this, function(a) { - this.eventReceiver = g; - d.activeRow != g && d.activeRow != d && (null != d.activeRow && null != d.activeRow.div.parentNode && - this.hideSubmenu(d), null != g.div && (this.showSubmenu(d, g), d.activeRow = g)); - mxEvent.consume(a) - }), mxUtils.bind(this, function(a) { - d.activeRow != g && d.activeRow != d && (null != d.activeRow && null != d.activeRow.div.parentNode && this.hideSubmenu(d), this.autoExpand && null != g.div && (this.showSubmenu(d, g), d.activeRow = - g)); - g.className = "mxPopupMenuItemHover" - }), mxUtils.bind(this, function(a) { - this.eventReceiver == g && (d.activeRow != g && this.hideMenu(), null != c && c(a)); - this.eventReceiver = null; - mxEvent.consume(a) - })), mxEvent.addListener(g, - "mouseout", mxUtils.bind(this, function(a) { - g.className = "mxPopupMenuItem" - })); - return g -}; -mxPopupMenu.prototype.createSubmenu = function(a) { - a.table = document.createElement("table"); - a.table.className = "mxPopupMenu"; - a.tbody = document.createElement("tbody"); - a.table.appendChild(a.tbody); - a.div = document.createElement("div"); - a.div.className = "mxPopupMenu"; - a.div.style.position = "absolute"; - a.div.style.display = "inline"; - a.div.style.zIndex = this.zIndex; - a.div.appendChild(a.table); - var b = document.createElement("img"); - b.setAttribute("src", this.submenuImage); - td = a.firstChild.nextSibling.nextSibling; - td.appendChild(b) -}; -mxPopupMenu.prototype.showSubmenu = function(a, b) { - if (null != b.div) { - b.div.style.left = a.div.offsetLeft + b.offsetLeft + b.offsetWidth - 1 + "px"; - b.div.style.top = a.div.offsetTop + b.offsetTop + "px"; - document.body.appendChild(b.div); - var c = parseInt(b.div.offsetLeft), - d = parseInt(b.div.offsetWidth), - e = document.body, - f = document.documentElement; - if (c + d > (e.scrollLeft || f.scrollLeft) + (e.clientWidth || f.clientWidth)) b.div.style.left = a.div.offsetLeft - d + (mxClient.IS_IE ? 6 : -6) + "px"; - mxUtils.fit(b.div) - } -}; -mxPopupMenu.prototype.addSeparator = function(a, b) { - a = a || this; - if (this.smartSeparators && !b) a.willAddSeparator = !0; - else if (null != a.tbody) { - a.willAddSeparator = !1; - var c = document.createElement("tr"), - d = document.createElement("td"); - d.className = "mxPopupMenuIcon"; - d.style.padding = "0 0 0 0px"; - c.appendChild(d); - d = document.createElement("td"); - d.style.padding = "0 0 0 0px"; - d.setAttribute("colSpan", "2"); - var e = document.createElement("hr"); - e.setAttribute("size", "1"); - d.appendChild(e); - c.appendChild(d); - a.tbody.appendChild(c) - } -}; -mxPopupMenu.prototype.popup = function(a, b, c, d) { - if (null != this.div && null != this.tbody && null != this.factoryMethod) { - this.div.style.left = a + "px"; - for (this.div.style.top = b + "px"; null != this.tbody.firstChild;) mxEvent.release(this.tbody.firstChild), this.tbody.removeChild(this.tbody.firstChild); - this.itemCount = 0; - this.factoryMethod(this, c, d); - 0 < this.itemCount && (this.showMenu(), this.fireEvent(new mxEventObject(mxEvent.SHOW))) - } -}; -mxPopupMenu.prototype.isMenuShowing = function() { - return null != this.div && this.div.parentNode == document.body -}; -mxPopupMenu.prototype.showMenu = function() { - 9 <= document.documentMode && (this.div.style.filter = "none"); - document.body.appendChild(this.div); - mxUtils.fit(this.div) -}; -mxPopupMenu.prototype.hideMenu = function() { - null != this.div && (null != this.div.parentNode && this.div.parentNode.removeChild(this.div), this.hideSubmenu(this), this.containsItems = !1) -}; -mxPopupMenu.prototype.hideSubmenu = function(a) { - null != a.activeRow && (this.hideSubmenu(a.activeRow), null != a.activeRow.div.parentNode && a.activeRow.div.parentNode.removeChild(a.activeRow.div), a.activeRow = null) -}; -mxPopupMenu.prototype.destroy = function() { - null != this.div && (mxEvent.release(this.div), null != this.div.parentNode && this.div.parentNode.removeChild(this.div), this.div = null) -}; - -function mxAutoSaveManager(a) { - this.changeHandler = mxUtils.bind(this, function(a, c) { - this.isEnabled() && this.graphModelChanged(c.getProperty("edit").changes) - }); - this.setGraph(a) -} -mxAutoSaveManager.prototype = new mxEventSource; -mxAutoSaveManager.prototype.constructor = mxAutoSaveManager; -mxAutoSaveManager.prototype.graph = null; -mxAutoSaveManager.prototype.autoSaveDelay = 10; -mxAutoSaveManager.prototype.autoSaveThrottle = 2; -mxAutoSaveManager.prototype.autoSaveThreshold = 5; -mxAutoSaveManager.prototype.ignoredChanges = 0; -mxAutoSaveManager.prototype.lastSnapshot = 0; -mxAutoSaveManager.prototype.enabled = !0; -mxAutoSaveManager.prototype.changeHandler = null; -mxAutoSaveManager.prototype.isEnabled = function() { - return this.enabled -}; -mxAutoSaveManager.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxAutoSaveManager.prototype.setGraph = function(a) { - null != this.graph && this.graph.getModel().removeListener(this.changeHandler); - this.graph = a; - null != this.graph && this.graph.getModel().addListener(mxEvent.CHANGE, this.changeHandler) -}; -mxAutoSaveManager.prototype.save = function() {}; -mxAutoSaveManager.prototype.graphModelChanged = function(a) { - a = ((new Date).getTime() - this.lastSnapshot) / 1E3; - a > this.autoSaveDelay || this.ignoredChanges >= this.autoSaveThreshold && a > this.autoSaveThrottle ? (this.save(), this.reset()) : this.ignoredChanges++ -}; -mxAutoSaveManager.prototype.reset = function() { - this.lastSnapshot = (new Date).getTime(); - this.ignoredChanges = 0 -}; -mxAutoSaveManager.prototype.destroy = function() { - this.setGraph(null) -}; - -function mxAnimation(a) { - this.delay = null != a ? a : 20 -} -mxAnimation.prototype = new mxEventSource; -mxAnimation.prototype.constructor = mxAnimation; -mxAnimation.prototype.delay = null; -mxAnimation.prototype.thread = null; -mxAnimation.prototype.startAnimation = function() { - null == this.thread && (this.thread = window.setInterval(mxUtils.bind(this, this.updateAnimation), this.delay)) -}; -mxAnimation.prototype.updateAnimation = function() { - this.fireEvent(new mxEventObject(mxEvent.EXECUTE)) -}; -mxAnimation.prototype.stopAnimation = function() { - null != this.thread && (window.clearInterval(this.thread), this.thread = null, this.fireEvent(new mxEventObject(mxEvent.DONE))) -}; - -function mxMorphing(a, b, c, d) { - mxAnimation.call(this, d); - this.graph = a; - this.steps = null != b ? b : 6; - this.ease = null != c ? c : 1.5 -} -mxMorphing.prototype = new mxAnimation; -mxMorphing.prototype.constructor = mxMorphing; -mxMorphing.prototype.graph = null; -mxMorphing.prototype.steps = null; -mxMorphing.prototype.step = 0; -mxMorphing.prototype.ease = null; -mxMorphing.prototype.cells = null; -mxMorphing.prototype.updateAnimation = function() { - var a = new mxCellStatePreview(this.graph); - if (null != this.cells) - for (var b = 0; b < this.cells.length; b++) this.animateCell(cells[b], a, !1); - else this.animateCell(this.graph.getModel().getRoot(), a, !0); - this.show(a); - (a.isEmpty() || this.step++ >= this.steps) && this.stopAnimation() -}; -mxMorphing.prototype.show = function(a) { - a.show() -}; -mxMorphing.prototype.animateCell = function(a, b, c) { - var d = this.graph.getView().getState(a), - e = null; - if (null != d && (e = this.getDelta(d), this.graph.getModel().isVertex(a) && (0 != e.x || 0 != e.y))) { - var f = this.graph.view.getTranslate(), - g = this.graph.view.getScale(); - e.x += f.x * g; - e.y += f.y * g; - b.moveState(d, -e.x / this.ease, -e.y / this.ease) - } - if (c && !this.stopRecursion(d, e)) { - d = this.graph.getModel().getChildCount(a); - for (e = 0; e < d; e++) this.animateCell(this.graph.getModel().getChildAt(a, e), b, c) - } -}; -mxMorphing.prototype.stopRecursion = function(a, b) { - return null != b && (0 != b.x || 0 != b.y) -}; -mxMorphing.prototype.getDelta = function(a) { - var b = this.getOriginForCell(a.cell), - c = this.graph.getView().getTranslate(), - d = this.graph.getView().getScale(); - a = new mxPoint(a.x / d - c.x, a.y / d - c.y); - return new mxPoint((b.x - a.x) * d, (b.y - a.y) * d) -}; -mxMorphing.prototype.getOriginForCell = function(a) { - var b = null; - null != a && (b = this.getOriginForCell(this.graph.getModel().getParent(a)), a = this.graph.getCellGeometry(a), null != a && (b.x += a.x, b.y += a.y)); - null == b && (b = this.graph.view.getTranslate(), b = new mxPoint(-b.x, -b.y)); - return b -}; - -function mxImageBundle(a) { - this.images = []; - this.alt = null != a ? a : !1 -} -mxImageBundle.prototype.images = null; -mxImageBundle.prototype.images = null; -mxImageBundle.prototype.putImage = function(a, b, c) { - this.images[a] = { - value: b, - fallback: c - } -}; -mxImageBundle.prototype.getImage = function(a) { - var b = null; - null != a && (a = this.images[a], null != a && (b = this.alt ? a.fallback : a.value)); - return b -}; - -function mxImageExport() {} -mxImageExport.prototype.includeOverlays = !1; -mxImageExport.prototype.drawState = function(a, b) { - null != a && (this.visitStatesRecursive(a, b, this.drawCellState), this.includeOverlays && this.visitStatesRecursive(a, b, this.drawOverlays)) -}; -mxImageExport.prototype.visitStatesRecursive = function(a, b, c) { - if (null != a) { - c(a, b); - for (var d = a.view.graph, e = d.model.getChildCount(a.cell), f = 0; f < e; f++) { - var g = d.view.getState(d.model.getChildAt(a.cell, f)); - this.visitStatesRecursive(g, b, c) - } - } -}; -mxImageExport.prototype.drawCellState = function(a, b) { - a.shape instanceof mxShape && (b.save(), a.shape.paint(b), b.restore()); - null != a.text && (b.save(), a.text.paint(b), b.restore()) -}; -mxImageExport.prototype.drawOverlays = function(a, b) { - null != a.overlays && a.overlays.visit(function(a, d) { - d instanceof mxShape && d.paint(b) - }) -}; - -function mxAbstractCanvas2D() { - this.converter = this.createUrlConverter(); - this.reset() -} -mxAbstractCanvas2D.prototype.state = null; -mxAbstractCanvas2D.prototype.states = null; -mxAbstractCanvas2D.prototype.path = null; -mxAbstractCanvas2D.prototype.rotateHtml = !0; -mxAbstractCanvas2D.prototype.lastX = 0; -mxAbstractCanvas2D.prototype.lastY = 0; -mxAbstractCanvas2D.prototype.moveOp = "M"; -mxAbstractCanvas2D.prototype.lineOp = "L"; -mxAbstractCanvas2D.prototype.quadOp = "Q"; -mxAbstractCanvas2D.prototype.curveOp = "C"; -mxAbstractCanvas2D.prototype.closeOp = "Z"; -mxAbstractCanvas2D.prototype.pointerEvents = !1; -mxAbstractCanvas2D.prototype.createUrlConverter = function() { - return new mxUrlConverter -}; -mxAbstractCanvas2D.prototype.reset = function() { - this.state = this.createState(); - this.states = [] -}; -mxAbstractCanvas2D.prototype.createState = function() { - return { - dx: 0, - dy: 0, - scale: 1, - alpha: 1, - fillColor: null, - fillAlpha: 1, - gradientColor: null, - gradientAlpha: 1, - gradientDirection: null, - strokeColor: null, - strokeWidth: 1, - dashed: !1, - dashPattern: "3 3", - lineCap: "flat", - lineJoin: "miter", - miterLimit: 10, - fontColor: "#000000", - fontBackgroundColor: null, - fontBorderColor: null, - fontSize: mxConstants.DEFAULT_FONTSIZE, - fontFamily: mxConstants.DEFAULT_FONTFAMILY, - fontStyle: 0, - shadow: !1, - shadowColor: mxConstants.SHADOWCOLOR, - shadowAlpha: mxConstants.SHADOW_OPACITY, - shadowDx: mxConstants.SHADOW_OFFSET_X, - shadowDy: mxConstants.SHADOW_OFFSET_Y, - rotation: 0, - rotationCx: 0, - rotationCy: 0 - } -}; -mxAbstractCanvas2D.prototype.format = function(a) { - return Math.round(parseFloat(a)) -}; -mxAbstractCanvas2D.prototype.addOp = function() { - if (null != this.path && (this.path.push(arguments[0]), 2 < arguments.length)) - for (var a = this.state, b = 2; b < arguments.length; b += 2) this.lastX = arguments[b - 1], this.lastY = arguments[b], this.path.push(this.format((this.lastX + a.dx) * a.scale)), this.path.push( - this.format((this.lastY + a.dy) * a.scale)) -}; -mxAbstractCanvas2D.prototype.rotatePoint = function(a, b, c, d, e) { - c *= Math.PI / 180; - return mxUtils.getRotatedPoint(new mxPoint(a, b), Math.cos(c), Math.sin(c), new mxPoint(d, e)) -}; -mxAbstractCanvas2D.prototype.save = function() { - this.states.push(this.state); - this.state = mxUtils.clone(this.state) -}; -mxAbstractCanvas2D.prototype.restore = function() { - this.state = this.states.pop() -}; -mxAbstractCanvas2D.prototype.scale = function(a) { - this.state.scale *= a; - this.state.strokeWidth *= a -}; -mxAbstractCanvas2D.prototype.translate = function(a, b) { - this.state.dx += a; - this.state.dy += b -}; -mxAbstractCanvas2D.prototype.setAlpha = function(a) { - this.state.alpha = a -}; -mxAbstractCanvas2D.prototype.setFillColor = function(a) { - a == mxConstants.NONE && (a = null); - this.state.fillColor = a; - this.state.gradientColor = null -}; -mxAbstractCanvas2D.prototype.setGradient = function(a, b, c, d, e, f, g, h, k) { - c = this.state; - c.fillColor = a; - c.fillAlpha = null != h ? h : 1; - c.gradientColor = b; - c.gradientAlpha = null != k ? k : 1; - c.gradientDirection = g -}; -mxAbstractCanvas2D.prototype.setStrokeColor = function(a) { - a == mxConstants.NONE && (a = null); - this.state.strokeColor = a -}; -mxAbstractCanvas2D.prototype.setStrokeWidth = function(a) { - this.state.strokeWidth = a -}; -mxAbstractCanvas2D.prototype.setDashed = function(a) { - this.state.dashed = a -}; -mxAbstractCanvas2D.prototype.setDashPattern = function(a) { - this.state.dashPattern = a -}; -mxAbstractCanvas2D.prototype.setLineCap = function(a) { - this.state.lineCap = a -}; -mxAbstractCanvas2D.prototype.setLineJoin = function(a) { - this.state.lineJoin = a -}; -mxAbstractCanvas2D.prototype.setMiterLimit = function(a) { - this.state.miterLimit = a -}; -mxAbstractCanvas2D.prototype.setFontColor = function(a) { - a == mxConstants.NONE && (a = null); - this.state.fontColor = a -}; -mxAbstractCanvas2D.prototype.setFontBackgroundColor = function(a) { - a == mxConstants.NONE && (a = null); - this.state.fontBackgroundColor = a -}; -mxAbstractCanvas2D.prototype.setFontBorderColor = function(a) { - a == mxConstants.NONE && (a = null); - this.state.fontBorderColor = a -}; -mxAbstractCanvas2D.prototype.setFontSize = function(a) { - this.state.fontSize = a -}; -mxAbstractCanvas2D.prototype.setFontFamily = function(a) { - this.state.fontFamily = a -}; -mxAbstractCanvas2D.prototype.setFontStyle = function(a) { - null == a && (a = 0); - this.state.fontStyle = a -}; -mxAbstractCanvas2D.prototype.setShadow = function(a) { - this.state.shadow = a -}; -mxAbstractCanvas2D.prototype.setShadowColor = function(a) { - a == mxConstants.NONE && (a = null); - this.state.shadowColor = a -}; -mxAbstractCanvas2D.prototype.setShadowAlpha = function(a) { - this.state.shadowAlpha = a -}; -mxAbstractCanvas2D.prototype.setShadowOffset = function(a, b) { - this.state.shadowDx = a; - this.state.shadowDy = b -}; -mxAbstractCanvas2D.prototype.begin = function() { - this.lastY = this.lastX = 0; - this.path = [] -}; -mxAbstractCanvas2D.prototype.moveTo = function(a, b) { - this.addOp(this.moveOp, a, b) -}; -mxAbstractCanvas2D.prototype.lineTo = function(a, b) { - this.addOp(this.lineOp, a, b) -}; -mxAbstractCanvas2D.prototype.quadTo = function(a, b, c, d) { - this.addOp(this.quadOp, a, b, c, d) -}; -mxAbstractCanvas2D.prototype.curveTo = function(a, b, c, d, e, f) { - this.addOp(this.curveOp, a, b, c, d, e, f) -}; -mxAbstractCanvas2D.prototype.arcTo = function(a, b, c, d, e, f, g) { - a = mxUtils.arcToCurves(this.lastX, this.lastY, a, b, c, d, e, f, g); - for (b = 0; b < a.length; b += 6) this.curveTo(a[b], a[b + 1], a[b + 2], a[b + 3], a[b + 4], a[b + 5]) -}; -mxAbstractCanvas2D.prototype.close = function(a, b, c, d, e, f) { - this.addOp(this.closeOp) -}; -mxAbstractCanvas2D.prototype.end = function() {}; - -function mxXmlCanvas2D(a) { - mxAbstractCanvas2D.call(this); - this.root = a; - this.writeDefaults() -} -mxUtils.extend(mxXmlCanvas2D, mxAbstractCanvas2D); -mxXmlCanvas2D.prototype.textEnabled = !0; -mxXmlCanvas2D.prototype.compressed = !0; -mxXmlCanvas2D.prototype.writeDefaults = function() { - var a; - a = this.createElement("fontfamily"); - a.setAttribute("family", mxConstants.DEFAULT_FONTFAMILY); - this.root.appendChild(a); - a = this.createElement("fontsize"); - a.setAttribute("size", mxConstants.DEFAULT_FONTSIZE); - this.root.appendChild(a); - a = this.createElement("shadowcolor"); - a.setAttribute("color", mxConstants.SHADOWCOLOR); - this.root.appendChild(a); - a = this.createElement("shadowalpha"); - a.setAttribute("alpha", mxConstants.SHADOW_OPACITY); - this.root.appendChild(a); - a = this.createElement("shadowoffset"); - a.setAttribute("dx", mxConstants.SHADOW_OFFSET_X); - a.setAttribute("dy", mxConstants.SHADOW_OFFSET_Y); - this.root.appendChild(a) -}; -mxXmlCanvas2D.prototype.format = function(a) { - return parseFloat(parseFloat(a).toFixed(2)) -}; -mxXmlCanvas2D.prototype.createElement = function(a) { - return this.root.ownerDocument.createElement(a) -}; -mxXmlCanvas2D.prototype.save = function() { - this.compressed && mxAbstractCanvas2D.prototype.save.apply(this, arguments); - this.root.appendChild(this.createElement("save")) -}; -mxXmlCanvas2D.prototype.restore = function() { - this.compressed && mxAbstractCanvas2D.prototype.restore.apply(this, arguments); - this.root.appendChild(this.createElement("restore")) -}; -mxXmlCanvas2D.prototype.scale = function(a) { - if (this.compressed) { - if (this.state.scale == a) return; - mxAbstractCanvas2D.prototype.setAlpha.apply(this, arguments) - } - var b = this.createElement("scale"); - b.setAttribute("scale", a); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.translate = function(a, b) { - var c = this.createElement("translate"); - c.setAttribute("dx", this.format(a)); - c.setAttribute("dy", this.format(b)); - this.root.appendChild(c) -}; -mxXmlCanvas2D.prototype.rotate = function(a, b, c, d, e) { - var f = this.createElement("rotate"); - if (0 != a || b || c) f.setAttribute("theta", this.format(a)), f.setAttribute("flipH", b ? "1" : "0"), f.setAttribute("flipV", c ? "1" : "0"), f.setAttribute("cx", this.format(d)), f.setAttribute( - "cy", this.format(e)), this.root.appendChild(f) -}; -mxXmlCanvas2D.prototype.setAlpha = function(a) { - if (this.compressed) { - if (this.state.alpha == a) return; - mxAbstractCanvas2D.prototype.setAlpha.apply(this, arguments) - } - var b = this.createElement("alpha"); - b.setAttribute("alpha", this.format(a)); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setFillColor = function(a) { - a == mxConstants.NONE && (a = null); - if (this.compressed) { - if (this.state.fillColor == a) return; - mxAbstractCanvas2D.prototype.setFillColor.apply(this, arguments) - } - var b = this.createElement("fillcolor"); - b.setAttribute("color", null != a ? a : mxConstants.NONE); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setGradient = function(a, b, c, d, e, f, g, h, k) { - if (null != a && null != b) { - mxAbstractCanvas2D.prototype.setGradient.apply(this, arguments); - var l = this.createElement("gradient"); - l.setAttribute("c1", a); - l.setAttribute("c2", b); - l.setAttribute("x", this.format(c)); - l.setAttribute("y", this.format(d)); - l.setAttribute("w", this.format(e)); - l.setAttribute("h", this.format(f)); - null != g && l.setAttribute("direction", g); - null != h && l.setAttribute("alpha1", h); - null != k && l.setAttribute("alpha2", k); - this.root.appendChild(l) - } -}; -mxXmlCanvas2D.prototype.setStrokeColor = function(a) { - a == mxConstants.NONE && (a = null); - if (this.compressed) { - if (this.state.strokeColor == a) return; - mxAbstractCanvas2D.prototype.setStrokeColor.apply(this, arguments) - } - var b = this.createElement("strokecolor"); - b.setAttribute("color", null != a ? a : mxConstants.NONE); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setStrokeWidth = function(a) { - if (this.compressed) { - if (this.state.strokeWidth == a) return; - mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this, arguments) - } - var b = this.createElement("strokewidth"); - b.setAttribute("width", this.format(a)); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setDashed = function(a) { - if (this.compressed) { - if (this.state.dashed == a) return; - mxAbstractCanvas2D.prototype.setDashed.apply(this, arguments) - } - var b = this.createElement("dashed"); - b.setAttribute("dashed", a ? "1" : "0"); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setDashPattern = function(a) { - if (this.compressed) { - if (this.state.dashPattern == a) return; - mxAbstractCanvas2D.prototype.setDashPattern.apply(this, arguments) - } - var b = this.createElement("dashpattern"); - b.setAttribute("pattern", a); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setLineCap = function(a) { - if (this.compressed) { - if (this.state.lineCap == a) return; - mxAbstractCanvas2D.prototype.setLineCap.apply(this, arguments) - } - var b = this.createElement("linecap"); - b.setAttribute("cap", a); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setLineJoin = function(a) { - if (this.compressed) { - if (this.state.lineJoin == a) return; - mxAbstractCanvas2D.prototype.setLineJoin.apply(this, arguments) - } - var b = this.createElement("linejoin"); - b.setAttribute("join", a); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setMiterLimit = function(a) { - if (this.compressed) { - if (this.state.miterLimit == a) return; - mxAbstractCanvas2D.prototype.setMiterLimit.apply(this, arguments) - } - var b = this.createElement("miterlimit"); - b.setAttribute("limit", a); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setFontColor = function(a) { - if (this.textEnabled) { - a == mxConstants.NONE && (a = null); - if (this.compressed) { - if (this.state.fontColor == a) return; - mxAbstractCanvas2D.prototype.setFontColor.apply(this, arguments) - } - var b = this.createElement("fontcolor"); - b.setAttribute("color", null != a ? a : mxConstants.NONE); - this.root.appendChild(b) - } -}; -mxXmlCanvas2D.prototype.setFontBackgroundColor = function(a) { - if (this.textEnabled) { - a == mxConstants.NONE && (a = null); - if (this.compressed) { - if (this.state.fontBackgroundColor == a) return; - mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this, arguments) - } - var b = this.createElement("fontbackgroundcolor"); - b.setAttribute("color", null != a ? a : mxConstants.NONE); - this.root.appendChild(b) - } -}; -mxXmlCanvas2D.prototype.setFontBorderColor = function(a) { - if (this.textEnabled) { - a == mxConstants.NONE && (a = null); - if (this.compressed) { - if (this.state.fontBorderColor == a) return; - mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this, arguments) - } - var b = this.createElement("fontbordercolor"); - b.setAttribute("color", null != a ? a : mxConstants.NONE); - this.root.appendChild(b) - } -}; -mxXmlCanvas2D.prototype.setFontSize = function(a) { - if (this.textEnabled) { - if (this.compressed) { - if (this.state.fontSize == a) return; - mxAbstractCanvas2D.prototype.setFontSize.apply(this, arguments) - } - var b = this.createElement("fontsize"); - b.setAttribute("size", a); - this.root.appendChild(b) - } -}; -mxXmlCanvas2D.prototype.setFontFamily = function(a) { - if (this.textEnabled) { - if (this.compressed) { - if (this.state.fontFamily == a) return; - mxAbstractCanvas2D.prototype.setFontFamily.apply(this, arguments) - } - var b = this.createElement("fontfamily"); - b.setAttribute("family", a); - this.root.appendChild(b) - } -}; -mxXmlCanvas2D.prototype.setFontStyle = function(a) { - if (this.textEnabled) { - null == a && (a = 0); - if (this.compressed) { - if (this.state.fontStyle == a) return; - mxAbstractCanvas2D.prototype.setFontStyle.apply(this, arguments) - } - var b = this.createElement("fontstyle"); - b.setAttribute("style", a); - this.root.appendChild(b) - } -}; -mxXmlCanvas2D.prototype.setShadow = function(a) { - if (this.compressed) { - if (this.state.shadow == a) return; - mxAbstractCanvas2D.prototype.setShadow.apply(this, arguments) - } - var b = this.createElement("shadow"); - b.setAttribute("enabled", a ? "1" : "0"); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setShadowColor = function(a) { - if (this.compressed) { - a == mxConstants.NONE && (a = null); - if (this.state.shadowColor == a) return; - mxAbstractCanvas2D.prototype.setShadowColor.apply(this, arguments) - } - var b = this.createElement("shadowcolor"); - b.setAttribute("color", null != a ? a : mxConstants.NONE); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setShadowAlpha = function(a) { - if (this.compressed) { - if (this.state.shadowAlpha == a) return; - mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this, arguments) - } - var b = this.createElement("shadowalpha"); - b.setAttribute("alpha", a); - this.root.appendChild(b) -}; -mxXmlCanvas2D.prototype.setShadowOffset = function(a, b) { - if (this.compressed) { - if (this.state.shadowDx == a && this.state.shadowDy == b) return; - mxAbstractCanvas2D.prototype.setShadowOffset.apply(this, arguments) - } - var c = this.createElement("shadowoffset"); - c.setAttribute("dx", a); - c.setAttribute("dy", b); - this.root.appendChild(c) -}; -mxXmlCanvas2D.prototype.rect = function(a, b, c, d) { - var e = this.createElement("rect"); - e.setAttribute("x", this.format(a)); - e.setAttribute("y", this.format(b)); - e.setAttribute("w", this.format(c)); - e.setAttribute("h", this.format(d)); - this.root.appendChild(e) -}; -mxXmlCanvas2D.prototype.roundrect = function(a, b, c, d, e, f) { - var g = this.createElement("roundrect"); - g.setAttribute("x", this.format(a)); - g.setAttribute("y", this.format(b)); - g.setAttribute("w", this.format(c)); - g.setAttribute("h", this.format(d)); - g.setAttribute("dx", this.format(e)); - g.setAttribute("dy", this.format(f)); - this.root.appendChild(g) -}; -mxXmlCanvas2D.prototype.ellipse = function(a, b, c, d) { - var e = this.createElement("ellipse"); - e.setAttribute("x", this.format(a)); - e.setAttribute("y", this.format(b)); - e.setAttribute("w", this.format(c)); - e.setAttribute("h", this.format(d)); - this.root.appendChild(e) -}; -mxXmlCanvas2D.prototype.image = function(a, b, c, d, e, f, g, h) { - e = this.converter.convert(e); - var k = this.createElement("image"); - k.setAttribute("x", this.format(a)); - k.setAttribute("y", this.format(b)); - k.setAttribute("w", this.format(c)); - k.setAttribute("h", this.format(d)); - k.setAttribute("src", e); - k.setAttribute("aspect", f ? "1" : "0"); - k.setAttribute("flipH", g ? "1" : "0"); - k.setAttribute("flipV", h ? "1" : "0"); - this.root.appendChild(k) -}; -mxXmlCanvas2D.prototype.begin = function() { - this.root.appendChild(this.createElement("begin")); - this.lastY = this.lastX = 0 -}; -mxXmlCanvas2D.prototype.moveTo = function(a, b) { - var c = this.createElement("move"); - c.setAttribute("x", this.format(a)); - c.setAttribute("y", this.format(b)); - this.root.appendChild(c); - this.lastX = a; - this.lastY = b -}; -mxXmlCanvas2D.prototype.lineTo = function(a, b) { - var c = this.createElement("line"); - c.setAttribute("x", this.format(a)); - c.setAttribute("y", this.format(b)); - this.root.appendChild(c); - this.lastX = a; - this.lastY = b -}; -mxXmlCanvas2D.prototype.quadTo = function(a, b, c, d) { - var e = this.createElement("quad"); - e.setAttribute("x1", this.format(a)); - e.setAttribute("y1", this.format(b)); - e.setAttribute("x2", this.format(c)); - e.setAttribute("y2", this.format(d)); - this.root.appendChild(e); - this.lastX = c; - this.lastY = d -}; -mxXmlCanvas2D.prototype.curveTo = function(a, b, c, d, e, f) { - var g = this.createElement("curve"); - g.setAttribute("x1", this.format(a)); - g.setAttribute("y1", this.format(b)); - g.setAttribute("x2", this.format(c)); - g.setAttribute("y2", this.format(d)); - g.setAttribute("x3", this.format(e)); - g.setAttribute("y3", this.format(f)); - this.root.appendChild(g); - this.lastX = e; - this.lastY = f -}; -mxXmlCanvas2D.prototype.close = function() { - this.root.appendChild(this.createElement("close")) -}; -mxXmlCanvas2D.prototype.text = function(a, b, c, d, e, f, g, h, k, l, m, n) { - if (this.textEnabled && null != e) { - mxUtils.isNode(e) && (e = mxUtils.getOuterHtml(e)); - var p = this.createElement("text"); - p.setAttribute("x", this.format(a)); - p.setAttribute("y", this.format(b)); - p.setAttribute("w", this.format(c)); - p.setAttribute("h", this.format(d)); - p.setAttribute("str", e); - null != f && p.setAttribute("align", f); - null != g && p.setAttribute("valign", g); - p.setAttribute("wrap", h ? "1" : "0"); - null == k && (k = ""); - p.setAttribute("format", k); - null != l && p.setAttribute("fill", - l ? "1" : "0"); - null != m && p.setAttribute("clip", m ? "1" : "0"); - null != n && p.setAttribute("rotation", n); - this.root.appendChild(p) - } -}; -mxXmlCanvas2D.prototype.stroke = function() { - this.root.appendChild(this.createElement("stroke")) -}; -mxXmlCanvas2D.prototype.fill = function() { - this.root.appendChild(this.createElement("fill")) -}; -mxXmlCanvas2D.prototype.fillAndStroke = function() { - this.root.appendChild(this.createElement("fillstroke")) -}; - -function mxSvgCanvas2D(a, b) { - mxAbstractCanvas2D.call(this); - this.root = a; - this.gradients = []; - this.defs = null; - this.styleEnabled = null != b ? b : !1; - var c = null; - if (a.ownerDocument != document) - for (c = a; null != c && "svg" != c.nodeName;) c = c.parentNode; - null != c && (0 < c.getElementsByTagName("defs").length && (this.defs = c.getElementsByTagName("defs")[0]), null == this.defs && (this.defs = this.createElement("defs"), null != c.firstChild ? c.insertBefore( - this.defs, c.firstChild) : c.appendChild(this.defs)), this.styleEnabled && this.defs.appendChild(this.createStyle())) -} -mxUtils.extend(mxSvgCanvas2D, mxAbstractCanvas2D); -mxSvgCanvas2D.prototype.node = null; -mxSvgCanvas2D.prototype.matchHtmlAlignment = !0; -mxSvgCanvas2D.prototype.textEnabled = !0; -mxSvgCanvas2D.prototype.foEnabled = !0; -mxSvgCanvas2D.prototype.strokeTolerance = 0; -mxSvgCanvas2D.prototype.refCount = 0; -mxSvgCanvas2D.prototype.blockImagePointerEvents = !1; -mxSvgCanvas2D.prototype.reset = function() { - mxAbstractCanvas2D.prototype.reset.apply(this, arguments); - this.gradients = [] -}; -mxSvgCanvas2D.prototype.createStyle = function(a) { - a = this.createElement("style"); - a.setAttribute("type", "text/css"); - mxUtils.write(a, "svg{font-family:" + mxConstants.DEFAULT_FONTFAMILY + ";font-size:" + mxConstants.DEFAULT_FONTSIZE + ";fill:none;stroke-miterlimit:10}"); - return a -}; -mxSvgCanvas2D.prototype.createElement = function(a, b) { - if (null != this.root.ownerDocument.createElementNS) return this.root.ownerDocument.createElementNS(b || mxConstants.NS_SVG, a); - var c = this.root.ownerDocument.createElement(a); - null != b && c.setAttribute("xmlns", b); - return c -}; -mxSvgCanvas2D.prototype.createGradientId = function(a, b, c, d, e) { - "#" == a.charAt(0) && (a = a.substring(1)); - "#" == b.charAt(0) && (b = b.substring(1)); - a = a.toLowerCase() + "-" + c; - b = b.toLowerCase() + "-" + d; - c = null; - null == e || e == mxConstants.DIRECTION_SOUTH ? c = "s" : e == mxConstants.DIRECTION_EAST ? c = "e" : (d = a, a = b, b = d, e == mxConstants.DIRECTION_NORTH ? c = "s" : e == mxConstants.DIRECTION_WEST && - (c = "e")); - return "mx-gradient-" + a + "-" + b + "-" + c -}; -mxSvgCanvas2D.prototype.getSvgGradient = function(a, b, c, d, e) { - var f = this.createGradientId(a, b, c, d, e), - g = this.gradients[f]; - if (null == g) { - var h = this.root.ownerSVGElement, - k = 0, - l = f + "-" + k; - if (null != h) - for (g = h.ownerDocument.getElementById(l); null != g && g.ownerSVGElement != h;) l = f + "-" + k++, g = h.ownerDocument.getElementById(l); - else l = "id" + ++this.refCount; - null == g && (g = this.createSvgGradient(a, b, c, d, e), g.setAttribute("id", l), null != this.defs ? this.defs.appendChild(g) : h.appendChild(g)); - this.gradients[f] = g - } - return g.getAttribute("id") -}; -mxSvgCanvas2D.prototype.createSvgGradient = function(a, b, c, d, e) { - var f = this.createElement("linearGradient"); - f.setAttribute("x1", "0%"); - f.setAttribute("y1", "0%"); - f.setAttribute("x2", "0%"); - f.setAttribute("y2", "0%"); - null == e || e == mxConstants.DIRECTION_SOUTH ? f.setAttribute("y2", "100%") : e == mxConstants.DIRECTION_EAST ? f.setAttribute("x2", "100%") : e == mxConstants.DIRECTION_NORTH ? f.setAttribute( - "y1", "100%") : e == mxConstants.DIRECTION_WEST && f.setAttribute("x1", "100%"); - c = 1 > c ? ";stop-opacity:" + c : ""; - e = this.createElement("stop"); - e.setAttribute("offset", "0%"); - e.setAttribute("style", "stop-color:" + a + c); - f.appendChild(e); - c = 1 > d ? ";stop-opacity:" + d : ""; - e = this.createElement("stop"); - e.setAttribute("offset", "100%"); - e.setAttribute("style", "stop-color:" + b + c); - f.appendChild(e); - return f -}; -mxSvgCanvas2D.prototype.addNode = function(a, b) { - var c = this.node, - d = this.state; - if (null != c) { - if ("path" == c.nodeName) - if (null != this.path && 0 < this.path.length) c.setAttribute("d", this.path.join(" ")); - else return; - a && null != d.fillColor ? this.updateFill() : this.styleEnabled || ("ellipse" == c.nodeName && mxClient.IS_NS && !mxClient.IS_GC && !mxClient.IS_SF ? c.setAttribute("fill", "transparent") : c.setAttribute( - "fill", "none"), a = !1); - b && null != d.strokeColor ? this.updateStroke() : this.styleEnabled || c.setAttribute("stroke", "none"); - null != - d.transform && 0 < d.transform.length && c.setAttribute("transform", d.transform); - d.shadow && this.root.appendChild(this.createShadow(c)); - 0 < this.strokeTolerance && !a && this.root.appendChild(this.createTolerance(c)); - this.pointerEvents && ("path" != c.nodeName || this.path[this.path.length - 1] == this.closeOp) && c.setAttribute("pointer-events", "all"); - this.root.appendChild(c) - } -}; -mxSvgCanvas2D.prototype.updateFill = function() { - var a = this.state; - 1 > a.alpha && this.node.setAttribute("fill-opacity", a.alpha); - null != a.fillColor && (null != a.gradientColor ? (a = this.getSvgGradient(a.fillColor, a.gradientColor, a.fillAlpha, a.gradientAlpha, a.gradientDirection), this.node.setAttribute("fill", "url(#" + - a + ")")) : this.node.setAttribute("fill", a.fillColor.toLowerCase())) -}; -mxSvgCanvas2D.prototype.updateStroke = function() { - var a = this.state; - this.node.setAttribute("stroke", a.strokeColor.toLowerCase()); - 1 > a.alpha && this.node.setAttribute("stroke-opacity", a.alpha); - var b = Math.max(1, this.format(a.strokeWidth * a.scale)); - 1 != b && this.node.setAttribute("stroke-width", b); - "path" == this.node.nodeName && this.updateStrokeAttributes(); - a.dashed && this.node.setAttribute("stroke-dasharray", this.createDashPattern(b)) -}; -mxSvgCanvas2D.prototype.updateStrokeAttributes = function() { - var a = this.state; - null != a.lineJoin && "miter" != a.lineJoin && this.node.setAttribute("stroke-linejoin", a.lineJoin); - if (null != a.lineCap) { - var b = a.lineCap; - "flat" == b && (b = "butt"); - "butt" != b && this.node.setAttribute("stroke-linecap", b) - } - null != a.miterLimit && (!this.styleEnabled || 10 != a.miterLimit) && this.node.setAttribute("stroke-miterlimit", a.miterLimit) -}; -mxSvgCanvas2D.prototype.createDashPattern = function(a) { - var b = this.state.dashPattern.split(" "), - c = []; - if (0 < b.length) - for (var d = 0; d < b.length; d++) c[d] = Number(b[d]) * a; - return c.join(" ") -}; -mxSvgCanvas2D.prototype.createTolerance = function(a) { - a = a.cloneNode(!0); - var b = parseFloat(a.getAttribute("stroke-width") || 1) + this.strokeTolerance; - a.setAttribute("pointer-events", "stroke"); - a.setAttribute("visibility", "hidden"); - a.removeAttribute("stroke-dasharray"); - a.setAttribute("stroke-width", b); - a.setAttribute("fill", "none"); - a.setAttribute("stroke", mxClient.IS_OP ? "none" : "white"); - return a -}; -mxSvgCanvas2D.prototype.createShadow = function(a) { - a = a.cloneNode(!0); - var b = this.state; - "none" != a.getAttribute("fill") && a.setAttribute("fill", b.shadowColor); - "none" != a.getAttribute("stroke") && a.setAttribute("stroke", b.shadowColor); - a.setAttribute("transform", "translate(" + this.format(b.shadowDx * b.scale) + "," + this.format(b.shadowDy * b.scale) + ")" + (b.transform || "")); - a.setAttribute("opacity", b.shadowAlpha); - return a -}; -mxSvgCanvas2D.prototype.rotate = function(a, b, c, d, e) { - if (0 != a || b || c) { - var f = this.state; - d += f.dx; - e += f.dy; - d *= f.scale; - e *= f.scale; - f.transform = f.transform || ""; - if (b && c) a += 180; - else if (b ^ c) { - var g = b ? d : 0, - h = b ? -1 : 1, - k = c ? e : 0, - l = c ? -1 : 1; - f.transform += "translate(" + this.format(g) + "," + this.format(k) + ")scale(" + this.format(h) + "," + this.format(l) + ")translate(" + this.format(-g) + "," + this.format(-k) + ")" - } - if (b ? !c : c) a *= -1; - 0 != a && (f.transform += "rotate(" + this.format(a) + "," + this.format(d) + "," + this.format(e) + ")"); - f.rotation += a; - f.rotationCx = - d; - f.rotationCy = e - } -}; -mxSvgCanvas2D.prototype.begin = function() { - mxAbstractCanvas2D.prototype.begin.apply(this, arguments); - this.node = this.createElement("path") -}; -mxSvgCanvas2D.prototype.rect = function(a, b, c, d) { - var e = this.state, - f = this.createElement("rect"); - f.setAttribute("x", this.format((a + e.dx) * e.scale)); - f.setAttribute("y", this.format((b + e.dy) * e.scale)); - f.setAttribute("width", this.format(c * e.scale)); - f.setAttribute("height", this.format(d * e.scale)); - this.node = f -}; -mxSvgCanvas2D.prototype.roundrect = function(a, b, c, d, e, f) { - this.rect(a, b, c, d); - 0 < e && this.node.setAttribute("rx", this.format(e * this.state.scale)); - 0 < f && this.node.setAttribute("ry", this.format(f * this.state.scale)) -}; -mxSvgCanvas2D.prototype.ellipse = function(a, b, c, d) { - var e = this.state, - f = this.createElement("ellipse"); - f.setAttribute("cx", Math.round((a + c / 2 + e.dx) * e.scale)); - f.setAttribute("cy", Math.round((b + d / 2 + e.dy) * e.scale)); - f.setAttribute("rx", c / 2 * e.scale); - f.setAttribute("ry", d / 2 * e.scale); - this.node = f -}; -mxSvgCanvas2D.prototype.image = function(a, b, c, d, e, f, g, h) { - e = this.converter.convert(e); - f = null != f ? f : !0; - g = null != g ? g : !1; - h = null != h ? h : !1; - var k = this.state; - a += k.dx; - b += k.dy; - var l = this.createElement("image"); - l.setAttribute("x", this.format(a * k.scale)); - l.setAttribute("y", this.format(b * k.scale)); - l.setAttribute("width", this.format(c * k.scale)); - l.setAttribute("height", this.format(d * k.scale)); - null == l.setAttributeNS ? l.setAttribute("xlink:href", e) : l.setAttributeNS(mxConstants.NS_XLINK, "href", e); - f || l.setAttribute("preserveAspectRatio", - "none"); - 1 > k.alpha && l.setAttribute("opacity", k.alpha); - e = this.state.transform || ""; - if (g || h) { - var m = f = 1, - n = 0, - p = 0; - g && (f = -1, n = -c - 2 * a); - h && (m = -1, p = -d - 2 * b); - e += "scale(" + f + "," + m + ")translate(" + n + "," + p + ")" - } - 0 < e.length && l.setAttribute("transform", e); - this.root.appendChild(l); - this.blockImagePointerEvents && (l.setAttribute("style", "pointer-events:none"), l = this.createElement("rect"), l.setAttribute("visibility", "hidden"), l.setAttribute("pointer-events", "fill"), - l.setAttribute("x", this.format(a * k.scale)), l.setAttribute("y", - this.format(b * k.scale)), l.setAttribute("width", this.format(c * k.scale)), l.setAttribute("height", this.format(d * k.scale)), this.root.appendChild(l)) -}; -mxSvgCanvas2D.prototype.createDiv = function(a, b, c, d, e) { - c = this.state; - d = "display:inline-block;font-size:" + Math.round(c.fontSize) + "px;font-family:" + c.fontFamily + ";color:" + c.fontColor + ";line-height:" + Math.round(c.fontSize * mxConstants.LINE_HEIGHT) + - "px;" + d; - (c.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (d += "font-weight:bold;"); - (c.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && (d += "font-style:italic;"); - (c.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE && (d += "font-decoration:underline;"); - b == mxConstants.ALIGN_CENTER ? d += "text-align:center;" : b == mxConstants.ALIGN_RIGHT && (d += "text-align:right;"); - b = ""; - null != c.fontBackgroundColor && (b += "background-color:" + c.fontBackgroundColor + ";"); - null != c.fontBorderColor && (b += "border:1px solid " + c.fontBorderColor + ";"); - mxUtils.isNode(a) || (c = document.createElement("textarea"), c.innerHTML = a.replace(/</g, "\x26amp;lt;").replace(/>/g, "\x26amp;gt;").replace(//g, "\x26gt;"), a = - c.value, e ? d += b : 0 < b.length && (a = '\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"display:inline-block;' + - b + '"\x3e' + a + "\x3c/div\x3e")); - if (!mxClient.IS_IE && document.createElementNS) return e = document.createElementNS("http://www.w3.org/1999/xhtml", "div"), e.setAttribute("style", d), mxUtils.isNode(a) ? this.root.ownerDocument != - document ? e.appendChild(a.cloneNode(!0)) : e.appendChild(a) : e.innerHTML = a, e; - mxUtils.isNode(a) && this.root.ownerDocument != document && (a = a.outerHTML); - a = a.replace(/
/g, "\x3cbr /\x3e").replace(/
/g, "\x3chr /\x3e"); - return mxUtils.parseXml('\x3cdiv xmlns\x3d"http://www.w3.org/1999/xhtml" style\x3d"' + - d + '"\x3e' + a + "\x3c/div\x3e").documentElement -}; -mxSvgCanvas2D.prototype.text = function(a, b, c, d, e, f, g, h, k, l, m, n) { - if (this.textEnabled && null != e) { - n = null != n ? n : 0; - var p = this.state; - a += p.dx; - b += p.dy; - if (this.foEnabled && "html" == k) { - var q = "vertical-align:top;"; - m ? (q += "overflow:hidden;", 0 < d && (q += "max-height:" + Math.round(d) + "px;"), 0 < c && (q += "width:" + Math.round(c) + "px;")) : l && (q += "width:" + Math.round(c) + "px;", 0 < d && - (q += "max-height:" + Math.round(d) + "px;")); - h ? (!m && 0 < c && (q += "width:" + Math.round(c) + "px;"), q += "white-space:normal;") : q += "white-space:nowrap;"; - h = this.createElement("g"); - 1 > p.alpha && h.setAttribute("opacity", p.alpha); - k = this.createElement("foreignObject"); - k.setAttribute("pointer-events", "all"); - q = this.createDiv(e, f, g, q, l); - if (null != q) { - h.appendChild(k); - this.root.appendChild(h); - var s = 0; - if (mxClient.IS_IE && !mxClient.IS_SVG) { - var r = document.createElement("div"); - r.style.cssText = q.getAttribute("style"); - r.style.display = mxClient.IS_QUIRKS ? "inline" : "inline-block"; - r.style.visibility = "hidden"; - r.innerHTML = mxUtils.isNode(e) ? e.outerHTML : e; - document.body.appendChild(r); - s = r.offsetWidth; - d = mxClient.IS_QUIRKS && 0 < d && m ? Math.min(d, r.offsetHeight + 2) : r.offsetHeight; - r.parentNode.removeChild(r); - k.appendChild(q) - } else this.root.ownerDocument != document ? (q.style.visibility = "hidden", document.body.appendChild(q), s = q.offsetWidth, d = q.offsetHeight, k.appendChild(q), q.style.visibility = "") : - (k.appendChild(q), s = q.offsetWidth, d = q.offsetHeight); - c = l ? Math.max(c, s) : s; - 1 > p.alpha && h.setAttribute("opacity", p.alpha); - l = e = 0; - f == mxConstants.ALIGN_CENTER ? e -= c / 2 : f == mxConstants.ALIGN_RIGHT && (e -= c); - a += e; - g == mxConstants.ALIGN_MIDDLE ? - l -= d / 2 : g == mxConstants.ALIGN_BOTTOM && (l -= d); - b += l; - f = 1 != p.scale ? "scale(" + p.scale + ")" : ""; - 0 != p.rotation && this.rotateHtml ? (f += "rotate(" + p.rotation + "," + c / 2 + "," + d / 2 + ")", b = this.rotatePoint((a + c / 2) * p.scale, (b + d / 2) * p.scale, p.rotation, p.rotationCx, - p.rotationCy), a = b.x - c * p.scale / 2, b = b.y - d * p.scale / 2) : (a *= p.scale, b *= p.scale); - 0 != n && (f += "rotate(" + n + "," + -e + "," + -l + ")"); - h.setAttribute("transform", "translate(" + Math.round(a) + "," + Math.round(b) + ")" + f); - k.setAttribute("width", Math.round(Math.max(1, c))); - k.setAttribute("height", - Math.round(Math.max(1, d))) - } - } else this.plainText(a, b, c, d, e, f, g, h, l, m, n) - } -}; -mxSvgCanvas2D.prototype.createClip = function(a, b, c, d) { - a = Math.round(a); - b = Math.round(b); - c = Math.round(c); - d = Math.round(d); - for (var e = "mx-clip-" + a + "-" + b + "-" + c + "-" + d, f = 0, g = e + "-" + f; null != document.getElementById(g);) g = e + "-" + ++f; - clip = this.createElement("clipPath"); - clip.setAttribute("id", g); - e = this.createElement("rect"); - e.setAttribute("x", a); - e.setAttribute("y", b); - e.setAttribute("width", c); - e.setAttribute("height", d); - clip.appendChild(e); - return clip -}; -mxSvgCanvas2D.prototype.plainText = function(a, b, c, d, e, f, g, h, k, l, m) { - m = null != m ? m : 0; - h = this.state; - var n = Math.round(h.fontSize), - p = this.createElement("g"), - q = h.transform || ""; - 0 != m && (q += "rotate(" + m + "," + this.format(a * h.scale) + "," + this.format(b * h.scale) + ")"); - if (l && 0 < c && 0 < d) { - var s = a; - m = b; - f == mxConstants.ALIGN_CENTER ? s -= c / 2 : f == mxConstants.ALIGN_RIGHT && (s -= c); - g == mxConstants.ALIGN_MIDDLE ? m -= d / 2 : g == mxConstants.ALIGN_BOTTOM && (m -= d); - m = this.createClip(s * h.scale - 2, m * h.scale - 2, c * h.scale + 4, d * h.scale + 4); - null != this.defs ? this.defs.appendChild(m) : - this.root.appendChild(m); - p.setAttribute("clip-path", "url(#" + m.getAttribute("id") + ")") - } - this.updateFont(p, f); - m = f == mxConstants.ALIGN_RIGHT ? "end" : f == mxConstants.ALIGN_CENTER ? "middle" : "start"; - "start" != m && p.setAttribute("text-anchor", m); - (!this.styleEnabled || n != mxConstants.DEFAULT_FONTSIZE) && p.setAttribute("font-size", Math.round(n * h.scale) + "px"); - 0 < q.length && p.setAttribute("transform", q); - 1 > h.alpha && p.setAttribute("opacity", h.alpha); - var q = e.split("\n"), - s = Math.round(n * mxConstants.LINE_HEIGHT), - r = n + (q.length - - 1) * s; - m = b + n - 1; - g == mxConstants.ALIGN_MIDDLE ? (d = (this.matchHtmlAlignment && l && 0 < d ? Math.min(r, d) : r) / 2, m -= d + 1) : g == mxConstants.ALIGN_BOTTOM && (d = this.matchHtmlAlignment && l && 0 < d ? - Math.min(r, d) : r, m -= d + 2); - for (d = 0; d < q.length; d++) 0 < q[d].length && 0 < mxUtils.trim(q[d]).length && (l = this.createElement("text"), l.setAttribute("x", this.format(a * h.scale)), l.setAttribute("y", this.format( - m * h.scale)), mxUtils.write(l, q[d]), p.appendChild(l)), m += s; - this.root.appendChild(p); - this.addTextBackground(p, e, a, b, c, r, f, g, k) -}; -mxSvgCanvas2D.prototype.updateFont = function(a) { - var b = this.state; - a.setAttribute("fill", b.fontColor); - (!this.styleEnabled || b.fontFamily != mxConstants.DEFAULT_FONTFAMILY) && a.setAttribute("font-family", b.fontFamily); - (b.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && a.setAttribute("font-weight", "bold"); - (b.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && a.setAttribute("font-style", "italic"); - (b.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE && a.setAttribute("text-decoration", - "underline") -}; -mxSvgCanvas2D.prototype.addTextBackground = function(a, b, c, d, e, f, g, h, k) { - var l = this.state; - if (null != l.fontBackgroundColor || null != l.fontBorderColor) { - var m = null; - k ? (g == mxConstants.ALIGN_CENTER ? c -= e / 2 : g == mxConstants.ALIGN_RIGHT && (c -= e), h == mxConstants.ALIGN_MIDDLE ? d -= f / 2 : h == mxConstants.ALIGN_BOTTOM && (d -= f), m = new mxRectangle( - (c + 1) * l.scale, d * l.scale, (e - 2) * l.scale, (f + 2) * l.scale)) : null != a.getBBox && this.root.ownerDocument == document ? (m = a.getBBox(), b = mxClient.IS_IE && mxClient.IS_SVG, - m = new mxRectangle(m.x, m.y + (b ? 0 : - 1), m.width, m.height + (b ? 1 : 0))) : (m = document.createElement("div"), m.style.lineHeight = Math.round(l.fontSize * mxConstants.LINE_HEIGHT) + "px", m.style.fontSize = Math.round(l.fontSize) + - "px", m.style.fontFamily = l.fontFamily, m.style.whiteSpace = "nowrap", m.style.position = "absolute", m.style.visibility = "hidden", m.style.display = mxClient.IS_QUIRKS ? "inline" : - "inline-block", m.style.zoom = "1", (l.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (m.style.fontWeight = "bold"), (l.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && - (m.style.fontStyle = "italic"), b = mxUtils.htmlEntities(b, !1), m.innerHTML = b.replace(/\n/g, "\x3cbr/\x3e"), document.body.appendChild(m), e = m.offsetWidth, f = m.offsetHeight, m.parentNode - .removeChild(m), g == mxConstants.ALIGN_CENTER ? c -= e / 2 : g == mxConstants.ALIGN_RIGHT && (c -= e), h == mxConstants.ALIGN_MIDDLE ? d -= f / 2 : h == mxConstants.ALIGN_BOTTOM && (d -= f), - m = new mxRectangle((c + 1) * l.scale, (d + 2) * l.scale, e * l.scale, (f + 1) * l.scale)); - null != m && (b = this.createElement("rect"), b.setAttribute("fill", l.fontBackgroundColor || "none"), b.setAttribute("stroke", - l.fontBorderColor || "none"), b.setAttribute("x", Math.floor(m.x - 1)), b.setAttribute("y", Math.floor(m.y - 1)), b.setAttribute("width", Math.ceil(m.width + 2)), b.setAttribute("height", - Math.ceil(m.height)), l = null != l.fontBorderColor ? Math.max(1, this.format(l.scale)) : 0, b.setAttribute("stroke-width", l), this.root.ownerDocument == document && 1 == mxUtils.mod(l, - 2) && b.setAttribute("transform", "translate(0.5, 0.5)"), a.insertBefore(b, a.firstChild)) - } -}; -mxSvgCanvas2D.prototype.stroke = function() { - this.addNode(!1, !0) -}; -mxSvgCanvas2D.prototype.fill = function() { - this.addNode(!0, !1) -}; -mxSvgCanvas2D.prototype.fillAndStroke = function() { - this.addNode(!0, !0) -}; -var mxVmlCanvas2D = function(a) { - mxAbstractCanvas2D.call(this); - this.root = a -}; -mxUtils.extend(mxVmlCanvas2D, mxAbstractCanvas2D); -mxVmlCanvas2D.prototype.node = null; -mxVmlCanvas2D.prototype.textEnabled = !0; -mxVmlCanvas2D.prototype.moveOp = "m"; -mxVmlCanvas2D.prototype.lineOp = "l"; -mxVmlCanvas2D.prototype.curveOp = "c"; -mxVmlCanvas2D.prototype.closeOp = "x"; -mxVmlCanvas2D.prototype.rotatedHtmlBackground = ""; -mxVmlCanvas2D.prototype.vmlScale = 1; -mxVmlCanvas2D.prototype.addNode = function(a, b) { - var c = this.node, - d = this.state; - if (null != c) { - if ("shape" == c.nodeName) - if (null != this.path && 0 < this.path.length) c.path = this.path.join(" ") + " e", c.style.width = this.root.style.width, c.style.height = this.root.style.height, c.coordsize = parseInt(c.style - .width) + " " + parseInt(c.style.height); - else return; - c.strokeweight = this.format(Math.max(1, d.strokeWidth * d.scale / this.vmlScale)) + "px"; - d.shadow && this.root.appendChild(this.createShadow(c, a && null != d.fillColor, b && null != d.strokeColor)); - b && null != d.strokeColor ? (c.stroked = "true", c.strokecolor = d.strokeColor) : c.stroked = "false"; - c.appendChild(this.createStroke()); - a && null != d.fillColor ? c.appendChild(this.createFill()) : this.pointerEvents && ("shape" != c.nodeName || this.path[this.path.length - 1] == this.closeOp) ? c.appendChild(this.createTransparentFill()) : - c.filled = "false"; - this.root.appendChild(c) - } -}; -mxVmlCanvas2D.prototype.createTransparentFill = function() { - var a = document.createElement(mxClient.VML_PREFIX + ":fill"); - a.src = mxClient.imageBasePath + "/transparent.gif"; - a.type = "tile"; - return a -}; -mxVmlCanvas2D.prototype.createFill = function() { - var a = this.state, - b = document.createElement(mxClient.VML_PREFIX + ":fill"); - b.color = a.fillColor; - if (null != a.gradientColor) { - b.type = "gradient"; - b.method = "none"; - b.color2 = a.gradientColor; - var c = 180 - a.rotation, - c = a.gradientDirection == mxConstants.DIRECTION_WEST ? c - (90 + ("x" == this.root.style.flip ? 180 : 0)) : a.gradientDirection == mxConstants.DIRECTION_EAST ? c + (90 + ("x" == this.root.style - .flip ? 180 : 0)) : a.gradientDirection == mxConstants.DIRECTION_NORTH ? c - (180 + ("y" == this.root.style.flip ? - -180 : 0)) : c + ("y" == this.root.style.flip ? -180 : 0); - if ("x" == this.root.style.flip || "y" == this.root.style.flip) c *= -1; - b.angle = mxUtils.mod(c, 360); - b.opacity = 100 * a.alpha * a.fillAlpha + "%"; - b.setAttribute(mxClient.OFFICE_PREFIX + ":opacity2", 100 * a.alpha * a.gradientAlpha + "%") - } else 1 > a.alpha && (b.opacity = 100 * a.alpha + "%"); - return b -}; -mxVmlCanvas2D.prototype.createStroke = function() { - var a = this.state, - b = document.createElement(mxClient.VML_PREFIX + ":stroke"); - b.endcap = a.lineCap || "flat"; - b.joinstyle = a.lineJoin || "miter"; - b.miterlimit = a.miterLimit || "10"; - 1 > a.alpha && (b.opacity = 100 * a.alpha + "%"); - a.dashed && (b.dashstyle = this.getVmlDashStyle()); - return b -}; -mxVmlCanvas2D.prototype.getVmlDashStyle = function() { - var a = "dash"; - if (null != this.state.dashPattern) { - var b = this.state.dashPattern.split(" "); - 0 < b.length && 1 == b[0] && (a = "0 2") - } - return a -}; -mxVmlCanvas2D.prototype.createShadow = function(a, b, c) { - var d = this.state, - e = -d.rotation * (Math.PI / 180), - f = Math.cos(e), - e = Math.sin(e), - g = d.shadowDx * d.scale, - h = d.shadowDy * d.scale; - "x" == this.root.style.flip ? g *= -1 : "y" == this.root.style.flip && (h *= -1); - var k = a.cloneNode(!0); - k.style.marginLeft = Math.round(g * f - h * e) + "px"; - k.style.marginTop = Math.round(g * e + h * f) + "px"; - 8 == document.documentMode && (k.strokeweight = a.strokeweight, "shape" == a.nodeName && (k.path = this.path.join(" ") + " e", k.style.width = this.root.style.width, k.style.height = - this.root.style.height, k.coordsize = parseInt(a.style.width) + " " + parseInt(a.style.height))); - c ? (k.strokecolor = d.shadowColor, k.appendChild(this.createShadowStroke())) : k.stroked = "false"; - b ? k.appendChild(this.createShadowFill()) : k.filled = "false"; - return k -}; -mxVmlCanvas2D.prototype.createShadowFill = function() { - var a = document.createElement(mxClient.VML_PREFIX + ":fill"); - a.color = this.state.shadowColor; - a.opacity = 100 * this.state.alpha * this.state.shadowAlpha + "%"; - return a -}; -mxVmlCanvas2D.prototype.createShadowStroke = function() { - var a = this.createStroke(); - a.opacity = 100 * this.state.alpha * this.state.shadowAlpha + "%"; - return a -}; -mxVmlCanvas2D.prototype.rotate = function(a, b, c, d, e) { - b && c ? a += 180 : b ? this.root.style.flip = "x" : c && (this.root.style.flip = "y"); - if (b ? !c : c) a *= -1; - this.root.style.rotation = a; - this.state.rotation += a; - this.state.rotationCx = d; - this.state.rotationCy = e -}; -mxVmlCanvas2D.prototype.begin = function() { - mxAbstractCanvas2D.prototype.begin.apply(this, arguments); - this.node = document.createElement(mxClient.VML_PREFIX + ":shape"); - this.node.style.position = "absolute" -}; -mxVmlCanvas2D.prototype.quadTo = function(a, b, c, d) { - var e = this.state, - f = (this.lastX + e.dx) * e.scale, - g = (this.lastY + e.dy) * e.scale; - a = (a + e.dx) * e.scale; - b = (b + e.dy) * e.scale; - c = (c + e.dx) * e.scale; - d = (d + e.dy) * e.scale; - var g = g + 2 / 3 * (b - g), - h = c + 2 / 3 * (a - c); - b = d + 2 / 3 * (b - d); - this.path.push("c " + this.format(f + 2 / 3 * (a - f)) + " " + this.format(g) + " " + this.format(h) + " " + this.format(b) + " " + this.format(c) + " " + this.format(d)); - this.lastX = c / e.scale - e.dx; - this.lastY = d / e.scale - e.dy -}; -mxVmlCanvas2D.prototype.createRect = function(a, b, c, d, e) { - var f = this.state; - a = document.createElement(a); - a.style.position = "absolute"; - a.style.left = this.format((b + f.dx) * f.scale) + "px"; - a.style.top = this.format((c + f.dy) * f.scale) + "px"; - a.style.width = this.format(d * f.scale) + "px"; - a.style.height = this.format(e * f.scale) + "px"; - return a -}; -mxVmlCanvas2D.prototype.rect = function(a, b, c, d) { - this.node = this.createRect(mxClient.VML_PREFIX + ":rect", a, b, c, d) -}; -mxVmlCanvas2D.prototype.roundrect = function(a, b, c, d, e, f) { - this.node = this.createRect(mxClient.VML_PREFIX + ":roundrect", a, b, c, d); - this.node.setAttribute("arcsize", Math.max(100 * e / c, 100 * f / d) + "%") -}; -mxVmlCanvas2D.prototype.ellipse = function(a, b, c, d) { - this.node = this.createRect(mxClient.VML_PREFIX + ":oval", a, b, c, d) -}; -mxVmlCanvas2D.prototype.image = function(a, b, c, d, e, f, g, h) { - var k = null; - f ? (k = this.createRect(mxClient.VML_PREFIX + ":rect", a, b, c, d), k.stroked = "false", a = document.createElement(mxClient.VML_PREFIX + ":fill"), a.aspect = f ? "atmost" : "ignore", a.rotate = - "true", a.type = "frame", a.src = e, k.appendChild(a)) : (k = this.createRect(mxClient.VML_PREFIX + ":image", a, b, c, d), k.src = e); - g && h ? k.style.rotation = "180" : g ? k.style.flip = "x" : h && (k.style.flip = "y"); - 1 > this.state.alpha && (k.style.filter += "alpha(opacity\x3d" + 100 * this.state.alpha + ")"); - this.root.appendChild(k) -}; -mxVmlCanvas2D.prototype.createDiv = function(a, b, c, d) { - c = document.createElement("div"); - var e = this.state, - f = ""; - null != e.fontBackgroundColor && (f += "background-color:" + e.fontBackgroundColor + ";"); - null != e.fontBorderColor && (f += "border:1px solid " + e.fontBorderColor + ";"); - mxUtils.isNode(a) ? c.appendChild(a) : 0 < f.length && !d ? (d = document.createElement("div"), d.style.cssText = f, d.style.display = mxClient.IS_QUIRKS ? "inline" : "inline-block", d.style.zoom = - "1", d.innerHTML = a, c.appendChild(d)) : (c.style.cssText = f, c.innerHTML = a); - a = c.style; - a.fontSize = Math.round(e.fontSize / this.vmlScale) + "px"; - a.fontFamily = e.fontFamily; - a.color = e.fontColor; - a.verticalAlign = "top"; - a.textAlign = b || "left"; - a.lineHeight = Math.round(e.fontSize * mxConstants.LINE_HEIGHT / this.vmlScale) + "px"; - (e.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (a.fontWeight = "bold"); - (e.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && (a.fontStyle = "italic"); - (e.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE && (a.fontDecoration = "underline"); - return c -}; -mxVmlCanvas2D.prototype.text = function(a, b, c, d, e, f, g, h, k, l, m, n) { - if (this.textEnabled && null != e) { - var p = this.state; - if ("html" == k) { - null != p.rotation && (b = this.rotatePoint(a, b, p.rotation, p.rotationCx, p.rotationCy), a = b.x, b = b.y); - 8 == document.documentMode ? (a += p.dx, b += p.dy) : (a *= p.scale, b *= p.scale); - k = 8 == document.documentMode ? document.createElement(mxClient.VML_PREFIX + ":group") : document.createElement("div"); - k.style.position = "absolute"; - k.style.display = "inline"; - k.style.left = this.format(a) + "px"; - k.style.top = this.format(b) + - "px"; - k.style.zoom = p.scale; - var q = document.createElement("div"); - q.style.position = "relative"; - q.style.display = "inline"; - var s = mxUtils.getAlignmentAsPoint(f, g), - r = s.x, - s = s.y; - e = this.createDiv(e, f, g, l); - f = document.createElement("div"); - h ? (!m && 0 < c && (e.style.width = Math.round(c) + "px"), e.style.whiteSpace = "normal") : e.style.whiteSpace = "nowrap"; - h = p.rotation + (n || 0); - this.rotateHtml && 0 != h ? (f.style.display = "inline", f.style.zoom = "1", f.appendChild(e), 8 == document.documentMode && "DIV" != this.root.nodeName ? (q.appendChild(f), k.appendChild(q)) : - k.appendChild(f)) : 8 == document.documentMode ? (q.appendChild(e), k.appendChild(q)) : (e.style.display = "inline", k.appendChild(e)); - "DIV" != this.root.nodeName ? (n = document.createElement(mxClient.VML_PREFIX + ":rect"), n.stroked = "false", n.filled = "false", n.appendChild(k), this.root.appendChild(n)) : this.root.appendChild( - k); - m ? (e.style.overflow = "hidden", 0 < c && (e.style.width = Math.round(c) + "px"), 0 < d && 8 == document.documentMode && (e.style.maxHeight = Math.round(d) + "px")) : l && (e.style.width = c + - "px", 0 < d && (e.style.maxHeight = Math.round(d) + - "px")); - if (this.rotateHtml && 0 != h) { - c = h * (Math.PI / 180); - h = parseFloat(parseFloat(Math.cos(c)).toFixed(8)); - n = parseFloat(parseFloat(Math.sin(-c)).toFixed(8)); - c %= 2 * Math.PI; - 0 > c && (c += 2 * Math.PI); - c %= Math.PI; - c > Math.PI / 2 && (c = Math.PI - c); - g = Math.cos(c); - var t = Math.sin(c); - 8 == document.documentMode && (e.style.display = "inline-block", f.style.display = "inline-block", q.style.display = "inline-block"); - e.style.visibility = "hidden"; - document.body.appendChild(e); - c = e.offsetWidth; - q = e.offsetHeight; - if (mxClient.IS_QUIRKS && (m || l) && q > d) q = - d, e.style.height = q + "px"; - d = q; - m = (d - d * g + c * -t) / 2 - n * c * (r + 0.5) + h * d * (s + 0.5); - l = (c - c * g + d * -t) / 2 + h * c * (r + 0.5) + n * d * (s + 0.5); - "group" == k.nodeName && "DIV" == this.root.nodeName ? (r = document.createElement("div"), r.style.display = "inline-block", r.style.position = "absolute", r.style.left = this.format(a + (l - - c / 2) * p.scale) + "px", r.style.top = this.format(b + (m - d / 2) * p.scale) + "px", k.parentNode.appendChild(r), r.appendChild(k)) : (p = 8 == document.documentMode ? 1 : p.scale, k.style - .left = this.format(a + (l - c / 2) * p) + "px", k.style.top = this.format(b + (m - - d / 2) * p) + "px"); - f.style.filter = "progid:DXImageTransform.Microsoft.Matrix(M11\x3d" + h + ", M12\x3d" + n + ", M21\x3d" + -n + ", M22\x3d" + h + ", sizingMethod\x3d'auto expand')"; - f.style.backgroundColor = this.rotatedHtmlBackground; - 1 > this.state.alpha && (f.style.filter += "alpha(opacity\x3d" + 100 * this.state.alpha + ")"); - e.style.visibility = ""; - f.appendChild(e) - } else 8 != document.documentMode ? (e.style.verticalAlign = "top", 1 > this.state.alpha && (k.style.filter = "alpha(opacity\x3d" + 100 * this.state.alpha + ")"), p = e.parentNode, e.style.visibility = - "hidden", document.body.appendChild(e), c = e.offsetWidth, q = e.offsetHeight, mxClient.IS_QUIRKS && (m && q > d) && (q = d, e.style.height = q + "px"), d = q, e.style.visibility = "", p.appendChild( - e), k.style.left = this.format(a + c * r * this.state.scale) + "px", k.style.top = this.format(b + d * s * this.state.scale) + "px") : (1 > this.state.alpha && (e.style.filter = - "alpha(opacity\x3d" + 100 * this.state.alpha + ")"), q.style.left = 100 * r + "%", q.style.top = 100 * s + "%") - } else this.plainText(a, b, c, d, mxUtils.htmlEntities(e, !1), f, g, h, k, l, m, n) - } -}; -mxVmlCanvas2D.prototype.plainText = function(a, b, c, d, e, f, g, h, k, l, m, n) { - d = this.state; - a = (a + d.dx) * d.scale; - b = (b + d.dy) * d.scale; - c = document.createElement(mxClient.VML_PREFIX + ":shape"); - c.style.width = "1px"; - c.style.height = "1px"; - c.stroked = "false"; - l = document.createElement(mxClient.VML_PREFIX + ":fill"); - l.color = d.fontColor; - l.opacity = 100 * d.alpha + "%"; - c.appendChild(l); - l = document.createElement(mxClient.VML_PREFIX + ":path"); - l.textpathok = "true"; - l.v = "m " + this.format(0) + " " + this.format(0) + " l " + this.format(1) + " " + this.format(0); - c.appendChild(l); - l = document.createElement(mxClient.VML_PREFIX + ":textpath"); - l.style.cssText = "v-text-align:" + f; - l.style.align = f; - l.style.fontFamily = d.fontFamily; - l.string = e; - l.on = "true"; - f = Math.round(d.fontSize * d.scale / this.vmlScale); - l.style.fontSize = f + "px"; - (d.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD && (l.style.fontWeight = "bold"); - (d.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC && (l.style.fontStyle = "italic"); - (d.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE && - (l.style.textDecoration = "underline"); - e = e.split("\n"); - d = f + (e.length - 1) * f * mxConstants.LINE_HEIGHT; - f = e = 0; - g == mxConstants.ALIGN_BOTTOM ? f = -d / 2 : g != mxConstants.ALIGN_MIDDLE && (f = d / 2); - null != n && (c.style.rotation = n, g = n * (Math.PI / 180), e = Math.sin(g) * f, f *= Math.cos(g)); - c.appendChild(l); - c.style.left = this.format(a - e) + "px"; - c.style.top = this.format(b + f) + "px"; - this.root.appendChild(c) -}; -mxVmlCanvas2D.prototype.stroke = function() { - this.addNode(!1, !0) -}; -mxVmlCanvas2D.prototype.fill = function() { - this.addNode(!0, !1) -}; -mxVmlCanvas2D.prototype.fillAndStroke = function() { - this.addNode(!0, !0) -}; - -function mxGuide(a, b) { - this.graph = a; - this.setStates(b) -} -mxGuide.prototype.graph = null; -mxGuide.prototype.states = null; -mxGuide.prototype.horizontal = !0; -mxGuide.prototype.vertical = !0; -mxGuide.prototype.guideX = null; -mxGuide.prototype.guideY = null; -mxGuide.prototype.setStates = function(a) { - this.states = a -}; -mxGuide.prototype.isEnabledForEvent = function(a) { - return !0 -}; -mxGuide.prototype.getGuideTolerance = function() { - return this.graph.gridSize * this.graph.view.scale / 2 -}; -mxGuide.prototype.createGuideShape = function(a) { - a = new mxPolyline([], mxConstants.GUIDE_COLOR, mxConstants.GUIDE_STROKEWIDTH); - a.isDashed = !0; - return a -}; -mxGuide.prototype.move = function(a, b, c) { - if (null != this.states && (this.horizontal || this.vertical) && null != a && null != b) { - var d = this.graph.getView().translate, - e = this.graph.getView().scale, - f = b.x, - g = b.y, - h = !1, - k = !1, - l = this.getGuideTolerance(), - m = l, - n = l, - l = a.clone(); - l.x += b.x; - l.y += b.y; - var p = l.x, - q = l.x + l.width, - s = l.getCenterX(), - r = l.y, - t = l.y + l.height, - v = l.getCenterY(); - b = function(b) { - b += this.graph.panDx; - var c = !1; - Math.abs(b - s) < m ? (f = b - a.getCenterX(), m = Math.abs(b - s), c = !0) : Math.abs(b - p) < m ? (f = b - a.x, m = Math.abs(b - p), c = !0) : Math.abs(b - - q) < m && (f = b - a.x - a.width, m = Math.abs(b - q), c = !0); - if (c) { - null == this.guideX && (this.guideX = this.createGuideShape(!0), this.guideX.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG, - this.guideX.pointerEvents = !1, this.guideX.init(this.graph.getView().getOverlayPane())); - var d = this.graph.container; - b -= this.graph.panDx; - this.guideX.points = [new mxPoint(b, -this.graph.panDy), new mxPoint(b, d.scrollHeight - 3 - this.graph.panDy)] - } - h = h || c - }; - for (var l = function(b) { - b += this.graph.panDy; - var c = !1; - Math.abs(b - v) < n ? (g = b - a.getCenterY(), n = Math.abs(b - v), c = !0) : Math.abs(b - r) < n ? (g = b - a.y, n = Math.abs(b - r), c = !0) : Math.abs(b - t) < n && (g = b - a.y - a.height, - n = Math.abs(b - t), c = !0); - if (c) { - null == this.guideY && (this.guideY = this.createGuideShape(!1), this.guideY.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG, - this.guideY.pointerEvents = !1, this.guideY.init(this.graph.getView().getOverlayPane())); - var d = this.graph.container; - b -= this.graph.panDy; - this.guideY.points = [new mxPoint(-this.graph.panDx, - b), new mxPoint(d.scrollWidth - 3 - this.graph.panDx, b)] - } - k = k || c - }, w = 0; w < this.states.length; w++) { - var u = this.states[w]; - null != u && (this.horizontal && (b.call(this, u.getCenterX()), b.call(this, u.x), b.call(this, u.x + u.width)), this.vertical && (l.call(this, u.getCenterY()), l.call(this, u.y), l.call(this, - u.y + u.height))) - }!h && null != this.guideX ? this.guideX.node.style.visibility = "hidden" : null != this.guideX && (this.guideX.node.style.visibility = "visible", this.guideX.redraw()); - !k && null != this.guideY ? this.guideY.node.style.visibility = - "hidden" : null != this.guideY && (this.guideY.node.style.visibility = "visible", this.guideY.redraw()); - c && (h || (c = a.x - (this.graph.snap(a.x / e - d.x) + d.x) * e, f = this.graph.snap(f / e) * e - c), k || (d = a.y - (this.graph.snap(a.y / e - d.y) + d.y) * e, g = this.graph.snap(g / e) * e - - d)); - b = new mxPoint(f, g) - } - return b -}; -mxGuide.prototype.hide = function() { - null != this.guideX && (this.guideX.node.style.visibility = "hidden"); - null != this.guideY && (this.guideY.node.style.visibility = "hidden") -}; -mxGuide.prototype.destroy = function() { - null != this.guideX && (this.guideX.destroy(), this.guideX = null); - null != this.guideY && (this.guideY.destroy(), this.guideY = null) -}; - -function mxStencil(a) { - this.desc = a; - this.parseDescription(); - this.parseConstraints() -} -mxStencil.defaultLocalized = !1; -mxStencil.prototype.desc = null; -mxStencil.prototype.constraints = null; -mxStencil.prototype.aspect = null; -mxStencil.prototype.w0 = null; -mxStencil.prototype.h0 = null; -mxStencil.prototype.bgNode = null; -mxStencil.prototype.fgNode = null; -mxStencil.prototype.strokewidth = null; -mxStencil.prototype.parseDescription = function() { - this.fgNode = this.desc.getElementsByTagName("foreground")[0]; - this.bgNode = this.desc.getElementsByTagName("background")[0]; - this.w0 = Number(this.desc.getAttribute("w") || 100); - this.h0 = Number(this.desc.getAttribute("h") || 100); - var a = this.desc.getAttribute("aspect"); - this.aspect = null != a ? a : "variable"; - a = this.desc.getAttribute("strokewidth"); - this.strokewidth = null != a ? a : "1" -}; -mxStencil.prototype.parseConstraints = function() { - var a = this.desc.getElementsByTagName("connections")[0]; - if (null != a && (a = mxUtils.getChildNodes(a), null != a && 0 < a.length)) { - this.constraints = []; - for (var b = 0; b < a.length; b++) this.constraints.push(this.parseConstraint(a[b])) - } -}; -mxStencil.prototype.parseConstraint = function(a) { - var b = Number(a.getAttribute("x")), - c = Number(a.getAttribute("y")); - a = "1" == a.getAttribute("perimeter"); - return new mxConnectionConstraint(new mxPoint(b, c), a) -}; -mxStencil.prototype.evaluateTextAttribute = function(a, b, c) { - b = this.evaluateAttribute(a, b, c); - a = a.getAttribute("localized"); - if (mxStencil.defaultLocalized && null == a || "1" == a) b = mxResources.get(b); - return b -}; -mxStencil.prototype.evaluateAttribute = function(a, b, c) { - b = a.getAttribute(b); - null == b && (a = mxUtils.getTextContent(a), null != a && (a = mxUtils.eval(a), "function" == typeof a && (b = a(c)))); - return b -}; -mxStencil.prototype.drawShape = function(a, b, c, d, e, f) { - this.drawChildren(a, b, c, d, e, f, this.bgNode, !1); - this.drawChildren(a, b, c, d, e, f, this.fgNode, !0) -}; -mxStencil.prototype.drawChildren = function(a, b, c, d, e, f, g, h) { - if (null != g) { - var k = mxUtils.getValue(b.style, mxConstants.STYLE_DIRECTION, null); - c = this.computeAspect(b.style, c, d, e, f, k); - d = Math.min(c.width, c.height); - d = "inherit" == this.strokewidth ? Number(mxUtils.getNumber(b.style, mxConstants.STYLE_STROKEWIDTH, 1)) : Number(this.strokewidth) * d; - a.setStrokeWidth(d); - for (g = g.firstChild; null != g;) g.nodeType == mxConstants.NODETYPE_ELEMENT && this.drawNode(a, b, g, c, h), g = g.nextSibling - } -}; -mxStencil.prototype.computeAspect = function(a, b, c, d, e, f) { - a = b; - b = d / this.w0; - var g = e / this.h0; - if (f = "north" == f || "south" == f) { - g = d / this.h0; - b = e / this.w0; - var h = (d - e) / 2; - a += h; - c -= h - } - "fixed" == this.aspect && (b = g = Math.min(b, g), f ? (a += (e - this.w0 * b) / 2, c += (d - this.h0 * g) / 2) : (a += (d - this.w0 * b) / 2, c += (e - this.h0 * g) / 2)); - return new mxRectangle(a, c, b, g) -}; -mxStencil.prototype.drawNode = function(a, b, c, d, e) { - var f = c.nodeName, - g = d.x, - h = d.y, - k = d.width, - l = d.height, - m = Math.min(k, l); - if ("save" == f) a.save(); - else if ("restore" == f) a.restore(); - else if ("path" == f) { - a.begin(); - for (c = c.firstChild; null != c;) c.nodeType == mxConstants.NODETYPE_ELEMENT && this.drawNode(a, b, c, d, e), c = c.nextSibling - } else if ("close" == f) a.close(); - else if ("move" == f) a.moveTo(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l); - else if ("line" == f) a.lineTo(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * - l); - else if ("quad" == f) a.quadTo(g + Number(c.getAttribute("x1")) * k, h + Number(c.getAttribute("y1")) * l, g + Number(c.getAttribute("x2")) * k, h + Number(c.getAttribute("y2")) * l); - else if ("curve" == f) a.curveTo(g + Number(c.getAttribute("x1")) * k, h + Number(c.getAttribute("y1")) * l, g + Number(c.getAttribute("x2")) * k, h + Number(c.getAttribute("y2")) * l, g + Number( - c.getAttribute("x3")) * k, h + Number(c.getAttribute("y3")) * l); - else if ("arc" == f) a.arcTo(Number(c.getAttribute("rx")) * k, Number(c.getAttribute("ry")) * l, Number(c.getAttribute("x-axis-rotation")), - Number(c.getAttribute("large-arc-flag")), Number(c.getAttribute("sweep-flag")), g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l); - else if ("rect" == f) a.rect(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, Number(c.getAttribute("w")) * k, Number(c.getAttribute("h")) * l); - else if ("roundrect" == f) b = c.getAttribute("arcsize"), 0 == b && (b = 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR), m = Number(c.getAttribute("w")) * k, d = Number(c.getAttribute("h")) * l, b = - Number(b) / 100, b = Math.min(m * b, d * b), a.roundrect(g + - Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, m, d, b, b); - else if ("ellipse" == f) a.ellipse(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, Number(c.getAttribute("w")) * k, Number(c.getAttribute("h")) * l); - else if ("image" == f) b = this.evaluateAttribute(c, "src", b), a.image(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, Number(c.getAttribute("w")) * k, Number(c.getAttribute( - "h")) * l, b, !1, "1" == c.getAttribute("flipH"), "1" == c.getAttribute("flipV")); - else if ("text" == f) { - m = this.evaluateTextAttribute(c, - "str", b); - d = "1" == c.getAttribute("vertical") ? -90 : 0; - if ("0" == c.getAttribute("align-shape")) { - var n = b.rotation, - p = 1 == mxUtils.getValue(b.style, mxConstants.STYLE_FLIPH, 0); - b = 1 == mxUtils.getValue(b.style, mxConstants.STYLE_FLIPV, 0); - d = p && b ? d - n : p || b ? d + n : d - n - } - d -= c.getAttribute("rotation"); - a.text(g + Number(c.getAttribute("x")) * k, h + Number(c.getAttribute("y")) * l, 0, 0, m, c.getAttribute("align") || "left", c.getAttribute("valign") || "top", !1, "", !1, !1, d) - } else if ("include-shape" == f) n = mxStencilRegistry.getStencil(c.getAttribute("name")), - null != n && (g += Number(c.getAttribute("x")) * k, h += Number(c.getAttribute("y")) * l, m = Number(c.getAttribute("w")) * k, d = Number(c.getAttribute("h")) * l, n.drawShape(a, b, g, h, m, d)); - else if ("fillstroke" == f) a.fillAndStroke(); - else if ("fill" == f) a.fill(); - else if ("stroke" == f) a.stroke(); - else if ("strokewidth" == f) a.setStrokeWidth(Number(c.getAttribute("width")) * m); - else if ("dashed" == f) a.setDashed("1" == c.getAttribute("dashed")); - else if ("dashpattern" == f) { - if (c = c.getAttribute("pattern"), null != c) { - c = c.split(" "); - k = []; - for (l = 0; l < - c.length; l++) 0 < c[l].length && k.push(Number(c[l]) * m); - c = k.join(" "); - a.setDashPattern(c) - } - } else "strokecolor" == f ? a.setStrokeColor(c.getAttribute("color")) : "linecap" == f ? a.setLineCap(c.getAttribute("cap")) : "linejoin" == f ? a.setLineJoin(c.getAttribute("join")) : - "miterlimit" == f ? a.setMiterLimit(Number(c.getAttribute("limit"))) : "fillcolor" == f ? a.setFillColor(c.getAttribute("color")) : "alpha" == f ? a.setAlpha(c.getAttribute("alpha")) : - "fontcolor" == f ? a.setFontColor(c.getAttribute("color")) : "fontstyle" == f ? a.setFontStyle(c.getAttribute("style")) : - "fontfamily" == f ? a.setFontFamily(c.getAttribute("family")) : "fontsize" == f && a.setFontSize(Number(c.getAttribute("size")) * m); - e && ("fillstroke" == f || "fill" == f || "stroke" == f) && a.setShadow(!1) -}; - -function mxShape(a) { - this.stencil = a; - this.strokewidth = 1; - this.rotation = 0; - this.opacity = 100; - this.flipV = this.flipH = !1 -} -mxShape.prototype.dialect = null; -mxShape.prototype.scale = 1; -mxShape.prototype.bounds = null; -mxShape.prototype.points = null; -mxShape.prototype.node = null; -mxShape.prototype.style = null; -mxShape.prototype.style = null; -mxShape.prototype.boundingBox = null; -mxShape.prototype.stencil = null; -mxShape.prototype.svgStrokeTolerance = 6; -mxShape.prototype.pointerEvents = !0; -mxShape.prototype.stencilPointerEvents = !1; -mxShape.prototype.vmlScale = 1; -mxShape.prototype.init = function(a) { - null == this.node && (this.node = this.create(a), null != a && a.appendChild(this.node)) -}; -mxShape.prototype.isParseVml = function() { - return !0 -}; -mxShape.prototype.isHtmlAllowed = function() { - return !1 -}; -mxShape.prototype.getSvgScreenOffset = function() { - return 1 == mxUtils.mod(Math.max(1, Math.round(this.strokewidth * this.scale)), 2) ? 0.5 : 0 -}; -mxShape.prototype.create = function(a) { - var b = null; - return b = null != a.ownerSVGElement ? this.createSvg(a) : 8 == document.documentMode || this.dialect == mxConstants.DIALECT_SVG || this.dialect != mxConstants.DIALECT_VML && this.isHtmlAllowed() ? - this.createHtml(a) : this.createVml(a) -}; -mxShape.prototype.createSvg = function() { - return document.createElementNS(mxConstants.NS_SVG, "g") -}; -mxShape.prototype.createVml = function() { - var a = document.createElement(mxClient.VML_PREFIX + ":group"); - a.style.position = "absolute"; - return a -}; -mxShape.prototype.createHtml = function() { - var a = document.createElement("div"); - a.style.position = "absolute"; - return a -}; -mxShape.prototype.reconfigure = function() { - this.redraw() -}; -mxShape.prototype.redraw = function() { - this.updateBoundsFromPoints(); - this.checkBounds() ? (this.node.style.visibility = "", "DIV" == this.node.nodeName && this.isHtmlAllowed() ? this.redrawHtmlShape() : this.redrawShape(), this.updateBoundingBox()) : (this.node.style - .visibility = "hidden", this.boundingBox = null) -}; -mxShape.prototype.updateBoundsFromPoints = function() { - var a = this.points; - if (null != a && 0 < a.length && null != a[0]) { - this.bounds = new mxRectangle(Number(a[0].x), Number(a[0].y), 1, 1); - for (var b = 1; b < this.points.length; b++) null != a[b] && this.bounds.add(new mxRectangle(Number(a[b].x), Number(a[b].y), 1, 1)) - } -}; -mxShape.prototype.checkBounds = function() { - return null != this.bounds && !isNaN(this.bounds.x) && !isNaN(this.bounds.y) && !isNaN(this.bounds.width) && !isNaN(this.bounds.height) && 0 < this.bounds.width && 0 < this.bounds.height -}; -mxShape.prototype.createVmlGroup = function() { - var a = document.createElement(mxClient.VML_PREFIX + ":group"); - a.style.position = "absolute"; - a.style.width = this.node.style.width; - a.style.height = this.node.style.height; - return a -}; -mxShape.prototype.redrawShape = function() { - var a = this.createCanvas(); - for (a.pointerEvents = this.pointerEvents; this.node.hasChildNodes();) this.node.removeChild(this.node.lastChild); - this.paint(a); - this.node != a.root && this.node.insertAdjacentHTML("beforeend", a.root.outerHTML); - "DIV" == this.node.nodeName && 8 == document.documentMode && (this.node.style.filter = "", (null == this.stencil || !this.stencilPointerEvents) && mxUtils.addTransparentBackgroundFilter(this.node)); - this.destroyCanvas(a) -}; -mxShape.prototype.createCanvas = function() { - var a = null, - b = null; - if (null != this.node.ownerSVGElement) a = new mxSvgCanvas2D(this.node, !1), a.strokeTolerance = this.svgStrokeTolerance, a.blockImagePointerEvents = mxClient.IS_NS && !mxClient.IS_SF && ! - mxClient.IS_GC, b = this.getSvgScreenOffset(), 0 != b ? this.node.setAttribute("transform", "translate(" + b + "," + b + ")") : this.node.removeAttribute("transform"); - else { - this.updateVmlContainer(); - var c = Math.max(1, Math.round(this.bounds.width)), - d = Math.max(1, Math.round(this.bounds.height)), - b = 8 == document.documentMode && this.isParseVml() ? this.createVmlGroup() : this.node, - a = new mxVmlCanvas2D(b, !1); - "" != b.tagUrn && (b.coordsize = c * this.vmlScale + "," + d * this.vmlScale, a.scale(this.vmlScale), a.vmlScale = this.vmlScale); - b = this.scale; - a.translate(-Math.round(this.bounds.x / b), -Math.round(this.bounds.y / b)) - } - return a -}; -mxShape.prototype.updateVmlContainer = function() { - this.node.style.left = Math.round(this.bounds.x) + "px"; - this.node.style.top = Math.round(this.bounds.y) + "px"; - var a = Math.max(1, Math.round(this.bounds.width)), - b = Math.max(1, Math.round(this.bounds.height)); - this.node.style.width = a + "px"; - this.node.style.height = b + "px"; - this.node.style.overflow = "visible" -}; -mxShape.prototype.destroyCanvas = function(a) { - if (a instanceof mxSvgCanvas2D) { - for (var b in a.gradients) { - var c = a.gradients[b]; - c.mxRefCount = (c.mxRefCount || 0) + 1 - } - this.releaseSvgGradients(this.oldGradients); - this.oldGradients = a.gradients - } -}; -mxShape.prototype.paint = function(a) { - var b = this.scale, - c = this.bounds.x / b, - d = this.bounds.y / b, - e = this.bounds.width / b, - f = this.bounds.height / b; - if (this.isPaintBoundsInverted()) var g = (e - f) / 2, - c = c + g, - d = d - g, - g = e, - e = f, - f = g; - this.updateTransform(a, c, d, e, f); - this.configureCanvas(a, c, d, e, f); - if (null != this.stencil) this.paintStencilShape(a, c, d, e, f); - else if (a.setStrokeWidth(this.strokewidth), null != this.points) { - c = []; - for (d = 0; d < this.points.length; d++) c.push(new mxPoint(this.points[d].x / b, this.points[d].y / b)); - this.paintEdgeShape(a, - c) - } else this.paintVertexShape(a, c, d, e, f) -}; -mxShape.prototype.configureCanvas = function(a, b, c, d, e) { - var f = null; - null != this.style && (f = this.style.dashPattern); - a.setAlpha(this.opacity / 100); - null != this.isShadow && a.setShadow(this.isShadow); - null != this.isDashed && a.setDashed(this.isDashed); - null != f && a.setDashPattern(f); - null != this.gradient ? (b = this.getGradientBounds(a, b, c, d, e), a.setGradient(this.fill, this.gradient, b.x, b.y, b.width, b.height, this.gradientDirection)) : a.setFillColor(this.fill); - a.setStrokeColor(this.stroke) -}; -mxShape.prototype.getGradientBounds = function(a, b, c, d, e) { - return new mxRectangle(b, c, d, e) -}; -mxShape.prototype.updateTransform = function(a, b, c, d, e) { - a.scale(this.scale); - a.rotate(this.getShapeRotation(), this.flipH, this.flipV, b + d / 2, c + e / 2) -}; -mxShape.prototype.paintStencilShape = function(a, b, c, d, e) { - this.stencilPointerEvents && (this.dialect == mxConstants.DIALECT_SVG ? this.addTransparentBackgroundRectangle(this.node, b, c, d, e) : 8 != document.documentMode && this.setTransparentBackgroundImage( - this.node)); - this.stencil.drawShape(a, this, b, c, d, e) -}; -mxShape.prototype.paintVertexShape = function(a, b, c, d, e) { - this.paintBackground(a, b, c, d, e); - a.setShadow(!1); - this.paintForeground(a, b, c, d, e) -}; -mxShape.prototype.paintBackground = function(a, b, c, d, e) {}; -mxShape.prototype.paintForeground = function(a, b, c, d, e) {}; -mxShape.prototype.paintEdgeShape = function(a, b) {}; -mxShape.prototype.getArcSize = function(a, b) { - var c = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR) / 100; - return Math.min(a * c, b * c) -}; -mxShape.prototype.paintGlassEffect = function(a, b, c, d, e, f) { - var g = Math.ceil(this.strokewidth / 2); - a.setGradient("#ffffff", "#ffffff", b, c, d, 0.6 * e, "south", 0.9, 0.1); - a.begin(); - f += 2 * g; - this.isRounded ? (a.moveTo(b - g + f, c - g), a.quadTo(b - g, c - g, b - g, c - g + f), a.lineTo(b - g, c + 0.4 * e), a.quadTo(b + 0.5 * d, c + 0.7 * e, b + d + g, c + 0.4 * e), a.lineTo(b + d + - g, c - g + f), a.quadTo(b + d + g, c - g, b + d + g - f, c - g)) : (a.moveTo(b - g, c - g), a.lineTo(b - g, c + 0.4 * e), a.quadTo(b + 0.5 * d, c + 0.7 * e, b + d + g, c + 0.4 * e), a.lineTo( - b + d + g, c - g)); - a.close(); - a.fill() -}; -mxShape.prototype.apply = function(a) { - this.state = a; - this.style = a.style; - if (null != this.style) { - this.fill = mxUtils.getValue(this.style, mxConstants.STYLE_FILLCOLOR, this.fill); - this.gradient = mxUtils.getValue(this.style, mxConstants.STYLE_GRADIENTCOLOR, this.gradient); - this.gradientDirection = mxUtils.getValue(this.style, mxConstants.STYLE_GRADIENT_DIRECTION, this.gradientDirection); - this.opacity = mxUtils.getValue(this.style, mxConstants.STYLE_OPACITY, this.opacity); - this.stroke = mxUtils.getValue(this.style, mxConstants.STYLE_STROKECOLOR, - this.stroke); - this.strokewidth = mxUtils.getNumber(this.style, mxConstants.STYLE_STROKEWIDTH, this.strokewidth); - this.spacing = mxUtils.getValue(this.style, mxConstants.STYLE_SPACING, this.spacing); - this.startSize = mxUtils.getNumber(this.style, mxConstants.STYLE_STARTSIZE, this.startSize); - this.endSize = mxUtils.getNumber(this.style, mxConstants.STYLE_ENDSIZE, this.endSize); - this.startArrow = mxUtils.getValue(this.style, mxConstants.STYLE_STARTARROW, this.startArrow); - this.endArrow = mxUtils.getValue(this.style, mxConstants.STYLE_ENDARROW, - this.endArrow); - this.rotation = mxUtils.getValue(this.style, mxConstants.STYLE_ROTATION, this.rotation); - this.direction = mxUtils.getValue(this.style, mxConstants.STYLE_DIRECTION, this.direction); - this.flipH = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_FLIPH, 0); - this.flipV = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_FLIPV, 0); - null != this.stencil && (this.flipH = 1 == mxUtils.getValue(this.style, "stencilFlipH", 0) || this.flipH, this.flipV = 1 == mxUtils.getValue(this.style, "stencilFlipV", 0) || this.flipV); - if ("north" == - this.direction || "south" == this.direction) a = this.flipH, this.flipH = this.flipV, this.flipV = a; - this.isShadow = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_SHADOW, this.isShadow); - this.isDashed = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_DASHED, this.isDashed); - this.isRounded = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_ROUNDED, this.isRounded); - this.glass = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_GLASS, this.glass); - "none" == this.fill && (this.fill = null); - "none" == this.gradient && (this.gradient = null); - "none" == this.stroke && (this.stroke = null) - } -}; -mxShape.prototype.setCursor = function(a) { - null == a && (a = ""); - this.cursor = a; - null != this.node && (this.node.style.cursor = a) -}; -mxShape.prototype.getCursor = function() { - return this.cursor -}; -mxShape.prototype.updateBoundingBox = function() { - if (null != this.bounds) { - var a = this.createBoundingBox(); - if (null != a) { - this.augmentBoundingBox(a); - var b = this.getShapeRotation(); - 0 != b && (a = mxUtils.getBoundingBox(a, b)); - a.x = Math.floor(a.x); - a.y = Math.floor(a.y); - a.width = Math.ceil(a.width); - a.height = Math.ceil(a.height) - } - this.boundingBox = a - } -}; -mxShape.prototype.createBoundingBox = function() { - var a = this.bounds.clone(); - if (this.isPaintBoundsInverted()) { - var b = (a.width - a.height) / 2; - a.x += b; - a.y -= b; - b = a.width; - a.width = a.height; - a.height = b - } - return a -}; -mxShape.prototype.augmentBoundingBox = function(a) { - this.isShadow && (a.width += Math.ceil(mxConstants.SHADOW_OFFSET_X * this.scale), a.height += Math.ceil(mxConstants.SHADOW_OFFSET_Y * this.scale)); - var b = Math.ceil(this.strokewidth * this.scale); - a.grow(Math.ceil(b / 2)) -}; -mxShape.prototype.isPaintBoundsInverted = function() { - return null == this.stencil && ("north" == this.direction || "south" == this.direction) -}; -mxShape.prototype.getRotation = function() { - return null != this.rotation ? this.rotation : 0 -}; -mxShape.prototype.getTextRotation = function() { - var a = this.getRotation(); - 1 != mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, 1) && (a += mxText.prototype.verticalTextRotation); - return a -}; -mxShape.prototype.getShapeRotation = function() { - var a = this.getRotation(); - null != this.direction && ("north" == this.direction ? a += 270 : "west" == this.direction ? a += 180 : "south" == this.direction && (a += 90)); - return a -}; -mxShape.prototype.addTransparentBackgroundRectangle = function(a, b, c, d, e) { - a = document.createElementNS(mxConstants.NS_SVG, "rect"); - a.setAttribute("x", b); - a.setAttribute("y", c); - a.setAttribute("width", d); - a.setAttribute("height", e); - a.setAttribute("fill", "none"); - a.setAttribute("stroke", "none"); - a.setAttribute("pointer-events", "all"); - this.node.appendChild(a) -}; -mxShape.prototype.setTransparentBackgroundImage = function(a) { - a.style.backgroundImage = "url('" + mxClient.imageBasePath + "/transparent.gif')" -}; -mxShape.prototype.releaseSvgGradients = function(a) { - if (null != a) - for (var b in a) { - var c = a[b]; - c.mxRefCount = (c.mxRefCount || 0) - 1; - 0 == c.mxRefCount && null != c.parentNode && c.parentNode.removeChild(c) - } -}; -mxShape.prototype.destroy = function() { - null != this.node && (mxEvent.release(this.node), null != this.node.parentNode && this.node.parentNode.removeChild(this.node), this.node = null); - this.releaseSvgGradients(this.oldGradients); - this.oldGradients = null -}; -var mxStencilRegistry = { - stencils: [], - addStencil: function(a, b) { - mxStencilRegistry.stencils[a] = b - }, - getStencil: function(a) { - return mxStencilRegistry.stencils[a] - } - }, - mxMarker = { - markers: [], - addMarker: function(a, b) { - mxMarker.markers[a] = b - }, - createMarker: function(a, b, c, d, e, f, g, h, k, l) { - var m = mxMarker.markers[c]; - return null != m ? m(a, b, c, d, e, f, g, h, k, l) : null - } - }; -(function() { - function a(a, b, e, f, g, h, k, l, m, n) { - b = 1.118 * g * m; - l = 1.118 * h * m; - g *= k + m; - h *= k + m; - var p = f.clone(); - p.x -= b; - p.y -= l; - k = e != mxConstants.ARROW_CLASSIC ? 1 : 0.75; - f.x += -g * k - b; - f.y += -h * k - l; - return function() { - a.begin(); - a.moveTo(p.x, p.y); - a.lineTo(p.x - g - h / 2, p.y - h + g / 2); - e == mxConstants.ARROW_CLASSIC && a.lineTo(p.x - 3 * g / 4, p.y - 3 * h / 4); - a.lineTo(p.x + h / 2 - g, p.y - h - g / 2); - a.close(); - n ? a.fillAndStroke() : a.stroke() - } - } - - function b(a, b, e, f, g, h, k, l, m, n) { - l = e == mxConstants.ARROW_DIAMOND ? 0.7071 : 0.9862; - b = g * m * l; - l *= h * m; - g *= k + m; - h *= k + m; - var p = f.clone(); - p.x -= b; - p.y -= l; - f.x += -g - b; - f.y += -h - l; - var q = e == mxConstants.ARROW_DIAMOND ? 2 : 3.4; - return function() { - a.begin(); - a.moveTo(p.x, p.y); - a.lineTo(p.x - g / 2 - h / q, p.y + g / q - h / 2); - a.lineTo(p.x - g, p.y - h); - a.lineTo(p.x - g / 2 + h / q, p.y - h / 2 - g / q); - a.close(); - n ? a.fillAndStroke() : a.stroke() - } - } - mxMarker.addMarker("classic", a); - mxMarker.addMarker("block", a); - mxMarker.addMarker("open", function(a, b, e, f, g, h, k, l, m, n) { - b = 1.118 * g * m; - e = 1.118 * h * m; - g *= k + m; - h *= k + m; - var p = f.clone(); - p.x -= b; - p.y -= e; - f.x += 2 * -b; - f.y += 2 * -e; - return function() { - a.begin(); - a.moveTo(p.x - g - - h / 2, p.y - h + g / 2); - a.lineTo(p.x, p.y); - a.lineTo(p.x + h / 2 - g, p.y - h - g / 2); - a.stroke() - } - }); - mxMarker.addMarker("oval", function(a, b, e, f, g, h, k, l, m, n) { - var p = k / 2, - q = f.clone(); - f.x -= g * p; - f.y -= h * p; - return function() { - a.ellipse(q.x - p, q.y - p, k, k); - n ? a.fillAndStroke() : a.stroke() - } - }); - mxMarker.addMarker("diamond", b); - mxMarker.addMarker("diamondThin", b) -})(); - -function mxActor(a, b, c, d) { - mxShape.call(this); - this.bounds = a; - this.fill = b; - this.stroke = c; - this.strokewidth = null != d ? d : 1 -} -mxUtils.extend(mxActor, mxShape); -mxActor.prototype.paintVertexShape = function(a, b, c, d, e) { - a.translate(b, c); - a.begin(); - this.redrawPath(a, b, c, d, e); - a.fillAndStroke() -}; -mxActor.prototype.redrawPath = function(a, b, c, d, e) { - b = d / 3; - a.moveTo(0, e); - a.curveTo(0, 3 * e / 5, 0, 2 * e / 5, d / 2, 2 * e / 5); - a.curveTo(d / 2 - b, 2 * e / 5, d / 2 - b, 0, d / 2, 0); - a.curveTo(d / 2 + b, 0, d / 2 + b, 2 * e / 5, d / 2, 2 * e / 5); - a.curveTo(d, 2 * e / 5, d, 3 * e / 5, d, e); - a.close() -}; - -function mxCloud(a, b, c, d) { - mxActor.call(this); - this.bounds = a; - this.fill = b; - this.stroke = c; - this.strokewidth = null != d ? d : 1 -} -mxUtils.extend(mxCloud, mxActor); -mxCloud.prototype.redrawPath = function(a, b, c, d, e) { - a.moveTo(0.25 * d, 0.25 * e); - a.curveTo(0.05 * d, 0.25 * e, 0, 0.5 * e, 0.16 * d, 0.55 * e); - a.curveTo(0, 0.66 * e, 0.18 * d, 0.9 * e, 0.31 * d, 0.8 * e); - a.curveTo(0.4 * d, e, 0.7 * d, e, 0.8 * d, 0.8 * e); - a.curveTo(d, 0.8 * e, d, 0.6 * e, 0.875 * d, 0.5 * e); - a.curveTo(d, 0.3 * e, 0.8 * d, 0.1 * e, 0.625 * d, 0.2 * e); - a.curveTo(0.5 * d, 0.05 * e, 0.3 * d, 0.05 * e, 0.25 * d, 0.25 * e); - a.close() -}; - -function mxRectangleShape(a, b, c, d) { - mxShape.call(this); - this.bounds = a; - this.fill = b; - this.stroke = c; - this.strokewidth = null != d ? d : 1 -} -mxUtils.extend(mxRectangleShape, mxShape); -mxRectangleShape.prototype.isHtmlAllowed = function() { - return !this.isRounded && !this.glass && 0 == this.rotation -}; -mxRectangleShape.prototype.paintBackground = function(a, b, c, d, e) { - if (this.isRounded) { - var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR) / 100, - f = Math.min(d * f, e * f); - a.roundrect(b, c, d, e, f, f) - } else a.rect(b, c, d, e); - a.fillAndStroke() -}; -mxRectangleShape.prototype.paintForeground = function(a, b, c, d, e) { - this.glass && this.paintGlassEffect(a, b, c, d, e, this.getArcSize(d + this.strokewidth, e + this.strokewidth)) -}; -mxRectangleShape.prototype.redrawHtmlShape = function() { - this.updateHtmlBounds(this.node); - this.updateHtmlFilters(this.node); - this.updateHtmlColors(this.node) -}; -mxRectangleShape.prototype.updateHtmlBounds = function(a) { - var b = 9 <= document.documentMode ? 0 : Math.ceil(this.strokewidth * this.scale); - a.style.borderWidth = Math.max(1, b) + "px"; - a.style.overflow = "hidden"; - a.style.left = Math.round(this.bounds.x - b / 2) + "px"; - a.style.top = Math.round(this.bounds.y - b / 2) + "px"; - "CSS1Compat" == document.compatMode && (b = -b); - a.style.width = Math.round(Math.max(0, this.bounds.width + b)) + "px"; - a.style.height = Math.round(Math.max(0, this.bounds.height + b)) + "px" -}; -mxRectangleShape.prototype.updateHtmlColors = function(a) { - var b = this.stroke; - null != b && b != mxConstants.NONE ? (a.style.borderColor = b, this.isDashed ? a.style.borderStyle = "dashed" : 0 < this.strokewidth && (a.style.borderStyle = "solid"), a.style.borderWidth = Math - .max(1, Math.ceil(this.strokewidth * this.scale)) + "px") : a.style.borderWidth = "0px"; - b = this.fill; - null != b && b != mxConstants.NONE ? (a.style.backgroundColor = b, a.style.backgroundImage = "none") : this.pointerEvents ? a.style.backgroundColor = "transparent" : 8 == document.documentMode ? - mxUtils.addTransparentBackgroundFilter(a) : this.setTransparentBackgroundImage(a) -}; -mxRectangleShape.prototype.updateHtmlFilters = function(a) { - var b = ""; - 100 > this.opacity && (b += "alpha(opacity\x3d" + this.opacity + ")"); - this.isShadow && (b += "progid:DXImageTransform.Microsoft.dropShadow (OffX\x3d'" + Math.round(mxConstants.SHADOW_OFFSET_X * this.scale) + "', OffY\x3d'" + Math.round(mxConstants.SHADOW_OFFSET_Y * - this.scale) + "', Color\x3d'" + mxConstants.SHADOWCOLOR + "')"); - if (this.gradient) { - var c = this.fill, - d = this.gradient, - e = "0", - f = { - east: 0, - south: 1, - west: 2, - north: 3 - }, - g = null != this.direction ? f[this.direction] : 0; - null != - this.gradientDirection && (g = mxUtils.mod(g + f[this.gradientDirection] - 1, 4)); - 1 == g ? (e = "1", f = c, c = d, d = f) : 2 == g ? (f = c, c = d, d = f) : 3 == g && (e = "1"); - b += "progid:DXImageTransform.Microsoft.gradient(startColorStr\x3d'" + c + "', endColorStr\x3d'" + d + "', gradientType\x3d'" + e + "')" - } - a.style.filter = b -}; - -function mxEllipse(a, b, c, d) { - mxShape.call(this); - this.bounds = a; - this.fill = b; - this.stroke = c; - this.strokewidth = null != d ? d : 1 -} -mxUtils.extend(mxEllipse, mxShape); -mxEllipse.prototype.paintVertexShape = function(a, b, c, d, e) { - a.ellipse(b, c, d, e); - a.fillAndStroke() -}; - -function mxDoubleEllipse(a, b, c, d) { - mxShape.call(this); - this.bounds = a; - this.fill = b; - this.stroke = c; - this.strokewidth = null != d ? d : 1 -} -mxUtils.extend(mxDoubleEllipse, mxShape); -mxDoubleEllipse.prototype.vmlScale = 10; -mxDoubleEllipse.prototype.paintBackground = function(a, b, c, d, e) { - a.ellipse(b, c, d, e); - a.fillAndStroke() -}; -mxDoubleEllipse.prototype.paintForeground = function(a, b, c, d, e) { - var f = Math.min(4, Math.min(d / 5, e / 5)); - d -= 2 * f; - e -= 2 * f; - 0 < d && 0 < e && a.ellipse(b + f, c + f, d, e); - a.stroke() -}; - -function mxRhombus(a, b, c, d) { - mxShape.call(this); - this.bounds = a; - this.fill = b; - this.stroke = c; - this.strokewidth = null != d ? d : 1 -} -mxUtils.extend(mxRhombus, mxShape); -mxRhombus.prototype.paintVertexShape = function(a, b, c, d, e) { - var f = d / 2, - g = e / 2; - a.begin(); - a.moveTo(b + f, c); - a.lineTo(b + d, c + g); - a.lineTo(b + f, c + e); - a.lineTo(b, c + g); - a.close(); - a.fillAndStroke() -}; - -function mxPolyline(a, b, c) { - mxShape.call(this); - this.points = a; - this.stroke = b; - this.strokewidth = null != c ? c : 1 -} -mxUtils.extend(mxPolyline, mxShape); -mxPolyline.prototype.getRotation = function() { - return 0 -}; -mxPolyline.prototype.paintEdgeShape = function(a, b) { - this.paintLine(a, b, this.isRounded) -}; -mxPolyline.prototype.paintLine = function(a, b, c) { - var d = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, mxConstants.LINE_ARCSIZE) / 2, - e = b[0], - f = b[b.length - 1]; - a.begin(); - a.moveTo(e.x, e.y); - for (var g = 1; g < b.length - 1; g++) { - var h = b[g], - k = e.x - h.x, - e = e.y - h.y; - if (c && g < b.length - 1 && (0 != k || 0 != e)) { - var l = Math.sqrt(k * k + e * e), - k = k * Math.min(d, l / 2) / l, - e = e * Math.min(d, l / 2) / l; - a.lineTo(h.x + k, h.y + e); - e = b[g + 1]; - k = e.x - h.x; - e = e.y - h.y; - l = Math.max(1, Math.sqrt(k * k + e * e)); - k = k * Math.min(d, l / 2) / l; - e = e * Math.min(d, l / 2) / l; - k = h.x + k; - e = h.y + e; - a.quadTo(h.x, - h.y, k, e); - h = new mxPoint(k, e) - } else a.lineTo(h.x, h.y); - e = h - } - a.lineTo(f.x, f.y); - a.stroke() -}; - -function mxArrow(a, b, c, d, e, f, g) { - mxShape.call(this); - this.points = a; - this.fill = b; - this.stroke = c; - this.strokewidth = null != d ? d : 1; - this.arrowWidth = null != e ? e : mxConstants.ARROW_WIDTH; - this.spacing = null != f ? f : mxConstants.ARROW_SPACING; - this.endSize = null != g ? g : mxConstants.ARROW_SIZE -} -mxUtils.extend(mxArrow, mxShape); -mxArrow.prototype.paintEdgeShape = function(a, b) { - var c = mxConstants.ARROW_SPACING, - d = mxConstants.ARROW_WIDTH, - e = mxConstants.ARROW_SIZE, - f = b[0], - g = b[b.length - 1], - h = g.x - f.x, - k = g.y - f.y, - l = Math.sqrt(h * h + k * k), - m = l - 2 * c - e, - h = h / l, - k = k / l, - l = d * k / 3, - d = -d * h / 3, - e = f.x - l / 2 + c * h, - f = f.y - d / 2 + c * k, - n = e + l, - p = f + d, - q = n + m * h, - m = p + m * k, - s = q + l, - r = m + d, - t = s - 3 * l, - v = r - 3 * d; - a.begin(); - a.moveTo(e, f); - a.lineTo(n, p); - a.lineTo(q, m); - a.lineTo(s, r); - a.lineTo(g.x - c * h, g.y - c * k); - a.lineTo(t, v); - a.lineTo(t + l, v + d); - a.close(); - a.fillAndStroke() -}; - -function mxText(a, b, c, d, e, f, g, h, k, l, m, n, p, q, s, r, t, v, w, u) { - mxShape.call(this); - this.value = a; - this.bounds = b; - this.color = null != e ? e : "black"; - this.align = null != c ? c : ""; - this.valign = null != d ? d : ""; - this.family = null != f ? f : mxConstants.DEFAULT_FONTFAMILY; - this.size = null != g ? g : mxConstants.DEFAULT_FONTSIZE; - this.fontStyle = null != h ? h : mxConstants.DEFAULT_FONTSTYLE; - this.spacing = parseInt(k || 2); - this.spacingTop = this.spacing + parseInt(l || 0); - this.spacingRight = this.spacing + parseInt(m || 0); - this.spacingBottom = this.spacing + parseInt(n || 0); - this.spacingLeft = this.spacing + parseInt(p || 0); - this.horizontal = null != q ? q : !0; - this.background = s; - this.border = r; - this.wrap = null != t ? t : !1; - this.clipped = null != v ? v : !1; - this.overflow = null != w ? w : "visible"; - this.labelPadding = null != u ? u : 0; - this.rotation = 0 -} -mxUtils.extend(mxText, mxShape); -mxText.prototype.baseSpacingTop = 0; -mxText.prototype.baseSpacingBottom = 0; -mxText.prototype.baseSpacingLeft = 0; -mxText.prototype.baseSpacingRight = 0; -mxText.prototype.replaceLinefeeds = !0; -mxText.prototype.verticalTextRotation = -90; -mxText.prototype.ignoreClippedStringSize = !0; -mxText.prototype.ignoreStringSize = !1; -mxText.prototype.isParseVml = function() { - return !1 -}; -mxText.prototype.isHtmlAllowed = function() { - return 8 != document.documentMode -}; -mxText.prototype.getSvgScreenOffset = function() { - return 0 -}; -mxText.prototype.checkBounds = function() { - return null != this.bounds && !isNaN(this.bounds.x) && !isNaN(this.bounds.y) && !isNaN(this.bounds.width) && !isNaN(this.bounds.height) -}; -mxText.prototype.updateBoundingBox = function() { - var a = this.node; - 8 == document.documentMode && null != a.firstChild && (a = a.firstChild, null != a.firstChild && (a = a.firstChild)); - this.boundingBox = this.bounds.clone(); - var b = this.getTextRotation(); - if (!this.ignoreStringSize && null != a && "fill" != this.overflow && (!this.clipped || !this.ignoreClippedStringSize)) { - var c = null, - d = null; - if (null != a.ownerSVGElement) - if (null != a.firstChild && null != a.firstChild.firstChild && "foreignObject" == a.firstChild.firstChild.nodeName) a = a.firstChild.firstChild, - c = this.wrap ? this.bounds.width : parseInt(a.getAttribute("width")) * this.scale, d = parseInt(a.getAttribute("height")) * this.scale; - else { - b = a.getBBox(); - if (0 == b.width && 0 == b.height) return; - this.boundingBox = new mxRectangle(b.x, b.y, b.width, b.height); - b = 0 - } else d = this.state.view.textDiv, null != this.offsetWidth && null != this.offsetHeight ? (c = this.wrap ? this.bounds.width : this.offsetWidth * this.scale, d = this.offsetHeight * this.scale) : - null != d ? (this.updateFont(d), this.updateSize(d), mxUtils.isNode(this.value) ? d.innerHTML = this.value.outerHTML : - (c = this.replaceLinefeeds ? this.value.replace(/\n/g, "\x3cbr/\x3e") : this.value, d.innerHTML = c), c = this.wrap ? this.bounds.width : d.offsetWidth * this.scale, d = d.offsetHeight * - this.scale) : (c = this.wrap ? this.bounds.width : a.offsetWidth * this.scale, d = a.offsetHeight * this.scale); - null != c && null != d && (this.boundingBox = new mxRectangle(this.bounds.x + this.margin.x * c, this.bounds.y + this.margin.y * d, c, d)) - } else this.boundingBox.x += this.margin.x * this.boundingBox.width, this.boundingBox.y += this.margin.y * this.boundingBox.height; - null != - this.boundingBox && (0 != b && (b = mxUtils.getBoundingBox(this.boundingBox, b), this.boundingBox.x = b.x, this.boundingBox.y = b.y, mxClient.IS_QUIRKS || (this.boundingBox.width = b.width, - this.boundingBox.height = b.height)), this.boundingBox.x = Math.floor(this.boundingBox.x), this.boundingBox.y = Math.floor(this.boundingBox.y), this.boundingBox.width = Math.ceil(this.boundingBox - .width), this.boundingBox.height = Math.ceil(this.boundingBox.height)) -}; -mxText.prototype.getShapeRotation = function() { - return 0 -}; -mxText.prototype.getTextRotation = function() { - return null != this.state && null != this.state.shape ? this.state.shape.getTextRotation() : 0 -}; -mxText.prototype.isPaintBoundsInverted = function() { - return !this.horizontal && null != this.state && this.state.view.graph.model.isVertex(this.state.cell) -}; -mxText.prototype.configureCanvas = function(a, b, c, d, e) { - mxShape.prototype.configureCanvas.apply(this, arguments); - a.setFontColor(this.color); - a.setFontBackgroundColor(this.background); - a.setFontBorderColor(this.border); - a.setFontFamily(this.family); - a.setFontSize(this.size); - a.setFontStyle(this.fontStyle) -}; -mxText.prototype.updateVmlContainer = function() { - this.node.style.left = Math.round(this.bounds.x) + "px"; - this.node.style.top = Math.round(this.bounds.y) + "px"; - this.node.style.width = "1px"; - this.node.style.height = "1px"; - this.node.style.overflow = "visible" -}; -mxText.prototype.paint = function(a) { - var b = this.scale, - c = this.bounds.x / b, - d = this.bounds.y / b, - e = this.bounds.width / b, - b = this.bounds.height / b; - this.updateTransform(a, c, d, e, b); - this.configureCanvas(a, c, d, e, b); - var f = mxUtils.isNode(this.value) || this.dialect == mxConstants.DIALECT_STRICTHTML, - g = f || a instanceof mxVmlCanvas2D ? "html" : "", - h = this.value; - !f && "html" == g && (h = mxUtils.htmlEntities(h, !1)); - h = !mxUtils.isNode(this.value) && this.replaceLinefeeds && "html" == g ? h.replace(/\n/g, "\x3cbr/\x3e") : h; - a.text(c, d, e, b, h, this.align, - this.valign, this.wrap, g, "fill" == this.overflow, this.clipped, this.getTextRotation()) -}; -mxText.prototype.redrawHtmlShape = function() { - var a = this.node.style; - a.opacity = 1 > this.opacity ? this.opacity : ""; - a.overflow = ""; - a.width = ""; - a.height = ""; - this.updateFont(this.node); - this.updateSize(this.node); - this.updateValue(); - this.offsetHeight = this.offsetWidth = null; - null != mxClient.CSS_PREFIX ? this.updateHtmlTransform() : this.updateHtmlFilter() -}; -mxText.prototype.updateHtmlTransform = function() { - var a = this.getTextRotation(), - b = this.node.style, - c = this.margin.x, - d = this.margin.y; - 0 != a ? (b[mxClient.CSS_PREFIX + "TransformOrigin"] = 100 * -c + "% " + 100 * -d + "%", b[mxClient.CSS_PREFIX + "Transform"] = "translate(" + 100 * c + "%," + 100 * d + "%)scale(" + this.scale + - ") rotate(" + a + "deg)") : (b[mxClient.CSS_PREFIX + "TransformOrigin"] = "0% 0%", b[mxClient.CSS_PREFIX + "Transform"] = "scale(" + this.scale + ")translate(" + 100 * c + "%," + 100 * d + - "%)"); - b.left = Math.round(this.bounds.x) + "px"; - b.top = Math.round(this.bounds.y) + - "px" -}; -mxText.prototype.updateHtmlFilter = function() { - var a = this.node.style, - b = this.margin.x, - c = this.margin.y, - d = this.scale; - a.filter = ""; - var e = 0, - f = 0, - g = null != this.state ? this.state.view.textDiv : null; - if (null != g) { - g.style.overflow = ""; - g.style.height = ""; - g.style.width = ""; - this.updateFont(g); - this.updateSize(g); - if (mxUtils.isNode(this.value)) g.innerHTML = this.value.outerHTML; - else { - var h = this.value; - this.dialect != mxConstants.DIALECT_STRICTHTML && (h = mxUtils.htmlEntities(h, !1)); - h = this.replaceLinefeeds ? h.replace(/\n/g, "\x3cbr/\x3e") : h; - g.innerHTML = h - } - e = g.offsetWidth + 2; - f = g.offsetHeight + 2 - } else e = this.node.offsetWidth, f = this.node.offsetHeight + 1; - this.offsetWidth = e; - this.offsetHeight = f; - g = this.bounds.width / d; - h = this.bounds.height / d; - mxClient.IS_QUIRKS && (this.clipped || "fill" == this.overflow) && 0 < h ? (h = Math.min(h, f), a.height = Math.round(h + 1) + "px") : h = f; - "fill" != this.overflow && (mxClient.IS_QUIRKS && (this.clipped || this.wrap) && 0 < g ? (g = Math.min(g, e), a.width = Math.round(g) + "px") : g = e); - var h = h * d, - g = g * d, - e = this.getTextRotation() * (Math.PI / 180), - f = parseFloat(parseFloat(Math.cos(e)).toFixed(8)), - k = parseFloat(parseFloat(Math.sin(-e)).toFixed(8)), - e = e % (2 * Math.PI); - 0 > e && (e += 2 * Math.PI); - e %= Math.PI; - e > Math.PI / 2 && (e = Math.PI - e); - var l = Math.cos(e), - m = Math.sin(-e), - b = g * -(b + 0.5), - c = h * -(c + 0.5), - n = (h - h * l + g * m) / 2 + k * b - f * c; - 0 != e && (a.filter = "progid:DXImageTransform.Microsoft.Matrix(M11\x3d" + f + ", M12\x3d" + k + ", M21\x3d" + -k + ", M22\x3d" + f + ", sizingMethod\x3d'auto expand')"); - a.zoom = d; - a.left = Math.round(this.bounds.x + ((g - g * l + h * m) / 2 - f * b - k * c) - g / 2) + "px"; - a.top = Math.round(this.bounds.y + n - h / 2) + "px" -}; -mxText.prototype.updateValue = function() { - if (mxUtils.isNode(this.value)) this.node.innerHTML = "", this.node.appendChild(this.value); - else { - var a = this.value; - this.dialect != mxConstants.DIALECT_STRICTHTML && (a = mxUtils.htmlEntities(a, !1)); - var a = this.replaceLinefeeds ? a.replace(/\n/g, "\x3cbr/\x3e") : a, - b = null != this.background && this.background != mxConstants.NONE ? this.background : null, - c = null != this.border && this.border != mxConstants.NONE ? this.border : null; - if (null != b || null != c) - if ("fill" == this.overflow) null != b && (this.node.style.backgroundColor = - b), null != c && (this.node.style.border = "1px solid " + c); - else { - var d = ""; - null != b && (d += "background-color:" + b + ";"); - null != c && (d += "border:1px solid " + c + ";"); - a = '\x3cdiv style\x3d"zoom:1;' + d + "display:inline-block;_display:inline;padding-bottom:1px;padding-right:1px;line-height:" + this.node.style.lineHeight + '"\x3e' + a + "\x3c/div\x3e"; - this.node.style.lineHeight = "" - } - this.node.innerHTML = a - } -}; -mxText.prototype.updateFont = function(a) { - a = a.style; - a.lineHeight = Math.round(this.size * mxConstants.LINE_HEIGHT) + "px"; - a.fontSize = Math.round(this.size) + "px"; - a.fontFamily = this.family; - a.verticalAlign = "top"; - a.color = this.color; - a.fontWeight = (this.fontStyle & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD ? "bold" : ""; - a.fontStyle = (this.fontStyle & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC ? "italic" : ""; - a.fontDecoration = (this.fontStyle & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE ? "underline" : ""; - a.textAlign = - this.align == mxConstants.ALIGN_CENTER ? "center" : this.align == mxConstants.ALIGN_RIGHT ? "right" : "left" -}; -mxText.prototype.updateSize = function(a) { - var b = Math.round(this.bounds.width / this.scale), - c = Math.round(this.bounds.height / this.scale); - a = a.style; - this.clipped ? (a.overflow = "hidden", 0 < c && (a.maxHeight = c + "px"), 0 < b && (a.width = b + "px")) : "fill" == this.overflow && (a.width = b + "px", 0 < c && (a.maxHeight = c + "px")); - this.wrap ? (!this.clipped && 0 < b && (a.width = b + "px"), a.whiteSpace = "normal") : a.whiteSpace = "nowrap" -}; -mxText.prototype.updateMargin = function() { - this.margin = mxUtils.getAlignmentAsPoint(this.align, this.valign) -}; -mxText.prototype.getSpacing = function() { - var a = 0, - b = 0, - a = this.align == mxConstants.ALIGN_CENTER ? (this.spacingLeft - this.spacingRight) / 2 : this.align == mxConstants.ALIGN_RIGHT ? -this.spacingRight - this.baseSpacingRight : this.spacingLeft + - this.baseSpacingLeft, - b = this.valign == mxConstants.ALIGN_MIDDLE ? (this.spacingTop - this.spacingBottom) / 2 : this.valign == mxConstants.ALIGN_BOTTOM ? -this.spacingBottom - this.baseSpacingBottom : this.spacingTop + - this.baseSpacingTop; - return new mxPoint(a, b) -}; - -function mxTriangle() { - mxActor.call(this) -} -mxUtils.extend(mxTriangle, mxActor); -mxTriangle.prototype.redrawPath = function(a, b, c, d, e) { - a.moveTo(0, 0); - a.lineTo(d, 0.5 * e); - a.lineTo(0, e); - a.close() -}; - -function mxHexagon() { - mxActor.call(this) -} -mxUtils.extend(mxHexagon, mxActor); -mxHexagon.prototype.redrawPath = function(a, b, c, d, e) { - a.moveTo(0.25 * d, 0); - a.lineTo(0.75 * d, 0); - a.lineTo(d, 0.5 * e); - a.lineTo(0.75 * d, e); - a.lineTo(0.25 * d, e); - a.lineTo(0, 0.5 * e); - a.close() -}; - -function mxLine(a, b, c) { - mxShape.call(this); - this.bounds = a; - this.stroke = b; - this.strokewidth = null != c ? c : 1 -} -mxUtils.extend(mxLine, mxShape); -mxLine.prototype.paintVertexShape = function(a, b, c, d, e) { - c += e / 2; - a.begin(); - a.moveTo(b, c); - a.lineTo(b + d, c); - a.stroke() -}; - -function mxImageShape(a, b, c, d, e) { - mxShape.call(this); - this.bounds = a; - this.image = b; - this.fill = c; - this.stroke = d; - this.strokewidth = null != e ? e : 1; - this.shadow = !1 -} -mxUtils.extend(mxImageShape, mxRectangleShape); -mxImageShape.prototype.preserveImageAspect = !0; -mxImageShape.prototype.getSvgScreenOffset = function() { - return !mxClient.IS_IE ? 0.5 : 0 -}; -mxImageShape.prototype.apply = function(a) { - mxShape.prototype.apply.apply(this, arguments); - this.gradient = this.stroke = this.fill = null; - null != this.style && (this.fill = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BACKGROUND), this.stroke = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BORDER), this.preserveImageAspect = - 1 == mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_ASPECT, 1), this.flipH = this.flipH || 1 == mxUtils.getValue(this.style, "imageFlipH", 0), this.flipV = this.flipV || 1 == mxUtils.getValue( - this.style, - "imageFlipV", 0)) -}; -mxImageShape.prototype.isHtmlAllowed = function() { - return !this.preserveImageAspect -}; -mxImageShape.prototype.createHtml = function() { - var a = document.createElement("div"); - a.style.position = "absolute"; - return a -}; -mxImageShape.prototype.paintVertexShape = function(a, b, c, d, e) { - if (null != this.image) { - var f = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BACKGROUND, null), - g = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_BORDER, null); - if (null != f || null != g) a.setFillColor(f), a.setStrokeColor(g), a.rect(b, c, d, e), a.fillAndStroke(); - a.image(b, c, d, e, this.image, this.preserveImageAspect, !1, !1) - } else mxRectangleShape.prototype.paintBackground.apply(this, arguments) -}; -mxImageShape.prototype.redrawHtmlShape = function() { - this.node.style.left = Math.round(this.bounds.x) + "px"; - this.node.style.top = Math.round(this.bounds.y) + "px"; - this.node.style.width = Math.max(0, Math.round(this.bounds.width)) + "px"; - this.node.style.height = Math.max(0, Math.round(this.bounds.height)) + "px"; - this.node.style.backgroundColor = this.fill || ""; - this.node.style.borderColor = this.stroke || ""; - this.node.innerHTML = ""; - if (null != this.image) { - var a = document.createElement(mxClient.IS_IE6 || null == mxClient.CSS_PREFIX && 0 != - this.rotation ? mxClient.VML_PREFIX + ":image" : "img"); - a.style.position = "absolute"; - a.src = this.image; - var b = 100 > this.opacity ? "alpha(opacity\x3d" + this.opacity + ")" : ""; - this.node.style.filter = b; - this.flipH && this.flipV ? b += "progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2)" : this.flipH ? b += "progid:DXImageTransform.Microsoft.BasicImage(mirror\x3d1)" : this.flipV && (b += - "progid:DXImageTransform.Microsoft.BasicImage(rotation\x3d2, mirror\x3d1)"); - a.style.filter != b && (a.style.filter = b); - "image" == a.nodeName ? a.style.rotation = - this.rotation : a.style[mxClient.CSS_PREFIX + "Transform"] = "rotate(" + this.rotation + "deg)"; - a.style.width = this.node.style.width; - a.style.height = this.node.style.height; - this.node.style.backgroundImage = ""; - this.node.appendChild(a) - } else this.setTransparentBackgroundImage(this.node) -}; - -function mxLabel(a, b, c, d) { - mxRectangleShape.call(this, a, b, c, d) -} -mxUtils.extend(mxLabel, mxRectangleShape); -mxLabel.prototype.imageSize = mxConstants.DEFAULT_IMAGESIZE; -mxLabel.prototype.spacing = 2; -mxLabel.prototype.indicatorSize = 10; -mxLabel.prototype.indicatorSpacing = 2; -mxLabel.prototype.init = function(a) { - mxShape.prototype.init.apply(this, arguments); - null != this.indicatorColor && null != this.indicatorShape && (this.indicator = new this.indicatorShape, this.indicator.dialect = this.dialect, this.indicator.bounds = this.bounds, this.indicator - .fill = this.indicatorColor, this.indicator.stroke = this.indicatorColor, this.indicator.gradient = this.indicatorGradientColor, this.indicator.direction = this.indicatorDirection, this.indicator - .init(this.node)) -}; -mxLabel.prototype.redraw = function() { - null != this.indicator && (this.indicator.fill = this.indicatorColor, this.indicator.stroke = this.indicatorColor, this.indicator.gradient = this.indicatorGradientColor, this.indicator.direction = - this.indicatorDirection); - mxShape.prototype.redraw.apply(this, arguments) -}; -mxLabel.prototype.isHtmlAllowed = function() { - return mxRectangleShape.prototype.isHtmlAllowed.apply(this, arguments) && null == this.indicatorColor && null == this.indicatorShape -}; -mxLabel.prototype.paintForeground = function(a, b, c, d, e) { - this.paintImage(a, b, c, d, e); - this.paintIndicator(a, b, c, d, e); - mxRectangleShape.prototype.paintForeground.apply(this, arguments) -}; -mxLabel.prototype.paintImage = function(a, b, c, d, e) { - null != this.image && (b = this.getImageBounds(b, c, d, e), a.image(b.x, b.y, b.width, b.height, this.image, !1, !1, !1)) -}; -mxLabel.prototype.getImageBounds = function(a, b, c, d) { - var e = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_ALIGN, mxConstants.ALIGN_LEFT), - f = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE), - g = mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_WIDTH, mxConstants.DEFAULT_IMAGESIZE), - h = mxUtils.getNumber(this.style, mxConstants.STYLE_IMAGE_HEIGHT, mxConstants.DEFAULT_IMAGESIZE), - k = mxUtils.getNumber(this.style, mxConstants.STYLE_SPACING, this.spacing) + 5; - a = e == mxConstants.ALIGN_CENTER ? - a + (c - g) / 2 : e == mxConstants.ALIGN_RIGHT ? a + (c - g - k) : a + k; - b = f == mxConstants.ALIGN_TOP ? b + k : f == mxConstants.ALIGN_BOTTOM ? b + (d - h - k) : b + (d - h) / 2; - return new mxRectangle(a, b, g, h) -}; -mxLabel.prototype.paintIndicator = function(a, b, c, d, e) { - null != this.indicator ? (this.indicator.bounds = this.getIndicatorBounds(b, c, d, e), this.indicator.paint(a)) : null != this.indicatorImage && (b = this.getIndicatorBounds(b, c, d, e), a.image( - b.x, b.y, b.width, b.height, this.indicatorImage, !1, !1, !1)) -}; -mxLabel.prototype.getIndicatorBounds = function(a, b, c, d) { - var e = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_ALIGN, mxConstants.ALIGN_LEFT), - f = mxUtils.getValue(this.style, mxConstants.STYLE_IMAGE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE), - g = mxUtils.getNumber(this.style, mxConstants.STYLE_INDICATOR_WIDTH, this.indicatorSize), - h = mxUtils.getNumber(this.style, mxConstants.STYLE_INDICATOR_HEIGHT, this.indicatorSize), - k = this.spacing + 5; - a = e == mxConstants.ALIGN_RIGHT ? a + (c - g - k) : e == mxConstants.ALIGN_CENTER ? a + (c - g) / - 2 : a + k; - b = f == mxConstants.ALIGN_BOTTOM ? b + (d - h - k) : f == mxConstants.ALIGN_TOP ? b + k : b + (d - h) / 2; - return new mxRectangle(a, b, g, h) -}; -mxLabel.prototype.redrawHtmlShape = function() { - for (mxRectangleShape.prototype.redrawHtmlShape.apply(this, arguments); this.node.hasChildNodes();) this.node.removeChild(this.node.lastChild); - if (null != this.image) { - var a = document.createElement("img"); - a.style.position = "relative"; - a.setAttribute("border", "0"); - var b = this.getImageBounds(this.bounds.x, this.bounds.y, this.bounds.width, this.bounds.height); - b.x -= this.bounds.x; - b.y -= this.bounds.y; - a.style.left = Math.round(b.x) + "px"; - a.style.top = Math.round(b.y) + "px"; - a.style.width = - Math.round(b.width) + "px"; - a.style.height = Math.round(b.height) + "px"; - a.src = this.image; - this.node.appendChild(a) - } -}; - -function mxCylinder(a, b, c, d) { - mxShape.call(this); - this.bounds = a; - this.fill = b; - this.stroke = c; - this.strokewidth = null != d ? d : 1 -} -mxUtils.extend(mxCylinder, mxShape); -mxCylinder.prototype.maxHeight = 40; -mxCylinder.prototype.svgStrokeTolerance = 0; -mxCylinder.prototype.paintVertexShape = function(a, b, c, d, e) { - a.translate(b, c); - a.begin(); - this.redrawPath(a, b, c, d, e, !1); - a.fillAndStroke(); - a.setShadow(!1); - a.begin(); - this.redrawPath(a, b, c, d, e, !0); - a.stroke() -}; -mxCylinder.prototype.redrawPath = function(a, b, c, d, e, f) { - b = Math.min(this.maxHeight, Math.round(e / 5)); - if (f && null != this.fill || !f && null == this.fill) a.moveTo(0, b), a.curveTo(0, 2 * b, d, 2 * b, d, b), f || (a.stroke(), a.begin()); - f || (a.moveTo(0, b), a.curveTo(0, -b / 3, d, -b / 3, d, b), a.lineTo(d, e - b), a.curveTo(d, e + b / 3, 0, e + b / 3, 0, e - b), a.close()) -}; - -function mxConnector(a, b, c) { - mxPolyline.call(this, a, b, c) -} -mxUtils.extend(mxConnector, mxPolyline); -mxConnector.prototype.paintEdgeShape = function(a, b) { - var c = this.createMarker(a, b, !0), - d = this.createMarker(a, b, !1); - null == this.style || 1 != this.style[mxConstants.STYLE_CURVED] ? this.paintLine(a, b, this.isRounded) : this.paintCurvedLine(a, b); - a.setFillColor(this.stroke); - a.setShadow(!1); - a.setDashed(!1); - null != c && c(); - null != d && d() -}; -mxConnector.prototype.paintCurvedLine = function(a, b) { - a.begin(); - var c = b[0], - d = b.length; - a.moveTo(c.x, c.y); - for (c = 1; c < d - 2; c++) { - var e = b[c], - f = b[c + 1]; - a.quadTo(e.x, e.y, (e.x + f.x) / 2, (e.y + f.y) / 2) - } - e = b[d - 2]; - f = b[d - 1]; - a.quadTo(e.x, e.y, f.x, f.y); - a.stroke() -}; -mxConnector.prototype.createMarker = function(a, b, c) { - var d = b.length, - e = c ? b[1] : b[d - 2]; - b = c ? b[0] : b[d - 1]; - var d = b.x - e.x, - f = b.y - e.y, - g = Math.max(1, Math.sqrt(d * d + f * f)), - e = d / g, - d = f / g, - f = mxUtils.getNumber(this.style, c ? mxConstants.STYLE_STARTSIZE : mxConstants.STYLE_ENDSIZE, mxConstants.DEFAULT_MARKERSIZE), - g = mxUtils.getValue(this.style, c ? mxConstants.STYLE_STARTARROW : mxConstants.STYLE_ENDARROW); - return mxMarker.createMarker(a, this, g, b, e, d, f, c, this.strokewidth, 0 != this.style[c ? mxConstants.STYLE_STARTFILL : mxConstants.STYLE_ENDFILL]) -}; -mxConnector.prototype.augmentBoundingBox = function(a) { - mxShape.prototype.augmentBoundingBox.apply(this, arguments); - var b = 0; - mxUtils.getValue(this.style, mxConstants.STYLE_STARTARROW, mxConstants.NONE) != mxConstants.NONE && (b = mxUtils.getNumber(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_MARKERSIZE) + - 1); - mxUtils.getValue(this.style, mxConstants.STYLE_ENDARROW, mxConstants.NONE) != mxConstants.NONE && (b = Math.max(b, mxUtils.getNumber(this.style, mxConstants.STYLE_ENDSIZE, mxConstants.DEFAULT_MARKERSIZE)) + - 1); - a.grow(Math.ceil(b * this.scale)) -}; - -function mxSwimlane(a, b, c, d) { - mxShape.call(this); - this.bounds = a; - this.fill = b; - this.stroke = c; - this.strokewidth = null != d ? d : 1 -} -mxUtils.extend(mxSwimlane, mxShape); -mxSwimlane.prototype.imageSize = 16; -mxSwimlane.prototype.getGradientBounds = function(a, b, c, d, e) { - a = Math.min(e, mxUtils.getValue(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE)); - return new mxRectangle(b, c, d, a) -}; -mxSwimlane.prototype.getRotation = function() { - var a = mxShape.prototype.getRotation.apply(this, arguments); - 1 != mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, 1) && (a += mxText.prototype.verticalTextRotation); - return a -}; -mxSwimlane.prototype.getTextRotation = function() { - return this.getRotation() -}; -mxSwimlane.prototype.isPaintBoundsInverted = function() { - return mxShape.prototype.isPaintBoundsInverted.apply(this, arguments) || 1 != mxUtils.getValue(this.style, mxConstants.STYLE_HORIZONTAL, 1) -}; -mxSwimlane.prototype.getArcSize = function(a, b, c) { - a = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE, 100 * mxConstants.RECTANGLE_ROUNDING_FACTOR) / 100; - return 3 * c * a -}; -mxSwimlane.prototype.paintVertexShape = function(a, b, c, d, e) { - var f = Math.min(e, mxUtils.getValue(this.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE)), - g = mxUtils.getValue(this.style, mxConstants.STYLE_SWIMLANE_FILLCOLOR, mxConstants.NONE), - h = 1 == mxUtils.getValue(this.style, mxConstants.STYLE_SWIMLANE_LINE, 1), - k = 0; - a.translate(b, c); - this.isRounded ? (k = this.getArcSize(d, e, f), this.paintRoundedSwimlane(a, b, c, d, e, f, k, g, h)) : this.paintSwimlane(a, b, c, d, e, f, g, h); - g = mxUtils.getValue(this.style, mxConstants.STYLE_SEPARATORCOLOR, - mxConstants.NONE); - this.paintSeparator(a, d, f, e, g); - null != this.image && (e = this.getImageBounds(b, f, d, e), a.image(e.x - b, e.y - c, e.width, e.height, this.image, !1, !1, !1)); - this.glass && (a.setShadow(!1), this.paintGlassEffect(a, 0, 0, d, f, k)) -}; -mxSwimlane.prototype.paintSwimlane = function(a, b, c, d, e, f, g, h) { - g != mxConstants.NONE && (a.save(), a.setFillColor(g), a.rect(0, 0, d, e), a.fillAndStroke(), a.restore(), a.setShadow(!1)); - a.begin(); - a.moveTo(0, f); - a.lineTo(0, 0); - a.lineTo(d, 0); - a.lineTo(d, f); - h && a.close(); - a.fillAndStroke(); - f < e && g == mxConstants.NONE && (a.pointerEvents = !1, a.begin(), a.moveTo(0, f), a.lineTo(0, e), a.lineTo(d, e), a.lineTo(d, f), a.stroke()) -}; -mxSwimlane.prototype.paintRoundedSwimlane = function(a, b, c, d, e, f, g, h, k) { - h != mxConstants.NONE && (a.save(), a.setFillColor(h), a.roundrect(0, 0, d, e, g, g), a.fillAndStroke(), a.restore(), a.setShadow(!1)); - a.begin(); - a.moveTo(d, f); - a.lineTo(d, g); - a.quadTo(d, 0, d - Math.min(d / 2, g), 0); - a.lineTo(Math.min(d / 2, g), 0); - a.quadTo(0, 0, 0, g); - a.lineTo(0, f); - k && a.close(); - a.fillAndStroke(); - f < e && h == mxConstants.NONE && (a.pointerEvents = !1, a.begin(), a.moveTo(0, f), a.lineTo(0, e - g), a.quadTo(0, e, Math.min(d / 2, g), e), a.lineTo(d - Math.min(d / 2, g), e), - a.quadTo(d, e, d, e - g), a.lineTo(d, f), a.stroke()) -}; -mxSwimlane.prototype.paintSeparator = function(a, b, c, d, e) { - e != mxConstants.NONE && (a.setStrokeColor(e), a.setDashed(!0), a.begin(), a.moveTo(b, c), a.lineTo(b, d), a.stroke(), a.setDashed(!1)) -}; -mxSwimlane.prototype.getImageBounds = function(a, b, c, d) { - return new mxRectangle(a + c - this.imageSize, b, this.imageSize, this.imageSize) -}; - -function mxGraphLayout(a) { - this.graph = a -} -mxGraphLayout.prototype.graph = null; -mxGraphLayout.prototype.useBoundingBox = !0; -mxGraphLayout.prototype.parent = null; -mxGraphLayout.prototype.moveCell = function(a, b, c) {}; -mxGraphLayout.prototype.execute = function(a) {}; -mxGraphLayout.prototype.getGraph = function() { - return this.graph -}; -mxGraphLayout.prototype.getConstraint = function(a, b, c, d) { - c = this.graph.view.getState(b); - b = null != c ? c.style : this.graph.getCellStyle(b); - return null != b ? b[a] : null -}; -mxGraphLayout.traverse = function(a, b, c, d, e) { - if (null != c && null != a) { - b = null != b ? b : !0; - e = e || []; - var f = mxCellPath.create(a); - if (null == e[f] && (e[f] = a, d = c(a, d), null == d || d)) - if (d = this.graph.model.getEdgeCount(a), 0 < d) - for (f = 0; f < d; f++) { - var g = this.graph.model.getEdgeAt(a, f), - h = this.graph.model.getTerminal(g, !0) == a; - if (!b || h) h = this.graph.view.getVisibleTerminal(g, !h), this.traverse(h, b, c, g, e) - } - } -}; -mxGraphLayout.prototype.isVertexMovable = function(a) { - return this.graph.isCellMovable(a) -}; -mxGraphLayout.prototype.isVertexIgnored = function(a) { - return !this.graph.getModel().isVertex(a) || !this.graph.isCellVisible(a) -}; -mxGraphLayout.prototype.isEdgeIgnored = function(a) { - var b = this.graph.getModel(); - return !b.isEdge(a) || !this.graph.isCellVisible(a) || null == b.getTerminal(a, !0) || null == b.getTerminal(a, !1) -}; -mxGraphLayout.prototype.setEdgeStyleEnabled = function(a, b) { - this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE, b ? "0" : "1", [a]) -}; -mxGraphLayout.prototype.setOrthogonalEdge = function(a, b) { - this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL, b ? "1" : "0", [a]) -}; -mxGraphLayout.prototype.getParentOffset = function(a) { - var b = new mxPoint; - if (null != a && a != this.parent) { - var c = this.graph.getModel(); - if (c.isAncestor(this.parent, a)) - for (var d = c.getGeometry(a); a != this.parent;) b.x += d.x, b.y += d.y, a = c.getParent(a), d = c.getGeometry(a) - } - return b -}; -mxGraphLayout.prototype.setEdgePoints = function(a, b) { - if (null != a) { - var c = this.graph.model, - d = c.getGeometry(a); - null == d ? (d = new mxGeometry, d.setRelative(!0)) : d = d.clone(); - if (null != this.parent && null != b) - for (var e = c.getParent(a), e = this.getParentOffset(e), f = 0; f < b.length; f++) b[f].x -= e.x, b[f].y -= e.y; - d.points = b; - c.setGeometry(a, d) - } -}; -mxGraphLayout.prototype.setVertexLocation = function(a, b, c) { - var d = this.graph.getModel(), - e = d.getGeometry(a), - f = null; - if (null != e) { - f = new mxRectangle(b, c, e.width, e.height); - if (this.useBoundingBox) { - var g = this.graph.getView().getState(a); - if (null != g && null != g.text && null != g.text.boundingBox) { - var h = this.graph.getView().scale, - k = g.text.boundingBox; - g.text.boundingBox.x < g.x && (b += (g.x - k.x) / h, f.width = k.width); - g.text.boundingBox.y < g.y && (c += (g.y - k.y) / h, f.height = k.height) - } - } - null != this.parent && (g = d.getParent(a), null != g && g != - this.parent && (g = this.getParentOffset(g), b -= g.x, c -= g.y)); - if (e.x != b || e.y != c) e = e.clone(), e.x = b, e.y = c, d.setGeometry(a, e) - } - return f -}; -mxGraphLayout.prototype.getVertexBounds = function(a) { - var b = this.graph.getModel().getGeometry(a); - if (this.useBoundingBox) { - var c = this.graph.getView().getState(a); - if (null != c && null != c.text && null != c.text.boundingBox) var d = this.graph.getView().scale, - e = c.text.boundingBox, - f = Math.max(c.x - e.x, 0) / d, - g = Math.max(c.y - e.y, 0) / d, - h = Math.max(e.x + e.width - (c.x + c.width), 0) / d, - c = Math.max(e.y + e.height - (c.y + c.height), 0) / d, - b = new mxRectangle(b.x - f, b.y - g, b.width + f + h, b.height + g + c) - } - null != this.parent && (a = this.graph.getModel().getParent(a), - b = b.clone(), null != a && a != this.parent && (a = this.getParentOffset(a), b.x += a.x, b.y += a.y)); - return new mxRectangle(b.x, b.y, b.width, b.height) -}; -mxGraphLayout.prototype.arrangeGroups = function(a, b) { - this.graph.getModel().beginUpdate(); - try { - for (var c = a.length - 1; 0 <= c; c--) { - var d = a[c], - e = this.graph.getChildVertices(d), - f = this.graph.getBoundingBoxFromGeometry(e), - g = this.graph.getCellGeometry(d), - h = 0, - k = 0; - if (this.graph.isSwimlane(d)) var l = this.graph.getStartSize(d), - h = l.width, - k = l.height; - null != f && null != g && (g = g.clone(), g.x = g.x + f.x - b - h, g.y = g.y + f.y - b - k, g.width = f.width + 2 * b + h, g.height = f.height + 2 * b + k, this.graph.getModel().setGeometry(d, - g), this.graph.moveCells(e, - b + h - f.x, b + k - f.y)) - } - } finally { - this.graph.getModel().endUpdate() - } -}; - -function mxStackLayout(a, b, c, d, e, f) { - mxGraphLayout.call(this, a); - this.horizontal = null != b ? b : !0; - this.spacing = null != c ? c : 0; - this.x0 = null != d ? d : 0; - this.y0 = null != e ? e : 0; - this.border = null != f ? f : 0 -} -mxStackLayout.prototype = new mxGraphLayout; -mxStackLayout.prototype.constructor = mxStackLayout; -mxStackLayout.prototype.horizontal = null; -mxStackLayout.prototype.spacing = null; -mxStackLayout.prototype.x0 = null; -mxStackLayout.prototype.y0 = null; -mxStackLayout.prototype.border = 0; -mxStackLayout.prototype.keepFirstLocation = !1; -mxStackLayout.prototype.fill = !1; -mxStackLayout.prototype.resizeParent = !1; -mxStackLayout.prototype.resizeLast = !1; -mxStackLayout.prototype.wrap = null; -mxStackLayout.prototype.isHorizontal = function() { - return this.horizontal -}; -mxStackLayout.prototype.moveCell = function(a, b, c) { - var d = this.graph.getModel(), - e = d.getParent(a), - f = this.isHorizontal(); - if (null != a && null != e) { - var g = 0, - h = 0, - k = d.getChildCount(e); - b = f ? b : c; - g = this.graph.getView().getState(e); - null != g && (b -= f ? g.x : g.y); - for (g = 0; g < k; g++) - if (c = d.getChildAt(e, g), c != a && (c = d.getGeometry(c), null != c)) { - c = f ? c.x + c.width / 2 : c.y + c.height / 2; - if (h < b && c > b) break; - h = c - } - f = e.getIndex(a); - f = Math.max(0, g - (g > f ? 1 : 0)); - d.add(e, a, f) - } -}; -mxStackLayout.prototype.getParentSize = function(a) { - var b = this.graph.getModel(), - c = b.getGeometry(a); - if (null != this.graph.container && (null == c && b.isLayer(a) || a == this.graph.getView().currentRoot)) c = new mxRectangle(0, 0, this.graph.container.offsetWidth - 1, this.graph.container.offsetHeight - - 1); - return c -}; -mxStackLayout.prototype.execute = function(a) { - if (null != a) { - var b = this.isHorizontal(), - c = this.graph.getModel(), - d = this.getParentSize(a), - e = 0; - null != d && (e = b ? d.height : d.width); - var e = e - (2 * this.spacing + 2 * this.border), - f = this.x0 + this.border, - g = this.y0 + this.border; - if (this.graph.isSwimlane(a)) { - var h = this.graph.getCellStyle(a), - k = mxUtils.getValue(h, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE), - h = mxUtils.getValue(h, mxConstants.STYLE_HORIZONTAL, !0); - b == h && (e -= k); - b ? g += k : f += k - } - c.beginUpdate(); - try { - for (var k = 0, - h = null, l = c.getChildCount(a), m = 0; m < l; m++) { - var n = c.getChildAt(a, m); - if (!this.isVertexIgnored(n) && this.isVertexMovable(n)) { - var p = c.getGeometry(n); - if (null != p) { - p = p.clone(); - if (null != this.wrap && null != h && (b && h.x + h.width + p.width + 2 * this.spacing > this.wrap || !b && h.y + h.height + p.height + 2 * this.spacing > this.wrap)) h = null, b ? g += - k + this.spacing : f += k + this.spacing, k = 0; - k = Math.max(k, b ? p.height : p.width); - null != h ? b ? p.x = h.x + h.width + this.spacing : p.y = h.y + h.height + this.spacing : this.keepFirstLocation || (b ? p.x = f : p.y = g); - b ? p.y = g : p.x = f; - this.fill && 0 < e && (b ? p.height = e : p.width = e); - c.setGeometry(n, p); - h = p - } - } - } - this.resizeParent && null != d && null != h && !this.graph.isCellCollapsed(a) ? (d = d.clone(), b ? d.width = h.x + h.width + this.spacing : d.height = h.y + h.height + this.spacing, c.setGeometry( - a, d)) : this.resizeLast && (null != d && null != h) && (b ? h.width = d.width - h.x - this.spacing : h.height = d.height - h.y - this.spacing) - } finally { - c.endUpdate() - } - } -}; - -function mxPartitionLayout(a, b, c, d) { - mxGraphLayout.call(this, a); - this.horizontal = null != b ? b : !0; - this.spacing = c || 0; - this.border = d || 0 -} -mxPartitionLayout.prototype = new mxGraphLayout; -mxPartitionLayout.prototype.constructor = mxPartitionLayout; -mxPartitionLayout.prototype.horizontal = null; -mxPartitionLayout.prototype.spacing = null; -mxPartitionLayout.prototype.border = null; -mxPartitionLayout.prototype.resizeVertices = !0; -mxPartitionLayout.prototype.isHorizontal = function() { - return this.horizontal -}; -mxPartitionLayout.prototype.moveCell = function(a, b, c) { - c = this.graph.getModel(); - var d = c.getParent(a); - if (null != a && null != d) { - for (var e = 0, f = 0, g = c.getChildCount(d), e = 0; e < g; e++) { - var h = c.getChildAt(d, e), - h = this.getVertexBounds(h); - if (null != h) { - h = h.x + h.width / 2; - if (f < b && h > b) break; - f = h - } - } - b = d.getIndex(a); - b = Math.max(0, e - (e > b ? 1 : 0)); - c.add(d, a, b) - } -}; -mxPartitionLayout.prototype.execute = function(a) { - var b = this.isHorizontal(), - c = this.graph.getModel(), - d = c.getGeometry(a); - if (null != this.graph.container && (null == d && c.isLayer(a) || a == this.graph.getView().currentRoot)) d = new mxRectangle(0, 0, this.graph.container.offsetWidth - 1, this.graph.container.offsetHeight - - 1); - if (null != d) { - for (var e = [], f = c.getChildCount(a), g = 0; g < f; g++) { - var h = c.getChildAt(a, g); - !this.isVertexIgnored(h) && this.isVertexMovable(h) && e.push(h) - } - f = e.length; - if (0 < f) { - var k = this.border, - l = this.border, - m = b ? - d.height : d.width, - m = m - 2 * this.border; - a = this.graph.isSwimlane(a) ? this.graph.getStartSize(a) : new mxRectangle; - m -= b ? a.height : a.width; - k += a.width; - l += a.height; - a = this.border + (f - 1) * this.spacing; - d = b ? (d.width - k - a) / f : (d.height - l - a) / f; - if (0 < d) { - c.beginUpdate(); - try { - for (g = 0; g < f; g++) { - var h = e[g], - n = c.getGeometry(h); - null != n && (n = n.clone(), n.x = k, n.y = l, b ? (this.resizeVertices && (n.width = d, n.height = m), k += d + this.spacing) : (this.resizeVertices && (n.height = d, n.width = m), l += - d + this.spacing), c.setGeometry(h, n)) - } - } finally { - c.endUpdate() - } - } - } - } -}; - -function mxCompactTreeLayout(a, b, c) { - mxGraphLayout.call(this, a); - this.horizontal = null != b ? b : !0; - this.invert = null != c ? c : !1 -} -mxCompactTreeLayout.prototype = new mxGraphLayout; -mxCompactTreeLayout.prototype.constructor = mxCompactTreeLayout; -mxCompactTreeLayout.prototype.horizontal = null; -mxCompactTreeLayout.prototype.invert = null; -mxCompactTreeLayout.prototype.resizeParent = !0; -mxCompactTreeLayout.prototype.groupPadding = 10; -mxCompactTreeLayout.prototype.parentsChanged = null; -mxCompactTreeLayout.prototype.moveTree = !1; -mxCompactTreeLayout.prototype.levelDistance = 10; -mxCompactTreeLayout.prototype.nodeDistance = 20; -mxCompactTreeLayout.prototype.resetEdges = !0; -mxCompactTreeLayout.prototype.prefHozEdgeSep = 5; -mxCompactTreeLayout.prototype.prefVertEdgeOff = 4; -mxCompactTreeLayout.prototype.minEdgeJetty = 8; -mxCompactTreeLayout.prototype.channelBuffer = 4; -mxCompactTreeLayout.prototype.edgeRouting = !0; -mxCompactTreeLayout.prototype.isVertexIgnored = function(a) { - return mxGraphLayout.prototype.isVertexIgnored.apply(this, arguments) || 0 == this.graph.getConnections(a).length -}; -mxCompactTreeLayout.prototype.isHorizontal = function() { - return this.horizontal -}; -mxCompactTreeLayout.prototype.execute = function(a, b) { - this.parent = a; - var c = this.graph.getModel(); - if (null == b) - if (0 < this.graph.getEdges(a, c.getParent(a), this.invert, !this.invert, !1).length) b = a; - else { - var d = this.graph.findTreeRoots(a, !0, this.invert); - if (0 < d.length) - for (var e = 0; e < d.length; e++) - if (!this.isVertexIgnored(d[e]) && 0 < this.graph.getEdges(d[e], null, this.invert, !this.invert, !1).length) { - b = d[e]; - break - } - } - if (null != b) { - this.parentsChanged = this.resizeParent ? {} : null; - c.beginUpdate(); - try { - var f = this.dfs(b, a); - if (null != - f) { - this.layout(f); - var g = this.graph.gridSize, - d = g; - if (!this.moveTree) { - var h = this.getVertexBounds(b); - null != h && (g = h.x, d = h.y) - } - h = null; - h = this.isHorizontal() ? this.horizontalLayout(f, g, d) : this.verticalLayout(f, null, g, d); - if (null != h) { - var k = e = 0; - 0 > h.x && (e = Math.abs(g - h.x)); - 0 > h.y && (k = Math.abs(d - h.y)); - (0 != e || 0 != k) && this.moveNode(f, e, k); - this.resizeParent && this.adjustParents(); - this.edgeRouting && this.localEdgeProcessing(f) - } - } - } finally { - c.endUpdate() - } - } -}; -mxCompactTreeLayout.prototype.moveNode = function(a, b, c) { - a.x += b; - a.y += c; - this.apply(a); - for (a = a.child; null != a;) this.moveNode(a, b, c), a = a.next -}; -mxCompactTreeLayout.prototype.dfs = function(a, b, c) { - c = null != c ? c : []; - var d = mxCellPath.create(a), - e = null; - if (null != a && null == c[d] && !this.isVertexIgnored(a)) { - c[d] = a; - var e = this.createNode(a), - d = this.graph.getModel(), - f = null; - a = this.graph.getEdges(a, b, this.invert, !this.invert, !1, !0); - for (var g = this.graph.getView(), h = 0; h < a.length; h++) { - var k = a[h]; - if (!this.isEdgeIgnored(k)) { - this.resetEdges && this.setEdgePoints(k, null); - this.edgeRouting && (this.setEdgeStyleEnabled(k, !1), this.setEdgePoints(k, null)); - var l = g.getState(k), - k = null != l ? l.getVisibleTerminal(this.invert) : g.getVisibleTerminal(k, this.invert), - l = this.dfs(k, b, c); - null != l && null != d.getGeometry(k) && (null == f ? e.child = l : f.next = l, f = l) - } - } - } - return e -}; -mxCompactTreeLayout.prototype.layout = function(a) { - if (null != a) { - for (var b = a.child; null != b;) this.layout(b), b = b.next; - null != a.child ? this.attachParent(a, this.join(a)) : this.layoutLeaf(a) - } -}; -mxCompactTreeLayout.prototype.horizontalLayout = function(a, b, c, d) { - a.x += b + a.offsetX; - a.y += c + a.offsetY; - d = this.apply(a, d); - b = a.child; - if (null != b) { - d = this.horizontalLayout(b, a.x, a.y, d); - c = a.y + b.offsetY; - for (var e = b.next; null != e;) d = this.horizontalLayout(e, a.x + b.offsetX, c, d), c += e.offsetY, e = e.next - } - return d -}; -mxCompactTreeLayout.prototype.verticalLayout = function(a, b, c, d, e) { - a.x += c + a.offsetY; - a.y += d + a.offsetX; - e = this.apply(a, e); - b = a.child; - if (null != b) { - e = this.verticalLayout(b, a, a.x, a.y, e); - c = a.x + b.offsetY; - for (d = b.next; null != d;) e = this.verticalLayout(d, a, c, a.y + b.offsetX, e), c += d.offsetY, d = d.next - } - return e -}; -mxCompactTreeLayout.prototype.attachParent = function(a, b) { - var c = this.nodeDistance + this.levelDistance, - d = (b - a.width) / 2 - this.nodeDistance, - e = d + a.width + 2 * this.nodeDistance - b; - a.child.offsetX = c + a.height; - a.child.offsetY = e; - a.contour.upperHead = this.createLine(a.height, 0, this.createLine(c, e, a.contour.upperHead)); - a.contour.lowerHead = this.createLine(a.height, 0, this.createLine(c, d, a.contour.lowerHead)) -}; -mxCompactTreeLayout.prototype.layoutLeaf = function(a) { - var b = 2 * this.nodeDistance; - a.contour.upperTail = this.createLine(a.height + b, 0); - a.contour.upperHead = a.contour.upperTail; - a.contour.lowerTail = this.createLine(0, -a.width - b); - a.contour.lowerHead = this.createLine(a.height + b, 0, a.contour.lowerTail) -}; -mxCompactTreeLayout.prototype.join = function(a) { - var b = 2 * this.nodeDistance, - c = a.child; - a.contour = c.contour; - for (var d = c.width + b, e = d, c = c.next; null != c;) { - var f = this.merge(a.contour, c.contour); - c.offsetY = f + d; - c.offsetX = 0; - d = c.width + b; - e += f + d; - c = c.next - } - return e -}; -mxCompactTreeLayout.prototype.merge = function(a, b) { - for (var c = 0, d = 0, e = 0, f = a.lowerHead, g = b.upperHead; null != g && null != f;) { - var h = this.offset(c, d, g.dx, g.dy, f.dx, f.dy), - d = d + h, - e = e + h; - c + g.dx <= f.dx ? (c += g.dx, d += g.dy, g = g.next) : (c -= f.dx, d -= f.dy, f = f.next) - } - null != g ? (c = this.bridge(a.upperTail, 0, 0, g, c, d), a.upperTail = null != c.next ? b.upperTail : c, a.lowerTail = b.lowerTail) : (c = this.bridge(b.lowerTail, c, d, f, 0, 0), null == c.next && - (a.lowerTail = c)); - a.lowerHead = b.lowerHead; - return e -}; -mxCompactTreeLayout.prototype.offset = function(a, b, c, d, e, f) { - var g = 0; - if (e <= a || 0 >= a + c) return 0; - g = 0 < e * d - c * f ? 0 > a ? a * d / c - b : 0 < a ? a * f / e - b : -b : e < a + c ? f - (b + (e - a) * d / c) : e > a + c ? (c + a) * f / e - (b + d) : f - (b + d); - return 0 < g ? g : 0 -}; -mxCompactTreeLayout.prototype.bridge = function(a, b, c, d, e, f) { - b = e + d.dx - b; - e = e = 0; - 0 == d.dx ? e = d.dy : (e = b * d.dy, e /= d.dx); - b = this.createLine(b, e, d.next); - a.next = this.createLine(0, f + d.dy - e - c, b); - return b -}; -mxCompactTreeLayout.prototype.createNode = function(a) { - var b = {}; - b.cell = a; - b.x = 0; - b.y = 0; - b.width = 0; - b.height = 0; - a = this.getVertexBounds(a); - null != a && (this.isHorizontal() ? (b.width = a.height, b.height = a.width) : (b.width = a.width, b.height = a.height)); - b.offsetX = 0; - b.offsetY = 0; - b.contour = {}; - return b -}; -mxCompactTreeLayout.prototype.apply = function(a, b) { - var c = this.graph.getModel(), - d = a.cell, - e = c.getGeometry(d); - null != d && null != e && (this.isVertexMovable(d) && (e = this.setVertexLocation(d, a.x, a.y), this.resizeParent && (c = c.getParent(d), d = mxCellPath.create(c), null == this.parentsChanged[d] && - (this.parentsChanged[d] = c))), b = null == b ? new mxRectangle(e.x, e.y, e.width, e.height) : new mxRectangle(Math.min(b.x, e.x), Math.min(b.y, e.y), Math.max(b.x + b.width, e.x + e.width), - Math.max(b.y + b.height, e.y + e.height))); - return b -}; -mxCompactTreeLayout.prototype.createLine = function(a, b, c) { - var d = {}; - d.dx = a; - d.dy = b; - d.next = c; - return d -}; -mxCompactTreeLayout.prototype.adjustParents = function() { - var a = [], - b; - for (b in this.parentsChanged) a.push(this.parentsChanged[b]); - this.arrangeGroups(mxUtils.sortCells(a, !0), this.groupPadding) -}; -mxCompactTreeLayout.prototype.localEdgeProcessing = function(a) { - this.processNodeOutgoing(a); - for (a = a.child; null != a;) this.localEdgeProcessing(a), a = a.next -}; -mxCompactTreeLayout.prototype.processNodeOutgoing = function(a) { - for (var b = a.child, c = a.cell, d = 0, e = []; null != b;) { - d++; - var f = b.x; - this.horizontal && (f = b.y); - e.push(new WeightedCellSorter(b, f)); - b = b.next - } - e.sort(WeightedCellSorter.prototype.compare); - var f = a.width, - g = (d + 1) * this.prefHozEdgeSep; - f > g + 2 * this.prefHozEdgeSep && (f -= 2 * this.prefHozEdgeSep); - a = f / d; - b = a / 2; - f > g + 2 * this.prefHozEdgeSep && (b += this.prefHozEdgeSep); - for (var f = this.minEdgeJetty - this.prefVertEdgeOff, g = 0, h = this.getVertexBounds(c), k = 0; k < e.length; k++) { - for (var l = - e[k].cell.cell, m = this.getVertexBounds(l), l = this.graph.getEdgesBetween(c, l, !1), n = [], p = 0, q = 0, s = 0; s < l.length; s++) this.horizontal ? (p = h.x + h.width, q = h.y + b, n.push( - new mxPoint(p, q)), p = h.x + h.width + f, n.push(new mxPoint(p, q)), q = m.y + m.height / 2) : (p = h.x + b, q = h.y + h.height, n.push(new mxPoint(p, q)), q = h.y + h.height + f, n.push( - new mxPoint(p, q)), p = m.x + m.width / 2), n.push(new mxPoint(p, q)), this.setEdgePoints(l[s], n); - k < d / 2 ? f += this.prefVertEdgeOff : k > d / 2 && (f -= this.prefVertEdgeOff); - b += a; - g = Math.max(g, f) - } -}; - -function WeightedCellSorter(a, b) { - this.cell = a; - this.weightedValue = b -} -WeightedCellSorter.prototype.weightedValue = 0; -WeightedCellSorter.prototype.nudge = !1; -WeightedCellSorter.prototype.visited = !1; -WeightedCellSorter.prototype.rankIndex = null; -WeightedCellSorter.prototype.cell = null; -WeightedCellSorter.prototype.compare = function(a, b) { - return null != a && null != b ? b.weightedValue > a.weightedValue ? 1 : b.weightedValue < a.weightedValue ? -1 : b.nudge ? 1 : -1 : 0 -}; - -function mxFastOrganicLayout(a) { - mxGraphLayout.call(this, a) -} -mxFastOrganicLayout.prototype = new mxGraphLayout; -mxFastOrganicLayout.prototype.constructor = mxFastOrganicLayout; -mxFastOrganicLayout.prototype.useInputOrigin = !0; -mxFastOrganicLayout.prototype.resetEdges = !0; -mxFastOrganicLayout.prototype.disableEdgeStyle = !0; -mxFastOrganicLayout.prototype.forceConstant = 50; -mxFastOrganicLayout.prototype.forceConstantSquared = 0; -mxFastOrganicLayout.prototype.minDistanceLimit = 2; -mxFastOrganicLayout.prototype.maxDistanceLimit = 500; -mxFastOrganicLayout.prototype.minDistanceLimitSquared = 4; -mxFastOrganicLayout.prototype.initialTemp = 200; -mxFastOrganicLayout.prototype.temperature = 0; -mxFastOrganicLayout.prototype.maxIterations = 0; -mxFastOrganicLayout.prototype.iteration = 0; -mxFastOrganicLayout.prototype.allowedToRun = !0; -mxFastOrganicLayout.prototype.isVertexIgnored = function(a) { - return mxGraphLayout.prototype.isVertexIgnored.apply(this, arguments) || 0 == this.graph.getConnections(a).length -}; -mxFastOrganicLayout.prototype.execute = function(a) { - var b = this.graph.getModel(); - this.vertexArray = []; - for (var c = this.graph.getChildVertices(a), d = 0; d < c.length; d++) this.isVertexIgnored(c[d]) || this.vertexArray.push(c[d]); - var e = this.useInputOrigin ? this.graph.view.getBounds(this.vertexArray) : null, - f = this.vertexArray.length; - this.indices = []; - this.dispX = []; - this.dispY = []; - this.cellLocation = []; - this.isMoveable = []; - this.neighbours = []; - this.radius = []; - this.radiusSquared = []; - 0.0010 > this.forceConstant && (this.forceConstant = - 0.0010); - this.forceConstantSquared = this.forceConstant * this.forceConstant; - for (d = 0; d < this.vertexArray.length; d++) { - var g = this.vertexArray[d]; - this.cellLocation[d] = []; - var h = mxCellPath.create(g); - this.indices[h] = d; - var k = this.getVertexBounds(g), - l = k.width, - m = k.height, - n = k.x, - p = k.y; - this.cellLocation[d][0] = n + l / 2; - this.cellLocation[d][1] = p + m / 2; - this.radius[d] = Math.min(l, m); - this.radiusSquared[d] = this.radius[d] * this.radius[d] - } - b.beginUpdate(); - try { - for (d = 0; d < f; d++) { - this.dispX[d] = 0; - this.dispY[d] = 0; - this.isMoveable[d] = this.isVertexMovable(this.vertexArray[d]); - var q = this.graph.getConnections(this.vertexArray[d], a), - c = this.graph.getOpposites(q, this.vertexArray[d]); - this.neighbours[d] = []; - for (l = 0; l < c.length; l++) { - this.resetEdges && this.graph.resetEdge(q[l]); - this.disableEdgeStyle && this.setEdgeStyleEnabled(q[l], !1); - var h = mxCellPath.create(c[l]), - s = this.indices[h]; - this.neighbours[d][l] = null != s ? s : d - } - } - this.temperature = this.initialTemp; - 0 == this.maxIterations && (this.maxIterations = 20 * Math.sqrt(f)); - for (this.iteration = 0; this.iteration < this.maxIterations; this.iteration++) { - if (!this.allowedToRun) return; - this.calcRepulsion(); - this.calcAttraction(); - this.calcPositions(); - this.reduceTemperature() - } - a = c = null; - for (d = 0; d < this.vertexArray.length; d++) g = this.vertexArray[d], this.isVertexMovable(g) && (k = this.getVertexBounds(g), null != k && (this.cellLocation[d][0] -= k.width / 2, this.cellLocation[ - d][1] -= k.height / 2, n = this.graph.snap(this.cellLocation[d][0]), p = this.graph.snap(this.cellLocation[d][1]), this.setVertexLocation(g, n, p), c = null == c ? n : Math.min(c, n), a = - null == a ? p : Math.min(a, p))); - d = -(c || 0) + 1; - g = -(a || 0) + 1; - null != e && (d += e.x, - g += e.y); - this.graph.moveCells(this.vertexArray, d, g) - } finally { - b.endUpdate() - } -}; -mxFastOrganicLayout.prototype.calcPositions = function() { - for (var a = 0; a < this.vertexArray.length; a++) - if (this.isMoveable[a]) { - var b = Math.sqrt(this.dispX[a] * this.dispX[a] + this.dispY[a] * this.dispY[a]); - 0.0010 > b && (b = 0.0010); - var c = this.dispX[a] / b * Math.min(b, this.temperature), - b = this.dispY[a] / b * Math.min(b, this.temperature); - this.dispX[a] = 0; - this.dispY[a] = 0; - this.cellLocation[a][0] += c; - this.cellLocation[a][1] += b - } -}; -mxFastOrganicLayout.prototype.calcAttraction = function() { - for (var a = 0; a < this.vertexArray.length; a++) - for (var b = 0; b < this.neighbours[a].length; b++) { - var c = this.neighbours[a][b]; - if (a != c && this.isMoveable[a] && this.isMoveable[c]) { - var d = this.cellLocation[a][0] - this.cellLocation[c][0], - e = this.cellLocation[a][1] - this.cellLocation[c][1], - f = d * d + e * e - this.radiusSquared[a] - this.radiusSquared[c]; - f < this.minDistanceLimitSquared && (f = this.minDistanceLimitSquared); - var g = Math.sqrt(f), - f = f / this.forceConstant, - d = d / g * f, - e = e / g * f; - this.dispX[a] -= d; - this.dispY[a] -= e; - this.dispX[c] += d; - this.dispY[c] += e - } - } -}; -mxFastOrganicLayout.prototype.calcRepulsion = function() { - for (var a = this.vertexArray.length, b = 0; b < a; b++) - for (var c = b; c < a; c++) { - if (!this.allowedToRun) return; - if (c != b && this.isMoveable[b] && this.isMoveable[c]) { - var d = this.cellLocation[b][0] - this.cellLocation[c][0], - e = this.cellLocation[b][1] - this.cellLocation[c][1]; - 0 == d && (d = 0.01 + Math.random()); - 0 == e && (e = 0.01 + Math.random()); - var f = Math.sqrt(d * d + e * e), - g = f - this.radius[b] - this.radius[c]; - g > this.maxDistanceLimit || (g < this.minDistanceLimit && (g = this.minDistanceLimit), g = this.forceConstantSquared / - g, d = d / f * g, e = e / f * g, this.dispX[b] += d, this.dispY[b] += e, this.dispX[c] -= d, this.dispY[c] -= e) - } - } -}; -mxFastOrganicLayout.prototype.reduceTemperature = function() { - this.temperature = this.initialTemp * (1 - this.iteration / this.maxIterations) -}; - -function mxCircleLayout(a, b) { - mxGraphLayout.call(this, a); - this.radius = null != b ? b : 100 -} -mxCircleLayout.prototype = new mxGraphLayout; -mxCircleLayout.prototype.constructor = mxCircleLayout; -mxCircleLayout.prototype.radius = null; -mxCircleLayout.prototype.moveCircle = !1; -mxCircleLayout.prototype.x0 = 0; -mxCircleLayout.prototype.y0 = 0; -mxCircleLayout.prototype.resetEdges = !0; -mxCircleLayout.prototype.disableEdgeStyle = !0; -mxCircleLayout.prototype.execute = function(a) { - var b = this.graph.getModel(); - b.beginUpdate(); - try { - for (var c = 0, d = null, e = null, f = [], g = b.getChildCount(a), h = 0; h < g; h++) { - var k = b.getChildAt(a, h); - if (this.isVertexIgnored(k)) this.isEdgeIgnored(k) || (this.resetEdges && this.graph.resetEdge(k), this.disableEdgeStyle && this.setEdgeStyleEnabled(k, !1)); - else { - f.push(k); - var l = this.getVertexBounds(k), - d = null == d ? l.y : Math.min(d, l.y), - e = null == e ? l.x : Math.min(e, l.x), - c = Math.max(c, Math.max(l.width, l.height)) - } - } - var m = this.getRadius(f.length, - c); - this.moveCircle && (e = this.x0, d = this.y0); - this.circle(f, m, e, d) - } finally { - b.endUpdate() - } -}; -mxCircleLayout.prototype.getRadius = function(a, b) { - return Math.max(a * b / Math.PI, this.radius) -}; -mxCircleLayout.prototype.circle = function(a, b, c, d) { - for (var e = a.length, f = 2 * Math.PI / e, g = 0; g < e; g++) this.isVertexMovable(a[g]) && this.setVertexLocation(a[g], c + b + b * Math.sin(g * f), d + b + b * Math.cos(g * f)) -}; - -function mxParallelEdgeLayout(a) { - mxGraphLayout.call(this, a) -} -mxParallelEdgeLayout.prototype = new mxGraphLayout; -mxParallelEdgeLayout.prototype.constructor = mxParallelEdgeLayout; -mxParallelEdgeLayout.prototype.spacing = 20; -mxParallelEdgeLayout.prototype.execute = function(a) { - a = this.findParallels(a); - this.graph.model.beginUpdate(); - try { - for (var b in a) { - var c = a[b]; - 1 < c.length && this.layout(c) - } - } finally { - this.graph.model.endUpdate() - } -}; -mxParallelEdgeLayout.prototype.findParallels = function(a) { - for (var b = this.graph.getModel(), c = [], d = b.getChildCount(a), e = 0; e < d; e++) { - var f = b.getChildAt(a, e); - if (!this.isEdgeIgnored(f)) { - var g = this.getEdgeId(f); - null != g && (null == c[g] && (c[g] = []), c[g].push(f)) - } - } - return c -}; -mxParallelEdgeLayout.prototype.getEdgeId = function(a) { - var b = this.graph.getView(), - c = b.getState(a), - d = null != c ? c.getVisibleTerminal(!0) : b.getVisibleTerminal(a, !0); - a = null != c ? c.getVisibleTerminal(!1) : b.getVisibleTerminal(a, !1); - return null != d && null != a ? (d = mxCellPath.create(d), a = mxCellPath.create(a), d > a ? a + "-" + d : d + "-" + a) : null -}; -mxParallelEdgeLayout.prototype.layout = function(a) { - var b = a[0], - c = this.graph.getModel(), - d = c.getGeometry(c.getTerminal(b, !0)), - e = c.getGeometry(c.getTerminal(b, !1)); - if (d == e) - for (var b = d.x + d.width + this.spacing, c = d.y + d.height / 2, f = 0; f < a.length; f++) this.route(a[f], b, c), b += this.spacing; - else if (null != d && null != e) - for (var b = d.x + d.width / 2, c = d.y + d.height / 2, f = e.x + e.width / 2 - b, g = e.y + e.height / 2 - c, e = Math.sqrt(f * f + g * g), d = g * this.spacing / e, e = f * this.spacing / e, - b = b + f / 2 + d * (a.length - 1) / 2, c = c + g / 2 - e * (a.length - 1) / 2, f = 0; f < a.length; f++) this.route(a[f], - b, c), b -= d, c += e -}; -mxParallelEdgeLayout.prototype.route = function(a, b, c) { - this.graph.isCellMovable(a) && this.setEdgePoints(a, [new mxPoint(b, c)]) -}; - -function mxCompositeLayout(a, b, c) { - mxGraphLayout.call(this, a); - this.layouts = b; - this.master = c -} -mxCompositeLayout.prototype = new mxGraphLayout; -mxCompositeLayout.prototype.constructor = mxCompositeLayout; -mxCompositeLayout.prototype.layouts = null; -mxCompositeLayout.prototype.master = null; -mxCompositeLayout.prototype.moveCell = function(a, b, c) { - null != this.master ? this.master.move.apply(this.master, arguments) : this.layouts[0].move.apply(this.layouts[0], arguments) -}; -mxCompositeLayout.prototype.execute = function(a) { - var b = this.graph.getModel(); - b.beginUpdate(); - try { - for (var c = 0; c < this.layouts.length; c++) this.layouts[c].execute.apply(this.layouts[c], arguments) - } finally { - b.endUpdate() - } -}; - -function mxEdgeLabelLayout(a, b) { - mxGraphLayout.call(this, a) -} -mxEdgeLabelLayout.prototype = new mxGraphLayout; -mxEdgeLabelLayout.prototype.constructor = mxEdgeLabelLayout; -mxEdgeLabelLayout.prototype.execute = function(a) { - for (var b = this.graph.view, c = this.graph.getModel(), d = [], e = [], f = c.getChildCount(a), g = 0; g < f; g++) { - var h = c.getChildAt(a, g), - k = b.getState(h); - null != k && (this.isVertexIgnored(h) ? this.isEdgeIgnored(h) || d.push(k) : e.push(k)) - } - this.placeLabels(e, d) -}; -mxEdgeLabelLayout.prototype.placeLabels = function(a, b) { - var c = this.graph.getModel(); - c.beginUpdate(); - try { - for (var d = 0; d < b.length; d++) { - var e = b[d]; - if (null != e && null != e.text && null != e.text.boundingBox) - for (var f = 0; f < a.length; f++) { - var g = a[f]; - null != g && this.avoid(e, g) - } - } - } finally { - c.endUpdate() - } -}; -mxEdgeLabelLayout.prototype.avoid = function(a, b) { - var c = this.graph.getModel(), - d = a.text.boundingBox; - if (mxUtils.intersects(d, b)) { - var e = -d.y - d.height + b.y, - f = -d.y + b.y + b.height, - e = Math.abs(e) < Math.abs(f) ? e : f, - f = -d.x - d.width + b.x, - d = -d.x + b.x + b.width, - d = Math.abs(f) < Math.abs(d) ? f : d; - Math.abs(d) < Math.abs(e) ? e = 0 : d = 0; - f = c.getGeometry(a.cell); - null != f && (f = f.clone(), null != f.offset ? (f.offset.x += d, f.offset.y += e) : f.offset = new mxPoint(d, e), c.setGeometry(a.cell, f)) - } -}; - -function mxGraphAbstractHierarchyCell() { - this.x = []; - this.y = []; - this.temp = [] -} -mxGraphAbstractHierarchyCell.prototype.maxRank = -1; -mxGraphAbstractHierarchyCell.prototype.minRank = -1; -mxGraphAbstractHierarchyCell.prototype.x = null; -mxGraphAbstractHierarchyCell.prototype.y = null; -mxGraphAbstractHierarchyCell.prototype.width = 0; -mxGraphAbstractHierarchyCell.prototype.height = 0; -mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells = null; -mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells = null; -mxGraphAbstractHierarchyCell.prototype.temp = null; -mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells = function(a) { - return null -}; -mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells = function(a) { - return null -}; -mxGraphAbstractHierarchyCell.prototype.isEdge = function() { - return !1 -}; -mxGraphAbstractHierarchyCell.prototype.isVertex = function() { - return !1 -}; -mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable = function(a) { - return null -}; -mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable = function(a, b) { - return null -}; -mxGraphAbstractHierarchyCell.prototype.setX = function(a, b) { - this.isVertex() ? this.x[0] = b : this.isEdge() && (this.x[a - this.minRank - 1] = b) -}; -mxGraphAbstractHierarchyCell.prototype.getX = function(a) { - return this.isVertex() ? this.x[0] : this.isEdge() ? this.x[a - this.minRank - 1] : 0 -}; -mxGraphAbstractHierarchyCell.prototype.setY = function(a, b) { - this.isVertex() ? this.y[0] = b : this.isEdge() && (this.y[a - this.minRank - 1] = b) -}; - -function mxGraphHierarchyNode(a) { - mxGraphAbstractHierarchyCell.apply(this, arguments); - this.cell = a -} -mxGraphHierarchyNode.prototype = new mxGraphAbstractHierarchyCell; -mxGraphHierarchyNode.prototype.constructor = mxGraphHierarchyNode; -mxGraphHierarchyNode.prototype.cell = null; -mxGraphHierarchyNode.prototype.connectsAsTarget = []; -mxGraphHierarchyNode.prototype.connectsAsSource = []; -mxGraphHierarchyNode.prototype.hashCode = !1; -mxGraphHierarchyNode.prototype.getRankValue = function(a) { - return this.maxRank -}; -mxGraphHierarchyNode.prototype.getNextLayerConnectedCells = function(a) { - if (null == this.nextLayerConnectedCells) { - this.nextLayerConnectedCells = []; - this.nextLayerConnectedCells[0] = []; - for (var b = 0; b < this.connectsAsTarget.length; b++) { - var c = this.connectsAsTarget[b]; - 1 == c.maxRank || c.maxRank == a + 1 ? this.nextLayerConnectedCells[0].push(c.source) : this.nextLayerConnectedCells[0].push(c) - } - } - return this.nextLayerConnectedCells[0] -}; -mxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells = function(a) { - if (null == this.previousLayerConnectedCells) { - this.previousLayerConnectedCells = []; - this.previousLayerConnectedCells[0] = []; - for (var b = 0; b < this.connectsAsSource.length; b++) { - var c = this.connectsAsSource[b]; - 1 == c.minRank || c.minRank == a - 1 ? this.previousLayerConnectedCells[0].push(c.target) : this.previousLayerConnectedCells[0].push(c) - } - } - return this.previousLayerConnectedCells[0] -}; -mxGraphHierarchyNode.prototype.isVertex = function() { - return !0 -}; -mxGraphHierarchyNode.prototype.getGeneralPurposeVariable = function(a) { - return this.temp[0] -}; -mxGraphHierarchyNode.prototype.setGeneralPurposeVariable = function(a, b) { - this.temp[0] = b -}; -mxGraphHierarchyNode.prototype.isAncestor = function(a) { - if (null != a && null != this.hashCode && null != a.hashCode && this.hashCode.length < a.hashCode.length) { - if (this.hashCode == a.hashCode) return !0; - if (null == this.hashCode || null == this.hashCode) return !1; - for (var b = 0; b < this.hashCode.length; b++) - if (this.hashCode[b] != a.hashCode[b]) return !1; - return !0 - } - return !1 -}; -mxGraphHierarchyNode.prototype.getCoreCell = function() { - return this.cell -}; - -function mxGraphHierarchyEdge(a) { - mxGraphAbstractHierarchyCell.apply(this, arguments); - this.edges = a -} -mxGraphHierarchyEdge.prototype = new mxGraphAbstractHierarchyCell; -mxGraphHierarchyEdge.prototype.constructor = mxGraphHierarchyEdge; -mxGraphHierarchyEdge.prototype.edges = null; -mxGraphHierarchyEdge.prototype.source = null; -mxGraphHierarchyEdge.prototype.target = null; -mxGraphHierarchyEdge.prototype.isReversed = !1; -mxGraphHierarchyEdge.prototype.invert = function(a) { - a = this.source; - this.source = this.target; - this.target = a; - this.isReversed = !this.isReversed -}; -mxGraphHierarchyEdge.prototype.getNextLayerConnectedCells = function(a) { - if (null == this.nextLayerConnectedCells) { - this.nextLayerConnectedCells = []; - for (var b = 0; b < this.temp.length; b++) this.nextLayerConnectedCells[b] = [], b == this.temp.length - 1 ? this.nextLayerConnectedCells[b].push(this.source) : this.nextLayerConnectedCells[b].push( - this) - } - return this.nextLayerConnectedCells[a - this.minRank - 1] -}; -mxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells = function(a) { - if (null == this.previousLayerConnectedCells) { - this.previousLayerConnectedCells = []; - for (var b = 0; b < this.temp.length; b++) this.previousLayerConnectedCells[b] = [], 0 == b ? this.previousLayerConnectedCells[b].push(this.target) : this.previousLayerConnectedCells[b].push( - this) - } - return this.previousLayerConnectedCells[a - this.minRank - 1] -}; -mxGraphHierarchyEdge.prototype.isEdge = function() { - return !0 -}; -mxGraphHierarchyEdge.prototype.getGeneralPurposeVariable = function(a) { - return this.temp[a - this.minRank - 1] -}; -mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable = function(a, b) { - this.temp[a - this.minRank - 1] = b -}; -mxGraphHierarchyEdge.prototype.getCoreCell = function() { - return null != this.edges && 0 < this.edges.length ? this.edges[0] : null -}; - -function mxGraphHierarchyModel(a, b, c, d, e) { - a.getGraph(); - this.tightenToSource = e; - this.roots = c; - this.parent = d; - this.vertexMapper = {}; - this.edgeMapper = {}; - this.maxRank = 0; - c = []; - null == b && (b = this.graph.getChildVertices(d)); - this.maxRank = this.SOURCESCANSTARTRANK; - this.createInternalCells(a, b, c); - for (d = 0; d < b.length; d++) { - e = c[d].connectsAsSource; - for (var f = 0; f < e.length; f++) { - var g = e[f], - h = g.edges; - if (null != h && 0 < h.length) { - var h = h[0], - k = a.getVisibleTerminal(h, !1), - k = mxCellPath.create(k), - k = this.vertexMapper[k]; - c[d] == k && (k = a.getVisibleTerminal(h, !0), k = mxCellPath.create(k), k = this.vertexMapper[k]); - null != k && c[d] != k && (g.target = k, 0 == k.connectsAsTarget.length && (k.connectsAsTarget = []), 0 > mxUtils.indexOf(k.connectsAsTarget, g) && k.connectsAsTarget.push(g)) - } - } - c[d].temp[0] = 1 - } -} -mxGraphHierarchyModel.prototype.maxRank = null; -mxGraphHierarchyModel.prototype.vertexMapper = null; -mxGraphHierarchyModel.prototype.edgeMapper = null; -mxGraphHierarchyModel.prototype.ranks = null; -mxGraphHierarchyModel.prototype.roots = null; -mxGraphHierarchyModel.prototype.parent = null; -mxGraphHierarchyModel.prototype.dfsCount = 0; -mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK = 1E8; -mxGraphHierarchyModel.prototype.tightenToSource = !1; -mxGraphHierarchyModel.prototype.createInternalCells = function(a, b, c) { - for (var d = a.getGraph(), e = 0; e < b.length; e++) { - c[e] = new mxGraphHierarchyNode(b[e]); - var f = mxCellPath.create(b[e]); - this.vertexMapper[f] = c[e]; - f = a.getEdges(b[e]); - c[e].connectsAsSource = []; - for (var g = 0; g < f.length; g++) { - var h = a.getVisibleTerminal(f[g], !1); - if (h != b[e] && h != b[e] && a.graph.model.isVertex(h) && !a.isVertexIgnored(h)) { - var k = a.getEdgesBetween(b[e], h, !1), - l = a.getEdgesBetween(b[e], h, !0), - h = mxCellPath.create(k[0]); - if (null != k && 0 < k.length && null == - this.edgeMapper[h] && 2 * l.length >= k.length) { - for (var l = new mxGraphHierarchyEdge(k), m = 0; m < k.length; m++) { - var n = k[m], - h = mxCellPath.create(n); - this.edgeMapper[h] = l; - d.resetEdge(n); - a.disableEdgeStyle && (a.setEdgeStyleEnabled(n, !1), a.setOrthogonalEdge(n, !0)) - } - l.source = c[e]; - 0 > mxUtils.indexOf(c[e].connectsAsSource, l) && c[e].connectsAsSource.push(l) - } - } - } - c[e].temp[0] = 0 - } -}; -mxGraphHierarchyModel.prototype.initialRank = function() { - var a = []; - if (null != this.roots) - for (var b = 0; b < this.roots.length; b++) { - var c = mxCellPath.create(this.roots[b]), - c = this.vertexMapper[c]; - null != c && a.push(c) - } - for (var d in this.vertexMapper) c = this.vertexMapper[d], c.temp[0] = -1; - for (var e = a.slice(); 0 < a.length;) { - var c = a[0], - f, g; - f = c.connectsAsTarget; - g = c.connectsAsSource; - for (var h = !0, k = this.SOURCESCANSTARTRANK, b = 0; b < f.length; b++) { - var l = f[b]; - if (5270620 == l.temp[0]) l = l.source, k = Math.min(k, l.temp[0] - 1); - else { - h = !1; - break - } - } - if (h) { - c.temp[0] = - k; - this.maxRank = Math.min(this.maxRank, k); - if (null != g) - for (b = 0; b < g.length; b++) l = g[b], l.temp[0] = 5270620, l = l.target, -1 == l.temp[0] && (a.push(l), l.temp[0] = -2); - a.shift() - } else if (b = a.shift(), a.push(c), b == c && 1 == a.length) break - } - for (d in this.vertexMapper) c = this.vertexMapper[d], c.temp[0] -= this.maxRank; - for (b = 0; b < e.length; b++) { - c = e[b]; - a = 0; - f = c.connectsAsSource; - for (d = 0; d < f.length; d++) l = f[d], l = l.target, c.temp[0] = Math.max(a, l.temp[0] + 1), a = c.temp[0] - } - this.maxRank = this.SOURCESCANSTARTRANK - this.maxRank -}; -mxGraphHierarchyModel.prototype.fixRanks = function() { - var a = []; - this.ranks = []; - for (var b = 0; b < this.maxRank + 1; b++) a[b] = [], this.ranks[b] = a[b]; - var c = null; - if (null != this.roots) - for (var d = this.roots, c = [], b = 0; b < d.length; b++) { - var e = mxCellPath.create(d[b]); - c[b] = this.vertexMapper[e] - } - this.visit(function(b, c, d, e, l) { - 0 == l && (0 > c.maxRank && 0 > c.minRank) && (a[c.temp[0]].push(c), c.maxRank = c.temp[0], c.minRank = c.temp[0], c.temp[0] = a[c.maxRank].length - 1); - if (null != b && null != d && 1 < b.maxRank - c.maxRank) { - d.maxRank = b.maxRank; - d.minRank = - c.maxRank; - d.temp = []; - d.x = []; - d.y = []; - for (b = d.minRank + 1; b < d.maxRank; b++) a[b].push(d), d.setGeneralPurposeVariable(b, a[b].length - 1) - } - }, c, !1, null) -}; -mxGraphHierarchyModel.prototype.visit = function(a, b, c, d) { - if (null != b) { - for (var e = 0; e < b.length; e++) { - var f = b[e]; - null != f && (null == d && (d = {}), c ? (f.hashCode = [], f.hashCode[0] = this.dfsCount, f.hashCode[1] = e, this.extendedDfs(null, f, null, a, d, f.hashCode, e, 0)) : this.dfs(null, f, null, - a, d, 0)) - } - this.dfsCount++ - } -}; -mxGraphHierarchyModel.prototype.dfs = function(a, b, c, d, e, f) { - if (null != b) { - var g = mxCellPath.create(b.cell); - if (null == e[g]) { - e[g] = b; - d(a, b, c, f, 0); - a = b.connectsAsSource.slice(); - for (c = 0; c < a.length; c++) g = a[c], this.dfs(b, g.target, g, d, e, f + 1) - } else d(a, b, c, f, 1) - } -}; -mxGraphHierarchyModel.prototype.extendedDfs = function(a, b, c, d, e, f, g, h) { - if (null != b) { - if (null != a && (null == b.hashCode || b.hashCode[0] != a.hashCode[0])) f = a.hashCode.length + 1, b.hashCode = a.hashCode.slice(), b.hashCode[f - 1] = g; - g = mxCellPath.create(b.cell); - if (null == e[g]) { - e[g] = b; - d(a, b, c, h, 0); - a = b.connectsAsSource.slice(); - for (c = 0; c < a.length; c++) g = a[c], this.extendedDfs(b, g.target, g, d, e, b.hashCode, c, h + 1) - } else d(a, b, c, h, 1) - } -}; - -function mxHierarchicalLayoutStage() {} -mxHierarchicalLayoutStage.prototype.execute = function(a) {}; - -function mxMedianHybridCrossingReduction(a) { - this.layout = a -} -mxMedianHybridCrossingReduction.prototype = new mxHierarchicalLayoutStage; -mxMedianHybridCrossingReduction.prototype.constructor = mxMedianHybridCrossingReduction; -mxMedianHybridCrossingReduction.prototype.layout = null; -mxMedianHybridCrossingReduction.prototype.maxIterations = 24; -mxMedianHybridCrossingReduction.prototype.nestedBestRanks = null; -mxMedianHybridCrossingReduction.prototype.currentBestCrossings = 0; -mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement = 0; -mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations = 2; -mxMedianHybridCrossingReduction.prototype.execute = function(a) { - a = this.layout.getModel(); - this.nestedBestRanks = []; - for (var b = 0; b < a.ranks.length; b++) this.nestedBestRanks[b] = a.ranks[b].slice(); - for (var c = 0, d = this.calculateCrossings(a), b = 0; b < this.maxIterations && c < this.maxNoImprovementIterations; b++) { - this.weightedMedian(b, a); - this.transpose(b, a); - var e = this.calculateCrossings(a); - if (e < d) { - d = e; - for (e = c = 0; e < this.nestedBestRanks.length; e++) - for (var f = a.ranks[e], g = 0; g < f.length; g++) { - var h = f[g]; - this.nestedBestRanks[e][h.getGeneralPurposeVariable(e)] = - h - } - } else { - c++; - for (e = 0; e < this.nestedBestRanks.length; e++) { - f = a.ranks[e]; - for (g = 0; g < f.length; g++) h = f[g], h.setGeneralPurposeVariable(e, g) - } - } - if (0 == d) break - } - c = []; - d = []; - for (b = 0; b < a.maxRank + 1; b++) d[b] = [], c[b] = d[b]; - for (b = 0; b < this.nestedBestRanks.length; b++) - for (e = 0; e < this.nestedBestRanks[b].length; e++) d[b].push(this.nestedBestRanks[b][e]); - a.ranks = c -}; -mxMedianHybridCrossingReduction.prototype.calculateCrossings = function(a) { - for (var b = a.ranks.length, c = 0, d = 1; d < b; d++) c += this.calculateRankCrossing(d, a); - return c -}; -mxMedianHybridCrossingReduction.prototype.calculateRankCrossing = function(a, b) { - for (var c = 0, d = b.ranks[a], e = d.length, f = b.ranks[a - 1].length, g = [], h = 0; h < e; h++) g[h] = []; - for (h = 0; h < d.length; h++) - for (var k = d[h], l = k.getGeneralPurposeVariable(a), m = k.getPreviousLayerConnectedCells(a), k = 0; k < m.length; k++) { - var n = m[k].getGeneralPurposeVariable(a - 1); - g[l][n] = 201207 - } - for (h = 0; h < e; h++) - for (k = 0; k < f; k++) - if (201207 == g[h][k]) { - for (d = h + 1; d < e; d++) - for (l = 0; l < k; l++) 201207 == g[d][l] && c++; - for (d = 0; d < h; d++) - for (l = k + 1; l < f; l++) 201207 == g[d][l] && - c++ - } - return c / 2 -}; -mxMedianHybridCrossingReduction.prototype.transpose = function(a, b) { - for (var c = !0, d = 0; c && 10 > d++;) - for (var e = 1 == a % 2 && 1 == d % 2, c = !1, f = 0; f < b.ranks.length; f++) { - for (var g = b.ranks[f], h = [], k = 0; k < g.length; k++) { - var l = g[k], - m = l.getGeneralPurposeVariable(f); - 0 > m && (m = k); - h[m] = l - } - for (var n = m = l = null, p = null, q = null, s = null, r = null, t = null, v = null, w = null, k = 0; k < g.length - 1; k++) { - if (0 == k) { - for (var v = h[k], l = v.getNextLayerConnectedCells(f), m = v.getPreviousLayerConnectedCells(f), q = [], s = [], u = 0; u < l.length; u++) q[u] = l[u].getGeneralPurposeVariable(f + 1); - for (u = 0; u < m.length; u++) s[u] = m[u].getGeneralPurposeVariable(f - 1) - } else l = n, m = p, q = r, s = t, v = w; - w = h[k + 1]; - n = w.getNextLayerConnectedCells(f); - p = w.getPreviousLayerConnectedCells(f); - r = []; - t = []; - for (u = 0; u < n.length; u++) r[u] = n[u].getGeneralPurposeVariable(f + 1); - for (u = 0; u < p.length; u++) t[u] = p[u].getGeneralPurposeVariable(f - 1); - for (var y = 0, z = 0, u = 0; u < q.length; u++) - for (var x = 0; x < r.length; x++) q[u] > r[x] && y++, q[u] < r[x] && z++; - for (u = 0; u < s.length; u++) - for (x = 0; x < t.length; x++) s[u] > t[x] && y++, s[u] < t[x] && z++; - if (z < y || z == y && e) n = v.getGeneralPurposeVariable(f), - v.setGeneralPurposeVariable(f, w.getGeneralPurposeVariable(f)), w.setGeneralPurposeVariable(f, n), n = l, p = m, r = q, t = s, w = v, e || (c = !0) - } - } -}; -mxMedianHybridCrossingReduction.prototype.weightedMedian = function(a, b) { - var c = 0 == a % 2; - if (c) - for (var d = b.maxRank - 1; 0 <= d; d--) this.medianRank(d, c); - else - for (d = 1; d < b.maxRank; d++) this.medianRank(d, c) -}; -mxMedianHybridCrossingReduction.prototype.medianRank = function(a, b) { - for (var c = this.nestedBestRanks[a].length, d = [], e = [], f = 0; f < c; f++) { - var g = this.nestedBestRanks[a][f], - h = new MedianCellSorter; - h.cell = g; - var k; - k = b ? g.getNextLayerConnectedCells(a) : g.getPreviousLayerConnectedCells(a); - var l; - l = b ? a + 1 : a - 1; - null != k && 0 != k.length ? (h.medianValue = this.medianValue(k, l), d.push(h)) : e[g.getGeneralPurposeVariable(a)] = !0 - } - d.sort(MedianCellSorter.prototype.compare); - for (f = 0; f < c; f++) null == e[f] && (g = d.shift().cell, g.setGeneralPurposeVariable(a, - f)) -}; -mxMedianHybridCrossingReduction.prototype.medianValue = function(a, b) { - for (var c = [], d = 0, e = 0; e < a.length; e++) { - var f = a[e]; - c[d++] = f.getGeneralPurposeVariable(b) - } - c.sort(function(a, b) { - return a - b - }); - if (1 == d % 2) return c[Math.floor(d / 2)]; - if (2 == d) return (c[0] + c[1]) / 2; - e = d / 2; - f = c[e - 1] - c[0]; - d = c[d - 1] - c[e]; - return (c[e - 1] * d + c[e] * f) / (f + d) -}; - -function MedianCellSorter() {} -MedianCellSorter.prototype.medianValue = 0; -MedianCellSorter.prototype.cell = !1; -MedianCellSorter.prototype.compare = function(a, b) { - return null != a && null != b ? b.medianValue > a.medianValue ? -1 : b.medianValue < a.medianValue ? 1 : 0 : 0 -}; - -function mxMinimumCycleRemover(a) { - this.layout = a -} -mxMinimumCycleRemover.prototype = new mxHierarchicalLayoutStage; -mxMinimumCycleRemover.prototype.constructor = mxMinimumCycleRemover; -mxMinimumCycleRemover.prototype.layout = null; -mxMinimumCycleRemover.prototype.execute = function(a) { - var b = this.layout.getModel(), - c = {}, - d = mxUtils.clone(b.vertexMapper, null, !0), - e = null; - if (null != b.roots) { - var f = b.roots, - e = []; - for (a = 0; a < f.length; a++) { - var g = mxCellPath.create(f[a]); - e[a] = b.vertexMapper[g] - } - } - b.visit(function(a, b, e, f, g) { - b.isAncestor(a) && (e.invert(), mxUtils.remove(e, a.connectsAsSource), a.connectsAsTarget.push(e), mxUtils.remove(e, b.connectsAsTarget), b.connectsAsSource.push(e)); - a = mxCellPath.create(b.cell); - c[a] = b; - delete d[a] - }, e, !0, null); - e = null; - 0 < - d.lenth && (e = mxUtils.clone(d, null, !0)); - a = mxUtils.clone(c, null, !0); - b.visit(function(a, b, e, f, g) { - b.isAncestor(a) && (e.invert(), mxUtils.remove(e, a.connectsAsSource), b.connectsAsSource.push(e), a.connectsAsTarget.push(e), mxUtils.remove(e, b.connectsAsTarget)); - a = mxCellPath.create(b.cell); - c[a] = b; - delete d[a] - }, d, !0, a); - f = this.layout.getGraph(); - if (null != e && 0 < e.length) { - b = b.roots; - for (a = 0; a < e.length; a++) g = e[a].cell, 0 == f.getIncomingEdges(g).length && b.push(g) - } -}; - -function mxCoordinateAssignment(a, b, c, d, e, f) { - this.layout = a; - this.intraCellSpacing = b; - this.interRankCellSpacing = c; - this.orientation = d; - this.initialX = e; - this.parallelEdgeSpacing = f -} -var mxHierarchicalEdgeStyle = { - ORTHOGONAL: 1, - POLYLINE: 2, - STRAIGHT: 3, - CURVE: 4 -}; -mxCoordinateAssignment.prototype = new mxHierarchicalLayoutStage; -mxCoordinateAssignment.prototype.constructor = mxCoordinateAssignment; -mxCoordinateAssignment.prototype.layout = null; -mxCoordinateAssignment.prototype.intraCellSpacing = 30; -mxCoordinateAssignment.prototype.interRankCellSpacing = 100; -mxCoordinateAssignment.prototype.parallelEdgeSpacing = 10; -mxCoordinateAssignment.prototype.maxIterations = 8; -mxCoordinateAssignment.prototype.prefHozEdgeSep = 5; -mxCoordinateAssignment.prototype.prefVertEdgeOff = 2; -mxCoordinateAssignment.prototype.minEdgeJetty = 12; -mxCoordinateAssignment.prototype.channelBuffer = 4; -mxCoordinateAssignment.prototype.jettyPositions = null; -mxCoordinateAssignment.prototype.orientation = mxConstants.DIRECTION_NORTH; -mxCoordinateAssignment.prototype.initialX = null; -mxCoordinateAssignment.prototype.limitX = null; -mxCoordinateAssignment.prototype.currentXDelta = null; -mxCoordinateAssignment.prototype.widestRank = null; -mxCoordinateAssignment.prototype.rankTopY = null; -mxCoordinateAssignment.prototype.rankBottomY = null; -mxCoordinateAssignment.prototype.widestRankValue = null; -mxCoordinateAssignment.prototype.rankWidths = null; -mxCoordinateAssignment.prototype.rankY = null; -mxCoordinateAssignment.prototype.fineTuning = !0; -mxCoordinateAssignment.prototype.edgeStyle = mxHierarchicalEdgeStyle.POLYLINE; -mxCoordinateAssignment.prototype.nextLayerConnectedCache = null; -mxCoordinateAssignment.prototype.previousLayerConnectedCache = null; -mxCoordinateAssignment.prototype.groupPadding = 10; -mxCoordinateAssignment.prototype.printStatus = function() { - var a = this.layout.getModel(); - mxLog.show(); - mxLog.writeln("\x3d\x3d\x3d\x3d\x3d\x3dCoord assignment debug\x3d\x3d\x3d\x3d\x3d\x3d\x3d"); - for (var b = 0; b < a.ranks.length; b++) { - mxLog.write("Rank ", b, " : "); - for (var c = a.ranks[b], d = 0; d < c.length; d++) mxLog.write(c[d].getGeneralPurposeVariable(b), " "); - mxLog.writeln() - } - mxLog.writeln("\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d\x3d") -}; -mxCoordinateAssignment.prototype.execute = function(a) { - this.jettyPositions = []; - a = this.layout.getModel(); - this.currentXDelta = 0; - this.initialCoords(this.layout.getGraph(), a); - this.fineTuning && this.minNode(a); - var b = 1E8; - if (this.fineTuning) - for (var c = 0; c < this.maxIterations; c++) { - 0 != c && (this.medianPos(c, a), this.minNode(a)); - if (this.currentXDelta < b) { - for (var d = 0; d < a.ranks.length; d++) - for (var e = a.ranks[d], f = 0; f < e.length; f++) { - var g = e[f]; - g.setX(d, g.getGeneralPurposeVariable(d)) - } - b = this.currentXDelta - } else - for (d = 0; d < a.ranks.length; d++) { - e = - a.ranks[d]; - for (f = 0; f < e.length; f++) g = e[f], g.setGeneralPurposeVariable(d, g.getX(d)) - } - this.minPath(this.layout.getGraph(), a); - this.currentXDelta = 0 - } - this.setCellLocations(this.layout.getGraph(), a) -}; -mxCoordinateAssignment.prototype.minNode = function(a) { - for (var b = [], c = [], d = [], e = 0; e <= a.maxRank; e++) { - d[e] = a.ranks[e]; - for (var f = 0; f < d[e].length; f++) { - var g = d[e][f], - h = new WeightedCellSorter(g, e); - h.rankIndex = f; - h.visited = !0; - b.push(h); - g = mxCellPath.create(g.getCoreCell()); - c[g] = h - } - } - a = 10 * b.length; - for (f = 0; 0 < b.length && f <= a;) { - var h = b.shift(), - e = h.cell, - k = h.weightedValue, - l = parseInt(h.rankIndex), - g = e.getNextLayerConnectedCells(k), - m = e.getPreviousLayerConnectedCells(k), - n = g.length, - p = m.length, - q = this.medianXValue(g, k + 1), - s = - this.medianXValue(m, k - 1), - r = n + p, - t = e.getGeneralPurposeVariable(k), - v = t; - 0 < r && (v = (q * n + s * p) / r); - n = !1; - v < t - 1 ? 0 == l ? (e.setGeneralPurposeVariable(k, v), n = !0) : (l = d[k][l - 1], t = l.getGeneralPurposeVariable(k), t = t + l.width / 2 + this.intraCellSpacing + e.width / 2, t < v ? (e.setGeneralPurposeVariable( - k, v), n = !0) : t < e.getGeneralPurposeVariable(k) - 1 && (e.setGeneralPurposeVariable(k, t), n = !0)) : v > t + 1 && (l == d[k].length - 1 ? (e.setGeneralPurposeVariable(k, v), n = !0) : - (l = d[k][l + 1], t = l.getGeneralPurposeVariable(k), t = t - l.width / 2 - this.intraCellSpacing - - e.width / 2, t > v ? (e.setGeneralPurposeVariable(k, v), n = !0) : t > e.getGeneralPurposeVariable(k) + 1 && (e.setGeneralPurposeVariable(k, t), n = !0))); - if (n) { - for (e = 0; e < g.length; e++) k = g[e], k = mxCellPath.create(k.getCoreCell()), k = c[k], null != k && !1 == k.visited && (k.visited = !0, b.push(k)); - for (e = 0; e < m.length; e++) k = m[e], k = mxCellPath.create(k.getCoreCell()), k = c[k], null != k && !1 == k.visited && (k.visited = !0, b.push(k)) - } - h.visited = !1; - f++ - } -}; -mxCoordinateAssignment.prototype.medianPos = function(a, b) { - if (0 == a % 2) - for (var c = b.maxRank; 0 < c; c--) this.rankMedianPosition(c - 1, b, c); - else - for (c = 0; c < b.maxRank - 1; c++) this.rankMedianPosition(c + 1, b, c) -}; -mxCoordinateAssignment.prototype.rankMedianPosition = function(a, b, c) { - b = b.ranks[a]; - for (var d = [], e = [], f = 0; f < b.length; f++) { - var g = b[f]; - d[f] = new WeightedCellSorter; - d[f].cell = g; - d[f].rankIndex = f; - var h = mxCellPath.create(g.getCoreCell()); - e[h] = d[f]; - var k = null, - k = c < a ? g.getPreviousLayerConnectedCells(a) : g.getNextLayerConnectedCells(a); - d[f].weightedValue = this.calculatedWeightedValue(g, k) - } - d.sort(WeightedCellSorter.prototype.compare); - for (f = 0; f < d.length; f++) { - h = 0; - g = d[f].cell; - h = 0; - k = c < a ? g.getPreviousLayerConnectedCells(a).slice() : - g.getNextLayerConnectedCells(a).slice(); - null != k && (h = k.length, h = 0 < h ? this.medianXValue(k, c) : g.getGeneralPurposeVariable(a)); - for (var l = 0, k = -1E8, m = d[f].rankIndex - 1; 0 <= m;) { - var n = mxCellPath.create(b[m].getCoreCell()), - n = e[n]; - if (null != n) { - var p = n.cell; - n.visited ? (k = p.getGeneralPurposeVariable(a) + p.width / 2 + this.intraCellSpacing + l + g.width / 2, m = -1) : (l += p.width + this.intraCellSpacing, m--) - } - } - l = 0; - p = 1E8; - for (m = d[f].rankIndex + 1; m < d.length;) - if (n = mxCellPath.create(b[m].getCoreCell()), n = e[n], null != n) { - var q = n.cell; - n.visited ? - (p = q.getGeneralPurposeVariable(a) - q.width / 2 - this.intraCellSpacing - l - g.width / 2, m = d.length) : (l += q.width + this.intraCellSpacing, m++) - } - h >= k && h <= p ? g.setGeneralPurposeVariable(a, h) : h < k ? (g.setGeneralPurposeVariable(a, k), this.currentXDelta += k - h) : h > p && (g.setGeneralPurposeVariable(a, p), this.currentXDelta += - h - p); - d[f].visited = !0 - } -}; -mxCoordinateAssignment.prototype.calculatedWeightedValue = function(a, b) { - for (var c = 0, d = 0; d < b.length; d++) { - var e = b[d]; - a.isVertex() && e.isVertex() ? c++ : c = a.isEdge() && e.isEdge() ? c + 8 : c + 2 - } - return c -}; -mxCoordinateAssignment.prototype.medianXValue = function(a, b) { - if (0 == a.length) return 0; - for (var c = [], d = 0; d < a.length; d++) c[d] = a[d].getGeneralPurposeVariable(b); - c.sort(function(a, b) { - return a - b - }); - if (1 == a.length % 2) return c[Math.floor(a.length / 2)]; - d = a.length / 2; - return (c[d - 1] + c[d]) / 2 -}; -mxCoordinateAssignment.prototype.initialCoords = function(a, b) { - this.calculateWidestRank(a, b); - for (var c = this.widestRank; 0 <= c; c--) c < b.maxRank && this.rankCoordinates(c, a, b); - for (c = this.widestRank + 1; c <= b.maxRank; c++) 0 < c && this.rankCoordinates(c, a, b) -}; -mxCoordinateAssignment.prototype.rankCoordinates = function(a, b, c) { - b = c.ranks[a]; - c = 0; - for (var d = this.initialX + (this.widestRankValue - this.rankWidths[a]) / 2, e = !1, f = 0; f < b.length; f++) { - var g = b[f]; - if (g.isVertex()) { - var h = this.layout.getVertexBounds(g.cell); - null != h ? this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (g.width = h.width, g.height = h.height) : (g.width = h.height, g.height = h.width) : - e = !0; - c = Math.max(c, g.height) - } else g.isEdge() && (h = 1, null != g.edges ? h = g.edges.length : mxLog.warn("edge.edges is null"), - g.width = (h - 1) * this.parallelEdgeSpacing); - d += g.width / 2; - g.setX(a, d); - g.setGeneralPurposeVariable(a, d); - d += g.width / 2; - d += this.intraCellSpacing - }!0 == e && mxLog.warn("At least one cell has no bounds") -}; -mxCoordinateAssignment.prototype.calculateWidestRank = function(a, b) { - var c = -this.interRankCellSpacing, - d = 0; - this.rankWidths = []; - this.rankY = []; - for (var e = b.maxRank; 0 <= e; e--) { - for (var f = 0, g = b.ranks[e], h = this.initialX, k = !1, l = 0; l < g.length; l++) { - var m = g[l]; - if (m.isVertex()) { - var n = this.layout.getVertexBounds(m.cell); - null != n ? this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (m.width = n.width, m.height = n.height) : (m.width = n.height, m.height = n - .width) : k = !0; - f = Math.max(f, m.height) - } else m.isEdge() && - (n = 1, null != m.edges ? n = m.edges.length : mxLog.warn("edge.edges is null"), m.width = (n - 1) * this.parallelEdgeSpacing); - h += m.width / 2; - m.setX(e, h); - m.setGeneralPurposeVariable(e, h); - h += m.width / 2; - h += this.intraCellSpacing; - h > this.widestRankValue && (this.widestRankValue = h, this.widestRank = e); - this.rankWidths[e] = h - }!0 == k && mxLog.warn("At least one cell has no bounds"); - this.rankY[e] = c; - h = f / 2 + d / 2 + this.interRankCellSpacing; - d = f; - c = this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_WEST ? c + h : c - - h; - for (l = 0; l < g.length; l++) g[l].setY(e, c) - } -}; -mxCoordinateAssignment.prototype.minPath = function(a, b) { - var c = b.edgeMapper, - d; - for (d in c) { - var e = c[d]; - if (!(1 > e.maxRank - e.minRank - 1)) { - for (var f = e.getGeneralPurposeVariable(e.minRank + 1), g = !0, h = 0, k = e.minRank + 2; k < e.maxRank; k++) { - var l = e.getGeneralPurposeVariable(k); - f != l ? (g = !1, f = l) : h++ - } - if (!g) { - for (var g = f = 0, l = [], m = [], n = e.getGeneralPurposeVariable(e.minRank + 1), k = e.minRank + 1; k < e.maxRank - 1; k++) { - var p = e.getX(k + 1); - n == p ? (l[k - e.minRank - 1] = n, f++) : this.repositionValid(b, e, k + 1, n) ? (l[k - e.minRank - 1] = n, f++) : n = l[k - e.minRank - - 1] = p - } - n = e.getX(k); - for (k = e.maxRank - 1; k > e.minRank + 1; k--) p = e.getX(k - 1), n == p ? (m[k - e.minRank - 2] = n, g++) : this.repositionValid(b, e, k - 1, n) ? (m[k - e.minRank - 2] = n, g++) : (m[k - - e.minRank - 2] = e.getX(k - 1), n = p); - if (g > h || f > h) - if (g >= f) - for (k = e.maxRank - 2; k > e.minRank; k--) e.setX(k, m[k - e.minRank - 1]); - else if (f > g) - for (k = e.minRank + 2; k < e.maxRank; k++) e.setX(k, l[k - e.minRank - 2]) - } - } - } -}; -mxCoordinateAssignment.prototype.repositionValid = function(a, b, c, d) { - a = a.ranks[c]; - for (var e = -1, f = 0; f < a.length; f++) - if (b == a[f]) { - e = f; - break - } - if (0 > e) return !1; - f = b.getGeneralPurposeVariable(c); - if (d < f) { - if (0 == e) return !0; - a = a[e - 1]; - c = a.getGeneralPurposeVariable(c); - c = c + a.width / 2 + this.intraCellSpacing + b.width / 2; - if (!(c <= d)) return !1 - } else if (d > f) { - if (e == a.length - 1) return !0; - a = a[e + 1]; - c = a.getGeneralPurposeVariable(c); - c = c - a.width / 2 - this.intraCellSpacing - b.width / 2; - if (!(c >= d)) return !1 - } - return !0 -}; -mxCoordinateAssignment.prototype.setCellLocations = function(a, b) { - this.rankTopY = []; - this.rankBottomY = []; - for (var c = 0; c < b.ranks.length; c++) this.rankTopY[c] = Number.MAX_VALUE, this.rankBottomY[c] = 0; - c = null; - this.layout.resizeParent && (c = {}); - var d = b.edgeMapper, - e = b.vertexMapper, - f; - for (f in e) { - var g = e[f]; - this.setVertexLocation(g); - if (this.layout.resizeParent) { - var g = a.model.getParent(g.cell), - h = mxCellPath.create(g); - null == c[h] && (c[h] = g) - } - } - this.layout.resizeParent && null != c && this.adjustParents(c); - (this.edgeStyle == mxHierarchicalEdgeStyle.ORTHOGONAL || - this.edgeStyle == mxHierarchicalEdgeStyle.POLYLINE || this.edgeStyle == mxHierarchicalEdgeStyle.CURVE) && this.localEdgeProcessing(b); - for (f in d) this.setEdgePosition(d[f]) -}; -mxCoordinateAssignment.prototype.adjustParents = function(a) { - var b = [], - c; - for (c in a) b.push(a[c]); - this.layout.arrangeGroups(mxUtils.sortCells(b, !0), this.groupPadding) -}; -mxCoordinateAssignment.prototype.localEdgeProcessing = function(a) { - for (var b = 0; b < a.ranks.length; b++) - for (var c = a.ranks[b], d = 0; d < c.length; d++) { - var e = c[d]; - if (e.isVertex()) - for (var f = e.getPreviousLayerConnectedCells(b), g = b - 1, h = 0; 2 > h; h++) { - if (-1 < g && g < a.ranks.length && null != f && 0 < f.length) { - for (var k = [], l = 0; l < f.length; l++) { - var m = new WeightedCellSorter(f[l], f[l].getX(g)); - k.push(m) - } - k.sort(WeightedCellSorter.prototype.compare); - for (var m = e.x[0] - e.width / 2, n = m + e.width, p = f = 0, g = [], l = 0; l < k.length; l++) { - var q = k[l].cell, - s; - if (q.isVertex()) { - s = 0 == h ? e.connectsAsSource : e.connectsAsTarget; - for (var r = 0; r < s.length; r++) - if (s[r].source == q || s[r].target == q) f += s[r].edges.length, p++, g.push(s[r]) - } else f += q.edges.length, p++, g.push(q) - } - e.width > (f + 1) * this.prefHozEdgeSep + 2 * this.prefHozEdgeSep && (m += this.prefHozEdgeSep, n -= this.prefHozEdgeSep); - k = (n - m) / f; - m += k / 2; - n = this.minEdgeJetty - this.prefVertEdgeOff; - for (l = p = 0; l < g.length; l++) { - q = g[l].edges.length; - r = mxCellPath.create(g[l].edges[0]); - s = this.jettyPositions[r]; - null == s && (s = [], this.jettyPositions[r] = - s); - l < f / 2 ? n += this.prefVertEdgeOff : l > f / 2 && (n -= this.prefVertEdgeOff); - for (r = 0; r < q; r++) s[4 * r + 2 * h] = m, m += k, s[4 * r + 2 * h + 1] = n; - p = Math.max(p, n) - } - } - f = e.getNextLayerConnectedCells(b); - g = b + 1 - } - } -}; -mxCoordinateAssignment.prototype.setEdgePosition = function(a) { - var b = 0; - if (101207 != a.temp[0]) { - var c = a.maxRank, - d = a.minRank; - c == d && (c = a.source.maxRank, d = a.target.minRank); - for (var e = 0, f = mxCellPath.create(a.edges[0]), f = this.jettyPositions[f], g = a.isReversed ? a.target.cell : a.source.cell, h = this.layout.graph, k = 0; k < a.edges.length; k++) { - var l = a.edges[k], - m = this.layout.getVisibleTerminal(l, !0), - n = h.model.getTerminal(l, !0), - p = [], - q = a.isReversed; - m != g && (q = !q); - if (null != f) { - var s = q ? 2 : 0, - r = q ? this.rankTopY[d] : this.rankBottomY[c], - t = f[4 * e + 1 + s]; - q && (t = -t); - r += t; - s = f[4 * e + s]; - n = h.model.getTerminal(l, !0); - this.layout.isPort(n) && h.model.getParent(n) == m && (s = h.view.getState(n), s = null != s ? s.x : m.geometry.x + a.source.width * n.geometry.x); - this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (p.push(new mxPoint(s, r)), this.edgeStyle == mxHierarchicalEdgeStyle.CURVE && p.push( - new mxPoint(s, r + t))) : (p.push(new mxPoint(r, s)), this.edgeStyle == mxHierarchicalEdgeStyle.CURVE && p.push(new mxPoint(r + t, s))) - } - s = a.x.length - - 1; - r = t = -1; - m = a.maxRank - 1; - q && (s = 0, t = a.x.length, r = 1, m = a.minRank + 1); - for (; a.maxRank != a.minRank && s != t; s += r) { - var n = a.x[s] + b, - v = (this.rankTopY[m] + this.rankBottomY[m + 1]) / 2, - w = (this.rankTopY[m - 1] + this.rankBottomY[m]) / 2; - if (q) var u = v, - v = w, - w = u; - this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? (p.push(new mxPoint(n, v)), p.push(new mxPoint(n, w))) : (p.push(new mxPoint(v, n)), p.push( - new mxPoint(w, n))); - this.limitX = Math.max(this.limitX, n); - m += r - } - null != f && (s = q ? 2 : 0, r = q ? this.rankBottomY[c] : - this.rankTopY[d], t = f[4 * e + 3 - s], q && (t = -t), r -= t, s = f[4 * e + 2 - s], q = h.model.getTerminal(l, !1), m = this.layout.getVisibleTerminal(l, !1), this.layout.isPort(q) && h.model - .getParent(q) == m && (s = h.view.getState(q), s = null != s ? s.x : m.geometry.x + a.target.width * q.geometry.x), this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == - mxConstants.DIRECTION_SOUTH ? (this.edgeStyle == mxHierarchicalEdgeStyle.CURVE && p.push(new mxPoint(s, r - t)), p.push(new mxPoint(s, r))) : (this.edgeStyle == mxHierarchicalEdgeStyle.CURVE && - p.push(new mxPoint(r - - t, s)), p.push(new mxPoint(r, s)))); - a.isReversed && this.processReversedEdge(a, l); - this.layout.setEdgePoints(l, p); - b = 0 == b ? this.parallelEdgeSpacing : 0 < b ? -b : -b + this.parallelEdgeSpacing; - e++ - } - a.temp[0] = 101207 - } -}; -mxCoordinateAssignment.prototype.setVertexLocation = function(a) { - var b = a.cell, - c = a.x[0] - a.width / 2, - d = a.y[0] - a.height / 2; - this.rankTopY[a.minRank] = Math.min(this.rankTopY[a.minRank], d); - this.rankBottomY[a.minRank] = Math.max(this.rankBottomY[a.minRank], d + a.height); - this.orientation == mxConstants.DIRECTION_NORTH || this.orientation == mxConstants.DIRECTION_SOUTH ? this.layout.setVertexLocation(b, c, d) : this.layout.setVertexLocation(b, d, c); - this.limitX = Math.max(this.limitX, c + a.width) -}; -mxCoordinateAssignment.prototype.processReversedEdge = function(a, b) {}; - -function WeightedCellSorter(a, b) { - this.cell = a; - this.weightedValue = b -} -WeightedCellSorter.prototype.weightedValue = 0; -WeightedCellSorter.prototype.nudge = !1; -WeightedCellSorter.prototype.visited = !1; -WeightedCellSorter.prototype.rankIndex = null; -WeightedCellSorter.prototype.cell = null; -WeightedCellSorter.prototype.compare = function(a, b) { - return null != a && null != b ? b.weightedValue > a.weightedValue ? -1 : b.weightedValue < a.weightedValue ? 1 : b.nudge ? -1 : 1 : 0 -}; - -function mxHierarchicalLayout(a, b, c) { - mxGraphLayout.call(this, a); - this.orientation = null != b ? b : mxConstants.DIRECTION_NORTH; - this.deterministic = null != c ? c : !0 -} -mxHierarchicalLayout.prototype = new mxGraphLayout; -mxHierarchicalLayout.prototype.constructor = mxHierarchicalLayout; -mxHierarchicalLayout.prototype.roots = null; -mxHierarchicalLayout.prototype.resizeParent = !1; -mxHierarchicalLayout.prototype.moveParent = !1; -mxHierarchicalLayout.prototype.parentBorder = 0; -mxHierarchicalLayout.prototype.intraCellSpacing = 30; -mxHierarchicalLayout.prototype.interRankCellSpacing = 100; -mxHierarchicalLayout.prototype.interHierarchySpacing = 60; -mxHierarchicalLayout.prototype.parallelEdgeSpacing = 10; -mxHierarchicalLayout.prototype.orientation = mxConstants.DIRECTION_NORTH; -mxHierarchicalLayout.prototype.fineTuning = !0; -mxHierarchicalLayout.prototype.tightenToSource = !0; -mxHierarchicalLayout.prototype.disableEdgeStyle = !0; -mxHierarchicalLayout.prototype.traverseAncestors = !0; -mxHierarchicalLayout.prototype.model = null; -mxHierarchicalLayout.prototype.edgesCache = null; -mxHierarchicalLayout.prototype.getModel = function() { - return this.model -}; -mxHierarchicalLayout.prototype.execute = function(a, b) { - this.parent = a; - var c = this.graph.model; - this.edgesCache = {}; - if (!(null == b && null == a)) { - if (null != b && null != a) { - for (var d = [], e = 0; e < b.length; e++) c.isAncestor(a, b[e]) && d.push(b[e]); - this.roots = d - } else this.roots = b; - c.beginUpdate(); - try { - this.run(a), this.resizeParent && !this.graph.isCellCollapsed(a) && this.graph.updateGroupBounds([a], this.parentBorder, this.moveParent) - } finally { - c.endUpdate() - } - } -}; -mxHierarchicalLayout.prototype.findRoots = function(a, b) { - var c = []; - if (null != a && null != b) { - var d = this.graph.model, - e = null, - f = -1E5, - g; - for (g in b) { - var h = b[g]; - if (d.isVertex(h) && this.graph.isCellVisible(h)) { - for (var k = this.getEdges(h), l = 0, m = 0, n = 0; n < k.length; n++) this.getVisibleTerminal(k[n], !0) == h ? l++ : m++; - 0 == m && 0 < l && c.push(h); - k = l - m; - k > f && (f = k, e = h) - } - } - 0 == c.length && null != e && c.push(e) - } - return c -}; -mxHierarchicalLayout.prototype.getEdges = function(a) { - var b = mxCellPath.create(a); - if (null != this.edgesCache[b]) return this.edgesCache[b]; - for (var c = this.graph.model, d = [], e = this.graph.isCellCollapsed(a), f = c.getChildCount(a), g = 0; g < f; g++) { - var h = c.getChildAt(a, g); - if (this.isPort(h)) d = d.concat(c.getEdges(h, !0, !0)); - else if (e || !this.graph.isCellVisible(h)) d = d.concat(c.getEdges(h, !0, !0)) - } - d = d.concat(c.getEdges(a, !0, !0)); - c = []; - for (g = 0; g < d.length; g++) e = this.getVisibleTerminal(d[g], !0), f = this.getVisibleTerminal(d[g], !1), (e == f || e != f && (f == a && (null == this.parent || this.graph.isValidAncestor(e, - this.parent, this.traverseAncestors)) || e == a && (null == this.parent || this.graph.isValidAncestor(f, this.parent, this.traverseAncestors)))) && c.push(d[g]); - return this.edgesCache[b] = c -}; -mxHierarchicalLayout.prototype.getVisibleTerminal = function(a, b) { - var c = this.graph.view.getState(a), - c = null != c ? c.getVisibleTerminal(b) : this.graph.view.getVisibleTerminal(a, b); - this.isPort(c) && (c = this.graph.model.getParent(c)); - return c -}; -mxHierarchicalLayout.prototype.run = function(a) { - var b = [], - c = []; - if (null == this.roots && null != a) { - var d = {}; - this.filterDescendants(a, d); - this.roots = []; - var e = !0, - f; - for (f in d) - if (null != d[f]) { - e = !1; - break - } - for (; !e;) { - for (var g = this.findRoots(a, d), e = 0; e < g.length; e++) { - var h = []; - b.push(h); - this.traverse(g[e], !0, null, c, h, b, d) - } - for (e = 0; e < g.length; e++) this.roots.push(g[e]); - e = !0; - for (f in d) - if (null != d[f]) { - e = !1; - break - } - } - } else - for (e = 0; e < roots.length; e++) h = [], b.push(h), traverse(roots.get(e), !0, null, c, h, b, null); - for (e = c = 0; e < b.length; e++) { - h = - b[e]; - d = []; - for (f in h) d.push(h[f]); - this.model = new mxGraphHierarchyModel(this, d, this.roots, a, this.tightenToSource); - this.cycleStage(a); - this.layeringStage(); - this.crossingStage(a); - c = this.placementStage(c, a) - } -}; -mxHierarchicalLayout.prototype.filterDescendants = function(a, b) { - var c = this.graph.model; - c.isVertex(a) && (a != this.parent && this.graph.isCellVisible(a)) && (b[mxCellPath.create(a)] = a); - if (this.traverseAncestors || a == this.parent && this.graph.isCellVisible(a)) - for (var d = c.getChildCount(a), e = 0; e < d; e++) { - var f = c.getChildAt(a, e); - this.isPort(f) || this.filterDescendants(f, b) - } -}; -mxHierarchicalLayout.prototype.isPort = function(a) { - return a.geometry.relative ? !0 : !1 -}; -mxHierarchicalLayout.prototype.getEdgesBetween = function(a, b, c) { - c = null != c ? c : !1; - for (var d = this.getEdges(a), e = [], f = 0; f < d.length; f++) { - var g = this.getVisibleTerminal(d[f], !0), - h = this.getVisibleTerminal(d[f], !1); - (g == a && h == b || !c && g == b && h == a) && e.push(d[f]) - } - return e -}; -mxHierarchicalLayout.prototype.traverse = function(a, b, c, d, e, f, g) { - if (null != a && null != d) { - var h = mxCellPath.create(a); - if (null == d[h] && (null == g || null != g[h])) { - null == e[h] && (e[h] = a); - null == d[h] && (d[h] = a); - delete g[h]; - var k = this.getEdges(a); - for (c = 0; c < k.length; c++) - if (h = this.getVisibleTerminal(k[c], !0) == a, !b || h) h = this.getVisibleTerminal(k[c], !h), e = this.traverse(h, b, k[c], d, e, f, g) - } else if (null == e[h]) - for (c = 0; c < f.length; c++) - if (a = f[c], null != a[h]) { - for (k in e) a[k] = e[k]; - f.pop(); - return a - } - } - return e -}; -mxHierarchicalLayout.prototype.cycleStage = function(a) { - (new mxMinimumCycleRemover(this)).execute(a) -}; -mxHierarchicalLayout.prototype.layeringStage = function() { - this.model.initialRank(); - this.model.fixRanks() -}; -mxHierarchicalLayout.prototype.crossingStage = function(a) { - (new mxMedianHybridCrossingReduction(this)).execute(a) -}; -mxHierarchicalLayout.prototype.placementStage = function(a, b) { - var c = new mxCoordinateAssignment(this, this.intraCellSpacing, this.interRankCellSpacing, this.orientation, a, this.parallelEdgeSpacing); - c.fineTuning = this.fineTuning; - c.execute(b); - return c.limitX + this.interHierarchySpacing -}; - -function mxGraphModel(a) { - this.currentEdit = this.createUndoableEdit(); - null != a ? this.setRoot(a) : this.clear() -} -mxGraphModel.prototype = new mxEventSource; -mxGraphModel.prototype.constructor = mxGraphModel; -mxGraphModel.prototype.root = null; -mxGraphModel.prototype.cells = null; -mxGraphModel.prototype.maintainEdgeParent = !0; -mxGraphModel.prototype.createIds = !0; -mxGraphModel.prototype.prefix = ""; -mxGraphModel.prototype.postfix = ""; -mxGraphModel.prototype.nextId = 0; -mxGraphModel.prototype.currentEdit = null; -mxGraphModel.prototype.updateLevel = 0; -mxGraphModel.prototype.endingUpdate = !1; -mxGraphModel.prototype.clear = function() { - this.setRoot(this.createRoot()) -}; -mxGraphModel.prototype.isCreateIds = function() { - return this.createIds -}; -mxGraphModel.prototype.setCreateIds = function(a) { - this.createIds = a -}; -mxGraphModel.prototype.createRoot = function() { - var a = new mxCell; - a.insert(new mxCell); - return a -}; -mxGraphModel.prototype.getCell = function(a) { - return null != this.cells ? this.cells[a] : null -}; -mxGraphModel.prototype.filterCells = function(a, b) { - var c = null; - if (null != a) - for (var c = [], d = 0; d < a.length; d++) b(a[d]) && c.push(a[d]); - return c -}; -mxGraphModel.prototype.getDescendants = function(a) { - return this.filterDescendants(null, a) -}; -mxGraphModel.prototype.filterDescendants = function(a, b) { - var c = []; - b = b || this.getRoot(); - (null == a || a(b)) && c.push(b); - for (var d = this.getChildCount(b), e = 0; e < d; e++) var f = this.getChildAt(b, e), - c = c.concat(this.filterDescendants(a, f)); - return c -}; -mxGraphModel.prototype.getRoot = function(a) { - var b = a || this.root; - if (null != a) - for (; null != a;) b = a, a = this.getParent(a); - return b -}; -mxGraphModel.prototype.setRoot = function(a) { - this.execute(new mxRootChange(this, a)); - return a -}; -mxGraphModel.prototype.rootChanged = function(a) { - var b = this.root; - this.root = a; - this.nextId = 0; - this.cells = null; - this.cellAdded(a); - return b -}; -mxGraphModel.prototype.isRoot = function(a) { - return null != a && this.root == a -}; -mxGraphModel.prototype.isLayer = function(a) { - return this.isRoot(this.getParent(a)) -}; -mxGraphModel.prototype.isAncestor = function(a, b) { - for (; null != b && b != a;) b = this.getParent(b); - return b == a -}; -mxGraphModel.prototype.contains = function(a) { - return this.isAncestor(this.root, a) -}; -mxGraphModel.prototype.getParent = function(a) { - return null != a ? a.getParent() : null -}; -mxGraphModel.prototype.add = function(a, b, c) { - if (b != a && null != a && null != b) { - null == c && (c = this.getChildCount(a)); - var d = a != this.getParent(b); - this.execute(new mxChildChange(this, a, b, c)); - this.maintainEdgeParent && d && this.updateEdgeParents(b) - } - return b -}; -mxGraphModel.prototype.cellAdded = function(a) { - if (null != a) { - null == a.getId() && this.createIds && a.setId(this.createId(a)); - if (null != a.getId()) { - var b = this.getCell(a.getId()); - if (b != a) { - for (; null != b;) a.setId(this.createId(a)), b = this.getCell(a.getId()); - null == this.cells && (this.cells = {}); - this.cells[a.getId()] = a - } - } - mxUtils.isNumeric(a.getId()) && (this.nextId = Math.max(this.nextId, a.getId())); - for (var b = this.getChildCount(a), c = 0; c < b; c++) this.cellAdded(this.getChildAt(a, c)) - } -}; -mxGraphModel.prototype.createId = function(a) { - a = this.nextId; - this.nextId++; - return this.prefix + a + this.postfix -}; -mxGraphModel.prototype.updateEdgeParents = function(a, b) { - b = b || this.getRoot(a); - for (var c = this.getChildCount(a), d = 0; d < c; d++) { - var e = this.getChildAt(a, d); - this.updateEdgeParents(e, b) - } - e = this.getEdgeCount(a); - c = []; - for (d = 0; d < e; d++) c.push(this.getEdgeAt(a, d)); - for (d = 0; d < c.length; d++) e = c[d], this.isAncestor(b, e) && this.updateEdgeParent(e, b) -}; -mxGraphModel.prototype.updateEdgeParent = function(a, b) { - for (var c = this.getTerminal(a, !0), d = this.getTerminal(a, !1), e = null; null != c && !this.isEdge(c) && null != c.geometry && c.geometry.relative;) c = this.getParent(c); - for (; null != d && !this.isEdge(d) && null != d.geometry && d.geometry.relative;) d = this.getParent(d); - if (this.isAncestor(b, c) && this.isAncestor(b, d) && (e = c == d ? this.getParent(c) : this.getNearestCommonAncestor(c, d), null != e && (this.getParent(e) != this.root || this.isAncestor(e, a)) && - this.getParent(a) != e)) { - c = this.getGeometry(a); - if (null != c) { - var f = this.getOrigin(this.getParent(a)), - g = this.getOrigin(e), - d = g.x - f.x, - f = g.y - f.y, - c = c.clone(); - c.translate(-d, -f); - this.setGeometry(a, c) - } - this.add(e, a, this.getChildCount(e)) - } -}; -mxGraphModel.prototype.getOrigin = function(a) { - var b = null; - null != a ? (b = this.getOrigin(this.getParent(a)), this.isEdge(a) || (a = this.getGeometry(a), null != a && (b.x += a.x, b.y += a.y))) : b = new mxPoint; - return b -}; -mxGraphModel.prototype.getNearestCommonAncestor = function(a, b) { - if (null != a && null != b) { - var c = mxCellPath.create(b); - if (null != c && 0 < c.length) { - var d = a, - e = mxCellPath.create(d); - if (c.length < e.length) var d = b, - f = e, - e = c, - c = f; - for (; null != d;) { - f = this.getParent(d); - if (0 == c.indexOf(e + mxCellPath.PATH_SEPARATOR) && null != f) return d; - e = mxCellPath.getParentPath(e); - d = f - } - } - } - return null -}; -mxGraphModel.prototype.remove = function(a) { - a == this.root ? this.setRoot(null) : null != this.getParent(a) && this.execute(new mxChildChange(this, null, a)); - return a -}; -mxGraphModel.prototype.cellRemoved = function(a) { - if (null != a && null != this.cells) { - for (var b = this.getChildCount(a) - 1; 0 <= b; b--) this.cellRemoved(this.getChildAt(a, b)); - null != this.cells && null != a.getId() && delete this.cells[a.getId()] - } -}; -mxGraphModel.prototype.parentForCellChanged = function(a, b, c) { - var d = this.getParent(a); - null != b ? (b != d || d.getIndex(a) != c) && b.insert(a, c) : null != d && (c = d.getIndex(a), d.remove(c)); - !this.contains(d) && null != b ? this.cellAdded(a) : null == b && this.cellRemoved(a); - return d -}; -mxGraphModel.prototype.getChildCount = function(a) { - return null != a ? a.getChildCount() : 0 -}; -mxGraphModel.prototype.getChildAt = function(a, b) { - return null != a ? a.getChildAt(b) : null -}; -mxGraphModel.prototype.getChildren = function(a) { - return null != a ? a.children : null -}; -mxGraphModel.prototype.getChildVertices = function(a) { - return this.getChildCells(a, !0, !1) -}; -mxGraphModel.prototype.getChildEdges = function(a) { - return this.getChildCells(a, !1, !0) -}; -mxGraphModel.prototype.getChildCells = function(a, b, c) { - b = null != b ? b : !1; - c = null != c ? c : !1; - for (var d = this.getChildCount(a), e = [], f = 0; f < d; f++) { - var g = this.getChildAt(a, f); - (!c && !b || c && this.isEdge(g) || b && this.isVertex(g)) && e.push(g) - } - return e -}; -mxGraphModel.prototype.getTerminal = function(a, b) { - return null != a ? a.getTerminal(b) : null -}; -mxGraphModel.prototype.setTerminal = function(a, b, c) { - var d = b != this.getTerminal(a, c); - this.execute(new mxTerminalChange(this, a, b, c)); - this.maintainEdgeParent && d && this.updateEdgeParent(a, this.getRoot()); - return b -}; -mxGraphModel.prototype.setTerminals = function(a, b, c) { - this.beginUpdate(); - try { - this.setTerminal(a, b, !0), this.setTerminal(a, c, !1) - } finally { - this.endUpdate() - } -}; -mxGraphModel.prototype.terminalForCellChanged = function(a, b, c) { - var d = this.getTerminal(a, c); - null != b ? b.insertEdge(a, c) : null != d && d.removeEdge(a, c); - return d -}; -mxGraphModel.prototype.getEdgeCount = function(a) { - return null != a ? a.getEdgeCount() : 0 -}; -mxGraphModel.prototype.getEdgeAt = function(a, b) { - return null != a ? a.getEdgeAt(b) : null -}; -mxGraphModel.prototype.getDirectedEdgeCount = function(a, b, c) { - for (var d = 0, e = this.getEdgeCount(a), f = 0; f < e; f++) { - var g = this.getEdgeAt(a, f); - g != c && this.getTerminal(g, b) == a && d++ - } - return d -}; -mxGraphModel.prototype.getConnections = function(a) { - return this.getEdges(a, !0, !0, !1) -}; -mxGraphModel.prototype.getIncomingEdges = function(a) { - return this.getEdges(a, !0, !1, !1) -}; -mxGraphModel.prototype.getOutgoingEdges = function(a) { - return this.getEdges(a, !1, !0, !1) -}; -mxGraphModel.prototype.getEdges = function(a, b, c, d) { - b = null != b ? b : !0; - c = null != c ? c : !0; - d = null != d ? d : !0; - for (var e = this.getEdgeCount(a), f = [], g = 0; g < e; g++) { - var h = this.getEdgeAt(a, g), - k = this.getTerminal(h, !0), - l = this.getTerminal(h, !1); - (d && k == l || k != l && (b && l == a || c && k == a)) && f.push(h) - } - return f -}; -mxGraphModel.prototype.getEdgesBetween = function(a, b, c) { - c = null != c ? c : !1; - var d = this.getEdgeCount(a), - e = this.getEdgeCount(b), - f = a, - g = d; - e < d && (g = e, f = b); - d = []; - for (e = 0; e < g; e++) { - var h = this.getEdgeAt(f, e), - k = this.getTerminal(h, !0), - l = this.getTerminal(h, !1), - m = l == a && k == b; - (k == a && l == b || !c && m) && d.push(h) - } - return d -}; -mxGraphModel.prototype.getOpposites = function(a, b, c, d) { - c = null != c ? c : !0; - d = null != d ? d : !0; - var e = []; - if (null != a) - for (var f = 0; f < a.length; f++) { - var g = this.getTerminal(a[f], !0), - h = this.getTerminal(a[f], !1); - g == b && null != h && h != b && d ? e.push(h) : h == b && (null != g && g != b && c) && e.push(g) - } - return e -}; -mxGraphModel.prototype.getTopmostCells = function(a) { - for (var b = [], c = 0; c < a.length; c++) { - for (var d = a[c], e = !0, f = this.getParent(d); null != f;) { - if (0 <= mxUtils.indexOf(a, f)) { - e = !1; - break - } - f = this.getParent(f) - } - e && b.push(d) - } - return b -}; -mxGraphModel.prototype.isVertex = function(a) { - return null != a ? a.isVertex() : !1 -}; -mxGraphModel.prototype.isEdge = function(a) { - return null != a ? a.isEdge() : !1 -}; -mxGraphModel.prototype.isConnectable = function(a) { - return null != a ? a.isConnectable() : !1 -}; -mxGraphModel.prototype.getValue = function(a) { - return null != a ? a.getValue() : null -}; -mxGraphModel.prototype.setValue = function(a, b) { - this.execute(new mxValueChange(this, a, b)); - return b -}; -mxGraphModel.prototype.valueForCellChanged = function(a, b) { - return a.valueChanged(b) -}; -mxGraphModel.prototype.getGeometry = function(a, b) { - return null != a ? a.getGeometry() : null -}; -mxGraphModel.prototype.setGeometry = function(a, b) { - b != this.getGeometry(a) && this.execute(new mxGeometryChange(this, a, b)); - return b -}; -mxGraphModel.prototype.geometryForCellChanged = function(a, b) { - var c = this.getGeometry(a); - a.setGeometry(b); - return c -}; -mxGraphModel.prototype.getStyle = function(a) { - return null != a ? a.getStyle() : null -}; -mxGraphModel.prototype.setStyle = function(a, b) { - b != this.getStyle(a) && this.execute(new mxStyleChange(this, a, b)); - return b -}; -mxGraphModel.prototype.styleForCellChanged = function(a, b) { - var c = this.getStyle(a); - a.setStyle(b); - return c -}; -mxGraphModel.prototype.isCollapsed = function(a) { - return null != a ? a.isCollapsed() : !1 -}; -mxGraphModel.prototype.setCollapsed = function(a, b) { - b != this.isCollapsed(a) && this.execute(new mxCollapseChange(this, a, b)); - return b -}; -mxGraphModel.prototype.collapsedStateForCellChanged = function(a, b) { - var c = this.isCollapsed(a); - a.setCollapsed(b); - return c -}; -mxGraphModel.prototype.isVisible = function(a) { - return null != a ? a.isVisible() : !1 -}; -mxGraphModel.prototype.setVisible = function(a, b) { - b != this.isVisible(a) && this.execute(new mxVisibleChange(this, a, b)); - return b -}; -mxGraphModel.prototype.visibleStateForCellChanged = function(a, b) { - var c = this.isVisible(a); - a.setVisible(b); - return c -}; -mxGraphModel.prototype.execute = function(a) { - a.execute(); - this.beginUpdate(); - this.currentEdit.add(a); - this.fireEvent(new mxEventObject(mxEvent.EXECUTE, "change", a)); - this.fireEvent(new mxEventObject(mxEvent.EXECUTED, "change", a)); - this.endUpdate() -}; -mxGraphModel.prototype.beginUpdate = function() { - this.updateLevel++; - this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE)); - 1 == this.updateLevel && this.fireEvent(new mxEventObject(mxEvent.START_EDIT)) -}; -mxGraphModel.prototype.endUpdate = function() { - this.updateLevel--; - 0 == this.updateLevel && this.fireEvent(new mxEventObject(mxEvent.END_EDIT)); - if (!this.endingUpdate) { - this.endingUpdate = 0 == this.updateLevel; - this.fireEvent(new mxEventObject(mxEvent.END_UPDATE, "edit", this.currentEdit)); - try { - if (this.endingUpdate && !this.currentEdit.isEmpty()) { - this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO, "edit", this.currentEdit)); - var a = this.currentEdit; - this.currentEdit = this.createUndoableEdit(); - a.notify(); - this.fireEvent(new mxEventObject(mxEvent.UNDO, - "edit", a)) - } - } finally { - this.endingUpdate = !1 - } - } -}; -mxGraphModel.prototype.createUndoableEdit = function() { - var a = new mxUndoableEdit(this, !0); - a.notify = function() { - a.source.fireEvent(new mxEventObject(mxEvent.CHANGE, "edit", a, "changes", a.changes)); - a.source.fireEvent(new mxEventObject(mxEvent.NOTIFY, "edit", a, "changes", a.changes)) - }; - return a -}; -mxGraphModel.prototype.mergeChildren = function(a, b, c) { - c = null != c ? c : !0; - this.beginUpdate(); - try { - var d = {}; - this.mergeChildrenImpl(a, b, c, d); - for (var e in d) { - var f = d[e], - g = this.getTerminal(f, !0); - null != g && (g = d[mxCellPath.create(g)], this.setTerminal(f, g, !0)); - g = this.getTerminal(f, !1); - null != g && (g = d[mxCellPath.create(g)], this.setTerminal(f, g, !1)) - } - } finally { - this.endUpdate() - } -}; -mxGraphModel.prototype.mergeChildrenImpl = function(a, b, c, d) { - this.beginUpdate(); - try { - for (var e = a.getChildCount(), f = 0; f < e; f++) { - var g = a.getChildAt(f); - if ("function" == typeof g.getId) { - var h = g.getId(), - k = null != h && (!this.isEdge(g) || !c) ? this.getCell(h) : null; - if (null == k) { - var l = g.clone(); - l.setId(h); - l.setTerminal(g.getTerminal(!0), !0); - l.setTerminal(g.getTerminal(!1), !1); - k = b.insert(l); - this.cellAdded(k) - } - d[mxCellPath.create(g)] = k; - this.mergeChildrenImpl(g, k, c, d) - } - } - } finally { - this.endUpdate() - } -}; -mxGraphModel.prototype.getParents = function(a) { - var b = []; - if (null != a) - for (var c = {}, d = 0; d < a.length; d++) { - var e = this.getParent(a[d]); - if (null != e) { - var f = mxCellPath.create(e); - null == c[f] && (c[f] = e, b.push(e)) - } - } - return b -}; -mxGraphModel.prototype.cloneCell = function(a) { - return null != a ? this.cloneCells([a], !0)[0] : null -}; -mxGraphModel.prototype.cloneCells = function(a, b) { - for (var c = {}, d = [], e = 0; e < a.length; e++) null != a[e] ? d.push(this.cloneCellImpl(a[e], c, b)) : d.push(null); - for (e = 0; e < d.length; e++) null != d[e] && this.restoreClone(d[e], a[e], c); - return d -}; -mxGraphModel.prototype.cloneCellImpl = function(a, b, c) { - var d = this.cellCloned(a); - b[mxObjectIdentity.get(a)] = d; - if (c) { - c = this.getChildCount(a); - for (var e = 0; e < c; e++) { - var f = this.cloneCellImpl(this.getChildAt(a, e), b, !0); - d.insert(f) - } - } - return d -}; -mxGraphModel.prototype.cellCloned = function(a) { - return a.clone() -}; -mxGraphModel.prototype.restoreClone = function(a, b, c) { - var d = this.getTerminal(b, !0); - null != d && (d = c[mxObjectIdentity.get(d)], null != d && d.insertEdge(a, !0)); - d = this.getTerminal(b, !1); - null != d && (d = c[mxObjectIdentity.get(d)], null != d && d.insertEdge(a, !1)); - for (var d = this.getChildCount(a), e = 0; e < d; e++) this.restoreClone(this.getChildAt(a, e), this.getChildAt(b, e), c) -}; - -function mxRootChange(a, b) { - this.model = a; - this.previous = this.root = b -} -mxRootChange.prototype.execute = function() { - this.root = this.previous; - this.previous = this.model.rootChanged(this.previous) -}; - -function mxChildChange(a, b, c, d) { - this.model = a; - this.previous = this.parent = b; - this.child = c; - this.previousIndex = this.index = d -} -mxChildChange.prototype.execute = function() { - var a = this.model.getParent(this.child), - b = null != a ? a.getIndex(this.child) : 0; - null == this.previous && this.connect(this.child, !1); - a = this.model.parentForCellChanged(this.child, this.previous, this.previousIndex); - null != this.previous && this.connect(this.child, !0); - this.parent = this.previous; - this.previous = a; - this.index = this.previousIndex; - this.previousIndex = b -}; -mxChildChange.prototype.connect = function(a, b) { - b = null != b ? b : !0; - var c = a.getTerminal(!0), - d = a.getTerminal(!1); - null != c && (b ? this.model.terminalForCellChanged(a, c, !0) : this.model.terminalForCellChanged(a, null, !0)); - null != d && (b ? this.model.terminalForCellChanged(a, d, !1) : this.model.terminalForCellChanged(a, null, !1)); - a.setTerminal(c, !0); - a.setTerminal(d, !1); - c = this.model.getChildCount(a); - for (d = 0; d < c; d++) this.connect(this.model.getChildAt(a, d), b) -}; - -function mxTerminalChange(a, b, c, d) { - this.model = a; - this.cell = b; - this.previous = this.terminal = c; - this.source = d -} -mxTerminalChange.prototype.execute = function() { - this.terminal = this.previous; - this.previous = this.model.terminalForCellChanged(this.cell, this.previous, this.source) -}; - -function mxValueChange(a, b, c) { - this.model = a; - this.cell = b; - this.previous = this.value = c -} -mxValueChange.prototype.execute = function() { - this.value = this.previous; - this.previous = this.model.valueForCellChanged(this.cell, this.previous) -}; - -function mxStyleChange(a, b, c) { - this.model = a; - this.cell = b; - this.previous = this.style = c -} -mxStyleChange.prototype.execute = function() { - this.style = this.previous; - this.previous = this.model.styleForCellChanged(this.cell, this.previous) -}; - -function mxGeometryChange(a, b, c) { - this.model = a; - this.cell = b; - this.previous = this.geometry = c -} -mxGeometryChange.prototype.execute = function() { - this.geometry = this.previous; - this.previous = this.model.geometryForCellChanged(this.cell, this.previous) -}; - -function mxCollapseChange(a, b, c) { - this.model = a; - this.cell = b; - this.previous = this.collapsed = c -} -mxCollapseChange.prototype.execute = function() { - this.collapsed = this.previous; - this.previous = this.model.collapsedStateForCellChanged(this.cell, this.previous) -}; - -function mxVisibleChange(a, b, c) { - this.model = a; - this.cell = b; - this.previous = this.visible = c -} -mxVisibleChange.prototype.execute = function() { - this.visible = this.previous; - this.previous = this.model.visibleStateForCellChanged(this.cell, this.previous) -}; - -function mxCellAttributeChange(a, b, c) { - this.cell = a; - this.attribute = b; - this.previous = this.value = c -} -mxCellAttributeChange.prototype.execute = function() { - var a = this.cell.getAttribute(this.attribute); - null == this.previous ? this.cell.value.removeAttribute(this.attribute) : this.cell.setAttribute(this.attribute, this.previous); - this.previous = a -}; - -function mxCell(a, b, c) { - this.value = a; - this.setGeometry(b); - this.setStyle(c); - if (null != this.onInit) this.onInit() -} -mxCell.prototype.id = null; -mxCell.prototype.value = null; -mxCell.prototype.geometry = null; -mxCell.prototype.style = null; -mxCell.prototype.vertex = !1; -mxCell.prototype.edge = !1; -mxCell.prototype.connectable = !0; -mxCell.prototype.visible = !0; -mxCell.prototype.collapsed = !1; -mxCell.prototype.parent = null; -mxCell.prototype.source = null; -mxCell.prototype.target = null; -mxCell.prototype.children = null; -mxCell.prototype.edges = null; -mxCell.prototype.mxTransient = "id value parent source target children edges".split(" "); -mxCell.prototype.getId = function() { - return this.id -}; -mxCell.prototype.setId = function(a) { - this.id = a -}; -mxCell.prototype.getValue = function() { - return this.value -}; -mxCell.prototype.setValue = function(a) { - this.value = a -}; -mxCell.prototype.valueChanged = function(a) { - var b = this.getValue(); - this.setValue(a); - return b -}; -mxCell.prototype.getGeometry = function() { - return this.geometry -}; -mxCell.prototype.setGeometry = function(a) { - this.geometry = a -}; -mxCell.prototype.getStyle = function() { - return this.style -}; -mxCell.prototype.setStyle = function(a) { - this.style = a -}; -mxCell.prototype.isVertex = function() { - return this.vertex -}; -mxCell.prototype.setVertex = function(a) { - this.vertex = a -}; -mxCell.prototype.isEdge = function() { - return this.edge -}; -mxCell.prototype.setEdge = function(a) { - this.edge = a -}; -mxCell.prototype.isConnectable = function() { - return this.connectable -}; -mxCell.prototype.setConnectable = function(a) { - this.connectable = a -}; -mxCell.prototype.isVisible = function() { - return this.visible -}; -mxCell.prototype.setVisible = function(a) { - this.visible = a -}; -mxCell.prototype.isCollapsed = function() { - return this.collapsed -}; -mxCell.prototype.setCollapsed = function(a) { - this.collapsed = a -}; -mxCell.prototype.getParent = function() { - return this.parent -}; -mxCell.prototype.setParent = function(a) { - this.parent = a -}; -mxCell.prototype.getTerminal = function(a) { - return a ? this.source : this.target -}; -mxCell.prototype.setTerminal = function(a, b) { - b ? this.source = a : this.target = a; - return a -}; -mxCell.prototype.getChildCount = function() { - return null == this.children ? 0 : this.children.length -}; -mxCell.prototype.getIndex = function(a) { - return mxUtils.indexOf(this.children, a) -}; -mxCell.prototype.getChildAt = function(a) { - return null == this.children ? null : this.children[a] -}; -mxCell.prototype.insert = function(a, b) { - null != a && (null == b && (b = this.getChildCount(), a.getParent() == this && b--), a.removeFromParent(), a.setParent(this), null == this.children ? (this.children = [], this.children.push(a)) : - this.children.splice(b, 0, a)); - return a -}; -mxCell.prototype.remove = function(a) { - var b = null; - null != this.children && 0 <= a && (b = this.getChildAt(a), null != b && (this.children.splice(a, 1), b.setParent(null))); - return b -}; -mxCell.prototype.removeFromParent = function() { - if (null != this.parent) { - var a = this.parent.getIndex(this); - this.parent.remove(a) - } -}; -mxCell.prototype.getEdgeCount = function() { - return null == this.edges ? 0 : this.edges.length -}; -mxCell.prototype.getEdgeIndex = function(a) { - return mxUtils.indexOf(this.edges, a) -}; -mxCell.prototype.getEdgeAt = function(a) { - return null == this.edges ? null : this.edges[a] -}; -mxCell.prototype.insertEdge = function(a, b) { - if (null != a && (a.removeFromTerminal(b), a.setTerminal(this, b), null == this.edges || a.getTerminal(!b) != this || 0 > mxUtils.indexOf(this.edges, a))) null == this.edges && (this.edges = []), - this.edges.push(a); - return a -}; -mxCell.prototype.removeEdge = function(a, b) { - if (null != a) { - if (a.getTerminal(!b) != this && null != this.edges) { - var c = this.getEdgeIndex(a); - 0 <= c && this.edges.splice(c, 1) - } - a.setTerminal(null, b) - } - return a -}; -mxCell.prototype.removeFromTerminal = function(a) { - var b = this.getTerminal(a); - null != b && b.removeEdge(this, a) -}; -mxCell.prototype.getAttribute = function(a, b) { - var c = this.getValue(); - return (null != c && c.nodeType == mxConstants.NODETYPE_ELEMENT ? c.getAttribute(a) : null) || b -}; -mxCell.prototype.setAttribute = function(a, b) { - var c = this.getValue(); - null != c && c.nodeType == mxConstants.NODETYPE_ELEMENT && c.setAttribute(a, b) -}; -mxCell.prototype.clone = function() { - var a = mxUtils.clone(this, this.mxTransient); - a.setValue(this.cloneValue()); - return a -}; -mxCell.prototype.cloneValue = function() { - var a = this.getValue(); - null != a && ("function" == typeof a.clone ? a = a.clone() : isNaN(a.nodeType) || (a = a.cloneNode(!0))); - return a -}; - -function mxGeometry(a, b, c, d) { - mxRectangle.call(this, a, b, c, d) -} -mxGeometry.prototype = new mxRectangle; -mxGeometry.prototype.constructor = mxGeometry; -mxGeometry.prototype.TRANSLATE_CONTROL_POINTS = !0; -mxGeometry.prototype.alternateBounds = null; -mxGeometry.prototype.sourcePoint = null; -mxGeometry.prototype.targetPoint = null; -mxGeometry.prototype.points = null; -mxGeometry.prototype.offset = null; -mxGeometry.prototype.relative = !1; -mxGeometry.prototype.swap = function() { - if (null != this.alternateBounds) { - var a = new mxRectangle(this.x, this.y, this.width, this.height); - this.x = this.alternateBounds.x; - this.y = this.alternateBounds.y; - this.width = this.alternateBounds.width; - this.height = this.alternateBounds.height; - this.alternateBounds = a - } -}; -mxGeometry.prototype.getTerminalPoint = function(a) { - return a ? this.sourcePoint : this.targetPoint -}; -mxGeometry.prototype.setTerminalPoint = function(a, b) { - b ? this.sourcePoint = a : this.targetPoint = a; - return a -}; -mxGeometry.prototype.translate = function(a, b) { - this.clone(); - this.relative || (this.x += a, this.y += b); - null != this.sourcePoint && (this.sourcePoint.x += a, this.sourcePoint.y += b); - null != this.targetPoint && (this.targetPoint.x += a, this.targetPoint.y += b); - if (this.TRANSLATE_CONTROL_POINTS && null != this.points) - for (var c = this.points.length, d = 0; d < c; d++) { - var e = this.points[d]; - null != e && (e.x += a, e.y += b) - } -}; -var mxCellPath = { - PATH_SEPARATOR: ".", - create: function(a) { - var b = ""; - if (null != a) - for (var c = a.getParent(); null != c;) b = c.getIndex(a) + mxCellPath.PATH_SEPARATOR + b, a = c, c = a.getParent(); - a = b.length; - 1 < a && (b = b.substring(0, a - 1)); - return b - }, - getParentPath: function(a) { - if (null != a) { - var b = a.lastIndexOf(mxCellPath.PATH_SEPARATOR); - if (0 <= b) return a.substring(0, b); - if (0 < a.length) return "" - } - return null - }, - resolve: function(a, b) { - var c = a; - if (null != b) - for (var d = b.split(mxCellPath.PATH_SEPARATOR), e = 0; e < d.length; e++) c = c.getChildAt(parseInt(d[e])); - return c - }, - compare: function(a, b) { - for (var c = Math.min(a.length, b.length), d = 0, e = 0; e < c; e++) - if (a[e] != b[e]) { - 0 == a[e].length || 0 == b[e].length ? d = a[e] == b[e] ? 0 : a[e] > b[e] ? 1 : -1 : (c = parseInt(a[e]), e = parseInt(b[e]), d = c == e ? 0 : c > e ? 1 : -1); - break - } - 0 == d && (c = a.length, e = b.length, c != e && (d = c > e ? 1 : -1)); - return d - } - }, - mxPerimeter = { - RectanglePerimeter: function(a, b, c, d) { - b = a.getCenterX(); - var e = a.getCenterY(), - f = Math.atan2(c.y - e, c.x - b), - g = new mxPoint(0, 0), - h = Math.PI, - k = Math.PI / 2 - f, - l = Math.atan2(a.height, a.width); - f < -h + l || f > h - l ? (g.x = a.x, g.y = e - a.width * - Math.tan(f) / 2) : f < -l ? (g.y = a.y, g.x = b - a.height * Math.tan(k) / 2) : f < l ? (g.x = a.x + a.width, g.y = e + a.width * Math.tan(f) / 2) : (g.y = a.y + a.height, g.x = b + a.height * - Math.tan(k) / 2); - d && (c.x >= a.x && c.x <= a.x + a.width ? g.x = c.x : c.y >= a.y && c.y <= a.y + a.height && (g.y = c.y), c.x < a.x ? g.x = a.x : c.x > a.x + a.width && (g.x = a.x + a.width), c.y < a.y ? g.y = - a.y : c.y > a.y + a.height && (g.y = a.y + a.height)); - return g - }, - EllipsePerimeter: function(a, b, c, d) { - var e = a.x, - f = a.y, - g = a.width / 2, - h = a.height / 2, - k = e + g, - l = f + h; - b = c.x; - c = c.y; - var m = parseInt(b - k), - n = parseInt(c - l); - if (0 == m && 0 != n) return new mxPoint(k, - l + h * n / Math.abs(n)); - if (0 == m && 0 == n) return new mxPoint(b, c); - if (d) { - if (c >= f && c <= f + a.height) return a = c - l, a = Math.sqrt(g * g * (1 - a * a / (h * h))) || 0, b <= e && (a = -a), new mxPoint(k + a, c); - if (b >= e && b <= e + a.width) return a = b - k, a = Math.sqrt(h * h * (1 - a * a / (g * g))) || 0, c <= f && (a = -a), new mxPoint(b, l + a) - } - e = n / m; - l -= e * k; - f = g * g * e * e + h * h; - a = -2 * k * f; - h = Math.sqrt(a * a - 4 * f * (g * g * e * e * k * k + h * h * k * k - g * g * h * h)); - g = (-a + h) / (2 * f); - h = (-a - h) / (2 * f); - k = e * g + l; - l = e * h + l; - e = Math.sqrt(Math.pow(g - b, 2) + Math.pow(k - c, 2)); - b = Math.sqrt(Math.pow(h - b, 2) + Math.pow(l - c, 2)); - f = c = 0; - e < b ? (c = - g, f = k) : (c = h, f = l); - return new mxPoint(c, f) - }, - RhombusPerimeter: function(a, b, c, d) { - b = a.x; - var e = a.y, - f = a.width; - a = a.height; - var g = b + f / 2, - h = e + a / 2, - k = c.x; - c = c.y; - if (g == k) return h > c ? new mxPoint(g, e) : new mxPoint(g, e + a); - if (h == c) return g > k ? new mxPoint(b, h) : new mxPoint(b + f, h); - var l = g, - m = h; - d && (k >= b && k <= b + f ? l = k : c >= e && c <= e + a && (m = c)); - return k < g ? c < h ? mxUtils.intersection(k, c, l, m, g, e, b, h) : mxUtils.intersection(k, c, l, m, g, e + a, b, h) : c < h ? mxUtils.intersection(k, c, l, m, g, e, b + f, h) : mxUtils.intersection( - k, c, l, m, g, e + a, b + f, h) - }, - TrianglePerimeter: function(a, - b, c, d) { - b = null != b ? b.style[mxConstants.STYLE_DIRECTION] : null; - var e = b == mxConstants.DIRECTION_NORTH || b == mxConstants.DIRECTION_SOUTH, - f = a.x, - g = a.y, - h = a.width; - a = a.height; - var k = f + h / 2, - l = g + a / 2, - m = new mxPoint(f, g), - n = new mxPoint(f + h, l), - p = new mxPoint(f, g + a); - b == mxConstants.DIRECTION_NORTH ? (m = p, n = new mxPoint(k, g), p = new mxPoint(f + h, g + a)) : b == mxConstants.DIRECTION_SOUTH ? (n = new mxPoint(k, g + a), p = new mxPoint(f + h, g)) : - b == mxConstants.DIRECTION_WEST && (m = new mxPoint(f + h, g), n = new mxPoint(f, l), p = new mxPoint(f + h, g + a)); - var q = c.x - - k, - s = c.y - l, - q = e ? Math.atan2(q, s) : Math.atan2(s, q), - r = e ? Math.atan2(h, a) : Math.atan2(a, h), - s = !1, - s = b == mxConstants.DIRECTION_NORTH || b == mxConstants.DIRECTION_WEST ? q > -r && q < r : q < -Math.PI + r || q > Math.PI - r, - r = null; - s ? r = d && (e && c.x >= m.x && c.x <= p.x || !e && c.y >= m.y && c.y <= p.y) ? e ? new mxPoint(c.x, m.y) : new mxPoint(m.x, c.y) : b == mxConstants.DIRECTION_NORTH ? new mxPoint(f + h / 2 + - a * Math.tan(q) / 2, g + a) : b == mxConstants.DIRECTION_SOUTH ? new mxPoint(f + h / 2 - a * Math.tan(q) / 2, g) : b == mxConstants.DIRECTION_WEST ? new mxPoint(f + h, g + a / 2 + h * - Math.tan(q) / 2) : new mxPoint(f, - g + a / 2 - h * Math.tan(q) / 2) : (d && (d = new mxPoint(k, l), c.y >= g && c.y <= g + a ? (d.x = e ? k : b == mxConstants.DIRECTION_WEST ? f + h : f, d.y = c.y) : c.x >= f && c.x <= f + - h && (d.x = c.x, d.y = !e ? l : b == mxConstants.DIRECTION_NORTH ? g + a : g), k = d.x, l = d.y), r = e && c.x <= f + h / 2 || !e && c.y <= g + a / 2 ? mxUtils.intersection(c.x, c.y, k, - l, m.x, m.y, n.x, n.y) : mxUtils.intersection(c.x, c.y, k, l, n.x, n.y, p.x, p.y)); - null == r && (r = new mxPoint(k, l)); - return r - } - }; - -function mxPrintPreview(a, b, c, d, e, f, g, h, k) { - this.graph = a; - this.scale = null != b ? b : 1 / a.pageScale; - this.border = null != d ? d : 0; - this.pageFormat = null != c ? c : a.pageFormat; - this.title = null != h ? h : "Printer-friendly version"; - this.x0 = null != e ? e : 0; - this.y0 = null != f ? f : 0; - this.borderColor = g; - this.pageSelector = null != k ? k : !0 -} -mxPrintPreview.prototype.graph = null; -mxPrintPreview.prototype.pageFormat = null; -mxPrintPreview.prototype.scale = null; -mxPrintPreview.prototype.border = 0; -mxPrintPreview.prototype.x0 = 0; -mxPrintPreview.prototype.y0 = 0; -mxPrintPreview.prototype.autoOrigin = !0; -mxPrintPreview.prototype.printOverlays = !1; -mxPrintPreview.prototype.borderColor = null; -mxPrintPreview.prototype.title = null; -mxPrintPreview.prototype.pageSelector = null; -mxPrintPreview.prototype.wnd = null; -mxPrintPreview.prototype.pageCount = 0; -mxPrintPreview.prototype.getWindow = function() { - return this.wnd -}; -mxPrintPreview.prototype.getDoctype = function() { - var a = ""; - 8 == document.documentMode && (a = '\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3d8"\x3e'); - return a -}; -mxPrintPreview.prototype.open = function(a) { - var b = this.graph.cellRenderer.initializeOverlay, - c = null; - try { - this.printOverlays && (this.graph.cellRenderer.initializeOverlay = function(a, b) { - b.init(a.view.getDrawPane()) - }); - if (null == this.wnd) { - this.wnd = window.open(); - var d = this.wnd.document, - e = this.getDoctype(); - null != e && 0 < e.length && d.writeln(e); - d.writeln("\x3chtml\x3e"); - d.writeln("\x3chead\x3e"); - this.writeHead(d, a); - d.writeln("\x3c/head\x3e"); - d.writeln('\x3cbody class\x3d"mxPage"\x3e'); - mxClient.link("stylesheet", mxClient.basePath + - "/css/common.css", d); - mxClient.IS_VML && (d.namespaces.add("v", "urn:schemas-microsoft-com:vml"), d.namespaces.add("o", "urn:schemas-microsoft-com:office:office"), d.createStyleSheet().cssText = - "v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}", mxClient.link("stylesheet", mxClient.basePath + "/css/explorer.css", d)); - var f = this.graph.getGraphBounds().clone(), - g = this.graph.getView().getScale(), - h = g / this.scale, - k = this.graph.getView().getTranslate(); - this.autoOrigin || (this.x0 = -k.x * this.scale, this.y0 = -k.y * this.scale, f.width += f.x, f.height += f.y, f.x = 0, this.border = f.y = 0); - f.width /= h; - f.height /= h; - var l = this.pageFormat.width - 2 * this.border, - m = this.pageFormat.height - 2 * this.border, - n = Math.max(1, Math.ceil((f.width + this.x0) / l)), - p = Math.max(1, Math.ceil((f.height + this.y0) / m)); - this.pageCount = n * p; - var q = mxUtils.bind(this, function() { - if (this.pageSelector && (1 < p || 1 < n)) { - var a = this.createPageSelector(p, n); - d.body.appendChild(a); - if (mxClient.IS_IE) { - a.style.position = "absolute"; - var b = function() { - a.style.top = d.body.scrollTop + - 10 + "px" - }; - mxEvent.addListener(this.wnd, "scroll", function(a) { - b() - }); - mxEvent.addListener(this.wnd, "resize", function(a) { - b() - }) - } - } - }); - a = function(a, b) { - null != this.borderColor && (a.style.borderColor = this.borderColor, a.style.borderStyle = "solid", a.style.borderWidth = "1px"); - a.style.background = "white"; - b && (a.style.pageBreakAfter = "always"); - mxClient.IS_IE ? (d.writeln(a.outerHTML), a.parentNode.removeChild(a)) : (a.parentNode.removeChild(a), d.body.appendChild(a)); - if (b) { - var c = d.createElement("hr"); - c.className = "mxPageBreak"; - d.body.appendChild(c) - } - }; - var s = this.getCoverPages(this.pageFormat.width, this.pageFormat.height); - if (null != s) - for (var r = 0; r < s.length; r++) a(s[r], !0); - for (var t = this.getAppendices(this.pageFormat.width, this.pageFormat.height), r = 0; r < p; r++) - for (var v = r * m / this.scale - this.y0 / this.scale + (f.y - k.y * g) / g, s = 0; s < n; s++) { - if (null == this.wnd) return null; - var w = s * l / this.scale - this.x0 / this.scale + (f.x - k.x * g) / g, - u = r * n + s + 1, - c = this.renderPage(this.pageFormat.width, this.pageFormat.height, mxUtils.bind(this, function(a) { - this.addGraphFragment(-w, -v, this.scale, u, a) - })); - c.setAttribute("id", "mxPage-" + u); - a(c, null != t || r < p - 1 || s < n - 1) - } - if (null != t) - for (r = 0; r < t.length; r++) a(t[r], r < t.length); - d.writeln("\x3c/body\x3e"); - d.writeln("\x3c/html\x3e"); - d.close(); - q(); - mxEvent.release(d.body) - } - this.wnd.focus() - } catch (y) { - null != c && null != c.parentNode && c.parentNode.removeChild(c) - } finally { - this.graph.cellRenderer.initializeOverlay = b - } - return this.wnd -}; -mxPrintPreview.prototype.writeHead = function(a, b) { - null != this.title && a.writeln("\x3ctitle\x3e" + this.title + "\x3c/title\x3e"); - a.writeln('\x3cstyle type\x3d"text/css"\x3e'); - a.writeln("@media print {"); - a.writeln(" table.mxPageSelector { display: none; }"); - a.writeln(" hr.mxPageBreak { display: none; }"); - a.writeln("}"); - a.writeln("@media screen {"); - a.writeln(" table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }"); - a.writeln(" table.mxPageSelector td { border: solid 1px gray; padding:4px; }"); - a.writeln(" body.mxPage { background: gray; }"); - a.writeln("}"); - null != b && a.writeln(b); - a.writeln("\x3c/style\x3e") -}; -mxPrintPreview.prototype.createPageSelector = function(a, b) { - var c = this.wnd.document, - d = c.createElement("table"); - d.className = "mxPageSelector"; - d.setAttribute("border", "0"); - for (var e = c.createElement("tbody"), f = 0; f < a; f++) { - for (var g = c.createElement("tr"), h = 0; h < b; h++) { - var k = f * b + h + 1, - l = c.createElement("td"); - if (!mxClient.IS_NS || mxClient.IS_SF || mxClient.IS_GC) { - var m = c.createElement("a"); - m.setAttribute("href", "#mxPage-" + k); - mxUtils.write(m, k, c); - l.appendChild(m) - } else mxUtils.write(l, k, c); - g.appendChild(l) - } - e.appendChild(g) - } - d.appendChild(e); - return d -}; -mxPrintPreview.prototype.renderPage = function(a, b, c) { - var d = document.createElement("div"); - try { - d.style.width = a + "px"; - d.style.height = b + "px"; - d.style.overflow = "hidden"; - d.style.pageBreakInside = "avoid"; - d.style.position = "relative"; - var e = document.createElement("div"); - e.style.top = this.border + "px"; - e.style.left = this.border + "px"; - e.style.width = a - 2 * this.border + "px"; - e.style.height = b - 2 * this.border + "px"; - e.style.overflow = "hidden"; - this.graph.dialect == mxConstants.DIALECT_VML && (e.style.position = "absolute"); - d.appendChild(e); - document.body.appendChild(d); - c(e) - } catch (f) { - throw d.parentNode.removeChild(d), f; - } - return d -}; -mxPrintPreview.prototype.addGraphFragment = function(a, b, c, d, e) { - d = this.graph.getView(); - var f = this.graph.container; - this.graph.container = e; - var g = d.getCanvas(), - h = d.getBackgroundPane(), - k = d.getDrawPane(), - l = d.getOverlayPane(); - this.graph.dialect == mxConstants.DIALECT_SVG ? d.createSvg() : this.graph.dialect == mxConstants.DIALECT_VML ? d.createVml() : d.createHtml(); - var m = d.isEventsEnabled(); - d.setEventsEnabled(!1); - var n = this.graph.isEnabled(); - this.graph.setEnabled(!1); - var p = d.getTranslate(); - d.translate = new mxPoint(a, - b); - a = null; - try { - var q = [this.graph.getModel().getRoot()]; - a = new mxTemporaryCellStates(d, c, q) - } finally { - if (mxClient.IS_IE) d.overlayPane.innerHTML = ""; - else - for (c = e.firstChild; null != c;) q = c.nextSibling, b = c.nodeName.toLowerCase(), "svg" == b ? (c.setAttribute("width", parseInt(e.style.width)), c.setAttribute("height", parseInt(e.style.height))) : - "default" != c.style.cursor && "table" != b && c.parentNode.removeChild(c), c = q; - d.overlayPane.parentNode.removeChild(d.overlayPane); - this.graph.setEnabled(n); - this.graph.container = f; - d.canvas = - g; - d.backgroundPane = h; - d.drawPane = k; - d.overlayPane = l; - d.translate = p; - a.destroy(); - d.setEventsEnabled(m) - } -}; -mxPrintPreview.prototype.getCoverPages = function() { - return null -}; -mxPrintPreview.prototype.getAppendices = function() { - return null -}; -mxPrintPreview.prototype.print = function() { - var a = this.open(); - null != a && a.print() -}; -mxPrintPreview.prototype.close = function() { - null != this.wnd && (this.wnd.close(), this.wnd = null) -}; - -function mxStylesheet() { - this.styles = {}; - this.putDefaultVertexStyle(this.createDefaultVertexStyle()); - this.putDefaultEdgeStyle(this.createDefaultEdgeStyle()) -} -mxStylesheet.prototype.createDefaultVertexStyle = function() { - var a = {}; - a[mxConstants.STYLE_SHAPE] = mxConstants.SHAPE_RECTANGLE; - a[mxConstants.STYLE_PERIMETER] = mxPerimeter.RectanglePerimeter; - a[mxConstants.STYLE_VERTICAL_ALIGN] = mxConstants.ALIGN_MIDDLE; - a[mxConstants.STYLE_ALIGN] = mxConstants.ALIGN_CENTER; - a[mxConstants.STYLE_FILLCOLOR] = "#C3D9FF"; - a[mxConstants.STYLE_STROKECOLOR] = "#6482B9"; - a[mxConstants.STYLE_FONTCOLOR] = "#774400"; - return a -}; -mxStylesheet.prototype.createDefaultEdgeStyle = function() { - var a = {}; - a[mxConstants.STYLE_SHAPE] = mxConstants.SHAPE_CONNECTOR; - a[mxConstants.STYLE_ENDARROW] = mxConstants.ARROW_CLASSIC; - a[mxConstants.STYLE_VERTICAL_ALIGN] = mxConstants.ALIGN_MIDDLE; - a[mxConstants.STYLE_ALIGN] = mxConstants.ALIGN_CENTER; - a[mxConstants.STYLE_STROKECOLOR] = "#6482B9"; - a[mxConstants.STYLE_FONTCOLOR] = "#446299"; - return a -}; -mxStylesheet.prototype.putDefaultVertexStyle = function(a) { - this.putCellStyle("defaultVertex", a) -}; -mxStylesheet.prototype.putDefaultEdgeStyle = function(a) { - this.putCellStyle("defaultEdge", a) -}; -mxStylesheet.prototype.getDefaultVertexStyle = function() { - return this.styles.defaultVertex -}; -mxStylesheet.prototype.getDefaultEdgeStyle = function() { - return this.styles.defaultEdge -}; -mxStylesheet.prototype.putCellStyle = function(a, b) { - this.styles[a] = b -}; -mxStylesheet.prototype.getCellStyle = function(a, b) { - var c = b; - if (null != a && 0 < a.length) - for (var d = a.split(";"), c = null != c && ";" != a.charAt(0) ? mxUtils.clone(c) : {}, e = 0; e < d.length; e++) { - var f = d[e], - g = f.indexOf("\x3d"); - if (0 <= g) { - var h = f.substring(0, g), - f = f.substring(g + 1); - f == mxConstants.NONE ? delete c[h] : mxUtils.isNumeric(f) ? c[h] = parseFloat(f) : c[h] = f - } else if (f = this.styles[f], null != f) - for (h in f) c[h] = f[h] - } - return c -}; - -function mxCellState(a, b, c) { - this.view = a; - this.cell = b; - this.style = c; - this.origin = new mxPoint; - this.absoluteOffset = new mxPoint -} -mxCellState.prototype = new mxRectangle; -mxCellState.prototype.constructor = mxCellState; -mxCellState.prototype.view = null; -mxCellState.prototype.cell = null; -mxCellState.prototype.style = null; -mxCellState.prototype.invalid = !0; -mxCellState.prototype.invalidOrder = !1; -mxCellState.prototype.orderChanged = !1; -mxCellState.prototype.origin = null; -mxCellState.prototype.absolutePoints = null; -mxCellState.prototype.absoluteOffset = null; -mxCellState.prototype.visibleSourceState = null; -mxCellState.prototype.visibleTargetState = null; -mxCellState.prototype.terminalDistance = 0; -mxCellState.prototype.length = 0; -mxCellState.prototype.segments = null; -mxCellState.prototype.shape = null; -mxCellState.prototype.text = null; -mxCellState.prototype.getPerimeterBounds = function(a, b) { - a = a || 0; - b = null != b ? b : new mxRectangle(this.x, this.y, this.width, this.height); - if (null != this.shape && null != this.shape.stencil) { - var c = this.shape.stencil.computeAspect(this.style, b.x, b.y, b.width, b.height); - b.x = c.x; - b.y = c.y; - b.width = this.shape.stencil.w0 * c.width; - b.height = this.shape.stencil.h0 * c.height - } - 0 != a && b.grow(a); - return b -}; -mxCellState.prototype.setAbsoluteTerminalPoint = function(a, b) { - b ? (null == this.absolutePoints && (this.absolutePoints = []), 0 == this.absolutePoints.length ? this.absolutePoints.push(a) : this.absolutePoints[0] = a) : null == this.absolutePoints ? (this.absolutePoints = [], - this.absolutePoints.push(null), this.absolutePoints.push(a)) : 1 == this.absolutePoints.length ? this.absolutePoints.push(a) : this.absolutePoints[this.absolutePoints.length - 1] = a -}; -mxCellState.prototype.setCursor = function(a) { - null != this.shape && this.shape.setCursor(a); - null != this.text && this.text.setCursor(a) -}; -mxCellState.prototype.getVisibleTerminal = function(a) { - a = this.getVisibleTerminalState(a); - return null != a ? a.cell : null -}; -mxCellState.prototype.getVisibleTerminalState = function(a) { - return a ? this.visibleSourceState : this.visibleTargetState -}; -mxCellState.prototype.setVisibleTerminalState = function(a, b) { - b ? this.visibleSourceState = a : this.visibleTargetState = a -}; -mxCellState.prototype.destroy = function() { - this.view.graph.cellRenderer.destroy(this) -}; -mxCellState.prototype.clone = function() { - var a = new mxCellState(this.view, this.cell, this.style); - if (null != this.absolutePoints) { - a.absolutePoints = []; - for (var b = 0; b < this.absolutePoints.length; b++) a.absolutePoints[b] = this.absolutePoints[b].clone() - } - null != this.origin && (a.origin = this.origin.clone()); - null != this.absoluteOffset && (a.absoluteOffset = this.absoluteOffset.clone()); - null != this.boundingBox && (a.boundingBox = this.boundingBox.clone()); - a.terminalDistance = this.terminalDistance; - a.segments = this.segments; - a.length = - this.length; - a.x = this.x; - a.y = this.y; - a.width = this.width; - a.height = this.height; - return a -}; - -function mxGraphSelectionModel(a) { - this.graph = a; - this.cells = [] -} -mxGraphSelectionModel.prototype = new mxEventSource; -mxGraphSelectionModel.prototype.constructor = mxGraphSelectionModel; -mxGraphSelectionModel.prototype.doneResource = "none" != mxClient.language ? "done" : ""; -mxGraphSelectionModel.prototype.updatingSelectionResource = "none" != mxClient.language ? "updatingSelection" : ""; -mxGraphSelectionModel.prototype.graph = null; -mxGraphSelectionModel.prototype.singleSelection = !1; -mxGraphSelectionModel.prototype.isSingleSelection = function() { - return this.singleSelection -}; -mxGraphSelectionModel.prototype.setSingleSelection = function(a) { - this.singleSelection = a -}; -mxGraphSelectionModel.prototype.isSelected = function(a) { - return null != a ? 0 <= mxUtils.indexOf(this.cells, a) : !1 -}; -mxGraphSelectionModel.prototype.isEmpty = function() { - return 0 == this.cells.length -}; -mxGraphSelectionModel.prototype.clear = function() { - this.changeSelection(null, this.cells) -}; -mxGraphSelectionModel.prototype.setCell = function(a) { - null != a && this.setCells([a]) -}; -mxGraphSelectionModel.prototype.setCells = function(a) { - if (null != a) { - this.singleSelection && (a = [this.getFirstSelectableCell(a)]); - for (var b = [], c = 0; c < a.length; c++) this.graph.isCellSelectable(a[c]) && b.push(a[c]); - this.changeSelection(b, this.cells) - } -}; -mxGraphSelectionModel.prototype.getFirstSelectableCell = function(a) { - if (null != a) - for (var b = 0; b < a.length; b++) - if (this.graph.isCellSelectable(a[b])) return a[b]; - return null -}; -mxGraphSelectionModel.prototype.addCell = function(a) { - null != a && this.addCells([a]) -}; -mxGraphSelectionModel.prototype.addCells = function(a) { - if (null != a) { - var b = null; - this.singleSelection && (b = this.cells, a = [this.getFirstSelectableCell(a)]); - for (var c = [], d = 0; d < a.length; d++) !this.isSelected(a[d]) && this.graph.isCellSelectable(a[d]) && c.push(a[d]); - this.changeSelection(c, b) - } -}; -mxGraphSelectionModel.prototype.removeCell = function(a) { - null != a && this.removeCells([a]) -}; -mxGraphSelectionModel.prototype.removeCells = function(a) { - if (null != a) { - for (var b = [], c = 0; c < a.length; c++) this.isSelected(a[c]) && b.push(a[c]); - this.changeSelection(null, b) - } -}; -mxGraphSelectionModel.prototype.changeSelection = function(a, b) { - if (null != a && 0 < a.length && null != a[0] || null != b && 0 < b.length && null != b[0]) { - var c = new mxSelectionChange(this, a, b); - c.execute(); - var d = new mxUndoableEdit(this, !1); - d.add(c); - this.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", d)) - } -}; -mxGraphSelectionModel.prototype.cellAdded = function(a) { - null != a && !this.isSelected(a) && this.cells.push(a) -}; -mxGraphSelectionModel.prototype.cellRemoved = function(a) { - null != a && (a = mxUtils.indexOf(this.cells, a), 0 <= a && this.cells.splice(a, 1)) -}; - -function mxSelectionChange(a, b, c) { - this.selectionModel = a; - this.added = null != b ? b.slice() : null; - this.removed = null != c ? c.slice() : null -} -mxSelectionChange.prototype.execute = function() { - var a = mxLog.enter("mxSelectionChange.execute"); - window.status = mxResources.get(this.selectionModel.updatingSelectionResource) || this.selectionModel.updatingSelectionResource; - if (null != this.removed) - for (var b = 0; b < this.removed.length; b++) this.selectionModel.cellRemoved(this.removed[b]); - if (null != this.added) - for (b = 0; b < this.added.length; b++) this.selectionModel.cellAdded(this.added[b]); - b = this.added; - this.added = this.removed; - this.removed = b; - window.status = mxResources.get(this.selectionModel.doneResource) || - this.selectionModel.doneResource; - mxLog.leave("mxSelectionChange.execute", a); - this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE, "added", this.added, "removed", this.removed)) -}; - -function mxCellEditor(a) { - this.graph = a -} -mxCellEditor.prototype.graph = null; -mxCellEditor.prototype.textarea = null; -mxCellEditor.prototype.editingCell = null; -mxCellEditor.prototype.trigger = null; -mxCellEditor.prototype.modified = !1; -mxCellEditor.prototype.autoSize = !0; -mxCellEditor.prototype.emptyLabelText = ""; -mxCellEditor.prototype.textNode = ""; -mxCellEditor.prototype.init = function() { - this.textarea = document.createElement("textarea"); - this.textarea.className = "mxCellEditor"; - this.textarea.style.position = "absolute"; - this.textarea.style.overflow = "visible"; - this.textarea.setAttribute("cols", "20"); - this.textarea.setAttribute("rows", "4"); - mxClient.IS_NS && (this.textarea.style.resize = "none"); - mxEvent.addListener(this.textarea, "blur", mxUtils.bind(this, function(a) { - this.focusLost() - })); - mxEvent.addListener(this.textarea, "keydown", mxUtils.bind(this, function(a) { - mxEvent.isConsumed(a) || - (113 == a.keyCode || this.graph.isEnterStopsCellEditing() && 13 == a.keyCode && !mxEvent.isControlDown(a) && !mxEvent.isShiftDown(a) ? (this.graph.stopEditing(!1), mxEvent.consume(a)) : - 27 == a.keyCode ? (this.graph.stopEditing(!0), mxEvent.consume(a)) : (this.clearOnChange && (this.clearOnChange = !1, this.textarea.value = ""), this.setModified(!0))) - })); - mxEvent.addListener(this.textarea, "keypress", mxUtils.bind(this, function(a) { - this.autoSize && !mxEvent.isConsumed(a) && setTimeout(mxUtils.bind(this, function() { - this.resize() - }), 0) - })) -}; -mxCellEditor.prototype.resize = function() { - if (null != this.textDiv) { - var a = this.graph.getView().getState(this.editingCell), - b = this.graph.isLabelClipped(a.cell), - c = this.graph.isWrapping(a.cell); - if (this.graph.getModel().isEdge(a.cell)) this.bounds.x = a.absoluteOffset.x, this.bounds.y = a.absoluteOffset.y, this.bounds.width = 0, this.bounds.height = 0; - else if (null != this.bounds) { - this.bounds.x = a.x; - this.bounds.y = a.y; - this.bounds.width = a.width; - this.bounds.height = a.height; - var d = mxUtils.getValue(a.style, mxConstants.STYLE_LABEL_POSITION, - mxConstants.ALIGN_CENTER); - d == mxConstants.ALIGN_LEFT ? this.bounds.x -= a.width : d == mxConstants.ALIGN_RIGHT && (this.bounds.x += a.width); - d = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE); - d == mxConstants.ALIGN_TOP ? this.bounds.y -= a.height : d == mxConstants.ALIGN_BOTTOM && (this.bounds.y += a.height) - } - d = this.textarea.value; - if ("\n" == d.charAt(d.length - 1) || "" == d) d += "\x26nbsp;"; - d = mxUtils.htmlEntities(d, !1); - c ? (this.textDiv.style.whiteSpace = "normal", this.textDiv.style.width = this.bounds.width + - "px") : d = d.replace(/ /g, "\x26nbsp;"); - d = d.replace(/\n/g, "\x3cbr/\x3e"); - this.textDiv.innerHTML = d; - var d = this.textDiv.offsetWidth + 30, - e = this.textDiv.offsetHeight + 16, - d = Math.max(d, 40), - e = Math.max(e, 20); - b && (d = Math.min(this.bounds.width - 4, d), e = Math.min(this.bounds.height, e)); - var f = null != a.text ? a.text.margin : null; - null == f && (f = mxUtils.getValue(a.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER), a = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE), f = - mxUtils.getAlignmentAsPoint(f, - a)); - if (null != f) { - if (b || !c) this.textarea.style.left = Math.max(0, Math.round(this.bounds.x - f.x * this.bounds.width + f.x * d) - 3) + "px"; - this.textarea.style.top = Math.max(0, Math.round(this.bounds.y - f.y * this.bounds.height + f.y * e) + 4) + "px" - } - if (b || !c) this.textarea.style.width = d + "px"; - this.textarea.style.height = e + "px" - } -}; -mxCellEditor.prototype.isModified = function() { - return this.modified -}; -mxCellEditor.prototype.setModified = function(a) { - this.modified = a -}; -mxCellEditor.prototype.focusLost = function() { - this.stopEditing(!this.graph.isInvokesStopCellEditing()) -}; -mxCellEditor.prototype.startEditing = function(a, b) { - null == this.textarea && this.init(); - this.stopEditing(!0); - var c = this.graph.getView().getState(a); - if (null != c) { - this.editingCell = a; - this.trigger = b; - this.textNode = null; - null != c.text && this.isHideLabel(c) && (this.textNode = c.text.node, this.textNode.style.visibility = "hidden"); - var d = this.graph.getView().scale, - d = mxUtils.getValue(c.style, mxConstants.STYLE_FONTSIZE, mxConstants.DEFAULT_FONTSIZE) * d, - e = mxUtils.getValue(c.style, mxConstants.STYLE_FONTFAMILY, mxConstants.DEFAULT_FONTFAMILY), - f = mxUtils.getValue(c.style, mxConstants.STYLE_FONTCOLOR, "black"), - g = mxUtils.getValue(c.style, mxConstants.STYLE_ALIGN, mxConstants.ALIGN_LEFT), - h = (mxUtils.getValue(c.style, mxConstants.STYLE_FONTSTYLE, 0) & mxConstants.FONT_BOLD) == mxConstants.FONT_BOLD, - k = (mxUtils.getValue(c.style, mxConstants.STYLE_FONTSTYLE, 0) & mxConstants.FONT_ITALIC) == mxConstants.FONT_ITALIC, - l = (mxUtils.getValue(c.style, mxConstants.STYLE_FONTSTYLE, 0) & mxConstants.FONT_UNDERLINE) == mxConstants.FONT_UNDERLINE; - this.textarea.style.fontSize = Math.round(d) + - "px"; - this.textarea.style.lineHeight = Math.round(d * mxConstants.LINE_HEIGHT) + "px"; - this.textarea.style.fontFamily = e; - this.textarea.style.textAlign = g; - this.textarea.style.color = f; - this.textarea.style.fontWeight = h ? "bold" : "normal"; - this.textarea.style.fontStyle = k ? "italic" : ""; - this.textarea.style.textDecoration = l ? "underline" : ""; - this.textarea.style.overflow = "auto"; - this.textarea.style.outline = "none"; - this.bounds = d = this.getEditorBounds(c); - this.textarea.style.left = d.x + "px"; - this.textarea.style.top = d.y + "px"; - this.textarea.style.width = - d.width + "px"; - this.textarea.style.height = d.height + "px"; - this.textarea.style.zIndex = 5; - c = this.getInitialValue(c, b); - null == c || 0 == c.length ? (c = this.getEmptyLabelText(), this.clearOnChange = !0) : this.clearOnChange = !1; - this.setModified(!1); - this.textarea.value = c; - this.graph.container.appendChild(this.textarea); - "none" != this.textarea.style.display && (this.autoSize && (this.textDiv = this.createTextDiv(), document.body.appendChild(this.textDiv), this.resize()), this.textarea.focus(), this.textarea.select()) - } -}; -mxCellEditor.prototype.createTextDiv = function() { - var a = document.createElement("div"), - b = a.style; - b.position = "absolute"; - b.whiteSpace = "nowrap"; - b.visibility = "hidden"; - b.display = mxClient.IS_QUIRKS ? "inline" : "inline-block"; - b.zoom = "1"; - b.verticalAlign = "top"; - b.lineHeight = this.textarea.style.lineHeight; - b.fontSize = this.textarea.style.fontSize; - b.fontFamily = this.textarea.style.fontFamily; - b.fontWeight = this.textarea.style.fontWeight; - b.textAlign = this.textarea.style.textAlign; - b.fontStyle = this.textarea.style.fontStyle; - b.textDecoration = this.textarea.style.textDecoration; - return a -}; -mxCellEditor.prototype.stopEditing = function(a) { - null != this.editingCell && (null != this.textNode && (this.textNode.style.visibility = "visible", this.textNode = null), !a && this.isModified() && this.graph.labelChanged(this.editingCell, this - .getCurrentValue(), this.trigger), null != this.textDiv && (document.body.removeChild(this.textDiv), this.textDiv = null), this.bounds = this.trigger = this.editingCell = null, this.textarea - .blur(), this.textarea.parentNode.removeChild(this.textarea)) -}; -mxCellEditor.prototype.getInitialValue = function(a, b) { - return this.graph.getEditingValue(a.cell, b) -}; -mxCellEditor.prototype.getCurrentValue = function() { - return this.textarea.value.replace(/\r/g, "") -}; -mxCellEditor.prototype.isHideLabel = function(a) { - return !0 -}; -mxCellEditor.prototype.getMinimumSize = function(a) { - var b = this.graph.getView().scale; - return new mxRectangle(0, 0, null == a.text ? 30 : a.text.size * b + 20, "left" == this.textarea.style.textAlign ? 120 : 40) -}; -mxCellEditor.prototype.getEditorBounds = function(a) { - var b = this.graph.getModel().isEdge(a.cell), - c = this.graph.getView().scale, - d = this.getMinimumSize(a), - e = d.width, - d = d.height, - f = parseInt(a.style[mxConstants.STYLE_SPACING] || 2) * c, - g = parseInt(a.style[mxConstants.STYLE_SPACING_TOP] || 0) * c + f, - h = parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT] || 0) * c + f, - k = parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM] || 0) * c + f, - c = parseInt(a.style[mxConstants.STYLE_SPACING_LEFT] || 0) * c + f, - h = new mxRectangle(a.x, a.y, Math.max(e, a.width - - c - h), Math.max(d, a.height - g - k)); - b ? (h.x = a.absoluteOffset.x, h.y = a.absoluteOffset.y, null != a.text && null != a.text.boundingBox && (0 < a.text.boundingBox.x && (h.x = a.text.boundingBox.x), 0 < a.text.boundingBox.y && (h.y = - a.text.boundingBox.y))) : null != a.text && null != a.text.boundingBox && (h.x = Math.min(h.x, a.text.boundingBox.x), h.y = Math.min(h.y, a.text.boundingBox.y)); - h.x += c; - h.y += g; - null != a.text && null != a.text.boundingBox && (b ? (h.width = Math.max(e, a.text.boundingBox.width), h.height = Math.max(d, a.text.boundingBox.height)) : (h.width = - Math.max(h.width, a.text.boundingBox.width), h.height = Math.max(h.height, a.text.boundingBox.height))); - this.graph.getModel().isVertex(a.cell) && (b = mxUtils.getValue(a.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER), b == mxConstants.ALIGN_LEFT ? h.x -= a.width : b == - mxConstants.ALIGN_RIGHT && (h.x += a.width), b = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE), b == mxConstants.ALIGN_TOP ? h.y -= a.height : - b == mxConstants.ALIGN_BOTTOM && (h.y += a.height)); - return h -}; -mxCellEditor.prototype.getEmptyLabelText = function(a) { - return this.emptyLabelText -}; -mxCellEditor.prototype.getEditingCell = function() { - return this.editingCell -}; -mxCellEditor.prototype.destroy = function() { - null != this.textarea && (mxEvent.release(this.textarea), null != this.textarea.parentNode && this.textarea.parentNode.removeChild(this.textarea), this.textarea = null) -}; - -function mxCellRenderer() {} -mxCellRenderer.prototype.defaultEdgeShape = mxConnector; -mxCellRenderer.prototype.defaultVertexShape = mxRectangleShape; -mxCellRenderer.prototype.defaultTextShape = mxText; -mxCellRenderer.prototype.legacyControlPosition = !0; -mxCellRenderer.prototype.defaultShapes = {}; -mxCellRenderer.registerShape = function(a, b) { - mxCellRenderer.prototype.defaultShapes[a] = b -}; -mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE, mxRectangleShape); -mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE, mxEllipse); -mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS, mxRhombus); -mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER, mxCylinder); -mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR, mxConnector); -mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR, mxActor); -mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE, mxTriangle); -mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON, mxHexagon); -mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD, mxCloud); -mxCellRenderer.registerShape(mxConstants.SHAPE_LINE, mxLine); -mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW, mxArrow); -mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE, mxDoubleEllipse); -mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE, mxSwimlane); -mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE, mxImageShape); -mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL, mxLabel); -mxCellRenderer.prototype.initialize = function(a, b) { - var c = a.view.graph.getModel(); - if (null != a.view.graph.container && null == a.shape && a.cell != a.view.currentRoot && (c.isVertex(a.cell) || c.isEdge(a.cell))) - if (this.createShape(a), null != a.shape && (null == b || b)) this.initializeShape(a), a.view.graph.ordered || c.isEdge(a.cell) ? a.invalidOrder = !0 : a.view.graph.keepEdgesInForeground && - null != this.firstEdge && (this.firstEdge.parentNode == a.shape.node.parentNode ? this.insertState(a, this.firstEdge) : this.firstEdge = null), a.shape.scale = - a.view.scale, this.createCellOverlays(a), this.installListeners(a) -}; -mxCellRenderer.prototype.initializeShape = function(a) { - a.shape.init(a.view.getDrawPane()) -}; -mxCellRenderer.prototype.getPreviousStateInContainer = function(a, b) { - for (var c = null, d = a.view.graph, e = d.getModel(), f = a.cell, g = e.getParent(f); null != g && null == c;) c = this.findPreviousStateInContainer(d, g, f, b), f = g, g = e.getParent(f); - return c -}; -mxCellRenderer.prototype.findPreviousStateInContainer = function(a, b, c, d) { - var e = null, - f = a.getModel(); - for (c = null != c ? b.getIndex(c) - 1 : f.getChildCount(b) - 1; 0 <= c && null == e; c--) e = this.findPreviousStateInContainer(a, f.getChildAt(b, c), null, d); - if (null == e && (e = a.view.getState(b), null != e && (null == e.shape || null == e.shape.node || e.shape.node.parentNode != d))) e = null; - return e -}; -mxCellRenderer.prototype.order = function(a) { - var b = a.shape.node.parentNode, - c = this.getPreviousStateInContainer(a, b), - d = b.firstChild; - null != c && (d = c.shape.node, null != c.text && (null != c.text.node && c.text.node.parentNode == b) && (d = c.text.node), d = d.nextSibling); - this.insertState(a, d) -}; -mxCellRenderer.prototype.orderEdge = function(a) { - var b = a.view, - c = b.graph.getModel(); - if (b.graph.keepEdgesInForeground) { - if (null == this.firstEdge || null == this.firstEdge.parentNode || this.firstEdge.parentNode != a.shape.node.parentNode) this.firstEdge = a.shape.node - } else if (b.graph.keepEdgesInBackground) { - var d = a.shape.node, - e = d.parentNode, - c = c.getParent(a.cell), - b = b.getState(c), - e = null != b && null != b.shape && null != b.shape.node ? b.shape.node.nextSibling : e.firstChild; - null != e && e != d && this.insertState(a, e) - } -}; -mxCellRenderer.prototype.insertState = function(a, b) { - a.shape.node.parentNode.insertBefore(a.shape.node, b); - null != a.text && (null != a.text.node && a.text.node.parentNode == a.shape.node.parentNode) && a.shape.node.parentNode.insertBefore(a.text.node, a.shape.node.nextSibling) -}; -mxCellRenderer.prototype.createShape = function(a) { - if (null != a.style) { - var b = mxStencilRegistry.getStencil(a.style[mxConstants.STYLE_SHAPE]); - null != b ? a.shape = new mxShape(b) : (b = this.getShapeConstructor(a), a.shape = new b); - a.shape.points = a.absolutePoints; - a.shape.bounds = new mxRectangle(a.x, a.y, a.width, a.height); - a.shape.dialect = a.view.graph.dialect; - this.configureShape(a) - } -}; -mxCellRenderer.prototype.getShape = function(a) { - return null != a ? mxCellRenderer.prototype.defaultShapes[a] : null -}; -mxCellRenderer.prototype.getShapeConstructor = function(a) { - var b = this.getShape(a.style[mxConstants.STYLE_SHAPE]); - null == b && (b = a.view.graph.getModel().isEdge(a.cell) ? this.defaultEdgeShape : this.defaultVertexShape); - return b -}; -mxCellRenderer.prototype.configureShape = function(a) { - a.shape.apply(a); - a.shape.image = a.view.graph.getImage(a); - a.shape.indicatorShape = this.getShape(a.view.graph.getIndicatorShape(a)); - a.shape.indicatorColor = a.view.graph.getIndicatorColor(a); - a.shape.indicatorGradientColor = a.view.graph.getIndicatorGradientColor(a); - a.shape.indicatorDirection = a.style[mxConstants.STYLE_INDICATOR_DIRECTION]; - a.shape.indicatorImage = a.view.graph.getIndicatorImage(a); - this.postConfigureShape(a) -}; -mxCellRenderer.prototype.postConfigureShape = function(a) { - null != a.shape && (this.resolveColor(a, "indicatorColor", mxConstants.STYLE_FILLCOLOR), this.resolveColor(a, "indicatorGradientColor", mxConstants.STYLE_GRADIENTCOLOR), this.resolveColor(a, - "fill", mxConstants.STYLE_FILLCOLOR), this.resolveColor(a, "stroke", mxConstants.STYLE_STROKECOLOR), this.resolveColor(a, "gradient", mxConstants.STYLE_GRADIENTCOLOR)) -}; -mxCellRenderer.prototype.resolveColor = function(a, b, c) { - var d = a.shape[b], - e = a.view.graph, - f = null; - "inherit" == d ? f = e.model.getParent(a.cell) : "swimlane" == d ? (f = null != e.model.getTerminal(a.cell, !1) ? e.model.getTerminal(a.cell, !1) : a.cell, f = e.getSwimlane(f), c = e.swimlaneIndicatorColorAttribute) : - "indicated" == d && (a.shape[b] = a.shape.indicatorColor); - null != f && (d = e.getView().getState(f), a.shape[b] = null, null != d && (a.shape[b] = null != d.shape && "indicatorColor" != b ? d.shape[b] : d.style[c])) -}; -mxCellRenderer.prototype.getLabelValue = function(a) { - return a.view.graph.getLabel(a.cell) -}; -mxCellRenderer.prototype.createLabel = function(a, b) { - var c = a.view.graph; - c.getModel().isEdge(a.cell); - if (0 < a.style[mxConstants.STYLE_FONTSIZE] || null == a.style[mxConstants.STYLE_FONTSIZE]) { - var d = c.isHtmlLabel(a.cell) || null != b && mxUtils.isNode(b); - a.text = new this.defaultTextShape(b, new mxRectangle, a.style[mxConstants.STYLE_ALIGN] || mxConstants.ALIGN_CENTER, c.getVerticalAlign(a), a.style[mxConstants.STYLE_FONTCOLOR], a.style[ - mxConstants.STYLE_FONTFAMILY], a.style[mxConstants.STYLE_FONTSIZE], a.style[mxConstants.STYLE_FONTSTYLE], - a.style[mxConstants.STYLE_SPACING], a.style[mxConstants.STYLE_SPACING_TOP], a.style[mxConstants.STYLE_SPACING_RIGHT], a.style[mxConstants.STYLE_SPACING_BOTTOM], a.style[mxConstants.STYLE_SPACING_LEFT], - a.style[mxConstants.STYLE_HORIZONTAL], a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR], a.style[mxConstants.STYLE_LABEL_BORDERCOLOR], c.isWrapping(a.cell) && c.isHtmlLabel(a.cell), c.isLabelClipped( - a.cell), a.style[mxConstants.STYLE_OVERFLOW], a.style[mxConstants.STYLE_LABEL_PADDING]); - a.text.opacity = mxUtils.getValue(a.style, - mxConstants.STYLE_TEXT_OPACITY, 100); - a.text.dialect = d ? mxConstants.DIALECT_STRICTHTML : a.view.graph.dialect; - a.text.state = a; - this.initializeLabel(a); - var e = !1, - f = function(b) { - var d = a; - if (mxClient.IS_TOUCH || e) d = mxEvent.getClientX(b), b = mxEvent.getClientY(b), b = mxUtils.convertPoint(c.container, d, b), d = c.view.getState(c.getCellAt(b.x, b.y)); - return d - }; - mxEvent.addGestureListeners(a.text.node, mxUtils.bind(this, function(b) { - this.isLabelEvent(a, b) && (c.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(b, a)), e = c.dialect != - mxConstants.DIALECT_SVG && "IMG" == mxEvent.getSource(b).nodeName) - }), mxUtils.bind(this, function(b) { - this.isLabelEvent(a, b) && c.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(b, f(b))) - }), mxUtils.bind(this, function(b) { - this.isLabelEvent(a, b) && (c.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(b, f(b))), e = !1) - })); - mxEvent.addListener(a.text.node, "dblclick", mxUtils.bind(this, function(b) { - this.isLabelEvent(a, b) && (c.dblClick(b, a.cell), mxEvent.consume(b)) - })) - } -}; -mxCellRenderer.prototype.initializeLabel = function(a) { - var b = a.view.graph; - a.text.dialect != mxConstants.DIALECT_SVG && (mxClient.IS_SVG && mxClient.NO_FO ? a.text.init(b.container) : mxUtils.isVml(a.view.getDrawPane()) && (null != a.shape.label ? a.text.init(a.shape.label) : - a.text.init(a.shape.node))); - null == a.text.node && (a.text.init(a.view.getDrawPane()), null != a.shape && null != a.text && a.shape.node.parentNode.insertBefore(a.text.node, a.shape.node.nextSibling)) -}; -mxCellRenderer.prototype.createCellOverlays = function(a) { - var b = a.view.graph.getCellOverlays(a.cell), - c = null; - if (null != b) - for (var c = new mxDictionary, d = 0; d < b.length; d++) { - var e = null != a.overlays ? a.overlays.remove(b[d]) : null; - null == e && (e = new mxImageShape(new mxRectangle, b[d].image.src), e.dialect = a.view.graph.dialect, e.preserveImageAspect = !1, e.overlay = b[d], this.initializeOverlay(a, e), this.installCellOverlayListeners( - a, b[d], e), null != b[d].cursor && (e.node.style.cursor = b[d].cursor)); - c.put(b[d], e) - } - null != a.overlays && - a.overlays.visit(function(a, b) { - b.destroy() - }); - a.overlays = c -}; -mxCellRenderer.prototype.initializeOverlay = function(a, b) { - b.init(a.view.getOverlayPane()) -}; -mxCellRenderer.prototype.installCellOverlayListeners = function(a, b, c) { - var d = a.view.graph; - mxEvent.addListener(c.node, "click", function(c) { - d.isEditing() && d.stopEditing(!d.isInvokesStopCellEditing()); - b.fireEvent(new mxEventObject(mxEvent.CLICK, "event", c, "cell", a.cell)) - }); - mxEvent.addGestureListeners(c.node, function(a) { - mxEvent.consume(a) - }, function(b) { - d.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(b, a)) - }); - mxClient.IS_TOUCH && mxEvent.addListener(c.node, "touchend", function(c) { - b.fireEvent(new mxEventObject(mxEvent.CLICK, - "event", c, "cell", a.cell)) - }) -}; -mxCellRenderer.prototype.createControl = function(a) { - var b = a.view.graph, - c = b.getFoldingImage(a); - if (b.foldingEnabled && null != c) { - if (null == a.control) { - var d = new mxRectangle(0, 0, c.width, c.height); - a.control = new mxImageShape(d, c.src); - a.control.preserveImageAspect = !1; - a.control.dialect = b.dialect; - this.initControl(a, a.control, !0, function(c) { - if (b.isEnabled()) { - var d = !b.isCellCollapsed(a.cell); - b.foldCells(d, !1, [a.cell]); - mxEvent.consume(c) - } - }) - } - } else null != a.control && (a.control.destroy(), a.control = null) -}; -mxCellRenderer.prototype.initControl = function(a, b, c, d) { - var e = a.view.graph; - e.isHtmlLabel(a.cell) && mxClient.NO_FO && e.dialect == mxConstants.DIALECT_SVG ? (b.dialect = mxConstants.DIALECT_PREFERHTML, b.init(e.container), b.node.style.zIndex = 1) : b.init(a.view.getOverlayPane()); - b = b.innerNode || b.node; - d && (e.isEnabled() && (b.style.cursor = "pointer"), mxEvent.addListener(b, "click", d)); - c && mxEvent.addGestureListeners(b, function(b) { - e.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(b, a)); - mxEvent.consume(b) - }, function(b) { - e.fireMouseEvent(mxEvent.MOUSE_MOVE, - new mxMouseEvent(b, a)) - }); - return b -}; -mxCellRenderer.prototype.isShapeEvent = function(a, b) { - return !0 -}; -mxCellRenderer.prototype.isLabelEvent = function(a, b) { - return !0 -}; -mxCellRenderer.prototype.installListeners = function(a) { - var b = a.view.graph, - c = function(c) { - var d = a; - if (b.dialect != mxConstants.DIALECT_SVG && "IMG" == mxEvent.getSource(c).nodeName || mxClient.IS_TOUCH) d = mxEvent.getClientX(c), c = mxEvent.getClientY(c), c = mxUtils.convertPoint(b.container, - d, c), d = b.view.getState(b.getCellAt(c.x, c.y)); - return d - }, - d = !1; - mxEvent.addListener(a.shape.node, "gesturestart", mxUtils.bind(this, function(a) { - b.lastTouchTime = 0; - d = !0; - mxEvent.consume(a) - })); - mxEvent.addGestureListeners(a.shape.node, mxUtils.bind(this, - function(c) { - this.isShapeEvent(a, c) && !d ? b.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(c, null != a.shape && mxEvent.getSource(c) == a.shape.content ? null : a)) : d && mxEvent.consume(c) - }), mxUtils.bind(this, function(e) { - this.isShapeEvent(a, e) && !d ? b.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(e, null != a.shape && mxEvent.getSource(e) == a.shape.content ? null : c(e))) : d && mxEvent.consume( - e) - }), mxUtils.bind(this, function(e) { - this.isShapeEvent(a, e) && !d ? b.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(e, null != a.shape && - mxEvent.getSource(e) == a.shape.content ? null : c(e))) : d && mxEvent.consume(e) - })); - var e = mxClient.IS_TOUCH ? "gestureend" : "dblclick"; - mxEvent.addListener(a.shape.node, e, mxUtils.bind(this, function(c) { - d = !1; - "gestureend" == e ? (b.lastTouchTime = 0, b.gestureEnabled && (b.handleGesture(a, c), mxEvent.consume(c))) : this.isShapeEvent(a, c) && (b.dblClick(c, null != a.shape && mxEvent.getSource( - c) == a.shape.content ? null : a.cell), mxEvent.consume(c)) - })) -}; -mxCellRenderer.prototype.redrawLabel = function(a, b) { - var c = this.getLabelValue(a); - if (null == a.text && null != c && (mxUtils.isNode(c) || 0 < c.length)) this.createLabel(a, c); - else if (null != a.text && (null == c || 0 == c.length)) a.text.destroy(), a.text = null; - if (null != a.text) { - var d = a.view.graph, - e = d.isWrapping(a.cell), - d = d.isLabelClipped(a.cell), - f = this.getLabelBounds(a); - if (b || a.text.value != c || a.text.isWrapping != e || a.text.isClipping != d || a.text.scale != a.view.scale || !a.text.bounds.equals(f)) a.text.value = c, a.text.bounds = f, a.text.scale = - this.getTextScale(a), a.text.isWrapping = e, a.text.isClipping = d, a.text.redraw() - } -}; -mxCellRenderer.prototype.getTextScale = function(a) { - return a.view.scale -}; -mxCellRenderer.prototype.getLabelBounds = function(a) { - var b = a.view.graph, - c = a.view.scale, - d = b.getModel().isEdge(a.cell), - e = new mxRectangle(a.absoluteOffset.x, a.absoluteOffset.y); - a.text.updateMargin(); - d ? (d = a.text.getSpacing(), e.x += d.x * c, e.y += d.y * c, b = b.getCellGeometry(a.cell), null != b && (e.width = Math.max(0, a.text.margin.x * b.width * c - a.text.spacingLeft * c - a.text.spacingRight * - c), e.height = Math.max(0, a.text.margin.y * b.height * c - a.text.spacingTop * c - a.text.spacingBottom * c))) : (a.text.isPaintBoundsInverted() && (d = e.x, - e.x = e.y, e.y = d), e.x += a.x, e.y += a.y, e.width = Math.max(1, a.width), e.height = Math.max(1, a.height), b.isSwimlane(a.cell) && (b = b.getStartSize(a.cell), 0 < b.width ? (d = Math.min( - e.width, b.width * c), a.shape.flipH && (e.x += e.width - d), e.width = d) : 0 < b.height && (d = Math.min(e.height, b.height * c), a.shape.flipV && (e.y += e.height - d), e.height = d)), - this.rotateLabelBounds(a, e)); - return e -}; -mxCellRenderer.prototype.rotateLabelBounds = function(a, b) { - if (a.text.isPaintBoundsInverted()) { - var c = (a.width - a.height) / 2; - b.x += c; - b.y -= c; - c = b.width; - b.width = b.height; - b.height = c - } - b.x -= a.text.margin.x * b.width; - b.y -= a.text.margin.y * b.height; - if ("fill" != a.style[mxConstants.STYLE_OVERFLOW]) { - var c = a.view.scale, - d = a.text.getSpacing(); - b.x += d.x * c; - b.y += d.y * c; - b.width = Math.max(0, b.width - a.text.spacingLeft * c - a.text.spacingRight * c); - b.height = Math.max(0, b.height - a.text.spacingTop * c - a.text.spacingBottom * c) - } - var e = a.text.getTextRotation(); - if (0 != e && (null != a && a.view.graph.model.isVertex(a.cell)) && (c = a.getCenterX(), d = a.getCenterY(), b.x != c || b.y != d)) e *= Math.PI / 180, pt = mxUtils.getRotatedPoint(new mxPoint(b.x, - b.y), Math.cos(e), Math.sin(e), new mxPoint(c, d)), b.x = pt.x, b.y = pt.y -}; -mxCellRenderer.prototype.redrawCellOverlays = function(a, b) { - this.createCellOverlays(a); - if (null != a.overlays) { - var c = mxUtils.mod(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0), 90), - d = mxUtils.toRadians(c), - e = Math.cos(d), - f = Math.sin(d); - a.overlays.visit(function(d, h) { - var k = h.overlay.getBounds(a); - if (!a.view.graph.getModel().isEdge(a.cell) && null != a.shape && 0 != c) { - var l = k.getCenterX(), - m = k.getCenterY(), - m = mxUtils.getRotatedPoint(new mxPoint(l, m), e, f, new mxPoint(a.getCenterX(), a.getCenterY())), - l = m.x, - m = m.y; - k.x = - Math.round(l - k.width / 2); - k.y = Math.round(m - k.height / 2) - } - if (b || null == h.bounds || h.scale != a.view.scale || !h.bounds.equals(k)) h.bounds = k, h.scale = a.view.scale, h.redraw() - }) - } -}; -mxCellRenderer.prototype.redrawControl = function(a, b) { - if (null != a.control) { - var c = this.getControlBounds(a), - d = this.legacyControlPosition ? mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0) : a.shape.getTextRotation(), - e = a.view.scale; - if (b || a.control.scale != e || !a.control.bounds.equals(c) || a.control.rotation != d) a.control.rotation = d, a.control.bounds = c, a.control.scale = e, a.control.redraw() - } -}; -mxCellRenderer.prototype.getControlBounds = function(a) { - if (null != a.control) { - var b = a.control.scale, - c = a.control.bounds.width / b, - b = a.control.bounds.height / b, - d = a.view.scale, - e = a.getCenterX(), - f = a.getCenterY(); - if (!a.view.graph.getModel().isEdge(a.cell) && (e = a.x + c * d, f = a.y + b * d, null != a.shape)) { - var g = a.shape.getShapeRotation(); - if (this.legacyControlPosition) g = mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0); - else if (a.shape.isPaintBoundsInverted()) var h = (a.width - a.height) / 2, - e = e + h, - f = f - h; - 0 != g && (h = mxUtils.toRadians(g), - g = Math.cos(h), h = Math.sin(h), f = mxUtils.getRotatedPoint(new mxPoint(e, f), g, h, new mxPoint(a.getCenterX(), a.getCenterY())), e = f.x, f = f.y) - } - return a.view.graph.getModel().isEdge(a.cell), new mxRectangle(Math.round(e - c / 2 * d), Math.round(f - b / 2 * d), Math.round(c * d), Math.round(b * d)) - } - return null -}; -mxCellRenderer.prototype.redraw = function(a, b, c) { - if (null != a.shape) { - var d = !1; - a.view.graph.getModel().isEdge(a.cell); - reconfigure = null != b ? b : !1; - this.createControl(a); - if (a.orderChanged || a.invalidOrder) a.view.graph.ordered ? this.order(a) : this.orderEdge(a); - if (a.orderChanged || !mxUtils.equalEntries(a.shape.style, a.style)) this.configureShape(a), b = !0; - delete a.invalidOrder; - delete a.orderChanged; - if (b || null == a.shape.bounds || a.shape.scale != a.view.scale || !a.shape.bounds.equals(a) || !mxUtils.equalPoints(a.shape.points, - a.absolutePoints)) d = !0, a.shape.points = null != a.absolutePoints ? a.absolutePoints.slice() : null, a.shape.bounds = new mxRectangle(a.x, a.y, a.width, a.height), a.shape.scale = a.view - .scale, null == c || c ? a.shape.redraw() : a.shape.updateBoundingBox(); - if (null == c || c) this.redrawLabel(a, d), this.redrawCellOverlays(a, d), this.redrawControl(a, d) - } -}; -mxCellRenderer.prototype.destroy = function(a) { - null != a.shape && (null != a.text && (a.text.destroy(), a.text = null), null != a.overlays && (a.overlays.visit(function(a, c) { - c.destroy() - }), a.overlays = null), null != a.control && (a.control.destroy(), a.control = null), a.shape.destroy(), a.shape = null) -}; -var mxEdgeStyle = { - EntityRelation: function(a, b, c, d, e) { - var f = a.view, - g = f.graph; - d = mxUtils.getValue(a.style, mxConstants.STYLE_SEGMENT, mxConstants.ENTITY_SEGMENT) * f.scale; - var h = a.absolutePoints, - k = h[0], - l = h[h.length - 1], - h = !1; - if (null != k) b = new mxCellState, b.x = k.x, b.y = k.y; - else if (null != b) { - var m = mxUtils.getPortConstraints(b, a, !0, mxConstants.DIRECTION_MASK_NONE); - m != mxConstants.DIRECTION_MASK_NONE ? h = m == mxConstants.DIRECTION_MASK_WEST : (k = g.getCellGeometry(b.cell), k.relative ? h = 0.5 >= k.x : null != c && (h = c.x + c.width < b.x)) - } else return; - k = !0; - null != l ? (c = new mxCellState, c.x = l.x, c.y = l.y) : null != c && (m = mxUtils.getPortConstraints(c, a, !1, mxConstants.DIRECTION_MASK_NONE), m != mxConstants.DIRECTION_MASK_NONE ? k = m == - mxConstants.DIRECTION_MASK_WEST : (a = g.getCellGeometry(c.cell), a.relative ? k = 0.5 >= a.x : null != b && (k = b.x + b.width < c.x))); - null != b && null != c && (a = h ? b.x : b.x + b.width, b = f.getRoutingCenterY(b), g = k ? c.x : c.x + c.width, c = f.getRoutingCenterY(c), f = new mxPoint(a + (h ? -d : d), b), l = new mxPoint( - g + (k ? -d : d), c), h == k ? (d = h ? Math.min(a, g) - d : Math.max(a, g) + d, e.push(new mxPoint(d, - b)), e.push(new mxPoint(d, c))) : (f.x < l.x == h ? (d = b + (c - b) / 2, e.push(f), e.push(new mxPoint(f.x, d)), e.push(new mxPoint(l.x, d))) : e.push(f), e.push(l))) - }, - Loop: function(a, b, c, d, e) { - if (null != b) { - c = a.view; - var f = c.graph; - d = null != d && 0 < d.length ? d[0] : null; - null != d && (d = c.transformControlPoint(a, d), mxUtils.contains(b, d.x, d.y) && (d = null)); - var g = 0, - h = 0, - k = 0, - l = 0, - f = mxUtils.getValue(a.style, mxConstants.STYLE_SEGMENT, f.gridSize) * c.scale; - a = mxUtils.getValue(a.style, mxConstants.STYLE_DIRECTION, mxConstants.DIRECTION_WEST); - a == mxConstants.DIRECTION_NORTH || - a == mxConstants.DIRECTION_SOUTH ? (g = c.getRoutingCenterX(b), h = f) : (k = c.getRoutingCenterY(b), l = f); - null == d || d.x < b.x || d.x > b.x + b.width ? null != d ? (g = d.x, l = Math.max(Math.abs(k - d.y), l)) : a == mxConstants.DIRECTION_NORTH ? k = b.y - 2 * h : a == mxConstants.DIRECTION_SOUTH ? - k = b.y + b.height + 2 * h : g = a == mxConstants.DIRECTION_EAST ? b.x - 2 * l : b.x + b.width + 2 * l : null != d && (g = c.getRoutingCenterX(b), h = Math.max(Math.abs(g - d.x), l), k = - d.y, l = 0); - e.push(new mxPoint(g - h, k - l)); - e.push(new mxPoint(g + h, k + l)) - } - }, - ElbowConnector: function(a, b, c, d, e) { - var f = null != - d && 0 < d.length ? d[0] : null, - g = !1, - h = !1; - if (null != b && null != c) - if (null != f) var k = Math.min(b.x, c.x), - l = Math.max(b.x + b.width, c.x + c.width), - h = Math.min(b.y, c.y), - m = Math.max(b.y + b.height, c.y + c.height), - f = a.view.transformControlPoint(a, f), - g = f.y < h || f.y > m, - h = f.x < k || f.x > l; - else k = Math.max(b.x, c.x), l = Math.min(b.x + b.width, c.x + c.width), g = k == l, g || (h = Math.max(b.y, c.y), m = Math.min(b.y + b.height, c.y + c.height), h = h == m); - !h && (g || a.style[mxConstants.STYLE_ELBOW] == mxConstants.ELBOW_VERTICAL) ? mxEdgeStyle.TopToBottom(a, b, c, d, e) : mxEdgeStyle.SideToSide(a, - b, c, d, e) - }, - SideToSide: function(a, b, c, d, e) { - var f = a.view; - d = null != d && 0 < d.length ? d[0] : null; - var g = a.absolutePoints, - h = g[0], - g = g[g.length - 1]; - null != d && (d = f.transformControlPoint(a, d)); - null != h && (b = new mxCellState, b.x = h.x, b.y = h.y); - null != g && (c = new mxCellState, c.x = g.x, c.y = g.y); - null != b && null != c && (a = Math.max(b.x, c.x), h = Math.min(b.x + b.width, c.x + c.width), a = null != d ? d.x : h + (a - h) / 2, h = f.getRoutingCenterY(b), f = f.getRoutingCenterY(c), - null != d && (d.y >= b.y && d.y <= b.y + b.height && (h = d.y), d.y >= c.y && d.y <= c.y + c.height && (f = d.y)), !mxUtils.contains(c, - a, h) && !mxUtils.contains(b, a, h) && e.push(new mxPoint(a, h)), !mxUtils.contains(c, a, f) && !mxUtils.contains(b, a, f) && e.push(new mxPoint(a, f)), 1 == e.length && (null != d ? ! - mxUtils.contains(c, a, d.y) && !mxUtils.contains(b, a, d.y) && e.push(new mxPoint(a, d.y)) : (f = Math.max(b.y, c.y), b = Math.min(b.y + b.height, c.y + c.height), e.push(new mxPoint(a, - f + (b - f) / 2))))) - }, - TopToBottom: function(a, b, c, d, e) { - var f = a.view; - d = null != d && 0 < d.length ? d[0] : null; - var g = a.absolutePoints, - h = g[0], - g = g[g.length - 1]; - null != d && (d = f.transformControlPoint(a, d)); - null != - h && (b = new mxCellState, b.x = h.x, b.y = h.y); - null != g && (c = new mxCellState, c.x = g.x, c.y = g.y); - null != b && null != c && (h = Math.max(b.y, c.y), g = Math.min(b.y + b.height, c.y + c.height), a = f.getRoutingCenterX(b), null != d && (d.x >= b.x && d.x <= b.x + b.width) && (a = d.x), h = - null != d ? d.y : g + (h - g) / 2, !mxUtils.contains(c, a, h) && !mxUtils.contains(b, a, h) && e.push(new mxPoint(a, h)), a = null != d && d.x >= c.x && d.x <= c.x + c.width ? d.x : f.getRoutingCenterX( - c), !mxUtils.contains(c, a, h) && !mxUtils.contains(b, a, h) && e.push(new mxPoint(a, h)), 1 == e.length && (null != d && 1 == - e.length ? !mxUtils.contains(c, d.x, h) && !mxUtils.contains(b, d.x, h) && e.push(new mxPoint(d.x, h)) : (f = Math.max(b.x, c.x), b = Math.min(b.x + b.width, c.x + c.width), e.push(new mxPoint( - f + (b - f) / 2, h))))) - }, - SegmentConnector: function(a, b, c, d, e) { - var f = a.absolutePoints, - g = !0, - h = null, - k = f[0]; - null == k && null != b ? k = new mxPoint(a.view.getRoutingCenterX(b), a.view.getRoutingCenterY(b)) : null != k && (k = k.clone()); - var l = f.length - 1; - if (null != d && 0 < d.length) { - for (var h = a.view.transformControlPoint(a, d[0]), m = b, n = f[0], p = !1, q = !1, p = h, s = d.length, r = - 0; 2 > r; r++) { - var t = null != n && n.x == p.x, - v = null != n && n.y == p.y, - w = null != m && p.y >= m.y && p.y <= m.y + m.height, - m = null != m && p.x >= m.x && p.x <= m.x + m.width, - p = v || null == n && w, - q = t || null == n && m; - if (null != n && !v && !t && (w || m)) { - g = w ? !1 : !0; - break - } - if (q || p) { - g = p; - 1 == r && (g = 0 == d.length % 2 ? p : q); - break - } - m = c; - n = f[l]; - p = a.view.transformControlPoint(a, d[s - 1]) - } - g && (null != f[0] && f[0].y != h.y || null == f[0] && null != b && (h.y < b.y || h.y > b.y + b.height)) ? e.push(new mxPoint(k.x, h.y)) : !g && (null != f[0] && f[0].x != h.x || null == f[ - 0] && null != b && (h.x < b.x || h.x > b.x + b.width)) && e.push(new mxPoint(h.x, - k.y)); - g ? k.y = h.y : k.x = h.x; - for (r = 0; r < d.length; r++) g = !g, h = a.view.transformControlPoint(a, d[r]), g ? k.y = h.y : k.x = h.x, e.push(k.clone()) - } else h = k, g = !0; - k = f[l]; - null == k && null != c && (k = new mxPoint(a.view.getRoutingCenterX(c), a.view.getRoutingCenterY(c))); - g && (null != f[l] && f[l].y != h.y || null == f[l] && null != c && (h.y < c.y || h.y > c.y + c.height)) ? e.push(new mxPoint(k.x, h.y)) : !g && (null != f[l] && f[l].x != h.x || null == f[l] && - null != c && (h.x < c.x || h.x > c.x + c.width)) && e.push(new mxPoint(h.x, k.y)); - if (null == f[0] && null != b) - for (; 1 < e.length && mxUtils.contains(b, - e[1].x, e[1].y);) e = e.splice(1, 1); - if (null == f[l] && null != c) - for (; 1 < e.length && mxUtils.contains(c, e[e.length - 1].x, e[e.length - 1].y);) e = e.splice(e.length - 1, 1) - }, - orthBuffer: 10, - dirVectors: [ - [-1, 0], - [0, -1], - [1, 0], - [0, 1], - [-1, 0], - [0, -1], - [1, 0] - ], - wayPoints1: [ - [0, 0], - [0, 0], - [0, 0], - [0, 0], - [0, 0], - [0, 0], - [0, 0], - [0, 0], - [0, 0], - [0, 0], - [0, 0], - [0, 0] - ], - routePatterns: [ - [ - [513, 2308, 2081, 2562], - [513, 1090, 514, 2184, 2114, 2561], - [513, 1090, 514, 2564, 2184, 2562], - [513, 2308, 2561, 1090, 514, 2568, 2308] - ], - [ - [514, 1057, 513, 2308, 2081, 2562], - [514, 2184, 2114, 2561], - [514, 2184, - 2562, 1057, 513, 2564, 2184 - ], - [514, 1057, 513, 2568, 2308, 2561] - ], - [ - [1090, 514, 1057, 513, 2308, 2081, 2562], - [2114, 2561], - [1090, 2562, 1057, 513, 2564, 2184], - [1090, 514, 1057, 513, 2308, 2561, 2568] - ], - [ - [2081, 2562], - [1057, 513, 1090, 514, 2184, 2114, 2561], - [1057, 513, 1090, 514, 2184, 2562, 2564], - [1057, 2561, 1090, 514, 2568, 2308] - ] - ], - inlineRoutePatterns: [ - [null, [2114, 2568], null, null], - [null, [514, 2081, 2114, 2568], null, null], - [null, [2114, 2561], null, null], - [ - [2081, 2562], - [1057, 2114, 2568], - [2184, 2562], null - ] - ], - vertexSeperations: [], - limits: [ - [0, 0, 0, 0, 0, 0, 0, 0, 0], - [0, 0, 0, 0, 0, 0, 0, 0, 0] - ], - LEFT_MASK: 32, - TOP_MASK: 64, - RIGHT_MASK: 128, - BOTTOM_MASK: 256, - LEFT: 1, - TOP: 2, - RIGHT: 4, - BOTTOM: 8, - SIDE_MASK: 480, - CENTER_MASK: 512, - SOURCE_MASK: 1024, - TARGET_MASK: 2048, - VERTEX_MASK: 3072, - OrthConnector: function(a, b, c, d, e) { - var f = a.view.graph, - g = null == b ? !1 : f.getModel().isEdge(b.cell), - f = null == c ? !1 : f.getModel().isEdge(c.cell); - if (null != d && 0 < d.length || g || f) mxEdgeStyle.SegmentConnector(a, b, c, d, e); - else { - d = a.absolutePoints; - var h = d[0], - k = d[d.length - 1]; - d = null != b ? b.x : h.x; - var g = null != b ? b.y : h.y, - l = null != b ? b.width : - 1, - m = null != b ? b.height : 1, - n = null != c ? c.x : k.x, - p = null != c ? c.y : k.y, - q = null != c ? c.width : 1, - s = null != c ? c.height : 1, - f = a.view.scale * mxEdgeStyle.orthBuffer, - r = [mxConstants.DIRECTION_MASK_ALL, mxConstants.DIRECTION_MASK_ALL]; - null != b && (r[0] = mxUtils.getPortConstraints(b, a, !0, mxConstants.DIRECTION_MASK_ALL)); - null != c && (r[1] = mxUtils.getPortConstraints(c, a, !1, mxConstants.DIRECTION_MASK_ALL)); - a = [0, 0]; - d = [ - [d, g, l, m], - [n, p, q, s] - ]; - for (l = 0; 2 > l; l++) mxEdgeStyle.limits[l][1] = d[l][0] - f, mxEdgeStyle.limits[l][2] = d[l][1] - f, mxEdgeStyle.limits[l][4] = - d[l][0] + d[l][2] + f, mxEdgeStyle.limits[l][8] = d[l][1] + d[l][3] + f; - l = d[0][0] + d[0][2] / 2 - (d[1][0] + d[1][2] / 2); - m = d[0][1] + d[0][3] / 2 - (d[1][1] + d[1][3] / 2); - g = 0; - 0 > l ? g = 0 > m ? 2 : 1 : 0 >= m && (g = 3, 0 == l && (g = 2)); - m = null; - null != b && (m = h); - b = [ - [0.5, 0.5], - [0.5, 0.5] - ]; - for (l = 0; 2 > l; l++) null != m && (b[l][0] = (m.x - d[l][0]) / d[l][2], 0.01 > b[l][0] ? a[l] = mxConstants.DIRECTION_MASK_WEST : 0.99 < b[l][0] && (a[l] = mxConstants.DIRECTION_MASK_EAST), - b[l][1] = (m.y - d[l][1]) / d[l][3], 0.01 > b[l][1] ? a[l] = mxConstants.DIRECTION_MASK_NORTH : 0.99 < b[l][1] && (a[l] = mxConstants.DIRECTION_MASK_SOUTH)), - m = null, null != c && (m = k); - l = d[0][1] - (d[1][1] + d[1][3]); - m = d[0][0] - (d[1][0] + d[1][2]); - n = d[1][1] - (d[0][1] + d[0][3]); - p = d[1][0] - (d[0][0] + d[0][2]); - mxEdgeStyle.vertexSeperations[1] = Math.max(m - 2 * f, 0); - mxEdgeStyle.vertexSeperations[2] = Math.max(l - 2 * f, 0); - mxEdgeStyle.vertexSeperations[4] = Math.max(n - 2 * f, 0); - mxEdgeStyle.vertexSeperations[3] = Math.max(p - 2 * f, 0); - c = []; - h = []; - k = []; - h[0] = m >= p ? mxConstants.DIRECTION_MASK_WEST : mxConstants.DIRECTION_MASK_EAST; - k[0] = l >= n ? mxConstants.DIRECTION_MASK_NORTH : mxConstants.DIRECTION_MASK_SOUTH; - h[1] = mxUtils.reversePortConstraints(h[0]); - k[1] = mxUtils.reversePortConstraints(k[0]); - m = m >= p ? m : p; - n = l >= n ? l : n; - p = [ - [0, 0], - [0, 0] - ]; - q = !1; - for (l = 0; 2 > l; l++) 0 == a[l] && (0 == (h[l] & r[l]) && (h[l] = mxUtils.reversePortConstraints(h[l])), 0 == (k[l] & r[l]) && (k[l] = mxUtils.reversePortConstraints(k[l])), p[l][0] = k[l], - p[l][1] = h[l]); - n > 2 * f && m > 2 * f && (0 < (h[0] & r[0]) && 0 < (k[1] & r[1]) ? (p[0][0] = h[0], p[0][1] = k[0], p[1][0] = k[1], p[1][1] = h[1], q = !0) : 0 < (k[0] & r[0]) && 0 < (h[1] & r[1]) && (p[0] - [0] = k[0], p[0][1] = h[0], p[1][0] = h[1], p[1][1] = k[1], q = !0)); - n > 2 * f && !q && - (p[0][0] = k[0], p[0][1] = h[0], p[1][0] = k[1], p[1][1] = h[1], q = !0); - m > 2 * f && !q && (p[0][0] = h[0], p[0][1] = k[0], p[1][0] = h[1], p[1][1] = k[1]); - for (l = 0; 2 > l; l++) - if (0 == a[l] && (0 == (p[l][0] & r[l]) && (p[l][0] = p[l][1]), c[l] = p[l][0] & r[l], c[l] |= (p[l][1] & r[l]) << 8, c[l] |= (p[1 - l][l] & r[l]) << 16, c[l] |= (p[1 - l][1 - l] & r[l]) << - 24, 0 == (c[l] & 15) && (c[l] <<= 8), 0 == (c[l] & 3840) && (c[l] = c[l] & 15 | c[l] >> 8), 0 == (c[l] & 983040) && (c[l] = c[l] & 65535 | (c[l] & 251658240) >> 8), a[l] = c[l] & 15, - r[l] == mxConstants.DIRECTION_MASK_WEST || r[l] == mxConstants.DIRECTION_MASK_NORTH || r[l] == - mxConstants.DIRECTION_MASK_EAST || r[l] == mxConstants.DIRECTION_MASK_SOUTH)) a[l] = r[l]; - l = a[0] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[0]; - r = a[1] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[1]; - l -= g; - r -= g; - 1 > l && (l += 4); - 1 > r && (r += 4); - r = mxEdgeStyle.routePatterns[l - 1][r - 1]; - mxEdgeStyle.wayPoints1[0][0] = d[0][0]; - mxEdgeStyle.wayPoints1[0][1] = d[0][1]; - switch (a[0]) { - case mxConstants.DIRECTION_MASK_WEST: - mxEdgeStyle.wayPoints1[0][0] -= f; - mxEdgeStyle.wayPoints1[0][1] += b[0][1] * d[0][3]; - break; - case mxConstants.DIRECTION_MASK_SOUTH: - mxEdgeStyle.wayPoints1[0][0] += - b[0][0] * d[0][2]; - mxEdgeStyle.wayPoints1[0][1] += d[0][3] + f; - break; - case mxConstants.DIRECTION_MASK_EAST: - mxEdgeStyle.wayPoints1[0][0] += d[0][2] + f; - mxEdgeStyle.wayPoints1[0][1] += b[0][1] * d[0][3]; - break; - case mxConstants.DIRECTION_MASK_NORTH: - mxEdgeStyle.wayPoints1[0][0] += b[0][0] * d[0][2], mxEdgeStyle.wayPoints1[0][1] -= f - } - f = 0; - h = c = 0 < (a[0] & (mxConstants.DIRECTION_MASK_EAST | mxConstants.DIRECTION_MASK_WEST)) ? 0 : 1; - for (l = k = 0; l < r.length; l++) { - k = r[l] & 15; - s = k == mxConstants.DIRECTION_MASK_EAST ? 3 : k; - s += g; - 4 < s && (s -= 4); - m = mxEdgeStyle.dirVectors[s - - 1]; - k = 0 < s % 2 ? 0 : 1; - k != c && (f++, mxEdgeStyle.wayPoints1[f][0] = mxEdgeStyle.wayPoints1[f - 1][0], mxEdgeStyle.wayPoints1[f][1] = mxEdgeStyle.wayPoints1[f - 1][1]); - var t = 0 < (r[l] & mxEdgeStyle.TARGET_MASK), - q = 0 < (r[l] & mxEdgeStyle.SOURCE_MASK), - n = (r[l] & mxEdgeStyle.SIDE_MASK) >> 5, - n = n << g; - 15 < n && (n >>= 4); - p = 0 < (r[l] & mxEdgeStyle.CENTER_MASK); - (q || t) && 9 > n ? (s = 0, q = q ? 0 : 1, s = p && 0 == k ? d[q][0] + b[q][0] * d[q][2] : p ? d[q][1] + b[q][1] * d[q][3] : mxEdgeStyle.limits[q][n], 0 == k ? (n = (s - mxEdgeStyle.wayPoints1[ - f][0]) * m[0], 0 < n && (mxEdgeStyle.wayPoints1[f][0] += - m[0] * n)) : (n = (s - mxEdgeStyle.wayPoints1[f][1]) * m[1], 0 < n && (mxEdgeStyle.wayPoints1[f][1] += m[1] * n))) : p && (mxEdgeStyle.wayPoints1[f][0] += m[0] * Math.abs(mxEdgeStyle.vertexSeperations[ - s] / 2), mxEdgeStyle.wayPoints1[f][1] += m[1] * Math.abs(mxEdgeStyle.vertexSeperations[s] / 2)); - 0 < f && mxEdgeStyle.wayPoints1[f][k] == mxEdgeStyle.wayPoints1[f - 1][k] ? f-- : c = k - } - for (l = 0; l <= f && !(l == f && ((0 < (a[1] & (mxConstants.DIRECTION_MASK_EAST | mxConstants.DIRECTION_MASK_WEST)) ? 0 : 1) == h ? 0 : 1) != (f + 1) % 2); l++) e.push(new mxPoint( - mxEdgeStyle.wayPoints1[l][0], - mxEdgeStyle.wayPoints1[l][1])) - } - }, - getRoutePattern: function(a, b, c, d) { - var e = a[0] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[0]; - a = a[1] == mxConstants.DIRECTION_MASK_EAST ? 3 : a[1]; - e -= b; - a -= b; - 1 > e && (e += 4); - 1 > a && (a += 4); - b = routePatterns[e - 1][a - 1]; - if (0 == c || 0 == d) null != inlineRoutePatterns[e - 1][a - 1] && (b = inlineRoutePatterns[e - 1][a - 1]); - return b - } - }, - mxStyleRegistry = { - values: [], - putValue: function(a, b) { - mxStyleRegistry.values[a] = b - }, - getValue: function(a) { - return mxStyleRegistry.values[a] - }, - getName: function(a) { - for (var b in mxStyleRegistry.values) - if (mxStyleRegistry.values[b] == - a) return b; - return null - } - }; -mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW, mxEdgeStyle.ElbowConnector); -mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION, mxEdgeStyle.EntityRelation); -mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP, mxEdgeStyle.Loop); -mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE, mxEdgeStyle.SideToSide); -mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM, mxEdgeStyle.TopToBottom); -mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL, mxEdgeStyle.OrthConnector); -mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT, mxEdgeStyle.SegmentConnector); -mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE, mxPerimeter.EllipsePerimeter); -mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE, mxPerimeter.RectanglePerimeter); -mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS, mxPerimeter.RhombusPerimeter); -mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE, mxPerimeter.TrianglePerimeter); - -function mxGraphView(a) { - this.graph = a; - this.translate = new mxPoint; - this.graphBounds = new mxRectangle; - this.states = new mxDictionary -} -mxGraphView.prototype = new mxEventSource; -mxGraphView.prototype.constructor = mxGraphView; -mxGraphView.prototype.EMPTY_POINT = new mxPoint; -mxGraphView.prototype.doneResource = "none" != mxClient.language ? "done" : ""; -mxGraphView.prototype.updatingDocumentResource = "none" != mxClient.language ? "updatingDocument" : ""; -mxGraphView.prototype.allowEval = !1; -mxGraphView.prototype.captureDocumentGesture = !0; -mxGraphView.prototype.optimizeVmlReflows = !0; -mxGraphView.prototype.rendering = !0; -mxGraphView.prototype.graph = null; -mxGraphView.prototype.currentRoot = null; -mxGraphView.prototype.graphBounds = null; -mxGraphView.prototype.scale = 1; -mxGraphView.prototype.translate = null; -mxGraphView.prototype.updateStyle = !1; -mxGraphView.prototype.getGraphBounds = function() { - return this.graphBounds -}; -mxGraphView.prototype.setGraphBounds = function(a) { - this.graphBounds = a -}; -mxGraphView.prototype.getBounds = function(a) { - var b = null; - if (null != a && 0 < a.length) - for (var c = this.graph.getModel(), d = 0; d < a.length; d++) - if (c.isVertex(a[d]) || c.isEdge(a[d])) { - var e = this.getState(a[d]); - null != e && (null == b ? b = new mxRectangle(e.x, e.y, e.width, e.height) : b.add(e)) - } - return b -}; -mxGraphView.prototype.setCurrentRoot = function(a) { - if (this.currentRoot != a) { - var b = new mxCurrentRootChange(this, a); - b.execute(); - var c = new mxUndoableEdit(this, !1); - c.add(b); - this.fireEvent(new mxEventObject(mxEvent.UNDO, "edit", c)); - this.graph.sizeDidChange() - } - return a -}; -mxGraphView.prototype.scaleAndTranslate = function(a, b, c) { - var d = this.scale, - e = new mxPoint(this.translate.x, this.translate.y); - if (this.scale != a || this.translate.x != b || this.translate.y != c) this.scale = a, this.translate.x = b, this.translate.y = c, this.isEventsEnabled() && (this.revalidate(), this.graph.sizeDidChange()); - this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE, "scale", a, "previousScale", d, "translate", this.translate, "previousTranslate", e)) -}; -mxGraphView.prototype.getScale = function() { - return this.scale -}; -mxGraphView.prototype.setScale = function(a) { - var b = this.scale; - this.scale != a && (this.scale = a, this.isEventsEnabled() && (this.revalidate(), this.graph.sizeDidChange())); - this.fireEvent(new mxEventObject(mxEvent.SCALE, "scale", a, "previousScale", b)) -}; -mxGraphView.prototype.getTranslate = function() { - return this.translate -}; -mxGraphView.prototype.setTranslate = function(a, b) { - var c = new mxPoint(this.translate.x, this.translate.y); - if (this.translate.x != a || this.translate.y != b) this.translate.x = a, this.translate.y = b, this.isEventsEnabled() && (this.revalidate(), this.graph.sizeDidChange()); - this.fireEvent(new mxEventObject(mxEvent.TRANSLATE, "translate", this.translate, "previousTranslate", c)) -}; -mxGraphView.prototype.refresh = function() { - null != this.currentRoot && this.clear(); - this.revalidate() -}; -mxGraphView.prototype.revalidate = function() { - this.invalidate(); - this.validate() -}; -mxGraphView.prototype.clear = function(a, b, c) { - var d = this.graph.getModel(); - a = a || d.getRoot(); - b = null != b ? b : !1; - c = null != c ? c : !0; - this.removeState(a); - if (c && (b || a != this.currentRoot)) { - c = d.getChildCount(a); - for (var e = 0; e < c; e++) this.clear(d.getChildAt(a, e), b) - } else this.invalidate(a) -}; -mxGraphView.prototype.invalidate = function(a, b, c, d) { - var e = this.graph.getModel(); - a = a || e.getRoot(); - b = null != b ? b : !0; - c = null != c ? c : !0; - d = null != d ? d : !1; - var f = this.getState(a); - null != f && (f.invalid = !0, d && (f.orderChanged = !0)); - if (b) - for (var g = e.getChildCount(a), f = 0; f < g; f++) { - var h = e.getChildAt(a, f); - this.invalidate(h, b, c, d) - } - if (c) { - d = e.getEdgeCount(a); - for (f = 0; f < d; f++) this.invalidate(e.getEdgeAt(a, f), b, c) - } -}; -mxGraphView.prototype.validate = function(a) { - var b = mxLog.enter("mxGraphView.validate"); - window.status = mxResources.get(this.updatingDocumentResource) || this.updatingDocumentResource; - var c = null; - if (this.optimizeVmlReflows && null != this.canvas && null == this.textDiv && (8 == document.documentMode || mxClient.IS_QUIRKS)) { - c = this.canvas.style.display; - this.canvas.style.display = "none"; - var d = document.createElement("div"); - d.style.position = "absolute"; - d.style.whiteSpace = "nowrap"; - d.style.visibility = "hidden"; - d.style.display = mxClient.IS_QUIRKS ? - "inline" : "inline-block"; - d.style.zoom = "1"; - document.body.appendChild(d); - this.textDiv = d - } - a = a || (null != this.currentRoot ? this.currentRoot : this.graph.getModel().getRoot()); - this.validateBounds(null, a); - a = this.validatePoints(null, a); - null == a && (a = new mxRectangle); - this.setGraphBounds(a); - this.validateBackground(); - null != c && (this.canvas.style.display = c, document.body.removeChild(this.textDiv), this.textDiv = null); - window.status = mxResources.get(this.doneResource) || this.doneResource; - mxLog.leave("mxGraphView.validate", b) -}; -mxGraphView.prototype.createBackgroundPageShape = function(a) { - return new mxRectangleShape(a, "white", "black") -}; -mxGraphView.prototype.validateBackground = function() { - var a = this.graph.getBackgroundImage(); - if (null != a) { - if (null == this.backgroundImage || this.backgroundImage.image != a.src) { - null != this.backgroundImage && this.backgroundImage.destroy(); - var b = new mxRectangle(0, 0, 1, 1); - this.backgroundImage = new mxImageShape(b, a.src); - this.backgroundImage.dialect = this.graph.dialect; - this.backgroundImage.init(this.backgroundPane); - this.backgroundImage.redraw() - } - this.redrawBackgroundImage(this.backgroundImage, a) - } else null != this.backgroundImage && - (this.backgroundImage.destroy(), this.backgroundImage = null); - this.graph.pageVisible ? (b = this.getBackgroundPageBounds(), null == this.backgroundPageShape ? (this.backgroundPageShape = this.createBackgroundPageShape(b), this.backgroundPageShape.scale = - this.scale, this.backgroundPageShape.isShadow = !0, this.backgroundPageShape.dialect = this.graph.dialect, this.backgroundPageShape.init(this.backgroundPane), this.backgroundPageShape.redraw(), - mxEvent.addListener(this.backgroundPageShape.node, "dblclick", mxUtils.bind(this, - function(a) { - this.graph.dblClick(a) - })), mxEvent.addGestureListeners(this.backgroundPageShape.node, mxUtils.bind(this, function(a) { - this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a)) - }), mxUtils.bind(this, function(a) { - null != this.graph.tooltipHandler && this.graph.tooltipHandler.isHideOnHover() && this.graph.tooltipHandler.hide(); - this.graph.isMouseDown && !mxEvent.isConsumed(a) && this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(a)) - }), mxUtils.bind(this, function(a) { - this.graph.fireMouseEvent(mxEvent.MOUSE_UP, - new mxMouseEvent(a)) - }))) : (this.backgroundPageShape.scale = this.scale, this.backgroundPageShape.bounds = b, this.backgroundPageShape.redraw())) : null != this.backgroundPageShape && (this.backgroundPageShape.destroy(), - this.backgroundPageShape = null) -}; -mxGraphView.prototype.getBackgroundPageBounds = function() { - var a = this.graph.pageFormat, - b = this.scale * this.graph.pageScale; - return new mxRectangle(this.scale * this.translate.x, this.scale * this.translate.y, a.width * b, a.height * b) -}; -mxGraphView.prototype.redrawBackgroundImage = function(a, b) { - a.scale = this.scale; - a.bounds.x = this.scale * this.translate.x; - a.bounds.y = this.scale * this.translate.y; - a.bounds.width = this.scale * b.width; - a.bounds.height = this.scale * b.height; - a.redraw() -}; -mxGraphView.prototype.validateBounds = function(a, b) { - var c = this.graph.getModel(), - d = this.getState(b, !0); - if (null != d && d.invalid) { - if (this.graph.isCellVisible(b)) { - if (b != this.currentRoot && null != a) { - d.absoluteOffset.x = 0; - d.absoluteOffset.y = 0; - d.origin.x = a.origin.x; - d.origin.y = a.origin.y; - var e = this.graph.getCellGeometry(b); - if (null != e) { - if (!c.isEdge(b)) { - var f = e.offset || this.EMPTY_POINT; - e.relative ? (d.origin.x += e.x * a.width / this.scale + f.x, d.origin.y += e.y * a.height / this.scale + f.y) : (d.absoluteOffset.x = this.scale * f.x, d.absoluteOffset.y = - this.scale * f.y, d.origin.x += e.x, d.origin.y += e.y) - } - d.x = this.scale * (this.translate.x + d.origin.x); - d.y = this.scale * (this.translate.y + d.origin.y); - d.width = this.scale * e.width; - d.height = this.scale * e.height; - if (c.isVertex(b)) { - if (e.relative && (f = mxUtils.toRadians(a.style[mxConstants.STYLE_ROTATION] || "0"), 0 != f)) { - var e = Math.cos(f), - f = Math.sin(f), - g = new mxPoint(d.getCenterX(), d.getCenterY()), - h = new mxPoint(a.getCenterX(), a.getCenterY()), - e = mxUtils.getRotatedPoint(g, e, f, h); - d.x = e.x - d.width / 2; - d.y = e.y - d.height / 2 - } - this.updateVertexLabelOffset(d) - } - } - } - } else this.removeState(b); - f = this.graph.getChildOffsetForCell(b); - null != f && (d.origin.x += f.x, d.origin.y += f.y) - } - if (null != d && (!this.graph.isCellCollapsed(b) || b == this.currentRoot)) { - e = c.getChildCount(b); - for (f = 0; f < e; f++) g = c.getChildAt(b, f), this.validateBounds(d, g) - } -}; -mxGraphView.prototype.updateVertexLabelOffset = function(a) { - var b = mxUtils.getValue(a.style, mxConstants.STYLE_LABEL_POSITION, mxConstants.ALIGN_CENTER); - b == mxConstants.ALIGN_LEFT ? a.absoluteOffset.x -= a.width : b == mxConstants.ALIGN_RIGHT && (a.absoluteOffset.x += a.width); - b = mxUtils.getValue(a.style, mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.ALIGN_MIDDLE); - b == mxConstants.ALIGN_TOP ? a.absoluteOffset.y -= a.height : b == mxConstants.ALIGN_BOTTOM && (a.absoluteOffset.y += a.height) -}; -mxGraphView.prototype.validatePoints = function(a, b) { - var c = this.graph.getModel(), - d = this.getState(b), - e = null; - if (null != d) { - if (d.invalid) { - var f = this.graph.getCellGeometry(b); - if (null != f && c.isEdge(b)) { - var g = this.getState(this.getVisibleTerminal(b, !0)); - d.setVisibleTerminalState(g, !0); - if (null != g && c.isEdge(g.cell) && !c.isAncestor(g.cell, b)) { - var h = this.getState(c.getParent(g.cell)); - this.validatePoints(h, g.cell) - } - var k = this.getState(this.getVisibleTerminal(b, !1)); - d.setVisibleTerminalState(k, !1); - null != k && (c.isEdge(k.cell) && - !c.isAncestor(k.cell, b)) && (h = this.getState(c.getParent(k.cell)), this.validatePoints(h, k.cell)); - this.updateFixedTerminalPoints(d, g, k); - this.updatePoints(d, f.points, g, k); - this.updateFloatingTerminalPoints(d, g, k); - this.updateEdgeBounds(d); - this.updateEdgeLabelOffset(d) - } else null != f && (f.relative && null != a && c.isEdge(a.cell)) && (f = this.getPoint(a, f), null != f && (d.x = f.x, d.y = f.y, f.x = f.x / this.scale - this.translate.x, f.y = f.y / this.scale - - this.translate.y, d.origin = f, this.childMoved(a, d))); - d.invalid = !1; - b != this.currentRoot && - this.graph.cellRenderer.redraw(d, !1, this.isRendering()) - } - if (c.isEdge(b) || c.isVertex(b)) null != d.shape && null != d.shape.boundingBox && (e = d.shape.boundingBox.clone()), null != d.text && !this.graph.isLabelClipped(d.cell) && null != d.text.boundingBox && - (null != e ? e.add(d.text.boundingBox) : e = d.text.boundingBox.clone()) - } - if (null != d && (!this.graph.isCellCollapsed(b) || b == this.currentRoot)) { - f = c.getChildCount(b); - for (g = 0; g < f; g++) h = c.getChildAt(b, g), h = this.validatePoints(d, h), null != h && (null == e ? e = h : e.add(h)) - } - return e -}; -mxGraphView.prototype.childMoved = function(a, b) { - var c = b.cell; - if (!this.graph.isCellCollapsed(c) || c == this.currentRoot) - for (var d = this.graph.getModel(), e = d.getChildCount(c), f = 0; f < e; f++) this.validateBounds(b, d.getChildAt(c, f)) -}; -mxGraphView.prototype.updateFixedTerminalPoints = function(a, b, c) { - this.updateFixedTerminalPoint(a, b, !0, this.graph.getConnectionConstraint(a, b, !0)); - this.updateFixedTerminalPoint(a, c, !1, this.graph.getConnectionConstraint(a, c, !1)) -}; -mxGraphView.prototype.updateFixedTerminalPoint = function(a, b, c, d) { - var e = null; - null != d && (e = this.graph.getConnectionPoint(b, d)); - if (null == e && null == b) { - b = this.scale; - d = this.translate; - var f = a.origin, - e = this.graph.getCellGeometry(a.cell).getTerminalPoint(c); - null != e && (e = new mxPoint(b * (d.x + e.x + f.x), b * (d.y + e.y + f.y))) - } - a.setAbsoluteTerminalPoint(e, c) -}; -mxGraphView.prototype.updatePoints = function(a, b, c, d) { - if (null != a) { - var e = []; - e.push(a.absolutePoints[0]); - var f = this.getEdgeStyle(a, b, c, d); - if (null != f) c = this.getTerminalPort(a, c, !0), d = this.getTerminalPort(a, d, !1), f(a, c, d, b, e); - else if (null != b) - for (f = 0; f < b.length; f++) null != b[f] && (d = mxUtils.clone(b[f]), e.push(this.transformControlPoint(a, d))); - b = a.absolutePoints; - e.push(b[b.length - 1]); - a.absolutePoints = e - } -}; -mxGraphView.prototype.transformControlPoint = function(a, b) { - var c = a.origin; - return new mxPoint(this.scale * (b.x + this.translate.x + c.x), this.scale * (b.y + this.translate.y + c.y)) -}; -mxGraphView.prototype.getEdgeStyle = function(a, b, c, d) { - a = null != c && c == d ? mxUtils.getValue(a.style, mxConstants.STYLE_LOOP, this.graph.defaultLoopStyle) : !mxUtils.getValue(a.style, mxConstants.STYLE_NOEDGESTYLE, !1) ? a.style[mxConstants.STYLE_EDGE] : - null; - "string" == typeof a && (b = mxStyleRegistry.getValue(a), null == b && this.isAllowEval() && (b = mxUtils.eval(a)), a = b); - return "function" == typeof a ? a : null -}; -mxGraphView.prototype.updateFloatingTerminalPoints = function(a, b, c) { - var d = a.absolutePoints, - e = d[0]; - null == d[d.length - 1] && null != c && this.updateFloatingTerminalPoint(a, c, b, !1); - null == e && null != b && this.updateFloatingTerminalPoint(a, b, c, !0) -}; -mxGraphView.prototype.updateFloatingTerminalPoint = function(a, b, c, d) { - b = this.getTerminalPort(a, b, d); - var e = this.getNextPoint(a, c, d), - f = this.graph.isOrthogonal(a); - c = mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION] || "0")); - var g = new mxPoint(b.getCenterX(), b.getCenterY()); - if (0 != c) var h = Math.cos(-c), - k = Math.sin(-c), - e = mxUtils.getRotatedPoint(e, h, k, g); - h = parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING] || 0); - h += parseFloat(a.style[d ? mxConstants.STYLE_SOURCE_PERIMETER_SPACING : mxConstants.STYLE_TARGET_PERIMETER_SPACING] || - 0); - b = this.getPerimeterPoint(b, e, 0 == c && f, h); - 0 != c && (h = Math.cos(c), k = Math.sin(c), b = mxUtils.getRotatedPoint(b, h, k, g)); - a.setAbsoluteTerminalPoint(b, d) -}; -mxGraphView.prototype.getTerminalPort = function(a, b, c) { - a = mxUtils.getValue(a.style, c ? mxConstants.STYLE_SOURCE_PORT : mxConstants.STYLE_TARGET_PORT); - null != a && (a = this.getState(this.graph.getModel().getCell(a)), null != a && (b = a)); - return b -}; -mxGraphView.prototype.getPerimeterPoint = function(a, b, c, d) { - var e = null; - if (null != a) { - var f = this.getPerimeterFunction(a); - if (null != f && null != b && (d = this.getPerimeterBounds(a, d), 0 < d.width || 0 < d.height)) e = f(d, a, b, c); - null == e && (e = this.getPoint(a)) - } - return e -}; -mxGraphView.prototype.getRoutingCenterX = function(a) { - var b = null != a.style ? parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X]) || 0 : 0; - return a.getCenterX() + b * a.width -}; -mxGraphView.prototype.getRoutingCenterY = function(a) { - var b = null != a.style ? parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y]) || 0 : 0; - return a.getCenterY() + b * a.height -}; -mxGraphView.prototype.getPerimeterBounds = function(a, b) { - b = null != b ? b : 0; - null != a && (b += parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING] || 0)); - return a.getPerimeterBounds(b * this.scale) -}; -mxGraphView.prototype.getPerimeterFunction = function(a) { - a = a.style[mxConstants.STYLE_PERIMETER]; - if ("string" == typeof a) { - var b = mxStyleRegistry.getValue(a); - null == b && this.isAllowEval() && (b = mxUtils.eval(a)); - a = b - } - return "function" == typeof a ? a : null -}; -mxGraphView.prototype.getNextPoint = function(a, b, c) { - a = a.absolutePoints; - var d = null; - if (null != a && (c || 2 < a.length || null == b)) d = a.length, d = a[c ? Math.min(1, d - 1) : Math.max(0, d - 2)]; - null == d && null != b && (d = new mxPoint(b.getCenterX(), b.getCenterY())); - return d -}; -mxGraphView.prototype.getVisibleTerminal = function(a, b) { - for (var c = this.graph.getModel(), d = c.getTerminal(a, b), e = d; null != d && d != this.currentRoot;) { - if (!this.graph.isCellVisible(e) || this.graph.isCellCollapsed(d)) e = d; - d = c.getParent(d) - } - c.getParent(e) == c.getRoot() && (e = null); - return e -}; -mxGraphView.prototype.updateEdgeBounds = function(a) { - var b = a.absolutePoints; - a.length = 0; - if (null != b && 0 < b.length) { - var c = b[0], - d = b[b.length - 1]; - if (null == c || null == d) a.cell != this.currentRoot && this.clear(a.cell, !0); - else { - if (c.x != d.x || c.y != d.y) { - var e = d.x - c.x, - f = d.y - c.y; - a.terminalDistance = Math.sqrt(e * e + f * f) - } else a.terminalDistance = 0; - var d = 0, - g = [], - f = c; - if (null != f) { - for (var c = f.x, h = f.y, k = c, l = h, m = 1; m < b.length; m++) { - var n = b[m]; - null != n && (e = f.x - n.x, f = f.y - n.y, e = Math.sqrt(e * e + f * f), g.push(e), d += e, f = n, c = Math.min(f.x, c), h = Math.min(f.y, - h), k = Math.max(f.x, k), l = Math.max(f.y, l)) - } - a.length = d; - a.segments = g; - a.x = c; - a.y = h; - a.width = Math.max(1, k - c); - a.height = Math.max(1, l - h) - } - } - } -}; -mxGraphView.prototype.getPoint = function(a, b) { - var c = a.getCenterX(), - d = a.getCenterY(); - if (null != a.segments && (null == b || b.relative)) { - for (var e = a.absolutePoints.length, f = ((null != b ? b.x / 2 : 0) + 0.5) * a.length, g = a.segments[0], h = 0, k = 1; f > h + g && k < e - 1;) h += g, g = a.segments[k++]; - e = 0 == g ? 0 : (f - h) / g; - f = a.absolutePoints[k - 1]; - k = a.absolutePoints[k]; - if (null != f && null != k) { - h = c = d = 0; - if (null != b) { - var d = b.y, - l = b.offset; - null != l && (c = l.x, h = l.y) - } - l = k.x - f.x; - k = k.y - f.y; - c = f.x + l * e + ((0 == g ? 0 : k / g) * d + c) * this.scale; - d = f.y + k * e - ((0 == g ? 0 : l / g) * d - h) * this.scale - } - } else null != - b && (l = b.offset, null != l && (c += l.x, d += l.y)); - return new mxPoint(c, d) -}; -mxGraphView.prototype.getRelativePoint = function(a, b, c) { - var d = this.graph.getModel().getGeometry(a.cell); - if (null != d) { - var e = a.absolutePoints.length; - if (d.relative && 1 < e) { - for (var d = a.length, f = a.segments, g = a.absolutePoints[0], h = a.absolutePoints[1], k = mxUtils.ptSegDistSq(g.x, g.y, h.x, h.y, b, c), l = 0, m = 0, n = 0, p = 2; p < e; p++) m += f[p - - 2], h = a.absolutePoints[p], g = mxUtils.ptSegDistSq(g.x, g.y, h.x, h.y, b, c), g <= k && (k = g, l = p - 1, n = m), g = h; - e = f[l]; - g = a.absolutePoints[l]; - h = a.absolutePoints[l + 1]; - k = h.x; - f = h.y; - a = g.x - k; - l = g.y - f; - k = b - k; - f = c - f; - k = a - k; - f = l - f; - f = k * a + f * l; - a = Math.sqrt(0 >= f ? 0 : f * f / (a * a + l * l)); - a > e && (a = e); - e = Math.sqrt(mxUtils.ptSegDistSq(g.x, g.y, h.x, h.y, b, c)); - 1 == mxUtils.relativeCcw(g.x, g.y, h.x, h.y, b, c) && (e = -e); - return new mxPoint(-2 * ((d / 2 - n - a) / d), e / this.scale) - } - } - return new mxPoint -}; -mxGraphView.prototype.updateEdgeLabelOffset = function(a) { - var b = a.absolutePoints; - a.absoluteOffset.x = a.getCenterX(); - a.absoluteOffset.y = a.getCenterY(); - if (null != b && 0 < b.length && null != a.segments) { - var c = this.graph.getCellGeometry(a.cell); - if (c.relative) { - var d = this.getPoint(a, c); - null != d && (a.absoluteOffset = d) - } else { - var d = b[0], - e = b[b.length - 1]; - if (null != d && null != e) { - var b = e.x - d.x, - f = e.y - d.y, - g = e = 0, - c = c.offset; - null != c && (e = c.x, g = c.y); - c = d.y + f / 2 + g * this.scale; - a.absoluteOffset.x = d.x + b / 2 + e * this.scale; - a.absoluteOffset.y = c - } - } - } -}; -mxGraphView.prototype.getState = function(a, b) { - b = b || !1; - var c = null; - null != a && (c = this.states.get(a), this.graph.isCellVisible(a) && (null == c && b && this.graph.isCellVisible(a) ? (c = this.createState(a), this.states.put(a, c)) : b && (null != c && this.updateStyle) && - (c.style = this.graph.getCellStyle(a)))); - return c -}; -mxGraphView.prototype.isRendering = function() { - return this.rendering -}; -mxGraphView.prototype.setRendering = function(a) { - this.rendering = a -}; -mxGraphView.prototype.isAllowEval = function() { - return this.allowEval -}; -mxGraphView.prototype.setAllowEval = function(a) { - this.allowEval = a -}; -mxGraphView.prototype.getStates = function() { - return this.states -}; -mxGraphView.prototype.setStates = function(a) { - this.states = a -}; -mxGraphView.prototype.getCellStates = function(a) { - if (null == a) return this.states; - for (var b = [], c = 0; c < a.length; c++) { - var d = this.getState(a[c]); - null != d && b.push(d) - } - return b -}; -mxGraphView.prototype.removeState = function(a) { - var b = null; - null != a && (b = this.states.remove(a), null != b && (this.graph.cellRenderer.destroy(b), b.destroy())); - return b -}; -mxGraphView.prototype.createState = function(a) { - var b = this.graph.getCellStyle(a); - a = new mxCellState(this, a, b); - this.graph.cellRenderer.initialize(a, this.isRendering()); - return a -}; -mxGraphView.prototype.getCanvas = function() { - return this.canvas -}; -mxGraphView.prototype.getBackgroundPane = function() { - return this.backgroundPane -}; -mxGraphView.prototype.getDrawPane = function() { - return this.drawPane -}; -mxGraphView.prototype.getOverlayPane = function() { - return this.overlayPane -}; -mxGraphView.prototype.isContainerEvent = function(a) { - a = mxEvent.getSource(a); - return a == this.graph.container || a.parentNode == this.backgroundPane || null != a.parentNode && a.parentNode.parentNode == this.backgroundPane || a == this.canvas.parentNode || a == this.canvas || - a == this.backgroundPane || a == this.drawPane || a == this.overlayPane -}; -mxGraphView.prototype.isScrollEvent = function(a) { - var b = mxUtils.getOffset(this.graph.container); - a = new mxPoint(a.clientX - b.x, a.clientY - b.y); - var b = this.graph.container.offsetWidth, - c = this.graph.container.clientWidth; - if (b > c && a.x > c + 2 && a.x <= b) return !0; - b = this.graph.container.offsetHeight; - c = this.graph.container.clientHeight; - return b > c && a.y > c + 2 && a.y <= b ? !0 : !1 -}; -mxGraphView.prototype.init = function() { - this.installListeners(); - var a = this.graph; - a.dialect == mxConstants.DIALECT_SVG ? this.createSvg() : a.dialect == mxConstants.DIALECT_VML ? this.createVml() : this.createHtml() -}; -mxGraphView.prototype.installListeners = function() { - var a = this.graph, - b = a.container; - if (null != b) { - mxEvent.addGestureListeners(b, mxUtils.bind(this, function(b) { - mxClient.IS_TOUCH && a.isEditing() && a.stopEditing(!a.isInvokesStopCellEditing()); - this.isContainerEvent(b) && (!mxClient.IS_IE && !mxClient.IS_GC && !mxClient.IS_OP && !mxClient.IS_SF || !this.isScrollEvent(b)) && a.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent( - b)) - }), mxUtils.bind(this, function(b) { - this.isContainerEvent(b) && a.fireMouseEvent(mxEvent.MOUSE_MOVE, - new mxMouseEvent(b)) - }), mxUtils.bind(this, function(b) { - this.isContainerEvent(b) && a.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(b)) - })); - mxEvent.addListener(b, "dblclick", mxUtils.bind(this, function(b) { - a.dblClick(b) - })); - var c = function(c) { - var e = null; - mxClient.IS_TOUCH && (e = mxEvent.getClientX(c), c = mxEvent.getClientY(c), c = mxUtils.convertPoint(b, e, c), e = a.view.getState(a.getCellAt(c.x, c.y))); - return e - }; - a.addMouseListener({ - mouseDown: function(b, c) { - a.panningHandler.hideMenu() - }, - mouseMove: function() {}, - mouseUp: function() {} - }); - this.moveHandler = mxUtils.bind(this, function(b) { - null != a.tooltipHandler && a.tooltipHandler.isHideOnHover() && a.tooltipHandler.hide(); - this.captureDocumentGesture && (a.isMouseDown && !mxEvent.isConsumed(b)) && a.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(b, c(b))) - }); - this.endHandler = mxUtils.bind(this, function(b) { - this.captureDocumentGesture && a.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(b)) - }); - mxEvent.addGestureListeners(document, null, this.moveHandler, this.endHandler) - } -}; -mxGraphView.prototype.createHtml = function() { - var a = this.graph.container; - null != a && (this.canvas = this.createHtmlPane("100%", "100%"), this.backgroundPane = this.createHtmlPane("1px", "1px"), this.drawPane = this.createHtmlPane("1px", "1px"), this.overlayPane = - this.createHtmlPane("1px", "1px"), this.canvas.appendChild(this.backgroundPane), this.canvas.appendChild(this.drawPane), this.canvas.appendChild(this.overlayPane), a.appendChild(this.canvas), - mxClient.IS_QUIRKS && (a = mxUtils.bind(this, function(a) { - a = this.getGraphBounds(); - this.updateHtmlCanvasSize(a.x + a.width + this.graph.border, a.y + a.height + this.graph.border) - }), mxEvent.addListener(window, "resize", a))) -}; -mxGraphView.prototype.updateHtmlCanvasSize = function(a, b) { - if (null != this.graph.container) { - var c = this.graph.container.offsetHeight; - this.canvas.style.width = this.graph.container.offsetWidth < a ? a + "px" : "100%"; - this.canvas.style.height = c < b ? b + "px" : "100%" - } -}; -mxGraphView.prototype.createHtmlPane = function(a, b) { - var c = document.createElement("DIV"); - null != a && null != b ? (c.style.position = "absolute", c.style.left = "0px", c.style.top = "0px", c.style.width = a, c.style.height = b) : c.style.position = "relative"; - return c -}; -mxGraphView.prototype.createVml = function() { - var a = this.graph.container; - if (null != a) { - var b = a.offsetWidth, - c = a.offsetHeight; - this.canvas = this.createVmlPane(b, c); - this.backgroundPane = this.createVmlPane(b, c); - this.drawPane = this.createVmlPane(b, c); - this.overlayPane = this.createVmlPane(b, c); - this.canvas.appendChild(this.backgroundPane); - this.canvas.appendChild(this.drawPane); - this.canvas.appendChild(this.overlayPane); - a.appendChild(this.canvas) - } -}; -mxGraphView.prototype.createVmlPane = function(a, b) { - var c = document.createElement(mxClient.VML_PREFIX + ":group"); - c.style.position = "absolute"; - c.style.left = "0px"; - c.style.top = "0px"; - c.style.width = a + "px"; - c.style.height = b + "px"; - c.setAttribute("coordsize", a + "," + b); - c.setAttribute("coordorigin", "0,0"); - return c -}; -mxGraphView.prototype.createSvg = function() { - var a = this.graph.container; - this.canvas = document.createElementNS(mxConstants.NS_SVG, "g"); - this.backgroundPane = document.createElementNS(mxConstants.NS_SVG, "g"); - this.canvas.appendChild(this.backgroundPane); - this.drawPane = document.createElementNS(mxConstants.NS_SVG, "g"); - this.canvas.appendChild(this.drawPane); - this.overlayPane = document.createElementNS(mxConstants.NS_SVG, "g"); - this.canvas.appendChild(this.overlayPane); - var b = document.createElementNS(mxConstants.NS_SVG, - "svg"); - b.style.width = "100%"; - b.style.height = "100%"; - b.style.display = "block"; - b.appendChild(this.canvas); - null != a && (a.appendChild(b), "static" == mxUtils.getCurrentStyle(a).position && (a.style.position = "relative")) -}; -mxGraphView.prototype.destroy = function() { - var a = null != this.canvas ? this.canvas.ownerSVGElement : null; - null == a && (a = this.canvas); - null != a && null != a.parentNode && (this.clear(this.currentRoot, !0), mxEvent.removeGestureListeners(document, null, this.moveHandler, this.endHandler), mxEvent.release(this.graph.container), a - .parentNode.removeChild(a), this.overlayPane = this.drawPane = this.backgroundPane = this.canvas = this.endHandler = this.moveHandler = null) -}; - -function mxCurrentRootChange(a, b) { - this.view = a; - this.previous = this.root = b; - this.isUp = null == b; - if (!this.isUp) - for (var c = this.view.currentRoot, d = this.view.graph.getModel(); null != c;) { - if (c == b) { - this.isUp = !0; - break - } - c = d.getParent(c) - } -} -mxCurrentRootChange.prototype.execute = function() { - var a = this.view.currentRoot; - this.view.currentRoot = this.previous; - this.previous = a; - a = this.view.graph.getTranslateForRoot(this.view.currentRoot); - null != a && (this.view.translate = new mxPoint(-a.x, -a.y)); - this.view.fireEvent(new mxEventObject(this.isUp ? mxEvent.UP : mxEvent.DOWN, "root", this.view.currentRoot, "previous", this.previous)); - this.isUp ? (this.view.clear(this.view.currentRoot, !0), this.view.validate()) : this.view.refresh(); - this.isUp = !this.isUp -}; - -function mxGraph(a, b, c, d) { - this.mouseListeners = null; - this.renderHint = c; - this.dialect = mxClient.IS_SVG ? mxConstants.DIALECT_SVG : c == mxConstants.RENDERING_HINT_EXACT && mxClient.IS_VML ? mxConstants.DIALECT_VML : c == mxConstants.RENDERING_HINT_FASTEST ? mxConstants - .DIALECT_STRICTHTML : c == mxConstants.RENDERING_HINT_FASTER ? mxConstants.DIALECT_PREFERHTML : mxConstants.DIALECT_MIXEDHTML; - this.model = null != b ? b : new mxGraphModel; - this.multiplicities = []; - this.imageBundles = []; - this.cellRenderer = this.createCellRenderer(); - this.setSelectionModel(this.createSelectionModel()); - this.setStylesheet(null != d ? d : this.createStylesheet()); - this.view = this.createGraphView(); - this.graphModelChangeListener = mxUtils.bind(this, function(a, b) { - this.graphModelChanged(b.getProperty("edit").changes) - }); - this.model.addListener(mxEvent.CHANGE, this.graphModelChangeListener); - this.createHandlers(); - null != a && this.init(a); - this.view.revalidate() -} -mxLoadResources && mxResources.add(mxClient.basePath + "/resources/graph"); -mxGraph.prototype = new mxEventSource; -mxGraph.prototype.constructor = mxGraph; -mxGraph.prototype.EMPTY_ARRAY = []; -mxGraph.prototype.mouseListeners = null; -mxGraph.prototype.isMouseDown = !1; -mxGraph.prototype.model = null; -mxGraph.prototype.view = null; -mxGraph.prototype.stylesheet = null; -mxGraph.prototype.selectionModel = null; -mxGraph.prototype.cellEditor = null; -mxGraph.prototype.cellRenderer = null; -mxGraph.prototype.multiplicities = null; -mxGraph.prototype.renderHint = null; -mxGraph.prototype.dialect = null; -mxGraph.prototype.gridSize = 10; -mxGraph.prototype.gridEnabled = !0; -mxGraph.prototype.portsEnabled = !0; -mxGraph.prototype.doubleTapEnabled = !0; -mxGraph.prototype.doubleTapTimeout = 700; -mxGraph.prototype.doubleTapTolerance = 25; -mxGraph.prototype.lastTouchY = 0; -mxGraph.prototype.lastTouchY = 0; -mxGraph.prototype.lastTouchTime = 0; -mxGraph.prototype.gestureEnabled = !0; -mxGraph.prototype.tolerance = 4; -mxGraph.prototype.defaultOverlap = 0.5; -mxGraph.prototype.defaultParent = null; -mxGraph.prototype.alternateEdgeStyle = null; -mxGraph.prototype.backgroundImage = null; -mxGraph.prototype.pageVisible = !1; -mxGraph.prototype.pageBreaksVisible = !1; -mxGraph.prototype.pageBreakColor = "gray"; -mxGraph.prototype.pageBreakDashed = !0; -mxGraph.prototype.minPageBreakDist = 20; -mxGraph.prototype.preferPageSize = !1; -mxGraph.prototype.pageFormat = mxConstants.PAGE_FORMAT_A4_PORTRAIT; -mxGraph.prototype.pageScale = 1.5; -mxGraph.prototype.enabled = !0; -mxGraph.prototype.escapeEnabled = !0; -mxGraph.prototype.invokesStopCellEditing = !0; -mxGraph.prototype.enterStopsCellEditing = !1; -mxGraph.prototype.useScrollbarsForPanning = !0; -mxGraph.prototype.exportEnabled = !0; -mxGraph.prototype.importEnabled = !0; -mxGraph.prototype.cellsLocked = !1; -mxGraph.prototype.cellsCloneable = !0; -mxGraph.prototype.foldingEnabled = !0; -mxGraph.prototype.cellsEditable = !0; -mxGraph.prototype.cellsDeletable = !0; -mxGraph.prototype.cellsMovable = !0; -mxGraph.prototype.edgeLabelsMovable = !0; -mxGraph.prototype.vertexLabelsMovable = !1; -mxGraph.prototype.dropEnabled = !1; -mxGraph.prototype.splitEnabled = !0; -mxGraph.prototype.cellsResizable = !0; -mxGraph.prototype.cellsBendable = !0; -mxGraph.prototype.cellsSelectable = !0; -mxGraph.prototype.cellsDisconnectable = !0; -mxGraph.prototype.autoSizeCells = !1; -mxGraph.prototype.autoScroll = !0; -mxGraph.prototype.timerAutoScroll = !1; -mxGraph.prototype.allowAutoPanning = !1; -mxGraph.prototype.ignoreScrollbars = !1; -mxGraph.prototype.autoExtend = !0; -mxGraph.prototype.maximumGraphBounds = null; -mxGraph.prototype.minimumGraphSize = null; -mxGraph.prototype.minimumContainerSize = null; -mxGraph.prototype.maximumContainerSize = null; -mxGraph.prototype.resizeContainer = !1; -mxGraph.prototype.border = 0; -mxGraph.prototype.ordered = !0; -mxGraph.prototype.keepEdgesInForeground = !1; -mxGraph.prototype.keepEdgesInBackground = !0; -mxGraph.prototype.allowNegativeCoordinates = !0; -mxGraph.prototype.constrainChildren = !0; -mxGraph.prototype.extendParents = !0; -mxGraph.prototype.extendParentsOnAdd = !0; -mxGraph.prototype.collapseToPreferredSize = !0; -mxGraph.prototype.zoomFactor = 1.2; -mxGraph.prototype.keepSelectionVisibleOnZoom = !1; -mxGraph.prototype.centerZoom = !0; -mxGraph.prototype.resetViewOnRootChange = !0; -mxGraph.prototype.resetEdgesOnResize = !1; -mxGraph.prototype.resetEdgesOnMove = !1; -mxGraph.prototype.resetEdgesOnConnect = !0; -mxGraph.prototype.allowLoops = !1; -mxGraph.prototype.defaultLoopStyle = mxEdgeStyle.Loop; -mxGraph.prototype.multigraph = !0; -mxGraph.prototype.connectableEdges = !1; -mxGraph.prototype.allowDanglingEdges = !0; -mxGraph.prototype.cloneInvalidEdges = !1; -mxGraph.prototype.disconnectOnMove = !0; -mxGraph.prototype.labelsVisible = !0; -mxGraph.prototype.htmlLabels = !1; -mxGraph.prototype.swimlaneSelectionEnabled = !0; -mxGraph.prototype.swimlaneNesting = !0; -mxGraph.prototype.swimlaneIndicatorColorAttribute = mxConstants.STYLE_FILLCOLOR; -mxGraph.prototype.imageBundles = null; -mxGraph.prototype.minFitScale = 0.1; -mxGraph.prototype.maxFitScale = 8; -mxGraph.prototype.panDx = 0; -mxGraph.prototype.panDy = 0; -mxGraph.prototype.collapsedImage = new mxImage(mxClient.imageBasePath + "/collapsed.gif", 9, 9); -mxGraph.prototype.expandedImage = new mxImage(mxClient.imageBasePath + "/expanded.gif", 9, 9); -// mxGraph.prototype.warningImage = new mxImage(mxClient.imageBasePath + "/warning" + (mxClient.IS_MAC ? ".png" : ".gif"), 16, 16); -mxGraph.prototype.warningImage = new mxImage("/assets/plugins/mxgraph/images/warning.gif", 16, 16); - - -mxGraph.prototype.alreadyConnectedResource = "none" != mxClient.language ? "alreadyConnected" : ""; -mxGraph.prototype.containsValidationErrorsResource = "none" != mxClient.language ? "containsValidationErrors" : ""; -mxGraph.prototype.collapseExpandResource = "none" != mxClient.language ? "collapse-expand" : ""; -mxGraph.prototype.init = function(a) { - this.container = a; - this.cellEditor = this.createCellEditor(); - this.view.init(); - this.sizeDidChange(); - mxClient.IS_IE && (mxEvent.addListener(window, "unload", mxUtils.bind(this, function() { - this.destroy() - })), mxEvent.addListener(a, "selectstart", mxUtils.bind(this, function() { - return this.isEditing() - }))); - 8 == document.documentMode && a.insertAdjacentHTML("beforeend", '\x3cv:group style\x3d"DISPLAY: none;"\x3e\x3c/v:group\x3e') -}; -mxGraph.prototype.createHandlers = function(a) { - this.tooltipHandler = new mxTooltipHandler(this); - this.tooltipHandler.setEnabled(!1); - this.panningHandler = new mxPanningHandler(this); - this.panningHandler.panningEnabled = !1; - this.selectionCellsHandler = new mxSelectionCellsHandler(this); - this.connectionHandler = new mxConnectionHandler(this); - this.connectionHandler.setEnabled(!1); - this.graphHandler = new mxGraphHandler(this) -}; -mxGraph.prototype.createSelectionModel = function() { - return new mxGraphSelectionModel(this) -}; -mxGraph.prototype.createStylesheet = function() { - return new mxStylesheet -}; -mxGraph.prototype.createGraphView = function() { - return new mxGraphView(this) -}; -mxGraph.prototype.createCellRenderer = function() { - return new mxCellRenderer -}; -mxGraph.prototype.createCellEditor = function() { - return new mxCellEditor(this) -}; -mxGraph.prototype.getModel = function() { - return this.model -}; -mxGraph.prototype.getView = function() { - return this.view -}; -mxGraph.prototype.getStylesheet = function() { - return this.stylesheet -}; -mxGraph.prototype.setStylesheet = function(a) { - this.stylesheet = a -}; -mxGraph.prototype.getSelectionModel = function() { - return this.selectionModel -}; -mxGraph.prototype.setSelectionModel = function(a) { - this.selectionModel = a -}; -mxGraph.prototype.getSelectionCellsForChanges = function(a) { - for (var b = [], c = 0; c < a.length; c++) { - var d = a[c]; - if (d.constructor != mxRootChange) { - var e = null; - d instanceof mxChildChange && null == d.previous ? e = d.child : null != d.cell && d.cell instanceof mxCell && (e = d.cell); - null != e && 0 > mxUtils.indexOf(b, e) && b.push(e) - } - } - return this.getModel().getTopmostCells(b) -}; -mxGraph.prototype.graphModelChanged = function(a) { - for (var b = 0; b < a.length; b++) this.processChange(a[b]); - this.removeSelectionCells(this.getRemovedCellsForChanges(a)); - this.view.validate(); - this.sizeDidChange() -}; -mxGraph.prototype.getRemovedCellsForChanges = function(a) { - for (var b = [], c = 0; c < a.length; c++) { - var d = a[c]; - if (d instanceof mxRootChange) break; - else d instanceof mxChildChange ? null != d.previous && null == d.parent && (b = b.concat(this.model.getDescendants(d.child))) : d instanceof mxVisibleChange && (b = b.concat(this.model.getDescendants( - d.cell))) - } - return b -}; -mxGraph.prototype.processChange = function(a) { - if (a instanceof mxRootChange) this.clearSelection(), this.removeStateForCell(a.previous), this.resetViewOnRootChange && (this.view.scale = 1, this.view.translate.x = 0, this.view.translate.y = 0), - this.fireEvent(new mxEventObject(mxEvent.ROOT)); - else if (a instanceof mxChildChange) { - var b = this.model.getParent(a.child); - null != b ? this.view.invalidate(a.child, !0, !1, null != a.previous) : (this.removeStateForCell(a.child), this.view.currentRoot == a.child && this.home()); - b != a.previous && - (null != b && this.view.invalidate(b, !1, !1), null != a.previous && this.view.invalidate(a.previous, !1, !1)) - } else a instanceof mxTerminalChange || a instanceof mxGeometryChange ? this.view.invalidate(a.cell) : a instanceof mxValueChange ? this.view.invalidate(a.cell, !1, !1) : a instanceof mxStyleChange ? - (this.view.invalidate(a.cell, !0, !0, !1), this.view.removeState(a.cell)) : null != a.cell && a.cell instanceof mxCell && this.removeStateForCell(a.cell) -}; -mxGraph.prototype.removeStateForCell = function(a) { - for (var b = this.model.getChildCount(a), c = 0; c < b; c++) this.removeStateForCell(this.model.getChildAt(a, c)); - this.view.removeState(a) -}; -mxGraph.prototype.addCellOverlay = function(a, b) { - null == a.overlays && (a.overlays = []); - a.overlays.push(b); - var c = this.view.getState(a); - null != c && this.cellRenderer.redraw(c); - this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY, "cell", a, "overlay", b)); - return b -}; -mxGraph.prototype.getCellOverlays = function(a) { - return a.overlays -}; -mxGraph.prototype.removeCellOverlay = function(a, b) { - if (null == b) this.removeCellOverlays(a); - else { - var c = mxUtils.indexOf(a.overlays, b); - 0 <= c ? (a.overlays.splice(c, 1), 0 == a.overlays.length && (a.overlays = null), c = this.view.getState(a), null != c && this.cellRenderer.redraw(c), this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY, - "cell", a, "overlay", b))) : b = null - } - return b -}; -mxGraph.prototype.removeCellOverlays = function(a) { - var b = a.overlays; - if (null != b) { - a.overlays = null; - var c = this.view.getState(a); - null != c && this.cellRenderer.redraw(c); - for (c = 0; c < b.length; c++) this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY, "cell", a, "overlay", b[c])) - } - return b -}; -mxGraph.prototype.clearCellOverlays = function(a) { - a = null != a ? a : this.model.getRoot(); - this.removeCellOverlays(a); - for (var b = this.model.getChildCount(a), c = 0; c < b; c++) { - var d = this.model.getChildAt(a, c); - this.clearCellOverlays(d) - } -}; -mxGraph.prototype.setCellWarning = function(a, b, c, d) { - if (null != b && 0 < b.length) return c = null != c ? c : this.warningImage, b = new mxCellOverlay(c, "\x3cfont color\x3dred\x3e" + b + "\x3c/font\x3e"), d && b.addListener(mxEvent.CLICK, mxUtils - .bind(this, function(b, c) { - this.isEnabled() && this.setSelectionCell(a) - })), this.addCellOverlay(a, b); - this.removeCellOverlays(a); - return null -}; -mxGraph.prototype.startEditing = function(a) { - this.startEditingAtCell(null, a) -}; -mxGraph.prototype.startEditingAtCell = function(a, b) { - null == a && (a = this.getSelectionCell(), null != a && !this.isCellEditable(a) && (a = null)); - null != a && (this.fireEvent(new mxEventObject(mxEvent.START_EDITING, "cell", a, "event", b)), this.cellEditor.startEditing(a, b)) -}; -mxGraph.prototype.getEditingValue = function(a, b) { - return this.convertValueToString(a) -}; -mxGraph.prototype.stopEditing = function(a) { - this.cellEditor.stopEditing(a) -}; -mxGraph.prototype.labelChanged = function(a, b, c) { - this.model.beginUpdate(); - try { - this.cellLabelChanged(a, b, this.isAutoSizeCell(a)), this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED, "cell", a, "value", b, "event", c)) - } finally { - this.model.endUpdate() - } - return a -}; -mxGraph.prototype.cellLabelChanged = function(a, b, c) { - this.model.beginUpdate(); - try { - this.model.setValue(a, b), c && this.cellSizeUpdated(a, !1) - } finally { - this.model.endUpdate() - } -}; -mxGraph.prototype.escape = function(a) { - this.stopEditing(!0); - this.connectionHandler.reset(); - this.graphHandler.reset(); - a = this.getSelectionCells(); - for (var b = 0; b < a.length; b++) { - var c = this.view.getState(a[b]); - null != c && null != c.handler && c.handler.reset() - } -}; -mxGraph.prototype.click = function(a) { - var b = a.getEvent(), - c = a.getCell(), - d = new mxEventObject(mxEvent.CLICK, "event", b, "cell", c); - a.isConsumed() && d.consume(); - this.fireEvent(d); - this.isEnabled() && (!mxEvent.isConsumed(b) && !d.isConsumed()) && (null != c ? this.selectCellForEvent(c, b) : (c = null, this.isSwimlaneSelectionEnabled() && (c = this.getSwimlaneAt(a.getGraphX(), - a.getGraphY())), null != c ? this.selectCellForEvent(c, b) : this.isToggleEvent(b) || this.clearSelection())) -}; -mxGraph.prototype.dblClick = function(a, b) { - var c = new mxEventObject(mxEvent.DOUBLE_CLICK, "event", a, "cell", b); - this.fireEvent(c); - this.isEnabled() && (!mxEvent.isConsumed(a) && !c.isConsumed() && null != b && this.isCellEditable(b)) && this.startEditingAtCell(b, a) -}; -mxGraph.prototype.scrollPointToVisible = function(a, b, c, d) { - if (!this.timerAutoScroll && (this.ignoreScrollbars || mxUtils.hasScrollbars(this.container))) { - var e = this.container; - d = null != d ? d : 20; - if (a >= e.scrollLeft && b >= e.scrollTop && a <= e.scrollLeft + e.clientWidth && b <= e.scrollTop + e.clientHeight) { - var f = e.scrollLeft + e.clientWidth - a; - if (f < d) { - if (a = e.scrollLeft, e.scrollLeft += d - f, c && a == e.scrollLeft) { - if (this.dialect == mxConstants.DIALECT_SVG) { - a = this.view.getDrawPane().ownerSVGElement; - var g = this.container.scrollWidth + d - f - } else g = - Math.max(e.clientWidth, e.scrollWidth) + d - f, a = this.view.getCanvas(); - a.style.width = g + "px"; - e.scrollLeft += d - f - } - } else f = a - e.scrollLeft, f < d && (e.scrollLeft -= d - f); - f = e.scrollTop + e.clientHeight - b; - f < d ? (a = e.scrollTop, e.scrollTop += d - f, a == e.scrollTop && c && (this.dialect == mxConstants.DIALECT_SVG ? (a = this.view.getDrawPane().ownerSVGElement, b = this.container.scrollHeight + - d - f) : (b = Math.max(e.clientHeight, e.scrollHeight) + d - f, a = this.view.getCanvas()), a.style.height = b + "px", e.scrollTop += d - f)) : (f = b - e.scrollTop, f < d && (e.scrollTop -= - d - f)) - } - } else this.allowAutoPanning && !this.panningHandler.active && (null == this.panningManager && (this.panningManager = this.createPanningManager()), this.panningManager.panTo(a + this.panDx, b + - this.panDy)) -}; -mxGraph.prototype.createPanningManager = function() { - return new mxPanningManager(this) -}; -mxGraph.prototype.getBorderSizes = function() { - function a(a) { - var b = 0, - b = "thin" == a ? 2 : "medium" == a ? 4 : "thick" == a ? 6 : parseInt(a); - isNaN(b) && (b = 0); - return b - } - var b = mxUtils.getCurrentStyle(this.container), - c = new mxRectangle; - c.x = a(b.borderLeftWidth) + parseInt(b.paddingLeft || 0); - c.y = a(b.borderTopWidth) + parseInt(b.paddingTop || 0); - c.width = a(b.borderRightWidth) + parseInt(b.paddingRight || 0); - c.height = a(b.borderBottomWidth) + parseInt(b.paddingBottom || 0); - return c -}; -mxGraph.prototype.getPreferredPageSize = function(a, b, c) { - a = this.view.scale; - var d = this.view.translate, - e = this.pageFormat, - f = a * this.pageScale, - e = new mxRectangle(0, 0, e.width * f, e.height * f); - b = this.pageBreaksVisible ? Math.ceil(b / e.width) : 1; - c = this.pageBreaksVisible ? Math.ceil(c / e.height) : 1; - return new mxRectangle(0, 0, b * e.width + 2 + d.x / a, c * e.height + 2 + d.y / a) -}; -mxGraph.prototype.sizeDidChange = function() { - var a = this.getGraphBounds(); - if (null != this.container) { - var b = this.getBorder(), - c = Math.max(0, a.x + a.width + 1 + b), - b = Math.max(0, a.y + a.height + 1 + b); - null != this.minimumContainerSize && (c = Math.max(c, this.minimumContainerSize.width), b = Math.max(b, this.minimumContainerSize.height)); - this.resizeContainer && this.doResizeContainer(c, b); - if (this.preferPageSize || !mxClient.IS_IE && this.pageVisible) { - var d = this.getPreferredPageSize(a, c, b); - null != d && (c = d.width, b = d.height) - } - null != this.minimumGraphSize && - (c = Math.max(c, this.minimumGraphSize.width * this.view.scale), b = Math.max(b, this.minimumGraphSize.height * this.view.scale)); - c = Math.ceil(c - 1); - b = Math.ceil(b - 1); - this.dialect == mxConstants.DIALECT_SVG ? (d = this.view.getDrawPane().ownerSVGElement, d.style.minWidth = Math.max(1, c) + "px", d.style.minHeight = Math.max(1, b) + "px", d.style.width = - "100%", d.style.height = "100%") : mxClient.IS_QUIRKS ? this.view.updateHtmlCanvasSize(Math.max(1, c), Math.max(1, b)) : (this.view.canvas.style.minWidth = Math.max(1, c) + "px", this.view.canvas - .style.minHeight = - Math.max(1, b) + "px"); - this.updatePageBreaks(this.pageBreaksVisible, c - 1, b - 1) - } - this.fireEvent(new mxEventObject(mxEvent.SIZE, "bounds", a)) -}; -mxGraph.prototype.doResizeContainer = function(a, b) { - if (mxClient.IS_IE) - if (mxClient.IS_QUIRKS) { - var c = this.getBorderSizes(); - a += Math.max(2, c.x + c.width + 1); - b += Math.max(2, c.y + c.height + 1) - } else 9 <= document.documentMode ? (a += 3, b += 5) : (a += 1, b += 1); - else b += 1; - null != this.maximumContainerSize && (a = Math.min(this.maximumContainerSize.width, a), b = Math.min(this.maximumContainerSize.height, b)); - this.container.style.width = Math.ceil(a) + "px"; - this.container.style.height = Math.ceil(b) + "px" -}; -mxGraph.prototype.updatePageBreaks = function(a, b, c) { - var d = this.view.scale, - e = this.view.translate, - f = this.pageFormat, - g = d * this.pageScale, - e = new mxRectangle(d * e.x, d * e.y, f.width * g, f.height * g); - a = a && Math.min(e.width, e.height) > this.minPageBreakDist; - e.x = mxUtils.mod(e.x, e.width); - e.y = mxUtils.mod(e.y, e.height); - f = a ? Math.ceil((b - e.x) / e.width) : 0; - a = a ? Math.ceil((c - e.y) / e.height) : 0; - null == this.horizontalPageBreaks && 0 < f && (this.horizontalPageBreaks = []); - if (null != this.horizontalPageBreaks) { - for (g = 0; g <= f; g++) { - var h = [new mxPoint(e.x + - g * e.width, 1), new mxPoint(e.x + g * e.width, c)]; - null != this.horizontalPageBreaks[g] ? (this.horizontalPageBreaks[g].scale = 1, this.horizontalPageBreaks[g].points = h, this.horizontalPageBreaks[g].redraw()) : (h = new mxPolyline(h, this.pageBreakColor, - this.scale), h.dialect = this.dialect, h.isDashed = this.pageBreakDashed, h.scale = d, h.init(this.view.backgroundPane), h.redraw(), this.horizontalPageBreaks[g] = h) - } - for (g = f; g < this.horizontalPageBreaks.length; g++) this.horizontalPageBreaks[g].destroy(); - this.horizontalPageBreaks.splice(f, - this.horizontalPageBreaks.length - f) - } - null == this.verticalPageBreaks && 0 < a && (this.verticalPageBreaks = []); - if (null != this.verticalPageBreaks) { - for (g = 0; g <= a; g++) h = [new mxPoint(1, e.y + g * e.height), new mxPoint(b, e.y + g * e.height)], null != this.verticalPageBreaks[g] ? (this.verticalPageBreaks[g].scale = 1, this.verticalPageBreaks[ - g].points = h, this.verticalPageBreaks[g].redraw()) : (h = new mxPolyline(h, this.pageBreakColor, d), h.dialect = this.dialect, h.isDashed = this.pageBreakDashed, h.scale = d, h.init(this.view - .backgroundPane), h.redraw(), - this.verticalPageBreaks[g] = h); - for (g = a; g < this.verticalPageBreaks.length; g++) this.verticalPageBreaks[g].destroy(); - this.verticalPageBreaks.splice(a, this.verticalPageBreaks.length - a) - } -}; -mxGraph.prototype.getCellStyle = function(a) { - var b = this.model.getStyle(a), - c = null, - c = this.model.isEdge(a) ? this.stylesheet.getDefaultEdgeStyle() : this.stylesheet.getDefaultVertexStyle(); - null != b && (c = this.postProcessCellStyle(this.stylesheet.getCellStyle(b, c))); - null == c && (c = mxGraph.prototype.EMPTY_ARRAY); - return c -}; -mxGraph.prototype.postProcessCellStyle = function(a) { - if (null != a) { - var b = a[mxConstants.STYLE_IMAGE], - c = this.getImageFromBundles(b); - null != c ? a[mxConstants.STYLE_IMAGE] = c : c = b; - null != c && "data:image/" == c.substring(0, 11) && (b = c.indexOf(","), 0 < b && (c = c.substring(0, b) + ";base64," + c.substring(b + 1)), a[mxConstants.STYLE_IMAGE] = c) - } - return a -}; -mxGraph.prototype.setCellStyle = function(a, b) { - b = b || this.getSelectionCells(); - if (null != b) { - this.model.beginUpdate(); - try { - for (var c = 0; c < b.length; c++) this.model.setStyle(b[c], a) - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.toggleCellStyle = function(a, b, c) { - c = c || this.getSelectionCell(); - this.toggleCellStyles(a, b, [c]) -}; -mxGraph.prototype.toggleCellStyles = function(a, b, c) { - b = null != b ? b : !1; - c = c || this.getSelectionCells(); - if (null != c && 0 < c.length) { - var d = this.view.getState(c[0]), - d = null != d ? d.style : this.getCellStyle(c[0]); - null != d && (b = mxUtils.getValue(d, a, b) ? 0 : 1, this.setCellStyles(a, b, c)) - } -}; -mxGraph.prototype.setCellStyles = function(a, b, c) { - c = c || this.getSelectionCells(); - mxUtils.setCellStyles(this.model, c, a, b) -}; -mxGraph.prototype.toggleCellStyleFlags = function(a, b, c) { - this.setCellStyleFlags(a, b, null, c) -}; -mxGraph.prototype.setCellStyleFlags = function(a, b, c, d) { - d = d || this.getSelectionCells(); - if (null != d && 0 < d.length) { - if (null == c) { - var e = this.view.getState(d[0]), - e = null != e ? e.style : this.getCellStyle(d[0]); - null != e && (c = (parseInt(e[a] || 0) & b) != b) - } - mxUtils.setCellStyleFlags(this.model, d, a, b, c) - } -}; -mxGraph.prototype.alignCells = function(a, b, c) { - null == b && (b = this.getSelectionCells()); - if (null != b && 1 < b.length) { - if (null == c) - for (var d = 0; d < b.length; d++) { - var e = this.getCellGeometry(b[d]); - if (null != e && !this.model.isEdge(b[d])) - if (null == c) - if (a == mxConstants.ALIGN_CENTER) { - c = e.x + e.width / 2; - break - } else if (a == mxConstants.ALIGN_RIGHT) c = e.x + e.width; - else if (a == mxConstants.ALIGN_TOP) c = e.y; - else if (a == mxConstants.ALIGN_MIDDLE) { - c = e.y + e.height / 2; - break - } else c = a == mxConstants.ALIGN_BOTTOM ? e.y + e.height : e.x; - else c = a == mxConstants.ALIGN_RIGHT ? - Math.max(c, e.x + e.width) : a == mxConstants.ALIGN_TOP ? Math.min(c, e.y) : a == mxConstants.ALIGN_BOTTOM ? Math.max(c, e.y + e.height) : Math.min(c, e.x) - } - if (null != c) { - this.model.beginUpdate(); - try { - for (d = 0; d < b.length; d++) e = this.getCellGeometry(b[d]), null != e && !this.model.isEdge(b[d]) && (e = e.clone(), a == mxConstants.ALIGN_CENTER ? e.x = c - e.width / 2 : a == - mxConstants.ALIGN_RIGHT ? e.x = c - e.width : a == mxConstants.ALIGN_TOP ? e.y = c : a == mxConstants.ALIGN_MIDDLE ? e.y = c - e.height / 2 : a == mxConstants.ALIGN_BOTTOM ? e.y = c - e - .height : e.x = c, this.model.setGeometry(b[d], - e)); - this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS, "align", a, "cells", b)) - } finally { - this.model.endUpdate() - } - } - } - return b -}; -mxGraph.prototype.flipEdge = function(a) { - if (null != a && null != this.alternateEdgeStyle) { - this.model.beginUpdate(); - try { - var b = this.model.getStyle(a); - null == b || 0 == b.length ? this.model.setStyle(a, this.alternateEdgeStyle) : this.model.setStyle(a, null); - this.resetEdge(a); - this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE, "edge", a)) - } finally { - this.model.endUpdate() - } - } - return a -}; -mxGraph.prototype.addImageBundle = function(a) { - this.imageBundles.push(a) -}; -mxGraph.prototype.removeImageBundle = function(a) { - for (var b = [], c = 0; c < this.imageBundles.length; c++) this.imageBundles[c] != a && b.push(this.imageBundles[c]); - this.imageBundles = b -}; -mxGraph.prototype.getImageFromBundles = function(a) { - if (null != a) - for (var b = 0; b < this.imageBundles.length; b++) { - var c = this.imageBundles[b].getImage(a); - if (null != c) return c - } - return null -}; -mxGraph.prototype.orderCells = function(a, b) { - null == b && (b = mxUtils.sortCells(this.getSelectionCells(), !0)); - this.model.beginUpdate(); - try { - this.cellsOrdered(b, a), this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS, "back", a, "cells", b)) - } finally { - this.model.endUpdate() - } - return b -}; -mxGraph.prototype.cellsOrdered = function(a, b) { - if (null != a) { - this.model.beginUpdate(); - try { - for (var c = 0; c < a.length; c++) { - var d = this.model.getParent(a[c]); - b ? this.model.add(d, a[c], c) : this.model.add(d, a[c], this.model.getChildCount(d) - 1) - } - this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED, "back", b, "cells", a)) - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.groupCells = function(a, b, c) { - null == c && (c = mxUtils.sortCells(this.getSelectionCells(), !0)); - c = this.getCellsForGroup(c); - null == a && (a = this.createGroupCell(c)); - var d = this.getBoundsForGroup(a, c, b); - if (0 < c.length && null != d) { - var e = this.model.getParent(a); - null == e && (e = this.model.getParent(c[0])); - this.model.beginUpdate(); - try { - null == this.getCellGeometry(a) && this.model.setGeometry(a, new mxGeometry); - var f = this.model.getChildCount(e); - this.cellsAdded([a], e, f, null, null, !1); - f = this.model.getChildCount(a); - this.cellsAdded(c, a, f, null, null, !1, !1); - this.cellsMoved(c, -d.x, -d.y, !1, !0); - this.cellsResized([a], [d]); - this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS, "group", a, "border", b, "cells", c)) - } finally { - this.model.endUpdate() - } - } - return a -}; -mxGraph.prototype.getCellsForGroup = function(a) { - var b = []; - if (null != a && 0 < a.length) { - var c = this.model.getParent(a[0]); - b.push(a[0]); - for (var d = 1; d < a.length; d++) this.model.getParent(a[d]) == c && b.push(a[d]) - } - return b -}; -mxGraph.prototype.getBoundsForGroup = function(a, b, c) { - b = this.getBoundingBoxFromGeometry(b); - null != b && (this.isSwimlane(a) && (a = this.getStartSize(a), b.x -= a.width, b.y -= a.height, b.width += a.width, b.height += a.height), b.x -= c, b.y -= c, b.width += 2 * c, b.height += 2 * c); - return b -}; -mxGraph.prototype.createGroupCell = function(a) { - a = new mxCell(""); - a.setVertex(!0); - a.setConnectable(!1); - return a -}; -mxGraph.prototype.ungroupCells = function(a) { - var b = []; - if (null == a) { - a = this.getSelectionCells(); - for (var c = [], d = 0; d < a.length; d++) 0 < this.model.getChildCount(a[d]) && c.push(a[d]); - a = c - } - if (null != a && 0 < a.length) { - this.model.beginUpdate(); - try { - for (d = 0; d < a.length; d++) { - var e = this.model.getChildren(a[d]); - if (null != e && 0 < e.length) { - var e = e.slice(), - f = this.model.getParent(a[d]), - g = this.model.getChildCount(f); - this.cellsAdded(e, f, g, null, null, !0); - b = b.concat(e) - } - } - this.cellsRemoved(this.addAllEdges(a)); - this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS, - "cells", a)) - } finally { - this.model.endUpdate() - } - } - return b -}; -mxGraph.prototype.removeCellsFromParent = function(a) { - null == a && (a = this.getSelectionCells()); - this.model.beginUpdate(); - try { - var b = this.getDefaultParent(), - c = this.model.getChildCount(b); - this.cellsAdded(a, b, c, null, null, !0); - this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT, "cells", a)) - } finally { - this.model.endUpdate() - } - return a -}; -mxGraph.prototype.updateGroupBounds = function(a, b, c) { - null == a && (a = this.getSelectionCells()); - b = null != b ? b : 0; - c = null != c ? c : !1; - this.model.beginUpdate(); - try { - for (var d = 0; d < a.length; d++) { - var e = this.getCellGeometry(a[d]); - if (null != e) { - var f = this.getChildCells(a[d]); - if (null != f && 0 < f.length) { - var g = this.getBoundingBoxFromGeometry(f); - if (0 < g.width && 0 < g.height) { - var h = this.isSwimlane(a[d]) ? this.getStartSize(a[d]) : new mxRectangle, - e = e.clone(); - c && (e.x += g.x - h.width - b, e.y += g.y - h.height - b); - e.width = g.width + h.width + 2 * b; - e.height = - g.height + h.height + 2 * b; - this.model.setGeometry(a[d], e); - this.moveCells(f, -g.x + h.width + b, -g.y + h.height + b) - } - } - } - } - } finally { - this.model.endUpdate() - } - return a -}; -mxGraph.prototype.cloneCells = function(a, b) { - b = null != b ? b : !0; - var c = null; - if (null != a) { - for (var d = {}, c = [], e = 0; e < a.length; e++) { - var f = mxCellPath.create(a[e]); - d[f] = a[e]; - c.push(a[e]) - } - if (0 < c.length) - for (var f = this.view.scale, g = this.view.translate, c = this.model.cloneCells(a, !0), e = 0; e < a.length; e++) - if (!b && this.model.isEdge(c[e]) && null != this.getEdgeValidationError(c[e], this.model.getTerminal(c[e], !0), this.model.getTerminal(c[e], !1))) c[e] = null; - else { - var h = this.model.getGeometry(c[e]); - if (null != h) { - var k = this.view.getState(a[e]), - l = this.view.getState(this.model.getParent(a[e])); - if (null != k && null != l) { - var m = l.origin.x, - l = l.origin.y; - if (this.model.isEdge(c[e])) { - for (var k = k.absolutePoints, n = this.model.getTerminal(a[e], !0), p = mxCellPath.create(n); null != n && null == d[p];) n = this.model.getParent(n), p = mxCellPath.create(n); - null == n && h.setTerminalPoint(new mxPoint(k[0].x / f - g.x, k[0].y / f - g.y), !0); - n = this.model.getTerminal(a[e], !1); - for (p = mxCellPath.create(n); null != n && null == d[p];) n = this.model.getParent(n), p = mxCellPath.create(n); - null == n && (n = k.length - - 1, h.setTerminalPoint(new mxPoint(k[n].x / f - g.x, k[n].y / f - g.y), !1)); - h = h.points; - if (null != h) - for (k = 0; k < h.length; k++) h[k].x += m, h[k].y += l - } else h.x += m, h.y += l - } - } - } else c = [] - } - return c -}; -mxGraph.prototype.insertVertex = function(a, b, c, d, e, f, g, h, k) { - b = this.createVertex(a, b, c, d, e, f, g, h, k); - return this.addCell(b, a) -}; -mxGraph.prototype.createVertex = function(a, b, c, d, e, f, g, h, k) { - a = new mxGeometry(d, e, f, g); - a.relative = null != k ? k : !1; - c = new mxCell(c, a, h); - c.setId(b); - c.setVertex(!0); - c.setConnectable(!0); - return c -}; -mxGraph.prototype.insertEdge = function(a, b, c, d, e, f) { - b = this.createEdge(a, b, c, d, e, f); - return this.addEdge(b, a, d, e) -}; -mxGraph.prototype.createEdge = function(a, b, c, d, e, f) { - a = new mxCell(c, new mxGeometry, f); - a.setId(b); - a.setEdge(!0); - a.geometry.relative = !0; - return a -}; -mxGraph.prototype.addEdge = function(a, b, c, d, e) { - return this.addCell(a, b, e, c, d) -}; -mxGraph.prototype.addCell = function(a, b, c, d, e) { - return this.addCells([a], b, c, d, e)[0] -}; -mxGraph.prototype.addCells = function(a, b, c, d, e) { - null == b && (b = this.getDefaultParent()); - null == c && (c = this.model.getChildCount(b)); - this.model.beginUpdate(); - try { - this.cellsAdded(a, b, c, d, e, !1, !0), this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS, "cells", a, "parent", b, "index", c, "source", d, "target", e)) - } finally { - this.model.endUpdate() - } - return a -}; -mxGraph.prototype.cellsAdded = function(a, b, c, d, e, f, g) { - if (null != a && null != b && null != c) { - this.model.beginUpdate(); - try { - for (var h = f ? this.view.getState(b) : null, k = null != h ? h.origin : null, l = new mxPoint(0, 0), h = 0; h < a.length; h++) - if (null == a[h]) c--; - else { - var m = this.model.getParent(a[h]); - if (null != k && a[h] != b && b != m) { - var n = this.view.getState(m), - p = null != n ? n.origin : l, - q = this.model.getGeometry(a[h]); - if (null != q) { - var s = p.x - k.x, - r = p.y - k.y, - q = q.clone(); - q.translate(s, r); - !q.relative && (this.model.isVertex(a[h]) && !this.isAllowNegativeCoordinates()) && - (q.x = Math.max(0, q.x), q.y = Math.max(0, q.y)); - this.model.setGeometry(a[h], q) - } - } - b == m && c + h > this.model.getChildCount(b) && c--; - this.model.add(b, a[h], c + h); - this.isExtendParentsOnAdd() && this.isExtendParent(a[h]) && this.extendParent(a[h]); - (null == g || g) && this.constrainChild(a[h]); - null != d && this.cellConnected(a[h], d, !0); - null != e && this.cellConnected(a[h], e, !1) - } - this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED, "cells", a, "parent", b, "index", c, "source", d, "target", e, "absolute", f)) - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.removeCells = function(a, b) { - b = null != b ? b : !0; - null == a && (a = this.getDeletableCells(this.getSelectionCells())); - b && (a = this.getDeletableCells(this.addAllEdges(a))); - this.model.beginUpdate(); - try { - this.cellsRemoved(a), this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS, "cells", a, "includeEdges", b)) - } finally { - this.model.endUpdate() - } - return a -}; -mxGraph.prototype.cellsRemoved = function(a) { - if (null != a && 0 < a.length) { - var b = this.view.scale, - c = this.view.translate; - this.model.beginUpdate(); - try { - for (var d = {}, e = 0; e < a.length; e++) { - var f = mxCellPath.create(a[e]); - d[f] = a[e] - } - for (e = 0; e < a.length; e++) { - for (var g = this.getConnections(a[e]), h = 0; h < g.length; h++) - if (f = mxCellPath.create(g[h]), null == d[f]) { - var k = this.model.getGeometry(g[h]); - if (null != k) { - var l = this.view.getState(g[h]); - if (null != l) { - var k = k.clone(), - m = l.getVisibleTerminal(!0) == a[e], - n = l.absolutePoints, - p = m ? 0 : n.length - - 1; - k.setTerminalPoint(new mxPoint(n[p].x / b - c.x, n[p].y / b - c.y), m); - this.model.setTerminal(g[h], null, m); - this.model.setGeometry(g[h], k) - } - } - } - this.model.remove(a[e]) - } - this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED, "cells", a)) - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.splitEdge = function(a, b, c, d, e) { - d = d || 0; - e = e || 0; - null == c && (c = this.cloneCells([a])[0]); - var f = this.model.getParent(a), - g = this.model.getTerminal(a, !0); - this.model.beginUpdate(); - try { - this.cellsMoved(b, d, e, !1, !1), this.cellsAdded(b, f, this.model.getChildCount(f), null, null, !0), this.cellsAdded([c], f, this.model.getChildCount(f), g, b[0], !1), this.cellConnected(a, b[ - 0], !0), this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE, "edge", a, "cells", b, "newEdge", c, "dx", d, "dy", e)) - } finally { - this.model.endUpdate() - } - return c -}; -mxGraph.prototype.toggleCells = function(a, b, c) { - null == b && (b = this.getSelectionCells()); - c && (b = this.addAllEdges(b)); - this.model.beginUpdate(); - try { - this.cellsToggled(b, a), this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS, "show", a, "cells", b, "includeEdges", c)) - } finally { - this.model.endUpdate() - } - return b -}; -mxGraph.prototype.cellsToggled = function(a, b) { - if (null != a && 0 < a.length) { - this.model.beginUpdate(); - try { - for (var c = 0; c < a.length; c++) this.model.setVisible(a[c], b) - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.foldCells = function(a, b, c, d) { - b = null != b ? b : !1; - null == c && (c = this.getFoldableCells(this.getSelectionCells(), a)); - this.stopEditing(!1); - this.model.beginUpdate(); - try { - this.cellsFolded(c, a, b, d), this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS, "collapse", a, "recurse", b, "cells", c)) - } finally { - this.model.endUpdate() - } - return c -}; -mxGraph.prototype.cellsFolded = function(a, b, c, d) { - if (null != a && 0 < a.length) { - this.model.beginUpdate(); - try { - for (var e = 0; e < a.length; e++) - if ((!d || this.isCellFoldable(a[e], b)) && b != this.isCellCollapsed(a[e])) - if (this.model.setCollapsed(a[e], b), this.swapBounds(a[e], b), this.isExtendParent(a[e]) && this.extendParent(a[e]), c) { - var f = this.model.getChildren(a[e]); - this.foldCells(f, b, c) - } - this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED, "cells", a, "collapse", b, "recurse", c)) - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.swapBounds = function(a, b) { - if (null != a) { - var c = this.model.getGeometry(a); - null != c && (c = c.clone(), this.updateAlternateBounds(a, c, b), c.swap(), this.model.setGeometry(a, c)) - } -}; -mxGraph.prototype.updateAlternateBounds = function(a, b, c) { - if (null != a && null != b) { - c = this.view.getState(a); - c = null != c ? c.style : this.getCellStyle(a); - if (null == b.alternateBounds) { - var d = b; - this.collapseToPreferredSize && (a = this.getPreferredSizeForCell(a), null != a && (d = a, a = mxUtils.getValue(c, mxConstants.STYLE_STARTSIZE), 0 < a && (d.height = Math.max(d.height, a)))); - b.alternateBounds = new mxRectangle(0, 0, d.width, d.height) - } - if (null != b.alternateBounds) { - b.alternateBounds.x = b.x; - b.alternateBounds.y = b.y; - var e = mxUtils.toRadians(c[mxConstants.STYLE_ROTATION] || - "0"); - 0 != e && (a = b.alternateBounds.getCenterX() - b.getCenterX(), c = b.alternateBounds.getCenterY() - b.getCenterY(), d = Math.cos(e), e = Math.sin(e), b.alternateBounds.x += d * a - e * c - a, - b.alternateBounds.y += e * a + d * c - c) - } - } -}; -mxGraph.prototype.addAllEdges = function(a) { - var b = a.slice(); - return b = b.concat(this.getAllEdges(a)) -}; -mxGraph.prototype.getAllEdges = function(a) { - var b = []; - if (null != a) - for (var c = 0; c < a.length; c++) { - for (var d = this.model.getEdgeCount(a[c]), e = 0; e < d; e++) b.push(this.model.getEdgeAt(a[c], e)); - d = this.model.getChildren(a[c]); - b = b.concat(this.getAllEdges(d)) - } - return b -}; -mxGraph.prototype.updateCellSize = function(a, b) { - b = null != b ? b : !1; - this.model.beginUpdate(); - try { - this.cellSizeUpdated(a, b), this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE, "cell", a, "ignoreChildren", b)) - } finally { - this.model.endUpdate() - } - return a -}; -mxGraph.prototype.cellSizeUpdated = function(a, b) { - if (null != a) { - this.model.beginUpdate(); - try { - var c = this.getPreferredSizeForCell(a), - d = this.model.getGeometry(a); - if (null != c && null != d) { - var e = this.isCellCollapsed(a), - d = d.clone(); - if (this.isSwimlane(a)) { - var f = this.view.getState(a), - g = null != f ? f.style : this.getCellStyle(a), - h = this.model.getStyle(a); - null == h && (h = ""); - mxUtils.getValue(g, mxConstants.STYLE_HORIZONTAL, !0) ? (h = mxUtils.setStyle(h, mxConstants.STYLE_STARTSIZE, c.height + 8), e && (d.height = c.height + 8), d.width = c.width) : - (h = mxUtils.setStyle(h, mxConstants.STYLE_STARTSIZE, c.width + 8), e && (d.width = c.width + 8), d.height = c.height); - this.model.setStyle(a, h) - } else d.width = c.width, d.height = c.height; - if (!b && !e) { - var k = this.view.getBounds(this.model.getChildren(a)); - if (null != k) { - var l = this.view.translate, - m = this.view.scale, - n = (k.y + k.height) / m - d.y - l.y; - d.width = Math.max(d.width, (k.x + k.width) / m - d.x - l.x); - d.height = Math.max(d.height, n) - } - } - this.cellsResized([a], [d]) - } - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.getPreferredSizeForCell = function(a) { - var b = null; - if (null != a) { - var c = this.view.getState(a), - d = null != c ? c.style : this.getCellStyle(a); - if (null != d && !this.model.isEdge(a)) { - var e = d[mxConstants.STYLE_FONTSIZE] || mxConstants.DEFAULT_FONTSIZE, - f = 0, - b = 0; - if ((null != this.getImage(c) || null != d[mxConstants.STYLE_IMAGE]) && d[mxConstants.STYLE_SHAPE] == mxConstants.SHAPE_LABEL) d[mxConstants.STYLE_VERTICAL_ALIGN] == mxConstants.ALIGN_MIDDLE && - (f += parseFloat(d[mxConstants.STYLE_IMAGE_WIDTH]) || mxLabel.prototype.imageSize), - d[mxConstants.STYLE_ALIGN] != mxConstants.ALIGN_CENTER && (b += parseFloat(d[mxConstants.STYLE_IMAGE_HEIGHT]) || mxLabel.prototype.imageSize); - f += 2 * (d[mxConstants.STYLE_SPACING] || 0); - f += d[mxConstants.STYLE_SPACING_LEFT] || 0; - f += d[mxConstants.STYLE_SPACING_RIGHT] || 0; - b += 2 * (d[mxConstants.STYLE_SPACING] || 0); - b += d[mxConstants.STYLE_SPACING_TOP] || 0; - b += d[mxConstants.STYLE_SPACING_BOTTOM] || 0; - c = this.getFoldingImage(c); - null != c && (f += c.width + 8); - c = this.getLabel(a); - null != c && 0 < c.length ? (this.isHtmlLabel(a) || (c = c.replace(/\n/g, - "\x3cbr\x3e")), e = mxUtils.getSizeForString(c, e, d[mxConstants.STYLE_FONTFAMILY]), a = e.width + f, b = e.height + b, mxUtils.getValue(d, mxConstants.STYLE_HORIZONTAL, !0) || (d = b, - b = a, a = d), this.gridEnabled && (a = this.snap(a + this.gridSize / 2), b = this.snap(b + this.gridSize / 2)), b = new mxRectangle(0, 0, a, b)) : (d = 4 * this.gridSize, b = new mxRectangle( - 0, 0, d, d)) - } - } - return b -}; -mxGraph.prototype.handleGesture = function(a, b) { - if (0.2 < Math.abs(1 - b.scale)) { - var c = this.view.scale, - d = this.view.translate, - e = a.width * b.scale, - f = a.height * b.scale, - g = a.y - (f - a.height) / 2, - c = new mxRectangle(this.snap((a.x - (e - a.width) / 2) / c) - d.x, this.snap(g / c) - d.y, this.snap(e / c), this.snap(f / c)); - this.resizeCell(a.cell, c) - } -}; -mxGraph.prototype.resizeCell = function(a, b) { - return this.resizeCells([a], [b])[0] -}; -mxGraph.prototype.resizeCells = function(a, b) { - this.model.beginUpdate(); - try { - this.cellsResized(a, b), this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS, "cells", a, "bounds", b)) - } finally { - this.model.endUpdate() - } - return a -}; -mxGraph.prototype.cellsResized = function(a, b) { - if (null != a && null != b && a.length == b.length) { - this.model.beginUpdate(); - try { - for (var c = 0; c < a.length; c++) { - var d = b[c], - e = this.model.getGeometry(a[c]); - if (null != e && (e.x != d.x || e.y != d.y || e.width != d.width || e.height != d.height)) { - e = e.clone(); - if (e.relative) { - var f = e.offset; - null != f && (f.x += d.x - e.x, f.y += d.y - e.y) - } else e.x = d.x, e.y = d.y; - e.width = d.width; - e.height = d.height; - !e.relative && (this.model.isVertex(a[c]) && !this.isAllowNegativeCoordinates()) && (e.x = Math.max(0, e.x), e.y = Math.max(0, - e.y)); - this.model.setGeometry(a[c], e); - this.isExtendParent(a[c]) && this.extendParent(a[c]) - } - } - this.resetEdgesOnResize && this.resetEdges(a); - this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED, "cells", a, "bounds", b)) - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.extendParent = function(a) { - if (null != a) { - var b = this.model.getParent(a), - c = this.model.getGeometry(b); - if (null != b && (null != c && !this.isCellCollapsed(b)) && (a = this.model.getGeometry(a), null != a && (c.width < a.x + a.width || c.height < a.y + a.height))) c = c.clone(), c.width = Math.max( - c.width, a.x + a.width), c.height = Math.max(c.height, a.y + a.height), this.cellsResized([b], [c]) - } -}; -mxGraph.prototype.importCells = function(a, b, c, d, e) { - return this.moveCells(a, b, c, !0, d, e) -}; -mxGraph.prototype.moveCells = function(a, b, c, d, e, f) { - b = null != b ? b : 0; - c = null != c ? c : 0; - d = null != d ? d : !1; - if (null != a && (0 != b || 0 != c || d || null != e)) { - this.model.beginUpdate(); - try { - d && (a = this.cloneCells(a, this.isCloneInvalidEdges()), null == e && (e = this.getDefaultParent())); - var g = this.isAllowNegativeCoordinates(); - null != e && this.setAllowNegativeCoordinates(!0); - this.cellsMoved(a, b, c, !d && this.isDisconnectOnMove() && this.isAllowDanglingEdges(), null == e); - this.setAllowNegativeCoordinates(g); - if (null != e) { - var h = this.model.getChildCount(e); - this.cellsAdded(a, e, h, null, null, !0) - } - this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS, "cells", a, "dx", b, "dy", c, "clone", d, "target", e, "event", f)) - } finally { - this.model.endUpdate() - } - } - return a -}; -mxGraph.prototype.cellsMoved = function(a, b, c, d, e) { - if (null != a && (0 != b || 0 != c)) { - this.model.beginUpdate(); - try { - d && this.disconnectGraph(a); - for (var f = 0; f < a.length; f++) this.translateCell(a[f], b, c), e && this.constrainChild(a[f]); - this.resetEdgesOnMove && this.resetEdges(a); - this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED, "cells", a, "dx", c, "dy", c, "disconnect", d)) - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.translateCell = function(a, b, c) { - var d = this.model.getGeometry(a); - null != d && (d = d.clone(), d.translate(b, c), !d.relative && (this.model.isVertex(a) && !this.isAllowNegativeCoordinates()) && (d.x = Math.max(0, d.x), d.y = Math.max(0, d.y)), d.relative && ! - this.model.isEdge(a) && (null == d.offset ? d.offset = new mxPoint(b, c) : (d.offset.x += b, d.offset.y += c)), this.model.setGeometry(a, d)) -}; -mxGraph.prototype.getCellContainmentArea = function(a) { - if (null != a && !this.model.isEdge(a)) { - var b = this.model.getParent(a); - if (b == this.getDefaultParent() || b == this.getCurrentRoot()) return this.getMaximumGraphBounds(); - if (null != b && b != this.getDefaultParent()) { - var c = this.model.getGeometry(b); - if (null != c) { - var d = a = 0, - e = c.width, - c = c.height; - this.isSwimlane(b) && (b = this.getStartSize(b), a = b.width, e -= b.width, d = b.height, c -= b.height); - return new mxRectangle(a, d, e, c) - } - } - } - return null -}; -mxGraph.prototype.getMaximumGraphBounds = function() { - return this.maximumGraphBounds -}; -mxGraph.prototype.constrainChild = function(a) { - if (null != a) { - var b = this.model.getGeometry(a), - c = this.isConstrainChild(a) ? this.getCellContainmentArea(a) : this.getMaximumGraphBounds(); - if (null != b && null != c && !b.relative && (b.x < c.x || b.y < c.y || c.width < b.x + b.width || c.height < b.y + b.height)) a = this.getOverlap(a), 0 < c.width && (b.x = Math.min(b.x, c.x + - c.width - (1 - a) * b.width)), 0 < c.height && (b.y = Math.min(b.y, c.y + c.height - (1 - a) * b.height)), b.x = Math.max(b.x, c.x - b.width * a), b.y = Math.max(b.y, c.y - b.height * a) - } -}; -mxGraph.prototype.resetEdges = function(a) { - if (null != a) { - for (var b = {}, c = 0; c < a.length; c++) { - var d = mxCellPath.create(a[c]); - b[d] = a[c] - } - this.model.beginUpdate(); - try { - for (c = 0; c < a.length; c++) { - var e = this.model.getEdges(a[c]); - if (null != e) - for (d = 0; d < e.length; d++) { - var f = this.view.getState(e[d]), - g = null != f ? f.getVisibleTerminal(!0) : this.view.getVisibleTerminal(e[d], !0), - h = null != f ? f.getVisibleTerminal(!1) : this.view.getVisibleTerminal(e[d], !1), - k = mxCellPath.create(g), - l = mxCellPath.create(h); - (null == b[k] || null == b[l]) && this.resetEdge(e[d]) - } - this.resetEdges(this.model.getChildren(a[c])) - } - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.resetEdge = function(a) { - var b = this.model.getGeometry(a); - null != b && (null != b.points && 0 < b.points.length) && (b = b.clone(), b.points = [], this.model.setGeometry(a, b)); - return a -}; -mxGraph.prototype.getAllConnectionConstraints = function(a, b) { - return null != a && null != a.shape && null != a.shape.stencil ? a.shape.stencil.constraints : null -}; -mxGraph.prototype.getConnectionConstraint = function(a, b, c) { - b = null; - var d = a.style[c ? mxConstants.STYLE_EXIT_X : mxConstants.STYLE_ENTRY_X]; - if (null != d) { - var e = a.style[c ? mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y]; - null != e && (b = new mxPoint(parseFloat(d), parseFloat(e))) - } - d = !1; - null != b && (d = mxUtils.getValue(a.style, c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, !0)); - return new mxConnectionConstraint(b, d) -}; -mxGraph.prototype.setConnectionConstraint = function(a, b, c, d) { - if (null != d) { - this.model.beginUpdate(); - try { - null == d || null == d.point ? (this.setCellStyles(c ? mxConstants.STYLE_EXIT_X : mxConstants.STYLE_ENTRY_X, null, [a]), this.setCellStyles(c ? mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y, - null, [a]), this.setCellStyles(c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, null, [a])) : null != d.point && (this.setCellStyles(c ? mxConstants.STYLE_EXIT_X : - mxConstants.STYLE_ENTRY_X, d.point.x, [a]), this.setCellStyles(c ? - mxConstants.STYLE_EXIT_Y : mxConstants.STYLE_ENTRY_Y, d.point.y, [a]), d.perimeter ? this.setCellStyles(c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, null, [ - a - ]) : this.setCellStyles(c ? mxConstants.STYLE_EXIT_PERIMETER : mxConstants.STYLE_ENTRY_PERIMETER, "0", [a])) - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.getConnectionPoint = function(a, b) { - var c = null; - if (null != a) { - var d = this.view.getPerimeterBounds(a), - e = new mxPoint(d.getCenterX(), d.getCenterY()), - f = a.style[mxConstants.STYLE_DIRECTION], - g = 0; - if (null != f && ("north" == f ? g += 270 : "west" == f ? g += 180 : "south" == f && (g += 90), "north" == f || "south" == f)) { - d.x += d.width / 2 - d.height / 2; - d.y += d.height / 2 - d.width / 2; - var h = d.width; - d.width = d.height; - d.height = h - } - if (null != b.point) { - var k = c = 1, - l = 0, - m = 0; - if (this.getModel().isVertex(a.cell)) { - var n = a.style[mxConstants.STYLE_FLIPH], - p = - a.style[mxConstants.STYLE_FLIPV]; - null != a.shape.stencil && (n = 1 == mxUtils.getValue(a.style, "stencilFlipH", 0) || n, p = 1 == mxUtils.getValue(a.style, "stencilFlipV", 0) || p); - if ("north" == f || "south" == f) h = n, n = p, p = h; - n && (c = -1, l = -d.width); - p && (k = -1, m = -d.height) - } - c = new mxPoint(d.x + b.point.x * d.width * c - l, d.y + b.point.y * d.height * k - m) - } - f = a.style[mxConstants.STYLE_ROTATION] || 0; - b.perimeter ? (0 != g && null != c && (h = d = 0, 90 == g ? h = 1 : 180 == g ? d = -1 : 270 == f && (h = -1), c = mxUtils.getRotatedPoint(c, d, h, e)), null != c && b.perimeter && (c = this.view - .getPerimeterPoint(a, - c, !1))) : f += g; - 0 != f && null != c && (g = mxUtils.toRadians(f), d = Math.cos(g), h = Math.sin(g), c = mxUtils.getRotatedPoint(c, d, h, e)) - } - return c -}; -mxGraph.prototype.connectCell = function(a, b, c, d) { - this.model.beginUpdate(); - try { - var e = this.model.getTerminal(a, c); - this.cellConnected(a, b, c, d); - this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL, "edge", a, "terminal", b, "source", c, "previous", e)) - } finally { - this.model.endUpdate() - } - return a -}; -mxGraph.prototype.cellConnected = function(a, b, c, d) { - if (null != a) { - this.model.beginUpdate(); - try { - var e = this.model.getTerminal(a, c); - this.setConnectionConstraint(a, b, c, d); - this.isPortsEnabled() && (d = null, this.isPort(b) && (d = b.getId(), b = this.getTerminalForPort(b, c)), this.setCellStyles(c ? mxConstants.STYLE_SOURCE_PORT : mxConstants.STYLE_TARGET_PORT, - d, [a])); - this.model.setTerminal(a, b, c); - this.resetEdgesOnConnect && this.resetEdge(a); - this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED, "edge", a, "terminal", b, "source", - c, "previous", e)) - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.disconnectGraph = function(a) { - if (null != a) { - this.model.beginUpdate(); - try { - for (var b = this.view.scale, c = this.view.translate, d = {}, e = 0; e < a.length; e++) { - var f = mxCellPath.create(a[e]); - d[f] = a[e] - } - for (e = 0; e < a.length; e++) - if (this.model.isEdge(a[e])) { - var g = this.model.getGeometry(a[e]); - if (null != g) { - var h = this.view.getState(a[e]), - k = this.view.getState(this.model.getParent(a[e])); - if (null != h && null != k) { - var g = g.clone(), - l = -k.origin.x, - m = -k.origin.y, - n = h.absolutePoints, - p = this.model.getTerminal(a[e], !0); - if (null != - p && this.isCellDisconnectable(a[e], p, !0)) { - for (var q = mxCellPath.create(p); null != p && null == d[q];) p = this.model.getParent(p), q = mxCellPath.create(p); - null == p && (g.setTerminalPoint(new mxPoint(n[0].x / b - c.x + l, n[0].y / b - c.y + m), !0), this.model.setTerminal(a[e], null, !0)) - } - var s = this.model.getTerminal(a[e], !1); - if (null != s && this.isCellDisconnectable(a[e], s, !1)) { - for (var r = mxCellPath.create(s); null != s && null == d[r];) s = this.model.getParent(s), r = mxCellPath.create(s); - if (null == s) { - var t = n.length - 1; - g.setTerminalPoint(new mxPoint(n[t].x / - b - c.x + l, n[t].y / b - c.y + m), !1); - this.model.setTerminal(a[e], null, !1) - } - } - this.model.setGeometry(a[e], g) - } - } - } - } finally { - this.model.endUpdate() - } - } -}; -mxGraph.prototype.getCurrentRoot = function() { - return this.view.currentRoot -}; -mxGraph.prototype.getTranslateForRoot = function(a) { - return null -}; -mxGraph.prototype.isPort = function(a) { - return !1 -}; -mxGraph.prototype.getTerminalForPort = function(a, b) { - return this.model.getParent(a) -}; -mxGraph.prototype.getChildOffsetForCell = function(a) { - return null -}; -mxGraph.prototype.enterGroup = function(a) { - a = a || this.getSelectionCell(); - null != a && this.isValidRoot(a) && (this.view.setCurrentRoot(a), this.clearSelection()) -}; -mxGraph.prototype.exitGroup = function() { - var a = this.model.getRoot(), - b = this.getCurrentRoot(); - if (null != b) { - for (var c = this.model.getParent(b); c != a && !this.isValidRoot(c) && this.model.getParent(c) != a;) c = this.model.getParent(c); - c == a || this.model.getParent(c) == a ? this.view.setCurrentRoot(null) : this.view.setCurrentRoot(c); - null != this.view.getState(b) && this.setSelectionCell(b) - } -}; -mxGraph.prototype.home = function() { - var a = this.getCurrentRoot(); - null != a && (this.view.setCurrentRoot(null), null != this.view.getState(a) && this.setSelectionCell(a)) -}; -mxGraph.prototype.isValidRoot = function(a) { - return null != a -}; -mxGraph.prototype.getGraphBounds = function() { - return this.view.getGraphBounds() -}; -mxGraph.prototype.getCellBounds = function(a, b, c) { - var d = [a]; - b && (d = d.concat(this.model.getEdges(a))); - d = this.view.getBounds(d); - if (c) { - c = this.model.getChildCount(a); - for (var e = 0; e < c; e++) { - var f = this.getCellBounds(this.model.getChildAt(a, e), b, !0); - null != d ? d.add(f) : d = f - } - } - return d -}; -mxGraph.prototype.getBoundingBoxFromGeometry = function(a, b) { - b = null != b ? b : !1; - var c = null; - if (null != a) - for (var d = 0; d < a.length; d++) - if (b || this.model.isVertex(a[d])) { - var e = this.getCellGeometry(a[d]); - if (null != e) { - var f = e.points; - if (null != f && 0 < f.length) { - for (var g = new mxRectangle(f[0].x, f[0].y, 0, 0), h = function(a) { - null != a && g.add(new mxRectangle(a.x, a.y, 0, 0)) - }, k = 1; k < f.length; k++) h(f[k]); - h(e.getTerminalPoint(!0)); - h(e.getTerminalPoint(!1)) - } - null == c ? c = new mxRectangle(e.x, e.y, e.width, e.height) : c.add(e) - } - } - return c -}; -mxGraph.prototype.refresh = function(a) { - this.view.clear(a, null == a); - this.view.validate(); - this.sizeDidChange(); - this.fireEvent(new mxEventObject(mxEvent.REFRESH)) -}; -mxGraph.prototype.snap = function(a) { - this.gridEnabled && (a = Math.round(a / this.gridSize) * this.gridSize); - return a -}; -mxGraph.prototype.panGraph = function(a, b) { - if (this.useScrollbarsForPanning && mxUtils.hasScrollbars(this.container)) this.container.scrollLeft = -a, this.container.scrollTop = -b; - else { - var c = this.view.getCanvas(); - if (this.dialect == mxConstants.DIALECT_SVG) - if (0 == a && 0 == b) { - if (mxClient.IS_IE ? c.setAttribute("transform", "translate(" + a + "," + b + ")") : c.removeAttribute("transform"), null != this.shiftPreview1) { - for (var d = this.shiftPreview1.firstChild; null != d;) { - var e = d.nextSibling; - this.container.appendChild(d); - d = e - } - this.shiftPreview1.parentNode.removeChild(this.shiftPreview1); - this.shiftPreview1 = null; - this.container.appendChild(c.parentNode); - for (d = this.shiftPreview2.firstChild; null != d;) e = d.nextSibling, this.container.appendChild(d), d = e; - this.shiftPreview2.parentNode.removeChild(this.shiftPreview2); - this.shiftPreview2 = null - } - } else { - c.setAttribute("transform", "translate(" + a + "," + b + ")"); - if (null == this.shiftPreview1) { - this.shiftPreview1 = document.createElement("div"); - this.shiftPreview1.style.position = "absolute"; - this.shiftPreview1.style.overflow = "visible"; - this.shiftPreview2 = document.createElement("div"); - this.shiftPreview2.style.position = "absolute"; - this.shiftPreview2.style.overflow = "visible"; - for (var f = this.shiftPreview1, d = this.container.firstChild; null != d;) e = d.nextSibling, d != c.parentNode ? f.appendChild(d) : f = this.shiftPreview2, d = e; - this.container.insertBefore(this.shiftPreview1, c.parentNode); - this.container.appendChild(this.shiftPreview2) - } - this.shiftPreview1.style.left = a + "px"; - this.shiftPreview1.style.top = b + "px"; - this.shiftPreview2.style.left = a + "px"; - this.shiftPreview2.style.top = b + "px" - } else c.style.left = - a + "px", c.style.top = b + "px"; - this.panDx = a; - this.panDy = b; - this.fireEvent(new mxEventObject(mxEvent.PAN)) - } -}; -mxGraph.prototype.zoomIn = function() { - this.zoom(this.zoomFactor) -}; -mxGraph.prototype.zoomOut = function() { - this.zoom(1 / this.zoomFactor) -}; -mxGraph.prototype.zoomActual = function() { - 1 == this.view.scale ? this.view.setTranslate(0, 0) : (this.view.translate.x = 0, this.view.translate.y = 0, this.view.setScale(1)) -}; -mxGraph.prototype.zoomTo = function(a, b) { - this.zoom(a / this.view.scale, b) -}; -mxGraph.prototype.zoom = function(a, b) { - b = null != b ? b : this.centerZoom; - var c = this.view.scale * a, - d = this.view.getState(this.getSelectionCell()); - if (this.keepSelectionVisibleOnZoom && null != d) d = new mxRectangle(d.x * a, d.y * a, d.width * a, d.height * a), this.view.scale = c, this.scrollRectToVisible(d) || (this.view.revalidate(), - this.view.setScale(c)); - else if (b && !mxUtils.hasScrollbars(this.container)) { - var d = this.container.offsetWidth, - e = this.container.offsetHeight; - if (1 < a) var f = (a - 1) / (2 * c), - d = d * -f, - e = e * -f; - else f = (1 / a - 1) / (2 * this.view.scale), - d *= f, e *= f; - this.view.scaleAndTranslate(c, this.view.translate.x + d, this.view.translate.y + e) - } else this.view.setScale(c), mxUtils.hasScrollbars(this.container) && (e = d = 0, b && (d = this.container.offsetWidth * (a - 1) / 2, e = this.container.offsetHeight * (a - 1) / 2), this.container - .scrollLeft = Math.round(this.container.scrollLeft * a + d), this.container.scrollTop = Math.round(this.container.scrollTop * a + e)) -}; -mxGraph.prototype.zoomToRect = function(a) { - var b = this.container.clientWidth / a.width / (this.container.clientHeight / a.height); - a.x = Math.max(0, a.x); - a.y = Math.max(0, a.y); - var c = Math.min(this.container.scrollWidth, a.x + a.width), - d = Math.min(this.container.scrollHeight, a.y + a.height); - a.width = c - a.x; - a.height = d - a.y; - 1 > b ? (b = a.height / b, c = (b - a.height) / 2, a.height = b, b = Math.min(a.y, c), a.y -= b, d = Math.min(this.container.scrollHeight, a.y + a.height), a.height = d - a.y) : (b *= a.width, c = - (b - a.width) / 2, a.width = b, b = Math.min(a.x, c), a.x -= b, - c = Math.min(this.container.scrollWidth, a.x + a.width), a.width = c - a.x); - b = this.container.clientWidth / a.width; - c = this.view.scale * b; - mxUtils.hasScrollbars(this.container) ? (this.view.setScale(c), this.container.scrollLeft = Math.round(a.x * b), this.container.scrollTop = Math.round(a.y * b)) : this.view.scaleAndTranslate(c, - this.view.translate.x - a.x / this.view.scale, this.view.translate.y - a.y / this.view.scale) -}; -mxGraph.prototype.fit = function(a, b) { - if (null != this.container) { - a = null != a ? a : 0; - b = null != b ? b : !1; - var c = this.container.clientWidth, - d = this.container.clientHeight, - e = this.view.getGraphBounds(); - b && (null != e.x && null != e.y) && (e.width += e.x, e.height += e.y, e.x = 0, e.y = 0); - var f = this.view.scale, - g = e.width / f, - h = e.height / f; - null != this.backgroundImage && (g = Math.max(g, this.backgroundImage.width - e.x / f), h = Math.max(h, this.backgroundImage.height - e.y / f)); - var k = b ? a : 2 * a, - c = Math.floor(100 * Math.min(c / (g + k), d / (h + k))) / 100; - null != this.minFitScale && - (c = Math.max(c, this.minFitScale)); - null != this.maxFitScale && (c = Math.min(c, this.maxFitScale)); - b ? this.view.scale != c && this.view.setScale(c) : mxUtils.hasScrollbars(this.container) ? (this.view.setScale(c), null != e.x && (this.container.scrollLeft = Math.round(e.x / f) * c - a - - Math.max(0, (this.container.clientWidth - g * c) / 2)), null != e.y && (this.container.scrollTop = Math.round(e.y / f) * c - a - Math.max(0, (this.container.clientHeight - h * c) / 2))) : - this.view.scaleAndTranslate(c, null != e.x ? Math.floor(this.view.translate.x - e.x / f + a + 1) : a, null != - e.y ? Math.floor(this.view.translate.y - e.y / f + a + 1) : a) - } - return this.view.scale -}; -mxGraph.prototype.scrollCellToVisible = function(a, b) { - var c = -this.view.translate.x, - d = -this.view.translate.y, - e = this.view.getState(a); - null != e && (c = new mxRectangle(c + e.x, d + e.y, e.width, e.height), b && null != this.container && (d = this.container.clientWidth, e = this.container.clientHeight, c.x = c.getCenterX() - d / - 2, c.width = d, c.y = c.getCenterY() - e / 2, c.height = e), this.scrollRectToVisible(c) && this.view.setTranslate(this.view.translate.x, this.view.translate.y)) -}; -mxGraph.prototype.scrollRectToVisible = function(a) { - var b = !1; - if (null != a) { - var c = this.container.offsetWidth, - d = this.container.offsetHeight, - e = Math.min(c, a.width), - f = Math.min(d, a.height); - if (mxUtils.hasScrollbars(this.container)) { - c = this.container; - a.x += this.view.translate.x; - a.y += this.view.translate.y; - var g = c.scrollLeft - a.x, - d = Math.max(g - c.scrollLeft, 0); - 0 < g ? c.scrollLeft -= g + 2 : (g = a.x + e - c.scrollLeft - c.clientWidth, 0 < g && (c.scrollLeft += g + 2)); - e = c.scrollTop - a.y; - g = Math.max(0, e - c.scrollTop); - 0 < e ? c.scrollTop -= e + 2 : (e = a.y + - f - c.scrollTop - c.clientHeight, 0 < e && (c.scrollTop += e + 2)); - !this.useScrollbarsForPanning && (0 != d || 0 != g) && this.view.setTranslate(d, g) - } else { - var g = -this.view.translate.x, - h = -this.view.translate.y, - k = this.view.scale; - a.x + e > g + c && (this.view.translate.x -= (a.x + e - c - g) / k, b = !0); - a.y + f > h + d && (this.view.translate.y -= (a.y + f - d - h) / k, b = !0); - a.x < g && (this.view.translate.x += (g - a.x) / k, b = !0); - a.y < h && (this.view.translate.y += (h - a.y) / k, b = !0); - b && (this.view.refresh(), null != this.selectionCellsHandler && this.selectionCellsHandler.refresh()) - } - } - return b -}; -mxGraph.prototype.getCellGeometry = function(a) { - return this.model.getGeometry(a) -}; -mxGraph.prototype.isCellVisible = function(a) { - return this.model.isVisible(a) -}; -mxGraph.prototype.isCellCollapsed = function(a) { - return this.model.isCollapsed(a) -}; -mxGraph.prototype.isCellConnectable = function(a) { - return this.model.isConnectable(a) -}; -mxGraph.prototype.isOrthogonal = function(a) { - var b = a.style[mxConstants.STYLE_ORTHOGONAL]; - if (null != b) return b; - a = this.view.getEdgeStyle(a); - return a == mxEdgeStyle.SegmentConnector || a == mxEdgeStyle.ElbowConnector || a == mxEdgeStyle.SideToSide || a == mxEdgeStyle.TopToBottom || a == mxEdgeStyle.EntityRelation || a == mxEdgeStyle.OrthConnector -}; -mxGraph.prototype.isLoop = function(a) { - var b = a.getVisibleTerminalState(!0); - a = a.getVisibleTerminalState(!1); - return null != b && b == a -}; -mxGraph.prototype.isCloneEvent = function(a) { - return mxEvent.isControlDown(a) -}; -mxGraph.prototype.isToggleEvent = function(a) { - return mxClient.IS_MAC ? mxEvent.isMetaDown(a) : mxEvent.isControlDown(a) -}; -mxGraph.prototype.isGridEnabledEvent = function(a) { - return null != a && !mxEvent.isAltDown(a) -}; -mxGraph.prototype.isConstrainedEvent = function(a) { - return mxEvent.isShiftDown(a) -}; -mxGraph.prototype.isForceMarqueeEvent = function(a) { - return mxEvent.isAltDown(a) -}; -mxGraph.prototype.validationAlert = function(a) { - mxUtils.alert(a) -}; -mxGraph.prototype.isEdgeValid = function(a, b, c) { - return null == this.getEdgeValidationError(a, b, c) -}; -mxGraph.prototype.getEdgeValidationError = function(a, b, c) { - if (null != a && !this.isAllowDanglingEdges() && (null == b || null == c)) return ""; - if (null != a && null == this.model.getTerminal(a, !0) && null == this.model.getTerminal(a, !1)) return null; - if (!this.allowLoops && b == c && null != b || !this.isValidConnection(b, c)) return ""; - if (null != b && null != c) { - var d = ""; - if (!this.multigraph) { - var e = this.model.getEdgesBetween(b, c, !0); - if (1 < e.length || 1 == e.length && e[0] != a) d += (mxResources.get(this.alreadyConnectedResource) || this.alreadyConnectedResource) + - "\n" - } - var e = this.model.getDirectedEdgeCount(b, !0, a), - f = this.model.getDirectedEdgeCount(c, !1, a); - if (null != this.multiplicities) - for (var g = 0; g < this.multiplicities.length; g++) { - var h = this.multiplicities[g].check(this, a, b, c, e, f); - null != h && (d += h) - } - h = this.validateEdge(a, b, c); - null != h && (d += h); - return 0 < d.length ? d : null - } - return this.allowDanglingEdges ? null : "" -}; -mxGraph.prototype.validateEdge = function(a, b, c) { - return null -}; -mxGraph.prototype.validateGraph = function(a, b) { - a = null != a ? a : this.model.getRoot(); - b = null != b ? b : {}; - for (var c = !0, d = this.model.getChildCount(a), e = 0; e < d; e++) { - var f = this.model.getChildAt(a, e), - g = b; - this.isValidRoot(f) && (g = {}); - g = this.validateGraph(f, g); - null != g ? this.setCellWarning(f, g.replace(/\n/g, "\x3cbr\x3e")) : this.setCellWarning(f, null); - c = c && null == g - } - d = ""; - this.isCellCollapsed(a) && !c && (d += (mxResources.get(this.containsValidationErrorsResource) || this.containsValidationErrorsResource) + "\n"); - d = this.model.isEdge(a) ? - d + (this.getEdgeValidationError(a, this.model.getTerminal(a, !0), this.model.getTerminal(a, !1)) || "") : d + (this.getCellValidationError(a) || ""); - e = this.validateCell(a, b); - null != e && (d += e); - null == this.model.getParent(a) && this.view.validate(); - return 0 < d.length || !c ? d : null -}; -mxGraph.prototype.getCellValidationError = function(a) { - var b = this.model.getDirectedEdgeCount(a, !0), - c = this.model.getDirectedEdgeCount(a, !1); - a = this.model.getValue(a); - var d = ""; - if (null != this.multiplicities) - for (var e = 0; e < this.multiplicities.length; e++) { - var f = this.multiplicities[e]; - if (f.source && mxUtils.isNode(a, f.type, f.attr, f.value) && (0 == f.max && 0 < b || 1 == f.min && 0 == b || 1 == f.max && 1 < b)) d += f.countError + "\n"; - else if (!f.source && mxUtils.isNode(a, f.type, f.attr, f.value) && (0 == f.max && 0 < c || 1 == f.min && 0 == c || 1 == f.max && 1 < - c)) d += f.countError + "\n" - } - return 0 < d.length ? d : null -}; -mxGraph.prototype.validateCell = function(a, b) { - return null -}; -mxGraph.prototype.getBackgroundImage = function() { - return this.backgroundImage -}; -mxGraph.prototype.setBackgroundImage = function(a) { - this.backgroundImage = a -}; -mxGraph.prototype.getFoldingImage = function(a) { - if (null != a && this.foldingEnabled && !this.getModel().isEdge(a.cell)) { - var b = this.isCellCollapsed(a.cell); - if (this.isCellFoldable(a.cell, !b)) return b ? this.collapsedImage : this.expandedImage - } - return null -}; -mxGraph.prototype.convertValueToString = function(a) { - a = this.model.getValue(a); - if (null != a) { - if (mxUtils.isNode(a)) return a.nodeName; - if ("function" == typeof a.toString) return a.toString() - } - return "" -}; -mxGraph.prototype.getLabel = function(a) { - var b = ""; - if (this.labelsVisible && null != a) { - var c = this.view.getState(a), - c = null != c ? c.style : this.getCellStyle(a); - mxUtils.getValue(c, mxConstants.STYLE_NOLABEL, !1) || (b = this.convertValueToString(a)) - } - return b -}; -mxGraph.prototype.isHtmlLabel = function(a) { - return this.isHtmlLabels() -}; -mxGraph.prototype.isHtmlLabels = function() { - return this.htmlLabels -}; -mxGraph.prototype.setHtmlLabels = function(a) { - this.htmlLabels = a -}; -mxGraph.prototype.isWrapping = function(a) { - var b = this.view.getState(a); - a = null != b ? b.style : this.getCellStyle(a); - return null != a ? "wrap" == a[mxConstants.STYLE_WHITE_SPACE] : !1 -}; -mxGraph.prototype.isLabelClipped = function(a) { - var b = this.view.getState(a); - a = null != b ? b.style : this.getCellStyle(a); - return null != a ? "hidden" == a[mxConstants.STYLE_OVERFLOW] : !1 -}; -mxGraph.prototype.getTooltip = function(a, b, c, d) { - var e = null; - if (null != a) { - if (null != a.control && (b == a.control.node || b.parentNode == a.control.node)) e = this.collapseExpandResource, e = mxResources.get(e) || e; - null == e && null != a.overlays && a.overlays.visit(function(a, c) { - if (null == e && (b == c.node || b.parentNode == c.node)) e = c.overlay.toString() - }); - null == e && (c = this.selectionCellsHandler.getHandler(a.cell), null != c && "function" == typeof c.getTooltipForNode && (e = c.getTooltipForNode(b))); - null == e && (e = this.getTooltipForCell(a.cell)) - } - return e -}; -mxGraph.prototype.getTooltipForCell = function(a) { - var b = null; - return b = null != a && null != a.getTooltip ? a.getTooltip() : this.convertValueToString(a) -}; -mxGraph.prototype.getCursorForCell = function(a) { - return null -}; -mxGraph.prototype.getStartSize = function(a) { - var b = new mxRectangle, - c = this.view.getState(a); - a = null != c ? c.style : this.getCellStyle(a); - null != a && (c = parseInt(mxUtils.getValue(a, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE)), mxUtils.getValue(a, mxConstants.STYLE_HORIZONTAL, !0) ? b.height = c : b.width = c); - return b -}; -mxGraph.prototype.getImage = function(a) { - return null != a && null != a.style ? a.style[mxConstants.STYLE_IMAGE] : null -}; -mxGraph.prototype.getVerticalAlign = function(a) { - return null != a && null != a.style ? a.style[mxConstants.STYLE_VERTICAL_ALIGN] || mxConstants.ALIGN_MIDDLE : null -}; -mxGraph.prototype.getIndicatorColor = function(a) { - return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_COLOR] : null -}; -mxGraph.prototype.getIndicatorGradientColor = function(a) { - return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR] : null -}; -mxGraph.prototype.getIndicatorShape = function(a) { - return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_SHAPE] : null -}; -mxGraph.prototype.getIndicatorImage = function(a) { - return null != a && null != a.style ? a.style[mxConstants.STYLE_INDICATOR_IMAGE] : null -}; -mxGraph.prototype.getBorder = function() { - return this.border -}; -mxGraph.prototype.setBorder = function(a) { - this.border = a -}; -mxGraph.prototype.isSwimlane = function(a) { - if (null != a && this.model.getParent(a) != this.model.getRoot()) { - var b = this.view.getState(a), - b = null != b ? b.style : this.getCellStyle(a); - if (null != b && !this.model.isEdge(a)) return b[mxConstants.STYLE_SHAPE] == mxConstants.SHAPE_SWIMLANE - } - return !1 -}; -mxGraph.prototype.isResizeContainer = function() { - return this.resizeContainer -}; -mxGraph.prototype.setResizeContainer = function(a) { - this.resizeContainer = a -}; -mxGraph.prototype.isEnabled = function() { - return this.enabled -}; -mxGraph.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxGraph.prototype.isEscapeEnabled = function() { - return this.escapeEnabled -}; -mxGraph.prototype.setEscapeEnabled = function(a) { - this.escapeEnabled = a -}; -mxGraph.prototype.isInvokesStopCellEditing = function() { - return this.invokesStopCellEditing -}; -mxGraph.prototype.setInvokesStopCellEditing = function(a) { - this.invokesStopCellEditing = a -}; -mxGraph.prototype.isEnterStopsCellEditing = function() { - return this.enterStopsCellEditing -}; -mxGraph.prototype.setEnterStopsCellEditing = function(a) { - this.enterStopsCellEditing = a -}; -mxGraph.prototype.isCellLocked = function(a) { - var b = this.model.getGeometry(a); - return this.isCellsLocked() || null != b && this.model.isVertex(a) && b.relative -}; -mxGraph.prototype.isCellsLocked = function() { - return this.cellsLocked -}; -mxGraph.prototype.setCellsLocked = function(a) { - this.cellsLocked = a -}; -mxGraph.prototype.getCloneableCells = function(a) { - return this.model.filterCells(a, mxUtils.bind(this, function(a) { - return this.isCellCloneable(a) - })) -}; -mxGraph.prototype.isCellCloneable = function(a) { - var b = this.view.getState(a); - a = null != b ? b.style : this.getCellStyle(a); - return this.isCellsCloneable() && 0 != a[mxConstants.STYLE_CLONEABLE] -}; -mxGraph.prototype.isCellsCloneable = function() { - return this.cellsCloneable -}; -mxGraph.prototype.setCellsCloneable = function(a) { - this.cellsCloneable = a -}; -mxGraph.prototype.getExportableCells = function(a) { - return this.model.filterCells(a, mxUtils.bind(this, function(a) { - return this.canExportCell(a) - })) -}; -mxGraph.prototype.canExportCell = function(a) { - return this.exportEnabled -}; -mxGraph.prototype.getImportableCells = function(a) { - return this.model.filterCells(a, mxUtils.bind(this, function(a) { - return this.canImportCell(a) - })) -}; -mxGraph.prototype.canImportCell = function(a) { - return this.importEnabled -}; -mxGraph.prototype.isCellSelectable = function(a) { - return this.isCellsSelectable() -}; -mxGraph.prototype.isCellsSelectable = function() { - return this.cellsSelectable -}; -mxGraph.prototype.setCellsSelectable = function(a) { - this.cellsSelectable = a -}; -mxGraph.prototype.getDeletableCells = function(a) { - return this.model.filterCells(a, mxUtils.bind(this, function(a) { - return this.isCellDeletable(a) - })) -}; -mxGraph.prototype.isCellDeletable = function(a) { - var b = this.view.getState(a); - a = null != b ? b.style : this.getCellStyle(a); - return this.isCellsDeletable() && 0 != a[mxConstants.STYLE_DELETABLE] -}; -mxGraph.prototype.isCellsDeletable = function() { - return this.cellsDeletable -}; -mxGraph.prototype.setCellsDeletable = function(a) { - this.cellsDeletable = a -}; -mxGraph.prototype.isLabelMovable = function(a) { - return !this.isCellLocked(a) && (this.model.isEdge(a) && this.edgeLabelsMovable || this.model.isVertex(a) && this.vertexLabelsMovable) -}; -mxGraph.prototype.getMovableCells = function(a) { - return this.model.filterCells(a, mxUtils.bind(this, function(a) { - return this.isCellMovable(a) - })) -}; -mxGraph.prototype.isCellMovable = function(a) { - var b = this.view.getState(a), - b = null != b ? b.style : this.getCellStyle(a); - return this.isCellsMovable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_MOVABLE] -}; -mxGraph.prototype.isCellsMovable = function() { - return this.cellsMovable -}; -mxGraph.prototype.setCellsMovable = function(a) { - this.cellsMovable = a -}; -mxGraph.prototype.isGridEnabled = function() { - return this.gridEnabled -}; -mxGraph.prototype.setGridEnabled = function(a) { - this.gridEnabled = a -}; -mxGraph.prototype.isPortsEnabled = function() { - return this.portsEnabled -}; -mxGraph.prototype.setPortsEnabled = function(a) { - this.portsEnabled = a -}; -mxGraph.prototype.getGridSize = function() { - return this.gridSize -}; -mxGraph.prototype.setGridSize = function(a) { - this.gridSize = a -}; -mxGraph.prototype.getTolerance = function() { - return this.tolerance -}; -mxGraph.prototype.setTolerance = function(a) { - this.tolerance = a -}; -mxGraph.prototype.isVertexLabelsMovable = function() { - return this.vertexLabelsMovable -}; -mxGraph.prototype.setVertexLabelsMovable = function(a) { - this.vertexLabelsMovable = a -}; -mxGraph.prototype.isEdgeLabelsMovable = function() { - return this.edgeLabelsMovable -}; -mxGraph.prototype.setEdgeLabelsMovable = function(a) { - this.edgeLabelsMovable = a -}; -mxGraph.prototype.isSwimlaneNesting = function() { - return this.swimlaneNesting -}; -mxGraph.prototype.setSwimlaneNesting = function(a) { - this.swimlaneNesting = a -}; -mxGraph.prototype.isSwimlaneSelectionEnabled = function() { - return this.swimlaneSelectionEnabled -}; -mxGraph.prototype.setSwimlaneSelectionEnabled = function(a) { - this.swimlaneSelectionEnabled = a -}; -mxGraph.prototype.isMultigraph = function() { - return this.multigraph -}; -mxGraph.prototype.setMultigraph = function(a) { - this.multigraph = a -}; -mxGraph.prototype.isAllowLoops = function() { - return this.allowLoops -}; -mxGraph.prototype.setAllowDanglingEdges = function(a) { - this.allowDanglingEdges = a -}; -mxGraph.prototype.isAllowDanglingEdges = function() { - return this.allowDanglingEdges -}; -mxGraph.prototype.setConnectableEdges = function(a) { - this.connectableEdges = a -}; -mxGraph.prototype.isConnectableEdges = function() { - return this.connectableEdges -}; -mxGraph.prototype.setCloneInvalidEdges = function(a) { - this.cloneInvalidEdges = a -}; -mxGraph.prototype.isCloneInvalidEdges = function() { - return this.cloneInvalidEdges -}; -mxGraph.prototype.setAllowLoops = function(a) { - this.allowLoops = a -}; -mxGraph.prototype.isDisconnectOnMove = function() { - return this.disconnectOnMove -}; -mxGraph.prototype.setDisconnectOnMove = function(a) { - this.disconnectOnMove = a -}; -mxGraph.prototype.isDropEnabled = function() { - return this.dropEnabled -}; -mxGraph.prototype.setDropEnabled = function(a) { - this.dropEnabled = a -}; -mxGraph.prototype.isSplitEnabled = function() { - return this.splitEnabled -}; -mxGraph.prototype.setSplitEnabled = function(a) { - this.splitEnabled = a -}; -mxGraph.prototype.isCellResizable = function(a) { - var b = this.view.getState(a), - b = null != b ? b.style : this.getCellStyle(a); - return this.isCellsResizable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_RESIZABLE] -}; -mxGraph.prototype.isCellsResizable = function() { - return this.cellsResizable -}; -mxGraph.prototype.setCellsResizable = function(a) { - this.cellsResizable = a -}; -mxGraph.prototype.isTerminalPointMovable = function(a, b) { - return !0 -}; -mxGraph.prototype.isCellBendable = function(a) { - var b = this.view.getState(a), - b = null != b ? b.style : this.getCellStyle(a); - return this.isCellsBendable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_BENDABLE] -}; -mxGraph.prototype.isCellsBendable = function() { - return this.cellsBendable -}; -mxGraph.prototype.setCellsBendable = function(a) { - this.cellsBendable = a -}; -mxGraph.prototype.isCellEditable = function(a) { - var b = this.view.getState(a), - b = null != b ? b.style : this.getCellStyle(a); - return this.isCellsEditable() && !this.isCellLocked(a) && 0 != b[mxConstants.STYLE_EDITABLE] -}; -mxGraph.prototype.isCellsEditable = function() { - return this.cellsEditable -}; -mxGraph.prototype.setCellsEditable = function(a) { - this.cellsEditable = a -}; -mxGraph.prototype.isCellDisconnectable = function(a, b, c) { - return this.isCellsDisconnectable() && !this.isCellLocked(a) -}; -mxGraph.prototype.isCellsDisconnectable = function() { - return this.cellsDisconnectable -}; -mxGraph.prototype.setCellsDisconnectable = function(a) { - this.cellsDisconnectable = a -}; -mxGraph.prototype.isValidSource = function(a) { - return null == a && this.allowDanglingEdges || null != a && (!this.model.isEdge(a) || this.connectableEdges) && this.isCellConnectable(a) -}; -mxGraph.prototype.isValidTarget = function(a) { - return this.isValidSource(a) -}; -mxGraph.prototype.isValidConnection = function(a, b) { - return this.isValidSource(a) && this.isValidTarget(b) -}; -mxGraph.prototype.setConnectable = function(a) { - this.connectionHandler.setEnabled(a) -}; -mxGraph.prototype.isConnectable = function(a) { - return this.connectionHandler.isEnabled() -}; -mxGraph.prototype.setTooltips = function(a) { - this.tooltipHandler.setEnabled(a) -}; -mxGraph.prototype.setPanning = function(a) { - this.panningHandler.panningEnabled = a -}; -mxGraph.prototype.isEditing = function(a) { - if (null != this.cellEditor) { - var b = this.cellEditor.getEditingCell(); - return null == a ? null != b : a == b - } - return !1 -}; -mxGraph.prototype.isAutoSizeCell = function(a) { - var b = this.view.getState(a); - a = null != b ? b.style : this.getCellStyle(a); - return this.isAutoSizeCells() || 1 == a[mxConstants.STYLE_AUTOSIZE] -}; -mxGraph.prototype.isAutoSizeCells = function() { - return this.autoSizeCells -}; -mxGraph.prototype.setAutoSizeCells = function(a) { - this.autoSizeCells = a -}; -mxGraph.prototype.isExtendParent = function(a) { - return !this.getModel().isEdge(a) && this.isExtendParents() -}; -mxGraph.prototype.isExtendParents = function() { - return this.extendParents -}; -mxGraph.prototype.setExtendParents = function(a) { - this.extendParents = a -}; -mxGraph.prototype.isExtendParentsOnAdd = function() { - return this.extendParentsOnAdd -}; -mxGraph.prototype.setExtendParentsOnAdd = function(a) { - this.extendParentsOnAdd = a -}; -mxGraph.prototype.isConstrainChild = function(a) { - return this.isConstrainChildren() && !this.getModel().isEdge(this.getModel().getParent(a)) -}; -mxGraph.prototype.isConstrainChildren = function() { - return this.constrainChildren -}; -mxGraph.prototype.setConstrainChildren = function(a) { - this.constrainChildren = a -}; -mxGraph.prototype.isAllowNegativeCoordinates = function() { - return this.allowNegativeCoordinates -}; -mxGraph.prototype.setAllowNegativeCoordinates = function(a) { - this.allowNegativeCoordinates = a -}; -mxGraph.prototype.getOverlap = function(a) { - return this.isAllowOverlapParent(a) ? this.defaultOverlap : 0 -}; -mxGraph.prototype.isAllowOverlapParent = function(a) { - return !1 -}; -mxGraph.prototype.getFoldableCells = function(a, b) { - return this.model.filterCells(a, mxUtils.bind(this, function(a) { - return this.isCellFoldable(a, b) - })) -}; -mxGraph.prototype.isCellFoldable = function(a, b) { - var c = this.view.getState(a), - c = null != c ? c.style : this.getCellStyle(a); - return 0 < this.model.getChildCount(a) && 0 != c[mxConstants.STYLE_FOLDABLE] -}; -mxGraph.prototype.isValidDropTarget = function(a, b, c) { - return null != a && (this.isSplitEnabled() && this.isSplitTarget(a, b, c) || !this.model.isEdge(a) && (this.isSwimlane(a) || 0 < this.model.getChildCount(a) && !this.isCellCollapsed(a))) -}; -mxGraph.prototype.isSplitTarget = function(a, b, c) { - return this.model.isEdge(a) && null != b && 1 == b.length && this.isCellConnectable(b[0]) && null == this.getEdgeValidationError(a, this.model.getTerminal(a, !0), b[0]) ? (c = this.model.getTerminal( - a, !0), a = this.model.getTerminal(a, !1), !this.model.isAncestor(b[0], c) && !this.model.isAncestor(b[0], a)) : !1 -}; -mxGraph.prototype.getDropTarget = function(a, b, c) { - if (!this.isSwimlaneNesting()) - for (var d = 0; d < a.length; d++) - if (this.isSwimlane(a[d])) return null; - d = mxUtils.convertPoint(this.container, mxEvent.getClientX(b), mxEvent.getClientY(b)); - d.x -= this.panDx; - d.y -= this.panDy; - d = this.getSwimlaneAt(d.x, d.y); - if (null == c) c = d; - else if (null != d) { - for (var e = this.model.getParent(d); null != e && this.isSwimlane(e) && e != c;) e = this.model.getParent(e); - e == c && (c = d) - } - for (; null != c && !this.isValidDropTarget(c, a, b) && !this.model.isLayer(c);) c = this.model.getParent(c); - return !this.model.isLayer(c) && 0 > mxUtils.indexOf(a, c) ? c : null -}; -mxGraph.prototype.getDefaultParent = function() { - var a = this.defaultParent; - null == a && (a = this.getCurrentRoot(), null == a && (a = this.model.getRoot(), a = this.model.getChildAt(a, 0))); - return a -}; -mxGraph.prototype.setDefaultParent = function(a) { - this.defaultParent = a -}; -mxGraph.prototype.getSwimlane = function(a) { - for (; null != a && !this.isSwimlane(a);) a = this.model.getParent(a); - return a -}; -mxGraph.prototype.getSwimlaneAt = function(a, b, c) { - c = c || this.getDefaultParent(); - if (null != c) - for (var d = this.model.getChildCount(c), e = 0; e < d; e++) { - var f = this.model.getChildAt(c, e), - g = this.getSwimlaneAt(a, b, f); - if (null != g) return g; - if (this.isSwimlane(f) && (g = this.view.getState(f), this.intersects(g, a, b))) return f - } - return null -}; -mxGraph.prototype.getCellAt = function(a, b, c, d, e) { - d = null != d ? d : !0; - e = null != e ? e : !0; - c = null != c ? c : this.getDefaultParent(); - if (null != c) - for (var f = this.model.getChildCount(c) - 1; 0 <= f; f--) { - var g = this.model.getChildAt(c, f), - h = this.getCellAt(a, b, g, d, e); - if (null != h) return h; - if (this.isCellVisible(g) && (e && this.model.isEdge(g) || d && this.model.isVertex(g))) - if (h = this.view.getState(g), this.intersects(h, a, b)) return g - } - return null -}; -mxGraph.prototype.intersects = function(a, b, c) { - if (null != a) { - var d = a.absolutePoints; - if (null != d) { - a = this.tolerance * this.tolerance; - for (var e = d[0], f = 1; f < d.length; f++) { - var g = d[f]; - if (mxUtils.ptSegDistSq(e.x, e.y, g.x, g.y, b, c) <= a) return !0; - e = g - } - } else if (e = mxUtils.toRadians(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION) || 0), 0 != e && (d = Math.cos(-e), e = Math.sin(-e), f = new mxPoint(a.getCenterX(), a.getCenterY()), e = - mxUtils.getRotatedPoint(new mxPoint(b, c), d, e, f), b = e.x, c = e.y), mxUtils.contains(a, b, c)) return !0 - } - return !1 -}; -mxGraph.prototype.hitsSwimlaneContent = function(a, b, c) { - var d = this.getView().getState(a); - a = this.getStartSize(a); - if (null != d) { - var e = this.getView().getScale(); - b -= d.x; - c -= d.y; - if (0 < a.width && 0 < b && b > a.width * e || 0 < a.height && 0 < c && c > a.height * e) return !0 - } - return !1 -}; -mxGraph.prototype.getChildVertices = function(a) { - return this.getChildCells(a, !0, !1) -}; -mxGraph.prototype.getChildEdges = function(a) { - return this.getChildCells(a, !1, !0) -}; -mxGraph.prototype.getChildCells = function(a, b, c) { - a = null != a ? a : this.getDefaultParent(); - a = this.model.getChildCells(a, null != b ? b : !1, null != c ? c : !1); - b = []; - for (c = 0; c < a.length; c++) this.isCellVisible(a[c]) && b.push(a[c]); - return b -}; -mxGraph.prototype.getConnections = function(a, b) { - return this.getEdges(a, b, !0, !0, !1) -}; -mxGraph.prototype.getIncomingEdges = function(a, b) { - return this.getEdges(a, b, !0, !1, !1) -}; -mxGraph.prototype.getOutgoingEdges = function(a, b) { - return this.getEdges(a, b, !1, !0, !1) -}; -mxGraph.prototype.getEdges = function(a, b, c, d, e, f) { - c = null != c ? c : !0; - d = null != d ? d : !0; - e = null != e ? e : !0; - f = null != f ? f : !1; - for (var g = [], h = this.isCellCollapsed(a), k = this.model.getChildCount(a), l = 0; l < k; l++) { - var m = this.model.getChildAt(a, l); - if (h || !this.isCellVisible(m)) g = g.concat(this.model.getEdges(m, c, d)) - } - g = g.concat(this.model.getEdges(a, c, d)); - h = []; - for (l = 0; l < g.length; l++) m = this.view.getState(g[l]), k = null != m ? m.getVisibleTerminal(!0) : this.view.getVisibleTerminal(g[l], !0), m = null != m ? m.getVisibleTerminal(!1) : this.view - .getVisibleTerminal(g[l], !1), (e && k == m || k != m && (c && m == a && (null == b || this.isValidAncestor(k, b, f)) || d && k == a && (null == b || this.isValidAncestor(m, b, f)))) && h.push( - g[l]); - return h -}; -mxGraph.prototype.isValidAncestor = function(a, b, c) { - return c ? this.model.isAncestor(b, a) : this.model.getParent(a) == b -}; -mxGraph.prototype.getOpposites = function(a, b, c, d) { - c = null != c ? c : !0; - d = null != d ? d : !0; - var e = [], - f = {}; - if (null != a) - for (var g = 0; g < a.length; g++) { - var h = this.view.getState(a[g]), - k = null != h ? h.getVisibleTerminal(!0) : this.view.getVisibleTerminal(a[g], !0), - h = null != h ? h.getVisibleTerminal(!1) : this.view.getVisibleTerminal(a[g], !1); - if (k == b && null != h && h != b && d) { - var l = mxCellPath.create(h); - null == f[l] && (f[l] = h, e.push(h)) - } else h == b && (null != k && k != b && c) && (l = mxCellPath.create(k), null == f[l] && (f[l] = k, e.push(k))) - } - return e -}; -mxGraph.prototype.getEdgesBetween = function(a, b, c) { - c = null != c ? c : !1; - for (var d = this.getEdges(a), e = [], f = 0; f < d.length; f++) { - var g = this.view.getState(d[f]), - h = null != g ? g.getVisibleTerminal(!0) : this.view.getVisibleTerminal(d[f], !0), - g = null != g ? g.getVisibleTerminal(!1) : this.view.getVisibleTerminal(d[f], !1); - (h == a && g == b || !c && h == b && g == a) && e.push(d[f]) - } - return e -}; -mxGraph.prototype.getPointForEvent = function(a, b) { - var c = mxUtils.convertPoint(this.container, mxEvent.getClientX(a), mxEvent.getClientY(a)), - d = this.view.scale, - e = this.view.translate, - f = !1 != b ? this.gridSize / 2 : 0; - c.x = this.snap(c.x / d - e.x - f); - c.y = this.snap(c.y / d - e.y - f); - return c -}; -mxGraph.prototype.getCells = function(a, b, c, d, e, f) { - f = null != f ? f : []; - if (0 < c || 0 < d) { - var g = a + c, - h = b + d; - e = e || this.getDefaultParent(); - if (null != e) - for (var k = this.model.getChildCount(e), l = 0; l < k; l++) { - var m = this.model.getChildAt(e, l), - n = this.view.getState(m); - if (this.isCellVisible(m) && null != n) { - var p = n, - n = mxUtils.getValue(n.style, mxConstants.STYLE_ROTATION) || 0; - 0 != n && (p = mxUtils.getBoundingBox(p, n)); - p.x >= a && p.y + p.height <= h && p.y >= b && p.x + p.width <= g ? f.push(m) : this.getCells(a, b, c, d, m, f) - } - } - } - return f -}; -mxGraph.prototype.getCellsBeyond = function(a, b, c, d, e) { - var f = []; - if (d || e) - if (null == c && (c = this.getDefaultParent()), null != c) - for (var g = this.model.getChildCount(c), h = 0; h < g; h++) { - var k = this.model.getChildAt(c, h), - l = this.view.getState(k); - this.isCellVisible(k) && null != l && (!d || l.x >= a) && (!e || l.y >= b) && f.push(k) - } - return f -}; -mxGraph.prototype.findTreeRoots = function(a, b, c) { - b = null != b ? b : !1; - c = null != c ? c : !1; - var d = []; - if (null != a) { - for (var e = this.getModel(), f = e.getChildCount(a), g = null, h = 0, k = 0; k < f; k++) { - var l = e.getChildAt(a, k); - if (this.model.isVertex(l) && this.isCellVisible(l)) { - for (var m = this.getConnections(l, b ? a : null), n = 0, p = 0, q = 0; q < m.length; q++) this.view.getVisibleTerminal(m[q], !0) == l ? n++ : p++; - (c && 0 == n && 0 < p || !c && 0 == p && 0 < n) && d.push(l); - m = c ? p - n : n - p; - m > h && (h = m, g = l) - } - } - 0 == d.length && null != g && d.push(g) - } - return d -}; -mxGraph.prototype.traverse = function(a, b, c, d, e) { - if (null != c && null != a) { - b = null != b ? b : !0; - e = e || []; - var f = mxCellPath.create(a); - if (null == e[f] && (e[f] = a, d = c(a, d), null == d || d)) - if (d = this.model.getEdgeCount(a), 0 < d) - for (f = 0; f < d; f++) { - var g = this.model.getEdgeAt(a, f), - h = this.model.getTerminal(g, !0) == a; - if (!b || h) h = this.model.getTerminal(g, !h), this.traverse(h, b, c, g, e) - } - } -}; -mxGraph.prototype.isCellSelected = function(a) { - return this.getSelectionModel().isSelected(a) -}; -mxGraph.prototype.isSelectionEmpty = function() { - return this.getSelectionModel().isEmpty() -}; -mxGraph.prototype.clearSelection = function() { - return this.getSelectionModel().clear() -}; -mxGraph.prototype.getSelectionCount = function() { - return this.getSelectionModel().cells.length -}; -mxGraph.prototype.getSelectionCell = function() { - return this.getSelectionModel().cells[0] -}; -mxGraph.prototype.getSelectionCells = function() { - return this.getSelectionModel().cells.slice() -}; -mxGraph.prototype.setSelectionCell = function(a) { - this.getSelectionModel().setCell(a) -}; -mxGraph.prototype.setSelectionCells = function(a) { - this.getSelectionModel().setCells(a) -}; -mxGraph.prototype.addSelectionCell = function(a) { - this.getSelectionModel().addCell(a) -}; -mxGraph.prototype.addSelectionCells = function(a) { - this.getSelectionModel().addCells(a) -}; -mxGraph.prototype.removeSelectionCell = function(a) { - this.getSelectionModel().removeCell(a) -}; -mxGraph.prototype.removeSelectionCells = function(a) { - this.getSelectionModel().removeCells(a) -}; -mxGraph.prototype.selectRegion = function(a, b) { - var c = this.getCells(a.x, a.y, a.width, a.height); - this.selectCellsForEvent(c, b); - return c -}; -mxGraph.prototype.selectNextCell = function() { - this.selectCell(!0) -}; -mxGraph.prototype.selectPreviousCell = function() { - this.selectCell() -}; -mxGraph.prototype.selectParentCell = function() { - this.selectCell(!1, !0) -}; -mxGraph.prototype.selectChildCell = function() { - this.selectCell(!1, !1, !0) -}; -mxGraph.prototype.selectCell = function(a, b, c) { - var d = this.selectionModel, - e = 0 < d.cells.length ? d.cells[0] : null; - 1 < d.cells.length && d.clear(); - var d = null != e ? this.model.getParent(e) : this.getDefaultParent(), - f = this.model.getChildCount(d); - null == e && 0 < f ? (a = this.model.getChildAt(d, 0), this.setSelectionCell(a)) : (null == e || b) && null != this.view.getState(d) && null != this.model.getGeometry(d) ? this.getCurrentRoot() != - d && this.setSelectionCell(d) : null != e && c ? 0 < this.model.getChildCount(e) && (a = this.model.getChildAt(e, 0), this.setSelectionCell(a)) : - 0 < f && (b = d.getIndex(e), a ? (b++, a = this.model.getChildAt(d, b % f)) : (b--, a = this.model.getChildAt(d, 0 > b ? f - 1 : b)), this.setSelectionCell(a)) -}; -mxGraph.prototype.selectAll = function(a) { - a = a || this.getDefaultParent(); - a = this.model.getChildren(a); - null != a && this.setSelectionCells(a) -}; -mxGraph.prototype.selectVertices = function(a) { - this.selectCells(!0, !1, a) -}; -mxGraph.prototype.selectEdges = function(a) { - this.selectCells(!1, !0, a) -}; -mxGraph.prototype.selectCells = function(a, b, c) { - c = c || this.getDefaultParent(); - var d = mxUtils.bind(this, function(c) { - return null != this.view.getState(c) && 0 == this.model.getChildCount(c) && (this.model.isVertex(c) && a || this.model.isEdge(c) && b) - }); - c = this.model.filterDescendants(d, c); - this.setSelectionCells(c) -}; -mxGraph.prototype.selectCellForEvent = function(a, b) { - var c = this.isCellSelected(a); - this.isToggleEvent(b) ? c ? this.removeSelectionCell(a) : this.addSelectionCell(a) : (!c || 1 != this.getSelectionCount()) && this.setSelectionCell(a) -}; -mxGraph.prototype.selectCellsForEvent = function(a, b) { - this.isToggleEvent(b) ? this.addSelectionCells(a) : this.setSelectionCells(a) -}; -mxGraph.prototype.createHandler = function(a) { - var b = null; - null != a && (this.model.isEdge(a.cell) ? (b = this.view.getEdgeStyle(a), b = this.isLoop(a) || b == mxEdgeStyle.ElbowConnector || b == mxEdgeStyle.SideToSide || b == mxEdgeStyle.TopToBottom ? - new mxElbowEdgeHandler(a) : b == mxEdgeStyle.SegmentConnector || b == mxEdgeStyle.OrthConnector ? new mxEdgeSegmentHandler(a) : new mxEdgeHandler(a)) : b = new mxVertexHandler(a)); - return b -}; -mxGraph.prototype.addMouseListener = function(a) { - null == this.mouseListeners && (this.mouseListeners = []); - this.mouseListeners.push(a) -}; -mxGraph.prototype.removeMouseListener = function(a) { - if (null != this.mouseListeners) - for (var b = 0; b < this.mouseListeners.length; b++) - if (this.mouseListeners[b] == a) { - this.mouseListeners.splice(b, 1); - break - } -}; -mxGraph.prototype.updateMouseEvent = function(a) { - if (null == a.graphX || null == a.graphY) { - var b = mxUtils.convertPoint(this.container, a.getX(), a.getY()); - a.graphX = b.x - this.panDx; - a.graphY = b.y - this.panDy - } -}; -mxGraph.prototype.fireMouseEvent = function(a, b, c) { - null == c && (c = this); - this.updateMouseEvent(b); - a == mxEvent.MOUSE_DOWN && (this.isMouseDown = !0); - if (mxClient.IS_TOUCH && this.doubleTapEnabled && a == mxEvent.MOUSE_DOWN) { - var d = (new Date).getTime(); - d - this.lastTouchTime < this.doubleTapTimeout && Math.abs(this.lastTouchX - b.getX()) < this.doubleTapTolerance && Math.abs(this.lastTouchY - b.getY()) < this.doubleTapTolerance ? (this.lastTouchTime = - 0, this.dblClick(b.getEvent(), b.getCell()), b.getEvent().cancelBubble = !0) : (this.lastTouchX = - b.getX(), this.lastTouchY = b.getY(), this.lastTouchTime = d) - } - d = 2 != b.getEvent().detail; - if (mxClient.IS_IE && "CSS1Compat" == document.compatMode) { - if (null != this.lastMouseX && Math.abs(this.lastMouseX - b.getX()) > this.doubleTapTolerance || null != this.lastMouseY && Math.abs(this.lastMouseY - b.getY()) > this.doubleTapTolerance) d = ! - 0; - a == mxEvent.MOUSE_UP && (this.lastMouseX = b.getX(), this.lastMouseY = b.getY()) - } - if ((a != mxEvent.MOUSE_UP || this.isMouseDown) && d) { - if (a == mxEvent.MOUSE_UP && (this.isMouseDown = !1), !this.isEditing() && (mxClient.IS_OP || - mxClient.IS_SF || mxClient.IS_GC || mxClient.IS_IE && mxClient.IS_SVG || b.getEvent().target != this.container)) { - a == mxEvent.MOUSE_MOVE && (this.isMouseDown && this.autoScroll) && this.scrollPointToVisible(b.getGraphX(), b.getGraphY(), this.autoExtend); - if (null != this.mouseListeners) { - c = [c, b]; - b.getEvent().returnValue = !0; - for (d = 0; d < this.mouseListeners.length; d++) { - var e = this.mouseListeners[d]; - a == mxEvent.MOUSE_DOWN ? e.mouseDown.apply(e, c) : a == mxEvent.MOUSE_MOVE ? e.mouseMove.apply(e, c) : a == mxEvent.MOUSE_UP && e.mouseUp.apply(e, c) - } - } - a == - mxEvent.MOUSE_UP && this.click(b) - } - } else a == mxEvent.MOUSE_UP && (this.isMouseDown = !1) -}; -mxGraph.prototype.destroy = function() { - this.destroyed || (this.destroyed = !0, null != this.tooltipHandler && this.tooltipHandler.destroy(), null != this.selectionCellsHandler && this.selectionCellsHandler.destroy(), null != this.panningHandler && - this.panningHandler.destroy(), null != this.connectionHandler && this.connectionHandler.destroy(), null != this.graphHandler && this.graphHandler.destroy(), null != this.cellEditor && this.cellEditor - .destroy(), null != this.view && this.view.destroy(), null != this.model && null != this.graphModelChangeListener && - (this.model.removeListener(this.graphModelChangeListener), this.graphModelChangeListener = null), this.container = null) -}; - -function mxCellOverlay(a, b, c, d, e, f) { - this.image = a; - this.tooltip = b; - this.align = null != c ? c : this.align; - this.verticalAlign = null != d ? d : this.verticalAlign; - this.offset = null != e ? e : new mxPoint; - this.cursor = null != f ? f : "help" -} -mxCellOverlay.prototype = new mxEventSource; -mxCellOverlay.prototype.constructor = mxCellOverlay; -mxCellOverlay.prototype.image = null; -mxCellOverlay.prototype.tooltip = null; -mxCellOverlay.prototype.align = mxConstants.ALIGN_RIGHT; -mxCellOverlay.prototype.verticalAlign = mxConstants.ALIGN_BOTTOM; -mxCellOverlay.prototype.offset = null; -mxCellOverlay.prototype.cursor = null; -mxCellOverlay.prototype.defaultOverlap = 0.5; -mxCellOverlay.prototype.getBounds = function(a) { - var b = a.view.graph.getModel().isEdge(a.cell), - c = a.view.scale, - d = null, - e = this.image.width, - f = this.image.height; - b ? (b = a.absolutePoints, 1 == b.length % 2 ? d = b[Math.floor(b.length / 2)] : (d = b.length / 2, a = b[d - 1], b = b[d], d = new mxPoint(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2))) : (d = - new mxPoint, d.x = this.align == mxConstants.ALIGN_LEFT ? a.x : this.align == mxConstants.ALIGN_CENTER ? a.x + a.width / 2 : a.x + a.width, d.y = this.verticalAlign == mxConstants.ALIGN_TOP ? - a.y : this.verticalAlign == mxConstants.ALIGN_MIDDLE ? - a.y + a.height / 2 : a.y + a.height); - return new mxRectangle(Math.round(d.x - (e * this.defaultOverlap - this.offset.x) * c), Math.round(d.y - (f * this.defaultOverlap - this.offset.y) * c), e * c, f * c) -}; -mxCellOverlay.prototype.toString = function() { - return this.tooltip -}; - -function mxOutline(a, b) { - this.source = a; - null != b && this.init(b) -} -mxOutline.prototype.source = null; -mxOutline.prototype.outline = null; -mxOutline.prototype.graphRenderHint = mxConstants.RENDERING_HINT_FASTER; -mxOutline.prototype.enabled = !0; -mxOutline.prototype.showViewport = !0; -mxOutline.prototype.border = 10; -mxOutline.prototype.sizerSize = 8; -mxOutline.prototype.updateOnPan = !1; -mxOutline.prototype.sizerImage = null; -mxOutline.prototype.suspended = !1; -mxOutline.prototype.init = function(a) { - this.outline = new mxGraph(a, this.source.getModel(), this.graphRenderHint, this.source.getStylesheet()); - this.outline.foldingEnabled = !1; - this.outline.autoScroll = !1; - var b = this.outline.graphModelChanged; - this.outline.graphModelChanged = mxUtils.bind(this, function(a) { - !this.suspended && null != this.outline && b.apply(this.outline, arguments) - }); - mxClient.IS_SVG && (a = this.outline.getView().getCanvas().parentNode, a.setAttribute("shape-rendering", "optimizeSpeed"), a.setAttribute("image-rendering", - "optimizeSpeed")); - this.outline.labelsVisible = !1; - this.outline.setEnabled(!1); - this.updateHandler = mxUtils.bind(this, function(a, b) { - !this.suspended && !this.active && this.update() - }); - this.source.getModel().addListener(mxEvent.CHANGE, this.updateHandler); - this.outline.addMouseListener(this); - a = this.source.getView(); - a.addListener(mxEvent.SCALE, this.updateHandler); - a.addListener(mxEvent.TRANSLATE, this.updateHandler); - a.addListener(mxEvent.SCALE_AND_TRANSLATE, this.updateHandler); - a.addListener(mxEvent.DOWN, this.updateHandler); - a.addListener(mxEvent.UP, this.updateHandler); - mxEvent.addListener(this.source.container, "scroll", this.updateHandler); - this.panHandler = mxUtils.bind(this, function(a) { - this.updateOnPan && this.updateHandler.apply(this, arguments) - }); - this.source.addListener(mxEvent.PAN, this.panHandler); - this.refreshHandler = mxUtils.bind(this, function(a) { - this.outline.setStylesheet(this.source.getStylesheet()); - this.outline.refresh() - }); - this.source.addListener(mxEvent.REFRESH, this.refreshHandler); - this.bounds = new mxRectangle(0, 0, 0, - 0); - this.selectionBorder = new mxRectangleShape(this.bounds, null, mxConstants.OUTLINE_COLOR, mxConstants.OUTLINE_STROKEWIDTH); - this.selectionBorder.dialect = this.outline.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG; - this.selectionBorder.init(this.outline.getView().getOverlayPane()); - mxEvent.redirectMouseEvents(this.selectionBorder.node, this.outline); - this.selectionBorder.node.style.background = ""; - this.sizer = this.createSizer(); - this.sizer.init(this.outline.getView().getOverlayPane()); - this.enabled && (this.sizer.node.style.cursor = "pointer"); - mxEvent.addListener(this.sizer.node, mxClient.IS_TOUCH ? "touchstart" : "mousedown", mxUtils.bind(this, function(a) { - this.outline.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a)) - })); - this.selectionBorder.node.style.display = this.showViewport ? "" : "none"; - this.sizer.node.style.display = this.selectionBorder.node.style.display; - this.selectionBorder.node.style.cursor = "move"; - this.update(!1) -}; -mxOutline.prototype.isEnabled = function() { - return this.enabled -}; -mxOutline.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxOutline.prototype.setZoomEnabled = function(a) { - this.sizer.node.style.visibility = a ? "visible" : "hidden" -}; -mxOutline.prototype.refresh = function() { - this.update(!0) -}; -mxOutline.prototype.createSizer = function() { - var a = null != this.sizerImage ? new mxImageShape(new mxRectangle(0, 0, this.sizerImage.width, this.sizerImage.height), this.sizerImage.src) : new mxRectangleShape(new mxRectangle(0, 0, this.sizerSize, - this.sizerSize), mxConstants.OUTLINE_HANDLE_FILLCOLOR, mxConstants.OUTLINE_HANDLE_STROKECOLOR); - a.dialect = this.outline.dialect; - return a -}; -mxOutline.prototype.getSourceContainerSize = function() { - return new mxRectangle(0, 0, this.source.container.scrollWidth, this.source.container.scrollHeight) -}; -mxOutline.prototype.getOutlineOffset = function(a) { - return null -}; -mxOutline.prototype.update = function(a) { - if (null != this.source) { - var b = this.source.view.scale, - c = this.source.getGraphBounds(), - c = new mxRectangle(c.x / b + this.source.panDx, c.y / b + this.source.panDy, c.width / b, c.height / b), - d = new mxRectangle(0, 0, this.source.container.clientWidth / b, this.source.container.clientHeight / b), - e = c.clone(); - e.add(d); - var f = this.getSourceContainerSize(), - d = Math.max(f.width / b, e.width), - b = Math.max(f.height / b, e.height), - e = Math.max(0, this.outline.container.clientWidth - this.border), - f = Math.max(0, this.outline.container.clientHeight - - this.border), - e = Math.min(e / d, f / b); - if (0 < e) { - this.outline.getView().scale != e && (this.outline.getView().scale = e, a = !0); - d = this.outline.getView(); - d.currentRoot != this.source.getView().currentRoot && d.setCurrentRoot(this.source.getView().currentRoot); - var b = this.source.view.translate, - f = b.x + this.source.panDx, - g = b.y + this.source.panDy, - e = this.getOutlineOffset(e); - null != e && (f += e.x, g += e.y); - 0 > c.x && (f -= c.x); - 0 > c.y && (g -= c.y); - if (d.translate.x != f || d.translate.y != g) d.translate.x = f, d.translate.y = g, a = !0; - var c = d.translate, - e = this.source.getView().scale, - f = e / d.scale, - g = 1 / d.scale, - h = this.source.container; - this.bounds = new mxRectangle((c.x - b.x - this.source.panDx) / g, (c.y - b.y - this.source.panDy) / g, h.clientWidth / f, h.clientHeight / f); - this.bounds.x += this.source.container.scrollLeft * d.scale / e; - this.bounds.y += this.source.container.scrollTop * d.scale / e; - c = this.selectionBorder.bounds; - if (c.x != this.bounds.x || c.y != this.bounds.y || c.width != this.bounds.width || c.height != this.bounds.height) this.selectionBorder.bounds = this.bounds, this.selectionBorder.redraw(); - c = this.sizer.bounds; - d = new mxRectangle(this.bounds.x + this.bounds.width - c.width / 2, this.bounds.y + this.bounds.height - c.height / 2, c.width, c.height); - if (c.x != d.x || c.y != d.y || c.width != d.width || c.height != d.height) this.sizer.bounds = d, "hidden" != this.sizer.node.style.visibility && this.sizer.redraw(); - a && this.outline.view.revalidate() - } - } -}; -mxOutline.prototype.mouseDown = function(a, b) { - this.enabled && this.showViewport && (this.zoom = b.isSource(this.sizer), this.startX = b.getX(), this.startY = b.getY(), this.active = !0, this.source.useScrollbarsForPanning && mxUtils.hasScrollbars( - this.source.container) ? (this.dx0 = this.source.container.scrollLeft, this.dy0 = this.source.container.scrollTop) : this.dy0 = this.dx0 = 0); - b.consume() -}; -mxOutline.prototype.mouseMove = function(a, b) { - if (this.active) { - this.selectionBorder.node.style.display = this.showViewport ? "" : "none"; - this.sizer.node.style.display = this.selectionBorder.node.style.display; - var c = b.getX() - this.startX, - d = b.getY() - this.startY, - e = null; - if (this.zoom) e = this.source.container, d = c / (e.clientWidth / e.clientHeight), e = new mxRectangle(this.bounds.x, this.bounds.y, Math.max(1, this.bounds.width + c), Math.max(1, this.bounds - .height + d)), this.selectionBorder.bounds = e, this.selectionBorder.redraw(); - else { - var f = - this.outline.getView().scale, - e = new mxRectangle(this.bounds.x + c, this.bounds.y + d, this.bounds.width, this.bounds.height); - this.selectionBorder.bounds = e; - this.selectionBorder.redraw(); - c = c / f * this.source.getView().scale; - d = d / f * this.source.getView().scale; - this.source.panGraph(-c - this.dx0, -d - this.dy0) - } - c = this.sizer.bounds; - this.sizer.bounds = new mxRectangle(e.x + e.width - c.width / 2, e.y + e.height - c.height / 2, c.width, c.height); - "hidden" != this.sizer.node.style.visibility && this.sizer.redraw(); - b.consume() - } -}; -mxOutline.prototype.mouseUp = function(a, b) { - if (this.active) { - var c = b.getX() - this.startX, - d = b.getY() - this.startY; - if (0 < Math.abs(c) || 0 < Math.abs(d)) { - if (this.zoom) { - var d = this.selectionBorder.bounds.width, - e = this.source.getView().scale; - this.source.zoomTo(e - c * e / d, !1) - } else if (!this.source.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.source.container)) this.source.panGraph(0, 0), c /= this.outline.getView().scale, d /= this.outline.getView().scale, - e = this.source.getView().translate, this.source.getView().setTranslate(e.x - - c, e.y - d); - this.update(); - b.consume() - } - this.index = null; - this.active = !1 - } -}; -mxOutline.prototype.destroy = function() { - null != this.source && (this.source.removeListener(this.panHandler), this.source.removeListener(this.refreshHandler), this.source.getModel().removeListener(this.updateHandler), this.source.getView() - .removeListener(this.updateHandler), mxEvent.addListener(this.source.container, "scroll", this.updateHandler), this.source = null); - null != this.outline && (this.outline.removeMouseListener(this), this.outline.destroy(), this.outline = null); - null != this.selectionBorder && (this.selectionBorder.destroy(), - this.selectionBorder = null); - null != this.sizer && (this.sizer.destroy(), this.sizer = null) -}; - -function mxMultiplicity(a, b, c, d, e, f, g, h, k, l) { - this.source = a; - this.type = b; - this.attr = c; - this.value = d; - this.min = null != e ? e : 0; - this.max = null != f ? f : "n"; - this.validNeighbors = g; - this.countError = mxResources.get(h) || h; - this.typeError = mxResources.get(k) || k; - this.validNeighborsAllowed = null != l ? l : !0 -} -mxMultiplicity.prototype.type = null; -mxMultiplicity.prototype.attr = null; -mxMultiplicity.prototype.value = null; -mxMultiplicity.prototype.source = null; -mxMultiplicity.prototype.min = null; -mxMultiplicity.prototype.max = null; -mxMultiplicity.prototype.validNeighbors = null; -mxMultiplicity.prototype.validNeighborsAllowed = !0; -mxMultiplicity.prototype.countError = null; -mxMultiplicity.prototype.typeError = null; -mxMultiplicity.prototype.check = function(a, b, c, d, e, f) { - var g = ""; - if (this.source && this.checkTerminal(a, c, b) || !this.source && this.checkTerminal(a, d, b)) { - if (null != this.countError && (this.source && (0 == this.max || e >= this.max) || !this.source && (0 == this.max || f >= this.max))) g += this.countError + "\n"; - null != this.validNeighbors && (null != this.typeError && 0 < this.validNeighbors.length) && (this.checkNeighbors(a, b, c, d) || (g += this.typeError + "\n")) - } - return 0 < g.length ? g : null -}; -mxMultiplicity.prototype.checkNeighbors = function(a, b, c, d) { - b = a.model.getValue(c); - d = a.model.getValue(d); - c = !this.validNeighborsAllowed; - for (var e = this.validNeighbors, f = 0; f < e.length; f++) - if (this.source && this.checkType(a, d, e[f])) { - c = this.validNeighborsAllowed; - break - } else if (!this.source && this.checkType(a, b, e[f])) { - c = this.validNeighborsAllowed; - break - } - return c -}; -mxMultiplicity.prototype.checkTerminal = function(a, b, c) { - b = a.model.getValue(b); - return this.checkType(a, b, this.type, this.attr, this.value) -}; -mxMultiplicity.prototype.checkType = function(a, b, c, d, e) { - return null != b ? isNaN(b.nodeType) ? b == c : mxUtils.isNode(b, c, d, e) : !1 -}; - -function mxLayoutManager(a) { - this.undoHandler = mxUtils.bind(this, function(a, c) { - this.isEnabled() && this.beforeUndo(c.getProperty("edit")) - }); - this.moveHandler = mxUtils.bind(this, function(a, c) { - this.isEnabled() && this.cellsMoved(c.getProperty("cells"), c.getProperty("event")) - }); - this.setGraph(a) -} -mxLayoutManager.prototype = new mxEventSource; -mxLayoutManager.prototype.constructor = mxLayoutManager; -mxLayoutManager.prototype.graph = null; -mxLayoutManager.prototype.bubbling = !0; -mxLayoutManager.prototype.enabled = !0; -mxLayoutManager.prototype.updateHandler = null; -mxLayoutManager.prototype.moveHandler = null; -mxLayoutManager.prototype.isEnabled = function() { - return this.enabled -}; -mxLayoutManager.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxLayoutManager.prototype.isBubbling = function() { - return this.bubbling -}; -mxLayoutManager.prototype.setBubbling = function(a) { - this.bubbling = a -}; -mxLayoutManager.prototype.getGraph = function() { - return this.graph -}; -mxLayoutManager.prototype.setGraph = function(a) { - if (null != this.graph) { - var b = this.graph.getModel(); - b.removeListener(this.undoHandler); - this.graph.removeListener(this.moveHandler) - } - this.graph = a; - null != this.graph && (b = this.graph.getModel(), b.addListener(mxEvent.BEFORE_UNDO, this.undoHandler), this.graph.addListener(mxEvent.MOVE_CELLS, this.moveHandler)) -}; -mxLayoutManager.prototype.getLayout = function(a) { - return null -}; -mxLayoutManager.prototype.beforeUndo = function(a) { - a = this.getCellsForChanges(a.changes); - var b = this.getGraph().getModel(); - if (this.isBubbling()) - for (var c = b.getParents(a); 0 < c.length;) a = a.concat(c), c = b.getParents(c); - this.layoutCells(mxUtils.sortCells(a, !1)) -}; -mxLayoutManager.prototype.cellsMoved = function(a, b) { - if (null != a && null != b) - for (var c = mxUtils.convertPoint(this.getGraph().container, mxEvent.getClientX(b), mxEvent.getClientY(b)), d = this.getGraph().getModel(), e = 0; e < a.length; e++) { - var f = this.getLayout(d.getParent(a[e])); - null != f && f.moveCell(a[e], c.x, c.y) - } -}; -mxLayoutManager.prototype.getCellsForChanges = function(a) { - for (var b = [], c = {}, d = 0; d < a.length; d++) { - var e = a[d]; - if (e instanceof mxRootChange) return []; - for (var e = this.getCellsForChange(e), f = 0; f < e.length; f++) - if (null != e[f]) { - var g = mxCellPath.create(e[f]); - null == c[g] && (c[g] = e[f], b.push(e[f])) - } - } - return b -}; -mxLayoutManager.prototype.getCellsForChange = function(a) { - var b = this.getGraph().getModel(); - return a instanceof mxChildChange ? [a.child, a.previous, b.getParent(a.child)] : a instanceof mxTerminalChange || a instanceof mxGeometryChange ? [a.cell, b.getParent(a.cell)] : [] -}; -mxLayoutManager.prototype.layoutCells = function(a) { - if (0 < a.length) { - var b = this.getGraph().getModel(); - b.beginUpdate(); - try { - for (var c = null, d = 0; d < a.length; d++) a[d] != b.getRoot() && a[d] != c && (c = a[d], this.executeLayout(this.getLayout(c), c)); - this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS, "cells", a)) - } finally { - b.endUpdate() - } - } -}; -mxLayoutManager.prototype.executeLayout = function(a, b) { - null != a && null != b && a.execute(b) -}; -mxLayoutManager.prototype.destroy = function() { - this.setGraph(null) -}; - -function mxSpaceManager(a, b, c, d) { - this.resizeHandler = mxUtils.bind(this, function(a, b) { - this.isEnabled() && this.cellsResized(b.getProperty("cells")) - }); - this.foldHandler = mxUtils.bind(this, function(a, b) { - this.isEnabled() && this.cellsResized(b.getProperty("cells")) - }); - this.shiftRightwards = null != b ? b : !0; - this.shiftDownwards = null != c ? c : !0; - this.extendParents = null != d ? d : !0; - this.setGraph(a) -} -mxSpaceManager.prototype = new mxEventSource; -mxSpaceManager.prototype.constructor = mxSpaceManager; -mxSpaceManager.prototype.graph = null; -mxSpaceManager.prototype.enabled = !0; -mxSpaceManager.prototype.shiftRightwards = !0; -mxSpaceManager.prototype.shiftDownwards = !0; -mxSpaceManager.prototype.extendParents = !0; -mxSpaceManager.prototype.resizeHandler = null; -mxSpaceManager.prototype.foldHandler = null; -mxSpaceManager.prototype.isCellIgnored = function(a) { - return !this.getGraph().getModel().isVertex(a) -}; -mxSpaceManager.prototype.isCellShiftable = function(a) { - return this.getGraph().getModel().isVertex(a) && this.getGraph().isCellMovable(a) -}; -mxSpaceManager.prototype.isEnabled = function() { - return this.enabled -}; -mxSpaceManager.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxSpaceManager.prototype.isShiftRightwards = function() { - return this.shiftRightwards -}; -mxSpaceManager.prototype.setShiftRightwards = function(a) { - this.shiftRightwards = a -}; -mxSpaceManager.prototype.isShiftDownwards = function() { - return this.shiftDownwards -}; -mxSpaceManager.prototype.setShiftDownwards = function(a) { - this.shiftDownwards = a -}; -mxSpaceManager.prototype.isExtendParents = function() { - return this.extendParents -}; -mxSpaceManager.prototype.setExtendParents = function(a) { - this.extendParents = a -}; -mxSpaceManager.prototype.getGraph = function() { - return this.graph -}; -mxSpaceManager.prototype.setGraph = function(a) { - null != this.graph && (this.graph.removeListener(this.resizeHandler), this.graph.removeListener(this.foldHandler)); - this.graph = a; - null != this.graph && (this.graph.addListener(mxEvent.RESIZE_CELLS, this.resizeHandler), this.graph.addListener(mxEvent.FOLD_CELLS, this.foldHandler)) -}; -mxSpaceManager.prototype.cellsResized = function(a) { - if (null != a) { - var b = this.graph.getModel(); - b.beginUpdate(); - try { - for (var c = 0; c < a.length; c++) - if (!this.isCellIgnored(a[c])) { - this.cellResized(a[c]); - break - } - } finally { - b.endUpdate() - } - } -}; -mxSpaceManager.prototype.cellResized = function(a) { - var b = this.getGraph(), - c = b.getView(), - d = b.getModel(), - e = c.getState(a), - f = c.getState(d.getParent(a)); - if (null != e && null != f) { - var g = this.getCellsToShift(e), - h = d.getGeometry(a); - if (null != g && null != h) { - var k = c.translate, - l = c.scale, - c = e.x - f.origin.x - k.x * l, - f = e.y - f.origin.y - k.y * l, - k = e.x + e.width, - m = e.y + e.height, - n = e.width - h.width * l + c - h.x * l, - p = e.height - h.height * l + f - h.y * l, - q = 1 - h.width * l / e.width, - e = 1 - h.height * l / e.height; - d.beginUpdate(); - try { - for (h = 0; h < g.length; h++) g[h] != a && this.isCellShiftable(g[h]) && - this.shiftCell(g[h], n, p, c, f, k, m, q, e, this.isExtendParents() && b.isExtendParent(g[h])) - } finally { - d.endUpdate() - } - } - } -}; -mxSpaceManager.prototype.shiftCell = function(a, b, c, d, e, f, g, h, k, l) { - d = this.getGraph(); - var m = d.getView().getState(a); - if (null != m) { - var n = d.getModel(), - p = n.getGeometry(a); - if (null != p) { - n.beginUpdate(); - try { - if (this.isShiftRightwards()) - if (m.x >= f) p = p.clone(), p.translate(-b, 0); - else { - var q = Math.max(0, m.x - x0), - p = p.clone(); - p.translate(-h * q, 0) - } - if (this.isShiftDownwards()) - if (m.y >= g) p = p.clone(), p.translate(0, -c); - else { - var s = Math.max(0, m.y - e), - p = p.clone(); - p.translate(0, -k * s) - } - p != n.getGeometry(a) && (n.setGeometry(a, p), l && d.extendParent(a)) - } finally { - n.endUpdate() - } - } - } -}; -mxSpaceManager.prototype.getCellsToShift = function(a) { - var b = this.getGraph(), - c = b.getModel().getParent(a.cell), - d = this.isShiftDownwards(), - e = this.isShiftRightwards(); - return b.getCellsBeyond(a.x + (d ? 0 : a.width), a.y + (d && e ? 0 : a.height), c, e, d) -}; -mxSpaceManager.prototype.destroy = function() { - this.setGraph(null) -}; - -function mxSwimlaneManager(a, b, c, d) { - this.horizontal = null != b ? b : !0; - this.addEnabled = null != c ? c : !0; - this.resizeEnabled = null != d ? d : !0; - this.addHandler = mxUtils.bind(this, function(a, b) { - this.isEnabled() && this.isAddEnabled() && this.cellsAdded(b.getProperty("cells")) - }); - this.resizeHandler = mxUtils.bind(this, function(a, b) { - this.isEnabled() && this.isResizeEnabled() && this.cellsResized(b.getProperty("cells")) - }); - this.setGraph(a) -} -mxSwimlaneManager.prototype = new mxEventSource; -mxSwimlaneManager.prototype.constructor = mxSwimlaneManager; -mxSwimlaneManager.prototype.graph = null; -mxSwimlaneManager.prototype.enabled = !0; -mxSwimlaneManager.prototype.horizontal = !0; -mxSwimlaneManager.prototype.addEnabled = !0; -mxSwimlaneManager.prototype.resizeEnabled = !0; -mxSwimlaneManager.prototype.addHandler = null; -mxSwimlaneManager.prototype.resizeHandler = null; -mxSwimlaneManager.prototype.isEnabled = function() { - return this.enabled -}; -mxSwimlaneManager.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxSwimlaneManager.prototype.isHorizontal = function() { - return this.horizontal -}; -mxSwimlaneManager.prototype.setHorizontal = function(a) { - this.horizontal = a -}; -mxSwimlaneManager.prototype.isAddEnabled = function() { - return this.addEnabled -}; -mxSwimlaneManager.prototype.setAddEnabled = function(a) { - this.addEnabled = a -}; -mxSwimlaneManager.prototype.isResizeEnabled = function() { - return this.resizeEnabled -}; -mxSwimlaneManager.prototype.setResizeEnabled = function(a) { - this.resizeEnabled = a -}; -mxSwimlaneManager.prototype.getGraph = function() { - return this.graph -}; -mxSwimlaneManager.prototype.setGraph = function(a) { - null != this.graph && (this.graph.removeListener(this.addHandler), this.graph.removeListener(this.resizeHandler)); - this.graph = a; - null != this.graph && (this.graph.addListener(mxEvent.ADD_CELLS, this.addHandler), this.graph.addListener(mxEvent.CELLS_RESIZED, this.resizeHandler)) -}; -mxSwimlaneManager.prototype.isSwimlaneIgnored = function(a) { - return !this.getGraph().isSwimlane(a) -}; -mxSwimlaneManager.prototype.isCellHorizontal = function(a) { - if (this.graph.isSwimlane(a)) { - var b = this.graph.view.getState(a); - a = null != b ? b.style : this.graph.getCellStyle(a); - return 1 == mxUtils.getValue(a, mxConstants.STYLE_HORIZONTAL, 1) - } - return !this.isHorizontal() -}; -mxSwimlaneManager.prototype.cellsAdded = function(a) { - if (null != a) { - var b = this.getGraph().getModel(); - b.beginUpdate(); - try { - for (var c = 0; c < a.length; c++) this.isSwimlaneIgnored(a[c]) || this.swimlaneAdded(a[c]) - } finally { - b.endUpdate() - } - } -}; -mxSwimlaneManager.prototype.swimlaneAdded = function(a) { - for (var b = this.getGraph().getModel(), c = b.getParent(a), d = b.getChildCount(c), e = null, f = 0; f < d; f++) { - var g = b.getChildAt(c, f); - if (g != a && !this.isSwimlaneIgnored(g) && (e = b.getGeometry(g), null != e)) break - } - null != e && this.resizeSwimlane(a, e.width, e.height) -}; -mxSwimlaneManager.prototype.cellsResized = function(a) { - if (null != a) { - var b = this.getGraph().getModel(); - b.beginUpdate(); - try { - for (var c = 0; c < a.length; c++) - if (!this.isSwimlaneIgnored(a[c])) { - var d = b.getGeometry(a[c]); - if (null != d) { - for (var e = new mxRectangle(0, 0, d.width, d.height), f = a[c], g = f; null != g;) { - var f = g, - g = b.getParent(g), - h = this.graph.isSwimlane(g) ? this.graph.getStartSize(g) : new mxRectangle; - e.width += h.width; - e.height += h.height - } - this.resizeSwimlane(f, e.width, e.height) - } - } - } finally { - b.endUpdate() - } - } -}; -mxSwimlaneManager.prototype.resizeSwimlane = function(a, b, c) { - var d = this.getGraph().getModel(); - d.beginUpdate(); - try { - if (!this.isSwimlaneIgnored(a)) { - var e = d.getGeometry(a); - if (null != e) { - var f = this.isCellHorizontal(a); - if (f && e.height != c || !f && e.width != b) e = e.clone(), f ? e.height = c : e.width = b, d.setGeometry(a, e) - } - } - var g = this.graph.isSwimlane(a) ? this.graph.getStartSize(a) : new mxRectangle; - b -= g.width; - c -= g.height; - for (var h = d.getChildCount(a), e = 0; e < h; e++) { - var k = d.getChildAt(a, e); - this.resizeSwimlane(k, b, c) - } - } finally { - d.endUpdate() - } -}; -mxSwimlaneManager.prototype.destroy = function() { - this.setGraph(null) -}; - -function mxTemporaryCellStates(a, b, c) { - this.view = a; - b = null != b ? b : 1; - this.oldBounds = a.getGraphBounds(); - this.oldStates = a.getStates(); - this.oldScale = a.getScale(); - a.setStates(new mxDictionary); - a.setScale(b); - if (null != c) { - b = a.createState(new mxCell); - for (var d = 0; d < c.length; d++) a.validateBounds(b, c[d]); - for (var e = null, d = 0; d < c.length; d++) { - var f = a.validatePoints(b, c[d]); - null == e ? e = f : e.add(f) - } - null == e && (e = new mxRectangle); - a.setGraphBounds(e) - } -} -mxTemporaryCellStates.prototype.view = null; -mxTemporaryCellStates.prototype.oldStates = null; -mxTemporaryCellStates.prototype.oldBounds = null; -mxTemporaryCellStates.prototype.oldScale = null; -mxTemporaryCellStates.prototype.destroy = function() { - this.view.setScale(this.oldScale); - this.view.setStates(this.oldStates); - this.view.setGraphBounds(this.oldBounds) -}; - -function mxCellStatePreview(a) { - this.graph = a; - this.deltas = {} -} -mxCellStatePreview.prototype.graph = null; -mxCellStatePreview.prototype.deltas = null; -mxCellStatePreview.prototype.count = 0; -mxCellStatePreview.prototype.isEmpty = function() { - return 0 == this.count -}; -mxCellStatePreview.prototype.moveState = function(a, b, c, d, e) { - d = null != d ? d : !0; - e = null != e ? e : !0; - var f = mxCellPath.create(a.cell), - g = this.deltas[f]; - null == g ? (g = new mxPoint(b, c), this.deltas[f] = g, this.count++) : d ? (g.X += b, g.Y += c) : (g.X = b, g.Y = c); - e && this.addEdges(a); - return g -}; -mxCellStatePreview.prototype.show = function(a) { - var b = this.graph.getModel(), - c = b.getRoot(), - d; - for (d in this.deltas) { - var e = mxCellPath.resolve(c, d), - f = this.graph.view.getState(e), - g = this.deltas[d], - e = this.graph.view.getState(b.getParent(e)); - this.translateState(e, f, g.x, g.y) - } - for (d in this.deltas) e = mxCellPath.resolve(c, d), f = this.graph.view.getState(e), g = this.deltas[d], e = this.graph.view.getState(b.getParent(e)), this.revalidateState(e, f, g.x, g.y, a) -}; -mxCellStatePreview.prototype.translateState = function(a, b, c, d) { - if (null != b) { - var e = this.graph.getModel(); - if (e.isVertex(b.cell)) { - b.invalid = !0; - this.graph.view.validateBounds(a, b.cell); - a = e.getGeometry(b.cell); - var f = mxCellPath.create(b.cell); - if ((0 != c || 0 != d) && null != a && (!a.relative || null != this.deltas[f])) b.x += c, b.y += d - } - a = e.getChildCount(b.cell); - for (f = 0; f < a; f++) this.translateState(b, this.graph.view.getState(e.getChildAt(b.cell, f)), c, d) - } -}; -mxCellStatePreview.prototype.revalidateState = function(a, b, c, d, e) { - if (null != b) { - b.invalid = !0; - this.graph.view.validatePoints(a, b.cell); - var f = mxCellPath.create(b.cell), - g = this.graph.getModel(), - h = this.graph.getCellGeometry(b.cell); - if ((0 != c || 0 != d) && null != h && h.relative && g.isVertex(b.cell) && (null == a || g.isVertex(a.cell) || null != this.deltas[f])) b.x += c, b.y += d, this.graph.cellRenderer.redraw(b); - null != e && e(b); - a = g.getChildCount(b.cell); - for (f = 0; f < a; f++) this.revalidateState(b, this.graph.view.getState(g.getChildAt(b.cell, - f)), c, d, e) - } -}; -mxCellStatePreview.prototype.addEdges = function(a) { - for (var b = this.graph.getModel(), c = b.getEdgeCount(a.cell), d = 0; d < c; d++) { - var e = this.graph.view.getState(b.getEdgeAt(a.cell, d)); - null != e && this.moveState(e, 0, 0) - } -}; - -function mxConnectionConstraint(a, b) { - this.point = a; - this.perimeter = null != b ? b : !0 -} -mxConnectionConstraint.prototype.point = null; -mxConnectionConstraint.prototype.perimeter = null; - -function mxGraphHandler(a) { - this.graph = a; - this.graph.addMouseListener(this); - this.panHandler = mxUtils.bind(this, function() { - this.updatePreviewShape() - }); - this.graph.addListener(mxEvent.PAN, this.panHandler) -} -mxGraphHandler.prototype.graph = null; -mxGraphHandler.prototype.maxCells = mxClient.IS_IE ? 20 : 50; -mxGraphHandler.prototype.enabled = !0; -mxGraphHandler.prototype.highlightEnabled = !0; -mxGraphHandler.prototype.cloneEnabled = !0; -mxGraphHandler.prototype.moveEnabled = !0; -mxGraphHandler.prototype.guidesEnabled = !1; -mxGraphHandler.prototype.guide = null; -mxGraphHandler.prototype.currentDx = null; -mxGraphHandler.prototype.currentDy = null; -mxGraphHandler.prototype.updateCursor = !0; -mxGraphHandler.prototype.selectEnabled = !0; -mxGraphHandler.prototype.removeCellsFromParent = !0; -mxGraphHandler.prototype.connectOnDrop = !1; -mxGraphHandler.prototype.scrollOnMove = !0; -mxGraphHandler.prototype.minimumSize = 6; -mxGraphHandler.prototype.previewColor = "black"; -mxGraphHandler.prototype.htmlPreview = !1; -mxGraphHandler.prototype.shape = null; -mxGraphHandler.prototype.scaleGrid = !1; -mxGraphHandler.prototype.rotationEnabled = !0; -mxGraphHandler.prototype.isEnabled = function() { - return this.enabled -}; -mxGraphHandler.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxGraphHandler.prototype.isCloneEnabled = function() { - return this.cloneEnabled -}; -mxGraphHandler.prototype.setCloneEnabled = function(a) { - this.cloneEnabled = a -}; -mxGraphHandler.prototype.isMoveEnabled = function() { - return this.moveEnabled -}; -mxGraphHandler.prototype.setMoveEnabled = function(a) { - this.moveEnabled = a -}; -mxGraphHandler.prototype.isSelectEnabled = function() { - return this.selectEnabled -}; -mxGraphHandler.prototype.setSelectEnabled = function(a) { - this.selectEnabled = a -}; -mxGraphHandler.prototype.isRemoveCellsFromParent = function() { - return this.removeCellsFromParent -}; -mxGraphHandler.prototype.setRemoveCellsFromParent = function(a) { - this.removeCellsFromParent = a -}; -mxGraphHandler.prototype.getInitialCellForEvent = function(a) { - return a.getCell() -}; -mxGraphHandler.prototype.isDelayedSelection = function(a) { - return this.graph.isCellSelected(a) -}; -mxGraphHandler.prototype.mouseDown = function(a, b) { - if (!b.isConsumed() && this.isEnabled() && this.graph.isEnabled() && !this.graph.isForceMarqueeEvent(b.getEvent()) && null != b.getState()) { - var c = this.getInitialCellForEvent(b); - this.cell = null; - this.delayedSelection = this.isDelayedSelection(c); - this.isSelectEnabled() && !this.delayedSelection && this.graph.selectCellForEvent(c, b.getEvent()); - if (this.isMoveEnabled()) { - var d = this.graph.model, - e = d.getGeometry(c); - this.graph.isCellMovable(c) && (!d.isEdge(c) || 1 < this.graph.getSelectionCount() || - null != e.points && 0 < e.points.length || null == d.getTerminal(c, !0) || null == d.getTerminal(c, !1) || this.graph.allowDanglingEdges || this.graph.isCloneEvent(b.getEvent()) && this.graph - .isCellsCloneable()) && this.start(c, b.getX(), b.getY()); - this.cellWasClicked = !0; - !mxClient.IS_SF && !mxClient.IS_GC || "SELECT" != b.getSource().nodeName ? b.consume() : mxClient.IS_SF && "SELECT" == b.getSource().nodeName && (this.cellWasClicked = !1, this.first = null) - } - } -}; -mxGraphHandler.prototype.getGuideStates = function() { - var a = this.graph.getDefaultParent(), - b = this.graph.getModel(), - c = mxUtils.bind(this, function(a) { - return null != this.graph.view.getState(a) && b.isVertex(a) && null != b.getGeometry(a) && !b.getGeometry(a).relative - }); - return this.graph.view.getCellStates(b.filterDescendants(c, a)) -}; -mxGraphHandler.prototype.getCells = function(a) { - return !this.delayedSelection && this.graph.isCellMovable(a) ? [a] : this.graph.getMovableCells(this.graph.getSelectionCells()) -}; -mxGraphHandler.prototype.getPreviewBounds = function(a) { - a = this.getBoundingBox(a); - null != a && (a.grow(-1, -1), a.width < this.minimumSize && (a.x -= (this.minimumSize - a.width) / 2, a.width = this.minimumSize), a.height < this.minimumSize && (a.y -= (this.minimumSize - a.height) / - 2, a.height = this.minimumSize)); - return a -}; -mxGraphHandler.prototype.getBoundingBox = function(a) { - var b = null; - if (null != a && 0 < a.length) - for (var c = this.graph.getModel(), d = 0; d < a.length; d++) - if (c.isVertex(a[d]) || c.isEdge(a[d])) { - var e = this.graph.view.getState(a[d]); - if (null != e) { - var f = e; - c.isVertex(a[d]) && (null != e.shape && null != e.shape.boundingBox) && (f = e.shape.boundingBox); - null == b ? b = new mxRectangle(f.x, f.y, f.width, f.height) : b.add(f) - } - } - return b -}; -mxGraphHandler.prototype.createPreviewShape = function(a) { - a = new mxRectangleShape(a, null, this.previewColor); - a.isDashed = !0; - this.htmlPreview ? (a.dialect = mxConstants.DIALECT_STRICTHTML, a.init(this.graph.container)) : (a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG, - a.init(this.graph.getView().getOverlayPane()), a.pointerEvents = !1); - return a -}; -mxGraphHandler.prototype.start = function(a, b, c) { - this.cell = a; - this.first = mxUtils.convertPoint(this.graph.container, b, c); - this.cells = this.getCells(this.cell); - this.bounds = this.graph.getView().getBounds(this.cells); - this.pBounds = this.getPreviewBounds(this.cells); - this.guidesEnabled && (this.guide = new mxGuide(this.graph, this.getGuideStates())) -}; -mxGraphHandler.prototype.useGuidesForEvent = function(a) { - return null != this.guide ? this.guide.isEnabledForEvent(a.getEvent()) : !0 -}; -mxGraphHandler.prototype.snap = function(a) { - var b = this.scaleGrid ? this.graph.view.scale : 1; - a.x = this.graph.snap(a.x / b) * b; - a.y = this.graph.snap(a.y / b) * b; - return a -}; -mxGraphHandler.prototype.mouseMove = function(a, b) { - var c = this.graph; - if (!b.isConsumed() && c.isMouseDown && null != this.cell && null != this.first && null != this.bounds) { - var d = mxUtils.convertPoint(c.container, b.getX(), b.getY()), - e = d.x - this.first.x, - f = d.y - this.first.y, - d = c.tolerance; - if (null != this.shape || Math.abs(e) > d || Math.abs(f) > d) { - null == this.highlight && (this.highlight = new mxCellHighlight(this.graph, mxConstants.DROP_TARGET_COLOR, 3)); - null == this.shape && (this.shape = this.createPreviewShape(this.bounds)); - var g = c.isGridEnabledEvent(b.getEvent()), - d = !0; - if (null != this.guide && this.useGuidesForEvent(b)) f = this.guide.move(this.bounds, new mxPoint(e, f), g), d = !1, e = f.x, f = f.y; - else if (g) var h = c.getView().translate, - k = c.getView().scale, - g = this.bounds.x - (c.snap(this.bounds.x / k - h.x) + h.x) * k, - h = this.bounds.y - (c.snap(this.bounds.y / k - h.y) + h.y) * k, - f = this.snap(new mxPoint(e, f)), - e = f.x - g, - f = f.y - h; - null != this.guide && d && this.guide.hide(); - c.isConstrainedEvent(b.getEvent()) && (Math.abs(e) > Math.abs(f) ? f = 0 : e = 0); - this.currentDx = e; - this.currentDy = f; - this.updatePreviewShape(); - d = null; - f = b.getCell(); - c.isDropEnabled() && this.highlightEnabled && (d = c.getDropTarget(this.cells, b.getEvent(), f)); - g = d; - for (h = c.getModel(); null != g && g != this.cells[0];) g = h.getParent(g); - var k = c.isCloneEvent(b.getEvent()) && c.isCellsCloneable() && this.isCloneEnabled(), - e = c.getView().getState(d), - l = !1; - null != e && null == g && (h.getParent(this.cell) != d || k) ? (this.target != d && (this.target = d, this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)), l = !0) : (this.target = null, - this.connectOnDrop && (null != f && 1 == this.cells.length && c.getModel().isVertex(f) && - c.isCellConnectable(f)) && (e = c.getView().getState(f), null != e && (c = null == c.getEdgeValidationError(null, this.cell, f) ? mxConstants.VALID_COLOR : mxConstants.INVALID_CONNECT_TARGET_COLOR, - this.setHighlightColor(c), l = !0))); - null != e && l ? this.highlight.highlight(e) : this.highlight.hide() - } - b.consume(); - mxEvent.consume(b.getEvent()) - } else if ((this.isMoveEnabled() || this.isCloneEnabled()) && this.updateCursor && !b.isConsumed() && null != b.getState() && !c.isMouseDown) e = c.getCursorForCell(b.getCell()), null == e && (c.isEnabled() && - c.isCellMovable(b.getCell())) && - (e = c.getModel().isEdge(b.getCell()) ? mxConstants.CURSOR_MOVABLE_EDGE : mxConstants.CURSOR_MOVABLE_VERTEX), b.getState().setCursor(e), b.consume() -}; -mxGraphHandler.prototype.updatePreviewShape = function() { - null != this.shape && (this.shape.bounds = new mxRectangle(Math.round(this.pBounds.x + this.currentDx - this.graph.panDx), Math.round(this.pBounds.y + this.currentDy - this.graph.panDy), this.pBounds - .width, this.pBounds.height), this.shape.redraw()) -}; -mxGraphHandler.prototype.setHighlightColor = function(a) { - null != this.highlight && this.highlight.setHighlightColor(a) -}; -mxGraphHandler.prototype.mouseUp = function(a, b) { - if (!b.isConsumed()) { - var c = this.graph; - if (null != this.cell && null != this.first && null != this.shape && null != this.currentDx && null != this.currentDy) { - var d = c.getView().scale, - e = c.isCloneEvent(b.getEvent()) && c.isCellsCloneable() && this.isCloneEnabled(), - f = this.currentDx / d, - d = this.currentDy / d, - g = b.getCell(); - this.connectOnDrop && null == this.target && null != g && c.getModel().isVertex(g) && c.isCellConnectable(g) && c.isEdgeValid(null, this.cell, g) ? c.connectionHandler.connect(this.cell, - g, b.getEvent()) : (g = this.target, c.isSplitEnabled() && c.isSplitTarget(g, this.cells, b.getEvent()) ? c.splitEdge(g, this.cells, null, f, d) : this.moveCells(this.cells, f, d, e, this - .target, b.getEvent())) - } else this.isSelectEnabled() && (this.delayedSelection && null != this.cell) && this.selectDelayed(b) - } - this.cellWasClicked && b.consume(); - this.reset() -}; -mxGraphHandler.prototype.selectDelayed = function(a) { - this.graph.selectCellForEvent(this.cell, a.getEvent()) -}; -mxGraphHandler.prototype.reset = function() { - this.destroyShapes(); - this.delayedSelection = this.cellWasClicked = !1; - this.target = this.cell = this.first = this.guides = this.currentDy = this.currentDx = null -}; -mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(a, b, c) { - if (this.graph.getModel().isVertex(a)) { - a = this.graph.getView().getState(a); - c = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(c), mxEvent.getClientY(c)); - var d = mxUtils.toRadians(mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION) || 0); - if (0 != d) { - b = Math.cos(-d); - var d = Math.sin(-d), - e = new mxPoint(a.getCenterX(), a.getCenterY()); - c = mxUtils.getRotatedPoint(c, b, d, e) - } - return null != a && !mxUtils.contains(a, c.x, c.y) - } - return !1 -}; -mxGraphHandler.prototype.moveCells = function(a, b, c, d, e, f) { - d && (a = this.graph.getCloneableCells(a)); - null == e && (this.isRemoveCellsFromParent() && this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell), a, f)) && (e = this.graph.getDefaultParent()); - a = this.graph.moveCells(a, b - this.graph.panDx / this.graph.view.scale, c - this.graph.panDy / this.graph.view.scale, d, e, f); - this.isSelectEnabled() && this.scrollOnMove && this.graph.scrollCellToVisible(a[0]); - d && this.graph.setSelectionCells(a) -}; -mxGraphHandler.prototype.destroyShapes = function() { - null != this.shape && (this.shape.destroy(), this.shape = null); - null != this.guide && (this.guide.destroy(), this.guide = null); - null != this.highlight && (this.highlight.destroy(), this.highlight = null) -}; -mxGraphHandler.prototype.destroy = function() { - this.graph.removeMouseListener(this); - this.graph.removeListener(this.panHandler); - this.destroyShapes() -}; - -function mxPanningHandler(a, b) { - null != a && (this.graph = a, this.factoryMethod = b, this.graph.addMouseListener(this), this.init()) -} -mxPanningHandler.prototype = new mxPopupMenu; -mxPanningHandler.prototype.constructor = mxPanningHandler; -mxPanningHandler.prototype.graph = null; -mxPanningHandler.prototype.triggerX = null; -mxPanningHandler.prototype.triggerY = null; -mxPanningHandler.prototype.usePopupTrigger = !0; -mxPanningHandler.prototype.useLeftButtonForPanning = !1; -mxPanningHandler.prototype.selectOnPopup = !0; -mxPanningHandler.prototype.clearSelectionOnBackground = !0; -mxPanningHandler.prototype.ignoreCell = !1; -mxPanningHandler.prototype.previewEnabled = !0; -mxPanningHandler.prototype.useGrid = !1; -mxPanningHandler.prototype.panningEnabled = !0; -mxPanningHandler.prototype.isPanningEnabled = function() { - return this.panningEnabled -}; -mxPanningHandler.prototype.setPanningEnabled = function(a) { - this.panningEnabled = a -}; -mxPanningHandler.prototype.init = function() { - mxPopupMenu.prototype.init.apply(this); - mxEvent.addListener(this.div, mxClient.IS_TOUCH ? "touchmove" : "mousemove", mxUtils.bind(this, function(a) { - this.graph.tooltipHandler.hide() - })) -}; -mxPanningHandler.prototype.isPanningTrigger = function(a) { - var b = a.getEvent(); - return this.useLeftButtonForPanning && (this.ignoreCell || null == a.getState()) && mxEvent.isLeftMouseButton(b) || mxEvent.isControlDown(b) && mxEvent.isShiftDown(b) || this.usePopupTrigger && - mxEvent.isPopupTrigger(b) -}; -mxPanningHandler.prototype.mouseDown = function(a, b) { - if (!b.isConsumed() && this.isEnabled()) { - this.hideMenu(); - this.dx0 = -this.graph.container.scrollLeft; - this.dy0 = -this.graph.container.scrollTop; - var c = mxUtils.convertPoint(this.graph.container, b.getX(), b.getY()); - this.triggerX = c.x; - this.triggerY = c.y; - this.popupTrigger = this.isPopupTrigger(b); - this.panningTrigger = this.isPanningEnabled() && this.isPanningTrigger(b); - this.startX = b.getX(); - this.startY = b.getY(); - this.panningTrigger && this.consumePanningTrigger(b) - } -}; -mxPanningHandler.prototype.consumePanningTrigger = function(a) { - a.consume() -}; -mxPanningHandler.prototype.mouseMove = function(a, b) { - var c = b.getX() - this.startX, - d = b.getY() - this.startY; - if (this.active) this.previewEnabled && (this.useGrid && (c = this.graph.snap(c), d = this.graph.snap(d)), this.graph.panGraph(c + this.dx0, d + this.dy0)), this.fireEvent(new mxEventObject( - mxEvent.PAN, "event", b)), b.consume(); - else if (this.panningTrigger) { - var e = this.active; - this.active = Math.abs(c) > this.graph.tolerance || Math.abs(d) > this.graph.tolerance; - !e && this.active && this.fireEvent(new mxEventObject(mxEvent.PAN_START, - "event", b)) - } -}; -mxPanningHandler.prototype.mouseUp = function(a, b) { - var c = Math.abs(b.getX() - this.startX), - d = Math.abs(b.getY() - this.startY); - if (this.active) { - if (!this.graph.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.graph.container)) { - c = b.getX() - this.startX; - d = b.getY() - this.startY; - this.useGrid && (c = this.graph.snap(c), d = this.graph.snap(d)); - var e = this.graph.getView().scale, - f = this.graph.getView().translate; - this.graph.panGraph(0, 0); - this.panGraph(f.x + c / e, f.y + d / e) - } - this.active = !1; - this.fireEvent(new mxEventObject(mxEvent.PAN_END, "event", - b)); - b.consume() - } else this.popupTrigger && (c < this.graph.tolerance && d < this.graph.tolerance) && (c = this.getCellForPopupEvent(b), this.graph.isEnabled() && this.selectOnPopup && null != c && !this.graph.isCellSelected( - c) ? this.graph.setSelectionCell(c) : this.clearSelectionOnBackground && null == c && this.graph.clearSelection(), this.graph.tooltipHandler.hide(), d = mxUtils.getScrollOrigin(), d = new mxPoint( - b.getX() + d.x, b.getY() + d.y), this.popup(d.x + 1, d.y + 1, c, b.getEvent()), b.consume()); - this.popupTrigger = this.panningTrigger = !1 -}; -mxPanningHandler.prototype.getCellForPopupEvent = function(a) { - return a.getCell() -}; -mxPanningHandler.prototype.panGraph = function(a, b) { - this.graph.getView().setTranslate(a, b) -}; -mxPanningHandler.prototype.destroy = function() { - this.graph.removeMouseListener(this); - mxPopupMenu.prototype.destroy.apply(this) -}; - -function mxCellMarker(a, b, c, d) { - mxEventSource.call(this); - null != a && (this.graph = a, this.validColor = null != b ? b : mxConstants.DEFAULT_VALID_COLOR, this.invalidColor = null != b ? c : mxConstants.DEFAULT_INVALID_COLOR, this.hotspot = null != d ? d : - mxConstants.DEFAULT_HOTSPOT, this.highlight = new mxCellHighlight(a)) -} -mxUtils.extend(mxCellMarker, mxEventSource); -mxCellMarker.prototype.graph = null; -mxCellMarker.prototype.enabled = !0; -mxCellMarker.prototype.hotspot = mxConstants.DEFAULT_HOTSPOT; -mxCellMarker.prototype.hotspotEnabled = !1; -mxCellMarker.prototype.validColor = null; -mxCellMarker.prototype.invalidColor = null; -mxCellMarker.prototype.currentColor = null; -mxCellMarker.prototype.validState = null; -mxCellMarker.prototype.markedState = null; -mxCellMarker.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxCellMarker.prototype.isEnabled = function() { - return this.enabled -}; -mxCellMarker.prototype.setHotspot = function(a) { - this.hotspot = a -}; -mxCellMarker.prototype.getHotspot = function() { - return this.hotspot -}; -mxCellMarker.prototype.setHotspotEnabled = function(a) { - this.hotspotEnabled = a -}; -mxCellMarker.prototype.isHotspotEnabled = function() { - return this.hotspotEnabled -}; -mxCellMarker.prototype.hasValidState = function() { - return null != this.validState -}; -mxCellMarker.prototype.getValidState = function() { - return this.validState -}; -mxCellMarker.prototype.getMarkedState = function() { - return this.markedState -}; -mxCellMarker.prototype.reset = function() { - this.validState = null; - null != this.markedState && (this.markedState = null, this.unmark()) -}; -mxCellMarker.prototype.process = function(a) { - var b = null; - if (this.isEnabled()) { - var b = this.getState(a), - c = null != b ? this.isValidState(b) : !1; - a = this.getMarkerColor(a.getEvent(), b, c); - this.validState = c ? b : null; - if (b != this.markedState || a != this.currentColor) this.currentColor = a, null != b && null != this.currentColor ? (this.markedState = b, this.mark()) : null != this.markedState && (this.markedState = - null, this.unmark()) - } - return b -}; -mxCellMarker.prototype.markCell = function(a, b) { - var c = this.graph.getView().getState(a); - null != c && (this.currentColor = null != b ? b : this.validColor, this.markedState = c, this.mark()) -}; -mxCellMarker.prototype.mark = function() { - this.highlight.setHighlightColor(this.currentColor); - this.highlight.highlight(this.markedState); - this.fireEvent(new mxEventObject(mxEvent.MARK, "state", this.markedState)) -}; -mxCellMarker.prototype.unmark = function() { - this.mark() -}; -mxCellMarker.prototype.isValidState = function(a) { - return !0 -}; -mxCellMarker.prototype.getMarkerColor = function(a, b, c) { - return c ? this.validColor : this.invalidColor -}; -mxCellMarker.prototype.getState = function(a) { - var b = this.graph.getView(); - cell = this.getCell(a); - b = this.getStateToMark(b.getState(cell)); - return null != b && this.intersects(b, a) ? b : null -}; -mxCellMarker.prototype.getCell = function(a) { - return a.getCell() -}; -mxCellMarker.prototype.getStateToMark = function(a) { - return a -}; -mxCellMarker.prototype.intersects = function(a, b) { - return this.hotspotEnabled ? mxUtils.intersectsHotspot(a, b.getGraphX(), b.getGraphY(), this.hotspot, mxConstants.MIN_HOTSPOT_SIZE, mxConstants.MAX_HOTSPOT_SIZE) : !0 -}; -mxCellMarker.prototype.destroy = function() { - this.graph.getView().removeListener(this.resetHandler); - this.graph.getModel().removeListener(this.resetHandler); - this.highlight.destroy() -}; - -function mxSelectionCellsHandler(a) { - mxEventSource.call(this); - this.graph = a; - this.handlers = new mxDictionary; - this.graph.addMouseListener(this); - this.refreshHandler = mxUtils.bind(this, function(a, c) { - this.isEnabled() && this.refresh() - }); - this.graph.getSelectionModel().addListener(mxEvent.CHANGE, this.refreshHandler); - this.graph.getModel().addListener(mxEvent.CHANGE, this.refreshHandler); - this.graph.getView().addListener(mxEvent.SCALE, this.refreshHandler); - this.graph.getView().addListener(mxEvent.TRANSLATE, this.refreshHandler); - this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE, this.refreshHandler); - this.graph.getView().addListener(mxEvent.DOWN, this.refreshHandler); - this.graph.getView().addListener(mxEvent.UP, this.refreshHandler) -} -mxUtils.extend(mxSelectionCellsHandler, mxEventSource); -mxSelectionCellsHandler.prototype.graph = null; -mxSelectionCellsHandler.prototype.enabled = !0; -mxSelectionCellsHandler.prototype.refreshHandler = null; -mxSelectionCellsHandler.prototype.maxHandlers = 100; -mxSelectionCellsHandler.prototype.handlers = null; -mxSelectionCellsHandler.prototype.isEnabled = function() { - return this.enabled -}; -mxSelectionCellsHandler.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxSelectionCellsHandler.prototype.getHandler = function(a) { - return this.handlers.get(a) -}; -mxSelectionCellsHandler.prototype.reset = function() { - this.handlers.visit(function(a, b) { - b.reset.apply(b) - }) -}; -mxSelectionCellsHandler.prototype.refresh = function() { - var a = this.handlers; - this.handlers = new mxDictionary; - for (var b = this.graph.getSelectionCells(), c = 0; c < b.length; c++) { - var d = this.graph.view.getState(b[c]); - if (null != d) { - var e = a.remove(b[c]); - null != e && (e.state != d ? (e.destroy(), e = null) : e.redraw()); - null == e && (e = this.graph.createHandler(d), this.fireEvent(new mxEventObject(mxEvent.ADD, "state", d))); - null != e && this.handlers.put(b[c], e) - } - } - a.visit(mxUtils.bind(this, function(a, b) { - this.fireEvent(new mxEventObject(mxEvent.REMOVE, - "state", b.state)); - b.destroy() - })) -}; -mxSelectionCellsHandler.prototype.mouseDown = function(a, b) { - if (this.graph.isEnabled() && this.isEnabled()) { - var c = [a, b]; - this.handlers.visit(function(a, b) { - b.mouseDown.apply(b, c) - }) - } -}; -mxSelectionCellsHandler.prototype.mouseMove = function(a, b) { - if (this.graph.isEnabled() && this.isEnabled()) { - var c = [a, b]; - this.handlers.visit(function(a, b) { - b.mouseMove.apply(b, c) - }) - } -}; -mxSelectionCellsHandler.prototype.mouseUp = function(a, b) { - if (this.graph.isEnabled() && this.isEnabled()) { - var c = [a, b]; - this.handlers.visit(function(a, b) { - b.mouseUp.apply(b, c) - }) - } -}; -mxSelectionCellsHandler.prototype.destroy = function() { - this.graph.removeMouseListener(this); - null != this.refreshHandler && (this.graph.getSelectionModel().removeListener(this.refreshHandler), this.graph.getModel().removeListener(this.refreshHandler), this.graph.getView().removeListener( - this.refreshHandler), this.refreshHandler = null) -}; - -function mxConnectionHandler(a, b) { - mxEventSource.call(this); - null != a && (this.graph = a, this.factoryMethod = b, this.init()) -} -mxUtils.extend(mxConnectionHandler, mxEventSource); -mxConnectionHandler.prototype.graph = null; -mxConnectionHandler.prototype.factoryMethod = !0; -mxConnectionHandler.prototype.moveIconFront = !1; -mxConnectionHandler.prototype.moveIconBack = !1; -mxConnectionHandler.prototype.connectImage = null; -mxConnectionHandler.prototype.targetConnectImage = !1; -mxConnectionHandler.prototype.enabled = !0; -mxConnectionHandler.prototype.select = !0; -mxConnectionHandler.prototype.createTarget = !1; -mxConnectionHandler.prototype.marker = null; -mxConnectionHandler.prototype.constraintHandler = null; -mxConnectionHandler.prototype.error = null; -mxConnectionHandler.prototype.waypointsEnabled = !1; -mxConnectionHandler.prototype.tapAndHoldEnabled = !0; -mxConnectionHandler.prototype.tapAndHoldDelay = 500; -mxConnectionHandler.prototype.tapAndHoldInProgress = !1; -mxConnectionHandler.prototype.tapAndHoldValid = !1; -mxConnectionHandler.prototype.tapAndHoldTolerance = 4; -mxConnectionHandler.prototype.initialTouchX = 0; -mxConnectionHandler.prototype.initialTouchY = 0; -mxConnectionHandler.prototype.ignoreMouseDown = !1; -mxConnectionHandler.prototype.first = null; -mxConnectionHandler.prototype.connectIconOffset = new mxPoint(0, mxConstants.TOOLTIP_VERTICAL_OFFSET); -mxConnectionHandler.prototype.edgeState = null; -mxConnectionHandler.prototype.changeHandler = null; -mxConnectionHandler.prototype.drillHandler = null; -mxConnectionHandler.prototype.mouseDownCounter = 0; -mxConnectionHandler.prototype.movePreviewAway = mxClient.IS_VML; -mxConnectionHandler.prototype.isEnabled = function() { - return this.enabled -}; -mxConnectionHandler.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxConnectionHandler.prototype.isCreateTarget = function() { - return this.createTarget -}; -mxConnectionHandler.prototype.setCreateTarget = function(a) { - this.createTarget = a -}; -mxConnectionHandler.prototype.createShape = function() { - var a = new mxPolyline([], mxConstants.INVALID_COLOR); - a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG; - a.init(this.graph.getView().getOverlayPane()); - a.svgStrokeTolerance = 0; - a.pointerEvents = !1; - a.isDashed = !0; - if (this.graph.dialect == mxConstants.DIALECT_SVG) a.node.setAttribute("pointer-events", "none"); - else { - var b = mxUtils.bind(this, function(a) { - a = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(a), - mxEvent.getClientY(a)); - return this.graph.view.getState(this.graph.getCellAt(a.x, a.y)) - }); - mxEvent.redirectMouseEvents(a.node, this.graph, b) - } - return a -}; -mxConnectionHandler.prototype.init = function() { - this.graph.addMouseListener(this); - this.marker = this.createMarker(); - this.constraintHandler = new mxConstraintHandler(this.graph); - this.changeHandler = mxUtils.bind(this, function(a) { - null != this.iconState && (this.iconState = this.graph.getView().getState(this.iconState.cell)); - null != this.iconState ? this.redrawIcons(this.icons, this.iconState) : (this.destroyIcons(this.icons), this.previous = null); - this.constraintHandler.reset() - }); - this.graph.getModel().addListener(mxEvent.CHANGE, - this.changeHandler); - this.graph.getView().addListener(mxEvent.SCALE, this.changeHandler); - this.graph.getView().addListener(mxEvent.TRANSLATE, this.changeHandler); - this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE, this.changeHandler); - this.drillHandler = mxUtils.bind(this, function(a) { - this.destroyIcons(this.icons) - }); - this.graph.addListener(mxEvent.START_EDITING, this.drillHandler); - this.graph.getView().addListener(mxEvent.DOWN, this.drillHandler); - this.graph.getView().addListener(mxEvent.UP, this.drillHandler) -}; -mxConnectionHandler.prototype.isConnectableCell = function(a) { - return !0 -}; -mxConnectionHandler.prototype.createMarker = function() { - var a = new mxCellMarker(this.graph); - a.hotspotEnabled = !0; - a.getCell = mxUtils.bind(this, function(b, c) { - c = mxCellMarker.prototype.getCell.apply(a, arguments); - this.error = null; - if (!this.isConnectableCell(c)) return null; - null != c ? this.isConnecting() ? null != this.previous && (this.error = this.validateConnection(this.previous.cell, c), null != this.error && 0 == this.error.length && (c = null, this.isCreateTarget() && - (this.error = null))) : this.isValidSource(c) || (c = null) : this.isConnecting() && - (!this.isCreateTarget() && !this.graph.allowDanglingEdges) && (this.error = ""); - return c - }); - a.isValidState = mxUtils.bind(this, function(b) { - return this.isConnecting() ? null == this.error : mxCellMarker.prototype.isValidState.apply(a, arguments) - }); - a.getMarkerColor = mxUtils.bind(this, function(b, c, d) { - return null == this.connectImage || this.isConnecting() ? mxCellMarker.prototype.getMarkerColor.apply(a, arguments) : null - }); - a.intersects = mxUtils.bind(this, function(b, c) { - return null != this.connectImage || this.isConnecting() ? !0 : mxCellMarker.prototype.intersects.apply(a, - arguments) - }); - return a -}; -mxConnectionHandler.prototype.start = function(a, b, c, d) { - this.previous = a; - this.first = new mxPoint(b, c); - this.edgeState = null != d ? d : this.createEdgeState(null); - this.marker.currentColor = this.marker.validColor; - this.marker.markedState = a; - this.marker.mark(); - this.fireEvent(new mxEventObject(mxEvent.START, "state", this.previous)) -}; -mxConnectionHandler.prototype.isConnecting = function() { - return null != this.first && null != this.shape -}; -mxConnectionHandler.prototype.isValidSource = function(a) { - return this.graph.isValidSource(a) -}; -mxConnectionHandler.prototype.isValidTarget = function(a) { - return !0 -}; -mxConnectionHandler.prototype.validateConnection = function(a, b) { - return !this.isValidTarget(b) ? "" : this.graph.getEdgeValidationError(null, a, b) -}; -mxConnectionHandler.prototype.getConnectImage = function(a) { - return this.connectImage -}; -mxConnectionHandler.prototype.isMoveIconToFrontForState = function(a) { - return null != a.text && a.text.node.parentNode == this.graph.container ? !0 : this.moveIconFront -}; -mxConnectionHandler.prototype.createIcons = function(a) { - var b = this.getConnectImage(a); - if (null != b && null != a) { - this.iconState = a; - var c = [], - d = new mxRectangle(0, 0, b.width, b.height), - e = new mxImageShape(d, b.src, null, null, 0); - e.preserveImageAspect = !1; - this.isMoveIconToFrontForState(a) ? (e.dialect = mxConstants.DIALECT_STRICTHTML, e.init(this.graph.container)) : (e.dialect = this.graph.dialect == mxConstants.DIALECT_SVG ? mxConstants.DIALECT_SVG : - mxConstants.DIALECT_VML, e.init(this.graph.getView().getOverlayPane()), this.moveIconBack && - null != e.node.previousSibling && e.node.parentNode.insertBefore(e.node, e.node.parentNode.firstChild)); - e.node.style.cursor = mxConstants.CURSOR_CONNECT; - var f = mxUtils.bind(this, function() { - return null != this.currentState ? this.currentState : a - }), - b = mxUtils.bind(this, function(a) { - mxEvent.isConsumed(a) || (this.icon = e, this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a, f()))) - }); - mxEvent.redirectMouseEvents(e.node, this.graph, f, b); - c.push(e); - this.redrawIcons(c, this.iconState); - return c - } - return null -}; -mxConnectionHandler.prototype.redrawIcons = function(a, b) { - if (null != a && null != a[0] && null != b) { - var c = this.getIconPosition(a[0], b); - a[0].bounds.x = c.x; - a[0].bounds.y = c.y; - a[0].redraw() - } -}; -mxConnectionHandler.prototype.getIconPosition = function(a, b) { - var c = this.graph.getView().scale, - d = b.getCenterX(), - e = b.getCenterY(); - if (this.graph.isSwimlane(b.cell)) { - var f = this.graph.getStartSize(b.cell), - d = 0 != f.width ? b.x + f.width * c / 2 : d, - e = 0 != f.height ? b.y + f.height * c / 2 : e, - f = mxUtils.toRadians(mxUtils.getValue(b.style, mxConstants.STYLE_ROTATION) || 0); - if (0 != f) var c = Math.cos(f), - f = Math.sin(f), - g = new mxPoint(b.getCenterX(), b.getCenterY()), - e = mxUtils.getRotatedPoint(new mxPoint(d, e), c, f, g), - d = e.x, - e = e.y - } - return new mxPoint(d - - a.bounds.width / 2, e - a.bounds.height / 2) -}; -mxConnectionHandler.prototype.destroyIcons = function(a) { - if (null != a) { - this.iconState = null; - for (var b = 0; b < a.length; b++) a[b].destroy() - } -}; -mxConnectionHandler.prototype.isStartEvent = function(a) { - return !this.graph.isForceMarqueeEvent(a.getEvent()) && (null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentConstraint || null != this.previous && null == this.error && - (null == this.icons || null != this.icons && null != this.icon)) -}; -mxConnectionHandler.prototype.mouseDown = function(a, b) { - this.mouseDownCounter++; - if (this.isEnabled() && this.graph.isEnabled() && !b.isConsumed() && !this.isConnecting() && this.isStartEvent(b)) { - null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentPoint ? (this.sourceConstraint = this.constraintHandler.currentConstraint, - this.previous = this.constraintHandler.currentFocus, this.first = this.constraintHandler.currentPoint.clone()) : this.first = new mxPoint(b.getGraphX(), - b.getGraphY()); - this.edgeState = this.createEdgeState(b); - this.mouseDownCounter = 1; - this.waypointsEnabled && null == this.shape && (this.waypoints = null, this.shape = this.createShape()); - if (null == this.previous && null != this.edgeState) { - var c = this.graph.getPointForEvent(b.getEvent()); - this.edgeState.cell.geometry.setTerminalPoint(c, !0) - } - this.fireEvent(new mxEventObject(mxEvent.START, "state", this.previous)); - b.consume() - } else if (mxClient.IS_TOUCH && this.tapAndHoldEnabled && !this.tapAndHoldInProgress && this.isEnabled() && this.graph.isEnabled() && - !this.isConnecting()) { - this.tapAndHoldInProgress = !0; - this.initialTouchX = b.getX(); - this.initialTouchY = b.getY(); - var d = this.graph.view.getState(this.marker.getCell(b)); - this.tapAndHoldThread && window.clearTimeout(this.tapAndHoldThread); - this.tapAndHoldThread = window.setTimeout(mxUtils.bind(this, function() { - this.tapAndHoldValid && this.tapAndHold(b, d); - this.tapAndHoldValid = this.tapAndHoldInProgress = !1 - }), this.tapAndHoldDelay); - this.tapAndHoldValid = !0 - } - this.selectedIcon = this.icon; - this.icon = null -}; -mxConnectionHandler.prototype.tapAndHold = function(a, b) { - null != b && (this.marker.currentColor = this.marker.validColor, this.marker.markedState = b, this.marker.mark(), this.first = new mxPoint(a.getGraphX(), a.getGraphY()), this.edgeState = this.createEdgeState( - a), this.previous = b, this.fireEvent(new mxEventObject(mxEvent.START, "state", this.previous))) -}; -mxConnectionHandler.prototype.isImmediateConnectSource = function(a) { - return !this.graph.isCellMovable(a.cell) -}; -mxConnectionHandler.prototype.createEdgeState = function(a) { - return null -}; -mxConnectionHandler.prototype.updateCurrentState = function(a) { - var b = this.marker.process(a); - this.constraintHandler.update(a, null == this.first); - this.currentState = b -}; -mxConnectionHandler.prototype.convertWaypoint = function(a) { - var b = this.graph.getView().getScale(), - c = this.graph.getView().getTranslate(); - a.x = a.x / b - c.x; - a.y = a.y / b - c.y -}; -mxConnectionHandler.prototype.mouseMove = function(a, b) { - this.tapAndHoldValid && (this.tapAndHoldValid = Math.abs(this.initialTouchX - b.getX()) < this.tapAndHoldTolerance && Math.abs(this.initialTouchY - b.getY()) < this.tapAndHoldTolerance); - if (!b.isConsumed() && (this.ignoreMouseDown || null != this.first || !this.graph.isMouseDown)) { - !this.isEnabled() && null != this.currentState && (this.destroyIcons(this.icons), this.currentState = null); - (null != this.first || this.isEnabled() && this.graph.isEnabled()) && this.updateCurrentState(b); - if (null != this.first) { - var c = this.graph.getView().scale, - c = new mxPoint(this.graph.snap(b.getGraphX() / c) * c, this.graph.snap(b.getGraphY() / c) * c), - d = null, - e = c; - null != this.constraintHandler.currentConstraint && (null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentPoint) && (d = this.constraintHandler.currentConstraint, - e = this.constraintHandler.currentPoint.clone()); - var f = this.first; - if (null != this.selectedIcon) { - var g = this.selectedIcon.bounds.width, - h = this.selectedIcon.bounds.height; - null != this.currentState && - this.targetConnectImage ? (g = this.getIconPosition(this.selectedIcon, this.currentState), this.selectedIcon.bounds.x = g.x, this.selectedIcon.bounds.y = g.y) : (g = new mxRectangle(b.getGraphX() + - this.connectIconOffset.x, b.getGraphY() + this.connectIconOffset.y, g, h), this.selectedIcon.bounds = g); - this.selectedIcon.redraw() - } - if (null != this.edgeState) { - this.edgeState.absolutePoints = [null, null != this.currentState ? null : e]; - this.graph.view.updateFixedTerminalPoint(this.edgeState, this.previous, !0, this.sourceConstraint); - null != this.currentState && - (null == d && (d = this.graph.getConnectionConstraint(this.edgeState, this.previous, !1)), this.edgeState.setAbsoluteTerminalPoint(null, !1), this.graph.view.updateFixedTerminalPoint(this - .edgeState, this.currentState, !1, d)); - f = null; - if (null != this.waypoints) { - f = []; - for (e = 0; e < this.waypoints.length; e++) d = this.waypoints[e].clone(), this.convertWaypoint(d), f[e] = d - } - this.graph.view.updatePoints(this.edgeState, f, this.previous, this.currentState); - this.graph.view.updateFloatingTerminalPoints(this.edgeState, this.previous, this.currentState); - e = this.edgeState.absolutePoints[this.edgeState.absolutePoints.length - 1]; - f = this.edgeState.absolutePoints[0] - } else null != this.currentState && null == this.constraintHandler.currentConstraint && (g = this.getTargetPerimeterPoint(this.currentState, b), null != g && (e = g)), null == this.sourceConstraint && - null != this.previous && (g = this.getSourcePerimeterPoint(this.previous, null != this.waypoints && 0 < this.waypoints.length ? this.waypoints[0] : e, b), null != g && (f = g)); - if (null == this.currentState && this.movePreviewAway) { - g = f; - null != this.edgeState && - 2 < this.edgeState.absolutePoints.length && (d = this.edgeState.absolutePoints[this.edgeState.absolutePoints.length - 2], null != d && (g = d)); - d = e.x - g.x; - g = e.y - g.y; - h = Math.sqrt(d * d + g * g); - if (0 == h) return; - e.x -= 4 * d / h; - e.y -= 4 * g / h - } - if (null == this.shape && (d = Math.abs(c.x - this.first.x), g = Math.abs(c.y - this.first.y), d > this.graph.tolerance || g > this.graph.tolerance)) this.shape = this.createShape(), this.updateCurrentState( - b); - null != this.shape && (null != this.edgeState ? this.shape.points = this.edgeState.absolutePoints : (c = [f], null != this.waypoints && - (c = c.concat(this.waypoints)), c.push(e), this.shape.points = c), this.drawPreview()); - mxEvent.consume(b.getEvent()); - b.consume() - } else !this.isEnabled() || !this.graph.isEnabled() ? this.constraintHandler.reset() : this.previous != this.currentState && null == this.edgeState ? (this.destroyIcons(this.icons), this.icons = - null, null != this.currentState && null == this.error && (this.icons = this.createIcons(this.currentState), null == this.icons && (this.currentState.setCursor(mxConstants.CURSOR_CONNECT), b - .consume())), this.previous = this.currentState) : - this.previous == this.currentState && (null != this.currentState && null == this.icons && !this.graph.isMouseDown) && b.consume(); - null != this.constraintHandler.currentConstraint && this.marker.reset(); - if (!this.graph.isMouseDown && null != this.currentState && null != this.icons) { - c = !1; - f = b.getSource(); - for (e = 0; e < this.icons.length && !c; e++) c = f == this.icons[e].node || f.parentNode == this.icons[e].node; - c || this.updateIcons(this.currentState, this.icons, b) - } - } else this.constraintHandler.reset() -}; -mxConnectionHandler.prototype.getTargetPerimeterPoint = function(a, b) { - var c = null, - d = a.view, - e = d.getPerimeterFunction(a); - if (null != e) { - var f = null != this.waypoints && 0 < this.waypoints.length ? this.waypoints[this.waypoints.length - 1] : new mxPoint(this.previous.getCenterX(), this.previous.getCenterY()), - d = e(d.getPerimeterBounds(a), this.edgeState, f, !1); - null != d && (c = d) - } else c = new mxPoint(a.getCenterX(), a.getCenterY()); - return c -}; -mxConnectionHandler.prototype.getSourcePerimeterPoint = function(a, b, c) { - c = null; - var d = a.view, - e = d.getPerimeterFunction(a), - f = new mxPoint(a.getCenterX(), a.getCenterY()); - if (null != e) { - var g = mxUtils.getValue(a.style, mxConstants.STYLE_ROTATION, 0), - h = -g * (Math.PI / 180); - 0 != g && (b = mxUtils.getRotatedPoint(new mxPoint(b.x, b.y), Math.cos(h), Math.sin(h), f)); - a = e(d.getPerimeterBounds(a), a, b, !1); - null != a && (0 != g && (a = mxUtils.getRotatedPoint(new mxPoint(a.x, a.y), Math.cos(-h), Math.sin(-h), f)), c = a) - } else c = f; - return c -}; -mxConnectionHandler.prototype.updateIcons = function(a, b, c) {}; -mxConnectionHandler.prototype.isStopEvent = function(a) { - return null != a.getState() -}; -mxConnectionHandler.prototype.addWaypointForEvent = function(a) { - var b = mxUtils.convertPoint(this.graph.container, a.getX(), a.getY()), - c = Math.abs(b.x - this.first.x), - b = Math.abs(b.y - this.first.y); - if (null != this.waypoints || 1 < this.mouseDownCounter && (c > this.graph.tolerance || b > this.graph.tolerance)) null == this.waypoints && (this.waypoints = []), c = this.graph.view.scale, b = - new mxPoint(this.graph.snap(a.getGraphX() / c) * c, this.graph.snap(a.getGraphY() / c) * c), this.waypoints.push(b) -}; -mxConnectionHandler.prototype.mouseUp = function(a, b) { - if (!b.isConsumed() && this.isConnecting()) { - if (this.waypointsEnabled && !this.isStopEvent(b)) { - this.addWaypointForEvent(b); - b.consume(); - return - } - if (null == this.error) { - var c = null != this.previous ? this.previous.cell : null, - d = null; - null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && (d = this.constraintHandler.currentFocus.cell); - null == d && this.marker.hasValidState() && (d = this.marker.validState.cell); - this.connect(c, d, b.getEvent(), - b.getCell()) - } else null != this.previous && (null != this.marker.validState && this.previous.cell == this.marker.validState.cell) && this.graph.selectCellForEvent(this.marker.source, evt), 0 < this.error.length && - this.graph.validationAlert(this.error); - this.destroyIcons(this.icons); - b.consume() - } - null != this.first && this.reset(); - this.tapAndHoldValid = this.tapAndHoldInProgress = !1 -}; -mxConnectionHandler.prototype.reset = function() { - null != this.shape && (this.shape.destroy(), this.shape = null); - this.destroyIcons(this.icons); - this.icons = null; - this.marker.reset(); - this.constraintHandler.reset(); - this.sourceConstraint = this.error = this.previous = this.edgeState = this.selectedIcon = null; - this.mouseDownCounter = 0; - this.icon = this.first = null; - this.fireEvent(new mxEventObject(mxEvent.RESET)) -}; -mxConnectionHandler.prototype.drawPreview = function() { - var a = null == this.error; - this.shape.strokewidth = this.getEdgeWidth(a); - a = this.getEdgeColor(a); - this.shape.stroke = a; - this.shape.redraw() -}; -mxConnectionHandler.prototype.getEdgeColor = function(a) { - return a ? mxConstants.VALID_COLOR : mxConstants.INVALID_COLOR -}; -mxConnectionHandler.prototype.getEdgeWidth = function(a) { - return a ? 3 : 1 -}; -mxConnectionHandler.prototype.connect = function(a, b, c, d) { - if (null != b || this.isCreateTarget() || this.graph.allowDanglingEdges) { - var e = this.graph.getModel(), - f = null; - e.beginUpdate(); - try { - if (null != a && (null == b && this.isCreateTarget()) && (b = this.createTargetVertex(c, a), null != b)) { - d = this.graph.getDropTarget([b], c, d); - if (null == d || !this.graph.getModel().isEdge(d)) { - var g = this.graph.getView().getState(d); - if (null != g) { - var h = e.getGeometry(b); - h.x -= g.origin.x; - h.y -= g.origin.y - } - } else d = this.graph.getDefaultParent(); - this.graph.addCell(b, - d) - } - var k = this.graph.getDefaultParent(); - null != a && (null != b && e.getParent(a) == e.getParent(b) && e.getParent(e.getParent(a)) != e.getRoot()) && (k = e.getParent(a), null != a.geometry && a.geometry.relative && (null != b.geometry && - b.geometry.relative) && (k = e.getParent(k))); - h = g = null; - null != this.edgeState && (g = this.edgeState.cell.value, h = this.edgeState.cell.style); - f = this.insertEdge(k, null, g, a, b, h); - if (null != f) { - this.graph.setConnectionConstraint(f, a, !0, this.sourceConstraint); - this.graph.setConnectionConstraint(f, b, !1, this.constraintHandler.currentConstraint); - null != this.edgeState && e.setGeometry(f, this.edgeState.cell.geometry); - var l = e.getGeometry(f); - null == l && (l = new mxGeometry, l.relative = !0, e.setGeometry(f, l)); - if (null != this.waypoints && 0 < this.waypoints.length) { - var m = this.graph.view.scale, - n = this.graph.view.translate; - l.points = []; - for (a = 0; a < this.waypoints.length; a++) { - var p = this.waypoints[a]; - l.points.push(new mxPoint(p.x / m - n.x, p.y / m - n.y)) - } - } - null == b && (p = this.graph.getPointForEvent(c, !1), p.x -= this.graph.panDx / this.graph.view.scale, p.y -= this.graph.panDy / this.graph.view.scale, - l.setTerminalPoint(p, !1)); - this.fireEvent(new mxEventObject(mxEvent.CONNECT, "cell", f, "event", c, "target", d)) - } - } catch (q) { - mxLog.show(), mxLog.debug(q.message) - } finally { - e.endUpdate() - } - this.select && this.selectCells(f, b) - } -}; -mxConnectionHandler.prototype.selectCells = function(a, b) { - this.graph.setSelectionCell(a) -}; -mxConnectionHandler.prototype.insertEdge = function(a, b, c, d, e, f) { - if (null == this.factoryMethod) return this.graph.insertEdge(a, b, c, d, e, f); - b = this.createEdge(c, d, e, f); - return b = this.graph.addEdge(b, a, d, e) -}; -mxConnectionHandler.prototype.createTargetVertex = function(a, b) { - for (var c = this.graph.getCellGeometry(b); null != c && c.relative;) b = this.graph.getModel().getParent(b), c = this.graph.getCellGeometry(b); - var d = this.graph.cloneCells([b])[0], - c = this.graph.getModel().getGeometry(d); - if (null != c) { - var e = this.graph.getPointForEvent(a); - c.x = this.graph.snap(e.x - c.width / 2) - this.graph.panDx / this.graph.view.scale; - c.y = this.graph.snap(e.y - c.height / 2) - this.graph.panDy / this.graph.view.scale; - if (null != this.first) { - var f = this.graph.view.getState(b); - if (null != f) { - var g = this.getAlignmentTolerance(); - Math.abs(this.graph.snap(this.first.x) - this.graph.snap(e.x)) <= g ? c.x = f.x : Math.abs(this.graph.snap(this.first.y) - this.graph.snap(e.y)) <= g && (c.y = f.y) - } - } - } - return d -}; -mxConnectionHandler.prototype.getAlignmentTolerance = function() { - return this.graph.isGridEnabled() ? this.graph.gridSize : this.graph.tolerance -}; -mxConnectionHandler.prototype.createEdge = function(a, b, c, d) { - var e = null; - null != this.factoryMethod && (e = this.factoryMethod(b, c, d)); - null == e && (e = new mxCell(a || ""), e.setEdge(!0), e.setStyle(d), a = new mxGeometry, a.relative = !0, e.setGeometry(a)); - return e -}; -mxConnectionHandler.prototype.destroy = function() { - this.graph.removeMouseListener(this); - null != this.shape && (this.shape.destroy(), this.shape = null); - null != this.marker && (this.marker.destroy(), this.marker = null); - null != this.constraintHandler && (this.constraintHandler.destroy(), this.constraintHandler = null); - null != this.changeHandler && (this.graph.getModel().removeListener(this.changeHandler), this.graph.getView().removeListener(this.changeHandler), this.changeHandler = null); - null != this.drillHandler && (this.graph.removeListener(this.drillHandler), - this.graph.getView().removeListener(this.drillHandler), this.drillHandler = null) -}; - -function mxConstraintHandler(a) { - this.graph = a -} -mxConstraintHandler.prototype.pointImage = new mxImage(mxClient.imageBasePath + "/point.gif", 5, 5); -mxConstraintHandler.prototype.graph = null; -mxConstraintHandler.prototype.enabled = !0; -mxConstraintHandler.prototype.highlightColor = mxConstants.DEFAULT_VALID_COLOR; -mxConstraintHandler.prototype.isEnabled = function() { - return this.enabled -}; -mxConstraintHandler.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxConstraintHandler.prototype.reset = function() { - if (null != this.focusIcons) { - for (var a = 0; a < this.focusIcons.length; a++) this.focusIcons[a].destroy(); - this.focusIcons = null - } - null != this.focusHighlight && (this.focusHighlight.destroy(), this.focusHighlight = null); - this.focusPoints = this.currentFocus = this.currentPoint = this.currentFocusArea = this.currentConstraint = null -}; -mxConstraintHandler.prototype.getTolerance = function() { - return this.graph.getTolerance() -}; -mxConstraintHandler.prototype.getImageForConstraint = function(a, b, c) { - return this.pointImage -}; -mxConstraintHandler.prototype.isEventIgnored = function(a, b) { - return !1 -}; -mxConstraintHandler.prototype.update = function(a, b) { - if (this.isEnabled() && !this.isEventIgnored(a)) { - var c = this.getTolerance(), - d = new mxRectangle(a.getGraphX() - c, a.getGraphY() - c, 2 * c, 2 * c), - e = null != a.getCell() ? this.graph.isCellConnectable(a.getCell()) : !1; - if (null == this.currentFocusArea || !mxUtils.intersects(this.currentFocusArea, d) || null != a.getState() && null != this.currentFocus && e) - if (this.currentFocusArea = null, a.getState() != this.currentFocus) - if (this.currentFocus = null, this.constraints = null != a.getState() && e ? this.graph.getAllConnectionConstraints(a.getState(), - b) : null, null != this.constraints) { - this.currentFocus = a.getState(); - this.currentFocusArea = new mxRectangle(a.getState().x, a.getState().y, a.getState().width, a.getState().height); - if (null != this.focusIcons) { - for (e = 0; e < this.focusIcons.length; e++) this.focusIcons[e].destroy(); - this.focusPoints = this.focusIcons = null - } - this.focusIcons = []; - this.focusPoints = []; - for (e = 0; e < this.constraints.length; e++) { - var f = this.graph.getConnectionPoint(a.getState(), this.constraints[e]), - g = this.getImageForConstraint(a.getState(), this.constraints[e], - f), - h = g.src, - g = new mxRectangle(f.x - g.width / 2, f.y - g.height / 2, g.width, g.height), - g = new mxImageShape(g, h); - g.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG; - g.preserveImageAspect = !1; - g.init(this.graph.getView().getOverlayPane()); - null != g.node.previousSibling && g.node.parentNode.insertBefore(g.node, g.node.parentNode.firstChild); - h = mxUtils.bind(this, function() { - return null != this.currentFocus ? this.currentFocus : a.getState() - }); - g.redraw(); - mxEvent.redirectMouseEvents(g.node, - this.graph, h); - this.currentFocusArea.add(g.bounds); - this.focusIcons.push(g); - this.focusPoints.push(f) - } - this.currentFocusArea.grow(c) - } else if (null != this.focusIcons) { - null != this.focusHighlight && (this.focusHighlight.destroy(), this.focusHighlight = null); - for (e = 0; e < this.focusIcons.length; e++) this.focusIcons[e].destroy(); - this.focusPoints = this.focusIcons = null - } - this.currentPoint = this.currentConstraint = null; - if (null != this.focusIcons && null != this.constraints && (null == a.getState() || this.currentFocus == a.getState())) - for (e = - 0; e < this.focusIcons.length; e++) - if (mxUtils.intersects(this.focusIcons[e].bounds, d)) { - this.currentConstraint = this.constraints[e]; - this.currentPoint = this.focusPoints[e]; - c = this.focusIcons[e].bounds.clone(); - c.grow(mxClient.IS_IE ? 3 : 2); - mxClient.IS_IE && (c.width -= 1, c.height -= 1); - null == this.focusHighlight ? (c = new mxRectangleShape(c, null, this.highlightColor, 3), c.dialect = this.graph.dialect == mxConstants.DIALECT_SVG ? mxConstants.DIALECT_SVG : mxConstants - .DIALECT_VML, c.init(this.graph.getView().getOverlayPane()), this.focusHighlight = - c, h = mxUtils.bind(this, function() { - return null != this.currentFocus ? this.currentFocus : a.getState() - }), mxEvent.redirectMouseEvents(c.node, this.graph, h)) : (this.focusHighlight.bounds = c, this.focusHighlight.redraw()); - break - } - null == this.currentConstraint && null != this.focusHighlight && (this.focusHighlight.destroy(), this.focusHighlight = null) - } -}; -mxConstraintHandler.prototype.destroy = function() { - this.reset() -}; - -function mxRubberband(a) { - null != a && (this.graph = a, this.graph.addMouseListener(this), this.panHandler = mxUtils.bind(this, function() { - this.repaint() - }), this.graph.addListener(mxEvent.PAN, this.panHandler), mxClient.IS_IE && mxEvent.addListener(window, "unload", mxUtils.bind(this, function() { - this.destroy() - }))) -} -mxRubberband.prototype.defaultOpacity = 20; -mxRubberband.prototype.enabled = !0; -mxRubberband.prototype.div = null; -mxRubberband.prototype.sharedDiv = null; -mxRubberband.prototype.currentX = 0; -mxRubberband.prototype.currentY = 0; -mxRubberband.prototype.isEnabled = function() { - return this.enabled -}; -mxRubberband.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxRubberband.prototype.mouseDown = function(a, b) { - if (!b.isConsumed() && this.isEnabled() && this.graph.isEnabled() && (this.graph.isForceMarqueeEvent(b.getEvent()) || null == b.getState())) { - var c = mxUtils.getOffset(this.graph.container), - d = mxUtils.getScrollOrigin(this.graph.container); - d.x -= c.x; - d.y -= c.y; - this.start(b.getX() + d.x, b.getY() + d.y); - if (mxClient.IS_NS && !mxClient.IS_SF && !mxClient.IS_GC) { - var e = this.graph.container, - f = function(a) { - a = new mxMouseEvent(a); - var b = mxUtils.convertPoint(e, a.getX(), a.getY()); - a.graphX = b.x; - a.graphY = b.y; - return a - }; - this.dragHandler = mxUtils.bind(this, function(a) { - this.mouseMove(this.graph, f(a)) - }); - this.dropHandler = mxUtils.bind(this, function(a) { - this.mouseUp(this.graph, f(a)) - }); - mxEvent.addListener(document, "mousemove", this.dragHandler); - mxEvent.addListener(document, "mouseup", this.dropHandler) - } - b.consume(!1) - } -}; -mxRubberband.prototype.start = function(a, b) { - this.first = new mxPoint(a, b) -}; -mxRubberband.prototype.mouseMove = function(a, b) { - if (!b.isConsumed() && null != this.first) { - var c = mxUtils.getScrollOrigin(this.graph.container), - d = mxUtils.getOffset(this.graph.container); - c.x -= d.x; - c.y -= d.y; - var d = b.getX() + c.x, - c = b.getY() + c.y, - e = this.first.x - d, - f = this.first.y - c, - g = this.graph.tolerance; - if (null != this.div || Math.abs(e) > g || Math.abs(f) > g) null == this.div && (this.div = this.createShape()), mxUtils.clearSelection(), this.update(d, c), b.consume() - } -}; -mxRubberband.prototype.createShape = function() { - null == this.sharedDiv && (this.sharedDiv = document.createElement("div"), this.sharedDiv.className = "mxRubberband", mxUtils.setOpacity(this.sharedDiv, this.defaultOpacity)); - this.graph.container.appendChild(this.sharedDiv); - return this.sharedDiv -}; -mxRubberband.prototype.mouseUp = function(a, b) { - var c = null != this.div; - this.reset(); - c && (c = new mxRectangle(this.x, this.y, this.width, this.height), this.graph.selectRegion(c, b.getEvent()), b.consume()) -}; -mxRubberband.prototype.reset = function() { - null != this.div && this.div.parentNode.removeChild(this.div); - null != this.dragHandler && (mxEvent.removeListener(document, "mousemove", this.dragHandler), this.dragHandler = null); - null != this.dropHandler && (mxEvent.removeListener(document, "mouseup", this.dropHandler), this.dropHandler = null); - this.currentY = this.currentX = 0; - this.div = this.first = null -}; -mxRubberband.prototype.update = function(a, b) { - this.currentX = a; - this.currentY = b; - this.repaint() -}; -mxRubberband.prototype.repaint = function() { - if (null != this.div) { - var a = this.currentX - this.graph.panDx, - b = this.currentY - this.graph.panDy; - this.x = Math.min(this.first.x, a); - this.y = Math.min(this.first.y, b); - this.width = Math.max(this.first.x, a) - this.x; - this.height = Math.max(this.first.y, b) - this.y; - a = mxClient.IS_VML ? this.graph.panDy : 0; - this.div.style.left = this.x + (mxClient.IS_VML ? this.graph.panDx : 0) + "px"; - this.div.style.top = this.y + a + "px"; - this.div.style.width = Math.max(1, this.width) + "px"; - this.div.style.height = Math.max(1, - this.height) + "px" - } -}; -mxRubberband.prototype.destroy = function() { - this.destroyed || (this.destroyed = !0, this.graph.removeMouseListener(this), this.graph.removeListener(this.panHandler), this.reset(), null != this.sharedDiv && (this.sharedDiv = null)) -}; - -function mxVertexHandler(a) { - null != a && (this.state = a, this.init()) -} -mxVertexHandler.prototype.graph = null; -mxVertexHandler.prototype.state = null; -mxVertexHandler.prototype.singleSizer = !1; -mxVertexHandler.prototype.index = null; -mxVertexHandler.prototype.allowHandleBoundsCheck = !0; -mxVertexHandler.prototype.handleImage = null; -mxVertexHandler.prototype.tolerance = 0; -mxVertexHandler.prototype.rotationEnabled = !1; -mxVertexHandler.prototype.rotationRaster = !0; -mxVertexHandler.prototype.init = function() { - this.graph = this.state.view.graph; - this.selectionBounds = this.getSelectionBounds(this.state); - this.bounds = new mxRectangle(this.selectionBounds.x, this.selectionBounds.y, this.selectionBounds.width, this.selectionBounds.height); - this.selectionBorder = this.createSelectionShape(this.bounds); - this.selectionBorder.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG; - this.selectionBorder.pointerEvents = !1; - this.selectionBorder.init(this.graph.getView().getOverlayPane()); - this.graph.isCellMovable(this.state.cell) && (this.selectionBorder.node.style.cursor = mxConstants.CURSOR_MOVABLE_VERTEX); - mxEvent.redirectMouseEvents(this.selectionBorder.node, this.graph, this.state); - if (0 >= mxGraphHandler.prototype.maxCells || this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells) { - var a = this.graph.isCellResizable(this.state.cell); - this.sizers = []; - if (a || this.graph.isLabelMovable(this.state.cell) && 2 <= this.state.width && 2 <= this.state.height) { - var b = 0; - a && (this.singleSizer || (this.sizers.push(this.createSizer("nw-resize", - b++)), this.sizers.push(this.createSizer("n-resize", b++)), this.sizers.push(this.createSizer("ne-resize", b++)), this.sizers.push(this.createSizer("w-resize", b++)), this.sizers.push( - this.createSizer("e-resize", b++)), this.sizers.push(this.createSizer("sw-resize", b++)), this.sizers.push(this.createSizer("s-resize", b++))), this.sizers.push(this.createSizer( - "se-resize", b++))); - a = this.graph.model.getGeometry(this.state.cell); - null != a && (!a.relative && !this.graph.isSwimlane(this.state.cell) && this.graph.isLabelMovable(this.state.cell)) && - (this.labelShape = this.createSizer(mxConstants.CURSOR_LABEL_HANDLE, mxEvent.LABEL_HANDLE, mxConstants.LABEL_HANDLE_SIZE, mxConstants.LABEL_HANDLE_FILLCOLOR), this.sizers.push(this.labelShape)) - } else this.graph.isCellMovable(this.state.cell) && (!this.graph.isCellResizable(this.state.cell) && 2 > this.state.width && 2 > this.state.height) && (this.labelShape = this.createSizer( - mxConstants.CURSOR_MOVABLE_VERTEX, null, null, mxConstants.LABEL_HANDLE_FILLCOLOR), this.sizers.push(this.labelShape)) - } - if (this.rotationEnabled && (0 >= - mxGraphHandler.prototype.maxCells || this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells)) this.rotationShape = this.createSizer("pointer", mxEvent.ROTATION_HANDLE, mxConstants - .HANDLE_SIZE + 3, mxConstants.HANDLE_FILLCOLOR), this.sizers.push(this.rotationShape); - this.redraw() -}; -mxVertexHandler.prototype.getSelectionBounds = function(a) { - return new mxRectangle(Math.round(a.x), Math.round(a.y), Math.round(a.width), Math.round(a.height)) -}; -mxVertexHandler.prototype.createSelectionShape = function(a) { - a = new mxRectangleShape(a, null, this.getSelectionColor()); - a.strokewidth = this.getSelectionStrokeWidth(); - a.isDashed = this.isSelectionDashed(); - return a -}; -mxVertexHandler.prototype.getSelectionColor = function() { - return mxConstants.VERTEX_SELECTION_COLOR -}; -mxVertexHandler.prototype.getSelectionStrokeWidth = function() { - return mxConstants.VERTEX_SELECTION_STROKEWIDTH -}; -mxVertexHandler.prototype.isSelectionDashed = function() { - return mxConstants.VERTEX_SELECTION_DASHED -}; -mxVertexHandler.prototype.createSizer = function(a, b, c, d) { - c = c || mxConstants.HANDLE_SIZE; - c = new mxRectangle(0, 0, c, c); - d = this.createSizerShape(c, b, d); - d.isHtmlAllowed() && null != this.state.text && this.state.text.node.parentNode == this.graph.container ? (d.bounds.height -= 1, d.bounds.width -= 1, d.dialect = mxConstants.DIALECT_STRICTHTML, d - .init(this.graph.container)) : (d.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG, d.init(this.graph.getView().getOverlayPane())); - mxEvent.redirectMouseEvents(d.node, this.graph, this.state); - this.graph.isEnabled() && (d.node.style.cursor = a); - this.isSizerVisible(b) || (d.node.style.visibility = "hidden"); - return d -}; -mxVertexHandler.prototype.isSizerVisible = function(a) { - return !0 -}; -mxVertexHandler.prototype.createSizerShape = function(a, b, c) { - return null != this.handleImage ? (a.width = this.handleImage.width, a.height = this.handleImage.height, new mxImageShape(a, this.handleImage.src)) : b == mxEvent.ROTATION_HANDLE ? new mxEllipse( - a, c || mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR) : new mxRectangleShape(a, c || mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR) -}; -mxVertexHandler.prototype.moveSizerTo = function(a, b, c) { - null != a && (a.bounds.x = Math.round(b - a.bounds.width / 2), a.bounds.y = Math.round(c - a.bounds.height / 2), a.redraw()) -}; -mxVertexHandler.prototype.getHandleForEvent = function(a) { - if (a.isSource(this.rotationShape)) return mxEvent.ROTATION_HANDLE; - if (a.isSource(this.labelShape)) return mxEvent.LABEL_HANDLE; - if (null != this.sizers) - for (var b = this.tolerance, b = this.allowHandleBoundsCheck && (mxClient.IS_IE || 0 < b) ? new mxRectangle(a.getGraphX() - b, a.getGraphY() - b, 2 * b, 2 * b) : null, c = 0; c < this.sizers.length; c++) - if (a.isSource(this.sizers[c]) || null != b && mxUtils.intersects(this.sizers[c].bounds, b)) return c; - return null -}; -mxVertexHandler.prototype.mouseDown = function(a, b) { - if (!b.isConsumed() && this.graph.isEnabled() && !this.graph.isForceMarqueeEvent(b.getEvent()) && (0 < this.tolerance || b.getState() == this.state)) { - var c = this.getHandleForEvent(b); - null != c && (this.start(b.getX(), b.getY(), c), b.consume()) - } -}; -mxVertexHandler.prototype.start = function(a, b, c) { - a = mxUtils.convertPoint(this.graph.container, a, b); - this.startX = a.x; - this.startY = a.y; - this.index = c; - this.selectionBorder.node.style.display = c == mxEvent.ROTATION_HANDLE ? "inline" : "none"; - this.preview = this.createSelectionShape(this.bounds); - !(mxClient.IS_SVG && 0 != Number(this.state.style[mxConstants.STYLE_ROTATION] || "0")) && null != this.state.text && this.state.text.node.parentNode == this.graph.container ? (this.preview.dialect = - mxConstants.DIALECT_STRICTHTML, this.preview.init(this.graph.container)) : - (this.preview.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG, this.preview.init(this.graph.view.getOverlayPane())) -}; -mxVertexHandler.prototype.mouseMove = function(a, b) { - if (!b.isConsumed() && null != this.index) { - var c = new mxPoint(b.getGraphX(), b.getGraphY()), - d = this.graph.isGridEnabledEvent(b.getEvent()), - e = this.graph.getView().scale; - if (this.index == mxEvent.LABEL_HANDLE) d && (c.x = this.graph.snap(c.x / e) * e, c.y = this.graph.snap(c.y / e) * e), this.moveSizerTo(this.sizers[this.sizers.length - 1], c.x, c.y); - else if (this.index == mxEvent.ROTATION_HANDLE) { - var f = this.state.x + this.state.width / 2 - c.x, - g = this.state.y + this.state.height / 2 - c.y; - this.currentAlpha = - 0 != f ? 180 * Math.atan(g / f) / Math.PI + 90 : 0 > g ? 180 : 0; - 0 < f && (this.currentAlpha -= 180); - this.rotationRaster && (f = c.x - this.state.getCenterX(), g = c.y - this.state.getCenterY(), f = Math.abs(Math.sqrt(f * f + g * g) - this.state.height / 2 - 20), f = Math.max(1, 5 * Math.min( - 3, Math.max(0, Math.round(80 / Math.abs(f))))), this.currentAlpha = Math.round(this.currentAlpha / f) * f); - this.selectionBorder.rotation = this.currentAlpha; - this.selectionBorder.redraw() - } else { - var h = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || "0"), - k = Math.cos(-h), - l = Math.sin(-h), - m = new mxPoint(this.state.getCenterX(), this.state.getCenterY()), - f = c.x - this.startX, - g = c.y - this.startY, - c = this.graph.view.translate, - n = l * f + k * g, - f = k * f - l * g; - this.bounds = this.union(this.selectionBounds, f, n, this.index, d, e, c); - k = Math.cos(h); - l = Math.sin(h); - g = new mxPoint(this.bounds.getCenterX(), this.bounds.getCenterY()); - f = g.x - m.x; - g = g.y - m.y; - m = l * f + k * g - g; - this.bounds.x += k * f - l * g - f; - this.bounds.y += m; - this.drawPreview() - } - b.consume() - } else null != this.getHandleForEvent(b) && b.consume(!1) -}; -mxVertexHandler.prototype.mouseUp = function(a, b) { - if (!b.isConsumed() && null != this.index && null != this.state) { - var c = new mxPoint(b.getGraphX(), b.getGraphY()); - this.graph.getModel().beginUpdate(); - try { - if (this.index == mxEvent.ROTATION_HANDLE) null != this.currentAlpha && this.rotateCell(this.state.cell, this.currentAlpha - (this.state.style[mxConstants.STYLE_ROTATION] || 0)); - else { - var d = this.graph.isGridEnabledEvent(b.getEvent()), - e = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || "0"), - f = Math.cos(-e), - g = Math.sin(-e), - h = c.x - this.startX, - k = c.y - this.startY, - c = g * h + f * k, - h = f * h - g * k, - k = c, - l = this.graph.view.scale; - this.resizeCell(this.state.cell, h / l, k / l, this.index, d) - } - } finally { - this.graph.getModel().endUpdate() - } - this.reset(); - b.consume() - } -}; -mxVertexHandler.prototype.rotateCell = function(a, b) { - var c = this.graph.getModel(); - if (c.isVertex(a)) { - var d = a == this.state ? this.state : this.graph.view.getState(a); - null != d && this.graph.setCellStyles(mxConstants.STYLE_ROTATION, (d.style[mxConstants.STYLE_ROTATION] || 0) + b, [a]); - if (this.state.cell != a && (d = this.graph.getCellGeometry(a), null != d && !d.relative)) - if (0 != b) { - var e = this.graph.getModel().getParent(a), - f = this.graph.getCellGeometry(e); - if (!d.relative && null != f) { - var g = mxUtils.toRadians(b), - e = Math.cos(g), - g = Math.sin(g), - h = new mxPoint(d.getCenterX(), d.getCenterY()), - f = new mxPoint(f.width / 2, f.height / 2), - e = mxUtils.getRotatedPoint(h, e, g, f), - d = d.clone(); - d.x = e.x - d.width / 2; - d.y = e.y - d.height / 2; - c.setGeometry(a, d) - } - } else d = d.clone(), d.x += dx, d.y += dy, c.setGeometry(a, d); - d = c.getChildCount(a); - for (e = 0; e < d; e++) this.rotateCell(c.getChildAt(a, e), b) - } -}; -mxVertexHandler.prototype.reset = function() { - this.index = this.currentAlpha = null; - null != this.preview && (this.preview.destroy(), this.preview = null); - null != this.selectionBorder && (this.selectionBorder.node.style.display = "inline", this.selectionBounds = this.getSelectionBounds(this.state), this.bounds = new mxRectangle(this.selectionBounds - .x, this.selectionBounds.y, this.selectionBounds.width, this.selectionBounds.height), this.drawPreview()) -}; -mxVertexHandler.prototype.resizeCell = function(a, b, c, d, e) { - var f = this.graph.model.getGeometry(a); - if (null != f) - if (d == mxEvent.LABEL_HANDLE) d = this.graph.view.scale, b = (this.labelShape.bounds.getCenterX() - this.startX) / d, c = (this.labelShape.bounds.getCenterY() - this.startY) / d, f = f.clone(), - null == f.offset ? f.offset = new mxPoint(b, c) : (f.offset.x += b, f.offset.y += c), this.graph.model.setGeometry(a, f); - else { - d = this.union(f, b, c, d, e, 1, new mxPoint(0, 0)); - var g = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || "0"); - if (0 != g) { - b = d.getCenterX() - f.getCenterX(); - c = d.getCenterY() - f.getCenterY(); - e = Math.cos(g); - var h = Math.sin(g), - g = e * b - h * c - b; - b = h * b + e * c - c; - c = d.x - f.x; - var k = d.y - f.y, - l = e * c - h * k; - e = h * c + e * k; - d.x += g; - d.y += b; - if (!this.graph.isCellCollapsed(a) && (0 != g || 0 != b)) c = f.x - d.x + l, k = f.y - d.y + e, this.moveChildren(a, c, k) - } - this.graph.resizeCell(a, d) - } -}; -mxVertexHandler.prototype.moveChildren = function(a, b, c) { - for (var d = this.graph.getModel(), e = d.getChildCount(a), f = 0; f < e; f++) { - var g = d.getChildAt(a, f); - if (d.isVertex(g)) { - var h = this.graph.getCellGeometry(g); - null != h && !h.relative && (h = h.clone(), h.x += b, h.y += c, d.setGeometry(g, h)) - } - } -}; -mxVertexHandler.prototype.union = function(a, b, c, d, e, f, g) { - if (this.singleSizer) { - g = a.x + a.width + b; - var h = a.y + a.height + c; - e && (g = this.graph.snap(g / f) * f, h = this.graph.snap(h / f) * f); - f = new mxRectangle(a.x, a.y, 0, 0); - f.add(new mxRectangle(g, h, 0, 0)); - return f - } - var h = a.x - g.x * f, - k = h + a.width, - l = a.y - g.y * f; - a = l + a.height; - 4 < d ? (a += c, e && (a = this.graph.snap(a / f) * f)) : 3 > d && (l += c, e && (l = this.graph.snap(l / f) * f)); - if (0 == d || 3 == d || 5 == d) h += b, e && (h = this.graph.snap(h / f) * f); - else if (2 == d || 4 == d || 7 == d) k += b, e && (k = this.graph.snap(k / f) * f); - e = k - h; - a -= - l; - 0 > e && (h += e, e = Math.abs(e)); - 0 > a && (l += a, a = Math.abs(a)); - return new mxRectangle(h + g.x * f, l + g.y * f, e, a) -}; -mxVertexHandler.prototype.redraw = function() { - this.selectionBounds = this.getSelectionBounds(this.state); - this.bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height); - var a = this.state; - if (null != this.sizers) { - var b = a.x + a.width, - c = a.y + a.height; - if (this.singleSizer) this.moveSizerTo(this.sizers[0], b, c); - else { - var d = a.x + a.width / 2, - e = a.y + a.height / 2; - if (1 < this.sizers.length) { - var f = mxUtils.toRadians(a.style[mxConstants.STYLE_ROTATION] || "0"), - g = Math.cos(f), - f = Math.sin(f), - h = new mxPoint(a.getCenterX(), - a.getCenterY()), - k = mxUtils.getRotatedPoint(new mxPoint(a.x, a.y), g, f, h); - this.moveSizerTo(this.sizers[0], k.x, k.y); - k.x = d; - k.y = a.y; - k = mxUtils.getRotatedPoint(k, g, f, h); - this.moveSizerTo(this.sizers[1], k.x, k.y); - k.x = b; - k.y = a.y; - k = mxUtils.getRotatedPoint(k, g, f, h); - this.moveSizerTo(this.sizers[2], k.x, k.y); - k.x = a.x; - k.y = e; - k = mxUtils.getRotatedPoint(k, g, f, h); - this.moveSizerTo(this.sizers[3], k.x, k.y); - k.x = b; - k.y = e; - k = mxUtils.getRotatedPoint(k, g, f, h); - this.moveSizerTo(this.sizers[4], k.x, k.y); - k.x = a.x; - k.y = c; - k = mxUtils.getRotatedPoint(k, - g, f, h); - this.moveSizerTo(this.sizers[5], k.x, k.y); - k.x = d; - k.y = c; - k = mxUtils.getRotatedPoint(k, g, f, h); - this.moveSizerTo(this.sizers[6], k.x, k.y); - k.x = b; - k.y = c; - k = mxUtils.getRotatedPoint(k, g, f, h); - this.moveSizerTo(this.sizers[7], k.x, k.y); - this.moveSizerTo(this.sizers[8], d + a.absoluteOffset.x, e + a.absoluteOffset.y) - } else 2 <= this.state.width && 2 <= this.state.height ? this.moveSizerTo(this.sizers[0], d + a.absoluteOffset.x, e + a.absoluteOffset.y) : this.moveSizerTo(this.sizers[0], a.x, a.y) - } - } - null != this.rotationShape && (f = mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION] || - "0"), g = Math.cos(f), f = Math.sin(f), h = new mxPoint(this.state.getCenterX(), this.state.getCenterY()), k = mxUtils.getRotatedPoint(new mxPoint(a.x + a.width / 2, a.y - 16), g, f, h), - this.moveSizerTo(this.rotationShape, k.x, k.y)); - this.selectionBorder.rotation = Number(this.state.style[mxConstants.STYLE_ROTATION] || "0"); - this.drawPreview() -}; -mxVertexHandler.prototype.drawPreview = function() { - null != this.preview && (this.preview.bounds = this.bounds, this.preview.node.parentNode == this.graph.container && (this.preview.bounds.width = Math.max(0, this.preview.bounds.width - 1), this.preview - .bounds.height = Math.max(0, this.preview.bounds.height - 1)), this.preview.rotation = Number(this.state.style[mxConstants.STYLE_ROTATION] || "0"), this.preview.redraw()); - this.selectionBorder.bounds = this.bounds; - this.selectionBorder.redraw() -}; -mxVertexHandler.prototype.destroy = function() { - null != this.preview && (this.preview.destroy(), this.preview = null); - this.selectionBorder.destroy(); - this.labelShape = this.selectionBorder = null; - if (null != this.sizers) - for (var a = 0; a < this.sizers.length; a++) this.sizers[a].destroy(), this.sizers[a] = null -}; - -function mxEdgeHandler(a) { - null != a && (this.state = a, this.init()) -} -mxEdgeHandler.prototype.graph = null; -mxEdgeHandler.prototype.state = null; -mxEdgeHandler.prototype.marker = null; -mxEdgeHandler.prototype.constraintHandler = null; -mxEdgeHandler.prototype.error = null; -mxEdgeHandler.prototype.shape = null; -mxEdgeHandler.prototype.bends = null; -mxEdgeHandler.prototype.labelShape = null; -mxEdgeHandler.prototype.cloneEnabled = !0; -mxEdgeHandler.prototype.addEnabled = !1; -mxEdgeHandler.prototype.removeEnabled = !1; -mxEdgeHandler.prototype.preferHtml = !1; -mxEdgeHandler.prototype.allowHandleBoundsCheck = !0; -mxEdgeHandler.prototype.snapToTerminals = !1; -mxEdgeHandler.prototype.handleImage = null; -mxEdgeHandler.prototype.tolerance = 0; -mxEdgeHandler.prototype.init = function() { - this.graph = this.state.view.graph; - this.marker = this.createMarker(); - this.constraintHandler = new mxConstraintHandler(this.graph); - this.points = []; - this.abspoints = this.getSelectionPoints(this.state); - this.shape = this.createSelectionShape(this.abspoints); - this.shape.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG; - this.shape.init(this.graph.getView().getOverlayPane()); - this.shape.svgStrokeTolerance = 0; - this.shape.node.style.cursor = - mxConstants.CURSOR_MOVABLE_EDGE; - mxEvent.addListener(this.shape.node, "dblclick", mxUtils.bind(this, function(a) { - this.graph.dblClick(a, this.state.cell) - })); - mxEvent.addGestureListeners(this.shape.node, mxUtils.bind(this, function(a) { - this.addEnabled && this.isAddPointEvent(a) ? this.addPoint(this.state, a) : this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(a, this.state)) - }), mxUtils.bind(this, function(a) { - var c = this.state.cell; - if (null != this.index) { - var d = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(a), - mxEvent.getClientY(a)), - c = this.graph.getCellAt(d.x, d.y); - this.graph.isSwimlane(c) && this.graph.hitsSwimlaneContent(c, d.x, d.y) && (c = null) - } - this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(a, this.graph.getView().getState(c))) - }), mxUtils.bind(this, function(a) { - this.graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(a, this.state)) - })); - this.preferHtml = null != this.state.text && this.state.text.node.parentNode == this.graph.container; - if (!this.preferHtml) { - var a = this.state.getVisibleTerminalState(!0); - null != a && (this.preferHtml = null != a.text && a.text.node.parentNode == this.graph.container); - this.preferHtml || (a = this.state.getVisibleTerminalState(!1), null != a && (this.preferHtml = null != a.text && a.text.node.parentNode == this.graph.container)) - } - if (this.graph.getSelectionCount() < mxGraphHandler.prototype.maxCells || 0 >= mxGraphHandler.prototype.maxCells) this.bends = this.createBends(); - this.label = new mxPoint(this.state.absoluteOffset.x, this.state.absoluteOffset.y); - this.labelShape = new mxRectangleShape(new mxRectangle, - mxConstants.LABEL_HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR); - this.labelShape.pointerEvents = !1; - this.initBend(this.labelShape); - this.labelShape.node.style.cursor = mxConstants.CURSOR_LABEL_HANDLE; - mxEvent.redirectMouseEvents(this.labelShape.node, this.graph, this.state); - this.redraw() -}; -mxEdgeHandler.prototype.isAddPointEvent = function(a) { - return mxEvent.isShiftDown(a) -}; -mxEdgeHandler.prototype.isRemovePointEvent = function(a) { - return mxEvent.isShiftDown(a) -}; -mxEdgeHandler.prototype.getSelectionPoints = function(a) { - return a.absolutePoints -}; -mxEdgeHandler.prototype.createSelectionShape = function(a) { - a = new mxPolyline(a, this.getSelectionColor()); - a.strokewidth = this.getSelectionStrokeWidth(); - a.isDashed = this.isSelectionDashed(); - return a -}; -mxEdgeHandler.prototype.getSelectionColor = function() { - return mxConstants.EDGE_SELECTION_COLOR -}; -mxEdgeHandler.prototype.getSelectionStrokeWidth = function() { - return mxConstants.EDGE_SELECTION_STROKEWIDTH -}; -mxEdgeHandler.prototype.isSelectionDashed = function() { - return mxConstants.EDGE_SELECTION_DASHED -}; -mxEdgeHandler.prototype.isConnectableCell = function(a) { - return !0 -}; -mxEdgeHandler.prototype.createMarker = function() { - var a = new mxCellMarker(this.graph), - b = this; - a.getCell = function(a) { - var d = mxCellMarker.prototype.getCell.apply(this, arguments); - if (!b.isConnectableCell(d)) return null; - var e = b.graph.getModel(); - if (d == b.state.cell || null != d && !b.graph.connectableEdges && e.isEdge(d)) d = null; - return d - }; - a.isValidState = function(a) { - var d = b.graph.getModel(), - d = b.graph.view.getTerminalPort(a, b.graph.view.getState(d.getTerminal(b.state.cell, !b.isSource)), !b.isSource), - d = null != d ? d.cell : null; - b.error = b.validateConnection(b.isSource ? a.cell : d, b.isSource ? d : a.cell); - return null == b.error - }; - return a -}; -mxEdgeHandler.prototype.validateConnection = function(a, b) { - return this.graph.getEdgeValidationError(this.state.cell, a, b) -}; -mxEdgeHandler.prototype.createBends = function() { - for (var a = this.state.cell, b = [], c = 0; c < this.abspoints.length; c++) - if (this.isHandleVisible(c)) { - var d = c == this.abspoints.length - 1; - if ((d = 0 == c || d) || this.graph.isCellBendable(a)) { - var e = this.createHandleShape(c); - this.initBend(e); - mxClient.IS_TOUCH && e.node.setAttribute("pointer-events", "none"); - if (this.isHandleEnabled(c)) - if (mxClient.IS_TOUCH) { - var f = mxUtils.bind(this, function(a) { - a = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(a), mxEvent.getClientY(a)); - return this.graph.view.getState(this.graph.getCellAt(a.x, a.y)) - }); - mxEvent.redirectMouseEvents(e.node, this.graph, f) - } else e.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE, mxEvent.redirectMouseEvents(e.node, this.graph, this.state); - b.push(e); - d || (this.points.push(new mxPoint(0, 0)), e.node.style.visibility = "hidden") - } - } - return b -}; -mxEdgeHandler.prototype.isHandleEnabled = function(a) { - return !0 -}; -mxEdgeHandler.prototype.isHandleVisible = function(a) { - return !0 -}; -mxEdgeHandler.prototype.createHandleShape = function(a) { - if (null != this.handleImage) return new mxImageShape(new mxRectangle(0, 0, this.handleImage.width, this.handleImage.height), this.handleImage.src); - a = mxConstants.HANDLE_SIZE; - this.preferHtml && (a -= 1); - return new mxRectangleShape(new mxRectangle(0, 0, a, a), mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR) -}; -mxEdgeHandler.prototype.initBend = function(a) { - this.preferHtml ? (a.dialect = mxConstants.DIALECT_STRICTHTML, a.init(this.graph.container)) : (a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_MIXEDHTML : - mxConstants.DIALECT_SVG, a.init(this.graph.getView().getOverlayPane())) -}; -mxEdgeHandler.prototype.getHandleForEvent = function(a) { - if (null != this.bends) - for (var b = this.tolerance, b = this.allowHandleBoundsCheck && (mxClient.IS_IE || 0 < b) ? new mxRectangle(a.getGraphX() - b, a.getGraphY() - b, 2 * b, 2 * b) : null, c = 0; c < this.bends.length; c++) - if ((a.isSource(this.bends[c]) || null != b && mxUtils.intersects(this.bends[c].bounds, b)) && "hidden" != this.bends[c].node.style.visibility) return c; - if (a.isSource(this.labelShape) && "hidden" != this.labelShape.node.style.visibility || a.isSource(this.state.text)) - if (!mxClient.IS_SF && - !mxClient.IS_GC || "SELECT" != a.getSource().nodeName) return mxEvent.LABEL_HANDLE; - return null -}; -mxEdgeHandler.prototype.mouseDown = function(a, b) { - var c = null, - c = this.getHandleForEvent(b); - null != c && (!b.isConsumed() && this.graph.isEnabled() && !this.graph.isForceMarqueeEvent(b.getEvent())) && (this.removeEnabled && this.isRemovePointEvent(b.getEvent()) ? this.removePoint(this.state, - c) : (c != mxEvent.LABEL_HANDLE || this.graph.isLabelMovable(b.getCell())) && this.start(b.getX(), b.getY(), c), b.consume()) -}; -mxEdgeHandler.prototype.start = function(a, b, c) { - this.startX = a; - this.startY = b; - this.isSource = null == this.bends ? !1 : 0 == c; - this.isTarget = null == this.bends ? !1 : c == this.bends.length - 1; - this.isLabel = c == mxEvent.LABEL_HANDLE; - if (this.isSource || this.isTarget) { - if (a = this.state.cell, b = this.graph.model.getTerminal(a, this.isSource), null == b && this.graph.isTerminalPointMovable(a, this.isSource) || null != b && this.graph.isCellDisconnectable(a, - b, this.isSource)) this.index = c - } else this.index = c -}; -mxEdgeHandler.prototype.clonePreviewState = function(a, b) { - return this.state.clone() -}; -mxEdgeHandler.prototype.getSnapToTerminalTolerance = function() { - return this.graph.gridSize * this.graph.view.scale / 2 -}; -mxEdgeHandler.prototype.getPointForEvent = function(a) { - var b = new mxPoint(a.getGraphX(), a.getGraphY()), - c = this.getSnapToTerminalTolerance(), - d = this.graph.getView(), - e = !1, - f = !1; - if (this.snapToTerminals && 0 < c) { - var g = function(a) { - if (null != a) { - var d = a.x; - Math.abs(b.x - d) < c && (b.x = d, e = !0); - a = a.y; - Math.abs(b.y - a) < c && (b.y = a, f = !0) - } - }, - h = function(a) { - null != a && g.call(this, new mxPoint(d.getRoutingCenterX(a), d.getRoutingCenterY(a))) - }; - h.call(this, this.state.getVisibleTerminalState(!0)); - h.call(this, this.state.getVisibleTerminalState(!1)); - if (null != this.abspoints) - for (h = 0; h < this.abspoints; h++) h != this.index && g.call(this, this.abspoints[h]) - } - this.graph.isGridEnabledEvent(a.getEvent()) && (a = d.scale, h = d.translate, e || (b.x = (this.graph.snap(b.x / a - h.x) + h.x) * a), f || (b.y = (this.graph.snap(b.y / a - h.y) + h.y) * a)); - return b -}; -mxEdgeHandler.prototype.getPreviewTerminalState = function(a) { - this.constraintHandler.update(a, this.isSource); - this.marker.process(a); - a = this.marker.getValidState(); - var b = null; - null != this.constraintHandler.currentFocus && null != this.constraintHandler.currentConstraint && this.marker.reset(); - null != a ? b = a : null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && (b = this.constraintHandler.currentFocus); - return b -}; -mxEdgeHandler.prototype.getPreviewPoints = function(a) { - var b = this.graph.getCellGeometry(this.state.cell), - b = null != b.points ? b.points.slice() : null; - !this.isSource && !this.isTarget ? (this.convertPoint(a, !1), null == b ? b = [a] : b[this.index - 1] = a) : this.graph.resetEdgesOnConnect && (b = null); - return b -}; -mxEdgeHandler.prototype.updatePreviewState = function(a, b, c) { - var d = this.isSource ? c : this.state.getVisibleTerminalState(!0), - e = this.isTarget ? c : this.state.getVisibleTerminalState(!1), - f = this.graph.getConnectionConstraint(a, d, !0), - g = this.graph.getConnectionConstraint(a, e, !1), - h = this.constraintHandler.currentConstraint; - null == h && (h = new mxConnectionConstraint); - this.isSource ? f = h : this.isTarget && (g = h); - (!this.isSource || null != d) && a.view.updateFixedTerminalPoint(a, d, !0, f); - (!this.isTarget || null != e) && a.view.updateFixedTerminalPoint(a, - e, !1, g); - if ((this.isSource || this.isTarget) && null == c) a.setAbsoluteTerminalPoint(b, this.isSource), null == this.marker.getMarkedState() && (this.error = this.graph.allowDanglingEdges ? null : ""); - a.view.updatePoints(a, this.points, d, e); - a.view.updateFloatingTerminalPoints(a, d, e) -}; -mxEdgeHandler.prototype.mouseMove = function(a, b) { - if (null != this.index && null != this.marker) { - var c = this.getPointForEvent(b); - if (this.isLabel) this.label.x = c.x, this.label.y = c.y; - else { - this.points = this.getPreviewPoints(c); - var d = this.isSource || this.isTarget ? this.getPreviewTerminalState(b) : null, - e = this.clonePreviewState(c, null != d ? d.cell : null); - this.updatePreviewState(e, c, d); - this.setPreviewColor(null == this.error ? this.marker.validColor : this.marker.invalidColor); - this.abspoints = e.absolutePoints; - this.active = !0 - } - this.drawPreview(); - mxEvent.consume(b.getEvent()); - b.consume() - } else mxClient.IS_IE && null != this.getHandleForEvent(b) && b.consume(!1) -}; -mxEdgeHandler.prototype.mouseUp = function(a, b) { - if (null != this.index && null != this.marker) { - var c = this.state.cell; - if (b.getX() != this.startX || b.getY() != this.startY) - if (null != this.error) 0 < this.error.length && this.graph.validationAlert(this.error); - else if (this.isLabel) this.moveLabel(this.state, this.label.x, this.label.y); - else if (this.isSource || this.isTarget) { - var d = null; - null != this.constraintHandler.currentConstraint && null != this.constraintHandler.currentFocus && (d = this.constraintHandler.currentFocus.cell); - null == - d && this.marker.hasValidState() && (d = this.marker.validState.cell); - if (null != d) c = this.connect(c, d, this.isSource, this.graph.isCloneEvent(b.getEvent()) && this.cloneEnabled && this.graph.isCellsCloneable(), b); - else if (this.graph.isAllowDanglingEdges()) { - d = this.abspoints[this.isSource ? 0 : this.abspoints.length - 1]; - d.x = d.x / this.graph.view.scale - this.graph.view.translate.x; - d.y = d.y / this.graph.view.scale - this.graph.view.translate.y; - var e = this.graph.getView().getState(this.graph.getModel().getParent(c)); - null != e && (d.x -= - e.origin.x, d.y -= e.origin.y); - d.x -= this.graph.panDx / this.graph.view.scale; - d.y -= this.graph.panDy / this.graph.view.scale; - this.changeTerminalPoint(c, d, this.isSource) - } - } else this.active ? this.changePoints(c, this.points) : (this.graph.getView().invalidate(this.state.cell), this.graph.getView().revalidate(this.state.cell)); - null != this.marker && (this.reset(), c != this.state.cell && this.graph.setSelectionCell(c)); - b.consume() - } -}; -mxEdgeHandler.prototype.reset = function() { - this.points = this.label = this.index = this.error = null; - this.isTarget = this.isSource = this.isLabel = this.active = !1; - this.marker.reset(); - this.constraintHandler.reset(); - this.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR); - this.redraw() -}; -mxEdgeHandler.prototype.setPreviewColor = function(a) { - null != this.shape && (this.shape.stroke = a) -}; -mxEdgeHandler.prototype.convertPoint = function(a, b) { - var c = this.graph.getView().getScale(), - d = this.graph.getView().getTranslate(); - b && (a.x = this.graph.snap(a.x), a.y = this.graph.snap(a.y)); - a.x = Math.round(a.x / c - d.x); - a.y = Math.round(a.y / c - d.y); - c = this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell)); - null != c && (a.x -= c.origin.x, a.y -= c.origin.y); - return a -}; -mxEdgeHandler.prototype.moveLabel = function(a, b, c) { - var d = this.graph.getModel(), - e = d.getGeometry(a.cell); - if (null != e) { - var e = e.clone(), - f = this.graph.getView().getRelativePoint(a, b, c); - e.x = f.x; - e.y = f.y; - var g = this.graph.getView().scale; - e.offset = new mxPoint(0, 0); - f = this.graph.view.getPoint(a, e); - e.offset = new mxPoint((b - f.x) / g, (c - f.y) / g); - d.setGeometry(a.cell, e) - } -}; -mxEdgeHandler.prototype.connect = function(a, b, c, d, e) { - e = this.graph.getModel(); - var f = e.getParent(a); - e.beginUpdate(); - try { - if (d) { - var g = a.clone(); - e.add(f, g, e.getChildCount(f)); - var h = e.getTerminal(a, !c); - this.graph.connectCell(g, h, !c); - a = g - } - var k = this.constraintHandler.currentConstraint; - null == k && (k = new mxConnectionConstraint); - this.graph.connectCell(a, b, c, k) - } finally { - e.endUpdate() - } - return a -}; -mxEdgeHandler.prototype.changeTerminalPoint = function(a, b, c) { - var d = this.graph.getModel(), - e = d.getGeometry(a); - if (null != e) { - d.beginUpdate(); - try { - e = e.clone(), e.setTerminalPoint(b, c), d.setGeometry(a, e), this.graph.connectCell(a, null, c, new mxConnectionConstraint) - } finally { - d.endUpdate() - } - } -}; -mxEdgeHandler.prototype.changePoints = function(a, b) { - var c = this.graph.getModel(), - d = c.getGeometry(a); - null != d && (d = d.clone(), d.points = b, c.setGeometry(a, d)) -}; -mxEdgeHandler.prototype.addPoint = function(a, b) { - var c = mxUtils.convertPoint(this.graph.container, mxEvent.getClientX(b), mxEvent.getClientY(b)), - d = this.graph.isGridEnabledEvent(b); - this.convertPoint(c, d); - this.addPointAt(a, c.x, c.y); - mxEvent.consume(b) -}; -mxEdgeHandler.prototype.addPointAt = function(a, b, c) { - var d = this.graph.getCellGeometry(a.cell); - b = new mxPoint(b, c); - if (null != d) { - d = d.clone(); - c = this.graph.view.translate; - var e = this.graph.view.scale; - c = mxUtils.findNearestSegment(a, (b.x + c.x) * e, (b.y + c.y) * e); - null == d.points ? d.points = [b] : d.points.splice(c, 0, b); - this.graph.getModel().setGeometry(a.cell, d); - this.destroy(); - this.init() - } -}; -mxEdgeHandler.prototype.removePoint = function(a, b) { - if (0 < b && b < this.abspoints.length - 1) { - var c = this.graph.getCellGeometry(this.state.cell); - null != c && null != c.points && (c = c.clone(), c.points.splice(b - 1, 1), this.graph.getModel().setGeometry(a.cell, c), this.destroy(), this.init()) - } -}; -mxEdgeHandler.prototype.getHandleFillColor = function(a) { - a = 0 == a; - var b = this.state.cell, - c = this.graph.getModel().getTerminal(b, a), - d = mxConstants.HANDLE_FILLCOLOR; - null != c && !this.graph.isCellDisconnectable(b, c, a) || null == c && !this.graph.isTerminalPointMovable(b, a) ? d = mxConstants.LOCKED_HANDLE_FILLCOLOR : null != c && this.graph.isCellDisconnectable( - b, c, a) && (d = mxConstants.CONNECT_HANDLE_FILLCOLOR); - return d -}; -mxEdgeHandler.prototype.redraw = function() { - this.abspoints = this.state.absolutePoints.slice(); - var a = this.state.cell, - b = mxConstants.LABEL_HANDLE_SIZE; - this.label = new mxPoint(this.state.absoluteOffset.x, this.state.absoluteOffset.y); - this.labelShape.bounds = new mxRectangle(Math.round(this.label.x - b / 2), Math.round(this.label.y - b / 2), b, b); - this.labelShape.redraw(); - b = this.graph.getLabel(a); - null != b && 0 < b.length && this.graph.isLabelMovable(a) ? this.labelShape.node.style.visibility = "visible" : this.labelShape.node.style.visibility = - "hidden"; - if (null != this.bends && 0 < this.bends.length) { - var c = this.abspoints.length - 1, - a = this.abspoints[0], - d = this.abspoints[0].y, - b = this.bends[0].bounds; - this.bends[0].bounds = new mxRectangle(Math.round(this.abspoints[0].x - b.width / 2), Math.round(d - b.height / 2), b.width, b.height); - this.bends[0].fill = this.getHandleFillColor(0); - this.bends[0].redraw(); - var d = this.abspoints[c], - e = this.abspoints[c].x, - c = this.abspoints[c].y, - f = this.bends.length - 1, - b = this.bends[f].bounds; - this.bends[f].bounds = new mxRectangle(Math.round(e - b.width / - 2), Math.round(c - b.height / 2), b.width, b.height); - this.bends[f].fill = this.getHandleFillColor(f); - this.bends[f].redraw(); - this.redrawInnerBends(a, d) - } - this.drawPreview() -}; -mxEdgeHandler.prototype.redrawInnerBends = function(a, b) { - var c = this.graph.getModel().getGeometry(this.state.cell).points; - if (null != c) { - null == this.points && (this.points = []); - for (var d = 1; d < this.bends.length - 1; d++) - if (null != this.bends[d]) - if (null != this.abspoints[d]) { - var e = this.abspoints[d].x, - f = this.abspoints[d].y, - g = this.bends[d].bounds; - this.bends[d].node.style.visibility = "visible"; - this.bends[d].bounds = new mxRectangle(Math.round(e - g.width / 2), Math.round(f - g.height / 2), g.width, g.height); - this.bends[d].redraw(); - this.points[d - - 1] = c[d - 1] - } else this.bends[d].destroy(), this.bends[d] = null - } -}; -mxEdgeHandler.prototype.drawPreview = function() { - if (this.isLabel) { - var a = mxConstants.LABEL_HANDLE_SIZE, - a = new mxRectangle(Math.round(this.label.x - a / 2), Math.round(this.label.y - a / 2), a, a); - this.labelShape.bounds = a; - this.labelShape.redraw() - } else this.shape.points = this.abspoints, this.shape.redraw() -}; -mxEdgeHandler.prototype.destroy = function() { - null != this.marker && (this.marker.destroy(), this.marker = null); - null != this.shape && (this.shape.destroy(), this.shape = null); - null != this.labelShape && (this.labelShape.destroy(), this.labelShape = null); - null != this.constraintHandler && (this.constraintHandler.destroy(), this.constraintHandler = null); - if (null != this.bends) - for (var a = 0; a < this.bends.length; a++) null != this.bends[a] && (this.bends[a].destroy(), this.bends[a] = null) -}; - -function mxElbowEdgeHandler(a) { - mxEdgeHandler.call(this, a) -} -mxUtils.extend(mxElbowEdgeHandler, mxEdgeHandler); -mxElbowEdgeHandler.prototype = new mxEdgeHandler; -mxElbowEdgeHandler.prototype.constructor = mxElbowEdgeHandler; -mxElbowEdgeHandler.prototype.flipEnabled = !0; -mxElbowEdgeHandler.prototype.doubleClickOrientationResource = "none" != mxClient.language ? "doubleClickOrientation" : ""; -mxElbowEdgeHandler.prototype.createBends = function() { - var a = [], - b = this.createHandleShape(0); - this.initBend(b); - b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE; - mxEvent.redirectMouseEvents(b.node, this.graph, this.state); - a.push(b); - mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none"); - a.push(this.createVirtualBend()); - this.points.push(new mxPoint(0, 0)); - b = this.createHandleShape(2); - this.initBend(b); - b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE; - mxEvent.redirectMouseEvents(b.node, this.graph, this.state); - a.push(b); - mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none"); - return a -}; -mxElbowEdgeHandler.prototype.createVirtualBend = function() { - var a = this.createHandleShape(); - this.initBend(a); - var b = this.getCursorForBend(); - a.node.style.cursor = b; - b = mxUtils.bind(this, function(a) { - !mxEvent.isConsumed(a) && this.flipEnabled && (this.graph.flipEdge(this.state.cell, a), mxEvent.consume(a)) - }); - mxEvent.redirectMouseEvents(a.node, this.graph, this.state, null, null, null, b); - this.graph.isCellBendable(this.state.cell) || (a.node.style.display = "none"); - return a -}; -mxElbowEdgeHandler.prototype.getCursorForBend = function() { - return this.state.style[mxConstants.STYLE_EDGE] == mxEdgeStyle.TopToBottom || this.state.style[mxConstants.STYLE_EDGE] == mxConstants.EDGESTYLE_TOPTOBOTTOM || (this.state.style[mxConstants.STYLE_EDGE] == - mxEdgeStyle.ElbowConnector || this.state.style[mxConstants.STYLE_EDGE] == mxConstants.EDGESTYLE_ELBOW) && this.state.style[mxConstants.STYLE_ELBOW] == mxConstants.ELBOW_VERTICAL ? - "row-resize" : "col-resize" -}; -mxElbowEdgeHandler.prototype.getTooltipForNode = function(a) { - var b = null; - if (null != this.bends && null != this.bends[1] && (a == this.bends[1].node || a.parentNode == this.bends[1].node)) b = this.doubleClickOrientationResource, b = mxResources.get(b) || b; - return b -}; -mxElbowEdgeHandler.prototype.convertPoint = function(a, b) { - var c = this.graph.getView().getScale(), - d = this.graph.getView().getTranslate(), - e = this.state.origin; - b && (a.x = this.graph.snap(a.x), a.y = this.graph.snap(a.y)); - a.x = Math.round(a.x / c - d.x - e.x); - a.y = Math.round(a.y / c - d.y - e.y) -}; -mxElbowEdgeHandler.prototype.redrawInnerBends = function(a, b) { - var c = this.graph.getModel().getGeometry(this.state.cell).points, - c = null != c ? c[0] : null, - c = null == c ? new mxPoint(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2) : new mxPoint(this.graph.getView().scale * (c.x + this.graph.getView().translate.x + this.state.origin.x), this.graph.getView() - .scale * (c.y + this.graph.getView().translate.y + this.state.origin.y)), - d = this.bends[1].bounds, - e = d.width, - d = d.height; - null == this.handleImage && (d = e = mxConstants.HANDLE_SIZE); - var f = new mxRectangle(Math.round(c.x - - e / 2), Math.round(c.y - d / 2), e, d); - null == this.handleImage && ("hidden" != this.labelShape.node.style.visibility && mxUtils.intersects(f, this.labelShape.bounds)) && (e += 3, d += 3, f = new mxRectangle(Math.round(c.x - e / 2), - Math.round(c.y - d / 2), e, d)); - this.bends[1].bounds = f; - this.bends[1].redraw() -}; - -function mxEdgeSegmentHandler(a) { - mxEdgeHandler.call(this, a) -} -mxUtils.extend(mxEdgeSegmentHandler, mxEdgeHandler); -mxEdgeSegmentHandler.prototype = new mxElbowEdgeHandler; -mxEdgeSegmentHandler.prototype.constructor = mxEdgeSegmentHandler; -mxEdgeSegmentHandler.prototype.getPreviewPoints = function(a) { - if (this.isSource || this.isTarget) return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this, arguments); - this.convertPoint(a, !1); - var b = this.state.absolutePoints, - c = b[0].clone(); - this.convertPoint(c, !1); - for (var d = [], e = 1; e < b.length; e++) { - var f = b[e].clone(); - this.convertPoint(f, !1); - e == this.index && (c.x == f.x ? (c.x = a.x, f.x = a.x) : (c.y = a.y, f.y = a.y)); - e < b.length - 1 && d.push(f); - c = f - } - if (1 == d.length) { - if (c = this.state.view, e = this.state.getVisibleTerminalState(!0), - f = this.state.getVisibleTerminalState(!1), null != f & null != e) { - var g = this.state.origin.x, - h = this.state.origin.y; - mxUtils.contains(f, d[0].x + g, d[0].y + h) ? b[1].y == b[2].y ? d[0].y = c.getRoutingCenterY(e) - h : d[0].x = c.getRoutingCenterX(e) - g : mxUtils.contains(e, d[0].x + g, d[0].y + h) && (b[ - 1].y == b[0].y ? d[0].y = c.getRoutingCenterY(f) - h : d[0].x = c.getRoutingCenterX(f) - g) - } - } else 0 == d.length && (d = [a]); - return d -}; -mxEdgeSegmentHandler.prototype.createBends = function() { - var a = [], - b = this.createHandleShape(0); - this.initBend(b); - b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE; - mxEvent.redirectMouseEvents(b.node, this.graph, this.state); - a.push(b); - mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none"); - var c = this.state.absolutePoints; - if (this.graph.isCellBendable(this.state.cell)) { - null == this.points && (this.points = []); - for (var d = 0; d < c.length - 1; d++) b = this.createVirtualBend(), a.push(b), b.node.style.cursor = 0 == c[d].x - - c[d + 1].x ? "col-resize" : "row-resize", this.points.push(new mxPoint(0, 0)), mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none") - } - b = this.createHandleShape(c.length); - this.initBend(b); - b.node.style.cursor = mxConstants.CURSOR_BEND_HANDLE; - mxEvent.redirectMouseEvents(b.node, this.graph, this.state); - a.push(b); - mxClient.IS_TOUCH && b.node.setAttribute("pointer-events", "none"); - return a -}; -mxEdgeSegmentHandler.prototype.redraw = function() { - this.refresh(); - mxEdgeHandler.prototype.redraw.apply(this, arguments) -}; -mxEdgeSegmentHandler.prototype.refresh = function() { - if (null != this.bends) { - for (var a = 0; a < this.bends.length; a++) null != this.bends[a] && (this.bends[a].destroy(), this.bends[a] = null); - this.bends = this.createBends() - } -}; -mxEdgeSegmentHandler.prototype.redrawInnerBends = function(a, b) { - if (this.graph.isCellBendable(this.state.cell)) { - var c = mxConstants.HANDLE_SIZE, - d = this.state.absolutePoints; - if (null != d && 1 < d.length) - for (var e = 0; e < this.state.absolutePoints.length - 1; e++) - if (null != this.bends[e + 1]) { - a = d[e]; - b = d[e + 1]; - var f = new mxPoint(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2); - this.bends[e + 1].bounds = new mxRectangle(Math.round(f.x - c / 2), Math.round(f.y - c / 2), c, c); - this.bends[e + 1].redraw() - } - } -}; -mxEdgeSegmentHandler.prototype.changePoints = function(a, b) { - b = []; - var c = this.abspoints; - if (1 < c.length) - for (var d = c[0], e = c[1], f = 2; f < c.length; f++) { - var g = c[f]; - if ((Math.round(d.x) != Math.round(e.x) || Math.round(e.x) != Math.round(g.x)) && (Math.round(d.y) != Math.round(e.y) || Math.round(e.y) != Math.round(g.y))) d = e, e = e.clone(), this.convertPoint( - e, !1), b.push(e); - e = g - } - mxElbowEdgeHandler.prototype.changePoints.apply(this, arguments) -}; - -function mxKeyHandler(a, b) { - null != a && (this.graph = a, this.target = b || document.documentElement, this.normalKeys = [], this.shiftKeys = [], this.controlKeys = [], this.controlShiftKeys = [], mxEvent.addListener(this.target, - "keydown", mxUtils.bind(this, function(a) { - this.keyDown(a) - })), mxClient.IS_IE && mxEvent.addListener(window, "unload", mxUtils.bind(this, function() { - this.destroy() - }))) -} -mxKeyHandler.prototype.graph = null; -mxKeyHandler.prototype.target = null; -mxKeyHandler.prototype.normalKeys = null; -mxKeyHandler.prototype.shiftKeys = null; -mxKeyHandler.prototype.controlKeys = null; -mxKeyHandler.prototype.controlShiftKeys = null; -mxKeyHandler.prototype.enabled = !0; -mxKeyHandler.prototype.isEnabled = function() { - return this.enabled -}; -mxKeyHandler.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxKeyHandler.prototype.bindKey = function(a, b) { - this.normalKeys[a] = b -}; -mxKeyHandler.prototype.bindShiftKey = function(a, b) { - this.shiftKeys[a] = b -}; -mxKeyHandler.prototype.bindControlKey = function(a, b) { - this.controlKeys[a] = b -}; -mxKeyHandler.prototype.bindControlShiftKey = function(a, b) { - this.controlShiftKeys[a] = b -}; -mxKeyHandler.prototype.isControlDown = function(a) { - return mxEvent.isControlDown(a) -}; -mxKeyHandler.prototype.getFunction = function(a) { - return null != a ? this.isControlDown(a) ? mxEvent.isShiftDown(a) ? this.controlShiftKeys[a.keyCode] : this.controlKeys[a.keyCode] : mxEvent.isShiftDown(a) ? this.shiftKeys[a.keyCode] : this.normalKeys[ - a.keyCode] : null -}; -mxKeyHandler.prototype.isGraphEvent = function(a) { - a = mxEvent.getSource(a); - if (a == this.target || a.parentNode == this.target || null != this.graph.cellEditor && a == this.graph.cellEditor.textarea) return !0; - for (; null != a;) { - if (a == this.graph.container) return !0; - a = a.parentNode - } - return !1 -}; -mxKeyHandler.prototype.keyDown = function(a) { - if (this.graph.isEnabled() && !mxEvent.isConsumed(a) && this.isGraphEvent(a) && this.isEnabled()) - if (27 == a.keyCode) this.escape(a); - else if (!this.graph.isEditing()) { - var b = this.getFunction(a); - null != b && (b(a), mxEvent.consume(a)) - } -}; -mxKeyHandler.prototype.escape = function(a) { - this.graph.isEscapeEnabled() && this.graph.escape(a) -}; -mxKeyHandler.prototype.destroy = function() { - this.target = null -}; - -function mxTooltipHandler(a, b) { - null != a && (this.graph = a, this.delay = b || 500, this.graph.addMouseListener(this)) -} -mxTooltipHandler.prototype.zIndex = 10005; -mxTooltipHandler.prototype.graph = null; -mxTooltipHandler.prototype.delay = null; -mxTooltipHandler.prototype.hideOnHover = !1; -mxTooltipHandler.prototype.enabled = !0; -mxTooltipHandler.prototype.isEnabled = function() { - return this.enabled -}; -mxTooltipHandler.prototype.setEnabled = function(a) { - this.enabled = a -}; -mxTooltipHandler.prototype.isHideOnHover = function() { - return this.hideOnHover -}; -mxTooltipHandler.prototype.setHideOnHover = function(a) { - this.hideOnHover = a -}; -mxTooltipHandler.prototype.init = function() { - null != document.body && (this.div = document.createElement("div"), this.div.className = "mxTooltip", this.div.style.visibility = "hidden", this.div.style.zIndex = this.zIndex, document.body.appendChild( - this.div), mxEvent.addListener(this.div, "mousedown", mxUtils.bind(this, function(a) { - this.hideTooltip() - }))) -}; -mxTooltipHandler.prototype.mouseDown = function(a, b) { - this.reset(b, !1); - this.hideTooltip() -}; -mxTooltipHandler.prototype.mouseMove = function(a, b) { - if (b.getX() != this.lastX || b.getY() != this.lastY) this.reset(b, !0), (this.isHideOnHover() || b.getState() != this.state || b.getSource() != this.node && (!this.stateSource || null != b.getState() && - this.stateSource == (b.isSource(b.getState().shape) || !b.isSource(b.getState().text)))) && this.hideTooltip(); - this.lastX = b.getX(); - this.lastY = b.getY() -}; -mxTooltipHandler.prototype.mouseUp = function(a, b) { - this.reset(b, !0); - this.hideTooltip() -}; -mxTooltipHandler.prototype.resetTimer = function() { - null != this.thread && (window.clearTimeout(this.thread), this.thread = null) -}; -mxTooltipHandler.prototype.reset = function(a, b) { - this.resetTimer(); - if (b && this.isEnabled() && null != a.getState() && (null == this.div || "hidden" == this.div.style.visibility)) { - var c = a.getState(), - d = a.getSource(), - e = a.getX(), - f = a.getY(), - g = a.isSource(c.shape) || a.isSource(c.text); - this.thread = window.setTimeout(mxUtils.bind(this, function() { - if (!this.graph.isEditing() && !this.graph.panningHandler.isMenuShowing()) { - var a = this.graph.getTooltip(c, d, e, f); - this.show(a, e, f); - this.state = c; - this.node = d; - this.stateSource = g - } - }), this.delay) - } -}; -mxTooltipHandler.prototype.hide = function() { - this.resetTimer(); - this.hideTooltip() -}; -mxTooltipHandler.prototype.hideTooltip = function() { - null != this.div && (this.div.style.visibility = "hidden") -}; -mxTooltipHandler.prototype.show = function(a, b, c) { - if (null != a && 0 < a.length) { - null == this.div && this.init(); - var d = mxUtils.getScrollOrigin(); - this.div.style.left = b + d.x + "px"; - this.div.style.top = c + mxConstants.TOOLTIP_VERTICAL_OFFSET + d.y + "px"; - mxUtils.isNode(a) ? (this.div.innerHTML = "", this.div.appendChild(a)) : this.div.innerHTML = a.replace(/\n/g, "\x3cbr\x3e"); - this.div.style.visibility = ""; - mxUtils.fit(this.div) - } -}; -mxTooltipHandler.prototype.destroy = function() { - this.graph.removeMouseListener(this); - mxEvent.release(this.div); - null != this.div && null != this.div.parentNode && this.div.parentNode.removeChild(this.div); - this.div = null -}; - -function mxCellTracker(a, b, c) { - mxCellMarker.call(this, a, b); - this.graph.addMouseListener(this); - null != c && (this.getCell = c); - mxClient.IS_IE && mxEvent.addListener(window, "unload", mxUtils.bind(this, function() { - this.destroy() - })) -} -mxUtils.extend(mxCellTracker, mxCellMarker); -mxCellTracker.prototype.mouseDown = function(a, b) {}; -mxCellTracker.prototype.mouseMove = function(a, b) { - this.isEnabled() && this.process(b) -}; -mxCellTracker.prototype.mouseUp = function(a, b) { - this.reset() -}; -mxCellTracker.prototype.destroy = function() { - this.destroyed || (this.destroyed = !0, this.graph.removeMouseListener(this), mxCellMarker.prototype.destroy.apply(this)) -}; - -function mxCellHighlight(a, b, c, d) { - null != a && (this.graph = a, this.highlightColor = null != b ? b : mxConstants.DEFAULT_VALID_COLOR, this.strokeWidth = null != c ? c : mxConstants.HIGHLIGHT_STROKEWIDTH, this.dashed = null != d ? - d : !1, this.repaintHandler = mxUtils.bind(this, function() { - this.repaint() - }), this.graph.getView().addListener(mxEvent.SCALE, this.repaintHandler), this.graph.getView().addListener(mxEvent.TRANSLATE, this.repaintHandler), this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE, - this.repaintHandler), this.graph.getModel().addListener(mxEvent.CHANGE, - this.repaintHandler), this.resetHandler = mxUtils.bind(this, function() { - this.hide() - }), this.graph.getView().addListener(mxEvent.DOWN, this.resetHandler), this.graph.getView().addListener(mxEvent.UP, this.resetHandler)) -} -mxCellHighlight.prototype.keepOnTop = !1; -mxCellHighlight.prototype.graph = !0; -mxCellHighlight.prototype.state = null; -mxCellHighlight.prototype.spacing = 2; -mxCellHighlight.prototype.resetHandler = null; -mxCellHighlight.prototype.setHighlightColor = function(a) { - this.highlightColor = a; - null != this.shape && (this.shape.stroke = a) -}; -mxCellHighlight.prototype.drawHighlight = function() { - this.shape = this.createShape(); - this.repaint(); - !this.keepOnTop && this.shape.node.parentNode.firstChild != this.shape.node && this.shape.node.parentNode.insertBefore(this.shape.node, this.shape.node.parentNode.firstChild) -}; -mxCellHighlight.prototype.createShape = function() { - var a = null, - a = this.graph.model.isEdge(this.state.cell) ? new mxPolyline(this.state.absolutePoints, this.highlightColor, this.strokeWidth) : new mxRectangleShape(new mxRectangle, null, this.highlightColor, - this.strokeWidth); - a.dialect = this.graph.dialect != mxConstants.DIALECT_SVG ? mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG; - a.init(this.graph.getView().getOverlayPane()); - mxEvent.redirectMouseEvents(a.node, this.graph, this.state); - a.svgStrokeTolerance = 0; - a.pointerEvents = !1; - a.isDashed = this.dashed; - return a -}; -mxCellHighlight.prototype.repaint = function() { - if (null != this.state && null != this.shape) { - var a = 0; - this.graph.model.isEdge(this.state.cell) ? this.shape.points = this.state.absolutePoints : (this.shape.bounds = new mxRectangle(this.state.x - this.spacing, this.state.y - this.spacing, this.state - .width + 2 * this.spacing, this.state.height + 2 * this.spacing), a = Number(this.state.style[mxConstants.STYLE_ROTATION] || "0")); - null != this.state.shape && this.shape.setCursor(this.state.shape.getCursor()); - 0 != a && (this.shape.rotation = a); - this.shape.redraw() - } -}; -mxCellHighlight.prototype.hide = function() { - this.highlight(null) -}; -mxCellHighlight.prototype.highlight = function(a) { - this.state != a && (null != this.shape && (this.shape.destroy(), this.shape = null), this.state = a, null != this.state && this.drawHighlight()) -}; -mxCellHighlight.prototype.destroy = function() { - this.graph.getView().removeListener(this.repaintHandler); - this.graph.getModel().removeListener(this.repaintHandler); - this.graph.getView().removeListener(this.resetHandler); - this.graph.getModel().removeListener(this.resetHandler); - null != this.shape && (this.shape.destroy(), this.shape = null) -}; - -function mxDefaultKeyHandler(a) { - if (null != a) { - this.editor = a; - this.handler = new mxKeyHandler(a.graph); - var b = this.handler.escape; - this.handler.escape = function(c) { - b.apply(this, arguments); - a.hideProperties(); - a.fireEvent(new mxEventObject(mxEvent.ESCAPE, "event", c)) - } - } -} -mxDefaultKeyHandler.prototype.editor = null; -mxDefaultKeyHandler.prototype.handler = null; -mxDefaultKeyHandler.prototype.bindAction = function(a, b, c) { - var d = mxUtils.bind(this, function() { - this.editor.execute(b) - }); - c ? this.handler.bindControlKey(a, d) : this.handler.bindKey(a, d) -}; -mxDefaultKeyHandler.prototype.destroy = function() { - this.handler.destroy(); - this.handler = null -}; - -function mxDefaultPopupMenu(a) { - this.config = a -} -mxDefaultPopupMenu.prototype.imageBasePath = null; -mxDefaultPopupMenu.prototype.config = null; -mxDefaultPopupMenu.prototype.createMenu = function(a, b, c, d) { - if (null != this.config) { - var e = this.createConditions(a, c, d); - this.addItems(a, b, c, d, e, this.config.firstChild, null) - } -}; -mxDefaultPopupMenu.prototype.addItems = function(a, b, c, d, e, f, g) { - for (var h = !1; null != f;) { - if ("add" == f.nodeName) { - var k = f.getAttribute("if"); - if (null == k || e[k]) { - var k = f.getAttribute("as"), - k = mxResources.get(k) || k, - l = mxUtils.eval(mxUtils.getTextContent(f)), - m = f.getAttribute("action"), - n = f.getAttribute("icon"), - p = f.getAttribute("iconCls"); - h && (b.addSeparator(g), h = !1); - null != n && this.imageBasePath && (n = this.imageBasePath + n); - k = this.addAction(b, a, k, n, l, m, c, g, p); - this.addItems(a, b, c, d, e, f.firstChild, k) - } - } else "separator" == - f.nodeName && (h = !0); - f = f.nextSibling - } -}; -mxDefaultPopupMenu.prototype.addAction = function(a, b, c, d, e, f, g, h, k) { - return a.addItem(c, d, function(a) { - "function" == typeof e && e.call(b, b, g, a); - null != f && b.execute(f, g, a) - }, h, k) -}; -mxDefaultPopupMenu.prototype.createConditions = function(a, b, c) { - var d = a.graph.getModel(), - e = d.getChildCount(b), - f = []; - f.nocell = null == b; - f.ncells = 1 < a.graph.getSelectionCount(); - f.notRoot = d.getRoot() != d.getParent(a.graph.getDefaultParent()); - f.cell = null != b; - d = null != b && 1 == a.graph.getSelectionCount(); - f.nonEmpty = d && 0 < e; - f.expandable = d && a.graph.isCellFoldable(b, !1); - f.collapsable = d && a.graph.isCellFoldable(b, !0); - f.validRoot = d && a.graph.isValidRoot(b); - f.emptyValidRoot = f.validRoot && 0 == e; - f.swimlane = d && a.graph.isSwimlane(b); - e = this.config.getElementsByTagName("condition"); - for (d = 0; d < e.length; d++) { - var g = mxUtils.eval(mxUtils.getTextContent(e[d])), - h = e[d].getAttribute("name"); - null != h && "function" == typeof g && (f[h] = g(a, b, c)) - } - return f -}; - -function mxDefaultToolbar(a, b) { - this.editor = b; - null != a && null != b && this.init(a) -} -mxDefaultToolbar.prototype.editor = null; -mxDefaultToolbar.prototype.toolbar = null; -mxDefaultToolbar.prototype.resetHandler = null; -mxDefaultToolbar.prototype.spacing = 4; -mxDefaultToolbar.prototype.connectOnDrop = !1; -mxDefaultToolbar.prototype.init = function(a) { - null != a && (this.toolbar = new mxToolbar(a), this.toolbar.addListener(mxEvent.SELECT, mxUtils.bind(this, function(a, c) { - var d = c.getProperty("function"); - this.editor.insertFunction = null != d ? mxUtils.bind(this, function() { - d.apply(this, arguments); - this.toolbar.resetMode() - }) : null - })), this.resetHandler = mxUtils.bind(this, function() { - null != this.toolbar && this.toolbar.resetMode(!0) - }), this.editor.graph.addListener(mxEvent.DOUBLE_CLICK, this.resetHandler), this.editor.addListener(mxEvent.ESCAPE, - this.resetHandler)) -}; -mxDefaultToolbar.prototype.addItem = function(a, b, c, d) { - var e = mxUtils.bind(this, function() { - null != c && 0 < c.length && this.editor.execute(c) - }); - return this.toolbar.addItem(a, b, e, d) -}; -mxDefaultToolbar.prototype.addSeparator = function(a) { - a = a || mxClient.imageBasePath + "/separator.gif"; - this.toolbar.addSeparator(a) -}; -mxDefaultToolbar.prototype.addCombo = function() { - return this.toolbar.addCombo() -}; -mxDefaultToolbar.prototype.addActionCombo = function(a) { - return this.toolbar.addActionCombo(a) -}; -mxDefaultToolbar.prototype.addActionOption = function(a, b, c) { - var d = mxUtils.bind(this, function() { - this.editor.execute(c) - }); - this.addOption(a, b, d) -}; -mxDefaultToolbar.prototype.addOption = function(a, b, c) { - return this.toolbar.addOption(a, b, c) -}; -mxDefaultToolbar.prototype.addMode = function(a, b, c, d, e) { - var f = mxUtils.bind(this, function() { - this.editor.setMode(c); - null != e && e(this.editor) - }); - return this.toolbar.addSwitchMode(a, b, f, d) -}; -mxDefaultToolbar.prototype.addPrototype = function(a, b, c, d, e, f) { - var g = function() { - return "function" == typeof c ? c() : null != c ? c.clone() : null - }, - h = mxUtils.bind(this, function(a, b) { - "function" == typeof e ? e(this.editor, g(), a, b) : this.drop(g(), a, b); - this.toolbar.resetMode(); - mxEvent.consume(a) - }); - a = this.toolbar.addMode(a, b, h, d, null, f); - this.installDropHandler(a, function(a, b, c) { - h(b, c) - }); - return a -}; -mxDefaultToolbar.prototype.drop = function(a, b, c) { - var d = this.editor.graph, - e = d.getModel(); - if (null == c || e.isEdge(c) || !this.connectOnDrop || !d.isCellConnectable(c)) { - for (; null != c && !d.isValidDropTarget(c, [a], b);) c = e.getParent(c); - this.insert(a, b, c) - } else this.connect(a, b, c) -}; -mxDefaultToolbar.prototype.insert = function(a, b, c) { - var d = this.editor.graph; - if (d.canImportCell(a)) { - var e = mxEvent.getClientX(b), - f = mxEvent.getClientY(b), - e = mxUtils.convertPoint(d.container, e, f); - return d.isSplitEnabled() && d.isSplitTarget(c, [a], b) ? d.splitEdge(c, [a], null, e.x, e.y) : this.editor.addVertex(c, a, e.x, e.y) - } - return null -}; -mxDefaultToolbar.prototype.connect = function(a, b, c) { - b = this.editor.graph; - var d = b.getModel(); - if (null != c && b.isCellConnectable(a) && b.isEdgeValid(null, c, a)) { - var e = null; - d.beginUpdate(); - try { - var f = d.getGeometry(c), - g = d.getGeometry(a).clone(); - g.x = f.x + (f.width - g.width) / 2; - g.y = f.y + (f.height - g.height) / 2; - var h = this.spacing * b.gridSize, - k = 20 * d.getDirectedEdgeCount(c, !0); - this.editor.horizontalFlow ? g.x += (g.width + f.width) / 2 + h + k : g.y += (g.height + f.height) / 2 + h + k; - a.setGeometry(g); - var l = d.getParent(c); - b.addCell(a, l); - b.constrainChild(a); - e = this.editor.createEdge(c, a); - if (null == d.getGeometry(e)) { - var m = new mxGeometry; - m.relative = !0; - d.setGeometry(e, m) - } - b.addEdge(e, l, c, a) - } finally { - d.endUpdate() - } - b.setSelectionCells([a, e]); - b.scrollCellToVisible(a) - } -}; -mxDefaultToolbar.prototype.installDropHandler = function(a, b) { - var c = document.createElement("img"); - c.setAttribute("src", a.getAttribute("src")); - var d = mxUtils.bind(this, function(e) { - c.style.width = 2 * a.offsetWidth + "px"; - c.style.height = 2 * a.offsetHeight + "px"; - mxUtils.makeDraggable(a, this.editor.graph, b, c); - mxEvent.removeListener(c, "load", d) - }); - mxClient.IS_IE ? d() : mxEvent.addListener(c, "load", d) -}; -mxDefaultToolbar.prototype.destroy = function() { - null != this.resetHandler && (this.editor.graph.removeListener("dblclick", this.resetHandler), this.editor.removeListener("escape", this.resetHandler), this.resetHandler = null); - null != this.toolbar && (this.toolbar.destroy(), this.toolbar = null) -}; - -function mxEditor(a) { - this.actions = []; - this.addActions(); - if (null != document.body) { - this.cycleAttributeValues = []; - this.popupHandler = new mxDefaultPopupMenu; - this.undoManager = new mxUndoManager; - this.graph = this.createGraph(); - this.toolbar = this.createToolbar(); - this.keyHandler = new mxDefaultKeyHandler(this); - this.configure(a); - this.graph.swimlaneIndicatorColorAttribute = this.cycleAttributeName; - !mxClient.IS_LOCAL && null != this.urlInit && (this.session = this.createSession()); - if (null != this.onInit) this.onInit(); - mxClient.IS_IE && - mxEvent.addListener(window, "unload", mxUtils.bind(this, function() { - this.destroy() - })) - } -} -mxLoadResources && mxResources.add(mxClient.basePath + "/resources/editor"); -mxEditor.prototype = new mxEventSource; -mxEditor.prototype.constructor = mxEditor; -mxEditor.prototype.askZoomResource = "none" != mxClient.language ? "askZoom" : ""; -mxEditor.prototype.lastSavedResource = "none" != mxClient.language ? "lastSaved" : ""; -mxEditor.prototype.currentFileResource = "none" != mxClient.language ? "currentFile" : ""; -mxEditor.prototype.propertiesResource = "none" != mxClient.language ? "properties" : ""; -mxEditor.prototype.tasksResource = "none" != mxClient.language ? "tasks" : ""; -mxEditor.prototype.helpResource = "none" != mxClient.language ? "help" : ""; -mxEditor.prototype.outlineResource = "none" != mxClient.language ? "outline" : ""; -mxEditor.prototype.outline = null; -mxEditor.prototype.graph = null; -mxEditor.prototype.graphRenderHint = null; -mxEditor.prototype.toolbar = null; -mxEditor.prototype.session = null; -mxEditor.prototype.status = null; -mxEditor.prototype.popupHandler = null; -mxEditor.prototype.undoManager = null; -mxEditor.prototype.keyHandler = null; -mxEditor.prototype.actions = null; -mxEditor.prototype.dblClickAction = "edit"; -mxEditor.prototype.swimlaneRequired = !1; -mxEditor.prototype.disableContextMenu = !0; -mxEditor.prototype.insertFunction = null; -mxEditor.prototype.forcedInserting = !1; -mxEditor.prototype.templates = null; -mxEditor.prototype.defaultEdge = null; -mxEditor.prototype.defaultEdgeStyle = null; -mxEditor.prototype.defaultGroup = null; -mxEditor.prototype.groupBorderSize = null; -mxEditor.prototype.filename = null; -mxEditor.prototype.linefeed = "\x26#xa;"; -mxEditor.prototype.postParameterName = "xml"; -mxEditor.prototype.escapePostData = !0; -mxEditor.prototype.urlPost = null; -mxEditor.prototype.urlImage = null; -mxEditor.prototype.urlInit = null; -mxEditor.prototype.urlNotify = null; -mxEditor.prototype.urlPoll = null; -mxEditor.prototype.horizontalFlow = !1; -mxEditor.prototype.layoutDiagram = !1; -mxEditor.prototype.swimlaneSpacing = 0; -mxEditor.prototype.maintainSwimlanes = !1; -mxEditor.prototype.layoutSwimlanes = !1; -mxEditor.prototype.cycleAttributeValues = null; -mxEditor.prototype.cycleAttributeIndex = 0; -mxEditor.prototype.cycleAttributeName = "fillColor"; -mxEditor.prototype.tasks = null; -mxEditor.prototype.tasksWindowImage = null; -mxEditor.prototype.tasksTop = 20; -mxEditor.prototype.help = null; -mxEditor.prototype.helpWindowImage = null; -mxEditor.prototype.urlHelp = null; -mxEditor.prototype.helpWidth = 300; -mxEditor.prototype.helpHeight = 260; -mxEditor.prototype.propertiesWidth = 240; -mxEditor.prototype.propertiesHeight = null; -mxEditor.prototype.movePropertiesDialog = !1; -mxEditor.prototype.validating = !1; -mxEditor.prototype.modified = !1; -mxEditor.prototype.isModified = function() { - return this.modified -}; -mxEditor.prototype.setModified = function(a) { - this.modified = a -}; -mxEditor.prototype.addActions = function() { - this.addAction("save", function(a) { - a.save() - }); - this.addAction("print", function(a) { - (new mxPrintPreview(a.graph, 1)).open() - }); - this.addAction("show", function(a) { - mxUtils.show(a.graph, null, 10, 10) - }); - this.addAction("exportImage", function(a) { - var b = a.getUrlImage(); - if (null == b || mxClient.IS_LOCAL) a.execute("show"); - else { - var c = mxUtils.getViewXml(a.graph, 1), - c = mxUtils.getXml(c, "\n"); - mxUtils.submit(b, a.postParameterName + "\x3d" + encodeURIComponent(c), document, "_blank") - } - }); - this.addAction("refresh", - function(a) { - a.graph.refresh() - }); - this.addAction("cut", function(a) { - a.graph.isEnabled() && mxClipboard.cut(a.graph) - }); - this.addAction("copy", function(a) { - a.graph.isEnabled() && mxClipboard.copy(a.graph) - }); - this.addAction("paste", function(a) { - a.graph.isEnabled() && mxClipboard.paste(a.graph) - }); - this.addAction("delete", function(a) { - a.graph.isEnabled() && a.graph.removeCells() - }); - this.addAction("group", function(a) { - a.graph.isEnabled() && a.graph.setSelectionCell(a.groupCells()) - }); - this.addAction("ungroup", function(a) { - a.graph.isEnabled() && - a.graph.setSelectionCells(a.graph.ungroupCells()) - }); - this.addAction("removeFromParent", function(a) { - a.graph.isEnabled() && a.graph.removeCellsFromParent() - }); - this.addAction("undo", function(a) { - a.graph.isEnabled() && a.undo() - }); - this.addAction("redo", function(a) { - a.graph.isEnabled() && a.redo() - }); - this.addAction("zoomIn", function(a) { - a.graph.zoomIn() - }); - this.addAction("zoomOut", function(a) { - a.graph.zoomOut() - }); - this.addAction("actualSize", function(a) { - a.graph.zoomActual() - }); - this.addAction("fit", function(a) { - a.graph.fit() - }); - this.addAction("showProperties", function(a, b) { - a.showProperties(b) - }); - this.addAction("selectAll", function(a) { - a.graph.isEnabled() && a.graph.selectAll() - }); - this.addAction("selectNone", function(a) { - a.graph.isEnabled() && a.graph.clearSelection() - }); - this.addAction("selectVertices", function(a) { - a.graph.isEnabled() && a.graph.selectVertices() - }); - this.addAction("selectEdges", function(a) { - a.graph.isEnabled() && a.graph.selectEdges() - }); - this.addAction("edit", function(a, b) { - a.graph.isEnabled() && a.graph.isCellEditable(b) && a.graph.startEditingAtCell(b) - }); - this.addAction("toBack", function(a, b) { - a.graph.isEnabled() && a.graph.orderCells(!0) - }); - this.addAction("toFront", function(a, b) { - a.graph.isEnabled() && a.graph.orderCells(!1) - }); - this.addAction("enterGroup", function(a, b) { - a.graph.enterGroup(b) - }); - this.addAction("exitGroup", function(a) { - a.graph.exitGroup() - }); - this.addAction("home", function(a) { - a.graph.home() - }); - this.addAction("selectPrevious", function(a) { - a.graph.isEnabled() && a.graph.selectPreviousCell() - }); - this.addAction("selectNext", function(a) { - a.graph.isEnabled() && - a.graph.selectNextCell() - }); - this.addAction("selectParent", function(a) { - a.graph.isEnabled() && a.graph.selectParentCell() - }); - this.addAction("selectChild", function(a) { - a.graph.isEnabled() && a.graph.selectChildCell() - }); - this.addAction("collapse", function(a) { - a.graph.isEnabled() && a.graph.foldCells(!0) - }); - this.addAction("collapseAll", function(a) { - if (a.graph.isEnabled()) { - var b = a.graph.getChildVertices(); - a.graph.foldCells(!0, !1, b) - } - }); - this.addAction("expand", function(a) { - a.graph.isEnabled() && a.graph.foldCells(!1) - }); - this.addAction("expandAll", function(a) { - if (a.graph.isEnabled()) { - var b = a.graph.getChildVertices(); - a.graph.foldCells(!1, !1, b) - } - }); - this.addAction("bold", function(a) { - a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, mxConstants.FONT_BOLD) - }); - this.addAction("italic", function(a) { - a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, mxConstants.FONT_ITALIC) - }); - this.addAction("underline", function(a) { - a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, - mxConstants.FONT_UNDERLINE) - }); - this.addAction("shadow", function(a) { - a.graph.isEnabled() && a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, mxConstants.FONT_SHADOW) - }); - this.addAction("alignCellsLeft", function(a) { - a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_LEFT) - }); - this.addAction("alignCellsCenter", function(a) { - a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_CENTER) - }); - this.addAction("alignCellsRight", function(a) { - a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_RIGHT) - }); - this.addAction("alignCellsTop", function(a) { - a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_TOP) - }); - this.addAction("alignCellsMiddle", function(a) { - a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_MIDDLE) - }); - this.addAction("alignCellsBottom", function(a) { - a.graph.isEnabled() && a.graph.alignCells(mxConstants.ALIGN_BOTTOM) - }); - this.addAction("alignFontLeft", function(a) { - a.graph.setCellStyles(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_LEFT) - }); - this.addAction("alignFontCenter", function(a) { - a.graph.isEnabled() && - a.graph.setCellStyles(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_CENTER) - }); - this.addAction("alignFontRight", function(a) { - a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_ALIGN, mxConstants.ALIGN_RIGHT) - }); - this.addAction("alignFontTop", function(a) { - a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_TOP) - }); - this.addAction("alignFontMiddle", function(a) { - a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_MIDDLE) - }); - this.addAction("alignFontBottom", function(a) { - a.graph.isEnabled() && a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN, mxConstants.ALIGN_BOTTOM) - }); - this.addAction("zoom", function(a) { - var b = 100 * a.graph.getView().scale, - b = parseFloat(mxUtils.prompt(mxResources.get(a.askZoomResource) || a.askZoomResource, b)) / 100; - isNaN(b) || a.graph.getView().setScale(b) - }); - this.addAction("toggleTasks", function(a) { - null != a.tasks ? a.tasks.setVisible(!a.tasks.isVisible()) : a.showTasks() - }); - this.addAction("toggleHelp", function(a) { - null != - a.help ? a.help.setVisible(!a.help.isVisible()) : a.showHelp() - }); - this.addAction("toggleOutline", function(a) { - null == a.outline ? a.showOutline() : a.outline.setVisible(!a.outline.isVisible()) - }); - this.addAction("toggleConsole", function(a) { - mxLog.setVisible(!mxLog.isVisible()) - }) -}; -mxEditor.prototype.createSession = function() { - var a = mxUtils.bind(this, function(a) { - this.fireEvent(new mxEventObject(mxEvent.SESSION, "session", a)) - }); - return this.connect(this.urlInit, this.urlPoll, this.urlNotify, a) -}; -mxEditor.prototype.configure = function(a) { - null != a && ((new mxCodec(a.ownerDocument)).decode(a, this), this.resetHistory()) -}; -mxEditor.prototype.resetFirstTime = function() { - document.cookie = "mxgraph\x3dseen; expires\x3dFri, 27 Jul 2001 02:47:11 UTC; path\x3d/" -}; -mxEditor.prototype.resetHistory = function() { - this.lastSnapshot = (new Date).getTime(); - this.undoManager.clear(); - this.ignoredChanges = 0; - this.setModified(!1) -}; -mxEditor.prototype.addAction = function(a, b) { - this.actions[a] = b -}; -mxEditor.prototype.execute = function(a, b, c) { - var d = this.actions[a]; - if (null != d) try { - var e = arguments; - e[0] = this; - d.apply(this, e) - } catch (f) { - throw mxUtils.error("Cannot execute " + a + ": " + f.message, 280, !0), f; - } else mxUtils.error("Cannot find action " + a, 280, !0) -}; -mxEditor.prototype.addTemplate = function(a, b) { - this.templates[a] = b -}; -mxEditor.prototype.getTemplate = function(a) { - return this.templates[a] -}; -mxEditor.prototype.createGraph = function() { - var a = new mxGraph(null, null, this.graphRenderHint); - a.setTooltips(!0); - a.setPanning(!0); - this.installDblClickHandler(a); - this.installUndoHandler(a); - this.installDrillHandler(a); - this.installChangeHandler(a); - this.installInsertHandler(a); - a.panningHandler.factoryMethod = mxUtils.bind(this, function(a, c, d) { - return this.createPopupMenu(a, c, d) - }); - a.connectionHandler.factoryMethod = mxUtils.bind(this, function(a, c) { - return this.createEdge(a, c) - }); - this.createSwimlaneManager(a); - this.createLayoutManager(a); - return a -}; -mxEditor.prototype.createSwimlaneManager = function(a) { - a = new mxSwimlaneManager(a, !1); - a.isHorizontal = mxUtils.bind(this, function() { - return this.horizontalFlow - }); - a.isEnabled = mxUtils.bind(this, function() { - return this.maintainSwimlanes - }); - return a -}; -mxEditor.prototype.createLayoutManager = function(a) { - var b = new mxLayoutManager(a), - c = this; - b.getLayout = function(b) { - var e = null, - f = c.graph.getModel(); - if (null != f.getParent(b)) - if (c.layoutSwimlanes && a.isSwimlane(b)) null == c.swimlaneLayout && (c.swimlaneLayout = c.createSwimlaneLayout()), e = c.swimlaneLayout; - else if (c.layoutDiagram && (a.isValidRoot(b) || null == f.getParent(f.getParent(b)))) null == c.diagramLayout && (c.diagramLayout = c.createDiagramLayout()), e = c.diagramLayout; - return e - }; - return b -}; -mxEditor.prototype.setGraphContainer = function(a) { - null == this.graph.container && (this.graph.init(a), this.rubberband = new mxRubberband(this.graph), this.disableContextMenu && mxEvent.disableContextMenu(a), mxClient.IS_QUIRKS && new mxDivResizer( - a)) -}; -mxEditor.prototype.installDblClickHandler = function(a) { - a.addListener(mxEvent.DOUBLE_CLICK, mxUtils.bind(this, function(b, c) { - var d = c.getProperty("cell"); - null != d && (a.isEnabled() && null != this.dblClickAction) && (this.execute(this.dblClickAction, d), c.consume()) - })) -}; -mxEditor.prototype.installUndoHandler = function(a) { - var b = mxUtils.bind(this, function(a, b) { - var e = b.getProperty("edit"); - this.undoManager.undoableEditHappened(e) - }); - a.getModel().addListener(mxEvent.UNDO, b); - a.getView().addListener(mxEvent.UNDO, b); - b = function(b, d) { - var e = d.getProperty("edit").changes; - a.setSelectionCells(a.getSelectionCellsForChanges(e)) - }; - this.undoManager.addListener(mxEvent.UNDO, b); - this.undoManager.addListener(mxEvent.REDO, b) -}; -mxEditor.prototype.installDrillHandler = function(a) { - var b = mxUtils.bind(this, function(a) { - this.fireEvent(new mxEventObject(mxEvent.ROOT)) - }); - a.getView().addListener(mxEvent.DOWN, b); - a.getView().addListener(mxEvent.UP, b) -}; -mxEditor.prototype.installChangeHandler = function(a) { - var b = mxUtils.bind(this, function(b, d) { - this.setModified(!0); - !0 == this.validating && a.validateGraph(); - for (var e = d.getProperty("edit").changes, f = 0; f < e.length; f++) { - var g = e[f]; - if (g instanceof mxRootChange || g instanceof mxValueChange && g.cell == this.graph.model.root || g instanceof mxCellAttributeChange && g.cell == this.graph.model.root) { - this.fireEvent(new mxEventObject(mxEvent.ROOT)); - break - } - } - }); - a.getModel().addListener(mxEvent.CHANGE, b) -}; -mxEditor.prototype.installInsertHandler = function(a) { - var b = this; - a.addMouseListener({ - mouseDown: function(a, d) { - if (null != b.insertFunction && !d.isPopupTrigger() && (b.forcedInserting || null == d.getState())) b.graph.clearSelection(), b.insertFunction(d.getEvent(), d.getCell()), this.isActive = ! - 0, d.consume() - }, - mouseMove: function(a, b) { - this.isActive && b.consume() - }, - mouseUp: function(a, b) { - this.isActive && (this.isActive = !1, b.consume()) - } - }) -}; -mxEditor.prototype.createDiagramLayout = function() { - var a = this.graph.gridSize, - b = new mxStackLayout(this.graph, !this.horizontalFlow, this.swimlaneSpacing, 2 * a, 2 * a); - b.isVertexIgnored = function(a) { - return !b.graph.isSwimlane(a) - }; - return b -}; -mxEditor.prototype.createSwimlaneLayout = function() { - return new mxCompactTreeLayout(this.graph, this.horizontalFlow) -}; -mxEditor.prototype.createToolbar = function() { - return new mxDefaultToolbar(null, this) -}; -mxEditor.prototype.setToolbarContainer = function(a) { - this.toolbar.init(a); - mxClient.IS_QUIRKS && new mxDivResizer(a) -}; -mxEditor.prototype.setStatusContainer = function(a) { - null == this.status && (this.status = a, this.addListener(mxEvent.SAVE, mxUtils.bind(this, function() { - var a = (new Date).toLocaleString(); - this.setStatus((mxResources.get(this.lastSavedResource) || this.lastSavedResource) + ": " + a) - })), this.addListener(mxEvent.OPEN, mxUtils.bind(this, function() { - this.setStatus((mxResources.get(this.currentFileResource) || this.currentFileResource) + ": " + this.filename) - })), mxClient.IS_QUIRKS && new mxDivResizer(a)) -}; -mxEditor.prototype.setStatus = function(a) { - null != this.status && null != a && (this.status.innerHTML = a) -}; -mxEditor.prototype.setTitleContainer = function(a) { - this.addListener(mxEvent.ROOT, mxUtils.bind(this, function(b) { - a.innerHTML = this.getTitle() - })); - mxClient.IS_QUIRKS && new mxDivResizer(a) -}; -mxEditor.prototype.treeLayout = function(a, b) { - null != a && (new mxCompactTreeLayout(this.graph, b)).execute(a) -}; -mxEditor.prototype.getTitle = function() { - for (var a = "", b = this.graph, c = b.getCurrentRoot(); null != c && null != b.getModel().getParent(b.getModel().getParent(c));) b.isValidRoot(c) && (a = " \x3e " + b.convertValueToString(c) + a), - c = b.getModel().getParent(c); - return this.getRootTitle() + a -}; -mxEditor.prototype.getRootTitle = function() { - var a = this.graph.getModel().getRoot(); - return this.graph.convertValueToString(a) -}; -mxEditor.prototype.undo = function() { - this.undoManager.undo() -}; -mxEditor.prototype.redo = function() { - this.undoManager.redo() -}; -mxEditor.prototype.groupCells = function() { - var a = null != this.groupBorderSize ? this.groupBorderSize : this.graph.gridSize; - return this.graph.groupCells(this.createGroup(), a) -}; -mxEditor.prototype.createGroup = function() { - return this.graph.getModel().cloneCell(this.defaultGroup) -}; -mxEditor.prototype.open = function(a) { - if (null != a) { - var b = mxUtils.load(a).getXml(); - this.readGraphModel(b.documentElement); - this.filename = a; - this.fireEvent(new mxEventObject(mxEvent.OPEN, "filename", a)) - } -}; -mxEditor.prototype.readGraphModel = function(a) { - (new mxCodec(a.ownerDocument)).decode(a, this.graph.getModel()); - this.resetHistory() -}; -mxEditor.prototype.save = function(a, b) { - a = a || this.getUrlPost(); - if (null != a && 0 < a.length) { - var c = this.writeGraphModel(b); - this.postDiagram(a, c); - this.setModified(!1) - } - this.fireEvent(new mxEventObject(mxEvent.SAVE, "url", a)) -}; -mxEditor.prototype.postDiagram = function(a, b) { - this.escapePostData && (b = encodeURIComponent(b)); - mxUtils.post(a, this.postParameterName + "\x3d" + b, mxUtils.bind(this, function(c) { - this.fireEvent(new mxEventObject(mxEvent.POST, "request", c, "url", a, "data", b)) - })) -}; -mxEditor.prototype.writeGraphModel = function(a) { - a = null != a ? a : this.linefeed; - var b = (new mxCodec).encode(this.graph.getModel()); - return mxUtils.getXml(b, a) -}; -mxEditor.prototype.getUrlPost = function() { - return this.urlPost -}; -mxEditor.prototype.getUrlImage = function() { - return this.urlImage -}; -mxEditor.prototype.connect = function(a, b, c, d) { - var e = null; - mxClient.IS_LOCAL || (e = new mxSession(this.graph.getModel(), a, b, c), e.addListener(mxEvent.RECEIVE, mxUtils.bind(this, function(a, b) { - null != b.getProperty("node").getAttribute("namespace") && this.resetHistory() - })), e.addListener(mxEvent.DISCONNECT, d), e.addListener(mxEvent.CONNECT, d), e.addListener(mxEvent.NOTIFY, d), e.addListener(mxEvent.GET, d), e.start()); - return e -}; -mxEditor.prototype.swapStyles = function(a, b) { - var c = this.graph.getStylesheet().styles[b]; - this.graph.getView().getStylesheet().putCellStyle(b, this.graph.getStylesheet().styles[a]); - this.graph.getStylesheet().putCellStyle(a, c); - this.graph.refresh() -}; -mxEditor.prototype.showProperties = function(a) { - a = a || this.graph.getSelectionCell(); - null == a && (a = this.graph.getCurrentRoot(), null == a && (a = this.graph.getModel().getRoot())); - if (null != a) { - this.graph.stopEditing(!0); - var b = mxUtils.getOffset(this.graph.container), - c = b.x + 10, - b = b.y; - if (null != this.properties && !this.movePropertiesDialog) c = this.properties.getX(), b = this.properties.getY(); - else { - var d = this.graph.getCellBounds(a); - null != d && (c += d.x + Math.min(200, d.width), b += d.y) - } - this.hideProperties(); - a = this.createProperties(a); - null != a && (this.properties = new mxWindow(mxResources.get(this.propertiesResource) || this.propertiesResource, a, c, b, this.propertiesWidth, this.propertiesHeight, !1), this.properties.setVisible(! - 0)) - } -}; -mxEditor.prototype.isPropertiesVisible = function() { - return null != this.properties -}; -mxEditor.prototype.createProperties = function(a) { - var b = this.graph.getModel(), - c = b.getValue(a); - if (mxUtils.isNode(c)) { - var d = new mxForm("properties"); - d.addText("ID", a.getId()).setAttribute("readonly", "true"); - var e = null, - f = null, - g = null, - h = null, - k = null; - b.isVertex(a) && (e = b.getGeometry(a), null != e && (f = d.addText("top", e.y), g = d.addText("left", e.x), h = d.addText("width", e.width), k = d.addText("height", e.height))); - for (var l = b.getStyle(a), m = d.addText("Style", l || ""), n = c.attributes, p = [], c = 0; c < n.length; c++) p[c] = d.addTextarea(n[c].nodeName, - n[c].nodeValue, "label" == n[c].nodeName ? 4 : 2); - c = mxUtils.bind(this, function() { - this.hideProperties(); - b.beginUpdate(); - try { - null != e && (e = e.clone(), e.x = parseFloat(g.value), e.y = parseFloat(f.value), e.width = parseFloat(h.value), e.height = parseFloat(k.value), b.setGeometry(a, e)); - 0 < m.value.length ? b.setStyle(a, m.value) : b.setStyle(a, null); - for (var c = 0; c < n.length; c++) { - var d = new mxCellAttributeChange(a, n[c].nodeName, p[c].value); - b.execute(d) - } - this.graph.isAutoSizeCell(a) && this.graph.updateCellSize(a) - } finally { - b.endUpdate() - } - }); - l = mxUtils.bind(this, function() { - this.hideProperties() - }); - d.addButtons(c, l); - return d.table - } - return null -}; -mxEditor.prototype.hideProperties = function() { - null != this.properties && (this.properties.destroy(), this.properties = null) -}; -mxEditor.prototype.showTasks = function() { - if (null == this.tasks) { - var a = document.createElement("div"); - a.style.padding = "4px"; - a.style.paddingLeft = "20px"; - var b = document.body.clientWidth, - b = new mxWindow(mxResources.get(this.tasksResource) || this.tasksResource, a, b - 220, this.tasksTop, 200); - b.setClosable(!0); - b.destroyOnClose = !1; - var c = mxUtils.bind(this, function(b) { - mxEvent.release(a); - a.innerHTML = ""; - this.createTasks(a) - }); - this.graph.getModel().addListener(mxEvent.CHANGE, c); - this.graph.getSelectionModel().addListener(mxEvent.CHANGE, - c); - this.graph.addListener(mxEvent.ROOT, c); - null != this.tasksWindowImage && b.setImage(this.tasksWindowImage); - this.tasks = b; - this.createTasks(a) - } - this.tasks.setVisible(!0) -}; -mxEditor.prototype.refreshTasks = function(a) { - null != this.tasks && (a = this.tasks.content, mxEvent.release(a), a.innerHTML = "", this.createTasks(a)) -}; -mxEditor.prototype.createTasks = function(a) {}; -mxEditor.prototype.showHelp = function(a) { - if (null == this.help) { - var b = document.createElement("iframe"); - b.setAttribute("src", mxResources.get("urlHelp") || this.urlHelp); - b.setAttribute("height", "100%"); - b.setAttribute("width", "100%"); - b.setAttribute("frameBorder", "0"); - b.style.backgroundColor = "white"; - a = document.body.clientWidth; - var c = document.body.clientHeight || document.documentElement.clientHeight, - d = new mxWindow(mxResources.get(this.helpResource) || this.helpResource, b, (a - this.helpWidth) / 2, (c - this.helpHeight) / - 3, this.helpWidth, this.helpHeight); - d.setMaximizable(!0); - d.setClosable(!0); - d.destroyOnClose = !1; - d.setResizable(!0); - null != this.helpWindowImage && d.setImage(this.helpWindowImage); - mxClient.IS_NS && (a = function(a) { - b.setAttribute("height", d.div.offsetHeight - 26 + "px") - }, d.addListener(mxEvent.RESIZE_END, a), d.addListener(mxEvent.MAXIMIZE, a), d.addListener(mxEvent.NORMALIZE, a), d.addListener(mxEvent.SHOW, a)); - this.help = d - } - this.help.setVisible(!0) -}; -mxEditor.prototype.showOutline = function() { - if (null == this.outline) { - var a = document.createElement("div"); - a.style.overflow = "hidden"; - a.style.width = "100%"; - a.style.height = "100%"; - a.style.background = "white"; - a.style.cursor = "move"; - var b = new mxWindow(mxResources.get(this.outlineResource) || this.outlineResource, a, 600, 480, 200, 200, !1), - c = new mxOutline(this.graph, a); - b.setClosable(!0); - b.setResizable(!0); - b.destroyOnClose = !1; - b.addListener(mxEvent.RESIZE_END, function() { - c.update() - }); - this.outline = b; - this.outline.outline = c - } - this.outline.setVisible(!0); - this.outline.outline.update(!0) -}; -mxEditor.prototype.setMode = function(a) { - "select" == a ? (this.graph.panningHandler.useLeftButtonForPanning = !1, this.graph.setConnectable(!1)) : "connect" == a ? (this.graph.panningHandler.useLeftButtonForPanning = !1, this.graph.setConnectable(! - 0)) : "pan" == a && (this.graph.panningHandler.useLeftButtonForPanning = !0, this.graph.setConnectable(!1)) -}; -mxEditor.prototype.createPopupMenu = function(a, b, c) { - this.popupHandler.createMenu(this, a, b, c) -}; -mxEditor.prototype.createEdge = function(a, b) { - var c = null; - if (null != this.defaultEdge) c = this.graph.getModel().cloneCell(this.defaultEdge); - else { - c = new mxCell(""); - c.setEdge(!0); - var d = new mxGeometry; - d.relative = !0; - c.setGeometry(d) - } - d = this.getEdgeStyle(); - null != d && c.setStyle(d); - return c -}; -mxEditor.prototype.getEdgeStyle = function() { - return this.defaultEdgeStyle -}; -mxEditor.prototype.consumeCycleAttribute = function(a) { - return null != this.cycleAttributeValues && 0 < this.cycleAttributeValues.length && this.graph.isSwimlane(a) ? this.cycleAttributeValues[this.cycleAttributeIndex++ % this.cycleAttributeValues.length] : - null -}; -mxEditor.prototype.cycleAttribute = function(a) { - if (null != this.cycleAttributeName) { - var b = this.consumeCycleAttribute(a); - null != b && a.setStyle(a.getStyle() + ";" + this.cycleAttributeName + "\x3d" + b) - } -}; -mxEditor.prototype.addVertex = function(a, b, c, d) { - for (var e = this.graph.getModel(); null != a && !this.graph.isValidDropTarget(a);) a = e.getParent(a); - a = null != a ? a : this.graph.getSwimlaneAt(c, d); - var f = this.graph.getView().scale, - g = e.getGeometry(b), - h = e.getGeometry(a); - if (this.graph.isSwimlane(b) && !this.graph.swimlaneNesting) a = null; - else { - if (null == a && this.swimlaneRequired) return null; - if (null != a && null != h) { - var k = this.graph.getView().getState(a); - if (null != k) { - if (c -= k.origin.x * f, d -= k.origin.y * f, this.graph.isConstrainedMoving) { - var h = - g.width, - l = g.height, - m = k.x + k.width; - c + h > m && (c -= c + h - m); - m = k.y + k.height; - d + l > m && (d -= d + l - m) - } - } else null != h && (c -= h.x * f, d -= h.y * f) - } - } - g = g.clone(); - g.x = this.graph.snap(c / f - this.graph.getView().translate.x - this.graph.gridSize / 2); - g.y = this.graph.snap(d / f - this.graph.getView().translate.y - this.graph.gridSize / 2); - b.setGeometry(g); - null == a && (a = this.graph.getDefaultParent()); - this.cycleAttribute(b); - this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX, "vertex", b, "parent", a)); - e.beginUpdate(); - try { - b = this.graph.addCell(b, - a), null != b && (this.graph.constrainChild(b), this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX, "vertex", b))) - } finally { - e.endUpdate() - } - null != b && (this.graph.setSelectionCell(b), this.graph.scrollCellToVisible(b), this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX, "vertex", b))); - return b -}; -mxEditor.prototype.destroy = function() { - this.destroyed || (this.destroyed = !0, null != this.tasks && this.tasks.destroy(), null != this.outline && this.outline.destroy(), null != this.properties && this.properties.destroy(), null != - this.keyHandler && this.keyHandler.destroy(), null != this.rubberband && this.rubberband.destroy(), null != this.toolbar && this.toolbar.destroy(), null != this.graph && this.graph.destroy(), - this.templates = this.status = null) -}; -var mxCodecRegistry = { - codecs: [], - aliases: [], - register: function(a) { - if (null != a) { - var b = a.getName(); - mxCodecRegistry.codecs[b] = a; - var c = mxUtils.getFunctionName(a.template.constructor); - c != b && mxCodecRegistry.addAlias(c, b) - } - return a - }, - addAlias: function(a, b) { - mxCodecRegistry.aliases[a] = b - }, - getCodec: function(a) { - var b = null; - if (null != a) { - var b = mxUtils.getFunctionName(a), - c = mxCodecRegistry.aliases[b]; - null != c && (b = c); - b = mxCodecRegistry.codecs[b]; - if (null == b) try { - b = new mxObjectCodec(new a), mxCodecRegistry.register(b) - } catch (d) {} - } - return b - } -}; - -function mxCodec(a) { - this.document = a || mxUtils.createXmlDocument(); - this.objects = [] -} -mxCodec.prototype.document = null; -mxCodec.prototype.objects = null; -mxCodec.prototype.encodeDefaults = !1; -mxCodec.prototype.putObject = function(a, b) { - return this.objects[a] = b -}; -mxCodec.prototype.getObject = function(a) { - var b = null; - null != a && (b = this.objects[a], null == b && (b = this.lookup(a), null == b && (a = this.getElementById(a), null != a && (b = this.decode(a))))); - return b -}; -mxCodec.prototype.lookup = function(a) { - return null -}; -mxCodec.prototype.getElementById = function(a, b) { - return mxUtils.findNodeByAttribute(this.document.documentElement, null != b ? b : "id", a) -}; -mxCodec.prototype.getId = function(a) { - var b = null; - null != a && (b = this.reference(a), null == b && a instanceof mxCell && (b = a.getId(), null == b && (b = mxCellPath.create(a), 0 == b.length && (b = "root")))); - return b -}; -mxCodec.prototype.reference = function(a) { - return null -}; -mxCodec.prototype.encode = function(a) { - var b = null; - if (null != a && null != a.constructor) { - var c = mxCodecRegistry.getCodec(a.constructor); - null != c ? b = c.encode(this, a) : mxUtils.isNode(a) ? b = mxClient.IS_IE ? a.cloneNode(!0) : this.document.importNode(a, !0) : mxLog.warn("mxCodec.encode: No codec for " + mxUtils.getFunctionName( - a.constructor)) - } - return b -}; -mxCodec.prototype.decode = function(a, b) { - var c = null; - if (null != a && a.nodeType == mxConstants.NODETYPE_ELEMENT) { - var d = null; - try { - d = eval(a.nodeName) - } catch (e) {} - try { - var f = mxCodecRegistry.getCodec(d); - null != f ? c = f.decode(this, a, b) : (c = a.cloneNode(!0), c.removeAttribute("as")) - } catch (g) { - mxLog.debug("Cannot decode " + a.nodeName + ": " + g.message) - } - } - return c -}; -mxCodec.prototype.encodeCell = function(a, b, c) { - b.appendChild(this.encode(a)); - if (null == c || c) { - c = a.getChildCount(); - for (var d = 0; d < c; d++) this.encodeCell(a.getChildAt(d), b) - } -}; -mxCodec.prototype.isCellCodec = function(a) { - return null != a && "function" == typeof a.isCellCodec ? a.isCellCodec() : !1 -}; -mxCodec.prototype.decodeCell = function(a, b) { - b = null != b ? b : !0; - var c = null; - if (null != a && a.nodeType == mxConstants.NODETYPE_ELEMENT) { - c = mxCodecRegistry.getCodec(a.nodeName); - if (!this.isCellCodec(c)) - for (var d = a.firstChild; null != d && !this.isCellCodec(c);) c = mxCodecRegistry.getCodec(d.nodeName), d = d.nextSibling; - this.isCellCodec(c) || (c = mxCodecRegistry.getCodec(mxCell)); - c = c.decode(this, a); - b && this.insertIntoGraph(c) - } - return c -}; -mxCodec.prototype.insertIntoGraph = function(a) { - var b = a.parent, - c = a.getTerminal(!0), - d = a.getTerminal(!1); - a.setTerminal(null, !1); - a.setTerminal(null, !0); - a.parent = null; - null != b && b.insert(a); - null != c && c.insertEdge(a, !0); - null != d && d.insertEdge(a, !1) -}; -mxCodec.prototype.setAttribute = function(a, b, c) { - null != b && null != c && a.setAttribute(b, c) -}; - -function mxObjectCodec(a, b, c, d) { - this.template = a; - this.exclude = null != b ? b : []; - this.idrefs = null != c ? c : []; - this.mapping = null != d ? d : []; - this.reverse = {}; - for (var e in this.mapping) this.reverse[this.mapping[e]] = e -} -mxObjectCodec.prototype.template = null; -mxObjectCodec.prototype.exclude = null; -mxObjectCodec.prototype.idrefs = null; -mxObjectCodec.prototype.mapping = null; -mxObjectCodec.prototype.reverse = null; -mxObjectCodec.prototype.getName = function() { - return mxUtils.getFunctionName(this.template.constructor) -}; -mxObjectCodec.prototype.cloneTemplate = function() { - return new this.template.constructor -}; -mxObjectCodec.prototype.getFieldName = function(a) { - if (null != a) { - var b = this.reverse[a]; - null != b && (a = b) - } - return a -}; -mxObjectCodec.prototype.getAttributeName = function(a) { - if (null != a) { - var b = this.mapping[a]; - null != b && (a = b) - } - return a -}; -mxObjectCodec.prototype.isExcluded = function(a, b, c, d) { - return b == mxObjectIdentity.FIELD_NAME || 0 <= mxUtils.indexOf(this.exclude, b) -}; -mxObjectCodec.prototype.isReference = function(a, b, c, d) { - return 0 <= mxUtils.indexOf(this.idrefs, b) -}; -mxObjectCodec.prototype.encode = function(a, b) { - var c = a.document.createElement(this.getName()); - b = this.beforeEncode(a, b, c); - this.encodeObject(a, b, c); - return this.afterEncode(a, b, c) -}; -mxObjectCodec.prototype.encodeObject = function(a, b, c) { - a.setAttribute(c, "id", a.getId(b)); - for (var d in b) { - var e = d, - f = b[e]; - null != f && !this.isExcluded(b, e, f, !0) && (mxUtils.isNumeric(e) && (e = null), this.encodeValue(a, b, e, f, c)) - } -}; -mxObjectCodec.prototype.encodeValue = function(a, b, c, d, e) { - if (null != d) { - if (this.isReference(b, c, d, !0)) { - var f = a.getId(d); - if (null == f) { - mxLog.warn("mxObjectCodec.encode: No ID for " + this.getName() + "." + c + "\x3d" + d); - return - } - d = f - } - f = this.template[c]; - if (null == c || a.encodeDefaults || f != d) c = this.getAttributeName(c), this.writeAttribute(a, b, c, d, e) - } -}; -mxObjectCodec.prototype.writeAttribute = function(a, b, c, d, e) { - "object" != typeof d ? this.writePrimitiveAttribute(a, b, c, d, e) : this.writeComplexAttribute(a, b, c, d, e) -}; -mxObjectCodec.prototype.writePrimitiveAttribute = function(a, b, c, d, e) { - d = this.convertValueToXml(d); - null == c ? (b = a.document.createElement("add"), "function" == typeof d ? b.appendChild(a.document.createTextNode(d)) : a.setAttribute(b, "value", d), e.appendChild(b)) : "function" != typeof d && - a.setAttribute(e, c, d) -}; -mxObjectCodec.prototype.writeComplexAttribute = function(a, b, c, d, e) { - a = a.encode(d); - null != a ? (null != c && a.setAttribute("as", c), e.appendChild(a)) : mxLog.warn("mxObjectCodec.encode: No node for " + this.getName() + "." + c + ": " + d) -}; -mxObjectCodec.prototype.convertValueToXml = function(a) { - if ("undefined" == typeof a.length && (!0 == a || !1 == a)) a = !0 == a ? "1" : "0"; - return a -}; -mxObjectCodec.prototype.convertValueFromXml = function(a) { - mxUtils.isNumeric(a) && (a = parseFloat(a)); - // - // Marco (marco.murdocca@xenialab.it) + Andrea Bianco (andrea.bianco@xcally.com) - // 2016-02-24 - // - // mxUtils.isNumeric(a) && (a = ((Number(a) === a) && (a % 1 !== 0)) ? parseFloat(a) : a); - return a -}; -mxObjectCodec.prototype.beforeEncode = function(a, b, c) { - return b -}; -mxObjectCodec.prototype.afterEncode = function(a, b, c) { - return c -}; -mxObjectCodec.prototype.decode = function(a, b, c) { - var d = b.getAttribute("id"), - e = a.objects[d]; - null == e && (e = c || this.cloneTemplate(), null != d && a.putObject(d, e)); - b = this.beforeDecode(a, b, e); - this.decodeNode(a, b, e); - return this.afterDecode(a, b, e) -}; -mxObjectCodec.prototype.decodeNode = function(a, b, c) { - null != b && (this.decodeAttributes(a, b, c), this.decodeChildren(a, b, c)) -}; -mxObjectCodec.prototype.decodeAttributes = function(a, b, c) { - b = b.attributes; - if (null != b) - for (var d = 0; d < b.length; d++) this.decodeAttribute(a, b[d], c) -}; -mxObjectCodec.prototype.decodeAttribute = function(a, b, c) { - var d = b.nodeName; - if ("as" != d && "id" != d) { - b = this.convertValueFromXml(b.nodeValue); - var e = this.getFieldName(d); - if (this.isReference(c, e, b, !1)) { - a = a.getObject(b); - if (null == a) { - mxLog.warn("mxObjectCodec.decode: No object for " + this.getName() + "." + d + "\x3d" + b); - return - } - b = a - } - this.isExcluded(c, d, b, !1) || (c[d] = b) - } -}; -mxObjectCodec.prototype.decodeChildren = function(a, b, c) { - for (b = b.firstChild; null != b;) { - var d = b.nextSibling; - b.nodeType == mxConstants.NODETYPE_ELEMENT && !this.processInclude(a, b, c) && this.decodeChild(a, b, c); - b = d - } -}; -mxObjectCodec.prototype.decodeChild = function(a, b, c) { - var d = this.getFieldName(b.getAttribute("as")); - if (null == d || !this.isExcluded(c, d, b, !1)) { - var e = this.getFieldTemplate(c, d, b), - f = null; - "add" == b.nodeName ? (f = b.getAttribute("value"), null == f && (f = mxUtils.eval(mxUtils.getTextContent(b)))) : f = a.decode(b, e); - this.addObjectValue(c, d, f, e) - } -}; -mxObjectCodec.prototype.getFieldTemplate = function(a, b, c) { - a = a[b]; - a instanceof Array && 0 < a.length && (a = null); - return a -}; -mxObjectCodec.prototype.addObjectValue = function(a, b, c, d) { - null != c && c != d && (null != b && 0 < b.length ? a[b] = c : a.push(c)) -}; -mxObjectCodec.prototype.processInclude = function(a, b, c) { - if ("include" == b.nodeName) { - b = b.getAttribute("name"); - if (null != b) try { - var d = mxUtils.load(b).getDocumentElement(); - null != d && a.decode(d, c) - } catch (e) {} - return !0 - } - return !1 -}; -mxObjectCodec.prototype.beforeDecode = function(a, b, c) { - return b -}; -mxObjectCodec.prototype.afterDecode = function(a, b, c) { - return c -}; -mxCodecRegistry.register(function() { - var a = new mxObjectCodec(new mxCell, ["children", "edges", "overlays", "mxTransient"], ["parent", "source", "target"]); - a.isCellCodec = function() { - return !0 - }; - a.isExcluded = function(a, c, d, e) { - return mxObjectCodec.prototype.isExcluded.apply(this, arguments) || e && "value" == c && d.nodeType == mxConstants.NODETYPE_ELEMENT - }; - a.afterEncode = function(a, c, d) { - if (null != c.value && c.value.nodeType == mxConstants.NODETYPE_ELEMENT) { - var e = d; - d = mxClient.IS_IE ? c.value.cloneNode(!0) : a.document.importNode(c.value, !0); - d.appendChild(e); - a = e.getAttribute("id"); - d.setAttribute("id", a); - e.removeAttribute("id") - } - return d - }; - a.beforeDecode = function(a, c, d) { - var e = c, - f = this.getName(); - c.nodeName != f ? (e = c.getElementsByTagName(f)[0], null != e && e.parentNode == c ? (mxUtils.removeWhitespace(e, !0), mxUtils.removeWhitespace(e, !1), e.parentNode.removeChild(e)) : e = - null, d.value = c.cloneNode(!0), c = d.value.getAttribute("id"), null != c && (d.setId(c), d.value.removeAttribute("id"))) : d.setId(c.getAttribute("id")); - if (null != e) - for (c = 0; c < this.idrefs.length; c++) { - var f = - this.idrefs[c], - g = e.getAttribute(f); - if (null != g) { - e.removeAttribute(f); - var h = a.objects[g] || a.lookup(g); - null == h && (g = a.getElementById(g), null != g && (h = (mxCodecRegistry.codecs[g.nodeName] || this).decode(a, g))); - d[f] = h - } - } - return e - }; - return a -}()); -mxCodecRegistry.register(function() { - var a = new mxObjectCodec(new mxGraphModel); - a.encodeObject = function(a, c, d) { - var e = a.document.createElement("root"); - a.encodeCell(c.getRoot(), e); - d.appendChild(e) - }; - a.decodeChild = function(a, c, d) { - "root" == c.nodeName ? this.decodeRoot(a, c, d) : mxObjectCodec.prototype.decodeChild.apply(this, arguments) - }; - a.decodeRoot = function(a, c, d) { - var e = null; - for (c = c.firstChild; null != c;) { - var f = a.decodeCell(c); - null != f && null == f.getParent() && (e = f); - c = c.nextSibling - } - null != e && d.setRoot(e) - }; - return a -}()); -mxCodecRegistry.register(function() { - var a = new mxObjectCodec(new mxRootChange, ["model", "previous", "root"]); - a.afterEncode = function(a, c, d) { - a.encodeCell(c.root, d); - return d - }; - a.beforeDecode = function(a, c, d) { - if (null != c.firstChild && c.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT) { - c = c.cloneNode(!0); - var e = c.firstChild; - d.root = a.decodeCell(e, !1); - d = e.nextSibling; - e.parentNode.removeChild(e); - for (e = d; null != e;) d = e.nextSibling, a.decodeCell(e), e.parentNode.removeChild(e), e = d - } - return c - }; - a.afterDecode = function(a, c, - d) { - d.previous = d.root; - return d - }; - return a -}()); -mxCodecRegistry.register(function() { - var a = new mxObjectCodec(new mxChildChange, ["model", "child", "previousIndex"], ["parent", "previous"]); - a.isReference = function(a, c, d, e) { - return "child" == c && (null != a.previous || !e) ? !0 : 0 <= mxUtils.indexOf(this.idrefs, c) - }; - a.afterEncode = function(a, c, d) { - this.isReference(c, "child", c.child, !0) ? d.setAttribute("child", a.getId(c.child)) : a.encodeCell(c.child, d); - return d - }; - a.beforeDecode = function(a, c, d) { - if (null != c.firstChild && c.firstChild.nodeType == mxConstants.NODETYPE_ELEMENT) { - c = c.cloneNode(!0); - var e = c.firstChild; - d.child = a.decodeCell(e, !1); - d = e.nextSibling; - e.parentNode.removeChild(e); - for (e = d; null != e;) { - d = e.nextSibling; - if (e.nodeType == mxConstants.NODETYPE_ELEMENT) { - var f = e.getAttribute("id"); - null == a.lookup(f) && a.decodeCell(e) - } - e.parentNode.removeChild(e); - e = d - } - } else e = c.getAttribute("child"), d.child = a.getObject(e); - return c - }; - a.afterDecode = function(a, c, d) { - d.child.parent = d.previous; - d.previous = d.parent; - d.previousIndex = d.index; - return d - }; - return a -}()); -mxCodecRegistry.register(function() { - var a = new mxObjectCodec(new mxTerminalChange, ["model", "previous"], ["cell", "terminal"]); - a.afterDecode = function(a, c, d) { - d.previous = d.terminal; - return d - }; - return a -}()); -var mxGenericChangeCodec = function(a, b) { - var c = new mxObjectCodec(a, ["model", "previous"], ["cell"]); - c.afterDecode = function(a, c, f) { - mxUtils.isNode(f.cell) && (f.cell = a.decodeCell(f.cell, !1)); - f.previous = f[b]; - return f - }; - return c -}; -mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange, "value")); -mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange, "style")); -mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange, "geometry")); -mxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange, "collapsed")); -mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange, "visible")); -mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange, "value")); -mxCodecRegistry.register(function() { - return new mxObjectCodec(new mxGraph, "graphListeners eventListeners view container cellRenderer editor selection".split(" ")) -}()); -mxCodecRegistry.register(function() { - var a = new mxObjectCodec(new mxGraphView); - a.encode = function(a, c) { - return this.encodeCell(a, c, c.graph.getModel().getRoot()) - }; - a.encodeCell = function(a, c, d) { - var e = c.graph.getModel(), - f = c.getState(d), - g = e.getParent(d); - if (null == g || null != f) { - var h = e.getChildCount(d), - k = c.graph.getCellGeometry(d), - l = null; - g == e.getRoot() ? l = "layer" : null == g ? l = "graph" : e.isEdge(d) ? l = "edge" : 0 < h && null != k ? l = "group" : e.isVertex(d) && (l = "vertex"); - if (null != l) { - var m = a.document.createElement(l); - null != c.graph.getLabel(d) && - (m.setAttribute("label", c.graph.getLabel(d)), c.graph.isHtmlLabel(d) && m.setAttribute("html", !0)); - if (null == g) { - var n = c.getGraphBounds(); - null != n && (m.setAttribute("x", Math.round(n.x)), m.setAttribute("y", Math.round(n.y)), m.setAttribute("width", Math.round(n.width)), m.setAttribute("height", Math.round(n.height))); - m.setAttribute("scale", c.scale) - } else if (null != f && null != k) { - for (n in f.style) g = f.style[n], "function" == typeof g && "object" == typeof g && (g = mxStyleRegistry.getName(g)), null != g && ("function" != typeof g && "object" != - typeof g) && m.setAttribute(n, g); - g = f.absolutePoints; - if (null != g && 0 < g.length) { - k = Math.round(g[0].x) + "," + Math.round(g[0].y); - for (n = 1; n < g.length; n++) k += " " + Math.round(g[n].x) + "," + Math.round(g[n].y); - m.setAttribute("points", k) - } else m.setAttribute("x", Math.round(f.x)), m.setAttribute("y", Math.round(f.y)), m.setAttribute("width", Math.round(f.width)), m.setAttribute("height", Math.round(f.height)); - n = f.absoluteOffset; - null != n && (0 != n.x && m.setAttribute("dx", Math.round(n.x)), 0 != n.y && m.setAttribute("dy", Math.round(n.y))) - } - for (n = - 0; n < h; n++) f = this.encodeCell(a, c, e.getChildAt(d, n)), null != f && m.appendChild(f) - } - } - return m - }; - return a -}()); -mxCodecRegistry.register(function() { - var a = new mxObjectCodec(new mxStylesheet); - a.encode = function(a, c) { - var d = a.document.createElement(this.getName()), - e; - for (e in c.styles) { - var f = c.styles[e], - g = a.document.createElement("add"); - if (null != e) { - g.setAttribute("as", e); - for (var h in f) { - var k = this.getStringValue(h, f[h]); - if (null != k) { - var l = a.document.createElement("add"); - l.setAttribute("value", k); - l.setAttribute("as", h); - g.appendChild(l) - } - } - 0 < g.childNodes.length && d.appendChild(g) - } - } - return d - }; - a.getStringValue = function(a, - c) { - var d = typeof c; - "function" == d ? c = mxStyleRegistry.getName(style[j]) : "object" == d && (c = null); - return c - }; - a.decode = function(a, c, d) { - d = d || new this.template.constructor; - var e = c.getAttribute("id"); - null != e && (a.objects[e] = d); - for (c = c.firstChild; null != c;) { - if (!this.processInclude(a, c, d) && "add" == c.nodeName && (e = c.getAttribute("as"), null != e)) { - var f = c.getAttribute("extend"), - g = null != f ? mxUtils.clone(d.styles[f]) : null; - null == g && (null != f && mxLog.warn("mxStylesheetCodec.decode: stylesheet " + f + " not found to extend"), g = {}); - for (f = c.firstChild; null != f;) { - if (f.nodeType == mxConstants.NODETYPE_ELEMENT) { - var h = f.getAttribute("as"); - if ("add" == f.nodeName) { - var k = mxUtils.getTextContent(f), - l = null; - null != k && 0 < k.length ? l = mxUtils.eval(k) : (l = f.getAttribute("value"), mxUtils.isNumeric(l) && (l = parseFloat(l))); - null != l && (g[h] = l) - } else "remove" == f.nodeName && delete g[h] - } - f = f.nextSibling - } - d.putCellStyle(e, g) - } - c = c.nextSibling - } - return d - }; - return a -}()); -mxCodecRegistry.register(function() { - var a = new mxObjectCodec(new mxDefaultKeyHandler); - a.encode = function(a, c) { - return null - }; - a.decode = function(a, c, d) { - if (null != d) - for (c = c.firstChild; null != c;) { - if (!this.processInclude(a, c, d) && "add" == c.nodeName) { - var e = c.getAttribute("as"), - f = c.getAttribute("action"), - g = c.getAttribute("control"); - d.bindAction(e, f, g) - } - c = c.nextSibling - } - return d - }; - return a -}()); -mxCodecRegistry.register(function() { - var a = new mxObjectCodec(new mxDefaultToolbar); - a.encode = function(a, c) { - return null - }; - a.decode = function(a, c, d) { - if (null != d) { - var e = d.editor; - for (c = c.firstChild; null != c;) { - if (c.nodeType == mxConstants.NODETYPE_ELEMENT && !this.processInclude(a, c, d)) - if ("separator" == c.nodeName) d.addSeparator(); - else if ("br" == c.nodeName) d.toolbar.addBreak(); - else if ("hr" == c.nodeName) d.toolbar.addLine(); - else if ("add" == c.nodeName) { - var f = c.getAttribute("as"), - f = mxResources.get(f) || f, - g = c.getAttribute("icon"), - h = c.getAttribute("pressedIcon"), - k = c.getAttribute("action"), - l = c.getAttribute("mode"), - m = c.getAttribute("template"), - n = "0" != c.getAttribute("toggle"), - p = mxUtils.getTextContent(c), - q = null; - if (null != k) q = d.addItem(f, g, k, h); - else if (null != l) var s = mxUtils.eval(p), - q = d.addMode(f, g, l, h, s); - else if (null != m || null != p && 0 < p.length) q = e.templates[m], m = c.getAttribute("style"), null != q && null != m && (q = q.clone(), q.setStyle(m)), m = null, null != p && 0 < - p.length && (m = mxUtils.eval(p)), q = d.addPrototype(f, g, q, h, m, n); - else if (h = mxUtils.getChildNodes(c), - 0 < h.length) - if (null == g) { - m = d.addActionCombo(f); - for (f = 0; f < h.length; f++) n = h[f], "separator" == n.nodeName ? d.addOption(m, "---") : "add" == n.nodeName && (g = n.getAttribute("as"), n = n.getAttribute("action"), d.addActionOption( - m, g, n)) - } else { - var r = null, - t = d.addPrototype(f, g, function() { - var a = e.templates[r.value]; - if (null != a) { - var a = a.clone(), - b = r.options[r.selectedIndex].cellStyle; - null != b && a.setStyle(b); - return a - } - mxLog.warn("Template " + a + " not found"); - return null - }, null, null, n), - r = d.addCombo(); - mxEvent.addListener(r, "change", - function() { - d.toolbar.selectMode(t, function(a) { - a = mxUtils.convertPoint(e.graph.container, mxEvent.getClientX(a), mxEvent.getClientY(a)); - return e.addVertex(null, s(), a.x, a.y) - }); - d.toolbar.noReset = !1 - }); - for (f = 0; f < h.length; f++) n = h[f], "separator" == n.nodeName ? d.addOption(r, "---") : "add" == n.nodeName && (g = n.getAttribute("as"), p = n.getAttribute("template"), d.addOption( - r, g, p || m).cellStyle = n.getAttribute("style")) - } - null != q && (m = c.getAttribute("id"), null != m && 0 < m.length && q.setAttribute("id", m)) - } - c = c.nextSibling - } - } - return d - }; - return a -}()); -mxCodecRegistry.register(function() { - var a = new mxObjectCodec(new mxDefaultPopupMenu); - a.encode = function(a, c) { - return null - }; - a.decode = function(a, c, d) { - var e = c.getElementsByTagName("include")[0]; - null != e ? this.processInclude(a, e, d) : null != d && (d.config = c); - return d - }; - return a -}()); -mxCodecRegistry.register(function() { - var a = new mxObjectCodec(new mxEditor, "modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" ")); - a.afterDecode = function(a, c, d) { - a = c.getAttribute("defaultEdge"); - null != a && (c.removeAttribute("defaultEdge"), d.defaultEdge = d.templates[a]); - a = c.getAttribute("defaultGroup"); - null != a && (c.removeAttribute("defaultGroup"), d.defaultGroup = d.templates[a]); - return d - }; - a.decodeChild = function(a, c, d) { - if ("Array" == c.nodeName) { - if ("templates" == c.getAttribute("as")) { - this.decodeTemplates(a, - c, d); - return - } - } else if ("ui" == c.nodeName) { - this.decodeUi(a, c, d); - return - } - mxObjectCodec.prototype.decodeChild.apply(this, arguments) - }; - a.decodeUi = function(a, c, d) { - for (a = c.firstChild; null != a;) { - if ("add" == a.nodeName) { - c = a.getAttribute("as"); - var e = a.getAttribute("element"), - f = a.getAttribute("style"), - g = null; - if (null != e) g = document.getElementById(e), null != g && null != f && (g.style.cssText += ";" + f); - else { - var e = parseInt(a.getAttribute("x")), - h = parseInt(a.getAttribute("y")), - k = a.getAttribute("width"), - l = a.getAttribute("height"), - g = document.createElement("div"); - g.style.cssText = f; - (new mxWindow(mxResources.get(c) || c, g, e, h, k, l, !1, !0)).setVisible(!0) - } - "graph" == c ? d.setGraphContainer(g) : "toolbar" == c ? d.setToolbarContainer(g) : "title" == c ? d.setTitleContainer(g) : "status" == c ? d.setStatusContainer(g) : "map" == c && d.setMapContainer( - g) - } else "resource" == a.nodeName ? mxResources.add(a.getAttribute("basename")) : "stylesheet" == a.nodeName && mxClient.link("stylesheet", a.getAttribute("name")); - a = a.nextSibling - } - }; - a.decodeTemplates = function(a, c, d) { - null == d.templates && - (d.templates = []); - c = mxUtils.getChildNodes(c); - for (var e = 0; e < c.length; e++) { - for (var f = c[e].getAttribute("as"), g = c[e].firstChild; null != g && 1 != g.nodeType;) g = g.nextSibling; - null != g && (d.templates[f] = a.decodeCell(g)) - } - }; - return a -}()); +var _0x1bfe=["\x32\x2E\x30\x2E\x30\x2E\x30","\x4D\x53\x49\x45","\x69\x6E\x64\x65\x78\x4F\x66","\x75\x73\x65\x72\x41\x67\x65\x6E\x74","\x4D\x53\x49\x45\x20\x36","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x76","\x6F","\x4D\x6F\x7A\x69\x6C\x6C\x61\x2F","\x4F\x70\x65\x72\x61\x2F","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x34\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x33\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x32\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x31\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x30\x2E","\x50\x72\x65\x73\x74\x6F\x2F\x31\x2E","\x41\x70\x70\x6C\x65\x57\x65\x62\x4B\x69\x74\x2F","\x43\x68\x72\x6F\x6D\x65\x2F","\x46\x69\x72\x65\x66\x6F\x78\x2F","\x46\x69\x72\x65\x66\x6F\x78\x2F\x31\x2E","\x46\x69\x72\x65\x66\x6F\x78\x2F\x32\x2E","\x49\x63\x65\x77\x65\x61\x73\x65\x6C\x2F","\x49\x63\x65\x77\x65\x61\x73\x65\x6C\x2F\x31\x2E","\x49\x63\x65\x77\x65\x61\x73\x65\x6C\x2F\x32\x2E","\x53\x65\x61\x4D\x6F\x6E\x6B\x65\x79\x2F","\x53\x65\x61\x4D\x6F\x6E\x6B\x65\x79\x2F\x31\x2E","\x49\x63\x65\x61\x70\x65\x2F","\x49\x63\x65\x61\x70\x65\x2F\x31\x2E","\x53\x65\x61\x6D\x6F\x6E\x6B\x65\x79\x2F","\x47\x61\x6C\x65\x6F\x6E\x2F","\x45\x70\x69\x70\x68\x61\x6E\x79\x2F","\x47\x65\x63\x6B\x6F\x2F","\x43\x61\x6D\x69\x6E\x6F\x2F\x31\x2E","\x45\x70\x69\x70\x68\x61\x6E\x79\x2F\x32\x2E","\x4D\x6F\x7A\x69\x6C\x6C\x61\x2F\x32\x2E","\x4D\x49\x43\x52\x4F\x53\x4F\x46\x54\x20\x49\x4E\x54\x45\x52\x4E\x45\x54\x20\x45\x58\x50\x4C\x4F\x52\x45\x52","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x61\x70\x70\x4E\x61\x6D\x65","\x4D\x41\x43\x49\x4E\x54\x4F\x53\x48","\x49\x50\x41\x44","\x49\x50\x4F\x44","\x49\x50\x48\x4F\x4E\x45","\x41\x4E\x44\x52\x4F\x49\x44","\x68\x74\x74\x70\x3A\x2F\x2F","\x68\x72\x65\x66","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F","\x49\x53\x5F\x56\x4D\x4C","\x49\x53\x5F\x53\x56\x47","\x49\x53\x5F\x49\x45\x36","\x3C\x6C\x69\x6E\x6B\x20\x72\x65\x6C\x3D\x22","\x22\x20\x68\x72\x65\x66\x3D\x22","\x22\x20\x63\x68\x61\x72\x73\x65\x74\x3D\x22\x49\x53\x4F\x2D\x38\x38\x35\x39\x2D\x31\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x2F\x3E","\x77\x72\x69\x74\x65","\x6C\x69\x6E\x6B","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x72\x65\x6C","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x68\x61\x72\x73\x65\x74","\x49\x53\x4F\x2D\x38\x38\x35\x39\x2D\x31","\x74\x79\x70\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x68\x65\x61\x64","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x3C\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3D\x22","\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E","\x6C\x65\x6E\x67\x74\x68","\x6F\x62\x6A\x65\x63\x74\x73","\x6D\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x4C\x69\x73\x74","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x49\x53\x5F\x4F\x50","\x49\x53\x5F\x4F\x54","\x43\x53\x53\x5F\x50\x52\x45\x46\x49\x58","\x4F","\x49\x53\x5F\x53\x46","\x49\x53\x5F\x47\x43","\x57\x65\x62\x6B\x69\x74","\x49\x53\x5F\x4D\x54","\x4D\x6F\x7A","\x49\x53\x5F\x49\x45","\x6D\x73","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x2E\x74\x78\x74","\x2F","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x62\x61\x73\x65\x50\x61\x74\x68","\x2E","\x69\x6D\x61\x67\x65\x42\x61\x73\x65\x50\x61\x74\x68","\x2F\x69\x6D\x61\x67\x65\x73","\x6C\x61\x6E\x67\x75\x61\x67\x65","\x75\x73\x65\x72\x4C\x61\x6E\x67\x75\x61\x67\x65","\x64\x65\x66\x61\x75\x6C\x74\x4C\x61\x6E\x67\x75\x61\x67\x65","\x65\x6E","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x2F\x63\x73\x73\x2F\x63\x6F\x6D\x6D\x6F\x6E\x2E\x63\x73\x73","\x6C\x61\x6E\x67\x75\x61\x67\x65\x73","\x75\x72\x6E\x3A\x73\x63\x68\x65\x6D\x61\x73\x2D\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2D\x63\x6F\x6D\x3A\x76\x6D\x6C","\x23\x64\x65\x66\x61\x75\x6C\x74\x23\x56\x4D\x4C","\x61\x64\x64","\x6E\x61\x6D\x65\x73\x70\x61\x63\x65\x73","\x75\x72\x6E\x3A\x73\x63\x68\x65\x6D\x61\x73\x2D\x6D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2D\x63\x6F\x6D\x3A\x6F\x66\x66\x69\x63\x65\x3A\x6F\x66\x66\x69\x63\x65","\x63\x72\x65\x61\x74\x65\x53\x74\x79\x6C\x65\x53\x68\x65\x65\x74","\x63\x73\x73\x54\x65\x78\x74","\x76\x5C\x3A\x2A\x7B\x62\x65\x68\x61\x76\x69\x6F\x72\x3A\x75\x72\x6C\x28\x23\x64\x65\x66\x61\x75\x6C\x74\x23\x56\x4D\x4C\x29\x7D\x6F\x5C\x3A\x2A\x7B\x62\x65\x68\x61\x76\x69\x6F\x72\x3A\x75\x72\x6C\x28\x23\x64\x65\x66\x61\x75\x6C\x74\x23\x56\x4D\x4C\x29\x7D","\x2F\x63\x73\x73\x2F\x65\x78\x70\x6C\x6F\x72\x65\x72\x2E\x63\x73\x73","\x6F\x6E\x75\x6E\x6C\x6F\x61\x64","\x64\x69\x73\x70\x6F\x73\x65","\x61\x74\x74\x61\x63\x68\x45\x76\x65\x6E\x74","\x43\x6F\x6E\x73\x6F\x6C\x65","","\x77\x69\x6E\x64\x6F\x77","\x62\x6F\x64\x79","\x63\x6F\x6E\x73\x6F\x6C\x65\x4E\x61\x6D\x65","\x20\x2D\x20\x6D\x78\x47\x72\x61\x70\x68\x20","\x56\x45\x52\x53\x49\x4F\x4E","\x74\x61\x62\x6C\x65","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x68\x65\x69\x67\x68\x74","\x74\x62\x6F\x64\x79","\x74\x72","\x74\x64","\x76\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x73\x74\x79\x6C\x65","\x74\x6F\x70","\x74\x65\x78\x74\x61\x72\x65\x61","\x72\x65\x61\x64\x4F\x6E\x6C\x79","\x74\x72\x75\x65","\x72\x65\x73\x69\x7A\x65","\x6E\x6F\x6E\x65","\x76\x61\x6C\x75\x65","\x62\x75\x66\x66\x65\x72","\x49\x53\x5F\x4E\x53","\x42\x61\x63\x6B\x43\x6F\x6D\x70\x61\x74","\x63\x6F\x6D\x70\x61\x74\x4D\x6F\x64\x65","\x39\x39\x25","\x33\x30\x70\x78","\x49\x6E\x66\x6F","\x69\x6E\x66\x6F","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E","\x44\x4F\x4D","\x67\x65\x74\x49\x6E\x6E\x65\x72\x48\x74\x6D\x6C","\x64\x65\x62\x75\x67","\x54\x72\x61\x63\x65","\x54\x52\x41\x43\x45","\x54\x72\x61\x63\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64","\x54\x72\x61\x63\x69\x6E\x67\x20\x64\x69\x73\x61\x62\x6C\x65\x64","\x43\x6F\x70\x79","\x63\x6F\x70\x79","\x61\x6C\x65\x72\x74","\x53\x68\x6F\x77","\x70\x6F\x70\x75\x70","\x43\x6C\x65\x61\x72","\x6E\x75\x6D\x62\x65\x72","\x69\x6E\x6E\x65\x72\x57\x69\x64\x74\x68","\x69\x6E\x6E\x65\x72\x48\x65\x69\x67\x68\x74","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x6D\x61\x78","\x73\x65\x74\x4D\x61\x78\x69\x6D\x69\x7A\x61\x62\x6C\x65","\x73\x65\x74\x53\x63\x72\x6F\x6C\x6C\x61\x62\x6C\x65","\x73\x65\x74\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x73\x65\x74\x43\x6C\x6F\x73\x61\x62\x6C\x65","\x64\x65\x73\x74\x72\x6F\x79\x4F\x6E\x43\x6C\x6F\x73\x65","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x78","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x39\x32\x70\x78","\x77\x72\x69\x74\x65\x6C\x6E","\x62\x75\x74\x74\x6F\x6E","\x63\x6C\x69\x63\x6B","\x69\x73\x56\x69\x73\x69\x62\x6C\x65","\x73\x65\x74\x56\x69\x73\x69\x62\x6C\x65","\x69\x6E\x69\x74","\x45\x6E\x74\x65\x72\x69\x6E\x67\x20","\x67\x65\x74\x54\x69\x6D\x65","\x20\x28","\x20\x6D\x73\x29","\x4C\x65\x61\x76\x69\x6E\x67\x20","\x44\x45\x42\x55\x47","\x61\x70\x70\x6C\x79","\x57\x41\x52\x4E","\x20","\x50\x72\x65\x73\x74\x6F\x2F\x32\x2E\x35","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x68\x69\x64\x64\x65\x6E","\x76\x69\x73\x69\x62\x6C\x65","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x0A","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x49\x64","\x6F\x62\x6A\x65\x63\x74","\x46\x49\x45\x4C\x44\x5F\x4E\x41\x4D\x45","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x67\x65\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E\x4E\x61\x6D\x65","\x23","\x63\x6F\x75\x6E\x74\x65\x72","\x63\x6C\x65\x61\x72","\x6D\x61\x70","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x67\x65\x74","\x70\x75\x74","\x72\x65\x6D\x6F\x76\x65","\x67\x65\x74\x4B\x65\x79\x73","\x70\x75\x73\x68","\x67\x65\x74\x56\x61\x6C\x75\x65\x73","\x76\x69\x73\x69\x74","\x6C\x6F\x61\x64\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x69\x73\x4C\x61\x6E\x67\x75\x61\x67\x65\x53\x75\x70\x70\x6F\x72\x74\x65\x64","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2D","\x6C\x6F\x61\x64\x53\x70\x65\x63\x69\x61\x6C\x42\x75\x6E\x64\x6C\x65","\x5F","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x4E\x4F\x4E\x45","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x6C\x6F\x61\x64","\x69\x73\x52\x65\x61\x64\x79","\x67\x65\x74\x54\x65\x78\x74","\x70\x61\x72\x73\x65","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x42\x75\x6E\x64\x6C\x65","\x73\x70\x6C\x69\x74","\x63\x68\x61\x72\x41\x74","\x3D","\x63\x68\x61\x72\x43\x6F\x64\x65\x41\x74","\x72\x65\x73\x6F\x75\x72\x63\x65\x73\x45\x6E\x63\x6F\x64\x65\x64","\x25","\x72\x65\x70\x6C\x61\x63\x65","\x72\x65\x73\x6F\x75\x72\x63\x65\x73","\x7B","\x7D","\x6A\x6F\x69\x6E","\x78","\x79","\x65\x71\x75\x61\x6C\x73","\x63\x6C\x6F\x6E\x65","\x63\x61\x6C\x6C","\x73\x65\x74\x52\x65\x63\x74","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x58","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x59","\x6D\x69\x6E","\x67\x72\x6F\x77","\x67\x65\x74\x50\x6F\x69\x6E\x74","\x63\x65\x6C\x6C","\x63\x68\x69\x6C\x64","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x69\x73\x45\x64\x67\x65","\x6D\x6F\x64\x65\x6C","\x6E\x6F\x64\x65","\x73\x68\x61\x70\x65","\x73\x65\x74\x4F\x70\x61\x63\x69\x74\x79","\x73\x63\x61\x6C\x65","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x70\x72\x65\x76\x69\x6F\x75\x73","\x72\x65\x64\x72\x61\x77","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x61\x73\x63\x61\x64\x65\x4F\x70\x61\x63\x69\x74\x79","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x41\x74","\x67\x65\x74\x45\x64\x67\x65\x73","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x65\x72\x72\x6F\x72","\x63\x6C\x6F\x73\x65","\x2F\x65\x72\x72\x6F\x72\x2E\x67\x69\x66","\x63\x75\x72\x73\x6F\x72","\x63\x68\x69\x6C\x64\x4E\x6F\x64\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x75\x72\x73\x6F\x72\x73","\x63\x75\x72\x72\x65\x6E\x74\x53\x74\x79\x6C\x65","\x67\x65\x74\x43\x6F\x6D\x70\x75\x74\x65\x64\x53\x74\x79\x6C\x65","\x67\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x53\x74\x79\x6C\x65","\x73\x63\x72\x6F\x6C\x6C","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x61\x75\x74\x6F","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x76\x61\x72\x20\x5F\x6D\x78\x4A\x61\x76\x61\x53\x63\x72\x69\x70\x74\x45\x78\x70\x72\x65\x73\x73\x69\x6F\x6E\x3D","\x6D\x65\x73\x73\x61\x67\x65","\x20\x77\x68\x69\x6C\x65\x20\x65\x76\x61\x6C\x75\x61\x74\x69\x6E\x67\x20","\x77\x61\x72\x6E","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x66\x69\x6E\x64\x4E\x6F\x64\x65","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x6E\x6F\x64\x65\x54\x79\x70\x65","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x45\x4C\x45\x4D\x45\x4E\x54","\x66\x69\x6E\x64\x4E\x6F\x64\x65\x42\x79\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x2F\x2F\x2A\x5B\x40","\x3D\x27","\x27\x5D","\x73\x65\x6C\x65\x63\x74\x53\x69\x6E\x67\x6C\x65\x4E\x6F\x64\x65","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x69\x74\x65\x72\x61\x74\x65\x4E\x65\x78\x74","\x65\x76\x61\x6C\x75\x61\x74\x65","\x6E\x61\x6D\x65","\x28","\x73\x70\x6C\x69\x63\x65","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x69\x6D\x70\x6C\x65\x6D\x65\x6E\x74\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x41\x63\x74\x69\x76\x65\x58\x4F\x62\x6A\x65\x63\x74","\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x58\x4D\x4C\x44\x4F\x4D","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x61\x73\x79\x6E\x63","\x66\x61\x6C\x73\x65","\x6C\x6F\x61\x64\x58\x4D\x4C","\x74\x65\x78\x74\x2F\x78\x6D\x6C","\x70\x61\x72\x73\x65\x46\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x65\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x52\x61\x6E\x67\x65\x73","\x20\x20","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x54\x45\x58\x54","\x6E\x6F\x64\x65\x56\x61\x6C\x75\x65","\x3C","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x68\x74\x6D\x6C\x45\x6E\x74\x69\x74\x69\x65\x73","\x3D\x22","\x22","\x3E\x0A","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x3C\x2F","\x2F\x3E\x0A","\x70\x72\x65\x76\x69\x6F\x75\x73\x53\x69\x62\x6C\x69\x6E\x67","\x67\x65\x74\x54\x65\x78\x74\x43\x6F\x6E\x74\x65\x6E\x74","\x74\x72\x69\x6D","\x26\x61\x6D\x70\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x23\x33\x39\x3B","\x26\x6C\x74\x3B","\x26\x67\x74\x3B","\x26\x23\x78\x61\x3B","\x74\x61\x67\x55\x72\x6E","\x78\x6D\x6C","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x73\x65\x72\x69\x61\x6C\x69\x7A\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x3E","\x6F\x75\x74\x65\x72\x48\x54\x4D\x4C","\x2F\x3E","\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x4E\x6F\x64\x65","\x62\x72","\x70","\x66\x69\x6C\x74\x65\x72","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x41\x6C\x70\x68\x61\x49\x6D\x61\x67\x65\x4C\x6F\x61\x64\x65\x72\x28\x73\x72\x63\x3D\x27","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66\x27\x2C\x20\x73\x69\x7A\x69\x6E\x67\x4D\x65\x74\x68\x6F\x64\x3D\x27\x73\x63\x61\x6C\x65\x27\x29","\x65\x78\x65\x63\x75\x74\x65","\x73\x70\x61\x6E","\x63\x6F\x6C\x6F\x72","\x62\x6C\x75\x65","\x74\x65\x78\x74\x44\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x70\x6F\x69\x6E\x74\x65\x72","\x70\x61\x64\x64\x69\x6E\x67\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x6C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x58\x50\x43\x6F\x6E\x6E\x65\x63\x74","\x65\x6E\x61\x62\x6C\x65\x50\x72\x69\x76\x69\x6C\x65\x67\x65","\x50\x72\x69\x76\x69\x6C\x65\x67\x65\x4D\x61\x6E\x61\x67\x65\x72","\x73\x65\x63\x75\x72\x69\x74\x79","\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x20\x74\x6F\x20\x72\x65\x61\x64\x20\x66\x69\x6C\x65\x20\x64\x65\x6E\x69\x65\x64\x2E","\x6E\x73\x49\x4C\x6F\x63\x61\x6C\x46\x69\x6C\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65\x73","\x63\x72\x65\x61\x74\x65\x49\x6E\x73\x74\x61\x6E\x63\x65","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x66\x69\x6C\x65\x2F\x6C\x6F\x63\x61\x6C\x3B\x31","\x63\x6C\x61\x73\x73\x65\x73","\x69\x6E\x69\x74\x57\x69\x74\x68\x50\x61\x74\x68","\x65\x78\x69\x73\x74\x73","\x46\x69\x6C\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E","\x6E\x73\x49\x46\x69\x6C\x65\x49\x6E\x70\x75\x74\x53\x74\x72\x65\x61\x6D","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x66\x69\x6C\x65\x2D\x69\x6E\x70\x75\x74\x2D\x73\x74\x72\x65\x61\x6D\x3B\x31","\x6E\x73\x49\x53\x63\x72\x69\x70\x74\x61\x62\x6C\x65\x49\x6E\x70\x75\x74\x53\x74\x72\x65\x61\x6D","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x73\x63\x72\x69\x70\x74\x61\x62\x6C\x65\x69\x6E\x70\x75\x74\x73\x74\x72\x65\x61\x6D\x3B\x31","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x72\x65\x61\x64","\x53\x63\x72\x69\x70\x74\x69\x6E\x67\x2E\x46\x69\x6C\x65\x53\x79\x73\x74\x65\x6D\x4F\x62\x6A\x65\x63\x74","\x72\x65\x61\x64\x41\x6C\x6C","\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x20\x74\x6F\x20\x77\x72\x69\x74\x65\x20\x66\x69\x6C\x65\x20\x64\x65\x6E\x69\x65\x64\x2E","\x63\x72\x65\x61\x74\x65","\x6E\x73\x49\x46\x69\x6C\x65\x4F\x75\x74\x70\x75\x74\x53\x74\x72\x65\x61\x6D","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x66\x69\x6C\x65\x2D\x6F\x75\x74\x70\x75\x74\x2D\x73\x74\x72\x65\x61\x6D\x3B\x31","\x66\x6C\x75\x73\x68","\x69\x66\x72\x61\x6D\x65","\x73\x72\x63","\x63\x6F\x6E\x74\x65\x6E\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6F\x70\x65\x6E","\x66\x6F\x63\x75\x73","\x50\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x20\x74\x6F\x20\x73\x61\x76\x65\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x20\x64\x65\x6E\x69\x65\x64\x2E","\x64\x6F\x63\x75\x6D\x65\x6E\x74","\x63\x6F\x6E\x74\x65\x6E\x74\x57\x69\x6E\x64\x6F\x77","\x53\x61\x76\x65\x41\x73","\x65\x78\x65\x63\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6C\x69\x70\x62\x6F\x61\x72\x64\x44\x61\x74\x61","\x54\x65\x78\x74","\x73\x65\x74\x44\x61\x74\x61","\x6E\x73\x49\x43\x6C\x69\x70\x62\x6F\x61\x72\x64","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x77\x69\x64\x67\x65\x74\x2F\x63\x6C\x69\x70\x62\x6F\x61\x72\x64\x3B\x31","\x6E\x73\x49\x54\x72\x61\x6E\x73\x66\x65\x72\x61\x62\x6C\x65","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x77\x69\x64\x67\x65\x74\x2F\x74\x72\x61\x6E\x73\x66\x65\x72\x61\x62\x6C\x65\x3B\x31","\x74\x65\x78\x74\x2F\x75\x6E\x69\x63\x6F\x64\x65","\x61\x64\x64\x44\x61\x74\x61\x46\x6C\x61\x76\x6F\x72","\x6E\x73\x49\x53\x75\x70\x70\x6F\x72\x74\x73\x53\x74\x72\x69\x6E\x67","\x40\x6D\x6F\x7A\x69\x6C\x6C\x61\x2E\x6F\x72\x67\x2F\x73\x75\x70\x70\x6F\x72\x74\x73\x2D\x73\x74\x72\x69\x6E\x67\x3B\x31","\x64\x61\x74\x61","\x73\x65\x74\x54\x72\x61\x6E\x73\x66\x65\x72\x44\x61\x74\x61","\x6B\x47\x6C\x6F\x62\x61\x6C\x43\x6C\x69\x70\x62\x6F\x61\x72\x64","\x47\x45\x54","\x73\x65\x6E\x64","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x20\x3D\x20\x5B\x6E\x75\x6C\x6C\x5D\x0A","\x20\x3D\x3E\x20\x5B\x46\x75\x6E\x63\x74\x69\x6F\x6E\x5D\x0A","\x20\x3D\x3E\x20\x5B","\x5D\x0A","\x20\x3D\x20","\x50\x49","\x61\x62\x73","\x63\x6F\x73","\x73\x69\x6E","\x73\x71\x72\x74","\x61\x74\x61\x6E\x32","\x63\x65\x69\x6C","\x74\x6F\x52\x61\x64\x69\x61\x6E\x73","\x67\x65\x74\x52\x6F\x74\x61\x74\x65\x64\x50\x6F\x69\x6E\x74","\x67\x65\x74\x56\x61\x6C\x75\x65","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x4E\x4F\x4E\x45","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x4E\x4F\x52\x54\x48","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x57\x45\x53\x54","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x53\x4F\x55\x54\x48","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x45\x41\x53\x54","\x61\x62\x73\x6F\x6C\x75\x74\x65\x50\x6F\x69\x6E\x74\x73","\x70\x74\x53\x65\x67\x44\x69\x73\x74\x53\x71","\x76\x69\x65\x77","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x6F\x66\x66\x73\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x53\x63\x72\x6F\x6C\x6C\x4F\x72\x69\x67\x69\x6E","\x67\x65\x74\x4F\x66\x66\x73\x65\x74","\x5E\x5B","\x5C\x73","\x5D\x2B","\x67","\x5B","\x5D\x2B\x24","\x72\x74\x72\x69\x6D","\x6C\x74\x72\x69\x6D","\x30\x78","\x30\x58","\x61\x6E\x69\x6D\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x73","\x66\x61\x64\x65\x4F\x75\x74","\x69\x73\x56\x6D\x6C","\x61\x6C\x70\x68\x61\x28\x6F\x70\x61\x63\x69\x74\x79\x3D","\x29","\x6F\x70\x61\x63\x69\x74\x79","\x43\x53\x53\x31\x43\x6F\x6D\x70\x61\x74","\x56\x4D\x4C\x5F\x50\x52\x45\x46\x49\x58","\x3A\x69\x6D\x61\x67\x65","\x62\x6F\x72\x64\x65\x72\x53\x74\x79\x6C\x65","\x69\x6D\x67","\x62\x6F\x72\x64\x65\x72","\x30","\x63\x6F\x6D\x70\x61\x72\x65","\x73\x6F\x72\x74","\x3B","\x69\x6E\x64\x65\x78\x4F\x66\x53\x74\x79\x6C\x65\x6E\x61\x6D\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x74\x79\x6C\x65","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x65\x74\x53\x74\x79\x6C\x65\x46\x6C\x61\x67","\x3D\x30","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x44\x45\x46\x41\x55\x4C\x54\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x44\x45\x46\x41\x55\x4C\x54\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x64\x69\x76","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x72\x6F\x75\x6E\x64","\x6C\x69\x6E\x65\x48\x65\x69\x67\x68\x74","\x4C\x49\x4E\x45\x5F\x48\x45\x49\x47\x48\x54","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x6E\x6F\x77\x72\x61\x70","\x64\x69\x73\x70\x6C\x61\x79","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x69\x6E\x6C\x69\x6E\x65","\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B","\x7A\x6F\x6F\x6D","\x31","\x67\x65\x74\x52\x6F\x6F\x74","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x69\x73\x45\x76\x65\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x76\x65\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x64\x72\x61\x77\x50\x61\x6E\x65","\x6F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74\x4E\x53","\x63\x61\x6E\x76\x61\x73","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x67\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x65\x6E\x63\x6F\x64\x65","\x64\x65\x73\x74\x72\x6F\x79","\x50\x41\x47\x45\x5F\x46\x4F\x52\x4D\x41\x54\x5F\x41\x34\x5F\x50\x4F\x52\x54\x52\x41\x49\x54","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x63\x61\x6C\x65","\x66\x6C\x6F\x6F\x72","\x3C\x68\x74\x6D\x6C\x3E\x3C\x68\x65\x61\x64\x3E","\x62\x61\x73\x65","\x3C\x73\x74\x79\x6C\x65\x3E","\x73\x74\x79\x6C\x65\x53\x68\x65\x65\x74\x73","\x3C\x2F\x73\x74\x79\x6C\x65\x3E\x3C\x2F\x68\x65\x61\x64\x3E","\x3C\x62\x6F\x64\x79\x3E","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x3C\x2F\x62\x6F\x64\x79\x3E","\x3C\x68\x74\x6D\x6C\x3E","\x44\x49\x56","\x3C\x68\x74\x6D\x6C","\x3C\x68\x65\x61\x64\x3E","\x67\x65\x74\x4F\x75\x74\x65\x72\x48\x74\x6D\x6C","\x3C\x2F\x68\x65\x61\x64\x3E","\x3C\x2F\x68\x74\x6D\x6C\x3E","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x2C","\x6F\x77\x6E\x65\x72\x53\x56\x47\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x68\x6F\x77","\x70\x72\x69\x6E\x74","\x36\x33\x36\x70\x78","\x34\x36\x30\x70\x78","\x70\x72\x65","\x26\x6E\x62\x73\x70\x3B","\x3C\x62\x72\x3E","\x50\x6F\x70\x75\x70\x20\x57\x69\x6E\x64\x6F\x77","\x3C\x70\x72\x65\x3E","\x3C\x2F\x70\x72\x65","\x70\x61\x64\x64\x69\x6E\x67","\x32\x30\x70\x78","\x65\x72\x72\x6F\x72\x49\x6D\x61\x67\x65","\x76\x61\x6C\x69\x67\x6E","\x62\x6F\x74\x74\x6F\x6D","\x6D\x69\x64\x64\x6C\x65","\xA0","\x65\x72\x72\x6F\x72\x52\x65\x73\x6F\x75\x72\x63\x65","\x66\x6C\x6F\x61\x74\x3A\x72\x69\x67\x68\x74","\x63\x6C\x6F\x73\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x64\x72\x61\x67\x4F\x66\x66\x73\x65\x74","\x54\x4F\x4F\x4C\x54\x49\x50\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x4F\x46\x46\x53\x45\x54","\x61\x75\x74\x6F\x73\x63\x72\x6F\x6C\x6C","\x73\x65\x74\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x68\x69\x67\x68\x6C\x69\x67\x68\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74\x73","\x67\x65\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x67\x65\x74\x47\x72\x61\x70\x68\x46\x6F\x72\x45\x76\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x45\x6C\x65\x6D\x65\x6E\x74","\x65\x78\x61\x63\x74","\x66\x61\x73\x74\x65\x72","\x66\x61\x73\x74\x65\x73\x74","\x73\x76\x67","\x76\x6D\x6C","\x6D\x69\x78\x65\x64\x48\x74\x6D\x6C","\x70\x72\x65\x66\x65\x72\x48\x74\x6D\x6C","\x73\x74\x72\x69\x63\x74\x48\x74\x6D\x6C","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x32\x30\x30\x30\x2F\x73\x76\x67","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x68\x74\x6D\x6C","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x6C\x69\x6E\x6B","\x67\x72\x61\x79","\x23\x30\x30\x46\x46\x30\x30","\x23\x46\x46\x30\x30\x30\x30","\x6D\x6F\x76\x65","\x64\x65\x66\x61\x75\x6C\x74","\x23\x30\x30\x30\x30\x46\x46","\x23\x30\x30\x39\x39\x46\x46","\x62\x6C\x61\x63\x6B","\x79\x65\x6C\x6C\x6F\x77","\x23\x30\x30\x46\x46\x46\x46","\x23\x30\x30\x33\x33\x46\x46","\x41\x72\x69\x61\x6C\x2C\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x70\x65\x72\x69\x6D\x65\x74\x65\x72","\x73\x6F\x75\x72\x63\x65\x50\x6F\x72\x74","\x74\x61\x72\x67\x65\x74\x50\x6F\x72\x74","\x70\x6F\x72\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x74\x65\x78\x74\x4F\x70\x61\x63\x69\x74\x79","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C","\x65\x78\x69\x74\x58","\x65\x78\x69\x74\x59","\x65\x78\x69\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x65\x6E\x74\x72\x79\x58","\x65\x6E\x74\x72\x79\x59","\x65\x6E\x74\x72\x79\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x66\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x46\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x67\x72\x61\x64\x69\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x67\x72\x61\x64\x69\x65\x6E\x74\x44\x69\x72\x65\x63\x74\x69\x6F\x6E","\x73\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x73\x65\x70\x61\x72\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72","\x73\x74\x72\x6F\x6B\x65\x57\x69\x64\x74\x68","\x61\x6C\x69\x67\x6E","\x6C\x61\x62\x65\x6C\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x65\x72\x74\x69\x63\x61\x6C\x4C\x61\x62\x65\x6C\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x69\x6D\x61\x67\x65\x41\x73\x70\x65\x63\x74","\x69\x6D\x61\x67\x65\x41\x6C\x69\x67\x6E","\x69\x6D\x61\x67\x65\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x67\x6C\x61\x73\x73","\x69\x6D\x61\x67\x65","\x69\x6D\x61\x67\x65\x57\x69\x64\x74\x68","\x69\x6D\x61\x67\x65\x48\x65\x69\x67\x68\x74","\x69\x6D\x61\x67\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x69\x6D\x61\x67\x65\x42\x6F\x72\x64\x65\x72","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x6E\x6F\x4C\x61\x62\x65\x6C","\x6E\x6F\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x61\x62\x65\x6C\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x6C\x61\x62\x65\x6C\x42\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x6C\x61\x62\x65\x6C\x50\x61\x64\x64\x69\x6E\x67","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x68\x61\x70\x65","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x49\x6D\x61\x67\x65","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x47\x72\x61\x64\x69\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x70\x61\x63\x69\x6E\x67","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x57\x69\x64\x74\x68","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x48\x65\x69\x67\x68\x74","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x44\x69\x72\x65\x63\x74\x69\x6F\x6E","\x73\x68\x61\x64\x6F\x77","\x73\x65\x67\x6D\x65\x6E\x74","\x65\x6E\x64\x41\x72\x72\x6F\x77","\x73\x74\x61\x72\x74\x41\x72\x72\x6F\x77","\x65\x6E\x64\x53\x69\x7A\x65","\x73\x74\x61\x72\x74\x53\x69\x7A\x65","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x4C\x69\x6E\x65","\x65\x6E\x64\x46\x69\x6C\x6C","\x73\x74\x61\x72\x74\x46\x69\x6C\x6C","\x64\x61\x73\x68\x65\x64","\x64\x61\x73\x68\x50\x61\x74\x74\x65\x72\x6E","\x72\x6F\x75\x6E\x64\x65\x64","\x63\x75\x72\x76\x65\x64","\x61\x72\x63\x53\x69\x7A\x65","\x73\x6D\x6F\x6F\x74\x68","\x73\x6F\x75\x72\x63\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x53\x70\x61\x63\x69\x6E\x67","\x74\x61\x72\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x53\x70\x61\x63\x69\x6E\x67","\x70\x65\x72\x69\x6D\x65\x74\x65\x72\x53\x70\x61\x63\x69\x6E\x67","\x73\x70\x61\x63\x69\x6E\x67","\x73\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x73\x70\x61\x63\x69\x6E\x67\x4C\x65\x66\x74","\x73\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x73\x70\x61\x63\x69\x6E\x67\x52\x69\x67\x68\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x65\x6C\x62\x6F\x77","\x66\x6F\x6E\x74\x43\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x53\x74\x79\x6C\x65","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x66\x6F\x6C\x64\x61\x62\x6C\x65","\x65\x64\x69\x74\x61\x62\x6C\x65","\x62\x65\x6E\x64\x61\x62\x6C\x65","\x6D\x6F\x76\x61\x62\x6C\x65","\x72\x65\x73\x69\x7A\x61\x62\x6C\x65","\x63\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x64\x65\x6C\x65\x74\x61\x62\x6C\x65","\x65\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x6F\x6F\x70\x53\x74\x79\x6C\x65","\x72\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x58","\x72\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x59","\x72\x65\x63\x74\x61\x6E\x67\x6C\x65","\x65\x6C\x6C\x69\x70\x73\x65","\x64\x6F\x75\x62\x6C\x65\x45\x6C\x6C\x69\x70\x73\x65","\x72\x68\x6F\x6D\x62\x75\x73","\x6C\x69\x6E\x65","\x61\x72\x72\x6F\x77","\x6C\x61\x62\x65\x6C","\x63\x79\x6C\x69\x6E\x64\x65\x72","\x73\x77\x69\x6D\x6C\x61\x6E\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x61\x63\x74\x6F\x72","\x63\x6C\x6F\x75\x64","\x74\x72\x69\x61\x6E\x67\x6C\x65","\x68\x65\x78\x61\x67\x6F\x6E","\x63\x6C\x61\x73\x73\x69\x63","\x62\x6C\x6F\x63\x6B","\x6F\x76\x61\x6C","\x64\x69\x61\x6D\x6F\x6E\x64","\x64\x69\x61\x6D\x6F\x6E\x64\x54\x68\x69\x6E","\x63\x65\x6E\x74\x65\x72","\x72\x69\x67\x68\x74","\x6E\x6F\x72\x74\x68","\x73\x6F\x75\x74\x68","\x65\x61\x73\x74","\x77\x65\x73\x74","\x76\x65\x72\x74\x69\x63\x61\x6C","\x65\x6C\x62\x6F\x77\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x6F\x6F\x70\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x73\x69\x64\x65\x54\x6F\x53\x69\x64\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x74\x6F\x70\x54\x6F\x42\x6F\x74\x74\x6F\x6D\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x73\x65\x67\x6D\x65\x6E\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x65\x6C\x6C\x69\x70\x73\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x72\x65\x63\x74\x61\x6E\x67\x6C\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x72\x68\x6F\x6D\x62\x75\x73\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x74\x72\x69\x61\x6E\x67\x6C\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x63\x6F\x6E\x73\x75\x6D\x65\x64","\x67\x65\x74\x4E\x61\x6D\x65","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x63\x6F\x6E\x73\x75\x6D\x65","\x65\x76\x74","\x73\x74\x61\x74\x65","\x67\x72\x61\x70\x68\x58","\x67\x72\x61\x70\x68\x59","\x67\x65\x74\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x6F\x75\x72\x63\x65","\x69\x73\x53\x6F\x75\x72\x63\x65","\x67\x65\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x59","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x67\x65\x74\x43\x65\x6C\x6C","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74","\x72\x65\x74\x75\x72\x6E\x56\x61\x6C\x75\x65","\x73\x65\x74\x45\x76\x65\x6E\x74\x53\x6F\x75\x72\x63\x65","\x65\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x65\x76\x65\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x65\x76\x65\x6E\x74\x53\x6F\x75\x72\x63\x65","\x67\x65\x74\x45\x76\x65\x6E\x74\x53\x6F\x75\x72\x63\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x6F\x6E","\x66","\x72\x65\x6D\x6F\x76\x65\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x64\x65\x74\x61\x63\x68\x45\x76\x65\x6E\x74","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x75\x70","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x74\x6F\x75\x63\x68\x73\x74\x61\x72\x74","\x74\x6F\x75\x63\x68\x6D\x6F\x76\x65","\x74\x6F\x75\x63\x68\x65\x6E\x64","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x64\x62\x6C\x63\x6C\x69\x63\x6B","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x72\x65\x6C\x65\x61\x73\x65","\x65\x76\x65\x6E\x74","\x64\x65\x74\x61\x69\x6C","\x77\x68\x65\x65\x6C\x44\x65\x6C\x74\x61","\x6D\x6F\x75\x73\x65\x77\x68\x65\x65\x6C","\x44\x4F\x4D\x4D\x6F\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C","\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x6F\x6E\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B","\x73\x72\x63\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x61\x72\x67\x65\x74","\x69\x73\x52\x69\x67\x68\x74\x4D\x6F\x75\x73\x65\x42\x75\x74\x74\x6F\x6E","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x73\x68\x69\x66\x74\x4B\x65\x79","\x61\x6C\x74\x4B\x65\x79","\x63\x74\x72\x6C\x4B\x65\x79","\x6D\x65\x74\x61\x4B\x65\x79","\x74\x6F\x75\x63\x68\x65\x73","\x63\x68\x61\x6E\x67\x65\x64\x54\x6F\x75\x63\x68\x65\x73","\x63\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x4D\x61\x69\x6E\x45\x76\x65\x6E\x74","\x63\x6C\x69\x65\x6E\x74\x59","\x73\x74\x6F\x70\x50\x72\x6F\x70\x61\x67\x61\x74\x69\x6F\x6E","\x63\x61\x6E\x63\x65\x6C\x42\x75\x62\x62\x6C\x65","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x55\x70","\x61\x63\x74\x69\x76\x61\x74\x65","\x72\x65\x73\x69\x7A\x65\x53\x74\x61\x72\x74","\x72\x65\x73\x69\x7A\x65\x45\x6E\x64","\x6D\x6F\x76\x65\x53\x74\x61\x72\x74","\x6D\x6F\x76\x65\x45\x6E\x64","\x70\x61\x6E\x53\x74\x61\x72\x74","\x70\x61\x6E","\x70\x61\x6E\x45\x6E\x64","\x6D\x69\x6E\x69\x6D\x69\x7A\x65","\x6E\x6F\x72\x6D\x61\x6C\x69\x7A\x65","\x6D\x61\x78\x69\x6D\x69\x7A\x65","\x68\x69\x64\x65","\x72\x65\x66\x72\x65\x73\x68","\x73\x69\x7A\x65","\x73\x65\x6C\x65\x63\x74","\x66\x69\x72\x65\x64","\x72\x65\x63\x65\x69\x76\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x75\x73\x70\x65\x6E\x64","\x72\x65\x73\x75\x6D\x65","\x6D\x61\x72\x6B","\x73\x65\x73\x73\x69\x6F\x6E","\x72\x6F\x6F\x74","\x70\x6F\x73\x74","\x73\x61\x76\x65","\x62\x65\x66\x6F\x72\x65\x41\x64\x64\x56\x65\x72\x74\x65\x78","\x61\x64\x64\x56\x65\x72\x74\x65\x78","\x61\x66\x74\x65\x72\x41\x64\x64\x56\x65\x72\x74\x65\x78","\x64\x6F\x6E\x65","\x65\x78\x65\x63\x75\x74\x65\x64","\x73\x74\x61\x72\x74\x45\x64\x69\x74","\x65\x6E\x64\x45\x64\x69\x74","\x62\x65\x66\x6F\x72\x65\x55\x6E\x64\x6F","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x68\x61\x6E\x67\x65","\x6E\x6F\x74\x69\x66\x79","\x6C\x61\x79\x6F\x75\x74\x43\x65\x6C\x6C\x73","\x73\x63\x61\x6C\x65\x41\x6E\x64\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x75\x70","\x64\x6F\x77\x6E","\x61\x64\x64\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x41\x64\x64\x65\x64","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x4D\x6F\x76\x65\x64","\x72\x65\x73\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x65\x64","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x54\x6F\x67\x67\x6C\x65\x64","\x6F\x72\x64\x65\x72\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x4F\x72\x64\x65\x72\x65\x64","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x52\x65\x6D\x6F\x76\x65\x64","\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x75\x6E\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x63\x65\x6C\x6C\x73\x46\x6F\x6C\x64\x65\x64","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73","\x6C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x43\x65\x6C\x6C","\x63\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x73\x70\x6C\x69\x74\x45\x64\x67\x65","\x66\x6C\x69\x70\x45\x64\x67\x65","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67","\x61\x64\x64\x4F\x76\x65\x72\x6C\x61\x79","\x72\x65\x6D\x6F\x76\x65\x4F\x76\x65\x72\x6C\x61\x79","\x75\x70\x64\x61\x74\x65\x43\x65\x6C\x6C\x53\x69\x7A\x65","\x65\x73\x63\x61\x70\x65","\x64\x6F\x75\x62\x6C\x65\x43\x6C\x69\x63\x6B","\x73\x74\x61\x72\x74","\x72\x65\x73\x65\x74","\x75\x72\x6C","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x74\x68\x6F\x64","\x50\x4F\x53\x54","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x62\x69\x6E\x61\x72\x79","\x72\x65\x71\x75\x65\x73\x74","\x69\x73\x42\x69\x6E\x61\x72\x79","\x73\x65\x74\x42\x69\x6E\x61\x72\x79","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x65\x78\x74","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x58\x6D\x6C","\x72\x65\x73\x70\x6F\x6E\x73\x65\x58\x4D\x4C","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x58\x4D\x4C\x48\x74\x74\x70\x52\x65\x71\x75\x65\x73\x74","\x6F\x76\x65\x72\x72\x69\x64\x65\x4D\x69\x6D\x65\x54\x79\x70\x65","\x74\x65\x78\x74\x2F\x70\x6C\x61\x69\x6E\x3B\x20\x63\x68\x61\x72\x73\x65\x74\x3D\x78\x2D\x75\x73\x65\x72\x2D\x64\x65\x66\x69\x6E\x65\x64","\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x58\x4D\x4C\x48\x54\x54\x50","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x61\x6E\x67\x65","\x62\x69\x6E\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72\x73","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x6F\x6E\x62\x65\x66\x6F\x72\x65\x75\x6E\x6C\x6F\x61\x64","\x66\x6F\x72\x6D","\x61\x63\x74\x69\x6F\x6E","\x26","\x73\x75\x62\x6D\x69\x74","\x63\x65\x6C\x6C\x73","\x69\x6E\x73\x65\x72\x74\x43\x6F\x75\x6E\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x67\x65\x74\x45\x78\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x73","\x67\x65\x74\x49\x6D\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x53\x54\x45\x50\x53\x49\x5A\x45","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x69\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x6F\x6E\x74\x65\x6E\x74","\x69\x6E\x73\x74\x61\x6C\x6C\x4D\x61\x78\x69\x6D\x69\x7A\x65\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x4D\x69\x6E\x69\x6D\x69\x7A\x65\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x43\x6C\x6F\x73\x65\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x4D\x69\x6E\x69\x6D\x69\x7A\x61\x62\x6C\x65","\x73\x65\x74\x54\x69\x74\x6C\x65","\x69\x6E\x73\x74\x61\x6C\x6C\x4D\x6F\x76\x65\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x70\x6C\x61\x63\x65\x43\x68\x69\x6C\x64","\x63\x6C\x6F\x73\x65\x49\x6D\x61\x67\x65","\x2F\x63\x6C\x6F\x73\x65\x2E\x67\x69\x66","\x6D\x69\x6E\x69\x6D\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x6D\x69\x6E\x69\x6D\x69\x7A\x65\x2E\x67\x69\x66","\x6E\x6F\x72\x6D\x61\x6C\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x6E\x6F\x72\x6D\x61\x6C\x69\x7A\x65\x2E\x67\x69\x66","\x6D\x61\x78\x69\x6D\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x6D\x61\x78\x69\x6D\x69\x7A\x65\x2E\x67\x69\x66","\x72\x65\x73\x69\x7A\x65\x49\x6D\x61\x67\x65","\x2F\x72\x65\x73\x69\x7A\x65\x2E\x67\x69\x66","\x6D\x69\x6E\x69\x6D\x75\x6D\x53\x69\x7A\x65","\x74\x69\x74\x6C\x65","\x6D\x78\x57\x69\x6E\x64\x6F\x77","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x54\x69\x74\x6C\x65","\x50\x61\x6E\x65","\x63\x6F\x6E\x74\x65\x6E\x74\x57\x72\x61\x70\x70\x65\x72","\x61\x63\x74\x69\x76\x65\x57\x69\x6E\x64\x6F\x77","\x7A\x49\x6E\x64\x65\x78","\x70\x72\x65\x76\x69\x6F\x75\x73\x57\x69\x6E\x64\x6F\x77","\x66\x69\x74","\x69\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x32\x70\x78","\x6E\x77\x2D\x72\x65\x73\x69\x7A\x65","\x73\x65\x74\x53\x69\x7A\x65","\x72\x65\x6D\x6F\x76\x65\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x67\x65\x74\x4D\x69\x6E\x69\x6D\x75\x6D\x53\x69\x7A\x65","\x4D\x69\x6E\x69\x6D\x69\x7A\x65","\x6D\x61\x72\x67\x69\x6E\x52\x69\x67\x68\x74","\x31\x70\x78","\x4E\x6F\x72\x6D\x61\x6C\x69\x7A\x65","\x4D\x61\x78\x69\x6D\x69\x7A\x65","\x6D\x61\x72\x67\x69\x6E\x4C\x65\x66\x74","\x30\x70\x78","\x73\x65\x74\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x63\x6C\x6F\x73\x65\x49\x6D\x67","\x43\x6C\x6F\x73\x65","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x73\x65\x74\x49\x6D\x61\x67\x65","\x34\x70\x78","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x2D\x32\x70\x78","\x67\x65\x74\x54\x61\x62\x6C\x65","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E\x73","\x6F\x6B","\x4F\x4B","\x63\x61\x6E\x63\x65\x6C","\x43\x61\x6E\x63\x65\x6C","\x61\x64\x64\x54\x65\x78\x74","\x69\x6E\x70\x75\x74","\x74\x65\x78\x74","\x61\x64\x64\x46\x69\x65\x6C\x64","\x61\x64\x64\x43\x68\x65\x63\x6B\x62\x6F\x78","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x63\x68\x65\x63\x6B\x65\x64","\x61\x64\x64\x54\x65\x78\x74\x61\x72\x65\x61","\x72\x6F\x77\x73","\x61\x64\x64\x43\x6F\x6D\x62\x6F","\x6D\x75\x6C\x74\x69\x70\x6C\x65","\x61\x64\x64\x4F\x70\x74\x69\x6F\x6E","\x6F\x70\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64","\x72\x65\x73\x69\x7A\x65\x57\x69\x64\x74\x68","\x72\x65\x73\x69\x7A\x65\x48\x65\x69\x67\x68\x74","\x68\x61\x6E\x64\x6C\x69\x6E\x67\x52\x65\x73\x69\x7A\x65","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x57\x69\x64\x74\x68","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x65\x6C\x65\x6D\x65\x6E\x74","\x64\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x64\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74","\x70\x72\x65\x76\x69\x65\x77\x45\x6C\x65\x6D\x65\x6E\x74","\x65\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x47\x72\x61\x70\x68","\x63\x75\x72\x72\x65\x6E\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x63\x75\x72\x72\x65\x6E\x74\x50\x6F\x69\x6E\x74","\x63\x75\x72\x72\x65\x6E\x74\x47\x75\x69\x64\x65","\x63\x75\x72\x72\x65\x6E\x74\x48\x69\x67\x68\x6C\x69\x67\x68\x74","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x64\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74\x5A\x49\x6E\x64\x65\x78","\x64\x72\x61\x67\x45\x6C\x65\x6D\x65\x6E\x74\x4F\x70\x61\x63\x69\x74\x79","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C\x41\x74","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65\x48\x61\x6E\x64\x6C\x65\x72","\x73\x74\x61\x72\x74\x44\x72\x61\x67","\x6D\x6F\x75\x73\x65\x55\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x74\x6F\x70\x44\x72\x61\x67","\x67\x72\x61\x70\x68\x43\x6F\x6E\x74\x61\x69\x6E\x73\x45\x76\x65\x6E\x74","\x64\x72\x61\x67\x45\x78\x69\x74","\x64\x72\x61\x67\x45\x6E\x74\x65\x72","\x64\x72\x61\x67\x4F\x76\x65\x72","\x64\x72\x6F\x70","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x67\x65\x74\x47\x75\x69\x64\x65\x53\x74\x61\x74\x65\x73","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x61\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x61\x75\x74\x6F\x45\x78\x74\x65\x6E\x64","\x73\x63\x72\x6F\x6C\x6C\x50\x6F\x69\x6E\x74\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x69\x73\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x68\x69\x67\x68\x6C\x69\x67\x68\x74","\x33","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64\x45\x76\x65\x6E\x74","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x72\x69\x64\x53\x69\x7A\x65","\x73\x6E\x61\x70","\x70\x72\x65\x76\x69\x65\x77\x4F\x66\x66\x73\x65\x74","\x6E\x6F\x52\x65\x73\x65\x74","\x75\x70\x64\x61\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x4D\x6F\x64\x65","\x61\x64\x64\x49\x74\x65\x6D","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x4D\x6F\x64\x65","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x49\x74\x65\x6D","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x6D\x65\x6E\x75","\x63\x75\x72\x72\x65\x6E\x74\x49\x6D\x67","\x69\x73\x4D\x65\x6E\x75\x53\x68\x6F\x77\x69\x6E\x67","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x53\x65\x6C\x65\x63\x74\x65\x64","\x6D\x6F\x75\x73\x65\x6F\x75\x74","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6D\x62\x6F\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6D\x78\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6D\x62\x6F","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x43\x6F\x6D\x62\x6F","\x73\x65\x6C\x65\x63\x74\x65\x64\x49\x6E\x64\x65\x78","\x6F\x70\x74\x69\x6F\x6E\x73","\x66\x75\x6E\x63\x74","\x61\x64\x64\x53\x77\x69\x74\x63\x68\x4D\x6F\x64\x65","\x69\x6E\x69\x74\x69\x61\x6C\x43\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x61\x6C\x74\x49\x63\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64\x4D\x6F\x64\x65","\x64\x65\x66\x61\x75\x6C\x74\x4D\x6F\x64\x65","\x73\x65\x6C\x65\x63\x74\x4D\x6F\x64\x65","\x61\x64\x64\x4D\x6F\x64\x65","\x64\x65\x66\x61\x75\x6C\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x72\x65\x73\x65\x74\x4D\x6F\x64\x65","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x61\x64\x64\x42\x72\x65\x61\x6B","\x61\x64\x64\x4C\x69\x6E\x65","\x68\x72","\x36\x70\x78","\x75\x72\x6C\x49\x6E\x69\x74","\x75\x72\x6C\x50\x6F\x6C\x6C","\x75\x72\x6C\x4E\x6F\x74\x69\x66\x79","\x63\x6F\x64\x65\x63","\x6C\x6F\x6F\x6B\x75\x70","\x65\x64\x69\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x73\x75\x73\x70\x65\x6E\x64\x65\x64","\x3C\x65\x64\x69\x74\x3E","\x63\x68\x61\x6E\x67\x65\x73","\x75\x6E\x64\x6F\x6E\x65","\x65\x6E\x63\x6F\x64\x65\x43\x68\x61\x6E\x67\x65\x73","\x3C\x2F\x65\x64\x69\x74\x3E","\x6C\x69\x6E\x65\x66\x65\x65\x64","\x65\x73\x63\x61\x70\x65\x50\x6F\x73\x74\x44\x61\x74\x61","\x73\x69\x67\x6E\x69\x66\x69\x63\x61\x6E\x74\x52\x65\x6D\x6F\x74\x65\x43\x68\x61\x6E\x67\x65\x73","\x73\x65\x6E\x74","\x72\x65\x63\x65\x69\x76\x65\x64","\x70\x6F\x6C\x6C\x69\x6E\x67","\x70\x6F\x6C\x6C","\x73\x74\x6F\x70","\x72\x65\x61\x73\x6F\x6E","\x6D\x78\x53\x65\x73\x73\x69\x6F\x6E\x2E\x6E\x6F\x74\x69\x66\x79\x3A\x20","\x20\x78\x6D\x6C\x3D","\x3C\x6D\x65\x73\x73\x61\x67\x65\x3E\x3C\x64\x65\x6C\x74\x61\x3E","\x3C\x2F\x64\x65\x6C\x74\x61\x3E\x3C\x2F\x6D\x65\x73\x73\x61\x67\x65\x3E","\x78\x6D\x6C\x3D","\x69\x73\x56\x61\x6C\x69\x64\x52\x65\x73\x70\x6F\x6E\x73\x65","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x3A\x20","\x52\x65\x73\x70\x6F\x6E\x73\x65\x20\x6E\x6F\x74\x20\x72\x65\x61\x64\x79","\x54\x72\x61\x6E\x73\x6D\x69\x73\x73\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x3C\x3F\x70\x68\x70","\x6E\x61\x6D\x65\x73\x70\x61\x63\x65","\x70\x72\x65\x66\x69\x78","\x70\x72\x6F\x63\x65\x73\x73\x53\x74\x61\x74\x65","\x64\x65\x6C\x74\x61","\x70\x72\x6F\x63\x65\x73\x73\x44\x65\x6C\x74\x61","\x64\x65\x63\x6F\x64\x65","\x70\x72\x6F\x63\x65\x73\x73\x45\x64\x69\x74","\x64\x65\x63\x6F\x64\x65\x43\x68\x61\x6E\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x55\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74","\x73\x6F\x75\x72\x63\x65","\x64\x65\x63\x6F\x64\x65\x43\x68\x61\x6E\x67\x65","\x6D\x78\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x6D\x78\x43\x68\x69\x6C\x64\x43\x68\x61\x6E\x67\x65","\x70\x61\x72\x65\x6E\x74","\x63\x65\x6C\x6C\x52\x65\x6D\x6F\x76\x65\x64","\x67\x65\x74\x49\x64","\x70\x75\x74\x4F\x62\x6A\x65\x63\x74","\x73\x69\x67\x6E\x69\x66\x69\x63\x61\x6E\x74","\x72\x65\x64\x6F\x6E\x65","\x69\x73\x45\x6D\x70\x74\x79","\x69\x73\x53\x69\x67\x6E\x69\x66\x69\x63\x61\x6E\x74","\x64\x69\x65","\x68\x69\x73\x74\x6F\x72\x79","\x69\x6E\x64\x65\x78\x4F\x66\x4E\x65\x78\x74\x41\x64\x64","\x63\x61\x6E\x55\x6E\x64\x6F","\x63\x61\x6E\x52\x65\x64\x6F","\x75\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74\x48\x61\x70\x70\x65\x6E\x65\x64","\x73\x68\x69\x66\x74","\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65","\x69\x73\x52\x65\x6C\x61\x74\x69\x76\x65\x55\x72\x6C","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x2F\x2F","\x68\x6F\x73\x74","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x74\x68\x72\x65\x61\x64","\x61\x63\x74\x69\x76\x65","\x64\x79","\x64\x78","\x74\x30\x79","\x74\x30\x78","\x74\x64\x79","\x74\x64\x78","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x64\x64\x4D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x70\x61\x6E\x47\x72\x61\x70\x68","\x70\x61\x6E\x44\x78","\x70\x61\x6E\x44\x79","\x67\x65\x74\x44\x78","\x67\x65\x74\x44\x79","\x64\x65\x6C\x61\x79","\x73\x65\x74\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x73\x41\x63\x74\x69\x76\x65","\x70\x61\x6E\x54\x6F","\x68\x61\x6E\x64\x6C\x65\x4D\x6F\x75\x73\x65\x4F\x75\x74","\x64\x61\x6D\x70\x65\x72","\x63\x6C\x65\x61\x72\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x4D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x73\x75\x62\x6D\x65\x6E\x75\x49\x6D\x61\x67\x65","\x2F\x73\x75\x62\x6D\x65\x6E\x75\x2E\x67\x69\x66","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x6F\x70\x75\x70","\x69\x74\x65\x6D\x43\x6F\x75\x6E\x74","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x73\x6D\x61\x72\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72\x73","\x6C\x61\x62\x65\x6C\x73","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x64\x69\x73\x61\x62\x6C\x65\x43\x6F\x6E\x74\x65\x78\x74\x4D\x65\x6E\x75","\x69\x73\x4C\x65\x66\x74\x4D\x6F\x75\x73\x65\x42\x75\x74\x74\x6F\x6E","\x77\x69\x6C\x6C\x41\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x49\x74\x65\x6D\x73","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75\x49\x74\x65\x6D","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75\x49\x63\x6F\x6E","\x20\x64\x69\x73\x61\x62\x6C\x65\x64","\x70\x61\x64\x64\x69\x6E\x67\x52\x69\x67\x68\x74","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x72\x65\x61\x74\x65\x53\x75\x62\x6D\x65\x6E\x75","\x65\x76\x65\x6E\x74\x52\x65\x63\x65\x69\x76\x65\x72","\x61\x63\x74\x69\x76\x65\x52\x6F\x77","\x68\x69\x64\x65\x53\x75\x62\x6D\x65\x6E\x75","\x73\x68\x6F\x77\x53\x75\x62\x6D\x65\x6E\x75","\x6D\x78\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75\x49\x74\x65\x6D\x48\x6F\x76\x65\x72","\x30\x20\x30\x20\x30\x20\x30\x70\x78","\x63\x6F\x6C\x53\x70\x61\x6E","\x32","\x73\x68\x6F\x77\x4D\x65\x6E\x75","\x63\x68\x61\x6E\x67\x65\x48\x61\x6E\x64\x6C\x65\x72","\x67\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x73\x65\x74\x47\x72\x61\x70\x68","\x67\x72\x61\x70\x68","\x61\x75\x74\x6F\x53\x61\x76\x65\x44\x65\x6C\x61\x79","\x61\x75\x74\x6F\x53\x61\x76\x65\x54\x68\x72\x6F\x74\x74\x6C\x65","\x61\x75\x74\x6F\x53\x61\x76\x65\x54\x68\x72\x65\x73\x68\x6F\x6C\x64","\x69\x67\x6E\x6F\x72\x65\x64\x43\x68\x61\x6E\x67\x65\x73","\x6C\x61\x73\x74\x53\x6E\x61\x70\x73\x68\x6F\x74","\x73\x74\x61\x72\x74\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x73\x74\x6F\x70\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x73\x74\x65\x70\x73","\x65\x61\x73\x65","\x73\x74\x65\x70","\x61\x6E\x69\x6D\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x44\x65\x6C\x74\x61","\x69\x73\x56\x65\x72\x74\x65\x78","\x6D\x6F\x76\x65\x53\x74\x61\x74\x65","\x73\x74\x6F\x70\x52\x65\x63\x75\x72\x73\x69\x6F\x6E","\x67\x65\x74\x4F\x72\x69\x67\x69\x6E\x46\x6F\x72\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x69\x6D\x61\x67\x65\x73","\x61\x6C\x74","\x70\x75\x74\x49\x6D\x61\x67\x65","\x67\x65\x74\x49\x6D\x61\x67\x65","\x66\x61\x6C\x6C\x62\x61\x63\x6B","\x69\x6E\x63\x6C\x75\x64\x65\x4F\x76\x65\x72\x6C\x61\x79\x73","\x64\x72\x61\x77\x53\x74\x61\x74\x65","\x64\x72\x61\x77\x43\x65\x6C\x6C\x53\x74\x61\x74\x65","\x76\x69\x73\x69\x74\x53\x74\x61\x74\x65\x73\x52\x65\x63\x75\x72\x73\x69\x76\x65","\x64\x72\x61\x77\x4F\x76\x65\x72\x6C\x61\x79\x73","\x70\x61\x69\x6E\x74","\x72\x65\x73\x74\x6F\x72\x65","\x6F\x76\x65\x72\x6C\x61\x79\x73","\x63\x6F\x6E\x76\x65\x72\x74\x65\x72","\x63\x72\x65\x61\x74\x65\x55\x72\x6C\x43\x6F\x6E\x76\x65\x72\x74\x65\x72","\x73\x74\x61\x74\x65\x73","\x70\x61\x74\x68","\x72\x6F\x74\x61\x74\x65\x48\x74\x6D\x6C","\x6C\x61\x73\x74\x58","\x6C\x61\x73\x74\x59","\x6D\x6F\x76\x65\x4F\x70","\x4D","\x6C\x69\x6E\x65\x4F\x70","\x4C","\x71\x75\x61\x64\x4F\x70","\x51","\x63\x75\x72\x76\x65\x4F\x70","\x43","\x63\x6C\x6F\x73\x65\x4F\x70","\x5A","\x70\x6F\x69\x6E\x74\x65\x72\x45\x76\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65","\x33\x20\x33","\x66\x6C\x61\x74","\x6D\x69\x74\x65\x72","\x23\x30\x30\x30\x30\x30\x30","\x53\x48\x41\x44\x4F\x57\x43\x4F\x4C\x4F\x52","\x53\x48\x41\x44\x4F\x57\x5F\x4F\x50\x41\x43\x49\x54\x59","\x53\x48\x41\x44\x4F\x57\x5F\x4F\x46\x46\x53\x45\x54\x5F\x58","\x53\x48\x41\x44\x4F\x57\x5F\x4F\x46\x46\x53\x45\x54\x5F\x59","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x4F\x70","\x72\x6F\x74\x61\x74\x65\x50\x6F\x69\x6E\x74","\x70\x6F\x70","\x73\x65\x74\x41\x6C\x70\x68\x61","\x61\x6C\x70\x68\x61","\x73\x65\x74\x46\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x47\x72\x61\x64\x69\x65\x6E\x74","\x66\x69\x6C\x6C\x41\x6C\x70\x68\x61","\x67\x72\x61\x64\x69\x65\x6E\x74\x41\x6C\x70\x68\x61","\x73\x65\x74\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x53\x74\x72\x6F\x6B\x65\x57\x69\x64\x74\x68","\x73\x65\x74\x44\x61\x73\x68\x65\x64","\x73\x65\x74\x44\x61\x73\x68\x50\x61\x74\x74\x65\x72\x6E","\x73\x65\x74\x4C\x69\x6E\x65\x43\x61\x70","\x6C\x69\x6E\x65\x43\x61\x70","\x73\x65\x74\x4C\x69\x6E\x65\x4A\x6F\x69\x6E","\x6C\x69\x6E\x65\x4A\x6F\x69\x6E","\x73\x65\x74\x4D\x69\x74\x65\x72\x4C\x69\x6D\x69\x74","\x6D\x69\x74\x65\x72\x4C\x69\x6D\x69\x74","\x73\x65\x74\x46\x6F\x6E\x74\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x46\x6F\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x46\x6F\x6E\x74\x42\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x42\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x46\x6F\x6E\x74\x53\x69\x7A\x65","\x73\x65\x74\x46\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x73\x65\x74\x46\x6F\x6E\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x68\x61\x64\x6F\x77","\x73\x65\x74\x53\x68\x61\x64\x6F\x77\x43\x6F\x6C\x6F\x72","\x73\x68\x61\x64\x6F\x77\x43\x6F\x6C\x6F\x72","\x73\x65\x74\x53\x68\x61\x64\x6F\x77\x41\x6C\x70\x68\x61","\x73\x68\x61\x64\x6F\x77\x41\x6C\x70\x68\x61","\x73\x65\x74\x53\x68\x61\x64\x6F\x77\x4F\x66\x66\x73\x65\x74","\x73\x68\x61\x64\x6F\x77\x44\x78","\x73\x68\x61\x64\x6F\x77\x44\x79","\x62\x65\x67\x69\x6E","\x6D\x6F\x76\x65\x54\x6F","\x6C\x69\x6E\x65\x54\x6F","\x71\x75\x61\x64\x54\x6F","\x63\x75\x72\x76\x65\x54\x6F","\x61\x72\x63\x54\x6F","\x61\x72\x63\x54\x6F\x43\x75\x72\x76\x65\x73","\x65\x6E\x64","\x77\x72\x69\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x73","\x65\x78\x74\x65\x6E\x64","\x74\x65\x78\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6F\x6D\x70\x72\x65\x73\x73\x65\x64","\x66\x6F\x6E\x74\x66\x61\x6D\x69\x6C\x79","\x66\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x73\x69\x7A\x65","\x73\x68\x61\x64\x6F\x77\x63\x6F\x6C\x6F\x72","\x73\x68\x61\x64\x6F\x77\x61\x6C\x70\x68\x61","\x73\x68\x61\x64\x6F\x77\x6F\x66\x66\x73\x65\x74","\x74\x6F\x46\x69\x78\x65\x64","\x72\x6F\x74\x61\x74\x65","\x74\x68\x65\x74\x61","\x63\x78","\x63\x79","\x66\x69\x6C\x6C\x63\x6F\x6C\x6F\x72","\x67\x72\x61\x64\x69\x65\x6E\x74","\x63\x31","\x63\x32","\x77","\x68","\x61\x6C\x70\x68\x61\x31","\x61\x6C\x70\x68\x61\x32","\x73\x74\x72\x6F\x6B\x65\x63\x6F\x6C\x6F\x72","\x73\x74\x72\x6F\x6B\x65\x77\x69\x64\x74\x68","\x64\x61\x73\x68\x70\x61\x74\x74\x65\x72\x6E","\x70\x61\x74\x74\x65\x72\x6E","\x6C\x69\x6E\x65\x63\x61\x70","\x63\x61\x70","\x6C\x69\x6E\x65\x6A\x6F\x69\x6E","\x6D\x69\x74\x65\x72\x6C\x69\x6D\x69\x74","\x6C\x69\x6D\x69\x74","\x66\x6F\x6E\x74\x63\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x63\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x62\x6F\x72\x64\x65\x72\x63\x6F\x6C\x6F\x72","\x66\x6F\x6E\x74\x73\x74\x79\x6C\x65","\x72\x65\x63\x74","\x72\x6F\x75\x6E\x64\x72\x65\x63\x74","\x63\x6F\x6E\x76\x65\x72\x74","\x61\x73\x70\x65\x63\x74","\x71\x75\x61\x64","\x78\x31","\x79\x31","\x78\x32","\x79\x32","\x63\x75\x72\x76\x65","\x78\x33","\x79\x33","\x69\x73\x4E\x6F\x64\x65","\x73\x74\x72","\x77\x72\x61\x70","\x66\x69\x6C\x6C","\x63\x6C\x69\x70","\x73\x74\x72\x6F\x6B\x65","\x66\x69\x6C\x6C\x41\x6E\x64\x53\x74\x72\x6F\x6B\x65","\x66\x69\x6C\x6C\x73\x74\x72\x6F\x6B\x65","\x67\x72\x61\x64\x69\x65\x6E\x74\x73","\x64\x65\x66\x73","\x73\x74\x79\x6C\x65\x45\x6E\x61\x62\x6C\x65\x64","\x63\x72\x65\x61\x74\x65\x53\x74\x79\x6C\x65","\x6D\x61\x74\x63\x68\x48\x74\x6D\x6C\x41\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x66\x6F\x45\x6E\x61\x62\x6C\x65\x64","\x73\x74\x72\x6F\x6B\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x72\x65\x66\x43\x6F\x75\x6E\x74","\x62\x6C\x6F\x63\x6B\x49\x6D\x61\x67\x65\x50\x6F\x69\x6E\x74\x65\x72\x45\x76\x65\x6E\x74\x73","\x73\x76\x67\x7B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A","\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A","\x3B\x66\x69\x6C\x6C\x3A\x6E\x6F\x6E\x65\x3B\x73\x74\x72\x6F\x6B\x65\x2D\x6D\x69\x74\x65\x72\x6C\x69\x6D\x69\x74\x3A\x31\x30\x7D","\x4E\x53\x5F\x53\x56\x47","\x78\x6D\x6C\x6E\x73","\x63\x72\x65\x61\x74\x65\x47\x72\x61\x64\x69\x65\x6E\x74\x49\x64","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x53\x4F\x55\x54\x48","\x73","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x45\x41\x53\x54","\x65","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4E\x4F\x52\x54\x48","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x57\x45\x53\x54","\x6D\x78\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x2D","\x67\x65\x74\x53\x76\x67\x47\x72\x61\x64\x69\x65\x6E\x74","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x69\x64","\x63\x72\x65\x61\x74\x65\x53\x76\x67\x47\x72\x61\x64\x69\x65\x6E\x74","\x6C\x69\x6E\x65\x61\x72\x47\x72\x61\x64\x69\x65\x6E\x74","\x30\x25","\x3B\x73\x74\x6F\x70\x2D\x6F\x70\x61\x63\x69\x74\x79\x3A","\x6F\x66\x66\x73\x65\x74","\x73\x74\x6F\x70\x2D\x63\x6F\x6C\x6F\x72\x3A","\x61\x64\x64\x4E\x6F\x64\x65","\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x6C\x6C","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x75\x70\x64\x61\x74\x65\x53\x74\x72\x6F\x6B\x65","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x64\x6F\x77","\x63\x72\x65\x61\x74\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73","\x61\x6C\x6C","\x66\x69\x6C\x6C\x2D\x6F\x70\x61\x63\x69\x74\x79","\x75\x72\x6C\x28\x23","\x73\x74\x72\x6F\x6B\x65\x2D\x6F\x70\x61\x63\x69\x74\x79","\x73\x74\x72\x6F\x6B\x65\x2D\x77\x69\x64\x74\x68","\x75\x70\x64\x61\x74\x65\x53\x74\x72\x6F\x6B\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x73\x74\x72\x6F\x6B\x65\x2D\x64\x61\x73\x68\x61\x72\x72\x61\x79","\x63\x72\x65\x61\x74\x65\x44\x61\x73\x68\x50\x61\x74\x74\x65\x72\x6E","\x73\x74\x72\x6F\x6B\x65\x2D\x6C\x69\x6E\x65\x6A\x6F\x69\x6E","\x62\x75\x74\x74","\x73\x74\x72\x6F\x6B\x65\x2D\x6C\x69\x6E\x65\x63\x61\x70","\x73\x74\x72\x6F\x6B\x65\x2D\x6D\x69\x74\x65\x72\x6C\x69\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x77\x68\x69\x74\x65","\x29\x73\x63\x61\x6C\x65\x28","\x29\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x72\x6F\x74\x61\x74\x65\x28","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x43\x78","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x43\x79","\x72\x78","\x72\x79","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x53","\x78\x6C\x69\x6E\x6B\x3A\x68\x72\x65\x66","\x70\x72\x65\x73\x65\x72\x76\x65\x41\x73\x70\x65\x63\x74\x52\x61\x74\x69\x6F","\x73\x63\x61\x6C\x65\x28","\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x6E\x6F\x6E\x65","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A","\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A","\x3B\x63\x6F\x6C\x6F\x72\x3A","\x3B\x6C\x69\x6E\x65\x2D\x68\x65\x69\x67\x68\x74\x3A","\x70\x78\x3B","\x46\x4F\x4E\x54\x5F\x42\x4F\x4C\x44","\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x62\x6F\x6C\x64\x3B","\x46\x4F\x4E\x54\x5F\x49\x54\x41\x4C\x49\x43","\x66\x6F\x6E\x74\x2D\x73\x74\x79\x6C\x65\x3A\x69\x74\x61\x6C\x69\x63\x3B","\x46\x4F\x4E\x54\x5F\x55\x4E\x44\x45\x52\x4C\x49\x4E\x45","\x66\x6F\x6E\x74\x2D\x64\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E\x3A\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65\x3B","\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x3B","\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x72\x69\x67\x68\x74\x3B","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A","\x62\x6F\x72\x64\x65\x72\x3A\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20","\x26\x61\x6D\x70\x3B\x67\x74\x3B","\x26\x61\x6D\x70\x3B\x6C\x74\x3B","\x3C\x64\x69\x76\x20\x78\x6D\x6C\x6E\x73\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x68\x74\x6D\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B","\x22\x3E","\x3C\x2F\x64\x69\x76\x3E","\x3C\x68\x72\x20\x2F\x3E","\x3C\x62\x72\x20\x2F\x3E","\x3C\x64\x69\x76\x20\x78\x6D\x6C\x6E\x73\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x77\x33\x2E\x6F\x72\x67\x2F\x31\x39\x39\x39\x2F\x78\x68\x74\x6D\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22","\x68\x74\x6D\x6C","\x76\x65\x72\x74\x69\x63\x61\x6C\x2D\x61\x6C\x69\x67\x6E\x3A\x74\x6F\x70\x3B","\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x68\x69\x64\x64\x65\x6E\x3B","\x6D\x61\x78\x2D\x68\x65\x69\x67\x68\x74\x3A","\x77\x69\x64\x74\x68\x3A","\x77\x68\x69\x74\x65\x2D\x73\x70\x61\x63\x65\x3A\x6E\x6F\x72\x6D\x61\x6C\x3B","\x77\x68\x69\x74\x65\x2D\x73\x70\x61\x63\x65\x3A\x6E\x6F\x77\x72\x61\x70\x3B","\x66\x6F\x72\x65\x69\x67\x6E\x4F\x62\x6A\x65\x63\x74","\x70\x6C\x61\x69\x6E\x54\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x70","\x6D\x78\x2D\x63\x6C\x69\x70\x2D","\x63\x6C\x69\x70\x50\x61\x74\x68","\x63\x6C\x69\x70\x2D\x70\x61\x74\x68","\x75\x70\x64\x61\x74\x65\x46\x6F\x6E\x74","\x74\x65\x78\x74\x2D\x61\x6E\x63\x68\x6F\x72","\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65","\x61\x64\x64\x54\x65\x78\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74","\x62\x6F\x6C\x64","\x66\x6F\x6E\x74\x2D\x73\x74\x79\x6C\x65","\x69\x74\x61\x6C\x69\x63","\x74\x65\x78\x74\x2D\x64\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E","\x67\x65\x74\x42\x42\x6F\x78","\x66\x6F\x6E\x74\x57\x65\x69\x67\x68\x74","\x3C\x62\x72\x2F\x3E","\x6D\x6F\x64","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28\x30\x2E\x35\x2C\x20\x30\x2E\x35\x29","\x6D","\x6C","\x63","\x72\x6F\x74\x61\x74\x65\x64\x48\x74\x6D\x6C\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x76\x6D\x6C\x53\x63\x61\x6C\x65","\x20\x65","\x63\x6F\x6F\x72\x64\x73\x69\x7A\x65","\x73\x74\x72\x6F\x6B\x65\x77\x65\x69\x67\x68\x74","\x73\x74\x72\x6F\x6B\x65\x64","\x63\x72\x65\x61\x74\x65\x53\x74\x72\x6F\x6B\x65","\x63\x72\x65\x61\x74\x65\x46\x69\x6C\x6C","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x46\x69\x6C\x6C","\x66\x69\x6C\x6C\x65\x64","\x3A\x66\x69\x6C\x6C","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66","\x74\x69\x6C\x65","\x63\x6F\x6C\x6F\x72\x32","\x66\x6C\x69\x70","\x61\x6E\x67\x6C\x65","\x4F\x46\x46\x49\x43\x45\x5F\x50\x52\x45\x46\x49\x58","\x3A\x6F\x70\x61\x63\x69\x74\x79\x32","\x3A\x73\x74\x72\x6F\x6B\x65","\x65\x6E\x64\x63\x61\x70","\x6A\x6F\x69\x6E\x73\x74\x79\x6C\x65","\x31\x30","\x64\x61\x73\x68\x73\x74\x79\x6C\x65","\x67\x65\x74\x56\x6D\x6C\x44\x61\x73\x68\x53\x74\x79\x6C\x65","\x64\x61\x73\x68","\x30\x20\x32","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x64\x6F\x77\x53\x74\x72\x6F\x6B\x65","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x64\x6F\x77\x46\x69\x6C\x6C","\x3A\x73\x68\x61\x70\x65","\x63\x20","\x63\x72\x65\x61\x74\x65\x52\x65\x63\x74","\x3A\x72\x65\x63\x74","\x3A\x72\x6F\x75\x6E\x64\x72\x65\x63\x74","\x61\x72\x63\x73\x69\x7A\x65","\x3A\x6F\x76\x61\x6C","\x61\x74\x6D\x6F\x73\x74","\x69\x67\x6E\x6F\x72\x65","\x66\x72\x61\x6D\x65","\x31\x38\x30","\x66\x6F\x6E\x74\x44\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E","\x3A\x67\x72\x6F\x75\x70","\x72\x65\x6C\x61\x74\x69\x76\x65","\x67\x65\x74\x41\x6C\x69\x67\x6E\x6D\x65\x6E\x74\x41\x73\x50\x6F\x69\x6E\x74","\x6E\x6F\x72\x6D\x61\x6C","\x6D\x61\x78\x48\x65\x69\x67\x68\x74","\x67\x72\x6F\x75\x70","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x4D\x61\x74\x72\x69\x78\x28\x4D\x31\x31\x3D","\x2C\x20\x4D\x31\x32\x3D","\x2C\x20\x4D\x32\x31\x3D","\x2C\x20\x4D\x32\x32\x3D","\x2C\x20\x73\x69\x7A\x69\x6E\x67\x4D\x65\x74\x68\x6F\x64\x3D\x27\x61\x75\x74\x6F\x20\x65\x78\x70\x61\x6E\x64\x27\x29","\x3A\x70\x61\x74\x68","\x74\x65\x78\x74\x70\x61\x74\x68\x6F\x6B","\x6D\x20","\x20\x6C\x20","\x3A\x74\x65\x78\x74\x70\x61\x74\x68","\x76\x2D\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A","\x73\x74\x72\x69\x6E\x67","\x73\x65\x74\x53\x74\x61\x74\x65\x73","\x67\x75\x69\x64\x65\x58","\x67\x75\x69\x64\x65\x59","\x67\x65\x74\x47\x75\x69\x64\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x63\x72\x65\x61\x74\x65\x47\x75\x69\x64\x65\x53\x68\x61\x70\x65","\x69\x73\x44\x61\x73\x68\x65\x64","\x44\x49\x41\x4C\x45\x43\x54\x5F\x56\x4D\x4C","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x70\x6F\x69\x6E\x74\x73","\x73\x63\x72\x6F\x6C\x6C\x57\x69\x64\x74\x68","\x64\x65\x73\x63","\x70\x61\x72\x73\x65\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x61\x72\x73\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x63\x61\x6C\x69\x7A\x65\x64","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x77\x30","\x68\x30","\x62\x67\x4E\x6F\x64\x65","\x66\x67\x4E\x6F\x64\x65","\x66\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x76\x61\x72\x69\x61\x62\x6C\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x68\x69\x6C\x64\x4E\x6F\x64\x65\x73","\x70\x61\x72\x73\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x65\x76\x61\x6C\x75\x61\x74\x65\x54\x65\x78\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x65\x76\x61\x6C\x75\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6C\x6F\x63\x61\x6C\x69\x7A\x65\x64","\x65\x76\x61\x6C","\x64\x72\x61\x77\x53\x68\x61\x70\x65","\x64\x72\x61\x77\x43\x68\x69\x6C\x64\x72\x65\x6E","\x63\x6F\x6D\x70\x75\x74\x65\x41\x73\x70\x65\x63\x74","\x69\x6E\x68\x65\x72\x69\x74","\x67\x65\x74\x4E\x75\x6D\x62\x65\x72","\x64\x72\x61\x77\x4E\x6F\x64\x65","\x66\x69\x78\x65\x64","\x61\x72\x63","\x78\x2D\x61\x78\x69\x73\x2D\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x6C\x61\x72\x67\x65\x2D\x61\x72\x63\x2D\x66\x6C\x61\x67","\x73\x77\x65\x65\x70\x2D\x66\x6C\x61\x67","\x52\x45\x43\x54\x41\x4E\x47\x4C\x45\x5F\x52\x4F\x55\x4E\x44\x49\x4E\x47\x5F\x46\x41\x43\x54\x4F\x52","\x61\x6C\x69\x67\x6E\x2D\x73\x68\x61\x70\x65","\x69\x6E\x63\x6C\x75\x64\x65\x2D\x73\x68\x61\x70\x65","\x67\x65\x74\x53\x74\x65\x6E\x63\x69\x6C","\x73\x74\x65\x6E\x63\x69\x6C","\x62\x6F\x75\x6E\x64\x73","\x62\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x73\x76\x67\x53\x74\x72\x6F\x6B\x65\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x73\x74\x65\x6E\x63\x69\x6C\x50\x6F\x69\x6E\x74\x65\x72\x45\x76\x65\x6E\x74\x73","\x69\x73\x50\x61\x72\x73\x65\x56\x6D\x6C","\x69\x73\x48\x74\x6D\x6C\x41\x6C\x6C\x6F\x77\x65\x64","\x67\x65\x74\x53\x76\x67\x53\x63\x72\x65\x65\x6E\x4F\x66\x66\x73\x65\x74","\x63\x72\x65\x61\x74\x65\x53\x76\x67","\x63\x72\x65\x61\x74\x65\x48\x74\x6D\x6C","\x63\x72\x65\x61\x74\x65\x56\x6D\x6C","\x72\x65\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x75\x70\x64\x61\x74\x65\x42\x6F\x75\x6E\x64\x73\x46\x72\x6F\x6D\x50\x6F\x69\x6E\x74\x73","\x63\x68\x65\x63\x6B\x42\x6F\x75\x6E\x64\x73","\x72\x65\x64\x72\x61\x77\x48\x74\x6D\x6C\x53\x68\x61\x70\x65","\x72\x65\x64\x72\x61\x77\x53\x68\x61\x70\x65","\x75\x70\x64\x61\x74\x65\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x63\x72\x65\x61\x74\x65\x56\x6D\x6C\x47\x72\x6F\x75\x70","\x63\x72\x65\x61\x74\x65\x43\x61\x6E\x76\x61\x73","\x68\x61\x73\x43\x68\x69\x6C\x64\x4E\x6F\x64\x65\x73","\x6C\x61\x73\x74\x43\x68\x69\x6C\x64","\x62\x65\x66\x6F\x72\x65\x65\x6E\x64","\x69\x6E\x73\x65\x72\x74\x41\x64\x6A\x61\x63\x65\x6E\x74\x48\x54\x4D\x4C","\x61\x64\x64\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x46\x69\x6C\x74\x65\x72","\x64\x65\x73\x74\x72\x6F\x79\x43\x61\x6E\x76\x61\x73","\x75\x70\x64\x61\x74\x65\x56\x6D\x6C\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6D\x78\x52\x65\x66\x43\x6F\x75\x6E\x74","\x6F\x6C\x64\x47\x72\x61\x64\x69\x65\x6E\x74\x73","\x72\x65\x6C\x65\x61\x73\x65\x53\x76\x67\x47\x72\x61\x64\x69\x65\x6E\x74\x73","\x69\x73\x50\x61\x69\x6E\x74\x42\x6F\x75\x6E\x64\x73\x49\x6E\x76\x65\x72\x74\x65\x64","\x75\x70\x64\x61\x74\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x43\x61\x6E\x76\x61\x73","\x70\x61\x69\x6E\x74\x53\x74\x65\x6E\x63\x69\x6C\x53\x68\x61\x70\x65","\x70\x61\x69\x6E\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x70\x61\x69\x6E\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x69\x73\x53\x68\x61\x64\x6F\x77","\x67\x65\x74\x47\x72\x61\x64\x69\x65\x6E\x74\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x68\x61\x70\x65\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x61\x64\x64\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x63\x74\x61\x6E\x67\x6C\x65","\x73\x65\x74\x54\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x70\x61\x69\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x70\x61\x69\x6E\x74\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x41\x72\x63\x53\x69\x7A\x65","\x70\x61\x69\x6E\x74\x47\x6C\x61\x73\x73\x45\x66\x66\x65\x63\x74","\x23\x66\x66\x66\x66\x66\x66","\x69\x73\x52\x6F\x75\x6E\x64\x65\x64","\x73\x74\x65\x6E\x63\x69\x6C\x46\x6C\x69\x70\x48","\x73\x74\x65\x6E\x63\x69\x6C\x46\x6C\x69\x70\x56","\x73\x65\x74\x43\x75\x72\x73\x6F\x72","\x67\x65\x74\x43\x75\x72\x73\x6F\x72","\x63\x72\x65\x61\x74\x65\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x61\x75\x67\x6D\x65\x6E\x74\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x67\x65\x74\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x67\x65\x74\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x67\x65\x74\x54\x65\x78\x74\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x76\x65\x72\x74\x69\x63\x61\x6C\x54\x65\x78\x74\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28\x27","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66\x27\x29","\x73\x74\x65\x6E\x63\x69\x6C\x73","\x6D\x61\x72\x6B\x65\x72\x73","\x41\x52\x52\x4F\x57\x5F\x43\x4C\x41\x53\x53\x49\x43","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44","\x61\x64\x64\x4D\x61\x72\x6B\x65\x72","\x72\x65\x64\x72\x61\x77\x50\x61\x74\x68","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x46\x69\x6C\x74\x65\x72\x73","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x43\x6F\x6C\x6F\x72\x73","\x62\x6F\x72\x64\x65\x72\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x73\x6F\x6C\x69\x64","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x64\x72\x6F\x70\x53\x68\x61\x64\x6F\x77\x20\x28\x4F\x66\x66\x58\x3D\x27","\x27\x2C\x20\x4F\x66\x66\x59\x3D\x27","\x27\x2C\x20\x43\x6F\x6C\x6F\x72\x3D\x27","\x27\x29","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x73\x74\x61\x72\x74\x43\x6F\x6C\x6F\x72\x53\x74\x72\x3D\x27","\x27\x2C\x20\x65\x6E\x64\x43\x6F\x6C\x6F\x72\x53\x74\x72\x3D\x27","\x27\x2C\x20\x67\x72\x61\x64\x69\x65\x6E\x74\x54\x79\x70\x65\x3D\x27","\x70\x61\x69\x6E\x74\x4C\x69\x6E\x65","\x61\x72\x72\x6F\x77\x57\x69\x64\x74\x68","\x41\x52\x52\x4F\x57\x5F\x57\x49\x44\x54\x48","\x41\x52\x52\x4F\x57\x5F\x53\x50\x41\x43\x49\x4E\x47","\x41\x52\x52\x4F\x57\x5F\x53\x49\x5A\x45","\x44\x45\x46\x41\x55\x4C\x54\x5F\x46\x4F\x4E\x54\x53\x54\x59\x4C\x45","\x63\x6C\x69\x70\x70\x65\x64","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x4C\x65\x66\x74","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x52\x69\x67\x68\x74","\x72\x65\x70\x6C\x61\x63\x65\x4C\x69\x6E\x65\x66\x65\x65\x64\x73","\x69\x67\x6E\x6F\x72\x65\x43\x6C\x69\x70\x70\x65\x64\x53\x74\x72\x69\x6E\x67\x53\x69\x7A\x65","\x69\x67\x6E\x6F\x72\x65\x53\x74\x72\x69\x6E\x67\x53\x69\x7A\x65","\x74\x65\x78\x74\x44\x69\x76","\x75\x70\x64\x61\x74\x65\x53\x69\x7A\x65","\x6D\x61\x72\x67\x69\x6E","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x54\x52\x49\x43\x54\x48\x54\x4D\x4C","\x75\x70\x64\x61\x74\x65\x56\x61\x6C\x75\x65","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x46\x69\x6C\x74\x65\x72","\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x4F\x72\x69\x67\x69\x6E","\x25\x20","\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x25\x2C","\x25\x29\x73\x63\x61\x6C\x65\x28","\x29\x20\x72\x6F\x74\x61\x74\x65\x28","\x64\x65\x67\x29","\x30\x25\x20\x30\x25","\x25\x29","\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20","\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x22\x7A\x6F\x6F\x6D\x3A\x31\x3B","\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x5F\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x70\x61\x64\x64\x69\x6E\x67\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x70\x78\x3B\x70\x61\x64\x64\x69\x6E\x67\x2D\x72\x69\x67\x68\x74\x3A\x31\x70\x78\x3B\x6C\x69\x6E\x65\x2D\x68\x65\x69\x67\x68\x74\x3A","\x75\x70\x64\x61\x74\x65\x4D\x61\x72\x67\x69\x6E","\x67\x65\x74\x53\x70\x61\x63\x69\x6E\x67","\x70\x72\x65\x73\x65\x72\x76\x65\x49\x6D\x61\x67\x65\x41\x73\x70\x65\x63\x74","\x69\x6D\x61\x67\x65\x46\x6C\x69\x70\x48","\x69\x6D\x61\x67\x65\x46\x6C\x69\x70\x56","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x42\x61\x73\x69\x63\x49\x6D\x61\x67\x65\x28\x72\x6F\x74\x61\x74\x69\x6F\x6E\x3D\x32\x29","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x42\x61\x73\x69\x63\x49\x6D\x61\x67\x65\x28\x6D\x69\x72\x72\x6F\x72\x3D\x31\x29","\x70\x72\x6F\x67\x69\x64\x3A\x44\x58\x49\x6D\x61\x67\x65\x54\x72\x61\x6E\x73\x66\x6F\x72\x6D\x2E\x4D\x69\x63\x72\x6F\x73\x6F\x66\x74\x2E\x42\x61\x73\x69\x63\x49\x6D\x61\x67\x65\x28\x72\x6F\x74\x61\x74\x69\x6F\x6E\x3D\x32\x2C\x20\x6D\x69\x72\x72\x6F\x72\x3D\x31\x29","\x69\x6D\x61\x67\x65\x53\x69\x7A\x65","\x44\x45\x46\x41\x55\x4C\x54\x5F\x49\x4D\x41\x47\x45\x53\x49\x5A\x45","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x69\x7A\x65","\x69\x6E\x64\x69\x63\x61\x74\x6F\x72","\x70\x61\x69\x6E\x74\x49\x6D\x61\x67\x65","\x70\x61\x69\x6E\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72","\x67\x65\x74\x49\x6D\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x41\x4C\x49\x47\x4E\x5F\x54\x4F\x50","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x42\x6F\x75\x6E\x64\x73","\x63\x72\x65\x61\x74\x65\x4D\x61\x72\x6B\x65\x72","\x53\x54\x59\x4C\x45\x5F\x43\x55\x52\x56\x45\x44","\x70\x61\x69\x6E\x74\x43\x75\x72\x76\x65\x64\x4C\x69\x6E\x65","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x53\x49\x5A\x45","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x53\x49\x5A\x45","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x41\x52\x52\x4F\x57","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x41\x52\x52\x4F\x57","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x46\x49\x4C\x4C","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x46\x49\x4C\x4C","\x70\x61\x69\x6E\x74\x52\x6F\x75\x6E\x64\x65\x64\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x70\x61\x69\x6E\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x70\x61\x69\x6E\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x75\x73\x65\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78","\x6D\x6F\x76\x65\x43\x65\x6C\x6C","\x67\x65\x74\x47\x72\x61\x70\x68","\x67\x65\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x74\x72\x61\x76\x65\x72\x73\x65","\x67\x65\x74\x45\x64\x67\x65\x43\x6F\x75\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x41\x74","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x67\x65\x74\x56\x69\x73\x69\x62\x6C\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x69\x73\x56\x65\x72\x74\x65\x78\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x56\x65\x72\x74\x65\x78\x49\x67\x6E\x6F\x72\x65\x64","\x69\x73\x43\x65\x6C\x6C\x56\x69\x73\x69\x62\x6C\x65","\x69\x73\x45\x64\x67\x65\x49\x67\x6E\x6F\x72\x65\x64","\x73\x65\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x73\x65\x74\x4F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x4F\x66\x66\x73\x65\x74","\x69\x73\x41\x6E\x63\x65\x73\x74\x6F\x72","\x67\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x65\x74\x45\x64\x67\x65\x50\x6F\x69\x6E\x74\x73","\x73\x65\x74\x52\x65\x6C\x61\x74\x69\x76\x65","\x73\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x65\x74\x56\x65\x72\x74\x65\x78\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x67\x65\x74\x56\x65\x72\x74\x65\x78\x42\x6F\x75\x6E\x64\x73","\x61\x72\x72\x61\x6E\x67\x65\x47\x72\x6F\x75\x70\x73","\x67\x65\x74\x43\x68\x69\x6C\x64\x56\x65\x72\x74\x69\x63\x65\x73","\x67\x65\x74\x42\x6F\x75\x6E\x64\x69\x6E\x67\x42\x6F\x78\x46\x72\x6F\x6D\x47\x65\x6F\x6D\x65\x74\x72\x79","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x67\x65\x74\x53\x74\x61\x72\x74\x53\x69\x7A\x65","\x78\x30","\x79\x30","\x6B\x65\x65\x70\x46\x69\x72\x73\x74\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x72\x65\x73\x69\x7A\x65\x50\x61\x72\x65\x6E\x74","\x72\x65\x73\x69\x7A\x65\x4C\x61\x73\x74","\x69\x73\x48\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x67\x65\x74\x49\x6E\x64\x65\x78","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x53\x69\x7A\x65","\x69\x73\x4C\x61\x79\x65\x72","\x63\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x72\x65\x73\x69\x7A\x65\x56\x65\x72\x74\x69\x63\x65\x73","\x69\x6E\x76\x65\x72\x74","\x67\x72\x6F\x75\x70\x50\x61\x64\x64\x69\x6E\x67","\x70\x61\x72\x65\x6E\x74\x73\x43\x68\x61\x6E\x67\x65\x64","\x6D\x6F\x76\x65\x54\x72\x65\x65","\x6C\x65\x76\x65\x6C\x44\x69\x73\x74\x61\x6E\x63\x65","\x6E\x6F\x64\x65\x44\x69\x73\x74\x61\x6E\x63\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73","\x70\x72\x65\x66\x48\x6F\x7A\x45\x64\x67\x65\x53\x65\x70","\x70\x72\x65\x66\x56\x65\x72\x74\x45\x64\x67\x65\x4F\x66\x66","\x6D\x69\x6E\x45\x64\x67\x65\x4A\x65\x74\x74\x79","\x63\x68\x61\x6E\x6E\x65\x6C\x42\x75\x66\x66\x65\x72","\x65\x64\x67\x65\x52\x6F\x75\x74\x69\x6E\x67","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x54\x72\x65\x65\x52\x6F\x6F\x74\x73","\x64\x66\x73","\x6C\x61\x79\x6F\x75\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x4C\x61\x79\x6F\x75\x74","\x76\x65\x72\x74\x69\x63\x61\x6C\x4C\x61\x79\x6F\x75\x74","\x6D\x6F\x76\x65\x4E\x6F\x64\x65","\x61\x64\x6A\x75\x73\x74\x50\x61\x72\x65\x6E\x74\x73","\x6C\x6F\x63\x61\x6C\x45\x64\x67\x65\x50\x72\x6F\x63\x65\x73\x73\x69\x6E\x67","\x6E\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x4E\x6F\x64\x65","\x61\x74\x74\x61\x63\x68\x50\x61\x72\x65\x6E\x74","\x6C\x61\x79\x6F\x75\x74\x4C\x65\x61\x66","\x6F\x66\x66\x73\x65\x74\x58","\x6F\x66\x66\x73\x65\x74\x59","\x75\x70\x70\x65\x72\x48\x65\x61\x64","\x63\x6F\x6E\x74\x6F\x75\x72","\x63\x72\x65\x61\x74\x65\x4C\x69\x6E\x65","\x6C\x6F\x77\x65\x72\x48\x65\x61\x64","\x75\x70\x70\x65\x72\x54\x61\x69\x6C","\x6C\x6F\x77\x65\x72\x54\x61\x69\x6C","\x6D\x65\x72\x67\x65","\x62\x72\x69\x64\x67\x65","\x73\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x70\x72\x6F\x63\x65\x73\x73\x4E\x6F\x64\x65\x4F\x75\x74\x67\x6F\x69\x6E\x67","\x67\x65\x74\x45\x64\x67\x65\x73\x42\x65\x74\x77\x65\x65\x6E","\x77\x65\x69\x67\x68\x74\x65\x64\x56\x61\x6C\x75\x65","\x6E\x75\x64\x67\x65","\x76\x69\x73\x69\x74\x65\x64","\x72\x61\x6E\x6B\x49\x6E\x64\x65\x78","\x75\x73\x65\x49\x6E\x70\x75\x74\x4F\x72\x69\x67\x69\x6E","\x64\x69\x73\x61\x62\x6C\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x66\x6F\x72\x63\x65\x43\x6F\x6E\x73\x74\x61\x6E\x74","\x66\x6F\x72\x63\x65\x43\x6F\x6E\x73\x74\x61\x6E\x74\x53\x71\x75\x61\x72\x65\x64","\x6D\x69\x6E\x44\x69\x73\x74\x61\x6E\x63\x65\x4C\x69\x6D\x69\x74","\x6D\x61\x78\x44\x69\x73\x74\x61\x6E\x63\x65\x4C\x69\x6D\x69\x74","\x6D\x69\x6E\x44\x69\x73\x74\x61\x6E\x63\x65\x4C\x69\x6D\x69\x74\x53\x71\x75\x61\x72\x65\x64","\x69\x6E\x69\x74\x69\x61\x6C\x54\x65\x6D\x70","\x74\x65\x6D\x70\x65\x72\x61\x74\x75\x72\x65","\x6D\x61\x78\x49\x74\x65\x72\x61\x74\x69\x6F\x6E\x73","\x69\x74\x65\x72\x61\x74\x69\x6F\x6E","\x61\x6C\x6C\x6F\x77\x65\x64\x54\x6F\x52\x75\x6E","\x76\x65\x72\x74\x65\x78\x41\x72\x72\x61\x79","\x67\x65\x74\x42\x6F\x75\x6E\x64\x73","\x69\x6E\x64\x69\x63\x65\x73","\x64\x69\x73\x70\x58","\x64\x69\x73\x70\x59","\x63\x65\x6C\x6C\x4C\x6F\x63\x61\x74\x69\x6F\x6E","\x69\x73\x4D\x6F\x76\x65\x61\x62\x6C\x65","\x6E\x65\x69\x67\x68\x62\x6F\x75\x72\x73","\x72\x61\x64\x69\x75\x73","\x72\x61\x64\x69\x75\x73\x53\x71\x75\x61\x72\x65\x64","\x67\x65\x74\x4F\x70\x70\x6F\x73\x69\x74\x65\x73","\x72\x65\x73\x65\x74\x45\x64\x67\x65","\x63\x61\x6C\x63\x52\x65\x70\x75\x6C\x73\x69\x6F\x6E","\x63\x61\x6C\x63\x41\x74\x74\x72\x61\x63\x74\x69\x6F\x6E","\x63\x61\x6C\x63\x50\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x72\x65\x64\x75\x63\x65\x54\x65\x6D\x70\x65\x72\x61\x74\x75\x72\x65","\x72\x61\x6E\x64\x6F\x6D","\x6D\x6F\x76\x65\x43\x69\x72\x63\x6C\x65","\x67\x65\x74\x52\x61\x64\x69\x75\x73","\x63\x69\x72\x63\x6C\x65","\x66\x69\x6E\x64\x50\x61\x72\x61\x6C\x6C\x65\x6C\x73","\x67\x65\x74\x45\x64\x67\x65\x49\x64","\x72\x6F\x75\x74\x65","\x6C\x61\x79\x6F\x75\x74\x73","\x6D\x61\x73\x74\x65\x72","\x70\x6C\x61\x63\x65\x4C\x61\x62\x65\x6C\x73","\x61\x76\x6F\x69\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73","\x74\x65\x6D\x70","\x6D\x61\x78\x52\x61\x6E\x6B","\x6D\x69\x6E\x52\x61\x6E\x6B","\x6E\x65\x78\x74\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x70\x72\x65\x76\x69\x6F\x75\x73\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x4E\x65\x78\x74\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x50\x72\x65\x76\x69\x6F\x75\x73\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x47\x65\x6E\x65\x72\x61\x6C\x50\x75\x72\x70\x6F\x73\x65\x56\x61\x72\x69\x61\x62\x6C\x65","\x73\x65\x74\x47\x65\x6E\x65\x72\x61\x6C\x50\x75\x72\x70\x6F\x73\x65\x56\x61\x72\x69\x61\x62\x6C\x65","\x73\x65\x74\x58","\x73\x65\x74\x59","\x63\x6F\x6E\x6E\x65\x63\x74\x73\x41\x73\x54\x61\x72\x67\x65\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x73\x41\x73\x53\x6F\x75\x72\x63\x65","\x68\x61\x73\x68\x43\x6F\x64\x65","\x67\x65\x74\x52\x61\x6E\x6B\x56\x61\x6C\x75\x65","\x67\x65\x74\x43\x6F\x72\x65\x43\x65\x6C\x6C","\x65\x64\x67\x65\x73","\x69\x73\x52\x65\x76\x65\x72\x73\x65\x64","\x74\x69\x67\x68\x74\x65\x6E\x54\x6F\x53\x6F\x75\x72\x63\x65","\x72\x6F\x6F\x74\x73","\x76\x65\x72\x74\x65\x78\x4D\x61\x70\x70\x65\x72","\x65\x64\x67\x65\x4D\x61\x70\x70\x65\x72","\x53\x4F\x55\x52\x43\x45\x53\x43\x41\x4E\x53\x54\x41\x52\x54\x52\x41\x4E\x4B","\x63\x72\x65\x61\x74\x65\x49\x6E\x74\x65\x72\x6E\x61\x6C\x43\x65\x6C\x6C\x73","\x72\x61\x6E\x6B\x73","\x64\x66\x73\x43\x6F\x75\x6E\x74","\x69\x6E\x69\x74\x69\x61\x6C\x52\x61\x6E\x6B","\x73\x6C\x69\x63\x65","\x66\x69\x78\x52\x61\x6E\x6B\x73","\x65\x78\x74\x65\x6E\x64\x65\x64\x44\x66\x73","\x6E\x65\x73\x74\x65\x64\x42\x65\x73\x74\x52\x61\x6E\x6B\x73","\x63\x75\x72\x72\x65\x6E\x74\x42\x65\x73\x74\x43\x72\x6F\x73\x73\x69\x6E\x67\x73","\x69\x74\x65\x72\x61\x74\x69\x6F\x6E\x73\x57\x69\x74\x68\x6F\x75\x74\x49\x6D\x70\x72\x6F\x76\x65\x6D\x65\x6E\x74","\x6D\x61\x78\x4E\x6F\x49\x6D\x70\x72\x6F\x76\x65\x6D\x65\x6E\x74\x49\x74\x65\x72\x61\x74\x69\x6F\x6E\x73","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x43\x72\x6F\x73\x73\x69\x6E\x67\x73","\x77\x65\x69\x67\x68\x74\x65\x64\x4D\x65\x64\x69\x61\x6E","\x74\x72\x61\x6E\x73\x70\x6F\x73\x65","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x52\x61\x6E\x6B\x43\x72\x6F\x73\x73\x69\x6E\x67","\x6D\x65\x64\x69\x61\x6E\x52\x61\x6E\x6B","\x6D\x65\x64\x69\x61\x6E\x56\x61\x6C\x75\x65","\x6C\x65\x6E\x74\x68","\x67\x65\x74\x49\x6E\x63\x6F\x6D\x69\x6E\x67\x45\x64\x67\x65\x73","\x69\x6E\x74\x72\x61\x43\x65\x6C\x6C\x53\x70\x61\x63\x69\x6E\x67","\x69\x6E\x74\x65\x72\x52\x61\x6E\x6B\x43\x65\x6C\x6C\x53\x70\x61\x63\x69\x6E\x67","\x6F\x72\x69\x65\x6E\x74\x61\x74\x69\x6F\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x58","\x70\x61\x72\x61\x6C\x6C\x65\x6C\x45\x64\x67\x65\x53\x70\x61\x63\x69\x6E\x67","\x6A\x65\x74\x74\x79\x50\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6C\x69\x6D\x69\x74\x58","\x63\x75\x72\x72\x65\x6E\x74\x58\x44\x65\x6C\x74\x61","\x77\x69\x64\x65\x73\x74\x52\x61\x6E\x6B","\x72\x61\x6E\x6B\x54\x6F\x70\x59","\x72\x61\x6E\x6B\x42\x6F\x74\x74\x6F\x6D\x59","\x77\x69\x64\x65\x73\x74\x52\x61\x6E\x6B\x56\x61\x6C\x75\x65","\x72\x61\x6E\x6B\x57\x69\x64\x74\x68\x73","\x72\x61\x6E\x6B\x59","\x66\x69\x6E\x65\x54\x75\x6E\x69\x6E\x67","\x50\x4F\x4C\x59\x4C\x49\x4E\x45","\x6E\x65\x78\x74\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x61\x63\x68\x65","\x70\x72\x65\x76\x69\x6F\x75\x73\x4C\x61\x79\x65\x72\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x43\x61\x63\x68\x65","\x70\x72\x69\x6E\x74\x53\x74\x61\x74\x75\x73","\x3D\x3D\x3D\x3D\x3D\x3D\x43\x6F\x6F\x72\x64\x20\x61\x73\x73\x69\x67\x6E\x6D\x65\x6E\x74\x20\x64\x65\x62\x75\x67\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x52\x61\x6E\x6B\x20","\x20\x3A\x20","\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x69\x6E\x69\x74\x69\x61\x6C\x43\x6F\x6F\x72\x64\x73","\x6D\x69\x6E\x4E\x6F\x64\x65","\x6D\x65\x64\x69\x61\x6E\x50\x6F\x73","\x6D\x69\x6E\x50\x61\x74\x68","\x73\x65\x74\x43\x65\x6C\x6C\x4C\x6F\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x65\x64\x69\x61\x6E\x58\x56\x61\x6C\x75\x65","\x72\x61\x6E\x6B\x4D\x65\x64\x69\x61\x6E\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x64\x57\x65\x69\x67\x68\x74\x65\x64\x56\x61\x6C\x75\x65","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x57\x69\x64\x65\x73\x74\x52\x61\x6E\x6B","\x72\x61\x6E\x6B\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x65\x64\x67\x65\x2E\x65\x64\x67\x65\x73\x20\x69\x73\x20\x6E\x75\x6C\x6C","\x41\x74\x20\x6C\x65\x61\x73\x74\x20\x6F\x6E\x65\x20\x63\x65\x6C\x6C\x20\x68\x61\x73\x20\x6E\x6F\x20\x62\x6F\x75\x6E\x64\x73","\x72\x65\x70\x6F\x73\x69\x74\x69\x6F\x6E\x56\x61\x6C\x69\x64","\x4D\x41\x58\x5F\x56\x41\x4C\x55\x45","\x4F\x52\x54\x48\x4F\x47\x4F\x4E\x41\x4C","\x43\x55\x52\x56\x45","\x73\x65\x74\x45\x64\x67\x65\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x69\x73\x50\x6F\x72\x74","\x70\x72\x6F\x63\x65\x73\x73\x52\x65\x76\x65\x72\x73\x65\x64\x45\x64\x67\x65","\x64\x65\x74\x65\x72\x6D\x69\x6E\x69\x73\x74\x69\x63","\x6D\x6F\x76\x65\x50\x61\x72\x65\x6E\x74","\x70\x61\x72\x65\x6E\x74\x42\x6F\x72\x64\x65\x72","\x69\x6E\x74\x65\x72\x48\x69\x65\x72\x61\x72\x63\x68\x79\x53\x70\x61\x63\x69\x6E\x67","\x74\x72\x61\x76\x65\x72\x73\x65\x41\x6E\x63\x65\x73\x74\x6F\x72\x73","\x65\x64\x67\x65\x73\x43\x61\x63\x68\x65","\x72\x75\x6E","\x75\x70\x64\x61\x74\x65\x47\x72\x6F\x75\x70\x42\x6F\x75\x6E\x64\x73","\x66\x69\x6E\x64\x52\x6F\x6F\x74\x73","\x63\x6F\x6E\x63\x61\x74","\x69\x73\x56\x61\x6C\x69\x64\x41\x6E\x63\x65\x73\x74\x6F\x72","\x66\x69\x6C\x74\x65\x72\x44\x65\x73\x63\x65\x6E\x64\x61\x6E\x74\x73","\x63\x79\x63\x6C\x65\x53\x74\x61\x67\x65","\x6C\x61\x79\x65\x72\x69\x6E\x67\x53\x74\x61\x67\x65","\x63\x72\x6F\x73\x73\x69\x6E\x67\x53\x74\x61\x67\x65","\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x53\x74\x61\x67\x65","\x63\x75\x72\x72\x65\x6E\x74\x45\x64\x69\x74","\x73\x65\x74\x52\x6F\x6F\x74","\x6D\x61\x69\x6E\x74\x61\x69\x6E\x45\x64\x67\x65\x50\x61\x72\x65\x6E\x74","\x63\x72\x65\x61\x74\x65\x49\x64\x73","\x70\x6F\x73\x74\x66\x69\x78","\x6E\x65\x78\x74\x49\x64","\x75\x70\x64\x61\x74\x65\x4C\x65\x76\x65\x6C","\x65\x6E\x64\x69\x6E\x67\x55\x70\x64\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x52\x6F\x6F\x74","\x69\x73\x43\x72\x65\x61\x74\x65\x49\x64\x73","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x49\x64\x73","\x69\x6E\x73\x65\x72\x74","\x66\x69\x6C\x74\x65\x72\x43\x65\x6C\x6C\x73","\x67\x65\x74\x44\x65\x73\x63\x65\x6E\x64\x61\x6E\x74\x73","\x72\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65\x64","\x63\x65\x6C\x6C\x41\x64\x64\x65\x64","\x69\x73\x52\x6F\x6F\x74","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x50\x61\x72\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65\x49\x64","\x73\x65\x74\x49\x64","\x69\x73\x4E\x75\x6D\x65\x72\x69\x63","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x4E\x65\x61\x72\x65\x73\x74\x43\x6F\x6D\x6D\x6F\x6E\x41\x6E\x63\x65\x73\x74\x6F\x72","\x67\x65\x74\x4F\x72\x69\x67\x69\x6E","\x50\x41\x54\x48\x5F\x53\x45\x50\x41\x52\x41\x54\x4F\x52","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x50\x61\x74\x68","\x70\x61\x72\x65\x6E\x74\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x74\x43\x68\x69\x6C\x64\x72\x65\x6E","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x43\x68\x69\x6C\x64\x45\x64\x67\x65\x73","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x74\x65\x72\x6D\x69\x6E\x61\x6C\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x69\x6E\x73\x65\x72\x74\x45\x64\x67\x65","\x72\x65\x6D\x6F\x76\x65\x45\x64\x67\x65","\x67\x65\x74\x44\x69\x72\x65\x63\x74\x65\x64\x45\x64\x67\x65\x43\x6F\x75\x6E\x74","\x67\x65\x74\x4F\x75\x74\x67\x6F\x69\x6E\x67\x45\x64\x67\x65\x73","\x67\x65\x74\x54\x6F\x70\x6D\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x56\x61\x6C\x75\x65","\x76\x61\x6C\x75\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x76\x61\x6C\x75\x65\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x6F\x6D\x65\x74\x72\x79\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x73\x74\x79\x6C\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x69\x73\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x73\x65\x74\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x53\x74\x61\x74\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x76\x69\x73\x69\x62\x6C\x65\x53\x74\x61\x74\x65\x46\x6F\x72\x43\x65\x6C\x6C\x43\x68\x61\x6E\x67\x65\x64","\x6D\x65\x72\x67\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x6D\x65\x72\x67\x65\x43\x68\x69\x6C\x64\x72\x65\x6E\x49\x6D\x70\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74\x73","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x49\x6D\x70\x6C","\x72\x65\x73\x74\x6F\x72\x65\x43\x6C\x6F\x6E\x65","\x63\x65\x6C\x6C\x43\x6C\x6F\x6E\x65\x64","\x70\x72\x65\x76\x69\x6F\x75\x73\x49\x6E\x64\x65\x78","\x69\x6E\x64\x65\x78","\x74\x65\x72\x6D\x69\x6E\x61\x6C","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x61\x74\x74\x72\x69\x62\x75\x74\x65","\x6F\x6E\x49\x6E\x69\x74","\x76\x65\x72\x74\x65\x78","\x65\x64\x67\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x6D\x78\x54\x72\x61\x6E\x73\x69\x65\x6E\x74","\x69\x64\x20\x76\x61\x6C\x75\x65\x20\x70\x61\x72\x65\x6E\x74\x20\x73\x6F\x75\x72\x63\x65\x20\x74\x61\x72\x67\x65\x74\x20\x63\x68\x69\x6C\x64\x72\x65\x6E\x20\x65\x64\x67\x65\x73","\x73\x65\x74\x56\x65\x72\x74\x65\x78","\x73\x65\x74\x45\x64\x67\x65","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x50\x61\x72\x65\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x49\x6E\x64\x65\x78","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x63\x6C\x6F\x6E\x65\x56\x61\x6C\x75\x65","\x54\x52\x41\x4E\x53\x4C\x41\x54\x45\x5F\x43\x4F\x4E\x54\x52\x4F\x4C\x5F\x50\x4F\x49\x4E\x54\x53","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x42\x6F\x75\x6E\x64\x73","\x73\x6F\x75\x72\x63\x65\x50\x6F\x69\x6E\x74","\x74\x61\x72\x67\x65\x74\x50\x6F\x69\x6E\x74","\x73\x77\x61\x70","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x74\x61\x6E","\x70\x6F\x77","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x50\x72\x69\x6E\x74\x65\x72\x2D\x66\x72\x69\x65\x6E\x64\x6C\x79\x20\x76\x65\x72\x73\x69\x6F\x6E","\x70\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72","\x61\x75\x74\x6F\x4F\x72\x69\x67\x69\x6E","\x70\x72\x69\x6E\x74\x4F\x76\x65\x72\x6C\x61\x79\x73","\x77\x6E\x64","\x70\x61\x67\x65\x43\x6F\x75\x6E\x74","\x67\x65\x74\x57\x69\x6E\x64\x6F\x77","\x67\x65\x74\x44\x6F\x63\x74\x79\x70\x65","\x3C\x6D\x65\x74\x61\x20\x68\x74\x74\x70\x2D\x65\x71\x75\x69\x76\x3D\x22\x58\x2D\x55\x41\x2D\x43\x6F\x6D\x70\x61\x74\x69\x62\x6C\x65\x22\x20\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x22\x49\x45\x3D\x38\x22\x3E","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x4F\x76\x65\x72\x6C\x61\x79","\x67\x65\x74\x44\x72\x61\x77\x50\x61\x6E\x65","\x77\x72\x69\x74\x65\x48\x65\x61\x64","\x3C\x62\x6F\x64\x79\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x78\x50\x61\x67\x65\x22\x3E","\x63\x72\x65\x61\x74\x65\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x41\x66\x74\x65\x72","\x61\x6C\x77\x61\x79\x73","\x6D\x78\x50\x61\x67\x65\x42\x72\x65\x61\x6B","\x67\x65\x74\x43\x6F\x76\x65\x72\x50\x61\x67\x65\x73","\x67\x65\x74\x41\x70\x70\x65\x6E\x64\x69\x63\x65\x73","\x61\x64\x64\x47\x72\x61\x70\x68\x46\x72\x61\x67\x6D\x65\x6E\x74","\x72\x65\x6E\x64\x65\x72\x50\x61\x67\x65","\x6D\x78\x50\x61\x67\x65\x2D","\x3C\x74\x69\x74\x6C\x65\x3E","\x3C\x2F\x74\x69\x74\x6C\x65\x3E","\x3C\x73\x74\x79\x6C\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x3E","\x40\x6D\x65\x64\x69\x61\x20\x70\x72\x69\x6E\x74\x20\x7B","\x20\x20\x74\x61\x62\x6C\x65\x2E\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72\x20\x7B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x7D","\x20\x20\x68\x72\x2E\x6D\x78\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x20\x7B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x7D","\x40\x6D\x65\x64\x69\x61\x20\x73\x63\x72\x65\x65\x6E\x20\x7B","\x20\x20\x74\x61\x62\x6C\x65\x2E\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72\x20\x7B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x41\x72\x69\x61\x6C\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x30\x70\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x73\x6F\x6C\x69\x64\x20\x31\x70\x78\x20\x64\x61\x72\x6B\x67\x72\x61\x79\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x77\x68\x69\x74\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6C\x61\x70\x73\x65\x3A\x63\x6F\x6C\x6C\x61\x70\x73\x65\x3B\x20\x7D","\x20\x20\x74\x61\x62\x6C\x65\x2E\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72\x20\x74\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x73\x6F\x6C\x69\x64\x20\x31\x70\x78\x20\x67\x72\x61\x79\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x34\x70\x78\x3B\x20\x7D","\x20\x20\x62\x6F\x64\x79\x2E\x6D\x78\x50\x61\x67\x65\x20\x7B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x67\x72\x61\x79\x3B\x20\x7D","\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x6D\x78\x50\x61\x67\x65\x53\x65\x6C\x65\x63\x74\x6F\x72","\x61","\x23\x6D\x78\x50\x61\x67\x65\x2D","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x49\x6E\x73\x69\x64\x65","\x67\x65\x74\x43\x61\x6E\x76\x61\x73","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x73\x74\x79\x6C\x65\x73","\x63\x72\x65\x61\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x74\x79\x6C\x65","\x70\x75\x74\x44\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x70\x75\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x53\x48\x41\x50\x45","\x53\x48\x41\x50\x45\x5F\x52\x45\x43\x54\x41\x4E\x47\x4C\x45","\x53\x54\x59\x4C\x45\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52","\x52\x65\x63\x74\x61\x6E\x67\x6C\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x41\x4C\x49\x47\x4E","\x53\x54\x59\x4C\x45\x5F\x41\x4C\x49\x47\x4E","\x53\x54\x59\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x43\x33\x44\x39\x46\x46","\x53\x54\x59\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x23\x36\x34\x38\x32\x42\x39","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x43\x4F\x4C\x4F\x52","\x23\x37\x37\x34\x34\x30\x30","\x53\x48\x41\x50\x45\x5F\x43\x4F\x4E\x4E\x45\x43\x54\x4F\x52","\x23\x34\x34\x36\x32\x39\x39","\x64\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78","\x70\x75\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x64\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x74\x79\x6C\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6F\x72\x69\x67\x69\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65\x4F\x66\x66\x73\x65\x74","\x69\x6E\x76\x61\x6C\x69\x64","\x69\x6E\x76\x61\x6C\x69\x64\x4F\x72\x64\x65\x72","\x6F\x72\x64\x65\x72\x43\x68\x61\x6E\x67\x65\x64","\x76\x69\x73\x69\x62\x6C\x65\x53\x6F\x75\x72\x63\x65\x53\x74\x61\x74\x65","\x76\x69\x73\x69\x62\x6C\x65\x54\x61\x72\x67\x65\x74\x53\x74\x61\x74\x65","\x74\x65\x72\x6D\x69\x6E\x61\x6C\x44\x69\x73\x74\x61\x6E\x63\x65","\x73\x65\x67\x6D\x65\x6E\x74\x73","\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x42\x6F\x75\x6E\x64\x73","\x73\x65\x74\x41\x62\x73\x6F\x6C\x75\x74\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x56\x69\x73\x69\x62\x6C\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x53\x74\x61\x74\x65","\x73\x65\x74\x56\x69\x73\x69\x62\x6C\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x53\x74\x61\x74\x65","\x64\x6F\x6E\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x69\x6E\x67\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x52\x65\x73\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x69\x6E\x67\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x69\x6E\x67\x6C\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x69\x73\x53\x69\x6E\x67\x6C\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x74\x53\x69\x6E\x67\x6C\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x63\x68\x61\x6E\x67\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x74\x43\x65\x6C\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x73","\x67\x65\x74\x46\x69\x72\x73\x74\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x61\x64\x64\x43\x65\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x61\x64\x64\x65\x64","\x72\x65\x6D\x6F\x76\x65\x64","\x6D\x78\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x68\x61\x6E\x67\x65\x2E\x65\x78\x65\x63\x75\x74\x65","\x65\x6E\x74\x65\x72","\x6C\x65\x61\x76\x65","\x65\x64\x69\x74\x69\x6E\x67\x43\x65\x6C\x6C","\x74\x72\x69\x67\x67\x65\x72","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x61\x75\x74\x6F\x53\x69\x7A\x65","\x65\x6D\x70\x74\x79\x4C\x61\x62\x65\x6C\x54\x65\x78\x74","\x74\x65\x78\x74\x4E\x6F\x64\x65","\x6D\x78\x43\x65\x6C\x6C\x45\x64\x69\x74\x6F\x72","\x63\x6F\x6C\x73","\x32\x30","\x34","\x62\x6C\x75\x72","\x66\x6F\x63\x75\x73\x4C\x6F\x73\x74","\x6B\x65\x79\x64\x6F\x77\x6E","\x6B\x65\x79\x43\x6F\x64\x65","\x69\x73\x45\x6E\x74\x65\x72\x53\x74\x6F\x70\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x73\x74\x6F\x70\x45\x64\x69\x74\x69\x6E\x67","\x63\x6C\x65\x61\x72\x4F\x6E\x43\x68\x61\x6E\x67\x65","\x73\x65\x74\x4D\x6F\x64\x69\x66\x69\x65\x64","\x6B\x65\x79\x70\x72\x65\x73\x73","\x69\x73\x4C\x61\x62\x65\x6C\x43\x6C\x69\x70\x70\x65\x64","\x69\x73\x57\x72\x61\x70\x70\x69\x6E\x67","\x41\x4C\x49\x47\x4E\x5F\x4C\x45\x46\x54","\x69\x73\x4D\x6F\x64\x69\x66\x69\x65\x64","\x69\x73\x49\x6E\x76\x6F\x6B\x65\x73\x53\x74\x6F\x70\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x69\x73\x48\x69\x64\x65\x4C\x61\x62\x65\x6C","\x6F\x75\x74\x6C\x69\x6E\x65","\x67\x65\x74\x45\x64\x69\x74\x6F\x72\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x56\x61\x6C\x75\x65","\x67\x65\x74\x45\x6D\x70\x74\x79\x4C\x61\x62\x65\x6C\x54\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x44\x69\x76","\x67\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x56\x61\x6C\x75\x65","\x67\x65\x74\x45\x64\x69\x74\x69\x6E\x67\x56\x61\x6C\x75\x65","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x54\x4F\x50","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x52\x49\x47\x48\x54","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x42\x4F\x54\x54\x4F\x4D","\x53\x54\x59\x4C\x45\x5F\x53\x50\x41\x43\x49\x4E\x47\x5F\x4C\x45\x46\x54","\x67\x65\x74\x45\x64\x69\x74\x69\x6E\x67\x43\x65\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x64\x65\x66\x61\x75\x6C\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x64\x65\x66\x61\x75\x6C\x74\x54\x65\x78\x74\x53\x68\x61\x70\x65","\x6C\x65\x67\x61\x63\x79\x43\x6F\x6E\x74\x72\x6F\x6C\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x65\x66\x61\x75\x6C\x74\x53\x68\x61\x70\x65\x73","\x72\x65\x67\x69\x73\x74\x65\x72\x53\x68\x61\x70\x65","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x53\x68\x61\x70\x65","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x53\x68\x61\x70\x65","\x6F\x72\x64\x65\x72\x65\x64","\x6B\x65\x65\x70\x45\x64\x67\x65\x73\x49\x6E\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x66\x69\x72\x73\x74\x45\x64\x67\x65","\x69\x6E\x73\x65\x72\x74\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x69\x6E\x73\x74\x61\x6C\x6C\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x67\x65\x74\x50\x72\x65\x76\x69\x6F\x75\x73\x53\x74\x61\x74\x65\x49\x6E\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x66\x69\x6E\x64\x50\x72\x65\x76\x69\x6F\x75\x73\x53\x74\x61\x74\x65\x49\x6E\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x72\x64\x65\x72","\x6F\x72\x64\x65\x72\x45\x64\x67\x65","\x6B\x65\x65\x70\x45\x64\x67\x65\x73\x49\x6E\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x53\x68\x61\x70\x65\x43\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x53\x68\x61\x70\x65","\x67\x65\x74\x53\x68\x61\x70\x65","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x53\x68\x61\x70\x65","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x47\x72\x61\x64\x69\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x67\x65\x74\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x49\x6D\x61\x67\x65","\x70\x6F\x73\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x65\x53\x68\x61\x70\x65","\x72\x65\x73\x6F\x6C\x76\x65\x43\x6F\x6C\x6F\x72","\x67\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x49\x6E\x64\x69\x63\x61\x74\x6F\x72\x43\x6F\x6C\x6F\x72\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x6E\x64\x69\x63\x61\x74\x65\x64","\x67\x65\x74\x4C\x61\x62\x65\x6C\x56\x61\x6C\x75\x65","\x67\x65\x74\x4C\x61\x62\x65\x6C","\x63\x72\x65\x61\x74\x65\x4C\x61\x62\x65\x6C","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C","\x67\x65\x74\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x54\x59\x4C\x45","\x53\x54\x59\x4C\x45\x5F\x48\x4F\x52\x49\x5A\x4F\x4E\x54\x41\x4C","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x42\x41\x43\x4B\x47\x52\x4F\x55\x4E\x44\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x42\x4F\x52\x44\x45\x52\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x4F\x56\x45\x52\x46\x4C\x4F\x57","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x41\x44\x44\x49\x4E\x47","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x4C\x61\x62\x65\x6C","\x63\x6F\x6E\x76\x65\x72\x74\x50\x6F\x69\x6E\x74","\x69\x73\x4C\x61\x62\x65\x6C\x45\x76\x65\x6E\x74","\x49\x4D\x47","\x4E\x4F\x5F\x46\x4F","\x67\x65\x74\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x6F\x76\x65\x72\x6C\x61\x79","\x69\x6E\x73\x74\x61\x6C\x6C\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x74\x72\x6F\x6C","\x67\x65\x74\x46\x6F\x6C\x64\x69\x6E\x67\x49\x6D\x61\x67\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6F\x6E\x74\x72\x6F\x6C","\x69\x6E\x69\x74\x43\x6F\x6E\x74\x72\x6F\x6C","\x44\x49\x41\x4C\x45\x43\x54\x5F\x50\x52\x45\x46\x45\x52\x48\x54\x4D\x4C","\x69\x6E\x6E\x65\x72\x4E\x6F\x64\x65","\x69\x73\x53\x68\x61\x70\x65\x45\x76\x65\x6E\x74","\x67\x65\x73\x74\x75\x72\x65\x73\x74\x61\x72\x74","\x6C\x61\x73\x74\x54\x6F\x75\x63\x68\x54\x69\x6D\x65","\x67\x65\x73\x74\x75\x72\x65\x65\x6E\x64","\x67\x65\x73\x74\x75\x72\x65\x45\x6E\x61\x62\x6C\x65\x64","\x68\x61\x6E\x64\x6C\x65\x47\x65\x73\x74\x75\x72\x65","\x72\x65\x64\x72\x61\x77\x4C\x61\x62\x65\x6C","\x67\x65\x74\x4C\x61\x62\x65\x6C\x42\x6F\x75\x6E\x64\x73","\x69\x73\x43\x6C\x69\x70\x70\x69\x6E\x67","\x67\x65\x74\x54\x65\x78\x74\x53\x63\x61\x6C\x65","\x72\x6F\x74\x61\x74\x65\x4C\x61\x62\x65\x6C\x42\x6F\x75\x6E\x64\x73","\x72\x65\x64\x72\x61\x77\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x72\x65\x64\x72\x61\x77\x43\x6F\x6E\x74\x72\x6F\x6C","\x67\x65\x74\x43\x6F\x6E\x74\x72\x6F\x6C\x42\x6F\x75\x6E\x64\x73","\x65\x71\x75\x61\x6C\x45\x6E\x74\x72\x69\x65\x73","\x65\x71\x75\x61\x6C\x50\x6F\x69\x6E\x74\x73","\x67\x65\x74\x50\x6F\x72\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x67\x65\x74\x52\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x59","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x43\x6F\x6E\x74\x72\x6F\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x52\x6F\x75\x74\x69\x6E\x67\x43\x65\x6E\x74\x65\x72\x58","\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x45\x4C\x42\x4F\x57\x5F\x56\x45\x52\x54\x49\x43\x41\x4C","\x6F\x72\x74\x68\x42\x75\x66\x66\x65\x72","\x44\x49\x52\x45\x43\x54\x49\x4F\x4E\x5F\x4D\x41\x53\x4B\x5F\x41\x4C\x4C","\x6C\x69\x6D\x69\x74\x73","\x76\x65\x72\x74\x65\x78\x53\x65\x70\x65\x72\x61\x74\x69\x6F\x6E\x73","\x72\x65\x76\x65\x72\x73\x65\x50\x6F\x72\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x72\x6F\x75\x74\x65\x50\x61\x74\x74\x65\x72\x6E\x73","\x77\x61\x79\x50\x6F\x69\x6E\x74\x73\x31","\x64\x69\x72\x56\x65\x63\x74\x6F\x72\x73","\x54\x41\x52\x47\x45\x54\x5F\x4D\x41\x53\x4B","\x53\x4F\x55\x52\x43\x45\x5F\x4D\x41\x53\x4B","\x53\x49\x44\x45\x5F\x4D\x41\x53\x4B","\x43\x45\x4E\x54\x45\x52\x5F\x4D\x41\x53\x4B","\x76\x61\x6C\x75\x65\x73","\x70\x75\x74\x56\x61\x6C\x75\x65","\x67\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x45\x4D\x50\x54\x59\x5F\x50\x4F\x49\x4E\x54","\x75\x70\x64\x61\x74\x69\x6E\x67\x44\x6F\x63\x75\x6D\x65\x6E\x74\x52\x65\x73\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x69\x6E\x67\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x61\x6C\x6C\x6F\x77\x45\x76\x61\x6C","\x63\x61\x70\x74\x75\x72\x65\x44\x6F\x63\x75\x6D\x65\x6E\x74\x47\x65\x73\x74\x75\x72\x65","\x6F\x70\x74\x69\x6D\x69\x7A\x65\x56\x6D\x6C\x52\x65\x66\x6C\x6F\x77\x73","\x72\x65\x6E\x64\x65\x72\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65","\x73\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x73\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65","\x70\x72\x65\x76\x69\x6F\x75\x73\x53\x63\x61\x6C\x65","\x70\x72\x65\x76\x69\x6F\x75\x73\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x73\x65\x74\x53\x63\x61\x6C\x65","\x69\x6E\x76\x61\x6C\x69\x64\x61\x74\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x53\x74\x61\x74\x65","\x6D\x78\x47\x72\x61\x70\x68\x56\x69\x65\x77\x2E\x76\x61\x6C\x69\x64\x61\x74\x65","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x6F\x75\x6E\x64\x73","\x76\x61\x6C\x69\x64\x61\x74\x65\x50\x6F\x69\x6E\x74\x73","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x63\x72\x65\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x72\x65\x64\x72\x61\x77\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x54\x41\x54\x49\x4F\x4E","\x75\x70\x64\x61\x74\x65\x56\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x4F\x66\x66\x73\x65\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x4F\x66\x66\x73\x65\x74\x46\x6F\x72\x43\x65\x6C\x6C","\x75\x70\x64\x61\x74\x65\x46\x69\x78\x65\x64\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x46\x6C\x6F\x61\x74\x69\x6E\x67\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x45\x64\x67\x65\x4C\x61\x62\x65\x6C\x4F\x66\x66\x73\x65\x74","\x63\x68\x69\x6C\x64\x4D\x6F\x76\x65\x64","\x69\x73\x52\x65\x6E\x64\x65\x72\x69\x6E\x67","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x75\x70\x64\x61\x74\x65\x46\x69\x78\x65\x64\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x50\x6F\x69\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x72\x74","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x6F\x70\x53\x74\x79\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x45\x44\x47\x45","\x69\x73\x41\x6C\x6C\x6F\x77\x45\x76\x61\x6C","\x75\x70\x64\x61\x74\x65\x46\x6C\x6F\x61\x74\x69\x6E\x67\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x74\x4E\x65\x78\x74\x50\x6F\x69\x6E\x74","\x69\x73\x4F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C","\x53\x54\x59\x4C\x45\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52\x5F\x53\x50\x41\x43\x49\x4E\x47","\x53\x54\x59\x4C\x45\x5F\x53\x4F\x55\x52\x43\x45\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52\x5F\x53\x50\x41\x43\x49\x4E\x47","\x53\x54\x59\x4C\x45\x5F\x54\x41\x52\x47\x45\x54\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52\x5F\x53\x50\x41\x43\x49\x4E\x47","\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x50\x6F\x69\x6E\x74","\x53\x54\x59\x4C\x45\x5F\x53\x4F\x55\x52\x43\x45\x5F\x50\x4F\x52\x54","\x53\x54\x59\x4C\x45\x5F\x54\x41\x52\x47\x45\x54\x5F\x50\x4F\x52\x54","\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x55\x54\x49\x4E\x47\x5F\x43\x45\x4E\x54\x45\x52\x5F\x58","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x55\x54\x49\x4E\x47\x5F\x43\x45\x4E\x54\x45\x52\x5F\x59","\x67\x65\x74\x52\x65\x6C\x61\x74\x69\x76\x65\x50\x6F\x69\x6E\x74","\x72\x65\x6C\x61\x74\x69\x76\x65\x43\x63\x77","\x73\x65\x74\x52\x65\x6E\x64\x65\x72\x69\x6E\x67","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x45\x76\x61\x6C","\x67\x65\x74\x53\x74\x61\x74\x65\x73","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x61\x74\x65\x73","\x69\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x63\x72\x6F\x6C\x6C\x45\x76\x65\x6E\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x6D\x6F\x76\x65\x48\x61\x6E\x64\x6C\x65\x72","\x65\x6E\x64\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x48\x74\x6D\x6C\x50\x61\x6E\x65","\x75\x70\x64\x61\x74\x65\x48\x74\x6D\x6C\x43\x61\x6E\x76\x61\x73\x53\x69\x7A\x65","\x63\x72\x65\x61\x74\x65\x56\x6D\x6C\x50\x61\x6E\x65","\x63\x6F\x6F\x72\x64\x6F\x72\x69\x67\x69\x6E","\x30\x2C\x30","\x73\x74\x61\x74\x69\x63","\x69\x73\x55\x70","\x67\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65\x46\x6F\x72\x52\x6F\x6F\x74","\x55\x50","\x44\x4F\x57\x4E","\x6D\x6F\x75\x73\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x72\x65\x6E\x64\x65\x72\x48\x69\x6E\x74","\x52\x45\x4E\x44\x45\x52\x49\x4E\x47\x5F\x48\x49\x4E\x54\x5F\x45\x58\x41\x43\x54","\x52\x45\x4E\x44\x45\x52\x49\x4E\x47\x5F\x48\x49\x4E\x54\x5F\x46\x41\x53\x54\x45\x53\x54","\x52\x45\x4E\x44\x45\x52\x49\x4E\x47\x5F\x48\x49\x4E\x54\x5F\x46\x41\x53\x54\x45\x52","\x44\x49\x41\x4C\x45\x43\x54\x5F\x4D\x49\x58\x45\x44\x48\x54\x4D\x4C","\x6D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x69\x6D\x61\x67\x65\x42\x75\x6E\x64\x6C\x65\x73","\x63\x72\x65\x61\x74\x65\x43\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x63\x72\x65\x61\x74\x65\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x73\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x63\x72\x65\x61\x74\x65\x47\x72\x61\x70\x68\x56\x69\x65\x77","\x67\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x43\x68\x61\x6E\x67\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72\x73","\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73\x2F\x67\x72\x61\x70\x68","\x45\x4D\x50\x54\x59\x5F\x41\x52\x52\x41\x59","\x63\x65\x6C\x6C\x45\x64\x69\x74\x6F\x72","\x70\x6F\x72\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x64\x6F\x75\x62\x6C\x65\x54\x61\x70\x45\x6E\x61\x62\x6C\x65\x64","\x64\x6F\x75\x62\x6C\x65\x54\x61\x70\x54\x69\x6D\x65\x6F\x75\x74","\x64\x6F\x75\x62\x6C\x65\x54\x61\x70\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x6C\x61\x73\x74\x54\x6F\x75\x63\x68\x59","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x64\x65\x66\x61\x75\x6C\x74\x4F\x76\x65\x72\x6C\x61\x70","\x64\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x43\x6F\x6C\x6F\x72","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x61\x73\x68\x65\x64","\x6D\x69\x6E\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x69\x73\x74","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x65\x73\x63\x61\x70\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x6E\x76\x6F\x6B\x65\x73\x53\x74\x6F\x70\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x65\x6E\x74\x65\x72\x53\x74\x6F\x70\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x65\x78\x70\x6F\x72\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x6D\x70\x6F\x72\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x65\x6C\x6C\x73\x4C\x6F\x63\x6B\x65\x64","\x63\x65\x6C\x6C\x73\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x45\x64\x69\x74\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x65\x64\x67\x65\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x76\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x64\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x73\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x42\x65\x6E\x64\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x63\x65\x6C\x6C\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x61\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x74\x69\x6D\x65\x72\x41\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x61\x6C\x6C\x6F\x77\x41\x75\x74\x6F\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x67\x6E\x6F\x72\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x61\x78\x69\x6D\x75\x6D\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x6D\x69\x6E\x69\x6D\x75\x6D\x47\x72\x61\x70\x68\x53\x69\x7A\x65","\x6D\x69\x6E\x69\x6D\x75\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x53\x69\x7A\x65","\x6D\x61\x78\x69\x6D\x75\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x53\x69\x7A\x65","\x72\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x61\x6C\x6C\x6F\x77\x4E\x65\x67\x61\x74\x69\x76\x65\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x65\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73","\x65\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73\x4F\x6E\x41\x64\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x54\x6F\x50\x72\x65\x66\x65\x72\x72\x65\x64\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x46\x61\x63\x74\x6F\x72","\x6B\x65\x65\x70\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x56\x69\x73\x69\x62\x6C\x65\x4F\x6E\x5A\x6F\x6F\x6D","\x63\x65\x6E\x74\x65\x72\x5A\x6F\x6F\x6D","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x52\x65\x73\x69\x7A\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x4D\x6F\x76\x65","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x43\x6F\x6E\x6E\x65\x63\x74","\x61\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x4C\x6F\x6F\x70","\x6D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x45\x64\x67\x65\x73","\x61\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x63\x6C\x6F\x6E\x65\x49\x6E\x76\x61\x6C\x69\x64\x45\x64\x67\x65\x73","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x4D\x6F\x76\x65","\x6C\x61\x62\x65\x6C\x73\x56\x69\x73\x69\x62\x6C\x65","\x68\x74\x6D\x6C\x4C\x61\x62\x65\x6C\x73","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x4E\x65\x73\x74\x69\x6E\x67","\x6D\x69\x6E\x46\x69\x74\x53\x63\x61\x6C\x65","\x6D\x61\x78\x46\x69\x74\x53\x63\x61\x6C\x65","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x49\x6D\x61\x67\x65","\x2F\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x2E\x67\x69\x66","\x65\x78\x70\x61\x6E\x64\x65\x64\x49\x6D\x61\x67\x65","\x2F\x65\x78\x70\x61\x6E\x64\x65\x64\x2E\x67\x69\x66","\x77\x61\x72\x6E\x69\x6E\x67\x49\x6D\x61\x67\x65","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x69\x6D\x61\x67\x65\x73\x2F\x77\x61\x72\x6E\x69\x6E\x67\x2E\x67\x69\x66","\x61\x6C\x72\x65\x61\x64\x79\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x52\x65\x73\x6F\x75\x72\x63\x65","\x61\x6C\x72\x65\x61\x64\x79\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x45\x78\x70\x61\x6E\x64\x52\x65\x73\x6F\x75\x72\x63\x65","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x2D\x65\x78\x70\x61\x6E\x64","\x63\x72\x65\x61\x74\x65\x43\x65\x6C\x6C\x45\x64\x69\x74\x6F\x72","\x75\x6E\x6C\x6F\x61\x64","\x73\x65\x6C\x65\x63\x74\x73\x74\x61\x72\x74","\x3C\x76\x3A\x67\x72\x6F\x75\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x44\x49\x53\x50\x4C\x41\x59\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x76\x3A\x67\x72\x6F\x75\x70\x3E","\x70\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x70\x72\x6F\x63\x65\x73\x73\x43\x68\x61\x6E\x67\x65","\x67\x65\x74\x52\x65\x6D\x6F\x76\x65\x64\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x6C\x65\x61\x72\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x53\x74\x61\x74\x65\x46\x6F\x72\x43\x65\x6C\x6C","\x68\x6F\x6D\x65","\x61\x64\x64\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x63\x6C\x65\x61\x72\x43\x65\x6C\x6C\x4F\x76\x65\x72\x6C\x61\x79\x73","\x73\x65\x74\x43\x65\x6C\x6C\x57\x61\x72\x6E\x69\x6E\x67","\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x72\x65\x64\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67\x41\x74\x43\x65\x6C\x6C","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x61\x62\x6C\x65","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x69\x73\x41\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C","\x63\x65\x6C\x6C\x4C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x65\x6C\x6C\x53\x69\x7A\x65\x55\x70\x64\x61\x74\x65\x64","\x68\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x41\x74","\x69\x73\x54\x6F\x67\x67\x6C\x65\x45\x76\x65\x6E\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x50\x61\x6E\x6E\x69\x6E\x67\x4D\x61\x6E\x61\x67\x65\x72","\x67\x65\x74\x42\x6F\x72\x64\x65\x72\x53\x69\x7A\x65\x73","\x74\x68\x69\x6E","\x6D\x65\x64\x69\x75\x6D","\x74\x68\x69\x63\x6B","\x62\x6F\x72\x64\x65\x72\x4C\x65\x66\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70\x57\x69\x64\x74\x68","\x70\x61\x64\x64\x69\x6E\x67\x54\x6F\x70","\x62\x6F\x72\x64\x65\x72\x52\x69\x67\x68\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x42\x6F\x74\x74\x6F\x6D\x57\x69\x64\x74\x68","\x70\x61\x64\x64\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x67\x65\x74\x50\x72\x65\x66\x65\x72\x72\x65\x64\x50\x61\x67\x65\x53\x69\x7A\x65","\x67\x65\x74\x42\x6F\x72\x64\x65\x72","\x64\x6F\x52\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6D\x69\x6E\x57\x69\x64\x74\x68","\x6D\x69\x6E\x48\x65\x69\x67\x68\x74","\x75\x70\x64\x61\x74\x65\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x76\x65\x72\x74\x69\x63\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x70\x6F\x73\x74\x50\x72\x6F\x63\x65\x73\x73\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45","\x67\x65\x74\x49\x6D\x61\x67\x65\x46\x72\x6F\x6D\x42\x75\x6E\x64\x6C\x65\x73","\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65\x2F","\x3B\x62\x61\x73\x65\x36\x34\x2C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x61\x64\x64\x49\x6D\x61\x67\x65\x42\x75\x6E\x64\x6C\x65","\x72\x65\x6D\x6F\x76\x65\x49\x6D\x61\x67\x65\x42\x75\x6E\x64\x6C\x65","\x62\x61\x63\x6B","\x67\x65\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x47\x72\x6F\x75\x70","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70\x43\x65\x6C\x6C","\x67\x65\x74\x42\x6F\x75\x6E\x64\x73\x46\x6F\x72\x47\x72\x6F\x75\x70","\x61\x64\x64\x41\x6C\x6C\x45\x64\x67\x65\x73","\x67\x65\x74\x45\x64\x67\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x69\x6E\x73\x65\x72\x74\x56\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65","\x61\x64\x64\x45\x64\x67\x65","\x69\x73\x41\x6C\x6C\x6F\x77\x4E\x65\x67\x61\x74\x69\x76\x65\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x69\x73\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73\x4F\x6E\x41\x64\x64","\x69\x73\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74","\x65\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64","\x67\x65\x74\x44\x65\x6C\x65\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x6E\x63\x6C\x75\x64\x65\x45\x64\x67\x65\x73","\x6E\x65\x77\x45\x64\x67\x65","\x67\x65\x74\x46\x6F\x6C\x64\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x72\x65\x63\x75\x72\x73\x65","\x69\x73\x43\x65\x6C\x6C\x46\x6F\x6C\x64\x61\x62\x6C\x65","\x73\x77\x61\x70\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x41\x6C\x74\x65\x72\x6E\x61\x74\x65\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x50\x72\x65\x66\x65\x72\x72\x65\x64\x53\x69\x7A\x65\x46\x6F\x72\x43\x65\x6C\x6C","\x67\x65\x74\x41\x6C\x6C\x45\x64\x67\x65\x73","\x69\x67\x6E\x6F\x72\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x53\x48\x41\x50\x45\x5F\x4C\x41\x42\x45\x4C","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45\x5F\x57\x49\x44\x54\x48","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45\x5F\x48\x45\x49\x47\x48\x54","\x67\x65\x74\x53\x69\x7A\x65\x46\x6F\x72\x53\x74\x72\x69\x6E\x67","\x72\x65\x73\x69\x7A\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6C\x6F\x6E\x65\x49\x6E\x76\x61\x6C\x69\x64\x45\x64\x67\x65\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4E\x65\x67\x61\x74\x69\x76\x65\x43\x6F\x6F\x72\x64\x69\x6E\x61\x74\x65\x73","\x69\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x4D\x6F\x76\x65","\x69\x73\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x47\x72\x61\x70\x68","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x43\x65\x6C\x6C\x43\x6F\x6E\x74\x61\x69\x6E\x6D\x65\x6E\x74\x41\x72\x65\x61","\x67\x65\x74\x43\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x67\x65\x74\x4D\x61\x78\x69\x6D\x75\x6D\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x70","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x53\x54\x59\x4C\x45\x5F\x45\x58\x49\x54\x5F\x58","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x54\x52\x59\x5F\x58","\x53\x54\x59\x4C\x45\x5F\x45\x58\x49\x54\x5F\x59","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x54\x52\x59\x5F\x59","\x53\x54\x59\x4C\x45\x5F\x45\x58\x49\x54\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x54\x52\x59\x5F\x50\x45\x52\x49\x4D\x45\x54\x45\x52","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x70\x6F\x69\x6E\x74","\x53\x54\x59\x4C\x45\x5F\x46\x4C\x49\x50\x48","\x53\x54\x59\x4C\x45\x5F\x46\x4C\x49\x50\x56","\x69\x73\x50\x6F\x72\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x46\x6F\x72\x50\x6F\x72\x74","\x69\x73\x43\x65\x6C\x6C\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x67\x65\x74\x43\x65\x6C\x6C\x42\x6F\x75\x6E\x64\x73","\x73\x68\x69\x66\x74\x50\x72\x65\x76\x69\x65\x77\x31","\x73\x68\x69\x66\x74\x50\x72\x65\x76\x69\x65\x77\x32","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x7A\x6F\x6F\x6D\x41\x63\x74\x75\x61\x6C","\x7A\x6F\x6F\x6D\x54\x6F","\x73\x63\x72\x6F\x6C\x6C\x52\x65\x63\x74\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x7A\x6F\x6F\x6D\x54\x6F\x52\x65\x63\x74","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x4F\x52\x54\x48\x4F\x47\x4F\x4E\x41\x4C","\x53\x65\x67\x6D\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x45\x6C\x62\x6F\x77\x43\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x53\x69\x64\x65\x54\x6F\x53\x69\x64\x65","\x54\x6F\x70\x54\x6F\x42\x6F\x74\x74\x6F\x6D","\x45\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E","\x4F\x72\x74\x68\x43\x6F\x6E\x6E\x65\x63\x74\x6F\x72","\x69\x73\x4C\x6F\x6F\x70","\x69\x73\x43\x6C\x6F\x6E\x65\x45\x76\x65\x6E\x74","\x49\x53\x5F\x4D\x41\x43","\x69\x73\x4D\x65\x74\x61\x44\x6F\x77\x6E","\x69\x73\x41\x6C\x74\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x65\x64\x45\x76\x65\x6E\x74","\x69\x73\x46\x6F\x72\x63\x65\x4D\x61\x72\x71\x75\x65\x65\x45\x76\x65\x6E\x74","\x76\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x41\x6C\x65\x72\x74","\x69\x73\x45\x64\x67\x65\x56\x61\x6C\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x63\x68\x65\x63\x6B","\x76\x61\x6C\x69\x64\x61\x74\x65\x45\x64\x67\x65","\x76\x61\x6C\x69\x64\x61\x74\x65\x47\x72\x61\x70\x68","\x67\x65\x74\x43\x65\x6C\x6C\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x65\x6C\x6C","\x61\x74\x74\x72","\x63\x6F\x75\x6E\x74\x45\x72\x72\x6F\x72","\x73\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x74\x6F\x53\x74\x72\x69\x6E\x67","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C\x73","\x73\x65\x74\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C\x73","\x53\x54\x59\x4C\x45\x5F\x57\x48\x49\x54\x45\x5F\x53\x50\x41\x43\x45","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x4E\x6F\x64\x65","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x43\x65\x6C\x6C","\x67\x65\x74\x43\x75\x72\x73\x6F\x72\x46\x6F\x72\x43\x65\x6C\x6C","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x47\x52\x41\x44\x49\x45\x4E\x54\x43\x4F\x4C\x4F\x52","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x53\x48\x41\x50\x45","\x53\x54\x59\x4C\x45\x5F\x49\x4E\x44\x49\x43\x41\x54\x4F\x52\x5F\x49\x4D\x41\x47\x45","\x73\x65\x74\x42\x6F\x72\x64\x65\x72","\x53\x48\x41\x50\x45\x5F\x53\x57\x49\x4D\x4C\x41\x4E\x45","\x69\x73\x52\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x65\x74\x52\x65\x73\x69\x7A\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x69\x73\x45\x73\x63\x61\x70\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x73\x63\x61\x70\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x49\x6E\x76\x6F\x6B\x65\x73\x53\x74\x6F\x70\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x73\x65\x74\x45\x6E\x74\x65\x72\x53\x74\x6F\x70\x73\x43\x65\x6C\x6C\x45\x64\x69\x74\x69\x6E\x67","\x69\x73\x43\x65\x6C\x6C\x4C\x6F\x63\x6B\x65\x64","\x69\x73\x43\x65\x6C\x6C\x73\x4C\x6F\x63\x6B\x65\x64","\x73\x65\x74\x43\x65\x6C\x6C\x73\x4C\x6F\x63\x6B\x65\x64","\x67\x65\x74\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x43\x65\x6C\x6C\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x43\x4C\x4F\x4E\x45\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x43\x6C\x6F\x6E\x65\x61\x62\x6C\x65","\x63\x61\x6E\x45\x78\x70\x6F\x72\x74\x43\x65\x6C\x6C","\x63\x61\x6E\x49\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x73\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x73\x53\x65\x6C\x65\x63\x74\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x44\x45\x4C\x45\x54\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x44\x65\x6C\x65\x74\x61\x62\x6C\x65","\x69\x73\x4C\x61\x62\x65\x6C\x4D\x6F\x76\x61\x62\x6C\x65","\x67\x65\x74\x4D\x6F\x76\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x43\x65\x6C\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x4D\x4F\x56\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x73\x65\x74\x50\x6F\x72\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x73\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x73\x65\x74\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x69\x73\x56\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x73\x65\x74\x56\x65\x72\x74\x65\x78\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x45\x64\x67\x65\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x73\x65\x74\x45\x64\x67\x65\x4C\x61\x62\x65\x6C\x73\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4E\x65\x73\x74\x69\x6E\x67","\x73\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4E\x65\x73\x74\x69\x6E\x67","\x73\x65\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x73\x65\x74\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x69\x73\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x45\x64\x67\x65\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x6C\x6F\x6E\x65\x49\x6E\x76\x61\x6C\x69\x64\x45\x64\x67\x65\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x4D\x6F\x76\x65","\x73\x65\x74\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x65\x6C\x6C\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x52\x45\x53\x49\x5A\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x52\x65\x73\x69\x7A\x61\x62\x6C\x65","\x69\x73\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74\x4D\x6F\x76\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x42\x65\x6E\x64\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x42\x65\x6E\x64\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x42\x45\x4E\x44\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x42\x65\x6E\x64\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x45\x64\x69\x74\x61\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x45\x44\x49\x54\x41\x42\x4C\x45","\x73\x65\x74\x43\x65\x6C\x6C\x73\x45\x64\x69\x74\x61\x62\x6C\x65","\x69\x73\x43\x65\x6C\x6C\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x73\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x69\x73\x56\x61\x6C\x69\x64\x53\x6F\x75\x72\x63\x65","\x69\x73\x56\x61\x6C\x69\x64\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x73\x41\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x53\x54\x59\x4C\x45\x5F\x41\x55\x54\x4F\x53\x49\x5A\x45","\x73\x65\x74\x41\x75\x74\x6F\x53\x69\x7A\x65\x43\x65\x6C\x6C\x73","\x69\x73\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73","\x73\x65\x74\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73","\x73\x65\x74\x45\x78\x74\x65\x6E\x64\x50\x61\x72\x65\x6E\x74\x73\x4F\x6E\x41\x64\x64","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x73\x65\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x69\x73\x41\x6C\x6C\x6F\x77\x4F\x76\x65\x72\x6C\x61\x70\x50\x61\x72\x65\x6E\x74","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4C\x44\x41\x42\x4C\x45","\x69\x73\x56\x61\x6C\x69\x64\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x69\x73\x53\x70\x6C\x69\x74\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x68\x69\x74\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x43\x6F\x6E\x74\x65\x6E\x74","\x67\x65\x74\x50\x6F\x69\x6E\x74\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x73","\x67\x65\x74\x43\x65\x6C\x6C\x73\x42\x65\x79\x6F\x6E\x64","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x52\x65\x67\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x45\x76\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x4E\x65\x78\x74\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x50\x72\x65\x76\x69\x6F\x75\x73\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x50\x61\x72\x65\x6E\x74\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x43\x68\x69\x6C\x64\x43\x65\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x75\x70\x64\x61\x74\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x6C\x61\x73\x74\x54\x6F\x75\x63\x68\x58","\x6C\x61\x73\x74\x4D\x6F\x75\x73\x65\x58","\x6C\x61\x73\x74\x4D\x6F\x75\x73\x65\x59","\x4D\x4F\x55\x53\x45\x5F\x55\x50","\x4D\x4F\x55\x53\x45\x5F\x4D\x4F\x56\x45","\x64\x65\x73\x74\x72\x6F\x79\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70","\x68\x65\x6C\x70","\x67\x72\x61\x70\x68\x52\x65\x6E\x64\x65\x72\x48\x69\x6E\x74","\x73\x68\x6F\x77\x56\x69\x65\x77\x70\x6F\x72\x74","\x73\x69\x7A\x65\x72\x53\x69\x7A\x65","\x75\x70\x64\x61\x74\x65\x4F\x6E\x50\x61\x6E","\x73\x69\x7A\x65\x72\x49\x6D\x61\x67\x65","\x73\x68\x61\x70\x65\x2D\x72\x65\x6E\x64\x65\x72\x69\x6E\x67","\x6F\x70\x74\x69\x6D\x69\x7A\x65\x53\x70\x65\x65\x64","\x69\x6D\x61\x67\x65\x2D\x72\x65\x6E\x64\x65\x72\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x75\x70\x64\x61\x74\x65","\x70\x61\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x66\x72\x65\x73\x68\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x42\x6F\x72\x64\x65\x72","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x73\x69\x7A\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x69\x7A\x65\x72","\x73\x65\x74\x5A\x6F\x6F\x6D\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x53\x6F\x75\x72\x63\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x53\x69\x7A\x65","\x67\x65\x74\x4F\x75\x74\x6C\x69\x6E\x65\x4F\x66\x66\x73\x65\x74","\x73\x74\x61\x72\x74\x58","\x73\x74\x61\x72\x74\x59","\x64\x78\x30","\x64\x79\x30","\x6E","\x76\x61\x6C\x69\x64\x4E\x65\x69\x67\x68\x62\x6F\x72\x73","\x74\x79\x70\x65\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x4E\x65\x69\x67\x68\x62\x6F\x72\x73\x41\x6C\x6C\x6F\x77\x65\x64","\x63\x68\x65\x63\x6B\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x63\x68\x65\x63\x6B\x4E\x65\x69\x67\x68\x62\x6F\x72\x73","\x63\x68\x65\x63\x6B\x54\x79\x70\x65","\x75\x6E\x64\x6F\x48\x61\x6E\x64\x6C\x65\x72","\x62\x75\x62\x62\x6C\x69\x6E\x67","\x69\x73\x42\x75\x62\x62\x6C\x69\x6E\x67","\x73\x65\x74\x42\x75\x62\x62\x6C\x69\x6E\x67","\x67\x65\x74\x4C\x61\x79\x6F\x75\x74","\x67\x65\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x72\x65\x73\x69\x7A\x65\x48\x61\x6E\x64\x6C\x65\x72","\x66\x6F\x6C\x64\x48\x61\x6E\x64\x6C\x65\x72","\x73\x68\x69\x66\x74\x52\x69\x67\x68\x74\x77\x61\x72\x64\x73","\x73\x68\x69\x66\x74\x44\x6F\x77\x6E\x77\x61\x72\x64\x73","\x69\x73\x43\x65\x6C\x6C\x49\x67\x6E\x6F\x72\x65\x64","\x69\x73\x43\x65\x6C\x6C\x53\x68\x69\x66\x74\x61\x62\x6C\x65","\x69\x73\x53\x68\x69\x66\x74\x52\x69\x67\x68\x74\x77\x61\x72\x64\x73","\x73\x65\x74\x53\x68\x69\x66\x74\x52\x69\x67\x68\x74\x77\x61\x72\x64\x73","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E\x77\x61\x72\x64\x73","\x73\x65\x74\x53\x68\x69\x66\x74\x44\x6F\x77\x6E\x77\x61\x72\x64\x73","\x63\x65\x6C\x6C\x52\x65\x73\x69\x7A\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C\x73\x54\x6F\x53\x68\x69\x66\x74","\x73\x68\x69\x66\x74\x43\x65\x6C\x6C","\x61\x64\x64\x45\x6E\x61\x62\x6C\x65\x64","\x72\x65\x73\x69\x7A\x65\x45\x6E\x61\x62\x6C\x65\x64","\x61\x64\x64\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x41\x64\x64\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x52\x65\x73\x69\x7A\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x48\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x65\x74\x41\x64\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x52\x65\x73\x69\x7A\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65\x49\x67\x6E\x6F\x72\x65\x64","\x69\x73\x43\x65\x6C\x6C\x48\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x41\x64\x64\x65\x64","\x72\x65\x73\x69\x7A\x65\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x6F\x6C\x64\x42\x6F\x75\x6E\x64\x73","\x6F\x6C\x64\x53\x74\x61\x74\x65\x73","\x6F\x6C\x64\x53\x63\x61\x6C\x65","\x64\x65\x6C\x74\x61\x73","\x63\x6F\x75\x6E\x74","\x58","\x59","\x61\x64\x64\x45\x64\x67\x65\x73","\x72\x65\x73\x6F\x6C\x76\x65","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x53\x74\x61\x74\x65","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65\x53\x74\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x53\x68\x61\x70\x65","\x6D\x61\x78\x43\x65\x6C\x6C\x73","\x68\x69\x67\x68\x6C\x69\x67\x68\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6C\x6F\x6E\x65\x45\x6E\x61\x62\x6C\x65\x64","\x6D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x67\x75\x69\x64\x65","\x63\x75\x72\x72\x65\x6E\x74\x44\x78","\x63\x75\x72\x72\x65\x6E\x74\x44\x79","\x75\x70\x64\x61\x74\x65\x43\x75\x72\x73\x6F\x72","\x73\x65\x6C\x65\x63\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x4F\x6E\x44\x72\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x4F\x6E\x4D\x6F\x76\x65","\x70\x72\x65\x76\x69\x65\x77\x43\x6F\x6C\x6F\x72","\x68\x74\x6D\x6C\x50\x72\x65\x76\x69\x65\x77","\x73\x63\x61\x6C\x65\x47\x72\x69\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x6C\x6F\x6E\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x6C\x6F\x6E\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x4D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x4D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x65\x6C\x65\x63\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x73\x65\x74\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x44\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x64\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x63\x65\x6C\x6C\x57\x61\x73\x43\x6C\x69\x63\x6B\x65\x64","\x53\x45\x4C\x45\x43\x54","\x66\x69\x72\x73\x74","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77\x42\x6F\x75\x6E\x64\x73","\x63\x72\x65\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x53\x68\x61\x70\x65","\x70\x42\x6F\x75\x6E\x64\x73","\x75\x73\x65\x47\x75\x69\x64\x65\x73\x46\x6F\x72\x45\x76\x65\x6E\x74","\x73\x65\x74\x48\x69\x67\x68\x6C\x69\x67\x68\x74\x43\x6F\x6C\x6F\x72","\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x49\x4E\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x54\x41\x52\x47\x45\x54\x5F\x43\x4F\x4C\x4F\x52","\x43\x55\x52\x53\x4F\x52\x5F\x4D\x4F\x56\x41\x42\x4C\x45\x5F\x45\x44\x47\x45","\x43\x55\x52\x53\x4F\x52\x5F\x4D\x4F\x56\x41\x42\x4C\x45\x5F\x56\x45\x52\x54\x45\x58","\x73\x65\x6C\x65\x63\x74\x44\x65\x6C\x61\x79\x65\x64","\x64\x65\x73\x74\x72\x6F\x79\x53\x68\x61\x70\x65\x73","\x67\x75\x69\x64\x65\x73","\x73\x68\x6F\x75\x6C\x64\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x74\x72\x69\x67\x67\x65\x72\x58","\x74\x72\x69\x67\x67\x65\x72\x59","\x75\x73\x65\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x73\x65\x6C\x65\x63\x74\x4F\x6E\x50\x6F\x70\x75\x70","\x63\x6C\x65\x61\x72\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4F\x6E\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x69\x67\x6E\x6F\x72\x65\x43\x65\x6C\x6C","\x70\x72\x65\x76\x69\x65\x77\x45\x6E\x61\x62\x6C\x65\x64","\x75\x73\x65\x47\x72\x69\x64","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x70\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x67\x65\x74\x43\x65\x6C\x6C\x46\x6F\x72\x50\x6F\x70\x75\x70\x45\x76\x65\x6E\x74","\x76\x61\x6C\x69\x64\x43\x6F\x6C\x6F\x72","\x44\x45\x46\x41\x55\x4C\x54\x5F\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x69\x6E\x76\x61\x6C\x69\x64\x43\x6F\x6C\x6F\x72","\x44\x45\x46\x41\x55\x4C\x54\x5F\x49\x4E\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x68\x6F\x74\x73\x70\x6F\x74","\x44\x45\x46\x41\x55\x4C\x54\x5F\x48\x4F\x54\x53\x50\x4F\x54","\x68\x6F\x74\x73\x70\x6F\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x43\x6F\x6C\x6F\x72","\x76\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x6D\x61\x72\x6B\x65\x64\x53\x74\x61\x74\x65","\x73\x65\x74\x48\x6F\x74\x73\x70\x6F\x74","\x67\x65\x74\x48\x6F\x74\x73\x70\x6F\x74","\x73\x65\x74\x48\x6F\x74\x73\x70\x6F\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x48\x6F\x74\x73\x70\x6F\x74\x45\x6E\x61\x62\x6C\x65\x64","\x68\x61\x73\x56\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x67\x65\x74\x4D\x61\x72\x6B\x65\x64\x53\x74\x61\x74\x65","\x75\x6E\x6D\x61\x72\x6B","\x70\x72\x6F\x63\x65\x73\x73","\x69\x73\x56\x61\x6C\x69\x64\x53\x74\x61\x74\x65","\x67\x65\x74\x4D\x61\x72\x6B\x65\x72\x43\x6F\x6C\x6F\x72","\x6D\x61\x72\x6B\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65\x54\x6F\x4D\x61\x72\x6B","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73\x48\x6F\x74\x73\x70\x6F\x74","\x72\x65\x73\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x68\x61\x6E\x64\x6C\x65\x72\x73","\x6D\x61\x78\x48\x61\x6E\x64\x6C\x65\x72\x73","\x6D\x6F\x76\x65\x49\x63\x6F\x6E\x46\x72\x6F\x6E\x74","\x6D\x6F\x76\x65\x49\x63\x6F\x6E\x42\x61\x63\x6B","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x74\x61\x72\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x6D\x61\x72\x6B\x65\x72","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x48\x61\x6E\x64\x6C\x65\x72","\x77\x61\x79\x70\x6F\x69\x6E\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x45\x6E\x61\x62\x6C\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x44\x65\x6C\x61\x79","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x49\x6E\x50\x72\x6F\x67\x72\x65\x73\x73","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x56\x61\x6C\x69\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x69\x6E\x69\x74\x69\x61\x6C\x54\x6F\x75\x63\x68\x58","\x69\x6E\x69\x74\x69\x61\x6C\x54\x6F\x75\x63\x68\x59","\x69\x67\x6E\x6F\x72\x65\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x63\x6F\x6E\x4F\x66\x66\x73\x65\x74","\x65\x64\x67\x65\x53\x74\x61\x74\x65","\x64\x72\x69\x6C\x6C\x48\x61\x6E\x64\x6C\x65\x72","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E\x43\x6F\x75\x6E\x74\x65\x72","\x6D\x6F\x76\x65\x50\x72\x65\x76\x69\x65\x77\x41\x77\x61\x79","\x69\x73\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x69\x63\x6F\x6E\x53\x74\x61\x74\x65","\x69\x63\x6F\x6E\x73","\x72\x65\x64\x72\x61\x77\x49\x63\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x49\x63\x6F\x6E\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x53\x74\x61\x74\x65","\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x69\x73\x4D\x6F\x76\x65\x49\x63\x6F\x6E\x54\x6F\x46\x72\x6F\x6E\x74\x46\x6F\x72\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x49\x63\x6F\x6E\x73","\x43\x55\x52\x53\x4F\x52\x5F\x43\x4F\x4E\x4E\x45\x43\x54","\x63\x75\x72\x72\x65\x6E\x74\x53\x74\x61\x74\x65","\x69\x63\x6F\x6E","\x67\x65\x74\x49\x63\x6F\x6E\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x69\x73\x53\x74\x61\x72\x74\x45\x76\x65\x6E\x74","\x63\x75\x72\x72\x65\x6E\x74\x46\x6F\x63\x75\x73","\x63\x75\x72\x72\x65\x6E\x74\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x73\x6F\x75\x72\x63\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x77\x61\x79\x70\x6F\x69\x6E\x74\x73","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x68\x72\x65\x61\x64","\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x6F\x75\x74","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64","\x73\x65\x6C\x65\x63\x74\x65\x64\x49\x63\x6F\x6E","\x69\x73\x49\x6D\x6D\x65\x64\x69\x61\x74\x65\x43\x6F\x6E\x6E\x65\x63\x74\x53\x6F\x75\x72\x63\x65","\x75\x70\x64\x61\x74\x65\x43\x75\x72\x72\x65\x6E\x74\x53\x74\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x57\x61\x79\x70\x6F\x69\x6E\x74","\x67\x65\x74\x54\x61\x72\x67\x65\x74\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x50\x6F\x69\x6E\x74","\x67\x65\x74\x53\x6F\x75\x72\x63\x65\x50\x65\x72\x69\x6D\x65\x74\x65\x72\x50\x6F\x69\x6E\x74","\x64\x72\x61\x77\x50\x72\x65\x76\x69\x65\x77","\x75\x70\x64\x61\x74\x65\x49\x63\x6F\x6E\x73","\x69\x73\x53\x74\x6F\x70\x45\x76\x65\x6E\x74","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x45\x64\x67\x65\x57\x69\x64\x74\x68","\x67\x65\x74\x45\x64\x67\x65\x43\x6F\x6C\x6F\x72","\x49\x4E\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x63\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x41\x6C\x69\x67\x6E\x6D\x65\x6E\x74\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x70\x6F\x69\x6E\x74\x49\x6D\x61\x67\x65","\x2F\x70\x6F\x69\x6E\x74\x2E\x67\x69\x66","\x68\x69\x67\x68\x6C\x69\x67\x68\x74\x43\x6F\x6C\x6F\x72","\x66\x6F\x63\x75\x73\x49\x63\x6F\x6E\x73","\x66\x6F\x63\x75\x73\x48\x69\x67\x68\x6C\x69\x67\x68\x74","\x66\x6F\x63\x75\x73\x50\x6F\x69\x6E\x74\x73","\x63\x75\x72\x72\x65\x6E\x74\x46\x6F\x63\x75\x73\x41\x72\x65\x61","\x67\x65\x74\x49\x6D\x61\x67\x65\x46\x6F\x72\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74","\x69\x73\x45\x76\x65\x6E\x74\x49\x67\x6E\x6F\x72\x65\x64","\x72\x65\x70\x61\x69\x6E\x74","\x64\x65\x66\x61\x75\x6C\x74\x4F\x70\x61\x63\x69\x74\x79","\x73\x68\x61\x72\x65\x64\x44\x69\x76","\x63\x75\x72\x72\x65\x6E\x74\x58","\x63\x75\x72\x72\x65\x6E\x74\x59","\x64\x72\x61\x67\x48\x61\x6E\x64\x6C\x65\x72","\x6D\x78\x52\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x73\x69\x6E\x67\x6C\x65\x53\x69\x7A\x65\x72","\x61\x6C\x6C\x6F\x77\x48\x61\x6E\x64\x6C\x65\x42\x6F\x75\x6E\x64\x73\x43\x68\x65\x63\x6B","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x52\x61\x73\x74\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x42\x6F\x75\x6E\x64\x73","\x63\x72\x65\x61\x74\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x53\x68\x61\x70\x65","\x73\x69\x7A\x65\x72\x73","\x6E\x2D\x72\x65\x73\x69\x7A\x65","\x6E\x65\x2D\x72\x65\x73\x69\x7A\x65","\x77\x2D\x72\x65\x73\x69\x7A\x65","\x65\x2D\x72\x65\x73\x69\x7A\x65","\x73\x77\x2D\x72\x65\x73\x69\x7A\x65","\x73\x2D\x72\x65\x73\x69\x7A\x65","\x73\x65\x2D\x72\x65\x73\x69\x7A\x65","\x6C\x61\x62\x65\x6C\x53\x68\x61\x70\x65","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x53\x68\x61\x70\x65","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6C\x6F\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x53\x74\x72\x6F\x6B\x65\x57\x69\x64\x74\x68","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x44\x61\x73\x68\x65\x64","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x45\x44","\x63\x72\x65\x61\x74\x65\x53\x69\x7A\x65\x72\x53\x68\x61\x70\x65","\x69\x73\x53\x69\x7A\x65\x72\x56\x69\x73\x69\x62\x6C\x65","\x52\x4F\x54\x41\x54\x49\x4F\x4E\x5F\x48\x41\x4E\x44\x4C\x45","\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x6D\x6F\x76\x65\x53\x69\x7A\x65\x72\x54\x6F","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45","\x70\x72\x65\x76\x69\x65\x77","\x63\x75\x72\x72\x65\x6E\x74\x41\x6C\x70\x68\x61","\x61\x74\x61\x6E","\x75\x6E\x69\x6F\x6E","\x72\x6F\x74\x61\x74\x65\x43\x65\x6C\x6C","\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x62\x65\x6E\x64\x73","\x72\x65\x6D\x6F\x76\x65\x45\x6E\x61\x62\x6C\x65\x64","\x73\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x61\x62\x73\x70\x6F\x69\x6E\x74\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x50\x6F\x69\x6E\x74\x73","\x69\x73\x41\x64\x64\x50\x6F\x69\x6E\x74\x45\x76\x65\x6E\x74","\x61\x64\x64\x50\x6F\x69\x6E\x74","\x63\x72\x65\x61\x74\x65\x42\x65\x6E\x64\x73","\x69\x6E\x69\x74\x42\x65\x6E\x64","\x43\x55\x52\x53\x4F\x52\x5F\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45","\x69\x73\x52\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74\x45\x76\x65\x6E\x74","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x45\x44","\x69\x73\x48\x61\x6E\x64\x6C\x65\x56\x69\x73\x69\x62\x6C\x65","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x53\x68\x61\x70\x65","\x69\x73\x48\x61\x6E\x64\x6C\x65\x45\x6E\x61\x62\x6C\x65\x64","\x43\x55\x52\x53\x4F\x52\x5F\x42\x45\x4E\x44\x5F\x48\x41\x4E\x44\x4C\x45","\x72\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74","\x69\x73\x54\x61\x72\x67\x65\x74","\x69\x73\x4C\x61\x62\x65\x6C","\x63\x6C\x6F\x6E\x65\x50\x72\x65\x76\x69\x65\x77\x53\x74\x61\x74\x65","\x67\x65\x74\x53\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77\x54\x65\x72\x6D\x69\x6E\x61\x6C\x53\x74\x61\x74\x65","\x67\x65\x74\x50\x72\x65\x76\x69\x65\x77\x50\x6F\x69\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x50\x72\x65\x76\x69\x65\x77\x53\x74\x61\x74\x65","\x73\x65\x74\x50\x72\x65\x76\x69\x65\x77\x43\x6F\x6C\x6F\x72","\x6D\x6F\x76\x65\x4C\x61\x62\x65\x6C","\x63\x68\x61\x6E\x67\x65\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x63\x68\x61\x6E\x67\x65\x50\x6F\x69\x6E\x74\x73","\x61\x64\x64\x50\x6F\x69\x6E\x74\x41\x74","\x66\x69\x6E\x64\x4E\x65\x61\x72\x65\x73\x74\x53\x65\x67\x6D\x65\x6E\x74","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x69\x6C\x6C\x43\x6F\x6C\x6F\x72","\x4C\x4F\x43\x4B\x45\x44\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x72\x65\x64\x72\x61\x77\x49\x6E\x6E\x65\x72\x42\x65\x6E\x64\x73","\x66\x6C\x69\x70\x45\x6E\x61\x62\x6C\x65\x64","\x64\x6F\x75\x62\x6C\x65\x43\x6C\x69\x63\x6B\x4F\x72\x69\x65\x6E\x74\x61\x74\x69\x6F\x6E\x52\x65\x73\x6F\x75\x72\x63\x65","\x64\x6F\x75\x62\x6C\x65\x43\x6C\x69\x63\x6B\x4F\x72\x69\x65\x6E\x74\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x56\x69\x72\x74\x75\x61\x6C\x42\x65\x6E\x64","\x67\x65\x74\x43\x75\x72\x73\x6F\x72\x46\x6F\x72\x42\x65\x6E\x64","\x45\x44\x47\x45\x53\x54\x59\x4C\x45\x5F\x54\x4F\x50\x54\x4F\x42\x4F\x54\x54\x4F\x4D","\x45\x44\x47\x45\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x72\x6F\x77\x2D\x72\x65\x73\x69\x7A\x65","\x63\x6F\x6C\x2D\x72\x65\x73\x69\x7A\x65","\x6E\x6F\x72\x6D\x61\x6C\x4B\x65\x79\x73","\x73\x68\x69\x66\x74\x4B\x65\x79\x73","\x63\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79\x73","\x63\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79\x73","\x6B\x65\x79\x44\x6F\x77\x6E","\x62\x69\x6E\x64\x4B\x65\x79","\x62\x69\x6E\x64\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79","\x67\x65\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x69\x73\x47\x72\x61\x70\x68\x45\x76\x65\x6E\x74","\x68\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x73\x65\x74\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x6D\x78\x54\x6F\x6F\x6C\x74\x69\x70","\x68\x69\x64\x65\x54\x6F\x6F\x6C\x74\x69\x70","\x73\x74\x61\x74\x65\x53\x6F\x75\x72\x63\x65","\x72\x65\x73\x65\x74\x54\x69\x6D\x65\x72","\x48\x49\x47\x48\x4C\x49\x47\x48\x54\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x72\x65\x70\x61\x69\x6E\x74\x48\x61\x6E\x64\x6C\x65\x72","\x6B\x65\x65\x70\x4F\x6E\x54\x6F\x70","\x64\x72\x61\x77\x48\x69\x67\x68\x6C\x69\x67\x68\x74","\x65\x64\x69\x74\x6F\x72","\x68\x69\x64\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x62\x69\x6E\x64\x41\x63\x74\x69\x6F\x6E","\x63\x6F\x6E\x66\x69\x67","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x61\x64\x64\x49\x74\x65\x6D\x73","\x69\x66","\x61\x73","\x69\x63\x6F\x6E\x43\x6C\x73","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x73\x65\x70\x61\x72\x61\x74\x6F\x72","\x6E\x6F\x63\x65\x6C\x6C","\x6E\x63\x65\x6C\x6C\x73","\x6E\x6F\x74\x52\x6F\x6F\x74","\x6E\x6F\x6E\x45\x6D\x70\x74\x79","\x65\x78\x70\x61\x6E\x64\x61\x62\x6C\x65","\x63\x6F\x6C\x6C\x61\x70\x73\x61\x62\x6C\x65","\x76\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x65\x6D\x70\x74\x79\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x74\x6F\x6F\x6C\x62\x61\x72","\x69\x6E\x73\x65\x72\x74\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x2F\x73\x65\x70\x61\x72\x61\x74\x6F\x72\x2E\x67\x69\x66","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x4F\x70\x74\x69\x6F\x6E","\x73\x65\x74\x4D\x6F\x64\x65","\x61\x64\x64\x50\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x6E\x73\x74\x61\x6C\x6C\x44\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x46\x6C\x6F\x77","\x6D\x61\x6B\x65\x44\x72\x61\x67\x67\x61\x62\x6C\x65","\x61\x63\x74\x69\x6F\x6E\x73","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E\x73","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x56\x61\x6C\x75\x65\x73","\x70\x6F\x70\x75\x70\x48\x61\x6E\x64\x6C\x65\x72","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x47\x72\x61\x70\x68","\x63\x72\x65\x61\x74\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x6B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65","\x49\x53\x5F\x4C\x4F\x43\x41\x4C","\x63\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73\x2F\x65\x64\x69\x74\x6F\x72","\x61\x73\x6B\x5A\x6F\x6F\x6D\x52\x65\x73\x6F\x75\x72\x63\x65","\x61\x73\x6B\x5A\x6F\x6F\x6D","\x6C\x61\x73\x74\x53\x61\x76\x65\x64\x52\x65\x73\x6F\x75\x72\x63\x65","\x6C\x61\x73\x74\x53\x61\x76\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x46\x69\x6C\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x63\x75\x72\x72\x65\x6E\x74\x46\x69\x6C\x65","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x74\x61\x73\x6B\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x74\x61\x73\x6B\x73","\x68\x65\x6C\x70\x52\x65\x73\x6F\x75\x72\x63\x65","\x6F\x75\x74\x6C\x69\x6E\x65\x52\x65\x73\x6F\x75\x72\x63\x65","\x64\x62\x6C\x43\x6C\x69\x63\x6B\x41\x63\x74\x69\x6F\x6E","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x52\x65\x71\x75\x69\x72\x65\x64","\x66\x6F\x72\x63\x65\x64\x49\x6E\x73\x65\x72\x74\x69\x6E\x67","\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x64\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x64\x65\x66\x61\x75\x6C\x74\x47\x72\x6F\x75\x70","\x67\x72\x6F\x75\x70\x42\x6F\x72\x64\x65\x72\x53\x69\x7A\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x70\x6F\x73\x74\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x4E\x61\x6D\x65","\x75\x72\x6C\x50\x6F\x73\x74","\x75\x72\x6C\x49\x6D\x61\x67\x65","\x6C\x61\x79\x6F\x75\x74\x44\x69\x61\x67\x72\x61\x6D","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x53\x70\x61\x63\x69\x6E\x67","\x6D\x61\x69\x6E\x74\x61\x69\x6E\x53\x77\x69\x6D\x6C\x61\x6E\x65\x73","\x6C\x61\x79\x6F\x75\x74\x53\x77\x69\x6D\x6C\x61\x6E\x65\x73","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x49\x6E\x64\x65\x78","\x74\x61\x73\x6B\x73\x57\x69\x6E\x64\x6F\x77\x49\x6D\x61\x67\x65","\x74\x61\x73\x6B\x73\x54\x6F\x70","\x68\x65\x6C\x70\x57\x69\x6E\x64\x6F\x77\x49\x6D\x61\x67\x65","\x75\x72\x6C\x48\x65\x6C\x70","\x68\x65\x6C\x70\x57\x69\x64\x74\x68","\x68\x65\x6C\x70\x48\x65\x69\x67\x68\x74","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x57\x69\x64\x74\x68","\x70\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x48\x65\x69\x67\x68\x74","\x6D\x6F\x76\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x44\x69\x61\x6C\x6F\x67","\x76\x61\x6C\x69\x64\x61\x74\x69\x6E\x67","\x65\x78\x70\x6F\x72\x74\x49\x6D\x61\x67\x65","\x67\x65\x74\x55\x72\x6C\x49\x6D\x61\x67\x65","\x67\x65\x74\x56\x69\x65\x77\x58\x6D\x6C","\x5F\x62\x6C\x61\x6E\x6B","\x63\x75\x74","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x75\x6E\x67\x72\x6F\x75\x70","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x73\x68\x6F\x77\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x73\x65\x6C\x65\x63\x74\x4E\x6F\x6E\x65","\x74\x6F\x42\x61\x63\x6B","\x74\x6F\x46\x72\x6F\x6E\x74","\x73\x65\x6C\x65\x63\x74\x50\x72\x65\x76\x69\x6F\x75\x73","\x73\x65\x6C\x65\x63\x74\x4E\x65\x78\x74","\x73\x65\x6C\x65\x63\x74\x50\x61\x72\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x43\x68\x69\x6C\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65\x41\x6C\x6C","\x65\x78\x70\x61\x6E\x64","\x65\x78\x70\x61\x6E\x64\x41\x6C\x6C","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x4C\x65\x66\x74","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x43\x65\x6E\x74\x65\x72","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x52\x69\x67\x68\x74","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x54\x6F\x70","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x4D\x69\x64\x64\x6C\x65","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73\x42\x6F\x74\x74\x6F\x6D","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x4C\x65\x66\x74","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x43\x65\x6E\x74\x65\x72","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x52\x69\x67\x68\x74","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x54\x6F\x70","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x4D\x69\x64\x64\x6C\x65","\x61\x6C\x69\x67\x6E\x46\x6F\x6E\x74\x42\x6F\x74\x74\x6F\x6D","\x70\x72\x6F\x6D\x70\x74","\x74\x6F\x67\x67\x6C\x65\x54\x61\x73\x6B\x73","\x73\x68\x6F\x77\x54\x61\x73\x6B\x73","\x74\x6F\x67\x67\x6C\x65\x48\x65\x6C\x70","\x73\x68\x6F\x77\x48\x65\x6C\x70","\x74\x6F\x67\x67\x6C\x65\x4F\x75\x74\x6C\x69\x6E\x65","\x73\x68\x6F\x77\x4F\x75\x74\x6C\x69\x6E\x65","\x74\x6F\x67\x67\x6C\x65\x43\x6F\x6E\x73\x6F\x6C\x65","\x72\x65\x73\x65\x74\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x73\x65\x74\x46\x69\x72\x73\x74\x54\x69\x6D\x65","\x63\x6F\x6F\x6B\x69\x65","\x6D\x78\x67\x72\x61\x70\x68\x3D\x73\x65\x65\x6E\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D\x46\x72\x69\x2C\x20\x32\x37\x20\x4A\x75\x6C\x20\x32\x30\x30\x31\x20\x30\x32\x3A\x34\x37\x3A\x31\x31\x20\x55\x54\x43\x3B\x20\x70\x61\x74\x68\x3D\x2F","\x43\x61\x6E\x6E\x6F\x74\x20\x65\x78\x65\x63\x75\x74\x65\x20","\x3A\x20","\x43\x61\x6E\x6E\x6F\x74\x20\x66\x69\x6E\x64\x20\x61\x63\x74\x69\x6F\x6E\x20","\x61\x64\x64\x54\x65\x6D\x70\x6C\x61\x74\x65","\x67\x65\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x69\x6E\x73\x74\x61\x6C\x6C\x44\x62\x6C\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x55\x6E\x64\x6F\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x44\x72\x69\x6C\x6C\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x43\x68\x61\x6E\x67\x65\x48\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x73\x74\x61\x6C\x6C\x49\x6E\x73\x65\x72\x74\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x63\x72\x65\x61\x74\x65\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x4C\x61\x79\x6F\x75\x74\x4D\x61\x6E\x61\x67\x65\x72","\x73\x77\x69\x6D\x6C\x61\x6E\x65\x4C\x61\x79\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x53\x77\x69\x6D\x6C\x61\x6E\x65\x4C\x61\x79\x6F\x75\x74","\x64\x69\x61\x67\x72\x61\x6D\x4C\x61\x79\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x44\x69\x61\x67\x72\x61\x6D\x4C\x61\x79\x6F\x75\x74","\x73\x65\x74\x47\x72\x61\x70\x68\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x72\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x73\x65\x74\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x65\x74\x53\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x74\x6F\x4C\x6F\x63\x61\x6C\x65\x53\x74\x72\x69\x6E\x67","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x74\x54\x69\x74\x6C\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x74\x54\x69\x74\x6C\x65","\x74\x72\x65\x65\x4C\x61\x79\x6F\x75\x74","\x20\x3E\x20","\x67\x65\x74\x52\x6F\x6F\x74\x54\x69\x74\x6C\x65","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70","\x72\x65\x61\x64\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x55\x72\x6C\x50\x6F\x73\x74","\x77\x72\x69\x74\x65\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x70\x6F\x73\x74\x44\x69\x61\x67\x72\x61\x6D","\x73\x77\x61\x70\x53\x74\x79\x6C\x65\x73","\x63\x72\x65\x61\x74\x65\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73","\x69\x73\x50\x72\x6F\x70\x65\x72\x74\x69\x65\x73\x56\x69\x73\x69\x62\x6C\x65","\x72\x65\x61\x64\x6F\x6E\x6C\x79","\x49\x44","\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x54\x61\x73\x6B\x73","\x72\x65\x66\x72\x65\x73\x68\x54\x61\x73\x6B\x73","\x66\x72\x61\x6D\x65\x42\x6F\x72\x64\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x43\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x79\x63\x6C\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x73\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x65\x64\x4D\x6F\x76\x69\x6E\x67","\x63\x6F\x64\x65\x63\x73","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x61\x64\x64\x41\x6C\x69\x61\x73","\x61\x6C\x69\x61\x73\x65\x73","\x72\x65\x67\x69\x73\x74\x65\x72","\x65\x6E\x63\x6F\x64\x65\x44\x65\x66\x61\x75\x6C\x74\x73","\x67\x65\x74\x4F\x62\x6A\x65\x63\x74","\x72\x65\x66\x65\x72\x65\x6E\x63\x65","\x67\x65\x74\x43\x6F\x64\x65\x63","\x69\x6D\x70\x6F\x72\x74\x4E\x6F\x64\x65","\x6D\x78\x43\x6F\x64\x65\x63\x2E\x65\x6E\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x63\x6F\x64\x65\x63\x20\x66\x6F\x72\x20","\x43\x61\x6E\x6E\x6F\x74\x20\x64\x65\x63\x6F\x64\x65\x20","\x65\x6E\x63\x6F\x64\x65\x43\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x64\x65\x63","\x64\x65\x63\x6F\x64\x65\x43\x65\x6C\x6C","\x69\x6E\x73\x65\x72\x74\x49\x6E\x74\x6F\x47\x72\x61\x70\x68","\x65\x78\x63\x6C\x75\x64\x65","\x69\x64\x72\x65\x66\x73","\x6D\x61\x70\x70\x69\x6E\x67","\x72\x65\x76\x65\x72\x73\x65","\x63\x6C\x6F\x6E\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x4E\x61\x6D\x65","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65","\x69\x73\x45\x78\x63\x6C\x75\x64\x65\x64","\x69\x73\x52\x65\x66\x65\x72\x65\x6E\x63\x65","\x62\x65\x66\x6F\x72\x65\x45\x6E\x63\x6F\x64\x65","\x65\x6E\x63\x6F\x64\x65\x4F\x62\x6A\x65\x63\x74","\x61\x66\x74\x65\x72\x45\x6E\x63\x6F\x64\x65","\x65\x6E\x63\x6F\x64\x65\x56\x61\x6C\x75\x65","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x43\x6F\x64\x65\x63\x2E\x65\x6E\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x49\x44\x20\x66\x6F\x72\x20","\x77\x72\x69\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x77\x72\x69\x74\x65\x50\x72\x69\x6D\x69\x74\x69\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x77\x72\x69\x74\x65\x43\x6F\x6D\x70\x6C\x65\x78\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x58\x6D\x6C","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x43\x6F\x64\x65\x63\x2E\x65\x6E\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x6E\x6F\x64\x65\x20\x66\x6F\x72\x20","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x46\x72\x6F\x6D\x58\x6D\x6C","\x62\x65\x66\x6F\x72\x65\x44\x65\x63\x6F\x64\x65","\x64\x65\x63\x6F\x64\x65\x4E\x6F\x64\x65","\x61\x66\x74\x65\x72\x44\x65\x63\x6F\x64\x65","\x64\x65\x63\x6F\x64\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x63\x6F\x64\x65\x43\x68\x69\x6C\x64\x72\x65\x6E","\x64\x65\x63\x6F\x64\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6D\x78\x4F\x62\x6A\x65\x63\x74\x43\x6F\x64\x65\x63\x2E\x64\x65\x63\x6F\x64\x65\x3A\x20\x4E\x6F\x20\x6F\x62\x6A\x65\x63\x74\x20\x66\x6F\x72\x20","\x70\x72\x6F\x63\x65\x73\x73\x49\x6E\x63\x6C\x75\x64\x65","\x64\x65\x63\x6F\x64\x65\x43\x68\x69\x6C\x64","\x67\x65\x74\x46\x69\x65\x6C\x64\x54\x65\x6D\x70\x6C\x61\x74\x65","\x61\x64\x64\x4F\x62\x6A\x65\x63\x74\x56\x61\x6C\x75\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x72\x65\x6D\x6F\x76\x65\x57\x68\x69\x74\x65\x73\x70\x61\x63\x65","\x64\x65\x63\x6F\x64\x65\x52\x6F\x6F\x74","\x67\x72\x61\x70\x68\x4C\x69\x73\x74\x65\x6E\x65\x72\x73\x20\x65\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72\x73\x20\x76\x69\x65\x77\x20\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x20\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72\x20\x65\x64\x69\x74\x6F\x72\x20\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x6C\x61\x79\x65\x72","\x67\x65\x74\x53\x74\x72\x69\x6E\x67\x56\x61\x6C\x75\x65","\x6D\x78\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x43\x6F\x64\x65\x63\x2E\x64\x65\x63\x6F\x64\x65\x3A\x20\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x20","\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x64","\x70\x72\x65\x73\x73\x65\x64\x49\x63\x6F\x6E","\x6D\x6F\x64\x65","\x74\x6F\x67\x67\x6C\x65","\x2D\x2D\x2D","\x63\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x54\x65\x6D\x70\x6C\x61\x74\x65\x20","\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x6D\x6F\x64\x69\x66\x69\x65\x64\x20\x6C\x61\x73\x74\x53\x6E\x61\x70\x73\x68\x6F\x74\x20\x69\x67\x6E\x6F\x72\x65\x64\x43\x68\x61\x6E\x67\x65\x73\x20\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72\x20\x67\x72\x61\x70\x68\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72\x20\x74\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x41\x72\x72\x61\x79","\x64\x65\x63\x6F\x64\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x73","\x75\x69","\x64\x65\x63\x6F\x64\x65\x55\x69","\x73\x65\x74\x4D\x61\x70\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x72\x65\x73\x6F\x75\x72\x63\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65"];var mxClient={VERSION:_0x1bfe[0],IS_IE:0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[1]),IS_IE6:0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[4]),IS_QUIRKS:0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[1])&& (null== document[_0x1bfe[5]]|| 5== document[_0x1bfe[5]]),VML_PREFIX:_0x1bfe[6],OFFICE_PREFIX:_0x1bfe[7],IS_NS:0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[8])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[1]),IS_OP:0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[9]),IS_OT:0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[10])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[11])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[12])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[13])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[14])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[15]),IS_SF:0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[16])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[17]),IS_GC:0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[17]),IS_MT:0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[18])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[19])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[20])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[21])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[22])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[23])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[24])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[25])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[26])&& 0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[27]),IS_SVG:0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[18])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[21])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[28])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[26])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[29])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[30])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[16])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[31])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[9]),NO_FO:0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[19])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[22])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[20])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[23])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[25])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[27])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[32])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[33])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[9])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[1])|| 0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[34]),IS_VML:_0x1bfe[35]== navigator[_0x1bfe[37]][_0x1bfe[36]](),IS_MAC:0< navigator[_0x1bfe[3]][_0x1bfe[36]]()[_0x1bfe[2]](_0x1bfe[38]),IS_TOUCH:0< navigator[_0x1bfe[3]][_0x1bfe[36]]()[_0x1bfe[2]](_0x1bfe[39])|| 0< navigator[_0x1bfe[3]][_0x1bfe[36]]()[_0x1bfe[2]](_0x1bfe[40])|| 0< navigator[_0x1bfe[3]][_0x1bfe[36]]()[_0x1bfe[2]](_0x1bfe[41])|| 0< navigator[_0x1bfe[3]][_0x1bfe[36]]()[_0x1bfe[2]](_0x1bfe[42]),IS_LOCAL:0> document[_0x1bfe[45]][_0x1bfe[44]][_0x1bfe[2]](_0x1bfe[43])&& 0> document[_0x1bfe[45]][_0x1bfe[44]][_0x1bfe[2]](_0x1bfe[46]),isBrowserSupported:function(){return mxClient[_0x1bfe[47]]|| mxClient[_0x1bfe[48]]},link:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= _0x47f2x4|| document;if(mxClient[_0x1bfe[49]]){_0x47f2x4[_0x1bfe[53]](_0x1bfe[50]+ _0x47f2x2+ _0x1bfe[51]+ _0x47f2x3+ _0x1bfe[52])}else {var _0x47f2x5=_0x47f2x4[_0x1bfe[55]](_0x1bfe[54]);_0x47f2x5[_0x1bfe[57]](_0x1bfe[56],_0x47f2x2);_0x47f2x5[_0x1bfe[57]](_0x1bfe[44],_0x47f2x3);_0x47f2x5[_0x1bfe[57]](_0x1bfe[58],_0x1bfe[59]);_0x47f2x5[_0x1bfe[57]](_0x1bfe[60],_0x1bfe[61]);_0x47f2x4[_0x1bfe[64]](_0x1bfe[63])[0][_0x1bfe[62]](_0x47f2x5)}},include:function(_0x47f2x2){document[_0x1bfe[53]](_0x1bfe[65]+ _0x47f2x2+ _0x1bfe[66])},dispose:function(){for(var _0x47f2x2=0;_0x47f2x2< mxEvent[_0x1bfe[68]][_0x1bfe[67]];_0x47f2x2++){null!= mxEvent[_0x1bfe[68]][_0x47f2x2][_0x1bfe[69]]&& mxEvent[_0x1bfe[70]](mxEvent[_0x1bfe[68]][_0x47f2x2])}}};mxClient[_0x1bfe[71]]&& mxClient[_0x1bfe[72]]?mxClient[_0x1bfe[73]]= _0x1bfe[74]:mxClient[_0x1bfe[75]]|| mxClient[_0x1bfe[76]]?mxClient[_0x1bfe[73]]= _0x1bfe[77]:mxClient[_0x1bfe[78]]?mxClient[_0x1bfe[73]]= _0x1bfe[79]:mxClient[_0x1bfe[80]]&& 9<= document[_0x1bfe[5]]&& (mxClient[_0x1bfe[73]]= _0x1bfe[81]);_0x1bfe[82]== typeof mxLoadResources&& (mxLoadResources= !0);_0x1bfe[82]== typeof mxResourceExtension&& (mxResourceExtension= _0x1bfe[83]);_0x1bfe[82]== typeof mxLoadStylesheets&& (mxLoadStylesheets= !0);_0x1bfe[82]!= typeof mxBasePath&& 0< mxBasePath[_0x1bfe[67]]?(_0x1bfe[84]== mxBasePath[_0x1bfe[85]](mxBasePath[_0x1bfe[67]]- 1)&& (mxBasePath= mxBasePath[_0x1bfe[85]](0,mxBasePath[_0x1bfe[67]]- 1)),mxClient[_0x1bfe[86]]= mxBasePath):mxClient[_0x1bfe[86]]= _0x1bfe[87];_0x1bfe[82]!= typeof mxImageBasePath&& 0< mxImageBasePath[_0x1bfe[67]]?(_0x1bfe[84]== mxImageBasePath[_0x1bfe[85]](mxImageBasePath[_0x1bfe[67]]- 1)&& (mxImageBasePath= mxImageBasePath[_0x1bfe[85]](0,mxImageBasePath[_0x1bfe[67]]- 1)),mxClient[_0x1bfe[88]]= mxImageBasePath):mxClient[_0x1bfe[88]]= mxClient[_0x1bfe[86]]+ _0x1bfe[89];mxClient[_0x1bfe[90]]= _0x1bfe[82]!= typeof mxLanguage?mxLanguage:mxClient[_0x1bfe[80]]?navigator[_0x1bfe[91]]:navigator[_0x1bfe[90]];mxClient[_0x1bfe[92]]= _0x1bfe[82]!= typeof mxDefaultLanguage?mxDefaultLanguage:_0x1bfe[93];mxLoadStylesheets&& mxClient[_0x1bfe[54]](_0x1bfe[94],mxClient[_0x1bfe[86]]+ _0x1bfe[95]);_0x1bfe[82]!= typeof mxLanguages&& (mxClient[_0x1bfe[96]]= mxLanguages);if(mxClient[_0x1bfe[80]]){if(9<= document[_0x1bfe[5]]){mxClient[_0x1bfe[47]]= !1,mxClient[_0x1bfe[48]]= !0}else {8== document[_0x1bfe[5]]?(document[_0x1bfe[100]][_0x1bfe[99]](mxClient.VML_PREFIX,_0x1bfe[97],_0x1bfe[98]),document[_0x1bfe[100]][_0x1bfe[99]](mxClient.OFFICE_PREFIX,_0x1bfe[101],_0x1bfe[98])):(document[_0x1bfe[100]][_0x1bfe[99]](mxClient.VML_PREFIX,_0x1bfe[97]),document[_0x1bfe[100]][_0x1bfe[99]](mxClient.OFFICE_PREFIX,_0x1bfe[101]));var ss=document[_0x1bfe[102]]();ss[_0x1bfe[103]]= _0x1bfe[104];mxLoadStylesheets&& mxClient[_0x1bfe[54]](_0x1bfe[94],mxClient[_0x1bfe[86]]+ _0x1bfe[105])};window[_0x1bfe[108]](_0x1bfe[106],mxClient[_0x1bfe[107]])};var mxLog={consoleName:_0x1bfe[109],TRACE:!1,DEBUG:!0,WARN:!0,buffer:_0x1bfe[110],init:function(){if(null== mxLog[_0x1bfe[111]]&& null!= document[_0x1bfe[112]]){var _0x47f2x2=mxLog[_0x1bfe[113]]+ _0x1bfe[114]+ mxClient[_0x1bfe[115]],_0x47f2x3=document[_0x1bfe[55]](_0x1bfe[116]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[117],_0x1bfe[118]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[119],_0x1bfe[118]);var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[120]),_0x47f2x5=document[_0x1bfe[55]](_0x1bfe[121]),_0x47f2x9=document[_0x1bfe[55]](_0x1bfe[122]);_0x47f2x9[_0x1bfe[124]][_0x1bfe[123]]= _0x1bfe[125];mxLog[_0x1bfe[126]]= document[_0x1bfe[55]](_0x1bfe[126]);mxLog[_0x1bfe[126]][_0x1bfe[57]](_0x1bfe[127],_0x1bfe[128]);mxLog[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[119]]= _0x1bfe[118];mxLog[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[129]]= _0x1bfe[130];mxLog[_0x1bfe[126]][_0x1bfe[131]]= mxLog[_0x1bfe[132]];mxLog[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[117]]= mxClient[_0x1bfe[133]]&& _0x1bfe[134]!= document[_0x1bfe[135]]?_0x1bfe[136]:_0x1bfe[118];_0x47f2x9[_0x1bfe[62]](mxLog[_0x1bfe[126]]);_0x47f2x5[_0x1bfe[62]](_0x47f2x9);_0x47f2x4[_0x1bfe[62]](_0x47f2x5);_0x47f2x5= document[_0x1bfe[55]](_0x1bfe[121]);mxLog[_0x1bfe[122]]= document[_0x1bfe[55]](_0x1bfe[122]);mxLog[_0x1bfe[122]][_0x1bfe[124]][_0x1bfe[123]]= _0x1bfe[125];mxLog[_0x1bfe[122]][_0x1bfe[57]](_0x1bfe[119],_0x1bfe[137]);_0x47f2x5[_0x1bfe[62]](mxLog[_0x1bfe[122]]);_0x47f2x4[_0x1bfe[62]](_0x47f2x5);_0x47f2x3[_0x1bfe[62]](_0x47f2x4);mxLog[_0x1bfe[140]](_0x1bfe[138],function(_0x47f2x2){mxLog[_0x1bfe[139]]()});mxLog[_0x1bfe[140]](_0x1bfe[141],function(_0x47f2x2){_0x47f2x2= mxUtils[_0x1bfe[142]](document[_0x1bfe[112]]);mxLog[_0x1bfe[143]](_0x47f2x2)});mxLog[_0x1bfe[140]](_0x1bfe[144],function(_0x47f2x2){mxLog[_0x1bfe[145]]= !mxLog[_0x1bfe[145]];mxLog[_0x1bfe[145]]?mxLog[_0x1bfe[143]](_0x1bfe[146]):mxLog[_0x1bfe[143]](_0x1bfe[147])});mxLog[_0x1bfe[140]](_0x1bfe[148],function(_0x47f2x2){try{mxUtils[_0x1bfe[149]](mxLog[_0x1bfe[126]][_0x1bfe[131]])}catch(_0x47f2x3){mxUtils[_0x1bfe[150]](_0x47f2x3)}});mxLog[_0x1bfe[140]](_0x1bfe[151],function(_0x47f2x2){try{mxUtils[_0x1bfe[152]](mxLog[_0x1bfe[126]][_0x1bfe[131]])}catch(_0x47f2x3){mxUtils[_0x1bfe[150]](_0x47f2x3)}});mxLog[_0x1bfe[140]](_0x1bfe[153],function(_0x47f2x2){mxLog[_0x1bfe[126]][_0x1bfe[131]]= _0x1bfe[110]});_0x47f2x5= _0x47f2x4= 0;_0x1bfe[154]=== typeof window[_0x1bfe[155]]?(_0x47f2x4= window[_0x1bfe[156]],_0x47f2x5= window[_0x1bfe[155]]):(_0x47f2x4= document[_0x1bfe[158]][_0x1bfe[157]]|| document[_0x1bfe[112]][_0x1bfe[157]],_0x47f2x5= document[_0x1bfe[112]][_0x1bfe[159]]);mxLog[_0x1bfe[111]]= new mxWindow(_0x47f2x2,_0x47f2x3,Math[_0x1bfe[160]](0,_0x47f2x5- 320),Math[_0x1bfe[160]](0,_0x47f2x4- 210),300,160);mxLog[_0x1bfe[111]][_0x1bfe[161]](!0);mxLog[_0x1bfe[111]][_0x1bfe[162]](!1);mxLog[_0x1bfe[111]][_0x1bfe[163]](!0);mxLog[_0x1bfe[111]][_0x1bfe[164]](!0);mxLog[_0x1bfe[111]][_0x1bfe[165]]= !1;if((mxClient[_0x1bfe[133]]|| mxClient[_0x1bfe[80]])&& !mxClient[_0x1bfe[76]]&& !mxClient[_0x1bfe[75]]&& _0x1bfe[134]!= document[_0x1bfe[135]]){var _0x47f2xa=mxLog[_0x1bfe[111]][_0x1bfe[166]](),_0x47f2x2=function(_0x47f2x2,_0x47f2x3){mxLog[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[119]]= Math[_0x1bfe[160]](0,_0x47f2xa[_0x1bfe[167]]- 70)+ _0x1bfe[168]};mxLog[_0x1bfe[111]][_0x1bfe[169]](mxEvent.RESIZE_END,_0x47f2x2);mxLog[_0x1bfe[111]][_0x1bfe[169]](mxEvent.MAXIMIZE,_0x47f2x2);mxLog[_0x1bfe[111]][_0x1bfe[169]](mxEvent.NORMALIZE,_0x47f2x2);mxLog[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[119]]= _0x1bfe[170]}}},info:function(){mxLog[_0x1bfe[171]](mxUtils.toString(navigator))},addButton:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[172]);mxUtils[_0x1bfe[53]](_0x47f2x4,_0x47f2x2);mxEvent[_0x1bfe[169]](_0x47f2x4,_0x1bfe[173],_0x47f2x3);mxLog[_0x1bfe[122]][_0x1bfe[62]](_0x47f2x4)},isVisible:function(){return null!= mxLog[_0x1bfe[111]]?mxLog[_0x1bfe[111]][_0x1bfe[174]]():!1},show:function(){mxLog[_0x1bfe[175]](!0)},setVisible:function(_0x47f2x2){null== mxLog[_0x1bfe[111]]&& mxLog[_0x1bfe[176]]();null!= mxLog[_0x1bfe[111]]&& mxLog[_0x1bfe[111]][_0x1bfe[175]](_0x47f2x2)},enter:function(_0x47f2x2){if(mxLog[_0x1bfe[145]]){return mxLog[_0x1bfe[171]](_0x1bfe[177]+ _0x47f2x2),( new Date)[_0x1bfe[178]]()}},leave:function(_0x47f2x2,_0x47f2x3){if(mxLog[_0x1bfe[145]]){var _0x47f2x4=0!= _0x47f2x3?_0x1bfe[179]+ (( new Date)[_0x1bfe[178]]()- _0x47f2x3)+ _0x1bfe[180]:_0x1bfe[110];mxLog[_0x1bfe[171]](_0x1bfe[181]+ _0x47f2x2+ _0x47f2x4)}},debug:function(){mxLog[_0x1bfe[182]]&& mxLog[_0x1bfe[171]][_0x1bfe[183]](this,arguments)},warn:function(){mxLog[_0x1bfe[184]]&& mxLog[_0x1bfe[171]][_0x1bfe[183]](this,arguments)},write:function(){for(var _0x47f2x2=_0x1bfe[110],_0x47f2x3=0;_0x47f2x3< arguments[_0x1bfe[67]];_0x47f2x3++){_0x47f2x2+= arguments[_0x47f2x3],_0x47f2x3< arguments[_0x1bfe[67]]- 1&& (_0x47f2x2+= _0x1bfe[185])};null!= mxLog[_0x1bfe[126]]?(mxLog[_0x1bfe[126]][_0x1bfe[131]]+= _0x47f2x2,0<= navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[186])&& (mxLog[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188],mxLog[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[189]),mxLog[_0x1bfe[126]][_0x1bfe[190]]= mxLog[_0x1bfe[126]][_0x1bfe[191]]):mxLog[_0x1bfe[132]]+= _0x47f2x2},writeln:function(){for(var _0x47f2x2=_0x1bfe[110],_0x47f2x3=0;_0x47f2x3< arguments[_0x1bfe[67]];_0x47f2x3++){_0x47f2x2+= arguments[_0x47f2x3],_0x47f2x3< arguments[_0x1bfe[67]]- 1&& (_0x47f2x2+= _0x1bfe[185])};mxLog[_0x1bfe[53]](_0x47f2x2+ _0x1bfe[192])}},mxObjectIdentity={FIELD_NAME:_0x1bfe[193],counter:0,get:function(_0x47f2x2){if(_0x1bfe[194]== typeof _0x47f2x2&& null== _0x47f2x2[mxObjectIdentity[_0x1bfe[195]]]){var _0x47f2x3=mxUtils[_0x1bfe[197]](_0x47f2x2[_0x1bfe[196]]);_0x47f2x2[mxObjectIdentity[_0x1bfe[195]]]= _0x47f2x3+ _0x1bfe[198]+ mxObjectIdentity[_0x1bfe[199]]++};return _0x47f2x2[mxObjectIdentity[_0x1bfe[195]]]},clear:function(_0x47f2x2){_0x1bfe[194]== typeof _0x47f2x2&& delete _0x47f2x2[mxObjectIdentity[_0x1bfe[195]]]}};function mxDictionary(){this[_0x1bfe[200]]()}mxDictionary[_0x1bfe[202]][_0x1bfe[201]]= null;mxDictionary[_0x1bfe[202]][_0x1bfe[200]]= function(){this[_0x1bfe[201]]= {}};mxDictionary[_0x1bfe[202]][_0x1bfe[203]]= function(_0x47f2x2){_0x47f2x2= mxObjectIdentity[_0x1bfe[203]](_0x47f2x2);return this[_0x1bfe[201]][_0x47f2x2]};mxDictionary[_0x1bfe[202]][_0x1bfe[204]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=mxObjectIdentity[_0x1bfe[203]](_0x47f2x2),_0x47f2x5=this[_0x1bfe[201]][_0x47f2x4];this[_0x1bfe[201]][_0x47f2x4]= _0x47f2x3;return _0x47f2x5};mxDictionary[_0x1bfe[202]][_0x1bfe[205]]= function(_0x47f2x2){_0x47f2x2= mxObjectIdentity[_0x1bfe[203]](_0x47f2x2);var _0x47f2x3=this[_0x1bfe[201]][_0x47f2x2];delete this[_0x1bfe[201]][_0x47f2x2];return _0x47f2x3};mxDictionary[_0x1bfe[202]][_0x1bfe[206]]= function(){var _0x47f2x2=[],_0x47f2x3;for(_0x47f2x3 in this[_0x1bfe[201]]){_0x47f2x2[_0x1bfe[207]](_0x47f2x3)};return _0x47f2x2};mxDictionary[_0x1bfe[202]][_0x1bfe[208]]= function(){var _0x47f2x2=[],_0x47f2x3;for(_0x47f2x3 in this[_0x1bfe[201]]){_0x47f2x2[_0x1bfe[207]](this[_0x1bfe[201]][_0x47f2x3])};return _0x47f2x2};mxDictionary[_0x1bfe[202]][_0x1bfe[209]]= function(_0x47f2x2){for(var _0x47f2x3 in this[_0x1bfe[201]]){_0x47f2x2(_0x47f2x3,this[_0x1bfe[201]][_0x47f2x3])}};var mxResources={resources:[],extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(_0x47f2x2){return null!= mxClient[_0x1bfe[96]]?0<= mxUtils[_0x1bfe[2]](mxClient[_0x1bfe[96]],_0x47f2x2):!0},getDefaultBundle:function(_0x47f2x2,_0x47f2x3){return mxResources[_0x1bfe[210]]|| !mxResources[_0x1bfe[211]](_0x47f2x3)?_0x47f2x2+ mxResources[_0x1bfe[212]]:null},getSpecialBundle:function(_0x47f2x2,_0x47f2x3){if(null== mxClient[_0x1bfe[96]]|| !this[_0x1bfe[211]](_0x47f2x3)){var _0x47f2x4=_0x47f2x3[_0x1bfe[2]](_0x1bfe[213]);0< _0x47f2x4&& (_0x47f2x3= _0x47f2x3[_0x1bfe[85]](0,_0x47f2x4))};return mxResources[_0x1bfe[214]]&& mxResources[_0x1bfe[211]](_0x47f2x3)&& _0x47f2x3!= mxClient[_0x1bfe[92]]?_0x47f2x2+ _0x1bfe[215]+ _0x47f2x3+ mxResources[_0x1bfe[212]]:null},add:function(_0x47f2x2,_0x47f2x3){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:mxClient[_0x1bfe[90]][_0x1bfe[216]]();if(_0x47f2x3!= mxConstants[_0x1bfe[217]]){var _0x47f2x4=mxResources[_0x1bfe[218]](_0x47f2x2,_0x47f2x3);if(null!= _0x47f2x4){try{var _0x47f2x5=mxUtils[_0x1bfe[219]](_0x47f2x4);_0x47f2x5[_0x1bfe[220]]()&& mxResources[_0x1bfe[222]](_0x47f2x5[_0x1bfe[221]]())}catch(e){}};_0x47f2x4= mxResources[_0x1bfe[223]](_0x47f2x2,_0x47f2x3);if(null!= _0x47f2x4){try{_0x47f2x5= mxUtils[_0x1bfe[219]](_0x47f2x4),_0x47f2x5[_0x1bfe[220]]()&& mxResources[_0x1bfe[222]](_0x47f2x5[_0x1bfe[221]]())}catch(f){}}}},parse:function(_0x47f2x2){if(null!= _0x47f2x2){_0x47f2x2= _0x47f2x2[_0x1bfe[224]](_0x1bfe[192]);for(var _0x47f2x3=0;_0x47f2x3< _0x47f2x2[_0x1bfe[67]];_0x47f2x3++){if(_0x1bfe[198]!= _0x47f2x2[_0x47f2x3][_0x1bfe[225]](0)){var _0x47f2x4=_0x47f2x2[_0x47f2x3][_0x1bfe[2]](_0x1bfe[226]);if(0< _0x47f2x4){var _0x47f2x5=_0x47f2x2[_0x47f2x3][_0x1bfe[85]](0,_0x47f2x4),_0x47f2x9=_0x47f2x2[_0x47f2x3][_0x1bfe[67]];13== _0x47f2x2[_0x47f2x3][_0x1bfe[227]](_0x47f2x9- 1)&& _0x47f2x9--;_0x47f2x4= _0x47f2x2[_0x47f2x3][_0x1bfe[85]](_0x47f2x4+ 1,_0x47f2x9);this[_0x1bfe[228]]?(_0x47f2x4= _0x47f2x4[_0x1bfe[230]](/\\(?=u[a-fA-F\d]{4})/g,_0x1bfe[229]),mxResources[_0x1bfe[231]][_0x47f2x5]= unescape(_0x47f2x4)):mxResources[_0x1bfe[231]][_0x47f2x5]= _0x47f2x4}}}}},get:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2= mxResources[_0x1bfe[231]][_0x47f2x2];null== _0x47f2x2&& (_0x47f2x2= _0x47f2x4);if(null!= _0x47f2x2&& null!= _0x47f2x3){_0x47f2x4= [];for(var _0x47f2x5=null,_0x47f2x9=0;_0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9++){var _0x47f2xa=_0x47f2x2[_0x1bfe[225]](_0x47f2x9);_0x1bfe[232]== _0x47f2xa?_0x47f2x5= _0x1bfe[110]:null!= _0x47f2x5&& _0x1bfe[233]== _0x47f2xa?(_0x47f2x5= parseInt(_0x47f2x5)- 1,0<= _0x47f2x5&& _0x47f2x5< _0x47f2x3[_0x1bfe[67]]&& _0x47f2x4[_0x1bfe[207]](_0x47f2x3[_0x47f2x5]),_0x47f2x5= null):null!= _0x47f2x5?_0x47f2x5+= _0x47f2xa:_0x47f2x4[_0x1bfe[207]](_0x47f2xa)};_0x47f2x2= _0x47f2x4[_0x1bfe[234]](_0x1bfe[110])};return _0x47f2x2}};function mxPoint(_0x47f2x2,_0x47f2x3){this[_0x1bfe[235]]= null!= _0x47f2x2?_0x47f2x2:0;this[_0x1bfe[236]]= null!= _0x47f2x3?_0x47f2x3:0}mxPoint[_0x1bfe[202]][_0x1bfe[235]]= null;mxPoint[_0x1bfe[202]][_0x1bfe[236]]= null;mxPoint[_0x1bfe[202]][_0x1bfe[237]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[235]]== this[_0x1bfe[235]]&& _0x47f2x2[_0x1bfe[236]]== this[_0x1bfe[236]]};mxPoint[_0x1bfe[202]][_0x1bfe[238]]= function(){return mxUtils[_0x1bfe[238]](this)};function mxRectangle(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxPoint[_0x1bfe[239]](this,_0x47f2x2,_0x47f2x3);this[_0x1bfe[117]]= null!= _0x47f2x4?_0x47f2x4:0;this[_0x1bfe[119]]= null!= _0x47f2x5?_0x47f2x5:0}mxRectangle[_0x1bfe[202]]= new mxPoint;mxRectangle[_0x1bfe[202]][_0x1bfe[196]]= mxRectangle;mxRectangle[_0x1bfe[202]][_0x1bfe[117]]= null;mxRectangle[_0x1bfe[202]][_0x1bfe[119]]= null;mxRectangle[_0x1bfe[202]][_0x1bfe[240]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[235]]= _0x47f2x2;this[_0x1bfe[236]]= _0x47f2x3;this[_0x1bfe[117]]= _0x47f2x4;this[_0x1bfe[119]]= _0x47f2x5};mxRectangle[_0x1bfe[202]][_0x1bfe[241]]= function(){return this[_0x1bfe[235]]+ this[_0x1bfe[117]]/ 2};mxRectangle[_0x1bfe[202]][_0x1bfe[242]]= function(){return this[_0x1bfe[236]]+ this[_0x1bfe[119]]/ 2};mxRectangle[_0x1bfe[202]][_0x1bfe[99]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=Math[_0x1bfe[243]](this[_0x1bfe[235]],_0x47f2x2[_0x1bfe[235]]),_0x47f2x4=Math[_0x1bfe[243]](this[_0x1bfe[236]],_0x47f2x2[_0x1bfe[236]]),_0x47f2x5=Math[_0x1bfe[160]](this[_0x1bfe[235]]+ this[_0x1bfe[117]],_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]);_0x47f2x2= Math[_0x1bfe[160]](this[_0x1bfe[236]]+ this[_0x1bfe[119]],_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]);this[_0x1bfe[235]]= _0x47f2x3;this[_0x1bfe[236]]= _0x47f2x4;this[_0x1bfe[117]]= _0x47f2x5- _0x47f2x3;this[_0x1bfe[119]]= _0x47f2x2- _0x47f2x4}};mxRectangle[_0x1bfe[202]][_0x1bfe[244]]= function(_0x47f2x2){this[_0x1bfe[235]]-= _0x47f2x2;this[_0x1bfe[236]]-= _0x47f2x2;this[_0x1bfe[117]]+= 2* _0x47f2x2;this[_0x1bfe[119]]+= 2* _0x47f2x2};mxRectangle[_0x1bfe[202]][_0x1bfe[245]]= function(){return new mxPoint(this[_0x1bfe[235]],this[_0x1bfe[236]])};mxRectangle[_0x1bfe[202]][_0x1bfe[237]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[235]]== this[_0x1bfe[235]]&& _0x47f2x2[_0x1bfe[236]]== this[_0x1bfe[236]]&& _0x47f2x2[_0x1bfe[117]]== this[_0x1bfe[117]]&& _0x47f2x2[_0x1bfe[119]]== this[_0x1bfe[119]]};var mxEffects={animateChanges:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=0,_0x47f2x9=function(){for(var _0x47f2x12=!1,_0x47f2x13=0;_0x47f2x13< _0x47f2x3[_0x1bfe[67]];_0x47f2x13++){var _0x47f2x14=_0x47f2x3[_0x47f2x13];if(_0x47f2x14 instanceof mxGeometryChange|| _0x47f2x14 instanceof mxTerminalChange|| _0x47f2x14 instanceof mxValueChange|| _0x47f2x14 instanceof mxChildChange|| _0x47f2x14 instanceof mxStyleChange){var _0x47f2x15=_0x47f2x2[_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x14[_0x1bfe[246]]|| _0x47f2x14[_0x1bfe[247]],!1);if(null!= _0x47f2x15){if(_0x47f2x12= !0,_0x47f2x14[_0x1bfe[196]]!= mxGeometryChange|| _0x47f2x2[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x14[_0x1bfe[246]])){mxUtils[_0x1bfe[254]](_0x47f2x15[_0x1bfe[253]][_0x1bfe[252]],100* _0x47f2x5/ 10)}else {var _0x47f2x16=_0x47f2x2[_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x17=(_0x47f2x14[_0x1bfe[256]][_0x1bfe[235]]- _0x47f2x14[_0x1bfe[257]][_0x1bfe[235]])* _0x47f2x16,_0x47f2x18=(_0x47f2x14[_0x1bfe[256]][_0x1bfe[236]]- _0x47f2x14[_0x1bfe[257]][_0x1bfe[236]])* _0x47f2x16,_0x47f2x19=(_0x47f2x14[_0x1bfe[256]][_0x1bfe[117]]- _0x47f2x14[_0x1bfe[257]][_0x1bfe[117]])* _0x47f2x16,_0x47f2x16=(_0x47f2x14[_0x1bfe[256]][_0x1bfe[119]]- _0x47f2x14[_0x1bfe[257]][_0x1bfe[119]])* _0x47f2x16;0== _0x47f2x5?(_0x47f2x15[_0x1bfe[235]]-= _0x47f2x17,_0x47f2x15[_0x1bfe[236]]-= _0x47f2x18,_0x47f2x15[_0x1bfe[117]]-= _0x47f2x19,_0x47f2x15[_0x1bfe[119]]-= _0x47f2x16):(_0x47f2x15[_0x1bfe[235]]+= _0x47f2x17/ 10,_0x47f2x15[_0x1bfe[236]]+= _0x47f2x18/ 10,_0x47f2x15[_0x1bfe[117]]+= _0x47f2x19/ 10,_0x47f2x15[_0x1bfe[119]]+= _0x47f2x16/ 10);_0x47f2x2[_0x1bfe[259]][_0x1bfe[258]](_0x47f2x15);mxEffects[_0x1bfe[260]](_0x47f2x2,_0x47f2x14[_0x1bfe[246]],100* _0x47f2x5/ 10)}}}};10> _0x47f2x5&& _0x47f2x12?(_0x47f2x5++,window[_0x1bfe[261]](_0x47f2x9,_0x47f2xa)):null!= _0x47f2x4&& _0x47f2x4()},_0x47f2xa=30;_0x47f2x9()},cascadeOpacity:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){for(var _0x47f2x5=_0x47f2x2[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x3),_0x47f2x9=0;_0x47f2x9< _0x47f2x5;_0x47f2x9++){var _0x47f2xa=_0x47f2x2[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x3,_0x47f2x9),_0x47f2x12=_0x47f2x2[_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2xa);null!= _0x47f2x12&& (mxUtils[_0x1bfe[254]](_0x47f2x12[_0x1bfe[253]][_0x1bfe[252]],_0x47f2x4),mxEffects[_0x1bfe[260]](_0x47f2x2,_0x47f2xa,_0x47f2x4))};_0x47f2x3= _0x47f2x2[_0x1bfe[251]][_0x1bfe[264]](_0x47f2x3);if(null!= _0x47f2x3){for(_0x47f2x9= 0;_0x47f2x9< _0x47f2x3[_0x1bfe[67]];_0x47f2x9++){_0x47f2x5= _0x47f2x2[_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x3[_0x47f2x9]),null!= _0x47f2x5&& mxUtils[_0x1bfe[254]](_0x47f2x5[_0x1bfe[253]][_0x1bfe[252]],_0x47f2x4)}}},fadeOut:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x5= _0x47f2x5|| 40;_0x47f2x9= _0x47f2x9|| 30;var _0x47f2x12=_0x47f2x3|| 100;mxUtils[_0x1bfe[254]](_0x47f2x2,_0x47f2x12);if(_0x47f2xa|| null== _0x47f2xa){var _0x47f2x13=function(){_0x47f2x12= Math[_0x1bfe[160]](_0x47f2x12- _0x47f2x5,0);mxUtils[_0x1bfe[254]](_0x47f2x2,_0x47f2x12);0< _0x47f2x12?window[_0x1bfe[261]](_0x47f2x13,_0x47f2x9):(_0x47f2x2[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188],_0x47f2x4&& _0x47f2x2[_0x1bfe[265]]&& _0x47f2x2[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x2))};window[_0x1bfe[261]](_0x47f2x13,_0x47f2x9)}else {_0x47f2x2[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188],_0x47f2x4&& _0x47f2x2[_0x1bfe[265]]&& _0x47f2x2[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x2)}}},mxUtils={errorResource:_0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[267]:_0x1bfe[110],closeResource:_0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[268]:_0x1bfe[110],errorImage:mxClient[_0x1bfe[88]]+ _0x1bfe[269],removeCursors:function(_0x47f2x2){null!= _0x47f2x2[_0x1bfe[124]]&& (_0x47f2x2[_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[110]);_0x47f2x2= _0x47f2x2[_0x1bfe[271]];if(null!= _0x47f2x2){for(var _0x47f2x3=_0x47f2x2[_0x1bfe[67]],_0x47f2x4=0;_0x47f2x4< _0x47f2x3;_0x47f2x4+= 1){mxUtils[_0x1bfe[272]](_0x47f2x2[_0x47f2x4])}}},getCurrentStyle:function(){return mxClient[_0x1bfe[80]]?function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[273]]:null}:function(_0x47f2x2){return null!= _0x47f2x2?window[_0x1bfe[274]](_0x47f2x2,_0x1bfe[110]):null}}(),hasScrollbars:function(_0x47f2x2){_0x47f2x2= mxUtils[_0x1bfe[275]](_0x47f2x2);return null!= _0x47f2x2&& (_0x1bfe[276]== _0x47f2x2[_0x1bfe[277]]|| _0x1bfe[278]== _0x47f2x2[_0x1bfe[277]])},bind:function(_0x47f2x2,_0x47f2x3){return function(){return _0x47f2x3[_0x1bfe[183]](_0x47f2x2,arguments)}},eval:function(_0x47f2x2){var _0x47f2x3=null;if(0<= _0x47f2x2[_0x1bfe[2]](_0x1bfe[279])){try{eval(_0x1bfe[280]+ _0x47f2x2),_0x47f2x3= _mxJavaScriptExpression,_mxJavaScriptExpression= null}catch(c){mxLog[_0x1bfe[283]](c[_0x1bfe[281]]+ _0x1bfe[282]+ _0x47f2x2)}}else {try{_0x47f2x3= eval(_0x47f2x2)}catch(d){mxLog[_0x1bfe[283]](d[_0x1bfe[281]]+ _0x1bfe[282]+ _0x47f2x2)}};return _0x47f2x3},findNode:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=_0x47f2x2[_0x1bfe[284]](_0x47f2x3);if(null!= _0x47f2x5&& _0x47f2x5== _0x47f2x4){return _0x47f2x2};for(_0x47f2x2= _0x47f2x2[_0x1bfe[285]];null!= _0x47f2x2;){_0x47f2x5= mxUtils[_0x1bfe[286]](_0x47f2x2,_0x47f2x3,_0x47f2x4);if(null!= _0x47f2x5){return _0x47f2x5};_0x47f2x2= _0x47f2x2[_0x1bfe[287]]};return null},findNodeByAttribute:function(){return 9<= document[_0x1bfe[5]]?function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=null;if(null!= _0x47f2x2){if(_0x47f2x2[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]&& _0x47f2x2[_0x1bfe[284]](_0x47f2x3)== _0x47f2x4){_0x47f2x5= _0x47f2x2}else {for(_0x47f2x2= _0x47f2x2[_0x1bfe[285]];null!= _0x47f2x2&& null== _0x47f2x5;){_0x47f2x5= mxUtils[_0x1bfe[290]](_0x47f2x2,_0x47f2x3,_0x47f2x4),_0x47f2x2= _0x47f2x2[_0x1bfe[287]]}}};return _0x47f2x5}:mxClient[_0x1bfe[80]]?function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return null== _0x47f2x2?null:_0x47f2x2[_0x1bfe[295]][_0x1bfe[294]](_0x1bfe[291]+ _0x47f2x3+ _0x1bfe[292]+ _0x47f2x4+ _0x1bfe[293])}:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return null== _0x47f2x2?null:_0x47f2x2[_0x1bfe[295]][_0x1bfe[297]](_0x1bfe[291]+ _0x47f2x3+ _0x1bfe[292]+ _0x47f2x4+ _0x1bfe[293],_0x47f2x2[_0x1bfe[295]],null,XPathResult.ANY_TYPE,null)[_0x1bfe[296]]()}}(),getFunctionName:function(_0x47f2x2){var _0x47f2x3=null;if(null!= _0x47f2x2){if(null!= _0x47f2x2[_0x1bfe[298]]){_0x47f2x3= _0x47f2x2[_0x1bfe[298]]}else {_0x47f2x2= _0x47f2x2.toString();for(_0x47f2x3= 9;_0x1bfe[185]== _0x47f2x2[_0x1bfe[225]](_0x47f2x3);){_0x47f2x3++};var _0x47f2x4=_0x47f2x2[_0x1bfe[2]](_0x1bfe[299],_0x47f2x3),_0x47f2x3=_0x47f2x2[_0x1bfe[85]](_0x47f2x3,_0x47f2x4)}};return _0x47f2x3},indexOf:function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2&& null!= _0x47f2x3){for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){if(_0x47f2x2[_0x47f2x4]== _0x47f2x3){return _0x47f2x4}}};return -1},remove:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=null;if(_0x1bfe[194]== typeof _0x47f2x3){for(var _0x47f2x5=mxUtils[_0x1bfe[2]](_0x47f2x3,_0x47f2x2);0<= _0x47f2x5;){_0x47f2x3[_0x1bfe[300]](_0x47f2x5,1),_0x47f2x4= _0x47f2x2,_0x47f2x5= mxUtils[_0x1bfe[2]](_0x47f2x3,_0x47f2x2)}};for(var _0x47f2x9 in _0x47f2x3){_0x47f2x3[_0x47f2x9]== _0x47f2x2&& ( delete _0x47f2x3[_0x47f2x9],_0x47f2x4= _0x47f2x2)};return _0x47f2x4},isNode:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){return null!= _0x47f2x2&& !isNaN(_0x47f2x2[_0x1bfe[288]])&& (null== _0x47f2x3|| _0x47f2x2[_0x1bfe[301]][_0x1bfe[216]]()== _0x47f2x3[_0x1bfe[216]]())?null== _0x47f2x4|| _0x47f2x2[_0x1bfe[284]](_0x47f2x4)== _0x47f2x5:!1},getChildNodes:function(_0x47f2x2,_0x47f2x3){_0x47f2x3= _0x47f2x3|| mxConstants[_0x1bfe[289]];for(var _0x47f2x4=[],_0x47f2x5=_0x47f2x2[_0x1bfe[285]];null!= _0x47f2x5;){_0x47f2x5[_0x1bfe[288]]== _0x47f2x3&& _0x47f2x4[_0x1bfe[207]](_0x47f2x5),_0x47f2x5= _0x47f2x5[_0x1bfe[287]]};return _0x47f2x4},createXmlDocument:function(){var _0x47f2x2=null;document[_0x1bfe[302]]&& document[_0x1bfe[302]][_0x1bfe[303]]?_0x47f2x2= document[_0x1bfe[302]][_0x1bfe[303]](_0x1bfe[110],_0x1bfe[110],null):window[_0x1bfe[304]]&& (_0x47f2x2= new ActiveXObject(_0x1bfe[305]));return _0x47f2x2},parseXml:function(){return mxClient[_0x1bfe[80]]&& (_0x1bfe[82]=== typeof document[_0x1bfe[5]]|| 9> document[_0x1bfe[5]])?function(_0x47f2x2){var _0x47f2x3=mxUtils[_0x1bfe[306]]();_0x47f2x3[_0x1bfe[307]]= _0x1bfe[308];_0x47f2x3[_0x1bfe[309]](_0x47f2x2);return _0x47f2x3}:function(_0x47f2x2){return ( new DOMParser)[_0x1bfe[311]](_0x47f2x2,_0x1bfe[310])}}(),clearSelection:function(){if(document[_0x1bfe[312]]){return function(){document[_0x1bfe[312]][_0x1bfe[313]]()}};if(window[_0x1bfe[314]]){return function(){window[_0x1bfe[314]]()[_0x1bfe[315]]()}}}(),getPrettyXml:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=[];if(null!= _0x47f2x2){if(_0x47f2x3= _0x47f2x3|| _0x1bfe[316],_0x47f2x4= _0x47f2x4|| _0x1bfe[110],_0x47f2x2[_0x1bfe[288]]== mxConstants[_0x1bfe[317]]){_0x47f2x5[_0x1bfe[207]](_0x47f2x2[_0x1bfe[318]])}else {_0x47f2x5[_0x1bfe[207]](_0x47f2x4+ _0x1bfe[319]+ _0x47f2x2[_0x1bfe[301]]);var _0x47f2x9=_0x47f2x2[_0x1bfe[320]];if(null!= _0x47f2x9){for(var _0x47f2xa=0;_0x47f2xa< _0x47f2x9[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=mxUtils[_0x1bfe[321]](_0x47f2x9[_0x47f2xa][_0x1bfe[318]]);_0x47f2x5[_0x1bfe[207]](_0x1bfe[185]+ _0x47f2x9[_0x47f2xa][_0x1bfe[301]]+ _0x1bfe[322]+ _0x47f2x12+ _0x1bfe[323])}};_0x47f2x9= _0x47f2x2[_0x1bfe[285]];if(null!= _0x47f2x9){for(_0x47f2x5[_0x1bfe[207]](_0x1bfe[324]);null!= _0x47f2x9;){_0x47f2x5[_0x1bfe[207]](mxUtils[_0x1bfe[325]](_0x47f2x9,_0x47f2x3,_0x47f2x4+ _0x47f2x3)),_0x47f2x9= _0x47f2x9[_0x1bfe[287]]};_0x47f2x5[_0x1bfe[207]](_0x47f2x4+ _0x1bfe[326]+ _0x47f2x2[_0x1bfe[301]]+ _0x1bfe[324])}else {_0x47f2x5[_0x1bfe[207]](_0x1bfe[327])}}};return _0x47f2x5[_0x1bfe[234]](_0x1bfe[110])},removeWhitespace:function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=_0x47f2x3?_0x47f2x2[_0x1bfe[328]]:_0x47f2x2[_0x1bfe[287]];null!= _0x47f2x4&& _0x47f2x4[_0x1bfe[288]]== mxConstants[_0x1bfe[317]];){var _0x47f2x5=_0x47f2x3?_0x47f2x4[_0x1bfe[328]]:_0x47f2x4[_0x1bfe[287]],_0x47f2x9=mxUtils[_0x1bfe[329]](_0x47f2x4);0== mxUtils[_0x1bfe[330]](_0x47f2x9)[_0x1bfe[67]]&& _0x47f2x4[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x4);_0x47f2x4= _0x47f2x5}},htmlEntities:function(_0x47f2x2,_0x47f2x3){_0x47f2x2= (_0x47f2x2|| _0x1bfe[110])[_0x1bfe[230]](/&/g,_0x1bfe[331]);_0x47f2x2= _0x47f2x2[_0x1bfe[230]](/"/g,_0x1bfe[332]);_0x47f2x2= _0x47f2x2[_0x1bfe[230]](/\'/g,_0x1bfe[333]);_0x47f2x2= _0x47f2x2[_0x1bfe[230]](//g,_0x1bfe[335]);if(null== _0x47f2x3|| _0x47f2x3){_0x47f2x2= _0x47f2x2[_0x1bfe[230]](/\n/g,_0x1bfe[336])};return _0x47f2x2},isVml:function(_0x47f2x2){return null!= _0x47f2x2&& _0x1bfe[97]== _0x47f2x2[_0x1bfe[337]]},getXml:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x1bfe[110];null!= _0x47f2x2&& (_0x47f2x4= _0x47f2x2[_0x1bfe[338]],_0x47f2x4= null== _0x47f2x4?_0x47f2x2[_0x1bfe[339]]?_0x47f2x2[_0x1bfe[339]]:( new XMLSerializer)[_0x1bfe[340]](_0x47f2x2):_0x47f2x4[_0x1bfe[230]](/\r\n\t[\t]*/g,_0x1bfe[110])[_0x1bfe[230]](/>\r\n/g,_0x1bfe[341])[_0x1bfe[230]](/\r\n/g,_0x1bfe[192]));return _0x47f2x4= _0x47f2x4[_0x1bfe[230]](/\n/g,_0x47f2x3|| _0x1bfe[336])},getTextContent:function(_0x47f2x2){var _0x47f2x3=_0x1bfe[110];null!= _0x47f2x2&& (null!= _0x47f2x2[_0x1bfe[285]]&& (_0x47f2x2= _0x47f2x2[_0x1bfe[285]]),_0x47f2x3= _0x47f2x2[_0x1bfe[318]]|| _0x1bfe[110]);return _0x47f2x3},getInnerHtml:function(){return mxClient[_0x1bfe[80]]?function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[339]]:_0x1bfe[110]}:function(_0x47f2x2){return null!= _0x47f2x2?( new XMLSerializer)[_0x1bfe[340]](_0x47f2x2):_0x1bfe[110]}}(),getOuterHtml:function(){return mxClient[_0x1bfe[80]]?function(_0x47f2x2){if(null!= _0x47f2x2){if(null!= _0x47f2x2[_0x1bfe[342]]){return _0x47f2x2[_0x1bfe[342]]};var _0x47f2x3=[];_0x47f2x3[_0x1bfe[207]](_0x1bfe[319]+ _0x47f2x2[_0x1bfe[301]]);var _0x47f2x4=_0x47f2x2[_0x1bfe[320]];if(null!= _0x47f2x4){for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x4[_0x1bfe[67]];_0x47f2x5++){var _0x47f2x9=_0x47f2x4[_0x47f2x5][_0x1bfe[318]];null!= _0x47f2x9&& 0< _0x47f2x9[_0x1bfe[67]]&& (_0x47f2x3[_0x1bfe[207]](_0x1bfe[185]),_0x47f2x3[_0x1bfe[207]](_0x47f2x4[_0x47f2x5][_0x1bfe[301]]),_0x47f2x3[_0x1bfe[207]](_0x1bfe[322]),_0x47f2x3[_0x1bfe[207]](_0x47f2x9),_0x47f2x3[_0x1bfe[207]](_0x1bfe[323]))}};0== _0x47f2x2[_0x1bfe[339]][_0x1bfe[67]]?_0x47f2x3[_0x1bfe[207]](_0x1bfe[343]):(_0x47f2x3[_0x1bfe[207]](_0x1bfe[341]),_0x47f2x3[_0x1bfe[207]](_0x47f2x2[_0x1bfe[339]]),_0x47f2x3[_0x1bfe[207]](_0x1bfe[326]+ _0x47f2x2[_0x1bfe[301]]+ _0x1bfe[341]));return _0x47f2x3[_0x1bfe[234]](_0x1bfe[110])};return _0x1bfe[110]}:function(_0x47f2x2){return null!= _0x47f2x2?( new XMLSerializer)[_0x1bfe[340]](_0x47f2x2):_0x1bfe[110]}}(),write:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x2[_0x1bfe[295]][_0x1bfe[344]](_0x47f2x3);null!= _0x47f2x2&& _0x47f2x2[_0x1bfe[62]](_0x47f2x4);return _0x47f2x4},writeln:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x2[_0x1bfe[295]][_0x1bfe[344]](_0x47f2x3);null!= _0x47f2x2&& (_0x47f2x2[_0x1bfe[62]](_0x47f2x4),_0x47f2x2[_0x1bfe[62]](document[_0x1bfe[55]](_0x1bfe[345])));return _0x47f2x4},br:function(_0x47f2x2,_0x47f2x3){_0x47f2x3= _0x47f2x3|| 1;for(var _0x47f2x4=null,_0x47f2x5=0;_0x47f2x5< _0x47f2x3;_0x47f2x5++){null!= _0x47f2x2&& (_0x47f2x4= _0x47f2x2[_0x1bfe[295]][_0x1bfe[55]](_0x1bfe[345]),_0x47f2x2[_0x1bfe[62]](_0x47f2x4))};return _0x47f2x4},button:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:document;_0x47f2x4= _0x47f2x4[_0x1bfe[55]](_0x1bfe[172]);mxUtils[_0x1bfe[53]](_0x47f2x4,_0x47f2x2);mxEvent[_0x1bfe[169]](_0x47f2x4,_0x1bfe[173],function(_0x47f2x2){_0x47f2x3(_0x47f2x2)});return _0x47f2x4},para:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[346]);mxUtils[_0x1bfe[53]](_0x47f2x4,_0x47f2x3);null!= _0x47f2x2&& _0x47f2x2[_0x1bfe[62]](_0x47f2x4);return _0x47f2x4},addTransparentBackgroundFilter:function(_0x47f2x2){_0x47f2x2[_0x1bfe[124]][_0x1bfe[347]]+= _0x1bfe[348]+ mxClient[_0x1bfe[88]]+ _0x1bfe[349]},linkAction:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){return mxUtils[_0x1bfe[54]](_0x47f2x2,_0x47f2x3,function(){_0x47f2x4[_0x1bfe[350]](_0x47f2x5)},_0x47f2x9)},linkInvoke:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){return mxUtils[_0x1bfe[54]](_0x47f2x2,_0x47f2x3,function(){_0x47f2x4[_0x47f2x5](_0x47f2x9)},_0x47f2xa)},link:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=document[_0x1bfe[55]](_0x1bfe[351]);_0x47f2x9[_0x1bfe[124]][_0x1bfe[352]]= _0x1bfe[353];_0x47f2x9[_0x1bfe[124]][_0x1bfe[354]]= _0x1bfe[355];_0x47f2x9[_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[356];null!= _0x47f2x5&& (_0x47f2x9[_0x1bfe[124]][_0x1bfe[357]]= _0x47f2x5+ _0x1bfe[168]);mxEvent[_0x1bfe[169]](_0x47f2x9,_0x1bfe[173],_0x47f2x4);mxUtils[_0x1bfe[53]](_0x47f2x9,_0x47f2x3);null!= _0x47f2x2&& _0x47f2x2[_0x1bfe[62]](_0x47f2x9);return _0x47f2x9},fit:function(_0x47f2x2){var _0x47f2x3=parseInt(_0x47f2x2[_0x1bfe[358]]),_0x47f2x4=parseInt(_0x47f2x2[_0x1bfe[359]]),_0x47f2x5=document[_0x1bfe[112]],_0x47f2x9=document[_0x1bfe[158]],_0x47f2xa=(_0x47f2x5[_0x1bfe[360]]|| _0x47f2x9[_0x1bfe[360]])+ (_0x47f2x5[_0x1bfe[159]]|| _0x47f2x9[_0x1bfe[159]]);_0x47f2x3+ _0x47f2x4> _0x47f2xa&& (_0x47f2x2[_0x1bfe[124]][_0x1bfe[361]]= Math[_0x1bfe[160]](_0x47f2x5[_0x1bfe[360]]|| _0x47f2x9[_0x1bfe[360]],_0x47f2xa- _0x47f2x4)+ _0x1bfe[168]);_0x47f2x3= parseInt(_0x47f2x2[_0x1bfe[362]]);_0x47f2x4= parseInt(_0x47f2x2[_0x1bfe[167]]);_0x47f2xa= (_0x47f2x5[_0x1bfe[190]]|| _0x47f2x9[_0x1bfe[190]])+ Math[_0x1bfe[160]](_0x47f2x5[_0x1bfe[157]]|| 0,_0x47f2x9[_0x1bfe[157]]);_0x47f2x3+ _0x47f2x4> _0x47f2xa&& (_0x47f2x2[_0x1bfe[124]][_0x1bfe[125]]= Math[_0x1bfe[160]](_0x47f2x5[_0x1bfe[190]]|| _0x47f2x9[_0x1bfe[190]],_0x47f2xa- _0x47f2x4)+ _0x1bfe[168])},open:function(_0x47f2x2){if(mxClient[_0x1bfe[133]]){try{netscape[_0x1bfe[366]][_0x1bfe[365]][_0x1bfe[364]](_0x1bfe[363])}catch(b){return mxUtils[_0x1bfe[150]](_0x1bfe[367]),_0x1bfe[110]};var _0x47f2x4=Components[_0x1bfe[372]][_0x1bfe[371]][_0x1bfe[370]](Components[_0x1bfe[369]][_0x1bfe[368]]);_0x47f2x4[_0x1bfe[373]](_0x47f2x2);if(!_0x47f2x4[_0x1bfe[374]]()){return mxUtils[_0x1bfe[150]](_0x1bfe[375]),_0x1bfe[110]};_0x47f2x2= Components[_0x1bfe[372]][_0x1bfe[377]][_0x1bfe[370]](Components[_0x1bfe[369]][_0x1bfe[376]]);_0x47f2x2[_0x1bfe[176]](_0x47f2x4,1,4,null);_0x47f2x4= Components[_0x1bfe[372]][_0x1bfe[379]][_0x1bfe[370]](Components[_0x1bfe[369]][_0x1bfe[378]]);_0x47f2x4[_0x1bfe[176]](_0x47f2x2);return _0x47f2x4[_0x1bfe[381]](_0x47f2x4[_0x1bfe[380]]())};_0x47f2x4= ( new ActiveXObject(_0x1bfe[382])).OpenTextFile(_0x47f2x2,1);_0x47f2x2= _0x47f2x4[_0x1bfe[383]]();_0x47f2x4[_0x1bfe[268]]();return _0x47f2x2},save:function(_0x47f2x2,_0x47f2x3){if(mxClient[_0x1bfe[133]]){try{netscape[_0x1bfe[366]][_0x1bfe[365]][_0x1bfe[364]](_0x1bfe[363])}catch(c){mxUtils[_0x1bfe[150]](_0x1bfe[384]);return};var _0x47f2x5=Components[_0x1bfe[372]][_0x1bfe[371]][_0x1bfe[370]](Components[_0x1bfe[369]][_0x1bfe[368]]);_0x47f2x5[_0x1bfe[373]](_0x47f2x2);_0x47f2x5[_0x1bfe[374]]()|| _0x47f2x5[_0x1bfe[385]](0,420);var _0x47f2x9=Components[_0x1bfe[372]][_0x1bfe[387]][_0x1bfe[370]](Components[_0x1bfe[369]][_0x1bfe[386]]);_0x47f2x9[_0x1bfe[176]](_0x47f2x5,34,4,null);_0x47f2x9[_0x1bfe[53]](_0x47f2x3,_0x47f2x3[_0x1bfe[67]]);_0x47f2x9[_0x1bfe[388]]();_0x47f2x9[_0x1bfe[268]]()}else {_0x47f2x5= ( new ActiveXObject(_0x1bfe[382])).CreateTextFile(_0x47f2x2,!0),_0x47f2x5.Write(_0x47f2x3),_0x47f2x5.Close()}},saveAs:function(_0x47f2x2){var _0x47f2x3=document[_0x1bfe[55]](_0x1bfe[389]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[390],_0x1bfe[110]);_0x47f2x3[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188];document[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x3);try{if(mxClient[_0x1bfe[133]]){var _0x47f2x4=_0x47f2x3[_0x1bfe[391]];_0x47f2x4[_0x1bfe[392]]();_0x47f2x4[_0x1bfe[53]](_0x47f2x2);_0x47f2x4[_0x1bfe[268]]();try{netscape[_0x1bfe[366]][_0x1bfe[365]][_0x1bfe[364]](_0x1bfe[363]),_0x47f2x3[_0x1bfe[393]](),saveDocument(_0x47f2x4)}catch(d){mxUtils[_0x1bfe[150]](_0x1bfe[394])}}else {_0x47f2x4= _0x47f2x3[_0x1bfe[396]][_0x1bfe[395]],_0x47f2x4[_0x1bfe[53]](_0x47f2x2),_0x47f2x4[_0x1bfe[398]](_0x1bfe[397],!1,document[_0x1bfe[45]])}}finally{document[_0x1bfe[112]][_0x1bfe[266]](_0x47f2x3)}},copy:function(_0x47f2x2){if(window[_0x1bfe[399]]){window[_0x1bfe[399]][_0x1bfe[401]](_0x1bfe[400],_0x47f2x2)}else {netscape[_0x1bfe[366]][_0x1bfe[365]][_0x1bfe[364]](_0x1bfe[363]);var _0x47f2x3=Components[_0x1bfe[372]][_0x1bfe[403]][_0x1bfe[370]](Components[_0x1bfe[369]][_0x1bfe[402]]);if(_0x47f2x3){var _0x47f2x4=Components[_0x1bfe[372]][_0x1bfe[405]][_0x1bfe[370]](Components[_0x1bfe[369]][_0x1bfe[404]]);if(_0x47f2x4){_0x47f2x4[_0x1bfe[407]](_0x1bfe[406]);var _0x47f2x5=Components[_0x1bfe[372]][_0x1bfe[409]][_0x1bfe[370]](Components[_0x1bfe[369]][_0x1bfe[408]]);_0x47f2x5[_0x1bfe[410]]= _0x47f2x2;_0x47f2x4[_0x1bfe[411]](_0x1bfe[406],_0x47f2x5,2* _0x47f2x2[_0x1bfe[67]]);_0x47f2x3[_0x1bfe[401]](_0x47f2x4,null,Components[_0x1bfe[369]][_0x1bfe[402]][_0x1bfe[412]])}}}},load:function(_0x47f2x2){_0x47f2x2= new mxXmlRequest(_0x47f2x2,null,_0x1bfe[413],!1);_0x47f2x2[_0x1bfe[414]]();return _0x47f2x2},get:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return ( new mxXmlRequest(_0x47f2x2,null,_0x1bfe[413]))[_0x1bfe[414]](_0x47f2x3,_0x47f2x4)},post:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){return ( new mxXmlRequest(_0x47f2x2,_0x47f2x3))[_0x1bfe[414]](_0x47f2x4,_0x47f2x5)},submit:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){return ( new mxXmlRequest(_0x47f2x2,_0x47f2x3))[_0x1bfe[415]](_0x47f2x4,_0x47f2x5)},loadInto:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){mxClient[_0x1bfe[80]]?_0x47f2x3[_0x1bfe[416]]= function(){4== _0x47f2x3[_0x1bfe[417]]&& _0x47f2x4()}:_0x47f2x3[_0x1bfe[418]](_0x1bfe[219],_0x47f2x4,!1);_0x47f2x3[_0x1bfe[219]](_0x47f2x2)},getValue:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2= null!= _0x47f2x2?_0x47f2x2[_0x47f2x3]:null;null== _0x47f2x2&& (_0x47f2x2= _0x47f2x4);return _0x47f2x2},getNumber:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2= null!= _0x47f2x2?_0x47f2x2[_0x47f2x3]:null;null== _0x47f2x2&& (_0x47f2x2= _0x47f2x4|| 0);return Number(_0x47f2x2)},getColor:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2= null!= _0x47f2x2?_0x47f2x2[_0x47f2x3]:null;null== _0x47f2x2?_0x47f2x2= _0x47f2x4:_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);return _0x47f2x2},clone:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!1;var _0x47f2x5=null;if(null!= _0x47f2x2&& _0x1bfe[279]== typeof _0x47f2x2[_0x1bfe[196]]){var _0x47f2x5= new _0x47f2x2[_0x1bfe[196]],_0x47f2x9;for(_0x47f2x9 in _0x47f2x2){if(_0x47f2x9!= mxObjectIdentity[_0x1bfe[195]]&& (null== _0x47f2x3|| 0> mxUtils[_0x1bfe[2]](_0x47f2x3,_0x47f2x9))){_0x47f2x5[_0x47f2x9]= !_0x47f2x4&& _0x1bfe[194]== typeof _0x47f2x2[_0x47f2x9]?mxUtils[_0x1bfe[238]](_0x47f2x2[_0x47f2x9]):_0x47f2x2[_0x47f2x9]}}};return _0x47f2x5},equalPoints:function(_0x47f2x2,_0x47f2x3){if(null== _0x47f2x2&& null!= _0x47f2x3|| null!= _0x47f2x2&& null== _0x47f2x3|| null!= _0x47f2x2&& null!= _0x47f2x3&& _0x47f2x2[_0x1bfe[67]]!= _0x47f2x3[_0x1bfe[67]]){return !1};if(null!= _0x47f2x2&& null!= _0x47f2x3){for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){if(_0x47f2x2[_0x47f2x4]== _0x47f2x3[_0x47f2x4]|| null!= _0x47f2x2[_0x47f2x4]&& !_0x47f2x2[_0x47f2x4][_0x1bfe[237]](_0x47f2x3[_0x47f2x4])){return !1}}};return !0},equalEntries:function(_0x47f2x2,_0x47f2x3){if(null== _0x47f2x2&& null!= _0x47f2x3|| null!= _0x47f2x2&& null== _0x47f2x3|| null!= _0x47f2x2&& null!= _0x47f2x3&& _0x47f2x2[_0x1bfe[67]]!= _0x47f2x3[_0x1bfe[67]]){return !1};if(null!= _0x47f2x2&& null!= _0x47f2x3){for(var _0x47f2x4 in _0x47f2x2){if(_0x47f2x2[_0x47f2x4]!= _0x47f2x3[_0x47f2x4]){return !1}}};return !0},extend:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=function(){};_0x47f2x4[_0x1bfe[202]]= _0x47f2x3[_0x1bfe[202]];_0x47f2x2[_0x1bfe[202]]= new _0x47f2x4;_0x47f2x2[_0x1bfe[202]][_0x1bfe[196]]= _0x47f2x2},toString:function(_0x47f2x2){var _0x47f2x3=_0x1bfe[110],_0x47f2x4;for(_0x47f2x4 in _0x47f2x2){try{if(null== _0x47f2x2[_0x47f2x4]){_0x47f2x3+= _0x47f2x4+ _0x1bfe[419]}else {if(_0x1bfe[279]== typeof _0x47f2x2[_0x47f2x4]){_0x47f2x3+= _0x47f2x4+ _0x1bfe[420]}else {if(_0x1bfe[194]== typeof _0x47f2x2[_0x47f2x4]){var _0x47f2x5=mxUtils[_0x1bfe[197]](_0x47f2x2[_0x47f2x4][_0x1bfe[196]]),_0x47f2x3=_0x47f2x3+ (_0x47f2x4+ _0x1bfe[421]+ _0x47f2x5+ _0x1bfe[422])}else {_0x47f2x3+= _0x47f2x4+ _0x1bfe[423]+ _0x47f2x2[_0x47f2x4]+ _0x1bfe[192]}}}}catch(e){_0x47f2x3+= _0x47f2x4+ _0x1bfe[226]+ e[_0x1bfe[281]]}};return _0x47f2x3},toRadians:function(_0x47f2x2){return Math[_0x1bfe[424]]* _0x47f2x2/ 180},arcToCurves:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14){_0x47f2x13-= _0x47f2x2;_0x47f2x14-= _0x47f2x3;if(0=== _0x47f2x4|| 0=== _0x47f2x5){return _0x47f2x18};_0x47f2x4= Math[_0x1bfe[425]](_0x47f2x4);_0x47f2x5= Math[_0x1bfe[425]](_0x47f2x5);var _0x47f2x15=-_0x47f2x13/ 2,_0x47f2x16=-_0x47f2x14/ 2,_0x47f2x17=Math[_0x1bfe[426]](_0x47f2x9* Math[_0x1bfe[424]]/ 180),_0x47f2x18=Math[_0x1bfe[427]](_0x47f2x9* Math[_0x1bfe[424]]/ 180);_0x47f2x9= _0x47f2x17* _0x47f2x15+ _0x47f2x18* _0x47f2x16;var _0x47f2x15=-1* _0x47f2x18* _0x47f2x15+ _0x47f2x17* _0x47f2x16,_0x47f2x16=_0x47f2x9* _0x47f2x9,_0x47f2x19=_0x47f2x15* _0x47f2x15,_0x47f2x1a=_0x47f2x4* _0x47f2x4,_0x47f2x1b=_0x47f2x5* _0x47f2x5,_0x47f2x1c=_0x47f2x16/ _0x47f2x1a+ _0x47f2x19/ _0x47f2x1b;1< _0x47f2x1c?(_0x47f2x4*= Math[_0x1bfe[428]](_0x47f2x1c),_0x47f2x5*= Math[_0x1bfe[428]](_0x47f2x1c),_0x47f2xa= 0):(_0x47f2x1c= 1,_0x47f2xa=== _0x47f2x12&& (_0x47f2x1c= -1),_0x47f2xa= _0x47f2x1c* Math[_0x1bfe[428]]((_0x47f2x1a* _0x47f2x1b- _0x47f2x1a* _0x47f2x19- _0x47f2x1b* _0x47f2x16)/ (_0x47f2x1a* _0x47f2x19+ _0x47f2x1b* _0x47f2x16)));_0x47f2x16= _0x47f2xa* _0x47f2x4* _0x47f2x15/ _0x47f2x5;_0x47f2x19= -1* _0x47f2xa* _0x47f2x5* _0x47f2x9/ _0x47f2x4;_0x47f2x13= _0x47f2x17* _0x47f2x16- _0x47f2x18* _0x47f2x19+ _0x47f2x13/ 2;_0x47f2x14= _0x47f2x18* _0x47f2x16+ _0x47f2x17* _0x47f2x19+ _0x47f2x14/ 2;_0x47f2x1a= Math[_0x1bfe[429]]((_0x47f2x15- _0x47f2x19)/ _0x47f2x5,(_0x47f2x9- _0x47f2x16)/ _0x47f2x4)- Math[_0x1bfe[429]](0,1);_0x47f2xa= 0<= _0x47f2x1a?_0x47f2x1a:2* Math[_0x1bfe[424]]+ _0x47f2x1a;_0x47f2x1a= Math[_0x1bfe[429]]((-_0x47f2x15- _0x47f2x19) / _0x47f2x5,(-_0x47f2x9- _0x47f2x16) / _0x47f2x4) - Math[_0x1bfe[429]]((_0x47f2x15- _0x47f2x19)/ _0x47f2x5,(_0x47f2x9- _0x47f2x16)/ _0x47f2x4);_0x47f2x9= 0<= _0x47f2x1a?_0x47f2x1a:2* Math[_0x1bfe[424]]+ _0x47f2x1a;0== _0x47f2x12&& 0< _0x47f2x9?_0x47f2x9-= 2* Math[_0x1bfe[424]]:0!= _0x47f2x12&& 0> _0x47f2x9&& (_0x47f2x9+= 2* Math[_0x1bfe[424]]);_0x47f2x12= 2* _0x47f2x9/ Math[_0x1bfe[424]];_0x47f2x12= Math[_0x1bfe[430]](0> _0x47f2x12?-1* _0x47f2x12:_0x47f2x12);_0x47f2x9/= _0x47f2x12;_0x47f2x15= 8/ 3* Math[_0x1bfe[427]](_0x47f2x9/ 4)* Math[_0x1bfe[427]](_0x47f2x9/ 4)/ Math[_0x1bfe[427]](_0x47f2x9/ 2);_0x47f2x16= _0x47f2x17* _0x47f2x4;_0x47f2x17*= _0x47f2x5;_0x47f2x4*= _0x47f2x18;_0x47f2x5*= _0x47f2x18;for(var _0x47f2x1d=Math[_0x1bfe[426]](_0x47f2xa),_0x47f2x1e=Math[_0x1bfe[427]](_0x47f2xa),_0x47f2x19=-_0x47f2x15* (_0x47f2x16* _0x47f2x1e+ _0x47f2x5* _0x47f2x1d),_0x47f2x1a=-_0x47f2x15* (_0x47f2x4* _0x47f2x1e- _0x47f2x17* _0x47f2x1d),_0x47f2x1c=_0x47f2x1b= 0,_0x47f2x18=[],_0x47f2x1f=0;_0x47f2x1f< _0x47f2x12;++_0x47f2x1f){_0x47f2xa+= _0x47f2x9;var _0x47f2x1d=Math[_0x1bfe[426]](_0x47f2xa),_0x47f2x1e=Math[_0x1bfe[427]](_0x47f2xa),_0x47f2x1b=_0x47f2x16* _0x47f2x1d- _0x47f2x5* _0x47f2x1e+ _0x47f2x13,_0x47f2x1c=_0x47f2x4* _0x47f2x1d+ _0x47f2x17* _0x47f2x1e+ _0x47f2x14,_0x47f2x20=-_0x47f2x15* (_0x47f2x16* _0x47f2x1e+ _0x47f2x5* _0x47f2x1d),_0x47f2x1d=-_0x47f2x15* (_0x47f2x4* _0x47f2x1e- _0x47f2x17* _0x47f2x1d),_0x47f2x1e=6* _0x47f2x1f;_0x47f2x18[_0x47f2x1e]= Number(_0x47f2x19+ _0x47f2x2);_0x47f2x18[_0x47f2x1e+ 1]= Number(_0x47f2x1a+ _0x47f2x3);_0x47f2x18[_0x47f2x1e+ 2]= Number(_0x47f2x1b- _0x47f2x20+ _0x47f2x2);_0x47f2x18[_0x47f2x1e+ 3]= Number(_0x47f2x1c- _0x47f2x1d+ _0x47f2x3);_0x47f2x18[_0x47f2x1e+ 4]= Number(_0x47f2x1b+ _0x47f2x2);_0x47f2x18[_0x47f2x1e+ 5]= Number(_0x47f2x1c+ _0x47f2x3);_0x47f2x19= _0x47f2x1b+ _0x47f2x20;_0x47f2x1a= _0x47f2x1c+ _0x47f2x1d};return _0x47f2x18},getBoundingBox:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=null;if(null!= _0x47f2x2&& null!= _0x47f2x3&& 0!= _0x47f2x3){var _0x47f2x5=mxUtils[_0x1bfe[431]](_0x47f2x3),_0x47f2x4=Math[_0x1bfe[426]](_0x47f2x5),_0x47f2x9=Math[_0x1bfe[427]](_0x47f2x5),_0x47f2xa= new mxPoint(_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]/ 2,_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]/ 2),_0x47f2x12= new mxPoint(_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]]),_0x47f2x5= new mxPoint(_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]],_0x47f2x2[_0x1bfe[236]]),_0x47f2x13= new mxPoint(_0x47f2x5[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]),_0x47f2x14= new mxPoint(_0x47f2x2[_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]]),_0x47f2x12=mxUtils[_0x1bfe[432]](_0x47f2x12,_0x47f2x4,_0x47f2x9,_0x47f2xa),_0x47f2x5=mxUtils[_0x1bfe[432]](_0x47f2x5,_0x47f2x4,_0x47f2x9,_0x47f2xa),_0x47f2x13=mxUtils[_0x1bfe[432]](_0x47f2x13,_0x47f2x4,_0x47f2x9,_0x47f2xa),_0x47f2x14=mxUtils[_0x1bfe[432]](_0x47f2x14,_0x47f2x4,_0x47f2x9,_0x47f2xa),_0x47f2x4= new mxRectangle(_0x47f2x12[_0x1bfe[235]],_0x47f2x12[_0x1bfe[236]],0,0);_0x47f2x4[_0x1bfe[99]]( new mxRectangle(_0x47f2x5[_0x1bfe[235]],_0x47f2x5[_0x1bfe[236]],0,0));_0x47f2x4[_0x1bfe[99]]( new mxRectangle(_0x47f2x13[_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]],0,0));_0x47f2x4[_0x1bfe[99]]( new mxRectangle(_0x47f2x14[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]],0,0))};return _0x47f2x4},getRotatedPoint:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x5= null!= _0x47f2x5?_0x47f2x5: new mxPoint;var _0x47f2x9=_0x47f2x2[_0x1bfe[235]]- _0x47f2x5[_0x1bfe[235]];_0x47f2x2= _0x47f2x2[_0x1bfe[236]]- _0x47f2x5[_0x1bfe[236]];return new mxPoint(_0x47f2x9* _0x47f2x3- _0x47f2x2* _0x47f2x4+ _0x47f2x5[_0x1bfe[235]],_0x47f2x2* _0x47f2x3+ _0x47f2x9* _0x47f2x4+ _0x47f2x5[_0x1bfe[236]])},getPortConstraints:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x2= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_PORT_CONSTRAINT,null);if(null== _0x47f2x2){return _0x47f2x5};_0x47f2x5= _0x47f2x2.toString();_0x47f2x2= mxConstants[_0x1bfe[434]];0<= _0x47f2x5[_0x1bfe[2]](mxConstants.DIRECTION_NORTH)&& (_0x47f2x2|= mxConstants[_0x1bfe[435]]);0<= _0x47f2x5[_0x1bfe[2]](mxConstants.DIRECTION_WEST)&& (_0x47f2x2|= mxConstants[_0x1bfe[436]]);0<= _0x47f2x5[_0x1bfe[2]](mxConstants.DIRECTION_SOUTH)&& (_0x47f2x2|= mxConstants[_0x1bfe[437]]);0<= _0x47f2x5[_0x1bfe[2]](mxConstants.DIRECTION_EAST)&& (_0x47f2x2|= mxConstants[_0x1bfe[438]]);return _0x47f2x2},reversePortConstraints:function(_0x47f2x2){var _0x47f2x3=0,_0x47f2x3=(_0x47f2x2& mxConstants[_0x1bfe[436]])<< 3,_0x47f2x3=_0x47f2x3| (_0x47f2x2& mxConstants[_0x1bfe[435]])<< 1,_0x47f2x3=_0x47f2x3| (_0x47f2x2& mxConstants[_0x1bfe[437]])>> 1;return _0x47f2x3|= (_0x47f2x2& mxConstants[_0x1bfe[438]])>> 3},findNearestSegment:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=-1;if(0< _0x47f2x2[_0x1bfe[439]][_0x1bfe[67]]){for(var _0x47f2x9=_0x47f2x2[_0x1bfe[439]][0],_0x47f2xa=null,_0x47f2x12=1;_0x47f2x12< _0x47f2x2[_0x1bfe[439]][_0x1bfe[67]];_0x47f2x12++){var _0x47f2x13=_0x47f2x2[_0x1bfe[439]][_0x47f2x12],_0x47f2x9=mxUtils[_0x1bfe[440]](_0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]],_0x47f2x13[_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]],_0x47f2x3,_0x47f2x4);if(null== _0x47f2xa|| _0x47f2x9< _0x47f2xa){_0x47f2xa= _0x47f2x9,_0x47f2x5= _0x47f2x12- 1};_0x47f2x9= _0x47f2x13}};return _0x47f2x5},rectangleIntersectsSegment:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=_0x47f2x2[_0x1bfe[236]],_0x47f2x9=_0x47f2x2[_0x1bfe[235]],_0x47f2xa=_0x47f2x5+ _0x47f2x2[_0x1bfe[119]],_0x47f2x12=_0x47f2x9+ _0x47f2x2[_0x1bfe[117]];_0x47f2x2= _0x47f2x3[_0x1bfe[235]];var _0x47f2x13=_0x47f2x4[_0x1bfe[235]];_0x47f2x3[_0x1bfe[235]]> _0x47f2x4[_0x1bfe[235]]&& (_0x47f2x2= _0x47f2x4[_0x1bfe[235]],_0x47f2x13= _0x47f2x3[_0x1bfe[235]]);_0x47f2x13> _0x47f2x12&& (_0x47f2x13= _0x47f2x12);_0x47f2x2< _0x47f2x9&& (_0x47f2x2= _0x47f2x9);if(_0x47f2x2> _0x47f2x13){return !1};var _0x47f2x9=_0x47f2x3[_0x1bfe[236]],_0x47f2x12=_0x47f2x4[_0x1bfe[236]],_0x47f2x14=_0x47f2x4[_0x1bfe[235]]- _0x47f2x3[_0x1bfe[235]];1E-7< Math[_0x1bfe[425]](_0x47f2x14)&& (_0x47f2x4= (_0x47f2x4[_0x1bfe[236]]- _0x47f2x3[_0x1bfe[236]])/ _0x47f2x14,_0x47f2x3= _0x47f2x3[_0x1bfe[236]]- _0x47f2x4* _0x47f2x3[_0x1bfe[235]],_0x47f2x9= _0x47f2x4* _0x47f2x2+ _0x47f2x3,_0x47f2x12= _0x47f2x4* _0x47f2x13+ _0x47f2x3);_0x47f2x9> _0x47f2x12&& (_0x47f2x3= _0x47f2x12,_0x47f2x12= _0x47f2x9,_0x47f2x9= _0x47f2x3);_0x47f2x12> _0x47f2xa&& (_0x47f2x12= _0x47f2xa);_0x47f2x9< _0x47f2x5&& (_0x47f2x9= _0x47f2x5);return _0x47f2x9> _0x47f2x12?!1:!0},contains:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return _0x47f2x2[_0x1bfe[235]]<= _0x47f2x3&& _0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]>= _0x47f2x3&& _0x47f2x2[_0x1bfe[236]]<= _0x47f2x4&& _0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]>= _0x47f2x4},intersects:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x2[_0x1bfe[117]],_0x47f2x5=_0x47f2x2[_0x1bfe[119]],_0x47f2x9=_0x47f2x3[_0x1bfe[117]],_0x47f2xa=_0x47f2x3[_0x1bfe[119]];if(0>= _0x47f2x9|| 0>= _0x47f2xa|| 0>= _0x47f2x4|| 0>= _0x47f2x5){return !1};var _0x47f2x12=_0x47f2x2[_0x1bfe[235]],_0x47f2x13=_0x47f2x2[_0x1bfe[236]],_0x47f2x14=_0x47f2x3[_0x1bfe[235]],_0x47f2x15=_0x47f2x3[_0x1bfe[236]],_0x47f2x9=_0x47f2x9+ _0x47f2x14,_0x47f2xa=_0x47f2xa+ _0x47f2x15,_0x47f2x4=_0x47f2x4+ _0x47f2x12,_0x47f2x5=_0x47f2x5+ _0x47f2x13;return (_0x47f2x9< _0x47f2x14|| _0x47f2x9> _0x47f2x12)&& (_0x47f2xa< _0x47f2x15|| _0x47f2xa> _0x47f2x13)&& (_0x47f2x4< _0x47f2x12|| _0x47f2x4> _0x47f2x14)&& (_0x47f2x5< _0x47f2x13|| _0x47f2x5> _0x47f2x15)},intersectsHotspot:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:1;_0x47f2x9= null!= _0x47f2x9?_0x47f2x9:0;_0x47f2xa= null!= _0x47f2xa?_0x47f2xa:0;if(0< _0x47f2x5){var _0x47f2x12=_0x47f2x2[_0x1bfe[241]](),_0x47f2x13=_0x47f2x2[_0x1bfe[242]](),_0x47f2x14=_0x47f2x2[_0x1bfe[117]],_0x47f2x15=_0x47f2x2[_0x1bfe[119]],_0x47f2x16=mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_STARTSIZE)* _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]];0< _0x47f2x16&& (mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_HORIZONTAL,!0)?(_0x47f2x13= _0x47f2x2[_0x1bfe[236]]+ _0x47f2x16/ 2,_0x47f2x15= _0x47f2x16):(_0x47f2x12= _0x47f2x2[_0x1bfe[235]]+ _0x47f2x16/ 2,_0x47f2x14= _0x47f2x16));_0x47f2x14= Math[_0x1bfe[160]](_0x47f2x9,_0x47f2x14* _0x47f2x5);_0x47f2x15= Math[_0x1bfe[160]](_0x47f2x9,_0x47f2x15* _0x47f2x5);0< _0x47f2xa&& (_0x47f2x14= Math[_0x1bfe[243]](_0x47f2x14,_0x47f2xa),_0x47f2x15= Math[_0x1bfe[243]](_0x47f2x15,_0x47f2xa));_0x47f2x5= new mxRectangle(_0x47f2x12- _0x47f2x14/ 2,_0x47f2x13- _0x47f2x15/ 2,_0x47f2x14,_0x47f2x15);_0x47f2x12= mxUtils[_0x1bfe[431]](mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_ROTATION)|| 0);0!= _0x47f2x12&& (_0x47f2x9= Math[_0x1bfe[426]](-_0x47f2x12),_0x47f2xa= Math[_0x1bfe[427]](-_0x47f2x12),_0x47f2x12= new mxPoint(_0x47f2x2[_0x1bfe[241]](),_0x47f2x2[_0x1bfe[242]]()),_0x47f2x2= mxUtils[_0x1bfe[432]]( new mxPoint(_0x47f2x3,_0x47f2x4),_0x47f2x9,_0x47f2xa,_0x47f2x12),_0x47f2x3= _0x47f2x2[_0x1bfe[235]],_0x47f2x4= _0x47f2x2[_0x1bfe[236]]);return mxUtils[_0x1bfe[442]](_0x47f2x5,_0x47f2x3,_0x47f2x4)};return !0},getOffset:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=0,_0x47f2x5=0;if(null!= _0x47f2x3&& _0x47f2x3){var _0x47f2x9=document[_0x1bfe[112]],_0x47f2xa=document[_0x1bfe[158]],_0x47f2x4=_0x47f2x4+ (_0x47f2x9[_0x1bfe[360]]|| _0x47f2xa[_0x1bfe[360]]),_0x47f2x5=_0x47f2x5+ (_0x47f2x9[_0x1bfe[190]]|| _0x47f2xa[_0x1bfe[190]])};for(;_0x47f2x2[_0x1bfe[443]];){_0x47f2x4+= _0x47f2x2[_0x1bfe[358]],_0x47f2x5+= _0x47f2x2[_0x1bfe[362]],_0x47f2x2= _0x47f2x2[_0x1bfe[443]]};return new mxPoint(_0x47f2x4,_0x47f2x5)},getScrollOrigin:function(_0x47f2x2){for(var _0x47f2x3=document[_0x1bfe[112]],_0x47f2x4=document[_0x1bfe[158]],_0x47f2x5= new mxPoint(_0x47f2x3[_0x1bfe[360]]|| _0x47f2x4[_0x1bfe[360]],_0x47f2x3[_0x1bfe[190]]|| _0x47f2x4[_0x1bfe[190]]);null!= _0x47f2x2&& _0x47f2x2!= _0x47f2x3&& _0x47f2x2!= _0x47f2x4;){!isNaN(_0x47f2x2[_0x1bfe[360]])&& !isNaN(_0x47f2x2[_0x1bfe[190]])&& (_0x47f2x5[_0x1bfe[235]]+= _0x47f2x2[_0x1bfe[360]],_0x47f2x5[_0x1bfe[236]]+= _0x47f2x2[_0x1bfe[190]]),_0x47f2x2= _0x47f2x2[_0x1bfe[265]]};return _0x47f2x5},convertPoint:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=mxUtils[_0x1bfe[444]](_0x47f2x2);_0x47f2x2= mxUtils[_0x1bfe[445]](_0x47f2x2);_0x47f2x2[_0x1bfe[235]]-= _0x47f2x5[_0x1bfe[235]];_0x47f2x2[_0x1bfe[236]]-= _0x47f2x5[_0x1bfe[236]];return new mxPoint(_0x47f2x3- _0x47f2x2[_0x1bfe[235]],_0x47f2x4- _0x47f2x2[_0x1bfe[236]])},ltrim:function(_0x47f2x2,_0x47f2x3){return _0x47f2x2[_0x1bfe[230]](RegExp(_0x1bfe[446]+ (_0x47f2x3|| _0x1bfe[447])+ _0x1bfe[448],_0x1bfe[449]),_0x1bfe[110])},rtrim:function(_0x47f2x2,_0x47f2x3){return _0x47f2x2[_0x1bfe[230]](RegExp(_0x1bfe[450]+ (_0x47f2x3|| _0x1bfe[447])+ _0x1bfe[451],_0x1bfe[449]),_0x1bfe[110])},trim:function(_0x47f2x2,_0x47f2x3){return mxUtils[_0x1bfe[453]](mxUtils[_0x1bfe[452]](_0x47f2x2,_0x47f2x3),_0x47f2x3)},isNumeric:function(_0x47f2x2){return null!= _0x47f2x2&& (null== _0x47f2x2[_0x1bfe[67]]|| 0< _0x47f2x2[_0x1bfe[67]]&& 0> _0x47f2x2[_0x1bfe[2]](_0x1bfe[454])&& 0> _0x47f2x2[_0x1bfe[2]](_0x1bfe[455]))&& !isNaN(_0x47f2x2)},mod:function(_0x47f2x2,_0x47f2x3){return (_0x47f2x2% _0x47f2x3+ _0x47f2x3)% _0x47f2x3},intersection:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13){var _0x47f2x14=(_0x47f2x13- _0x47f2xa)* (_0x47f2x4- _0x47f2x2)- (_0x47f2x12- _0x47f2x9)* (_0x47f2x5- _0x47f2x3);_0x47f2x12= ((_0x47f2x12- _0x47f2x9)* (_0x47f2x3- _0x47f2xa)- (_0x47f2x13- _0x47f2xa)* (_0x47f2x2- _0x47f2x9))/ _0x47f2x14;_0x47f2x9= ((_0x47f2x4- _0x47f2x2)* (_0x47f2x3- _0x47f2xa)- (_0x47f2x5- _0x47f2x3)* (_0x47f2x2- _0x47f2x9))/ _0x47f2x14;return 0<= _0x47f2x12&& 1>= _0x47f2x12&& 0<= _0x47f2x9&& 1>= _0x47f2x9? new mxPoint(_0x47f2x2+ _0x47f2x12* (_0x47f2x4- _0x47f2x2),_0x47f2x3+ _0x47f2x12* (_0x47f2x5- _0x47f2x3)):null},ptSegDistSq:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x4-= _0x47f2x2;_0x47f2x5-= _0x47f2x3;_0x47f2x9-= _0x47f2x2;_0x47f2xa-= _0x47f2x3;0>= _0x47f2x9* _0x47f2x4+ _0x47f2xa* _0x47f2x5?_0x47f2x4= 0:(_0x47f2x9= _0x47f2x4- _0x47f2x9,_0x47f2xa= _0x47f2x5- _0x47f2xa,_0x47f2x2= _0x47f2x9* _0x47f2x4+ _0x47f2xa* _0x47f2x5,_0x47f2x4= 0>= _0x47f2x2?0:_0x47f2x2* _0x47f2x2/ (_0x47f2x4* _0x47f2x4+ _0x47f2x5* _0x47f2x5));_0x47f2x9= _0x47f2x9* _0x47f2x9+ _0x47f2xa* _0x47f2xa- _0x47f2x4;0> _0x47f2x9&& (_0x47f2x9= 0);return _0x47f2x9},relativeCcw:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x4-= _0x47f2x2;_0x47f2x5-= _0x47f2x3;_0x47f2x9-= _0x47f2x2;_0x47f2xa-= _0x47f2x3;_0x47f2x2= _0x47f2x9* _0x47f2x5- _0x47f2xa* _0x47f2x4;0== _0x47f2x2&& (_0x47f2x2= _0x47f2x9* _0x47f2x4+ _0x47f2xa* _0x47f2x5,0< _0x47f2x2&& (_0x47f2x2= (_0x47f2x9- _0x47f2x4)* _0x47f2x4+ (_0x47f2xa- _0x47f2x5)* _0x47f2x5,0> _0x47f2x2&& (_0x47f2x2= 0)));return 0> _0x47f2x2?-1:0< _0x47f2x2?1:0},animateChanges:function(_0x47f2x2,_0x47f2x3){mxEffects[_0x1bfe[456]][_0x1bfe[183]](this,arguments)},cascadeOpacity:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){mxEffects[_0x1bfe[260]][_0x1bfe[183]](this,arguments)},fadeOut:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){mxEffects[_0x1bfe[457]][_0x1bfe[183]](this,arguments)},setOpacity:function(_0x47f2x2,_0x47f2x3){mxUtils[_0x1bfe[458]](_0x47f2x2)?_0x47f2x2[_0x1bfe[124]][_0x1bfe[347]]= 100<= _0x47f2x3?null:_0x1bfe[459]+ _0x47f2x3/ 5+ _0x1bfe[460]:mxClient[_0x1bfe[80]]&& (_0x1bfe[82]=== typeof document[_0x1bfe[5]]|| 9> document[_0x1bfe[5]])?_0x47f2x2[_0x1bfe[124]][_0x1bfe[347]]= 100<= _0x47f2x3?null:_0x1bfe[459]+ _0x47f2x3+ _0x1bfe[460]:_0x47f2x2[_0x1bfe[124]][_0x1bfe[461]]= _0x47f2x3/ 100},createImage:function(_0x47f2x2){var _0x47f2x3=null;mxClient[_0x1bfe[49]]&& _0x1bfe[462]!= document[_0x1bfe[135]]?(_0x47f2x3= document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[464]),_0x47f2x3[_0x1bfe[57]](_0x1bfe[390],_0x47f2x2),_0x47f2x3[_0x1bfe[124]][_0x1bfe[465]]= _0x1bfe[130]):(_0x47f2x3= document[_0x1bfe[55]](_0x1bfe[466]),_0x47f2x3[_0x1bfe[57]](_0x1bfe[390],_0x47f2x2),_0x47f2x3[_0x1bfe[57]](_0x1bfe[467],_0x1bfe[468]));return _0x47f2x3},sortCells:function(_0x47f2x2,_0x47f2x3){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!0;var _0x47f2x4= new mxDictionary;_0x47f2x2[_0x1bfe[470]](function(_0x47f2x2,_0x47f2x9){var _0x47f2xa=_0x47f2x4[_0x1bfe[203]](_0x47f2x2);null== _0x47f2xa&& (_0x47f2xa= mxCellPath[_0x1bfe[385]](_0x47f2x2)[_0x1bfe[224]](mxCellPath.PATH_SEPARATOR),_0x47f2x4[_0x1bfe[204]](_0x47f2x2,_0x47f2xa));var _0x47f2x12=_0x47f2x4[_0x1bfe[203]](_0x47f2x9);null== _0x47f2x12&& (_0x47f2x12= mxCellPath[_0x1bfe[385]](_0x47f2x9)[_0x1bfe[224]](mxCellPath.PATH_SEPARATOR),_0x47f2x4[_0x1bfe[204]](_0x47f2x9,_0x47f2x12));_0x47f2xa= mxCellPath[_0x1bfe[469]](_0x47f2xa,_0x47f2x12);return 0== _0x47f2xa?0:0< _0x47f2xa== _0x47f2x3?1:-1});return _0x47f2x2},getStylename:function(_0x47f2x2){return null!= _0x47f2x2&& (_0x47f2x2= _0x47f2x2[_0x1bfe[224]](_0x1bfe[471])[0],0> _0x47f2x2[_0x1bfe[2]](_0x1bfe[226]))?_0x47f2x2:_0x1bfe[110]},getStylenames:function(_0x47f2x2){var _0x47f2x3=[];if(null!= _0x47f2x2){_0x47f2x2= _0x47f2x2[_0x1bfe[224]](_0x1bfe[471]);for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){0> _0x47f2x2[_0x47f2x4][_0x1bfe[2]](_0x1bfe[226])&& _0x47f2x3[_0x1bfe[207]](_0x47f2x2[_0x47f2x4])}};return _0x47f2x3},indexOfStylename:function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2&& null!= _0x47f2x3){for(var _0x47f2x4=_0x47f2x2[_0x1bfe[224]](_0x1bfe[471]),_0x47f2x5=0,_0x47f2x9=0;_0x47f2x9< _0x47f2x4[_0x1bfe[67]];_0x47f2x9++){if(_0x47f2x4[_0x47f2x9]== _0x47f2x3){return _0x47f2x5};_0x47f2x5+= _0x47f2x4[_0x47f2x9][_0x1bfe[67]]+ 1}};return -1},addStylename:function(_0x47f2x2,_0x47f2x3){0> mxUtils[_0x1bfe[472]](_0x47f2x2,_0x47f2x3)&& (null== _0x47f2x2?_0x47f2x2= _0x1bfe[110]:0< _0x47f2x2[_0x1bfe[67]]&& _0x1bfe[471]!= _0x47f2x2[_0x1bfe[225]](_0x47f2x2[_0x1bfe[67]]- 1)&& (_0x47f2x2+= _0x1bfe[471]),_0x47f2x2+= _0x47f2x3);return _0x47f2x2},removeStylename:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=[];if(null!= _0x47f2x2){for(var _0x47f2x5=_0x47f2x2[_0x1bfe[224]](_0x1bfe[471]),_0x47f2x9=0;_0x47f2x9< _0x47f2x5[_0x1bfe[67]];_0x47f2x9++){_0x47f2x5[_0x47f2x9]!= _0x47f2x3&& _0x47f2x4[_0x1bfe[207]](_0x47f2x5[_0x47f2x9])}};return _0x47f2x4[_0x1bfe[234]](_0x1bfe[471])},removeAllStylenames:function(_0x47f2x2){var _0x47f2x3=[];if(null!= _0x47f2x2){_0x47f2x2= _0x47f2x2[_0x1bfe[224]](_0x1bfe[471]);for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){0<= _0x47f2x2[_0x47f2x4][_0x1bfe[2]](_0x1bfe[226])&& _0x47f2x3[_0x1bfe[207]](_0x47f2x2[_0x47f2x4])}};return _0x47f2x3[_0x1bfe[234]](_0x1bfe[471])},setCellStyles:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x3&& 0< _0x47f2x3[_0x1bfe[67]]){_0x47f2x2[_0x1bfe[473]]();try{for(var _0x47f2x9=0;_0x47f2x9< _0x47f2x3[_0x1bfe[67]];_0x47f2x9++){if(null!= _0x47f2x3[_0x47f2x9]){var _0x47f2xa=mxUtils[_0x1bfe[475]](_0x47f2x2[_0x1bfe[474]](_0x47f2x3[_0x47f2x9]),_0x47f2x4,_0x47f2x5);_0x47f2x2[_0x1bfe[475]](_0x47f2x3[_0x47f2x9],_0x47f2xa)}}}finally{_0x47f2x2[_0x1bfe[476]]()}}},setStyle:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=null!= _0x47f2x4&& (_0x1bfe[82]== typeof _0x47f2x4[_0x1bfe[67]]|| 0< _0x47f2x4[_0x1bfe[67]]);if(null== _0x47f2x2|| 0== _0x47f2x2[_0x1bfe[67]]){_0x47f2x5&& (_0x47f2x2= _0x47f2x3+ _0x1bfe[226]+ _0x47f2x4)}else {var _0x47f2x9=_0x47f2x2[_0x1bfe[2]](_0x47f2x3+ _0x1bfe[226]);0> _0x47f2x9?_0x47f2x5&& (_0x47f2x5= _0x1bfe[471]== _0x47f2x2[_0x1bfe[225]](_0x47f2x2[_0x1bfe[67]]- 1)?_0x1bfe[110]:_0x1bfe[471],_0x47f2x2= _0x47f2x2+ _0x47f2x5+ _0x47f2x3+ _0x1bfe[226]+ _0x47f2x4):(_0x47f2x3= _0x47f2x5?_0x47f2x3+ _0x1bfe[226]+ _0x47f2x4:_0x1bfe[110],_0x47f2x4= _0x47f2x2[_0x1bfe[2]](_0x1bfe[471],_0x47f2x9),_0x47f2x5|| _0x47f2x4++,_0x47f2x2= _0x47f2x2[_0x1bfe[85]](0,_0x47f2x9)+ _0x47f2x3+ (_0x47f2x4> _0x47f2x9?_0x47f2x2[_0x1bfe[85]](_0x47f2x4):_0x1bfe[110]))};return _0x47f2x2},setCellStyleFlags:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){if(null!= _0x47f2x3&& 0< _0x47f2x3[_0x1bfe[67]]){_0x47f2x2[_0x1bfe[473]]();try{for(var _0x47f2xa=0;_0x47f2xa< _0x47f2x3[_0x1bfe[67]];_0x47f2xa++){if(null!= _0x47f2x3[_0x47f2xa]){var _0x47f2x12=mxUtils[_0x1bfe[477]](_0x47f2x2[_0x1bfe[474]](_0x47f2x3[_0x47f2xa]),_0x47f2x4,_0x47f2x5,_0x47f2x9);_0x47f2x2[_0x1bfe[475]](_0x47f2x3[_0x47f2xa],_0x47f2x12)}}}finally{_0x47f2x2[_0x1bfe[476]]()}}},setStyleFlag:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null== _0x47f2x2|| 0== _0x47f2x2[_0x1bfe[67]]){_0x47f2x2= _0x47f2x5|| null== _0x47f2x5?_0x47f2x3+ _0x1bfe[226]+ _0x47f2x4:_0x47f2x3+ _0x1bfe[478]}else {var _0x47f2x9=_0x47f2x2[_0x1bfe[2]](_0x47f2x3+ _0x1bfe[226]);if(0> _0x47f2x9){_0x47f2x9= _0x1bfe[471]== _0x47f2x2[_0x1bfe[225]](_0x47f2x2[_0x1bfe[67]]- 1)?_0x1bfe[110]:_0x1bfe[471],_0x47f2x2= _0x47f2x5|| null== _0x47f2x5?_0x47f2x2+ _0x47f2x9+ _0x47f2x3+ _0x1bfe[226]+ _0x47f2x4:_0x47f2x2+ _0x47f2x9+ _0x47f2x3+ _0x1bfe[478]}else {var _0x47f2xa=_0x47f2x2[_0x1bfe[2]](_0x1bfe[471],_0x47f2x9),_0x47f2x12=_0x1bfe[110],_0x47f2x12=0> _0x47f2xa?_0x47f2x2[_0x1bfe[85]](_0x47f2x9+ _0x47f2x3[_0x1bfe[67]]+ 1):_0x47f2x2[_0x1bfe[85]](_0x47f2x9+ _0x47f2x3[_0x1bfe[67]]+ 1,_0x47f2xa),_0x47f2x12=null== _0x47f2x5?parseInt(_0x47f2x12)^ _0x47f2x4:_0x47f2x5?parseInt(_0x47f2x12)| _0x47f2x4:parseInt(_0x47f2x12)& ~_0x47f2x4;_0x47f2x2= _0x47f2x2[_0x1bfe[85]](0,_0x47f2x9)+ _0x47f2x3+ _0x1bfe[226]+ _0x47f2x12+ (0<= _0x47f2xa?_0x47f2x2[_0x1bfe[85]](_0x47f2xa):_0x1bfe[110])}};return _0x47f2x2},getAlignmentAsPoint:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=0,_0x47f2x5=0;_0x47f2x2== mxConstants[_0x1bfe[479]]?_0x47f2x4= -0.5:_0x47f2x2== mxConstants[_0x1bfe[480]]&& (_0x47f2x4= -1);_0x47f2x3== mxConstants[_0x1bfe[481]]?_0x47f2x5= -0.5:_0x47f2x3== mxConstants[_0x1bfe[482]]&& (_0x47f2x5= -1);return new mxPoint(_0x47f2x4,_0x47f2x5)},getSizeForString:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:mxConstants[_0x1bfe[483]];_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:mxConstants[_0x1bfe[484]];var _0x47f2x5=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x5[_0x1bfe[124]][_0x1bfe[486]]= _0x47f2x4;_0x47f2x5[_0x1bfe[124]][_0x1bfe[487]]= Math[_0x1bfe[488]](_0x47f2x3)+ _0x1bfe[168];_0x47f2x5[_0x1bfe[124]][_0x1bfe[489]]= Math[_0x1bfe[488]](_0x47f2x3* mxConstants[_0x1bfe[490]])+ _0x1bfe[168];_0x47f2x5[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];_0x47f2x5[_0x1bfe[124]][_0x1bfe[493]]= _0x1bfe[494];_0x47f2x5[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188];_0x47f2x5[_0x1bfe[124]][_0x1bfe[495]]= mxClient[_0x1bfe[496]]?_0x1bfe[497]:_0x1bfe[498];_0x47f2x5[_0x1bfe[124]][_0x1bfe[499]]= _0x1bfe[500];_0x47f2x5[_0x1bfe[339]]= _0x47f2x2;document[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x5);_0x47f2x2= new mxRectangle(0,0,_0x47f2x5[_0x1bfe[359]],_0x47f2x5[_0x1bfe[167]]);document[_0x1bfe[112]][_0x1bfe[266]](_0x47f2x5);return _0x47f2x2},getViewXml:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:0;_0x47f2x9= null!= _0x47f2x9?_0x47f2x9:0;_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:1;null== _0x47f2x4&& (_0x47f2x4= [_0x47f2x2[_0x1bfe[502]]()[_0x1bfe[501]]()]);var _0x47f2xa=_0x47f2x2[_0x1bfe[249]](),_0x47f2x12=null,_0x47f2x13=_0x47f2xa[_0x1bfe[503]]();_0x47f2xa[_0x1bfe[504]](!1);var _0x47f2x14=_0x47f2xa[_0x1bfe[505]],_0x47f2x15=_0x47f2xa[_0x1bfe[506]];_0x47f2x2[_0x1bfe[507]]== mxConstants[_0x1bfe[508]]?(_0x47f2xa[_0x1bfe[505]]= document[_0x1bfe[509]](mxConstants.NS_SVG,_0x1bfe[449]),_0x47f2xa[_0x1bfe[510]][_0x1bfe[62]](_0x47f2xa[_0x1bfe[505]]),_0x47f2xa[_0x1bfe[506]]= document[_0x1bfe[509]](mxConstants.NS_SVG,_0x1bfe[449])):(_0x47f2xa[_0x1bfe[505]]= _0x47f2xa[_0x1bfe[505]][_0x1bfe[511]](!1),_0x47f2xa[_0x1bfe[510]][_0x1bfe[62]](_0x47f2xa[_0x1bfe[505]]),_0x47f2xa[_0x1bfe[506]]= _0x47f2xa[_0x1bfe[506]][_0x1bfe[511]](!1));_0x47f2xa[_0x1bfe[510]][_0x1bfe[62]](_0x47f2xa[_0x1bfe[506]]);var _0x47f2x16=_0x47f2xa[_0x1bfe[512]]();_0x47f2xa[_0x1bfe[513]]= new mxPoint(_0x47f2x5,_0x47f2x9);_0x47f2x3= new mxTemporaryCellStates(_0x47f2x2[_0x1bfe[249]](),_0x47f2x3,_0x47f2x4);try{_0x47f2x12= ( new mxCodec)[_0x1bfe[514]](_0x47f2x2[_0x1bfe[249]]())}finally{_0x47f2x3[_0x1bfe[515]](),_0x47f2xa[_0x1bfe[513]]= _0x47f2x16,_0x47f2xa[_0x1bfe[510]][_0x1bfe[266]](_0x47f2xa[_0x1bfe[505]]),_0x47f2xa[_0x1bfe[510]][_0x1bfe[266]](_0x47f2xa[_0x1bfe[506]]),_0x47f2xa[_0x1bfe[505]]= _0x47f2x14,_0x47f2xa[_0x1bfe[506]]= _0x47f2x15,_0x47f2xa[_0x1bfe[504]](_0x47f2x13)};return _0x47f2x12},getScaleForPageCount:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(1> _0x47f2x2){return 1};_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:mxConstants[_0x1bfe[516]];_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:0;var _0x47f2x9=_0x47f2x4[_0x1bfe[117]]- 2* _0x47f2x5;_0x47f2x4= _0x47f2x4[_0x1bfe[119]]- 2* _0x47f2x5;_0x47f2x5= _0x47f2x3[_0x1bfe[517]]()[_0x1bfe[238]]();_0x47f2x3= _0x47f2x3[_0x1bfe[249]]()[_0x1bfe[518]]();_0x47f2x5[_0x1bfe[117]]/= _0x47f2x3;_0x47f2x5[_0x1bfe[119]]/= _0x47f2x3;_0x47f2x3= _0x47f2x5[_0x1bfe[117]];_0x47f2x4= _0x47f2x3/ _0x47f2x5[_0x1bfe[119]]/ (_0x47f2x9/ _0x47f2x4);_0x47f2x5= Math[_0x1bfe[428]](_0x47f2x2);var _0x47f2xa=Math[_0x1bfe[428]](_0x47f2x4);_0x47f2x4= _0x47f2x5* _0x47f2xa;_0x47f2x5/= _0x47f2xa;if(1> _0x47f2x4&& _0x47f2x5> _0x47f2x2){var _0x47f2x12=_0x47f2x5/ _0x47f2x2;_0x47f2x5= _0x47f2x2;_0x47f2x4/= _0x47f2x12};1> _0x47f2x5&& _0x47f2x4> _0x47f2x2&& (_0x47f2x12= _0x47f2x4/ _0x47f2x2,_0x47f2x4= _0x47f2x2,_0x47f2x5/= _0x47f2x12);_0x47f2x12= Math[_0x1bfe[430]](_0x47f2x4)* Math[_0x1bfe[430]](_0x47f2x5);for(_0x47f2xa= 0;_0x47f2x12> _0x47f2x2;){var _0x47f2x12=Math[_0x1bfe[519]](_0x47f2x4)/ _0x47f2x4,_0x47f2x13=Math[_0x1bfe[519]](_0x47f2x5)/ _0x47f2x5;1== _0x47f2x12&& (_0x47f2x12= Math[_0x1bfe[519]](_0x47f2x4- 1)/ _0x47f2x4);1== _0x47f2x13&& (_0x47f2x13= Math[_0x1bfe[519]](_0x47f2x5- 1)/ _0x47f2x5);_0x47f2x12= _0x47f2x12> _0x47f2x13?_0x47f2x12:_0x47f2x13;_0x47f2x4*= _0x47f2x12;_0x47f2x5*= _0x47f2x12;_0x47f2x12= Math[_0x1bfe[430]](_0x47f2x4)* Math[_0x1bfe[430]](_0x47f2x5);_0x47f2xa++;if(10< _0x47f2xa){break}};return 0.99999* (_0x47f2x9* _0x47f2x4/ _0x47f2x3)},show:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:0;_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:0;null== _0x47f2x3?_0x47f2x3= window[_0x1bfe[392]]()[_0x1bfe[395]]:_0x47f2x3[_0x1bfe[392]]();var _0x47f2x9=_0x47f2x2[_0x1bfe[517]]();_0x47f2x4= -_0x47f2x9[_0x1bfe[235]]+ _0x47f2x4;_0x47f2x5= -_0x47f2x9[_0x1bfe[236]]+ _0x47f2x5;if(mxClient[_0x1bfe[80]]){for(var _0x47f2x9=_0x1bfe[520],_0x47f2xa=document[_0x1bfe[64]](_0x1bfe[521]),_0x47f2x12=0;_0x47f2x12< _0x47f2xa[_0x1bfe[67]];_0x47f2x12++){_0x47f2x9+= _0x47f2xa[_0x47f2x12][_0x1bfe[342]]};_0x47f2x9+= _0x1bfe[522];for(_0x47f2x12= 0;_0x47f2x12< document[_0x1bfe[523]][_0x1bfe[67]];_0x47f2x12++){try{_0x47f2x9+= document[_0x1bfe[523]](_0x47f2x12)[_0x1bfe[103]]}catch(h){}};_0x47f2x9+= _0x1bfe[524];_0x47f2x9+= _0x1bfe[525];_0x47f2x9+= _0x47f2x2[_0x1bfe[526]][_0x1bfe[339]];_0x47f2x9+= _0x1bfe[527];_0x47f2x9+= _0x1bfe[528];_0x47f2x3[_0x1bfe[171]](_0x47f2x9);_0x47f2x3[_0x1bfe[268]]();_0x47f2x2= _0x47f2x3[_0x1bfe[112]][_0x1bfe[64]](_0x1bfe[529])[0];null!= _0x47f2x2&& (_0x47f2x2[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492],_0x47f2x2[_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x4+ _0x1bfe[168],_0x47f2x2[_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x5+ _0x1bfe[168])}else {_0x47f2x3[_0x1bfe[171]](_0x1bfe[530]);_0x47f2x3[_0x1bfe[171]](_0x1bfe[531]);_0x47f2xa= document[_0x1bfe[64]](_0x1bfe[521]);for(_0x47f2x12= 0;_0x47f2x12< _0x47f2xa[_0x1bfe[67]];_0x47f2x12++){_0x47f2x3[_0x1bfe[171]](mxUtils[_0x1bfe[532]](_0x47f2xa[_0x47f2x12]))};_0x47f2xa= document[_0x1bfe[64]](_0x1bfe[54]);for(_0x47f2x12= 0;_0x47f2x12< _0x47f2xa[_0x1bfe[67]];_0x47f2x12++){_0x47f2x3[_0x1bfe[171]](mxUtils[_0x1bfe[532]](_0x47f2xa[_0x47f2x12]))};_0x47f2xa= document[_0x1bfe[64]](_0x1bfe[124]);for(_0x47f2x12= 0;_0x47f2x12< _0x47f2xa[_0x1bfe[67]];_0x47f2x12++){_0x47f2x3[_0x1bfe[171]](mxUtils[_0x1bfe[532]](_0x47f2xa[_0x47f2x12]))};_0x47f2x3[_0x1bfe[171]](_0x1bfe[533]);_0x47f2x3[_0x1bfe[171]](_0x1bfe[534]);_0x47f2x3[_0x1bfe[268]]();null== _0x47f2x3[_0x1bfe[112]]&& _0x47f2x3[_0x1bfe[158]][_0x1bfe[62]](_0x47f2x3[_0x1bfe[55]](_0x1bfe[112]));_0x47f2x3[_0x1bfe[112]][_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[278];for(_0x47f2x2= _0x47f2x2[_0x1bfe[526]][_0x1bfe[285]];null!= _0x47f2x2;){_0x47f2x12= _0x47f2x2[_0x1bfe[511]](!0),_0x47f2x3[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x12),_0x47f2x2= _0x47f2x2[_0x1bfe[287]]};_0x47f2x2= _0x47f2x3[_0x1bfe[64]](_0x1bfe[449])[0];null!= _0x47f2x2&& (_0x47f2x2[_0x1bfe[57]](_0x1bfe[535],_0x1bfe[536]+ _0x47f2x4+ _0x1bfe[537]+ _0x47f2x5+ _0x1bfe[460]),_0x47f2x4= _0x47f2x2[_0x1bfe[538]],_0x47f2x4[_0x1bfe[57]](_0x1bfe[117],_0x47f2x9[_0x1bfe[117]]+ Math[_0x1bfe[160]](_0x47f2x9[_0x1bfe[235]],0)+ 3),_0x47f2x4[_0x1bfe[57]](_0x1bfe[119],_0x47f2x9[_0x1bfe[119]]+ Math[_0x1bfe[160]](_0x47f2x9[_0x1bfe[236]],0)+ 3))};mxUtils[_0x1bfe[272]](_0x47f2x3[_0x1bfe[112]]);return _0x47f2x3},printScreen:function(_0x47f2x2){var _0x47f2x3=window[_0x1bfe[392]]();mxUtils[_0x1bfe[539]](_0x47f2x2,_0x47f2x3[_0x1bfe[395]]);_0x47f2x2= function(){_0x47f2x3[_0x1bfe[393]]();_0x47f2x3[_0x1bfe[540]]();_0x47f2x3[_0x1bfe[268]]()};mxClient[_0x1bfe[76]]?_0x47f2x3[_0x1bfe[261]](_0x47f2x2,500):_0x47f2x2()},popup:function(_0x47f2x2,_0x47f2x3){if(_0x47f2x3){var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x4[_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[276];_0x47f2x4[_0x1bfe[124]][_0x1bfe[117]]= _0x1bfe[541];_0x47f2x4[_0x1bfe[124]][_0x1bfe[119]]= _0x1bfe[542];var _0x47f2x5=document[_0x1bfe[55]](_0x1bfe[543]);_0x47f2x5[_0x1bfe[339]]= mxUtils[_0x1bfe[321]](_0x47f2x2,!1)[_0x1bfe[230]](/\n/g,_0x1bfe[545])[_0x1bfe[230]](/ /g,_0x1bfe[544]);_0x47f2x4[_0x1bfe[62]](_0x47f2x5);_0x47f2x4= new mxWindow(_0x1bfe[546],_0x47f2x4,document[_0x1bfe[112]][_0x1bfe[159]]/ 2- 320,(document[_0x1bfe[112]][_0x1bfe[157]]|| document[_0x1bfe[158]][_0x1bfe[157]])/ 2- 240,640,480,!1,!0);_0x47f2x4[_0x1bfe[164]](!0);_0x47f2x4[_0x1bfe[175]](!0)}else {mxClient[_0x1bfe[133]]?(_0x47f2x4= window[_0x1bfe[392]](),_0x47f2x4[_0x1bfe[395]][_0x1bfe[171]](_0x1bfe[547]+ mxUtils[_0x1bfe[321]](_0x47f2x2)+ _0x1bfe[548]),_0x47f2x4[_0x1bfe[395]][_0x1bfe[268]]()):(_0x47f2x4= window[_0x1bfe[392]](),_0x47f2x5= _0x47f2x4[_0x1bfe[395]][_0x1bfe[55]](_0x1bfe[543]),_0x47f2x5[_0x1bfe[339]]= mxUtils[_0x1bfe[321]](_0x47f2x2,!1)[_0x1bfe[230]](/\n/g,_0x1bfe[545])[_0x1bfe[230]](/ /g,_0x1bfe[544]),_0x47f2x4[_0x1bfe[395]][_0x1bfe[112]][_0x1bfe[62]](_0x47f2x5))}},alert:function(_0x47f2x2){alert(_0x47f2x2)},prompt:function(_0x47f2x2,_0x47f2x3){return prompt(_0x47f2x2,_0x47f2x3)},confirm:function(_0x47f2x2){return confirm(_0x47f2x2)},error:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x9[_0x1bfe[124]][_0x1bfe[549]]= _0x1bfe[550];var _0x47f2xa=document[_0x1bfe[55]](_0x1bfe[466]);_0x47f2xa[_0x1bfe[57]](_0x1bfe[390],_0x47f2x5|| mxUtils[_0x1bfe[551]]);_0x47f2xa[_0x1bfe[57]](_0x1bfe[552],_0x1bfe[553]);_0x47f2xa[_0x1bfe[124]][_0x1bfe[123]]= _0x1bfe[554];_0x47f2x9[_0x1bfe[62]](_0x47f2xa);_0x47f2x9[_0x1bfe[62]](document[_0x1bfe[344]](_0x1bfe[555]));_0x47f2x9[_0x1bfe[62]](document[_0x1bfe[344]](_0x1bfe[555]));_0x47f2x9[_0x1bfe[62]](document[_0x1bfe[344]](_0x1bfe[555]));mxUtils[_0x1bfe[53]](_0x47f2x9,_0x47f2x2);_0x47f2x2= document[_0x1bfe[112]][_0x1bfe[159]];_0x47f2x5= document[_0x1bfe[112]][_0x1bfe[157]]|| document[_0x1bfe[158]][_0x1bfe[157]];var _0x47f2x12= new mxWindow(mxResources[_0x1bfe[203]](mxUtils[_0x1bfe[556]])|| mxUtils[_0x1bfe[556]],_0x47f2x9,(_0x47f2x2- _0x47f2x3)/ 2,_0x47f2x5/ 4,_0x47f2x3,null,!1,!0);_0x47f2x4&& (mxUtils[_0x1bfe[345]](_0x47f2x9),_0x47f2x3= document[_0x1bfe[55]](_0x1bfe[346]),_0x47f2x4= document[_0x1bfe[55]](_0x1bfe[172]),mxClient[_0x1bfe[80]]?_0x47f2x4[_0x1bfe[124]][_0x1bfe[103]]= _0x1bfe[557]:_0x47f2x4[_0x1bfe[57]](_0x1bfe[124],_0x1bfe[557]),mxEvent[_0x1bfe[169]](_0x47f2x4,_0x1bfe[173],function(_0x47f2x2){_0x47f2x12[_0x1bfe[515]]()}),mxUtils[_0x1bfe[53]](_0x47f2x4,mxResources[_0x1bfe[203]](mxUtils[_0x1bfe[558]])|| mxUtils[_0x1bfe[558]]),_0x47f2x3[_0x1bfe[62]](_0x47f2x4),_0x47f2x9[_0x1bfe[62]](_0x47f2x3),mxUtils[_0x1bfe[345]](_0x47f2x9),_0x47f2x12[_0x1bfe[164]](!0));_0x47f2x12[_0x1bfe[175]](!0);return _0x47f2x12},makeDraggable:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15){_0x47f2x2= new mxDragSource(_0x47f2x2,_0x47f2x4);_0x47f2x2[_0x1bfe[559]]= new mxPoint(null!= _0x47f2x9?_0x47f2x9:0,null!= _0x47f2xa?_0x47f2xa:mxConstants[_0x1bfe[560]]);_0x47f2x2[_0x1bfe[561]]= _0x47f2x12;_0x47f2x2[_0x1bfe[562]](!1);null!= _0x47f2x14&& (_0x47f2x2[_0x1bfe[563]]= _0x47f2x14);null!= _0x47f2x15&& (_0x47f2x2[_0x1bfe[564]]= _0x47f2x15);_0x47f2x2[_0x1bfe[565]]= function(_0x47f2x2){return _0x1bfe[279]== typeof _0x47f2x3?_0x47f2x3(_0x47f2x2):_0x47f2x3};null!= _0x47f2x5&& (_0x47f2x2[_0x1bfe[566]]= function(){return _0x47f2x5[_0x1bfe[511]](!0)},_0x47f2x13&& (_0x47f2x2[_0x1bfe[567]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x5[_0x1bfe[511]](!0),_0x47f2x4=parseInt(_0x47f2x3[_0x1bfe[124]][_0x1bfe[117]]),_0x47f2x9=parseInt(_0x47f2x3[_0x1bfe[124]][_0x1bfe[119]]);_0x47f2x3[_0x1bfe[124]][_0x1bfe[117]]= Math[_0x1bfe[488]](_0x47f2x4* _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]])+ _0x1bfe[168];_0x47f2x3[_0x1bfe[124]][_0x1bfe[119]]= Math[_0x1bfe[488]](_0x47f2x9* _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]])+ _0x1bfe[168];return _0x47f2x3}));return _0x47f2x2}},mxConstants={DEFAULT_HOTSPOT:0.3,MIN_HOTSPOT_SIZE:8,MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:_0x1bfe[568],RENDERING_HINT_FASTER:_0x1bfe[569],RENDERING_HINT_FASTEST:_0x1bfe[570],DIALECT_SVG:_0x1bfe[571],DIALECT_VML:_0x1bfe[572],DIALECT_MIXEDHTML:_0x1bfe[573],DIALECT_PREFERHTML:_0x1bfe[574],DIALECT_STRICTHTML:_0x1bfe[575],NS_SVG:_0x1bfe[576],NS_XHTML:_0x1bfe[577],NS_XLINK:_0x1bfe[578],SHADOWCOLOR:_0x1bfe[579],SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:_0x1bfe[580],DEFAULT_INVALID_COLOR:_0x1bfe[581],HIGHLIGHT_STROKEWIDTH:3,CURSOR_MOVABLE_VERTEX:_0x1bfe[582],CURSOR_MOVABLE_EDGE:_0x1bfe[582],CURSOR_LABEL_HANDLE:_0x1bfe[583],CURSOR_BEND_HANDLE:_0x1bfe[356],CURSOR_CONNECT:_0x1bfe[356],HIGHLIGHT_COLOR:_0x1bfe[580],CONNECT_TARGET_COLOR:_0x1bfe[584],INVALID_CONNECT_TARGET_COLOR:_0x1bfe[581],DROP_TARGET_COLOR:_0x1bfe[584],VALID_COLOR:_0x1bfe[580],INVALID_COLOR:_0x1bfe[581],EDGE_SELECTION_COLOR:_0x1bfe[580],VERTEX_SELECTION_COLOR:_0x1bfe[580],VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:_0x1bfe[581],GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:_0x1bfe[585],OUTLINE_STROKEWIDTH:mxClient[_0x1bfe[80]]?2:3,HANDLE_SIZE:7,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:_0x1bfe[580],HANDLE_STROKECOLOR:_0x1bfe[586],LABEL_HANDLE_FILLCOLOR:_0x1bfe[587],CONNECT_HANDLE_FILLCOLOR:_0x1bfe[584],LOCKED_HANDLE_FILLCOLOR:_0x1bfe[581],OUTLINE_HANDLE_FILLCOLOR:_0x1bfe[588],OUTLINE_HANDLE_STROKECOLOR:_0x1bfe[589],DEFAULT_FONTFAMILY:_0x1bfe[590],DEFAULT_FONTSIZE:11,LINE_HEIGHT:1.2,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:0.15,LINE_ARCSIZE:20,ARROW_SPACING:10,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT: new mxRectangle(0,0,826,1169),PAGE_FORMAT_A4_LANDSCAPE: new mxRectangle(0,0,1169,826),PAGE_FORMAT_LETTER_PORTRAIT: new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE: new mxRectangle(0,0,1100,850),NONE:_0x1bfe[130],STYLE_PERIMETER:_0x1bfe[591],STYLE_SOURCE_PORT:_0x1bfe[592],STYLE_TARGET_PORT:_0x1bfe[593],STYLE_PORT_CONSTRAINT:_0x1bfe[594],STYLE_OPACITY:_0x1bfe[461],STYLE_TEXT_OPACITY:_0x1bfe[595],STYLE_OVERFLOW:_0x1bfe[277],STYLE_ORTHOGONAL:_0x1bfe[596],STYLE_EXIT_X:_0x1bfe[597],STYLE_EXIT_Y:_0x1bfe[598],STYLE_EXIT_PERIMETER:_0x1bfe[599],STYLE_ENTRY_X:_0x1bfe[600],STYLE_ENTRY_Y:_0x1bfe[601],STYLE_ENTRY_PERIMETER:_0x1bfe[602],STYLE_WHITE_SPACE:_0x1bfe[493],STYLE_ROTATION:_0x1bfe[603],STYLE_FILLCOLOR:_0x1bfe[604],STYLE_SWIMLANE_FILLCOLOR:_0x1bfe[605],STYLE_GRADIENTCOLOR:_0x1bfe[606],STYLE_GRADIENT_DIRECTION:_0x1bfe[607],STYLE_STROKECOLOR:_0x1bfe[608],STYLE_SEPARATORCOLOR:_0x1bfe[609],STYLE_STROKEWIDTH:_0x1bfe[610],STYLE_ALIGN:_0x1bfe[611],STYLE_VERTICAL_ALIGN:_0x1bfe[123],STYLE_LABEL_POSITION:_0x1bfe[612],STYLE_VERTICAL_LABEL_POSITION:_0x1bfe[613],STYLE_IMAGE_ASPECT:_0x1bfe[614],STYLE_IMAGE_ALIGN:_0x1bfe[615],STYLE_IMAGE_VERTICAL_ALIGN:_0x1bfe[616],STYLE_GLASS:_0x1bfe[617],STYLE_IMAGE:_0x1bfe[618],STYLE_IMAGE_WIDTH:_0x1bfe[619],STYLE_IMAGE_HEIGHT:_0x1bfe[620],STYLE_IMAGE_BACKGROUND:_0x1bfe[621],STYLE_IMAGE_BORDER:_0x1bfe[622],STYLE_FLIPH:_0x1bfe[623],STYLE_FLIPV:_0x1bfe[624],STYLE_NOLABEL:_0x1bfe[625],STYLE_NOEDGESTYLE:_0x1bfe[626],STYLE_LABEL_BACKGROUNDCOLOR:_0x1bfe[627],STYLE_LABEL_BORDERCOLOR:_0x1bfe[628],STYLE_LABEL_PADDING:_0x1bfe[629],STYLE_INDICATOR_SHAPE:_0x1bfe[630],STYLE_INDICATOR_IMAGE:_0x1bfe[631],STYLE_INDICATOR_COLOR:_0x1bfe[632],STYLE_INDICATOR_STROKECOLOR:_0x1bfe[633],STYLE_INDICATOR_GRADIENTCOLOR:_0x1bfe[634],STYLE_INDICATOR_SPACING:_0x1bfe[635],STYLE_INDICATOR_WIDTH:_0x1bfe[636],STYLE_INDICATOR_HEIGHT:_0x1bfe[637],STYLE_INDICATOR_DIRECTION:_0x1bfe[638],STYLE_SHADOW:_0x1bfe[639],STYLE_SEGMENT:_0x1bfe[640],STYLE_ENDARROW:_0x1bfe[641],STYLE_STARTARROW:_0x1bfe[642],STYLE_ENDSIZE:_0x1bfe[643],STYLE_STARTSIZE:_0x1bfe[644],STYLE_SWIMLANE_LINE:_0x1bfe[645],STYLE_ENDFILL:_0x1bfe[646],STYLE_STARTFILL:_0x1bfe[647],STYLE_DASHED:_0x1bfe[648],STYLE_DASH_PATTERN:_0x1bfe[649],STYLE_ROUNDED:_0x1bfe[650],STYLE_CURVED:_0x1bfe[651],STYLE_ARCSIZE:_0x1bfe[652],STYLE_SMOOTH:_0x1bfe[653],STYLE_SOURCE_PERIMETER_SPACING:_0x1bfe[654],STYLE_TARGET_PERIMETER_SPACING:_0x1bfe[655],STYLE_PERIMETER_SPACING:_0x1bfe[656],STYLE_SPACING:_0x1bfe[657],STYLE_SPACING_TOP:_0x1bfe[658],STYLE_SPACING_LEFT:_0x1bfe[659],STYLE_SPACING_BOTTOM:_0x1bfe[660],STYLE_SPACING_RIGHT:_0x1bfe[661],STYLE_HORIZONTAL:_0x1bfe[662],STYLE_DIRECTION:_0x1bfe[663],STYLE_ELBOW:_0x1bfe[664],STYLE_FONTCOLOR:_0x1bfe[665],STYLE_FONTFAMILY:_0x1bfe[486],STYLE_FONTSIZE:_0x1bfe[487],STYLE_FONTSTYLE:_0x1bfe[666],STYLE_AUTOSIZE:_0x1bfe[667],STYLE_FOLDABLE:_0x1bfe[668],STYLE_EDITABLE:_0x1bfe[669],STYLE_BENDABLE:_0x1bfe[670],STYLE_MOVABLE:_0x1bfe[671],STYLE_RESIZABLE:_0x1bfe[672],STYLE_CLONEABLE:_0x1bfe[673],STYLE_DELETABLE:_0x1bfe[674],STYLE_SHAPE:_0x1bfe[253],STYLE_EDGE:_0x1bfe[675],STYLE_LOOP:_0x1bfe[676],STYLE_ROUTING_CENTER_X:_0x1bfe[677],STYLE_ROUTING_CENTER_Y:_0x1bfe[678],FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_SHADOW:8,SHAPE_RECTANGLE:_0x1bfe[679],SHAPE_ELLIPSE:_0x1bfe[680],SHAPE_DOUBLE_ELLIPSE:_0x1bfe[681],SHAPE_RHOMBUS:_0x1bfe[682],SHAPE_LINE:_0x1bfe[683],SHAPE_IMAGE:_0x1bfe[618],SHAPE_ARROW:_0x1bfe[684],SHAPE_LABEL:_0x1bfe[685],SHAPE_CYLINDER:_0x1bfe[686],SHAPE_SWIMLANE:_0x1bfe[687],SHAPE_CONNECTOR:_0x1bfe[688],SHAPE_ACTOR:_0x1bfe[689],SHAPE_CLOUD:_0x1bfe[690],SHAPE_TRIANGLE:_0x1bfe[691],SHAPE_HEXAGON:_0x1bfe[692],ARROW_CLASSIC:_0x1bfe[693],ARROW_BLOCK:_0x1bfe[694],ARROW_OPEN:_0x1bfe[392],ARROW_OVAL:_0x1bfe[695],ARROW_DIAMOND:_0x1bfe[696],ARROW_DIAMOND_THIN:_0x1bfe[697],ALIGN_LEFT:_0x1bfe[361],ALIGN_CENTER:_0x1bfe[698],ALIGN_RIGHT:_0x1bfe[699],ALIGN_TOP:_0x1bfe[125],ALIGN_MIDDLE:_0x1bfe[554],ALIGN_BOTTOM:_0x1bfe[553],DIRECTION_NORTH:_0x1bfe[700],DIRECTION_SOUTH:_0x1bfe[701],DIRECTION_EAST:_0x1bfe[702],DIRECTION_WEST:_0x1bfe[703],DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:_0x1bfe[704],ELBOW_HORIZONTAL:_0x1bfe[662],EDGESTYLE_ELBOW:_0x1bfe[705],EDGESTYLE_ENTITY_RELATION:_0x1bfe[706],EDGESTYLE_LOOP:_0x1bfe[707],EDGESTYLE_SIDETOSIDE:_0x1bfe[708],EDGESTYLE_TOPTOBOTTOM:_0x1bfe[709],EDGESTYLE_ORTHOGONAL:_0x1bfe[710],EDGESTYLE_SEGMENT:_0x1bfe[711],PERIMETER_ELLIPSE:_0x1bfe[712],PERIMETER_RECTANGLE:_0x1bfe[713],PERIMETER_RHOMBUS:_0x1bfe[714],PERIMETER_TRIANGLE:_0x1bfe[715]};function mxEventObject(_0x47f2x2){this[_0x1bfe[298]]= _0x47f2x2;this[_0x1bfe[716]]= [];for(var _0x47f2x3=1;_0x47f2x3< arguments[_0x1bfe[67]];_0x47f2x3+= 2){null!= arguments[_0x47f2x3+ 1]&& (this[_0x1bfe[716]][arguments[_0x47f2x3]]= arguments[_0x47f2x3+ 1])}}mxEventObject[_0x1bfe[202]][_0x1bfe[298]]= null;mxEventObject[_0x1bfe[202]][_0x1bfe[716]]= null;mxEventObject[_0x1bfe[202]][_0x1bfe[717]]= !1;mxEventObject[_0x1bfe[202]][_0x1bfe[718]]= function(){return this[_0x1bfe[298]]};mxEventObject[_0x1bfe[202]][_0x1bfe[719]]= function(){return this[_0x1bfe[716]]};mxEventObject[_0x1bfe[202]][_0x1bfe[720]]= function(_0x47f2x2){return this[_0x1bfe[716]][_0x47f2x2]};mxEventObject[_0x1bfe[202]][_0x1bfe[721]]= function(){return this[_0x1bfe[717]]};mxEventObject[_0x1bfe[202]][_0x1bfe[722]]= function(){this[_0x1bfe[717]]= !0};function mxMouseEvent(_0x47f2x2,_0x47f2x3){this[_0x1bfe[723]]= _0x47f2x2;this[_0x1bfe[724]]= _0x47f2x3}mxMouseEvent[_0x1bfe[202]][_0x1bfe[717]]= !1;mxMouseEvent[_0x1bfe[202]][_0x1bfe[723]]= null;mxMouseEvent[_0x1bfe[202]][_0x1bfe[725]]= null;mxMouseEvent[_0x1bfe[202]][_0x1bfe[726]]= null;mxMouseEvent[_0x1bfe[202]][_0x1bfe[724]]= null;mxMouseEvent[_0x1bfe[202]][_0x1bfe[727]]= function(){return this[_0x1bfe[723]]};mxMouseEvent[_0x1bfe[202]][_0x1bfe[728]]= function(){return mxEvent[_0x1bfe[728]](this[_0x1bfe[723]])};mxMouseEvent[_0x1bfe[202]][_0x1bfe[729]]= function(_0x47f2x2){if(null!= _0x47f2x2){for(var _0x47f2x3=this[_0x1bfe[728]]();null!= _0x47f2x3;){if(_0x47f2x3== _0x47f2x2[_0x1bfe[252]]){return !0};_0x47f2x3= _0x47f2x3[_0x1bfe[265]]}};return !1};mxMouseEvent[_0x1bfe[202]][_0x1bfe[730]]= function(){return mxEvent[_0x1bfe[731]](this[_0x1bfe[727]]())};mxMouseEvent[_0x1bfe[202]][_0x1bfe[732]]= function(){return mxEvent[_0x1bfe[733]](this[_0x1bfe[727]]())};mxMouseEvent[_0x1bfe[202]][_0x1bfe[734]]= function(){return this[_0x1bfe[725]]};mxMouseEvent[_0x1bfe[202]][_0x1bfe[735]]= function(){return this[_0x1bfe[726]]};mxMouseEvent[_0x1bfe[202]][_0x1bfe[248]]= function(){return this[_0x1bfe[724]]};mxMouseEvent[_0x1bfe[202]][_0x1bfe[736]]= function(){var _0x47f2x2=this[_0x1bfe[248]]();return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[246]]:null};mxMouseEvent[_0x1bfe[202]][_0x1bfe[737]]= function(){return mxEvent[_0x1bfe[737]](this[_0x1bfe[727]]())};mxMouseEvent[_0x1bfe[202]][_0x1bfe[721]]= function(){return this[_0x1bfe[717]]};mxMouseEvent[_0x1bfe[202]][_0x1bfe[722]]= function(_0x47f2x2){(null!= _0x47f2x2?_0x47f2x2:1)&& this[_0x1bfe[723]][_0x1bfe[738]]&& this[_0x1bfe[723]][_0x1bfe[738]]();this[_0x1bfe[723]][_0x1bfe[739]]= !1;this[_0x1bfe[717]]= !0};function mxEventSource(_0x47f2x2){this[_0x1bfe[740]](_0x47f2x2)}mxEventSource[_0x1bfe[202]][_0x1bfe[741]]= null;mxEventSource[_0x1bfe[202]][_0x1bfe[742]]= !0;mxEventSource[_0x1bfe[202]][_0x1bfe[743]]= null;mxEventSource[_0x1bfe[202]][_0x1bfe[503]]= function(){return this[_0x1bfe[742]]};mxEventSource[_0x1bfe[202]][_0x1bfe[504]]= function(_0x47f2x2){this[_0x1bfe[742]]= _0x47f2x2};mxEventSource[_0x1bfe[202]][_0x1bfe[744]]= function(){return this[_0x1bfe[743]]};mxEventSource[_0x1bfe[202]][_0x1bfe[740]]= function(_0x47f2x2){this[_0x1bfe[743]]= _0x47f2x2};mxEventSource[_0x1bfe[202]][_0x1bfe[169]]= function(_0x47f2x2,_0x47f2x3){null== this[_0x1bfe[741]]&& (this[_0x1bfe[741]]= []);this[_0x1bfe[741]][_0x1bfe[207]](_0x47f2x2);this[_0x1bfe[741]][_0x1bfe[207]](_0x47f2x3)};mxEventSource[_0x1bfe[202]][_0x1bfe[745]]= function(_0x47f2x2){if(null!= this[_0x1bfe[741]]){for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[741]][_0x1bfe[67]];){this[_0x1bfe[741]][_0x47f2x3+ 1]== _0x47f2x2?this[_0x1bfe[741]][_0x1bfe[300]](_0x47f2x3,2):_0x47f2x3+= 2}}};mxEventSource[_0x1bfe[202]][_0x1bfe[746]]= function(_0x47f2x2,_0x47f2x3){if(null!= this[_0x1bfe[741]]&& this[_0x1bfe[503]]()){null== _0x47f2x2&& (_0x47f2x2= new mxEventObject);null== _0x47f2x3&& (_0x47f2x3= this[_0x1bfe[744]]());null== _0x47f2x3&& (_0x47f2x3= this);for(var _0x47f2x4=[_0x47f2x3,_0x47f2x2],_0x47f2x5=0;_0x47f2x5< this[_0x1bfe[741]][_0x1bfe[67]];_0x47f2x5+= 2){var _0x47f2x9=this[_0x1bfe[741]][_0x47f2x5];(null== _0x47f2x9|| _0x47f2x9== _0x47f2x2[_0x1bfe[718]]())&& this[_0x1bfe[741]][_0x47f2x5+ 1][_0x1bfe[183]](this,_0x47f2x4)}}};var mxEvent={objects:[],addListener:function(){var _0x47f2x2=function(_0x47f2x2,_0x47f2x4,_0x47f2x5){null== _0x47f2x2[_0x1bfe[69]]&& (_0x47f2x2[_0x1bfe[69]]= [],mxEvent[_0x1bfe[68]][_0x1bfe[207]](_0x47f2x2));_0x47f2x2[_0x1bfe[69]][_0x1bfe[207]]({name:_0x47f2x4,f:_0x47f2x5})};return window[_0x1bfe[418]]?function(_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x3[_0x1bfe[418]](_0x47f2x4,_0x47f2x5,!1);_0x47f2x2(_0x47f2x3,_0x47f2x4,_0x47f2x5)}:function(_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x3[_0x1bfe[108]](_0x1bfe[747]+ _0x47f2x4,_0x47f2x5);_0x47f2x2(_0x47f2x3,_0x47f2x4,_0x47f2x5)}}(),removeListener:function(){var _0x47f2x2=function(_0x47f2x2,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x2[_0x1bfe[69]]){_0x47f2x4= _0x47f2x2[_0x1bfe[69]][_0x1bfe[67]];for(var _0x47f2x9=0;_0x47f2x9< _0x47f2x4;_0x47f2x9++){if(_0x47f2x2[_0x1bfe[69]][_0x47f2x9][_0x1bfe[748]]== _0x47f2x5){_0x47f2x2[_0x1bfe[69]][_0x1bfe[300]](_0x47f2x9,1);break}};0== _0x47f2x2[_0x1bfe[69]][_0x1bfe[67]]&& (_0x47f2x2[_0x1bfe[69]]= null)}};return window[_0x1bfe[749]]?function(_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x3[_0x1bfe[749]](_0x47f2x4,_0x47f2x5,!1);_0x47f2x2(_0x47f2x3,_0x47f2x4,_0x47f2x5)}:function(_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x3[_0x1bfe[750]](_0x1bfe[747]+ _0x47f2x4,_0x47f2x5);_0x47f2x2(_0x47f2x3,_0x47f2x4,_0x47f2x5)}}(),removeAllListeners:function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[69]];if(null!= _0x47f2x3){for(;0< _0x47f2x3[_0x1bfe[67]];){var _0x47f2x4=_0x47f2x3[0];mxEvent[_0x1bfe[745]](_0x47f2x2,_0x47f2x4[_0x1bfe[298]],_0x47f2x4[_0x1bfe[748]])}}},addGestureListeners:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){null!= _0x47f2x3&& mxEvent[_0x1bfe[169]](_0x47f2x2,_0x1bfe[751],_0x47f2x3);null!= _0x47f2x4&& mxEvent[_0x1bfe[169]](_0x47f2x2,_0x1bfe[752],_0x47f2x4);null!= _0x47f2x5&& mxEvent[_0x1bfe[169]](_0x47f2x2,_0x1bfe[753],_0x47f2x5);mxClient[_0x1bfe[754]]&& (null!= _0x47f2x3&& mxEvent[_0x1bfe[169]](_0x47f2x2,_0x1bfe[755],_0x47f2x3),null!= _0x47f2x4&& mxEvent[_0x1bfe[169]](_0x47f2x2,_0x1bfe[756],_0x47f2x4),null!= _0x47f2x5&& mxEvent[_0x1bfe[169]](_0x47f2x2,_0x1bfe[757],_0x47f2x5))},removeGestureListeners:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){null!= _0x47f2x3&& mxEvent[_0x1bfe[745]](_0x47f2x2,_0x1bfe[751],_0x47f2x3);null!= _0x47f2x4&& mxEvent[_0x1bfe[745]](_0x47f2x2,_0x1bfe[752],_0x47f2x4);null!= _0x47f2x5&& mxEvent[_0x1bfe[745]](_0x47f2x2,_0x1bfe[753],_0x47f2x5);mxClient[_0x1bfe[754]]&& (null!= _0x47f2x3&& mxEvent[_0x1bfe[745]](_0x47f2x2,_0x1bfe[755],_0x47f2x3),null!= _0x47f2x4&& mxEvent[_0x1bfe[745]](_0x47f2x2,_0x1bfe[756],_0x47f2x4),null!= _0x47f2x5&& mxEvent[_0x1bfe[745]](_0x47f2x2,_0x1bfe[757],_0x47f2x5))},redirectMouseEvents:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12){var _0x47f2x13=function(_0x47f2x2){return _0x1bfe[279]== typeof _0x47f2x4?_0x47f2x4(_0x47f2x2):_0x47f2x4};mxEvent[_0x1bfe[759]](_0x47f2x2,function(_0x47f2x2){null!= _0x47f2x5?_0x47f2x5(_0x47f2x2):mxEvent[_0x1bfe[721]](_0x47f2x2)|| _0x47f2x3[_0x1bfe[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x47f2x2,_0x47f2x13(_0x47f2x2)))},function(_0x47f2x2){null!= _0x47f2x9?_0x47f2x9(_0x47f2x2):mxEvent[_0x1bfe[721]](_0x47f2x2)|| _0x47f2x3[_0x1bfe[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x47f2x2,_0x47f2x13(_0x47f2x2)))},function(_0x47f2x2){null!= _0x47f2xa?_0x47f2xa(_0x47f2x2):mxEvent[_0x1bfe[721]](_0x47f2x2)|| _0x47f2x3[_0x1bfe[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x47f2x2,_0x47f2x13(_0x47f2x2)))});mxEvent[_0x1bfe[169]](_0x47f2x2,_0x1bfe[760],function(_0x47f2x2){if(null!= _0x47f2x12){_0x47f2x12(_0x47f2x2)}else {if(!mxEvent[_0x1bfe[721]](_0x47f2x2)){var _0x47f2x4=_0x47f2x13(_0x47f2x2);_0x47f2x3[_0x1bfe[761]](_0x47f2x2,null!= _0x47f2x4?_0x47f2x4[_0x1bfe[246]]:null)}}})},release:function(_0x47f2x2){if(null!= _0x47f2x2&& (mxEvent[_0x1bfe[70]](_0x47f2x2),_0x47f2x2= _0x47f2x2[_0x1bfe[271]],null!= _0x47f2x2)){for(var _0x47f2x3=_0x47f2x2[_0x1bfe[67]],_0x47f2x4=0;_0x47f2x4< _0x47f2x3;_0x47f2x4+= 1){mxEvent[_0x1bfe[762]](_0x47f2x2[_0x47f2x4])}}},addMouseWheelListener:function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=function(_0x47f2x3){null== _0x47f2x3&& (_0x47f2x3= window[_0x1bfe[763]]);var _0x47f2x5=0,_0x47f2x5=mxClient[_0x1bfe[133]]&& !mxClient[_0x1bfe[75]]&& !mxClient[_0x1bfe[76]]?-_0x47f2x3[_0x1bfe[764]]/ 2:_0x47f2x3[_0x1bfe[765]]/ 120;0!= _0x47f2x5&& _0x47f2x2(_0x47f2x3,0< _0x47f2x5)};mxClient[_0x1bfe[133]]?mxEvent[_0x1bfe[169]](window,mxClient[_0x1bfe[75]]|| mxClient[_0x1bfe[76]]?_0x1bfe[766]:_0x1bfe[767],_0x47f2x3):mxEvent[_0x1bfe[169]](document,_0x1bfe[766],_0x47f2x3)}},disableContextMenu:function(){return mxClient[_0x1bfe[80]]&& (_0x1bfe[82]=== typeof document[_0x1bfe[5]]|| 9> document[_0x1bfe[5]])?function(_0x47f2x2){mxEvent[_0x1bfe[169]](_0x47f2x2,_0x1bfe[768],function(){return !1})}:function(_0x47f2x2){_0x47f2x2[_0x1bfe[57]](_0x1bfe[769],_0x1bfe[770])}}(),getSource:function(_0x47f2x2){return null!= _0x47f2x2[_0x1bfe[771]]?_0x47f2x2[_0x1bfe[771]]:_0x47f2x2[_0x1bfe[772]]},isConsumed:function(_0x47f2x2){return null!= _0x47f2x2[_0x1bfe[721]]&& _0x47f2x2[_0x1bfe[721]]},isLeftMouseButton:function(_0x47f2x2){return _0x47f2x2[_0x1bfe[172]]== (mxClient[_0x1bfe[80]]&& (_0x1bfe[82]=== typeof document[_0x1bfe[5]]|| 9> document[_0x1bfe[5]])?1:0)},isRightMouseButton:function(_0x47f2x2){return 2== _0x47f2x2[_0x1bfe[172]]},isPopupTrigger:function(_0x47f2x2){return mxEvent[_0x1bfe[773]](_0x47f2x2)|| mxEvent[_0x1bfe[774]](_0x47f2x2)&& !mxEvent[_0x1bfe[775]](_0x47f2x2)},isShiftDown:function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[776]]:!1},isAltDown:function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[777]]:!1},isControlDown:function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[778]]:!1},isMetaDown:function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[779]]:!1},getMainEvent:function(_0x47f2x2){(_0x1bfe[755]== _0x47f2x2[_0x1bfe[60]]|| _0x1bfe[756]== _0x47f2x2[_0x1bfe[60]])&& null!= _0x47f2x2[_0x1bfe[780]]&& null!= _0x47f2x2[_0x1bfe[780]][0]?_0x47f2x2= _0x47f2x2[_0x1bfe[780]][0]:_0x1bfe[757]== _0x47f2x2[_0x1bfe[60]]&& (null!= _0x47f2x2[_0x1bfe[781]]&& null!= _0x47f2x2[_0x1bfe[781]][0])&& (_0x47f2x2= _0x47f2x2[_0x1bfe[781]][0]);return _0x47f2x2},getClientX:function(_0x47f2x2){return mxEvent[_0x1bfe[783]](_0x47f2x2)[_0x1bfe[782]]},getClientY:function(_0x47f2x2){return mxEvent[_0x1bfe[783]](_0x47f2x2)[_0x1bfe[784]]},consume:function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!0;if(null!= _0x47f2x3?_0x47f2x3:1){_0x47f2x2[_0x1bfe[738]]?(_0x47f2x4&& _0x47f2x2[_0x1bfe[785]](),_0x47f2x2[_0x1bfe[738]]()):_0x47f2x4&& (_0x47f2x2[_0x1bfe[786]]= !0)};_0x47f2x2[_0x1bfe[721]]= !0;_0x47f2x2[_0x1bfe[739]]= !1},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,MOUSE_DOWN:_0x1bfe[787],MOUSE_MOVE:_0x1bfe[788],MOUSE_UP:_0x1bfe[789],ACTIVATE:_0x1bfe[790],RESIZE_START:_0x1bfe[791],RESIZE:_0x1bfe[129],RESIZE_END:_0x1bfe[792],MOVE_START:_0x1bfe[793],MOVE:_0x1bfe[582],MOVE_END:_0x1bfe[794],PAN_START:_0x1bfe[795],PAN:_0x1bfe[796],PAN_END:_0x1bfe[797],MINIMIZE:_0x1bfe[798],NORMALIZE:_0x1bfe[799],MAXIMIZE:_0x1bfe[800],HIDE:_0x1bfe[801],SHOW:_0x1bfe[539],CLOSE:_0x1bfe[268],DESTROY:_0x1bfe[515],REFRESH:_0x1bfe[802],SIZE:_0x1bfe[803],SELECT:_0x1bfe[804],FIRED:_0x1bfe[805],GET:_0x1bfe[203],RECEIVE:_0x1bfe[806],CONNECT:_0x1bfe[807],DISCONNECT:_0x1bfe[808],SUSPEND:_0x1bfe[809],RESUME:_0x1bfe[810],MARK:_0x1bfe[811],SESSION:_0x1bfe[812],ROOT:_0x1bfe[813],POST:_0x1bfe[814],OPEN:_0x1bfe[392],SAVE:_0x1bfe[815],BEFORE_ADD_VERTEX:_0x1bfe[816],ADD_VERTEX:_0x1bfe[817],AFTER_ADD_VERTEX:_0x1bfe[818],DONE:_0x1bfe[819],EXECUTE:_0x1bfe[350],EXECUTED:_0x1bfe[820],BEGIN_UPDATE:_0x1bfe[473],START_EDIT:_0x1bfe[821],END_UPDATE:_0x1bfe[476],END_EDIT:_0x1bfe[822],BEFORE_UNDO:_0x1bfe[823],UNDO:_0x1bfe[824],REDO:_0x1bfe[825],CHANGE:_0x1bfe[826],NOTIFY:_0x1bfe[827],LAYOUT_CELLS:_0x1bfe[828],CLICK:_0x1bfe[173],SCALE:_0x1bfe[255],TRANSLATE:_0x1bfe[513],SCALE_AND_TRANSLATE:_0x1bfe[829],UP:_0x1bfe[830],DOWN:_0x1bfe[831],ADD:_0x1bfe[99],REMOVE:_0x1bfe[205],CLEAR:_0x1bfe[200],ADD_CELLS:_0x1bfe[832],CELLS_ADDED:_0x1bfe[833],MOVE_CELLS:_0x1bfe[834],CELLS_MOVED:_0x1bfe[835],RESIZE_CELLS:_0x1bfe[836],CELLS_RESIZED:_0x1bfe[837],TOGGLE_CELLS:_0x1bfe[838],CELLS_TOGGLED:_0x1bfe[839],ORDER_CELLS:_0x1bfe[840],CELLS_ORDERED:_0x1bfe[841],REMOVE_CELLS:_0x1bfe[842],CELLS_REMOVED:_0x1bfe[843],GROUP_CELLS:_0x1bfe[844],UNGROUP_CELLS:_0x1bfe[845],REMOVE_CELLS_FROM_PARENT:_0x1bfe[846],FOLD_CELLS:_0x1bfe[847],CELLS_FOLDED:_0x1bfe[848],ALIGN_CELLS:_0x1bfe[849],LABEL_CHANGED:_0x1bfe[850],CONNECT_CELL:_0x1bfe[851],CELL_CONNECTED:_0x1bfe[852],SPLIT_EDGE:_0x1bfe[853],FLIP_EDGE:_0x1bfe[854],START_EDITING:_0x1bfe[855],ADD_OVERLAY:_0x1bfe[856],REMOVE_OVERLAY:_0x1bfe[857],UPDATE_CELL_SIZE:_0x1bfe[858],ESCAPE:_0x1bfe[859],CLICK:_0x1bfe[173],DOUBLE_CLICK:_0x1bfe[860],START:_0x1bfe[861],RESET:_0x1bfe[862]};function mxXmlRequest(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){this[_0x1bfe[863]]= _0x47f2x2;this[_0x1bfe[864]]= _0x47f2x3;this[_0x1bfe[865]]= _0x47f2x4|| _0x1bfe[866];this[_0x1bfe[307]]= null!= _0x47f2x5?_0x47f2x5:!0;this[_0x1bfe[867]]= _0x47f2x9;this[_0x1bfe[868]]= _0x47f2xa}mxXmlRequest[_0x1bfe[202]][_0x1bfe[863]]= null;mxXmlRequest[_0x1bfe[202]][_0x1bfe[864]]= null;mxXmlRequest[_0x1bfe[202]][_0x1bfe[865]]= null;mxXmlRequest[_0x1bfe[202]][_0x1bfe[307]]= null;mxXmlRequest[_0x1bfe[202]][_0x1bfe[869]]= !1;mxXmlRequest[_0x1bfe[202]][_0x1bfe[867]]= null;mxXmlRequest[_0x1bfe[202]][_0x1bfe[868]]= null;mxXmlRequest[_0x1bfe[202]][_0x1bfe[870]]= null;mxXmlRequest[_0x1bfe[202]][_0x1bfe[871]]= function(){return this[_0x1bfe[869]]};mxXmlRequest[_0x1bfe[202]][_0x1bfe[872]]= function(_0x47f2x2){this[_0x1bfe[869]]= _0x47f2x2};mxXmlRequest[_0x1bfe[202]][_0x1bfe[221]]= function(){return this[_0x1bfe[870]][_0x1bfe[873]]};mxXmlRequest[_0x1bfe[202]][_0x1bfe[220]]= function(){return 4== this[_0x1bfe[870]][_0x1bfe[417]]};mxXmlRequest[_0x1bfe[202]][_0x1bfe[874]]= function(){var _0x47f2x2=this[_0x1bfe[875]]();return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[158]]:null};mxXmlRequest[_0x1bfe[202]][_0x1bfe[875]]= function(){var _0x47f2x2=this[_0x1bfe[870]][_0x1bfe[876]];if(9<= document[_0x1bfe[5]]|| null== _0x47f2x2|| null== _0x47f2x2[_0x1bfe[158]]){_0x47f2x2= mxUtils[_0x1bfe[877]](this[_0x1bfe[870]][_0x1bfe[873]])};return _0x47f2x2};mxXmlRequest[_0x1bfe[202]][_0x1bfe[221]]= function(){return this[_0x1bfe[870]][_0x1bfe[873]]};mxXmlRequest[_0x1bfe[202]][_0x1bfe[878]]= function(){return this[_0x1bfe[870]][_0x1bfe[879]]};mxXmlRequest[_0x1bfe[202]][_0x1bfe[385]]= function(){if(window[_0x1bfe[880]]){return function(){var _0x47f2x2= new XMLHttpRequest;this[_0x1bfe[871]]()&& _0x47f2x2[_0x1bfe[881]]&& _0x47f2x2[_0x1bfe[881]](_0x1bfe[882]);return _0x47f2x2}};if(_0x1bfe[82]!= typeof ActiveXObject){return function(){return new ActiveXObject(_0x1bfe[883])}}}();mxXmlRequest[_0x1bfe[202]][_0x1bfe[414]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[870]]= this[_0x1bfe[385]]();null!= this[_0x1bfe[870]]&& (null!= _0x47f2x2&& (this[_0x1bfe[870]][_0x1bfe[416]]= mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[220]]()&& (_0x47f2x2(this),this[_0x1bfe[884]]= null)})),this[_0x1bfe[870]][_0x1bfe[392]](this[_0x1bfe[865]],this[_0x1bfe[863]],this[_0x1bfe[307]],this[_0x1bfe[867]],this[_0x1bfe[868]]),this[_0x1bfe[886]](this[_0x1bfe[870]],this[_0x1bfe[864]]),this[_0x1bfe[870]][_0x1bfe[414]](this[_0x1bfe[864]]))};mxXmlRequest[_0x1bfe[202]][_0x1bfe[886]]= function(_0x47f2x2,_0x47f2x3){null!= _0x47f2x3&& _0x47f2x2[_0x1bfe[889]](_0x1bfe[887],_0x1bfe[888])};mxXmlRequest[_0x1bfe[202]][_0x1bfe[415]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x2= _0x47f2x2|| document;var _0x47f2x4=null;_0x47f2x2== document&& (_0x47f2x4= window[_0x1bfe[890]],window[_0x1bfe[890]]= null);var _0x47f2x5=_0x47f2x2[_0x1bfe[55]](_0x1bfe[891]);_0x47f2x5[_0x1bfe[57]](_0x1bfe[865],this[_0x1bfe[865]]);_0x47f2x5[_0x1bfe[57]](_0x1bfe[892],this[_0x1bfe[863]]);null!= _0x47f2x3&& _0x47f2x5[_0x1bfe[57]](_0x1bfe[772],_0x47f2x3);_0x47f2x5[_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[130];_0x47f2x5[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188];for(var _0x47f2x9=0< this[_0x1bfe[864]][_0x1bfe[2]](_0x1bfe[893])?this[_0x1bfe[864]][_0x1bfe[224]](_0x1bfe[893]):this[_0x1bfe[864]][_0x1bfe[224]](),_0x47f2xa=0;_0x47f2xa< _0x47f2x9[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=_0x47f2x9[_0x47f2xa][_0x1bfe[2]](_0x1bfe[226]);if(0< _0x47f2x12){var _0x47f2x13=_0x47f2x9[_0x47f2xa][_0x1bfe[85]](0,_0x47f2x12),_0x47f2x14=_0x47f2x9[_0x47f2xa][_0x1bfe[85]](_0x47f2x12+ 1),_0x47f2x12=_0x47f2x2[_0x1bfe[55]](_0x1bfe[126]);_0x47f2x12[_0x1bfe[57]](_0x1bfe[298],_0x47f2x13);_0x47f2x14= _0x47f2x14[_0x1bfe[230]](/\n/g,_0x1bfe[336]);_0x47f2x13= _0x47f2x2[_0x1bfe[344]](_0x47f2x14);_0x47f2x12[_0x1bfe[62]](_0x47f2x13);_0x47f2x5[_0x1bfe[62]](_0x47f2x12)}};_0x47f2x2[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x5);_0x47f2x5[_0x1bfe[894]]();_0x47f2x2[_0x1bfe[112]][_0x1bfe[266]](_0x47f2x5);null!= _0x47f2x4&& (window[_0x1bfe[890]]= _0x47f2x4)};var mxClipboard={STEPSIZE:10,insertCount:1,cells:null,isEmpty:function(){return null== mxClipboard[_0x1bfe[895]]},cut:function(_0x47f2x2,_0x47f2x3){_0x47f2x3= mxClipboard[_0x1bfe[149]](_0x47f2x2,_0x47f2x3);mxClipboard[_0x1bfe[896]]= 0;mxClipboard[_0x1bfe[842]](_0x47f2x2,_0x47f2x3);return _0x47f2x3},removeCells:function(_0x47f2x2,_0x47f2x3){_0x47f2x2[_0x1bfe[842]](_0x47f2x3)},copy:function(_0x47f2x2,_0x47f2x3){_0x47f2x3= _0x47f2x3|| _0x47f2x2[_0x1bfe[897]]();var _0x47f2x4=_0x47f2x2[_0x1bfe[898]](_0x47f2x3);mxClipboard[_0x1bfe[896]]= 1;mxClipboard[_0x1bfe[895]]= _0x47f2x2[_0x1bfe[899]](_0x47f2x4);return _0x47f2x4},paste:function(_0x47f2x2){if(null!= mxClipboard[_0x1bfe[895]]){var _0x47f2x3=_0x47f2x2[_0x1bfe[900]](mxClipboard[_0x1bfe[895]]),_0x47f2x4=mxClipboard[_0x1bfe[896]]* mxClipboard[_0x1bfe[901]],_0x47f2x5=_0x47f2x2[_0x1bfe[902]](),_0x47f2x3=_0x47f2x2[_0x1bfe[903]](_0x47f2x3,_0x47f2x4,_0x47f2x4,_0x47f2x5);mxClipboard[_0x1bfe[896]]++;_0x47f2x2[_0x1bfe[904]](_0x47f2x3)}}};function mxWindow(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15){null!= _0x47f2x3&& (_0x47f2x12= null!= _0x47f2x12?_0x47f2x12:!0,this[_0x1bfe[905]]= _0x47f2x3,this[_0x1bfe[176]](_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x15),this[_0x1bfe[906]](),this[_0x1bfe[907]](),this[_0x1bfe[908]](),this[_0x1bfe[909]](_0x47f2x12),this[_0x1bfe[910]](_0x47f2x2),(null== _0x47f2x13|| _0x47f2x13)&& this[_0x1bfe[911]](),null!= _0x47f2x14&& null!= _0x47f2x14[_0x1bfe[265]]?_0x47f2x14[_0x1bfe[265]][_0x1bfe[912]](this[_0x1bfe[485]],_0x47f2x14):document[_0x1bfe[112]][_0x1bfe[62]](this[_0x1bfe[485]]))}mxWindow[_0x1bfe[202]]= new mxEventSource;mxWindow[_0x1bfe[202]][_0x1bfe[196]]= mxWindow;mxWindow[_0x1bfe[202]][_0x1bfe[913]]= mxClient[_0x1bfe[88]]+ _0x1bfe[914];mxWindow[_0x1bfe[202]][_0x1bfe[915]]= mxClient[_0x1bfe[88]]+ _0x1bfe[916];mxWindow[_0x1bfe[202]][_0x1bfe[917]]= mxClient[_0x1bfe[88]]+ _0x1bfe[918];mxWindow[_0x1bfe[202]][_0x1bfe[919]]= mxClient[_0x1bfe[88]]+ _0x1bfe[920];mxWindow[_0x1bfe[202]][_0x1bfe[921]]= mxClient[_0x1bfe[88]]+ _0x1bfe[922];mxWindow[_0x1bfe[202]][_0x1bfe[189]]= !1;mxWindow[_0x1bfe[202]][_0x1bfe[905]]= !1;mxWindow[_0x1bfe[202]][_0x1bfe[923]]= new mxRectangle(0,0,50,40);mxWindow[_0x1bfe[202]][_0x1bfe[924]]= !1;mxWindow[_0x1bfe[202]][_0x1bfe[905]]= !1;mxWindow[_0x1bfe[202]][_0x1bfe[165]]= !0;mxWindow[_0x1bfe[202]][_0x1bfe[176]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x9= null!= _0x47f2x9?_0x47f2x9:_0x1bfe[925];this[_0x1bfe[485]]= document[_0x1bfe[55]](_0x1bfe[485]);this[_0x1bfe[485]][_0x1bfe[926]]= _0x47f2x9;this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x2+ _0x1bfe[168];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x3+ _0x1bfe[168];this[_0x1bfe[116]]= document[_0x1bfe[55]](_0x1bfe[116]);this[_0x1bfe[116]][_0x1bfe[926]]= _0x47f2x9;null!= _0x47f2x4&& (mxClient[_0x1bfe[80]]|| (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x4+ _0x1bfe[168]),this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x4+ _0x1bfe[168]);null!= _0x47f2x5&& (mxClient[_0x1bfe[80]]|| (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x5+ _0x1bfe[168]),this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x5+ _0x1bfe[168]);_0x47f2x2= document[_0x1bfe[55]](_0x1bfe[120]);_0x47f2x3= document[_0x1bfe[55]](_0x1bfe[121]);this[_0x1bfe[924]]= document[_0x1bfe[55]](_0x1bfe[122]);this[_0x1bfe[924]][_0x1bfe[926]]= _0x47f2x9+ _0x1bfe[927];_0x47f2x3[_0x1bfe[62]](this[_0x1bfe[924]]);_0x47f2x2[_0x1bfe[62]](_0x47f2x3);_0x47f2x3= document[_0x1bfe[55]](_0x1bfe[121]);this[_0x1bfe[122]]= document[_0x1bfe[55]](_0x1bfe[122]);this[_0x1bfe[122]][_0x1bfe[926]]= _0x47f2x9+ _0x1bfe[928];this[_0x1bfe[929]]= document[_0x1bfe[55]](_0x1bfe[485]);this[_0x1bfe[929]][_0x1bfe[926]]= _0x47f2x9+ _0x1bfe[928];this[_0x1bfe[929]][_0x1bfe[124]][_0x1bfe[117]]= _0x1bfe[118];this[_0x1bfe[929]][_0x1bfe[62]](this[_0x1bfe[905]]);if(mxClient[_0x1bfe[80]]|| _0x1bfe[529]!= this[_0x1bfe[905]][_0x1bfe[301]][_0x1bfe[36]]()){this[_0x1bfe[929]][_0x1bfe[124]][_0x1bfe[119]]= _0x1bfe[118]};this[_0x1bfe[122]][_0x1bfe[62]](this[_0x1bfe[929]]);_0x47f2x3[_0x1bfe[62]](this[_0x1bfe[122]]);_0x47f2x2[_0x1bfe[62]](_0x47f2x3);this[_0x1bfe[116]][_0x1bfe[62]](_0x47f2x2);this[_0x1bfe[485]][_0x1bfe[62]](this[_0x1bfe[116]]);_0x47f2x9= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[790]]()});mxEvent[_0x1bfe[169]](this[_0x1bfe[924]],_0x1bfe[751],_0x47f2x9);mxEvent[_0x1bfe[169]](this[_0x1bfe[116]],_0x1bfe[751],_0x47f2x9);mxClient[_0x1bfe[754]]&& (mxEvent[_0x1bfe[169]](this[_0x1bfe[924]],_0x1bfe[755],_0x47f2x9),mxEvent[_0x1bfe[169]](this[_0x1bfe[116]],_0x1bfe[755],_0x47f2x9));this[_0x1bfe[801]]()};mxWindow[_0x1bfe[202]][_0x1bfe[910]]= function(_0x47f2x2){for(var _0x47f2x3=this[_0x1bfe[924]][_0x1bfe[285]];null!= _0x47f2x3;){var _0x47f2x4=_0x47f2x3[_0x1bfe[287]];_0x47f2x3[_0x1bfe[288]]== mxConstants[_0x1bfe[317]]&& _0x47f2x3[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x3);_0x47f2x3= _0x47f2x4};mxUtils[_0x1bfe[53]](this[_0x1bfe[924]],_0x47f2x2|| _0x1bfe[110])};mxWindow[_0x1bfe[202]][_0x1bfe[162]]= function(_0x47f2x2){0> navigator[_0x1bfe[3]][_0x1bfe[2]](_0x1bfe[186])&& (this[_0x1bfe[929]][_0x1bfe[124]][_0x1bfe[277]]= _0x47f2x2?_0x1bfe[278]:_0x1bfe[188])};mxWindow[_0x1bfe[202]][_0x1bfe[790]]= function(){if(mxWindow[_0x1bfe[930]]!= this){var _0x47f2x2=mxUtils[_0x1bfe[275]](this[_0x1bfe[166]]()),_0x47f2x2=null!= _0x47f2x2?_0x47f2x2[_0x1bfe[931]]:3;if(mxWindow[_0x1bfe[930]]){var _0x47f2x3=mxWindow[_0x1bfe[930]][_0x1bfe[166]]();null!= _0x47f2x3&& null!= _0x47f2x3[_0x1bfe[124]]&& (_0x47f2x3[_0x1bfe[124]][_0x1bfe[931]]= _0x47f2x2)};_0x47f2x3= mxWindow[_0x1bfe[930]];this[_0x1bfe[166]]()[_0x1bfe[124]][_0x1bfe[931]]= parseInt(_0x47f2x2)+ 1;mxWindow[_0x1bfe[930]]= this;this[_0x1bfe[746]]( new mxEventObject(mxEvent.ACTIVATE,_0x1bfe[932],_0x47f2x3))}};mxWindow[_0x1bfe[202]][_0x1bfe[166]]= function(){return this[_0x1bfe[485]]};mxWindow[_0x1bfe[202]][_0x1bfe[933]]= function(){mxUtils[_0x1bfe[933]](this[_0x1bfe[485]])};mxWindow[_0x1bfe[202]][_0x1bfe[934]]= function(){return null!= this[_0x1bfe[129]]?_0x1bfe[130]!= this[_0x1bfe[129]][_0x1bfe[124]][_0x1bfe[495]]:!1};mxWindow[_0x1bfe[202]][_0x1bfe[163]]= function(_0x47f2x2){_0x47f2x2?null== this[_0x1bfe[129]]?(this[_0x1bfe[129]]= document[_0x1bfe[55]](_0x1bfe[466]),this[_0x1bfe[129]][_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492],this[_0x1bfe[129]][_0x1bfe[124]][_0x1bfe[553]]= _0x1bfe[935],this[_0x1bfe[129]][_0x1bfe[124]][_0x1bfe[699]]= _0x1bfe[935],this[_0x1bfe[129]][_0x1bfe[57]](_0x1bfe[390],mxClient[_0x1bfe[88]]+ _0x1bfe[922]),this[_0x1bfe[129]][_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[936],mxEvent[_0x1bfe[759]](this[_0x1bfe[129]],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[790]]();var _0x47f2x4=mxEvent[_0x1bfe[731]](_0x47f2x2),_0x47f2x5=mxEvent[_0x1bfe[733]](_0x47f2x2),_0x47f2x9=this[_0x1bfe[485]][_0x1bfe[359]],_0x47f2xa=this[_0x1bfe[485]][_0x1bfe[167]],_0x47f2x12=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){var _0x47f2x3=mxEvent[_0x1bfe[731]](_0x47f2x2)- _0x47f2x4,_0x47f2x12=mxEvent[_0x1bfe[733]](_0x47f2x2)- _0x47f2x5;this[_0x1bfe[937]](_0x47f2x9+ _0x47f2x3,_0x47f2xa+ _0x47f2x12);this[_0x1bfe[746]]( new mxEventObject(mxEvent.RESIZE,_0x1bfe[763],_0x47f2x2));mxEvent[_0x1bfe[722]](_0x47f2x2)}),_0x47f2x13=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){mxEvent[_0x1bfe[938]](document,null,_0x47f2x12,_0x47f2x13);this[_0x1bfe[746]]( new mxEventObject(mxEvent.RESIZE_END,_0x1bfe[763],_0x47f2x2));mxEvent[_0x1bfe[722]](_0x47f2x2)});mxEvent[_0x1bfe[759]](document,null,_0x47f2x12,_0x47f2x13);this[_0x1bfe[746]]( new mxEventObject(mxEvent.RESIZE_START,_0x1bfe[763],_0x47f2x2));mxEvent[_0x1bfe[722]](_0x47f2x2)}),null,null),this[_0x1bfe[485]][_0x1bfe[62]](this[_0x1bfe[129]])):this[_0x1bfe[129]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[497]:null!= this[_0x1bfe[129]]&& (this[_0x1bfe[129]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[130])};mxWindow[_0x1bfe[202]][_0x1bfe[937]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x2= Math[_0x1bfe[160]](this[_0x1bfe[923]][_0x1bfe[117]],_0x47f2x2);_0x47f2x3= Math[_0x1bfe[160]](this[_0x1bfe[923]][_0x1bfe[119]],_0x47f2x3);mxClient[_0x1bfe[80]]|| (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x2+ _0x1bfe[168],this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x3+ _0x1bfe[168]);this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x2+ _0x1bfe[168];this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x3+ _0x1bfe[168];mxClient[_0x1bfe[80]]|| (this[_0x1bfe[929]][_0x1bfe[124]][_0x1bfe[119]]= this[_0x1bfe[485]][_0x1bfe[167]]- this[_0x1bfe[924]][_0x1bfe[167]]- 2+ _0x1bfe[168])};mxWindow[_0x1bfe[202]][_0x1bfe[909]]= function(_0x47f2x2){this[_0x1bfe[798]][_0x1bfe[124]][_0x1bfe[495]]= _0x47f2x2?_0x1bfe[110]:_0x1bfe[130]};mxWindow[_0x1bfe[202]][_0x1bfe[939]]= function(){return new mxRectangle(0,0,0,this[_0x1bfe[924]][_0x1bfe[167]])};mxWindow[_0x1bfe[202]][_0x1bfe[907]]= function(){this[_0x1bfe[798]]= document[_0x1bfe[55]](_0x1bfe[466]);this[_0x1bfe[798]][_0x1bfe[57]](_0x1bfe[390],this[_0x1bfe[915]]);this[_0x1bfe[798]][_0x1bfe[57]](_0x1bfe[611],_0x1bfe[699]);this[_0x1bfe[798]][_0x1bfe[57]](_0x1bfe[924],_0x1bfe[940]);this[_0x1bfe[798]][_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[356];this[_0x1bfe[798]][_0x1bfe[124]][_0x1bfe[941]]= _0x1bfe[942];this[_0x1bfe[798]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[130];this[_0x1bfe[924]][_0x1bfe[62]](this[_0x1bfe[798]]);var _0x47f2x2=!1,_0x47f2x3=null,_0x47f2x4=null,_0x47f2x5=mxUtils[_0x1bfe[885]](this,function(_0x47f2x5){this[_0x1bfe[790]]();if(_0x47f2x2){_0x47f2x2= !1,this[_0x1bfe[798]][_0x1bfe[57]](_0x1bfe[390],this[_0x1bfe[915]]),this[_0x1bfe[798]][_0x1bfe[57]](_0x1bfe[924],_0x1bfe[940]),this[_0x1bfe[929]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[110],this[_0x1bfe[800]][_0x1bfe[124]][_0x1bfe[495]]= _0x47f2x3,mxClient[_0x1bfe[80]]|| (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x4),this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x4,null!= this[_0x1bfe[129]]&& (this[_0x1bfe[129]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[110]),this[_0x1bfe[746]]( new mxEventObject(mxEvent.NORMALIZE,_0x1bfe[763],_0x47f2x5))}else {_0x47f2x2= !0;this[_0x1bfe[798]][_0x1bfe[57]](_0x1bfe[390],this[_0x1bfe[917]]);this[_0x1bfe[798]][_0x1bfe[57]](_0x1bfe[924],_0x1bfe[943]);this[_0x1bfe[929]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[130];_0x47f2x3= this[_0x1bfe[800]][_0x1bfe[124]][_0x1bfe[495]];this[_0x1bfe[800]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[130];_0x47f2x4= this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[119]];var _0x47f2xa=this[_0x1bfe[939]]();0< _0x47f2xa[_0x1bfe[119]]&& (mxClient[_0x1bfe[80]]|| (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2xa[_0x1bfe[119]]+ _0x1bfe[168]),this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2xa[_0x1bfe[119]]+ _0x1bfe[168]);0< _0x47f2xa[_0x1bfe[117]]&& (mxClient[_0x1bfe[80]]|| (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2xa[_0x1bfe[117]]+ _0x1bfe[168]),this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2xa[_0x1bfe[117]]+ _0x1bfe[168]);null!= this[_0x1bfe[129]]&& (this[_0x1bfe[129]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188]);this[_0x1bfe[746]]( new mxEventObject(mxEvent.MINIMIZE,_0x1bfe[763],_0x47f2x5))};mxEvent[_0x1bfe[722]](_0x47f2x5)});mxEvent[_0x1bfe[169]](this[_0x1bfe[798]],_0x1bfe[751],_0x47f2x5);mxClient[_0x1bfe[754]]&& mxEvent[_0x1bfe[169]](this[_0x1bfe[798]],_0x1bfe[755],_0x47f2x5)};mxWindow[_0x1bfe[202]][_0x1bfe[161]]= function(_0x47f2x2){this[_0x1bfe[800]][_0x1bfe[124]][_0x1bfe[495]]= _0x47f2x2?_0x1bfe[110]:_0x1bfe[130]};mxWindow[_0x1bfe[202]][_0x1bfe[906]]= function(){this[_0x1bfe[800]]= document[_0x1bfe[55]](_0x1bfe[466]);this[_0x1bfe[800]][_0x1bfe[57]](_0x1bfe[390],this[_0x1bfe[919]]);this[_0x1bfe[800]][_0x1bfe[57]](_0x1bfe[611],_0x1bfe[699]);this[_0x1bfe[800]][_0x1bfe[57]](_0x1bfe[924],_0x1bfe[944]);this[_0x1bfe[800]][_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[583];this[_0x1bfe[800]][_0x1bfe[124]][_0x1bfe[945]]= _0x1bfe[942];this[_0x1bfe[800]][_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[356];this[_0x1bfe[800]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[130];this[_0x1bfe[924]][_0x1bfe[62]](this[_0x1bfe[800]]);var _0x47f2x2=!1,_0x47f2x3=null,_0x47f2x4=null,_0x47f2x5=null,_0x47f2x9=null,_0x47f2xa=mxUtils[_0x1bfe[885]](this,function(_0x47f2xa){this[_0x1bfe[790]]();if(_0x1bfe[130]!= this[_0x1bfe[800]][_0x1bfe[124]][_0x1bfe[495]]){if(_0x47f2x2){_0x47f2x2= !1;this[_0x1bfe[800]][_0x1bfe[57]](_0x1bfe[390],this[_0x1bfe[919]]);this[_0x1bfe[800]][_0x1bfe[57]](_0x1bfe[924],_0x1bfe[944]);this[_0x1bfe[929]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[110];this[_0x1bfe[798]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[110];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x3+ _0x1bfe[168];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x4+ _0x1bfe[168];if(!mxClient[_0x1bfe[80]]&& (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x5,this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x9,_0x47f2x13= mxUtils[_0x1bfe[275]](this[_0x1bfe[929]]),_0x1bfe[278]== _0x47f2x13[_0x1bfe[277]]|| null!= this[_0x1bfe[129]])){this[_0x1bfe[929]][_0x1bfe[124]][_0x1bfe[119]]= this[_0x1bfe[485]][_0x1bfe[167]]- this[_0x1bfe[924]][_0x1bfe[167]]- 2+ _0x1bfe[168]};this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x5;this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x9;null!= this[_0x1bfe[129]]&& (this[_0x1bfe[129]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[110]);this[_0x1bfe[746]]( new mxEventObject(mxEvent.NORMALIZE,_0x1bfe[763],_0x47f2xa))}else {_0x47f2x2= !0;this[_0x1bfe[800]][_0x1bfe[57]](_0x1bfe[390],this[_0x1bfe[917]]);this[_0x1bfe[800]][_0x1bfe[57]](_0x1bfe[924],_0x1bfe[943]);this[_0x1bfe[929]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[110];this[_0x1bfe[798]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188];_0x47f2x3= parseInt(this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]]);_0x47f2x4= parseInt(this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[125]]);_0x47f2x5= this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[119]];_0x47f2x9= this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[117]];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]]= _0x1bfe[946];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[125]]= _0x1bfe[946];mxClient[_0x1bfe[80]]|| (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[119]]= document[_0x1bfe[112]][_0x1bfe[157]]- 2+ _0x1bfe[168],this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[117]]= document[_0x1bfe[112]][_0x1bfe[159]]- 2+ _0x1bfe[168]);this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[117]]= document[_0x1bfe[112]][_0x1bfe[159]]- 2+ _0x1bfe[168];this[_0x1bfe[116]][_0x1bfe[124]][_0x1bfe[119]]= document[_0x1bfe[112]][_0x1bfe[157]]- 2+ _0x1bfe[168];null!= this[_0x1bfe[129]]&& (this[_0x1bfe[129]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188]);if(!mxClient[_0x1bfe[80]]){var _0x47f2x13=mxUtils[_0x1bfe[275]](this[_0x1bfe[929]]);if(_0x1bfe[278]== _0x47f2x13[_0x1bfe[277]]|| null!= this[_0x1bfe[129]]){this[_0x1bfe[929]][_0x1bfe[124]][_0x1bfe[119]]= this[_0x1bfe[485]][_0x1bfe[167]]- this[_0x1bfe[924]][_0x1bfe[167]]- 2+ _0x1bfe[168]}};this[_0x1bfe[746]]( new mxEventObject(mxEvent.MAXIMIZE,_0x1bfe[763],_0x47f2xa))};mxEvent[_0x1bfe[722]](_0x47f2xa)}});mxEvent[_0x1bfe[759]](this[_0x1bfe[800]],_0x47f2xa);mxEvent[_0x1bfe[169]](this[_0x1bfe[924]],_0x1bfe[760],_0x47f2xa)};mxWindow[_0x1bfe[202]][_0x1bfe[911]]= function(){this[_0x1bfe[924]][_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[582];mxEvent[_0x1bfe[759]](this[_0x1bfe[924]],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){var _0x47f2x3=mxEvent[_0x1bfe[731]](_0x47f2x2),_0x47f2x4=mxEvent[_0x1bfe[733]](_0x47f2x2),_0x47f2x5=this[_0x1bfe[730]](),_0x47f2x9=this[_0x1bfe[732]](),_0x47f2xa=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){var _0x47f2xa=mxEvent[_0x1bfe[731]](_0x47f2x2)- _0x47f2x3,_0x47f2x12=mxEvent[_0x1bfe[733]](_0x47f2x2)- _0x47f2x4;this[_0x1bfe[947]](_0x47f2x5+ _0x47f2xa,_0x47f2x9+ _0x47f2x12);this[_0x1bfe[746]]( new mxEventObject(mxEvent.MOVE,_0x1bfe[763],_0x47f2x2));mxEvent[_0x1bfe[722]](_0x47f2x2)}),_0x47f2x12=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){mxEvent[_0x1bfe[938]](document,null,_0x47f2xa,_0x47f2x12);this[_0x1bfe[746]]( new mxEventObject(mxEvent.MOVE_END,_0x1bfe[763],_0x47f2x2));mxEvent[_0x1bfe[722]](_0x47f2x2)});mxEvent[_0x1bfe[759]](document,null,_0x47f2xa,_0x47f2x12);this[_0x1bfe[746]]( new mxEventObject(mxEvent.MOVE_START,_0x1bfe[763],_0x47f2x2));mxEvent[_0x1bfe[722]](_0x47f2x2)}))};mxWindow[_0x1bfe[202]][_0x1bfe[947]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x2+ _0x1bfe[168];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x3+ _0x1bfe[168]};mxWindow[_0x1bfe[202]][_0x1bfe[730]]= function(){return parseInt(this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]])};mxWindow[_0x1bfe[202]][_0x1bfe[732]]= function(){return parseInt(this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[125]])};mxWindow[_0x1bfe[202]][_0x1bfe[908]]= function(){this[_0x1bfe[948]]= document[_0x1bfe[55]](_0x1bfe[466]);this[_0x1bfe[948]][_0x1bfe[57]](_0x1bfe[390],this[_0x1bfe[913]]);this[_0x1bfe[948]][_0x1bfe[57]](_0x1bfe[611],_0x1bfe[699]);this[_0x1bfe[948]][_0x1bfe[57]](_0x1bfe[924],_0x1bfe[949]);this[_0x1bfe[948]][_0x1bfe[124]][_0x1bfe[945]]= _0x1bfe[935];this[_0x1bfe[948]][_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[356];this[_0x1bfe[948]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[130];this[_0x1bfe[924]][_0x1bfe[950]](this[_0x1bfe[948]],this[_0x1bfe[924]][_0x1bfe[285]]);mxEvent[_0x1bfe[759]](this[_0x1bfe[948]],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[746]]( new mxEventObject(mxEvent.CLOSE,_0x1bfe[763],_0x47f2x2));this[_0x1bfe[165]]?this[_0x1bfe[515]]():this[_0x1bfe[175]](!1);mxEvent[_0x1bfe[722]](_0x47f2x2)}))};mxWindow[_0x1bfe[202]][_0x1bfe[951]]= function(_0x47f2x2){this[_0x1bfe[618]]= document[_0x1bfe[55]](_0x1bfe[466]);this[_0x1bfe[618]][_0x1bfe[57]](_0x1bfe[390],_0x47f2x2);this[_0x1bfe[618]][_0x1bfe[57]](_0x1bfe[611],_0x1bfe[361]);this[_0x1bfe[618]][_0x1bfe[124]][_0x1bfe[941]]= _0x1bfe[952];this[_0x1bfe[618]][_0x1bfe[124]][_0x1bfe[945]]= _0x1bfe[946];this[_0x1bfe[618]][_0x1bfe[124]][_0x1bfe[953]]= _0x1bfe[954];this[_0x1bfe[924]][_0x1bfe[950]](this[_0x1bfe[618]],this[_0x1bfe[924]][_0x1bfe[285]])};mxWindow[_0x1bfe[202]][_0x1bfe[164]]= function(_0x47f2x2){this[_0x1bfe[948]][_0x1bfe[124]][_0x1bfe[495]]= _0x47f2x2?_0x1bfe[110]:_0x1bfe[130]};mxWindow[_0x1bfe[202]][_0x1bfe[174]]= function(){return null!= this[_0x1bfe[485]]?_0x1bfe[188]!= this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[187]]:!1};mxWindow[_0x1bfe[202]][_0x1bfe[175]]= function(_0x47f2x2){null!= this[_0x1bfe[485]]&& this[_0x1bfe[174]]()!= _0x47f2x2&& (_0x47f2x2?this[_0x1bfe[539]]():this[_0x1bfe[801]]())};mxWindow[_0x1bfe[202]][_0x1bfe[539]]= function(){this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[110];this[_0x1bfe[790]]();var _0x47f2x2=mxUtils[_0x1bfe[275]](this[_0x1bfe[929]]);if(!mxClient[_0x1bfe[80]]&& (_0x1bfe[278]== _0x47f2x2[_0x1bfe[277]]|| null!= this[_0x1bfe[129]])){this[_0x1bfe[929]][_0x1bfe[124]][_0x1bfe[119]]= this[_0x1bfe[485]][_0x1bfe[167]]- this[_0x1bfe[924]][_0x1bfe[167]]- 2+ _0x1bfe[168]};this[_0x1bfe[746]]( new mxEventObject(mxEvent.SHOW))};mxWindow[_0x1bfe[202]][_0x1bfe[801]]= function(){this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188];this[_0x1bfe[746]]( new mxEventObject(mxEvent.HIDE))};mxWindow[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[746]]( new mxEventObject(mxEvent.DESTROY));null!= this[_0x1bfe[485]]&& (mxEvent[_0x1bfe[762]](this[_0x1bfe[485]]),this[_0x1bfe[485]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[485]]),this[_0x1bfe[485]]= null);this[_0x1bfe[929]]= this[_0x1bfe[905]]= this[_0x1bfe[924]]= null};function mxForm(_0x47f2x2){this[_0x1bfe[116]]= document[_0x1bfe[55]](_0x1bfe[116]);this[_0x1bfe[116]][_0x1bfe[926]]= _0x47f2x2;this[_0x1bfe[112]]= document[_0x1bfe[55]](_0x1bfe[120]);this[_0x1bfe[116]][_0x1bfe[62]](this[_0x1bfe[112]])}mxForm[_0x1bfe[202]][_0x1bfe[116]]= null;mxForm[_0x1bfe[202]][_0x1bfe[112]]= !1;mxForm[_0x1bfe[202]][_0x1bfe[955]]= function(){return this[_0x1bfe[116]]};mxForm[_0x1bfe[202]][_0x1bfe[956]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[121]),_0x47f2x5=document[_0x1bfe[55]](_0x1bfe[122]);_0x47f2x4[_0x1bfe[62]](_0x47f2x5);var _0x47f2x5=document[_0x1bfe[55]](_0x1bfe[122]),_0x47f2x9=document[_0x1bfe[55]](_0x1bfe[172]);mxUtils[_0x1bfe[53]](_0x47f2x9,mxResources[_0x1bfe[203]](_0x1bfe[957])|| _0x1bfe[958]);_0x47f2x5[_0x1bfe[62]](_0x47f2x9);mxEvent[_0x1bfe[169]](_0x47f2x9,_0x1bfe[173],function(){_0x47f2x2()});_0x47f2x9= document[_0x1bfe[55]](_0x1bfe[172]);mxUtils[_0x1bfe[53]](_0x47f2x9,mxResources[_0x1bfe[203]](_0x1bfe[959])|| _0x1bfe[960]);_0x47f2x5[_0x1bfe[62]](_0x47f2x9);mxEvent[_0x1bfe[169]](_0x47f2x9,_0x1bfe[173],function(){_0x47f2x3()});_0x47f2x4[_0x1bfe[62]](_0x47f2x5);this[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x4)};mxForm[_0x1bfe[202]][_0x1bfe[961]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[962]);_0x47f2x4[_0x1bfe[57]](_0x1bfe[60],_0x1bfe[963]);_0x47f2x4[_0x1bfe[131]]= _0x47f2x3;return this[_0x1bfe[964]](_0x47f2x2,_0x47f2x4)};mxForm[_0x1bfe[202]][_0x1bfe[965]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[962]);_0x47f2x4[_0x1bfe[57]](_0x1bfe[60],_0x1bfe[966]);this[_0x1bfe[964]](_0x47f2x2,_0x47f2x4);_0x47f2x3&& (_0x47f2x4[_0x1bfe[967]]= !0);return _0x47f2x4};mxForm[_0x1bfe[202]][_0x1bfe[968]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=document[_0x1bfe[55]](_0x1bfe[126]);mxClient[_0x1bfe[133]]&& _0x47f2x4--;_0x47f2x5[_0x1bfe[57]](_0x1bfe[969],_0x47f2x4|| 2);_0x47f2x5[_0x1bfe[131]]= _0x47f2x3;return this[_0x1bfe[964]](_0x47f2x2,_0x47f2x5)};mxForm[_0x1bfe[202]][_0x1bfe[970]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=document[_0x1bfe[55]](_0x1bfe[804]);null!= _0x47f2x4&& _0x47f2x5[_0x1bfe[57]](_0x1bfe[803],_0x47f2x4);_0x47f2x3&& _0x47f2x5[_0x1bfe[57]](_0x1bfe[971],_0x1bfe[128]);return this[_0x1bfe[964]](_0x47f2x2,_0x47f2x5)};mxForm[_0x1bfe[202]][_0x1bfe[972]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=document[_0x1bfe[55]](_0x1bfe[973]);mxUtils[_0x1bfe[171]](_0x47f2x9,_0x47f2x3);_0x47f2x9[_0x1bfe[57]](_0x1bfe[131],_0x47f2x4);_0x47f2x5&& _0x47f2x9[_0x1bfe[57]](_0x1bfe[974],_0x47f2x5);_0x47f2x2[_0x1bfe[62]](_0x47f2x9)};mxForm[_0x1bfe[202]][_0x1bfe[964]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[121]),_0x47f2x5=document[_0x1bfe[55]](_0x1bfe[122]);mxUtils[_0x1bfe[53]](_0x47f2x5,_0x47f2x2);_0x47f2x4[_0x1bfe[62]](_0x47f2x5);_0x47f2x5= document[_0x1bfe[55]](_0x1bfe[122]);_0x47f2x5[_0x1bfe[62]](_0x47f2x3);_0x47f2x4[_0x1bfe[62]](_0x47f2x5);this[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x4);return _0x47f2x3};function mxImage(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[390]]= _0x47f2x2;this[_0x1bfe[117]]= _0x47f2x3;this[_0x1bfe[119]]= _0x47f2x4}mxImage[_0x1bfe[202]][_0x1bfe[390]]= null;mxImage[_0x1bfe[202]][_0x1bfe[117]]= null;mxImage[_0x1bfe[202]][_0x1bfe[119]]= null;function mxDivResizer(_0x47f2x2,_0x47f2x3){if(_0x1bfe[485]== _0x47f2x2[_0x1bfe[301]][_0x1bfe[216]]()){null== _0x47f2x3&& (_0x47f2x3= window);this[_0x1bfe[485]]= _0x47f2x2;var _0x47f2x4=mxUtils[_0x1bfe[275]](_0x47f2x2);null!= _0x47f2x4&& (this[_0x1bfe[975]]= _0x1bfe[278]== _0x47f2x4[_0x1bfe[117]],this[_0x1bfe[976]]= _0x1bfe[278]== _0x47f2x4[_0x1bfe[119]]);mxEvent[_0x1bfe[169]](_0x47f2x3,_0x1bfe[129],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[977]]|| (this[_0x1bfe[977]]= !0,this[_0x1bfe[129]](),this[_0x1bfe[977]]= !1)}));this[_0x1bfe[129]]()}}mxDivResizer[_0x1bfe[202]][_0x1bfe[975]]= !0;mxDivResizer[_0x1bfe[202]][_0x1bfe[976]]= !0;mxDivResizer[_0x1bfe[202]][_0x1bfe[977]]= !1;mxDivResizer[_0x1bfe[202]][_0x1bfe[129]]= function(){var _0x47f2x2=this[_0x1bfe[978]](),_0x47f2x3=this[_0x1bfe[979]](),_0x47f2x4=parseInt(this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]]),_0x47f2x5=parseInt(this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[699]]),_0x47f2x9=parseInt(this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[125]]),_0x47f2xa=parseInt(this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[553]]);this[_0x1bfe[975]]&& (!isNaN(_0x47f2x4)&& !isNaN(_0x47f2x5)&& 0<= _0x47f2x4&& 0<= _0x47f2x5&& 0< _0x47f2x2- _0x47f2x5- _0x47f2x4)&& (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x2- _0x47f2x5- _0x47f2x4+ _0x1bfe[168]);this[_0x1bfe[976]]&& (!isNaN(_0x47f2x9)&& !isNaN(_0x47f2xa)&& 0<= _0x47f2x9&& 0<= _0x47f2xa&& 0< _0x47f2x3- _0x47f2x9- _0x47f2xa)&& (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x3- _0x47f2x9- _0x47f2xa+ _0x1bfe[168])};mxDivResizer[_0x1bfe[202]][_0x1bfe[978]]= function(){return document[_0x1bfe[112]][_0x1bfe[159]]};mxDivResizer[_0x1bfe[202]][_0x1bfe[979]]= function(){return document[_0x1bfe[112]][_0x1bfe[157]]};function mxDragSource(_0x47f2x2,_0x47f2x3){this[_0x1bfe[980]]= _0x47f2x2;this[_0x1bfe[981]]= _0x47f2x3;mxEvent[_0x1bfe[759]](_0x47f2x2,mxUtils[_0x1bfe[885]](this,this[_0x1bfe[787]]))}mxDragSource[_0x1bfe[202]][_0x1bfe[980]]= null;mxDragSource[_0x1bfe[202]][_0x1bfe[981]]= null;mxDragSource[_0x1bfe[202]][_0x1bfe[559]]= null;mxDragSource[_0x1bfe[202]][_0x1bfe[982]]= null;mxDragSource[_0x1bfe[202]][_0x1bfe[983]]= null;mxDragSource[_0x1bfe[202]][_0x1bfe[984]]= !0;mxDragSource[_0x1bfe[202]][_0x1bfe[985]]= null;mxDragSource[_0x1bfe[202]][_0x1bfe[986]]= null;mxDragSource[_0x1bfe[202]][_0x1bfe[987]]= null;mxDragSource[_0x1bfe[202]][_0x1bfe[988]]= null;mxDragSource[_0x1bfe[202]][_0x1bfe[989]]= null;mxDragSource[_0x1bfe[202]][_0x1bfe[561]]= !0;mxDragSource[_0x1bfe[202]][_0x1bfe[990]]= !0;mxDragSource[_0x1bfe[202]][_0x1bfe[991]]= !0;mxDragSource[_0x1bfe[202]][_0x1bfe[563]]= !0;mxDragSource[_0x1bfe[202]][_0x1bfe[992]]= 100;mxDragSource[_0x1bfe[202]][_0x1bfe[993]]= 70;mxDragSource[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxDragSource[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxDragSource[_0x1bfe[202]][_0x1bfe[996]]= function(){return this[_0x1bfe[990]]};mxDragSource[_0x1bfe[202]][_0x1bfe[562]]= function(_0x47f2x2){this[_0x1bfe[990]]= _0x47f2x2};mxDragSource[_0x1bfe[202]][_0x1bfe[997]]= function(){return this[_0x1bfe[991]]};mxDragSource[_0x1bfe[202]][_0x1bfe[998]]= function(_0x47f2x2){this[_0x1bfe[991]]= _0x47f2x2};mxDragSource[_0x1bfe[202]][_0x1bfe[565]]= function(_0x47f2x2){return null};mxDragSource[_0x1bfe[202]][_0x1bfe[564]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return _0x47f2x2[_0x1bfe[999]](_0x47f2x3,_0x47f2x4)};mxDragSource[_0x1bfe[202]][_0x1bfe[566]]= function(_0x47f2x2){return this[_0x1bfe[980]][_0x1bfe[511]](!0)};mxDragSource[_0x1bfe[202]][_0x1bfe[567]]= function(_0x47f2x2){return null};mxDragSource[_0x1bfe[202]][_0x1bfe[787]]= function(_0x47f2x2){this[_0x1bfe[984]]&& (!mxEvent[_0x1bfe[721]](_0x47f2x2)&& null== this[_0x1bfe[1000]])&& (this[_0x1bfe[1001]](_0x47f2x2),this[_0x1bfe[1000]]= mxUtils[_0x1bfe[885]](this,this[_0x1bfe[788]]),this[_0x1bfe[1002]]= mxUtils[_0x1bfe[885]](this,this[_0x1bfe[789]]),mxEvent[_0x1bfe[759]](document,null,this[_0x1bfe[1000]],this[_0x1bfe[1002]]),mxEvent[_0x1bfe[722]](_0x47f2x2,!0,!1))};mxDragSource[_0x1bfe[202]][_0x1bfe[1001]]= function(_0x47f2x2){this[_0x1bfe[982]]= this[_0x1bfe[566]](_0x47f2x2);this[_0x1bfe[982]][_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];this[_0x1bfe[982]][_0x1bfe[124]][_0x1bfe[931]]= this[_0x1bfe[992]];mxUtils[_0x1bfe[254]](this[_0x1bfe[982]],this[_0x1bfe[993]])};mxDragSource[_0x1bfe[202]][_0x1bfe[1003]]= function(_0x47f2x2){null!= this[_0x1bfe[982]]&& (null!= this[_0x1bfe[982]][_0x1bfe[265]]&& this[_0x1bfe[982]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[982]]),this[_0x1bfe[982]]= null)};mxDragSource[_0x1bfe[202]][_0x1bfe[1004]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=mxEvent[_0x1bfe[731]](_0x47f2x3),_0x47f2x5=mxEvent[_0x1bfe[733]](_0x47f2x3),_0x47f2x9=mxUtils[_0x1bfe[445]](_0x47f2x2[_0x1bfe[526]]),_0x47f2xa=mxUtils[_0x1bfe[444]]();return _0x47f2x4>= _0x47f2x9[_0x1bfe[235]]- _0x47f2xa[_0x1bfe[235]]&& _0x47f2x5>= _0x47f2x9[_0x1bfe[236]]- _0x47f2xa[_0x1bfe[236]]&& _0x47f2x4<= _0x47f2x9[_0x1bfe[235]]- _0x47f2xa[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[526]][_0x1bfe[359]]&& _0x47f2x5<= _0x47f2x9[_0x1bfe[236]]- _0x47f2xa[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[526]][_0x1bfe[167]]};mxDragSource[_0x1bfe[202]][_0x1bfe[788]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[565]](_0x47f2x2);null!= _0x47f2x3&& !this[_0x1bfe[1004]](_0x47f2x3,_0x47f2x2)&& (_0x47f2x3= null);_0x47f2x3!= this[_0x1bfe[985]]&& (null!= this[_0x1bfe[985]]&& this[_0x1bfe[1005]](this[_0x1bfe[985]]),this[_0x1bfe[985]]= _0x47f2x3,null!= this[_0x1bfe[985]]&& this[_0x1bfe[1006]](this[_0x1bfe[985]]));null!= this[_0x1bfe[985]]&& this[_0x1bfe[1007]](this[_0x1bfe[985]],_0x47f2x2);if(null!= this[_0x1bfe[982]]&& (null== this[_0x1bfe[983]]|| _0x1bfe[189]!= this[_0x1bfe[983]][_0x1bfe[124]][_0x1bfe[187]])){var _0x47f2x3=mxEvent[_0x1bfe[731]](_0x47f2x2),_0x47f2x4=mxEvent[_0x1bfe[733]](_0x47f2x2);null== this[_0x1bfe[982]][_0x1bfe[265]]&& document[_0x1bfe[112]][_0x1bfe[62]](this[_0x1bfe[982]]);this[_0x1bfe[982]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[189];null!= this[_0x1bfe[559]]&& (_0x47f2x3+= this[_0x1bfe[559]][_0x1bfe[235]],_0x47f2x4+= this[_0x1bfe[559]][_0x1bfe[236]]);_0x47f2x3+= document[_0x1bfe[112]][_0x1bfe[360]]|| document[_0x1bfe[158]][_0x1bfe[360]];_0x47f2x4+= document[_0x1bfe[112]][_0x1bfe[190]]|| document[_0x1bfe[158]][_0x1bfe[190]];this[_0x1bfe[982]][_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x3+ _0x1bfe[168];this[_0x1bfe[982]][_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x4+ _0x1bfe[168]}else {null!= this[_0x1bfe[982]]&& (this[_0x1bfe[982]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188])};mxEvent[_0x1bfe[722]](_0x47f2x2)};mxDragSource[_0x1bfe[202]][_0x1bfe[789]]= function(_0x47f2x2){if(null!= this[_0x1bfe[985]]){if(null!= this[_0x1bfe[987]]&& (null== this[_0x1bfe[983]]|| _0x1bfe[188]!= this[_0x1bfe[983]][_0x1bfe[124]][_0x1bfe[187]])){var _0x47f2x3=this[_0x1bfe[985]][_0x1bfe[441]][_0x1bfe[255]],_0x47f2x4=this[_0x1bfe[985]][_0x1bfe[441]][_0x1bfe[513]];this[_0x1bfe[1008]](this[_0x1bfe[985]],_0x47f2x2,this[_0x1bfe[986]],this[_0x1bfe[987]][_0x1bfe[235]]/ _0x47f2x3- _0x47f2x4[_0x1bfe[235]],this[_0x1bfe[987]][_0x1bfe[236]]/ _0x47f2x3- _0x47f2x4[_0x1bfe[236]])};this[_0x1bfe[1005]](this[_0x1bfe[985]])};this[_0x1bfe[1003]](_0x47f2x2);mxEvent[_0x1bfe[938]](document,null,this[_0x1bfe[1000]],this[_0x1bfe[1002]]);this[_0x1bfe[985]]= this[_0x1bfe[1002]]= this[_0x1bfe[1000]]= null;mxEvent[_0x1bfe[722]](_0x47f2x2)};mxDragSource[_0x1bfe[202]][_0x1bfe[1006]]= function(_0x47f2x2){_0x47f2x2[_0x1bfe[1009]]= !0;this[_0x1bfe[983]]= this[_0x1bfe[567]](_0x47f2x2);this[_0x1bfe[996]]()&& null!= this[_0x1bfe[983]]&& (this[_0x1bfe[988]]= new mxGuide(_0x47f2x2,_0x47f2x2[_0x1bfe[1011]][_0x1bfe[1010]]()));this[_0x1bfe[563]]&& (this[_0x1bfe[989]]= new mxCellHighlight(_0x47f2x2,mxConstants.DROP_TARGET_COLOR))};mxDragSource[_0x1bfe[202]][_0x1bfe[1005]]= function(_0x47f2x2){this[_0x1bfe[987]]= this[_0x1bfe[986]]= null;_0x47f2x2[_0x1bfe[1009]]= !1;null!= this[_0x1bfe[983]]&& (null!= this[_0x1bfe[983]][_0x1bfe[265]]&& this[_0x1bfe[983]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[983]]),this[_0x1bfe[983]]= null);null!= this[_0x1bfe[988]]&& (this[_0x1bfe[988]][_0x1bfe[515]](),this[_0x1bfe[988]]= null);null!= this[_0x1bfe[989]]&& (this[_0x1bfe[989]][_0x1bfe[515]](),this[_0x1bfe[989]]= null)};mxDragSource[_0x1bfe[202]][_0x1bfe[1007]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=mxUtils[_0x1bfe[445]](_0x47f2x2[_0x1bfe[526]]),_0x47f2x5=mxUtils[_0x1bfe[444]](_0x47f2x2[_0x1bfe[526]]),_0x47f2x9=mxEvent[_0x1bfe[731]](_0x47f2x3)- _0x47f2x4[_0x1bfe[235]]+ _0x47f2x5[_0x1bfe[235]],_0x47f2x4=mxEvent[_0x1bfe[733]](_0x47f2x3)- _0x47f2x4[_0x1bfe[236]]+ _0x47f2x5[_0x1bfe[236]];_0x47f2x2[_0x1bfe[1012]]&& (null== this[_0x1bfe[561]]|| this[_0x1bfe[561]])&& _0x47f2x2[_0x1bfe[1014]](_0x47f2x9,_0x47f2x4,_0x47f2x2[_0x1bfe[1013]]);null!= this[_0x1bfe[989]]&& _0x47f2x2[_0x1bfe[1015]]()&& (this[_0x1bfe[986]]= this[_0x1bfe[564]](_0x47f2x2,_0x47f2x9,_0x47f2x4),_0x47f2x5= _0x47f2x2[_0x1bfe[249]]()[_0x1bfe[248]](this[_0x1bfe[986]]),this[_0x1bfe[989]][_0x1bfe[1016]](_0x47f2x5));if(null!= this[_0x1bfe[983]]){null== this[_0x1bfe[983]][_0x1bfe[265]]&& (_0x47f2x2[_0x1bfe[526]][_0x1bfe[62]](this[_0x1bfe[983]]),this[_0x1bfe[983]][_0x1bfe[124]][_0x1bfe[931]]= _0x1bfe[1017],this[_0x1bfe[983]][_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492]);var _0x47f2x5=this[_0x1bfe[997]]()&& _0x47f2x2[_0x1bfe[1018]](_0x47f2x3),_0x47f2xa=!0;if(null!= this[_0x1bfe[988]]&& this[_0x1bfe[988]][_0x1bfe[1019]](_0x47f2x3)){var _0x47f2xa=parseInt(this[_0x1bfe[983]][_0x1bfe[124]][_0x1bfe[117]]),_0x47f2x12=parseInt(this[_0x1bfe[983]][_0x1bfe[124]][_0x1bfe[119]]),_0x47f2xa= new mxRectangle(0,0,_0x47f2xa,_0x47f2x12),_0x47f2x4= new mxPoint(_0x47f2x9,_0x47f2x4),_0x47f2x4=this[_0x1bfe[988]][_0x1bfe[582]](_0x47f2xa,_0x47f2x4,_0x47f2x5),_0x47f2xa=!1,_0x47f2x9=_0x47f2x4[_0x1bfe[235]],_0x47f2x4=_0x47f2x4[_0x1bfe[236]]}else {if(_0x47f2x5){var _0x47f2x5=_0x47f2x2[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x12=_0x47f2x2[_0x1bfe[441]][_0x1bfe[513]],_0x47f2x13=_0x47f2x2[_0x1bfe[1020]]/ 2,_0x47f2x9=(_0x47f2x2[_0x1bfe[1021]](_0x47f2x9/ _0x47f2x5- _0x47f2x12[_0x1bfe[235]]- _0x47f2x13)+ _0x47f2x12[_0x1bfe[235]])* _0x47f2x5,_0x47f2x4=(_0x47f2x2[_0x1bfe[1021]](_0x47f2x4/ _0x47f2x5- _0x47f2x12[_0x1bfe[236]]- _0x47f2x13)+ _0x47f2x12[_0x1bfe[236]])* _0x47f2x5}};null!= this[_0x1bfe[988]]&& _0x47f2xa&& this[_0x1bfe[988]][_0x1bfe[801]]();null!= this[_0x1bfe[1022]]&& (_0x47f2x9+= this[_0x1bfe[1022]][_0x1bfe[235]],_0x47f2x4+= this[_0x1bfe[1022]][_0x1bfe[236]]);this[_0x1bfe[983]][_0x1bfe[124]][_0x1bfe[361]]= Math[_0x1bfe[488]](_0x47f2x9)+ _0x1bfe[168];this[_0x1bfe[983]][_0x1bfe[124]][_0x1bfe[125]]= Math[_0x1bfe[488]](_0x47f2x4)+ _0x1bfe[168];this[_0x1bfe[983]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[189]};this[_0x1bfe[987]]= new mxPoint(_0x47f2x9,_0x47f2x4)};mxDragSource[_0x1bfe[202]][_0x1bfe[1008]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){this[_0x1bfe[981]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9);_0x47f2x2[_0x1bfe[526]][_0x1bfe[393]]()};function mxToolbar(_0x47f2x2){this[_0x1bfe[526]]= _0x47f2x2}mxToolbar[_0x1bfe[202]]= new mxEventSource;mxToolbar[_0x1bfe[202]][_0x1bfe[196]]= mxToolbar;mxToolbar[_0x1bfe[202]][_0x1bfe[526]]= null;mxToolbar[_0x1bfe[202]][_0x1bfe[984]]= !0;mxToolbar[_0x1bfe[202]][_0x1bfe[1023]]= !1;mxToolbar[_0x1bfe[202]][_0x1bfe[1024]]= !0;mxToolbar[_0x1bfe[202]][_0x1bfe[1025]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){var _0x47f2x12=document[_0x1bfe[55]](null!= _0x47f2x3?_0x1bfe[466]:_0x1bfe[172]),_0x47f2x13=_0x47f2x9|| (null!= _0x47f2xa?_0x1bfe[1026]:_0x1bfe[1027]);_0x47f2x12[_0x1bfe[926]]= _0x47f2x13;_0x47f2x12[_0x1bfe[57]](_0x1bfe[390],_0x47f2x3);null!= _0x47f2x2&& (null!= _0x47f2x3?_0x47f2x12[_0x1bfe[57]](_0x1bfe[924],_0x47f2x2):mxUtils[_0x1bfe[53]](_0x47f2x12,_0x47f2x2));this[_0x1bfe[526]][_0x1bfe[62]](_0x47f2x12);null!= _0x47f2x4&& (mxEvent[_0x1bfe[169]](_0x47f2x12,_0x1bfe[173],_0x47f2x4),mxClient[_0x1bfe[754]]&& mxEvent[_0x1bfe[169]](_0x47f2x12,_0x1bfe[757],_0x47f2x4));_0x47f2x2= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){null!= _0x47f2x5?_0x47f2x12[_0x1bfe[57]](_0x1bfe[390],_0x47f2x3):_0x47f2x12[_0x1bfe[124]][_0x1bfe[1028]]= _0x1bfe[110]});mxEvent[_0x1bfe[759]](_0x47f2x12,mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){null!= _0x47f2x5?_0x47f2x12[_0x1bfe[57]](_0x1bfe[390],_0x47f2x5):_0x47f2x12[_0x1bfe[124]][_0x1bfe[1028]]= _0x1bfe[579];if(null!= _0x47f2xa){null== this[_0x1bfe[1029]]&& (this[_0x1bfe[1029]]= new mxPopupMenu,this[_0x1bfe[1029]][_0x1bfe[176]]());var _0x47f2x3=this[_0x1bfe[1030]];this[_0x1bfe[1029]][_0x1bfe[1031]]()&& this[_0x1bfe[1029]][_0x1bfe[1032]]();_0x47f2x3!= _0x47f2x12&& (this[_0x1bfe[1030]]= _0x47f2x12,this[_0x1bfe[1029]][_0x1bfe[1033]]= _0x47f2xa,_0x47f2x3= new mxPoint(_0x47f2x12[_0x1bfe[358]],_0x47f2x12[_0x1bfe[362]]+ _0x47f2x12[_0x1bfe[167]]),this[_0x1bfe[1029]][_0x1bfe[152]](_0x47f2x3[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]],null,_0x47f2x2),this[_0x1bfe[1029]][_0x1bfe[1031]]()&& (_0x47f2x12[_0x1bfe[926]]= _0x47f2x13+ _0x1bfe[1034],this[_0x1bfe[1029]][_0x1bfe[1032]]= function(){mxPopupMenu[_0x1bfe[202]][_0x1bfe[1032]][_0x1bfe[183]](this);_0x47f2x12[_0x1bfe[926]]= _0x47f2x13;this[_0x1bfe[1030]]= null}))}}),null,_0x47f2x2);mxEvent[_0x1bfe[169]](_0x47f2x12,_0x1bfe[1035],_0x47f2x2);return _0x47f2x12};mxToolbar[_0x1bfe[202]][_0x1bfe[970]]= function(_0x47f2x2){var _0x47f2x3=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x3[_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[497];_0x47f2x3[_0x1bfe[926]]= _0x1bfe[1036];var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[804]);_0x47f2x4[_0x1bfe[926]]= _0x47f2x2|| _0x1bfe[1037];_0x47f2x3[_0x1bfe[62]](_0x47f2x4);this[_0x1bfe[526]][_0x1bfe[62]](_0x47f2x3);return _0x47f2x4};mxToolbar[_0x1bfe[202]][_0x1bfe[1038]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[804]);_0x47f2x4[_0x1bfe[926]]= _0x47f2x3|| _0x1bfe[1037];this[_0x1bfe[972]](_0x47f2x4,_0x47f2x2,null);mxEvent[_0x1bfe[169]](_0x47f2x4,_0x1bfe[826],function(_0x47f2x2){var _0x47f2x3=_0x47f2x4[_0x1bfe[1040]][_0x47f2x4[_0x1bfe[1039]]];_0x47f2x4[_0x1bfe[1039]]= 0;null!= _0x47f2x3[_0x1bfe[1041]]&& _0x47f2x3[_0x1bfe[1041]](_0x47f2x2)});this[_0x1bfe[526]][_0x1bfe[62]](_0x47f2x4);return _0x47f2x4};mxToolbar[_0x1bfe[202]][_0x1bfe[972]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=document[_0x1bfe[55]](_0x1bfe[973]);mxUtils[_0x1bfe[171]](_0x47f2x5,_0x47f2x3);_0x1bfe[279]== typeof _0x47f2x4?_0x47f2x5[_0x1bfe[1041]]= _0x47f2x4:_0x47f2x5[_0x1bfe[57]](_0x1bfe[131],_0x47f2x4);_0x47f2x2[_0x1bfe[62]](_0x47f2x5);return _0x47f2x5};mxToolbar[_0x1bfe[202]][_0x1bfe[1042]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=document[_0x1bfe[55]](_0x1bfe[466]);_0x47f2xa[_0x1bfe[1043]]= _0x47f2x9|| _0x1bfe[1026];_0x47f2xa[_0x1bfe[926]]= _0x47f2xa[_0x1bfe[1043]];_0x47f2xa[_0x1bfe[57]](_0x1bfe[390],_0x47f2x3);_0x47f2xa[_0x1bfe[1044]]= _0x47f2x5;null!= _0x47f2x2&& _0x47f2xa[_0x1bfe[57]](_0x1bfe[924],_0x47f2x2);mxEvent[_0x1bfe[169]](_0x47f2xa,_0x1bfe[173],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[1045]][_0x1bfe[1044]];null!= _0x47f2x2?(this[_0x1bfe[1045]][_0x1bfe[1044]]= this[_0x1bfe[1045]][_0x1bfe[284]](_0x1bfe[390]),this[_0x1bfe[1045]][_0x1bfe[57]](_0x1bfe[390],_0x47f2x2)):this[_0x1bfe[1045]][_0x1bfe[926]]= this[_0x1bfe[1045]][_0x1bfe[1043]];this[_0x1bfe[1024]]&& (this[_0x1bfe[1046]]= _0x47f2xa);this[_0x1bfe[1045]]= _0x47f2xa;_0x47f2x2= _0x47f2xa[_0x1bfe[1044]];null!= _0x47f2x2?(_0x47f2xa[_0x1bfe[1044]]= _0x47f2xa[_0x1bfe[284]](_0x1bfe[390]),_0x47f2xa[_0x1bfe[57]](_0x1bfe[390],_0x47f2x2)):_0x47f2xa[_0x1bfe[926]]= _0x47f2xa[_0x1bfe[1043]]+ _0x1bfe[1034];this[_0x1bfe[746]]( new mxEventObject(mxEvent.SELECT));_0x47f2x4()}));this[_0x1bfe[526]][_0x1bfe[62]](_0x47f2xa);null== this[_0x1bfe[1046]]&& (this[_0x1bfe[1046]]= _0x47f2xa,this[_0x1bfe[1047]](_0x47f2xa),_0x47f2x4());return _0x47f2xa};mxToolbar[_0x1bfe[202]][_0x1bfe[1048]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2xa= null!= _0x47f2xa?_0x47f2xa:!0;var _0x47f2x12=document[_0x1bfe[55]](null!= _0x47f2x3?_0x1bfe[466]:_0x1bfe[172]);_0x47f2x12[_0x1bfe[1043]]= _0x47f2x9|| _0x1bfe[1026];_0x47f2x12[_0x1bfe[926]]= _0x47f2x12[_0x1bfe[1043]];_0x47f2x12[_0x1bfe[57]](_0x1bfe[390],_0x47f2x3);_0x47f2x12[_0x1bfe[1044]]= _0x47f2x5;null!= _0x47f2x2&& _0x47f2x12[_0x1bfe[57]](_0x1bfe[924],_0x47f2x2);this[_0x1bfe[984]]&& _0x47f2xa&& (mxEvent[_0x1bfe[169]](_0x47f2x12,_0x1bfe[173],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[1047]](_0x47f2x12,_0x47f2x4);this[_0x1bfe[1023]]= !1})),mxEvent[_0x1bfe[169]](_0x47f2x12,_0x1bfe[760],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[1047]](_0x47f2x12,_0x47f2x4);this[_0x1bfe[1023]]= !0})),null== this[_0x1bfe[1046]]&& (this[_0x1bfe[1046]]= _0x47f2x12,this[_0x1bfe[1049]]= _0x47f2x4,this[_0x1bfe[1047]](_0x47f2x12,_0x47f2x4)));this[_0x1bfe[526]][_0x1bfe[62]](_0x47f2x12);return _0x47f2x12};mxToolbar[_0x1bfe[202]][_0x1bfe[1047]]= function(_0x47f2x2,_0x47f2x3){if(this[_0x1bfe[1045]]!= _0x47f2x2){if(null!= this[_0x1bfe[1045]]){var _0x47f2x4=this[_0x1bfe[1045]][_0x1bfe[1044]];null!= _0x47f2x4?(this[_0x1bfe[1045]][_0x1bfe[1044]]= this[_0x1bfe[1045]][_0x1bfe[284]](_0x1bfe[390]),this[_0x1bfe[1045]][_0x1bfe[57]](_0x1bfe[390],_0x47f2x4)):this[_0x1bfe[1045]][_0x1bfe[926]]= this[_0x1bfe[1045]][_0x1bfe[1043]]};this[_0x1bfe[1045]]= _0x47f2x2;_0x47f2x4= this[_0x1bfe[1045]][_0x1bfe[1044]];null!= _0x47f2x4?(this[_0x1bfe[1045]][_0x1bfe[1044]]= this[_0x1bfe[1045]][_0x1bfe[284]](_0x1bfe[390]),this[_0x1bfe[1045]][_0x1bfe[57]](_0x1bfe[390],_0x47f2x4)):this[_0x1bfe[1045]][_0x1bfe[926]]= this[_0x1bfe[1045]][_0x1bfe[1043]]+ _0x1bfe[1034];this[_0x1bfe[746]]( new mxEventObject(mxEvent.SELECT,_0x1bfe[279],_0x47f2x3))}};mxToolbar[_0x1bfe[202]][_0x1bfe[1050]]= function(_0x47f2x2){(_0x47f2x2|| !this[_0x1bfe[1023]])&& this[_0x1bfe[1045]]!= this[_0x1bfe[1046]]&& this[_0x1bfe[1047]](this[_0x1bfe[1046]],this[_0x1bfe[1049]])};mxToolbar[_0x1bfe[202]][_0x1bfe[1051]]= function(_0x47f2x2){return this[_0x1bfe[1025]](null,_0x47f2x2,null)};mxToolbar[_0x1bfe[202]][_0x1bfe[1052]]= function(){mxUtils[_0x1bfe[345]](this[_0x1bfe[526]])};mxToolbar[_0x1bfe[202]][_0x1bfe[1053]]= function(){var _0x47f2x2=document[_0x1bfe[55]](_0x1bfe[1054]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[941]]= _0x1bfe[1055];_0x47f2x2[_0x1bfe[57]](_0x1bfe[803],_0x1bfe[500]);this[_0x1bfe[526]][_0x1bfe[62]](_0x47f2x2)};mxToolbar[_0x1bfe[202]][_0x1bfe[515]]= function(){mxEvent[_0x1bfe[762]](this[_0x1bfe[526]]);this[_0x1bfe[1045]]= this[_0x1bfe[1049]]= this[_0x1bfe[1046]]= this[_0x1bfe[526]]= null;null!= this[_0x1bfe[1029]]&& this[_0x1bfe[1029]][_0x1bfe[515]]()};function mxSession(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[251]]= _0x47f2x2;this[_0x1bfe[1056]]= _0x47f2x3;this[_0x1bfe[1057]]= _0x47f2x4;this[_0x1bfe[1058]]= _0x47f2x5;null!= _0x47f2x2&& (this[_0x1bfe[1059]]= new mxCodec,this[_0x1bfe[1059]][_0x1bfe[1060]]= function(_0x47f2x3){return _0x47f2x2[_0x1bfe[736]](_0x47f2x3)});_0x47f2x2[_0x1bfe[169]](mxEvent.NOTIFY,mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x3[_0x1bfe[720]](_0x1bfe[1061]);(null!= _0x47f2x4&& this[_0x1bfe[143]]|| this[_0x1bfe[1062]]&& !this[_0x1bfe[1063]])&& this[_0x1bfe[827]](_0x1bfe[1064]+ this[_0x1bfe[1067]](_0x47f2x4[_0x1bfe[1065]],_0x47f2x4[_0x1bfe[1066]])+ _0x1bfe[1068])}))}mxSession[_0x1bfe[202]]= new mxEventSource;mxSession[_0x1bfe[202]][_0x1bfe[196]]= mxSession;mxSession[_0x1bfe[202]][_0x1bfe[251]]= null;mxSession[_0x1bfe[202]][_0x1bfe[1056]]= null;mxSession[_0x1bfe[202]][_0x1bfe[1057]]= null;mxSession[_0x1bfe[202]][_0x1bfe[1058]]= null;mxSession[_0x1bfe[202]][_0x1bfe[1059]]= null;mxSession[_0x1bfe[202]][_0x1bfe[1069]]= _0x1bfe[336];mxSession[_0x1bfe[202]][_0x1bfe[1070]]= !0;mxSession[_0x1bfe[202]][_0x1bfe[1071]]= !0;mxSession[_0x1bfe[202]][_0x1bfe[1072]]= 0;mxSession[_0x1bfe[202]][_0x1bfe[1073]]= 0;mxSession[_0x1bfe[202]][_0x1bfe[143]]= !1;mxSession[_0x1bfe[202]][_0x1bfe[1062]]= !1;mxSession[_0x1bfe[202]][_0x1bfe[1063]]= !1;mxSession[_0x1bfe[202]][_0x1bfe[1074]]= !1;mxSession[_0x1bfe[202]][_0x1bfe[861]]= function(){this[_0x1bfe[143]]?(this[_0x1bfe[1062]]= !0,this[_0x1bfe[746]]( new mxEventObject(mxEvent.CONNECT))):this[_0x1bfe[1062]]|| this[_0x1bfe[203]](this[_0x1bfe[1056]],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[1062]]= !0;this[_0x1bfe[746]]( new mxEventObject(mxEvent.CONNECT));this[_0x1bfe[1075]]()}))};mxSession[_0x1bfe[202]][_0x1bfe[809]]= function(){this[_0x1bfe[1062]]&& !this[_0x1bfe[1063]]&& (this[_0x1bfe[1063]]= !0,this[_0x1bfe[746]]( new mxEventObject(mxEvent.SUSPEND)))};mxSession[_0x1bfe[202]][_0x1bfe[810]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[1062]]&& this[_0x1bfe[1063]]&& (this[_0x1bfe[1063]]= !1,this[_0x1bfe[746]]( new mxEventObject(mxEvent.RESUME)),this[_0x1bfe[1074]]|| this[_0x1bfe[1075]]())};mxSession[_0x1bfe[202]][_0x1bfe[1076]]= function(_0x47f2x2){this[_0x1bfe[1062]]&& (this[_0x1bfe[1062]]= !1);this[_0x1bfe[746]]( new mxEventObject(mxEvent.DISCONNECT,_0x1bfe[1077],_0x47f2x2))};mxSession[_0x1bfe[202]][_0x1bfe[1075]]= function(){this[_0x1bfe[1062]]&& !this[_0x1bfe[1063]]&& null!= this[_0x1bfe[1057]]?(this[_0x1bfe[1074]]= !0,this[_0x1bfe[203]](this[_0x1bfe[1057]],mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[1075]]()}))):this[_0x1bfe[1074]]= !1};mxSession[_0x1bfe[202]][_0x1bfe[827]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]&& (null!= this[_0x1bfe[1058]]&& (this[_0x1bfe[143]]?(mxLog[_0x1bfe[539]](),mxLog[_0x1bfe[143]](_0x1bfe[1078]+ this[_0x1bfe[1058]]+ _0x1bfe[1079]+ _0x47f2x2)):(_0x47f2x2= _0x1bfe[1080]+ _0x47f2x2+ _0x1bfe[1081],this[_0x1bfe[1070]]&& (_0x47f2x2= encodeURIComponent(_0x47f2x2)),mxUtils[_0x1bfe[814]](this[_0x1bfe[1058]],_0x1bfe[1082]+ _0x47f2x2,_0x47f2x3,_0x47f2x4))),this[_0x1bfe[1072]]+= _0x47f2x2[_0x1bfe[67]],this[_0x1bfe[746]]( new mxEventObject(mxEvent.NOTIFY,_0x1bfe[863],this[_0x1bfe[1058]],_0x1bfe[338],_0x47f2x2)))};mxSession[_0x1bfe[202]][_0x1bfe[203]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(_0x1bfe[82]!= typeof mxUtils){var _0x47f2x5=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){null!= _0x47f2x4?_0x47f2x4(_0x47f2x2):this[_0x1bfe[1076]](_0x47f2x2)});mxUtils[_0x1bfe[203]](_0x47f2x2,mxUtils[_0x1bfe[885]](this,function(_0x47f2x4){if(_0x1bfe[82]!= typeof mxUtils){if(_0x47f2x4[_0x1bfe[220]]()&& 404!= _0x47f2x4[_0x1bfe[878]]()){if(this[_0x1bfe[1073]]+= _0x47f2x4[_0x1bfe[221]]()[_0x1bfe[67]],this[_0x1bfe[746]]( new mxEventObject(mxEvent.GET,_0x1bfe[863],_0x47f2x2,_0x1bfe[870],_0x47f2x4)),this[_0x1bfe[1083]](_0x47f2x4)){if(0< _0x47f2x4[_0x1bfe[221]]()[_0x1bfe[67]]){var _0x47f2xa=_0x47f2x4[_0x1bfe[874]]();null== _0x47f2xa?_0x47f2x5(_0x1bfe[1084]+ _0x47f2x4[_0x1bfe[221]]()):this[_0x1bfe[806]](_0x47f2xa)};null!= _0x47f2x3&& _0x47f2x3(_0x47f2x4)}}else {_0x47f2x5(_0x1bfe[1085])}}}),function(_0x47f2x2){_0x47f2x5(_0x1bfe[1086])})}};mxSession[_0x1bfe[202]][_0x1bfe[1083]]= function(_0x47f2x2){return 0> _0x47f2x2[_0x1bfe[221]]()[_0x1bfe[2]](_0x1bfe[1087])};mxSession[_0x1bfe[202]][_0x1bfe[1067]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=_0x1bfe[110],_0x47f2x5=_0x47f2x3?-1:1,_0x47f2x9=_0x47f2x3?_0x47f2x2[_0x1bfe[67]]- 1:0;0<= _0x47f2x9&& _0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9+= _0x47f2x5){var _0x47f2xa=this[_0x1bfe[1059]][_0x1bfe[514]](_0x47f2x2[_0x47f2x9]),_0x47f2x4=_0x47f2x4+ mxUtils[_0x1bfe[875]](_0x47f2xa,this[_0x1bfe[1069]])};return _0x47f2x4};mxSession[_0x1bfe[202]][_0x1bfe[806]]= function(_0x47f2x2){if(null!= _0x47f2x2&& _0x47f2x2[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]){var _0x47f2x3=_0x47f2x2[_0x1bfe[284]](_0x1bfe[1088]);null!= _0x47f2x3&& (this[_0x1bfe[251]][_0x1bfe[1089]]= _0x47f2x3+ _0x1bfe[213]);for(_0x47f2x3= _0x47f2x2[_0x1bfe[285]];null!= _0x47f2x3;){var _0x47f2x4=_0x47f2x3[_0x1bfe[301]][_0x1bfe[216]]();_0x1bfe[724]== _0x47f2x4?this[_0x1bfe[1090]](_0x47f2x3):_0x1bfe[1091]== _0x47f2x4&& this[_0x1bfe[1092]](_0x47f2x3);_0x47f2x3= _0x47f2x3[_0x1bfe[287]]};this[_0x1bfe[746]]( new mxEventObject(mxEvent.RECEIVE,_0x1bfe[252],_0x47f2x2))}};mxSession[_0x1bfe[202]][_0x1bfe[1090]]= function(_0x47f2x2){( new mxCodec(_0x47f2x2[_0x1bfe[295]]))[_0x1bfe[1093]](_0x47f2x2[_0x1bfe[285]],this[_0x1bfe[251]])};mxSession[_0x1bfe[202]][_0x1bfe[1092]]= function(_0x47f2x2){for(_0x47f2x2= _0x47f2x2[_0x1bfe[285]];null!= _0x47f2x2;){_0x1bfe[1061]== _0x47f2x2[_0x1bfe[301]]&& this[_0x1bfe[1094]](_0x47f2x2),_0x47f2x2= _0x47f2x2[_0x1bfe[287]]}};mxSession[_0x1bfe[202]][_0x1bfe[1094]]= function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[1095]](_0x47f2x2);if(0< _0x47f2x2[_0x1bfe[67]]){var _0x47f2x3=this[_0x1bfe[1096]](_0x47f2x2);this[_0x1bfe[251]][_0x1bfe[746]]( new mxEventObject(mxEvent.CHANGE,_0x1bfe[1061],_0x47f2x3,_0x1bfe[1065],_0x47f2x2));this[_0x1bfe[251]][_0x1bfe[746]]( new mxEventObject(mxEvent.UNDO,_0x1bfe[1061],_0x47f2x3));this[_0x1bfe[746]]( new mxEventObject(mxEvent.FIRED,_0x1bfe[1061],_0x47f2x3))}};mxSession[_0x1bfe[202]][_0x1bfe[1096]]= function(_0x47f2x2){var _0x47f2x3= new mxUndoableEdit(this[_0x1bfe[251]],this[_0x1bfe[1071]]);_0x47f2x3[_0x1bfe[1065]]= _0x47f2x2;_0x47f2x3[_0x1bfe[827]]= function(){_0x47f2x3[_0x1bfe[1097]][_0x1bfe[746]]( new mxEventObject(mxEvent.CHANGE,_0x1bfe[1061],_0x47f2x3,_0x1bfe[1065],_0x47f2x3[_0x1bfe[1065]]));_0x47f2x3[_0x1bfe[1097]][_0x1bfe[746]]( new mxEventObject(mxEvent.NOTIFY,_0x1bfe[1061],_0x47f2x3,_0x1bfe[1065],_0x47f2x3[_0x1bfe[1065]]))};return _0x47f2x3};mxSession[_0x1bfe[202]][_0x1bfe[1095]]= function(_0x47f2x2){this[_0x1bfe[1059]][_0x1bfe[395]]= _0x47f2x2[_0x1bfe[295]];var _0x47f2x3=[];for(_0x47f2x2= _0x47f2x2[_0x1bfe[285]];null!= _0x47f2x2;){var _0x47f2x4=this[_0x1bfe[1098]](_0x47f2x2);null!= _0x47f2x4&& _0x47f2x3[_0x1bfe[207]](_0x47f2x4);_0x47f2x2= _0x47f2x2[_0x1bfe[287]]};return _0x47f2x3};mxSession[_0x1bfe[202]][_0x1bfe[1098]]= function(_0x47f2x2){var _0x47f2x3=null;_0x47f2x2[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]&& (_0x47f2x3= _0x1bfe[1099]== _0x47f2x2[_0x1bfe[301]]?( new mxCodec(_0x47f2x2[_0x1bfe[295]]))[_0x1bfe[1093]](_0x47f2x2):this[_0x1bfe[1059]][_0x1bfe[1093]](_0x47f2x2),null!= _0x47f2x3&& (_0x47f2x3[_0x1bfe[251]]= this[_0x1bfe[251]],_0x47f2x3[_0x1bfe[350]](),_0x1bfe[1100]== _0x47f2x2[_0x1bfe[301]]&& null== _0x47f2x3[_0x1bfe[1101]]&& this[_0x1bfe[1102]](_0x47f2x3[_0x1bfe[247]])));return _0x47f2x3};mxSession[_0x1bfe[202]][_0x1bfe[1102]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1059]][_0x1bfe[1104]](_0x47f2x2[_0x1bfe[1103]](),_0x47f2x2);for(var _0x47f2x4=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2),_0x47f2x5=0;_0x47f2x5< _0x47f2x4;_0x47f2x5++){this[_0x1bfe[1102]](this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x2,_0x47f2x5))}};function mxUndoableEdit(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1097]]= _0x47f2x2;this[_0x1bfe[1065]]= [];this[_0x1bfe[1105]]= null!= _0x47f2x3?_0x47f2x3:!0}mxUndoableEdit[_0x1bfe[202]][_0x1bfe[1097]]= null;mxUndoableEdit[_0x1bfe[202]][_0x1bfe[1065]]= null;mxUndoableEdit[_0x1bfe[202]][_0x1bfe[1105]]= null;mxUndoableEdit[_0x1bfe[202]][_0x1bfe[1066]]= !1;mxUndoableEdit[_0x1bfe[202]][_0x1bfe[1106]]= !1;mxUndoableEdit[_0x1bfe[202]][_0x1bfe[1107]]= function(){return 0== this[_0x1bfe[1065]][_0x1bfe[67]]};mxUndoableEdit[_0x1bfe[202]][_0x1bfe[1108]]= function(){return this[_0x1bfe[1105]]};mxUndoableEdit[_0x1bfe[202]][_0x1bfe[99]]= function(_0x47f2x2){this[_0x1bfe[1065]][_0x1bfe[207]](_0x47f2x2)};mxUndoableEdit[_0x1bfe[202]][_0x1bfe[827]]= function(){};mxUndoableEdit[_0x1bfe[202]][_0x1bfe[1109]]= function(){};mxUndoableEdit[_0x1bfe[202]][_0x1bfe[824]]= function(){if(!this[_0x1bfe[1066]]){this[_0x1bfe[1097]][_0x1bfe[746]]( new mxEventObject(mxEvent.START_EDIT));for(var _0x47f2x2=this[_0x1bfe[1065]][_0x1bfe[67]]- 1;0<= _0x47f2x2;_0x47f2x2--){var _0x47f2x3=this[_0x1bfe[1065]][_0x47f2x2];null!= _0x47f2x3[_0x1bfe[350]]?_0x47f2x3[_0x1bfe[350]]():null!= _0x47f2x3[_0x1bfe[824]]&& _0x47f2x3[_0x1bfe[824]]();this[_0x1bfe[1097]][_0x1bfe[746]]( new mxEventObject(mxEvent.EXECUTED,_0x1bfe[826],_0x47f2x3))};this[_0x1bfe[1066]]= !0;this[_0x1bfe[1106]]= !1;this[_0x1bfe[1097]][_0x1bfe[746]]( new mxEventObject(mxEvent.END_EDIT))};this[_0x1bfe[827]]()};mxUndoableEdit[_0x1bfe[202]][_0x1bfe[825]]= function(){if(!this[_0x1bfe[1106]]){this[_0x1bfe[1097]][_0x1bfe[746]]( new mxEventObject(mxEvent.START_EDIT));for(var _0x47f2x2=this[_0x1bfe[1065]][_0x1bfe[67]],_0x47f2x3=0;_0x47f2x3< _0x47f2x2;_0x47f2x3++){var _0x47f2x4=this[_0x1bfe[1065]][_0x47f2x3];null!= _0x47f2x4[_0x1bfe[350]]?_0x47f2x4[_0x1bfe[350]]():null!= _0x47f2x4[_0x1bfe[825]]&& _0x47f2x4[_0x1bfe[825]]();this[_0x1bfe[1097]][_0x1bfe[746]]( new mxEventObject(mxEvent.EXECUTED,_0x1bfe[826],_0x47f2x4))};this[_0x1bfe[1066]]= !1;this[_0x1bfe[1106]]= !0;this[_0x1bfe[1097]][_0x1bfe[746]]( new mxEventObject(mxEvent.END_EDIT))};this[_0x1bfe[827]]()};function mxUndoManager(_0x47f2x2){this[_0x1bfe[803]]= null!= _0x47f2x2?_0x47f2x2:100;this[_0x1bfe[200]]()}mxUndoManager[_0x1bfe[202]]= new mxEventSource;mxUndoManager[_0x1bfe[202]][_0x1bfe[196]]= mxUndoManager;mxUndoManager[_0x1bfe[202]][_0x1bfe[803]]= null;mxUndoManager[_0x1bfe[202]][_0x1bfe[1110]]= null;mxUndoManager[_0x1bfe[202]][_0x1bfe[1111]]= 0;mxUndoManager[_0x1bfe[202]][_0x1bfe[1107]]= function(){return 0== this[_0x1bfe[1110]][_0x1bfe[67]]};mxUndoManager[_0x1bfe[202]][_0x1bfe[200]]= function(){this[_0x1bfe[1110]]= [];this[_0x1bfe[1111]]= 0;this[_0x1bfe[746]]( new mxEventObject(mxEvent.CLEAR))};mxUndoManager[_0x1bfe[202]][_0x1bfe[1112]]= function(){return 0< this[_0x1bfe[1111]]};mxUndoManager[_0x1bfe[202]][_0x1bfe[824]]= function(){for(;0< this[_0x1bfe[1111]];){var _0x47f2x2=this[_0x1bfe[1110]][--this[_0x1bfe[1111]]];_0x47f2x2[_0x1bfe[824]]();if(_0x47f2x2[_0x1bfe[1108]]()){this[_0x1bfe[746]]( new mxEventObject(mxEvent.UNDO,_0x1bfe[1061],_0x47f2x2));break}}};mxUndoManager[_0x1bfe[202]][_0x1bfe[1113]]= function(){return this[_0x1bfe[1111]]< this[_0x1bfe[1110]][_0x1bfe[67]]};mxUndoManager[_0x1bfe[202]][_0x1bfe[825]]= function(){for(var _0x47f2x2=this[_0x1bfe[1110]][_0x1bfe[67]];this[_0x1bfe[1111]]< _0x47f2x2;){var _0x47f2x3=this[_0x1bfe[1110]][this[_0x1bfe[1111]]++];_0x47f2x3[_0x1bfe[825]]();if(_0x47f2x3[_0x1bfe[1108]]()){this[_0x1bfe[746]]( new mxEventObject(mxEvent.REDO,_0x1bfe[1061],_0x47f2x3));break}}};mxUndoManager[_0x1bfe[202]][_0x1bfe[1114]]= function(_0x47f2x2){this[_0x1bfe[330]]();0< this[_0x1bfe[803]]&& this[_0x1bfe[803]]== this[_0x1bfe[1110]][_0x1bfe[67]]&& this[_0x1bfe[1110]][_0x1bfe[1115]]();this[_0x1bfe[1110]][_0x1bfe[207]](_0x47f2x2);this[_0x1bfe[1111]]= this[_0x1bfe[1110]][_0x1bfe[67]];this[_0x1bfe[746]]( new mxEventObject(mxEvent.ADD,_0x1bfe[1061],_0x47f2x2))};mxUndoManager[_0x1bfe[202]][_0x1bfe[330]]= function(){if(this[_0x1bfe[1110]][_0x1bfe[67]]> this[_0x1bfe[1111]]){for(var _0x47f2x2=this[_0x1bfe[1110]][_0x1bfe[300]](this[_0x1bfe[1111]],this[_0x1bfe[1110]][_0x1bfe[67]]- this[_0x1bfe[1111]]),_0x47f2x3=0;_0x47f2x3< _0x47f2x2[_0x1bfe[67]];_0x47f2x3++){_0x47f2x2[_0x47f2x3][_0x1bfe[1109]]()}}};var mxUrlConverter=function(_0x47f2x2){var _0x47f2x3=!0,_0x47f2x4=null,_0x47f2x5=null;return {isEnabled:function(){return _0x47f2x3},setEnabled:function(_0x47f2x2){_0x47f2x3= _0x47f2x2},getBaseUrl:function(){return _0x47f2x4},setBaseUrl:function(_0x47f2x2){_0x47f2x4= _0x47f2x2},getBaseDomain:function(){return _0x47f2x4},setBaseDomain:function(_0x47f2x2){_0x47f2x4= _0x47f2x2},isRelativeUrl:function(_0x47f2x2){return _0x1bfe[43]!= _0x47f2x2[_0x1bfe[85]](0,7)&& _0x1bfe[46]!= _0x47f2x2[_0x1bfe[85]](0,8)&& _0x1bfe[1116]!= _0x47f2x2[_0x1bfe[85]](0,10)},convert:function(_0x47f2x2){if(_0x47f2x3&& this[_0x1bfe[1117]](_0x47f2x2)){if(null== _0x47f2x4){_0x47f2x5= location[_0x1bfe[1118]]+ _0x1bfe[1119]+ location[_0x1bfe[1120]];_0x47f2x4= _0x47f2x5+ location[_0x1bfe[1121]];var _0x47f2xa=_0x47f2x4[_0x1bfe[1122]](_0x1bfe[84]);0< _0x47f2xa&& (_0x47f2x4= _0x47f2x4[_0x1bfe[85]](0,_0x47f2xa+ 1))};_0x47f2x2= _0x1bfe[84]== _0x47f2x2[_0x1bfe[225]](0)?_0x47f2x5+ _0x47f2x2:_0x47f2x4+ _0x47f2x2};return _0x47f2x2}}};function mxPanningManager(_0x47f2x2){this[_0x1bfe[1123]]= null;this[_0x1bfe[1124]]= !1;this[_0x1bfe[1125]]= this[_0x1bfe[1126]]= this[_0x1bfe[1127]]= this[_0x1bfe[1128]]= this[_0x1bfe[1129]]= this[_0x1bfe[1130]]= 0;this[_0x1bfe[1131]]= !1;this[_0x1bfe[190]]= this[_0x1bfe[360]]= 0;this[_0x1bfe[1132]]= {mouseDown:function(_0x47f2x2,_0x47f2x3){},mouseMove:function(_0x47f2x2,_0x47f2x3){},mouseUp:mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1124]]&& this[_0x1bfe[1076]]()})};_0x47f2x2[_0x1bfe[1133]](this[_0x1bfe[1132]]);mxEvent[_0x1bfe[169]](document,_0x1bfe[753],mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[1124]]&& this[_0x1bfe[1076]]()}));var _0x47f2x3=mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[1131]]= mxUtils[_0x1bfe[1134]](_0x47f2x2[_0x1bfe[526]]);this[_0x1bfe[360]]= _0x47f2x2[_0x1bfe[526]][_0x1bfe[360]];this[_0x1bfe[190]]= _0x47f2x2[_0x1bfe[526]][_0x1bfe[190]];return window[_0x1bfe[1141]](mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[1130]]-= this[_0x1bfe[1126]];this[_0x1bfe[1129]]-= this[_0x1bfe[1125]];if(this[_0x1bfe[1131]]){var _0x47f2x3=-_0x47f2x2[_0x1bfe[526]][_0x1bfe[360]]- Math[_0x1bfe[430]](this[_0x1bfe[1126]]),_0x47f2x5=-_0x47f2x2[_0x1bfe[526]][_0x1bfe[190]]- Math[_0x1bfe[430]](this[_0x1bfe[1125]]);_0x47f2x2[_0x1bfe[1135]](_0x47f2x3,_0x47f2x5);_0x47f2x2[_0x1bfe[1136]]= this[_0x1bfe[360]]- _0x47f2x2[_0x1bfe[526]][_0x1bfe[360]];_0x47f2x2[_0x1bfe[1137]]= this[_0x1bfe[190]]- _0x47f2x2[_0x1bfe[526]][_0x1bfe[190]];_0x47f2x2[_0x1bfe[746]]( new mxEventObject(mxEvent.PAN))}else {_0x47f2x2[_0x1bfe[1135]](this[_0x1bfe[1138]](),this[_0x1bfe[1139]]())}}),this[_0x1bfe[1140]])});this[_0x1bfe[1142]]= function(){return active};this[_0x1bfe[1138]]= function(){return Math[_0x1bfe[488]](this[_0x1bfe[1130]])};this[_0x1bfe[1139]]= function(){return Math[_0x1bfe[488]](this[_0x1bfe[1129]])};this[_0x1bfe[861]]= function(){this[_0x1bfe[1128]]= _0x47f2x2[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]];this[_0x1bfe[1127]]= _0x47f2x2[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]];this[_0x1bfe[1124]]= !0};this[_0x1bfe[1143]]= function(_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){this[_0x1bfe[1124]]|| this[_0x1bfe[861]]();this[_0x1bfe[360]]= _0x47f2x2[_0x1bfe[526]][_0x1bfe[360]];this[_0x1bfe[190]]= _0x47f2x2[_0x1bfe[526]][_0x1bfe[190]];_0x47f2xa= null!= _0x47f2xa?_0x47f2xa:0;var _0x47f2x12=_0x47f2x2[_0x1bfe[526]];this[_0x1bfe[1126]]= _0x47f2x4+ (null!= _0x47f2x9?_0x47f2x9:0)- _0x47f2x12[_0x1bfe[360]]- _0x47f2x12[_0x1bfe[159]];0> this[_0x1bfe[1126]]&& Math[_0x1bfe[425]](this[_0x1bfe[1126]])< this[_0x1bfe[467]]?this[_0x1bfe[1126]]= this[_0x1bfe[467]]+ this[_0x1bfe[1126]]:this[_0x1bfe[1126]]= this[_0x1bfe[1144]]?Math[_0x1bfe[160]](this[_0x1bfe[1126]],0):0;0== this[_0x1bfe[1126]]&& (this[_0x1bfe[1126]]= _0x47f2x4- _0x47f2x12[_0x1bfe[360]],this[_0x1bfe[1126]]= 0< this[_0x1bfe[1126]]&& this[_0x1bfe[1126]]< this[_0x1bfe[467]]?this[_0x1bfe[1126]]- this[_0x1bfe[467]]:this[_0x1bfe[1144]]?Math[_0x1bfe[243]](0,this[_0x1bfe[1126]]):0);this[_0x1bfe[1125]]= _0x47f2x5+ _0x47f2xa- _0x47f2x12[_0x1bfe[190]]- _0x47f2x12[_0x1bfe[157]];0> this[_0x1bfe[1125]]&& Math[_0x1bfe[425]](this[_0x1bfe[1125]])< this[_0x1bfe[467]]?this[_0x1bfe[1125]]= this[_0x1bfe[467]]+ this[_0x1bfe[1125]]:this[_0x1bfe[1125]]= this[_0x1bfe[1144]]?Math[_0x1bfe[160]](this[_0x1bfe[1125]],0):0;0== this[_0x1bfe[1125]]&& (this[_0x1bfe[1125]]= _0x47f2x5- _0x47f2x12[_0x1bfe[190]],this[_0x1bfe[1125]]= 0< this[_0x1bfe[1125]]&& this[_0x1bfe[1125]]< this[_0x1bfe[467]]?this[_0x1bfe[1125]]- this[_0x1bfe[467]]:this[_0x1bfe[1144]]?Math[_0x1bfe[243]](0,this[_0x1bfe[1125]]):0);0!= this[_0x1bfe[1126]]|| 0!= this[_0x1bfe[1125]]?(this[_0x1bfe[1126]]*= this[_0x1bfe[1145]],this[_0x1bfe[1125]]*= this[_0x1bfe[1145]],null== this[_0x1bfe[1123]]&& (this[_0x1bfe[1123]]= _0x47f2x3())):null!= this[_0x1bfe[1123]]&& (window[_0x1bfe[1146]](this[_0x1bfe[1123]]),this[_0x1bfe[1123]]= null)};this[_0x1bfe[1076]]= function(){if(this[_0x1bfe[1124]]){if(this[_0x1bfe[1124]]= !1,null!= this[_0x1bfe[1123]]&& (window[_0x1bfe[1146]](this[_0x1bfe[1123]]),this[_0x1bfe[1123]]= null),this[_0x1bfe[1129]]= this[_0x1bfe[1130]]= 0,this[_0x1bfe[1131]]){_0x47f2x2[_0x1bfe[1136]]= 0,_0x47f2x2[_0x1bfe[1137]]= 0,_0x47f2x2[_0x1bfe[746]]( new mxEventObject(mxEvent.PAN))}else {var _0x47f2x3=_0x47f2x2[_0x1bfe[1136]],_0x47f2x5=_0x47f2x2[_0x1bfe[1137]];if(0!= _0x47f2x3|| 0!= _0x47f2x5){_0x47f2x2[_0x1bfe[1135]](0,0),_0x47f2x2[_0x1bfe[441]][_0x1bfe[1147]](this[_0x1bfe[1128]]+ _0x47f2x3/ _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]],this[_0x1bfe[1127]]+ _0x47f2x5/ _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]])}}}};this[_0x1bfe[515]]= function(){_0x47f2x2[_0x1bfe[1148]](this[_0x1bfe[1132]])}}mxPanningManager[_0x1bfe[202]][_0x1bfe[1145]]= 1/ 6;mxPanningManager[_0x1bfe[202]][_0x1bfe[1140]]= 10;mxPanningManager[_0x1bfe[202]][_0x1bfe[1144]]= !0;mxPanningManager[_0x1bfe[202]][_0x1bfe[467]]= 0;function mxPopupMenu(_0x47f2x2){this[_0x1bfe[1033]]= _0x47f2x2;null!= _0x47f2x2&& this[_0x1bfe[176]]()}mxPopupMenu[_0x1bfe[202]]= new mxEventSource;mxPopupMenu[_0x1bfe[202]][_0x1bfe[196]]= mxPopupMenu;mxPopupMenu[_0x1bfe[202]][_0x1bfe[1149]]= mxClient[_0x1bfe[88]]+ _0x1bfe[1150];mxPopupMenu[_0x1bfe[202]][_0x1bfe[931]]= 10006;mxPopupMenu[_0x1bfe[202]][_0x1bfe[1033]]= null;mxPopupMenu[_0x1bfe[202]][_0x1bfe[1151]]= !1;mxPopupMenu[_0x1bfe[202]][_0x1bfe[984]]= !0;mxPopupMenu[_0x1bfe[202]][_0x1bfe[1152]]= 0;mxPopupMenu[_0x1bfe[202]][_0x1bfe[1153]]= !1;mxPopupMenu[_0x1bfe[202]][_0x1bfe[1154]]= !1;mxPopupMenu[_0x1bfe[202]][_0x1bfe[1155]]= !0;mxPopupMenu[_0x1bfe[202]][_0x1bfe[176]]= function(){this[_0x1bfe[116]]= document[_0x1bfe[55]](_0x1bfe[116]);this[_0x1bfe[116]][_0x1bfe[926]]= _0x1bfe[1156];this[_0x1bfe[120]]= document[_0x1bfe[55]](_0x1bfe[120]);this[_0x1bfe[116]][_0x1bfe[62]](this[_0x1bfe[120]]);this[_0x1bfe[485]]= document[_0x1bfe[55]](_0x1bfe[485]);this[_0x1bfe[485]][_0x1bfe[926]]= _0x1bfe[1156];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[497];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[931]]= this[_0x1bfe[931]];this[_0x1bfe[485]][_0x1bfe[62]](this[_0x1bfe[116]]);mxEvent[_0x1bfe[1157]](this[_0x1bfe[485]])};mxPopupMenu[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxPopupMenu[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxPopupMenu[_0x1bfe[202]][_0x1bfe[737]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[737]]()|| this[_0x1bfe[1151]]&& mxEvent[_0x1bfe[1158]](_0x47f2x2[_0x1bfe[727]]())};mxPopupMenu[_0x1bfe[202]][_0x1bfe[1025]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x5= _0x47f2x5|| this;this[_0x1bfe[1152]]++;_0x47f2x5[_0x1bfe[1159]]&& (_0x47f2x5[_0x1bfe[1160]]&& this[_0x1bfe[1051]](_0x47f2x5,!0),_0x47f2x5[_0x1bfe[1159]]= !1);_0x47f2x5[_0x1bfe[1160]]= !0;var _0x47f2x12=document[_0x1bfe[55]](_0x1bfe[121]);_0x47f2x12[_0x1bfe[926]]= _0x1bfe[1161];var _0x47f2x13=document[_0x1bfe[55]](_0x1bfe[122]);_0x47f2x13[_0x1bfe[926]]= _0x1bfe[1162];null!= _0x47f2x3?(_0x47f2x9= document[_0x1bfe[55]](_0x1bfe[466]),_0x47f2x9[_0x1bfe[390]]= _0x47f2x3,_0x47f2x13[_0x1bfe[62]](_0x47f2x9)):null!= _0x47f2x9&& (_0x47f2x3= document[_0x1bfe[55]](_0x1bfe[485]),_0x47f2x3[_0x1bfe[926]]= _0x47f2x9,_0x47f2x13[_0x1bfe[62]](_0x47f2x3));_0x47f2x12[_0x1bfe[62]](_0x47f2x13);this[_0x1bfe[1155]]&& (_0x47f2x13= document[_0x1bfe[55]](_0x1bfe[122]),_0x47f2x13[_0x1bfe[926]]= _0x1bfe[1161]+ (null!= _0x47f2xa&& !_0x47f2xa?_0x1bfe[1163]:_0x1bfe[110]),mxUtils[_0x1bfe[53]](_0x47f2x13,_0x47f2x2),_0x47f2x13[_0x1bfe[611]]= _0x1bfe[361],_0x47f2x12[_0x1bfe[62]](_0x47f2x13),_0x47f2x2= document[_0x1bfe[55]](_0x1bfe[122]),_0x47f2x2[_0x1bfe[926]]= _0x1bfe[1161]+ (null!= _0x47f2xa&& !_0x47f2xa?_0x1bfe[1163]:_0x1bfe[110]),_0x47f2x2[_0x1bfe[124]][_0x1bfe[1164]]= _0x1bfe[1055],_0x47f2x2[_0x1bfe[124]][_0x1bfe[1165]]= _0x1bfe[699],_0x47f2x12[_0x1bfe[62]](_0x47f2x2),null== _0x47f2x5[_0x1bfe[485]]&& this[_0x1bfe[1166]](_0x47f2x5));_0x47f2x5[_0x1bfe[120]][_0x1bfe[62]](_0x47f2x12);if(null== _0x47f2xa|| _0x47f2xa){mxEvent[_0x1bfe[759]](_0x47f2x12,mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[1167]]= _0x47f2x12;_0x47f2x5[_0x1bfe[1168]]!= _0x47f2x12&& _0x47f2x5[_0x1bfe[1168]]!= _0x47f2x5&& (null!= _0x47f2x5[_0x1bfe[1168]]&& null!= _0x47f2x5[_0x1bfe[1168]][_0x1bfe[485]][_0x1bfe[265]]&& this[_0x1bfe[1169]](_0x47f2x5),null!= _0x47f2x12[_0x1bfe[485]]&& (this[_0x1bfe[1170]](_0x47f2x5,_0x47f2x12),_0x47f2x5[_0x1bfe[1168]]= _0x47f2x12));mxEvent[_0x1bfe[722]](_0x47f2x2)}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){_0x47f2x5[_0x1bfe[1168]]!= _0x47f2x12&& _0x47f2x5[_0x1bfe[1168]]!= _0x47f2x5&& (null!= _0x47f2x5[_0x1bfe[1168]]&& null!= _0x47f2x5[_0x1bfe[1168]][_0x1bfe[485]][_0x1bfe[265]]&& this[_0x1bfe[1169]](_0x47f2x5),this[_0x1bfe[1153]]&& null!= _0x47f2x12[_0x1bfe[485]]&& (this[_0x1bfe[1170]](_0x47f2x5,_0x47f2x12),_0x47f2x5[_0x1bfe[1168]]= _0x47f2x12));_0x47f2x12[_0x1bfe[926]]= _0x1bfe[1171]}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[1167]]== _0x47f2x12&& (_0x47f2x5[_0x1bfe[1168]]!= _0x47f2x12&& this[_0x1bfe[1032]](),null!= _0x47f2x4&& _0x47f2x4(_0x47f2x2));this[_0x1bfe[1167]]= null;mxEvent[_0x1bfe[722]](_0x47f2x2)})),mxEvent[_0x1bfe[169]](_0x47f2x12,_0x1bfe[1035],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){_0x47f2x12[_0x1bfe[926]]= _0x1bfe[1161]}))};return _0x47f2x12};mxPopupMenu[_0x1bfe[202]][_0x1bfe[1166]]= function(_0x47f2x2){_0x47f2x2[_0x1bfe[116]]= document[_0x1bfe[55]](_0x1bfe[116]);_0x47f2x2[_0x1bfe[116]][_0x1bfe[926]]= _0x1bfe[1156];_0x47f2x2[_0x1bfe[120]]= document[_0x1bfe[55]](_0x1bfe[120]);_0x47f2x2[_0x1bfe[116]][_0x1bfe[62]](_0x47f2x2[_0x1bfe[120]]);_0x47f2x2[_0x1bfe[485]]= document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x2[_0x1bfe[485]][_0x1bfe[926]]= _0x1bfe[1156];_0x47f2x2[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];_0x47f2x2[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[497];_0x47f2x2[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[931]]= this[_0x1bfe[931]];_0x47f2x2[_0x1bfe[485]][_0x1bfe[62]](_0x47f2x2[_0x1bfe[116]]);var _0x47f2x3=document[_0x1bfe[55]](_0x1bfe[466]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[390],this[_0x1bfe[1149]]);td= _0x47f2x2[_0x1bfe[285]][_0x1bfe[287]][_0x1bfe[287]];td[_0x1bfe[62]](_0x47f2x3)};mxPopupMenu[_0x1bfe[202]][_0x1bfe[1170]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x3[_0x1bfe[485]]){_0x47f2x3[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x2[_0x1bfe[485]][_0x1bfe[358]]+ _0x47f2x3[_0x1bfe[358]]+ _0x47f2x3[_0x1bfe[359]]- 1+ _0x1bfe[168];_0x47f2x3[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x2[_0x1bfe[485]][_0x1bfe[362]]+ _0x47f2x3[_0x1bfe[362]]+ _0x1bfe[168];document[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x3[_0x1bfe[485]]);var _0x47f2x4=parseInt(_0x47f2x3[_0x1bfe[485]][_0x1bfe[358]]),_0x47f2x5=parseInt(_0x47f2x3[_0x1bfe[485]][_0x1bfe[359]]),_0x47f2x9=document[_0x1bfe[112]],_0x47f2xa=document[_0x1bfe[158]];if(_0x47f2x4+ _0x47f2x5> (_0x47f2x9[_0x1bfe[360]]|| _0x47f2xa[_0x1bfe[360]])+ (_0x47f2x9[_0x1bfe[159]]|| _0x47f2xa[_0x1bfe[159]])){_0x47f2x3[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x2[_0x1bfe[485]][_0x1bfe[358]]- _0x47f2x5+ (mxClient[_0x1bfe[80]]?6:-6)+ _0x1bfe[168]};mxUtils[_0x1bfe[933]](_0x47f2x3[_0x1bfe[485]])}};mxPopupMenu[_0x1bfe[202]][_0x1bfe[1051]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x2= _0x47f2x2|| this;if(this[_0x1bfe[1154]]&& !_0x47f2x3){_0x47f2x2[_0x1bfe[1159]]= !0}else {if(null!= _0x47f2x2[_0x1bfe[120]]){_0x47f2x2[_0x1bfe[1159]]= !1;var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[121]),_0x47f2x5=document[_0x1bfe[55]](_0x1bfe[122]);_0x47f2x5[_0x1bfe[926]]= _0x1bfe[1162];_0x47f2x5[_0x1bfe[124]][_0x1bfe[549]]= _0x1bfe[1172];_0x47f2x4[_0x1bfe[62]](_0x47f2x5);_0x47f2x5= document[_0x1bfe[55]](_0x1bfe[122]);_0x47f2x5[_0x1bfe[124]][_0x1bfe[549]]= _0x1bfe[1172];_0x47f2x5[_0x1bfe[57]](_0x1bfe[1173],_0x1bfe[1174]);var _0x47f2x9=document[_0x1bfe[55]](_0x1bfe[1054]);_0x47f2x9[_0x1bfe[57]](_0x1bfe[803],_0x1bfe[500]);_0x47f2x5[_0x1bfe[62]](_0x47f2x9);_0x47f2x4[_0x1bfe[62]](_0x47f2x5);_0x47f2x2[_0x1bfe[120]][_0x1bfe[62]](_0x47f2x4)}}};mxPopupMenu[_0x1bfe[202]][_0x1bfe[152]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null!= this[_0x1bfe[485]]&& null!= this[_0x1bfe[120]]&& null!= this[_0x1bfe[1033]]){this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x2+ _0x1bfe[168];for(this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x3+ _0x1bfe[168];null!= this[_0x1bfe[120]][_0x1bfe[285]];){mxEvent[_0x1bfe[762]](this[_0x1bfe[120]][_0x1bfe[285]]),this[_0x1bfe[120]][_0x1bfe[266]](this[_0x1bfe[120]][_0x1bfe[285]])};this[_0x1bfe[1152]]= 0;this[_0x1bfe[1033]](this,_0x47f2x4,_0x47f2x5);0< this[_0x1bfe[1152]]&& (this[_0x1bfe[1175]](),this[_0x1bfe[746]]( new mxEventObject(mxEvent.SHOW)))}};mxPopupMenu[_0x1bfe[202]][_0x1bfe[1031]]= function(){return null!= this[_0x1bfe[485]]&& this[_0x1bfe[485]][_0x1bfe[265]]== document[_0x1bfe[112]]};mxPopupMenu[_0x1bfe[202]][_0x1bfe[1175]]= function(){9<= document[_0x1bfe[5]]&& (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[347]]= _0x1bfe[130]);document[_0x1bfe[112]][_0x1bfe[62]](this[_0x1bfe[485]]);mxUtils[_0x1bfe[933]](this[_0x1bfe[485]])};mxPopupMenu[_0x1bfe[202]][_0x1bfe[1032]]= function(){null!= this[_0x1bfe[485]]&& (null!= this[_0x1bfe[485]][_0x1bfe[265]]&& this[_0x1bfe[485]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[485]]),this[_0x1bfe[1169]](this),this[_0x1bfe[1160]]= !1)};mxPopupMenu[_0x1bfe[202]][_0x1bfe[1169]]= function(_0x47f2x2){null!= _0x47f2x2[_0x1bfe[1168]]&& (this[_0x1bfe[1169]](_0x47f2x2[_0x1bfe[1168]]),null!= _0x47f2x2[_0x1bfe[1168]][_0x1bfe[485]][_0x1bfe[265]]&& _0x47f2x2[_0x1bfe[1168]][_0x1bfe[485]][_0x1bfe[265]][_0x1bfe[266]](_0x47f2x2[_0x1bfe[1168]][_0x1bfe[485]]),_0x47f2x2[_0x1bfe[1168]]= null)};mxPopupMenu[_0x1bfe[202]][_0x1bfe[515]]= function(){null!= this[_0x1bfe[485]]&& (mxEvent[_0x1bfe[762]](this[_0x1bfe[485]]),null!= this[_0x1bfe[485]][_0x1bfe[265]]&& this[_0x1bfe[485]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[485]]),this[_0x1bfe[485]]= null)};function mxAutoSaveManager(_0x47f2x2){this[_0x1bfe[1176]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x4){this[_0x1bfe[994]]()&& this[_0x1bfe[1177]](_0x47f2x4[_0x1bfe[720]](_0x1bfe[1061])[_0x1bfe[1065]])});this[_0x1bfe[1178]](_0x47f2x2)}mxAutoSaveManager[_0x1bfe[202]]= new mxEventSource;mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[196]]= mxAutoSaveManager;mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[1179]]= null;mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[1180]]= 10;mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[1181]]= 2;mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[1182]]= 5;mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[1183]]= 0;mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[1184]]= 0;mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[984]]= !0;mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[1176]]= null;mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[1178]]= function(_0x47f2x2){null!= this[_0x1bfe[1179]]&& this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[745]](this[_0x1bfe[1176]]);this[_0x1bfe[1179]]= _0x47f2x2;null!= this[_0x1bfe[1179]]&& this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[169]](mxEvent.CHANGE,this[_0x1bfe[1176]])};mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[815]]= function(){};mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[1177]]= function(_0x47f2x2){_0x47f2x2= (( new Date)[_0x1bfe[178]]()- this[_0x1bfe[1184]])/ 1E3;_0x47f2x2> this[_0x1bfe[1180]]|| this[_0x1bfe[1183]]>= this[_0x1bfe[1182]]&& _0x47f2x2> this[_0x1bfe[1181]]?(this[_0x1bfe[815]](),this[_0x1bfe[862]]()):this[_0x1bfe[1183]]++};mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[862]]= function(){this[_0x1bfe[1184]]= ( new Date)[_0x1bfe[178]]();this[_0x1bfe[1183]]= 0};mxAutoSaveManager[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[1178]](null)};function mxAnimation(_0x47f2x2){this[_0x1bfe[1140]]= null!= _0x47f2x2?_0x47f2x2:20}mxAnimation[_0x1bfe[202]]= new mxEventSource;mxAnimation[_0x1bfe[202]][_0x1bfe[196]]= mxAnimation;mxAnimation[_0x1bfe[202]][_0x1bfe[1140]]= null;mxAnimation[_0x1bfe[202]][_0x1bfe[1123]]= null;mxAnimation[_0x1bfe[202]][_0x1bfe[1185]]= function(){null== this[_0x1bfe[1123]]&& (this[_0x1bfe[1123]]= window[_0x1bfe[1141]](mxUtils[_0x1bfe[885]](this,this[_0x1bfe[1186]]),this[_0x1bfe[1140]]))};mxAnimation[_0x1bfe[202]][_0x1bfe[1186]]= function(){this[_0x1bfe[746]]( new mxEventObject(mxEvent.EXECUTE))};mxAnimation[_0x1bfe[202]][_0x1bfe[1187]]= function(){null!= this[_0x1bfe[1123]]&& (window[_0x1bfe[1146]](this[_0x1bfe[1123]]),this[_0x1bfe[1123]]= null,this[_0x1bfe[746]]( new mxEventObject(mxEvent.DONE)))};function mxMorphing(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxAnimation[_0x1bfe[239]](this,_0x47f2x5);this[_0x1bfe[1179]]= _0x47f2x2;this[_0x1bfe[1188]]= null!= _0x47f2x3?_0x47f2x3:6;this[_0x1bfe[1189]]= null!= _0x47f2x4?_0x47f2x4:1.5}mxMorphing[_0x1bfe[202]]= new mxAnimation;mxMorphing[_0x1bfe[202]][_0x1bfe[196]]= mxMorphing;mxMorphing[_0x1bfe[202]][_0x1bfe[1179]]= null;mxMorphing[_0x1bfe[202]][_0x1bfe[1188]]= null;mxMorphing[_0x1bfe[202]][_0x1bfe[1190]]= 0;mxMorphing[_0x1bfe[202]][_0x1bfe[1189]]= null;mxMorphing[_0x1bfe[202]][_0x1bfe[895]]= null;mxMorphing[_0x1bfe[202]][_0x1bfe[1186]]= function(){var _0x47f2x2= new mxCellStatePreview(this[_0x1bfe[1179]]);if(null!= this[_0x1bfe[895]]){for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[895]][_0x1bfe[67]];_0x47f2x3++){this[_0x1bfe[1191]](cells[_0x47f2x3],_0x47f2x2,!1)}}else {this[_0x1bfe[1191]](this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[501]](),_0x47f2x2,!0)};this[_0x1bfe[539]](_0x47f2x2);(_0x47f2x2[_0x1bfe[1107]]()|| this[_0x1bfe[1190]]++ >= this[_0x1bfe[1188]])&& this[_0x1bfe[1187]]()};mxMorphing[_0x1bfe[202]][_0x1bfe[539]]= function(_0x47f2x2){_0x47f2x2[_0x1bfe[539]]()};mxMorphing[_0x1bfe[202]][_0x1bfe[1191]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x2),_0x47f2x9=null;if(null!= _0x47f2x5&& (_0x47f2x9= this[_0x1bfe[1192]](_0x47f2x5),this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1193]](_0x47f2x2)&& (0!= _0x47f2x9[_0x1bfe[235]]|| 0!= _0x47f2x9[_0x1bfe[236]]))){var _0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[512]](),_0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[518]]();_0x47f2x9[_0x1bfe[235]]+= _0x47f2xa[_0x1bfe[235]]* _0x47f2x12;_0x47f2x9[_0x1bfe[236]]+= _0x47f2xa[_0x1bfe[236]]* _0x47f2x12;_0x47f2x3[_0x1bfe[1194]](_0x47f2x5,-_0x47f2x9[_0x1bfe[235]]/ this[_0x1bfe[1189]],-_0x47f2x9[_0x1bfe[236]]/ this[_0x1bfe[1189]])};if(_0x47f2x4&& !this[_0x1bfe[1195]](_0x47f2x5,_0x47f2x9)){_0x47f2x5= this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[262]](_0x47f2x2);for(_0x47f2x9= 0;_0x47f2x9< _0x47f2x5;_0x47f2x9++){this[_0x1bfe[1191]](this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[263]](_0x47f2x2,_0x47f2x9),_0x47f2x3,_0x47f2x4)}}};mxMorphing[_0x1bfe[202]][_0x1bfe[1195]]= function(_0x47f2x2,_0x47f2x3){return null!= _0x47f2x3&& (0!= _0x47f2x3[_0x1bfe[235]]|| 0!= _0x47f2x3[_0x1bfe[236]])};mxMorphing[_0x1bfe[202]][_0x1bfe[1192]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1196]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[512]](),_0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[518]]();_0x47f2x2= new mxPoint(_0x47f2x2[_0x1bfe[235]]/ _0x47f2x5- _0x47f2x4[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]]/ _0x47f2x5- _0x47f2x4[_0x1bfe[236]]);return new mxPoint((_0x47f2x3[_0x1bfe[235]]- _0x47f2x2[_0x1bfe[235]])* _0x47f2x5,(_0x47f2x3[_0x1bfe[236]]- _0x47f2x2[_0x1bfe[236]])* _0x47f2x5)};mxMorphing[_0x1bfe[202]][_0x1bfe[1196]]= function(_0x47f2x2){var _0x47f2x3=null;null!= _0x47f2x2&& (_0x47f2x3= this[_0x1bfe[1196]](this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1197]](_0x47f2x2)),_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x2),null!= _0x47f2x2&& (_0x47f2x3[_0x1bfe[235]]+= _0x47f2x2[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]]+= _0x47f2x2[_0x1bfe[236]]));null== _0x47f2x3&& (_0x47f2x3= this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[512]](),_0x47f2x3= new mxPoint(-_0x47f2x3[_0x1bfe[235]],-_0x47f2x3[_0x1bfe[236]]));return _0x47f2x3};function mxImageBundle(_0x47f2x2){this[_0x1bfe[1199]]= [];this[_0x1bfe[1200]]= null!= _0x47f2x2?_0x47f2x2:!1}mxImageBundle[_0x1bfe[202]][_0x1bfe[1199]]= null;mxImageBundle[_0x1bfe[202]][_0x1bfe[1199]]= null;mxImageBundle[_0x1bfe[202]][_0x1bfe[1201]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[1199]][_0x47f2x2]= {value:_0x47f2x3,fallback:_0x47f2x4}};mxImageBundle[_0x1bfe[202]][_0x1bfe[1202]]= function(_0x47f2x2){var _0x47f2x3=null;null!= _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[1199]][_0x47f2x2],null!= _0x47f2x2&& (_0x47f2x3= this[_0x1bfe[1200]]?_0x47f2x2[_0x1bfe[1203]]:_0x47f2x2[_0x1bfe[131]]));return _0x47f2x3};function mxImageExport(){}mxImageExport[_0x1bfe[202]][_0x1bfe[1204]]= !1;mxImageExport[_0x1bfe[202]][_0x1bfe[1205]]= function(_0x47f2x2,_0x47f2x3){null!= _0x47f2x2&& (this[_0x1bfe[1207]](_0x47f2x2,_0x47f2x3,this[_0x1bfe[1206]]),this[_0x1bfe[1204]]&& this[_0x1bfe[1207]](_0x47f2x2,_0x47f2x3,this[_0x1bfe[1208]]))};mxImageExport[_0x1bfe[202]][_0x1bfe[1207]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(null!= _0x47f2x2){_0x47f2x4(_0x47f2x2,_0x47f2x3);for(var _0x47f2x5=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]],_0x47f2x9=_0x47f2x5[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2[_0x1bfe[246]]),_0x47f2xa=0;_0x47f2xa< _0x47f2x9;_0x47f2xa++){var _0x47f2x12=_0x47f2x5[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x5[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x2[_0x1bfe[246]],_0x47f2xa));this[_0x1bfe[1207]](_0x47f2x12,_0x47f2x3,_0x47f2x4)}}};mxImageExport[_0x1bfe[202]][_0x1bfe[1206]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x2[_0x1bfe[253]] instanceof mxShape&& (_0x47f2x3[_0x1bfe[815]](),_0x47f2x2[_0x1bfe[253]][_0x1bfe[1209]](_0x47f2x3),_0x47f2x3[_0x1bfe[1210]]());null!= _0x47f2x2[_0x1bfe[963]]&& (_0x47f2x3[_0x1bfe[815]](),_0x47f2x2[_0x1bfe[963]][_0x1bfe[1209]](_0x47f2x3),_0x47f2x3[_0x1bfe[1210]]())};mxImageExport[_0x1bfe[202]][_0x1bfe[1208]]= function(_0x47f2x2,_0x47f2x3){null!= _0x47f2x2[_0x1bfe[1211]]&& _0x47f2x2[_0x1bfe[1211]][_0x1bfe[209]](function(_0x47f2x2,_0x47f2x5){_0x47f2x5 instanceof mxShape&& _0x47f2x5[_0x1bfe[1209]](_0x47f2x3)})};function mxAbstractCanvas2D(){this[_0x1bfe[1212]]= this[_0x1bfe[1213]]();this[_0x1bfe[862]]()}mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[724]]= null;mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1214]]= null;mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1215]]= null;mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1216]]= !0;mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1217]]= 0;mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1218]]= 0;mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1219]]= _0x1bfe[1220];mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1221]]= _0x1bfe[1222];mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1223]]= _0x1bfe[1224];mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1225]]= _0x1bfe[1226];mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1227]]= _0x1bfe[1228];mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1229]]= !1;mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1213]]= function(){return new mxUrlConverter};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[862]]= function(){this[_0x1bfe[724]]= this[_0x1bfe[1230]]();this[_0x1bfe[1214]]= []};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1230]]= function(){return {dx:0,dy:0,scale:1,alpha:1,fillColor:null,fillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:_0x1bfe[1231],lineCap:_0x1bfe[1232],lineJoin:_0x1bfe[1233],miterLimit:10,fontColor:_0x1bfe[1234],fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants[_0x1bfe[483]],fontFamily:mxConstants[_0x1bfe[484]],fontStyle:0,shadow:!1,shadowColor:mxConstants[_0x1bfe[1235]],shadowAlpha:mxConstants[_0x1bfe[1236]],shadowDx:mxConstants[_0x1bfe[1237]],shadowDy:mxConstants[_0x1bfe[1238]],rotation:0,rotationCx:0,rotationCy:0}};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1239]]= function(_0x47f2x2){return Math[_0x1bfe[488]](parseFloat(_0x47f2x2))};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1240]]= function(){if(null!= this[_0x1bfe[1215]]&& (this[_0x1bfe[1215]][_0x1bfe[207]](arguments[0]),2< arguments[_0x1bfe[67]])){for(var _0x47f2x2=this[_0x1bfe[724]],_0x47f2x3=2;_0x47f2x3< arguments[_0x1bfe[67]];_0x47f2x3+= 2){this[_0x1bfe[1217]]= arguments[_0x47f2x3- 1],this[_0x1bfe[1218]]= arguments[_0x47f2x3],this[_0x1bfe[1215]][_0x1bfe[207]](this[_0x1bfe[1239]]((this[_0x1bfe[1217]]+ _0x47f2x2[_0x1bfe[1126]])* _0x47f2x2[_0x1bfe[255]])),this[_0x1bfe[1215]][_0x1bfe[207]](this[_0x1bfe[1239]]((this[_0x1bfe[1218]]+ _0x47f2x2[_0x1bfe[1125]])* _0x47f2x2[_0x1bfe[255]]))}}};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1241]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x4*= Math[_0x1bfe[424]]/ 180;return mxUtils[_0x1bfe[432]]( new mxPoint(_0x47f2x2,_0x47f2x3),Math[_0x1bfe[426]](_0x47f2x4),Math[_0x1bfe[427]](_0x47f2x4), new mxPoint(_0x47f2x5,_0x47f2x9))};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[815]]= function(){this[_0x1bfe[1214]][_0x1bfe[207]](this[_0x1bfe[724]]);this[_0x1bfe[724]]= mxUtils[_0x1bfe[238]](this[_0x1bfe[724]])};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1210]]= function(){this[_0x1bfe[724]]= this[_0x1bfe[1214]][_0x1bfe[1242]]()};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[255]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[255]]*= _0x47f2x2;this[_0x1bfe[724]][_0x1bfe[610]]*= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[513]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[724]][_0x1bfe[1126]]+= _0x47f2x2;this[_0x1bfe[724]][_0x1bfe[1125]]+= _0x47f2x3};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1243]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[1244]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1245]]= function(_0x47f2x2){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);this[_0x1bfe[724]][_0x1bfe[604]]= _0x47f2x2;this[_0x1bfe[724]][_0x1bfe[606]]= null};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1246]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14){_0x47f2x4= this[_0x1bfe[724]];_0x47f2x4[_0x1bfe[604]]= _0x47f2x2;_0x47f2x4[_0x1bfe[1247]]= null!= _0x47f2x13?_0x47f2x13:1;_0x47f2x4[_0x1bfe[606]]= _0x47f2x3;_0x47f2x4[_0x1bfe[1248]]= null!= _0x47f2x14?_0x47f2x14:1;_0x47f2x4[_0x1bfe[607]]= _0x47f2x12};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1249]]= function(_0x47f2x2){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);this[_0x1bfe[724]][_0x1bfe[608]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1250]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[610]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1251]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[648]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1252]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[649]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1253]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[1254]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1255]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[1256]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1257]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[1258]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1259]]= function(_0x47f2x2){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);this[_0x1bfe[724]][_0x1bfe[665]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1260]]= function(_0x47f2x2){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);this[_0x1bfe[724]][_0x1bfe[1261]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1262]]= function(_0x47f2x2){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);this[_0x1bfe[724]][_0x1bfe[1263]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1264]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[487]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1265]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[486]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1266]]= function(_0x47f2x2){null== _0x47f2x2&& (_0x47f2x2= 0);this[_0x1bfe[724]][_0x1bfe[666]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1267]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[639]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1268]]= function(_0x47f2x2){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);this[_0x1bfe[724]][_0x1bfe[1269]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1270]]= function(_0x47f2x2){this[_0x1bfe[724]][_0x1bfe[1271]]= _0x47f2x2};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1272]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[724]][_0x1bfe[1273]]= _0x47f2x2;this[_0x1bfe[724]][_0x1bfe[1274]]= _0x47f2x3};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1275]]= function(){this[_0x1bfe[1218]]= this[_0x1bfe[1217]]= 0;this[_0x1bfe[1215]]= []};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1276]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1240]](this[_0x1bfe[1219]],_0x47f2x2,_0x47f2x3)};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1277]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1240]](this[_0x1bfe[1221]],_0x47f2x2,_0x47f2x3)};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1278]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[1240]](this[_0x1bfe[1223]],_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5)};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1279]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){this[_0x1bfe[1240]](this[_0x1bfe[1225]],_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa)};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1280]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12){_0x47f2x2= mxUtils[_0x1bfe[1281]](this[_0x1bfe[1217]],this[_0x1bfe[1218]],_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12);for(_0x47f2x3= 0;_0x47f2x3< _0x47f2x2[_0x1bfe[67]];_0x47f2x3+= 6){this[_0x1bfe[1279]](_0x47f2x2[_0x47f2x3],_0x47f2x2[_0x47f2x3+ 1],_0x47f2x2[_0x47f2x3+ 2],_0x47f2x2[_0x47f2x3+ 3],_0x47f2x2[_0x47f2x3+ 4],_0x47f2x2[_0x47f2x3+ 5])}};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[268]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){this[_0x1bfe[1240]](this[_0x1bfe[1227]])};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1282]]= function(){};function mxXmlCanvas2D(_0x47f2x2){mxAbstractCanvas2D[_0x1bfe[239]](this);this[_0x1bfe[813]]= _0x47f2x2;this[_0x1bfe[1283]]()}mxUtils[_0x1bfe[1284]](mxXmlCanvas2D,mxAbstractCanvas2D);mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1285]]= !0;mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1286]]= !0;mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1283]]= function(){var _0x47f2x2;_0x47f2x2= this[_0x1bfe[55]](_0x1bfe[1287]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[1288],mxConstants.DEFAULT_FONTFAMILY);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x2);_0x47f2x2= this[_0x1bfe[55]](_0x1bfe[1289]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[803],mxConstants.DEFAULT_FONTSIZE);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x2);_0x47f2x2= this[_0x1bfe[55]](_0x1bfe[1290]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[352],mxConstants.SHADOWCOLOR);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x2);_0x47f2x2= this[_0x1bfe[55]](_0x1bfe[1291]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[1244],mxConstants.SHADOW_OPACITY);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x2);_0x47f2x2= this[_0x1bfe[55]](_0x1bfe[1292]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[1126],mxConstants.SHADOW_OFFSET_X);_0x47f2x2[_0x1bfe[57]](_0x1bfe[1125],mxConstants.SHADOW_OFFSET_Y);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x2)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1239]]= function(_0x47f2x2){return parseFloat(parseFloat(_0x47f2x2)[_0x1bfe[1293]](2))};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[55]]= function(_0x47f2x2){return this[_0x1bfe[813]][_0x1bfe[295]][_0x1bfe[55]](_0x47f2x2)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[815]]= function(){this[_0x1bfe[1286]]&& mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[815]][_0x1bfe[183]](this,arguments);this[_0x1bfe[813]][_0x1bfe[62]](this[_0x1bfe[55]](_0x1bfe[815]))};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1210]]= function(){this[_0x1bfe[1286]]&& mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1210]][_0x1bfe[183]](this,arguments);this[_0x1bfe[813]][_0x1bfe[62]](this[_0x1bfe[55]](_0x1bfe[1210]))};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[255]]= function(_0x47f2x2){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[255]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1243]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[255]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[255],_0x47f2x2);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[513]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[55]](_0x1bfe[513]);_0x47f2x4[_0x1bfe[57]](_0x1bfe[1126],this[_0x1bfe[1239]](_0x47f2x2));_0x47f2x4[_0x1bfe[57]](_0x1bfe[1125],this[_0x1bfe[1239]](_0x47f2x3));this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x4)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1294]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=this[_0x1bfe[55]](_0x1bfe[1294]);if(0!= _0x47f2x2|| _0x47f2x3|| _0x47f2x4){_0x47f2xa[_0x1bfe[57]](_0x1bfe[1295],this[_0x1bfe[1239]](_0x47f2x2)),_0x47f2xa[_0x1bfe[57]](_0x1bfe[623],_0x47f2x3?_0x1bfe[500]:_0x1bfe[468]),_0x47f2xa[_0x1bfe[57]](_0x1bfe[624],_0x47f2x4?_0x1bfe[500]:_0x1bfe[468]),_0x47f2xa[_0x1bfe[57]](_0x1bfe[1296],this[_0x1bfe[1239]](_0x47f2x5)),_0x47f2xa[_0x1bfe[57]](_0x1bfe[1297],this[_0x1bfe[1239]](_0x47f2x9)),this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2xa)}};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1243]]= function(_0x47f2x2){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[1244]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1243]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1244]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[1244],this[_0x1bfe[1239]](_0x47f2x2));this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1245]]= function(_0x47f2x2){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[604]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1245]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1298]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[352],null!= _0x47f2x2?_0x47f2x2:mxConstants[_0x1bfe[217]]);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1246]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14){if(null!= _0x47f2x2&& null!= _0x47f2x3){mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1246]][_0x1bfe[183]](this,arguments);var _0x47f2x15=this[_0x1bfe[55]](_0x1bfe[1299]);_0x47f2x15[_0x1bfe[57]](_0x1bfe[1300],_0x47f2x2);_0x47f2x15[_0x1bfe[57]](_0x1bfe[1301],_0x47f2x3);_0x47f2x15[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]](_0x47f2x4));_0x47f2x15[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]](_0x47f2x5));_0x47f2x15[_0x1bfe[57]](_0x1bfe[1302],this[_0x1bfe[1239]](_0x47f2x9));_0x47f2x15[_0x1bfe[57]](_0x1bfe[1303],this[_0x1bfe[1239]](_0x47f2xa));null!= _0x47f2x12&& _0x47f2x15[_0x1bfe[57]](_0x1bfe[663],_0x47f2x12);null!= _0x47f2x13&& _0x47f2x15[_0x1bfe[57]](_0x1bfe[1304],_0x47f2x13);null!= _0x47f2x14&& _0x47f2x15[_0x1bfe[57]](_0x1bfe[1305],_0x47f2x14);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x15)}};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1249]]= function(_0x47f2x2){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[608]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1249]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1306]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[352],null!= _0x47f2x2?_0x47f2x2:mxConstants[_0x1bfe[217]]);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1250]]= function(_0x47f2x2){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[610]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1250]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1307]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[117],this[_0x1bfe[1239]](_0x47f2x2));this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1251]]= function(_0x47f2x2){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[648]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1251]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[648]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[648],_0x47f2x2?_0x1bfe[500]:_0x1bfe[468]);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1252]]= function(_0x47f2x2){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[649]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1252]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1308]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[1309],_0x47f2x2);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1253]]= function(_0x47f2x2){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[1254]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1253]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1310]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[1311],_0x47f2x2);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1255]]= function(_0x47f2x2){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[1256]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1255]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1312]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[234],_0x47f2x2);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1257]]= function(_0x47f2x2){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[1258]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1257]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1313]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[1314],_0x47f2x2);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1259]]= function(_0x47f2x2){if(this[_0x1bfe[1285]]){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[665]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1259]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1315]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[352],null!= _0x47f2x2?_0x47f2x2:mxConstants[_0x1bfe[217]]);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)}};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1260]]= function(_0x47f2x2){if(this[_0x1bfe[1285]]){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[1261]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1260]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1316]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[352],null!= _0x47f2x2?_0x47f2x2:mxConstants[_0x1bfe[217]]);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)}};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1262]]= function(_0x47f2x2){if(this[_0x1bfe[1285]]){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[1263]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1262]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1317]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[352],null!= _0x47f2x2?_0x47f2x2:mxConstants[_0x1bfe[217]]);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)}};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1264]]= function(_0x47f2x2){if(this[_0x1bfe[1285]]){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[487]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1264]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1289]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[803],_0x47f2x2);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)}};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1265]]= function(_0x47f2x2){if(this[_0x1bfe[1285]]){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[486]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1265]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1287]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[1288],_0x47f2x2);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)}};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1266]]= function(_0x47f2x2){if(this[_0x1bfe[1285]]){null== _0x47f2x2&& (_0x47f2x2= 0);if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[666]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1266]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1318]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[124],_0x47f2x2);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)}};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1267]]= function(_0x47f2x2){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[639]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1267]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[639]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[984],_0x47f2x2?_0x1bfe[500]:_0x1bfe[468]);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1268]]= function(_0x47f2x2){if(this[_0x1bfe[1286]]){_0x47f2x2== mxConstants[_0x1bfe[217]]&& (_0x47f2x2= null);if(this[_0x1bfe[724]][_0x1bfe[1269]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1268]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1290]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[352],null!= _0x47f2x2?_0x47f2x2:mxConstants[_0x1bfe[217]]);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1270]]= function(_0x47f2x2){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[1271]]== _0x47f2x2){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1270]][_0x1bfe[183]](this,arguments)};var _0x47f2x3=this[_0x1bfe[55]](_0x1bfe[1291]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[1244],_0x47f2x2);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x3)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1272]]= function(_0x47f2x2,_0x47f2x3){if(this[_0x1bfe[1286]]){if(this[_0x1bfe[724]][_0x1bfe[1273]]== _0x47f2x2&& this[_0x1bfe[724]][_0x1bfe[1274]]== _0x47f2x3){return};mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1272]][_0x1bfe[183]](this,arguments)};var _0x47f2x4=this[_0x1bfe[55]](_0x1bfe[1292]);_0x47f2x4[_0x1bfe[57]](_0x1bfe[1126],_0x47f2x2);_0x47f2x4[_0x1bfe[57]](_0x1bfe[1125],_0x47f2x3);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x4)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1319]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=this[_0x1bfe[55]](_0x1bfe[1319]);_0x47f2x9[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]](_0x47f2x2));_0x47f2x9[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]](_0x47f2x3));_0x47f2x9[_0x1bfe[57]](_0x1bfe[1302],this[_0x1bfe[1239]](_0x47f2x4));_0x47f2x9[_0x1bfe[57]](_0x1bfe[1303],this[_0x1bfe[1239]](_0x47f2x5));this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x9)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1320]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){var _0x47f2x12=this[_0x1bfe[55]](_0x1bfe[1320]);_0x47f2x12[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]](_0x47f2x2));_0x47f2x12[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]](_0x47f2x3));_0x47f2x12[_0x1bfe[57]](_0x1bfe[1302],this[_0x1bfe[1239]](_0x47f2x4));_0x47f2x12[_0x1bfe[57]](_0x1bfe[1303],this[_0x1bfe[1239]](_0x47f2x5));_0x47f2x12[_0x1bfe[57]](_0x1bfe[1126],this[_0x1bfe[1239]](_0x47f2x9));_0x47f2x12[_0x1bfe[57]](_0x1bfe[1125],this[_0x1bfe[1239]](_0x47f2xa));this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x12)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[680]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=this[_0x1bfe[55]](_0x1bfe[680]);_0x47f2x9[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]](_0x47f2x2));_0x47f2x9[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]](_0x47f2x3));_0x47f2x9[_0x1bfe[57]](_0x1bfe[1302],this[_0x1bfe[1239]](_0x47f2x4));_0x47f2x9[_0x1bfe[57]](_0x1bfe[1303],this[_0x1bfe[1239]](_0x47f2x5));this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x9)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[618]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13){_0x47f2x9= this[_0x1bfe[1212]][_0x1bfe[1321]](_0x47f2x9);var _0x47f2x14=this[_0x1bfe[55]](_0x1bfe[618]);_0x47f2x14[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]](_0x47f2x2));_0x47f2x14[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]](_0x47f2x3));_0x47f2x14[_0x1bfe[57]](_0x1bfe[1302],this[_0x1bfe[1239]](_0x47f2x4));_0x47f2x14[_0x1bfe[57]](_0x1bfe[1303],this[_0x1bfe[1239]](_0x47f2x5));_0x47f2x14[_0x1bfe[57]](_0x1bfe[390],_0x47f2x9);_0x47f2x14[_0x1bfe[57]](_0x1bfe[1322],_0x47f2xa?_0x1bfe[500]:_0x1bfe[468]);_0x47f2x14[_0x1bfe[57]](_0x1bfe[623],_0x47f2x12?_0x1bfe[500]:_0x1bfe[468]);_0x47f2x14[_0x1bfe[57]](_0x1bfe[624],_0x47f2x13?_0x1bfe[500]:_0x1bfe[468]);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x14)};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1275]]= function(){this[_0x1bfe[813]][_0x1bfe[62]](this[_0x1bfe[55]](_0x1bfe[1275]));this[_0x1bfe[1218]]= this[_0x1bfe[1217]]= 0};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1276]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[55]](_0x1bfe[582]);_0x47f2x4[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]](_0x47f2x2));_0x47f2x4[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]](_0x47f2x3));this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x4);this[_0x1bfe[1217]]= _0x47f2x2;this[_0x1bfe[1218]]= _0x47f2x3};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1277]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[55]](_0x1bfe[683]);_0x47f2x4[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]](_0x47f2x2));_0x47f2x4[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]](_0x47f2x3));this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x4);this[_0x1bfe[1217]]= _0x47f2x2;this[_0x1bfe[1218]]= _0x47f2x3};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1278]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=this[_0x1bfe[55]](_0x1bfe[1323]);_0x47f2x9[_0x1bfe[57]](_0x1bfe[1324],this[_0x1bfe[1239]](_0x47f2x2));_0x47f2x9[_0x1bfe[57]](_0x1bfe[1325],this[_0x1bfe[1239]](_0x47f2x3));_0x47f2x9[_0x1bfe[57]](_0x1bfe[1326],this[_0x1bfe[1239]](_0x47f2x4));_0x47f2x9[_0x1bfe[57]](_0x1bfe[1327],this[_0x1bfe[1239]](_0x47f2x5));this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x9);this[_0x1bfe[1217]]= _0x47f2x4;this[_0x1bfe[1218]]= _0x47f2x5};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1279]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){var _0x47f2x12=this[_0x1bfe[55]](_0x1bfe[1328]);_0x47f2x12[_0x1bfe[57]](_0x1bfe[1324],this[_0x1bfe[1239]](_0x47f2x2));_0x47f2x12[_0x1bfe[57]](_0x1bfe[1325],this[_0x1bfe[1239]](_0x47f2x3));_0x47f2x12[_0x1bfe[57]](_0x1bfe[1326],this[_0x1bfe[1239]](_0x47f2x4));_0x47f2x12[_0x1bfe[57]](_0x1bfe[1327],this[_0x1bfe[1239]](_0x47f2x5));_0x47f2x12[_0x1bfe[57]](_0x1bfe[1329],this[_0x1bfe[1239]](_0x47f2x9));_0x47f2x12[_0x1bfe[57]](_0x1bfe[1330],this[_0x1bfe[1239]](_0x47f2xa));this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x12);this[_0x1bfe[1217]]= _0x47f2x9;this[_0x1bfe[1218]]= _0x47f2xa};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[268]]= function(){this[_0x1bfe[813]][_0x1bfe[62]](this[_0x1bfe[55]](_0x1bfe[268]))};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[963]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15,_0x47f2x16,_0x47f2x17){if(this[_0x1bfe[1285]]&& null!= _0x47f2x9){mxUtils[_0x1bfe[1331]](_0x47f2x9)&& (_0x47f2x9= mxUtils[_0x1bfe[532]](_0x47f2x9));var _0x47f2x18=this[_0x1bfe[55]](_0x1bfe[963]);_0x47f2x18[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]](_0x47f2x2));_0x47f2x18[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]](_0x47f2x3));_0x47f2x18[_0x1bfe[57]](_0x1bfe[1302],this[_0x1bfe[1239]](_0x47f2x4));_0x47f2x18[_0x1bfe[57]](_0x1bfe[1303],this[_0x1bfe[1239]](_0x47f2x5));_0x47f2x18[_0x1bfe[57]](_0x1bfe[1332],_0x47f2x9);null!= _0x47f2xa&& _0x47f2x18[_0x1bfe[57]](_0x1bfe[611],_0x47f2xa);null!= _0x47f2x12&& _0x47f2x18[_0x1bfe[57]](_0x1bfe[552],_0x47f2x12);_0x47f2x18[_0x1bfe[57]](_0x1bfe[1333],_0x47f2x13?_0x1bfe[500]:_0x1bfe[468]);null== _0x47f2x14&& (_0x47f2x14= _0x1bfe[110]);_0x47f2x18[_0x1bfe[57]](_0x1bfe[1239],_0x47f2x14);null!= _0x47f2x15&& _0x47f2x18[_0x1bfe[57]](_0x1bfe[1334],_0x47f2x15?_0x1bfe[500]:_0x1bfe[468]);null!= _0x47f2x16&& _0x47f2x18[_0x1bfe[57]](_0x1bfe[1335],_0x47f2x16?_0x1bfe[500]:_0x1bfe[468]);null!= _0x47f2x17&& _0x47f2x18[_0x1bfe[57]](_0x1bfe[603],_0x47f2x17);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x18)}};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1336]]= function(){this[_0x1bfe[813]][_0x1bfe[62]](this[_0x1bfe[55]](_0x1bfe[1336]))};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1334]]= function(){this[_0x1bfe[813]][_0x1bfe[62]](this[_0x1bfe[55]](_0x1bfe[1334]))};mxXmlCanvas2D[_0x1bfe[202]][_0x1bfe[1337]]= function(){this[_0x1bfe[813]][_0x1bfe[62]](this[_0x1bfe[55]](_0x1bfe[1338]))};function mxSvgCanvas2D(_0x47f2x2,_0x47f2x3){mxAbstractCanvas2D[_0x1bfe[239]](this);this[_0x1bfe[813]]= _0x47f2x2;this[_0x1bfe[1339]]= [];this[_0x1bfe[1340]]= null;this[_0x1bfe[1341]]= null!= _0x47f2x3?_0x47f2x3:!1;var _0x47f2x4=null;if(_0x47f2x2[_0x1bfe[295]]!= document){for(_0x47f2x4= _0x47f2x2;null!= _0x47f2x4&& _0x1bfe[571]!= _0x47f2x4[_0x1bfe[301]];){_0x47f2x4= _0x47f2x4[_0x1bfe[265]]}};null!= _0x47f2x4&& (0< _0x47f2x4[_0x1bfe[64]](_0x1bfe[1340])[_0x1bfe[67]]&& (this[_0x1bfe[1340]]= _0x47f2x4[_0x1bfe[64]](_0x1bfe[1340])[0]),null== this[_0x1bfe[1340]]&& (this[_0x1bfe[1340]]= this[_0x1bfe[55]](_0x1bfe[1340]),null!= _0x47f2x4[_0x1bfe[285]]?_0x47f2x4[_0x1bfe[950]](this[_0x1bfe[1340]],_0x47f2x4[_0x1bfe[285]]):_0x47f2x4[_0x1bfe[62]](this[_0x1bfe[1340]])),this[_0x1bfe[1341]]&& this[_0x1bfe[1340]][_0x1bfe[62]](this[_0x1bfe[1342]]()))}mxUtils[_0x1bfe[1284]](mxSvgCanvas2D,mxAbstractCanvas2D);mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[252]]= null;mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1343]]= !0;mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1285]]= !0;mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1344]]= !0;mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1345]]= 0;mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1346]]= 0;mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1347]]= !1;mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[862]]= function(){mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[862]][_0x1bfe[183]](this,arguments);this[_0x1bfe[1339]]= []};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1342]]= function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[55]](_0x1bfe[124]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[60],_0x1bfe[61]);mxUtils[_0x1bfe[53]](_0x47f2x2,_0x1bfe[1348]+ mxConstants[_0x1bfe[484]]+ _0x1bfe[1349]+ mxConstants[_0x1bfe[483]]+ _0x1bfe[1350]);return _0x47f2x2};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[55]]= function(_0x47f2x2,_0x47f2x3){if(null!= this[_0x1bfe[813]][_0x1bfe[295]][_0x1bfe[509]]){return this[_0x1bfe[813]][_0x1bfe[295]][_0x1bfe[509]](_0x47f2x3|| mxConstants[_0x1bfe[1351]],_0x47f2x2)};var _0x47f2x4=this[_0x1bfe[813]][_0x1bfe[295]][_0x1bfe[55]](_0x47f2x2);null!= _0x47f2x3&& _0x47f2x4[_0x1bfe[57]](_0x1bfe[1352],_0x47f2x3);return _0x47f2x4};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1353]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x1bfe[198]== _0x47f2x2[_0x1bfe[225]](0)&& (_0x47f2x2= _0x47f2x2[_0x1bfe[85]](1));_0x1bfe[198]== _0x47f2x3[_0x1bfe[225]](0)&& (_0x47f2x3= _0x47f2x3[_0x1bfe[85]](1));_0x47f2x2= _0x47f2x2[_0x1bfe[216]]()+ _0x1bfe[213]+ _0x47f2x4;_0x47f2x3= _0x47f2x3[_0x1bfe[216]]()+ _0x1bfe[213]+ _0x47f2x5;_0x47f2x4= null;null== _0x47f2x9|| _0x47f2x9== mxConstants[_0x1bfe[1354]]?_0x47f2x4= _0x1bfe[1355]:_0x47f2x9== mxConstants[_0x1bfe[1356]]?_0x47f2x4= _0x1bfe[1357]:(_0x47f2x5= _0x47f2x2,_0x47f2x2= _0x47f2x3,_0x47f2x3= _0x47f2x5,_0x47f2x9== mxConstants[_0x1bfe[1358]]?_0x47f2x4= _0x1bfe[1355]:_0x47f2x9== mxConstants[_0x1bfe[1359]]&& (_0x47f2x4= _0x1bfe[1357]));return _0x1bfe[1360]+ _0x47f2x2+ _0x1bfe[213]+ _0x47f2x3+ _0x1bfe[213]+ _0x47f2x4};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1361]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=this[_0x1bfe[1353]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9),_0x47f2x12=this[_0x1bfe[1339]][_0x47f2xa];if(null== _0x47f2x12){var _0x47f2x13=this[_0x1bfe[813]][_0x1bfe[538]],_0x47f2x14=0,_0x47f2x15=_0x47f2xa+ _0x1bfe[213]+ _0x47f2x14;if(null!= _0x47f2x13){for(_0x47f2x12= _0x47f2x13[_0x1bfe[295]][_0x1bfe[1362]](_0x47f2x15);null!= _0x47f2x12&& _0x47f2x12[_0x1bfe[538]]!= _0x47f2x13;){_0x47f2x15= _0x47f2xa+ _0x1bfe[213]+ _0x47f2x14++,_0x47f2x12= _0x47f2x13[_0x1bfe[295]][_0x1bfe[1362]](_0x47f2x15)}}else {_0x47f2x15= _0x1bfe[1363]+ ++this[_0x1bfe[1346]]};null== _0x47f2x12&& (_0x47f2x12= this[_0x1bfe[1364]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9),_0x47f2x12[_0x1bfe[57]](_0x1bfe[1363],_0x47f2x15),null!= this[_0x1bfe[1340]]?this[_0x1bfe[1340]][_0x1bfe[62]](_0x47f2x12):_0x47f2x13[_0x1bfe[62]](_0x47f2x12));this[_0x1bfe[1339]][_0x47f2xa]= _0x47f2x12};return _0x47f2x12[_0x1bfe[284]](_0x1bfe[1363])};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1364]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=this[_0x1bfe[55]](_0x1bfe[1365]);_0x47f2xa[_0x1bfe[57]](_0x1bfe[1324],_0x1bfe[1366]);_0x47f2xa[_0x1bfe[57]](_0x1bfe[1325],_0x1bfe[1366]);_0x47f2xa[_0x1bfe[57]](_0x1bfe[1326],_0x1bfe[1366]);_0x47f2xa[_0x1bfe[57]](_0x1bfe[1327],_0x1bfe[1366]);null== _0x47f2x9|| _0x47f2x9== mxConstants[_0x1bfe[1354]]?_0x47f2xa[_0x1bfe[57]](_0x1bfe[1327],_0x1bfe[118]):_0x47f2x9== mxConstants[_0x1bfe[1356]]?_0x47f2xa[_0x1bfe[57]](_0x1bfe[1326],_0x1bfe[118]):_0x47f2x9== mxConstants[_0x1bfe[1358]]?_0x47f2xa[_0x1bfe[57]](_0x1bfe[1325],_0x1bfe[118]):_0x47f2x9== mxConstants[_0x1bfe[1359]]&& _0x47f2xa[_0x1bfe[57]](_0x1bfe[1324],_0x1bfe[118]);_0x47f2x4= 1> _0x47f2x4?_0x1bfe[1367]+ _0x47f2x4:_0x1bfe[110];_0x47f2x9= this[_0x1bfe[55]](_0x1bfe[1076]);_0x47f2x9[_0x1bfe[57]](_0x1bfe[1368],_0x1bfe[1366]);_0x47f2x9[_0x1bfe[57]](_0x1bfe[124],_0x1bfe[1369]+ _0x47f2x2+ _0x47f2x4);_0x47f2xa[_0x1bfe[62]](_0x47f2x9);_0x47f2x4= 1> _0x47f2x5?_0x1bfe[1367]+ _0x47f2x5:_0x1bfe[110];_0x47f2x9= this[_0x1bfe[55]](_0x1bfe[1076]);_0x47f2x9[_0x1bfe[57]](_0x1bfe[1368],_0x1bfe[118]);_0x47f2x9[_0x1bfe[57]](_0x1bfe[124],_0x1bfe[1369]+ _0x47f2x3+ _0x47f2x4);_0x47f2xa[_0x1bfe[62]](_0x47f2x9);return _0x47f2xa};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1370]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[252]],_0x47f2x5=this[_0x1bfe[724]];if(null!= _0x47f2x4){if(_0x1bfe[1215]== _0x47f2x4[_0x1bfe[301]]){if(null!= this[_0x1bfe[1215]]&& 0< this[_0x1bfe[1215]][_0x1bfe[67]]){_0x47f2x4[_0x1bfe[57]](_0x1bfe[1371],this[_0x1bfe[1215]][_0x1bfe[234]](_0x1bfe[185]))}else {return}};_0x47f2x2&& null!= _0x47f2x5[_0x1bfe[604]]?this[_0x1bfe[1372]]():this[_0x1bfe[1341]]|| (_0x1bfe[680]== _0x47f2x4[_0x1bfe[301]]&& mxClient[_0x1bfe[133]]&& !mxClient[_0x1bfe[76]]&& !mxClient[_0x1bfe[75]]?_0x47f2x4[_0x1bfe[57]](_0x1bfe[1334],_0x1bfe[1373]):_0x47f2x4[_0x1bfe[57]](_0x1bfe[1334],_0x1bfe[130]),_0x47f2x2= !1);_0x47f2x3&& null!= _0x47f2x5[_0x1bfe[608]]?this[_0x1bfe[1374]]():this[_0x1bfe[1341]]|| _0x47f2x4[_0x1bfe[57]](_0x1bfe[1336],_0x1bfe[130]);null!= _0x47f2x5[_0x1bfe[535]]&& 0< _0x47f2x5[_0x1bfe[535]][_0x1bfe[67]]&& _0x47f2x4[_0x1bfe[57]](_0x1bfe[535],_0x47f2x5[_0x1bfe[535]]);_0x47f2x5[_0x1bfe[639]]&& this[_0x1bfe[813]][_0x1bfe[62]](this[_0x1bfe[1375]](_0x47f2x4));0< this[_0x1bfe[1345]]&& !_0x47f2x2&& this[_0x1bfe[813]][_0x1bfe[62]](this[_0x1bfe[1376]](_0x47f2x4));this[_0x1bfe[1229]]&& (_0x1bfe[1215]!= _0x47f2x4[_0x1bfe[301]]|| this[_0x1bfe[1215]][this[_0x1bfe[1215]][_0x1bfe[67]]- 1]== this[_0x1bfe[1227]])&& _0x47f2x4[_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[1378]);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x4)}};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1372]]= function(){var _0x47f2x2=this[_0x1bfe[724]];1> _0x47f2x2[_0x1bfe[1244]]&& this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1379],_0x47f2x2[_0x1bfe[1244]]);null!= _0x47f2x2[_0x1bfe[604]]&& (null!= _0x47f2x2[_0x1bfe[606]]?(_0x47f2x2= this[_0x1bfe[1361]](_0x47f2x2[_0x1bfe[604]],_0x47f2x2[_0x1bfe[606]],_0x47f2x2[_0x1bfe[1247]],_0x47f2x2[_0x1bfe[1248]],_0x47f2x2[_0x1bfe[607]]),this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1334],_0x1bfe[1380]+ _0x47f2x2+ _0x1bfe[460])):this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1334],_0x47f2x2[_0x1bfe[604]][_0x1bfe[216]]()))};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1374]]= function(){var _0x47f2x2=this[_0x1bfe[724]];this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1336],_0x47f2x2[_0x1bfe[608]][_0x1bfe[216]]());1> _0x47f2x2[_0x1bfe[1244]]&& this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1381],_0x47f2x2[_0x1bfe[1244]]);var _0x47f2x3=Math[_0x1bfe[160]](1,this[_0x1bfe[1239]](_0x47f2x2[_0x1bfe[610]]* _0x47f2x2[_0x1bfe[255]]));1!= _0x47f2x3&& this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1382],_0x47f2x3);_0x1bfe[1215]== this[_0x1bfe[252]][_0x1bfe[301]]&& this[_0x1bfe[1383]]();_0x47f2x2[_0x1bfe[648]]&& this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1384],this[_0x1bfe[1385]](_0x47f2x3))};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1383]]= function(){var _0x47f2x2=this[_0x1bfe[724]];null!= _0x47f2x2[_0x1bfe[1256]]&& _0x1bfe[1233]!= _0x47f2x2[_0x1bfe[1256]]&& this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1386],_0x47f2x2[_0x1bfe[1256]]);if(null!= _0x47f2x2[_0x1bfe[1254]]){var _0x47f2x3=_0x47f2x2[_0x1bfe[1254]];_0x1bfe[1232]== _0x47f2x3&& (_0x47f2x3= _0x1bfe[1387]);_0x1bfe[1387]!= _0x47f2x3&& this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1388],_0x47f2x3)};null!= _0x47f2x2[_0x1bfe[1258]]&& (!this[_0x1bfe[1341]]|| 10!= _0x47f2x2[_0x1bfe[1258]])&& this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1389],_0x47f2x2[_0x1bfe[1258]])};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1385]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[724]][_0x1bfe[649]][_0x1bfe[224]](_0x1bfe[185]),_0x47f2x4=[];if(0< _0x47f2x3[_0x1bfe[67]]){for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x3[_0x1bfe[67]];_0x47f2x5++){_0x47f2x4[_0x47f2x5]= Number(_0x47f2x3[_0x47f2x5])* _0x47f2x2}};return _0x47f2x4[_0x1bfe[234]](_0x1bfe[185])};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1376]]= function(_0x47f2x2){_0x47f2x2= _0x47f2x2[_0x1bfe[511]](!0);var _0x47f2x3=parseFloat(_0x47f2x2[_0x1bfe[284]](_0x1bfe[1382])|| 1)+ this[_0x1bfe[1345]];_0x47f2x2[_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[1336]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[187],_0x1bfe[188]);_0x47f2x2[_0x1bfe[1390]](_0x1bfe[1384]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[1382],_0x47f2x3);_0x47f2x2[_0x1bfe[57]](_0x1bfe[1334],_0x1bfe[130]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[1336],mxClient[_0x1bfe[71]]?_0x1bfe[130]:_0x1bfe[1391]);return _0x47f2x2};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1375]]= function(_0x47f2x2){_0x47f2x2= _0x47f2x2[_0x1bfe[511]](!0);var _0x47f2x3=this[_0x1bfe[724]];_0x1bfe[130]!= _0x47f2x2[_0x1bfe[284]](_0x1bfe[1334])&& _0x47f2x2[_0x1bfe[57]](_0x1bfe[1334],_0x47f2x3[_0x1bfe[1269]]);_0x1bfe[130]!= _0x47f2x2[_0x1bfe[284]](_0x1bfe[1336])&& _0x47f2x2[_0x1bfe[57]](_0x1bfe[1336],_0x47f2x3[_0x1bfe[1269]]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[535],_0x1bfe[536]+ this[_0x1bfe[1239]](_0x47f2x3[_0x1bfe[1273]]* _0x47f2x3[_0x1bfe[255]])+ _0x1bfe[537]+ this[_0x1bfe[1239]](_0x47f2x3[_0x1bfe[1274]]* _0x47f2x3[_0x1bfe[255]])+ _0x1bfe[460]+ (_0x47f2x3[_0x1bfe[535]]|| _0x1bfe[110]));_0x47f2x2[_0x1bfe[57]](_0x1bfe[461],_0x47f2x3[_0x1bfe[1271]]);return _0x47f2x2};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1294]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){if(0!= _0x47f2x2|| _0x47f2x3|| _0x47f2x4){var _0x47f2xa=this[_0x1bfe[724]];_0x47f2x5+= _0x47f2xa[_0x1bfe[1126]];_0x47f2x9+= _0x47f2xa[_0x1bfe[1125]];_0x47f2x5*= _0x47f2xa[_0x1bfe[255]];_0x47f2x9*= _0x47f2xa[_0x1bfe[255]];_0x47f2xa[_0x1bfe[535]]= _0x47f2xa[_0x1bfe[535]]|| _0x1bfe[110];if(_0x47f2x3&& _0x47f2x4){_0x47f2x2+= 180}else {if(_0x47f2x3^ _0x47f2x4){var _0x47f2x12=_0x47f2x3?_0x47f2x5:0,_0x47f2x13=_0x47f2x3?-1:1,_0x47f2x14=_0x47f2x4?_0x47f2x9:0,_0x47f2x15=_0x47f2x4?-1:1;_0x47f2xa[_0x1bfe[535]]+= _0x1bfe[536]+ this[_0x1bfe[1239]](_0x47f2x12)+ _0x1bfe[537]+ this[_0x1bfe[1239]](_0x47f2x14)+ _0x1bfe[1392]+ this[_0x1bfe[1239]](_0x47f2x13)+ _0x1bfe[537]+ this[_0x1bfe[1239]](_0x47f2x15)+ _0x1bfe[1393]+ this[_0x1bfe[1239]](-_0x47f2x12) + _0x1bfe[537]+ this[_0x1bfe[1239]](-_0x47f2x14) + _0x1bfe[460]}};if(_0x47f2x3?!_0x47f2x4:_0x47f2x4){_0x47f2x2*= -1};0!= _0x47f2x2&& (_0x47f2xa[_0x1bfe[535]]+= _0x1bfe[1394]+ this[_0x1bfe[1239]](_0x47f2x2)+ _0x1bfe[537]+ this[_0x1bfe[1239]](_0x47f2x5)+ _0x1bfe[537]+ this[_0x1bfe[1239]](_0x47f2x9)+ _0x1bfe[460]);_0x47f2xa[_0x1bfe[603]]+= _0x47f2x2;_0x47f2xa[_0x1bfe[1395]]= _0x47f2x5;_0x47f2xa[_0x1bfe[1396]]= _0x47f2x9}};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1275]]= function(){mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1275]][_0x1bfe[183]](this,arguments);this[_0x1bfe[252]]= this[_0x1bfe[55]](_0x1bfe[1215])};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1319]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=this[_0x1bfe[724]],_0x47f2xa=this[_0x1bfe[55]](_0x1bfe[1319]);_0x47f2xa[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]]((_0x47f2x2+ _0x47f2x9[_0x1bfe[1126]])* _0x47f2x9[_0x1bfe[255]]));_0x47f2xa[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]]((_0x47f2x3+ _0x47f2x9[_0x1bfe[1125]])* _0x47f2x9[_0x1bfe[255]]));_0x47f2xa[_0x1bfe[57]](_0x1bfe[117],this[_0x1bfe[1239]](_0x47f2x4* _0x47f2x9[_0x1bfe[255]]));_0x47f2xa[_0x1bfe[57]](_0x1bfe[119],this[_0x1bfe[1239]](_0x47f2x5* _0x47f2x9[_0x1bfe[255]]));this[_0x1bfe[252]]= _0x47f2xa};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1320]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){this[_0x1bfe[1319]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5);0< _0x47f2x9&& this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1397],this[_0x1bfe[1239]](_0x47f2x9* this[_0x1bfe[724]][_0x1bfe[255]]));0< _0x47f2xa&& this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1398],this[_0x1bfe[1239]](_0x47f2xa* this[_0x1bfe[724]][_0x1bfe[255]]))};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[680]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=this[_0x1bfe[724]],_0x47f2xa=this[_0x1bfe[55]](_0x1bfe[680]);_0x47f2xa[_0x1bfe[57]](_0x1bfe[1296],Math[_0x1bfe[488]]((_0x47f2x2+ _0x47f2x4/ 2+ _0x47f2x9[_0x1bfe[1126]])* _0x47f2x9[_0x1bfe[255]]));_0x47f2xa[_0x1bfe[57]](_0x1bfe[1297],Math[_0x1bfe[488]]((_0x47f2x3+ _0x47f2x5/ 2+ _0x47f2x9[_0x1bfe[1125]])* _0x47f2x9[_0x1bfe[255]]));_0x47f2xa[_0x1bfe[57]](_0x1bfe[1397],_0x47f2x4/ 2* _0x47f2x9[_0x1bfe[255]]);_0x47f2xa[_0x1bfe[57]](_0x1bfe[1398],_0x47f2x5/ 2* _0x47f2x9[_0x1bfe[255]]);this[_0x1bfe[252]]= _0x47f2xa};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[618]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13){_0x47f2x9= this[_0x1bfe[1212]][_0x1bfe[1321]](_0x47f2x9);_0x47f2xa= null!= _0x47f2xa?_0x47f2xa:!0;_0x47f2x12= null!= _0x47f2x12?_0x47f2x12:!1;_0x47f2x13= null!= _0x47f2x13?_0x47f2x13:!1;var _0x47f2x14=this[_0x1bfe[724]];_0x47f2x2+= _0x47f2x14[_0x1bfe[1126]];_0x47f2x3+= _0x47f2x14[_0x1bfe[1125]];var _0x47f2x15=this[_0x1bfe[55]](_0x1bfe[618]);_0x47f2x15[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]](_0x47f2x2* _0x47f2x14[_0x1bfe[255]]));_0x47f2x15[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]](_0x47f2x3* _0x47f2x14[_0x1bfe[255]]));_0x47f2x15[_0x1bfe[57]](_0x1bfe[117],this[_0x1bfe[1239]](_0x47f2x4* _0x47f2x14[_0x1bfe[255]]));_0x47f2x15[_0x1bfe[57]](_0x1bfe[119],this[_0x1bfe[1239]](_0x47f2x5* _0x47f2x14[_0x1bfe[255]]));null== _0x47f2x15[_0x1bfe[1399]]?_0x47f2x15[_0x1bfe[57]](_0x1bfe[1400],_0x47f2x9):_0x47f2x15[_0x1bfe[1399]](mxConstants.NS_XLINK,_0x1bfe[44],_0x47f2x9);_0x47f2xa|| _0x47f2x15[_0x1bfe[57]](_0x1bfe[1401],_0x1bfe[130]);1> _0x47f2x14[_0x1bfe[1244]]&& _0x47f2x15[_0x1bfe[57]](_0x1bfe[461],_0x47f2x14[_0x1bfe[1244]]);_0x47f2x9= this[_0x1bfe[724]][_0x1bfe[535]]|| _0x1bfe[110];if(_0x47f2x12|| _0x47f2x13){var _0x47f2x16=_0x47f2xa= 1,_0x47f2x17=0,_0x47f2x18=0;_0x47f2x12&& (_0x47f2xa= -1,_0x47f2x17= -_0x47f2x4- 2* _0x47f2x2);_0x47f2x13&& (_0x47f2x16= -1,_0x47f2x18= -_0x47f2x5- 2* _0x47f2x3);_0x47f2x9+= _0x1bfe[1402]+ _0x47f2xa+ _0x1bfe[537]+ _0x47f2x16+ _0x1bfe[1393]+ _0x47f2x17+ _0x1bfe[537]+ _0x47f2x18+ _0x1bfe[460]};0< _0x47f2x9[_0x1bfe[67]]&& _0x47f2x15[_0x1bfe[57]](_0x1bfe[535],_0x47f2x9);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x15);this[_0x1bfe[1347]]&& (_0x47f2x15[_0x1bfe[57]](_0x1bfe[124],_0x1bfe[1403]),_0x47f2x15= this[_0x1bfe[55]](_0x1bfe[1319]),_0x47f2x15[_0x1bfe[57]](_0x1bfe[187],_0x1bfe[188]),_0x47f2x15[_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[1334]),_0x47f2x15[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]](_0x47f2x2* _0x47f2x14[_0x1bfe[255]])),_0x47f2x15[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]](_0x47f2x3* _0x47f2x14[_0x1bfe[255]])),_0x47f2x15[_0x1bfe[57]](_0x1bfe[117],this[_0x1bfe[1239]](_0x47f2x4* _0x47f2x14[_0x1bfe[255]])),_0x47f2x15[_0x1bfe[57]](_0x1bfe[119],this[_0x1bfe[1239]](_0x47f2x5* _0x47f2x14[_0x1bfe[255]])),this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x15))};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1404]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x4= this[_0x1bfe[724]];_0x47f2x5= _0x1bfe[1405]+ Math[_0x1bfe[488]](_0x47f2x4[_0x1bfe[487]])+ _0x1bfe[1406]+ _0x47f2x4[_0x1bfe[486]]+ _0x1bfe[1407]+ _0x47f2x4[_0x1bfe[665]]+ _0x1bfe[1408]+ Math[_0x1bfe[488]](_0x47f2x4[_0x1bfe[487]]* mxConstants[_0x1bfe[490]])+ _0x1bfe[1409]+ _0x47f2x5;(_0x47f2x4[_0x1bfe[666]]& mxConstants[_0x1bfe[1410]])== mxConstants[_0x1bfe[1410]]&& (_0x47f2x5+= _0x1bfe[1411]);(_0x47f2x4[_0x1bfe[666]]& mxConstants[_0x1bfe[1412]])== mxConstants[_0x1bfe[1412]]&& (_0x47f2x5+= _0x1bfe[1413]);(_0x47f2x4[_0x1bfe[666]]& mxConstants[_0x1bfe[1414]])== mxConstants[_0x1bfe[1414]]&& (_0x47f2x5+= _0x1bfe[1415]);_0x47f2x3== mxConstants[_0x1bfe[479]]?_0x47f2x5+= _0x1bfe[1416]:_0x47f2x3== mxConstants[_0x1bfe[480]]&& (_0x47f2x5+= _0x1bfe[1417]);_0x47f2x3= _0x1bfe[110];null!= _0x47f2x4[_0x1bfe[1261]]&& (_0x47f2x3+= _0x1bfe[1418]+ _0x47f2x4[_0x1bfe[1261]]+ _0x1bfe[471]);null!= _0x47f2x4[_0x1bfe[1263]]&& (_0x47f2x3+= _0x1bfe[1419]+ _0x47f2x4[_0x1bfe[1263]]+ _0x1bfe[471]);mxUtils[_0x1bfe[1331]](_0x47f2x2)|| (_0x47f2x4= document[_0x1bfe[55]](_0x1bfe[126]),_0x47f2x4[_0x1bfe[339]]= _0x47f2x2[_0x1bfe[230]](/</g,_0x1bfe[1421])[_0x1bfe[230]](/>/g,_0x1bfe[1420])[_0x1bfe[230]](//g,_0x1bfe[335]),_0x47f2x2= _0x47f2x4[_0x1bfe[131]],_0x47f2x9?_0x47f2x5+= _0x47f2x3:0< _0x47f2x3[_0x1bfe[67]]&& (_0x47f2x2= _0x1bfe[1422]+ _0x47f2x3+ _0x1bfe[1423]+ _0x47f2x2+ _0x1bfe[1424]));if(!mxClient[_0x1bfe[80]]&& document[_0x1bfe[509]]){return _0x47f2x9= document[_0x1bfe[509]](_0x1bfe[577],_0x1bfe[485]),_0x47f2x9[_0x1bfe[57]](_0x1bfe[124],_0x47f2x5),mxUtils[_0x1bfe[1331]](_0x47f2x2)?this[_0x1bfe[813]][_0x1bfe[295]]!= document?_0x47f2x9[_0x1bfe[62]](_0x47f2x2[_0x1bfe[511]](!0)):_0x47f2x9[_0x1bfe[62]](_0x47f2x2):_0x47f2x9[_0x1bfe[339]]= _0x47f2x2,_0x47f2x9};mxUtils[_0x1bfe[1331]](_0x47f2x2)&& this[_0x1bfe[813]][_0x1bfe[295]]!= document&& (_0x47f2x2= _0x47f2x2[_0x1bfe[342]]);_0x47f2x2= _0x47f2x2[_0x1bfe[230]](/
/g,_0x1bfe[1426])[_0x1bfe[230]](/
/g,_0x1bfe[1425]);return mxUtils[_0x1bfe[877]](_0x1bfe[1427]+ _0x47f2x5+ _0x1bfe[1423]+ _0x47f2x2+ _0x1bfe[1424])[_0x1bfe[158]]};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[963]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15,_0x47f2x16,_0x47f2x17){if(this[_0x1bfe[1285]]&& null!= _0x47f2x9){_0x47f2x17= null!= _0x47f2x17?_0x47f2x17:0;var _0x47f2x18=this[_0x1bfe[724]];_0x47f2x2+= _0x47f2x18[_0x1bfe[1126]];_0x47f2x3+= _0x47f2x18[_0x1bfe[1125]];if(this[_0x1bfe[1344]]&& _0x1bfe[1428]== _0x47f2x14){var _0x47f2x19=_0x1bfe[1429];_0x47f2x16?(_0x47f2x19+= _0x1bfe[1430],0< _0x47f2x5&& (_0x47f2x19+= _0x1bfe[1431]+ Math[_0x1bfe[488]](_0x47f2x5)+ _0x1bfe[1409]),0< _0x47f2x4&& (_0x47f2x19+= _0x1bfe[1432]+ Math[_0x1bfe[488]](_0x47f2x4)+ _0x1bfe[1409])):_0x47f2x15&& (_0x47f2x19+= _0x1bfe[1432]+ Math[_0x1bfe[488]](_0x47f2x4)+ _0x1bfe[1409],0< _0x47f2x5&& (_0x47f2x19+= _0x1bfe[1431]+ Math[_0x1bfe[488]](_0x47f2x5)+ _0x1bfe[1409]));_0x47f2x13?(!_0x47f2x16&& 0< _0x47f2x4&& (_0x47f2x19+= _0x1bfe[1432]+ Math[_0x1bfe[488]](_0x47f2x4)+ _0x1bfe[1409]),_0x47f2x19+= _0x1bfe[1433]):_0x47f2x19+= _0x1bfe[1434];_0x47f2x13= this[_0x1bfe[55]](_0x1bfe[449]);1> _0x47f2x18[_0x1bfe[1244]]&& _0x47f2x13[_0x1bfe[57]](_0x1bfe[461],_0x47f2x18[_0x1bfe[1244]]);_0x47f2x14= this[_0x1bfe[55]](_0x1bfe[1435]);_0x47f2x14[_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[1378]);_0x47f2x19= this[_0x1bfe[1404]](_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x19,_0x47f2x15);if(null!= _0x47f2x19){_0x47f2x13[_0x1bfe[62]](_0x47f2x14);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x13);var _0x47f2x1a=0;if(mxClient[_0x1bfe[80]]&& !mxClient[_0x1bfe[48]]){var _0x47f2x1b=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x1b[_0x1bfe[124]][_0x1bfe[103]]= _0x47f2x19[_0x1bfe[284]](_0x1bfe[124]);_0x47f2x1b[_0x1bfe[124]][_0x1bfe[495]]= mxClient[_0x1bfe[496]]?_0x1bfe[497]:_0x1bfe[498];_0x47f2x1b[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188];_0x47f2x1b[_0x1bfe[339]]= mxUtils[_0x1bfe[1331]](_0x47f2x9)?_0x47f2x9[_0x1bfe[342]]:_0x47f2x9;document[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x1b);_0x47f2x1a= _0x47f2x1b[_0x1bfe[359]];_0x47f2x5= mxClient[_0x1bfe[496]]&& 0< _0x47f2x5&& _0x47f2x16?Math[_0x1bfe[243]](_0x47f2x5,_0x47f2x1b[_0x1bfe[167]]+ 2):_0x47f2x1b[_0x1bfe[167]];_0x47f2x1b[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x1b);_0x47f2x14[_0x1bfe[62]](_0x47f2x19)}else {this[_0x1bfe[813]][_0x1bfe[295]]!= document?(_0x47f2x19[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188],document[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x19),_0x47f2x1a= _0x47f2x19[_0x1bfe[359]],_0x47f2x5= _0x47f2x19[_0x1bfe[167]],_0x47f2x14[_0x1bfe[62]](_0x47f2x19),_0x47f2x19[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[110]):(_0x47f2x14[_0x1bfe[62]](_0x47f2x19),_0x47f2x1a= _0x47f2x19[_0x1bfe[359]],_0x47f2x5= _0x47f2x19[_0x1bfe[167]])};_0x47f2x4= _0x47f2x15?Math[_0x1bfe[160]](_0x47f2x4,_0x47f2x1a):_0x47f2x1a;1> _0x47f2x18[_0x1bfe[1244]]&& _0x47f2x13[_0x1bfe[57]](_0x1bfe[461],_0x47f2x18[_0x1bfe[1244]]);_0x47f2x15= _0x47f2x9= 0;_0x47f2xa== mxConstants[_0x1bfe[479]]?_0x47f2x9-= _0x47f2x4/ 2:_0x47f2xa== mxConstants[_0x1bfe[480]]&& (_0x47f2x9-= _0x47f2x4);_0x47f2x2+= _0x47f2x9;_0x47f2x12== mxConstants[_0x1bfe[481]]?_0x47f2x15-= _0x47f2x5/ 2:_0x47f2x12== mxConstants[_0x1bfe[482]]&& (_0x47f2x15-= _0x47f2x5);_0x47f2x3+= _0x47f2x15;_0x47f2xa= 1!= _0x47f2x18[_0x1bfe[255]]?_0x1bfe[1402]+ _0x47f2x18[_0x1bfe[255]]+ _0x1bfe[460]:_0x1bfe[110];0!= _0x47f2x18[_0x1bfe[603]]&& this[_0x1bfe[1216]]?(_0x47f2xa+= _0x1bfe[1394]+ _0x47f2x18[_0x1bfe[603]]+ _0x1bfe[537]+ _0x47f2x4/ 2+ _0x1bfe[537]+ _0x47f2x5/ 2+ _0x1bfe[460],_0x47f2x3= this[_0x1bfe[1241]]((_0x47f2x2+ _0x47f2x4/ 2)* _0x47f2x18[_0x1bfe[255]],(_0x47f2x3+ _0x47f2x5/ 2)* _0x47f2x18[_0x1bfe[255]],_0x47f2x18[_0x1bfe[603]],_0x47f2x18[_0x1bfe[1395]],_0x47f2x18[_0x1bfe[1396]]),_0x47f2x2= _0x47f2x3[_0x1bfe[235]]- _0x47f2x4* _0x47f2x18[_0x1bfe[255]]/ 2,_0x47f2x3= _0x47f2x3[_0x1bfe[236]]- _0x47f2x5* _0x47f2x18[_0x1bfe[255]]/ 2):(_0x47f2x2*= _0x47f2x18[_0x1bfe[255]],_0x47f2x3*= _0x47f2x18[_0x1bfe[255]]);0!= _0x47f2x17&& (_0x47f2xa+= _0x1bfe[1394]+ _0x47f2x17+ _0x1bfe[537]+ -_0x47f2x9+ _0x1bfe[537]+ -_0x47f2x15+ _0x1bfe[460]);_0x47f2x13[_0x1bfe[57]](_0x1bfe[535],_0x1bfe[536]+ Math[_0x1bfe[488]](_0x47f2x2)+ _0x1bfe[537]+ Math[_0x1bfe[488]](_0x47f2x3)+ _0x1bfe[460]+ _0x47f2xa);_0x47f2x14[_0x1bfe[57]](_0x1bfe[117],Math[_0x1bfe[488]](Math[_0x1bfe[160]](1,_0x47f2x4)));_0x47f2x14[_0x1bfe[57]](_0x1bfe[119],Math[_0x1bfe[488]](Math[_0x1bfe[160]](1,_0x47f2x5)))}}else {this[_0x1bfe[1436]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x15,_0x47f2x16,_0x47f2x17)}}};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1437]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x2= Math[_0x1bfe[488]](_0x47f2x2);_0x47f2x3= Math[_0x1bfe[488]](_0x47f2x3);_0x47f2x4= Math[_0x1bfe[488]](_0x47f2x4);_0x47f2x5= Math[_0x1bfe[488]](_0x47f2x5);for(var _0x47f2x9=_0x1bfe[1438]+ _0x47f2x2+ _0x1bfe[213]+ _0x47f2x3+ _0x1bfe[213]+ _0x47f2x4+ _0x1bfe[213]+ _0x47f2x5,_0x47f2xa=0,_0x47f2x12=_0x47f2x9+ _0x1bfe[213]+ _0x47f2xa;null!= document[_0x1bfe[1362]](_0x47f2x12);){_0x47f2x12= _0x47f2x9+ _0x1bfe[213]+ ++_0x47f2xa};clip= this[_0x1bfe[55]](_0x1bfe[1439]);clip[_0x1bfe[57]](_0x1bfe[1363],_0x47f2x12);_0x47f2x9= this[_0x1bfe[55]](_0x1bfe[1319]);_0x47f2x9[_0x1bfe[57]](_0x1bfe[235],_0x47f2x2);_0x47f2x9[_0x1bfe[57]](_0x1bfe[236],_0x47f2x3);_0x47f2x9[_0x1bfe[57]](_0x1bfe[117],_0x47f2x4);_0x47f2x9[_0x1bfe[57]](_0x1bfe[119],_0x47f2x5);clip[_0x1bfe[62]](_0x47f2x9);return clip};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1436]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15,_0x47f2x16){_0x47f2x16= null!= _0x47f2x16?_0x47f2x16:0;_0x47f2x13= this[_0x1bfe[724]];var _0x47f2x17=Math[_0x1bfe[488]](_0x47f2x13[_0x1bfe[487]]),_0x47f2x18=this[_0x1bfe[55]](_0x1bfe[449]),_0x47f2x19=_0x47f2x13[_0x1bfe[535]]|| _0x1bfe[110];0!= _0x47f2x16&& (_0x47f2x19+= _0x1bfe[1394]+ _0x47f2x16+ _0x1bfe[537]+ this[_0x1bfe[1239]](_0x47f2x2* _0x47f2x13[_0x1bfe[255]])+ _0x1bfe[537]+ this[_0x1bfe[1239]](_0x47f2x3* _0x47f2x13[_0x1bfe[255]])+ _0x1bfe[460]);if(_0x47f2x15&& 0< _0x47f2x4&& 0< _0x47f2x5){var _0x47f2x1a=_0x47f2x2;_0x47f2x16= _0x47f2x3;_0x47f2xa== mxConstants[_0x1bfe[479]]?_0x47f2x1a-= _0x47f2x4/ 2:_0x47f2xa== mxConstants[_0x1bfe[480]]&& (_0x47f2x1a-= _0x47f2x4);_0x47f2x12== mxConstants[_0x1bfe[481]]?_0x47f2x16-= _0x47f2x5/ 2:_0x47f2x12== mxConstants[_0x1bfe[482]]&& (_0x47f2x16-= _0x47f2x5);_0x47f2x16= this[_0x1bfe[1437]](_0x47f2x1a* _0x47f2x13[_0x1bfe[255]]- 2,_0x47f2x16* _0x47f2x13[_0x1bfe[255]]- 2,_0x47f2x4* _0x47f2x13[_0x1bfe[255]]+ 4,_0x47f2x5* _0x47f2x13[_0x1bfe[255]]+ 4);null!= this[_0x1bfe[1340]]?this[_0x1bfe[1340]][_0x1bfe[62]](_0x47f2x16):this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x16);_0x47f2x18[_0x1bfe[57]](_0x1bfe[1440],_0x1bfe[1380]+ _0x47f2x16[_0x1bfe[284]](_0x1bfe[1363])+ _0x1bfe[460])};this[_0x1bfe[1441]](_0x47f2x18,_0x47f2xa);_0x47f2x16= _0x47f2xa== mxConstants[_0x1bfe[480]]?_0x1bfe[1282]:_0x47f2xa== mxConstants[_0x1bfe[479]]?_0x1bfe[554]:_0x1bfe[861];_0x1bfe[861]!= _0x47f2x16&& _0x47f2x18[_0x1bfe[57]](_0x1bfe[1442],_0x47f2x16);(!this[_0x1bfe[1341]]|| _0x47f2x17!= mxConstants[_0x1bfe[483]])&& _0x47f2x18[_0x1bfe[57]](_0x1bfe[1443],Math[_0x1bfe[488]](_0x47f2x17* _0x47f2x13[_0x1bfe[255]])+ _0x1bfe[168]);0< _0x47f2x19[_0x1bfe[67]]&& _0x47f2x18[_0x1bfe[57]](_0x1bfe[535],_0x47f2x19);1> _0x47f2x13[_0x1bfe[1244]]&& _0x47f2x18[_0x1bfe[57]](_0x1bfe[461],_0x47f2x13[_0x1bfe[1244]]);var _0x47f2x19=_0x47f2x9[_0x1bfe[224]](_0x1bfe[192]),_0x47f2x1a=Math[_0x1bfe[488]](_0x47f2x17* mxConstants[_0x1bfe[490]]),_0x47f2x1b=_0x47f2x17+ (_0x47f2x19[_0x1bfe[67]]- 1)* _0x47f2x1a;_0x47f2x16= _0x47f2x3+ _0x47f2x17- 1;_0x47f2x12== mxConstants[_0x1bfe[481]]?(_0x47f2x5= (this[_0x1bfe[1343]]&& _0x47f2x15&& 0< _0x47f2x5?Math[_0x1bfe[243]](_0x47f2x1b,_0x47f2x5):_0x47f2x1b)/ 2,_0x47f2x16-= _0x47f2x5+ 1):_0x47f2x12== mxConstants[_0x1bfe[482]]&& (_0x47f2x5= this[_0x1bfe[1343]]&& _0x47f2x15&& 0< _0x47f2x5?Math[_0x1bfe[243]](_0x47f2x1b,_0x47f2x5):_0x47f2x1b,_0x47f2x16-= _0x47f2x5+ 2);for(_0x47f2x5= 0;_0x47f2x5< _0x47f2x19[_0x1bfe[67]];_0x47f2x5++){0< _0x47f2x19[_0x47f2x5][_0x1bfe[67]]&& 0< mxUtils[_0x1bfe[330]](_0x47f2x19[_0x47f2x5])[_0x1bfe[67]]&& (_0x47f2x15= this[_0x1bfe[55]](_0x1bfe[963]),_0x47f2x15[_0x1bfe[57]](_0x1bfe[235],this[_0x1bfe[1239]](_0x47f2x2* _0x47f2x13[_0x1bfe[255]])),_0x47f2x15[_0x1bfe[57]](_0x1bfe[236],this[_0x1bfe[1239]](_0x47f2x16* _0x47f2x13[_0x1bfe[255]])),mxUtils[_0x1bfe[53]](_0x47f2x15,_0x47f2x19[_0x47f2x5]),_0x47f2x18[_0x1bfe[62]](_0x47f2x15)),_0x47f2x16+= _0x47f2x1a};this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x18);this[_0x1bfe[1444]](_0x47f2x18,_0x47f2x9,_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x1b,_0x47f2xa,_0x47f2x12,_0x47f2x14)};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1441]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[724]];_0x47f2x2[_0x1bfe[57]](_0x1bfe[1334],_0x47f2x3[_0x1bfe[665]]);(!this[_0x1bfe[1341]]|| _0x47f2x3[_0x1bfe[486]]!= mxConstants[_0x1bfe[484]])&& _0x47f2x2[_0x1bfe[57]](_0x1bfe[1445],_0x47f2x3[_0x1bfe[486]]);(_0x47f2x3[_0x1bfe[666]]& mxConstants[_0x1bfe[1410]])== mxConstants[_0x1bfe[1410]]&& _0x47f2x2[_0x1bfe[57]](_0x1bfe[1446],_0x1bfe[1447]);(_0x47f2x3[_0x1bfe[666]]& mxConstants[_0x1bfe[1412]])== mxConstants[_0x1bfe[1412]]&& _0x47f2x2[_0x1bfe[57]](_0x1bfe[1448],_0x1bfe[1449]);(_0x47f2x3[_0x1bfe[666]]& mxConstants[_0x1bfe[1414]])== mxConstants[_0x1bfe[1414]]&& _0x47f2x2[_0x1bfe[57]](_0x1bfe[1450],_0x1bfe[355])};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1444]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14){var _0x47f2x15=this[_0x1bfe[724]];if(null!= _0x47f2x15[_0x1bfe[1261]]|| null!= _0x47f2x15[_0x1bfe[1263]]){var _0x47f2x16=null;_0x47f2x14?(_0x47f2x12== mxConstants[_0x1bfe[479]]?_0x47f2x4-= _0x47f2x9/ 2:_0x47f2x12== mxConstants[_0x1bfe[480]]&& (_0x47f2x4-= _0x47f2x9),_0x47f2x13== mxConstants[_0x1bfe[481]]?_0x47f2x5-= _0x47f2xa/ 2:_0x47f2x13== mxConstants[_0x1bfe[482]]&& (_0x47f2x5-= _0x47f2xa),_0x47f2x16= new mxRectangle((_0x47f2x4+ 1)* _0x47f2x15[_0x1bfe[255]],_0x47f2x5* _0x47f2x15[_0x1bfe[255]],(_0x47f2x9- 2)* _0x47f2x15[_0x1bfe[255]],(_0x47f2xa+ 2)* _0x47f2x15[_0x1bfe[255]])):null!= _0x47f2x2[_0x1bfe[1451]]&& this[_0x1bfe[813]][_0x1bfe[295]]== document?(_0x47f2x16= _0x47f2x2[_0x1bfe[1451]](),_0x47f2x3= mxClient[_0x1bfe[80]]&& mxClient[_0x1bfe[48]],_0x47f2x16= new mxRectangle(_0x47f2x16[_0x1bfe[235]],_0x47f2x16[_0x1bfe[236]]+ (_0x47f2x3?0:1),_0x47f2x16[_0x1bfe[117]],_0x47f2x16[_0x1bfe[119]]+ (_0x47f2x3?1:0))):(_0x47f2x16= document[_0x1bfe[55]](_0x1bfe[485]),_0x47f2x16[_0x1bfe[124]][_0x1bfe[489]]= Math[_0x1bfe[488]](_0x47f2x15[_0x1bfe[487]]* mxConstants[_0x1bfe[490]])+ _0x1bfe[168],_0x47f2x16[_0x1bfe[124]][_0x1bfe[487]]= Math[_0x1bfe[488]](_0x47f2x15[_0x1bfe[487]])+ _0x1bfe[168],_0x47f2x16[_0x1bfe[124]][_0x1bfe[486]]= _0x47f2x15[_0x1bfe[486]],_0x47f2x16[_0x1bfe[124]][_0x1bfe[493]]= _0x1bfe[494],_0x47f2x16[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492],_0x47f2x16[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188],_0x47f2x16[_0x1bfe[124]][_0x1bfe[495]]= mxClient[_0x1bfe[496]]?_0x1bfe[497]:_0x1bfe[498],_0x47f2x16[_0x1bfe[124]][_0x1bfe[499]]= _0x1bfe[500],(_0x47f2x15[_0x1bfe[666]]& mxConstants[_0x1bfe[1410]])== mxConstants[_0x1bfe[1410]]&& (_0x47f2x16[_0x1bfe[124]][_0x1bfe[1452]]= _0x1bfe[1447]),(_0x47f2x15[_0x1bfe[666]]& mxConstants[_0x1bfe[1412]])== mxConstants[_0x1bfe[1412]]&& (_0x47f2x16[_0x1bfe[124]][_0x1bfe[666]]= _0x1bfe[1449]),_0x47f2x3= mxUtils[_0x1bfe[321]](_0x47f2x3,!1),_0x47f2x16[_0x1bfe[339]]= _0x47f2x3[_0x1bfe[230]](/\n/g,_0x1bfe[1453]),document[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x16),_0x47f2x9= _0x47f2x16[_0x1bfe[359]],_0x47f2xa= _0x47f2x16[_0x1bfe[167]],_0x47f2x16[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x16),_0x47f2x12== mxConstants[_0x1bfe[479]]?_0x47f2x4-= _0x47f2x9/ 2:_0x47f2x12== mxConstants[_0x1bfe[480]]&& (_0x47f2x4-= _0x47f2x9),_0x47f2x13== mxConstants[_0x1bfe[481]]?_0x47f2x5-= _0x47f2xa/ 2:_0x47f2x13== mxConstants[_0x1bfe[482]]&& (_0x47f2x5-= _0x47f2xa),_0x47f2x16= new mxRectangle((_0x47f2x4+ 1)* _0x47f2x15[_0x1bfe[255]],(_0x47f2x5+ 2)* _0x47f2x15[_0x1bfe[255]],_0x47f2x9* _0x47f2x15[_0x1bfe[255]],(_0x47f2xa+ 1)* _0x47f2x15[_0x1bfe[255]]));null!= _0x47f2x16&& (_0x47f2x3= this[_0x1bfe[55]](_0x1bfe[1319]),_0x47f2x3[_0x1bfe[57]](_0x1bfe[1334],_0x47f2x15[_0x1bfe[1261]]|| _0x1bfe[130]),_0x47f2x3[_0x1bfe[57]](_0x1bfe[1336],_0x47f2x15[_0x1bfe[1263]]|| _0x1bfe[130]),_0x47f2x3[_0x1bfe[57]](_0x1bfe[235],Math[_0x1bfe[519]](_0x47f2x16[_0x1bfe[235]]- 1)),_0x47f2x3[_0x1bfe[57]](_0x1bfe[236],Math[_0x1bfe[519]](_0x47f2x16[_0x1bfe[236]]- 1)),_0x47f2x3[_0x1bfe[57]](_0x1bfe[117],Math[_0x1bfe[430]](_0x47f2x16[_0x1bfe[117]]+ 2)),_0x47f2x3[_0x1bfe[57]](_0x1bfe[119],Math[_0x1bfe[430]](_0x47f2x16[_0x1bfe[119]])),_0x47f2x15= null!= _0x47f2x15[_0x1bfe[1263]]?Math[_0x1bfe[160]](1,this[_0x1bfe[1239]](_0x47f2x15[_0x1bfe[255]])):0,_0x47f2x3[_0x1bfe[57]](_0x1bfe[1382],_0x47f2x15),this[_0x1bfe[813]][_0x1bfe[295]]== document&& 1== mxUtils[_0x1bfe[1454]](_0x47f2x15,2)&& _0x47f2x3[_0x1bfe[57]](_0x1bfe[535],_0x1bfe[1455]),_0x47f2x2[_0x1bfe[950]](_0x47f2x3,_0x47f2x2[_0x1bfe[285]]))}};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1336]]= function(){this[_0x1bfe[1370]](!1,!0)};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1334]]= function(){this[_0x1bfe[1370]](!0,!1)};mxSvgCanvas2D[_0x1bfe[202]][_0x1bfe[1337]]= function(){this[_0x1bfe[1370]](!0,!0)};var mxVmlCanvas2D=function(_0x47f2x2){mxAbstractCanvas2D[_0x1bfe[239]](this);this[_0x1bfe[813]]= _0x47f2x2};mxUtils[_0x1bfe[1284]](mxVmlCanvas2D,mxAbstractCanvas2D);mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[252]]= null;mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1285]]= !0;mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1219]]= _0x1bfe[1456];mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1221]]= _0x1bfe[1457];mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1225]]= _0x1bfe[1458];mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1227]]= _0x1bfe[235];mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1459]]= _0x1bfe[110];mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1460]]= 1;mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1370]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[252]],_0x47f2x5=this[_0x1bfe[724]];if(null!= _0x47f2x4){if(_0x1bfe[253]== _0x47f2x4[_0x1bfe[301]]){if(null!= this[_0x1bfe[1215]]&& 0< this[_0x1bfe[1215]][_0x1bfe[67]]){_0x47f2x4[_0x1bfe[1215]]= this[_0x1bfe[1215]][_0x1bfe[234]](_0x1bfe[185])+ _0x1bfe[1461],_0x47f2x4[_0x1bfe[124]][_0x1bfe[117]]= this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[117]],_0x47f2x4[_0x1bfe[124]][_0x1bfe[119]]= this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[119]],_0x47f2x4[_0x1bfe[1462]]= parseInt(_0x47f2x4[_0x1bfe[124]][_0x1bfe[117]])+ _0x1bfe[185]+ parseInt(_0x47f2x4[_0x1bfe[124]][_0x1bfe[119]])}else {return}};_0x47f2x4[_0x1bfe[1463]]= this[_0x1bfe[1239]](Math[_0x1bfe[160]](1,_0x47f2x5[_0x1bfe[610]]* _0x47f2x5[_0x1bfe[255]]/ this[_0x1bfe[1460]]))+ _0x1bfe[168];_0x47f2x5[_0x1bfe[639]]&& this[_0x1bfe[813]][_0x1bfe[62]](this[_0x1bfe[1375]](_0x47f2x4,_0x47f2x2&& null!= _0x47f2x5[_0x1bfe[604]],_0x47f2x3&& null!= _0x47f2x5[_0x1bfe[608]]));_0x47f2x3&& null!= _0x47f2x5[_0x1bfe[608]]?(_0x47f2x4[_0x1bfe[1464]]= _0x1bfe[128],_0x47f2x4[_0x1bfe[1306]]= _0x47f2x5[_0x1bfe[608]]):_0x47f2x4[_0x1bfe[1464]]= _0x1bfe[308];_0x47f2x4[_0x1bfe[62]](this[_0x1bfe[1465]]());_0x47f2x2&& null!= _0x47f2x5[_0x1bfe[604]]?_0x47f2x4[_0x1bfe[62]](this[_0x1bfe[1466]]()):this[_0x1bfe[1229]]&& (_0x1bfe[253]!= _0x47f2x4[_0x1bfe[301]]|| this[_0x1bfe[1215]][this[_0x1bfe[1215]][_0x1bfe[67]]- 1]== this[_0x1bfe[1227]])?_0x47f2x4[_0x1bfe[62]](this[_0x1bfe[1467]]()):_0x47f2x4[_0x1bfe[1468]]= _0x1bfe[308];this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x4)}};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1467]]= function(){var _0x47f2x2=document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1469]);_0x47f2x2[_0x1bfe[390]]= mxClient[_0x1bfe[88]]+ _0x1bfe[1470];_0x47f2x2[_0x1bfe[60]]= _0x1bfe[1471];return _0x47f2x2};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1466]]= function(){var _0x47f2x2=this[_0x1bfe[724]],_0x47f2x3=document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1469]);_0x47f2x3[_0x1bfe[352]]= _0x47f2x2[_0x1bfe[604]];if(null!= _0x47f2x2[_0x1bfe[606]]){_0x47f2x3[_0x1bfe[60]]= _0x1bfe[1299];_0x47f2x3[_0x1bfe[865]]= _0x1bfe[130];_0x47f2x3[_0x1bfe[1472]]= _0x47f2x2[_0x1bfe[606]];var _0x47f2x4=180- _0x47f2x2[_0x1bfe[603]],_0x47f2x4=_0x47f2x2[_0x1bfe[607]]== mxConstants[_0x1bfe[1359]]?_0x47f2x4- (90+ (_0x1bfe[235]== this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[1473]]?180:0)):_0x47f2x2[_0x1bfe[607]]== mxConstants[_0x1bfe[1356]]?_0x47f2x4+ (90+ (_0x1bfe[235]== this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[1473]]?180:0)):_0x47f2x2[_0x1bfe[607]]== mxConstants[_0x1bfe[1358]]?_0x47f2x4- (180+ (_0x1bfe[236]== this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[1473]]?-180:0)):_0x47f2x4+ (_0x1bfe[236]== this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[1473]]?-180:0);if(_0x1bfe[235]== this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[1473]]|| _0x1bfe[236]== this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[1473]]){_0x47f2x4*= -1};_0x47f2x3[_0x1bfe[1474]]= mxUtils[_0x1bfe[1454]](_0x47f2x4,360);_0x47f2x3[_0x1bfe[461]]= 100* _0x47f2x2[_0x1bfe[1244]]* _0x47f2x2[_0x1bfe[1247]]+ _0x1bfe[229];_0x47f2x3[_0x1bfe[57]](mxClient[_0x1bfe[1475]]+ _0x1bfe[1476],100* _0x47f2x2[_0x1bfe[1244]]* _0x47f2x2[_0x1bfe[1248]]+ _0x1bfe[229])}else {1> _0x47f2x2[_0x1bfe[1244]]&& (_0x47f2x3[_0x1bfe[461]]= 100* _0x47f2x2[_0x1bfe[1244]]+ _0x1bfe[229])};return _0x47f2x3};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1465]]= function(){var _0x47f2x2=this[_0x1bfe[724]],_0x47f2x3=document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1477]);_0x47f2x3[_0x1bfe[1478]]= _0x47f2x2[_0x1bfe[1254]]|| _0x1bfe[1232];_0x47f2x3[_0x1bfe[1479]]= _0x47f2x2[_0x1bfe[1256]]|| _0x1bfe[1233];_0x47f2x3[_0x1bfe[1313]]= _0x47f2x2[_0x1bfe[1258]]|| _0x1bfe[1480];1> _0x47f2x2[_0x1bfe[1244]]&& (_0x47f2x3[_0x1bfe[461]]= 100* _0x47f2x2[_0x1bfe[1244]]+ _0x1bfe[229]);_0x47f2x2[_0x1bfe[648]]&& (_0x47f2x3[_0x1bfe[1481]]= this[_0x1bfe[1482]]());return _0x47f2x3};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1482]]= function(){var _0x47f2x2=_0x1bfe[1483];if(null!= this[_0x1bfe[724]][_0x1bfe[649]]){var _0x47f2x3=this[_0x1bfe[724]][_0x1bfe[649]][_0x1bfe[224]](_0x1bfe[185]);0< _0x47f2x3[_0x1bfe[67]]&& 1== _0x47f2x3[0]&& (_0x47f2x2= _0x1bfe[1484])};return _0x47f2x2};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1375]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[724]],_0x47f2x9=-_0x47f2x5[_0x1bfe[603]]* (Math[_0x1bfe[424]]/ 180),_0x47f2xa=Math[_0x1bfe[426]](_0x47f2x9),_0x47f2x9=Math[_0x1bfe[427]](_0x47f2x9),_0x47f2x12=_0x47f2x5[_0x1bfe[1273]]* _0x47f2x5[_0x1bfe[255]],_0x47f2x13=_0x47f2x5[_0x1bfe[1274]]* _0x47f2x5[_0x1bfe[255]];_0x1bfe[235]== this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[1473]]?_0x47f2x12*= -1:_0x1bfe[236]== this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[1473]]&& (_0x47f2x13*= -1);var _0x47f2x14=_0x47f2x2[_0x1bfe[511]](!0);_0x47f2x14[_0x1bfe[124]][_0x1bfe[945]]= Math[_0x1bfe[488]](_0x47f2x12* _0x47f2xa- _0x47f2x13* _0x47f2x9)+ _0x1bfe[168];_0x47f2x14[_0x1bfe[124]][_0x1bfe[953]]= Math[_0x1bfe[488]](_0x47f2x12* _0x47f2x9+ _0x47f2x13* _0x47f2xa)+ _0x1bfe[168];8== document[_0x1bfe[5]]&& (_0x47f2x14[_0x1bfe[1463]]= _0x47f2x2[_0x1bfe[1463]],_0x1bfe[253]== _0x47f2x2[_0x1bfe[301]]&& (_0x47f2x14[_0x1bfe[1215]]= this[_0x1bfe[1215]][_0x1bfe[234]](_0x1bfe[185])+ _0x1bfe[1461],_0x47f2x14[_0x1bfe[124]][_0x1bfe[117]]= this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[117]],_0x47f2x14[_0x1bfe[124]][_0x1bfe[119]]= this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[119]],_0x47f2x14[_0x1bfe[1462]]= parseInt(_0x47f2x2[_0x1bfe[124]][_0x1bfe[117]])+ _0x1bfe[185]+ parseInt(_0x47f2x2[_0x1bfe[124]][_0x1bfe[119]])));_0x47f2x4?(_0x47f2x14[_0x1bfe[1306]]= _0x47f2x5[_0x1bfe[1269]],_0x47f2x14[_0x1bfe[62]](this[_0x1bfe[1485]]())):_0x47f2x14[_0x1bfe[1464]]= _0x1bfe[308];_0x47f2x3?_0x47f2x14[_0x1bfe[62]](this[_0x1bfe[1486]]()):_0x47f2x14[_0x1bfe[1468]]= _0x1bfe[308];return _0x47f2x14};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1486]]= function(){var _0x47f2x2=document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1469]);_0x47f2x2[_0x1bfe[352]]= this[_0x1bfe[724]][_0x1bfe[1269]];_0x47f2x2[_0x1bfe[461]]= 100* this[_0x1bfe[724]][_0x1bfe[1244]]* this[_0x1bfe[724]][_0x1bfe[1271]]+ _0x1bfe[229];return _0x47f2x2};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1485]]= function(){var _0x47f2x2=this[_0x1bfe[1465]]();_0x47f2x2[_0x1bfe[461]]= 100* this[_0x1bfe[724]][_0x1bfe[1244]]* this[_0x1bfe[724]][_0x1bfe[1271]]+ _0x1bfe[229];return _0x47f2x2};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1294]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x3&& _0x47f2x4?_0x47f2x2+= 180:_0x47f2x3?this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[1473]]= _0x1bfe[235]:_0x47f2x4&& (this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[1473]]= _0x1bfe[236]);if(_0x47f2x3?!_0x47f2x4:_0x47f2x4){_0x47f2x2*= -1};this[_0x1bfe[813]][_0x1bfe[124]][_0x1bfe[603]]= _0x47f2x2;this[_0x1bfe[724]][_0x1bfe[603]]+= _0x47f2x2;this[_0x1bfe[724]][_0x1bfe[1395]]= _0x47f2x5;this[_0x1bfe[724]][_0x1bfe[1396]]= _0x47f2x9};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1275]]= function(){mxAbstractCanvas2D[_0x1bfe[202]][_0x1bfe[1275]][_0x1bfe[183]](this,arguments);this[_0x1bfe[252]]= document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1487]);this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492]};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1278]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=this[_0x1bfe[724]],_0x47f2xa=(this[_0x1bfe[1217]]+ _0x47f2x9[_0x1bfe[1126]])* _0x47f2x9[_0x1bfe[255]],_0x47f2x12=(this[_0x1bfe[1218]]+ _0x47f2x9[_0x1bfe[1125]])* _0x47f2x9[_0x1bfe[255]];_0x47f2x2= (_0x47f2x2+ _0x47f2x9[_0x1bfe[1126]])* _0x47f2x9[_0x1bfe[255]];_0x47f2x3= (_0x47f2x3+ _0x47f2x9[_0x1bfe[1125]])* _0x47f2x9[_0x1bfe[255]];_0x47f2x4= (_0x47f2x4+ _0x47f2x9[_0x1bfe[1126]])* _0x47f2x9[_0x1bfe[255]];_0x47f2x5= (_0x47f2x5+ _0x47f2x9[_0x1bfe[1125]])* _0x47f2x9[_0x1bfe[255]];var _0x47f2x12=_0x47f2x12+ 2/ 3* (_0x47f2x3- _0x47f2x12),_0x47f2x13=_0x47f2x4+ 2/ 3* (_0x47f2x2- _0x47f2x4);_0x47f2x3= _0x47f2x5+ 2/ 3* (_0x47f2x3- _0x47f2x5);this[_0x1bfe[1215]][_0x1bfe[207]](_0x1bfe[1488]+ this[_0x1bfe[1239]](_0x47f2xa+ 2/ 3* (_0x47f2x2- _0x47f2xa))+ _0x1bfe[185]+ this[_0x1bfe[1239]](_0x47f2x12)+ _0x1bfe[185]+ this[_0x1bfe[1239]](_0x47f2x13)+ _0x1bfe[185]+ this[_0x1bfe[1239]](_0x47f2x3)+ _0x1bfe[185]+ this[_0x1bfe[1239]](_0x47f2x4)+ _0x1bfe[185]+ this[_0x1bfe[1239]](_0x47f2x5));this[_0x1bfe[1217]]= _0x47f2x4/ _0x47f2x9[_0x1bfe[255]]- _0x47f2x9[_0x1bfe[1126]];this[_0x1bfe[1218]]= _0x47f2x5/ _0x47f2x9[_0x1bfe[255]]- _0x47f2x9[_0x1bfe[1125]]};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1489]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=this[_0x1bfe[724]];_0x47f2x2= document[_0x1bfe[55]](_0x47f2x2);_0x47f2x2[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];_0x47f2x2[_0x1bfe[124]][_0x1bfe[361]]= this[_0x1bfe[1239]]((_0x47f2x3+ _0x47f2xa[_0x1bfe[1126]])* _0x47f2xa[_0x1bfe[255]])+ _0x1bfe[168];_0x47f2x2[_0x1bfe[124]][_0x1bfe[125]]= this[_0x1bfe[1239]]((_0x47f2x4+ _0x47f2xa[_0x1bfe[1125]])* _0x47f2xa[_0x1bfe[255]])+ _0x1bfe[168];_0x47f2x2[_0x1bfe[124]][_0x1bfe[117]]= this[_0x1bfe[1239]](_0x47f2x5* _0x47f2xa[_0x1bfe[255]])+ _0x1bfe[168];_0x47f2x2[_0x1bfe[124]][_0x1bfe[119]]= this[_0x1bfe[1239]](_0x47f2x9* _0x47f2xa[_0x1bfe[255]])+ _0x1bfe[168];return _0x47f2x2};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1319]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[252]]= this[_0x1bfe[1489]](mxClient[_0x1bfe[463]]+ _0x1bfe[1490],_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5)};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1320]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){this[_0x1bfe[252]]= this[_0x1bfe[1489]](mxClient[_0x1bfe[463]]+ _0x1bfe[1491],_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5);this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1492],Math[_0x1bfe[160]](100* _0x47f2x9/ _0x47f2x4,100* _0x47f2xa/ _0x47f2x5)+ _0x1bfe[229])};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[680]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[252]]= this[_0x1bfe[1489]](mxClient[_0x1bfe[463]]+ _0x1bfe[1493],_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5)};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[618]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13){var _0x47f2x14=null;_0x47f2xa?(_0x47f2x14= this[_0x1bfe[1489]](mxClient[_0x1bfe[463]]+ _0x1bfe[1490],_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5),_0x47f2x14[_0x1bfe[1464]]= _0x1bfe[308],_0x47f2x2= document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1469]),_0x47f2x2[_0x1bfe[1322]]= _0x47f2xa?_0x1bfe[1494]:_0x1bfe[1495],_0x47f2x2[_0x1bfe[1294]]= _0x1bfe[128],_0x47f2x2[_0x1bfe[60]]= _0x1bfe[1496],_0x47f2x2[_0x1bfe[390]]= _0x47f2x9,_0x47f2x14[_0x1bfe[62]](_0x47f2x2)):(_0x47f2x14= this[_0x1bfe[1489]](mxClient[_0x1bfe[463]]+ _0x1bfe[464],_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5),_0x47f2x14[_0x1bfe[390]]= _0x47f2x9);_0x47f2x12&& _0x47f2x13?_0x47f2x14[_0x1bfe[124]][_0x1bfe[603]]= _0x1bfe[1497]:_0x47f2x12?_0x47f2x14[_0x1bfe[124]][_0x1bfe[1473]]= _0x1bfe[235]:_0x47f2x13&& (_0x47f2x14[_0x1bfe[124]][_0x1bfe[1473]]= _0x1bfe[236]);1> this[_0x1bfe[724]][_0x1bfe[1244]]&& (_0x47f2x14[_0x1bfe[124]][_0x1bfe[347]]+= _0x1bfe[459]+ 100* this[_0x1bfe[724]][_0x1bfe[1244]]+ _0x1bfe[460]);this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x14)};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1404]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x4= document[_0x1bfe[55]](_0x1bfe[485]);var _0x47f2x9=this[_0x1bfe[724]],_0x47f2xa=_0x1bfe[110];null!= _0x47f2x9[_0x1bfe[1261]]&& (_0x47f2xa+= _0x1bfe[1418]+ _0x47f2x9[_0x1bfe[1261]]+ _0x1bfe[471]);null!= _0x47f2x9[_0x1bfe[1263]]&& (_0x47f2xa+= _0x1bfe[1419]+ _0x47f2x9[_0x1bfe[1263]]+ _0x1bfe[471]);mxUtils[_0x1bfe[1331]](_0x47f2x2)?_0x47f2x4[_0x1bfe[62]](_0x47f2x2):0< _0x47f2xa[_0x1bfe[67]]&& !_0x47f2x5?(_0x47f2x5= document[_0x1bfe[55]](_0x1bfe[485]),_0x47f2x5[_0x1bfe[124]][_0x1bfe[103]]= _0x47f2xa,_0x47f2x5[_0x1bfe[124]][_0x1bfe[495]]= mxClient[_0x1bfe[496]]?_0x1bfe[497]:_0x1bfe[498],_0x47f2x5[_0x1bfe[124]][_0x1bfe[499]]= _0x1bfe[500],_0x47f2x5[_0x1bfe[339]]= _0x47f2x2,_0x47f2x4[_0x1bfe[62]](_0x47f2x5)):(_0x47f2x4[_0x1bfe[124]][_0x1bfe[103]]= _0x47f2xa,_0x47f2x4[_0x1bfe[339]]= _0x47f2x2);_0x47f2x2= _0x47f2x4[_0x1bfe[124]];_0x47f2x2[_0x1bfe[487]]= Math[_0x1bfe[488]](_0x47f2x9[_0x1bfe[487]]/ this[_0x1bfe[1460]])+ _0x1bfe[168];_0x47f2x2[_0x1bfe[486]]= _0x47f2x9[_0x1bfe[486]];_0x47f2x2[_0x1bfe[352]]= _0x47f2x9[_0x1bfe[665]];_0x47f2x2[_0x1bfe[123]]= _0x1bfe[125];_0x47f2x2[_0x1bfe[1165]]= _0x47f2x3|| _0x1bfe[361];_0x47f2x2[_0x1bfe[489]]= Math[_0x1bfe[488]](_0x47f2x9[_0x1bfe[487]]* mxConstants[_0x1bfe[490]]/ this[_0x1bfe[1460]])+ _0x1bfe[168];(_0x47f2x9[_0x1bfe[666]]& mxConstants[_0x1bfe[1410]])== mxConstants[_0x1bfe[1410]]&& (_0x47f2x2[_0x1bfe[1452]]= _0x1bfe[1447]);(_0x47f2x9[_0x1bfe[666]]& mxConstants[_0x1bfe[1412]])== mxConstants[_0x1bfe[1412]]&& (_0x47f2x2[_0x1bfe[666]]= _0x1bfe[1449]);(_0x47f2x9[_0x1bfe[666]]& mxConstants[_0x1bfe[1414]])== mxConstants[_0x1bfe[1414]]&& (_0x47f2x2[_0x1bfe[1498]]= _0x1bfe[355]);return _0x47f2x4};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[963]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15,_0x47f2x16,_0x47f2x17){if(this[_0x1bfe[1285]]&& null!= _0x47f2x9){var _0x47f2x18=this[_0x1bfe[724]];if(_0x1bfe[1428]== _0x47f2x14){null!= _0x47f2x18[_0x1bfe[603]]&& (_0x47f2x3= this[_0x1bfe[1241]](_0x47f2x2,_0x47f2x3,_0x47f2x18[_0x1bfe[603]],_0x47f2x18[_0x1bfe[1395]],_0x47f2x18[_0x1bfe[1396]]),_0x47f2x2= _0x47f2x3[_0x1bfe[235]],_0x47f2x3= _0x47f2x3[_0x1bfe[236]]);8== document[_0x1bfe[5]]?(_0x47f2x2+= _0x47f2x18[_0x1bfe[1126]],_0x47f2x3+= _0x47f2x18[_0x1bfe[1125]]):(_0x47f2x2*= _0x47f2x18[_0x1bfe[255]],_0x47f2x3*= _0x47f2x18[_0x1bfe[255]]);_0x47f2x14= 8== document[_0x1bfe[5]]?document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1499]):document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x14[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];_0x47f2x14[_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[497];_0x47f2x14[_0x1bfe[124]][_0x1bfe[361]]= this[_0x1bfe[1239]](_0x47f2x2)+ _0x1bfe[168];_0x47f2x14[_0x1bfe[124]][_0x1bfe[125]]= this[_0x1bfe[1239]](_0x47f2x3)+ _0x1bfe[168];_0x47f2x14[_0x1bfe[124]][_0x1bfe[499]]= _0x47f2x18[_0x1bfe[255]];var _0x47f2x19=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x19[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[1500];_0x47f2x19[_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[497];var _0x47f2x1a=mxUtils[_0x1bfe[1501]](_0x47f2xa,_0x47f2x12),_0x47f2x1b=_0x47f2x1a[_0x1bfe[235]],_0x47f2x1a=_0x47f2x1a[_0x1bfe[236]];_0x47f2x9= this[_0x1bfe[1404]](_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x15);_0x47f2xa= document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x13?(!_0x47f2x16&& 0< _0x47f2x4&& (_0x47f2x9[_0x1bfe[124]][_0x1bfe[117]]= Math[_0x1bfe[488]](_0x47f2x4)+ _0x1bfe[168]),_0x47f2x9[_0x1bfe[124]][_0x1bfe[493]]= _0x1bfe[1502]):_0x47f2x9[_0x1bfe[124]][_0x1bfe[493]]= _0x1bfe[494];_0x47f2x13= _0x47f2x18[_0x1bfe[603]]+ (_0x47f2x17|| 0);this[_0x1bfe[1216]]&& 0!= _0x47f2x13?(_0x47f2xa[_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[497],_0x47f2xa[_0x1bfe[124]][_0x1bfe[499]]= _0x1bfe[500],_0x47f2xa[_0x1bfe[62]](_0x47f2x9),8== document[_0x1bfe[5]]&& _0x1bfe[529]!= this[_0x1bfe[813]][_0x1bfe[301]]?(_0x47f2x19[_0x1bfe[62]](_0x47f2xa),_0x47f2x14[_0x1bfe[62]](_0x47f2x19)):_0x47f2x14[_0x1bfe[62]](_0x47f2xa)):8== document[_0x1bfe[5]]?(_0x47f2x19[_0x1bfe[62]](_0x47f2x9),_0x47f2x14[_0x1bfe[62]](_0x47f2x19)):(_0x47f2x9[_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[497],_0x47f2x14[_0x1bfe[62]](_0x47f2x9));_0x1bfe[529]!= this[_0x1bfe[813]][_0x1bfe[301]]?(_0x47f2x17= document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1490]),_0x47f2x17[_0x1bfe[1464]]= _0x1bfe[308],_0x47f2x17[_0x1bfe[1468]]= _0x1bfe[308],_0x47f2x17[_0x1bfe[62]](_0x47f2x14),this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x17)):this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x14);_0x47f2x16?(_0x47f2x9[_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[188],0< _0x47f2x4&& (_0x47f2x9[_0x1bfe[124]][_0x1bfe[117]]= Math[_0x1bfe[488]](_0x47f2x4)+ _0x1bfe[168]),0< _0x47f2x5&& 8== document[_0x1bfe[5]]&& (_0x47f2x9[_0x1bfe[124]][_0x1bfe[1503]]= Math[_0x1bfe[488]](_0x47f2x5)+ _0x1bfe[168])):_0x47f2x15&& (_0x47f2x9[_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x4+ _0x1bfe[168],0< _0x47f2x5&& (_0x47f2x9[_0x1bfe[124]][_0x1bfe[1503]]= Math[_0x1bfe[488]](_0x47f2x5)+ _0x1bfe[168]));if(this[_0x1bfe[1216]]&& 0!= _0x47f2x13){_0x47f2x4= _0x47f2x13* (Math[_0x1bfe[424]]/ 180);_0x47f2x13= parseFloat(parseFloat(Math[_0x1bfe[426]](_0x47f2x4))[_0x1bfe[1293]](8));_0x47f2x17= parseFloat(parseFloat(Math[_0x1bfe[427]](-_0x47f2x4))[_0x1bfe[1293]](8));_0x47f2x4%= 2* Math[_0x1bfe[424]];0> _0x47f2x4&& (_0x47f2x4+= 2* Math[_0x1bfe[424]]);_0x47f2x4%= Math[_0x1bfe[424]];_0x47f2x4> Math[_0x1bfe[424]]/ 2&& (_0x47f2x4= Math[_0x1bfe[424]]- _0x47f2x4);_0x47f2x12= Math[_0x1bfe[426]](_0x47f2x4);var _0x47f2x1c=Math[_0x1bfe[427]](_0x47f2x4);8== document[_0x1bfe[5]]&& (_0x47f2x9[_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[498],_0x47f2xa[_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[498],_0x47f2x19[_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[498]);_0x47f2x9[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188];document[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x9);_0x47f2x4= _0x47f2x9[_0x1bfe[359]];_0x47f2x19= _0x47f2x9[_0x1bfe[167]];if(mxClient[_0x1bfe[496]]&& (_0x47f2x16|| _0x47f2x15)&& _0x47f2x19> _0x47f2x5){_0x47f2x19= _0x47f2x5,_0x47f2x9[_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x19+ _0x1bfe[168]};_0x47f2x5= _0x47f2x19;_0x47f2x16= (_0x47f2x5- _0x47f2x5* _0x47f2x12+ _0x47f2x4* -_0x47f2x1c)/ 2- _0x47f2x17* _0x47f2x4* (_0x47f2x1b+ 0.5)+ _0x47f2x13* _0x47f2x5* (_0x47f2x1a+ 0.5);_0x47f2x15= (_0x47f2x4- _0x47f2x4* _0x47f2x12+ _0x47f2x5* -_0x47f2x1c)/ 2+ _0x47f2x13* _0x47f2x4* (_0x47f2x1b+ 0.5)+ _0x47f2x17* _0x47f2x5* (_0x47f2x1a+ 0.5);_0x1bfe[1504]== _0x47f2x14[_0x1bfe[301]]&& _0x1bfe[529]== this[_0x1bfe[813]][_0x1bfe[301]]?(_0x47f2x1b= document[_0x1bfe[55]](_0x1bfe[485]),_0x47f2x1b[_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[498],_0x47f2x1b[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492],_0x47f2x1b[_0x1bfe[124]][_0x1bfe[361]]= this[_0x1bfe[1239]](_0x47f2x2+ (_0x47f2x15- _0x47f2x4/ 2)* _0x47f2x18[_0x1bfe[255]])+ _0x1bfe[168],_0x47f2x1b[_0x1bfe[124]][_0x1bfe[125]]= this[_0x1bfe[1239]](_0x47f2x3+ (_0x47f2x16- _0x47f2x5/ 2)* _0x47f2x18[_0x1bfe[255]])+ _0x1bfe[168],_0x47f2x14[_0x1bfe[265]][_0x1bfe[62]](_0x47f2x1b),_0x47f2x1b[_0x1bfe[62]](_0x47f2x14)):(_0x47f2x18= 8== document[_0x1bfe[5]]?1:_0x47f2x18[_0x1bfe[255]],_0x47f2x14[_0x1bfe[124]][_0x1bfe[361]]= this[_0x1bfe[1239]](_0x47f2x2+ (_0x47f2x15- _0x47f2x4/ 2)* _0x47f2x18)+ _0x1bfe[168],_0x47f2x14[_0x1bfe[124]][_0x1bfe[125]]= this[_0x1bfe[1239]](_0x47f2x3+ (_0x47f2x16- _0x47f2x5/ 2)* _0x47f2x18)+ _0x1bfe[168]);_0x47f2xa[_0x1bfe[124]][_0x1bfe[347]]= _0x1bfe[1505]+ _0x47f2x13+ _0x1bfe[1506]+ _0x47f2x17+ _0x1bfe[1507]+ -_0x47f2x17+ _0x1bfe[1508]+ _0x47f2x13+ _0x1bfe[1509];_0x47f2xa[_0x1bfe[124]][_0x1bfe[1028]]= this[_0x1bfe[1459]];1> this[_0x1bfe[724]][_0x1bfe[1244]]&& (_0x47f2xa[_0x1bfe[124]][_0x1bfe[347]]+= _0x1bfe[459]+ 100* this[_0x1bfe[724]][_0x1bfe[1244]]+ _0x1bfe[460]);_0x47f2x9[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[110];_0x47f2xa[_0x1bfe[62]](_0x47f2x9)}else {8!= document[_0x1bfe[5]]?(_0x47f2x9[_0x1bfe[124]][_0x1bfe[123]]= _0x1bfe[125],1> this[_0x1bfe[724]][_0x1bfe[1244]]&& (_0x47f2x14[_0x1bfe[124]][_0x1bfe[347]]= _0x1bfe[459]+ 100* this[_0x1bfe[724]][_0x1bfe[1244]]+ _0x1bfe[460]),_0x47f2x18= _0x47f2x9[_0x1bfe[265]],_0x47f2x9[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188],document[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x9),_0x47f2x4= _0x47f2x9[_0x1bfe[359]],_0x47f2x19= _0x47f2x9[_0x1bfe[167]],mxClient[_0x1bfe[496]]&& (_0x47f2x16&& _0x47f2x19> _0x47f2x5)&& (_0x47f2x19= _0x47f2x5,_0x47f2x9[_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x19+ _0x1bfe[168]),_0x47f2x5= _0x47f2x19,_0x47f2x9[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[110],_0x47f2x18[_0x1bfe[62]](_0x47f2x9),_0x47f2x14[_0x1bfe[124]][_0x1bfe[361]]= this[_0x1bfe[1239]](_0x47f2x2+ _0x47f2x4* _0x47f2x1b* this[_0x1bfe[724]][_0x1bfe[255]])+ _0x1bfe[168],_0x47f2x14[_0x1bfe[124]][_0x1bfe[125]]= this[_0x1bfe[1239]](_0x47f2x3+ _0x47f2x5* _0x47f2x1a* this[_0x1bfe[724]][_0x1bfe[255]])+ _0x1bfe[168]):(1> this[_0x1bfe[724]][_0x1bfe[1244]]&& (_0x47f2x9[_0x1bfe[124]][_0x1bfe[347]]= _0x1bfe[459]+ 100* this[_0x1bfe[724]][_0x1bfe[1244]]+ _0x1bfe[460]),_0x47f2x19[_0x1bfe[124]][_0x1bfe[361]]= 100* _0x47f2x1b+ _0x1bfe[229],_0x47f2x19[_0x1bfe[124]][_0x1bfe[125]]= 100* _0x47f2x1a+ _0x1bfe[229])}}else {this[_0x1bfe[1436]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,mxUtils[_0x1bfe[321]](_0x47f2x9,!1),_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15,_0x47f2x16,_0x47f2x17)}}};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1436]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15,_0x47f2x16,_0x47f2x17){_0x47f2x5= this[_0x1bfe[724]];_0x47f2x2= (_0x47f2x2+ _0x47f2x5[_0x1bfe[1126]])* _0x47f2x5[_0x1bfe[255]];_0x47f2x3= (_0x47f2x3+ _0x47f2x5[_0x1bfe[1125]])* _0x47f2x5[_0x1bfe[255]];_0x47f2x4= document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1487]);_0x47f2x4[_0x1bfe[124]][_0x1bfe[117]]= _0x1bfe[942];_0x47f2x4[_0x1bfe[124]][_0x1bfe[119]]= _0x1bfe[942];_0x47f2x4[_0x1bfe[1464]]= _0x1bfe[308];_0x47f2x15= document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1469]);_0x47f2x15[_0x1bfe[352]]= _0x47f2x5[_0x1bfe[665]];_0x47f2x15[_0x1bfe[461]]= 100* _0x47f2x5[_0x1bfe[1244]]+ _0x1bfe[229];_0x47f2x4[_0x1bfe[62]](_0x47f2x15);_0x47f2x15= document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1510]);_0x47f2x15[_0x1bfe[1511]]= _0x1bfe[128];_0x47f2x15[_0x1bfe[6]]= _0x1bfe[1512]+ this[_0x1bfe[1239]](0)+ _0x1bfe[185]+ this[_0x1bfe[1239]](0)+ _0x1bfe[1513]+ this[_0x1bfe[1239]](1)+ _0x1bfe[185]+ this[_0x1bfe[1239]](0);_0x47f2x4[_0x1bfe[62]](_0x47f2x15);_0x47f2x15= document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1514]);_0x47f2x15[_0x1bfe[124]][_0x1bfe[103]]= _0x1bfe[1515]+ _0x47f2xa;_0x47f2x15[_0x1bfe[124]][_0x1bfe[611]]= _0x47f2xa;_0x47f2x15[_0x1bfe[124]][_0x1bfe[486]]= _0x47f2x5[_0x1bfe[486]];_0x47f2x15[_0x1bfe[1516]]= _0x47f2x9;_0x47f2x15[_0x1bfe[747]]= _0x1bfe[128];_0x47f2xa= Math[_0x1bfe[488]](_0x47f2x5[_0x1bfe[487]]* _0x47f2x5[_0x1bfe[255]]/ this[_0x1bfe[1460]]);_0x47f2x15[_0x1bfe[124]][_0x1bfe[487]]= _0x47f2xa+ _0x1bfe[168];(_0x47f2x5[_0x1bfe[666]]& mxConstants[_0x1bfe[1410]])== mxConstants[_0x1bfe[1410]]&& (_0x47f2x15[_0x1bfe[124]][_0x1bfe[1452]]= _0x1bfe[1447]);(_0x47f2x5[_0x1bfe[666]]& mxConstants[_0x1bfe[1412]])== mxConstants[_0x1bfe[1412]]&& (_0x47f2x15[_0x1bfe[124]][_0x1bfe[666]]= _0x1bfe[1449]);(_0x47f2x5[_0x1bfe[666]]& mxConstants[_0x1bfe[1414]])== mxConstants[_0x1bfe[1414]]&& (_0x47f2x15[_0x1bfe[124]][_0x1bfe[354]]= _0x1bfe[355]);_0x47f2x9= _0x47f2x9[_0x1bfe[224]](_0x1bfe[192]);_0x47f2x5= _0x47f2xa+ (_0x47f2x9[_0x1bfe[67]]- 1)* _0x47f2xa* mxConstants[_0x1bfe[490]];_0x47f2xa= _0x47f2x9= 0;_0x47f2x12== mxConstants[_0x1bfe[482]]?_0x47f2xa= -_0x47f2x5/ 2:_0x47f2x12!= mxConstants[_0x1bfe[481]]&& (_0x47f2xa= _0x47f2x5/ 2);null!= _0x47f2x17&& (_0x47f2x4[_0x1bfe[124]][_0x1bfe[603]]= _0x47f2x17,_0x47f2x12= _0x47f2x17* (Math[_0x1bfe[424]]/ 180),_0x47f2x9= Math[_0x1bfe[427]](_0x47f2x12)* _0x47f2xa,_0x47f2xa*= Math[_0x1bfe[426]](_0x47f2x12));_0x47f2x4[_0x1bfe[62]](_0x47f2x15);_0x47f2x4[_0x1bfe[124]][_0x1bfe[361]]= this[_0x1bfe[1239]](_0x47f2x2- _0x47f2x9)+ _0x1bfe[168];_0x47f2x4[_0x1bfe[124]][_0x1bfe[125]]= this[_0x1bfe[1239]](_0x47f2x3+ _0x47f2xa)+ _0x1bfe[168];this[_0x1bfe[813]][_0x1bfe[62]](_0x47f2x4)};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1336]]= function(){this[_0x1bfe[1370]](!1,!0)};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1334]]= function(){this[_0x1bfe[1370]](!0,!1)};mxVmlCanvas2D[_0x1bfe[202]][_0x1bfe[1337]]= function(){this[_0x1bfe[1370]](!0,!0)};function mxGuide(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1179]]= _0x47f2x2;this[_0x1bfe[1517]](_0x47f2x3)}mxGuide[_0x1bfe[202]][_0x1bfe[1179]]= null;mxGuide[_0x1bfe[202]][_0x1bfe[1214]]= null;mxGuide[_0x1bfe[202]][_0x1bfe[662]]= !0;mxGuide[_0x1bfe[202]][_0x1bfe[704]]= !0;mxGuide[_0x1bfe[202]][_0x1bfe[1518]]= null;mxGuide[_0x1bfe[202]][_0x1bfe[1519]]= null;mxGuide[_0x1bfe[202]][_0x1bfe[1517]]= function(_0x47f2x2){this[_0x1bfe[1214]]= _0x47f2x2};mxGuide[_0x1bfe[202]][_0x1bfe[1019]]= function(_0x47f2x2){return !0};mxGuide[_0x1bfe[202]][_0x1bfe[1520]]= function(){return this[_0x1bfe[1179]][_0x1bfe[1020]]* this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]]/ 2};mxGuide[_0x1bfe[202]][_0x1bfe[1521]]= function(_0x47f2x2){_0x47f2x2= new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);_0x47f2x2[_0x1bfe[1522]]= !0;return _0x47f2x2};mxGuide[_0x1bfe[202]][_0x1bfe[582]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(null!= this[_0x1bfe[1214]]&& (this[_0x1bfe[662]]|| this[_0x1bfe[704]])&& null!= _0x47f2x2&& null!= _0x47f2x3){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[513]],_0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2xa=_0x47f2x3[_0x1bfe[235]],_0x47f2x12=_0x47f2x3[_0x1bfe[236]],_0x47f2x13=!1,_0x47f2x14=!1,_0x47f2x15=this[_0x1bfe[1520]](),_0x47f2x16=_0x47f2x15,_0x47f2x17=_0x47f2x15,_0x47f2x15=_0x47f2x2[_0x1bfe[238]]();_0x47f2x15[_0x1bfe[235]]+= _0x47f2x3[_0x1bfe[235]];_0x47f2x15[_0x1bfe[236]]+= _0x47f2x3[_0x1bfe[236]];var _0x47f2x18=_0x47f2x15[_0x1bfe[235]],_0x47f2x19=_0x47f2x15[_0x1bfe[235]]+ _0x47f2x15[_0x1bfe[117]],_0x47f2x1a=_0x47f2x15[_0x1bfe[241]](),_0x47f2x1b=_0x47f2x15[_0x1bfe[236]],_0x47f2x1c=_0x47f2x15[_0x1bfe[236]]+ _0x47f2x15[_0x1bfe[119]],_0x47f2x1d=_0x47f2x15[_0x1bfe[242]]();_0x47f2x3= function(_0x47f2x3){_0x47f2x3+= this[_0x1bfe[1179]][_0x1bfe[1136]];var _0x47f2x4=!1;Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x1a)< _0x47f2x16?(_0x47f2xa= _0x47f2x3- _0x47f2x2[_0x1bfe[241]](),_0x47f2x16= Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x1a),_0x47f2x4= !0):Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x18)< _0x47f2x16?(_0x47f2xa= _0x47f2x3- _0x47f2x2[_0x1bfe[235]],_0x47f2x16= Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x18),_0x47f2x4= !0):Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x19)< _0x47f2x16&& (_0x47f2xa= _0x47f2x3- _0x47f2x2[_0x1bfe[235]]- _0x47f2x2[_0x1bfe[117]],_0x47f2x16= Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x19),_0x47f2x4= !0);if(_0x47f2x4){null== this[_0x1bfe[1518]]&& (this[_0x1bfe[1518]]= this[_0x1bfe[1521]](!0),this[_0x1bfe[1518]][_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[1523]]:mxConstants[_0x1bfe[508]],this[_0x1bfe[1518]][_0x1bfe[1229]]= !1,this[_0x1bfe[1518]][_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]()));var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[526]];_0x47f2x3-= this[_0x1bfe[1179]][_0x1bfe[1136]];this[_0x1bfe[1518]][_0x1bfe[1525]]= [ new mxPoint(_0x47f2x3,-this[_0x1bfe[1179]][_0x1bfe[1137]]), new mxPoint(_0x47f2x3,_0x47f2x5[_0x1bfe[191]]- 3- this[_0x1bfe[1179]][_0x1bfe[1137]])]};_0x47f2x13= _0x47f2x13|| _0x47f2x4};for(var _0x47f2x15=function(_0x47f2x3){_0x47f2x3+= this[_0x1bfe[1179]][_0x1bfe[1137]];var _0x47f2x4=!1;Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x1d)< _0x47f2x17?(_0x47f2x12= _0x47f2x3- _0x47f2x2[_0x1bfe[242]](),_0x47f2x17= Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x1d),_0x47f2x4= !0):Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x1b)< _0x47f2x17?(_0x47f2x12= _0x47f2x3- _0x47f2x2[_0x1bfe[236]],_0x47f2x17= Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x1b),_0x47f2x4= !0):Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x1c)< _0x47f2x17&& (_0x47f2x12= _0x47f2x3- _0x47f2x2[_0x1bfe[236]]- _0x47f2x2[_0x1bfe[119]],_0x47f2x17= Math[_0x1bfe[425]](_0x47f2x3- _0x47f2x1c),_0x47f2x4= !0);if(_0x47f2x4){null== this[_0x1bfe[1519]]&& (this[_0x1bfe[1519]]= this[_0x1bfe[1521]](!1),this[_0x1bfe[1519]][_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[1523]]:mxConstants[_0x1bfe[508]],this[_0x1bfe[1519]][_0x1bfe[1229]]= !1,this[_0x1bfe[1519]][_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]()));var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[526]];_0x47f2x3-= this[_0x1bfe[1179]][_0x1bfe[1137]];this[_0x1bfe[1519]][_0x1bfe[1525]]= [ new mxPoint(-this[_0x1bfe[1179]][_0x1bfe[1136]],_0x47f2x3), new mxPoint(_0x47f2x5[_0x1bfe[1526]]- 3- this[_0x1bfe[1179]][_0x1bfe[1136]],_0x47f2x3)]};_0x47f2x14= _0x47f2x14|| _0x47f2x4},_0x47f2x1e=0;_0x47f2x1e< this[_0x1bfe[1214]][_0x1bfe[67]];_0x47f2x1e++){var _0x47f2x1f=this[_0x1bfe[1214]][_0x47f2x1e];null!= _0x47f2x1f&& (this[_0x1bfe[662]]&& (_0x47f2x3[_0x1bfe[239]](this,_0x47f2x1f[_0x1bfe[241]]()),_0x47f2x3[_0x1bfe[239]](this,_0x47f2x1f[_0x1bfe[235]]),_0x47f2x3[_0x1bfe[239]](this,_0x47f2x1f[_0x1bfe[235]]+ _0x47f2x1f[_0x1bfe[117]])),this[_0x1bfe[704]]&& (_0x47f2x15[_0x1bfe[239]](this,_0x47f2x1f[_0x1bfe[242]]()),_0x47f2x15[_0x1bfe[239]](this,_0x47f2x1f[_0x1bfe[236]]),_0x47f2x15[_0x1bfe[239]](this,_0x47f2x1f[_0x1bfe[236]]+ _0x47f2x1f[_0x1bfe[119]])))};!_0x47f2x13&& null!= this[_0x1bfe[1518]]?this[_0x1bfe[1518]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188]:null!= this[_0x1bfe[1518]]&& (this[_0x1bfe[1518]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[189],this[_0x1bfe[1518]][_0x1bfe[258]]());!_0x47f2x14&& null!= this[_0x1bfe[1519]]?this[_0x1bfe[1519]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188]:null!= this[_0x1bfe[1519]]&& (this[_0x1bfe[1519]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[189],this[_0x1bfe[1519]][_0x1bfe[258]]());_0x47f2x4&& (_0x47f2x13|| (_0x47f2x4= _0x47f2x2[_0x1bfe[235]]- (this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x2[_0x1bfe[235]]/ _0x47f2x9- _0x47f2x5[_0x1bfe[235]])+ _0x47f2x5[_0x1bfe[235]])* _0x47f2x9,_0x47f2xa= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2xa/ _0x47f2x9)* _0x47f2x9- _0x47f2x4),_0x47f2x14|| (_0x47f2x5= _0x47f2x2[_0x1bfe[236]]- (this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x2[_0x1bfe[236]]/ _0x47f2x9- _0x47f2x5[_0x1bfe[236]])+ _0x47f2x5[_0x1bfe[236]])* _0x47f2x9,_0x47f2x12= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x12/ _0x47f2x9)* _0x47f2x9- _0x47f2x5));_0x47f2x3= new mxPoint(_0x47f2xa,_0x47f2x12)};return _0x47f2x3};mxGuide[_0x1bfe[202]][_0x1bfe[801]]= function(){null!= this[_0x1bfe[1518]]&& (this[_0x1bfe[1518]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188]);null!= this[_0x1bfe[1519]]&& (this[_0x1bfe[1519]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188])};mxGuide[_0x1bfe[202]][_0x1bfe[515]]= function(){null!= this[_0x1bfe[1518]]&& (this[_0x1bfe[1518]][_0x1bfe[515]](),this[_0x1bfe[1518]]= null);null!= this[_0x1bfe[1519]]&& (this[_0x1bfe[1519]][_0x1bfe[515]](),this[_0x1bfe[1519]]= null)};function mxStencil(_0x47f2x2){this[_0x1bfe[1527]]= _0x47f2x2;this[_0x1bfe[1528]]();this[_0x1bfe[1529]]()}mxStencil[_0x1bfe[1530]]= !1;mxStencil[_0x1bfe[202]][_0x1bfe[1527]]= null;mxStencil[_0x1bfe[202]][_0x1bfe[1531]]= null;mxStencil[_0x1bfe[202]][_0x1bfe[1322]]= null;mxStencil[_0x1bfe[202]][_0x1bfe[1532]]= null;mxStencil[_0x1bfe[202]][_0x1bfe[1533]]= null;mxStencil[_0x1bfe[202]][_0x1bfe[1534]]= null;mxStencil[_0x1bfe[202]][_0x1bfe[1535]]= null;mxStencil[_0x1bfe[202]][_0x1bfe[1307]]= null;mxStencil[_0x1bfe[202]][_0x1bfe[1528]]= function(){this[_0x1bfe[1535]]= this[_0x1bfe[1527]][_0x1bfe[64]](_0x1bfe[1536])[0];this[_0x1bfe[1534]]= this[_0x1bfe[1527]][_0x1bfe[64]](_0x1bfe[1537])[0];this[_0x1bfe[1532]]= Number(this[_0x1bfe[1527]][_0x1bfe[284]](_0x1bfe[1302])|| 100);this[_0x1bfe[1533]]= Number(this[_0x1bfe[1527]][_0x1bfe[284]](_0x1bfe[1303])|| 100);var _0x47f2x2=this[_0x1bfe[1527]][_0x1bfe[284]](_0x1bfe[1322]);this[_0x1bfe[1322]]= null!= _0x47f2x2?_0x47f2x2:_0x1bfe[1538];_0x47f2x2= this[_0x1bfe[1527]][_0x1bfe[284]](_0x1bfe[1307]);this[_0x1bfe[1307]]= null!= _0x47f2x2?_0x47f2x2:_0x1bfe[500]};mxStencil[_0x1bfe[202]][_0x1bfe[1529]]= function(){var _0x47f2x2=this[_0x1bfe[1527]][_0x1bfe[64]](_0x1bfe[1539])[0];if(null!= _0x47f2x2&& (_0x47f2x2= mxUtils[_0x1bfe[1540]](_0x47f2x2),null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]])){this[_0x1bfe[1531]]= [];for(var _0x47f2x3=0;_0x47f2x3< _0x47f2x2[_0x1bfe[67]];_0x47f2x3++){this[_0x1bfe[1531]][_0x1bfe[207]](this[_0x1bfe[1541]](_0x47f2x2[_0x47f2x3]))}}};mxStencil[_0x1bfe[202]][_0x1bfe[1541]]= function(_0x47f2x2){var _0x47f2x3=Number(_0x47f2x2[_0x1bfe[284]](_0x1bfe[235])),_0x47f2x4=Number(_0x47f2x2[_0x1bfe[284]](_0x1bfe[236]));_0x47f2x2= _0x1bfe[500]== _0x47f2x2[_0x1bfe[284]](_0x1bfe[591]);return new mxConnectionConstraint( new mxPoint(_0x47f2x3,_0x47f2x4),_0x47f2x2)};mxStencil[_0x1bfe[202]][_0x1bfe[1542]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= this[_0x1bfe[1543]](_0x47f2x2,_0x47f2x3,_0x47f2x4);_0x47f2x2= _0x47f2x2[_0x1bfe[284]](_0x1bfe[1544]);if(mxStencil[_0x1bfe[1530]]&& null== _0x47f2x2|| _0x1bfe[500]== _0x47f2x2){_0x47f2x3= mxResources[_0x1bfe[203]](_0x47f2x3)};return _0x47f2x3};mxStencil[_0x1bfe[202]][_0x1bfe[1543]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= _0x47f2x2[_0x1bfe[284]](_0x47f2x3);null== _0x47f2x3&& (_0x47f2x2= mxUtils[_0x1bfe[329]](_0x47f2x2),null!= _0x47f2x2&& (_0x47f2x2= mxUtils[_0x1bfe[1545]](_0x47f2x2),_0x1bfe[279]== typeof _0x47f2x2&& (_0x47f2x3= _0x47f2x2(_0x47f2x4))));return _0x47f2x3};mxStencil[_0x1bfe[202]][_0x1bfe[1546]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){this[_0x1bfe[1547]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,this[_0x1bfe[1534]],!1);this[_0x1bfe[1547]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,this[_0x1bfe[1535]],!0)};mxStencil[_0x1bfe[202]][_0x1bfe[1547]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13){if(null!= _0x47f2x12){var _0x47f2x14=mxUtils[_0x1bfe[433]](_0x47f2x3[_0x1bfe[124]],mxConstants.STYLE_DIRECTION,null);_0x47f2x4= this[_0x1bfe[1548]](_0x47f2x3[_0x1bfe[124]],_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x14);_0x47f2x5= Math[_0x1bfe[243]](_0x47f2x4[_0x1bfe[117]],_0x47f2x4[_0x1bfe[119]]);_0x47f2x5= _0x1bfe[1549]== this[_0x1bfe[1307]]?Number(mxUtils[_0x1bfe[1550]](_0x47f2x3[_0x1bfe[124]],mxConstants.STYLE_STROKEWIDTH,1)):Number(this[_0x1bfe[1307]])* _0x47f2x5;_0x47f2x2[_0x1bfe[1250]](_0x47f2x5);for(_0x47f2x12= _0x47f2x12[_0x1bfe[285]];null!= _0x47f2x12;){_0x47f2x12[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]&& this[_0x1bfe[1551]](_0x47f2x2,_0x47f2x3,_0x47f2x12,_0x47f2x4,_0x47f2x13),_0x47f2x12= _0x47f2x12[_0x1bfe[287]]}}};mxStencil[_0x1bfe[202]][_0x1bfe[1548]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x2= _0x47f2x3;_0x47f2x3= _0x47f2x5/ this[_0x1bfe[1532]];var _0x47f2x12=_0x47f2x9/ this[_0x1bfe[1533]];if(_0x47f2xa= _0x1bfe[700]== _0x47f2xa|| _0x1bfe[701]== _0x47f2xa){_0x47f2x12= _0x47f2x5/ this[_0x1bfe[1533]];_0x47f2x3= _0x47f2x9/ this[_0x1bfe[1532]];var _0x47f2x13=(_0x47f2x5- _0x47f2x9)/ 2;_0x47f2x2+= _0x47f2x13;_0x47f2x4-= _0x47f2x13};_0x1bfe[1552]== this[_0x1bfe[1322]]&& (_0x47f2x3= _0x47f2x12= Math[_0x1bfe[243]](_0x47f2x3,_0x47f2x12),_0x47f2xa?(_0x47f2x2+= (_0x47f2x9- this[_0x1bfe[1532]]* _0x47f2x3)/ 2,_0x47f2x4+= (_0x47f2x5- this[_0x1bfe[1533]]* _0x47f2x12)/ 2):(_0x47f2x2+= (_0x47f2x5- this[_0x1bfe[1532]]* _0x47f2x3)/ 2,_0x47f2x4+= (_0x47f2x9- this[_0x1bfe[1533]]* _0x47f2x12)/ 2));return new mxRectangle(_0x47f2x2,_0x47f2x4,_0x47f2x3,_0x47f2x12)};mxStencil[_0x1bfe[202]][_0x1bfe[1551]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=_0x47f2x4[_0x1bfe[301]],_0x47f2x12=_0x47f2x5[_0x1bfe[235]],_0x47f2x13=_0x47f2x5[_0x1bfe[236]],_0x47f2x14=_0x47f2x5[_0x1bfe[117]],_0x47f2x15=_0x47f2x5[_0x1bfe[119]],_0x47f2x16=Math[_0x1bfe[243]](_0x47f2x14,_0x47f2x15);if(_0x1bfe[815]== _0x47f2xa){_0x47f2x2[_0x1bfe[815]]()}else {if(_0x1bfe[1210]== _0x47f2xa){_0x47f2x2[_0x1bfe[1210]]()}else {if(_0x1bfe[1215]== _0x47f2xa){_0x47f2x2[_0x1bfe[1275]]();for(_0x47f2x4= _0x47f2x4[_0x1bfe[285]];null!= _0x47f2x4;){_0x47f2x4[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]&& this[_0x1bfe[1551]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9),_0x47f2x4= _0x47f2x4[_0x1bfe[287]]}}else {if(_0x1bfe[268]== _0x47f2xa){_0x47f2x2[_0x1bfe[268]]()}else {if(_0x1bfe[582]== _0x47f2xa){_0x47f2x2[_0x1bfe[1276]](_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[235]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[236]))* _0x47f2x15)}else {if(_0x1bfe[683]== _0x47f2xa){_0x47f2x2[_0x1bfe[1277]](_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[235]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[236]))* _0x47f2x15)}else {if(_0x1bfe[1323]== _0x47f2xa){_0x47f2x2[_0x1bfe[1278]](_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1324]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1325]))* _0x47f2x15,_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1326]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1327]))* _0x47f2x15)}else {if(_0x1bfe[1328]== _0x47f2xa){_0x47f2x2[_0x1bfe[1279]](_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1324]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1325]))* _0x47f2x15,_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1326]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1327]))* _0x47f2x15,_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1329]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1330]))* _0x47f2x15)}else {if(_0x1bfe[1553]== _0x47f2xa){_0x47f2x2[_0x1bfe[1280]](Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1397]))* _0x47f2x14,Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1398]))* _0x47f2x15,Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1554])),Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1555])),Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1556])),_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[235]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[236]))* _0x47f2x15)}else {if(_0x1bfe[1319]== _0x47f2xa){_0x47f2x2[_0x1bfe[1319]](_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[235]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[236]))* _0x47f2x15,Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1302]))* _0x47f2x14,Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1303]))* _0x47f2x15)}else {if(_0x1bfe[1320]== _0x47f2xa){_0x47f2x3= _0x47f2x4[_0x1bfe[284]](_0x1bfe[1492]),0== _0x47f2x3&& (_0x47f2x3= 100* mxConstants[_0x1bfe[1557]]),_0x47f2x16= Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1302]))* _0x47f2x14,_0x47f2x5= Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1303]))* _0x47f2x15,_0x47f2x3= Number(_0x47f2x3)/ 100,_0x47f2x3= Math[_0x1bfe[243]](_0x47f2x16* _0x47f2x3,_0x47f2x5* _0x47f2x3),_0x47f2x2[_0x1bfe[1320]](_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[235]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[236]))* _0x47f2x15,_0x47f2x16,_0x47f2x5,_0x47f2x3,_0x47f2x3)}else {if(_0x1bfe[680]== _0x47f2xa){_0x47f2x2[_0x1bfe[680]](_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[235]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[236]))* _0x47f2x15,Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1302]))* _0x47f2x14,Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1303]))* _0x47f2x15)}else {if(_0x1bfe[618]== _0x47f2xa){_0x47f2x3= this[_0x1bfe[1543]](_0x47f2x4,_0x1bfe[390],_0x47f2x3),_0x47f2x2[_0x1bfe[618]](_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[235]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[236]))* _0x47f2x15,Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1302]))* _0x47f2x14,Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1303]))* _0x47f2x15,_0x47f2x3,!1,_0x1bfe[500]== _0x47f2x4[_0x1bfe[284]](_0x1bfe[623]),_0x1bfe[500]== _0x47f2x4[_0x1bfe[284]](_0x1bfe[624]))}else {if(_0x1bfe[963]== _0x47f2xa){_0x47f2x16= this[_0x1bfe[1542]](_0x47f2x4,_0x1bfe[1332],_0x47f2x3);_0x47f2x5= _0x1bfe[500]== _0x47f2x4[_0x1bfe[284]](_0x1bfe[704])?-90:0;if(_0x1bfe[468]== _0x47f2x4[_0x1bfe[284]](_0x1bfe[1558])){var _0x47f2x17=_0x47f2x3[_0x1bfe[603]],_0x47f2x18=1== mxUtils[_0x1bfe[433]](_0x47f2x3[_0x1bfe[124]],mxConstants.STYLE_FLIPH,0);_0x47f2x3= 1== mxUtils[_0x1bfe[433]](_0x47f2x3[_0x1bfe[124]],mxConstants.STYLE_FLIPV,0);_0x47f2x5= _0x47f2x18&& _0x47f2x3?_0x47f2x5- _0x47f2x17:_0x47f2x18|| _0x47f2x3?_0x47f2x5+ _0x47f2x17:_0x47f2x5- _0x47f2x17};_0x47f2x5-= _0x47f2x4[_0x1bfe[284]](_0x1bfe[603]);_0x47f2x2[_0x1bfe[963]](_0x47f2x12+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[235]))* _0x47f2x14,_0x47f2x13+ Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[236]))* _0x47f2x15,0,0,_0x47f2x16,_0x47f2x4[_0x1bfe[284]](_0x1bfe[611])|| _0x1bfe[361],_0x47f2x4[_0x1bfe[284]](_0x1bfe[552])|| _0x1bfe[125],!1,_0x1bfe[110],!1,!1,_0x47f2x5)}else {if(_0x1bfe[1559]== _0x47f2xa){_0x47f2x17= mxStencilRegistry[_0x1bfe[1560]](_0x47f2x4[_0x1bfe[284]](_0x1bfe[298])),null!= _0x47f2x17&& (_0x47f2x12+= Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[235]))* _0x47f2x14,_0x47f2x13+= Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[236]))* _0x47f2x15,_0x47f2x16= Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1302]))* _0x47f2x14,_0x47f2x5= Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1303]))* _0x47f2x15,_0x47f2x17[_0x1bfe[1546]](_0x47f2x2,_0x47f2x3,_0x47f2x12,_0x47f2x13,_0x47f2x16,_0x47f2x5))}else {if(_0x1bfe[1338]== _0x47f2xa){_0x47f2x2[_0x1bfe[1337]]()}else {if(_0x1bfe[1334]== _0x47f2xa){_0x47f2x2[_0x1bfe[1334]]()}else {if(_0x1bfe[1336]== _0x47f2xa){_0x47f2x2[_0x1bfe[1336]]()}else {if(_0x1bfe[1307]== _0x47f2xa){_0x47f2x2[_0x1bfe[1250]](Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[117]))* _0x47f2x16)}else {if(_0x1bfe[648]== _0x47f2xa){_0x47f2x2[_0x1bfe[1251]](_0x1bfe[500]== _0x47f2x4[_0x1bfe[284]](_0x1bfe[648]))}else {if(_0x1bfe[1308]== _0x47f2xa){if(_0x47f2x4= _0x47f2x4[_0x1bfe[284]](_0x1bfe[1309]),null!= _0x47f2x4){_0x47f2x4= _0x47f2x4[_0x1bfe[224]](_0x1bfe[185]);_0x47f2x14= [];for(_0x47f2x15= 0;_0x47f2x15< _0x47f2x4[_0x1bfe[67]];_0x47f2x15++){0< _0x47f2x4[_0x47f2x15][_0x1bfe[67]]&& _0x47f2x14[_0x1bfe[207]](Number(_0x47f2x4[_0x47f2x15])* _0x47f2x16)};_0x47f2x4= _0x47f2x14[_0x1bfe[234]](_0x1bfe[185]);_0x47f2x2[_0x1bfe[1252]](_0x47f2x4)}}else {_0x1bfe[1306]== _0x47f2xa?_0x47f2x2[_0x1bfe[1249]](_0x47f2x4[_0x1bfe[284]](_0x1bfe[352])):_0x1bfe[1310]== _0x47f2xa?_0x47f2x2[_0x1bfe[1253]](_0x47f2x4[_0x1bfe[284]](_0x1bfe[1311])):_0x1bfe[1312]== _0x47f2xa?_0x47f2x2[_0x1bfe[1255]](_0x47f2x4[_0x1bfe[284]](_0x1bfe[234])):_0x1bfe[1313]== _0x47f2xa?_0x47f2x2[_0x1bfe[1257]](Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[1314]))):_0x1bfe[1298]== _0x47f2xa?_0x47f2x2[_0x1bfe[1245]](_0x47f2x4[_0x1bfe[284]](_0x1bfe[352])):_0x1bfe[1244]== _0x47f2xa?_0x47f2x2[_0x1bfe[1243]](_0x47f2x4[_0x1bfe[284]](_0x1bfe[1244])):_0x1bfe[1315]== _0x47f2xa?_0x47f2x2[_0x1bfe[1259]](_0x47f2x4[_0x1bfe[284]](_0x1bfe[352])):_0x1bfe[1318]== _0x47f2xa?_0x47f2x2[_0x1bfe[1266]](_0x47f2x4[_0x1bfe[284]](_0x1bfe[124])):_0x1bfe[1287]== _0x47f2xa?_0x47f2x2[_0x1bfe[1265]](_0x47f2x4[_0x1bfe[284]](_0x1bfe[1288])):_0x1bfe[1289]== _0x47f2xa&& _0x47f2x2[_0x1bfe[1264]](Number(_0x47f2x4[_0x1bfe[284]](_0x1bfe[803]))* _0x47f2x16)}}}}}}}}}}}}}}}}}}}}};_0x47f2x9&& (_0x1bfe[1338]== _0x47f2xa|| _0x1bfe[1334]== _0x47f2xa|| _0x1bfe[1336]== _0x47f2xa)&& _0x47f2x2[_0x1bfe[1267]](!1)};function mxShape(_0x47f2x2){this[_0x1bfe[1561]]= _0x47f2x2;this[_0x1bfe[1307]]= 1;this[_0x1bfe[603]]= 0;this[_0x1bfe[461]]= 100;this[_0x1bfe[624]]= this[_0x1bfe[623]]= !1}mxShape[_0x1bfe[202]][_0x1bfe[507]]= null;mxShape[_0x1bfe[202]][_0x1bfe[255]]= 1;mxShape[_0x1bfe[202]][_0x1bfe[1562]]= null;mxShape[_0x1bfe[202]][_0x1bfe[1525]]= null;mxShape[_0x1bfe[202]][_0x1bfe[252]]= null;mxShape[_0x1bfe[202]][_0x1bfe[124]]= null;mxShape[_0x1bfe[202]][_0x1bfe[124]]= null;mxShape[_0x1bfe[202]][_0x1bfe[1563]]= null;mxShape[_0x1bfe[202]][_0x1bfe[1561]]= null;mxShape[_0x1bfe[202]][_0x1bfe[1564]]= 6;mxShape[_0x1bfe[202]][_0x1bfe[1229]]= !0;mxShape[_0x1bfe[202]][_0x1bfe[1565]]= !1;mxShape[_0x1bfe[202]][_0x1bfe[1460]]= 1;mxShape[_0x1bfe[202]][_0x1bfe[176]]= function(_0x47f2x2){null== this[_0x1bfe[252]]&& (this[_0x1bfe[252]]= this[_0x1bfe[385]](_0x47f2x2),null!= _0x47f2x2&& _0x47f2x2[_0x1bfe[62]](this[_0x1bfe[252]]))};mxShape[_0x1bfe[202]][_0x1bfe[1566]]= function(){return !0};mxShape[_0x1bfe[202]][_0x1bfe[1567]]= function(){return !1};mxShape[_0x1bfe[202]][_0x1bfe[1568]]= function(){return 1== mxUtils[_0x1bfe[1454]](Math[_0x1bfe[160]](1,Math[_0x1bfe[488]](this[_0x1bfe[1307]]* this[_0x1bfe[255]])),2)?0.5:0};mxShape[_0x1bfe[202]][_0x1bfe[385]]= function(_0x47f2x2){var _0x47f2x3=null;return _0x47f2x3= null!= _0x47f2x2[_0x1bfe[538]]?this[_0x1bfe[1569]](_0x47f2x2):8== document[_0x1bfe[5]]|| this[_0x1bfe[507]]== mxConstants[_0x1bfe[508]]|| this[_0x1bfe[507]]!= mxConstants[_0x1bfe[1523]]&& this[_0x1bfe[1567]]()?this[_0x1bfe[1570]](_0x47f2x2):this[_0x1bfe[1571]](_0x47f2x2)};mxShape[_0x1bfe[202]][_0x1bfe[1569]]= function(){return document[_0x1bfe[509]](mxConstants.NS_SVG,_0x1bfe[449])};mxShape[_0x1bfe[202]][_0x1bfe[1571]]= function(){var _0x47f2x2=document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1499]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];return _0x47f2x2};mxShape[_0x1bfe[202]][_0x1bfe[1570]]= function(){var _0x47f2x2=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];return _0x47f2x2};mxShape[_0x1bfe[202]][_0x1bfe[1572]]= function(){this[_0x1bfe[258]]()};mxShape[_0x1bfe[202]][_0x1bfe[258]]= function(){this[_0x1bfe[1573]]();this[_0x1bfe[1574]]()?(this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[110],_0x1bfe[529]== this[_0x1bfe[252]][_0x1bfe[301]]&& this[_0x1bfe[1567]]()?this[_0x1bfe[1575]]():this[_0x1bfe[1576]](),this[_0x1bfe[1577]]()):(this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188],this[_0x1bfe[1563]]= null)};mxShape[_0x1bfe[202]][_0x1bfe[1573]]= function(){var _0x47f2x2=this[_0x1bfe[1525]];if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]&& null!= _0x47f2x2[0]){this[_0x1bfe[1562]]= new mxRectangle(Number(_0x47f2x2[0][_0x1bfe[235]]),Number(_0x47f2x2[0][_0x1bfe[236]]),1,1);for(var _0x47f2x3=1;_0x47f2x3< this[_0x1bfe[1525]][_0x1bfe[67]];_0x47f2x3++){null!= _0x47f2x2[_0x47f2x3]&& this[_0x1bfe[1562]][_0x1bfe[99]]( new mxRectangle(Number(_0x47f2x2[_0x47f2x3][_0x1bfe[235]]),Number(_0x47f2x2[_0x47f2x3][_0x1bfe[236]]),1,1))}}};mxShape[_0x1bfe[202]][_0x1bfe[1574]]= function(){return null!= this[_0x1bfe[1562]]&& !isNaN(this[_0x1bfe[1562]][_0x1bfe[235]])&& !isNaN(this[_0x1bfe[1562]][_0x1bfe[236]])&& !isNaN(this[_0x1bfe[1562]][_0x1bfe[117]])&& !isNaN(this[_0x1bfe[1562]][_0x1bfe[119]])&& 0< this[_0x1bfe[1562]][_0x1bfe[117]]&& 0< this[_0x1bfe[1562]][_0x1bfe[119]]};mxShape[_0x1bfe[202]][_0x1bfe[1578]]= function(){var _0x47f2x2=document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1499]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];_0x47f2x2[_0x1bfe[124]][_0x1bfe[117]]= this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[117]];_0x47f2x2[_0x1bfe[124]][_0x1bfe[119]]= this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[119]];return _0x47f2x2};mxShape[_0x1bfe[202]][_0x1bfe[1576]]= function(){var _0x47f2x2=this[_0x1bfe[1579]]();for(_0x47f2x2[_0x1bfe[1229]]= this[_0x1bfe[1229]];this[_0x1bfe[252]][_0x1bfe[1580]]();){this[_0x1bfe[252]][_0x1bfe[266]](this[_0x1bfe[252]][_0x1bfe[1581]])};this[_0x1bfe[1209]](_0x47f2x2);this[_0x1bfe[252]]!= _0x47f2x2[_0x1bfe[813]]&& this[_0x1bfe[252]][_0x1bfe[1583]](_0x1bfe[1582],_0x47f2x2[_0x1bfe[813]][_0x1bfe[342]]);_0x1bfe[529]== this[_0x1bfe[252]][_0x1bfe[301]]&& 8== document[_0x1bfe[5]]&& (this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[347]]= _0x1bfe[110],(null== this[_0x1bfe[1561]]|| !this[_0x1bfe[1565]])&& mxUtils[_0x1bfe[1584]](this[_0x1bfe[252]]));this[_0x1bfe[1585]](_0x47f2x2)};mxShape[_0x1bfe[202]][_0x1bfe[1579]]= function(){var _0x47f2x2=null,_0x47f2x3=null;if(null!= this[_0x1bfe[252]][_0x1bfe[538]]){_0x47f2x2= new mxSvgCanvas2D(this[_0x1bfe[252]],!1),_0x47f2x2[_0x1bfe[1345]]= this[_0x1bfe[1564]],_0x47f2x2[_0x1bfe[1347]]= mxClient[_0x1bfe[133]]&& !mxClient[_0x1bfe[75]]&& !mxClient[_0x1bfe[76]],_0x47f2x3= this[_0x1bfe[1568]](),0!= _0x47f2x3?this[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[535],_0x1bfe[536]+ _0x47f2x3+ _0x1bfe[537]+ _0x47f2x3+ _0x1bfe[460]):this[_0x1bfe[252]][_0x1bfe[1390]](_0x1bfe[535])}else {this[_0x1bfe[1586]]();var _0x47f2x4=Math[_0x1bfe[160]](1,Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[117]])),_0x47f2x5=Math[_0x1bfe[160]](1,Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[119]])),_0x47f2x3=8== document[_0x1bfe[5]]&& this[_0x1bfe[1566]]()?this[_0x1bfe[1578]]():this[_0x1bfe[252]],_0x47f2x2= new mxVmlCanvas2D(_0x47f2x3,!1);_0x1bfe[110]!= _0x47f2x3[_0x1bfe[337]]&& (_0x47f2x3[_0x1bfe[1462]]= _0x47f2x4* this[_0x1bfe[1460]]+ _0x1bfe[537]+ _0x47f2x5* this[_0x1bfe[1460]],_0x47f2x2[_0x1bfe[255]](this[_0x1bfe[1460]]),_0x47f2x2[_0x1bfe[1460]]= this[_0x1bfe[1460]]);_0x47f2x3= this[_0x1bfe[255]];_0x47f2x2[_0x1bfe[513]](-Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[235]]/ _0x47f2x3),-Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[236]]/ _0x47f2x3))};return _0x47f2x2};mxShape[_0x1bfe[202]][_0x1bfe[1586]]= function(){this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[361]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[235]])+ _0x1bfe[168];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[125]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[236]])+ _0x1bfe[168];var _0x47f2x2=Math[_0x1bfe[160]](1,Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[117]])),_0x47f2x3=Math[_0x1bfe[160]](1,Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[119]]));this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x2+ _0x1bfe[168];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x3+ _0x1bfe[168];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[189]};mxShape[_0x1bfe[202]][_0x1bfe[1585]]= function(_0x47f2x2){if(_0x47f2x2 instanceof mxSvgCanvas2D){for(var _0x47f2x3 in _0x47f2x2[_0x1bfe[1339]]){var _0x47f2x4=_0x47f2x2[_0x1bfe[1339]][_0x47f2x3];_0x47f2x4[_0x1bfe[1587]]= (_0x47f2x4[_0x1bfe[1587]]|| 0)+ 1};this[_0x1bfe[1589]](this[_0x1bfe[1588]]);this[_0x1bfe[1588]]= _0x47f2x2[_0x1bfe[1339]]}};mxShape[_0x1bfe[202]][_0x1bfe[1209]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[255]],_0x47f2x4=this[_0x1bfe[1562]][_0x1bfe[235]]/ _0x47f2x3,_0x47f2x5=this[_0x1bfe[1562]][_0x1bfe[236]]/ _0x47f2x3,_0x47f2x9=this[_0x1bfe[1562]][_0x1bfe[117]]/ _0x47f2x3,_0x47f2xa=this[_0x1bfe[1562]][_0x1bfe[119]]/ _0x47f2x3;if(this[_0x1bfe[1590]]()){var _0x47f2x12=(_0x47f2x9- _0x47f2xa)/ 2,_0x47f2x4=_0x47f2x4+ _0x47f2x12,_0x47f2x5=_0x47f2x5- _0x47f2x12,_0x47f2x12=_0x47f2x9,_0x47f2x9=_0x47f2xa,_0x47f2xa=_0x47f2x12};this[_0x1bfe[1591]](_0x47f2x2,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa);this[_0x1bfe[1592]](_0x47f2x2,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa);if(null!= this[_0x1bfe[1561]]){this[_0x1bfe[1593]](_0x47f2x2,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa)}else {if(_0x47f2x2[_0x1bfe[1250]](this[_0x1bfe[1307]]),null!= this[_0x1bfe[1525]]){_0x47f2x4= [];for(_0x47f2x5= 0;_0x47f2x5< this[_0x1bfe[1525]][_0x1bfe[67]];_0x47f2x5++){_0x47f2x4[_0x1bfe[207]]( new mxPoint(this[_0x1bfe[1525]][_0x47f2x5][_0x1bfe[235]]/ _0x47f2x3,this[_0x1bfe[1525]][_0x47f2x5][_0x1bfe[236]]/ _0x47f2x3))};this[_0x1bfe[1594]](_0x47f2x2,_0x47f2x4)}else {this[_0x1bfe[1595]](_0x47f2x2,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa)}}};mxShape[_0x1bfe[202]][_0x1bfe[1592]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=null;null!= this[_0x1bfe[124]]&& (_0x47f2xa= this[_0x1bfe[124]][_0x1bfe[649]]);_0x47f2x2[_0x1bfe[1243]](this[_0x1bfe[461]]/ 100);null!= this[_0x1bfe[1596]]&& _0x47f2x2[_0x1bfe[1267]](this[_0x1bfe[1596]]);null!= this[_0x1bfe[1522]]&& _0x47f2x2[_0x1bfe[1251]](this[_0x1bfe[1522]]);null!= _0x47f2xa&& _0x47f2x2[_0x1bfe[1252]](_0x47f2xa);null!= this[_0x1bfe[1299]]?(_0x47f2x3= this[_0x1bfe[1597]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9),_0x47f2x2[_0x1bfe[1246]](this[_0x1bfe[1334]],this[_0x1bfe[1299]],_0x47f2x3[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]],_0x47f2x3[_0x1bfe[117]],_0x47f2x3[_0x1bfe[119]],this[_0x1bfe[607]])):_0x47f2x2[_0x1bfe[1245]](this[_0x1bfe[1334]]);_0x47f2x2[_0x1bfe[1249]](this[_0x1bfe[1336]])};mxShape[_0x1bfe[202]][_0x1bfe[1597]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){return new mxRectangle(_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9)};mxShape[_0x1bfe[202]][_0x1bfe[1591]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2[_0x1bfe[255]](this[_0x1bfe[255]]);_0x47f2x2[_0x1bfe[1294]](this[_0x1bfe[1598]](),this[_0x1bfe[623]],this[_0x1bfe[624]],_0x47f2x3+ _0x47f2x5/ 2,_0x47f2x4+ _0x47f2x9/ 2)};mxShape[_0x1bfe[202]][_0x1bfe[1593]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){this[_0x1bfe[1565]]&& (this[_0x1bfe[507]]== mxConstants[_0x1bfe[508]]?this[_0x1bfe[1599]](this[_0x1bfe[252]],_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9):8!= document[_0x1bfe[5]]&& this[_0x1bfe[1600]](this[_0x1bfe[252]]));this[_0x1bfe[1561]][_0x1bfe[1546]](_0x47f2x2,this,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9)};mxShape[_0x1bfe[202]][_0x1bfe[1595]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){this[_0x1bfe[1601]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9);_0x47f2x2[_0x1bfe[1267]](!1);this[_0x1bfe[1602]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9)};mxShape[_0x1bfe[202]][_0x1bfe[1601]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){};mxShape[_0x1bfe[202]][_0x1bfe[1602]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){};mxShape[_0x1bfe[202]][_0x1bfe[1594]]= function(_0x47f2x2,_0x47f2x3){};mxShape[_0x1bfe[202]][_0x1bfe[1603]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_ARCSIZE,100* mxConstants[_0x1bfe[1557]])/ 100;return Math[_0x1bfe[243]](_0x47f2x2* _0x47f2x4,_0x47f2x3* _0x47f2x4)};mxShape[_0x1bfe[202]][_0x1bfe[1604]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){var _0x47f2x12=Math[_0x1bfe[430]](this[_0x1bfe[1307]]/ 2);_0x47f2x2[_0x1bfe[1246]](_0x1bfe[1605],_0x1bfe[1605],_0x47f2x3,_0x47f2x4,_0x47f2x5,0.6* _0x47f2x9,_0x1bfe[701],0.9,0.1);_0x47f2x2[_0x1bfe[1275]]();_0x47f2xa+= 2* _0x47f2x12;this[_0x1bfe[1606]]?(_0x47f2x2[_0x1bfe[1276]](_0x47f2x3- _0x47f2x12+ _0x47f2xa,_0x47f2x4- _0x47f2x12),_0x47f2x2[_0x1bfe[1278]](_0x47f2x3- _0x47f2x12,_0x47f2x4- _0x47f2x12,_0x47f2x3- _0x47f2x12,_0x47f2x4- _0x47f2x12+ _0x47f2xa),_0x47f2x2[_0x1bfe[1277]](_0x47f2x3- _0x47f2x12,_0x47f2x4+ 0.4* _0x47f2x9),_0x47f2x2[_0x1bfe[1278]](_0x47f2x3+ 0.5* _0x47f2x5,_0x47f2x4+ 0.7* _0x47f2x9,_0x47f2x3+ _0x47f2x5+ _0x47f2x12,_0x47f2x4+ 0.4* _0x47f2x9),_0x47f2x2[_0x1bfe[1277]](_0x47f2x3+ _0x47f2x5+ _0x47f2x12,_0x47f2x4- _0x47f2x12+ _0x47f2xa),_0x47f2x2[_0x1bfe[1278]](_0x47f2x3+ _0x47f2x5+ _0x47f2x12,_0x47f2x4- _0x47f2x12,_0x47f2x3+ _0x47f2x5+ _0x47f2x12- _0x47f2xa,_0x47f2x4- _0x47f2x12)):(_0x47f2x2[_0x1bfe[1276]](_0x47f2x3- _0x47f2x12,_0x47f2x4- _0x47f2x12),_0x47f2x2[_0x1bfe[1277]](_0x47f2x3- _0x47f2x12,_0x47f2x4+ 0.4* _0x47f2x9),_0x47f2x2[_0x1bfe[1278]](_0x47f2x3+ 0.5* _0x47f2x5,_0x47f2x4+ 0.7* _0x47f2x9,_0x47f2x3+ _0x47f2x5+ _0x47f2x12,_0x47f2x4+ 0.4* _0x47f2x9),_0x47f2x2[_0x1bfe[1277]](_0x47f2x3+ _0x47f2x5+ _0x47f2x12,_0x47f2x4- _0x47f2x12));_0x47f2x2[_0x1bfe[268]]();_0x47f2x2[_0x1bfe[1334]]()};mxShape[_0x1bfe[202]][_0x1bfe[183]]= function(_0x47f2x2){this[_0x1bfe[724]]= _0x47f2x2;this[_0x1bfe[124]]= _0x47f2x2[_0x1bfe[124]];if(null!= this[_0x1bfe[124]]){this[_0x1bfe[1334]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_FILLCOLOR,this[_0x1bfe[1334]]);this[_0x1bfe[1299]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_GRADIENTCOLOR,this[_0x1bfe[1299]]);this[_0x1bfe[607]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_GRADIENT_DIRECTION,this[_0x1bfe[607]]);this[_0x1bfe[461]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_OPACITY,this[_0x1bfe[461]]);this[_0x1bfe[1336]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_STROKECOLOR,this[_0x1bfe[1336]]);this[_0x1bfe[1307]]= mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],mxConstants.STYLE_STROKEWIDTH,this[_0x1bfe[1307]]);this[_0x1bfe[657]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_SPACING,this[_0x1bfe[657]]);this[_0x1bfe[644]]= mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],mxConstants.STYLE_STARTSIZE,this[_0x1bfe[644]]);this[_0x1bfe[643]]= mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],mxConstants.STYLE_ENDSIZE,this[_0x1bfe[643]]);this[_0x1bfe[642]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_STARTARROW,this[_0x1bfe[642]]);this[_0x1bfe[641]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_ENDARROW,this[_0x1bfe[641]]);this[_0x1bfe[603]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_ROTATION,this[_0x1bfe[603]]);this[_0x1bfe[663]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_DIRECTION,this[_0x1bfe[663]]);this[_0x1bfe[623]]= 1== mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_FLIPH,0);this[_0x1bfe[624]]= 1== mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_FLIPV,0);null!= this[_0x1bfe[1561]]&& (this[_0x1bfe[623]]= 1== mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],_0x1bfe[1607],0)|| this[_0x1bfe[623]],this[_0x1bfe[624]]= 1== mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],_0x1bfe[1608],0)|| this[_0x1bfe[624]]);if(_0x1bfe[700]== this[_0x1bfe[663]]|| _0x1bfe[701]== this[_0x1bfe[663]]){_0x47f2x2= this[_0x1bfe[623]],this[_0x1bfe[623]]= this[_0x1bfe[624]],this[_0x1bfe[624]]= _0x47f2x2};this[_0x1bfe[1596]]= 1== mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_SHADOW,this[_0x1bfe[1596]]);this[_0x1bfe[1522]]= 1== mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_DASHED,this[_0x1bfe[1522]]);this[_0x1bfe[1606]]= 1== mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_ROUNDED,this[_0x1bfe[1606]]);this[_0x1bfe[617]]= 1== mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_GLASS,this[_0x1bfe[617]]);_0x1bfe[130]== this[_0x1bfe[1334]]&& (this[_0x1bfe[1334]]= null);_0x1bfe[130]== this[_0x1bfe[1299]]&& (this[_0x1bfe[1299]]= null);_0x1bfe[130]== this[_0x1bfe[1336]]&& (this[_0x1bfe[1336]]= null)}};mxShape[_0x1bfe[202]][_0x1bfe[1609]]= function(_0x47f2x2){null== _0x47f2x2&& (_0x47f2x2= _0x1bfe[110]);this[_0x1bfe[270]]= _0x47f2x2;null!= this[_0x1bfe[252]]&& (this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= _0x47f2x2)};mxShape[_0x1bfe[202]][_0x1bfe[1610]]= function(){return this[_0x1bfe[270]]};mxShape[_0x1bfe[202]][_0x1bfe[1577]]= function(){if(null!= this[_0x1bfe[1562]]){var _0x47f2x2=this[_0x1bfe[1611]]();if(null!= _0x47f2x2){this[_0x1bfe[1612]](_0x47f2x2);var _0x47f2x3=this[_0x1bfe[1598]]();0!= _0x47f2x3&& (_0x47f2x2= mxUtils[_0x1bfe[1613]](_0x47f2x2,_0x47f2x3));_0x47f2x2[_0x1bfe[235]]= Math[_0x1bfe[519]](_0x47f2x2[_0x1bfe[235]]);_0x47f2x2[_0x1bfe[236]]= Math[_0x1bfe[519]](_0x47f2x2[_0x1bfe[236]]);_0x47f2x2[_0x1bfe[117]]= Math[_0x1bfe[430]](_0x47f2x2[_0x1bfe[117]]);_0x47f2x2[_0x1bfe[119]]= Math[_0x1bfe[430]](_0x47f2x2[_0x1bfe[119]])};this[_0x1bfe[1563]]= _0x47f2x2}};mxShape[_0x1bfe[202]][_0x1bfe[1611]]= function(){var _0x47f2x2=this[_0x1bfe[1562]][_0x1bfe[238]]();if(this[_0x1bfe[1590]]()){var _0x47f2x3=(_0x47f2x2[_0x1bfe[117]]- _0x47f2x2[_0x1bfe[119]])/ 2;_0x47f2x2[_0x1bfe[235]]+= _0x47f2x3;_0x47f2x2[_0x1bfe[236]]-= _0x47f2x3;_0x47f2x3= _0x47f2x2[_0x1bfe[117]];_0x47f2x2[_0x1bfe[117]]= _0x47f2x2[_0x1bfe[119]];_0x47f2x2[_0x1bfe[119]]= _0x47f2x3};return _0x47f2x2};mxShape[_0x1bfe[202]][_0x1bfe[1612]]= function(_0x47f2x2){this[_0x1bfe[1596]]&& (_0x47f2x2[_0x1bfe[117]]+= Math[_0x1bfe[430]](mxConstants[_0x1bfe[1237]]* this[_0x1bfe[255]]),_0x47f2x2[_0x1bfe[119]]+= Math[_0x1bfe[430]](mxConstants[_0x1bfe[1238]]* this[_0x1bfe[255]]));var _0x47f2x3=Math[_0x1bfe[430]](this[_0x1bfe[1307]]* this[_0x1bfe[255]]);_0x47f2x2[_0x1bfe[244]](Math[_0x1bfe[430]](_0x47f2x3/ 2))};mxShape[_0x1bfe[202]][_0x1bfe[1590]]= function(){return null== this[_0x1bfe[1561]]&& (_0x1bfe[700]== this[_0x1bfe[663]]|| _0x1bfe[701]== this[_0x1bfe[663]])};mxShape[_0x1bfe[202]][_0x1bfe[1614]]= function(){return null!= this[_0x1bfe[603]]?this[_0x1bfe[603]]:0};mxShape[_0x1bfe[202]][_0x1bfe[1615]]= function(){var _0x47f2x2=this[_0x1bfe[1614]]();1!= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_HORIZONTAL,1)&& (_0x47f2x2+= mxText[_0x1bfe[202]][_0x1bfe[1616]]);return _0x47f2x2};mxShape[_0x1bfe[202]][_0x1bfe[1598]]= function(){var _0x47f2x2=this[_0x1bfe[1614]]();null!= this[_0x1bfe[663]]&& (_0x1bfe[700]== this[_0x1bfe[663]]?_0x47f2x2+= 270:_0x1bfe[703]== this[_0x1bfe[663]]?_0x47f2x2+= 180:_0x1bfe[701]== this[_0x1bfe[663]]&& (_0x47f2x2+= 90));return _0x47f2x2};mxShape[_0x1bfe[202]][_0x1bfe[1599]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2= document[_0x1bfe[509]](mxConstants.NS_SVG,_0x1bfe[1319]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[235],_0x47f2x3);_0x47f2x2[_0x1bfe[57]](_0x1bfe[236],_0x47f2x4);_0x47f2x2[_0x1bfe[57]](_0x1bfe[117],_0x47f2x5);_0x47f2x2[_0x1bfe[57]](_0x1bfe[119],_0x47f2x9);_0x47f2x2[_0x1bfe[57]](_0x1bfe[1334],_0x1bfe[130]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[1336],_0x1bfe[130]);_0x47f2x2[_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[1378]);this[_0x1bfe[252]][_0x1bfe[62]](_0x47f2x2)};mxShape[_0x1bfe[202]][_0x1bfe[1600]]= function(_0x47f2x2){_0x47f2x2[_0x1bfe[124]][_0x1bfe[1617]]= _0x1bfe[1618]+ mxClient[_0x1bfe[88]]+ _0x1bfe[1619]};mxShape[_0x1bfe[202]][_0x1bfe[1589]]= function(_0x47f2x2){if(null!= _0x47f2x2){for(var _0x47f2x3 in _0x47f2x2){var _0x47f2x4=_0x47f2x2[_0x47f2x3];_0x47f2x4[_0x1bfe[1587]]= (_0x47f2x4[_0x1bfe[1587]]|| 0)- 1;0== _0x47f2x4[_0x1bfe[1587]]&& null!= _0x47f2x4[_0x1bfe[265]]&& _0x47f2x4[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x4)}}};mxShape[_0x1bfe[202]][_0x1bfe[515]]= function(){null!= this[_0x1bfe[252]]&& (mxEvent[_0x1bfe[762]](this[_0x1bfe[252]]),null!= this[_0x1bfe[252]][_0x1bfe[265]]&& this[_0x1bfe[252]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[252]]),this[_0x1bfe[252]]= null);this[_0x1bfe[1589]](this[_0x1bfe[1588]]);this[_0x1bfe[1588]]= null};var mxStencilRegistry={stencils:[],addStencil:function(_0x47f2x2,_0x47f2x3){mxStencilRegistry[_0x1bfe[1620]][_0x47f2x2]= _0x47f2x3},getStencil:function(_0x47f2x2){return mxStencilRegistry[_0x1bfe[1620]][_0x47f2x2]}},mxMarker={markers:[],addMarker:function(_0x47f2x2,_0x47f2x3){mxMarker[_0x1bfe[1621]][_0x47f2x2]= _0x47f2x3},createMarker:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15){var _0x47f2x16=mxMarker[_0x1bfe[1621]][_0x47f2x4];return null!= _0x47f2x16?_0x47f2x16(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15):null}};(function(){function _0x47f2x2(_0x47f2x2,_0x47f2x3,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15,_0x47f2x16,_0x47f2x17){_0x47f2x3= 1.118* _0x47f2x12* _0x47f2x16;_0x47f2x15= 1.118* _0x47f2x13* _0x47f2x16;_0x47f2x12*= _0x47f2x14+ _0x47f2x16;_0x47f2x13*= _0x47f2x14+ _0x47f2x16;var _0x47f2x18=_0x47f2xa[_0x1bfe[238]]();_0x47f2x18[_0x1bfe[235]]-= _0x47f2x3;_0x47f2x18[_0x1bfe[236]]-= _0x47f2x15;_0x47f2x14= _0x47f2x9!= mxConstants[_0x1bfe[1622]]?1:0.75;_0x47f2xa[_0x1bfe[235]]+= -_0x47f2x12* _0x47f2x14- _0x47f2x3;_0x47f2xa[_0x1bfe[236]]+= -_0x47f2x13* _0x47f2x14- _0x47f2x15;return function(){_0x47f2x2[_0x1bfe[1275]]();_0x47f2x2[_0x1bfe[1276]](_0x47f2x18[_0x1bfe[235]],_0x47f2x18[_0x1bfe[236]]);_0x47f2x2[_0x1bfe[1277]](_0x47f2x18[_0x1bfe[235]]- _0x47f2x12- _0x47f2x13/ 2,_0x47f2x18[_0x1bfe[236]]- _0x47f2x13+ _0x47f2x12/ 2);_0x47f2x9== mxConstants[_0x1bfe[1622]]&& _0x47f2x2[_0x1bfe[1277]](_0x47f2x18[_0x1bfe[235]]- 3* _0x47f2x12/ 4,_0x47f2x18[_0x1bfe[236]]- 3* _0x47f2x13/ 4);_0x47f2x2[_0x1bfe[1277]](_0x47f2x18[_0x1bfe[235]]+ _0x47f2x13/ 2- _0x47f2x12,_0x47f2x18[_0x1bfe[236]]- _0x47f2x13- _0x47f2x12/ 2);_0x47f2x2[_0x1bfe[268]]();_0x47f2x17?_0x47f2x2[_0x1bfe[1337]]():_0x47f2x2[_0x1bfe[1336]]()}}function _0x47f2x3(_0x47f2x2,_0x47f2x3,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15,_0x47f2x16,_0x47f2x17){_0x47f2x15= _0x47f2x9== mxConstants[_0x1bfe[1623]]?0.7071:0.9862;_0x47f2x3= _0x47f2x12* _0x47f2x16* _0x47f2x15;_0x47f2x15*= _0x47f2x13* _0x47f2x16;_0x47f2x12*= _0x47f2x14+ _0x47f2x16;_0x47f2x13*= _0x47f2x14+ _0x47f2x16;var _0x47f2x18=_0x47f2xa[_0x1bfe[238]]();_0x47f2x18[_0x1bfe[235]]-= _0x47f2x3;_0x47f2x18[_0x1bfe[236]]-= _0x47f2x15;_0x47f2xa[_0x1bfe[235]]+= -_0x47f2x12- _0x47f2x3;_0x47f2xa[_0x1bfe[236]]+= -_0x47f2x13- _0x47f2x15;var _0x47f2x19=_0x47f2x9== mxConstants[_0x1bfe[1623]]?2:3.4;return function(){_0x47f2x2[_0x1bfe[1275]]();_0x47f2x2[_0x1bfe[1276]](_0x47f2x18[_0x1bfe[235]],_0x47f2x18[_0x1bfe[236]]);_0x47f2x2[_0x1bfe[1277]](_0x47f2x18[_0x1bfe[235]]- _0x47f2x12/ 2- _0x47f2x13/ _0x47f2x19,_0x47f2x18[_0x1bfe[236]]+ _0x47f2x12/ _0x47f2x19- _0x47f2x13/ 2);_0x47f2x2[_0x1bfe[1277]](_0x47f2x18[_0x1bfe[235]]- _0x47f2x12,_0x47f2x18[_0x1bfe[236]]- _0x47f2x13);_0x47f2x2[_0x1bfe[1277]](_0x47f2x18[_0x1bfe[235]]- _0x47f2x12/ 2+ _0x47f2x13/ _0x47f2x19,_0x47f2x18[_0x1bfe[236]]- _0x47f2x13/ 2- _0x47f2x12/ _0x47f2x19);_0x47f2x2[_0x1bfe[268]]();_0x47f2x17?_0x47f2x2[_0x1bfe[1337]]():_0x47f2x2[_0x1bfe[1336]]()}}mxMarker[_0x1bfe[1624]](_0x1bfe[693],_0x47f2x2);mxMarker[_0x1bfe[1624]](_0x1bfe[694],_0x47f2x2);mxMarker[_0x1bfe[1624]](_0x1bfe[392],function(_0x47f2x2,_0x47f2x3,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15,_0x47f2x16,_0x47f2x17){_0x47f2x3= 1.118* _0x47f2x12* _0x47f2x16;_0x47f2x9= 1.118* _0x47f2x13* _0x47f2x16;_0x47f2x12*= _0x47f2x14+ _0x47f2x16;_0x47f2x13*= _0x47f2x14+ _0x47f2x16;var _0x47f2x18=_0x47f2xa[_0x1bfe[238]]();_0x47f2x18[_0x1bfe[235]]-= _0x47f2x3;_0x47f2x18[_0x1bfe[236]]-= _0x47f2x9;_0x47f2xa[_0x1bfe[235]]+= 2* -_0x47f2x3;_0x47f2xa[_0x1bfe[236]]+= 2* -_0x47f2x9;return function(){_0x47f2x2[_0x1bfe[1275]]();_0x47f2x2[_0x1bfe[1276]](_0x47f2x18[_0x1bfe[235]]- _0x47f2x12- _0x47f2x13/ 2,_0x47f2x18[_0x1bfe[236]]- _0x47f2x13+ _0x47f2x12/ 2);_0x47f2x2[_0x1bfe[1277]](_0x47f2x18[_0x1bfe[235]],_0x47f2x18[_0x1bfe[236]]);_0x47f2x2[_0x1bfe[1277]](_0x47f2x18[_0x1bfe[235]]+ _0x47f2x13/ 2- _0x47f2x12,_0x47f2x18[_0x1bfe[236]]- _0x47f2x13- _0x47f2x12/ 2);_0x47f2x2[_0x1bfe[1336]]()}});mxMarker[_0x1bfe[1624]](_0x1bfe[695],function(_0x47f2x2,_0x47f2x3,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15,_0x47f2x16,_0x47f2x17){var _0x47f2x18=_0x47f2x14/ 2,_0x47f2x19=_0x47f2xa[_0x1bfe[238]]();_0x47f2xa[_0x1bfe[235]]-= _0x47f2x12* _0x47f2x18;_0x47f2xa[_0x1bfe[236]]-= _0x47f2x13* _0x47f2x18;return function(){_0x47f2x2[_0x1bfe[680]](_0x47f2x19[_0x1bfe[235]]- _0x47f2x18,_0x47f2x19[_0x1bfe[236]]- _0x47f2x18,_0x47f2x14,_0x47f2x14);_0x47f2x17?_0x47f2x2[_0x1bfe[1337]]():_0x47f2x2[_0x1bfe[1336]]()}});mxMarker[_0x1bfe[1624]](_0x1bfe[696],_0x47f2x3);mxMarker[_0x1bfe[1624]](_0x1bfe[697],_0x47f2x3)})();function mxActor(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxShape[_0x1bfe[239]](this);this[_0x1bfe[1562]]= _0x47f2x2;this[_0x1bfe[1334]]= _0x47f2x3;this[_0x1bfe[1336]]= _0x47f2x4;this[_0x1bfe[1307]]= null!= _0x47f2x5?_0x47f2x5:1}mxUtils[_0x1bfe[1284]](mxActor,mxShape);mxActor[_0x1bfe[202]][_0x1bfe[1595]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2[_0x1bfe[513]](_0x47f2x3,_0x47f2x4);_0x47f2x2[_0x1bfe[1275]]();this[_0x1bfe[1625]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9);_0x47f2x2[_0x1bfe[1337]]()};mxActor[_0x1bfe[202]][_0x1bfe[1625]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x3= _0x47f2x5/ 3;_0x47f2x2[_0x1bfe[1276]](0,_0x47f2x9);_0x47f2x2[_0x1bfe[1279]](0,3* _0x47f2x9/ 5,0,2* _0x47f2x9/ 5,_0x47f2x5/ 2,2* _0x47f2x9/ 5);_0x47f2x2[_0x1bfe[1279]](_0x47f2x5/ 2- _0x47f2x3,2* _0x47f2x9/ 5,_0x47f2x5/ 2- _0x47f2x3,0,_0x47f2x5/ 2,0);_0x47f2x2[_0x1bfe[1279]](_0x47f2x5/ 2+ _0x47f2x3,0,_0x47f2x5/ 2+ _0x47f2x3,2* _0x47f2x9/ 5,_0x47f2x5/ 2,2* _0x47f2x9/ 5);_0x47f2x2[_0x1bfe[1279]](_0x47f2x5,2* _0x47f2x9/ 5,_0x47f2x5,3* _0x47f2x9/ 5,_0x47f2x5,_0x47f2x9);_0x47f2x2[_0x1bfe[268]]()};function mxCloud(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxActor[_0x1bfe[239]](this);this[_0x1bfe[1562]]= _0x47f2x2;this[_0x1bfe[1334]]= _0x47f2x3;this[_0x1bfe[1336]]= _0x47f2x4;this[_0x1bfe[1307]]= null!= _0x47f2x5?_0x47f2x5:1}mxUtils[_0x1bfe[1284]](mxCloud,mxActor);mxCloud[_0x1bfe[202]][_0x1bfe[1625]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2[_0x1bfe[1276]](0.25* _0x47f2x5,0.25* _0x47f2x9);_0x47f2x2[_0x1bfe[1279]](0.05* _0x47f2x5,0.25* _0x47f2x9,0,0.5* _0x47f2x9,0.16* _0x47f2x5,0.55* _0x47f2x9);_0x47f2x2[_0x1bfe[1279]](0,0.66* _0x47f2x9,0.18* _0x47f2x5,0.9* _0x47f2x9,0.31* _0x47f2x5,0.8* _0x47f2x9);_0x47f2x2[_0x1bfe[1279]](0.4* _0x47f2x5,_0x47f2x9,0.7* _0x47f2x5,_0x47f2x9,0.8* _0x47f2x5,0.8* _0x47f2x9);_0x47f2x2[_0x1bfe[1279]](_0x47f2x5,0.8* _0x47f2x9,_0x47f2x5,0.6* _0x47f2x9,0.875* _0x47f2x5,0.5* _0x47f2x9);_0x47f2x2[_0x1bfe[1279]](_0x47f2x5,0.3* _0x47f2x9,0.8* _0x47f2x5,0.1* _0x47f2x9,0.625* _0x47f2x5,0.2* _0x47f2x9);_0x47f2x2[_0x1bfe[1279]](0.5* _0x47f2x5,0.05* _0x47f2x9,0.3* _0x47f2x5,0.05* _0x47f2x9,0.25* _0x47f2x5,0.25* _0x47f2x9);_0x47f2x2[_0x1bfe[268]]()};function mxRectangleShape(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxShape[_0x1bfe[239]](this);this[_0x1bfe[1562]]= _0x47f2x2;this[_0x1bfe[1334]]= _0x47f2x3;this[_0x1bfe[1336]]= _0x47f2x4;this[_0x1bfe[1307]]= null!= _0x47f2x5?_0x47f2x5:1}mxUtils[_0x1bfe[1284]](mxRectangleShape,mxShape);mxRectangleShape[_0x1bfe[202]][_0x1bfe[1567]]= function(){return !this[_0x1bfe[1606]]&& !this[_0x1bfe[617]]&& 0== this[_0x1bfe[603]]};mxRectangleShape[_0x1bfe[202]][_0x1bfe[1601]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){if(this[_0x1bfe[1606]]){var _0x47f2xa=mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_ARCSIZE,100* mxConstants[_0x1bfe[1557]])/ 100,_0x47f2xa=Math[_0x1bfe[243]](_0x47f2x5* _0x47f2xa,_0x47f2x9* _0x47f2xa);_0x47f2x2[_0x1bfe[1320]](_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2xa)}else {_0x47f2x2[_0x1bfe[1319]](_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9)};_0x47f2x2[_0x1bfe[1337]]()};mxRectangleShape[_0x1bfe[202]][_0x1bfe[1602]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){this[_0x1bfe[617]]&& this[_0x1bfe[1604]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,this[_0x1bfe[1603]](_0x47f2x5+ this[_0x1bfe[1307]],_0x47f2x9+ this[_0x1bfe[1307]]))};mxRectangleShape[_0x1bfe[202]][_0x1bfe[1575]]= function(){this[_0x1bfe[1626]](this[_0x1bfe[252]]);this[_0x1bfe[1627]](this[_0x1bfe[252]]);this[_0x1bfe[1628]](this[_0x1bfe[252]])};mxRectangleShape[_0x1bfe[202]][_0x1bfe[1626]]= function(_0x47f2x2){var _0x47f2x3=9<= document[_0x1bfe[5]]?0:Math[_0x1bfe[430]](this[_0x1bfe[1307]]* this[_0x1bfe[255]]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[1629]]= Math[_0x1bfe[160]](1,_0x47f2x3)+ _0x1bfe[168];_0x47f2x2[_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[188];_0x47f2x2[_0x1bfe[124]][_0x1bfe[361]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[235]]- _0x47f2x3/ 2)+ _0x1bfe[168];_0x47f2x2[_0x1bfe[124]][_0x1bfe[125]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[236]]- _0x47f2x3/ 2)+ _0x1bfe[168];_0x1bfe[462]== document[_0x1bfe[135]]&& (_0x47f2x3= -_0x47f2x3);_0x47f2x2[_0x1bfe[124]][_0x1bfe[117]]= Math[_0x1bfe[488]](Math[_0x1bfe[160]](0,this[_0x1bfe[1562]][_0x1bfe[117]]+ _0x47f2x3))+ _0x1bfe[168];_0x47f2x2[_0x1bfe[124]][_0x1bfe[119]]= Math[_0x1bfe[488]](Math[_0x1bfe[160]](0,this[_0x1bfe[1562]][_0x1bfe[119]]+ _0x47f2x3))+ _0x1bfe[168]};mxRectangleShape[_0x1bfe[202]][_0x1bfe[1628]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1336]];null!= _0x47f2x3&& _0x47f2x3!= mxConstants[_0x1bfe[217]]?(_0x47f2x2[_0x1bfe[124]][_0x1bfe[1630]]= _0x47f2x3,this[_0x1bfe[1522]]?_0x47f2x2[_0x1bfe[124]][_0x1bfe[465]]= _0x1bfe[648]:0< this[_0x1bfe[1307]]&& (_0x47f2x2[_0x1bfe[124]][_0x1bfe[465]]= _0x1bfe[1631]),_0x47f2x2[_0x1bfe[124]][_0x1bfe[1629]]= Math[_0x1bfe[160]](1,Math[_0x1bfe[430]](this[_0x1bfe[1307]]* this[_0x1bfe[255]]))+ _0x1bfe[168]):_0x47f2x2[_0x1bfe[124]][_0x1bfe[1629]]= _0x1bfe[946];_0x47f2x3= this[_0x1bfe[1334]];null!= _0x47f2x3&& _0x47f2x3!= mxConstants[_0x1bfe[217]]?(_0x47f2x2[_0x1bfe[124]][_0x1bfe[1028]]= _0x47f2x3,_0x47f2x2[_0x1bfe[124]][_0x1bfe[1617]]= _0x1bfe[130]):this[_0x1bfe[1229]]?_0x47f2x2[_0x1bfe[124]][_0x1bfe[1028]]= _0x1bfe[1373]:8== document[_0x1bfe[5]]?mxUtils[_0x1bfe[1584]](_0x47f2x2):this[_0x1bfe[1600]](_0x47f2x2)};mxRectangleShape[_0x1bfe[202]][_0x1bfe[1627]]= function(_0x47f2x2){var _0x47f2x3=_0x1bfe[110];100> this[_0x1bfe[461]]&& (_0x47f2x3+= _0x1bfe[459]+ this[_0x1bfe[461]]+ _0x1bfe[460]);this[_0x1bfe[1596]]&& (_0x47f2x3+= _0x1bfe[1632]+ Math[_0x1bfe[488]](mxConstants[_0x1bfe[1237]]* this[_0x1bfe[255]])+ _0x1bfe[1633]+ Math[_0x1bfe[488]](mxConstants[_0x1bfe[1238]]* this[_0x1bfe[255]])+ _0x1bfe[1634]+ mxConstants[_0x1bfe[1235]]+ _0x1bfe[1635]);if(this[_0x1bfe[1299]]){var _0x47f2x4=this[_0x1bfe[1334]],_0x47f2x5=this[_0x1bfe[1299]],_0x47f2x9=_0x1bfe[468],_0x47f2xa={east:0,south:1,west:2,north:3},_0x47f2x12=null!= this[_0x1bfe[663]]?_0x47f2xa[this[_0x1bfe[663]]]:0;null!= this[_0x1bfe[607]]&& (_0x47f2x12= mxUtils[_0x1bfe[1454]](_0x47f2x12+ _0x47f2xa[this[_0x1bfe[607]]]- 1,4));1== _0x47f2x12?(_0x47f2x9= _0x1bfe[500],_0x47f2xa= _0x47f2x4,_0x47f2x4= _0x47f2x5,_0x47f2x5= _0x47f2xa):2== _0x47f2x12?(_0x47f2xa= _0x47f2x4,_0x47f2x4= _0x47f2x5,_0x47f2x5= _0x47f2xa):3== _0x47f2x12&& (_0x47f2x9= _0x1bfe[500]);_0x47f2x3+= _0x1bfe[1636]+ _0x47f2x4+ _0x1bfe[1637]+ _0x47f2x5+ _0x1bfe[1638]+ _0x47f2x9+ _0x1bfe[1635]};_0x47f2x2[_0x1bfe[124]][_0x1bfe[347]]= _0x47f2x3};function mxEllipse(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxShape[_0x1bfe[239]](this);this[_0x1bfe[1562]]= _0x47f2x2;this[_0x1bfe[1334]]= _0x47f2x3;this[_0x1bfe[1336]]= _0x47f2x4;this[_0x1bfe[1307]]= null!= _0x47f2x5?_0x47f2x5:1}mxUtils[_0x1bfe[1284]](mxEllipse,mxShape);mxEllipse[_0x1bfe[202]][_0x1bfe[1595]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2[_0x1bfe[680]](_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9);_0x47f2x2[_0x1bfe[1337]]()};function mxDoubleEllipse(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxShape[_0x1bfe[239]](this);this[_0x1bfe[1562]]= _0x47f2x2;this[_0x1bfe[1334]]= _0x47f2x3;this[_0x1bfe[1336]]= _0x47f2x4;this[_0x1bfe[1307]]= null!= _0x47f2x5?_0x47f2x5:1}mxUtils[_0x1bfe[1284]](mxDoubleEllipse,mxShape);mxDoubleEllipse[_0x1bfe[202]][_0x1bfe[1460]]= 10;mxDoubleEllipse[_0x1bfe[202]][_0x1bfe[1601]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2[_0x1bfe[680]](_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9);_0x47f2x2[_0x1bfe[1337]]()};mxDoubleEllipse[_0x1bfe[202]][_0x1bfe[1602]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=Math[_0x1bfe[243]](4,Math[_0x1bfe[243]](_0x47f2x5/ 5,_0x47f2x9/ 5));_0x47f2x5-= 2* _0x47f2xa;_0x47f2x9-= 2* _0x47f2xa;0< _0x47f2x5&& 0< _0x47f2x9&& _0x47f2x2[_0x1bfe[680]](_0x47f2x3+ _0x47f2xa,_0x47f2x4+ _0x47f2xa,_0x47f2x5,_0x47f2x9);_0x47f2x2[_0x1bfe[1336]]()};function mxRhombus(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxShape[_0x1bfe[239]](this);this[_0x1bfe[1562]]= _0x47f2x2;this[_0x1bfe[1334]]= _0x47f2x3;this[_0x1bfe[1336]]= _0x47f2x4;this[_0x1bfe[1307]]= null!= _0x47f2x5?_0x47f2x5:1}mxUtils[_0x1bfe[1284]](mxRhombus,mxShape);mxRhombus[_0x1bfe[202]][_0x1bfe[1595]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=_0x47f2x5/ 2,_0x47f2x12=_0x47f2x9/ 2;_0x47f2x2[_0x1bfe[1275]]();_0x47f2x2[_0x1bfe[1276]](_0x47f2x3+ _0x47f2xa,_0x47f2x4);_0x47f2x2[_0x1bfe[1277]](_0x47f2x3+ _0x47f2x5,_0x47f2x4+ _0x47f2x12);_0x47f2x2[_0x1bfe[1277]](_0x47f2x3+ _0x47f2xa,_0x47f2x4+ _0x47f2x9);_0x47f2x2[_0x1bfe[1277]](_0x47f2x3,_0x47f2x4+ _0x47f2x12);_0x47f2x2[_0x1bfe[268]]();_0x47f2x2[_0x1bfe[1337]]()};function mxPolyline(_0x47f2x2,_0x47f2x3,_0x47f2x4){mxShape[_0x1bfe[239]](this);this[_0x1bfe[1525]]= _0x47f2x2;this[_0x1bfe[1336]]= _0x47f2x3;this[_0x1bfe[1307]]= null!= _0x47f2x4?_0x47f2x4:1}mxUtils[_0x1bfe[1284]](mxPolyline,mxShape);mxPolyline[_0x1bfe[202]][_0x1bfe[1614]]= function(){return 0};mxPolyline[_0x1bfe[202]][_0x1bfe[1594]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1639]](_0x47f2x2,_0x47f2x3,this[_0x1bfe[1606]])};mxPolyline[_0x1bfe[202]][_0x1bfe[1639]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ 2,_0x47f2x9=_0x47f2x3[0],_0x47f2xa=_0x47f2x3[_0x47f2x3[_0x1bfe[67]]- 1];_0x47f2x2[_0x1bfe[1275]]();_0x47f2x2[_0x1bfe[1276]](_0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]]);for(var _0x47f2x12=1;_0x47f2x12< _0x47f2x3[_0x1bfe[67]]- 1;_0x47f2x12++){var _0x47f2x13=_0x47f2x3[_0x47f2x12],_0x47f2x14=_0x47f2x9[_0x1bfe[235]]- _0x47f2x13[_0x1bfe[235]],_0x47f2x9=_0x47f2x9[_0x1bfe[236]]- _0x47f2x13[_0x1bfe[236]];if(_0x47f2x4&& _0x47f2x12< _0x47f2x3[_0x1bfe[67]]- 1&& (0!= _0x47f2x14|| 0!= _0x47f2x9)){var _0x47f2x15=Math[_0x1bfe[428]](_0x47f2x14* _0x47f2x14+ _0x47f2x9* _0x47f2x9),_0x47f2x14=_0x47f2x14* Math[_0x1bfe[243]](_0x47f2x5,_0x47f2x15/ 2)/ _0x47f2x15,_0x47f2x9=_0x47f2x9* Math[_0x1bfe[243]](_0x47f2x5,_0x47f2x15/ 2)/ _0x47f2x15;_0x47f2x2[_0x1bfe[1277]](_0x47f2x13[_0x1bfe[235]]+ _0x47f2x14,_0x47f2x13[_0x1bfe[236]]+ _0x47f2x9);_0x47f2x9= _0x47f2x3[_0x47f2x12+ 1];_0x47f2x14= _0x47f2x9[_0x1bfe[235]]- _0x47f2x13[_0x1bfe[235]];_0x47f2x9= _0x47f2x9[_0x1bfe[236]]- _0x47f2x13[_0x1bfe[236]];_0x47f2x15= Math[_0x1bfe[160]](1,Math[_0x1bfe[428]](_0x47f2x14* _0x47f2x14+ _0x47f2x9* _0x47f2x9));_0x47f2x14= _0x47f2x14* Math[_0x1bfe[243]](_0x47f2x5,_0x47f2x15/ 2)/ _0x47f2x15;_0x47f2x9= _0x47f2x9* Math[_0x1bfe[243]](_0x47f2x5,_0x47f2x15/ 2)/ _0x47f2x15;_0x47f2x14= _0x47f2x13[_0x1bfe[235]]+ _0x47f2x14;_0x47f2x9= _0x47f2x13[_0x1bfe[236]]+ _0x47f2x9;_0x47f2x2[_0x1bfe[1278]](_0x47f2x13[_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]],_0x47f2x14,_0x47f2x9);_0x47f2x13= new mxPoint(_0x47f2x14,_0x47f2x9)}else {_0x47f2x2[_0x1bfe[1277]](_0x47f2x13[_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]])};_0x47f2x9= _0x47f2x13};_0x47f2x2[_0x1bfe[1277]](_0x47f2xa[_0x1bfe[235]],_0x47f2xa[_0x1bfe[236]]);_0x47f2x2[_0x1bfe[1336]]()};function mxArrow(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12){mxShape[_0x1bfe[239]](this);this[_0x1bfe[1525]]= _0x47f2x2;this[_0x1bfe[1334]]= _0x47f2x3;this[_0x1bfe[1336]]= _0x47f2x4;this[_0x1bfe[1307]]= null!= _0x47f2x5?_0x47f2x5:1;this[_0x1bfe[1640]]= null!= _0x47f2x9?_0x47f2x9:mxConstants[_0x1bfe[1641]];this[_0x1bfe[657]]= null!= _0x47f2xa?_0x47f2xa:mxConstants[_0x1bfe[1642]];this[_0x1bfe[643]]= null!= _0x47f2x12?_0x47f2x12:mxConstants[_0x1bfe[1643]]}mxUtils[_0x1bfe[1284]](mxArrow,mxShape);mxArrow[_0x1bfe[202]][_0x1bfe[1594]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=mxConstants[_0x1bfe[1642]],_0x47f2x5=mxConstants[_0x1bfe[1641]],_0x47f2x9=mxConstants[_0x1bfe[1643]],_0x47f2xa=_0x47f2x3[0],_0x47f2x12=_0x47f2x3[_0x47f2x3[_0x1bfe[67]]- 1],_0x47f2x13=_0x47f2x12[_0x1bfe[235]]- _0x47f2xa[_0x1bfe[235]],_0x47f2x14=_0x47f2x12[_0x1bfe[236]]- _0x47f2xa[_0x1bfe[236]],_0x47f2x15=Math[_0x1bfe[428]](_0x47f2x13* _0x47f2x13+ _0x47f2x14* _0x47f2x14),_0x47f2x16=_0x47f2x15- 2* _0x47f2x4- _0x47f2x9,_0x47f2x13=_0x47f2x13/ _0x47f2x15,_0x47f2x14=_0x47f2x14/ _0x47f2x15,_0x47f2x15=_0x47f2x5* _0x47f2x14/ 3,_0x47f2x5=-_0x47f2x5* _0x47f2x13/ 3,_0x47f2x9=_0x47f2xa[_0x1bfe[235]]- _0x47f2x15/ 2+ _0x47f2x4* _0x47f2x13,_0x47f2xa=_0x47f2xa[_0x1bfe[236]]- _0x47f2x5/ 2+ _0x47f2x4* _0x47f2x14,_0x47f2x17=_0x47f2x9+ _0x47f2x15,_0x47f2x18=_0x47f2xa+ _0x47f2x5,_0x47f2x19=_0x47f2x17+ _0x47f2x16* _0x47f2x13,_0x47f2x16=_0x47f2x18+ _0x47f2x16* _0x47f2x14,_0x47f2x1a=_0x47f2x19+ _0x47f2x15,_0x47f2x1b=_0x47f2x16+ _0x47f2x5,_0x47f2x1c=_0x47f2x1a- 3* _0x47f2x15,_0x47f2x1d=_0x47f2x1b- 3* _0x47f2x5;_0x47f2x2[_0x1bfe[1275]]();_0x47f2x2[_0x1bfe[1276]](_0x47f2x9,_0x47f2xa);_0x47f2x2[_0x1bfe[1277]](_0x47f2x17,_0x47f2x18);_0x47f2x2[_0x1bfe[1277]](_0x47f2x19,_0x47f2x16);_0x47f2x2[_0x1bfe[1277]](_0x47f2x1a,_0x47f2x1b);_0x47f2x2[_0x1bfe[1277]](_0x47f2x12[_0x1bfe[235]]- _0x47f2x4* _0x47f2x13,_0x47f2x12[_0x1bfe[236]]- _0x47f2x4* _0x47f2x14);_0x47f2x2[_0x1bfe[1277]](_0x47f2x1c,_0x47f2x1d);_0x47f2x2[_0x1bfe[1277]](_0x47f2x1c+ _0x47f2x15,_0x47f2x1d+ _0x47f2x5);_0x47f2x2[_0x1bfe[268]]();_0x47f2x2[_0x1bfe[1337]]()};function mxText(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15,_0x47f2x16,_0x47f2x17,_0x47f2x18,_0x47f2x19,_0x47f2x1a,_0x47f2x1b,_0x47f2x1c,_0x47f2x1d,_0x47f2x1e,_0x47f2x1f){mxShape[_0x1bfe[239]](this);this[_0x1bfe[131]]= _0x47f2x2;this[_0x1bfe[1562]]= _0x47f2x3;this[_0x1bfe[352]]= null!= _0x47f2x9?_0x47f2x9:_0x1bfe[586];this[_0x1bfe[611]]= null!= _0x47f2x4?_0x47f2x4:_0x1bfe[110];this[_0x1bfe[552]]= null!= _0x47f2x5?_0x47f2x5:_0x1bfe[110];this[_0x1bfe[1288]]= null!= _0x47f2xa?_0x47f2xa:mxConstants[_0x1bfe[484]];this[_0x1bfe[803]]= null!= _0x47f2x12?_0x47f2x12:mxConstants[_0x1bfe[483]];this[_0x1bfe[666]]= null!= _0x47f2x13?_0x47f2x13:mxConstants[_0x1bfe[1644]];this[_0x1bfe[657]]= parseInt(_0x47f2x14|| 2);this[_0x1bfe[658]]= this[_0x1bfe[657]]+ parseInt(_0x47f2x15|| 0);this[_0x1bfe[661]]= this[_0x1bfe[657]]+ parseInt(_0x47f2x16|| 0);this[_0x1bfe[660]]= this[_0x1bfe[657]]+ parseInt(_0x47f2x17|| 0);this[_0x1bfe[659]]= this[_0x1bfe[657]]+ parseInt(_0x47f2x18|| 0);this[_0x1bfe[662]]= null!= _0x47f2x19?_0x47f2x19:!0;this[_0x1bfe[1537]]= _0x47f2x1a;this[_0x1bfe[467]]= _0x47f2x1b;this[_0x1bfe[1333]]= null!= _0x47f2x1c?_0x47f2x1c:!1;this[_0x1bfe[1645]]= null!= _0x47f2x1d?_0x47f2x1d:!1;this[_0x1bfe[277]]= null!= _0x47f2x1e?_0x47f2x1e:_0x1bfe[189];this[_0x1bfe[629]]= null!= _0x47f2x1f?_0x47f2x1f:0;this[_0x1bfe[603]]= 0}mxUtils[_0x1bfe[1284]](mxText,mxShape);mxText[_0x1bfe[202]][_0x1bfe[1646]]= 0;mxText[_0x1bfe[202]][_0x1bfe[1647]]= 0;mxText[_0x1bfe[202]][_0x1bfe[1648]]= 0;mxText[_0x1bfe[202]][_0x1bfe[1649]]= 0;mxText[_0x1bfe[202]][_0x1bfe[1650]]= !0;mxText[_0x1bfe[202]][_0x1bfe[1616]]= -90;mxText[_0x1bfe[202]][_0x1bfe[1651]]= !0;mxText[_0x1bfe[202]][_0x1bfe[1652]]= !1;mxText[_0x1bfe[202]][_0x1bfe[1566]]= function(){return !1};mxText[_0x1bfe[202]][_0x1bfe[1567]]= function(){return 8!= document[_0x1bfe[5]]};mxText[_0x1bfe[202]][_0x1bfe[1568]]= function(){return 0};mxText[_0x1bfe[202]][_0x1bfe[1574]]= function(){return null!= this[_0x1bfe[1562]]&& !isNaN(this[_0x1bfe[1562]][_0x1bfe[235]])&& !isNaN(this[_0x1bfe[1562]][_0x1bfe[236]])&& !isNaN(this[_0x1bfe[1562]][_0x1bfe[117]])&& !isNaN(this[_0x1bfe[1562]][_0x1bfe[119]])};mxText[_0x1bfe[202]][_0x1bfe[1577]]= function(){var _0x47f2x2=this[_0x1bfe[252]];8== document[_0x1bfe[5]]&& null!= _0x47f2x2[_0x1bfe[285]]&& (_0x47f2x2= _0x47f2x2[_0x1bfe[285]],null!= _0x47f2x2[_0x1bfe[285]]&& (_0x47f2x2= _0x47f2x2[_0x1bfe[285]]));this[_0x1bfe[1563]]= this[_0x1bfe[1562]][_0x1bfe[238]]();var _0x47f2x3=this[_0x1bfe[1615]]();if(!this[_0x1bfe[1652]]&& null!= _0x47f2x2&& _0x1bfe[1334]!= this[_0x1bfe[277]]&& (!this[_0x1bfe[1645]]|| !this[_0x1bfe[1651]])){var _0x47f2x4=null,_0x47f2x5=null;if(null!= _0x47f2x2[_0x1bfe[538]]){if(null!= _0x47f2x2[_0x1bfe[285]]&& null!= _0x47f2x2[_0x1bfe[285]][_0x1bfe[285]]&& _0x1bfe[1435]== _0x47f2x2[_0x1bfe[285]][_0x1bfe[285]][_0x1bfe[301]]){_0x47f2x2= _0x47f2x2[_0x1bfe[285]][_0x1bfe[285]],_0x47f2x4= this[_0x1bfe[1333]]?this[_0x1bfe[1562]][_0x1bfe[117]]:parseInt(_0x47f2x2[_0x1bfe[284]](_0x1bfe[117]))* this[_0x1bfe[255]],_0x47f2x5= parseInt(_0x47f2x2[_0x1bfe[284]](_0x1bfe[119]))* this[_0x1bfe[255]]}else {_0x47f2x3= _0x47f2x2[_0x1bfe[1451]]();if(0== _0x47f2x3[_0x1bfe[117]]&& 0== _0x47f2x3[_0x1bfe[119]]){return};this[_0x1bfe[1563]]= new mxRectangle(_0x47f2x3[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]],_0x47f2x3[_0x1bfe[117]],_0x47f2x3[_0x1bfe[119]]);_0x47f2x3= 0}}else {_0x47f2x5= this[_0x1bfe[724]][_0x1bfe[441]][_0x1bfe[1653]],null!= this[_0x1bfe[359]]&& null!= this[_0x1bfe[167]]?(_0x47f2x4= this[_0x1bfe[1333]]?this[_0x1bfe[1562]][_0x1bfe[117]]:this[_0x1bfe[359]]* this[_0x1bfe[255]],_0x47f2x5= this[_0x1bfe[167]]* this[_0x1bfe[255]]):null!= _0x47f2x5?(this[_0x1bfe[1441]](_0x47f2x5),this[_0x1bfe[1654]](_0x47f2x5),mxUtils[_0x1bfe[1331]](this[_0x1bfe[131]])?_0x47f2x5[_0x1bfe[339]]= this[_0x1bfe[131]][_0x1bfe[342]]:(_0x47f2x4= this[_0x1bfe[1650]]?this[_0x1bfe[131]][_0x1bfe[230]](/\n/g,_0x1bfe[1453]):this[_0x1bfe[131]],_0x47f2x5[_0x1bfe[339]]= _0x47f2x4),_0x47f2x4= this[_0x1bfe[1333]]?this[_0x1bfe[1562]][_0x1bfe[117]]:_0x47f2x5[_0x1bfe[359]]* this[_0x1bfe[255]],_0x47f2x5= _0x47f2x5[_0x1bfe[167]]* this[_0x1bfe[255]]):(_0x47f2x4= this[_0x1bfe[1333]]?this[_0x1bfe[1562]][_0x1bfe[117]]:_0x47f2x2[_0x1bfe[359]]* this[_0x1bfe[255]],_0x47f2x5= _0x47f2x2[_0x1bfe[167]]* this[_0x1bfe[255]])};null!= _0x47f2x4&& null!= _0x47f2x5&& (this[_0x1bfe[1563]]= new mxRectangle(this[_0x1bfe[1562]][_0x1bfe[235]]+ this[_0x1bfe[1655]][_0x1bfe[235]]* _0x47f2x4,this[_0x1bfe[1562]][_0x1bfe[236]]+ this[_0x1bfe[1655]][_0x1bfe[236]]* _0x47f2x5,_0x47f2x4,_0x47f2x5))}else {this[_0x1bfe[1563]][_0x1bfe[235]]+= this[_0x1bfe[1655]][_0x1bfe[235]]* this[_0x1bfe[1563]][_0x1bfe[117]],this[_0x1bfe[1563]][_0x1bfe[236]]+= this[_0x1bfe[1655]][_0x1bfe[236]]* this[_0x1bfe[1563]][_0x1bfe[119]]};null!= this[_0x1bfe[1563]]&& (0!= _0x47f2x3&& (_0x47f2x3= mxUtils[_0x1bfe[1613]](this[_0x1bfe[1563]],_0x47f2x3),this[_0x1bfe[1563]][_0x1bfe[235]]= _0x47f2x3[_0x1bfe[235]],this[_0x1bfe[1563]][_0x1bfe[236]]= _0x47f2x3[_0x1bfe[236]],mxClient[_0x1bfe[496]]|| (this[_0x1bfe[1563]][_0x1bfe[117]]= _0x47f2x3[_0x1bfe[117]],this[_0x1bfe[1563]][_0x1bfe[119]]= _0x47f2x3[_0x1bfe[119]])),this[_0x1bfe[1563]][_0x1bfe[235]]= Math[_0x1bfe[519]](this[_0x1bfe[1563]][_0x1bfe[235]]),this[_0x1bfe[1563]][_0x1bfe[236]]= Math[_0x1bfe[519]](this[_0x1bfe[1563]][_0x1bfe[236]]),this[_0x1bfe[1563]][_0x1bfe[117]]= Math[_0x1bfe[430]](this[_0x1bfe[1563]][_0x1bfe[117]]),this[_0x1bfe[1563]][_0x1bfe[119]]= Math[_0x1bfe[430]](this[_0x1bfe[1563]][_0x1bfe[119]]))};mxText[_0x1bfe[202]][_0x1bfe[1598]]= function(){return 0};mxText[_0x1bfe[202]][_0x1bfe[1615]]= function(){return null!= this[_0x1bfe[724]]&& null!= this[_0x1bfe[724]][_0x1bfe[253]]?this[_0x1bfe[724]][_0x1bfe[253]][_0x1bfe[1615]]():0};mxText[_0x1bfe[202]][_0x1bfe[1590]]= function(){return !this[_0x1bfe[662]]&& null!= this[_0x1bfe[724]]&& this[_0x1bfe[724]][_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[1193]](this[_0x1bfe[724]][_0x1bfe[246]])};mxText[_0x1bfe[202]][_0x1bfe[1592]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){mxShape[_0x1bfe[202]][_0x1bfe[1592]][_0x1bfe[183]](this,arguments);_0x47f2x2[_0x1bfe[1259]](this[_0x1bfe[352]]);_0x47f2x2[_0x1bfe[1260]](this[_0x1bfe[1537]]);_0x47f2x2[_0x1bfe[1262]](this[_0x1bfe[467]]);_0x47f2x2[_0x1bfe[1265]](this[_0x1bfe[1288]]);_0x47f2x2[_0x1bfe[1264]](this[_0x1bfe[803]]);_0x47f2x2[_0x1bfe[1266]](this[_0x1bfe[666]])};mxText[_0x1bfe[202]][_0x1bfe[1586]]= function(){this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[361]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[235]])+ _0x1bfe[168];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[125]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[236]])+ _0x1bfe[168];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[117]]= _0x1bfe[942];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[119]]= _0x1bfe[942];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[189]};mxText[_0x1bfe[202]][_0x1bfe[1209]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[255]],_0x47f2x4=this[_0x1bfe[1562]][_0x1bfe[235]]/ _0x47f2x3,_0x47f2x5=this[_0x1bfe[1562]][_0x1bfe[236]]/ _0x47f2x3,_0x47f2x9=this[_0x1bfe[1562]][_0x1bfe[117]]/ _0x47f2x3,_0x47f2x3=this[_0x1bfe[1562]][_0x1bfe[119]]/ _0x47f2x3;this[_0x1bfe[1591]](_0x47f2x2,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2x3);this[_0x1bfe[1592]](_0x47f2x2,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2x3);var _0x47f2xa=mxUtils[_0x1bfe[1331]](this[_0x1bfe[131]])|| this[_0x1bfe[507]]== mxConstants[_0x1bfe[1656]],_0x47f2x12=_0x47f2xa|| _0x47f2x2 instanceof mxVmlCanvas2D?_0x1bfe[1428]:_0x1bfe[110],_0x47f2x13=this[_0x1bfe[131]];!_0x47f2xa&& _0x1bfe[1428]== _0x47f2x12&& (_0x47f2x13= mxUtils[_0x1bfe[321]](_0x47f2x13,!1));_0x47f2x13= !mxUtils[_0x1bfe[1331]](this[_0x1bfe[131]])&& this[_0x1bfe[1650]]&& _0x1bfe[1428]== _0x47f2x12?_0x47f2x13[_0x1bfe[230]](/\n/g,_0x1bfe[1453]):_0x47f2x13;_0x47f2x2[_0x1bfe[963]](_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2x3,_0x47f2x13,this[_0x1bfe[611]],this[_0x1bfe[552]],this[_0x1bfe[1333]],_0x47f2x12,_0x1bfe[1334]== this[_0x1bfe[277]],this[_0x1bfe[1645]],this[_0x1bfe[1615]]())};mxText[_0x1bfe[202]][_0x1bfe[1575]]= function(){var _0x47f2x2=this[_0x1bfe[252]][_0x1bfe[124]];_0x47f2x2[_0x1bfe[461]]= 1> this[_0x1bfe[461]]?this[_0x1bfe[461]]:_0x1bfe[110];_0x47f2x2[_0x1bfe[277]]= _0x1bfe[110];_0x47f2x2[_0x1bfe[117]]= _0x1bfe[110];_0x47f2x2[_0x1bfe[119]]= _0x1bfe[110];this[_0x1bfe[1441]](this[_0x1bfe[252]]);this[_0x1bfe[1654]](this[_0x1bfe[252]]);this[_0x1bfe[1657]]();this[_0x1bfe[167]]= this[_0x1bfe[359]]= null;null!= mxClient[_0x1bfe[73]]?this[_0x1bfe[1658]]():this[_0x1bfe[1659]]()};mxText[_0x1bfe[202]][_0x1bfe[1658]]= function(){var _0x47f2x2=this[_0x1bfe[1615]](),_0x47f2x3=this[_0x1bfe[252]][_0x1bfe[124]],_0x47f2x4=this[_0x1bfe[1655]][_0x1bfe[235]],_0x47f2x5=this[_0x1bfe[1655]][_0x1bfe[236]];0!= _0x47f2x2?(_0x47f2x3[mxClient[_0x1bfe[73]]+ _0x1bfe[1660]]= 100* -_0x47f2x4+ _0x1bfe[1661]+ 100* -_0x47f2x5+ _0x1bfe[229],_0x47f2x3[mxClient[_0x1bfe[73]]+ _0x1bfe[1662]]= _0x1bfe[536]+ 100* _0x47f2x4+ _0x1bfe[1663]+ 100* _0x47f2x5+ _0x1bfe[1664]+ this[_0x1bfe[255]]+ _0x1bfe[1665]+ _0x47f2x2+ _0x1bfe[1666]):(_0x47f2x3[mxClient[_0x1bfe[73]]+ _0x1bfe[1660]]= _0x1bfe[1667],_0x47f2x3[mxClient[_0x1bfe[73]]+ _0x1bfe[1662]]= _0x1bfe[1402]+ this[_0x1bfe[255]]+ _0x1bfe[1393]+ 100* _0x47f2x4+ _0x1bfe[1663]+ 100* _0x47f2x5+ _0x1bfe[1668]);_0x47f2x3[_0x1bfe[361]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[235]])+ _0x1bfe[168];_0x47f2x3[_0x1bfe[125]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[236]])+ _0x1bfe[168]};mxText[_0x1bfe[202]][_0x1bfe[1659]]= function(){var _0x47f2x2=this[_0x1bfe[252]][_0x1bfe[124]],_0x47f2x3=this[_0x1bfe[1655]][_0x1bfe[235]],_0x47f2x4=this[_0x1bfe[1655]][_0x1bfe[236]],_0x47f2x5=this[_0x1bfe[255]];_0x47f2x2[_0x1bfe[347]]= _0x1bfe[110];var _0x47f2x9=0,_0x47f2xa=0,_0x47f2x12=null!= this[_0x1bfe[724]]?this[_0x1bfe[724]][_0x1bfe[441]][_0x1bfe[1653]]:null;if(null!= _0x47f2x12){_0x47f2x12[_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[110];_0x47f2x12[_0x1bfe[124]][_0x1bfe[119]]= _0x1bfe[110];_0x47f2x12[_0x1bfe[124]][_0x1bfe[117]]= _0x1bfe[110];this[_0x1bfe[1441]](_0x47f2x12);this[_0x1bfe[1654]](_0x47f2x12);if(mxUtils[_0x1bfe[1331]](this[_0x1bfe[131]])){_0x47f2x12[_0x1bfe[339]]= this[_0x1bfe[131]][_0x1bfe[342]]}else {var _0x47f2x13=this[_0x1bfe[131]];this[_0x1bfe[507]]!= mxConstants[_0x1bfe[1656]]&& (_0x47f2x13= mxUtils[_0x1bfe[321]](_0x47f2x13,!1));_0x47f2x13= this[_0x1bfe[1650]]?_0x47f2x13[_0x1bfe[230]](/\n/g,_0x1bfe[1453]):_0x47f2x13;_0x47f2x12[_0x1bfe[339]]= _0x47f2x13};_0x47f2x9= _0x47f2x12[_0x1bfe[359]]+ 2;_0x47f2xa= _0x47f2x12[_0x1bfe[167]]+ 2}else {_0x47f2x9= this[_0x1bfe[252]][_0x1bfe[359]],_0x47f2xa= this[_0x1bfe[252]][_0x1bfe[167]]+ 1};this[_0x1bfe[359]]= _0x47f2x9;this[_0x1bfe[167]]= _0x47f2xa;_0x47f2x12= this[_0x1bfe[1562]][_0x1bfe[117]]/ _0x47f2x5;_0x47f2x13= this[_0x1bfe[1562]][_0x1bfe[119]]/ _0x47f2x5;mxClient[_0x1bfe[496]]&& (this[_0x1bfe[1645]]|| _0x1bfe[1334]== this[_0x1bfe[277]])&& 0< _0x47f2x13?(_0x47f2x13= Math[_0x1bfe[243]](_0x47f2x13,_0x47f2xa),_0x47f2x2[_0x1bfe[119]]= Math[_0x1bfe[488]](_0x47f2x13+ 1)+ _0x1bfe[168]):_0x47f2x13= _0x47f2xa;_0x1bfe[1334]!= this[_0x1bfe[277]]&& (mxClient[_0x1bfe[496]]&& (this[_0x1bfe[1645]]|| this[_0x1bfe[1333]])&& 0< _0x47f2x12?(_0x47f2x12= Math[_0x1bfe[243]](_0x47f2x12,_0x47f2x9),_0x47f2x2[_0x1bfe[117]]= Math[_0x1bfe[488]](_0x47f2x12)+ _0x1bfe[168]):_0x47f2x12= _0x47f2x9);var _0x47f2x13=_0x47f2x13* _0x47f2x5,_0x47f2x12=_0x47f2x12* _0x47f2x5,_0x47f2x9=this[_0x1bfe[1615]]()* (Math[_0x1bfe[424]]/ 180),_0x47f2xa=parseFloat(parseFloat(Math[_0x1bfe[426]](_0x47f2x9))[_0x1bfe[1293]](8)),_0x47f2x14=parseFloat(parseFloat(Math[_0x1bfe[427]](-_0x47f2x9))[_0x1bfe[1293]](8)),_0x47f2x9=_0x47f2x9% (2* Math[_0x1bfe[424]]);0> _0x47f2x9&& (_0x47f2x9+= 2* Math[_0x1bfe[424]]);_0x47f2x9%= Math[_0x1bfe[424]];_0x47f2x9> Math[_0x1bfe[424]]/ 2&& (_0x47f2x9= Math[_0x1bfe[424]]- _0x47f2x9);var _0x47f2x15=Math[_0x1bfe[426]](_0x47f2x9),_0x47f2x16=Math[_0x1bfe[427]](-_0x47f2x9),_0x47f2x3=_0x47f2x12* -(_0x47f2x3+ 0.5),_0x47f2x4=_0x47f2x13* -(_0x47f2x4+ 0.5),_0x47f2x17=(_0x47f2x13- _0x47f2x13* _0x47f2x15+ _0x47f2x12* _0x47f2x16)/ 2+ _0x47f2x14* _0x47f2x3- _0x47f2xa* _0x47f2x4;0!= _0x47f2x9&& (_0x47f2x2[_0x1bfe[347]]= _0x1bfe[1505]+ _0x47f2xa+ _0x1bfe[1506]+ _0x47f2x14+ _0x1bfe[1507]+ -_0x47f2x14+ _0x1bfe[1508]+ _0x47f2xa+ _0x1bfe[1509]);_0x47f2x2[_0x1bfe[499]]= _0x47f2x5;_0x47f2x2[_0x1bfe[361]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[235]]+ ((_0x47f2x12- _0x47f2x12* _0x47f2x15+ _0x47f2x13* _0x47f2x16)/ 2- _0x47f2xa* _0x47f2x3- _0x47f2x14* _0x47f2x4)- _0x47f2x12/ 2)+ _0x1bfe[168];_0x47f2x2[_0x1bfe[125]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[236]]+ _0x47f2x17- _0x47f2x13/ 2)+ _0x1bfe[168]};mxText[_0x1bfe[202]][_0x1bfe[1657]]= function(){if(mxUtils[_0x1bfe[1331]](this[_0x1bfe[131]])){this[_0x1bfe[252]][_0x1bfe[339]]= _0x1bfe[110],this[_0x1bfe[252]][_0x1bfe[62]](this[_0x1bfe[131]])}else {var _0x47f2x2=this[_0x1bfe[131]];this[_0x1bfe[507]]!= mxConstants[_0x1bfe[1656]]&& (_0x47f2x2= mxUtils[_0x1bfe[321]](_0x47f2x2,!1));var _0x47f2x2=this[_0x1bfe[1650]]?_0x47f2x2[_0x1bfe[230]](/\n/g,_0x1bfe[1453]):_0x47f2x2,_0x47f2x3=null!= this[_0x1bfe[1537]]&& this[_0x1bfe[1537]]!= mxConstants[_0x1bfe[217]]?this[_0x1bfe[1537]]:null,_0x47f2x4=null!= this[_0x1bfe[467]]&& this[_0x1bfe[467]]!= mxConstants[_0x1bfe[217]]?this[_0x1bfe[467]]:null;if(null!= _0x47f2x3|| null!= _0x47f2x4){if(_0x1bfe[1334]== this[_0x1bfe[277]]){null!= _0x47f2x3&& (this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[1028]]= _0x47f2x3),null!= _0x47f2x4&& (this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[467]]= _0x1bfe[1669]+ _0x47f2x4)}else {var _0x47f2x5=_0x1bfe[110];null!= _0x47f2x3&& (_0x47f2x5+= _0x1bfe[1418]+ _0x47f2x3+ _0x1bfe[471]);null!= _0x47f2x4&& (_0x47f2x5+= _0x1bfe[1419]+ _0x47f2x4+ _0x1bfe[471]);_0x47f2x2= _0x1bfe[1670]+ _0x47f2x5+ _0x1bfe[1671]+ this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[489]]+ _0x1bfe[1423]+ _0x47f2x2+ _0x1bfe[1424];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[489]]= _0x1bfe[110]}};this[_0x1bfe[252]][_0x1bfe[339]]= _0x47f2x2}};mxText[_0x1bfe[202]][_0x1bfe[1441]]= function(_0x47f2x2){_0x47f2x2= _0x47f2x2[_0x1bfe[124]];_0x47f2x2[_0x1bfe[489]]= Math[_0x1bfe[488]](this[_0x1bfe[803]]* mxConstants[_0x1bfe[490]])+ _0x1bfe[168];_0x47f2x2[_0x1bfe[487]]= Math[_0x1bfe[488]](this[_0x1bfe[803]])+ _0x1bfe[168];_0x47f2x2[_0x1bfe[486]]= this[_0x1bfe[1288]];_0x47f2x2[_0x1bfe[123]]= _0x1bfe[125];_0x47f2x2[_0x1bfe[352]]= this[_0x1bfe[352]];_0x47f2x2[_0x1bfe[1452]]= (this[_0x1bfe[666]]& mxConstants[_0x1bfe[1410]])== mxConstants[_0x1bfe[1410]]?_0x1bfe[1447]:_0x1bfe[110];_0x47f2x2[_0x1bfe[666]]= (this[_0x1bfe[666]]& mxConstants[_0x1bfe[1412]])== mxConstants[_0x1bfe[1412]]?_0x1bfe[1449]:_0x1bfe[110];_0x47f2x2[_0x1bfe[1498]]= (this[_0x1bfe[666]]& mxConstants[_0x1bfe[1414]])== mxConstants[_0x1bfe[1414]]?_0x1bfe[355]:_0x1bfe[110];_0x47f2x2[_0x1bfe[1165]]= this[_0x1bfe[611]]== mxConstants[_0x1bfe[479]]?_0x1bfe[698]:this[_0x1bfe[611]]== mxConstants[_0x1bfe[480]]?_0x1bfe[699]:_0x1bfe[361]};mxText[_0x1bfe[202]][_0x1bfe[1654]]= function(_0x47f2x2){var _0x47f2x3=Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[117]]/ this[_0x1bfe[255]]),_0x47f2x4=Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[119]]/ this[_0x1bfe[255]]);_0x47f2x2= _0x47f2x2[_0x1bfe[124]];this[_0x1bfe[1645]]?(_0x47f2x2[_0x1bfe[277]]= _0x1bfe[188],0< _0x47f2x4&& (_0x47f2x2[_0x1bfe[1503]]= _0x47f2x4+ _0x1bfe[168]),0< _0x47f2x3&& (_0x47f2x2[_0x1bfe[117]]= _0x47f2x3+ _0x1bfe[168])):_0x1bfe[1334]== this[_0x1bfe[277]]&& (_0x47f2x2[_0x1bfe[117]]= _0x47f2x3+ _0x1bfe[168],0< _0x47f2x4&& (_0x47f2x2[_0x1bfe[1503]]= _0x47f2x4+ _0x1bfe[168]));this[_0x1bfe[1333]]?(!this[_0x1bfe[1645]]&& 0< _0x47f2x3&& (_0x47f2x2[_0x1bfe[117]]= _0x47f2x3+ _0x1bfe[168]),_0x47f2x2[_0x1bfe[493]]= _0x1bfe[1502]):_0x47f2x2[_0x1bfe[493]]= _0x1bfe[494]};mxText[_0x1bfe[202]][_0x1bfe[1672]]= function(){this[_0x1bfe[1655]]= mxUtils[_0x1bfe[1501]](this[_0x1bfe[611]],this[_0x1bfe[552]])};mxText[_0x1bfe[202]][_0x1bfe[1673]]= function(){var _0x47f2x2=0,_0x47f2x3=0,_0x47f2x2=this[_0x1bfe[611]]== mxConstants[_0x1bfe[479]]?(this[_0x1bfe[659]]- this[_0x1bfe[661]])/ 2:this[_0x1bfe[611]]== mxConstants[_0x1bfe[480]]?-this[_0x1bfe[661]]- this[_0x1bfe[1649]]:this[_0x1bfe[659]]+ this[_0x1bfe[1648]],_0x47f2x3=this[_0x1bfe[552]]== mxConstants[_0x1bfe[481]]?(this[_0x1bfe[658]]- this[_0x1bfe[660]])/ 2:this[_0x1bfe[552]]== mxConstants[_0x1bfe[482]]?-this[_0x1bfe[660]]- this[_0x1bfe[1647]]:this[_0x1bfe[658]]+ this[_0x1bfe[1646]];return new mxPoint(_0x47f2x2,_0x47f2x3)};function mxTriangle(){mxActor[_0x1bfe[239]](this)}mxUtils[_0x1bfe[1284]](mxTriangle,mxActor);mxTriangle[_0x1bfe[202]][_0x1bfe[1625]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2[_0x1bfe[1276]](0,0);_0x47f2x2[_0x1bfe[1277]](_0x47f2x5,0.5* _0x47f2x9);_0x47f2x2[_0x1bfe[1277]](0,_0x47f2x9);_0x47f2x2[_0x1bfe[268]]()};function mxHexagon(){mxActor[_0x1bfe[239]](this)}mxUtils[_0x1bfe[1284]](mxHexagon,mxActor);mxHexagon[_0x1bfe[202]][_0x1bfe[1625]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2[_0x1bfe[1276]](0.25* _0x47f2x5,0);_0x47f2x2[_0x1bfe[1277]](0.75* _0x47f2x5,0);_0x47f2x2[_0x1bfe[1277]](_0x47f2x5,0.5* _0x47f2x9);_0x47f2x2[_0x1bfe[1277]](0.75* _0x47f2x5,_0x47f2x9);_0x47f2x2[_0x1bfe[1277]](0.25* _0x47f2x5,_0x47f2x9);_0x47f2x2[_0x1bfe[1277]](0,0.5* _0x47f2x9);_0x47f2x2[_0x1bfe[268]]()};function mxLine(_0x47f2x2,_0x47f2x3,_0x47f2x4){mxShape[_0x1bfe[239]](this);this[_0x1bfe[1562]]= _0x47f2x2;this[_0x1bfe[1336]]= _0x47f2x3;this[_0x1bfe[1307]]= null!= _0x47f2x4?_0x47f2x4:1}mxUtils[_0x1bfe[1284]](mxLine,mxShape);mxLine[_0x1bfe[202]][_0x1bfe[1595]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x4+= _0x47f2x9/ 2;_0x47f2x2[_0x1bfe[1275]]();_0x47f2x2[_0x1bfe[1276]](_0x47f2x3,_0x47f2x4);_0x47f2x2[_0x1bfe[1277]](_0x47f2x3+ _0x47f2x5,_0x47f2x4);_0x47f2x2[_0x1bfe[1336]]()};function mxImageShape(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){mxShape[_0x1bfe[239]](this);this[_0x1bfe[1562]]= _0x47f2x2;this[_0x1bfe[618]]= _0x47f2x3;this[_0x1bfe[1334]]= _0x47f2x4;this[_0x1bfe[1336]]= _0x47f2x5;this[_0x1bfe[1307]]= null!= _0x47f2x9?_0x47f2x9:1;this[_0x1bfe[639]]= !1}mxUtils[_0x1bfe[1284]](mxImageShape,mxRectangleShape);mxImageShape[_0x1bfe[202]][_0x1bfe[1674]]= !0;mxImageShape[_0x1bfe[202]][_0x1bfe[1568]]= function(){return !mxClient[_0x1bfe[80]]?0.5:0};mxImageShape[_0x1bfe[202]][_0x1bfe[183]]= function(_0x47f2x2){mxShape[_0x1bfe[202]][_0x1bfe[183]][_0x1bfe[183]](this,arguments);this[_0x1bfe[1299]]= this[_0x1bfe[1336]]= this[_0x1bfe[1334]]= null;null!= this[_0x1bfe[124]]&& (this[_0x1bfe[1334]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_IMAGE_BACKGROUND),this[_0x1bfe[1336]]= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_IMAGE_BORDER),this[_0x1bfe[1674]]= 1== mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],mxConstants.STYLE_IMAGE_ASPECT,1),this[_0x1bfe[623]]= this[_0x1bfe[623]]|| 1== mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],_0x1bfe[1675],0),this[_0x1bfe[624]]= this[_0x1bfe[624]]|| 1== mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],_0x1bfe[1676],0))};mxImageShape[_0x1bfe[202]][_0x1bfe[1567]]= function(){return !this[_0x1bfe[1674]]};mxImageShape[_0x1bfe[202]][_0x1bfe[1570]]= function(){var _0x47f2x2=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];return _0x47f2x2};mxImageShape[_0x1bfe[202]][_0x1bfe[1595]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){if(null!= this[_0x1bfe[618]]){var _0x47f2xa=mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_IMAGE_BACKGROUND,null),_0x47f2x12=mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_IMAGE_BORDER,null);if(null!= _0x47f2xa|| null!= _0x47f2x12){_0x47f2x2[_0x1bfe[1245]](_0x47f2xa),_0x47f2x2[_0x1bfe[1249]](_0x47f2x12),_0x47f2x2[_0x1bfe[1319]](_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9),_0x47f2x2[_0x1bfe[1337]]()};_0x47f2x2[_0x1bfe[618]](_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,this[_0x1bfe[618]],this[_0x1bfe[1674]],!1,!1)}else {mxRectangleShape[_0x1bfe[202]][_0x1bfe[1601]][_0x1bfe[183]](this,arguments)}};mxImageShape[_0x1bfe[202]][_0x1bfe[1575]]= function(){this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[361]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[235]])+ _0x1bfe[168];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[125]]= Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[236]])+ _0x1bfe[168];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[117]]= Math[_0x1bfe[160]](0,Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[117]]))+ _0x1bfe[168];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[119]]= Math[_0x1bfe[160]](0,Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[119]]))+ _0x1bfe[168];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[1028]]= this[_0x1bfe[1334]]|| _0x1bfe[110];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[1630]]= this[_0x1bfe[1336]]|| _0x1bfe[110];this[_0x1bfe[252]][_0x1bfe[339]]= _0x1bfe[110];if(null!= this[_0x1bfe[618]]){var _0x47f2x2=document[_0x1bfe[55]](mxClient[_0x1bfe[49]]|| null== mxClient[_0x1bfe[73]]&& 0!= this[_0x1bfe[603]]?mxClient[_0x1bfe[463]]+ _0x1bfe[464]:_0x1bfe[466]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];_0x47f2x2[_0x1bfe[390]]= this[_0x1bfe[618]];var _0x47f2x3=100> this[_0x1bfe[461]]?_0x1bfe[459]+ this[_0x1bfe[461]]+ _0x1bfe[460]:_0x1bfe[110];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[347]]= _0x47f2x3;this[_0x1bfe[623]]&& this[_0x1bfe[624]]?_0x47f2x3+= _0x1bfe[1677]:this[_0x1bfe[623]]?_0x47f2x3+= _0x1bfe[1678]:this[_0x1bfe[624]]&& (_0x47f2x3+= _0x1bfe[1679]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[347]]!= _0x47f2x3&& (_0x47f2x2[_0x1bfe[124]][_0x1bfe[347]]= _0x47f2x3);_0x1bfe[618]== _0x47f2x2[_0x1bfe[301]]?_0x47f2x2[_0x1bfe[124]][_0x1bfe[603]]= this[_0x1bfe[603]]:_0x47f2x2[_0x1bfe[124]][mxClient[_0x1bfe[73]]+ _0x1bfe[1662]]= _0x1bfe[1394]+ this[_0x1bfe[603]]+ _0x1bfe[1666];_0x47f2x2[_0x1bfe[124]][_0x1bfe[117]]= this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[117]];_0x47f2x2[_0x1bfe[124]][_0x1bfe[119]]= this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[119]];this[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[1617]]= _0x1bfe[110];this[_0x1bfe[252]][_0x1bfe[62]](_0x47f2x2)}else {this[_0x1bfe[1600]](this[_0x1bfe[252]])}};function mxLabel(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxRectangleShape[_0x1bfe[239]](this,_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5)}mxUtils[_0x1bfe[1284]](mxLabel,mxRectangleShape);mxLabel[_0x1bfe[202]][_0x1bfe[1680]]= mxConstants[_0x1bfe[1681]];mxLabel[_0x1bfe[202]][_0x1bfe[657]]= 2;mxLabel[_0x1bfe[202]][_0x1bfe[1682]]= 10;mxLabel[_0x1bfe[202]][_0x1bfe[635]]= 2;mxLabel[_0x1bfe[202]][_0x1bfe[176]]= function(_0x47f2x2){mxShape[_0x1bfe[202]][_0x1bfe[176]][_0x1bfe[183]](this,arguments);null!= this[_0x1bfe[632]]&& null!= this[_0x1bfe[630]]&& (this[_0x1bfe[1683]]= new this[_0x1bfe[630]],this[_0x1bfe[1683]][_0x1bfe[507]]= this[_0x1bfe[507]],this[_0x1bfe[1683]][_0x1bfe[1562]]= this[_0x1bfe[1562]],this[_0x1bfe[1683]][_0x1bfe[1334]]= this[_0x1bfe[632]],this[_0x1bfe[1683]][_0x1bfe[1336]]= this[_0x1bfe[632]],this[_0x1bfe[1683]][_0x1bfe[1299]]= this[_0x1bfe[634]],this[_0x1bfe[1683]][_0x1bfe[663]]= this[_0x1bfe[638]],this[_0x1bfe[1683]][_0x1bfe[176]](this[_0x1bfe[252]]))};mxLabel[_0x1bfe[202]][_0x1bfe[258]]= function(){null!= this[_0x1bfe[1683]]&& (this[_0x1bfe[1683]][_0x1bfe[1334]]= this[_0x1bfe[632]],this[_0x1bfe[1683]][_0x1bfe[1336]]= this[_0x1bfe[632]],this[_0x1bfe[1683]][_0x1bfe[1299]]= this[_0x1bfe[634]],this[_0x1bfe[1683]][_0x1bfe[663]]= this[_0x1bfe[638]]);mxShape[_0x1bfe[202]][_0x1bfe[258]][_0x1bfe[183]](this,arguments)};mxLabel[_0x1bfe[202]][_0x1bfe[1567]]= function(){return mxRectangleShape[_0x1bfe[202]][_0x1bfe[1567]][_0x1bfe[183]](this,arguments)&& null== this[_0x1bfe[632]]&& null== this[_0x1bfe[630]]};mxLabel[_0x1bfe[202]][_0x1bfe[1602]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){this[_0x1bfe[1684]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9);this[_0x1bfe[1685]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9);mxRectangleShape[_0x1bfe[202]][_0x1bfe[1602]][_0x1bfe[183]](this,arguments)};mxLabel[_0x1bfe[202]][_0x1bfe[1684]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){null!= this[_0x1bfe[618]]&& (_0x47f2x3= this[_0x1bfe[1686]](_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9),_0x47f2x2[_0x1bfe[618]](_0x47f2x3[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]],_0x47f2x3[_0x1bfe[117]],_0x47f2x3[_0x1bfe[119]],this[_0x1bfe[618]],!1,!1,!1))};mxLabel[_0x1bfe[202]][_0x1bfe[1686]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),_0x47f2xa=mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),_0x47f2x12=mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),_0x47f2x13=mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),_0x47f2x14=mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],mxConstants.STYLE_SPACING,this[_0x1bfe[657]])+ 5;_0x47f2x2= _0x47f2x9== mxConstants[_0x1bfe[479]]?_0x47f2x2+ (_0x47f2x4- _0x47f2x12)/ 2:_0x47f2x9== mxConstants[_0x1bfe[480]]?_0x47f2x2+ (_0x47f2x4- _0x47f2x12- _0x47f2x14):_0x47f2x2+ _0x47f2x14;_0x47f2x3= _0x47f2xa== mxConstants[_0x1bfe[1687]]?_0x47f2x3+ _0x47f2x14:_0x47f2xa== mxConstants[_0x1bfe[482]]?_0x47f2x3+ (_0x47f2x5- _0x47f2x13- _0x47f2x14):_0x47f2x3+ (_0x47f2x5- _0x47f2x13)/ 2;return new mxRectangle(_0x47f2x2,_0x47f2x3,_0x47f2x12,_0x47f2x13)};mxLabel[_0x1bfe[202]][_0x1bfe[1685]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){null!= this[_0x1bfe[1683]]?(this[_0x1bfe[1683]][_0x1bfe[1562]]= this[_0x1bfe[1688]](_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9),this[_0x1bfe[1683]][_0x1bfe[1209]](_0x47f2x2)):null!= this[_0x1bfe[631]]&& (_0x47f2x3= this[_0x1bfe[1688]](_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9),_0x47f2x2[_0x1bfe[618]](_0x47f2x3[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]],_0x47f2x3[_0x1bfe[117]],_0x47f2x3[_0x1bfe[119]],this[_0x1bfe[631]],!1,!1,!1))};mxLabel[_0x1bfe[202]][_0x1bfe[1688]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),_0x47f2xa=mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),_0x47f2x12=mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],mxConstants.STYLE_INDICATOR_WIDTH,this[_0x1bfe[1682]]),_0x47f2x13=mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],mxConstants.STYLE_INDICATOR_HEIGHT,this[_0x1bfe[1682]]),_0x47f2x14=this[_0x1bfe[657]]+ 5;_0x47f2x2= _0x47f2x9== mxConstants[_0x1bfe[480]]?_0x47f2x2+ (_0x47f2x4- _0x47f2x12- _0x47f2x14):_0x47f2x9== mxConstants[_0x1bfe[479]]?_0x47f2x2+ (_0x47f2x4- _0x47f2x12)/ 2:_0x47f2x2+ _0x47f2x14;_0x47f2x3= _0x47f2xa== mxConstants[_0x1bfe[482]]?_0x47f2x3+ (_0x47f2x5- _0x47f2x13- _0x47f2x14):_0x47f2xa== mxConstants[_0x1bfe[1687]]?_0x47f2x3+ _0x47f2x14:_0x47f2x3+ (_0x47f2x5- _0x47f2x13)/ 2;return new mxRectangle(_0x47f2x2,_0x47f2x3,_0x47f2x12,_0x47f2x13)};mxLabel[_0x1bfe[202]][_0x1bfe[1575]]= function(){for(mxRectangleShape[_0x1bfe[202]][_0x1bfe[1575]][_0x1bfe[183]](this,arguments);this[_0x1bfe[252]][_0x1bfe[1580]]();){this[_0x1bfe[252]][_0x1bfe[266]](this[_0x1bfe[252]][_0x1bfe[1581]])};if(null!= this[_0x1bfe[618]]){var _0x47f2x2=document[_0x1bfe[55]](_0x1bfe[466]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[1500];_0x47f2x2[_0x1bfe[57]](_0x1bfe[467],_0x1bfe[468]);var _0x47f2x3=this[_0x1bfe[1686]](this[_0x1bfe[1562]][_0x1bfe[235]],this[_0x1bfe[1562]][_0x1bfe[236]],this[_0x1bfe[1562]][_0x1bfe[117]],this[_0x1bfe[1562]][_0x1bfe[119]]);_0x47f2x3[_0x1bfe[235]]-= this[_0x1bfe[1562]][_0x1bfe[235]];_0x47f2x3[_0x1bfe[236]]-= this[_0x1bfe[1562]][_0x1bfe[236]];_0x47f2x2[_0x1bfe[124]][_0x1bfe[361]]= Math[_0x1bfe[488]](_0x47f2x3[_0x1bfe[235]])+ _0x1bfe[168];_0x47f2x2[_0x1bfe[124]][_0x1bfe[125]]= Math[_0x1bfe[488]](_0x47f2x3[_0x1bfe[236]])+ _0x1bfe[168];_0x47f2x2[_0x1bfe[124]][_0x1bfe[117]]= Math[_0x1bfe[488]](_0x47f2x3[_0x1bfe[117]])+ _0x1bfe[168];_0x47f2x2[_0x1bfe[124]][_0x1bfe[119]]= Math[_0x1bfe[488]](_0x47f2x3[_0x1bfe[119]])+ _0x1bfe[168];_0x47f2x2[_0x1bfe[390]]= this[_0x1bfe[618]];this[_0x1bfe[252]][_0x1bfe[62]](_0x47f2x2)}};function mxCylinder(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxShape[_0x1bfe[239]](this);this[_0x1bfe[1562]]= _0x47f2x2;this[_0x1bfe[1334]]= _0x47f2x3;this[_0x1bfe[1336]]= _0x47f2x4;this[_0x1bfe[1307]]= null!= _0x47f2x5?_0x47f2x5:1}mxUtils[_0x1bfe[1284]](mxCylinder,mxShape);mxCylinder[_0x1bfe[202]][_0x1bfe[1503]]= 40;mxCylinder[_0x1bfe[202]][_0x1bfe[1564]]= 0;mxCylinder[_0x1bfe[202]][_0x1bfe[1595]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2[_0x1bfe[513]](_0x47f2x3,_0x47f2x4);_0x47f2x2[_0x1bfe[1275]]();this[_0x1bfe[1625]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,!1);_0x47f2x2[_0x1bfe[1337]]();_0x47f2x2[_0x1bfe[1267]](!1);_0x47f2x2[_0x1bfe[1275]]();this[_0x1bfe[1625]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,!0);_0x47f2x2[_0x1bfe[1336]]()};mxCylinder[_0x1bfe[202]][_0x1bfe[1625]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x3= Math[_0x1bfe[243]](this[_0x1bfe[1503]],Math[_0x1bfe[488]](_0x47f2x9/ 5));if(_0x47f2xa&& null!= this[_0x1bfe[1334]]|| !_0x47f2xa&& null== this[_0x1bfe[1334]]){_0x47f2x2[_0x1bfe[1276]](0,_0x47f2x3),_0x47f2x2[_0x1bfe[1279]](0,2* _0x47f2x3,_0x47f2x5,2* _0x47f2x3,_0x47f2x5,_0x47f2x3),_0x47f2xa|| (_0x47f2x2[_0x1bfe[1336]](),_0x47f2x2[_0x1bfe[1275]]())};_0x47f2xa|| (_0x47f2x2[_0x1bfe[1276]](0,_0x47f2x3),_0x47f2x2[_0x1bfe[1279]](0,-_0x47f2x3/ 3,_0x47f2x5,-_0x47f2x3/ 3,_0x47f2x5,_0x47f2x3),_0x47f2x2[_0x1bfe[1277]](_0x47f2x5,_0x47f2x9- _0x47f2x3),_0x47f2x2[_0x1bfe[1279]](_0x47f2x5,_0x47f2x9+ _0x47f2x3/ 3,0,_0x47f2x9+ _0x47f2x3/ 3,0,_0x47f2x9- _0x47f2x3),_0x47f2x2[_0x1bfe[268]]())};function mxConnector(_0x47f2x2,_0x47f2x3,_0x47f2x4){mxPolyline[_0x1bfe[239]](this,_0x47f2x2,_0x47f2x3,_0x47f2x4)}mxUtils[_0x1bfe[1284]](mxConnector,mxPolyline);mxConnector[_0x1bfe[202]][_0x1bfe[1594]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1689]](_0x47f2x2,_0x47f2x3,!0),_0x47f2x5=this[_0x1bfe[1689]](_0x47f2x2,_0x47f2x3,!1);null== this[_0x1bfe[124]]|| 1!= this[_0x1bfe[124]][mxConstants[_0x1bfe[1690]]]?this[_0x1bfe[1639]](_0x47f2x2,_0x47f2x3,this[_0x1bfe[1606]]):this[_0x1bfe[1691]](_0x47f2x2,_0x47f2x3);_0x47f2x2[_0x1bfe[1245]](this[_0x1bfe[1336]]);_0x47f2x2[_0x1bfe[1267]](!1);_0x47f2x2[_0x1bfe[1251]](!1);null!= _0x47f2x4&& _0x47f2x4();null!= _0x47f2x5&& _0x47f2x5()};mxConnector[_0x1bfe[202]][_0x1bfe[1691]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x2[_0x1bfe[1275]]();var _0x47f2x4=_0x47f2x3[0],_0x47f2x5=_0x47f2x3[_0x1bfe[67]];_0x47f2x2[_0x1bfe[1276]](_0x47f2x4[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]]);for(_0x47f2x4= 1;_0x47f2x4< _0x47f2x5- 2;_0x47f2x4++){var _0x47f2x9=_0x47f2x3[_0x47f2x4],_0x47f2xa=_0x47f2x3[_0x47f2x4+ 1];_0x47f2x2[_0x1bfe[1278]](_0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]],(_0x47f2x9[_0x1bfe[235]]+ _0x47f2xa[_0x1bfe[235]])/ 2,(_0x47f2x9[_0x1bfe[236]]+ _0x47f2xa[_0x1bfe[236]])/ 2)};_0x47f2x9= _0x47f2x3[_0x47f2x5- 2];_0x47f2xa= _0x47f2x3[_0x47f2x5- 1];_0x47f2x2[_0x1bfe[1278]](_0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]],_0x47f2xa[_0x1bfe[235]],_0x47f2xa[_0x1bfe[236]]);_0x47f2x2[_0x1bfe[1336]]()};mxConnector[_0x1bfe[202]][_0x1bfe[1689]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=_0x47f2x3[_0x1bfe[67]],_0x47f2x9=_0x47f2x4?_0x47f2x3[1]:_0x47f2x3[_0x47f2x5- 2];_0x47f2x3= _0x47f2x4?_0x47f2x3[0]:_0x47f2x3[_0x47f2x5- 1];var _0x47f2x5=_0x47f2x3[_0x1bfe[235]]- _0x47f2x9[_0x1bfe[235]],_0x47f2xa=_0x47f2x3[_0x1bfe[236]]- _0x47f2x9[_0x1bfe[236]],_0x47f2x12=Math[_0x1bfe[160]](1,Math[_0x1bfe[428]](_0x47f2x5* _0x47f2x5+ _0x47f2xa* _0x47f2xa)),_0x47f2x9=_0x47f2x5/ _0x47f2x12,_0x47f2x5=_0x47f2xa/ _0x47f2x12,_0x47f2xa=mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],_0x47f2x4?mxConstants[_0x1bfe[1692]]:mxConstants[_0x1bfe[1693]],mxConstants.DEFAULT_MARKERSIZE),_0x47f2x12=mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],_0x47f2x4?mxConstants[_0x1bfe[1694]]:mxConstants[_0x1bfe[1695]]);return mxMarker[_0x1bfe[1689]](_0x47f2x2,this,_0x47f2x12,_0x47f2x3,_0x47f2x9,_0x47f2x5,_0x47f2xa,_0x47f2x4,this[_0x1bfe[1307]],0!= this[_0x1bfe[124]][_0x47f2x4?mxConstants[_0x1bfe[1696]]:mxConstants[_0x1bfe[1697]]])};mxConnector[_0x1bfe[202]][_0x1bfe[1612]]= function(_0x47f2x2){mxShape[_0x1bfe[202]][_0x1bfe[1612]][_0x1bfe[183]](this,arguments);var _0x47f2x3=0;mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_STARTARROW,mxConstants.NONE)!= mxConstants[_0x1bfe[217]]&& (_0x47f2x3= mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+ 1);mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_ENDARROW,mxConstants.NONE)!= mxConstants[_0x1bfe[217]]&& (_0x47f2x3= Math[_0x1bfe[160]](_0x47f2x3,mxUtils[_0x1bfe[1550]](this[_0x1bfe[124]],mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+ 1);_0x47f2x2[_0x1bfe[244]](Math[_0x1bfe[430]](_0x47f2x3* this[_0x1bfe[255]]))};function mxSwimlane(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxShape[_0x1bfe[239]](this);this[_0x1bfe[1562]]= _0x47f2x2;this[_0x1bfe[1334]]= _0x47f2x3;this[_0x1bfe[1336]]= _0x47f2x4;this[_0x1bfe[1307]]= null!= _0x47f2x5?_0x47f2x5:1}mxUtils[_0x1bfe[1284]](mxSwimlane,mxShape);mxSwimlane[_0x1bfe[202]][_0x1bfe[1680]]= 16;mxSwimlane[_0x1bfe[202]][_0x1bfe[1597]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2= Math[_0x1bfe[243]](_0x47f2x9,mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return new mxRectangle(_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x2)};mxSwimlane[_0x1bfe[202]][_0x1bfe[1614]]= function(){var _0x47f2x2=mxShape[_0x1bfe[202]][_0x1bfe[1614]][_0x1bfe[183]](this,arguments);1!= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_HORIZONTAL,1)&& (_0x47f2x2+= mxText[_0x1bfe[202]][_0x1bfe[1616]]);return _0x47f2x2};mxSwimlane[_0x1bfe[202]][_0x1bfe[1615]]= function(){return this[_0x1bfe[1614]]()};mxSwimlane[_0x1bfe[202]][_0x1bfe[1590]]= function(){return mxShape[_0x1bfe[202]][_0x1bfe[1590]][_0x1bfe[183]](this,arguments)|| 1!= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_HORIZONTAL,1)};mxSwimlane[_0x1bfe[202]][_0x1bfe[1603]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_ARCSIZE,100* mxConstants[_0x1bfe[1557]])/ 100;return 3* _0x47f2x4* _0x47f2x2};mxSwimlane[_0x1bfe[202]][_0x1bfe[1595]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=Math[_0x1bfe[243]](_0x47f2x9,mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),_0x47f2x12=mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),_0x47f2x13=1== mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_SWIMLANE_LINE,1),_0x47f2x14=0;_0x47f2x2[_0x1bfe[513]](_0x47f2x3,_0x47f2x4);this[_0x1bfe[1606]]?(_0x47f2x14= this[_0x1bfe[1603]](_0x47f2x5,_0x47f2x9,_0x47f2xa),this[_0x1bfe[1698]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x14,_0x47f2x12,_0x47f2x13)):this[_0x1bfe[1699]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13);_0x47f2x12= mxUtils[_0x1bfe[433]](this[_0x1bfe[124]],mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this[_0x1bfe[1700]](_0x47f2x2,_0x47f2x5,_0x47f2xa,_0x47f2x9,_0x47f2x12);null!= this[_0x1bfe[618]]&& (_0x47f2x9= this[_0x1bfe[1686]](_0x47f2x3,_0x47f2xa,_0x47f2x5,_0x47f2x9),_0x47f2x2[_0x1bfe[618]](_0x47f2x9[_0x1bfe[235]]- _0x47f2x3,_0x47f2x9[_0x1bfe[236]]- _0x47f2x4,_0x47f2x9[_0x1bfe[117]],_0x47f2x9[_0x1bfe[119]],this[_0x1bfe[618]],!1,!1,!1));this[_0x1bfe[617]]&& (_0x47f2x2[_0x1bfe[1267]](!1),this[_0x1bfe[1604]](_0x47f2x2,0,0,_0x47f2x5,_0x47f2xa,_0x47f2x14))};mxSwimlane[_0x1bfe[202]][_0x1bfe[1699]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13){_0x47f2x12!= mxConstants[_0x1bfe[217]]&& (_0x47f2x2[_0x1bfe[815]](),_0x47f2x2[_0x1bfe[1245]](_0x47f2x12),_0x47f2x2[_0x1bfe[1319]](0,0,_0x47f2x5,_0x47f2x9),_0x47f2x2[_0x1bfe[1337]](),_0x47f2x2[_0x1bfe[1210]](),_0x47f2x2[_0x1bfe[1267]](!1));_0x47f2x2[_0x1bfe[1275]]();_0x47f2x2[_0x1bfe[1276]](0,_0x47f2xa);_0x47f2x2[_0x1bfe[1277]](0,0);_0x47f2x2[_0x1bfe[1277]](_0x47f2x5,0);_0x47f2x2[_0x1bfe[1277]](_0x47f2x5,_0x47f2xa);_0x47f2x13&& _0x47f2x2[_0x1bfe[268]]();_0x47f2x2[_0x1bfe[1337]]();_0x47f2xa< _0x47f2x9&& _0x47f2x12== mxConstants[_0x1bfe[217]]&& (_0x47f2x2[_0x1bfe[1229]]= !1,_0x47f2x2[_0x1bfe[1275]](),_0x47f2x2[_0x1bfe[1276]](0,_0x47f2xa),_0x47f2x2[_0x1bfe[1277]](0,_0x47f2x9),_0x47f2x2[_0x1bfe[1277]](_0x47f2x5,_0x47f2x9),_0x47f2x2[_0x1bfe[1277]](_0x47f2x5,_0x47f2xa),_0x47f2x2[_0x1bfe[1336]]())};mxSwimlane[_0x1bfe[202]][_0x1bfe[1698]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14){_0x47f2x13!= mxConstants[_0x1bfe[217]]&& (_0x47f2x2[_0x1bfe[815]](),_0x47f2x2[_0x1bfe[1245]](_0x47f2x13),_0x47f2x2[_0x1bfe[1320]](0,0,_0x47f2x5,_0x47f2x9,_0x47f2x12,_0x47f2x12),_0x47f2x2[_0x1bfe[1337]](),_0x47f2x2[_0x1bfe[1210]](),_0x47f2x2[_0x1bfe[1267]](!1));_0x47f2x2[_0x1bfe[1275]]();_0x47f2x2[_0x1bfe[1276]](_0x47f2x5,_0x47f2xa);_0x47f2x2[_0x1bfe[1277]](_0x47f2x5,_0x47f2x12);_0x47f2x2[_0x1bfe[1278]](_0x47f2x5,0,_0x47f2x5- Math[_0x1bfe[243]](_0x47f2x5/ 2,_0x47f2x12),0);_0x47f2x2[_0x1bfe[1277]](Math[_0x1bfe[243]](_0x47f2x5/ 2,_0x47f2x12),0);_0x47f2x2[_0x1bfe[1278]](0,0,0,_0x47f2x12);_0x47f2x2[_0x1bfe[1277]](0,_0x47f2xa);_0x47f2x14&& _0x47f2x2[_0x1bfe[268]]();_0x47f2x2[_0x1bfe[1337]]();_0x47f2xa< _0x47f2x9&& _0x47f2x13== mxConstants[_0x1bfe[217]]&& (_0x47f2x2[_0x1bfe[1229]]= !1,_0x47f2x2[_0x1bfe[1275]](),_0x47f2x2[_0x1bfe[1276]](0,_0x47f2xa),_0x47f2x2[_0x1bfe[1277]](0,_0x47f2x9- _0x47f2x12),_0x47f2x2[_0x1bfe[1278]](0,_0x47f2x9,Math[_0x1bfe[243]](_0x47f2x5/ 2,_0x47f2x12),_0x47f2x9),_0x47f2x2[_0x1bfe[1277]](_0x47f2x5- Math[_0x1bfe[243]](_0x47f2x5/ 2,_0x47f2x12),_0x47f2x9),_0x47f2x2[_0x1bfe[1278]](_0x47f2x5,_0x47f2x9,_0x47f2x5,_0x47f2x9- _0x47f2x12),_0x47f2x2[_0x1bfe[1277]](_0x47f2x5,_0x47f2xa),_0x47f2x2[_0x1bfe[1336]]())};mxSwimlane[_0x1bfe[202]][_0x1bfe[1700]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x9!= mxConstants[_0x1bfe[217]]&& (_0x47f2x2[_0x1bfe[1249]](_0x47f2x9),_0x47f2x2[_0x1bfe[1251]](!0),_0x47f2x2[_0x1bfe[1275]](),_0x47f2x2[_0x1bfe[1276]](_0x47f2x3,_0x47f2x4),_0x47f2x2[_0x1bfe[1277]](_0x47f2x3,_0x47f2x5),_0x47f2x2[_0x1bfe[1336]](),_0x47f2x2[_0x1bfe[1251]](!1))};mxSwimlane[_0x1bfe[202]][_0x1bfe[1686]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){return new mxRectangle(_0x47f2x2+ _0x47f2x4- this[_0x1bfe[1680]],_0x47f2x3,this[_0x1bfe[1680]],this[_0x1bfe[1680]])};function mxGraphLayout(_0x47f2x2){this[_0x1bfe[1179]]= _0x47f2x2}mxGraphLayout[_0x1bfe[202]][_0x1bfe[1179]]= null;mxGraphLayout[_0x1bfe[202]][_0x1bfe[1701]]= !0;mxGraphLayout[_0x1bfe[202]][_0x1bfe[1101]]= null;mxGraphLayout[_0x1bfe[202]][_0x1bfe[1702]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){};mxGraphLayout[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1703]]= function(){return this[_0x1bfe[1179]]};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1704]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x4= this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x3);_0x47f2x3= null!= _0x47f2x4?_0x47f2x4[_0x1bfe[124]]:this[_0x1bfe[1179]][_0x1bfe[1705]](_0x47f2x3);return null!= _0x47f2x3?_0x47f2x3[_0x47f2x2]:null};mxGraphLayout[_0x1bfe[1706]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){if(null!= _0x47f2x4&& null!= _0x47f2x2){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!0;_0x47f2x9= _0x47f2x9|| [];var _0x47f2xa=mxCellPath[_0x1bfe[385]](_0x47f2x2);if(null== _0x47f2x9[_0x47f2xa]&& (_0x47f2x9[_0x47f2xa]= _0x47f2x2,_0x47f2x5= _0x47f2x4(_0x47f2x2,_0x47f2x5),null== _0x47f2x5|| _0x47f2x5)){if(_0x47f2x5= this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[1707]](_0x47f2x2),0< _0x47f2x5){for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x5;_0x47f2xa++){var _0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[1708]](_0x47f2x2,_0x47f2xa),_0x47f2x13=this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x12,!0)== _0x47f2x2;if(!_0x47f2x3|| _0x47f2x13){_0x47f2x13= this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[1710]](_0x47f2x12,!_0x47f2x13),this[_0x1bfe[1706]](_0x47f2x13,_0x47f2x3,_0x47f2x4,_0x47f2x12,_0x47f2x9)}}}}}};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1711]]= function(_0x47f2x2){return this[_0x1bfe[1179]][_0x1bfe[1712]](_0x47f2x2)};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1713]]= function(_0x47f2x2){return !this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1193]](_0x47f2x2)|| !this[_0x1bfe[1179]][_0x1bfe[1714]](_0x47f2x2)};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1715]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]]();return !_0x47f2x3[_0x1bfe[250]](_0x47f2x2)|| !this[_0x1bfe[1179]][_0x1bfe[1714]](_0x47f2x2)|| null== _0x47f2x3[_0x1bfe[1709]](_0x47f2x2,!0)|| null== _0x47f2x3[_0x1bfe[1709]](_0x47f2x2,!1)};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1716]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1179]][_0x1bfe[1717]](mxConstants.STYLE_NOEDGESTYLE,_0x47f2x3?_0x1bfe[468]:_0x1bfe[500],[_0x47f2x2])};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1718]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1179]][_0x1bfe[1717]](mxConstants.STYLE_ORTHOGONAL,_0x47f2x3?_0x1bfe[500]:_0x1bfe[468],[_0x47f2x2])};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1719]]= function(_0x47f2x2){var _0x47f2x3= new mxPoint;if(null!= _0x47f2x2&& _0x47f2x2!= this[_0x1bfe[1101]]){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]]();if(_0x47f2x4[_0x1bfe[1720]](this[_0x1bfe[1101]],_0x47f2x2)){for(var _0x47f2x5=_0x47f2x4[_0x1bfe[1721]](_0x47f2x2);_0x47f2x2!= this[_0x1bfe[1101]];){_0x47f2x3[_0x1bfe[235]]+= _0x47f2x5[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]]+= _0x47f2x5[_0x1bfe[236]],_0x47f2x2= _0x47f2x4[_0x1bfe[1197]](_0x47f2x2),_0x47f2x5= _0x47f2x4[_0x1bfe[1721]](_0x47f2x2)}}};return _0x47f2x3};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1722]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[251]],_0x47f2x5=_0x47f2x4[_0x1bfe[1721]](_0x47f2x2);null== _0x47f2x5?(_0x47f2x5= new mxGeometry,_0x47f2x5[_0x1bfe[1723]](!0)):_0x47f2x5= _0x47f2x5[_0x1bfe[238]]();if(null!= this[_0x1bfe[1101]]&& null!= _0x47f2x3){for(var _0x47f2x9=_0x47f2x4[_0x1bfe[1197]](_0x47f2x2),_0x47f2x9=this[_0x1bfe[1719]](_0x47f2x9),_0x47f2xa=0;_0x47f2xa< _0x47f2x3[_0x1bfe[67]];_0x47f2xa++){_0x47f2x3[_0x47f2xa][_0x1bfe[235]]-= _0x47f2x9[_0x1bfe[235]],_0x47f2x3[_0x47f2xa][_0x1bfe[236]]-= _0x47f2x9[_0x1bfe[236]]}};_0x47f2x5[_0x1bfe[1525]]= _0x47f2x3;_0x47f2x4[_0x1bfe[1724]](_0x47f2x2,_0x47f2x5)}};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1725]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x9=_0x47f2x5[_0x1bfe[1721]](_0x47f2x2),_0x47f2xa=null;if(null!= _0x47f2x9){_0x47f2xa= new mxRectangle(_0x47f2x3,_0x47f2x4,_0x47f2x9[_0x1bfe[117]],_0x47f2x9[_0x1bfe[119]]);if(this[_0x1bfe[1701]]){var _0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x2);if(null!= _0x47f2x12&& null!= _0x47f2x12[_0x1bfe[963]]&& null!= _0x47f2x12[_0x1bfe[963]][_0x1bfe[1563]]){var _0x47f2x13=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x14=_0x47f2x12[_0x1bfe[963]][_0x1bfe[1563]];_0x47f2x12[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[235]]< _0x47f2x12[_0x1bfe[235]]&& (_0x47f2x3+= (_0x47f2x12[_0x1bfe[235]]- _0x47f2x14[_0x1bfe[235]])/ _0x47f2x13,_0x47f2xa[_0x1bfe[117]]= _0x47f2x14[_0x1bfe[117]]);_0x47f2x12[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[236]]< _0x47f2x12[_0x1bfe[236]]&& (_0x47f2x4+= (_0x47f2x12[_0x1bfe[236]]- _0x47f2x14[_0x1bfe[236]])/ _0x47f2x13,_0x47f2xa[_0x1bfe[119]]= _0x47f2x14[_0x1bfe[119]])}};null!= this[_0x1bfe[1101]]&& (_0x47f2x12= _0x47f2x5[_0x1bfe[1197]](_0x47f2x2),null!= _0x47f2x12&& _0x47f2x12!= this[_0x1bfe[1101]]&& (_0x47f2x12= this[_0x1bfe[1719]](_0x47f2x12),_0x47f2x3-= _0x47f2x12[_0x1bfe[235]],_0x47f2x4-= _0x47f2x12[_0x1bfe[236]]));if(_0x47f2x9[_0x1bfe[235]]!= _0x47f2x3|| _0x47f2x9[_0x1bfe[236]]!= _0x47f2x4){_0x47f2x9= _0x47f2x9[_0x1bfe[238]](),_0x47f2x9[_0x1bfe[235]]= _0x47f2x3,_0x47f2x9[_0x1bfe[236]]= _0x47f2x4,_0x47f2x5[_0x1bfe[1724]](_0x47f2x2,_0x47f2x9)}};return _0x47f2xa};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1726]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1721]](_0x47f2x2);if(this[_0x1bfe[1701]]){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x2);if(null!= _0x47f2x4&& null!= _0x47f2x4[_0x1bfe[963]]&& null!= _0x47f2x4[_0x1bfe[963]][_0x1bfe[1563]]){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x9=_0x47f2x4[_0x1bfe[963]][_0x1bfe[1563]],_0x47f2xa=Math[_0x1bfe[160]](_0x47f2x4[_0x1bfe[235]]- _0x47f2x9[_0x1bfe[235]],0)/ _0x47f2x5,_0x47f2x12=Math[_0x1bfe[160]](_0x47f2x4[_0x1bfe[236]]- _0x47f2x9[_0x1bfe[236]],0)/ _0x47f2x5,_0x47f2x13=Math[_0x1bfe[160]](_0x47f2x9[_0x1bfe[235]]+ _0x47f2x9[_0x1bfe[117]]- (_0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]]),0)/ _0x47f2x5,_0x47f2x4=Math[_0x1bfe[160]](_0x47f2x9[_0x1bfe[236]]+ _0x47f2x9[_0x1bfe[119]]- (_0x47f2x4[_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[119]]),0)/ _0x47f2x5,_0x47f2x3= new mxRectangle(_0x47f2x3[_0x1bfe[235]]- _0x47f2xa,_0x47f2x3[_0x1bfe[236]]- _0x47f2x12,_0x47f2x3[_0x1bfe[117]]+ _0x47f2xa+ _0x47f2x13,_0x47f2x3[_0x1bfe[119]]+ _0x47f2x12+ _0x47f2x4)}};null!= this[_0x1bfe[1101]]&& (_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1197]](_0x47f2x2),_0x47f2x3= _0x47f2x3[_0x1bfe[238]](),null!= _0x47f2x2&& _0x47f2x2!= this[_0x1bfe[1101]]&& (_0x47f2x2= this[_0x1bfe[1719]](_0x47f2x2),_0x47f2x3[_0x1bfe[235]]+= _0x47f2x2[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]]+= _0x47f2x2[_0x1bfe[236]]));return new mxRectangle(_0x47f2x3[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]],_0x47f2x3[_0x1bfe[117]],_0x47f2x3[_0x1bfe[119]])};mxGraphLayout[_0x1bfe[202]][_0x1bfe[1727]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[473]]();try{for(var _0x47f2x4=_0x47f2x2[_0x1bfe[67]]- 1;0<= _0x47f2x4;_0x47f2x4--){var _0x47f2x5=_0x47f2x2[_0x47f2x4],_0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[1728]](_0x47f2x5),_0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[1729]](_0x47f2x9),_0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x5),_0x47f2x13=0,_0x47f2x14=0;if(this[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x5)){var _0x47f2x15=this[_0x1bfe[1179]][_0x1bfe[1731]](_0x47f2x5),_0x47f2x13=_0x47f2x15[_0x1bfe[117]],_0x47f2x14=_0x47f2x15[_0x1bfe[119]]};null!= _0x47f2xa&& null!= _0x47f2x12&& (_0x47f2x12= _0x47f2x12[_0x1bfe[238]](),_0x47f2x12[_0x1bfe[235]]= _0x47f2x12[_0x1bfe[235]]+ _0x47f2xa[_0x1bfe[235]]- _0x47f2x3- _0x47f2x13,_0x47f2x12[_0x1bfe[236]]= _0x47f2x12[_0x1bfe[236]]+ _0x47f2xa[_0x1bfe[236]]- _0x47f2x3- _0x47f2x14,_0x47f2x12[_0x1bfe[117]]= _0x47f2xa[_0x1bfe[117]]+ 2* _0x47f2x3+ _0x47f2x13,_0x47f2x12[_0x1bfe[119]]= _0x47f2xa[_0x1bfe[119]]+ 2* _0x47f2x3+ _0x47f2x14,this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1724]](_0x47f2x5,_0x47f2x12),this[_0x1bfe[1179]][_0x1bfe[834]](_0x47f2x9,_0x47f2x3+ _0x47f2x13- _0x47f2xa[_0x1bfe[235]],_0x47f2x3+ _0x47f2x14- _0x47f2xa[_0x1bfe[236]]))}}finally{this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[476]]()}};function mxStackLayout(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){mxGraphLayout[_0x1bfe[239]](this,_0x47f2x2);this[_0x1bfe[662]]= null!= _0x47f2x3?_0x47f2x3:!0;this[_0x1bfe[657]]= null!= _0x47f2x4?_0x47f2x4:0;this[_0x1bfe[1732]]= null!= _0x47f2x5?_0x47f2x5:0;this[_0x1bfe[1733]]= null!= _0x47f2x9?_0x47f2x9:0;this[_0x1bfe[467]]= null!= _0x47f2xa?_0x47f2xa:0}mxStackLayout[_0x1bfe[202]]= new mxGraphLayout;mxStackLayout[_0x1bfe[202]][_0x1bfe[196]]= mxStackLayout;mxStackLayout[_0x1bfe[202]][_0x1bfe[662]]= null;mxStackLayout[_0x1bfe[202]][_0x1bfe[657]]= null;mxStackLayout[_0x1bfe[202]][_0x1bfe[1732]]= null;mxStackLayout[_0x1bfe[202]][_0x1bfe[1733]]= null;mxStackLayout[_0x1bfe[202]][_0x1bfe[467]]= 0;mxStackLayout[_0x1bfe[202]][_0x1bfe[1734]]= !1;mxStackLayout[_0x1bfe[202]][_0x1bfe[1334]]= !1;mxStackLayout[_0x1bfe[202]][_0x1bfe[1735]]= !1;mxStackLayout[_0x1bfe[202]][_0x1bfe[1736]]= !1;mxStackLayout[_0x1bfe[202]][_0x1bfe[1333]]= null;mxStackLayout[_0x1bfe[202]][_0x1bfe[1737]]= function(){return this[_0x1bfe[662]]};mxStackLayout[_0x1bfe[202]][_0x1bfe[1702]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x9=_0x47f2x5[_0x1bfe[1197]](_0x47f2x2),_0x47f2xa=this[_0x1bfe[1737]]();if(null!= _0x47f2x2&& null!= _0x47f2x9){var _0x47f2x12=0,_0x47f2x13=0,_0x47f2x14=_0x47f2x5[_0x1bfe[262]](_0x47f2x9);_0x47f2x3= _0x47f2xa?_0x47f2x3:_0x47f2x4;_0x47f2x12= this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x9);null!= _0x47f2x12&& (_0x47f2x3-= _0x47f2xa?_0x47f2x12[_0x1bfe[235]]:_0x47f2x12[_0x1bfe[236]]);for(_0x47f2x12= 0;_0x47f2x12< _0x47f2x14;_0x47f2x12++){if(_0x47f2x4= _0x47f2x5[_0x1bfe[263]](_0x47f2x9,_0x47f2x12),_0x47f2x4!= _0x47f2x2&& (_0x47f2x4= _0x47f2x5[_0x1bfe[1721]](_0x47f2x4),null!= _0x47f2x4)){_0x47f2x4= _0x47f2xa?_0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]]/ 2:_0x47f2x4[_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[119]]/ 2;if(_0x47f2x13< _0x47f2x3&& _0x47f2x4> _0x47f2x3){break};_0x47f2x13= _0x47f2x4}};_0x47f2xa= _0x47f2x9[_0x1bfe[1738]](_0x47f2x2);_0x47f2xa= Math[_0x1bfe[160]](0,_0x47f2x12- (_0x47f2x12> _0x47f2xa?1:0));_0x47f2x5[_0x1bfe[99]](_0x47f2x9,_0x47f2x2,_0x47f2xa)}};mxStackLayout[_0x1bfe[202]][_0x1bfe[1739]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x4=_0x47f2x3[_0x1bfe[1721]](_0x47f2x2);if(null!= this[_0x1bfe[1179]][_0x1bfe[526]]&& (null== _0x47f2x4&& _0x47f2x3[_0x1bfe[1740]](_0x47f2x2)|| _0x47f2x2== this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1741]])){_0x47f2x4= new mxRectangle(0,0,this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[359]]- 1,this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[167]]- 1)};return _0x47f2x4};mxStackLayout[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=this[_0x1bfe[1737]](),_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=this[_0x1bfe[1739]](_0x47f2x2),_0x47f2x9=0;null!= _0x47f2x5&& (_0x47f2x9= _0x47f2x3?_0x47f2x5[_0x1bfe[119]]:_0x47f2x5[_0x1bfe[117]]);var _0x47f2x9=_0x47f2x9- (2* this[_0x1bfe[657]]+ 2* this[_0x1bfe[467]]),_0x47f2xa=this[_0x1bfe[1732]]+ this[_0x1bfe[467]],_0x47f2x12=this[_0x1bfe[1733]]+ this[_0x1bfe[467]];if(this[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x2)){var _0x47f2x13=this[_0x1bfe[1179]][_0x1bfe[1705]](_0x47f2x2),_0x47f2x14=mxUtils[_0x1bfe[433]](_0x47f2x13,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),_0x47f2x13=mxUtils[_0x1bfe[433]](_0x47f2x13,mxConstants.STYLE_HORIZONTAL,!0);_0x47f2x3== _0x47f2x13&& (_0x47f2x9-= _0x47f2x14);_0x47f2x3?_0x47f2x12+= _0x47f2x14:_0x47f2xa+= _0x47f2x14};_0x47f2x4[_0x1bfe[473]]();try{for(var _0x47f2x14=0,_0x47f2x13=null,_0x47f2x15=_0x47f2x4[_0x1bfe[262]](_0x47f2x2),_0x47f2x16=0;_0x47f2x16< _0x47f2x15;_0x47f2x16++){var _0x47f2x17=_0x47f2x4[_0x1bfe[263]](_0x47f2x2,_0x47f2x16);if(!this[_0x1bfe[1713]](_0x47f2x17)&& this[_0x1bfe[1711]](_0x47f2x17)){var _0x47f2x18=_0x47f2x4[_0x1bfe[1721]](_0x47f2x17);if(null!= _0x47f2x18){_0x47f2x18= _0x47f2x18[_0x1bfe[238]]();if(null!= this[_0x1bfe[1333]]&& null!= _0x47f2x13&& (_0x47f2x3&& _0x47f2x13[_0x1bfe[235]]+ _0x47f2x13[_0x1bfe[117]]+ _0x47f2x18[_0x1bfe[117]]+ 2* this[_0x1bfe[657]]> this[_0x1bfe[1333]]|| !_0x47f2x3&& _0x47f2x13[_0x1bfe[236]]+ _0x47f2x13[_0x1bfe[119]]+ _0x47f2x18[_0x1bfe[119]]+ 2* this[_0x1bfe[657]]> this[_0x1bfe[1333]])){_0x47f2x13= null,_0x47f2x3?_0x47f2x12+= _0x47f2x14+ this[_0x1bfe[657]]:_0x47f2xa+= _0x47f2x14+ this[_0x1bfe[657]],_0x47f2x14= 0};_0x47f2x14= Math[_0x1bfe[160]](_0x47f2x14,_0x47f2x3?_0x47f2x18[_0x1bfe[119]]:_0x47f2x18[_0x1bfe[117]]);null!= _0x47f2x13?_0x47f2x3?_0x47f2x18[_0x1bfe[235]]= _0x47f2x13[_0x1bfe[235]]+ _0x47f2x13[_0x1bfe[117]]+ this[_0x1bfe[657]]:_0x47f2x18[_0x1bfe[236]]= _0x47f2x13[_0x1bfe[236]]+ _0x47f2x13[_0x1bfe[119]]+ this[_0x1bfe[657]]:this[_0x1bfe[1734]]|| (_0x47f2x3?_0x47f2x18[_0x1bfe[235]]= _0x47f2xa:_0x47f2x18[_0x1bfe[236]]= _0x47f2x12);_0x47f2x3?_0x47f2x18[_0x1bfe[236]]= _0x47f2x12:_0x47f2x18[_0x1bfe[235]]= _0x47f2xa;this[_0x1bfe[1334]]&& 0< _0x47f2x9&& (_0x47f2x3?_0x47f2x18[_0x1bfe[119]]= _0x47f2x9:_0x47f2x18[_0x1bfe[117]]= _0x47f2x9);_0x47f2x4[_0x1bfe[1724]](_0x47f2x17,_0x47f2x18);_0x47f2x13= _0x47f2x18}}};this[_0x1bfe[1735]]&& null!= _0x47f2x5&& null!= _0x47f2x13&& !this[_0x1bfe[1179]][_0x1bfe[1742]](_0x47f2x2)?(_0x47f2x5= _0x47f2x5[_0x1bfe[238]](),_0x47f2x3?_0x47f2x5[_0x1bfe[117]]= _0x47f2x13[_0x1bfe[235]]+ _0x47f2x13[_0x1bfe[117]]+ this[_0x1bfe[657]]:_0x47f2x5[_0x1bfe[119]]= _0x47f2x13[_0x1bfe[236]]+ _0x47f2x13[_0x1bfe[119]]+ this[_0x1bfe[657]],_0x47f2x4[_0x1bfe[1724]](_0x47f2x2,_0x47f2x5)):this[_0x1bfe[1736]]&& (null!= _0x47f2x5&& null!= _0x47f2x13)&& (_0x47f2x3?_0x47f2x13[_0x1bfe[117]]= _0x47f2x5[_0x1bfe[117]]- _0x47f2x13[_0x1bfe[235]]- this[_0x1bfe[657]]:_0x47f2x13[_0x1bfe[119]]= _0x47f2x5[_0x1bfe[119]]- _0x47f2x13[_0x1bfe[236]]- this[_0x1bfe[657]])}finally{_0x47f2x4[_0x1bfe[476]]()}}};function mxPartitionLayout(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxGraphLayout[_0x1bfe[239]](this,_0x47f2x2);this[_0x1bfe[662]]= null!= _0x47f2x3?_0x47f2x3:!0;this[_0x1bfe[657]]= _0x47f2x4|| 0;this[_0x1bfe[467]]= _0x47f2x5|| 0}mxPartitionLayout[_0x1bfe[202]]= new mxGraphLayout;mxPartitionLayout[_0x1bfe[202]][_0x1bfe[196]]= mxPartitionLayout;mxPartitionLayout[_0x1bfe[202]][_0x1bfe[662]]= null;mxPartitionLayout[_0x1bfe[202]][_0x1bfe[657]]= null;mxPartitionLayout[_0x1bfe[202]][_0x1bfe[467]]= null;mxPartitionLayout[_0x1bfe[202]][_0x1bfe[1743]]= !0;mxPartitionLayout[_0x1bfe[202]][_0x1bfe[1737]]= function(){return this[_0x1bfe[662]]};mxPartitionLayout[_0x1bfe[202]][_0x1bfe[1702]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= this[_0x1bfe[1179]][_0x1bfe[502]]();var _0x47f2x5=_0x47f2x4[_0x1bfe[1197]](_0x47f2x2);if(null!= _0x47f2x2&& null!= _0x47f2x5){for(var _0x47f2x9=0,_0x47f2xa=0,_0x47f2x12=_0x47f2x4[_0x1bfe[262]](_0x47f2x5),_0x47f2x9=0;_0x47f2x9< _0x47f2x12;_0x47f2x9++){var _0x47f2x13=_0x47f2x4[_0x1bfe[263]](_0x47f2x5,_0x47f2x9),_0x47f2x13=this[_0x1bfe[1726]](_0x47f2x13);if(null!= _0x47f2x13){_0x47f2x13= _0x47f2x13[_0x1bfe[235]]+ _0x47f2x13[_0x1bfe[117]]/ 2;if(_0x47f2xa< _0x47f2x3&& _0x47f2x13> _0x47f2x3){break};_0x47f2xa= _0x47f2x13}};_0x47f2x3= _0x47f2x5[_0x1bfe[1738]](_0x47f2x2);_0x47f2x3= Math[_0x1bfe[160]](0,_0x47f2x9- (_0x47f2x9> _0x47f2x3?1:0));_0x47f2x4[_0x1bfe[99]](_0x47f2x5,_0x47f2x2,_0x47f2x3)}};mxPartitionLayout[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1737]](),_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=_0x47f2x4[_0x1bfe[1721]](_0x47f2x2);if(null!= this[_0x1bfe[1179]][_0x1bfe[526]]&& (null== _0x47f2x5&& _0x47f2x4[_0x1bfe[1740]](_0x47f2x2)|| _0x47f2x2== this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1741]])){_0x47f2x5= new mxRectangle(0,0,this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[359]]- 1,this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[167]]- 1)};if(null!= _0x47f2x5){for(var _0x47f2x9=[],_0x47f2xa=_0x47f2x4[_0x1bfe[262]](_0x47f2x2),_0x47f2x12=0;_0x47f2x12< _0x47f2xa;_0x47f2x12++){var _0x47f2x13=_0x47f2x4[_0x1bfe[263]](_0x47f2x2,_0x47f2x12);!this[_0x1bfe[1713]](_0x47f2x13)&& this[_0x1bfe[1711]](_0x47f2x13)&& _0x47f2x9[_0x1bfe[207]](_0x47f2x13)};_0x47f2xa= _0x47f2x9[_0x1bfe[67]];if(0< _0x47f2xa){var _0x47f2x14=this[_0x1bfe[467]],_0x47f2x15=this[_0x1bfe[467]],_0x47f2x16=_0x47f2x3?_0x47f2x5[_0x1bfe[119]]:_0x47f2x5[_0x1bfe[117]],_0x47f2x16=_0x47f2x16- 2* this[_0x1bfe[467]];_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x2)?this[_0x1bfe[1179]][_0x1bfe[1731]](_0x47f2x2): new mxRectangle;_0x47f2x16-= _0x47f2x3?_0x47f2x2[_0x1bfe[119]]:_0x47f2x2[_0x1bfe[117]];_0x47f2x14+= _0x47f2x2[_0x1bfe[117]];_0x47f2x15+= _0x47f2x2[_0x1bfe[119]];_0x47f2x2= this[_0x1bfe[467]]+ (_0x47f2xa- 1)* this[_0x1bfe[657]];_0x47f2x5= _0x47f2x3?(_0x47f2x5[_0x1bfe[117]]- _0x47f2x14- _0x47f2x2)/ _0x47f2xa:(_0x47f2x5[_0x1bfe[119]]- _0x47f2x15- _0x47f2x2)/ _0x47f2xa;if(0< _0x47f2x5){_0x47f2x4[_0x1bfe[473]]();try{for(_0x47f2x12= 0;_0x47f2x12< _0x47f2xa;_0x47f2x12++){var _0x47f2x13=_0x47f2x9[_0x47f2x12],_0x47f2x17=_0x47f2x4[_0x1bfe[1721]](_0x47f2x13);null!= _0x47f2x17&& (_0x47f2x17= _0x47f2x17[_0x1bfe[238]](),_0x47f2x17[_0x1bfe[235]]= _0x47f2x14,_0x47f2x17[_0x1bfe[236]]= _0x47f2x15,_0x47f2x3?(this[_0x1bfe[1743]]&& (_0x47f2x17[_0x1bfe[117]]= _0x47f2x5,_0x47f2x17[_0x1bfe[119]]= _0x47f2x16),_0x47f2x14+= _0x47f2x5+ this[_0x1bfe[657]]):(this[_0x1bfe[1743]]&& (_0x47f2x17[_0x1bfe[119]]= _0x47f2x5,_0x47f2x17[_0x1bfe[117]]= _0x47f2x16),_0x47f2x15+= _0x47f2x5+ this[_0x1bfe[657]]),_0x47f2x4[_0x1bfe[1724]](_0x47f2x13,_0x47f2x17))}}finally{_0x47f2x4[_0x1bfe[476]]()}}}}};function mxCompactTreeLayout(_0x47f2x2,_0x47f2x3,_0x47f2x4){mxGraphLayout[_0x1bfe[239]](this,_0x47f2x2);this[_0x1bfe[662]]= null!= _0x47f2x3?_0x47f2x3:!0;this[_0x1bfe[1744]]= null!= _0x47f2x4?_0x47f2x4:!1}mxCompactTreeLayout[_0x1bfe[202]]= new mxGraphLayout;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[196]]= mxCompactTreeLayout;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[662]]= null;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1744]]= null;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1735]]= !0;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1745]]= 10;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1746]]= null;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1747]]= !1;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1748]]= 10;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1749]]= 20;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1750]]= !0;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1751]]= 5;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1752]]= 4;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1753]]= 8;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1754]]= 4;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1755]]= !0;mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1713]]= function(_0x47f2x2){return mxGraphLayout[_0x1bfe[202]][_0x1bfe[1713]][_0x1bfe[183]](this,arguments)|| 0== this[_0x1bfe[1179]][_0x1bfe[1756]](_0x47f2x2)[_0x1bfe[67]]};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1737]]= function(){return this[_0x1bfe[662]]};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1101]]= _0x47f2x2;var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]]();if(null== _0x47f2x3){if(0< this[_0x1bfe[1179]][_0x1bfe[264]](_0x47f2x2,_0x47f2x4[_0x1bfe[1197]](_0x47f2x2),this[_0x1bfe[1744]],!this[_0x1bfe[1744]],!1)[_0x1bfe[67]]){_0x47f2x3= _0x47f2x2}else {var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[1757]](_0x47f2x2,!0,this[_0x1bfe[1744]]);if(0< _0x47f2x5[_0x1bfe[67]]){for(var _0x47f2x9=0;_0x47f2x9< _0x47f2x5[_0x1bfe[67]];_0x47f2x9++){if(!this[_0x1bfe[1713]](_0x47f2x5[_0x47f2x9])&& 0< this[_0x1bfe[1179]][_0x1bfe[264]](_0x47f2x5[_0x47f2x9],null,this[_0x1bfe[1744]],!this[_0x1bfe[1744]],!1)[_0x1bfe[67]]){_0x47f2x3= _0x47f2x5[_0x47f2x9];break}}}}};if(null!= _0x47f2x3){this[_0x1bfe[1746]]= this[_0x1bfe[1735]]?{}:null;_0x47f2x4[_0x1bfe[473]]();try{var _0x47f2xa=this[_0x1bfe[1758]](_0x47f2x3,_0x47f2x2);if(null!= _0x47f2xa){this[_0x1bfe[1759]](_0x47f2xa);var _0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[1020]],_0x47f2x5=_0x47f2x12;if(!this[_0x1bfe[1747]]){var _0x47f2x13=this[_0x1bfe[1726]](_0x47f2x3);null!= _0x47f2x13&& (_0x47f2x12= _0x47f2x13[_0x1bfe[235]],_0x47f2x5= _0x47f2x13[_0x1bfe[236]])};_0x47f2x13= null;_0x47f2x13= this[_0x1bfe[1737]]()?this[_0x1bfe[1760]](_0x47f2xa,_0x47f2x12,_0x47f2x5):this[_0x1bfe[1761]](_0x47f2xa,null,_0x47f2x12,_0x47f2x5);if(null!= _0x47f2x13){var _0x47f2x14=_0x47f2x9= 0;0> _0x47f2x13[_0x1bfe[235]]&& (_0x47f2x9= Math[_0x1bfe[425]](_0x47f2x12- _0x47f2x13[_0x1bfe[235]]));0> _0x47f2x13[_0x1bfe[236]]&& (_0x47f2x14= Math[_0x1bfe[425]](_0x47f2x5- _0x47f2x13[_0x1bfe[236]]));(0!= _0x47f2x9|| 0!= _0x47f2x14)&& this[_0x1bfe[1762]](_0x47f2xa,_0x47f2x9,_0x47f2x14);this[_0x1bfe[1735]]&& this[_0x1bfe[1763]]();this[_0x1bfe[1755]]&& this[_0x1bfe[1764]](_0x47f2xa)}}}finally{_0x47f2x4[_0x1bfe[476]]()}}};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1762]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2[_0x1bfe[235]]+= _0x47f2x3;_0x47f2x2[_0x1bfe[236]]+= _0x47f2x4;this[_0x1bfe[183]](_0x47f2x2);for(_0x47f2x2= _0x47f2x2[_0x1bfe[247]];null!= _0x47f2x2;){this[_0x1bfe[1762]](_0x47f2x2,_0x47f2x3,_0x47f2x4),_0x47f2x2= _0x47f2x2[_0x1bfe[1765]]}};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1758]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:[];var _0x47f2x5=mxCellPath[_0x1bfe[385]](_0x47f2x2),_0x47f2x9=null;if(null!= _0x47f2x2&& null== _0x47f2x4[_0x47f2x5]&& !this[_0x1bfe[1713]](_0x47f2x2)){_0x47f2x4[_0x47f2x5]= _0x47f2x2;var _0x47f2x9=this[_0x1bfe[1766]](_0x47f2x2),_0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2xa=null;_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[264]](_0x47f2x2,_0x47f2x3,this[_0x1bfe[1744]],!this[_0x1bfe[1744]],!1,!0);for(var _0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[249]](),_0x47f2x13=0;_0x47f2x13< _0x47f2x2[_0x1bfe[67]];_0x47f2x13++){var _0x47f2x14=_0x47f2x2[_0x47f2x13];if(!this[_0x1bfe[1715]](_0x47f2x14)){this[_0x1bfe[1750]]&& this[_0x1bfe[1722]](_0x47f2x14,null);this[_0x1bfe[1755]]&& (this[_0x1bfe[1716]](_0x47f2x14,!1),this[_0x1bfe[1722]](_0x47f2x14,null));var _0x47f2x15=_0x47f2x12[_0x1bfe[248]](_0x47f2x14),_0x47f2x14=null!= _0x47f2x15?_0x47f2x15[_0x1bfe[1710]](this[_0x1bfe[1744]]):_0x47f2x12[_0x1bfe[1710]](_0x47f2x14,this[_0x1bfe[1744]]),_0x47f2x15=this[_0x1bfe[1758]](_0x47f2x14,_0x47f2x3,_0x47f2x4);null!= _0x47f2x15&& null!= _0x47f2x5[_0x1bfe[1721]](_0x47f2x14)&& (null== _0x47f2xa?_0x47f2x9[_0x1bfe[247]]= _0x47f2x15:_0x47f2xa[_0x1bfe[1765]]= _0x47f2x15,_0x47f2xa= _0x47f2x15)}}};return _0x47f2x9};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1759]]= function(_0x47f2x2){if(null!= _0x47f2x2){for(var _0x47f2x3=_0x47f2x2[_0x1bfe[247]];null!= _0x47f2x3;){this[_0x1bfe[1759]](_0x47f2x3),_0x47f2x3= _0x47f2x3[_0x1bfe[1765]]};null!= _0x47f2x2[_0x1bfe[247]]?this[_0x1bfe[1767]](_0x47f2x2,this[_0x1bfe[234]](_0x47f2x2)):this[_0x1bfe[1768]](_0x47f2x2)}};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1760]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x2[_0x1bfe[235]]+= _0x47f2x3+ _0x47f2x2[_0x1bfe[1769]];_0x47f2x2[_0x1bfe[236]]+= _0x47f2x4+ _0x47f2x2[_0x1bfe[1770]];_0x47f2x5= this[_0x1bfe[183]](_0x47f2x2,_0x47f2x5);_0x47f2x3= _0x47f2x2[_0x1bfe[247]];if(null!= _0x47f2x3){_0x47f2x5= this[_0x1bfe[1760]](_0x47f2x3,_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]],_0x47f2x5);_0x47f2x4= _0x47f2x2[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[1770]];for(var _0x47f2x9=_0x47f2x3[_0x1bfe[1765]];null!= _0x47f2x9;){_0x47f2x5= this[_0x1bfe[1760]](_0x47f2x9,_0x47f2x2[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[1769]],_0x47f2x4,_0x47f2x5),_0x47f2x4+= _0x47f2x9[_0x1bfe[1770]],_0x47f2x9= _0x47f2x9[_0x1bfe[1765]]}};return _0x47f2x5};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1761]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2[_0x1bfe[235]]+= _0x47f2x4+ _0x47f2x2[_0x1bfe[1770]];_0x47f2x2[_0x1bfe[236]]+= _0x47f2x5+ _0x47f2x2[_0x1bfe[1769]];_0x47f2x9= this[_0x1bfe[183]](_0x47f2x2,_0x47f2x9);_0x47f2x3= _0x47f2x2[_0x1bfe[247]];if(null!= _0x47f2x3){_0x47f2x9= this[_0x1bfe[1761]](_0x47f2x3,_0x47f2x2,_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]],_0x47f2x9);_0x47f2x4= _0x47f2x2[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[1770]];for(_0x47f2x5= _0x47f2x3[_0x1bfe[1765]];null!= _0x47f2x5;){_0x47f2x9= this[_0x1bfe[1761]](_0x47f2x5,_0x47f2x2,_0x47f2x4,_0x47f2x2[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[1769]],_0x47f2x9),_0x47f2x4+= _0x47f2x5[_0x1bfe[1770]],_0x47f2x5= _0x47f2x5[_0x1bfe[1765]]}};return _0x47f2x9};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1767]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1749]]+ this[_0x1bfe[1748]],_0x47f2x5=(_0x47f2x3- _0x47f2x2[_0x1bfe[117]])/ 2- this[_0x1bfe[1749]],_0x47f2x9=_0x47f2x5+ _0x47f2x2[_0x1bfe[117]]+ 2* this[_0x1bfe[1749]]- _0x47f2x3;_0x47f2x2[_0x1bfe[247]][_0x1bfe[1769]]= _0x47f2x4+ _0x47f2x2[_0x1bfe[119]];_0x47f2x2[_0x1bfe[247]][_0x1bfe[1770]]= _0x47f2x9;_0x47f2x2[_0x1bfe[1772]][_0x1bfe[1771]]= this[_0x1bfe[1773]](_0x47f2x2[_0x1bfe[119]],0,this[_0x1bfe[1773]](_0x47f2x4,_0x47f2x9,_0x47f2x2[_0x1bfe[1772]][_0x1bfe[1771]]));_0x47f2x2[_0x1bfe[1772]][_0x1bfe[1774]]= this[_0x1bfe[1773]](_0x47f2x2[_0x1bfe[119]],0,this[_0x1bfe[1773]](_0x47f2x4,_0x47f2x5,_0x47f2x2[_0x1bfe[1772]][_0x1bfe[1774]]))};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1768]]= function(_0x47f2x2){var _0x47f2x3=2* this[_0x1bfe[1749]];_0x47f2x2[_0x1bfe[1772]][_0x1bfe[1775]]= this[_0x1bfe[1773]](_0x47f2x2[_0x1bfe[119]]+ _0x47f2x3,0);_0x47f2x2[_0x1bfe[1772]][_0x1bfe[1771]]= _0x47f2x2[_0x1bfe[1772]][_0x1bfe[1775]];_0x47f2x2[_0x1bfe[1772]][_0x1bfe[1776]]= this[_0x1bfe[1773]](0,-_0x47f2x2[_0x1bfe[117]]- _0x47f2x3);_0x47f2x2[_0x1bfe[1772]][_0x1bfe[1774]]= this[_0x1bfe[1773]](_0x47f2x2[_0x1bfe[119]]+ _0x47f2x3,0,_0x47f2x2[_0x1bfe[1772]][_0x1bfe[1776]])};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[234]]= function(_0x47f2x2){var _0x47f2x3=2* this[_0x1bfe[1749]],_0x47f2x4=_0x47f2x2[_0x1bfe[247]];_0x47f2x2[_0x1bfe[1772]]= _0x47f2x4[_0x1bfe[1772]];for(var _0x47f2x5=_0x47f2x4[_0x1bfe[117]]+ _0x47f2x3,_0x47f2x9=_0x47f2x5,_0x47f2x4=_0x47f2x4[_0x1bfe[1765]];null!= _0x47f2x4;){var _0x47f2xa=this[_0x1bfe[1777]](_0x47f2x2[_0x1bfe[1772]],_0x47f2x4[_0x1bfe[1772]]);_0x47f2x4[_0x1bfe[1770]]= _0x47f2xa+ _0x47f2x5;_0x47f2x4[_0x1bfe[1769]]= 0;_0x47f2x5= _0x47f2x4[_0x1bfe[117]]+ _0x47f2x3;_0x47f2x9+= _0x47f2xa+ _0x47f2x5;_0x47f2x4= _0x47f2x4[_0x1bfe[1765]]};return _0x47f2x9};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1777]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=0,_0x47f2x5=0,_0x47f2x9=0,_0x47f2xa=_0x47f2x2[_0x1bfe[1774]],_0x47f2x12=_0x47f2x3[_0x1bfe[1771]];null!= _0x47f2x12&& null!= _0x47f2xa;){var _0x47f2x13=this[_0x1bfe[1368]](_0x47f2x4,_0x47f2x5,_0x47f2x12[_0x1bfe[1126]],_0x47f2x12[_0x1bfe[1125]],_0x47f2xa[_0x1bfe[1126]],_0x47f2xa[_0x1bfe[1125]]),_0x47f2x5=_0x47f2x5+ _0x47f2x13,_0x47f2x9=_0x47f2x9+ _0x47f2x13;_0x47f2x4+ _0x47f2x12[_0x1bfe[1126]]<= _0x47f2xa[_0x1bfe[1126]]?(_0x47f2x4+= _0x47f2x12[_0x1bfe[1126]],_0x47f2x5+= _0x47f2x12[_0x1bfe[1125]],_0x47f2x12= _0x47f2x12[_0x1bfe[1765]]):(_0x47f2x4-= _0x47f2xa[_0x1bfe[1126]],_0x47f2x5-= _0x47f2xa[_0x1bfe[1125]],_0x47f2xa= _0x47f2xa[_0x1bfe[1765]])};null!= _0x47f2x12?(_0x47f2x4= this[_0x1bfe[1778]](_0x47f2x2[_0x1bfe[1775]],0,0,_0x47f2x12,_0x47f2x4,_0x47f2x5),_0x47f2x2[_0x1bfe[1775]]= null!= _0x47f2x4[_0x1bfe[1765]]?_0x47f2x3[_0x1bfe[1775]]:_0x47f2x4,_0x47f2x2[_0x1bfe[1776]]= _0x47f2x3[_0x1bfe[1776]]):(_0x47f2x4= this[_0x1bfe[1778]](_0x47f2x3[_0x1bfe[1776]],_0x47f2x4,_0x47f2x5,_0x47f2xa,0,0),null== _0x47f2x4[_0x1bfe[1765]]&& (_0x47f2x2[_0x1bfe[1776]]= _0x47f2x4));_0x47f2x2[_0x1bfe[1774]]= _0x47f2x3[_0x1bfe[1774]];return _0x47f2x9};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1368]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){var _0x47f2x12=0;if(_0x47f2x9<= _0x47f2x2|| 0>= _0x47f2x2+ _0x47f2x4){return 0};_0x47f2x12= 0< _0x47f2x9* _0x47f2x5- _0x47f2x4* _0x47f2xa?0> _0x47f2x2?_0x47f2x2* _0x47f2x5/ _0x47f2x4- _0x47f2x3:0< _0x47f2x2?_0x47f2x2* _0x47f2xa/ _0x47f2x9- _0x47f2x3:-_0x47f2x3:_0x47f2x9< _0x47f2x2+ _0x47f2x4?_0x47f2xa- (_0x47f2x3+ (_0x47f2x9- _0x47f2x2)* _0x47f2x5/ _0x47f2x4):_0x47f2x9> _0x47f2x2+ _0x47f2x4?(_0x47f2x4+ _0x47f2x2)* _0x47f2xa/ _0x47f2x9- (_0x47f2x3+ _0x47f2x5):_0x47f2xa- (_0x47f2x3+ _0x47f2x5);return 0< _0x47f2x12?_0x47f2x12:0};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1778]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x3= _0x47f2x9+ _0x47f2x5[_0x1bfe[1126]]- _0x47f2x3;_0x47f2x9= _0x47f2x9= 0;0== _0x47f2x5[_0x1bfe[1126]]?_0x47f2x9= _0x47f2x5[_0x1bfe[1125]]:(_0x47f2x9= _0x47f2x3* _0x47f2x5[_0x1bfe[1125]],_0x47f2x9/= _0x47f2x5[_0x1bfe[1126]]);_0x47f2x3= this[_0x1bfe[1773]](_0x47f2x3,_0x47f2x9,_0x47f2x5[_0x1bfe[1765]]);_0x47f2x2[_0x1bfe[1765]]= this[_0x1bfe[1773]](0,_0x47f2xa+ _0x47f2x5[_0x1bfe[1125]]- _0x47f2x9- _0x47f2x4,_0x47f2x3);return _0x47f2x3};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1766]]= function(_0x47f2x2){var _0x47f2x3={};_0x47f2x3[_0x1bfe[246]]= _0x47f2x2;_0x47f2x3[_0x1bfe[235]]= 0;_0x47f2x3[_0x1bfe[236]]= 0;_0x47f2x3[_0x1bfe[117]]= 0;_0x47f2x3[_0x1bfe[119]]= 0;_0x47f2x2= this[_0x1bfe[1726]](_0x47f2x2);null!= _0x47f2x2&& (this[_0x1bfe[1737]]()?(_0x47f2x3[_0x1bfe[117]]= _0x47f2x2[_0x1bfe[119]],_0x47f2x3[_0x1bfe[119]]= _0x47f2x2[_0x1bfe[117]]):(_0x47f2x3[_0x1bfe[117]]= _0x47f2x2[_0x1bfe[117]],_0x47f2x3[_0x1bfe[119]]= _0x47f2x2[_0x1bfe[119]]));_0x47f2x3[_0x1bfe[1769]]= 0;_0x47f2x3[_0x1bfe[1770]]= 0;_0x47f2x3[_0x1bfe[1772]]= {};return _0x47f2x3};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[183]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=_0x47f2x2[_0x1bfe[246]],_0x47f2x9=_0x47f2x4[_0x1bfe[1721]](_0x47f2x5);null!= _0x47f2x5&& null!= _0x47f2x9&& (this[_0x1bfe[1711]](_0x47f2x5)&& (_0x47f2x9= this[_0x1bfe[1725]](_0x47f2x5,_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]]),this[_0x1bfe[1735]]&& (_0x47f2x4= _0x47f2x4[_0x1bfe[1197]](_0x47f2x5),_0x47f2x5= mxCellPath[_0x1bfe[385]](_0x47f2x4),null== this[_0x1bfe[1746]][_0x47f2x5]&& (this[_0x1bfe[1746]][_0x47f2x5]= _0x47f2x4))),_0x47f2x3= null== _0x47f2x3? new mxRectangle(_0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]],_0x47f2x9[_0x1bfe[117]],_0x47f2x9[_0x1bfe[119]]): new mxRectangle(Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[235]],_0x47f2x9[_0x1bfe[235]]),Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[236]],_0x47f2x9[_0x1bfe[236]]),Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]],_0x47f2x9[_0x1bfe[235]]+ _0x47f2x9[_0x1bfe[117]]),Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[119]],_0x47f2x9[_0x1bfe[236]]+ _0x47f2x9[_0x1bfe[119]])));return _0x47f2x3};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1773]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5={};_0x47f2x5[_0x1bfe[1126]]= _0x47f2x2;_0x47f2x5[_0x1bfe[1125]]= _0x47f2x3;_0x47f2x5[_0x1bfe[1765]]= _0x47f2x4;return _0x47f2x5};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1763]]= function(){var _0x47f2x2=[],_0x47f2x3;for(_0x47f2x3 in this[_0x1bfe[1746]]){_0x47f2x2[_0x1bfe[207]](this[_0x1bfe[1746]][_0x47f2x3])};this[_0x1bfe[1727]](mxUtils[_0x1bfe[1779]](_0x47f2x2,!0),this[_0x1bfe[1745]])};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1764]]= function(_0x47f2x2){this[_0x1bfe[1780]](_0x47f2x2);for(_0x47f2x2= _0x47f2x2[_0x1bfe[247]];null!= _0x47f2x2;){this[_0x1bfe[1764]](_0x47f2x2),_0x47f2x2= _0x47f2x2[_0x1bfe[1765]]}};mxCompactTreeLayout[_0x1bfe[202]][_0x1bfe[1780]]= function(_0x47f2x2){for(var _0x47f2x3=_0x47f2x2[_0x1bfe[247]],_0x47f2x4=_0x47f2x2[_0x1bfe[246]],_0x47f2x5=0,_0x47f2x9=[];null!= _0x47f2x3;){_0x47f2x5++;var _0x47f2xa=_0x47f2x3[_0x1bfe[235]];this[_0x1bfe[662]]&& (_0x47f2xa= _0x47f2x3[_0x1bfe[236]]);_0x47f2x9[_0x1bfe[207]]( new WeightedCellSorter(_0x47f2x3,_0x47f2xa));_0x47f2x3= _0x47f2x3[_0x1bfe[1765]]};_0x47f2x9[_0x1bfe[470]](WeightedCellSorter[_0x1bfe[202]][_0x1bfe[469]]);var _0x47f2xa=_0x47f2x2[_0x1bfe[117]],_0x47f2x12=(_0x47f2x5+ 1)* this[_0x1bfe[1751]];_0x47f2xa> _0x47f2x12+ 2* this[_0x1bfe[1751]]&& (_0x47f2xa-= 2* this[_0x1bfe[1751]]);_0x47f2x2= _0x47f2xa/ _0x47f2x5;_0x47f2x3= _0x47f2x2/ 2;_0x47f2xa> _0x47f2x12+ 2* this[_0x1bfe[1751]]&& (_0x47f2x3+= this[_0x1bfe[1751]]);for(var _0x47f2xa=this[_0x1bfe[1753]]- this[_0x1bfe[1752]],_0x47f2x12=0,_0x47f2x13=this[_0x1bfe[1726]](_0x47f2x4),_0x47f2x14=0;_0x47f2x14< _0x47f2x9[_0x1bfe[67]];_0x47f2x14++){for(var _0x47f2x15=_0x47f2x9[_0x47f2x14][_0x1bfe[246]][_0x1bfe[246]],_0x47f2x16=this[_0x1bfe[1726]](_0x47f2x15),_0x47f2x15=this[_0x1bfe[1179]][_0x1bfe[1781]](_0x47f2x4,_0x47f2x15,!1),_0x47f2x17=[],_0x47f2x18=0,_0x47f2x19=0,_0x47f2x1a=0;_0x47f2x1a< _0x47f2x15[_0x1bfe[67]];_0x47f2x1a++){this[_0x1bfe[662]]?(_0x47f2x18= _0x47f2x13[_0x1bfe[235]]+ _0x47f2x13[_0x1bfe[117]],_0x47f2x19= _0x47f2x13[_0x1bfe[236]]+ _0x47f2x3,_0x47f2x17[_0x1bfe[207]]( new mxPoint(_0x47f2x18,_0x47f2x19)),_0x47f2x18= _0x47f2x13[_0x1bfe[235]]+ _0x47f2x13[_0x1bfe[117]]+ _0x47f2xa,_0x47f2x17[_0x1bfe[207]]( new mxPoint(_0x47f2x18,_0x47f2x19)),_0x47f2x19= _0x47f2x16[_0x1bfe[236]]+ _0x47f2x16[_0x1bfe[119]]/ 2):(_0x47f2x18= _0x47f2x13[_0x1bfe[235]]+ _0x47f2x3,_0x47f2x19= _0x47f2x13[_0x1bfe[236]]+ _0x47f2x13[_0x1bfe[119]],_0x47f2x17[_0x1bfe[207]]( new mxPoint(_0x47f2x18,_0x47f2x19)),_0x47f2x19= _0x47f2x13[_0x1bfe[236]]+ _0x47f2x13[_0x1bfe[119]]+ _0x47f2xa,_0x47f2x17[_0x1bfe[207]]( new mxPoint(_0x47f2x18,_0x47f2x19)),_0x47f2x18= _0x47f2x16[_0x1bfe[235]]+ _0x47f2x16[_0x1bfe[117]]/ 2),_0x47f2x17[_0x1bfe[207]]( new mxPoint(_0x47f2x18,_0x47f2x19)),this[_0x1bfe[1722]](_0x47f2x15[_0x47f2x1a],_0x47f2x17)};_0x47f2x14< _0x47f2x5/ 2?_0x47f2xa+= this[_0x1bfe[1752]]:_0x47f2x14> _0x47f2x5/ 2&& (_0x47f2xa-= this[_0x1bfe[1752]]);_0x47f2x3+= _0x47f2x2;_0x47f2x12= Math[_0x1bfe[160]](_0x47f2x12,_0x47f2xa)}};function WeightedCellSorter(_0x47f2x2,_0x47f2x3){this[_0x1bfe[246]]= _0x47f2x2;this[_0x1bfe[1782]]= _0x47f2x3}WeightedCellSorter[_0x1bfe[202]][_0x1bfe[1782]]= 0;WeightedCellSorter[_0x1bfe[202]][_0x1bfe[1783]]= !1;WeightedCellSorter[_0x1bfe[202]][_0x1bfe[1784]]= !1;WeightedCellSorter[_0x1bfe[202]][_0x1bfe[1785]]= null;WeightedCellSorter[_0x1bfe[202]][_0x1bfe[246]]= null;WeightedCellSorter[_0x1bfe[202]][_0x1bfe[469]]= function(_0x47f2x2,_0x47f2x3){return null!= _0x47f2x2&& null!= _0x47f2x3?_0x47f2x3[_0x1bfe[1782]]> _0x47f2x2[_0x1bfe[1782]]?1:_0x47f2x3[_0x1bfe[1782]]< _0x47f2x2[_0x1bfe[1782]]?-1:_0x47f2x3[_0x1bfe[1783]]?1:-1:0};function mxFastOrganicLayout(_0x47f2x2){mxGraphLayout[_0x1bfe[239]](this,_0x47f2x2)}mxFastOrganicLayout[_0x1bfe[202]]= new mxGraphLayout;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[196]]= mxFastOrganicLayout;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1786]]= !0;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1750]]= !0;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1787]]= !0;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1788]]= 50;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1789]]= 0;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1790]]= 2;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1791]]= 500;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1792]]= 4;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1793]]= 200;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1794]]= 0;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1795]]= 0;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1796]]= 0;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1797]]= !0;mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1713]]= function(_0x47f2x2){return mxGraphLayout[_0x1bfe[202]][_0x1bfe[1713]][_0x1bfe[183]](this,arguments)|| 0== this[_0x1bfe[1179]][_0x1bfe[1756]](_0x47f2x2)[_0x1bfe[67]]};mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]]();this[_0x1bfe[1798]]= [];for(var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[1728]](_0x47f2x2),_0x47f2x5=0;_0x47f2x5< _0x47f2x4[_0x1bfe[67]];_0x47f2x5++){this[_0x1bfe[1713]](_0x47f2x4[_0x47f2x5])|| this[_0x1bfe[1798]][_0x1bfe[207]](_0x47f2x4[_0x47f2x5])};var _0x47f2x9=this[_0x1bfe[1786]]?this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[1799]](this[_0x1bfe[1798]]):null,_0x47f2xa=this[_0x1bfe[1798]][_0x1bfe[67]];this[_0x1bfe[1800]]= [];this[_0x1bfe[1801]]= [];this[_0x1bfe[1802]]= [];this[_0x1bfe[1803]]= [];this[_0x1bfe[1804]]= [];this[_0x1bfe[1805]]= [];this[_0x1bfe[1806]]= [];this[_0x1bfe[1807]]= [];0.0010> this[_0x1bfe[1788]]&& (this[_0x1bfe[1788]]= 0.0010);this[_0x1bfe[1789]]= this[_0x1bfe[1788]]* this[_0x1bfe[1788]];for(_0x47f2x5= 0;_0x47f2x5< this[_0x1bfe[1798]][_0x1bfe[67]];_0x47f2x5++){var _0x47f2x12=this[_0x1bfe[1798]][_0x47f2x5];this[_0x1bfe[1803]][_0x47f2x5]= [];var _0x47f2x13=mxCellPath[_0x1bfe[385]](_0x47f2x12);this[_0x1bfe[1800]][_0x47f2x13]= _0x47f2x5;var _0x47f2x14=this[_0x1bfe[1726]](_0x47f2x12),_0x47f2x15=_0x47f2x14[_0x1bfe[117]],_0x47f2x16=_0x47f2x14[_0x1bfe[119]],_0x47f2x17=_0x47f2x14[_0x1bfe[235]],_0x47f2x18=_0x47f2x14[_0x1bfe[236]];this[_0x1bfe[1803]][_0x47f2x5][0]= _0x47f2x17+ _0x47f2x15/ 2;this[_0x1bfe[1803]][_0x47f2x5][1]= _0x47f2x18+ _0x47f2x16/ 2;this[_0x1bfe[1806]][_0x47f2x5]= Math[_0x1bfe[243]](_0x47f2x15,_0x47f2x16);this[_0x1bfe[1807]][_0x47f2x5]= this[_0x1bfe[1806]][_0x47f2x5]* this[_0x1bfe[1806]][_0x47f2x5]};_0x47f2x3[_0x1bfe[473]]();try{for(_0x47f2x5= 0;_0x47f2x5< _0x47f2xa;_0x47f2x5++){this[_0x1bfe[1801]][_0x47f2x5]= 0;this[_0x1bfe[1802]][_0x47f2x5]= 0;this[_0x1bfe[1804]][_0x47f2x5]= this[_0x1bfe[1711]](this[_0x1bfe[1798]][_0x47f2x5]);var _0x47f2x19=this[_0x1bfe[1179]][_0x1bfe[1756]](this[_0x1bfe[1798]][_0x47f2x5],_0x47f2x2),_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[1808]](_0x47f2x19,this[_0x1bfe[1798]][_0x47f2x5]);this[_0x1bfe[1805]][_0x47f2x5]= [];for(_0x47f2x15= 0;_0x47f2x15< _0x47f2x4[_0x1bfe[67]];_0x47f2x15++){this[_0x1bfe[1750]]&& this[_0x1bfe[1179]][_0x1bfe[1809]](_0x47f2x19[_0x47f2x15]);this[_0x1bfe[1787]]&& this[_0x1bfe[1716]](_0x47f2x19[_0x47f2x15],!1);var _0x47f2x13=mxCellPath[_0x1bfe[385]](_0x47f2x4[_0x47f2x15]),_0x47f2x1a=this[_0x1bfe[1800]][_0x47f2x13];this[_0x1bfe[1805]][_0x47f2x5][_0x47f2x15]= null!= _0x47f2x1a?_0x47f2x1a:_0x47f2x5}};this[_0x1bfe[1794]]= this[_0x1bfe[1793]];0== this[_0x1bfe[1795]]&& (this[_0x1bfe[1795]]= 20* Math[_0x1bfe[428]](_0x47f2xa));for(this[_0x1bfe[1796]]= 0;this[_0x1bfe[1796]]< this[_0x1bfe[1795]];this[_0x1bfe[1796]]++){if(!this[_0x1bfe[1797]]){return};this[_0x1bfe[1810]]();this[_0x1bfe[1811]]();this[_0x1bfe[1812]]();this[_0x1bfe[1813]]()};_0x47f2x2= _0x47f2x4= null;for(_0x47f2x5= 0;_0x47f2x5< this[_0x1bfe[1798]][_0x1bfe[67]];_0x47f2x5++){_0x47f2x12= this[_0x1bfe[1798]][_0x47f2x5],this[_0x1bfe[1711]](_0x47f2x12)&& (_0x47f2x14= this[_0x1bfe[1726]](_0x47f2x12),null!= _0x47f2x14&& (this[_0x1bfe[1803]][_0x47f2x5][0]-= _0x47f2x14[_0x1bfe[117]]/ 2,this[_0x1bfe[1803]][_0x47f2x5][1]-= _0x47f2x14[_0x1bfe[119]]/ 2,_0x47f2x17= this[_0x1bfe[1179]][_0x1bfe[1021]](this[_0x1bfe[1803]][_0x47f2x5][0]),_0x47f2x18= this[_0x1bfe[1179]][_0x1bfe[1021]](this[_0x1bfe[1803]][_0x47f2x5][1]),this[_0x1bfe[1725]](_0x47f2x12,_0x47f2x17,_0x47f2x18),_0x47f2x4= null== _0x47f2x4?_0x47f2x17:Math[_0x1bfe[243]](_0x47f2x4,_0x47f2x17),_0x47f2x2= null== _0x47f2x2?_0x47f2x18:Math[_0x1bfe[243]](_0x47f2x2,_0x47f2x18)))};_0x47f2x5= -(_0x47f2x4|| 0)+ 1;_0x47f2x12= -(_0x47f2x2|| 0)+ 1;null!= _0x47f2x9&& (_0x47f2x5+= _0x47f2x9[_0x1bfe[235]],_0x47f2x12+= _0x47f2x9[_0x1bfe[236]]);this[_0x1bfe[1179]][_0x1bfe[834]](this[_0x1bfe[1798]],_0x47f2x5,_0x47f2x12)}finally{_0x47f2x3[_0x1bfe[476]]()}};mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1812]]= function(){for(var _0x47f2x2=0;_0x47f2x2< this[_0x1bfe[1798]][_0x1bfe[67]];_0x47f2x2++){if(this[_0x1bfe[1804]][_0x47f2x2]){var _0x47f2x3=Math[_0x1bfe[428]](this[_0x1bfe[1801]][_0x47f2x2]* this[_0x1bfe[1801]][_0x47f2x2]+ this[_0x1bfe[1802]][_0x47f2x2]* this[_0x1bfe[1802]][_0x47f2x2]);0.0010> _0x47f2x3&& (_0x47f2x3= 0.0010);var _0x47f2x4=this[_0x1bfe[1801]][_0x47f2x2]/ _0x47f2x3* Math[_0x1bfe[243]](_0x47f2x3,this[_0x1bfe[1794]]),_0x47f2x3=this[_0x1bfe[1802]][_0x47f2x2]/ _0x47f2x3* Math[_0x1bfe[243]](_0x47f2x3,this[_0x1bfe[1794]]);this[_0x1bfe[1801]][_0x47f2x2]= 0;this[_0x1bfe[1802]][_0x47f2x2]= 0;this[_0x1bfe[1803]][_0x47f2x2][0]+= _0x47f2x4;this[_0x1bfe[1803]][_0x47f2x2][1]+= _0x47f2x3}}};mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1811]]= function(){for(var _0x47f2x2=0;_0x47f2x2< this[_0x1bfe[1798]][_0x1bfe[67]];_0x47f2x2++){for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[1805]][_0x47f2x2][_0x1bfe[67]];_0x47f2x3++){var _0x47f2x4=this[_0x1bfe[1805]][_0x47f2x2][_0x47f2x3];if(_0x47f2x2!= _0x47f2x4&& this[_0x1bfe[1804]][_0x47f2x2]&& this[_0x1bfe[1804]][_0x47f2x4]){var _0x47f2x5=this[_0x1bfe[1803]][_0x47f2x2][0]- this[_0x1bfe[1803]][_0x47f2x4][0],_0x47f2x9=this[_0x1bfe[1803]][_0x47f2x2][1]- this[_0x1bfe[1803]][_0x47f2x4][1],_0x47f2xa=_0x47f2x5* _0x47f2x5+ _0x47f2x9* _0x47f2x9- this[_0x1bfe[1807]][_0x47f2x2]- this[_0x1bfe[1807]][_0x47f2x4];_0x47f2xa< this[_0x1bfe[1792]]&& (_0x47f2xa= this[_0x1bfe[1792]]);var _0x47f2x12=Math[_0x1bfe[428]](_0x47f2xa),_0x47f2xa=_0x47f2xa/ this[_0x1bfe[1788]],_0x47f2x5=_0x47f2x5/ _0x47f2x12* _0x47f2xa,_0x47f2x9=_0x47f2x9/ _0x47f2x12* _0x47f2xa;this[_0x1bfe[1801]][_0x47f2x2]-= _0x47f2x5;this[_0x1bfe[1802]][_0x47f2x2]-= _0x47f2x9;this[_0x1bfe[1801]][_0x47f2x4]+= _0x47f2x5;this[_0x1bfe[1802]][_0x47f2x4]+= _0x47f2x9}}}};mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1810]]= function(){for(var _0x47f2x2=this[_0x1bfe[1798]][_0x1bfe[67]],_0x47f2x3=0;_0x47f2x3< _0x47f2x2;_0x47f2x3++){for(var _0x47f2x4=_0x47f2x3;_0x47f2x4< _0x47f2x2;_0x47f2x4++){if(!this[_0x1bfe[1797]]){return};if(_0x47f2x4!= _0x47f2x3&& this[_0x1bfe[1804]][_0x47f2x3]&& this[_0x1bfe[1804]][_0x47f2x4]){var _0x47f2x5=this[_0x1bfe[1803]][_0x47f2x3][0]- this[_0x1bfe[1803]][_0x47f2x4][0],_0x47f2x9=this[_0x1bfe[1803]][_0x47f2x3][1]- this[_0x1bfe[1803]][_0x47f2x4][1];0== _0x47f2x5&& (_0x47f2x5= 0.01+ Math[_0x1bfe[1814]]());0== _0x47f2x9&& (_0x47f2x9= 0.01+ Math[_0x1bfe[1814]]());var _0x47f2xa=Math[_0x1bfe[428]](_0x47f2x5* _0x47f2x5+ _0x47f2x9* _0x47f2x9),_0x47f2x12=_0x47f2xa- this[_0x1bfe[1806]][_0x47f2x3]- this[_0x1bfe[1806]][_0x47f2x4];_0x47f2x12> this[_0x1bfe[1791]]|| (_0x47f2x12< this[_0x1bfe[1790]]&& (_0x47f2x12= this[_0x1bfe[1790]]),_0x47f2x12= this[_0x1bfe[1789]]/ _0x47f2x12,_0x47f2x5= _0x47f2x5/ _0x47f2xa* _0x47f2x12,_0x47f2x9= _0x47f2x9/ _0x47f2xa* _0x47f2x12,this[_0x1bfe[1801]][_0x47f2x3]+= _0x47f2x5,this[_0x1bfe[1802]][_0x47f2x3]+= _0x47f2x9,this[_0x1bfe[1801]][_0x47f2x4]-= _0x47f2x5,this[_0x1bfe[1802]][_0x47f2x4]-= _0x47f2x9)}}}};mxFastOrganicLayout[_0x1bfe[202]][_0x1bfe[1813]]= function(){this[_0x1bfe[1794]]= this[_0x1bfe[1793]]* (1- this[_0x1bfe[1796]]/ this[_0x1bfe[1795]])};function mxCircleLayout(_0x47f2x2,_0x47f2x3){mxGraphLayout[_0x1bfe[239]](this,_0x47f2x2);this[_0x1bfe[1806]]= null!= _0x47f2x3?_0x47f2x3:100}mxCircleLayout[_0x1bfe[202]]= new mxGraphLayout;mxCircleLayout[_0x1bfe[202]][_0x1bfe[196]]= mxCircleLayout;mxCircleLayout[_0x1bfe[202]][_0x1bfe[1806]]= null;mxCircleLayout[_0x1bfe[202]][_0x1bfe[1815]]= !1;mxCircleLayout[_0x1bfe[202]][_0x1bfe[1732]]= 0;mxCircleLayout[_0x1bfe[202]][_0x1bfe[1733]]= 0;mxCircleLayout[_0x1bfe[202]][_0x1bfe[1750]]= !0;mxCircleLayout[_0x1bfe[202]][_0x1bfe[1787]]= !0;mxCircleLayout[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]]();_0x47f2x3[_0x1bfe[473]]();try{for(var _0x47f2x4=0,_0x47f2x5=null,_0x47f2x9=null,_0x47f2xa=[],_0x47f2x12=_0x47f2x3[_0x1bfe[262]](_0x47f2x2),_0x47f2x13=0;_0x47f2x13< _0x47f2x12;_0x47f2x13++){var _0x47f2x14=_0x47f2x3[_0x1bfe[263]](_0x47f2x2,_0x47f2x13);if(this[_0x1bfe[1713]](_0x47f2x14)){this[_0x1bfe[1715]](_0x47f2x14)|| (this[_0x1bfe[1750]]&& this[_0x1bfe[1179]][_0x1bfe[1809]](_0x47f2x14),this[_0x1bfe[1787]]&& this[_0x1bfe[1716]](_0x47f2x14,!1))}else {_0x47f2xa[_0x1bfe[207]](_0x47f2x14);var _0x47f2x15=this[_0x1bfe[1726]](_0x47f2x14),_0x47f2x5=null== _0x47f2x5?_0x47f2x15[_0x1bfe[236]]:Math[_0x1bfe[243]](_0x47f2x5,_0x47f2x15[_0x1bfe[236]]),_0x47f2x9=null== _0x47f2x9?_0x47f2x15[_0x1bfe[235]]:Math[_0x1bfe[243]](_0x47f2x9,_0x47f2x15[_0x1bfe[235]]),_0x47f2x4=Math[_0x1bfe[160]](_0x47f2x4,Math[_0x1bfe[160]](_0x47f2x15[_0x1bfe[117]],_0x47f2x15[_0x1bfe[119]]))}};var _0x47f2x16=this[_0x1bfe[1816]](_0x47f2xa[_0x1bfe[67]],_0x47f2x4);this[_0x1bfe[1815]]&& (_0x47f2x9= this[_0x1bfe[1732]],_0x47f2x5= this[_0x1bfe[1733]]);this[_0x1bfe[1817]](_0x47f2xa,_0x47f2x16,_0x47f2x9,_0x47f2x5)}finally{_0x47f2x3[_0x1bfe[476]]()}};mxCircleLayout[_0x1bfe[202]][_0x1bfe[1816]]= function(_0x47f2x2,_0x47f2x3){return Math[_0x1bfe[160]](_0x47f2x2* _0x47f2x3/ Math[_0x1bfe[424]],this[_0x1bfe[1806]])};mxCircleLayout[_0x1bfe[202]][_0x1bfe[1817]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){for(var _0x47f2x9=_0x47f2x2[_0x1bfe[67]],_0x47f2xa=2* Math[_0x1bfe[424]]/ _0x47f2x9,_0x47f2x12=0;_0x47f2x12< _0x47f2x9;_0x47f2x12++){this[_0x1bfe[1711]](_0x47f2x2[_0x47f2x12])&& this[_0x1bfe[1725]](_0x47f2x2[_0x47f2x12],_0x47f2x4+ _0x47f2x3+ _0x47f2x3* Math[_0x1bfe[427]](_0x47f2x12* _0x47f2xa),_0x47f2x5+ _0x47f2x3+ _0x47f2x3* Math[_0x1bfe[426]](_0x47f2x12* _0x47f2xa))}};function mxParallelEdgeLayout(_0x47f2x2){mxGraphLayout[_0x1bfe[239]](this,_0x47f2x2)}mxParallelEdgeLayout[_0x1bfe[202]]= new mxGraphLayout;mxParallelEdgeLayout[_0x1bfe[202]][_0x1bfe[196]]= mxParallelEdgeLayout;mxParallelEdgeLayout[_0x1bfe[202]][_0x1bfe[657]]= 20;mxParallelEdgeLayout[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[1818]](_0x47f2x2);this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[473]]();try{for(var _0x47f2x3 in _0x47f2x2){var _0x47f2x4=_0x47f2x2[_0x47f2x3];1< _0x47f2x4[_0x1bfe[67]]&& this[_0x1bfe[1759]](_0x47f2x4)}}finally{this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[476]]()}};mxParallelEdgeLayout[_0x1bfe[202]][_0x1bfe[1818]]= function(_0x47f2x2){for(var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x4=[],_0x47f2x5=_0x47f2x3[_0x1bfe[262]](_0x47f2x2),_0x47f2x9=0;_0x47f2x9< _0x47f2x5;_0x47f2x9++){var _0x47f2xa=_0x47f2x3[_0x1bfe[263]](_0x47f2x2,_0x47f2x9);if(!this[_0x1bfe[1715]](_0x47f2xa)){var _0x47f2x12=this[_0x1bfe[1819]](_0x47f2xa);null!= _0x47f2x12&& (null== _0x47f2x4[_0x47f2x12]&& (_0x47f2x4[_0x47f2x12]= []),_0x47f2x4[_0x47f2x12][_0x1bfe[207]](_0x47f2xa))}};return _0x47f2x4};mxParallelEdgeLayout[_0x1bfe[202]][_0x1bfe[1819]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[249]](),_0x47f2x4=_0x47f2x3[_0x1bfe[248]](_0x47f2x2),_0x47f2x5=null!= _0x47f2x4?_0x47f2x4[_0x1bfe[1710]](!0):_0x47f2x3[_0x1bfe[1710]](_0x47f2x2,!0);_0x47f2x2= null!= _0x47f2x4?_0x47f2x4[_0x1bfe[1710]](!1):_0x47f2x3[_0x1bfe[1710]](_0x47f2x2,!1);return null!= _0x47f2x5&& null!= _0x47f2x2?(_0x47f2x5= mxCellPath[_0x1bfe[385]](_0x47f2x5),_0x47f2x2= mxCellPath[_0x1bfe[385]](_0x47f2x2),_0x47f2x5> _0x47f2x2?_0x47f2x2+ _0x1bfe[213]+ _0x47f2x5:_0x47f2x5+ _0x1bfe[213]+ _0x47f2x2):null};mxParallelEdgeLayout[_0x1bfe[202]][_0x1bfe[1759]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[0],_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=_0x47f2x4[_0x1bfe[1721]](_0x47f2x4[_0x1bfe[1709]](_0x47f2x3,!0)),_0x47f2x9=_0x47f2x4[_0x1bfe[1721]](_0x47f2x4[_0x1bfe[1709]](_0x47f2x3,!1));if(_0x47f2x5== _0x47f2x9){for(var _0x47f2x3=_0x47f2x5[_0x1bfe[235]]+ _0x47f2x5[_0x1bfe[117]]+ this[_0x1bfe[657]],_0x47f2x4=_0x47f2x5[_0x1bfe[236]]+ _0x47f2x5[_0x1bfe[119]]/ 2,_0x47f2xa=0;_0x47f2xa< _0x47f2x2[_0x1bfe[67]];_0x47f2xa++){this[_0x1bfe[1820]](_0x47f2x2[_0x47f2xa],_0x47f2x3,_0x47f2x4),_0x47f2x3+= this[_0x1bfe[657]]}}else {if(null!= _0x47f2x5&& null!= _0x47f2x9){for(var _0x47f2x3=_0x47f2x5[_0x1bfe[235]]+ _0x47f2x5[_0x1bfe[117]]/ 2,_0x47f2x4=_0x47f2x5[_0x1bfe[236]]+ _0x47f2x5[_0x1bfe[119]]/ 2,_0x47f2xa=_0x47f2x9[_0x1bfe[235]]+ _0x47f2x9[_0x1bfe[117]]/ 2- _0x47f2x3,_0x47f2x12=_0x47f2x9[_0x1bfe[236]]+ _0x47f2x9[_0x1bfe[119]]/ 2- _0x47f2x4,_0x47f2x9=Math[_0x1bfe[428]](_0x47f2xa* _0x47f2xa+ _0x47f2x12* _0x47f2x12),_0x47f2x5=_0x47f2x12* this[_0x1bfe[657]]/ _0x47f2x9,_0x47f2x9=_0x47f2xa* this[_0x1bfe[657]]/ _0x47f2x9,_0x47f2x3=_0x47f2x3+ _0x47f2xa/ 2+ _0x47f2x5* (_0x47f2x2[_0x1bfe[67]]- 1)/ 2,_0x47f2x4=_0x47f2x4+ _0x47f2x12/ 2- _0x47f2x9* (_0x47f2x2[_0x1bfe[67]]- 1)/ 2,_0x47f2xa=0;_0x47f2xa< _0x47f2x2[_0x1bfe[67]];_0x47f2xa++){this[_0x1bfe[1820]](_0x47f2x2[_0x47f2xa],_0x47f2x3,_0x47f2x4),_0x47f2x3-= _0x47f2x5,_0x47f2x4+= _0x47f2x9}}}};mxParallelEdgeLayout[_0x1bfe[202]][_0x1bfe[1820]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[1179]][_0x1bfe[1712]](_0x47f2x2)&& this[_0x1bfe[1722]](_0x47f2x2,[ new mxPoint(_0x47f2x3,_0x47f2x4)])};function mxCompositeLayout(_0x47f2x2,_0x47f2x3,_0x47f2x4){mxGraphLayout[_0x1bfe[239]](this,_0x47f2x2);this[_0x1bfe[1821]]= _0x47f2x3;this[_0x1bfe[1822]]= _0x47f2x4}mxCompositeLayout[_0x1bfe[202]]= new mxGraphLayout;mxCompositeLayout[_0x1bfe[202]][_0x1bfe[196]]= mxCompositeLayout;mxCompositeLayout[_0x1bfe[202]][_0x1bfe[1821]]= null;mxCompositeLayout[_0x1bfe[202]][_0x1bfe[1822]]= null;mxCompositeLayout[_0x1bfe[202]][_0x1bfe[1702]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){null!= this[_0x1bfe[1822]]?this[_0x1bfe[1822]][_0x1bfe[582]][_0x1bfe[183]](this[_0x1bfe[1822]],arguments):this[_0x1bfe[1821]][0][_0x1bfe[582]][_0x1bfe[183]](this[_0x1bfe[1821]][0],arguments)};mxCompositeLayout[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]]();_0x47f2x3[_0x1bfe[473]]();try{for(var _0x47f2x4=0;_0x47f2x4< this[_0x1bfe[1821]][_0x1bfe[67]];_0x47f2x4++){this[_0x1bfe[1821]][_0x47f2x4][_0x1bfe[350]][_0x1bfe[183]](this[_0x1bfe[1821]][_0x47f2x4],arguments)}}finally{_0x47f2x3[_0x1bfe[476]]()}};function mxEdgeLabelLayout(_0x47f2x2,_0x47f2x3){mxGraphLayout[_0x1bfe[239]](this,_0x47f2x2)}mxEdgeLabelLayout[_0x1bfe[202]]= new mxGraphLayout;mxEdgeLabelLayout[_0x1bfe[202]][_0x1bfe[196]]= mxEdgeLabelLayout;mxEdgeLabelLayout[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){for(var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[441]],_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=[],_0x47f2x9=[],_0x47f2xa=_0x47f2x4[_0x1bfe[262]](_0x47f2x2),_0x47f2x12=0;_0x47f2x12< _0x47f2xa;_0x47f2x12++){var _0x47f2x13=_0x47f2x4[_0x1bfe[263]](_0x47f2x2,_0x47f2x12),_0x47f2x14=_0x47f2x3[_0x1bfe[248]](_0x47f2x13);null!= _0x47f2x14&& (this[_0x1bfe[1713]](_0x47f2x13)?this[_0x1bfe[1715]](_0x47f2x13)|| _0x47f2x5[_0x1bfe[207]](_0x47f2x14):_0x47f2x9[_0x1bfe[207]](_0x47f2x14))};this[_0x1bfe[1823]](_0x47f2x9,_0x47f2x5)};mxEdgeLabelLayout[_0x1bfe[202]][_0x1bfe[1823]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]]();_0x47f2x4[_0x1bfe[473]]();try{for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x3[_0x1bfe[67]];_0x47f2x5++){var _0x47f2x9=_0x47f2x3[_0x47f2x5];if(null!= _0x47f2x9&& null!= _0x47f2x9[_0x1bfe[963]]&& null!= _0x47f2x9[_0x1bfe[963]][_0x1bfe[1563]]){for(var _0x47f2xa=0;_0x47f2xa< _0x47f2x2[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=_0x47f2x2[_0x47f2xa];null!= _0x47f2x12&& this[_0x1bfe[1824]](_0x47f2x9,_0x47f2x12)}}}}finally{_0x47f2x4[_0x1bfe[476]]()}};mxEdgeLabelLayout[_0x1bfe[202]][_0x1bfe[1824]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=_0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]];if(mxUtils[_0x1bfe[1825]](_0x47f2x5,_0x47f2x3)){var _0x47f2x9=-_0x47f2x5[_0x1bfe[236]]- _0x47f2x5[_0x1bfe[119]]+ _0x47f2x3[_0x1bfe[236]],_0x47f2xa=-_0x47f2x5[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[119]],_0x47f2x9=Math[_0x1bfe[425]](_0x47f2x9)< Math[_0x1bfe[425]](_0x47f2xa)?_0x47f2x9:_0x47f2xa,_0x47f2xa=-_0x47f2x5[_0x1bfe[235]]- _0x47f2x5[_0x1bfe[117]]+ _0x47f2x3[_0x1bfe[235]],_0x47f2x5=-_0x47f2x5[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]],_0x47f2x5=Math[_0x1bfe[425]](_0x47f2xa)< Math[_0x1bfe[425]](_0x47f2x5)?_0x47f2xa:_0x47f2x5;Math[_0x1bfe[425]](_0x47f2x5)< Math[_0x1bfe[425]](_0x47f2x9)?_0x47f2x9= 0:_0x47f2x5= 0;_0x47f2xa= _0x47f2x4[_0x1bfe[1721]](_0x47f2x2[_0x1bfe[246]]);null!= _0x47f2xa&& (_0x47f2xa= _0x47f2xa[_0x1bfe[238]](),null!= _0x47f2xa[_0x1bfe[1368]]?(_0x47f2xa[_0x1bfe[1368]][_0x1bfe[235]]+= _0x47f2x5,_0x47f2xa[_0x1bfe[1368]][_0x1bfe[236]]+= _0x47f2x9):_0x47f2xa[_0x1bfe[1368]]= new mxPoint(_0x47f2x5,_0x47f2x9),_0x47f2x4[_0x1bfe[1724]](_0x47f2x2[_0x1bfe[246]],_0x47f2xa))}};function mxGraphAbstractHierarchyCell(){this[_0x1bfe[235]]= [];this[_0x1bfe[236]]= [];this[_0x1bfe[1826]]= []}mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1827]]= -1;mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1828]]= -1;mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[235]]= null;mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[236]]= null;mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[117]]= 0;mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[119]]= 0;mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1829]]= null;mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1830]]= null;mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1826]]= null;mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1831]]= function(_0x47f2x2){return null};mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1832]]= function(_0x47f2x2){return null};mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[250]]= function(){return !1};mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1193]]= function(){return !1};mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1833]]= function(_0x47f2x2){return null};mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1834]]= function(_0x47f2x2,_0x47f2x3){return null};mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1835]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1193]]()?this[_0x1bfe[235]][0]= _0x47f2x3:this[_0x1bfe[250]]()&& (this[_0x1bfe[235]][_0x47f2x2- this[_0x1bfe[1828]]- 1]= _0x47f2x3)};mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[730]]= function(_0x47f2x2){return this[_0x1bfe[1193]]()?this[_0x1bfe[235]][0]:this[_0x1bfe[250]]()?this[_0x1bfe[235]][_0x47f2x2- this[_0x1bfe[1828]]- 1]:0};mxGraphAbstractHierarchyCell[_0x1bfe[202]][_0x1bfe[1836]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1193]]()?this[_0x1bfe[236]][0]= _0x47f2x3:this[_0x1bfe[250]]()&& (this[_0x1bfe[236]][_0x47f2x2- this[_0x1bfe[1828]]- 1]= _0x47f2x3)};function mxGraphHierarchyNode(_0x47f2x2){mxGraphAbstractHierarchyCell[_0x1bfe[183]](this,arguments);this[_0x1bfe[246]]= _0x47f2x2}mxGraphHierarchyNode[_0x1bfe[202]]= new mxGraphAbstractHierarchyCell;mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[196]]= mxGraphHierarchyNode;mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[246]]= null;mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[1837]]= [];mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[1838]]= [];mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[1839]]= !1;mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[1840]]= function(_0x47f2x2){return this[_0x1bfe[1827]]};mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[1831]]= function(_0x47f2x2){if(null== this[_0x1bfe[1829]]){this[_0x1bfe[1829]]= [];this[_0x1bfe[1829]][0]= [];for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[1837]][_0x1bfe[67]];_0x47f2x3++){var _0x47f2x4=this[_0x1bfe[1837]][_0x47f2x3];-1== _0x47f2x4[_0x1bfe[1827]]|| _0x47f2x4[_0x1bfe[1827]]== _0x47f2x2+ 1?this[_0x1bfe[1829]][0][_0x1bfe[207]](_0x47f2x4[_0x1bfe[1097]]):this[_0x1bfe[1829]][0][_0x1bfe[207]](_0x47f2x4)}};return this[_0x1bfe[1829]][0]};mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[1832]]= function(_0x47f2x2){if(null== this[_0x1bfe[1830]]){this[_0x1bfe[1830]]= [];this[_0x1bfe[1830]][0]= [];for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[1838]][_0x1bfe[67]];_0x47f2x3++){var _0x47f2x4=this[_0x1bfe[1838]][_0x47f2x3];-1== _0x47f2x4[_0x1bfe[1828]]|| _0x47f2x4[_0x1bfe[1828]]== _0x47f2x2- 1?this[_0x1bfe[1830]][0][_0x1bfe[207]](_0x47f2x4[_0x1bfe[772]]):this[_0x1bfe[1830]][0][_0x1bfe[207]](_0x47f2x4)}};return this[_0x1bfe[1830]][0]};mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[1193]]= function(){return !0};mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[1833]]= function(_0x47f2x2){return this[_0x1bfe[1826]][0]};mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[1834]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1826]][0]= _0x47f2x3};mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[1720]]= function(_0x47f2x2){if(null!= _0x47f2x2&& null!= this[_0x1bfe[1839]]&& null!= _0x47f2x2[_0x1bfe[1839]]&& this[_0x1bfe[1839]][_0x1bfe[67]]< _0x47f2x2[_0x1bfe[1839]][_0x1bfe[67]]){if(this[_0x1bfe[1839]]== _0x47f2x2[_0x1bfe[1839]]){return !0};if(null== this[_0x1bfe[1839]]|| null== this[_0x1bfe[1839]]){return !1};for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[1839]][_0x1bfe[67]];_0x47f2x3++){if(this[_0x1bfe[1839]][_0x47f2x3]!= _0x47f2x2[_0x1bfe[1839]][_0x47f2x3]){return !1}};return !0};return !1};mxGraphHierarchyNode[_0x1bfe[202]][_0x1bfe[1841]]= function(){return this[_0x1bfe[246]]};function mxGraphHierarchyEdge(_0x47f2x2){mxGraphAbstractHierarchyCell[_0x1bfe[183]](this,arguments);this[_0x1bfe[1842]]= _0x47f2x2}mxGraphHierarchyEdge[_0x1bfe[202]]= new mxGraphAbstractHierarchyCell;mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[196]]= mxGraphHierarchyEdge;mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[1842]]= null;mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[1097]]= null;mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[772]]= null;mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[1843]]= !1;mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[1744]]= function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[1097]];this[_0x1bfe[1097]]= this[_0x1bfe[772]];this[_0x1bfe[772]]= _0x47f2x2;this[_0x1bfe[1843]]= !this[_0x1bfe[1843]]};mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[1831]]= function(_0x47f2x2){if(null== this[_0x1bfe[1829]]){this[_0x1bfe[1829]]= [];for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[1826]][_0x1bfe[67]];_0x47f2x3++){this[_0x1bfe[1829]][_0x47f2x3]= [],_0x47f2x3== this[_0x1bfe[1826]][_0x1bfe[67]]- 1?this[_0x1bfe[1829]][_0x47f2x3][_0x1bfe[207]](this[_0x1bfe[1097]]):this[_0x1bfe[1829]][_0x47f2x3][_0x1bfe[207]](this)}};return this[_0x1bfe[1829]][_0x47f2x2- this[_0x1bfe[1828]]- 1]};mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[1832]]= function(_0x47f2x2){if(null== this[_0x1bfe[1830]]){this[_0x1bfe[1830]]= [];for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[1826]][_0x1bfe[67]];_0x47f2x3++){this[_0x1bfe[1830]][_0x47f2x3]= [],0== _0x47f2x3?this[_0x1bfe[1830]][_0x47f2x3][_0x1bfe[207]](this[_0x1bfe[772]]):this[_0x1bfe[1830]][_0x47f2x3][_0x1bfe[207]](this)}};return this[_0x1bfe[1830]][_0x47f2x2- this[_0x1bfe[1828]]- 1]};mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[250]]= function(){return !0};mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[1833]]= function(_0x47f2x2){return this[_0x1bfe[1826]][_0x47f2x2- this[_0x1bfe[1828]]- 1]};mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[1834]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1826]][_0x47f2x2- this[_0x1bfe[1828]]- 1]= _0x47f2x3};mxGraphHierarchyEdge[_0x1bfe[202]][_0x1bfe[1841]]= function(){return null!= this[_0x1bfe[1842]]&& 0< this[_0x1bfe[1842]][_0x1bfe[67]]?this[_0x1bfe[1842]][0]:null};function mxGraphHierarchyModel(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2[_0x1bfe[1703]]();this[_0x1bfe[1844]]= _0x47f2x9;this[_0x1bfe[1845]]= _0x47f2x4;this[_0x1bfe[1101]]= _0x47f2x5;this[_0x1bfe[1846]]= {};this[_0x1bfe[1847]]= {};this[_0x1bfe[1827]]= 0;_0x47f2x4= [];null== _0x47f2x3&& (_0x47f2x3= this[_0x1bfe[1179]][_0x1bfe[1728]](_0x47f2x5));this[_0x1bfe[1827]]= this[_0x1bfe[1848]];this[_0x1bfe[1849]](_0x47f2x2,_0x47f2x3,_0x47f2x4);for(_0x47f2x5= 0;_0x47f2x5< _0x47f2x3[_0x1bfe[67]];_0x47f2x5++){_0x47f2x9= _0x47f2x4[_0x47f2x5][_0x1bfe[1838]];for(var _0x47f2xa=0;_0x47f2xa< _0x47f2x9[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=_0x47f2x9[_0x47f2xa],_0x47f2x13=_0x47f2x12[_0x1bfe[1842]];if(null!= _0x47f2x13&& 0< _0x47f2x13[_0x1bfe[67]]){var _0x47f2x13=_0x47f2x13[0],_0x47f2x14=_0x47f2x2[_0x1bfe[1710]](_0x47f2x13,!1),_0x47f2x14=mxCellPath[_0x1bfe[385]](_0x47f2x14),_0x47f2x14=this[_0x1bfe[1846]][_0x47f2x14];_0x47f2x4[_0x47f2x5]== _0x47f2x14&& (_0x47f2x14= _0x47f2x2[_0x1bfe[1710]](_0x47f2x13,!0),_0x47f2x14= mxCellPath[_0x1bfe[385]](_0x47f2x14),_0x47f2x14= this[_0x1bfe[1846]][_0x47f2x14]);null!= _0x47f2x14&& _0x47f2x4[_0x47f2x5]!= _0x47f2x14&& (_0x47f2x12[_0x1bfe[772]]= _0x47f2x14,0== _0x47f2x14[_0x1bfe[1837]][_0x1bfe[67]]&& (_0x47f2x14[_0x1bfe[1837]]= []),0> mxUtils[_0x1bfe[2]](_0x47f2x14[_0x1bfe[1837]],_0x47f2x12)&& _0x47f2x14[_0x1bfe[1837]][_0x1bfe[207]](_0x47f2x12))}};_0x47f2x4[_0x47f2x5][_0x1bfe[1826]][0]= 1}}mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1827]]= null;mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1846]]= null;mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1847]]= null;mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1850]]= null;mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1845]]= null;mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1101]]= null;mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1851]]= 0;mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1848]]= 1E8;mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1844]]= !1;mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1849]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){for(var _0x47f2x5=_0x47f2x2[_0x1bfe[1703]](),_0x47f2x9=0;_0x47f2x9< _0x47f2x3[_0x1bfe[67]];_0x47f2x9++){_0x47f2x4[_0x47f2x9]= new mxGraphHierarchyNode(_0x47f2x3[_0x47f2x9]);var _0x47f2xa=mxCellPath[_0x1bfe[385]](_0x47f2x3[_0x47f2x9]);this[_0x1bfe[1846]][_0x47f2xa]= _0x47f2x4[_0x47f2x9];_0x47f2xa= _0x47f2x2[_0x1bfe[264]](_0x47f2x3[_0x47f2x9]);_0x47f2x4[_0x47f2x9][_0x1bfe[1838]]= [];for(var _0x47f2x12=0;_0x47f2x12< _0x47f2xa[_0x1bfe[67]];_0x47f2x12++){var _0x47f2x13=_0x47f2x2[_0x1bfe[1710]](_0x47f2xa[_0x47f2x12],!1);if(_0x47f2x13!= _0x47f2x3[_0x47f2x9]&& _0x47f2x13!= _0x47f2x3[_0x47f2x9]&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[1193]](_0x47f2x13)&& !_0x47f2x2[_0x1bfe[1713]](_0x47f2x13)){var _0x47f2x14=_0x47f2x2[_0x1bfe[1781]](_0x47f2x3[_0x47f2x9],_0x47f2x13,!1),_0x47f2x15=_0x47f2x2[_0x1bfe[1781]](_0x47f2x3[_0x47f2x9],_0x47f2x13,!0),_0x47f2x13=mxCellPath[_0x1bfe[385]](_0x47f2x14[0]);if(null!= _0x47f2x14&& 0< _0x47f2x14[_0x1bfe[67]]&& null== this[_0x1bfe[1847]][_0x47f2x13]&& 2* _0x47f2x15[_0x1bfe[67]]>= _0x47f2x14[_0x1bfe[67]]){for(var _0x47f2x15= new mxGraphHierarchyEdge(_0x47f2x14),_0x47f2x16=0;_0x47f2x16< _0x47f2x14[_0x1bfe[67]];_0x47f2x16++){var _0x47f2x17=_0x47f2x14[_0x47f2x16],_0x47f2x13=mxCellPath[_0x1bfe[385]](_0x47f2x17);this[_0x1bfe[1847]][_0x47f2x13]= _0x47f2x15;_0x47f2x5[_0x1bfe[1809]](_0x47f2x17);_0x47f2x2[_0x1bfe[1787]]&& (_0x47f2x2[_0x1bfe[1716]](_0x47f2x17,!1),_0x47f2x2[_0x1bfe[1718]](_0x47f2x17,!0))};_0x47f2x15[_0x1bfe[1097]]= _0x47f2x4[_0x47f2x9];0> mxUtils[_0x1bfe[2]](_0x47f2x4[_0x47f2x9][_0x1bfe[1838]],_0x47f2x15)&& _0x47f2x4[_0x47f2x9][_0x1bfe[1838]][_0x1bfe[207]](_0x47f2x15)}}};_0x47f2x4[_0x47f2x9][_0x1bfe[1826]][0]= 0}};mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1852]]= function(){var _0x47f2x2=[];if(null!= this[_0x1bfe[1845]]){for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[1845]][_0x1bfe[67]];_0x47f2x3++){var _0x47f2x4=mxCellPath[_0x1bfe[385]](this[_0x1bfe[1845]][_0x47f2x3]),_0x47f2x4=this[_0x1bfe[1846]][_0x47f2x4];null!= _0x47f2x4&& _0x47f2x2[_0x1bfe[207]](_0x47f2x4)}};for(var _0x47f2x5 in this[_0x1bfe[1846]]){_0x47f2x4= this[_0x1bfe[1846]][_0x47f2x5],_0x47f2x4[_0x1bfe[1826]][0]= -1};for(var _0x47f2x9=_0x47f2x2[_0x1bfe[1853]]();0< _0x47f2x2[_0x1bfe[67]];){var _0x47f2x4=_0x47f2x2[0],_0x47f2xa,_0x47f2x12;_0x47f2xa= _0x47f2x4[_0x1bfe[1837]];_0x47f2x12= _0x47f2x4[_0x1bfe[1838]];for(var _0x47f2x13=!0,_0x47f2x14=this[_0x1bfe[1848]],_0x47f2x3=0;_0x47f2x3< _0x47f2xa[_0x1bfe[67]];_0x47f2x3++){var _0x47f2x15=_0x47f2xa[_0x47f2x3];if(5270620== _0x47f2x15[_0x1bfe[1826]][0]){_0x47f2x15= _0x47f2x15[_0x1bfe[1097]],_0x47f2x14= Math[_0x1bfe[243]](_0x47f2x14,_0x47f2x15[_0x1bfe[1826]][0]- 1)}else {_0x47f2x13= !1;break}};if(_0x47f2x13){_0x47f2x4[_0x1bfe[1826]][0]= _0x47f2x14;this[_0x1bfe[1827]]= Math[_0x1bfe[243]](this[_0x1bfe[1827]],_0x47f2x14);if(null!= _0x47f2x12){for(_0x47f2x3= 0;_0x47f2x3< _0x47f2x12[_0x1bfe[67]];_0x47f2x3++){_0x47f2x15= _0x47f2x12[_0x47f2x3],_0x47f2x15[_0x1bfe[1826]][0]= 5270620,_0x47f2x15= _0x47f2x15[_0x1bfe[772]],-1== _0x47f2x15[_0x1bfe[1826]][0]&& (_0x47f2x2[_0x1bfe[207]](_0x47f2x15),_0x47f2x15[_0x1bfe[1826]][0]= -2)}};_0x47f2x2[_0x1bfe[1115]]()}else {if(_0x47f2x3= _0x47f2x2[_0x1bfe[1115]](),_0x47f2x2[_0x1bfe[207]](_0x47f2x4),_0x47f2x3== _0x47f2x4&& 1== _0x47f2x2[_0x1bfe[67]]){break}}};for(_0x47f2x5 in this[_0x1bfe[1846]]){_0x47f2x4= this[_0x1bfe[1846]][_0x47f2x5],_0x47f2x4[_0x1bfe[1826]][0]-= this[_0x1bfe[1827]]};for(_0x47f2x3= 0;_0x47f2x3< _0x47f2x9[_0x1bfe[67]];_0x47f2x3++){_0x47f2x4= _0x47f2x9[_0x47f2x3];_0x47f2x2= 0;_0x47f2xa= _0x47f2x4[_0x1bfe[1838]];for(_0x47f2x5= 0;_0x47f2x5< _0x47f2xa[_0x1bfe[67]];_0x47f2x5++){_0x47f2x15= _0x47f2xa[_0x47f2x5],_0x47f2x15= _0x47f2x15[_0x1bfe[772]],_0x47f2x4[_0x1bfe[1826]][0]= Math[_0x1bfe[160]](_0x47f2x2,_0x47f2x15[_0x1bfe[1826]][0]+ 1),_0x47f2x2= _0x47f2x4[_0x1bfe[1826]][0]}};this[_0x1bfe[1827]]= this[_0x1bfe[1848]]- this[_0x1bfe[1827]]};mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1854]]= function(){var _0x47f2x2=[];this[_0x1bfe[1850]]= [];for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[1827]]+ 1;_0x47f2x3++){_0x47f2x2[_0x47f2x3]= [],this[_0x1bfe[1850]][_0x47f2x3]= _0x47f2x2[_0x47f2x3]};var _0x47f2x4=null;if(null!= this[_0x1bfe[1845]]){for(var _0x47f2x5=this[_0x1bfe[1845]],_0x47f2x4=[],_0x47f2x3=0;_0x47f2x3< _0x47f2x5[_0x1bfe[67]];_0x47f2x3++){var _0x47f2x9=mxCellPath[_0x1bfe[385]](_0x47f2x5[_0x47f2x3]);_0x47f2x4[_0x47f2x3]= this[_0x1bfe[1846]][_0x47f2x9]}};this[_0x1bfe[209]](function(_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2x15){0== _0x47f2x15&& (0> _0x47f2x4[_0x1bfe[1827]]&& 0> _0x47f2x4[_0x1bfe[1828]])&& (_0x47f2x2[_0x47f2x4[_0x1bfe[1826]][0]][_0x1bfe[207]](_0x47f2x4),_0x47f2x4[_0x1bfe[1827]]= _0x47f2x4[_0x1bfe[1826]][0],_0x47f2x4[_0x1bfe[1828]]= _0x47f2x4[_0x1bfe[1826]][0],_0x47f2x4[_0x1bfe[1826]][0]= _0x47f2x2[_0x47f2x4[_0x1bfe[1827]]][_0x1bfe[67]]- 1);if(null!= _0x47f2x3&& null!= _0x47f2x5&& 1< _0x47f2x3[_0x1bfe[1827]]- _0x47f2x4[_0x1bfe[1827]]){_0x47f2x5[_0x1bfe[1827]]= _0x47f2x3[_0x1bfe[1827]];_0x47f2x5[_0x1bfe[1828]]= _0x47f2x4[_0x1bfe[1827]];_0x47f2x5[_0x1bfe[1826]]= [];_0x47f2x5[_0x1bfe[235]]= [];_0x47f2x5[_0x1bfe[236]]= [];for(_0x47f2x3= _0x47f2x5[_0x1bfe[1828]]+ 1;_0x47f2x3< _0x47f2x5[_0x1bfe[1827]];_0x47f2x3++){_0x47f2x2[_0x47f2x3][_0x1bfe[207]](_0x47f2x5),_0x47f2x5[_0x1bfe[1834]](_0x47f2x3,_0x47f2x2[_0x47f2x3][_0x1bfe[67]]- 1)}}},_0x47f2x4,!1,null)};mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[209]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x3){for(var _0x47f2x9=0;_0x47f2x9< _0x47f2x3[_0x1bfe[67]];_0x47f2x9++){var _0x47f2xa=_0x47f2x3[_0x47f2x9];null!= _0x47f2xa&& (null== _0x47f2x5&& (_0x47f2x5= {}),_0x47f2x4?(_0x47f2xa[_0x1bfe[1839]]= [],_0x47f2xa[_0x1bfe[1839]][0]= this[_0x1bfe[1851]],_0x47f2xa[_0x1bfe[1839]][1]= _0x47f2x9,this[_0x1bfe[1855]](null,_0x47f2xa,null,_0x47f2x2,_0x47f2x5,_0x47f2xa[_0x1bfe[1839]],_0x47f2x9,0)):this[_0x1bfe[1758]](null,_0x47f2xa,null,_0x47f2x2,_0x47f2x5,0))};this[_0x1bfe[1851]]++}};mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1758]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){if(null!= _0x47f2x3){var _0x47f2x12=mxCellPath[_0x1bfe[385]](_0x47f2x3[_0x1bfe[246]]);if(null== _0x47f2x9[_0x47f2x12]){_0x47f2x9[_0x47f2x12]= _0x47f2x3;_0x47f2x5(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2xa,0);_0x47f2x2= _0x47f2x3[_0x1bfe[1838]][_0x1bfe[1853]]();for(_0x47f2x4= 0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){_0x47f2x12= _0x47f2x2[_0x47f2x4],this[_0x1bfe[1758]](_0x47f2x3,_0x47f2x12[_0x1bfe[772]],_0x47f2x12,_0x47f2x5,_0x47f2x9,_0x47f2xa+ 1)}}else {_0x47f2x5(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2xa,1)}}};mxGraphHierarchyModel[_0x1bfe[202]][_0x1bfe[1855]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13){if(null!= _0x47f2x3){if(null!= _0x47f2x2&& (null== _0x47f2x3[_0x1bfe[1839]]|| _0x47f2x3[_0x1bfe[1839]][0]!= _0x47f2x2[_0x1bfe[1839]][0])){_0x47f2xa= _0x47f2x2[_0x1bfe[1839]][_0x1bfe[67]]+ 1,_0x47f2x3[_0x1bfe[1839]]= _0x47f2x2[_0x1bfe[1839]][_0x1bfe[1853]](),_0x47f2x3[_0x1bfe[1839]][_0x47f2xa- 1]= _0x47f2x12};_0x47f2x12= mxCellPath[_0x1bfe[385]](_0x47f2x3[_0x1bfe[246]]);if(null== _0x47f2x9[_0x47f2x12]){_0x47f2x9[_0x47f2x12]= _0x47f2x3;_0x47f2x5(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x13,0);_0x47f2x2= _0x47f2x3[_0x1bfe[1838]][_0x1bfe[1853]]();for(_0x47f2x4= 0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){_0x47f2x12= _0x47f2x2[_0x47f2x4],this[_0x1bfe[1855]](_0x47f2x3,_0x47f2x12[_0x1bfe[772]],_0x47f2x12,_0x47f2x5,_0x47f2x9,_0x47f2x3[_0x1bfe[1839]],_0x47f2x4,_0x47f2x13+ 1)}}else {_0x47f2x5(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x13,1)}}};function mxHierarchicalLayoutStage(){}mxHierarchicalLayoutStage[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){};function mxMedianHybridCrossingReduction(_0x47f2x2){this[_0x1bfe[1759]]= _0x47f2x2}mxMedianHybridCrossingReduction[_0x1bfe[202]]= new mxHierarchicalLayoutStage;mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[196]]= mxMedianHybridCrossingReduction;mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1759]]= null;mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1795]]= 24;mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1856]]= null;mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1857]]= 0;mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1858]]= 0;mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1859]]= 2;mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[1759]][_0x1bfe[502]]();this[_0x1bfe[1856]]= [];for(var _0x47f2x3=0;_0x47f2x3< _0x47f2x2[_0x1bfe[1850]][_0x1bfe[67]];_0x47f2x3++){this[_0x1bfe[1856]][_0x47f2x3]= _0x47f2x2[_0x1bfe[1850]][_0x47f2x3][_0x1bfe[1853]]()};for(var _0x47f2x4=0,_0x47f2x5=this[_0x1bfe[1860]](_0x47f2x2),_0x47f2x3=0;_0x47f2x3< this[_0x1bfe[1795]]&& _0x47f2x4< this[_0x1bfe[1859]];_0x47f2x3++){this[_0x1bfe[1861]](_0x47f2x3,_0x47f2x2);this[_0x1bfe[1862]](_0x47f2x3,_0x47f2x2);var _0x47f2x9=this[_0x1bfe[1860]](_0x47f2x2);if(_0x47f2x9< _0x47f2x5){_0x47f2x5= _0x47f2x9;for(_0x47f2x9= _0x47f2x4= 0;_0x47f2x9< this[_0x1bfe[1856]][_0x1bfe[67]];_0x47f2x9++){for(var _0x47f2xa=_0x47f2x2[_0x1bfe[1850]][_0x47f2x9],_0x47f2x12=0;_0x47f2x12< _0x47f2xa[_0x1bfe[67]];_0x47f2x12++){var _0x47f2x13=_0x47f2xa[_0x47f2x12];this[_0x1bfe[1856]][_0x47f2x9][_0x47f2x13[_0x1bfe[1833]](_0x47f2x9)]= _0x47f2x13}}}else {_0x47f2x4++;for(_0x47f2x9= 0;_0x47f2x9< this[_0x1bfe[1856]][_0x1bfe[67]];_0x47f2x9++){_0x47f2xa= _0x47f2x2[_0x1bfe[1850]][_0x47f2x9];for(_0x47f2x12= 0;_0x47f2x12< _0x47f2xa[_0x1bfe[67]];_0x47f2x12++){_0x47f2x13= _0x47f2xa[_0x47f2x12],_0x47f2x13[_0x1bfe[1834]](_0x47f2x9,_0x47f2x12)}}};if(0== _0x47f2x5){break}};_0x47f2x4= [];_0x47f2x5= [];for(_0x47f2x3= 0;_0x47f2x3< _0x47f2x2[_0x1bfe[1827]]+ 1;_0x47f2x3++){_0x47f2x5[_0x47f2x3]= [],_0x47f2x4[_0x47f2x3]= _0x47f2x5[_0x47f2x3]};for(_0x47f2x3= 0;_0x47f2x3< this[_0x1bfe[1856]][_0x1bfe[67]];_0x47f2x3++){for(_0x47f2x9= 0;_0x47f2x9< this[_0x1bfe[1856]][_0x47f2x3][_0x1bfe[67]];_0x47f2x9++){_0x47f2x5[_0x47f2x3][_0x1bfe[207]](this[_0x1bfe[1856]][_0x47f2x3][_0x47f2x9])}};_0x47f2x2[_0x1bfe[1850]]= _0x47f2x4};mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1860]]= function(_0x47f2x2){for(var _0x47f2x3=_0x47f2x2[_0x1bfe[1850]][_0x1bfe[67]],_0x47f2x4=0,_0x47f2x5=1;_0x47f2x5< _0x47f2x3;_0x47f2x5++){_0x47f2x4+= this[_0x1bfe[1863]](_0x47f2x5,_0x47f2x2)};return _0x47f2x4};mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1863]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=0,_0x47f2x5=_0x47f2x3[_0x1bfe[1850]][_0x47f2x2],_0x47f2x9=_0x47f2x5[_0x1bfe[67]],_0x47f2xa=_0x47f2x3[_0x1bfe[1850]][_0x47f2x2- 1][_0x1bfe[67]],_0x47f2x12=[],_0x47f2x13=0;_0x47f2x13< _0x47f2x9;_0x47f2x13++){_0x47f2x12[_0x47f2x13]= []};for(_0x47f2x13= 0;_0x47f2x13< _0x47f2x5[_0x1bfe[67]];_0x47f2x13++){for(var _0x47f2x14=_0x47f2x5[_0x47f2x13],_0x47f2x15=_0x47f2x14[_0x1bfe[1833]](_0x47f2x2),_0x47f2x16=_0x47f2x14[_0x1bfe[1832]](_0x47f2x2),_0x47f2x14=0;_0x47f2x14< _0x47f2x16[_0x1bfe[67]];_0x47f2x14++){var _0x47f2x17=_0x47f2x16[_0x47f2x14][_0x1bfe[1833]](_0x47f2x2- 1);_0x47f2x12[_0x47f2x15][_0x47f2x17]= 201207}};for(_0x47f2x13= 0;_0x47f2x13< _0x47f2x9;_0x47f2x13++){for(_0x47f2x14= 0;_0x47f2x14< _0x47f2xa;_0x47f2x14++){if(201207== _0x47f2x12[_0x47f2x13][_0x47f2x14]){for(_0x47f2x5= _0x47f2x13+ 1;_0x47f2x5< _0x47f2x9;_0x47f2x5++){for(_0x47f2x15= 0;_0x47f2x15< _0x47f2x14;_0x47f2x15++){201207== _0x47f2x12[_0x47f2x5][_0x47f2x15]&& _0x47f2x4++}};for(_0x47f2x5= 0;_0x47f2x5< _0x47f2x13;_0x47f2x5++){for(_0x47f2x15= _0x47f2x14+ 1;_0x47f2x15< _0x47f2xa;_0x47f2x15++){201207== _0x47f2x12[_0x47f2x5][_0x47f2x15]&& _0x47f2x4++}}}}};return _0x47f2x4/ 2};mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1862]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=!0,_0x47f2x5=0;_0x47f2x4&& 10> _0x47f2x5++;){for(var _0x47f2x9=1== _0x47f2x2% 2&& 1== _0x47f2x5% 2,_0x47f2x4=!1,_0x47f2xa=0;_0x47f2xa< _0x47f2x3[_0x1bfe[1850]][_0x1bfe[67]];_0x47f2xa++){for(var _0x47f2x12=_0x47f2x3[_0x1bfe[1850]][_0x47f2xa],_0x47f2x13=[],_0x47f2x14=0;_0x47f2x14< _0x47f2x12[_0x1bfe[67]];_0x47f2x14++){var _0x47f2x15=_0x47f2x12[_0x47f2x14],_0x47f2x16=_0x47f2x15[_0x1bfe[1833]](_0x47f2xa);0> _0x47f2x16&& (_0x47f2x16= _0x47f2x14);_0x47f2x13[_0x47f2x16]= _0x47f2x15};for(var _0x47f2x17=_0x47f2x16= _0x47f2x15= null,_0x47f2x18=null,_0x47f2x19=null,_0x47f2x1a=null,_0x47f2x1b=null,_0x47f2x1c=null,_0x47f2x1d=null,_0x47f2x1e=null,_0x47f2x14=0;_0x47f2x14< _0x47f2x12[_0x1bfe[67]]- 1;_0x47f2x14++){if(0== _0x47f2x14){for(var _0x47f2x1d=_0x47f2x13[_0x47f2x14],_0x47f2x15=_0x47f2x1d[_0x1bfe[1831]](_0x47f2xa),_0x47f2x16=_0x47f2x1d[_0x1bfe[1832]](_0x47f2xa),_0x47f2x19=[],_0x47f2x1a=[],_0x47f2x1f=0;_0x47f2x1f< _0x47f2x15[_0x1bfe[67]];_0x47f2x1f++){_0x47f2x19[_0x47f2x1f]= _0x47f2x15[_0x47f2x1f][_0x1bfe[1833]](_0x47f2xa+ 1)};for(_0x47f2x1f= 0;_0x47f2x1f< _0x47f2x16[_0x1bfe[67]];_0x47f2x1f++){_0x47f2x1a[_0x47f2x1f]= _0x47f2x16[_0x47f2x1f][_0x1bfe[1833]](_0x47f2xa- 1)}}else {_0x47f2x15= _0x47f2x17,_0x47f2x16= _0x47f2x18,_0x47f2x19= _0x47f2x1b,_0x47f2x1a= _0x47f2x1c,_0x47f2x1d= _0x47f2x1e};_0x47f2x1e= _0x47f2x13[_0x47f2x14+ 1];_0x47f2x17= _0x47f2x1e[_0x1bfe[1831]](_0x47f2xa);_0x47f2x18= _0x47f2x1e[_0x1bfe[1832]](_0x47f2xa);_0x47f2x1b= [];_0x47f2x1c= [];for(_0x47f2x1f= 0;_0x47f2x1f< _0x47f2x17[_0x1bfe[67]];_0x47f2x1f++){_0x47f2x1b[_0x47f2x1f]= _0x47f2x17[_0x47f2x1f][_0x1bfe[1833]](_0x47f2xa+ 1)};for(_0x47f2x1f= 0;_0x47f2x1f< _0x47f2x18[_0x1bfe[67]];_0x47f2x1f++){_0x47f2x1c[_0x47f2x1f]= _0x47f2x18[_0x47f2x1f][_0x1bfe[1833]](_0x47f2xa- 1)};for(var _0x47f2x20=0,_0x47f2x62=0,_0x47f2x1f=0;_0x47f2x1f< _0x47f2x19[_0x1bfe[67]];_0x47f2x1f++){for(var _0x47f2x63=0;_0x47f2x63< _0x47f2x1b[_0x1bfe[67]];_0x47f2x63++){_0x47f2x19[_0x47f2x1f]> _0x47f2x1b[_0x47f2x63]&& _0x47f2x20++,_0x47f2x19[_0x47f2x1f]< _0x47f2x1b[_0x47f2x63]&& _0x47f2x62++}};for(_0x47f2x1f= 0;_0x47f2x1f< _0x47f2x1a[_0x1bfe[67]];_0x47f2x1f++){for(_0x47f2x63= 0;_0x47f2x63< _0x47f2x1c[_0x1bfe[67]];_0x47f2x63++){_0x47f2x1a[_0x47f2x1f]> _0x47f2x1c[_0x47f2x63]&& _0x47f2x20++,_0x47f2x1a[_0x47f2x1f]< _0x47f2x1c[_0x47f2x63]&& _0x47f2x62++}};if(_0x47f2x62< _0x47f2x20|| _0x47f2x62== _0x47f2x20&& _0x47f2x9){_0x47f2x17= _0x47f2x1d[_0x1bfe[1833]](_0x47f2xa),_0x47f2x1d[_0x1bfe[1834]](_0x47f2xa,_0x47f2x1e[_0x1bfe[1833]](_0x47f2xa)),_0x47f2x1e[_0x1bfe[1834]](_0x47f2xa,_0x47f2x17),_0x47f2x17= _0x47f2x15,_0x47f2x18= _0x47f2x16,_0x47f2x1b= _0x47f2x19,_0x47f2x1c= _0x47f2x1a,_0x47f2x1e= _0x47f2x1d,_0x47f2x9|| (_0x47f2x4= !0)}}}}};mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1861]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=0== _0x47f2x2% 2;if(_0x47f2x4){for(var _0x47f2x5=_0x47f2x3[_0x1bfe[1827]]- 1;0<= _0x47f2x5;_0x47f2x5--){this[_0x1bfe[1864]](_0x47f2x5,_0x47f2x4)}}else {for(_0x47f2x5= 1;_0x47f2x5< _0x47f2x3[_0x1bfe[1827]];_0x47f2x5++){this[_0x1bfe[1864]](_0x47f2x5,_0x47f2x4)}}};mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1864]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=this[_0x1bfe[1856]][_0x47f2x2][_0x1bfe[67]],_0x47f2x5=[],_0x47f2x9=[],_0x47f2xa=0;_0x47f2xa< _0x47f2x4;_0x47f2xa++){var _0x47f2x12=this[_0x1bfe[1856]][_0x47f2x2][_0x47f2xa],_0x47f2x13= new MedianCellSorter;_0x47f2x13[_0x1bfe[246]]= _0x47f2x12;var _0x47f2x14;_0x47f2x14= _0x47f2x3?_0x47f2x12[_0x1bfe[1831]](_0x47f2x2):_0x47f2x12[_0x1bfe[1832]](_0x47f2x2);var _0x47f2x15;_0x47f2x15= _0x47f2x3?_0x47f2x2+ 1:_0x47f2x2- 1;null!= _0x47f2x14&& 0!= _0x47f2x14[_0x1bfe[67]]?(_0x47f2x13[_0x1bfe[1865]]= this[_0x1bfe[1865]](_0x47f2x14,_0x47f2x15),_0x47f2x5[_0x1bfe[207]](_0x47f2x13)):_0x47f2x9[_0x47f2x12[_0x1bfe[1833]](_0x47f2x2)]= !0};_0x47f2x5[_0x1bfe[470]](MedianCellSorter[_0x1bfe[202]][_0x1bfe[469]]);for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x4;_0x47f2xa++){null== _0x47f2x9[_0x47f2xa]&& (_0x47f2x12= _0x47f2x5[_0x1bfe[1115]]()[_0x1bfe[246]],_0x47f2x12[_0x1bfe[1834]](_0x47f2x2,_0x47f2xa))}};mxMedianHybridCrossingReduction[_0x1bfe[202]][_0x1bfe[1865]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=[],_0x47f2x5=0,_0x47f2x9=0;_0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9++){var _0x47f2xa=_0x47f2x2[_0x47f2x9];_0x47f2x4[_0x47f2x5++]= _0x47f2xa[_0x1bfe[1833]](_0x47f2x3)};_0x47f2x4[_0x1bfe[470]](function(_0x47f2x2,_0x47f2x3){return _0x47f2x2- _0x47f2x3});if(1== _0x47f2x5% 2){return _0x47f2x4[Math[_0x1bfe[519]](_0x47f2x5/ 2)]};if(2== _0x47f2x5){return (_0x47f2x4[0]+ _0x47f2x4[1])/ 2};_0x47f2x9= _0x47f2x5/ 2;_0x47f2xa= _0x47f2x4[_0x47f2x9- 1]- _0x47f2x4[0];_0x47f2x5= _0x47f2x4[_0x47f2x5- 1]- _0x47f2x4[_0x47f2x9];return (_0x47f2x4[_0x47f2x9- 1]* _0x47f2x5+ _0x47f2x4[_0x47f2x9]* _0x47f2xa)/ (_0x47f2xa+ _0x47f2x5)};function MedianCellSorter(){}MedianCellSorter[_0x1bfe[202]][_0x1bfe[1865]]= 0;MedianCellSorter[_0x1bfe[202]][_0x1bfe[246]]= !1;MedianCellSorter[_0x1bfe[202]][_0x1bfe[469]]= function(_0x47f2x2,_0x47f2x3){return null!= _0x47f2x2&& null!= _0x47f2x3?_0x47f2x3[_0x1bfe[1865]]> _0x47f2x2[_0x1bfe[1865]]?-1:_0x47f2x3[_0x1bfe[1865]]< _0x47f2x2[_0x1bfe[1865]]?1:0:0};function mxMinimumCycleRemover(_0x47f2x2){this[_0x1bfe[1759]]= _0x47f2x2}mxMinimumCycleRemover[_0x1bfe[202]]= new mxHierarchicalLayoutStage;mxMinimumCycleRemover[_0x1bfe[202]][_0x1bfe[196]]= mxMinimumCycleRemover;mxMinimumCycleRemover[_0x1bfe[202]][_0x1bfe[1759]]= null;mxMinimumCycleRemover[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1759]][_0x1bfe[502]](),_0x47f2x4={},_0x47f2x5=mxUtils[_0x1bfe[238]](_0x47f2x3[_0x1bfe[1846]],null,!0),_0x47f2x9=null;if(null!= _0x47f2x3[_0x1bfe[1845]]){var _0x47f2xa=_0x47f2x3[_0x1bfe[1845]],_0x47f2x9=[];for(_0x47f2x2= 0;_0x47f2x2< _0x47f2xa[_0x1bfe[67]];_0x47f2x2++){var _0x47f2x12=mxCellPath[_0x1bfe[385]](_0x47f2xa[_0x47f2x2]);_0x47f2x9[_0x47f2x2]= _0x47f2x3[_0x1bfe[1846]][_0x47f2x12]}};_0x47f2x3[_0x1bfe[209]](function(_0x47f2x2,_0x47f2x3,_0x47f2x9,_0x47f2xa,_0x47f2x12){_0x47f2x3[_0x1bfe[1720]](_0x47f2x2)&& (_0x47f2x9[_0x1bfe[1744]](),mxUtils[_0x1bfe[205]](_0x47f2x9,_0x47f2x2[_0x1bfe[1838]]),_0x47f2x2[_0x1bfe[1837]][_0x1bfe[207]](_0x47f2x9),mxUtils[_0x1bfe[205]](_0x47f2x9,_0x47f2x3[_0x1bfe[1837]]),_0x47f2x3[_0x1bfe[1838]][_0x1bfe[207]](_0x47f2x9));_0x47f2x2= mxCellPath[_0x1bfe[385]](_0x47f2x3[_0x1bfe[246]]);_0x47f2x4[_0x47f2x2]= _0x47f2x3;delete _0x47f2x5[_0x47f2x2]},_0x47f2x9,!0,null);_0x47f2x9= null;0< _0x47f2x5[_0x1bfe[1866]]&& (_0x47f2x9= mxUtils[_0x1bfe[238]](_0x47f2x5,null,!0));_0x47f2x2= mxUtils[_0x1bfe[238]](_0x47f2x4,null,!0);_0x47f2x3[_0x1bfe[209]](function(_0x47f2x2,_0x47f2x3,_0x47f2x9,_0x47f2xa,_0x47f2x12){_0x47f2x3[_0x1bfe[1720]](_0x47f2x2)&& (_0x47f2x9[_0x1bfe[1744]](),mxUtils[_0x1bfe[205]](_0x47f2x9,_0x47f2x2[_0x1bfe[1838]]),_0x47f2x3[_0x1bfe[1838]][_0x1bfe[207]](_0x47f2x9),_0x47f2x2[_0x1bfe[1837]][_0x1bfe[207]](_0x47f2x9),mxUtils[_0x1bfe[205]](_0x47f2x9,_0x47f2x3[_0x1bfe[1837]]));_0x47f2x2= mxCellPath[_0x1bfe[385]](_0x47f2x3[_0x1bfe[246]]);_0x47f2x4[_0x47f2x2]= _0x47f2x3;delete _0x47f2x5[_0x47f2x2]},_0x47f2x5,!0,_0x47f2x2);_0x47f2xa= this[_0x1bfe[1759]][_0x1bfe[1703]]();if(null!= _0x47f2x9&& 0< _0x47f2x9[_0x1bfe[67]]){_0x47f2x3= _0x47f2x3[_0x1bfe[1845]];for(_0x47f2x2= 0;_0x47f2x2< _0x47f2x9[_0x1bfe[67]];_0x47f2x2++){_0x47f2x12= _0x47f2x9[_0x47f2x2][_0x1bfe[246]],0== _0x47f2xa[_0x1bfe[1867]](_0x47f2x12)[_0x1bfe[67]]&& _0x47f2x3[_0x1bfe[207]](_0x47f2x12)}}};function mxCoordinateAssignment(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){this[_0x1bfe[1759]]= _0x47f2x2;this[_0x1bfe[1868]]= _0x47f2x3;this[_0x1bfe[1869]]= _0x47f2x4;this[_0x1bfe[1870]]= _0x47f2x5;this[_0x1bfe[1871]]= _0x47f2x9;this[_0x1bfe[1872]]= _0x47f2xa}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};mxCoordinateAssignment[_0x1bfe[202]]= new mxHierarchicalLayoutStage;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[196]]= mxCoordinateAssignment;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1759]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1868]]= 30;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1869]]= 100;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1872]]= 10;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1795]]= 8;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1751]]= 5;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1752]]= 2;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1753]]= 12;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1754]]= 4;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1873]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1870]]= mxConstants[_0x1bfe[1358]];mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1871]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1874]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1875]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1876]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1877]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1878]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1879]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1880]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1881]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1882]]= !0;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[675]]= mxHierarchicalEdgeStyle[_0x1bfe[1883]];mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1884]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1885]]= null;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1745]]= 10;mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1886]]= function(){var _0x47f2x2=this[_0x1bfe[1759]][_0x1bfe[502]]();mxLog[_0x1bfe[539]]();mxLog[_0x1bfe[171]](_0x1bfe[1887]);for(var _0x47f2x3=0;_0x47f2x3< _0x47f2x2[_0x1bfe[1850]][_0x1bfe[67]];_0x47f2x3++){mxLog[_0x1bfe[53]](_0x1bfe[1888],_0x47f2x3,_0x1bfe[1889]);for(var _0x47f2x4=_0x47f2x2[_0x1bfe[1850]][_0x47f2x3],_0x47f2x5=0;_0x47f2x5< _0x47f2x4[_0x1bfe[67]];_0x47f2x5++){mxLog[_0x1bfe[53]](_0x47f2x4[_0x47f2x5][_0x1bfe[1833]](_0x47f2x3),_0x1bfe[316])};mxLog[_0x1bfe[171]]()};mxLog[_0x1bfe[171]](_0x1bfe[1890])};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){this[_0x1bfe[1873]]= [];_0x47f2x2= this[_0x1bfe[1759]][_0x1bfe[502]]();this[_0x1bfe[1875]]= 0;this[_0x1bfe[1891]](this[_0x1bfe[1759]][_0x1bfe[1703]](),_0x47f2x2);this[_0x1bfe[1882]]&& this[_0x1bfe[1892]](_0x47f2x2);var _0x47f2x3=1E8;if(this[_0x1bfe[1882]]){for(var _0x47f2x4=0;_0x47f2x4< this[_0x1bfe[1795]];_0x47f2x4++){0!= _0x47f2x4&& (this[_0x1bfe[1893]](_0x47f2x4,_0x47f2x2),this[_0x1bfe[1892]](_0x47f2x2));if(this[_0x1bfe[1875]]< _0x47f2x3){for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[1850]][_0x1bfe[67]];_0x47f2x5++){for(var _0x47f2x9=_0x47f2x2[_0x1bfe[1850]][_0x47f2x5],_0x47f2xa=0;_0x47f2xa< _0x47f2x9[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=_0x47f2x9[_0x47f2xa];_0x47f2x12[_0x1bfe[1835]](_0x47f2x5,_0x47f2x12[_0x1bfe[1833]](_0x47f2x5))}};_0x47f2x3= this[_0x1bfe[1875]]}else {for(_0x47f2x5= 0;_0x47f2x5< _0x47f2x2[_0x1bfe[1850]][_0x1bfe[67]];_0x47f2x5++){_0x47f2x9= _0x47f2x2[_0x1bfe[1850]][_0x47f2x5];for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x9[_0x1bfe[67]];_0x47f2xa++){_0x47f2x12= _0x47f2x9[_0x47f2xa],_0x47f2x12[_0x1bfe[1834]](_0x47f2x5,_0x47f2x12[_0x1bfe[730]](_0x47f2x5))}}};this[_0x1bfe[1894]](this[_0x1bfe[1759]][_0x1bfe[1703]](),_0x47f2x2);this[_0x1bfe[1875]]= 0}};this[_0x1bfe[1895]](this[_0x1bfe[1759]][_0x1bfe[1703]](),_0x47f2x2)};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1892]]= function(_0x47f2x2){for(var _0x47f2x3=[],_0x47f2x4=[],_0x47f2x5=[],_0x47f2x9=0;_0x47f2x9<= _0x47f2x2[_0x1bfe[1827]];_0x47f2x9++){_0x47f2x5[_0x47f2x9]= _0x47f2x2[_0x1bfe[1850]][_0x47f2x9];for(var _0x47f2xa=0;_0x47f2xa< _0x47f2x5[_0x47f2x9][_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=_0x47f2x5[_0x47f2x9][_0x47f2xa],_0x47f2x13= new WeightedCellSorter(_0x47f2x12,_0x47f2x9);_0x47f2x13[_0x1bfe[1785]]= _0x47f2xa;_0x47f2x13[_0x1bfe[1784]]= !0;_0x47f2x3[_0x1bfe[207]](_0x47f2x13);_0x47f2x12= mxCellPath[_0x1bfe[385]](_0x47f2x12[_0x1bfe[1841]]());_0x47f2x4[_0x47f2x12]= _0x47f2x13}};_0x47f2x2= 10* _0x47f2x3[_0x1bfe[67]];for(_0x47f2xa= 0;0< _0x47f2x3[_0x1bfe[67]]&& _0x47f2xa<= _0x47f2x2;){var _0x47f2x13=_0x47f2x3[_0x1bfe[1115]](),_0x47f2x9=_0x47f2x13[_0x1bfe[246]],_0x47f2x14=_0x47f2x13[_0x1bfe[1782]],_0x47f2x15=parseInt(_0x47f2x13[_0x1bfe[1785]]),_0x47f2x12=_0x47f2x9[_0x1bfe[1831]](_0x47f2x14),_0x47f2x16=_0x47f2x9[_0x1bfe[1832]](_0x47f2x14),_0x47f2x17=_0x47f2x12[_0x1bfe[67]],_0x47f2x18=_0x47f2x16[_0x1bfe[67]],_0x47f2x19=this[_0x1bfe[1896]](_0x47f2x12,_0x47f2x14+ 1),_0x47f2x1a=this[_0x1bfe[1896]](_0x47f2x16,_0x47f2x14- 1),_0x47f2x1b=_0x47f2x17+ _0x47f2x18,_0x47f2x1c=_0x47f2x9[_0x1bfe[1833]](_0x47f2x14),_0x47f2x1d=_0x47f2x1c;0< _0x47f2x1b&& (_0x47f2x1d= (_0x47f2x19* _0x47f2x17+ _0x47f2x1a* _0x47f2x18)/ _0x47f2x1b);_0x47f2x17= !1;_0x47f2x1d< _0x47f2x1c- 1?0== _0x47f2x15?(_0x47f2x9[_0x1bfe[1834]](_0x47f2x14,_0x47f2x1d),_0x47f2x17= !0):(_0x47f2x15= _0x47f2x5[_0x47f2x14][_0x47f2x15- 1],_0x47f2x1c= _0x47f2x15[_0x1bfe[1833]](_0x47f2x14),_0x47f2x1c= _0x47f2x1c+ _0x47f2x15[_0x1bfe[117]]/ 2+ this[_0x1bfe[1868]]+ _0x47f2x9[_0x1bfe[117]]/ 2,_0x47f2x1c< _0x47f2x1d?(_0x47f2x9[_0x1bfe[1834]](_0x47f2x14,_0x47f2x1d),_0x47f2x17= !0):_0x47f2x1c< _0x47f2x9[_0x1bfe[1833]](_0x47f2x14)- 1&& (_0x47f2x9[_0x1bfe[1834]](_0x47f2x14,_0x47f2x1c),_0x47f2x17= !0)):_0x47f2x1d> _0x47f2x1c+ 1&& (_0x47f2x15== _0x47f2x5[_0x47f2x14][_0x1bfe[67]]- 1?(_0x47f2x9[_0x1bfe[1834]](_0x47f2x14,_0x47f2x1d),_0x47f2x17= !0):(_0x47f2x15= _0x47f2x5[_0x47f2x14][_0x47f2x15+ 1],_0x47f2x1c= _0x47f2x15[_0x1bfe[1833]](_0x47f2x14),_0x47f2x1c= _0x47f2x1c- _0x47f2x15[_0x1bfe[117]]/ 2- this[_0x1bfe[1868]]- _0x47f2x9[_0x1bfe[117]]/ 2,_0x47f2x1c> _0x47f2x1d?(_0x47f2x9[_0x1bfe[1834]](_0x47f2x14,_0x47f2x1d),_0x47f2x17= !0):_0x47f2x1c> _0x47f2x9[_0x1bfe[1833]](_0x47f2x14)+ 1&& (_0x47f2x9[_0x1bfe[1834]](_0x47f2x14,_0x47f2x1c),_0x47f2x17= !0)));if(_0x47f2x17){for(_0x47f2x9= 0;_0x47f2x9< _0x47f2x12[_0x1bfe[67]];_0x47f2x9++){_0x47f2x14= _0x47f2x12[_0x47f2x9],_0x47f2x14= mxCellPath[_0x1bfe[385]](_0x47f2x14[_0x1bfe[1841]]()),_0x47f2x14= _0x47f2x4[_0x47f2x14],null!= _0x47f2x14&& !1== _0x47f2x14[_0x1bfe[1784]]&& (_0x47f2x14[_0x1bfe[1784]]= !0,_0x47f2x3[_0x1bfe[207]](_0x47f2x14))};for(_0x47f2x9= 0;_0x47f2x9< _0x47f2x16[_0x1bfe[67]];_0x47f2x9++){_0x47f2x14= _0x47f2x16[_0x47f2x9],_0x47f2x14= mxCellPath[_0x1bfe[385]](_0x47f2x14[_0x1bfe[1841]]()),_0x47f2x14= _0x47f2x4[_0x47f2x14],null!= _0x47f2x14&& !1== _0x47f2x14[_0x1bfe[1784]]&& (_0x47f2x14[_0x1bfe[1784]]= !0,_0x47f2x3[_0x1bfe[207]](_0x47f2x14))}};_0x47f2x13[_0x1bfe[1784]]= !1;_0x47f2xa++}};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1893]]= function(_0x47f2x2,_0x47f2x3){if(0== _0x47f2x2% 2){for(var _0x47f2x4=_0x47f2x3[_0x1bfe[1827]];0< _0x47f2x4;_0x47f2x4--){this[_0x1bfe[1897]](_0x47f2x4- 1,_0x47f2x3,_0x47f2x4)}}else {for(_0x47f2x4= 0;_0x47f2x4< _0x47f2x3[_0x1bfe[1827]]- 1;_0x47f2x4++){this[_0x1bfe[1897]](_0x47f2x4+ 1,_0x47f2x3,_0x47f2x4)}}};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1897]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= _0x47f2x3[_0x1bfe[1850]][_0x47f2x2];for(var _0x47f2x5=[],_0x47f2x9=[],_0x47f2xa=0;_0x47f2xa< _0x47f2x3[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=_0x47f2x3[_0x47f2xa];_0x47f2x5[_0x47f2xa]= new WeightedCellSorter;_0x47f2x5[_0x47f2xa][_0x1bfe[246]]= _0x47f2x12;_0x47f2x5[_0x47f2xa][_0x1bfe[1785]]= _0x47f2xa;var _0x47f2x13=mxCellPath[_0x1bfe[385]](_0x47f2x12[_0x1bfe[1841]]());_0x47f2x9[_0x47f2x13]= _0x47f2x5[_0x47f2xa];var _0x47f2x14=null,_0x47f2x14=_0x47f2x4< _0x47f2x2?_0x47f2x12[_0x1bfe[1832]](_0x47f2x2):_0x47f2x12[_0x1bfe[1831]](_0x47f2x2);_0x47f2x5[_0x47f2xa][_0x1bfe[1782]]= this[_0x1bfe[1898]](_0x47f2x12,_0x47f2x14)};_0x47f2x5[_0x1bfe[470]](WeightedCellSorter[_0x1bfe[202]][_0x1bfe[469]]);for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x5[_0x1bfe[67]];_0x47f2xa++){_0x47f2x13= 0;_0x47f2x12= _0x47f2x5[_0x47f2xa][_0x1bfe[246]];_0x47f2x13= 0;_0x47f2x14= _0x47f2x4< _0x47f2x2?_0x47f2x12[_0x1bfe[1832]](_0x47f2x2)[_0x1bfe[1853]]():_0x47f2x12[_0x1bfe[1831]](_0x47f2x2)[_0x1bfe[1853]]();null!= _0x47f2x14&& (_0x47f2x13= _0x47f2x14[_0x1bfe[67]],_0x47f2x13= 0< _0x47f2x13?this[_0x1bfe[1896]](_0x47f2x14,_0x47f2x4):_0x47f2x12[_0x1bfe[1833]](_0x47f2x2));for(var _0x47f2x15=0,_0x47f2x14=-1E8,_0x47f2x16=_0x47f2x5[_0x47f2xa][_0x1bfe[1785]]- 1;0<= _0x47f2x16;){var _0x47f2x17=mxCellPath[_0x1bfe[385]](_0x47f2x3[_0x47f2x16][_0x1bfe[1841]]()),_0x47f2x17=_0x47f2x9[_0x47f2x17];if(null!= _0x47f2x17){var _0x47f2x18=_0x47f2x17[_0x1bfe[246]];_0x47f2x17[_0x1bfe[1784]]?(_0x47f2x14= _0x47f2x18[_0x1bfe[1833]](_0x47f2x2)+ _0x47f2x18[_0x1bfe[117]]/ 2+ this[_0x1bfe[1868]]+ _0x47f2x15+ _0x47f2x12[_0x1bfe[117]]/ 2,_0x47f2x16= -1):(_0x47f2x15+= _0x47f2x18[_0x1bfe[117]]+ this[_0x1bfe[1868]],_0x47f2x16--)}};_0x47f2x15= 0;_0x47f2x18= 1E8;for(_0x47f2x16= _0x47f2x5[_0x47f2xa][_0x1bfe[1785]]+ 1;_0x47f2x16< _0x47f2x5[_0x1bfe[67]];){if(_0x47f2x17= mxCellPath[_0x1bfe[385]](_0x47f2x3[_0x47f2x16][_0x1bfe[1841]]()),_0x47f2x17= _0x47f2x9[_0x47f2x17],null!= _0x47f2x17){var _0x47f2x19=_0x47f2x17[_0x1bfe[246]];_0x47f2x17[_0x1bfe[1784]]?(_0x47f2x18= _0x47f2x19[_0x1bfe[1833]](_0x47f2x2)- _0x47f2x19[_0x1bfe[117]]/ 2- this[_0x1bfe[1868]]- _0x47f2x15- _0x47f2x12[_0x1bfe[117]]/ 2,_0x47f2x16= _0x47f2x5[_0x1bfe[67]]):(_0x47f2x15+= _0x47f2x19[_0x1bfe[117]]+ this[_0x1bfe[1868]],_0x47f2x16++)}};_0x47f2x13>= _0x47f2x14&& _0x47f2x13<= _0x47f2x18?_0x47f2x12[_0x1bfe[1834]](_0x47f2x2,_0x47f2x13):_0x47f2x13< _0x47f2x14?(_0x47f2x12[_0x1bfe[1834]](_0x47f2x2,_0x47f2x14),this[_0x1bfe[1875]]+= _0x47f2x14- _0x47f2x13):_0x47f2x13> _0x47f2x18&& (_0x47f2x12[_0x1bfe[1834]](_0x47f2x2,_0x47f2x18),this[_0x1bfe[1875]]+= _0x47f2x13- _0x47f2x18);_0x47f2x5[_0x47f2xa][_0x1bfe[1784]]= !0}};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1898]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=0,_0x47f2x5=0;_0x47f2x5< _0x47f2x3[_0x1bfe[67]];_0x47f2x5++){var _0x47f2x9=_0x47f2x3[_0x47f2x5];_0x47f2x2[_0x1bfe[1193]]()&& _0x47f2x9[_0x1bfe[1193]]()?_0x47f2x4++:_0x47f2x4= _0x47f2x2[_0x1bfe[250]]()&& _0x47f2x9[_0x1bfe[250]]()?_0x47f2x4+ 8:_0x47f2x4+ 2};return _0x47f2x4};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1896]]= function(_0x47f2x2,_0x47f2x3){if(0== _0x47f2x2[_0x1bfe[67]]){return 0};for(var _0x47f2x4=[],_0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){_0x47f2x4[_0x47f2x5]= _0x47f2x2[_0x47f2x5][_0x1bfe[1833]](_0x47f2x3)};_0x47f2x4[_0x1bfe[470]](function(_0x47f2x2,_0x47f2x3){return _0x47f2x2- _0x47f2x3});if(1== _0x47f2x2[_0x1bfe[67]]% 2){return _0x47f2x4[Math[_0x1bfe[519]](_0x47f2x2[_0x1bfe[67]]/ 2)]};_0x47f2x5= _0x47f2x2[_0x1bfe[67]]/ 2;return (_0x47f2x4[_0x47f2x5- 1]+ _0x47f2x4[_0x47f2x5])/ 2};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1891]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1899]](_0x47f2x2,_0x47f2x3);for(var _0x47f2x4=this[_0x1bfe[1876]];0<= _0x47f2x4;_0x47f2x4--){_0x47f2x4< _0x47f2x3[_0x1bfe[1827]]&& this[_0x1bfe[1900]](_0x47f2x4,_0x47f2x2,_0x47f2x3)};for(_0x47f2x4= this[_0x1bfe[1876]]+ 1;_0x47f2x4<= _0x47f2x3[_0x1bfe[1827]];_0x47f2x4++){0< _0x47f2x4&& this[_0x1bfe[1900]](_0x47f2x4,_0x47f2x2,_0x47f2x3)}};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1900]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= _0x47f2x4[_0x1bfe[1850]][_0x47f2x2];_0x47f2x4= 0;for(var _0x47f2x5=this[_0x1bfe[1871]]+ (this[_0x1bfe[1879]]- this[_0x1bfe[1880]][_0x47f2x2])/ 2,_0x47f2x9=!1,_0x47f2xa=0;_0x47f2xa< _0x47f2x3[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=_0x47f2x3[_0x47f2xa];if(_0x47f2x12[_0x1bfe[1193]]()){var _0x47f2x13=this[_0x1bfe[1759]][_0x1bfe[1726]](_0x47f2x12[_0x1bfe[246]]);null!= _0x47f2x13?this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1358]]|| this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1354]]?(_0x47f2x12[_0x1bfe[117]]= _0x47f2x13[_0x1bfe[117]],_0x47f2x12[_0x1bfe[119]]= _0x47f2x13[_0x1bfe[119]]):(_0x47f2x12[_0x1bfe[117]]= _0x47f2x13[_0x1bfe[119]],_0x47f2x12[_0x1bfe[119]]= _0x47f2x13[_0x1bfe[117]]):_0x47f2x9= !0;_0x47f2x4= Math[_0x1bfe[160]](_0x47f2x4,_0x47f2x12[_0x1bfe[119]])}else {_0x47f2x12[_0x1bfe[250]]()&& (_0x47f2x13= 1,null!= _0x47f2x12[_0x1bfe[1842]]?_0x47f2x13= _0x47f2x12[_0x1bfe[1842]][_0x1bfe[67]]:mxLog[_0x1bfe[283]](_0x1bfe[1901]),_0x47f2x12[_0x1bfe[117]]= (_0x47f2x13- 1)* this[_0x1bfe[1872]])};_0x47f2x5+= _0x47f2x12[_0x1bfe[117]]/ 2;_0x47f2x12[_0x1bfe[1835]](_0x47f2x2,_0x47f2x5);_0x47f2x12[_0x1bfe[1834]](_0x47f2x2,_0x47f2x5);_0x47f2x5+= _0x47f2x12[_0x1bfe[117]]/ 2;_0x47f2x5+= this[_0x1bfe[1868]]};!0== _0x47f2x9&& mxLog[_0x1bfe[283]](_0x1bfe[1902])};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1899]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=-this[_0x1bfe[1869]],_0x47f2x5=0;this[_0x1bfe[1880]]= [];this[_0x1bfe[1881]]= [];for(var _0x47f2x9=_0x47f2x3[_0x1bfe[1827]];0<= _0x47f2x9;_0x47f2x9--){for(var _0x47f2xa=0,_0x47f2x12=_0x47f2x3[_0x1bfe[1850]][_0x47f2x9],_0x47f2x13=this[_0x1bfe[1871]],_0x47f2x14=!1,_0x47f2x15=0;_0x47f2x15< _0x47f2x12[_0x1bfe[67]];_0x47f2x15++){var _0x47f2x16=_0x47f2x12[_0x47f2x15];if(_0x47f2x16[_0x1bfe[1193]]()){var _0x47f2x17=this[_0x1bfe[1759]][_0x1bfe[1726]](_0x47f2x16[_0x1bfe[246]]);null!= _0x47f2x17?this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1358]]|| this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1354]]?(_0x47f2x16[_0x1bfe[117]]= _0x47f2x17[_0x1bfe[117]],_0x47f2x16[_0x1bfe[119]]= _0x47f2x17[_0x1bfe[119]]):(_0x47f2x16[_0x1bfe[117]]= _0x47f2x17[_0x1bfe[119]],_0x47f2x16[_0x1bfe[119]]= _0x47f2x17[_0x1bfe[117]]):_0x47f2x14= !0;_0x47f2xa= Math[_0x1bfe[160]](_0x47f2xa,_0x47f2x16[_0x1bfe[119]])}else {_0x47f2x16[_0x1bfe[250]]()&& (_0x47f2x17= 1,null!= _0x47f2x16[_0x1bfe[1842]]?_0x47f2x17= _0x47f2x16[_0x1bfe[1842]][_0x1bfe[67]]:mxLog[_0x1bfe[283]](_0x1bfe[1901]),_0x47f2x16[_0x1bfe[117]]= (_0x47f2x17- 1)* this[_0x1bfe[1872]])};_0x47f2x13+= _0x47f2x16[_0x1bfe[117]]/ 2;_0x47f2x16[_0x1bfe[1835]](_0x47f2x9,_0x47f2x13);_0x47f2x16[_0x1bfe[1834]](_0x47f2x9,_0x47f2x13);_0x47f2x13+= _0x47f2x16[_0x1bfe[117]]/ 2;_0x47f2x13+= this[_0x1bfe[1868]];_0x47f2x13> this[_0x1bfe[1879]]&& (this[_0x1bfe[1879]]= _0x47f2x13,this[_0x1bfe[1876]]= _0x47f2x9);this[_0x1bfe[1880]][_0x47f2x9]= _0x47f2x13};!0== _0x47f2x14&& mxLog[_0x1bfe[283]](_0x1bfe[1902]);this[_0x1bfe[1881]][_0x47f2x9]= _0x47f2x4;_0x47f2x13= _0x47f2xa/ 2+ _0x47f2x5/ 2+ this[_0x1bfe[1869]];_0x47f2x5= _0x47f2xa;_0x47f2x4= this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1358]]|| this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1359]]?_0x47f2x4+ _0x47f2x13:_0x47f2x4- _0x47f2x13;for(_0x47f2x15= 0;_0x47f2x15< _0x47f2x12[_0x1bfe[67]];_0x47f2x15++){_0x47f2x12[_0x47f2x15][_0x1bfe[1836]](_0x47f2x9,_0x47f2x4)}}};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1894]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x3[_0x1bfe[1847]],_0x47f2x5;for(_0x47f2x5 in _0x47f2x4){var _0x47f2x9=_0x47f2x4[_0x47f2x5];if(!(1> _0x47f2x9[_0x1bfe[1827]]- _0x47f2x9[_0x1bfe[1828]]- 1)){for(var _0x47f2xa=_0x47f2x9[_0x1bfe[1833]](_0x47f2x9[_0x1bfe[1828]]+ 1),_0x47f2x12=!0,_0x47f2x13=0,_0x47f2x14=_0x47f2x9[_0x1bfe[1828]]+ 2;_0x47f2x14< _0x47f2x9[_0x1bfe[1827]];_0x47f2x14++){var _0x47f2x15=_0x47f2x9[_0x1bfe[1833]](_0x47f2x14);_0x47f2xa!= _0x47f2x15?(_0x47f2x12= !1,_0x47f2xa= _0x47f2x15):_0x47f2x13++};if(!_0x47f2x12){for(var _0x47f2x12=_0x47f2xa= 0,_0x47f2x15=[],_0x47f2x16=[],_0x47f2x17=_0x47f2x9[_0x1bfe[1833]](_0x47f2x9[_0x1bfe[1828]]+ 1),_0x47f2x14=_0x47f2x9[_0x1bfe[1828]]+ 1;_0x47f2x14< _0x47f2x9[_0x1bfe[1827]]- 1;_0x47f2x14++){var _0x47f2x18=_0x47f2x9[_0x1bfe[730]](_0x47f2x14+ 1);_0x47f2x17== _0x47f2x18?(_0x47f2x15[_0x47f2x14- _0x47f2x9[_0x1bfe[1828]]- 1]= _0x47f2x17,_0x47f2xa++):this[_0x1bfe[1903]](_0x47f2x3,_0x47f2x9,_0x47f2x14+ 1,_0x47f2x17)?(_0x47f2x15[_0x47f2x14- _0x47f2x9[_0x1bfe[1828]]- 1]= _0x47f2x17,_0x47f2xa++):_0x47f2x17= _0x47f2x15[_0x47f2x14- _0x47f2x9[_0x1bfe[1828]]- 1]= _0x47f2x18};_0x47f2x17= _0x47f2x9[_0x1bfe[730]](_0x47f2x14);for(_0x47f2x14= _0x47f2x9[_0x1bfe[1827]]- 1;_0x47f2x14> _0x47f2x9[_0x1bfe[1828]]+ 1;_0x47f2x14--){_0x47f2x18= _0x47f2x9[_0x1bfe[730]](_0x47f2x14- 1),_0x47f2x17== _0x47f2x18?(_0x47f2x16[_0x47f2x14- _0x47f2x9[_0x1bfe[1828]]- 2]= _0x47f2x17,_0x47f2x12++):this[_0x1bfe[1903]](_0x47f2x3,_0x47f2x9,_0x47f2x14- 1,_0x47f2x17)?(_0x47f2x16[_0x47f2x14- _0x47f2x9[_0x1bfe[1828]]- 2]= _0x47f2x17,_0x47f2x12++):(_0x47f2x16[_0x47f2x14- _0x47f2x9[_0x1bfe[1828]]- 2]= _0x47f2x9[_0x1bfe[730]](_0x47f2x14- 1),_0x47f2x17= _0x47f2x18)};if(_0x47f2x12> _0x47f2x13|| _0x47f2xa> _0x47f2x13){if(_0x47f2x12>= _0x47f2xa){for(_0x47f2x14= _0x47f2x9[_0x1bfe[1827]]- 2;_0x47f2x14> _0x47f2x9[_0x1bfe[1828]];_0x47f2x14--){_0x47f2x9[_0x1bfe[1835]](_0x47f2x14,_0x47f2x16[_0x47f2x14- _0x47f2x9[_0x1bfe[1828]]- 1])}}else {if(_0x47f2xa> _0x47f2x12){for(_0x47f2x14= _0x47f2x9[_0x1bfe[1828]]+ 2;_0x47f2x14< _0x47f2x9[_0x1bfe[1827]];_0x47f2x14++){_0x47f2x9[_0x1bfe[1835]](_0x47f2x14,_0x47f2x15[_0x47f2x14- _0x47f2x9[_0x1bfe[1828]]- 2])}}}}}}}};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1903]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x2= _0x47f2x2[_0x1bfe[1850]][_0x47f2x4];for(var _0x47f2x9=-1,_0x47f2xa=0;_0x47f2xa< _0x47f2x2[_0x1bfe[67]];_0x47f2xa++){if(_0x47f2x3== _0x47f2x2[_0x47f2xa]){_0x47f2x9= _0x47f2xa;break}};if(0> _0x47f2x9){return !1};_0x47f2xa= _0x47f2x3[_0x1bfe[1833]](_0x47f2x4);if(_0x47f2x5< _0x47f2xa){if(0== _0x47f2x9){return !0};_0x47f2x2= _0x47f2x2[_0x47f2x9- 1];_0x47f2x4= _0x47f2x2[_0x1bfe[1833]](_0x47f2x4);_0x47f2x4= _0x47f2x4+ _0x47f2x2[_0x1bfe[117]]/ 2+ this[_0x1bfe[1868]]+ _0x47f2x3[_0x1bfe[117]]/ 2;if(!(_0x47f2x4<= _0x47f2x5)){return !1}}else {if(_0x47f2x5> _0x47f2xa){if(_0x47f2x9== _0x47f2x2[_0x1bfe[67]]- 1){return !0};_0x47f2x2= _0x47f2x2[_0x47f2x9+ 1];_0x47f2x4= _0x47f2x2[_0x1bfe[1833]](_0x47f2x4);_0x47f2x4= _0x47f2x4- _0x47f2x2[_0x1bfe[117]]/ 2- this[_0x1bfe[1868]]- _0x47f2x3[_0x1bfe[117]]/ 2;if(!(_0x47f2x4>= _0x47f2x5)){return !1}}};return !0};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1895]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1877]]= [];this[_0x1bfe[1878]]= [];for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x3[_0x1bfe[1850]][_0x1bfe[67]];_0x47f2x4++){this[_0x1bfe[1877]][_0x47f2x4]= Number[_0x1bfe[1904]],this[_0x1bfe[1878]][_0x47f2x4]= 0};_0x47f2x4= null;this[_0x1bfe[1759]][_0x1bfe[1735]]&& (_0x47f2x4= {});var _0x47f2x5=_0x47f2x3[_0x1bfe[1847]],_0x47f2x9=_0x47f2x3[_0x1bfe[1846]],_0x47f2xa;for(_0x47f2xa in _0x47f2x9){var _0x47f2x12=_0x47f2x9[_0x47f2xa];this[_0x1bfe[1725]](_0x47f2x12);if(this[_0x1bfe[1759]][_0x1bfe[1735]]){var _0x47f2x12=_0x47f2x2[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x12[_0x1bfe[246]]),_0x47f2x13=mxCellPath[_0x1bfe[385]](_0x47f2x12);null== _0x47f2x4[_0x47f2x13]&& (_0x47f2x4[_0x47f2x13]= _0x47f2x12)}};this[_0x1bfe[1759]][_0x1bfe[1735]]&& null!= _0x47f2x4&& this[_0x1bfe[1763]](_0x47f2x4);(this[_0x1bfe[675]]== mxHierarchicalEdgeStyle[_0x1bfe[1905]]|| this[_0x1bfe[675]]== mxHierarchicalEdgeStyle[_0x1bfe[1883]]|| this[_0x1bfe[675]]== mxHierarchicalEdgeStyle[_0x1bfe[1906]])&& this[_0x1bfe[1764]](_0x47f2x3);for(_0x47f2xa in _0x47f2x5){this[_0x1bfe[1907]](_0x47f2x5[_0x47f2xa])}};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1763]]= function(_0x47f2x2){var _0x47f2x3=[],_0x47f2x4;for(_0x47f2x4 in _0x47f2x2){_0x47f2x3[_0x1bfe[207]](_0x47f2x2[_0x47f2x4])};this[_0x1bfe[1759]][_0x1bfe[1727]](mxUtils[_0x1bfe[1779]](_0x47f2x3,!0),this[_0x1bfe[1745]])};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1764]]= function(_0x47f2x2){for(var _0x47f2x3=0;_0x47f2x3< _0x47f2x2[_0x1bfe[1850]][_0x1bfe[67]];_0x47f2x3++){for(var _0x47f2x4=_0x47f2x2[_0x1bfe[1850]][_0x47f2x3],_0x47f2x5=0;_0x47f2x5< _0x47f2x4[_0x1bfe[67]];_0x47f2x5++){var _0x47f2x9=_0x47f2x4[_0x47f2x5];if(_0x47f2x9[_0x1bfe[1193]]()){for(var _0x47f2xa=_0x47f2x9[_0x1bfe[1832]](_0x47f2x3),_0x47f2x12=_0x47f2x3- 1,_0x47f2x13=0;2> _0x47f2x13;_0x47f2x13++){if(-1< _0x47f2x12&& _0x47f2x12< _0x47f2x2[_0x1bfe[1850]][_0x1bfe[67]]&& null!= _0x47f2xa&& 0< _0x47f2xa[_0x1bfe[67]]){for(var _0x47f2x14=[],_0x47f2x15=0;_0x47f2x15< _0x47f2xa[_0x1bfe[67]];_0x47f2x15++){var _0x47f2x16= new WeightedCellSorter(_0x47f2xa[_0x47f2x15],_0x47f2xa[_0x47f2x15][_0x1bfe[730]](_0x47f2x12));_0x47f2x14[_0x1bfe[207]](_0x47f2x16)};_0x47f2x14[_0x1bfe[470]](WeightedCellSorter[_0x1bfe[202]][_0x1bfe[469]]);for(var _0x47f2x16=_0x47f2x9[_0x1bfe[235]][0]- _0x47f2x9[_0x1bfe[117]]/ 2,_0x47f2x17=_0x47f2x16+ _0x47f2x9[_0x1bfe[117]],_0x47f2x18=_0x47f2xa= 0,_0x47f2x12=[],_0x47f2x15=0;_0x47f2x15< _0x47f2x14[_0x1bfe[67]];_0x47f2x15++){var _0x47f2x19=_0x47f2x14[_0x47f2x15][_0x1bfe[246]],_0x47f2x1a;if(_0x47f2x19[_0x1bfe[1193]]()){_0x47f2x1a= 0== _0x47f2x13?_0x47f2x9[_0x1bfe[1838]]:_0x47f2x9[_0x1bfe[1837]];for(var _0x47f2x1b=0;_0x47f2x1b< _0x47f2x1a[_0x1bfe[67]];_0x47f2x1b++){if(_0x47f2x1a[_0x47f2x1b][_0x1bfe[1097]]== _0x47f2x19|| _0x47f2x1a[_0x47f2x1b][_0x1bfe[772]]== _0x47f2x19){_0x47f2xa+= _0x47f2x1a[_0x47f2x1b][_0x1bfe[1842]][_0x1bfe[67]],_0x47f2x18++,_0x47f2x12[_0x1bfe[207]](_0x47f2x1a[_0x47f2x1b])}}}else {_0x47f2xa+= _0x47f2x19[_0x1bfe[1842]][_0x1bfe[67]],_0x47f2x18++,_0x47f2x12[_0x1bfe[207]](_0x47f2x19)}};_0x47f2x9[_0x1bfe[117]]> (_0x47f2xa+ 1)* this[_0x1bfe[1751]]+ 2* this[_0x1bfe[1751]]&& (_0x47f2x16+= this[_0x1bfe[1751]],_0x47f2x17-= this[_0x1bfe[1751]]);_0x47f2x14= (_0x47f2x17- _0x47f2x16)/ _0x47f2xa;_0x47f2x16+= _0x47f2x14/ 2;_0x47f2x17= this[_0x1bfe[1753]]- this[_0x1bfe[1752]];for(_0x47f2x15= _0x47f2x18= 0;_0x47f2x15< _0x47f2x12[_0x1bfe[67]];_0x47f2x15++){_0x47f2x19= _0x47f2x12[_0x47f2x15][_0x1bfe[1842]][_0x1bfe[67]];_0x47f2x1b= mxCellPath[_0x1bfe[385]](_0x47f2x12[_0x47f2x15][_0x1bfe[1842]][0]);_0x47f2x1a= this[_0x1bfe[1873]][_0x47f2x1b];null== _0x47f2x1a&& (_0x47f2x1a= [],this[_0x1bfe[1873]][_0x47f2x1b]= _0x47f2x1a);_0x47f2x15< _0x47f2xa/ 2?_0x47f2x17+= this[_0x1bfe[1752]]:_0x47f2x15> _0x47f2xa/ 2&& (_0x47f2x17-= this[_0x1bfe[1752]]);for(_0x47f2x1b= 0;_0x47f2x1b< _0x47f2x19;_0x47f2x1b++){_0x47f2x1a[4* _0x47f2x1b+ 2* _0x47f2x13]= _0x47f2x16,_0x47f2x16+= _0x47f2x14,_0x47f2x1a[4* _0x47f2x1b+ 2* _0x47f2x13+ 1]= _0x47f2x17};_0x47f2x18= Math[_0x1bfe[160]](_0x47f2x18,_0x47f2x17)}};_0x47f2xa= _0x47f2x9[_0x1bfe[1831]](_0x47f2x3);_0x47f2x12= _0x47f2x3+ 1}}}}};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1907]]= function(_0x47f2x2){var _0x47f2x3=0;if(101207!= _0x47f2x2[_0x1bfe[1826]][0]){var _0x47f2x4=_0x47f2x2[_0x1bfe[1827]],_0x47f2x5=_0x47f2x2[_0x1bfe[1828]];_0x47f2x4== _0x47f2x5&& (_0x47f2x4= _0x47f2x2[_0x1bfe[1097]][_0x1bfe[1827]],_0x47f2x5= _0x47f2x2[_0x1bfe[772]][_0x1bfe[1828]]);for(var _0x47f2x9=0,_0x47f2xa=mxCellPath[_0x1bfe[385]](_0x47f2x2[_0x1bfe[1842]][0]),_0x47f2xa=this[_0x1bfe[1873]][_0x47f2xa],_0x47f2x12=_0x47f2x2[_0x1bfe[1843]]?_0x47f2x2[_0x1bfe[772]][_0x1bfe[246]]:_0x47f2x2[_0x1bfe[1097]][_0x1bfe[246]],_0x47f2x13=this[_0x1bfe[1759]][_0x1bfe[1179]],_0x47f2x14=0;_0x47f2x14< _0x47f2x2[_0x1bfe[1842]][_0x1bfe[67]];_0x47f2x14++){var _0x47f2x15=_0x47f2x2[_0x1bfe[1842]][_0x47f2x14],_0x47f2x16=this[_0x1bfe[1759]][_0x1bfe[1710]](_0x47f2x15,!0),_0x47f2x17=_0x47f2x13[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x15,!0),_0x47f2x18=[],_0x47f2x19=_0x47f2x2[_0x1bfe[1843]];_0x47f2x16!= _0x47f2x12&& (_0x47f2x19= !_0x47f2x19);if(null!= _0x47f2xa){var _0x47f2x1a=_0x47f2x19?2:0,_0x47f2x1b=_0x47f2x19?this[_0x1bfe[1877]][_0x47f2x5]:this[_0x1bfe[1878]][_0x47f2x4],_0x47f2x1c=_0x47f2xa[4* _0x47f2x9+ 1+ _0x47f2x1a];_0x47f2x19&& (_0x47f2x1c= -_0x47f2x1c);_0x47f2x1b+= _0x47f2x1c;_0x47f2x1a= _0x47f2xa[4* _0x47f2x9+ _0x47f2x1a];_0x47f2x17= _0x47f2x13[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x15,!0);this[_0x1bfe[1759]][_0x1bfe[1908]](_0x47f2x17)&& _0x47f2x13[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x17)== _0x47f2x16&& (_0x47f2x1a= _0x47f2x13[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x17),_0x47f2x1a= null!= _0x47f2x1a?_0x47f2x1a[_0x1bfe[235]]:_0x47f2x16[_0x1bfe[256]][_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[1097]][_0x1bfe[117]]* _0x47f2x17[_0x1bfe[256]][_0x1bfe[235]]);this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1358]]|| this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1354]]?(_0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x1a,_0x47f2x1b)),this[_0x1bfe[675]]== mxHierarchicalEdgeStyle[_0x1bfe[1906]]&& _0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x1a,_0x47f2x1b+ _0x47f2x1c))):(_0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x1b,_0x47f2x1a)),this[_0x1bfe[675]]== mxHierarchicalEdgeStyle[_0x1bfe[1906]]&& _0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x1b+ _0x47f2x1c,_0x47f2x1a)))};_0x47f2x1a= _0x47f2x2[_0x1bfe[235]][_0x1bfe[67]]- 1;_0x47f2x1b= _0x47f2x1c= -1;_0x47f2x16= _0x47f2x2[_0x1bfe[1827]]- 1;_0x47f2x19&& (_0x47f2x1a= 0,_0x47f2x1c= _0x47f2x2[_0x1bfe[235]][_0x1bfe[67]],_0x47f2x1b= 1,_0x47f2x16= _0x47f2x2[_0x1bfe[1828]]+ 1);for(;_0x47f2x2[_0x1bfe[1827]]!= _0x47f2x2[_0x1bfe[1828]]&& _0x47f2x1a!= _0x47f2x1c;_0x47f2x1a+= _0x47f2x1b){var _0x47f2x17=_0x47f2x2[_0x1bfe[235]][_0x47f2x1a]+ _0x47f2x3,_0x47f2x1d=(this[_0x1bfe[1877]][_0x47f2x16]+ this[_0x1bfe[1878]][_0x47f2x16+ 1])/ 2,_0x47f2x1e=(this[_0x1bfe[1877]][_0x47f2x16- 1]+ this[_0x1bfe[1878]][_0x47f2x16])/ 2;if(_0x47f2x19){var _0x47f2x1f=_0x47f2x1d,_0x47f2x1d=_0x47f2x1e,_0x47f2x1e=_0x47f2x1f};this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1358]]|| this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1354]]?(_0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x17,_0x47f2x1d)),_0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x17,_0x47f2x1e))):(_0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x1d,_0x47f2x17)),_0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x1e,_0x47f2x17)));this[_0x1bfe[1874]]= Math[_0x1bfe[160]](this[_0x1bfe[1874]],_0x47f2x17);_0x47f2x16+= _0x47f2x1b};null!= _0x47f2xa&& (_0x47f2x1a= _0x47f2x19?2:0,_0x47f2x1b= _0x47f2x19?this[_0x1bfe[1878]][_0x47f2x4]:this[_0x1bfe[1877]][_0x47f2x5],_0x47f2x1c= _0x47f2xa[4* _0x47f2x9+ 3- _0x47f2x1a],_0x47f2x19&& (_0x47f2x1c= -_0x47f2x1c),_0x47f2x1b-= _0x47f2x1c,_0x47f2x1a= _0x47f2xa[4* _0x47f2x9+ 2- _0x47f2x1a],_0x47f2x19= _0x47f2x13[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x15,!1),_0x47f2x16= this[_0x1bfe[1759]][_0x1bfe[1710]](_0x47f2x15,!1),this[_0x1bfe[1759]][_0x1bfe[1908]](_0x47f2x19)&& _0x47f2x13[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x19)== _0x47f2x16&& (_0x47f2x1a= _0x47f2x13[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x19),_0x47f2x1a= null!= _0x47f2x1a?_0x47f2x1a[_0x1bfe[235]]:_0x47f2x16[_0x1bfe[256]][_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[772]][_0x1bfe[117]]* _0x47f2x19[_0x1bfe[256]][_0x1bfe[235]]),this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1358]]|| this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1354]]?(this[_0x1bfe[675]]== mxHierarchicalEdgeStyle[_0x1bfe[1906]]&& _0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x1a,_0x47f2x1b- _0x47f2x1c)),_0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x1a,_0x47f2x1b))):(this[_0x1bfe[675]]== mxHierarchicalEdgeStyle[_0x1bfe[1906]]&& _0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x1b- _0x47f2x1c,_0x47f2x1a)),_0x47f2x18[_0x1bfe[207]]( new mxPoint(_0x47f2x1b,_0x47f2x1a))));_0x47f2x2[_0x1bfe[1843]]&& this[_0x1bfe[1909]](_0x47f2x2,_0x47f2x15);this[_0x1bfe[1759]][_0x1bfe[1722]](_0x47f2x15,_0x47f2x18);_0x47f2x3= 0== _0x47f2x3?this[_0x1bfe[1872]]:0< _0x47f2x3?-_0x47f2x3:-_0x47f2x3+ this[_0x1bfe[1872]];_0x47f2x9++};_0x47f2x2[_0x1bfe[1826]][0]= 101207}};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1725]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[246]],_0x47f2x4=_0x47f2x2[_0x1bfe[235]][0]- _0x47f2x2[_0x1bfe[117]]/ 2,_0x47f2x5=_0x47f2x2[_0x1bfe[236]][0]- _0x47f2x2[_0x1bfe[119]]/ 2;this[_0x1bfe[1877]][_0x47f2x2[_0x1bfe[1828]]]= Math[_0x1bfe[243]](this[_0x1bfe[1877]][_0x47f2x2[_0x1bfe[1828]]],_0x47f2x5);this[_0x1bfe[1878]][_0x47f2x2[_0x1bfe[1828]]]= Math[_0x1bfe[160]](this[_0x1bfe[1878]][_0x47f2x2[_0x1bfe[1828]]],_0x47f2x5+ _0x47f2x2[_0x1bfe[119]]);this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1358]]|| this[_0x1bfe[1870]]== mxConstants[_0x1bfe[1354]]?this[_0x1bfe[1759]][_0x1bfe[1725]](_0x47f2x3,_0x47f2x4,_0x47f2x5):this[_0x1bfe[1759]][_0x1bfe[1725]](_0x47f2x3,_0x47f2x5,_0x47f2x4);this[_0x1bfe[1874]]= Math[_0x1bfe[160]](this[_0x1bfe[1874]],_0x47f2x4+ _0x47f2x2[_0x1bfe[117]])};mxCoordinateAssignment[_0x1bfe[202]][_0x1bfe[1909]]= function(_0x47f2x2,_0x47f2x3){};function WeightedCellSorter(_0x47f2x2,_0x47f2x3){this[_0x1bfe[246]]= _0x47f2x2;this[_0x1bfe[1782]]= _0x47f2x3}WeightedCellSorter[_0x1bfe[202]][_0x1bfe[1782]]= 0;WeightedCellSorter[_0x1bfe[202]][_0x1bfe[1783]]= !1;WeightedCellSorter[_0x1bfe[202]][_0x1bfe[1784]]= !1;WeightedCellSorter[_0x1bfe[202]][_0x1bfe[1785]]= null;WeightedCellSorter[_0x1bfe[202]][_0x1bfe[246]]= null;WeightedCellSorter[_0x1bfe[202]][_0x1bfe[469]]= function(_0x47f2x2,_0x47f2x3){return null!= _0x47f2x2&& null!= _0x47f2x3?_0x47f2x3[_0x1bfe[1782]]> _0x47f2x2[_0x1bfe[1782]]?-1:_0x47f2x3[_0x1bfe[1782]]< _0x47f2x2[_0x1bfe[1782]]?1:_0x47f2x3[_0x1bfe[1783]]?-1:1:0};function mxHierarchicalLayout(_0x47f2x2,_0x47f2x3,_0x47f2x4){mxGraphLayout[_0x1bfe[239]](this,_0x47f2x2);this[_0x1bfe[1870]]= null!= _0x47f2x3?_0x47f2x3:mxConstants[_0x1bfe[1358]];this[_0x1bfe[1910]]= null!= _0x47f2x4?_0x47f2x4:!0}mxHierarchicalLayout[_0x1bfe[202]]= new mxGraphLayout;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[196]]= mxHierarchicalLayout;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1845]]= null;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1735]]= !1;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1911]]= !1;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1912]]= 0;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1868]]= 30;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1869]]= 100;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1913]]= 60;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1872]]= 10;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1870]]= mxConstants[_0x1bfe[1358]];mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1882]]= !0;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1844]]= !0;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1787]]= !0;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1914]]= !0;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[251]]= null;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1915]]= null;mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[502]]= function(){return this[_0x1bfe[251]]};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1101]]= _0x47f2x2;var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[251]];this[_0x1bfe[1915]]= {};if(!(null== _0x47f2x3&& null== _0x47f2x2)){if(null!= _0x47f2x3&& null!= _0x47f2x2){for(var _0x47f2x5=[],_0x47f2x9=0;_0x47f2x9< _0x47f2x3[_0x1bfe[67]];_0x47f2x9++){_0x47f2x4[_0x1bfe[1720]](_0x47f2x2,_0x47f2x3[_0x47f2x9])&& _0x47f2x5[_0x1bfe[207]](_0x47f2x3[_0x47f2x9])};this[_0x1bfe[1845]]= _0x47f2x5}else {this[_0x1bfe[1845]]= _0x47f2x3};_0x47f2x4[_0x1bfe[473]]();try{this[_0x1bfe[1916]](_0x47f2x2),this[_0x1bfe[1735]]&& !this[_0x1bfe[1179]][_0x1bfe[1742]](_0x47f2x2)&& this[_0x1bfe[1179]][_0x1bfe[1917]]([_0x47f2x2],this[_0x1bfe[1912]],this[_0x1bfe[1911]])}finally{_0x47f2x4[_0x1bfe[476]]()}}};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1918]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=[];if(null!= _0x47f2x2&& null!= _0x47f2x3){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[251]],_0x47f2x9=null,_0x47f2xa=-1E5,_0x47f2x12;for(_0x47f2x12 in _0x47f2x3){var _0x47f2x13=_0x47f2x3[_0x47f2x12];if(_0x47f2x5[_0x1bfe[1193]](_0x47f2x13)&& this[_0x1bfe[1179]][_0x1bfe[1714]](_0x47f2x13)){for(var _0x47f2x14=this[_0x1bfe[264]](_0x47f2x13),_0x47f2x15=0,_0x47f2x16=0,_0x47f2x17=0;_0x47f2x17< _0x47f2x14[_0x1bfe[67]];_0x47f2x17++){this[_0x1bfe[1710]](_0x47f2x14[_0x47f2x17],!0)== _0x47f2x13?_0x47f2x15++:_0x47f2x16++};0== _0x47f2x16&& 0< _0x47f2x15&& _0x47f2x4[_0x1bfe[207]](_0x47f2x13);_0x47f2x14= _0x47f2x15- _0x47f2x16;_0x47f2x14> _0x47f2xa&& (_0x47f2xa= _0x47f2x14,_0x47f2x9= _0x47f2x13)}};0== _0x47f2x4[_0x1bfe[67]]&& null!= _0x47f2x9&& _0x47f2x4[_0x1bfe[207]](_0x47f2x9)};return _0x47f2x4};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[264]]= function(_0x47f2x2){var _0x47f2x3=mxCellPath[_0x1bfe[385]](_0x47f2x2);if(null!= this[_0x1bfe[1915]][_0x47f2x3]){return this[_0x1bfe[1915]][_0x47f2x3]};for(var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[251]],_0x47f2x5=[],_0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[1742]](_0x47f2x2),_0x47f2xa=_0x47f2x4[_0x1bfe[262]](_0x47f2x2),_0x47f2x12=0;_0x47f2x12< _0x47f2xa;_0x47f2x12++){var _0x47f2x13=_0x47f2x4[_0x1bfe[263]](_0x47f2x2,_0x47f2x12);if(this[_0x1bfe[1908]](_0x47f2x13)){_0x47f2x5= _0x47f2x5[_0x1bfe[1919]](_0x47f2x4[_0x1bfe[264]](_0x47f2x13,!0,!0))}else {if(_0x47f2x9|| !this[_0x1bfe[1179]][_0x1bfe[1714]](_0x47f2x13)){_0x47f2x5= _0x47f2x5[_0x1bfe[1919]](_0x47f2x4[_0x1bfe[264]](_0x47f2x13,!0,!0))}}};_0x47f2x5= _0x47f2x5[_0x1bfe[1919]](_0x47f2x4[_0x1bfe[264]](_0x47f2x2,!0,!0));_0x47f2x4= [];for(_0x47f2x12= 0;_0x47f2x12< _0x47f2x5[_0x1bfe[67]];_0x47f2x12++){_0x47f2x9= this[_0x1bfe[1710]](_0x47f2x5[_0x47f2x12],!0),_0x47f2xa= this[_0x1bfe[1710]](_0x47f2x5[_0x47f2x12],!1),(_0x47f2x9== _0x47f2xa|| _0x47f2x9!= _0x47f2xa&& (_0x47f2xa== _0x47f2x2&& (null== this[_0x1bfe[1101]]|| this[_0x1bfe[1179]][_0x1bfe[1920]](_0x47f2x9,this[_0x1bfe[1101]],this[_0x1bfe[1914]]))|| _0x47f2x9== _0x47f2x2&& (null== this[_0x1bfe[1101]]|| this[_0x1bfe[1179]][_0x1bfe[1920]](_0x47f2xa,this[_0x1bfe[1101]],this[_0x1bfe[1914]]))))&& _0x47f2x4[_0x1bfe[207]](_0x47f2x5[_0x47f2x12])};return this[_0x1bfe[1915]][_0x47f2x3]= _0x47f2x4};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1710]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2),_0x47f2x4=null!= _0x47f2x4?_0x47f2x4[_0x1bfe[1710]](_0x47f2x3):this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[1710]](_0x47f2x2,_0x47f2x3);this[_0x1bfe[1908]](_0x47f2x4)&& (_0x47f2x4= this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x4));return _0x47f2x4};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1916]]= function(_0x47f2x2){var _0x47f2x3=[],_0x47f2x4=[];if(null== this[_0x1bfe[1845]]&& null!= _0x47f2x2){var _0x47f2x5={};this[_0x1bfe[1921]](_0x47f2x2,_0x47f2x5);this[_0x1bfe[1845]]= [];var _0x47f2x9=!0,_0x47f2xa;for(_0x47f2xa in _0x47f2x5){if(null!= _0x47f2x5[_0x47f2xa]){_0x47f2x9= !1;break}};for(;!_0x47f2x9;){for(var _0x47f2x12=this[_0x1bfe[1918]](_0x47f2x2,_0x47f2x5),_0x47f2x9=0;_0x47f2x9< _0x47f2x12[_0x1bfe[67]];_0x47f2x9++){var _0x47f2x13=[];_0x47f2x3[_0x1bfe[207]](_0x47f2x13);this[_0x1bfe[1706]](_0x47f2x12[_0x47f2x9],!0,null,_0x47f2x4,_0x47f2x13,_0x47f2x3,_0x47f2x5)};for(_0x47f2x9= 0;_0x47f2x9< _0x47f2x12[_0x1bfe[67]];_0x47f2x9++){this[_0x1bfe[1845]][_0x1bfe[207]](_0x47f2x12[_0x47f2x9])};_0x47f2x9= !0;for(_0x47f2xa in _0x47f2x5){if(null!= _0x47f2x5[_0x47f2xa]){_0x47f2x9= !1;break}}}}else {for(_0x47f2x9= 0;_0x47f2x9< roots[_0x1bfe[67]];_0x47f2x9++){_0x47f2x13= [],_0x47f2x3[_0x1bfe[207]](_0x47f2x13),traverse(roots[_0x1bfe[203]](_0x47f2x9),!0,null,_0x47f2x4,_0x47f2x13,_0x47f2x3,null)}};for(_0x47f2x9= _0x47f2x4= 0;_0x47f2x9< _0x47f2x3[_0x1bfe[67]];_0x47f2x9++){_0x47f2x13= _0x47f2x3[_0x47f2x9];_0x47f2x5= [];for(_0x47f2xa in _0x47f2x13){_0x47f2x5[_0x1bfe[207]](_0x47f2x13[_0x47f2xa])};this[_0x1bfe[251]]= new mxGraphHierarchyModel(this,_0x47f2x5,this[_0x1bfe[1845]],_0x47f2x2,this[_0x1bfe[1844]]);this[_0x1bfe[1922]](_0x47f2x2);this[_0x1bfe[1923]]();this[_0x1bfe[1924]](_0x47f2x2);_0x47f2x4= this[_0x1bfe[1925]](_0x47f2x4,_0x47f2x2)}};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1921]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[251]];_0x47f2x4[_0x1bfe[1193]](_0x47f2x2)&& (_0x47f2x2!= this[_0x1bfe[1101]]&& this[_0x1bfe[1179]][_0x1bfe[1714]](_0x47f2x2))&& (_0x47f2x3[mxCellPath[_0x1bfe[385]](_0x47f2x2)]= _0x47f2x2);if(this[_0x1bfe[1914]]|| _0x47f2x2== this[_0x1bfe[1101]]&& this[_0x1bfe[1179]][_0x1bfe[1714]](_0x47f2x2)){for(var _0x47f2x5=_0x47f2x4[_0x1bfe[262]](_0x47f2x2),_0x47f2x9=0;_0x47f2x9< _0x47f2x5;_0x47f2x9++){var _0x47f2xa=_0x47f2x4[_0x1bfe[263]](_0x47f2x2,_0x47f2x9);this[_0x1bfe[1908]](_0x47f2xa)|| this[_0x1bfe[1921]](_0x47f2xa,_0x47f2x3)}}};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1908]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[256]][_0x1bfe[1500]]?!0:!1};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1781]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!1;for(var _0x47f2x5=this[_0x1bfe[264]](_0x47f2x2),_0x47f2x9=[],_0x47f2xa=0;_0x47f2xa< _0x47f2x5[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=this[_0x1bfe[1710]](_0x47f2x5[_0x47f2xa],!0),_0x47f2x13=this[_0x1bfe[1710]](_0x47f2x5[_0x47f2xa],!1);(_0x47f2x12== _0x47f2x2&& _0x47f2x13== _0x47f2x3|| !_0x47f2x4&& _0x47f2x12== _0x47f2x3&& _0x47f2x13== _0x47f2x2)&& _0x47f2x9[_0x1bfe[207]](_0x47f2x5[_0x47f2xa])};return _0x47f2x9};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1706]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12){if(null!= _0x47f2x2&& null!= _0x47f2x5){var _0x47f2x13=mxCellPath[_0x1bfe[385]](_0x47f2x2);if(null== _0x47f2x5[_0x47f2x13]&& (null== _0x47f2x12|| null!= _0x47f2x12[_0x47f2x13])){null== _0x47f2x9[_0x47f2x13]&& (_0x47f2x9[_0x47f2x13]= _0x47f2x2);null== _0x47f2x5[_0x47f2x13]&& (_0x47f2x5[_0x47f2x13]= _0x47f2x2);delete _0x47f2x12[_0x47f2x13];var _0x47f2x14=this[_0x1bfe[264]](_0x47f2x2);for(_0x47f2x4= 0;_0x47f2x4< _0x47f2x14[_0x1bfe[67]];_0x47f2x4++){if(_0x47f2x13= this[_0x1bfe[1710]](_0x47f2x14[_0x47f2x4],!0)== _0x47f2x2,!_0x47f2x3|| _0x47f2x13){_0x47f2x13= this[_0x1bfe[1710]](_0x47f2x14[_0x47f2x4],!_0x47f2x13),_0x47f2x9= this[_0x1bfe[1706]](_0x47f2x13,_0x47f2x3,_0x47f2x14[_0x47f2x4],_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12)}}}else {if(null== _0x47f2x9[_0x47f2x13]){for(_0x47f2x4= 0;_0x47f2x4< _0x47f2xa[_0x1bfe[67]];_0x47f2x4++){if(_0x47f2x2= _0x47f2xa[_0x47f2x4],null!= _0x47f2x2[_0x47f2x13]){for(_0x47f2x14 in _0x47f2x9){_0x47f2x2[_0x47f2x14]= _0x47f2x9[_0x47f2x14]};_0x47f2xa[_0x1bfe[1242]]();return _0x47f2x2}}}}};return _0x47f2x9};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1922]]= function(_0x47f2x2){( new mxMinimumCycleRemover(this))[_0x1bfe[350]](_0x47f2x2)};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1923]]= function(){this[_0x1bfe[251]][_0x1bfe[1852]]();this[_0x1bfe[251]][_0x1bfe[1854]]()};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1924]]= function(_0x47f2x2){( new mxMedianHybridCrossingReduction(this))[_0x1bfe[350]](_0x47f2x2)};mxHierarchicalLayout[_0x1bfe[202]][_0x1bfe[1925]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4= new mxCoordinateAssignment(this,this[_0x1bfe[1868]],this[_0x1bfe[1869]],this[_0x1bfe[1870]],_0x47f2x2,this[_0x1bfe[1872]]);_0x47f2x4[_0x1bfe[1882]]= this[_0x1bfe[1882]];_0x47f2x4[_0x1bfe[350]](_0x47f2x3);return _0x47f2x4[_0x1bfe[1874]]+ this[_0x1bfe[1913]]};function mxGraphModel(_0x47f2x2){this[_0x1bfe[1926]]= this[_0x1bfe[1096]]();null!= _0x47f2x2?this[_0x1bfe[1927]](_0x47f2x2):this[_0x1bfe[200]]()}mxGraphModel[_0x1bfe[202]]= new mxEventSource;mxGraphModel[_0x1bfe[202]][_0x1bfe[196]]= mxGraphModel;mxGraphModel[_0x1bfe[202]][_0x1bfe[813]]= null;mxGraphModel[_0x1bfe[202]][_0x1bfe[895]]= null;mxGraphModel[_0x1bfe[202]][_0x1bfe[1928]]= !0;mxGraphModel[_0x1bfe[202]][_0x1bfe[1929]]= !0;mxGraphModel[_0x1bfe[202]][_0x1bfe[1089]]= _0x1bfe[110];mxGraphModel[_0x1bfe[202]][_0x1bfe[1930]]= _0x1bfe[110];mxGraphModel[_0x1bfe[202]][_0x1bfe[1931]]= 0;mxGraphModel[_0x1bfe[202]][_0x1bfe[1926]]= null;mxGraphModel[_0x1bfe[202]][_0x1bfe[1932]]= 0;mxGraphModel[_0x1bfe[202]][_0x1bfe[1933]]= !1;mxGraphModel[_0x1bfe[202]][_0x1bfe[200]]= function(){this[_0x1bfe[1927]](this[_0x1bfe[1934]]())};mxGraphModel[_0x1bfe[202]][_0x1bfe[1935]]= function(){return this[_0x1bfe[1929]]};mxGraphModel[_0x1bfe[202]][_0x1bfe[1936]]= function(_0x47f2x2){this[_0x1bfe[1929]]= _0x47f2x2};mxGraphModel[_0x1bfe[202]][_0x1bfe[1934]]= function(){var _0x47f2x2= new mxCell;_0x47f2x2[_0x1bfe[1937]]( new mxCell);return _0x47f2x2};mxGraphModel[_0x1bfe[202]][_0x1bfe[736]]= function(_0x47f2x2){return null!= this[_0x1bfe[895]]?this[_0x1bfe[895]][_0x47f2x2]:null};mxGraphModel[_0x1bfe[202]][_0x1bfe[1938]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=null;if(null!= _0x47f2x2){for(var _0x47f2x4=[],_0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){_0x47f2x3(_0x47f2x2[_0x47f2x5])&& _0x47f2x4[_0x1bfe[207]](_0x47f2x2[_0x47f2x5])}};return _0x47f2x4};mxGraphModel[_0x1bfe[202]][_0x1bfe[1939]]= function(_0x47f2x2){return this[_0x1bfe[1921]](null,_0x47f2x2)};mxGraphModel[_0x1bfe[202]][_0x1bfe[1921]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=[];_0x47f2x3= _0x47f2x3|| this[_0x1bfe[501]]();(null== _0x47f2x2|| _0x47f2x2(_0x47f2x3))&& _0x47f2x4[_0x1bfe[207]](_0x47f2x3);for(var _0x47f2x5=this[_0x1bfe[262]](_0x47f2x3),_0x47f2x9=0;_0x47f2x9< _0x47f2x5;_0x47f2x9++){var _0x47f2xa=this[_0x1bfe[263]](_0x47f2x3,_0x47f2x9),_0x47f2x4=_0x47f2x4[_0x1bfe[1919]](this[_0x1bfe[1921]](_0x47f2x2,_0x47f2xa))};return _0x47f2x4};mxGraphModel[_0x1bfe[202]][_0x1bfe[501]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2|| this[_0x1bfe[813]];if(null!= _0x47f2x2){for(;null!= _0x47f2x2;){_0x47f2x3= _0x47f2x2,_0x47f2x2= this[_0x1bfe[1197]](_0x47f2x2)}};return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1927]]= function(_0x47f2x2){this[_0x1bfe[350]]( new mxRootChange(this,_0x47f2x2));return _0x47f2x2};mxGraphModel[_0x1bfe[202]][_0x1bfe[1940]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[813]];this[_0x1bfe[813]]= _0x47f2x2;this[_0x1bfe[1931]]= 0;this[_0x1bfe[895]]= null;this[_0x1bfe[1941]](_0x47f2x2);return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1942]]= function(_0x47f2x2){return null!= _0x47f2x2&& this[_0x1bfe[813]]== _0x47f2x2};mxGraphModel[_0x1bfe[202]][_0x1bfe[1740]]= function(_0x47f2x2){return this[_0x1bfe[1942]](this[_0x1bfe[1197]](_0x47f2x2))};mxGraphModel[_0x1bfe[202]][_0x1bfe[1720]]= function(_0x47f2x2,_0x47f2x3){for(;null!= _0x47f2x3&& _0x47f2x3!= _0x47f2x2;){_0x47f2x3= this[_0x1bfe[1197]](_0x47f2x3)};return _0x47f2x3== _0x47f2x2};mxGraphModel[_0x1bfe[202]][_0x1bfe[442]]= function(_0x47f2x2){return this[_0x1bfe[1720]](this[_0x1bfe[813]],_0x47f2x2)};mxGraphModel[_0x1bfe[202]][_0x1bfe[1197]]= function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[1197]]():null};mxGraphModel[_0x1bfe[202]][_0x1bfe[99]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(_0x47f2x3!= _0x47f2x2&& null!= _0x47f2x2&& null!= _0x47f2x3){null== _0x47f2x4&& (_0x47f2x4= this[_0x1bfe[262]](_0x47f2x2));var _0x47f2x5=_0x47f2x2!= this[_0x1bfe[1197]](_0x47f2x3);this[_0x1bfe[350]]( new mxChildChange(this,_0x47f2x2,_0x47f2x3,_0x47f2x4));this[_0x1bfe[1928]]&& _0x47f2x5&& this[_0x1bfe[1943]](_0x47f2x3)};return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1941]]= function(_0x47f2x2){if(null!= _0x47f2x2){null== _0x47f2x2[_0x1bfe[1103]]()&& this[_0x1bfe[1929]]&& _0x47f2x2[_0x1bfe[1945]](this[_0x1bfe[1944]](_0x47f2x2));if(null!= _0x47f2x2[_0x1bfe[1103]]()){var _0x47f2x3=this[_0x1bfe[736]](_0x47f2x2[_0x1bfe[1103]]());if(_0x47f2x3!= _0x47f2x2){for(;null!= _0x47f2x3;){_0x47f2x2[_0x1bfe[1945]](this[_0x1bfe[1944]](_0x47f2x2)),_0x47f2x3= this[_0x1bfe[736]](_0x47f2x2[_0x1bfe[1103]]())};null== this[_0x1bfe[895]]&& (this[_0x1bfe[895]]= {});this[_0x1bfe[895]][_0x47f2x2[_0x1bfe[1103]]()]= _0x47f2x2}};mxUtils[_0x1bfe[1946]](_0x47f2x2[_0x1bfe[1103]]())&& (this[_0x1bfe[1931]]= Math[_0x1bfe[160]](this[_0x1bfe[1931]],_0x47f2x2[_0x1bfe[1103]]()));for(var _0x47f2x3=this[_0x1bfe[262]](_0x47f2x2),_0x47f2x4=0;_0x47f2x4< _0x47f2x3;_0x47f2x4++){this[_0x1bfe[1941]](this[_0x1bfe[263]](_0x47f2x2,_0x47f2x4))}}};mxGraphModel[_0x1bfe[202]][_0x1bfe[1944]]= function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[1931]];this[_0x1bfe[1931]]++;return this[_0x1bfe[1089]]+ _0x47f2x2+ this[_0x1bfe[1930]]};mxGraphModel[_0x1bfe[202]][_0x1bfe[1943]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= _0x47f2x3|| this[_0x1bfe[501]](_0x47f2x2);for(var _0x47f2x4=this[_0x1bfe[262]](_0x47f2x2),_0x47f2x5=0;_0x47f2x5< _0x47f2x4;_0x47f2x5++){var _0x47f2x9=this[_0x1bfe[263]](_0x47f2x2,_0x47f2x5);this[_0x1bfe[1943]](_0x47f2x9,_0x47f2x3)};_0x47f2x9= this[_0x1bfe[1707]](_0x47f2x2);_0x47f2x4= [];for(_0x47f2x5= 0;_0x47f2x5< _0x47f2x9;_0x47f2x5++){_0x47f2x4[_0x1bfe[207]](this[_0x1bfe[1708]](_0x47f2x2,_0x47f2x5))};for(_0x47f2x5= 0;_0x47f2x5< _0x47f2x4[_0x1bfe[67]];_0x47f2x5++){_0x47f2x9= _0x47f2x4[_0x47f2x5],this[_0x1bfe[1720]](_0x47f2x3,_0x47f2x9)&& this[_0x1bfe[1947]](_0x47f2x9,_0x47f2x3)}};mxGraphModel[_0x1bfe[202]][_0x1bfe[1947]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=this[_0x1bfe[1709]](_0x47f2x2,!0),_0x47f2x5=this[_0x1bfe[1709]](_0x47f2x2,!1),_0x47f2x9=null;null!= _0x47f2x4&& !this[_0x1bfe[250]](_0x47f2x4)&& null!= _0x47f2x4[_0x1bfe[256]]&& _0x47f2x4[_0x1bfe[256]][_0x1bfe[1500]];){_0x47f2x4= this[_0x1bfe[1197]](_0x47f2x4)};for(;null!= _0x47f2x5&& !this[_0x1bfe[250]](_0x47f2x5)&& null!= _0x47f2x5[_0x1bfe[256]]&& _0x47f2x5[_0x1bfe[256]][_0x1bfe[1500]];){_0x47f2x5= this[_0x1bfe[1197]](_0x47f2x5)};if(this[_0x1bfe[1720]](_0x47f2x3,_0x47f2x4)&& this[_0x1bfe[1720]](_0x47f2x3,_0x47f2x5)&& (_0x47f2x9= _0x47f2x4== _0x47f2x5?this[_0x1bfe[1197]](_0x47f2x4):this[_0x1bfe[1948]](_0x47f2x4,_0x47f2x5),null!= _0x47f2x9&& (this[_0x1bfe[1197]](_0x47f2x9)!= this[_0x1bfe[813]]|| this[_0x1bfe[1720]](_0x47f2x9,_0x47f2x2))&& this[_0x1bfe[1197]](_0x47f2x2)!= _0x47f2x9)){_0x47f2x4= this[_0x1bfe[1721]](_0x47f2x2);if(null!= _0x47f2x4){var _0x47f2xa=this[_0x1bfe[1949]](this[_0x1bfe[1197]](_0x47f2x2)),_0x47f2x12=this[_0x1bfe[1949]](_0x47f2x9),_0x47f2x5=_0x47f2x12[_0x1bfe[235]]- _0x47f2xa[_0x1bfe[235]],_0x47f2xa=_0x47f2x12[_0x1bfe[236]]- _0x47f2xa[_0x1bfe[236]],_0x47f2x4=_0x47f2x4[_0x1bfe[238]]();_0x47f2x4[_0x1bfe[513]](-_0x47f2x5,-_0x47f2xa);this[_0x1bfe[1724]](_0x47f2x2,_0x47f2x4)};this[_0x1bfe[99]](_0x47f2x9,_0x47f2x2,this[_0x1bfe[262]](_0x47f2x9))}};mxGraphModel[_0x1bfe[202]][_0x1bfe[1949]]= function(_0x47f2x2){var _0x47f2x3=null;null!= _0x47f2x2?(_0x47f2x3= this[_0x1bfe[1949]](this[_0x1bfe[1197]](_0x47f2x2)),this[_0x1bfe[250]](_0x47f2x2)|| (_0x47f2x2= this[_0x1bfe[1721]](_0x47f2x2),null!= _0x47f2x2&& (_0x47f2x3[_0x1bfe[235]]+= _0x47f2x2[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]]+= _0x47f2x2[_0x1bfe[236]]))):_0x47f2x3= new mxPoint;return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1948]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2&& null!= _0x47f2x3){var _0x47f2x4=mxCellPath[_0x1bfe[385]](_0x47f2x3);if(null!= _0x47f2x4&& 0< _0x47f2x4[_0x1bfe[67]]){var _0x47f2x5=_0x47f2x2,_0x47f2x9=mxCellPath[_0x1bfe[385]](_0x47f2x5);if(_0x47f2x4[_0x1bfe[67]]< _0x47f2x9[_0x1bfe[67]]){var _0x47f2x5=_0x47f2x3,_0x47f2xa=_0x47f2x9,_0x47f2x9=_0x47f2x4,_0x47f2x4=_0x47f2xa};for(;null!= _0x47f2x5;){_0x47f2xa= this[_0x1bfe[1197]](_0x47f2x5);if(0== _0x47f2x4[_0x1bfe[2]](_0x47f2x9+ mxCellPath[_0x1bfe[1950]])&& null!= _0x47f2xa){return _0x47f2x5};_0x47f2x9= mxCellPath[_0x1bfe[1951]](_0x47f2x9);_0x47f2x5= _0x47f2xa}}};return null};mxGraphModel[_0x1bfe[202]][_0x1bfe[205]]= function(_0x47f2x2){_0x47f2x2== this[_0x1bfe[813]]?this[_0x1bfe[1927]](null):null!= this[_0x1bfe[1197]](_0x47f2x2)&& this[_0x1bfe[350]]( new mxChildChange(this,null,_0x47f2x2));return _0x47f2x2};mxGraphModel[_0x1bfe[202]][_0x1bfe[1102]]= function(_0x47f2x2){if(null!= _0x47f2x2&& null!= this[_0x1bfe[895]]){for(var _0x47f2x3=this[_0x1bfe[262]](_0x47f2x2)- 1;0<= _0x47f2x3;_0x47f2x3--){this[_0x1bfe[1102]](this[_0x1bfe[263]](_0x47f2x2,_0x47f2x3))};null!= this[_0x1bfe[895]]&& null!= _0x47f2x2[_0x1bfe[1103]]()&& delete this[_0x1bfe[895]][_0x47f2x2[_0x1bfe[1103]]()]}};mxGraphModel[_0x1bfe[202]][_0x1bfe[1952]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1197]](_0x47f2x2);null!= _0x47f2x3?(_0x47f2x3!= _0x47f2x5|| _0x47f2x5[_0x1bfe[1738]](_0x47f2x2)!= _0x47f2x4)&& _0x47f2x3[_0x1bfe[1937]](_0x47f2x2,_0x47f2x4):null!= _0x47f2x5&& (_0x47f2x4= _0x47f2x5[_0x1bfe[1738]](_0x47f2x2),_0x47f2x5[_0x1bfe[205]](_0x47f2x4));!this[_0x1bfe[442]](_0x47f2x5)&& null!= _0x47f2x3?this[_0x1bfe[1941]](_0x47f2x2):null== _0x47f2x3&& this[_0x1bfe[1102]](_0x47f2x2);return _0x47f2x5};mxGraphModel[_0x1bfe[202]][_0x1bfe[262]]= function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[262]]():0};mxGraphModel[_0x1bfe[202]][_0x1bfe[263]]= function(_0x47f2x2,_0x47f2x3){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[263]](_0x47f2x3):null};mxGraphModel[_0x1bfe[202]][_0x1bfe[1953]]= function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[1954]]:null};mxGraphModel[_0x1bfe[202]][_0x1bfe[1728]]= function(_0x47f2x2){return this[_0x1bfe[1955]](_0x47f2x2,!0,!1)};mxGraphModel[_0x1bfe[202]][_0x1bfe[1956]]= function(_0x47f2x2){return this[_0x1bfe[1955]](_0x47f2x2,!1,!0)};mxGraphModel[_0x1bfe[202]][_0x1bfe[1955]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!1;_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!1;for(var _0x47f2x5=this[_0x1bfe[262]](_0x47f2x2),_0x47f2x9=[],_0x47f2xa=0;_0x47f2xa< _0x47f2x5;_0x47f2xa++){var _0x47f2x12=this[_0x1bfe[263]](_0x47f2x2,_0x47f2xa);(!_0x47f2x4&& !_0x47f2x3|| _0x47f2x4&& this[_0x1bfe[250]](_0x47f2x12)|| _0x47f2x3&& this[_0x1bfe[1193]](_0x47f2x12)) && _0x47f2x9[_0x1bfe[207]](_0x47f2x12)};return _0x47f2x9};mxGraphModel[_0x1bfe[202]][_0x1bfe[1709]]= function(_0x47f2x2,_0x47f2x3){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[1709]](_0x47f2x3):null};mxGraphModel[_0x1bfe[202]][_0x1bfe[1957]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=_0x47f2x3!= this[_0x1bfe[1709]](_0x47f2x2,_0x47f2x4);this[_0x1bfe[350]]( new mxTerminalChange(this,_0x47f2x2,_0x47f2x3,_0x47f2x4));this[_0x1bfe[1928]]&& _0x47f2x5&& this[_0x1bfe[1947]](_0x47f2x2,this[_0x1bfe[501]]());return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1958]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[473]]();try{this[_0x1bfe[1957]](_0x47f2x2,_0x47f2x3,!0),this[_0x1bfe[1957]](_0x47f2x2,_0x47f2x4,!1)}finally{this[_0x1bfe[476]]()}};mxGraphModel[_0x1bfe[202]][_0x1bfe[1959]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1709]](_0x47f2x2,_0x47f2x4);null!= _0x47f2x3?_0x47f2x3[_0x1bfe[1960]](_0x47f2x2,_0x47f2x4):null!= _0x47f2x5&& _0x47f2x5[_0x1bfe[1961]](_0x47f2x2,_0x47f2x4);return _0x47f2x5};mxGraphModel[_0x1bfe[202]][_0x1bfe[1707]]= function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[1707]]():0};mxGraphModel[_0x1bfe[202]][_0x1bfe[1708]]= function(_0x47f2x2,_0x47f2x3){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[1708]](_0x47f2x3):null};mxGraphModel[_0x1bfe[202]][_0x1bfe[1962]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){for(var _0x47f2x5=0,_0x47f2x9=this[_0x1bfe[1707]](_0x47f2x2),_0x47f2xa=0;_0x47f2xa< _0x47f2x9;_0x47f2xa++){var _0x47f2x12=this[_0x1bfe[1708]](_0x47f2x2,_0x47f2xa);_0x47f2x12!= _0x47f2x4&& this[_0x1bfe[1709]](_0x47f2x12,_0x47f2x3)== _0x47f2x2&& _0x47f2x5++};return _0x47f2x5};mxGraphModel[_0x1bfe[202]][_0x1bfe[1756]]= function(_0x47f2x2){return this[_0x1bfe[264]](_0x47f2x2,!0,!0,!1)};mxGraphModel[_0x1bfe[202]][_0x1bfe[1867]]= function(_0x47f2x2){return this[_0x1bfe[264]](_0x47f2x2,!0,!1,!1)};mxGraphModel[_0x1bfe[202]][_0x1bfe[1963]]= function(_0x47f2x2){return this[_0x1bfe[264]](_0x47f2x2,!1,!0,!1)};mxGraphModel[_0x1bfe[202]][_0x1bfe[264]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!0;_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!0;_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:!0;for(var _0x47f2x9=this[_0x1bfe[1707]](_0x47f2x2),_0x47f2xa=[],_0x47f2x12=0;_0x47f2x12< _0x47f2x9;_0x47f2x12++){var _0x47f2x13=this[_0x1bfe[1708]](_0x47f2x2,_0x47f2x12),_0x47f2x14=this[_0x1bfe[1709]](_0x47f2x13,!0),_0x47f2x15=this[_0x1bfe[1709]](_0x47f2x13,!1);(_0x47f2x5&& _0x47f2x14== _0x47f2x15|| _0x47f2x14!= _0x47f2x15&& (_0x47f2x3&& _0x47f2x15== _0x47f2x2|| _0x47f2x4&& _0x47f2x14== _0x47f2x2))&& _0x47f2xa[_0x1bfe[207]](_0x47f2x13)};return _0x47f2xa};mxGraphModel[_0x1bfe[202]][_0x1bfe[1781]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!1;var _0x47f2x5=this[_0x1bfe[1707]](_0x47f2x2),_0x47f2x9=this[_0x1bfe[1707]](_0x47f2x3),_0x47f2xa=_0x47f2x2,_0x47f2x12=_0x47f2x5;_0x47f2x9< _0x47f2x5&& (_0x47f2x12= _0x47f2x9,_0x47f2xa= _0x47f2x3);_0x47f2x5= [];for(_0x47f2x9= 0;_0x47f2x9< _0x47f2x12;_0x47f2x9++){var _0x47f2x13=this[_0x1bfe[1708]](_0x47f2xa,_0x47f2x9),_0x47f2x14=this[_0x1bfe[1709]](_0x47f2x13,!0),_0x47f2x15=this[_0x1bfe[1709]](_0x47f2x13,!1),_0x47f2x16=_0x47f2x15== _0x47f2x2&& _0x47f2x14== _0x47f2x3;(_0x47f2x14== _0x47f2x2&& _0x47f2x15== _0x47f2x3|| !_0x47f2x4&& _0x47f2x16)&& _0x47f2x5[_0x1bfe[207]](_0x47f2x13)};return _0x47f2x5};mxGraphModel[_0x1bfe[202]][_0x1bfe[1808]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!0;_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:!0;var _0x47f2x9=[];if(null!= _0x47f2x2){for(var _0x47f2xa=0;_0x47f2xa< _0x47f2x2[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=this[_0x1bfe[1709]](_0x47f2x2[_0x47f2xa],!0),_0x47f2x13=this[_0x1bfe[1709]](_0x47f2x2[_0x47f2xa],!1);_0x47f2x12== _0x47f2x3&& null!= _0x47f2x13&& _0x47f2x13!= _0x47f2x3&& _0x47f2x5?_0x47f2x9[_0x1bfe[207]](_0x47f2x13):_0x47f2x13== _0x47f2x3&& (null!= _0x47f2x12&& _0x47f2x12!= _0x47f2x3&& _0x47f2x4)&& _0x47f2x9[_0x1bfe[207]](_0x47f2x12)}};return _0x47f2x9};mxGraphModel[_0x1bfe[202]][_0x1bfe[1964]]= function(_0x47f2x2){for(var _0x47f2x3=[],_0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){for(var _0x47f2x5=_0x47f2x2[_0x47f2x4],_0x47f2x9=!0,_0x47f2xa=this[_0x1bfe[1197]](_0x47f2x5);null!= _0x47f2xa;){if(0<= mxUtils[_0x1bfe[2]](_0x47f2x2,_0x47f2xa)){_0x47f2x9= !1;break};_0x47f2xa= this[_0x1bfe[1197]](_0x47f2xa)};_0x47f2x9&& _0x47f2x3[_0x1bfe[207]](_0x47f2x5)};return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1193]]= function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[1193]]():!1};mxGraphModel[_0x1bfe[202]][_0x1bfe[250]]= function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[250]]():!1};mxGraphModel[_0x1bfe[202]][_0x1bfe[1965]]= function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[1965]]():!1};mxGraphModel[_0x1bfe[202]][_0x1bfe[433]]= function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[433]]():null};mxGraphModel[_0x1bfe[202]][_0x1bfe[1966]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[350]]( new mxValueChange(this,_0x47f2x2,_0x47f2x3));return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1967]]= function(_0x47f2x2,_0x47f2x3){return _0x47f2x2[_0x1bfe[1968]](_0x47f2x3)};mxGraphModel[_0x1bfe[202]][_0x1bfe[1721]]= function(_0x47f2x2,_0x47f2x3){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[1721]]():null};mxGraphModel[_0x1bfe[202]][_0x1bfe[1724]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3!= this[_0x1bfe[1721]](_0x47f2x2)&& this[_0x1bfe[350]]( new mxGeometryChange(this,_0x47f2x2,_0x47f2x3));return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1969]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1721]](_0x47f2x2);_0x47f2x2[_0x1bfe[1724]](_0x47f2x3);return _0x47f2x4};mxGraphModel[_0x1bfe[202]][_0x1bfe[474]]= function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[474]]():null};mxGraphModel[_0x1bfe[202]][_0x1bfe[475]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3!= this[_0x1bfe[474]](_0x47f2x2)&& this[_0x1bfe[350]]( new mxStyleChange(this,_0x47f2x2,_0x47f2x3));return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1970]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[474]](_0x47f2x2);_0x47f2x2[_0x1bfe[475]](_0x47f2x3);return _0x47f2x4};mxGraphModel[_0x1bfe[202]][_0x1bfe[1971]]= function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[1971]]():!1};mxGraphModel[_0x1bfe[202]][_0x1bfe[1972]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3!= this[_0x1bfe[1971]](_0x47f2x2)&& this[_0x1bfe[350]]( new mxCollapseChange(this,_0x47f2x2,_0x47f2x3));return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1973]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1971]](_0x47f2x2);_0x47f2x2[_0x1bfe[1972]](_0x47f2x3);return _0x47f2x4};mxGraphModel[_0x1bfe[202]][_0x1bfe[174]]= function(_0x47f2x2){return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[174]]():!1};mxGraphModel[_0x1bfe[202]][_0x1bfe[175]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3!= this[_0x1bfe[174]](_0x47f2x2)&& this[_0x1bfe[350]]( new mxVisibleChange(this,_0x47f2x2,_0x47f2x3));return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1974]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[174]](_0x47f2x2);_0x47f2x2[_0x1bfe[175]](_0x47f2x3);return _0x47f2x4};mxGraphModel[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2){_0x47f2x2[_0x1bfe[350]]();this[_0x1bfe[473]]();this[_0x1bfe[1926]][_0x1bfe[99]](_0x47f2x2);this[_0x1bfe[746]]( new mxEventObject(mxEvent.EXECUTE,_0x1bfe[826],_0x47f2x2));this[_0x1bfe[746]]( new mxEventObject(mxEvent.EXECUTED,_0x1bfe[826],_0x47f2x2));this[_0x1bfe[476]]()};mxGraphModel[_0x1bfe[202]][_0x1bfe[473]]= function(){this[_0x1bfe[1932]]++;this[_0x1bfe[746]]( new mxEventObject(mxEvent.BEGIN_UPDATE));1== this[_0x1bfe[1932]]&& this[_0x1bfe[746]]( new mxEventObject(mxEvent.START_EDIT))};mxGraphModel[_0x1bfe[202]][_0x1bfe[476]]= function(){this[_0x1bfe[1932]]--;0== this[_0x1bfe[1932]]&& this[_0x1bfe[746]]( new mxEventObject(mxEvent.END_EDIT));if(!this[_0x1bfe[1933]]){this[_0x1bfe[1933]]= 0== this[_0x1bfe[1932]];this[_0x1bfe[746]]( new mxEventObject(mxEvent.END_UPDATE,_0x1bfe[1061],this[_0x1bfe[1926]]));try{if(this[_0x1bfe[1933]]&& !this[_0x1bfe[1926]][_0x1bfe[1107]]()){this[_0x1bfe[746]]( new mxEventObject(mxEvent.BEFORE_UNDO,_0x1bfe[1061],this[_0x1bfe[1926]]));var _0x47f2x2=this[_0x1bfe[1926]];this[_0x1bfe[1926]]= this[_0x1bfe[1096]]();_0x47f2x2[_0x1bfe[827]]();this[_0x1bfe[746]]( new mxEventObject(mxEvent.UNDO,_0x1bfe[1061],_0x47f2x2))}}finally{this[_0x1bfe[1933]]= !1}}};mxGraphModel[_0x1bfe[202]][_0x1bfe[1096]]= function(){var _0x47f2x2= new mxUndoableEdit(this,!0);_0x47f2x2[_0x1bfe[827]]= function(){_0x47f2x2[_0x1bfe[1097]][_0x1bfe[746]]( new mxEventObject(mxEvent.CHANGE,_0x1bfe[1061],_0x47f2x2,_0x1bfe[1065],_0x47f2x2[_0x1bfe[1065]]));_0x47f2x2[_0x1bfe[1097]][_0x1bfe[746]]( new mxEventObject(mxEvent.NOTIFY,_0x1bfe[1061],_0x47f2x2,_0x1bfe[1065],_0x47f2x2[_0x1bfe[1065]]))};return _0x47f2x2};mxGraphModel[_0x1bfe[202]][_0x1bfe[1975]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!0;this[_0x1bfe[473]]();try{var _0x47f2x5={};this[_0x1bfe[1976]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5);for(var _0x47f2x9 in _0x47f2x5){var _0x47f2xa=_0x47f2x5[_0x47f2x9],_0x47f2x12=this[_0x1bfe[1709]](_0x47f2xa,!0);null!= _0x47f2x12&& (_0x47f2x12= _0x47f2x5[mxCellPath[_0x1bfe[385]](_0x47f2x12)],this[_0x1bfe[1957]](_0x47f2xa,_0x47f2x12,!0));_0x47f2x12= this[_0x1bfe[1709]](_0x47f2xa,!1);null!= _0x47f2x12&& (_0x47f2x12= _0x47f2x5[mxCellPath[_0x1bfe[385]](_0x47f2x12)],this[_0x1bfe[1957]](_0x47f2xa,_0x47f2x12,!1))}}finally{this[_0x1bfe[476]]()}};mxGraphModel[_0x1bfe[202]][_0x1bfe[1976]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[473]]();try{for(var _0x47f2x9=_0x47f2x2[_0x1bfe[262]](),_0x47f2xa=0;_0x47f2xa< _0x47f2x9;_0x47f2xa++){var _0x47f2x12=_0x47f2x2[_0x1bfe[263]](_0x47f2xa);if(_0x1bfe[279]== typeof _0x47f2x12[_0x1bfe[1103]]){var _0x47f2x13=_0x47f2x12[_0x1bfe[1103]](),_0x47f2x14=null!= _0x47f2x13&& (!this[_0x1bfe[250]](_0x47f2x12)|| !_0x47f2x4)?this[_0x1bfe[736]](_0x47f2x13):null;if(null== _0x47f2x14){var _0x47f2x15=_0x47f2x12[_0x1bfe[238]]();_0x47f2x15[_0x1bfe[1945]](_0x47f2x13);_0x47f2x15[_0x1bfe[1957]](_0x47f2x12[_0x1bfe[1709]](!0),!0);_0x47f2x15[_0x1bfe[1957]](_0x47f2x12[_0x1bfe[1709]](!1),!1);_0x47f2x14= _0x47f2x3[_0x1bfe[1937]](_0x47f2x15);this[_0x1bfe[1941]](_0x47f2x14)};_0x47f2x5[mxCellPath[_0x1bfe[385]](_0x47f2x12)]= _0x47f2x14;this[_0x1bfe[1976]](_0x47f2x12,_0x47f2x14,_0x47f2x4,_0x47f2x5)}}}finally{this[_0x1bfe[476]]()}};mxGraphModel[_0x1bfe[202]][_0x1bfe[1977]]= function(_0x47f2x2){var _0x47f2x3=[];if(null!= _0x47f2x2){for(var _0x47f2x4={},_0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){var _0x47f2x9=this[_0x1bfe[1197]](_0x47f2x2[_0x47f2x5]);if(null!= _0x47f2x9){var _0x47f2xa=mxCellPath[_0x1bfe[385]](_0x47f2x9);null== _0x47f2x4[_0x47f2xa]&& (_0x47f2x4[_0x47f2xa]= _0x47f2x9,_0x47f2x3[_0x1bfe[207]](_0x47f2x9))}}};return _0x47f2x3};mxGraphModel[_0x1bfe[202]][_0x1bfe[1978]]= function(_0x47f2x2){return null!= _0x47f2x2?this[_0x1bfe[899]]([_0x47f2x2],!0)[0]:null};mxGraphModel[_0x1bfe[202]][_0x1bfe[899]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4={},_0x47f2x5=[],_0x47f2x9=0;_0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9++){null!= _0x47f2x2[_0x47f2x9]?_0x47f2x5[_0x1bfe[207]](this[_0x1bfe[1979]](_0x47f2x2[_0x47f2x9],_0x47f2x4,_0x47f2x3)):_0x47f2x5[_0x1bfe[207]](null)};for(_0x47f2x9= 0;_0x47f2x9< _0x47f2x5[_0x1bfe[67]];_0x47f2x9++){null!= _0x47f2x5[_0x47f2x9]&& this[_0x1bfe[1980]](_0x47f2x5[_0x47f2x9],_0x47f2x2[_0x47f2x9],_0x47f2x4)};return _0x47f2x5};mxGraphModel[_0x1bfe[202]][_0x1bfe[1979]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1981]](_0x47f2x2);_0x47f2x3[mxObjectIdentity[_0x1bfe[203]](_0x47f2x2)]= _0x47f2x5;if(_0x47f2x4){_0x47f2x4= this[_0x1bfe[262]](_0x47f2x2);for(var _0x47f2x9=0;_0x47f2x9< _0x47f2x4;_0x47f2x9++){var _0x47f2xa=this[_0x1bfe[1979]](this[_0x1bfe[263]](_0x47f2x2,_0x47f2x9),_0x47f2x3,!0);_0x47f2x5[_0x1bfe[1937]](_0x47f2xa)}};return _0x47f2x5};mxGraphModel[_0x1bfe[202]][_0x1bfe[1981]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[238]]()};mxGraphModel[_0x1bfe[202]][_0x1bfe[1980]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1709]](_0x47f2x3,!0);null!= _0x47f2x5&& (_0x47f2x5= _0x47f2x4[mxObjectIdentity[_0x1bfe[203]](_0x47f2x5)],null!= _0x47f2x5&& _0x47f2x5[_0x1bfe[1960]](_0x47f2x2,!0));_0x47f2x5= this[_0x1bfe[1709]](_0x47f2x3,!1);null!= _0x47f2x5&& (_0x47f2x5= _0x47f2x4[mxObjectIdentity[_0x1bfe[203]](_0x47f2x5)],null!= _0x47f2x5&& _0x47f2x5[_0x1bfe[1960]](_0x47f2x2,!1));for(var _0x47f2x5=this[_0x1bfe[262]](_0x47f2x2),_0x47f2x9=0;_0x47f2x9< _0x47f2x5;_0x47f2x9++){this[_0x1bfe[1980]](this[_0x1bfe[263]](_0x47f2x2,_0x47f2x9),this[_0x1bfe[263]](_0x47f2x3,_0x47f2x9),_0x47f2x4)}};function mxRootChange(_0x47f2x2,_0x47f2x3){this[_0x1bfe[251]]= _0x47f2x2;this[_0x1bfe[257]]= this[_0x1bfe[813]]= _0x47f2x3}mxRootChange[_0x1bfe[202]][_0x1bfe[350]]= function(){this[_0x1bfe[813]]= this[_0x1bfe[257]];this[_0x1bfe[257]]= this[_0x1bfe[251]][_0x1bfe[1940]](this[_0x1bfe[257]])};function mxChildChange(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[251]]= _0x47f2x2;this[_0x1bfe[257]]= this[_0x1bfe[1101]]= _0x47f2x3;this[_0x1bfe[247]]= _0x47f2x4;this[_0x1bfe[1982]]= this[_0x1bfe[1983]]= _0x47f2x5}mxChildChange[_0x1bfe[202]][_0x1bfe[350]]= function(){var _0x47f2x2=this[_0x1bfe[251]][_0x1bfe[1197]](this[_0x1bfe[247]]),_0x47f2x3=null!= _0x47f2x2?_0x47f2x2[_0x1bfe[1738]](this[_0x1bfe[247]]):0;null== this[_0x1bfe[257]]&& this[_0x1bfe[807]](this[_0x1bfe[247]],!1);_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[1952]](this[_0x1bfe[247]],this[_0x1bfe[257]],this[_0x1bfe[1982]]);null!= this[_0x1bfe[257]]&& this[_0x1bfe[807]](this[_0x1bfe[247]],!0);this[_0x1bfe[1101]]= this[_0x1bfe[257]];this[_0x1bfe[257]]= _0x47f2x2;this[_0x1bfe[1983]]= this[_0x1bfe[1982]];this[_0x1bfe[1982]]= _0x47f2x3};mxChildChange[_0x1bfe[202]][_0x1bfe[807]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!0;var _0x47f2x4=_0x47f2x2[_0x1bfe[1709]](!0),_0x47f2x5=_0x47f2x2[_0x1bfe[1709]](!1);null!= _0x47f2x4&& (_0x47f2x3?this[_0x1bfe[251]][_0x1bfe[1959]](_0x47f2x2,_0x47f2x4,!0):this[_0x1bfe[251]][_0x1bfe[1959]](_0x47f2x2,null,!0));null!= _0x47f2x5&& (_0x47f2x3?this[_0x1bfe[251]][_0x1bfe[1959]](_0x47f2x2,_0x47f2x5,!1):this[_0x1bfe[251]][_0x1bfe[1959]](_0x47f2x2,null,!1));_0x47f2x2[_0x1bfe[1957]](_0x47f2x4,!0);_0x47f2x2[_0x1bfe[1957]](_0x47f2x5,!1);_0x47f2x4= this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2);for(_0x47f2x5= 0;_0x47f2x5< _0x47f2x4;_0x47f2x5++){this[_0x1bfe[807]](this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x2,_0x47f2x5),_0x47f2x3)}};function mxTerminalChange(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[251]]= _0x47f2x2;this[_0x1bfe[246]]= _0x47f2x3;this[_0x1bfe[257]]= this[_0x1bfe[1984]]= _0x47f2x4;this[_0x1bfe[1097]]= _0x47f2x5}mxTerminalChange[_0x1bfe[202]][_0x1bfe[350]]= function(){this[_0x1bfe[1984]]= this[_0x1bfe[257]];this[_0x1bfe[257]]= this[_0x1bfe[251]][_0x1bfe[1959]](this[_0x1bfe[246]],this[_0x1bfe[257]],this[_0x1bfe[1097]])};function mxValueChange(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[251]]= _0x47f2x2;this[_0x1bfe[246]]= _0x47f2x3;this[_0x1bfe[257]]= this[_0x1bfe[131]]= _0x47f2x4}mxValueChange[_0x1bfe[202]][_0x1bfe[350]]= function(){this[_0x1bfe[131]]= this[_0x1bfe[257]];this[_0x1bfe[257]]= this[_0x1bfe[251]][_0x1bfe[1967]](this[_0x1bfe[246]],this[_0x1bfe[257]])};function mxStyleChange(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[251]]= _0x47f2x2;this[_0x1bfe[246]]= _0x47f2x3;this[_0x1bfe[257]]= this[_0x1bfe[124]]= _0x47f2x4}mxStyleChange[_0x1bfe[202]][_0x1bfe[350]]= function(){this[_0x1bfe[124]]= this[_0x1bfe[257]];this[_0x1bfe[257]]= this[_0x1bfe[251]][_0x1bfe[1970]](this[_0x1bfe[246]],this[_0x1bfe[257]])};function mxGeometryChange(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[251]]= _0x47f2x2;this[_0x1bfe[246]]= _0x47f2x3;this[_0x1bfe[257]]= this[_0x1bfe[256]]= _0x47f2x4}mxGeometryChange[_0x1bfe[202]][_0x1bfe[350]]= function(){this[_0x1bfe[256]]= this[_0x1bfe[257]];this[_0x1bfe[257]]= this[_0x1bfe[251]][_0x1bfe[1969]](this[_0x1bfe[246]],this[_0x1bfe[257]])};function mxCollapseChange(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[251]]= _0x47f2x2;this[_0x1bfe[246]]= _0x47f2x3;this[_0x1bfe[257]]= this[_0x1bfe[1985]]= _0x47f2x4}mxCollapseChange[_0x1bfe[202]][_0x1bfe[350]]= function(){this[_0x1bfe[1985]]= this[_0x1bfe[257]];this[_0x1bfe[257]]= this[_0x1bfe[251]][_0x1bfe[1973]](this[_0x1bfe[246]],this[_0x1bfe[257]])};function mxVisibleChange(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[251]]= _0x47f2x2;this[_0x1bfe[246]]= _0x47f2x3;this[_0x1bfe[257]]= this[_0x1bfe[189]]= _0x47f2x4}mxVisibleChange[_0x1bfe[202]][_0x1bfe[350]]= function(){this[_0x1bfe[189]]= this[_0x1bfe[257]];this[_0x1bfe[257]]= this[_0x1bfe[251]][_0x1bfe[1974]](this[_0x1bfe[246]],this[_0x1bfe[257]])};function mxCellAttributeChange(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[246]]= _0x47f2x2;this[_0x1bfe[1986]]= _0x47f2x3;this[_0x1bfe[257]]= this[_0x1bfe[131]]= _0x47f2x4}mxCellAttributeChange[_0x1bfe[202]][_0x1bfe[350]]= function(){var _0x47f2x2=this[_0x1bfe[246]][_0x1bfe[284]](this[_0x1bfe[1986]]);null== this[_0x1bfe[257]]?this[_0x1bfe[246]][_0x1bfe[131]][_0x1bfe[1390]](this[_0x1bfe[1986]]):this[_0x1bfe[246]][_0x1bfe[57]](this[_0x1bfe[1986]],this[_0x1bfe[257]]);this[_0x1bfe[257]]= _0x47f2x2};function mxCell(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[131]]= _0x47f2x2;this[_0x1bfe[1724]](_0x47f2x3);this[_0x1bfe[475]](_0x47f2x4);if(null!= this[_0x1bfe[1987]]){this[_0x1bfe[1987]]()}}mxCell[_0x1bfe[202]][_0x1bfe[1363]]= null;mxCell[_0x1bfe[202]][_0x1bfe[131]]= null;mxCell[_0x1bfe[202]][_0x1bfe[256]]= null;mxCell[_0x1bfe[202]][_0x1bfe[124]]= null;mxCell[_0x1bfe[202]][_0x1bfe[1988]]= !1;mxCell[_0x1bfe[202]][_0x1bfe[1989]]= !1;mxCell[_0x1bfe[202]][_0x1bfe[1990]]= !0;mxCell[_0x1bfe[202]][_0x1bfe[189]]= !0;mxCell[_0x1bfe[202]][_0x1bfe[1985]]= !1;mxCell[_0x1bfe[202]][_0x1bfe[1101]]= null;mxCell[_0x1bfe[202]][_0x1bfe[1097]]= null;mxCell[_0x1bfe[202]][_0x1bfe[772]]= null;mxCell[_0x1bfe[202]][_0x1bfe[1954]]= null;mxCell[_0x1bfe[202]][_0x1bfe[1842]]= null;mxCell[_0x1bfe[202]][_0x1bfe[1991]]= _0x1bfe[1992][_0x1bfe[224]](_0x1bfe[185]);mxCell[_0x1bfe[202]][_0x1bfe[1103]]= function(){return this[_0x1bfe[1363]]};mxCell[_0x1bfe[202]][_0x1bfe[1945]]= function(_0x47f2x2){this[_0x1bfe[1363]]= _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[433]]= function(){return this[_0x1bfe[131]]};mxCell[_0x1bfe[202]][_0x1bfe[1966]]= function(_0x47f2x2){this[_0x1bfe[131]]= _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[1968]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[433]]();this[_0x1bfe[1966]](_0x47f2x2);return _0x47f2x3};mxCell[_0x1bfe[202]][_0x1bfe[1721]]= function(){return this[_0x1bfe[256]]};mxCell[_0x1bfe[202]][_0x1bfe[1724]]= function(_0x47f2x2){this[_0x1bfe[256]]= _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[474]]= function(){return this[_0x1bfe[124]]};mxCell[_0x1bfe[202]][_0x1bfe[475]]= function(_0x47f2x2){this[_0x1bfe[124]]= _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[1193]]= function(){return this[_0x1bfe[1988]]};mxCell[_0x1bfe[202]][_0x1bfe[1993]]= function(_0x47f2x2){this[_0x1bfe[1988]]= _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[250]]= function(){return this[_0x1bfe[1989]]};mxCell[_0x1bfe[202]][_0x1bfe[1994]]= function(_0x47f2x2){this[_0x1bfe[1989]]= _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[1965]]= function(){return this[_0x1bfe[1990]]};mxCell[_0x1bfe[202]][_0x1bfe[1995]]= function(_0x47f2x2){this[_0x1bfe[1990]]= _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[174]]= function(){return this[_0x1bfe[189]]};mxCell[_0x1bfe[202]][_0x1bfe[175]]= function(_0x47f2x2){this[_0x1bfe[189]]= _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[1971]]= function(){return this[_0x1bfe[1985]]};mxCell[_0x1bfe[202]][_0x1bfe[1972]]= function(_0x47f2x2){this[_0x1bfe[1985]]= _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[1197]]= function(){return this[_0x1bfe[1101]]};mxCell[_0x1bfe[202]][_0x1bfe[1996]]= function(_0x47f2x2){this[_0x1bfe[1101]]= _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[1709]]= function(_0x47f2x2){return _0x47f2x2?this[_0x1bfe[1097]]:this[_0x1bfe[772]]};mxCell[_0x1bfe[202]][_0x1bfe[1957]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3?this[_0x1bfe[1097]]= _0x47f2x2:this[_0x1bfe[772]]= _0x47f2x2;return _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[262]]= function(){return null== this[_0x1bfe[1954]]?0:this[_0x1bfe[1954]][_0x1bfe[67]]};mxCell[_0x1bfe[202]][_0x1bfe[1738]]= function(_0x47f2x2){return mxUtils[_0x1bfe[2]](this[_0x1bfe[1954]],_0x47f2x2)};mxCell[_0x1bfe[202]][_0x1bfe[263]]= function(_0x47f2x2){return null== this[_0x1bfe[1954]]?null:this[_0x1bfe[1954]][_0x47f2x2]};mxCell[_0x1bfe[202]][_0x1bfe[1937]]= function(_0x47f2x2,_0x47f2x3){null!= _0x47f2x2&& (null== _0x47f2x3&& (_0x47f2x3= this[_0x1bfe[262]](),_0x47f2x2[_0x1bfe[1197]]()== this&& _0x47f2x3--),_0x47f2x2[_0x1bfe[1997]](),_0x47f2x2[_0x1bfe[1996]](this),null== this[_0x1bfe[1954]]?(this[_0x1bfe[1954]]= [],this[_0x1bfe[1954]][_0x1bfe[207]](_0x47f2x2)):this[_0x1bfe[1954]][_0x1bfe[300]](_0x47f2x3,0,_0x47f2x2));return _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[205]]= function(_0x47f2x2){var _0x47f2x3=null;null!= this[_0x1bfe[1954]]&& 0<= _0x47f2x2&& (_0x47f2x3= this[_0x1bfe[263]](_0x47f2x2),null!= _0x47f2x3&& (this[_0x1bfe[1954]][_0x1bfe[300]](_0x47f2x2,1),_0x47f2x3[_0x1bfe[1996]](null)));return _0x47f2x3};mxCell[_0x1bfe[202]][_0x1bfe[1997]]= function(){if(null!= this[_0x1bfe[1101]]){var _0x47f2x2=this[_0x1bfe[1101]][_0x1bfe[1738]](this);this[_0x1bfe[1101]][_0x1bfe[205]](_0x47f2x2)}};mxCell[_0x1bfe[202]][_0x1bfe[1707]]= function(){return null== this[_0x1bfe[1842]]?0:this[_0x1bfe[1842]][_0x1bfe[67]]};mxCell[_0x1bfe[202]][_0x1bfe[1998]]= function(_0x47f2x2){return mxUtils[_0x1bfe[2]](this[_0x1bfe[1842]],_0x47f2x2)};mxCell[_0x1bfe[202]][_0x1bfe[1708]]= function(_0x47f2x2){return null== this[_0x1bfe[1842]]?null:this[_0x1bfe[1842]][_0x47f2x2]};mxCell[_0x1bfe[202]][_0x1bfe[1960]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2&& (_0x47f2x2[_0x1bfe[1999]](_0x47f2x3),_0x47f2x2[_0x1bfe[1957]](this,_0x47f2x3),null== this[_0x1bfe[1842]]|| _0x47f2x2[_0x1bfe[1709]](!_0x47f2x3) != this|| 0> mxUtils[_0x1bfe[2]](this[_0x1bfe[1842]],_0x47f2x2))){null== this[_0x1bfe[1842]]&& (this[_0x1bfe[1842]]= []),this[_0x1bfe[1842]][_0x1bfe[207]](_0x47f2x2)};return _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[1961]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2){if(_0x47f2x2[_0x1bfe[1709]](!_0x47f2x3) != this&& null!= this[_0x1bfe[1842]]){var _0x47f2x4=this[_0x1bfe[1998]](_0x47f2x2);0<= _0x47f2x4&& this[_0x1bfe[1842]][_0x1bfe[300]](_0x47f2x4,1)};_0x47f2x2[_0x1bfe[1957]](null,_0x47f2x3)};return _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[1999]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1709]](_0x47f2x2);null!= _0x47f2x3&& _0x47f2x3[_0x1bfe[1961]](this,_0x47f2x2)};mxCell[_0x1bfe[202]][_0x1bfe[284]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[433]]();return (null!= _0x47f2x4&& _0x47f2x4[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]?_0x47f2x4[_0x1bfe[284]](_0x47f2x2):null)|| _0x47f2x3};mxCell[_0x1bfe[202]][_0x1bfe[57]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[433]]();null!= _0x47f2x4&& _0x47f2x4[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]&& _0x47f2x4[_0x1bfe[57]](_0x47f2x2,_0x47f2x3)};mxCell[_0x1bfe[202]][_0x1bfe[238]]= function(){var _0x47f2x2=mxUtils[_0x1bfe[238]](this,this[_0x1bfe[1991]]);_0x47f2x2[_0x1bfe[1966]](this[_0x1bfe[2000]]());return _0x47f2x2};mxCell[_0x1bfe[202]][_0x1bfe[2000]]= function(){var _0x47f2x2=this[_0x1bfe[433]]();null!= _0x47f2x2&& (_0x1bfe[279]== typeof _0x47f2x2[_0x1bfe[238]]?_0x47f2x2= _0x47f2x2[_0x1bfe[238]]():isNaN(_0x47f2x2[_0x1bfe[288]])|| (_0x47f2x2= _0x47f2x2[_0x1bfe[511]](!0)));return _0x47f2x2};function mxGeometry(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxRectangle[_0x1bfe[239]](this,_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5)}mxGeometry[_0x1bfe[202]]= new mxRectangle;mxGeometry[_0x1bfe[202]][_0x1bfe[196]]= mxGeometry;mxGeometry[_0x1bfe[202]][_0x1bfe[2001]]= !0;mxGeometry[_0x1bfe[202]][_0x1bfe[2002]]= null;mxGeometry[_0x1bfe[202]][_0x1bfe[2003]]= null;mxGeometry[_0x1bfe[202]][_0x1bfe[2004]]= null;mxGeometry[_0x1bfe[202]][_0x1bfe[1525]]= null;mxGeometry[_0x1bfe[202]][_0x1bfe[1368]]= null;mxGeometry[_0x1bfe[202]][_0x1bfe[1500]]= !1;mxGeometry[_0x1bfe[202]][_0x1bfe[2005]]= function(){if(null!= this[_0x1bfe[2002]]){var _0x47f2x2= new mxRectangle(this[_0x1bfe[235]],this[_0x1bfe[236]],this[_0x1bfe[117]],this[_0x1bfe[119]]);this[_0x1bfe[235]]= this[_0x1bfe[2002]][_0x1bfe[235]];this[_0x1bfe[236]]= this[_0x1bfe[2002]][_0x1bfe[236]];this[_0x1bfe[117]]= this[_0x1bfe[2002]][_0x1bfe[117]];this[_0x1bfe[119]]= this[_0x1bfe[2002]][_0x1bfe[119]];this[_0x1bfe[2002]]= _0x47f2x2}};mxGeometry[_0x1bfe[202]][_0x1bfe[2006]]= function(_0x47f2x2){return _0x47f2x2?this[_0x1bfe[2003]]:this[_0x1bfe[2004]]};mxGeometry[_0x1bfe[202]][_0x1bfe[2007]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3?this[_0x1bfe[2003]]= _0x47f2x2:this[_0x1bfe[2004]]= _0x47f2x2;return _0x47f2x2};mxGeometry[_0x1bfe[202]][_0x1bfe[513]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[238]]();this[_0x1bfe[1500]]|| (this[_0x1bfe[235]]+= _0x47f2x2,this[_0x1bfe[236]]+= _0x47f2x3);null!= this[_0x1bfe[2003]]&& (this[_0x1bfe[2003]][_0x1bfe[235]]+= _0x47f2x2,this[_0x1bfe[2003]][_0x1bfe[236]]+= _0x47f2x3);null!= this[_0x1bfe[2004]]&& (this[_0x1bfe[2004]][_0x1bfe[235]]+= _0x47f2x2,this[_0x1bfe[2004]][_0x1bfe[236]]+= _0x47f2x3);if(this[_0x1bfe[2001]]&& null!= this[_0x1bfe[1525]]){for(var _0x47f2x4=this[_0x1bfe[1525]][_0x1bfe[67]],_0x47f2x5=0;_0x47f2x5< _0x47f2x4;_0x47f2x5++){var _0x47f2x9=this[_0x1bfe[1525]][_0x47f2x5];null!= _0x47f2x9&& (_0x47f2x9[_0x1bfe[235]]+= _0x47f2x2,_0x47f2x9[_0x1bfe[236]]+= _0x47f2x3)}}};var mxCellPath={PATH_SEPARATOR:_0x1bfe[87],create:function(_0x47f2x2){var _0x47f2x3=_0x1bfe[110];if(null!= _0x47f2x2){for(var _0x47f2x4=_0x47f2x2[_0x1bfe[1197]]();null!= _0x47f2x4;){_0x47f2x3= _0x47f2x4[_0x1bfe[1738]](_0x47f2x2)+ mxCellPath[_0x1bfe[1950]]+ _0x47f2x3,_0x47f2x2= _0x47f2x4,_0x47f2x4= _0x47f2x2[_0x1bfe[1197]]()}};_0x47f2x2= _0x47f2x3[_0x1bfe[67]];1< _0x47f2x2&& (_0x47f2x3= _0x47f2x3[_0x1bfe[85]](0,_0x47f2x2- 1));return _0x47f2x3},getParentPath:function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[1122]](mxCellPath.PATH_SEPARATOR);if(0<= _0x47f2x3){return _0x47f2x2[_0x1bfe[85]](0,_0x47f2x3)};if(0< _0x47f2x2[_0x1bfe[67]]){return _0x1bfe[110]}};return null},resolve:function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x2;if(null!= _0x47f2x3){for(var _0x47f2x5=_0x47f2x3[_0x1bfe[224]](mxCellPath.PATH_SEPARATOR),_0x47f2x9=0;_0x47f2x9< _0x47f2x5[_0x1bfe[67]];_0x47f2x9++){_0x47f2x4= _0x47f2x4[_0x1bfe[263]](parseInt(_0x47f2x5[_0x47f2x9]))}};return _0x47f2x4},compare:function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=Math[_0x1bfe[243]](_0x47f2x2[_0x1bfe[67]],_0x47f2x3[_0x1bfe[67]]),_0x47f2x5=0,_0x47f2x9=0;_0x47f2x9< _0x47f2x4;_0x47f2x9++){if(_0x47f2x2[_0x47f2x9]!= _0x47f2x3[_0x47f2x9]){0== _0x47f2x2[_0x47f2x9][_0x1bfe[67]]|| 0== _0x47f2x3[_0x47f2x9][_0x1bfe[67]]?_0x47f2x5= _0x47f2x2[_0x47f2x9]== _0x47f2x3[_0x47f2x9]?0:_0x47f2x2[_0x47f2x9]> _0x47f2x3[_0x47f2x9]?1:-1:(_0x47f2x4= parseInt(_0x47f2x2[_0x47f2x9]),_0x47f2x9= parseInt(_0x47f2x3[_0x47f2x9]),_0x47f2x5= _0x47f2x4== _0x47f2x9?0:_0x47f2x4> _0x47f2x9?1:-1);break}};0== _0x47f2x5&& (_0x47f2x4= _0x47f2x2[_0x1bfe[67]],_0x47f2x9= _0x47f2x3[_0x1bfe[67]],_0x47f2x4!= _0x47f2x9&& (_0x47f2x5= _0x47f2x4> _0x47f2x9?1:-1));return _0x47f2x5}},mxPerimeter={RectanglePerimeter:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x3= _0x47f2x2[_0x1bfe[241]]();var _0x47f2x9=_0x47f2x2[_0x1bfe[242]](),_0x47f2xa=Math[_0x1bfe[429]](_0x47f2x4[_0x1bfe[236]]- _0x47f2x9,_0x47f2x4[_0x1bfe[235]]- _0x47f2x3),_0x47f2x12= new mxPoint(0,0),_0x47f2x13=Math[_0x1bfe[424]],_0x47f2x14=Math[_0x1bfe[424]]/ 2- _0x47f2xa,_0x47f2x15=Math[_0x1bfe[429]](_0x47f2x2[_0x1bfe[119]],_0x47f2x2[_0x1bfe[117]]);_0x47f2xa< -_0x47f2x13+ _0x47f2x15|| _0x47f2xa> _0x47f2x13- _0x47f2x15?(_0x47f2x12[_0x1bfe[235]]= _0x47f2x2[_0x1bfe[235]],_0x47f2x12[_0x1bfe[236]]= _0x47f2x9- _0x47f2x2[_0x1bfe[117]]* Math[_0x1bfe[2008]](_0x47f2xa)/ 2):_0x47f2xa< -_0x47f2x15?(_0x47f2x12[_0x1bfe[236]]= _0x47f2x2[_0x1bfe[236]],_0x47f2x12[_0x1bfe[235]]= _0x47f2x3- _0x47f2x2[_0x1bfe[119]]* Math[_0x1bfe[2008]](_0x47f2x14)/ 2):_0x47f2xa< _0x47f2x15?(_0x47f2x12[_0x1bfe[235]]= _0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]],_0x47f2x12[_0x1bfe[236]]= _0x47f2x9+ _0x47f2x2[_0x1bfe[117]]* Math[_0x1bfe[2008]](_0x47f2xa)/ 2):(_0x47f2x12[_0x1bfe[236]]= _0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]],_0x47f2x12[_0x1bfe[235]]= _0x47f2x3+ _0x47f2x2[_0x1bfe[119]]* Math[_0x1bfe[2008]](_0x47f2x14)/ 2);_0x47f2x5&& (_0x47f2x4[_0x1bfe[235]]>= _0x47f2x2[_0x1bfe[235]]&& _0x47f2x4[_0x1bfe[235]]<= _0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]?_0x47f2x12[_0x1bfe[235]]= _0x47f2x4[_0x1bfe[235]]:_0x47f2x4[_0x1bfe[236]]>= _0x47f2x2[_0x1bfe[236]]&& _0x47f2x4[_0x1bfe[236]]<= _0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]&& (_0x47f2x12[_0x1bfe[236]]= _0x47f2x4[_0x1bfe[236]]),_0x47f2x4[_0x1bfe[235]]< _0x47f2x2[_0x1bfe[235]]?_0x47f2x12[_0x1bfe[235]]= _0x47f2x2[_0x1bfe[235]]:_0x47f2x4[_0x1bfe[235]]> _0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]&& (_0x47f2x12[_0x1bfe[235]]= _0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]),_0x47f2x4[_0x1bfe[236]]< _0x47f2x2[_0x1bfe[236]]?_0x47f2x12[_0x1bfe[236]]= _0x47f2x2[_0x1bfe[236]]:_0x47f2x4[_0x1bfe[236]]> _0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]&& (_0x47f2x12[_0x1bfe[236]]= _0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]));return _0x47f2x12},EllipsePerimeter:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=_0x47f2x2[_0x1bfe[235]],_0x47f2xa=_0x47f2x2[_0x1bfe[236]],_0x47f2x12=_0x47f2x2[_0x1bfe[117]]/ 2,_0x47f2x13=_0x47f2x2[_0x1bfe[119]]/ 2,_0x47f2x14=_0x47f2x9+ _0x47f2x12,_0x47f2x15=_0x47f2xa+ _0x47f2x13;_0x47f2x3= _0x47f2x4[_0x1bfe[235]];_0x47f2x4= _0x47f2x4[_0x1bfe[236]];var _0x47f2x16=parseInt(_0x47f2x3- _0x47f2x14),_0x47f2x17=parseInt(_0x47f2x4- _0x47f2x15);if(0== _0x47f2x16&& 0!= _0x47f2x17){return new mxPoint(_0x47f2x14,_0x47f2x15+ _0x47f2x13* _0x47f2x17/ Math[_0x1bfe[425]](_0x47f2x17))};if(0== _0x47f2x16&& 0== _0x47f2x17){return new mxPoint(_0x47f2x3,_0x47f2x4)};if(_0x47f2x5){if(_0x47f2x4>= _0x47f2xa&& _0x47f2x4<= _0x47f2xa+ _0x47f2x2[_0x1bfe[119]]){return _0x47f2x2= _0x47f2x4- _0x47f2x15,_0x47f2x2= Math[_0x1bfe[428]](_0x47f2x12* _0x47f2x12* (1- _0x47f2x2* _0x47f2x2/ (_0x47f2x13* _0x47f2x13)))|| 0,_0x47f2x3<= _0x47f2x9&& (_0x47f2x2= -_0x47f2x2), new mxPoint(_0x47f2x14+ _0x47f2x2,_0x47f2x4)};if(_0x47f2x3>= _0x47f2x9&& _0x47f2x3<= _0x47f2x9+ _0x47f2x2[_0x1bfe[117]]){return _0x47f2x2= _0x47f2x3- _0x47f2x14,_0x47f2x2= Math[_0x1bfe[428]](_0x47f2x13* _0x47f2x13* (1- _0x47f2x2* _0x47f2x2/ (_0x47f2x12* _0x47f2x12)))|| 0,_0x47f2x4<= _0x47f2xa&& (_0x47f2x2= -_0x47f2x2), new mxPoint(_0x47f2x3,_0x47f2x15+ _0x47f2x2)}};_0x47f2x9= _0x47f2x17/ _0x47f2x16;_0x47f2x15-= _0x47f2x9* _0x47f2x14;_0x47f2xa= _0x47f2x12* _0x47f2x12* _0x47f2x9* _0x47f2x9+ _0x47f2x13* _0x47f2x13;_0x47f2x2= -2* _0x47f2x14* _0x47f2xa;_0x47f2x13= Math[_0x1bfe[428]](_0x47f2x2* _0x47f2x2- 4* _0x47f2xa* (_0x47f2x12* _0x47f2x12* _0x47f2x9* _0x47f2x9* _0x47f2x14* _0x47f2x14+ _0x47f2x13* _0x47f2x13* _0x47f2x14* _0x47f2x14- _0x47f2x12* _0x47f2x12* _0x47f2x13* _0x47f2x13));_0x47f2x12= (-_0x47f2x2+ _0x47f2x13) / (2* _0x47f2xa);_0x47f2x13= (-_0x47f2x2- _0x47f2x13) / (2* _0x47f2xa);_0x47f2x14= _0x47f2x9* _0x47f2x12+ _0x47f2x15;_0x47f2x15= _0x47f2x9* _0x47f2x13+ _0x47f2x15;_0x47f2x9= Math[_0x1bfe[428]](Math[_0x1bfe[2009]](_0x47f2x12- _0x47f2x3,2)+ Math[_0x1bfe[2009]](_0x47f2x14- _0x47f2x4,2));_0x47f2x3= Math[_0x1bfe[428]](Math[_0x1bfe[2009]](_0x47f2x13- _0x47f2x3,2)+ Math[_0x1bfe[2009]](_0x47f2x15- _0x47f2x4,2));_0x47f2xa= _0x47f2x4= 0;_0x47f2x9< _0x47f2x3?(_0x47f2x4= _0x47f2x12,_0x47f2xa= _0x47f2x14):(_0x47f2x4= _0x47f2x13,_0x47f2xa= _0x47f2x15);return new mxPoint(_0x47f2x4,_0x47f2xa)},RhombusPerimeter:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x3= _0x47f2x2[_0x1bfe[235]];var _0x47f2x9=_0x47f2x2[_0x1bfe[236]],_0x47f2xa=_0x47f2x2[_0x1bfe[117]];_0x47f2x2= _0x47f2x2[_0x1bfe[119]];var _0x47f2x12=_0x47f2x3+ _0x47f2xa/ 2,_0x47f2x13=_0x47f2x9+ _0x47f2x2/ 2,_0x47f2x14=_0x47f2x4[_0x1bfe[235]];_0x47f2x4= _0x47f2x4[_0x1bfe[236]];if(_0x47f2x12== _0x47f2x14){return _0x47f2x13> _0x47f2x4? new mxPoint(_0x47f2x12,_0x47f2x9): new mxPoint(_0x47f2x12,_0x47f2x9+ _0x47f2x2)};if(_0x47f2x13== _0x47f2x4){return _0x47f2x12> _0x47f2x14? new mxPoint(_0x47f2x3,_0x47f2x13): new mxPoint(_0x47f2x3+ _0x47f2xa,_0x47f2x13)};var _0x47f2x15=_0x47f2x12,_0x47f2x16=_0x47f2x13;_0x47f2x5&& (_0x47f2x14>= _0x47f2x3&& _0x47f2x14<= _0x47f2x3+ _0x47f2xa?_0x47f2x15= _0x47f2x14:_0x47f2x4>= _0x47f2x9&& _0x47f2x4<= _0x47f2x9+ _0x47f2x2&& (_0x47f2x16= _0x47f2x4));return _0x47f2x14< _0x47f2x12?_0x47f2x4< _0x47f2x13?mxUtils[_0x1bfe[2010]](_0x47f2x14,_0x47f2x4,_0x47f2x15,_0x47f2x16,_0x47f2x12,_0x47f2x9,_0x47f2x3,_0x47f2x13):mxUtils[_0x1bfe[2010]](_0x47f2x14,_0x47f2x4,_0x47f2x15,_0x47f2x16,_0x47f2x12,_0x47f2x9+ _0x47f2x2,_0x47f2x3,_0x47f2x13):_0x47f2x4< _0x47f2x13?mxUtils[_0x1bfe[2010]](_0x47f2x14,_0x47f2x4,_0x47f2x15,_0x47f2x16,_0x47f2x12,_0x47f2x9,_0x47f2x3+ _0x47f2xa,_0x47f2x13):mxUtils[_0x1bfe[2010]](_0x47f2x14,_0x47f2x4,_0x47f2x15,_0x47f2x16,_0x47f2x12,_0x47f2x9+ _0x47f2x2,_0x47f2x3+ _0x47f2xa,_0x47f2x13)},TrianglePerimeter:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]][mxConstants[_0x1bfe[2011]]]:null;var _0x47f2x9=_0x47f2x3== mxConstants[_0x1bfe[1358]]|| _0x47f2x3== mxConstants[_0x1bfe[1354]],_0x47f2xa=_0x47f2x2[_0x1bfe[235]],_0x47f2x12=_0x47f2x2[_0x1bfe[236]],_0x47f2x13=_0x47f2x2[_0x1bfe[117]];_0x47f2x2= _0x47f2x2[_0x1bfe[119]];var _0x47f2x14=_0x47f2xa+ _0x47f2x13/ 2,_0x47f2x15=_0x47f2x12+ _0x47f2x2/ 2,_0x47f2x16= new mxPoint(_0x47f2xa,_0x47f2x12),_0x47f2x17= new mxPoint(_0x47f2xa+ _0x47f2x13,_0x47f2x15),_0x47f2x18= new mxPoint(_0x47f2xa,_0x47f2x12+ _0x47f2x2);_0x47f2x3== mxConstants[_0x1bfe[1358]]?(_0x47f2x16= _0x47f2x18,_0x47f2x17= new mxPoint(_0x47f2x14,_0x47f2x12),_0x47f2x18= new mxPoint(_0x47f2xa+ _0x47f2x13,_0x47f2x12+ _0x47f2x2)):_0x47f2x3== mxConstants[_0x1bfe[1354]]?(_0x47f2x17= new mxPoint(_0x47f2x14,_0x47f2x12+ _0x47f2x2),_0x47f2x18= new mxPoint(_0x47f2xa+ _0x47f2x13,_0x47f2x12)):_0x47f2x3== mxConstants[_0x1bfe[1359]]&& (_0x47f2x16= new mxPoint(_0x47f2xa+ _0x47f2x13,_0x47f2x12),_0x47f2x17= new mxPoint(_0x47f2xa,_0x47f2x15),_0x47f2x18= new mxPoint(_0x47f2xa+ _0x47f2x13,_0x47f2x12+ _0x47f2x2));var _0x47f2x19=_0x47f2x4[_0x1bfe[235]]- _0x47f2x14,_0x47f2x1a=_0x47f2x4[_0x1bfe[236]]- _0x47f2x15,_0x47f2x19=_0x47f2x9?Math[_0x1bfe[429]](_0x47f2x19,_0x47f2x1a):Math[_0x1bfe[429]](_0x47f2x1a,_0x47f2x19),_0x47f2x1b=_0x47f2x9?Math[_0x1bfe[429]](_0x47f2x13,_0x47f2x2):Math[_0x1bfe[429]](_0x47f2x2,_0x47f2x13),_0x47f2x1a=!1,_0x47f2x1a=_0x47f2x3== mxConstants[_0x1bfe[1358]]|| _0x47f2x3== mxConstants[_0x1bfe[1359]]?_0x47f2x19> -_0x47f2x1b&& _0x47f2x19< _0x47f2x1b:_0x47f2x19< -Math[_0x1bfe[424]]+ _0x47f2x1b|| _0x47f2x19> Math[_0x1bfe[424]]- _0x47f2x1b,_0x47f2x1b=null;_0x47f2x1a?_0x47f2x1b= _0x47f2x5&& (_0x47f2x9&& _0x47f2x4[_0x1bfe[235]]>= _0x47f2x16[_0x1bfe[235]]&& _0x47f2x4[_0x1bfe[235]]<= _0x47f2x18[_0x1bfe[235]]|| !_0x47f2x9&& _0x47f2x4[_0x1bfe[236]]>= _0x47f2x16[_0x1bfe[236]]&& _0x47f2x4[_0x1bfe[236]]<= _0x47f2x18[_0x1bfe[236]])?_0x47f2x9? new mxPoint(_0x47f2x4[_0x1bfe[235]],_0x47f2x16[_0x1bfe[236]]): new mxPoint(_0x47f2x16[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]]):_0x47f2x3== mxConstants[_0x1bfe[1358]]? new mxPoint(_0x47f2xa+ _0x47f2x13/ 2+ _0x47f2x2* Math[_0x1bfe[2008]](_0x47f2x19)/ 2,_0x47f2x12+ _0x47f2x2):_0x47f2x3== mxConstants[_0x1bfe[1354]]? new mxPoint(_0x47f2xa+ _0x47f2x13/ 2- _0x47f2x2* Math[_0x1bfe[2008]](_0x47f2x19)/ 2,_0x47f2x12):_0x47f2x3== mxConstants[_0x1bfe[1359]]? new mxPoint(_0x47f2xa+ _0x47f2x13,_0x47f2x12+ _0x47f2x2/ 2+ _0x47f2x13* Math[_0x1bfe[2008]](_0x47f2x19)/ 2): new mxPoint(_0x47f2xa,_0x47f2x12+ _0x47f2x2/ 2- _0x47f2x13* Math[_0x1bfe[2008]](_0x47f2x19)/ 2):(_0x47f2x5&& (_0x47f2x5= new mxPoint(_0x47f2x14,_0x47f2x15),_0x47f2x4[_0x1bfe[236]]>= _0x47f2x12&& _0x47f2x4[_0x1bfe[236]]<= _0x47f2x12+ _0x47f2x2?(_0x47f2x5[_0x1bfe[235]]= _0x47f2x9?_0x47f2x14:_0x47f2x3== mxConstants[_0x1bfe[1359]]?_0x47f2xa+ _0x47f2x13:_0x47f2xa,_0x47f2x5[_0x1bfe[236]]= _0x47f2x4[_0x1bfe[236]]):_0x47f2x4[_0x1bfe[235]]>= _0x47f2xa&& _0x47f2x4[_0x1bfe[235]]<= _0x47f2xa+ _0x47f2x13&& (_0x47f2x5[_0x1bfe[235]]= _0x47f2x4[_0x1bfe[235]],_0x47f2x5[_0x1bfe[236]]= !_0x47f2x9?_0x47f2x15:_0x47f2x3== mxConstants[_0x1bfe[1358]]?_0x47f2x12+ _0x47f2x2:_0x47f2x12),_0x47f2x14= _0x47f2x5[_0x1bfe[235]],_0x47f2x15= _0x47f2x5[_0x1bfe[236]]),_0x47f2x1b= _0x47f2x9&& _0x47f2x4[_0x1bfe[235]]<= _0x47f2xa+ _0x47f2x13/ 2|| !_0x47f2x9&& _0x47f2x4[_0x1bfe[236]]<= _0x47f2x12+ _0x47f2x2/ 2?mxUtils[_0x1bfe[2010]](_0x47f2x4[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]],_0x47f2x14,_0x47f2x15,_0x47f2x16[_0x1bfe[235]],_0x47f2x16[_0x1bfe[236]],_0x47f2x17[_0x1bfe[235]],_0x47f2x17[_0x1bfe[236]]):mxUtils[_0x1bfe[2010]](_0x47f2x4[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]],_0x47f2x14,_0x47f2x15,_0x47f2x17[_0x1bfe[235]],_0x47f2x17[_0x1bfe[236]],_0x47f2x18[_0x1bfe[235]],_0x47f2x18[_0x1bfe[236]]));null== _0x47f2x1b&& (_0x47f2x1b= new mxPoint(_0x47f2x14,_0x47f2x15));return _0x47f2x1b}};function mxPrintPreview(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14){this[_0x1bfe[1179]]= _0x47f2x2;this[_0x1bfe[255]]= null!= _0x47f2x3?_0x47f2x3:1/ _0x47f2x2[_0x1bfe[2012]];this[_0x1bfe[467]]= null!= _0x47f2x5?_0x47f2x5:0;this[_0x1bfe[2013]]= null!= _0x47f2x4?_0x47f2x4:_0x47f2x2[_0x1bfe[2013]];this[_0x1bfe[924]]= null!= _0x47f2x13?_0x47f2x13:_0x1bfe[2014];this[_0x1bfe[1732]]= null!= _0x47f2x9?_0x47f2x9:0;this[_0x1bfe[1733]]= null!= _0x47f2xa?_0x47f2xa:0;this[_0x1bfe[1630]]= _0x47f2x12;this[_0x1bfe[2015]]= null!= _0x47f2x14?_0x47f2x14:!0}mxPrintPreview[_0x1bfe[202]][_0x1bfe[1179]]= null;mxPrintPreview[_0x1bfe[202]][_0x1bfe[2013]]= null;mxPrintPreview[_0x1bfe[202]][_0x1bfe[255]]= null;mxPrintPreview[_0x1bfe[202]][_0x1bfe[467]]= 0;mxPrintPreview[_0x1bfe[202]][_0x1bfe[1732]]= 0;mxPrintPreview[_0x1bfe[202]][_0x1bfe[1733]]= 0;mxPrintPreview[_0x1bfe[202]][_0x1bfe[2016]]= !0;mxPrintPreview[_0x1bfe[202]][_0x1bfe[2017]]= !1;mxPrintPreview[_0x1bfe[202]][_0x1bfe[1630]]= null;mxPrintPreview[_0x1bfe[202]][_0x1bfe[924]]= null;mxPrintPreview[_0x1bfe[202]][_0x1bfe[2015]]= null;mxPrintPreview[_0x1bfe[202]][_0x1bfe[2018]]= null;mxPrintPreview[_0x1bfe[202]][_0x1bfe[2019]]= 0;mxPrintPreview[_0x1bfe[202]][_0x1bfe[2020]]= function(){return this[_0x1bfe[2018]]};mxPrintPreview[_0x1bfe[202]][_0x1bfe[2021]]= function(){var _0x47f2x2=_0x1bfe[110];8== document[_0x1bfe[5]]&& (_0x47f2x2= _0x1bfe[2022]);return _0x47f2x2};mxPrintPreview[_0x1bfe[202]][_0x1bfe[392]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[259]][_0x1bfe[2023]],_0x47f2x4=null;try{this[_0x1bfe[2017]]&& (this[_0x1bfe[1179]][_0x1bfe[259]][_0x1bfe[2023]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3[_0x1bfe[176]](_0x47f2x2[_0x1bfe[441]][_0x1bfe[2024]]())});if(null== this[_0x1bfe[2018]]){this[_0x1bfe[2018]]= window[_0x1bfe[392]]();var _0x47f2x5=this[_0x1bfe[2018]][_0x1bfe[395]],_0x47f2x9=this[_0x1bfe[2021]]();null!= _0x47f2x9&& 0< _0x47f2x9[_0x1bfe[67]]&& _0x47f2x5[_0x1bfe[171]](_0x47f2x9);_0x47f2x5[_0x1bfe[171]](_0x1bfe[528]);_0x47f2x5[_0x1bfe[171]](_0x1bfe[531]);this[_0x1bfe[2025]](_0x47f2x5,_0x47f2x2);_0x47f2x5[_0x1bfe[171]](_0x1bfe[533]);_0x47f2x5[_0x1bfe[171]](_0x1bfe[2026]);mxClient[_0x1bfe[54]](_0x1bfe[94],mxClient[_0x1bfe[86]]+ _0x1bfe[95],_0x47f2x5);mxClient[_0x1bfe[47]]&& (_0x47f2x5[_0x1bfe[100]][_0x1bfe[99]](_0x1bfe[6],_0x1bfe[97]),_0x47f2x5[_0x1bfe[100]][_0x1bfe[99]](_0x1bfe[7],_0x1bfe[101]),_0x47f2x5[_0x1bfe[102]]()[_0x1bfe[103]]= _0x1bfe[104],mxClient[_0x1bfe[54]](_0x1bfe[94],mxClient[_0x1bfe[86]]+ _0x1bfe[105],_0x47f2x5));var _0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[517]]()[_0x1bfe[238]](),_0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[518]](),_0x47f2x13=_0x47f2x12/ this[_0x1bfe[255]],_0x47f2x14=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[512]]();this[_0x1bfe[2016]]|| (this[_0x1bfe[1732]]= -_0x47f2x14[_0x1bfe[235]]* this[_0x1bfe[255]],this[_0x1bfe[1733]]= -_0x47f2x14[_0x1bfe[236]]* this[_0x1bfe[255]],_0x47f2xa[_0x1bfe[117]]+= _0x47f2xa[_0x1bfe[235]],_0x47f2xa[_0x1bfe[119]]+= _0x47f2xa[_0x1bfe[236]],_0x47f2xa[_0x1bfe[235]]= 0,this[_0x1bfe[467]]= _0x47f2xa[_0x1bfe[236]]= 0);_0x47f2xa[_0x1bfe[117]]/= _0x47f2x13;_0x47f2xa[_0x1bfe[119]]/= _0x47f2x13;var _0x47f2x15=this[_0x1bfe[2013]][_0x1bfe[117]]- 2* this[_0x1bfe[467]],_0x47f2x16=this[_0x1bfe[2013]][_0x1bfe[119]]- 2* this[_0x1bfe[467]],_0x47f2x17=Math[_0x1bfe[160]](1,Math[_0x1bfe[430]]((_0x47f2xa[_0x1bfe[117]]+ this[_0x1bfe[1732]])/ _0x47f2x15)),_0x47f2x18=Math[_0x1bfe[160]](1,Math[_0x1bfe[430]]((_0x47f2xa[_0x1bfe[119]]+ this[_0x1bfe[1733]])/ _0x47f2x16));this[_0x1bfe[2019]]= _0x47f2x17* _0x47f2x18;var _0x47f2x19=mxUtils[_0x1bfe[885]](this,function(){if(this[_0x1bfe[2015]]&& (1< _0x47f2x18|| 1< _0x47f2x17)){var _0x47f2x2=this[_0x1bfe[2027]](_0x47f2x18,_0x47f2x17);_0x47f2x5[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x2);if(mxClient[_0x1bfe[80]]){_0x47f2x2[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];var _0x47f2x3=function(){_0x47f2x2[_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x5[_0x1bfe[112]][_0x1bfe[190]]+ 10+ _0x1bfe[168]};mxEvent[_0x1bfe[169]](this[_0x1bfe[2018]],_0x1bfe[276],function(_0x47f2x2){_0x47f2x3()});mxEvent[_0x1bfe[169]](this[_0x1bfe[2018]],_0x1bfe[129],function(_0x47f2x2){_0x47f2x3()})}}});_0x47f2x2= function(_0x47f2x2,_0x47f2x3){null!= this[_0x1bfe[1630]]&& (_0x47f2x2[_0x1bfe[124]][_0x1bfe[1630]]= this[_0x1bfe[1630]],_0x47f2x2[_0x1bfe[124]][_0x1bfe[465]]= _0x1bfe[1631],_0x47f2x2[_0x1bfe[124]][_0x1bfe[1629]]= _0x1bfe[942]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[1537]]= _0x1bfe[1391];_0x47f2x3&& (_0x47f2x2[_0x1bfe[124]][_0x1bfe[2028]]= _0x1bfe[2029]);mxClient[_0x1bfe[80]]?(_0x47f2x5[_0x1bfe[171]](_0x47f2x2[_0x1bfe[342]]),_0x47f2x2[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x2)):(_0x47f2x2[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x2),_0x47f2x5[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x2));if(_0x47f2x3){var _0x47f2x4=_0x47f2x5[_0x1bfe[55]](_0x1bfe[1054]);_0x47f2x4[_0x1bfe[926]]= _0x1bfe[2030];_0x47f2x5[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x4)}};var _0x47f2x1a=this[_0x1bfe[2031]](this[_0x1bfe[2013]][_0x1bfe[117]],this[_0x1bfe[2013]][_0x1bfe[119]]);if(null!= _0x47f2x1a){for(var _0x47f2x1b=0;_0x47f2x1b< _0x47f2x1a[_0x1bfe[67]];_0x47f2x1b++){_0x47f2x2(_0x47f2x1a[_0x47f2x1b],!0)}};for(var _0x47f2x1c=this[_0x1bfe[2032]](this[_0x1bfe[2013]][_0x1bfe[117]],this[_0x1bfe[2013]][_0x1bfe[119]]),_0x47f2x1b=0;_0x47f2x1b< _0x47f2x18;_0x47f2x1b++){for(var _0x47f2x1d=_0x47f2x1b* _0x47f2x16/ this[_0x1bfe[255]]- this[_0x1bfe[1733]]/ this[_0x1bfe[255]]+ (_0x47f2xa[_0x1bfe[236]]- _0x47f2x14[_0x1bfe[236]]* _0x47f2x12)/ _0x47f2x12,_0x47f2x1a=0;_0x47f2x1a< _0x47f2x17;_0x47f2x1a++){if(null== this[_0x1bfe[2018]]){return null};var _0x47f2x1e=_0x47f2x1a* _0x47f2x15/ this[_0x1bfe[255]]- this[_0x1bfe[1732]]/ this[_0x1bfe[255]]+ (_0x47f2xa[_0x1bfe[235]]- _0x47f2x14[_0x1bfe[235]]* _0x47f2x12)/ _0x47f2x12,_0x47f2x1f=_0x47f2x1b* _0x47f2x17+ _0x47f2x1a+ 1,_0x47f2x4=this[_0x1bfe[2034]](this[_0x1bfe[2013]][_0x1bfe[117]],this[_0x1bfe[2013]][_0x1bfe[119]],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[2033]](-_0x47f2x1e,-_0x47f2x1d,this[_0x1bfe[255]],_0x47f2x1f,_0x47f2x2)}));_0x47f2x4[_0x1bfe[57]](_0x1bfe[1363],_0x1bfe[2035]+ _0x47f2x1f);_0x47f2x2(_0x47f2x4,null!= _0x47f2x1c|| _0x47f2x1b< _0x47f2x18- 1|| _0x47f2x1a< _0x47f2x17- 1)}};if(null!= _0x47f2x1c){for(_0x47f2x1b= 0;_0x47f2x1b< _0x47f2x1c[_0x1bfe[67]];_0x47f2x1b++){_0x47f2x2(_0x47f2x1c[_0x47f2x1b],_0x47f2x1b< _0x47f2x1c[_0x1bfe[67]])}};_0x47f2x5[_0x1bfe[171]](_0x1bfe[527]);_0x47f2x5[_0x1bfe[171]](_0x1bfe[534]);_0x47f2x5[_0x1bfe[268]]();_0x47f2x19();mxEvent[_0x1bfe[762]](_0x47f2x5[_0x1bfe[112]])};this[_0x1bfe[2018]][_0x1bfe[393]]()}catch(y){null!= _0x47f2x4&& null!= _0x47f2x4[_0x1bfe[265]]&& _0x47f2x4[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x4)}finally{this[_0x1bfe[1179]][_0x1bfe[259]][_0x1bfe[2023]]= _0x47f2x3};return this[_0x1bfe[2018]]};mxPrintPreview[_0x1bfe[202]][_0x1bfe[2025]]= function(_0x47f2x2,_0x47f2x3){null!= this[_0x1bfe[924]]&& _0x47f2x2[_0x1bfe[171]](_0x1bfe[2036]+ this[_0x1bfe[924]]+ _0x1bfe[2037]);_0x47f2x2[_0x1bfe[171]](_0x1bfe[2038]);_0x47f2x2[_0x1bfe[171]](_0x1bfe[2039]);_0x47f2x2[_0x1bfe[171]](_0x1bfe[2040]);_0x47f2x2[_0x1bfe[171]](_0x1bfe[2041]);_0x47f2x2[_0x1bfe[171]](_0x1bfe[233]);_0x47f2x2[_0x1bfe[171]](_0x1bfe[2042]);_0x47f2x2[_0x1bfe[171]](_0x1bfe[2043]);_0x47f2x2[_0x1bfe[171]](_0x1bfe[2044]);_0x47f2x2[_0x1bfe[171]](_0x1bfe[2045]);_0x47f2x2[_0x1bfe[171]](_0x1bfe[233]);null!= _0x47f2x3&& _0x47f2x2[_0x1bfe[171]](_0x47f2x3);_0x47f2x2[_0x1bfe[171]](_0x1bfe[2046])};mxPrintPreview[_0x1bfe[202]][_0x1bfe[2027]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[2018]][_0x1bfe[395]],_0x47f2x5=_0x47f2x4[_0x1bfe[55]](_0x1bfe[116]);_0x47f2x5[_0x1bfe[926]]= _0x1bfe[2047];_0x47f2x5[_0x1bfe[57]](_0x1bfe[467],_0x1bfe[468]);for(var _0x47f2x9=_0x47f2x4[_0x1bfe[55]](_0x1bfe[120]),_0x47f2xa=0;_0x47f2xa< _0x47f2x2;_0x47f2xa++){for(var _0x47f2x12=_0x47f2x4[_0x1bfe[55]](_0x1bfe[121]),_0x47f2x13=0;_0x47f2x13< _0x47f2x3;_0x47f2x13++){var _0x47f2x14=_0x47f2xa* _0x47f2x3+ _0x47f2x13+ 1,_0x47f2x15=_0x47f2x4[_0x1bfe[55]](_0x1bfe[122]);if(!mxClient[_0x1bfe[133]]|| mxClient[_0x1bfe[75]]|| mxClient[_0x1bfe[76]]){var _0x47f2x16=_0x47f2x4[_0x1bfe[55]](_0x1bfe[2048]);_0x47f2x16[_0x1bfe[57]](_0x1bfe[44],_0x1bfe[2049]+ _0x47f2x14);mxUtils[_0x1bfe[53]](_0x47f2x16,_0x47f2x14,_0x47f2x4);_0x47f2x15[_0x1bfe[62]](_0x47f2x16)}else {mxUtils[_0x1bfe[53]](_0x47f2x15,_0x47f2x14,_0x47f2x4)};_0x47f2x12[_0x1bfe[62]](_0x47f2x15)};_0x47f2x9[_0x1bfe[62]](_0x47f2x12)};_0x47f2x5[_0x1bfe[62]](_0x47f2x9);return _0x47f2x5};mxPrintPreview[_0x1bfe[202]][_0x1bfe[2034]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=document[_0x1bfe[55]](_0x1bfe[485]);try{_0x47f2x5[_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x2+ _0x1bfe[168];_0x47f2x5[_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x3+ _0x1bfe[168];_0x47f2x5[_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[188];_0x47f2x5[_0x1bfe[124]][_0x1bfe[2050]]= _0x1bfe[1824];_0x47f2x5[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[1500];var _0x47f2x9=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x9[_0x1bfe[124]][_0x1bfe[125]]= this[_0x1bfe[467]]+ _0x1bfe[168];_0x47f2x9[_0x1bfe[124]][_0x1bfe[361]]= this[_0x1bfe[467]]+ _0x1bfe[168];_0x47f2x9[_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x2- 2* this[_0x1bfe[467]]+ _0x1bfe[168];_0x47f2x9[_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x3- 2* this[_0x1bfe[467]]+ _0x1bfe[168];_0x47f2x9[_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[188];this[_0x1bfe[1179]][_0x1bfe[507]]== mxConstants[_0x1bfe[1523]]&& (_0x47f2x9[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492]);_0x47f2x5[_0x1bfe[62]](_0x47f2x9);document[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x5);_0x47f2x4(_0x47f2x9)}catch(f){throw _0x47f2x5[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x5),f};return _0x47f2x5};mxPrintPreview[_0x1bfe[202]][_0x1bfe[2033]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x5= this[_0x1bfe[1179]][_0x1bfe[249]]();var _0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[526]];this[_0x1bfe[1179]][_0x1bfe[526]]= _0x47f2x9;var _0x47f2x12=_0x47f2x5[_0x1bfe[2051]](),_0x47f2x13=_0x47f2x5[_0x1bfe[2052]](),_0x47f2x14=_0x47f2x5[_0x1bfe[2024]](),_0x47f2x15=_0x47f2x5[_0x1bfe[1524]]();this[_0x1bfe[1179]][_0x1bfe[507]]== mxConstants[_0x1bfe[508]]?_0x47f2x5[_0x1bfe[1569]]():this[_0x1bfe[1179]][_0x1bfe[507]]== mxConstants[_0x1bfe[1523]]?_0x47f2x5[_0x1bfe[1571]]():_0x47f2x5[_0x1bfe[1570]]();var _0x47f2x16=_0x47f2x5[_0x1bfe[503]]();_0x47f2x5[_0x1bfe[504]](!1);var _0x47f2x17=this[_0x1bfe[1179]][_0x1bfe[994]]();this[_0x1bfe[1179]][_0x1bfe[995]](!1);var _0x47f2x18=_0x47f2x5[_0x1bfe[512]]();_0x47f2x5[_0x1bfe[513]]= new mxPoint(_0x47f2x2,_0x47f2x3);_0x47f2x2= null;try{var _0x47f2x19=[this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[501]]()];_0x47f2x2= new mxTemporaryCellStates(_0x47f2x5,_0x47f2x4,_0x47f2x19)}finally{if(mxClient[_0x1bfe[80]]){_0x47f2x5[_0x1bfe[506]][_0x1bfe[339]]= _0x1bfe[110]}else {for(_0x47f2x4= _0x47f2x9[_0x1bfe[285]];null!= _0x47f2x4;){_0x47f2x19= _0x47f2x4[_0x1bfe[287]],_0x47f2x3= _0x47f2x4[_0x1bfe[301]][_0x1bfe[216]](),_0x1bfe[571]== _0x47f2x3?(_0x47f2x4[_0x1bfe[57]](_0x1bfe[117],parseInt(_0x47f2x9[_0x1bfe[124]][_0x1bfe[117]])),_0x47f2x4[_0x1bfe[57]](_0x1bfe[119],parseInt(_0x47f2x9[_0x1bfe[124]][_0x1bfe[119]]))):_0x1bfe[583]!= _0x47f2x4[_0x1bfe[124]][_0x1bfe[270]]&& _0x1bfe[116]!= _0x47f2x3&& _0x47f2x4[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x4),_0x47f2x4= _0x47f2x19}};_0x47f2x5[_0x1bfe[506]][_0x1bfe[265]][_0x1bfe[266]](_0x47f2x5[_0x1bfe[506]]);this[_0x1bfe[1179]][_0x1bfe[995]](_0x47f2x17);this[_0x1bfe[1179]][_0x1bfe[526]]= _0x47f2xa;_0x47f2x5[_0x1bfe[510]]= _0x47f2x12;_0x47f2x5[_0x1bfe[2053]]= _0x47f2x13;_0x47f2x5[_0x1bfe[505]]= _0x47f2x14;_0x47f2x5[_0x1bfe[506]]= _0x47f2x15;_0x47f2x5[_0x1bfe[513]]= _0x47f2x18;_0x47f2x2[_0x1bfe[515]]();_0x47f2x5[_0x1bfe[504]](_0x47f2x16)}};mxPrintPreview[_0x1bfe[202]][_0x1bfe[2031]]= function(){return null};mxPrintPreview[_0x1bfe[202]][_0x1bfe[2032]]= function(){return null};mxPrintPreview[_0x1bfe[202]][_0x1bfe[540]]= function(){var _0x47f2x2=this[_0x1bfe[392]]();null!= _0x47f2x2&& _0x47f2x2[_0x1bfe[540]]()};mxPrintPreview[_0x1bfe[202]][_0x1bfe[268]]= function(){null!= this[_0x1bfe[2018]]&& (this[_0x1bfe[2018]][_0x1bfe[268]](),this[_0x1bfe[2018]]= null)};function mxStylesheet(){this[_0x1bfe[2054]]= {};this[_0x1bfe[2056]](this[_0x1bfe[2055]]());this[_0x1bfe[2058]](this[_0x1bfe[2057]]())}mxStylesheet[_0x1bfe[202]][_0x1bfe[2055]]= function(){var _0x47f2x2={};_0x47f2x2[mxConstants[_0x1bfe[2059]]]= mxConstants[_0x1bfe[2060]];_0x47f2x2[mxConstants[_0x1bfe[2061]]]= mxPerimeter[_0x1bfe[2062]];_0x47f2x2[mxConstants[_0x1bfe[2063]]]= mxConstants[_0x1bfe[481]];_0x47f2x2[mxConstants[_0x1bfe[2064]]]= mxConstants[_0x1bfe[479]];_0x47f2x2[mxConstants[_0x1bfe[2065]]]= _0x1bfe[2066];_0x47f2x2[mxConstants[_0x1bfe[2067]]]= _0x1bfe[2068];_0x47f2x2[mxConstants[_0x1bfe[2069]]]= _0x1bfe[2070];return _0x47f2x2};mxStylesheet[_0x1bfe[202]][_0x1bfe[2057]]= function(){var _0x47f2x2={};_0x47f2x2[mxConstants[_0x1bfe[2059]]]= mxConstants[_0x1bfe[2071]];_0x47f2x2[mxConstants[_0x1bfe[1695]]]= mxConstants[_0x1bfe[1622]];_0x47f2x2[mxConstants[_0x1bfe[2063]]]= mxConstants[_0x1bfe[481]];_0x47f2x2[mxConstants[_0x1bfe[2064]]]= mxConstants[_0x1bfe[479]];_0x47f2x2[mxConstants[_0x1bfe[2067]]]= _0x1bfe[2068];_0x47f2x2[mxConstants[_0x1bfe[2069]]]= _0x1bfe[2072];return _0x47f2x2};mxStylesheet[_0x1bfe[202]][_0x1bfe[2056]]= function(_0x47f2x2){this[_0x1bfe[2074]](_0x1bfe[2073],_0x47f2x2)};mxStylesheet[_0x1bfe[202]][_0x1bfe[2058]]= function(_0x47f2x2){this[_0x1bfe[2074]](_0x1bfe[2075],_0x47f2x2)};mxStylesheet[_0x1bfe[202]][_0x1bfe[2076]]= function(){return this[_0x1bfe[2054]][_0x1bfe[2073]]};mxStylesheet[_0x1bfe[202]][_0x1bfe[2077]]= function(){return this[_0x1bfe[2054]][_0x1bfe[2075]]};mxStylesheet[_0x1bfe[202]][_0x1bfe[2074]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[2054]][_0x47f2x2]= _0x47f2x3};mxStylesheet[_0x1bfe[202]][_0x1bfe[1705]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x3;if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]){for(var _0x47f2x5=_0x47f2x2[_0x1bfe[224]](_0x1bfe[471]),_0x47f2x4=null!= _0x47f2x4&& _0x1bfe[471]!= _0x47f2x2[_0x1bfe[225]](0)?mxUtils[_0x1bfe[238]](_0x47f2x4):{},_0x47f2x9=0;_0x47f2x9< _0x47f2x5[_0x1bfe[67]];_0x47f2x9++){var _0x47f2xa=_0x47f2x5[_0x47f2x9],_0x47f2x12=_0x47f2xa[_0x1bfe[2]](_0x1bfe[226]);if(0<= _0x47f2x12){var _0x47f2x13=_0x47f2xa[_0x1bfe[85]](0,_0x47f2x12),_0x47f2xa=_0x47f2xa[_0x1bfe[85]](_0x47f2x12+ 1);_0x47f2xa== mxConstants[_0x1bfe[217]]? delete _0x47f2x4[_0x47f2x13]:mxUtils[_0x1bfe[1946]](_0x47f2xa)?_0x47f2x4[_0x47f2x13]= parseFloat(_0x47f2xa):_0x47f2x4[_0x47f2x13]= _0x47f2xa}else {if(_0x47f2xa= this[_0x1bfe[2054]][_0x47f2xa],null!= _0x47f2xa){for(_0x47f2x13 in _0x47f2xa){_0x47f2x4[_0x47f2x13]= _0x47f2xa[_0x47f2x13]}}}}};return _0x47f2x4};function mxCellState(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[441]]= _0x47f2x2;this[_0x1bfe[246]]= _0x47f2x3;this[_0x1bfe[124]]= _0x47f2x4;this[_0x1bfe[2078]]= new mxPoint;this[_0x1bfe[2079]]= new mxPoint}mxCellState[_0x1bfe[202]]= new mxRectangle;mxCellState[_0x1bfe[202]][_0x1bfe[196]]= mxCellState;mxCellState[_0x1bfe[202]][_0x1bfe[441]]= null;mxCellState[_0x1bfe[202]][_0x1bfe[246]]= null;mxCellState[_0x1bfe[202]][_0x1bfe[124]]= null;mxCellState[_0x1bfe[202]][_0x1bfe[2080]]= !0;mxCellState[_0x1bfe[202]][_0x1bfe[2081]]= !1;mxCellState[_0x1bfe[202]][_0x1bfe[2082]]= !1;mxCellState[_0x1bfe[202]][_0x1bfe[2078]]= null;mxCellState[_0x1bfe[202]][_0x1bfe[439]]= null;mxCellState[_0x1bfe[202]][_0x1bfe[2079]]= null;mxCellState[_0x1bfe[202]][_0x1bfe[2083]]= null;mxCellState[_0x1bfe[202]][_0x1bfe[2084]]= null;mxCellState[_0x1bfe[202]][_0x1bfe[2085]]= 0;mxCellState[_0x1bfe[202]][_0x1bfe[67]]= 0;mxCellState[_0x1bfe[202]][_0x1bfe[2086]]= null;mxCellState[_0x1bfe[202]][_0x1bfe[253]]= null;mxCellState[_0x1bfe[202]][_0x1bfe[963]]= null;mxCellState[_0x1bfe[202]][_0x1bfe[2087]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x2= _0x47f2x2|| 0;_0x47f2x3= null!= _0x47f2x3?_0x47f2x3: new mxRectangle(this[_0x1bfe[235]],this[_0x1bfe[236]],this[_0x1bfe[117]],this[_0x1bfe[119]]);if(null!= this[_0x1bfe[253]]&& null!= this[_0x1bfe[253]][_0x1bfe[1561]]){var _0x47f2x4=this[_0x1bfe[253]][_0x1bfe[1561]][_0x1bfe[1548]](this[_0x1bfe[124]],_0x47f2x3[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]],_0x47f2x3[_0x1bfe[117]],_0x47f2x3[_0x1bfe[119]]);_0x47f2x3[_0x1bfe[235]]= _0x47f2x4[_0x1bfe[235]];_0x47f2x3[_0x1bfe[236]]= _0x47f2x4[_0x1bfe[236]];_0x47f2x3[_0x1bfe[117]]= this[_0x1bfe[253]][_0x1bfe[1561]][_0x1bfe[1532]]* _0x47f2x4[_0x1bfe[117]];_0x47f2x3[_0x1bfe[119]]= this[_0x1bfe[253]][_0x1bfe[1561]][_0x1bfe[1533]]* _0x47f2x4[_0x1bfe[119]]};0!= _0x47f2x2&& _0x47f2x3[_0x1bfe[244]](_0x47f2x2);return _0x47f2x3};mxCellState[_0x1bfe[202]][_0x1bfe[2088]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3?(null== this[_0x1bfe[439]]&& (this[_0x1bfe[439]]= []),0== this[_0x1bfe[439]][_0x1bfe[67]]?this[_0x1bfe[439]][_0x1bfe[207]](_0x47f2x2):this[_0x1bfe[439]][0]= _0x47f2x2):null== this[_0x1bfe[439]]?(this[_0x1bfe[439]]= [],this[_0x1bfe[439]][_0x1bfe[207]](null),this[_0x1bfe[439]][_0x1bfe[207]](_0x47f2x2)):1== this[_0x1bfe[439]][_0x1bfe[67]]?this[_0x1bfe[439]][_0x1bfe[207]](_0x47f2x2):this[_0x1bfe[439]][this[_0x1bfe[439]][_0x1bfe[67]]- 1]= _0x47f2x2};mxCellState[_0x1bfe[202]][_0x1bfe[1609]]= function(_0x47f2x2){null!= this[_0x1bfe[253]]&& this[_0x1bfe[253]][_0x1bfe[1609]](_0x47f2x2);null!= this[_0x1bfe[963]]&& this[_0x1bfe[963]][_0x1bfe[1609]](_0x47f2x2)};mxCellState[_0x1bfe[202]][_0x1bfe[1710]]= function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[2089]](_0x47f2x2);return null!= _0x47f2x2?_0x47f2x2[_0x1bfe[246]]:null};mxCellState[_0x1bfe[202]][_0x1bfe[2089]]= function(_0x47f2x2){return _0x47f2x2?this[_0x1bfe[2083]]:this[_0x1bfe[2084]]};mxCellState[_0x1bfe[202]][_0x1bfe[2090]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3?this[_0x1bfe[2083]]= _0x47f2x2:this[_0x1bfe[2084]]= _0x47f2x2};mxCellState[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[259]][_0x1bfe[515]](this)};mxCellState[_0x1bfe[202]][_0x1bfe[238]]= function(){var _0x47f2x2= new mxCellState(this[_0x1bfe[441]],this[_0x1bfe[246]],this[_0x1bfe[124]]);if(null!= this[_0x1bfe[439]]){_0x47f2x2[_0x1bfe[439]]= [];for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[439]][_0x1bfe[67]];_0x47f2x3++){_0x47f2x2[_0x1bfe[439]][_0x47f2x3]= this[_0x1bfe[439]][_0x47f2x3][_0x1bfe[238]]()}};null!= this[_0x1bfe[2078]]&& (_0x47f2x2[_0x1bfe[2078]]= this[_0x1bfe[2078]][_0x1bfe[238]]());null!= this[_0x1bfe[2079]]&& (_0x47f2x2[_0x1bfe[2079]]= this[_0x1bfe[2079]][_0x1bfe[238]]());null!= this[_0x1bfe[1563]]&& (_0x47f2x2[_0x1bfe[1563]]= this[_0x1bfe[1563]][_0x1bfe[238]]());_0x47f2x2[_0x1bfe[2085]]= this[_0x1bfe[2085]];_0x47f2x2[_0x1bfe[2086]]= this[_0x1bfe[2086]];_0x47f2x2[_0x1bfe[67]]= this[_0x1bfe[67]];_0x47f2x2[_0x1bfe[235]]= this[_0x1bfe[235]];_0x47f2x2[_0x1bfe[236]]= this[_0x1bfe[236]];_0x47f2x2[_0x1bfe[117]]= this[_0x1bfe[117]];_0x47f2x2[_0x1bfe[119]]= this[_0x1bfe[119]];return _0x47f2x2};function mxGraphSelectionModel(_0x47f2x2){this[_0x1bfe[1179]]= _0x47f2x2;this[_0x1bfe[895]]= []}mxGraphSelectionModel[_0x1bfe[202]]= new mxEventSource;mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[196]]= mxGraphSelectionModel;mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2091]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[819]:_0x1bfe[110];mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2092]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[2093]:_0x1bfe[110];mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[1179]]= null;mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2094]]= !1;mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2095]]= function(){return this[_0x1bfe[2094]]};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2096]]= function(_0x47f2x2){this[_0x1bfe[2094]]= _0x47f2x2};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2097]]= function(_0x47f2x2){return null!= _0x47f2x2?0<= mxUtils[_0x1bfe[2]](this[_0x1bfe[895]],_0x47f2x2):!1};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[1107]]= function(){return 0== this[_0x1bfe[895]][_0x1bfe[67]]};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[200]]= function(){this[_0x1bfe[2098]](null,this[_0x1bfe[895]])};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2099]]= function(_0x47f2x2){null!= _0x47f2x2&& this[_0x1bfe[2100]]([_0x47f2x2])};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2100]]= function(_0x47f2x2){if(null!= _0x47f2x2){this[_0x1bfe[2094]]&& (_0x47f2x2= [this[_0x1bfe[2101]](_0x47f2x2)]);for(var _0x47f2x3=[],_0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){this[_0x1bfe[1179]][_0x1bfe[2102]](_0x47f2x2[_0x47f2x4])&& _0x47f2x3[_0x1bfe[207]](_0x47f2x2[_0x47f2x4])};this[_0x1bfe[2098]](_0x47f2x3,this[_0x1bfe[895]])}};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2101]]= function(_0x47f2x2){if(null!= _0x47f2x2){for(var _0x47f2x3=0;_0x47f2x3< _0x47f2x2[_0x1bfe[67]];_0x47f2x3++){if(this[_0x1bfe[1179]][_0x1bfe[2102]](_0x47f2x2[_0x47f2x3])){return _0x47f2x2[_0x47f2x3]}}};return null};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2103]]= function(_0x47f2x2){null!= _0x47f2x2&& this[_0x1bfe[832]]([_0x47f2x2])};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[832]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=null;this[_0x1bfe[2094]]&& (_0x47f2x3= this[_0x1bfe[895]],_0x47f2x2= [this[_0x1bfe[2101]](_0x47f2x2)]);for(var _0x47f2x4=[],_0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){!this[_0x1bfe[2097]](_0x47f2x2[_0x47f2x5])&& this[_0x1bfe[1179]][_0x1bfe[2102]](_0x47f2x2[_0x47f2x5])&& _0x47f2x4[_0x1bfe[207]](_0x47f2x2[_0x47f2x5])};this[_0x1bfe[2098]](_0x47f2x4,_0x47f2x3)}};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2104]]= function(_0x47f2x2){null!= _0x47f2x2&& this[_0x1bfe[842]]([_0x47f2x2])};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[842]]= function(_0x47f2x2){if(null!= _0x47f2x2){for(var _0x47f2x3=[],_0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){this[_0x1bfe[2097]](_0x47f2x2[_0x47f2x4])&& _0x47f2x3[_0x1bfe[207]](_0x47f2x2[_0x47f2x4])};this[_0x1bfe[2098]](null,_0x47f2x3)}};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[2098]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]&& null!= _0x47f2x2[0]|| null!= _0x47f2x3&& 0< _0x47f2x3[_0x1bfe[67]]&& null!= _0x47f2x3[0]){var _0x47f2x4= new mxSelectionChange(this,_0x47f2x2,_0x47f2x3);_0x47f2x4[_0x1bfe[350]]();var _0x47f2x5= new mxUndoableEdit(this,!1);_0x47f2x5[_0x1bfe[99]](_0x47f2x4);this[_0x1bfe[746]]( new mxEventObject(mxEvent.UNDO,_0x1bfe[1061],_0x47f2x5))}};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[1941]]= function(_0x47f2x2){null!= _0x47f2x2&& !this[_0x1bfe[2097]](_0x47f2x2)&& this[_0x1bfe[895]][_0x1bfe[207]](_0x47f2x2)};mxGraphSelectionModel[_0x1bfe[202]][_0x1bfe[1102]]= function(_0x47f2x2){null!= _0x47f2x2&& (_0x47f2x2= mxUtils[_0x1bfe[2]](this[_0x1bfe[895]],_0x47f2x2),0<= _0x47f2x2&& this[_0x1bfe[895]][_0x1bfe[300]](_0x47f2x2,1))};function mxSelectionChange(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[2105]]= _0x47f2x2;this[_0x1bfe[2106]]= null!= _0x47f2x3?_0x47f2x3[_0x1bfe[1853]]():null;this[_0x1bfe[2107]]= null!= _0x47f2x4?_0x47f2x4[_0x1bfe[1853]]():null}mxSelectionChange[_0x1bfe[202]][_0x1bfe[350]]= function(){var _0x47f2x2=mxLog[_0x1bfe[2109]](_0x1bfe[2108]);window[_0x1bfe[879]]= mxResources[_0x1bfe[203]](this[_0x1bfe[2105]][_0x1bfe[2092]])|| this[_0x1bfe[2105]][_0x1bfe[2092]];if(null!= this[_0x1bfe[2107]]){for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[2107]][_0x1bfe[67]];_0x47f2x3++){this[_0x1bfe[2105]][_0x1bfe[1102]](this[_0x1bfe[2107]][_0x47f2x3])}};if(null!= this[_0x1bfe[2106]]){for(_0x47f2x3= 0;_0x47f2x3< this[_0x1bfe[2106]][_0x1bfe[67]];_0x47f2x3++){this[_0x1bfe[2105]][_0x1bfe[1941]](this[_0x1bfe[2106]][_0x47f2x3])}};_0x47f2x3= this[_0x1bfe[2106]];this[_0x1bfe[2106]]= this[_0x1bfe[2107]];this[_0x1bfe[2107]]= _0x47f2x3;window[_0x1bfe[879]]= mxResources[_0x1bfe[203]](this[_0x1bfe[2105]][_0x1bfe[2091]])|| this[_0x1bfe[2105]][_0x1bfe[2091]];mxLog[_0x1bfe[2110]](_0x1bfe[2108],_0x47f2x2);this[_0x1bfe[2105]][_0x1bfe[746]]( new mxEventObject(mxEvent.CHANGE,_0x1bfe[2106],this[_0x1bfe[2106]],_0x1bfe[2107],this[_0x1bfe[2107]]))};function mxCellEditor(_0x47f2x2){this[_0x1bfe[1179]]= _0x47f2x2}mxCellEditor[_0x1bfe[202]][_0x1bfe[1179]]= null;mxCellEditor[_0x1bfe[202]][_0x1bfe[126]]= null;mxCellEditor[_0x1bfe[202]][_0x1bfe[2111]]= null;mxCellEditor[_0x1bfe[202]][_0x1bfe[2112]]= null;mxCellEditor[_0x1bfe[202]][_0x1bfe[2113]]= !1;mxCellEditor[_0x1bfe[202]][_0x1bfe[2114]]= !0;mxCellEditor[_0x1bfe[202]][_0x1bfe[2115]]= _0x1bfe[110];mxCellEditor[_0x1bfe[202]][_0x1bfe[2116]]= _0x1bfe[110];mxCellEditor[_0x1bfe[202]][_0x1bfe[176]]= function(){this[_0x1bfe[126]]= document[_0x1bfe[55]](_0x1bfe[126]);this[_0x1bfe[126]][_0x1bfe[926]]= _0x1bfe[2117];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[189];this[_0x1bfe[126]][_0x1bfe[57]](_0x1bfe[2118],_0x1bfe[2119]);this[_0x1bfe[126]][_0x1bfe[57]](_0x1bfe[969],_0x1bfe[2120]);mxClient[_0x1bfe[133]]&& (this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[129]]= _0x1bfe[130]);mxEvent[_0x1bfe[169]](this[_0x1bfe[126]],_0x1bfe[2121],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[2122]]()}));mxEvent[_0x1bfe[169]](this[_0x1bfe[126]],_0x1bfe[2123],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){mxEvent[_0x1bfe[721]](_0x47f2x2)|| (113== _0x47f2x2[_0x1bfe[2124]]|| this[_0x1bfe[1179]][_0x1bfe[2125]]()&& 13== _0x47f2x2[_0x1bfe[2124]]&& !mxEvent[_0x1bfe[775]](_0x47f2x2)&& !mxEvent[_0x1bfe[774]](_0x47f2x2)?(this[_0x1bfe[1179]][_0x1bfe[2126]](!1),mxEvent[_0x1bfe[722]](_0x47f2x2)):27== _0x47f2x2[_0x1bfe[2124]]?(this[_0x1bfe[1179]][_0x1bfe[2126]](!0),mxEvent[_0x1bfe[722]](_0x47f2x2)):(this[_0x1bfe[2127]]&& (this[_0x1bfe[2127]]= !1,this[_0x1bfe[126]][_0x1bfe[131]]= _0x1bfe[110]),this[_0x1bfe[2128]](!0)))}));mxEvent[_0x1bfe[169]](this[_0x1bfe[126]],_0x1bfe[2129],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[2114]]&& !mxEvent[_0x1bfe[721]](_0x47f2x2)&& setTimeout(mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[129]]()}),0)}))};mxCellEditor[_0x1bfe[202]][_0x1bfe[129]]= function(){if(null!= this[_0x1bfe[1653]]){var _0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](this[_0x1bfe[2111]]),_0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[2130]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[2131]](_0x47f2x2[_0x1bfe[246]]);if(this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]])){this[_0x1bfe[1562]][_0x1bfe[235]]= _0x47f2x2[_0x1bfe[2079]][_0x1bfe[235]],this[_0x1bfe[1562]][_0x1bfe[236]]= _0x47f2x2[_0x1bfe[2079]][_0x1bfe[236]],this[_0x1bfe[1562]][_0x1bfe[117]]= 0,this[_0x1bfe[1562]][_0x1bfe[119]]= 0}else {if(null!= this[_0x1bfe[1562]]){this[_0x1bfe[1562]][_0x1bfe[235]]= _0x47f2x2[_0x1bfe[235]];this[_0x1bfe[1562]][_0x1bfe[236]]= _0x47f2x2[_0x1bfe[236]];this[_0x1bfe[1562]][_0x1bfe[117]]= _0x47f2x2[_0x1bfe[117]];this[_0x1bfe[1562]][_0x1bfe[119]]= _0x47f2x2[_0x1bfe[119]];var _0x47f2x5=mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);_0x47f2x5== mxConstants[_0x1bfe[2132]]?this[_0x1bfe[1562]][_0x1bfe[235]]-= _0x47f2x2[_0x1bfe[117]]:_0x47f2x5== mxConstants[_0x1bfe[480]]&& (this[_0x1bfe[1562]][_0x1bfe[235]]+= _0x47f2x2[_0x1bfe[117]]);_0x47f2x5= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);_0x47f2x5== mxConstants[_0x1bfe[1687]]?this[_0x1bfe[1562]][_0x1bfe[236]]-= _0x47f2x2[_0x1bfe[119]]:_0x47f2x5== mxConstants[_0x1bfe[482]]&& (this[_0x1bfe[1562]][_0x1bfe[236]]+= _0x47f2x2[_0x1bfe[119]])}};_0x47f2x5= this[_0x1bfe[126]][_0x1bfe[131]];if(_0x1bfe[192]== _0x47f2x5[_0x1bfe[225]](_0x47f2x5[_0x1bfe[67]]- 1)|| _0x1bfe[110]== _0x47f2x5){_0x47f2x5+= _0x1bfe[544]};_0x47f2x5= mxUtils[_0x1bfe[321]](_0x47f2x5,!1);_0x47f2x4?(this[_0x1bfe[1653]][_0x1bfe[124]][_0x1bfe[493]]= _0x1bfe[1502],this[_0x1bfe[1653]][_0x1bfe[124]][_0x1bfe[117]]= this[_0x1bfe[1562]][_0x1bfe[117]]+ _0x1bfe[168]):_0x47f2x5= _0x47f2x5[_0x1bfe[230]](/ /g,_0x1bfe[544]);_0x47f2x5= _0x47f2x5[_0x1bfe[230]](/\n/g,_0x1bfe[1453]);this[_0x1bfe[1653]][_0x1bfe[339]]= _0x47f2x5;var _0x47f2x5=this[_0x1bfe[1653]][_0x1bfe[359]]+ 30,_0x47f2x9=this[_0x1bfe[1653]][_0x1bfe[167]]+ 16,_0x47f2x5=Math[_0x1bfe[160]](_0x47f2x5,40),_0x47f2x9=Math[_0x1bfe[160]](_0x47f2x9,20);_0x47f2x3&& (_0x47f2x5= Math[_0x1bfe[243]](this[_0x1bfe[1562]][_0x1bfe[117]]- 4,_0x47f2x5),_0x47f2x9= Math[_0x1bfe[243]](this[_0x1bfe[1562]][_0x1bfe[119]],_0x47f2x9));var _0x47f2xa=null!= _0x47f2x2[_0x1bfe[963]]?_0x47f2x2[_0x1bfe[963]][_0x1bfe[1655]]:null;null== _0x47f2xa&& (_0x47f2xa= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),_0x47f2x2= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),_0x47f2xa= mxUtils[_0x1bfe[1501]](_0x47f2xa,_0x47f2x2));if(null!= _0x47f2xa){if(_0x47f2x3|| !_0x47f2x4){this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[361]]= Math[_0x1bfe[160]](0,Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[235]]- _0x47f2xa[_0x1bfe[235]]* this[_0x1bfe[1562]][_0x1bfe[117]]+ _0x47f2xa[_0x1bfe[235]]* _0x47f2x5)- 3)+ _0x1bfe[168]};this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[125]]= Math[_0x1bfe[160]](0,Math[_0x1bfe[488]](this[_0x1bfe[1562]][_0x1bfe[236]]- _0x47f2xa[_0x1bfe[236]]* this[_0x1bfe[1562]][_0x1bfe[119]]+ _0x47f2xa[_0x1bfe[236]]* _0x47f2x9)+ 4)+ _0x1bfe[168]};if(_0x47f2x3|| !_0x47f2x4){this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x5+ _0x1bfe[168]};this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x9+ _0x1bfe[168]}};mxCellEditor[_0x1bfe[202]][_0x1bfe[2133]]= function(){return this[_0x1bfe[2113]]};mxCellEditor[_0x1bfe[202]][_0x1bfe[2128]]= function(_0x47f2x2){this[_0x1bfe[2113]]= _0x47f2x2};mxCellEditor[_0x1bfe[202]][_0x1bfe[2122]]= function(){this[_0x1bfe[2126]](!this[_0x1bfe[1179]][_0x1bfe[2134]]())};mxCellEditor[_0x1bfe[202]][_0x1bfe[855]]= function(_0x47f2x2,_0x47f2x3){null== this[_0x1bfe[126]]&& this[_0x1bfe[176]]();this[_0x1bfe[2126]](!0);var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x2);if(null!= _0x47f2x4){this[_0x1bfe[2111]]= _0x47f2x2;this[_0x1bfe[2112]]= _0x47f2x3;this[_0x1bfe[2116]]= null;null!= _0x47f2x4[_0x1bfe[963]]&& this[_0x1bfe[2135]](_0x47f2x4)&& (this[_0x1bfe[2116]]= _0x47f2x4[_0x1bfe[963]][_0x1bfe[252]],this[_0x1bfe[2116]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188]);var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x5=mxUtils[_0x1bfe[433]](_0x47f2x4[_0x1bfe[124]],mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)* _0x47f2x5,_0x47f2x9=mxUtils[_0x1bfe[433]](_0x47f2x4[_0x1bfe[124]],mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),_0x47f2xa=mxUtils[_0x1bfe[433]](_0x47f2x4[_0x1bfe[124]],mxConstants.STYLE_FONTCOLOR,_0x1bfe[586]),_0x47f2x12=mxUtils[_0x1bfe[433]](_0x47f2x4[_0x1bfe[124]],mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),_0x47f2x13=(mxUtils[_0x1bfe[433]](_0x47f2x4[_0x1bfe[124]],mxConstants.STYLE_FONTSTYLE,0)& mxConstants[_0x1bfe[1410]])== mxConstants[_0x1bfe[1410]],_0x47f2x14=(mxUtils[_0x1bfe[433]](_0x47f2x4[_0x1bfe[124]],mxConstants.STYLE_FONTSTYLE,0)& mxConstants[_0x1bfe[1412]])== mxConstants[_0x1bfe[1412]],_0x47f2x15=(mxUtils[_0x1bfe[433]](_0x47f2x4[_0x1bfe[124]],mxConstants.STYLE_FONTSTYLE,0)& mxConstants[_0x1bfe[1414]])== mxConstants[_0x1bfe[1414]];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[487]]= Math[_0x1bfe[488]](_0x47f2x5)+ _0x1bfe[168];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[489]]= Math[_0x1bfe[488]](_0x47f2x5* mxConstants[_0x1bfe[490]])+ _0x1bfe[168];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[486]]= _0x47f2x9;this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[1165]]= _0x47f2x12;this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[352]]= _0x47f2xa;this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[1452]]= _0x47f2x13?_0x1bfe[1447]:_0x1bfe[1502];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[666]]= _0x47f2x14?_0x1bfe[1449]:_0x1bfe[110];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[354]]= _0x47f2x15?_0x1bfe[355]:_0x1bfe[110];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[278];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[2136]]= _0x1bfe[130];this[_0x1bfe[1562]]= _0x47f2x5= this[_0x1bfe[2137]](_0x47f2x4);this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x5[_0x1bfe[235]]+ _0x1bfe[168];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x5[_0x1bfe[236]]+ _0x1bfe[168];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x5[_0x1bfe[117]]+ _0x1bfe[168];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x5[_0x1bfe[119]]+ _0x1bfe[168];this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[931]]= 5;_0x47f2x4= this[_0x1bfe[2138]](_0x47f2x4,_0x47f2x3);null== _0x47f2x4|| 0== _0x47f2x4[_0x1bfe[67]]?(_0x47f2x4= this[_0x1bfe[2139]](),this[_0x1bfe[2127]]= !0):this[_0x1bfe[2127]]= !1;this[_0x1bfe[2128]](!1);this[_0x1bfe[126]][_0x1bfe[131]]= _0x47f2x4;this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[62]](this[_0x1bfe[126]]);_0x1bfe[130]!= this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[495]]&& (this[_0x1bfe[2114]]&& (this[_0x1bfe[1653]]= this[_0x1bfe[2140]](),document[_0x1bfe[112]][_0x1bfe[62]](this[_0x1bfe[1653]]),this[_0x1bfe[129]]()),this[_0x1bfe[126]][_0x1bfe[393]](),this[_0x1bfe[126]][_0x1bfe[804]]())}};mxCellEditor[_0x1bfe[202]][_0x1bfe[2140]]= function(){var _0x47f2x2=document[_0x1bfe[55]](_0x1bfe[485]),_0x47f2x3=_0x47f2x2[_0x1bfe[124]];_0x47f2x3[_0x1bfe[491]]= _0x1bfe[492];_0x47f2x3[_0x1bfe[493]]= _0x1bfe[494];_0x47f2x3[_0x1bfe[187]]= _0x1bfe[188];_0x47f2x3[_0x1bfe[495]]= mxClient[_0x1bfe[496]]?_0x1bfe[497]:_0x1bfe[498];_0x47f2x3[_0x1bfe[499]]= _0x1bfe[500];_0x47f2x3[_0x1bfe[123]]= _0x1bfe[125];_0x47f2x3[_0x1bfe[489]]= this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[489]];_0x47f2x3[_0x1bfe[487]]= this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[487]];_0x47f2x3[_0x1bfe[486]]= this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[486]];_0x47f2x3[_0x1bfe[1452]]= this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[1452]];_0x47f2x3[_0x1bfe[1165]]= this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[1165]];_0x47f2x3[_0x1bfe[666]]= this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[666]];_0x47f2x3[_0x1bfe[354]]= this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[354]];return _0x47f2x2};mxCellEditor[_0x1bfe[202]][_0x1bfe[2126]]= function(_0x47f2x2){null!= this[_0x1bfe[2111]]&& (null!= this[_0x1bfe[2116]]&& (this[_0x1bfe[2116]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[189],this[_0x1bfe[2116]]= null),!_0x47f2x2&& this[_0x1bfe[2133]]()&& this[_0x1bfe[1179]][_0x1bfe[850]](this[_0x1bfe[2111]],this[_0x1bfe[2141]](),this[_0x1bfe[2112]]),null!= this[_0x1bfe[1653]]&& (document[_0x1bfe[112]][_0x1bfe[266]](this[_0x1bfe[1653]]),this[_0x1bfe[1653]]= null),this[_0x1bfe[1562]]= this[_0x1bfe[2112]]= this[_0x1bfe[2111]]= null,this[_0x1bfe[126]][_0x1bfe[2121]](),this[_0x1bfe[126]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[126]]))};mxCellEditor[_0x1bfe[202]][_0x1bfe[2138]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[1179]][_0x1bfe[2142]](_0x47f2x2[_0x1bfe[246]],_0x47f2x3)};mxCellEditor[_0x1bfe[202]][_0x1bfe[2141]]= function(){return this[_0x1bfe[126]][_0x1bfe[131]][_0x1bfe[230]](/\r/g,_0x1bfe[110])};mxCellEditor[_0x1bfe[202]][_0x1bfe[2135]]= function(_0x47f2x2){return !0};mxCellEditor[_0x1bfe[202]][_0x1bfe[939]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]];return new mxRectangle(0,0,null== _0x47f2x2[_0x1bfe[963]]?30:_0x47f2x2[_0x1bfe[963]][_0x1bfe[803]]* _0x47f2x3+ 20,_0x1bfe[361]== this[_0x1bfe[126]][_0x1bfe[124]][_0x1bfe[1165]]?120:40)};mxCellEditor[_0x1bfe[202]][_0x1bfe[2137]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x5=this[_0x1bfe[939]](_0x47f2x2),_0x47f2x9=_0x47f2x5[_0x1bfe[117]],_0x47f2x5=_0x47f2x5[_0x1bfe[119]],_0x47f2xa=parseInt(_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2143]]]|| 2)* _0x47f2x4,_0x47f2x12=parseInt(_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2144]]]|| 0)* _0x47f2x4+ _0x47f2xa,_0x47f2x13=parseInt(_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2145]]]|| 0)* _0x47f2x4+ _0x47f2xa,_0x47f2x14=parseInt(_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2146]]]|| 0)* _0x47f2x4+ _0x47f2xa,_0x47f2x4=parseInt(_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2147]]]|| 0)* _0x47f2x4+ _0x47f2xa,_0x47f2x13= new mxRectangle(_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]],Math[_0x1bfe[160]](_0x47f2x9,_0x47f2x2[_0x1bfe[117]]- _0x47f2x4- _0x47f2x13),Math[_0x1bfe[160]](_0x47f2x5,_0x47f2x2[_0x1bfe[119]]- _0x47f2x12- _0x47f2x14));_0x47f2x3?(_0x47f2x13[_0x1bfe[235]]= _0x47f2x2[_0x1bfe[2079]][_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]]= _0x47f2x2[_0x1bfe[2079]][_0x1bfe[236]],null!= _0x47f2x2[_0x1bfe[963]]&& null!= _0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]]&& (0< _0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[235]]&& (_0x47f2x13[_0x1bfe[235]]= _0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[235]]),0< _0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[236]]&& (_0x47f2x13[_0x1bfe[236]]= _0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[236]]))):null!= _0x47f2x2[_0x1bfe[963]]&& null!= _0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]]&& (_0x47f2x13[_0x1bfe[235]]= Math[_0x1bfe[243]](_0x47f2x13[_0x1bfe[235]],_0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[235]]),_0x47f2x13[_0x1bfe[236]]= Math[_0x1bfe[243]](_0x47f2x13[_0x1bfe[236]],_0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[236]]));_0x47f2x13[_0x1bfe[235]]+= _0x47f2x4;_0x47f2x13[_0x1bfe[236]]+= _0x47f2x12;null!= _0x47f2x2[_0x1bfe[963]]&& null!= _0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]]&& (_0x47f2x3?(_0x47f2x13[_0x1bfe[117]]= Math[_0x1bfe[160]](_0x47f2x9,_0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[117]]),_0x47f2x13[_0x1bfe[119]]= Math[_0x1bfe[160]](_0x47f2x5,_0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[119]])):(_0x47f2x13[_0x1bfe[117]]= Math[_0x1bfe[160]](_0x47f2x13[_0x1bfe[117]],_0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[117]]),_0x47f2x13[_0x1bfe[119]]= Math[_0x1bfe[160]](_0x47f2x13[_0x1bfe[119]],_0x47f2x2[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[119]])));this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1193]](_0x47f2x2[_0x1bfe[246]])&& (_0x47f2x3= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),_0x47f2x3== mxConstants[_0x1bfe[2132]]?_0x47f2x13[_0x1bfe[235]]-= _0x47f2x2[_0x1bfe[117]]:_0x47f2x3== mxConstants[_0x1bfe[480]]&& (_0x47f2x13[_0x1bfe[235]]+= _0x47f2x2[_0x1bfe[117]]),_0x47f2x3= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),_0x47f2x3== mxConstants[_0x1bfe[1687]]?_0x47f2x13[_0x1bfe[236]]-= _0x47f2x2[_0x1bfe[119]]:_0x47f2x3== mxConstants[_0x1bfe[482]]&& (_0x47f2x13[_0x1bfe[236]]+= _0x47f2x2[_0x1bfe[119]]));return _0x47f2x13};mxCellEditor[_0x1bfe[202]][_0x1bfe[2139]]= function(_0x47f2x2){return this[_0x1bfe[2115]]};mxCellEditor[_0x1bfe[202]][_0x1bfe[2148]]= function(){return this[_0x1bfe[2111]]};mxCellEditor[_0x1bfe[202]][_0x1bfe[515]]= function(){null!= this[_0x1bfe[126]]&& (mxEvent[_0x1bfe[762]](this[_0x1bfe[126]]),null!= this[_0x1bfe[126]][_0x1bfe[265]]&& this[_0x1bfe[126]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[126]]),this[_0x1bfe[126]]= null)};function mxCellRenderer(){}mxCellRenderer[_0x1bfe[202]][_0x1bfe[2149]]= mxConnector;mxCellRenderer[_0x1bfe[202]][_0x1bfe[2150]]= mxRectangleShape;mxCellRenderer[_0x1bfe[202]][_0x1bfe[2151]]= mxText;mxCellRenderer[_0x1bfe[202]][_0x1bfe[2152]]= !0;mxCellRenderer[_0x1bfe[202]][_0x1bfe[2153]]= {};mxCellRenderer[_0x1bfe[2154]]= function(_0x47f2x2,_0x47f2x3){mxCellRenderer[_0x1bfe[202]][_0x1bfe[2153]][_0x47f2x2]= _0x47f2x3};mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_RECTANGLE,mxRectangleShape);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_ELLIPSE,mxEllipse);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_RHOMBUS,mxRhombus);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_CYLINDER,mxCylinder);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_CONNECTOR,mxConnector);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_ACTOR,mxActor);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_TRIANGLE,mxTriangle);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_HEXAGON,mxHexagon);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_CLOUD,mxCloud);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_LINE,mxLine);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_ARROW,mxArrow);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_SWIMLANE,mxSwimlane);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_IMAGE,mxImageShape);mxCellRenderer[_0x1bfe[2154]](mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer[_0x1bfe[202]][_0x1bfe[2155]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[502]]();if(null!= _0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[526]]&& null== _0x47f2x2[_0x1bfe[253]]&& _0x47f2x2[_0x1bfe[246]]!= _0x47f2x2[_0x1bfe[441]][_0x1bfe[1741]]&& (_0x47f2x4[_0x1bfe[1193]](_0x47f2x2[_0x1bfe[246]])|| _0x47f2x4[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]]))){if(this[_0x1bfe[2156]](_0x47f2x2),null!= _0x47f2x2[_0x1bfe[253]]&& (null== _0x47f2x3|| _0x47f2x3)){this[_0x1bfe[2157]](_0x47f2x2),_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[2158]]|| _0x47f2x4[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]])?_0x47f2x2[_0x1bfe[2081]]= !0:_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[2159]]&& null!= this[_0x1bfe[2160]]&& (this[_0x1bfe[2160]][_0x1bfe[265]]== _0x47f2x2[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[265]]?this[_0x1bfe[2161]](_0x47f2x2,this[_0x1bfe[2160]]):this[_0x1bfe[2160]]= null),_0x47f2x2[_0x1bfe[253]][_0x1bfe[255]]= _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]],this[_0x1bfe[2162]](_0x47f2x2),this[_0x1bfe[2163]](_0x47f2x2)}}};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2157]]= function(_0x47f2x2){_0x47f2x2[_0x1bfe[253]][_0x1bfe[176]](_0x47f2x2[_0x1bfe[441]][_0x1bfe[2024]]())};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2164]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=null,_0x47f2x5=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]],_0x47f2x9=_0x47f2x5[_0x1bfe[502]](),_0x47f2xa=_0x47f2x2[_0x1bfe[246]],_0x47f2x12=_0x47f2x9[_0x1bfe[1197]](_0x47f2xa);null!= _0x47f2x12&& null== _0x47f2x4;){_0x47f2x4= this[_0x1bfe[2165]](_0x47f2x5,_0x47f2x12,_0x47f2xa,_0x47f2x3),_0x47f2xa= _0x47f2x12,_0x47f2x12= _0x47f2x9[_0x1bfe[1197]](_0x47f2xa)};return _0x47f2x4};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2165]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=null,_0x47f2xa=_0x47f2x2[_0x1bfe[502]]();for(_0x47f2x4= null!= _0x47f2x4?_0x47f2x3[_0x1bfe[1738]](_0x47f2x4)- 1:_0x47f2xa[_0x1bfe[262]](_0x47f2x3)- 1;0<= _0x47f2x4&& null== _0x47f2x9;_0x47f2x4--){_0x47f2x9= this[_0x1bfe[2165]](_0x47f2x2,_0x47f2xa[_0x1bfe[263]](_0x47f2x3,_0x47f2x4),null,_0x47f2x5)};if(null== _0x47f2x9&& (_0x47f2x9= _0x47f2x2[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x3),null!= _0x47f2x9&& (null== _0x47f2x9[_0x1bfe[253]]|| null== _0x47f2x9[_0x1bfe[253]][_0x1bfe[252]]|| _0x47f2x9[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[265]]!= _0x47f2x5))){_0x47f2x9= null};return _0x47f2x9};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2166]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[265]],_0x47f2x4=this[_0x1bfe[2164]](_0x47f2x2,_0x47f2x3),_0x47f2x5=_0x47f2x3[_0x1bfe[285]];null!= _0x47f2x4&& (_0x47f2x5= _0x47f2x4[_0x1bfe[253]][_0x1bfe[252]],null!= _0x47f2x4[_0x1bfe[963]]&& (null!= _0x47f2x4[_0x1bfe[963]][_0x1bfe[252]]&& _0x47f2x4[_0x1bfe[963]][_0x1bfe[252]][_0x1bfe[265]]== _0x47f2x3)&& (_0x47f2x5= _0x47f2x4[_0x1bfe[963]][_0x1bfe[252]]),_0x47f2x5= _0x47f2x5[_0x1bfe[287]]);this[_0x1bfe[2161]](_0x47f2x2,_0x47f2x5)};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2167]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[441]],_0x47f2x4=_0x47f2x3[_0x1bfe[1179]][_0x1bfe[502]]();if(_0x47f2x3[_0x1bfe[1179]][_0x1bfe[2159]]){if(null== this[_0x1bfe[2160]]|| null== this[_0x1bfe[2160]][_0x1bfe[265]]|| this[_0x1bfe[2160]][_0x1bfe[265]]!= _0x47f2x2[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[265]]){this[_0x1bfe[2160]]= _0x47f2x2[_0x1bfe[253]][_0x1bfe[252]]}}else {if(_0x47f2x3[_0x1bfe[1179]][_0x1bfe[2168]]){var _0x47f2x5=_0x47f2x2[_0x1bfe[253]][_0x1bfe[252]],_0x47f2x9=_0x47f2x5[_0x1bfe[265]],_0x47f2x4=_0x47f2x4[_0x1bfe[1197]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x3=_0x47f2x3[_0x1bfe[248]](_0x47f2x4),_0x47f2x9=null!= _0x47f2x3&& null!= _0x47f2x3[_0x1bfe[253]]&& null!= _0x47f2x3[_0x1bfe[253]][_0x1bfe[252]]?_0x47f2x3[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[287]]:_0x47f2x9[_0x1bfe[285]];null!= _0x47f2x9&& _0x47f2x9!= _0x47f2x5&& this[_0x1bfe[2161]](_0x47f2x2,_0x47f2x9)}}};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2161]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x2[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[265]][_0x1bfe[950]](_0x47f2x2[_0x1bfe[253]][_0x1bfe[252]],_0x47f2x3);null!= _0x47f2x2[_0x1bfe[963]]&& (null!= _0x47f2x2[_0x1bfe[963]][_0x1bfe[252]]&& _0x47f2x2[_0x1bfe[963]][_0x1bfe[252]][_0x1bfe[265]]== _0x47f2x2[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[265]])&& _0x47f2x2[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[265]][_0x1bfe[950]](_0x47f2x2[_0x1bfe[963]][_0x1bfe[252]],_0x47f2x2[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[287]])};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2156]]= function(_0x47f2x2){if(null!= _0x47f2x2[_0x1bfe[124]]){var _0x47f2x3=mxStencilRegistry[_0x1bfe[1560]](_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2059]]]);null!= _0x47f2x3?_0x47f2x2[_0x1bfe[253]]= new mxShape(_0x47f2x3):(_0x47f2x3= this[_0x1bfe[2169]](_0x47f2x2),_0x47f2x2[_0x1bfe[253]]= new _0x47f2x3);_0x47f2x2[_0x1bfe[253]][_0x1bfe[1525]]= _0x47f2x2[_0x1bfe[439]];_0x47f2x2[_0x1bfe[253]][_0x1bfe[1562]]= new mxRectangle(_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]],_0x47f2x2[_0x1bfe[117]],_0x47f2x2[_0x1bfe[119]]);_0x47f2x2[_0x1bfe[253]][_0x1bfe[507]]= _0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[507]];this[_0x1bfe[2170]](_0x47f2x2)}};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2171]]= function(_0x47f2x2){return null!= _0x47f2x2?mxCellRenderer[_0x1bfe[202]][_0x1bfe[2153]][_0x47f2x2]:null};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2169]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[2171]](_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2059]]]);null== _0x47f2x3&& (_0x47f2x3= _0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]])?this[_0x1bfe[2149]]:this[_0x1bfe[2150]]);return _0x47f2x3};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2170]]= function(_0x47f2x2){_0x47f2x2[_0x1bfe[253]][_0x1bfe[183]](_0x47f2x2);_0x47f2x2[_0x1bfe[253]][_0x1bfe[618]]= _0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[1202]](_0x47f2x2);_0x47f2x2[_0x1bfe[253]][_0x1bfe[630]]= this[_0x1bfe[2171]](_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[2172]](_0x47f2x2));_0x47f2x2[_0x1bfe[253]][_0x1bfe[632]]= _0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[2173]](_0x47f2x2);_0x47f2x2[_0x1bfe[253]][_0x1bfe[634]]= _0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[2174]](_0x47f2x2);_0x47f2x2[_0x1bfe[253]][_0x1bfe[638]]= _0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2175]]];_0x47f2x2[_0x1bfe[253]][_0x1bfe[631]]= _0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[2176]](_0x47f2x2);this[_0x1bfe[2177]](_0x47f2x2)};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2177]]= function(_0x47f2x2){null!= _0x47f2x2[_0x1bfe[253]]&& (this[_0x1bfe[2178]](_0x47f2x2,_0x1bfe[632],mxConstants.STYLE_FILLCOLOR),this[_0x1bfe[2178]](_0x47f2x2,_0x1bfe[634],mxConstants.STYLE_GRADIENTCOLOR),this[_0x1bfe[2178]](_0x47f2x2,_0x1bfe[1334],mxConstants.STYLE_FILLCOLOR),this[_0x1bfe[2178]](_0x47f2x2,_0x1bfe[1336],mxConstants.STYLE_STROKECOLOR),this[_0x1bfe[2178]](_0x47f2x2,_0x1bfe[1299],mxConstants.STYLE_GRADIENTCOLOR))};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2178]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=_0x47f2x2[_0x1bfe[253]][_0x47f2x3],_0x47f2x9=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]],_0x47f2xa=null;_0x1bfe[1549]== _0x47f2x5?_0x47f2xa= _0x47f2x9[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2[_0x1bfe[246]]):_0x1bfe[687]== _0x47f2x5?(_0x47f2xa= null!= _0x47f2x9[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2[_0x1bfe[246]],!1)?_0x47f2x9[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2[_0x1bfe[246]],!1):_0x47f2x2[_0x1bfe[246]],_0x47f2xa= _0x47f2x9[_0x1bfe[2179]](_0x47f2xa),_0x47f2x4= _0x47f2x9[_0x1bfe[2180]]):_0x1bfe[2181]== _0x47f2x5&& (_0x47f2x2[_0x1bfe[253]][_0x47f2x3]= _0x47f2x2[_0x1bfe[253]][_0x1bfe[632]]);null!= _0x47f2xa&& (_0x47f2x5= _0x47f2x9[_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2xa),_0x47f2x2[_0x1bfe[253]][_0x47f2x3]= null,null!= _0x47f2x5&& (_0x47f2x2[_0x1bfe[253]][_0x47f2x3]= null!= _0x47f2x5[_0x1bfe[253]]&& _0x1bfe[632]!= _0x47f2x3?_0x47f2x5[_0x1bfe[253]][_0x47f2x3]:_0x47f2x5[_0x1bfe[124]][_0x47f2x4]))};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2182]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[2183]](_0x47f2x2[_0x1bfe[246]])};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2184]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]];_0x47f2x4[_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]]);if(0< _0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2185]]]|| null== _0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2185]]]){var _0x47f2x5=_0x47f2x4[_0x1bfe[2186]](_0x47f2x2[_0x1bfe[246]])|| null!= _0x47f2x3&& mxUtils[_0x1bfe[1331]](_0x47f2x3);_0x47f2x2[_0x1bfe[963]]= new this[_0x1bfe[2151]](_0x47f2x3, new mxRectangle,_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2064]]]|| mxConstants[_0x1bfe[479]],_0x47f2x4[_0x1bfe[2187]](_0x47f2x2),_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2069]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2188]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2185]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2189]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2143]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2144]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2145]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2146]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2147]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2190]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2191]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2192]]],_0x47f2x4[_0x1bfe[2131]](_0x47f2x2[_0x1bfe[246]])&& _0x47f2x4[_0x1bfe[2186]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x4[_0x1bfe[2130]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2193]]],_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2194]]]);_0x47f2x2[_0x1bfe[963]][_0x1bfe[461]]= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_TEXT_OPACITY,100);_0x47f2x2[_0x1bfe[963]][_0x1bfe[507]]= _0x47f2x5?mxConstants[_0x1bfe[1656]]:_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[507]];_0x47f2x2[_0x1bfe[963]][_0x1bfe[724]]= _0x47f2x2;this[_0x1bfe[2195]](_0x47f2x2);var _0x47f2x9=!1,_0x47f2xa=function(_0x47f2x3){var _0x47f2x5=_0x47f2x2;if(mxClient[_0x1bfe[754]]|| _0x47f2x9){_0x47f2x5= mxEvent[_0x1bfe[731]](_0x47f2x3),_0x47f2x3= mxEvent[_0x1bfe[733]](_0x47f2x3),_0x47f2x3= mxUtils[_0x1bfe[2196]](_0x47f2x4[_0x1bfe[526]],_0x47f2x5,_0x47f2x3),_0x47f2x5= _0x47f2x4[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x4[_0x1bfe[999]](_0x47f2x3[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]]))};return _0x47f2x5};mxEvent[_0x1bfe[759]](_0x47f2x2[_0x1bfe[963]][_0x1bfe[252]],mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){this[_0x1bfe[2197]](_0x47f2x2,_0x47f2x3)&& (_0x47f2x4[_0x1bfe[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x47f2x3,_0x47f2x2)),_0x47f2x9= _0x47f2x4[_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]&& _0x1bfe[2198]== mxEvent[_0x1bfe[728]](_0x47f2x3)[_0x1bfe[301]])}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){this[_0x1bfe[2197]](_0x47f2x2,_0x47f2x3)&& _0x47f2x4[_0x1bfe[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x47f2x3,_0x47f2xa(_0x47f2x3)))}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){this[_0x1bfe[2197]](_0x47f2x2,_0x47f2x3)&& (_0x47f2x4[_0x1bfe[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x47f2x3,_0x47f2xa(_0x47f2x3))),_0x47f2x9= !1)}));mxEvent[_0x1bfe[169]](_0x47f2x2[_0x1bfe[963]][_0x1bfe[252]],_0x1bfe[760],mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){this[_0x1bfe[2197]](_0x47f2x2,_0x47f2x3)&& (_0x47f2x4[_0x1bfe[761]](_0x47f2x3,_0x47f2x2[_0x1bfe[246]]),mxEvent[_0x1bfe[722]](_0x47f2x3))}))}};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2195]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]];_0x47f2x2[_0x1bfe[963]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]&& (mxClient[_0x1bfe[48]]&& mxClient[_0x1bfe[2199]]?_0x47f2x2[_0x1bfe[963]][_0x1bfe[176]](_0x47f2x3[_0x1bfe[526]]):mxUtils[_0x1bfe[458]](_0x47f2x2[_0x1bfe[441]][_0x1bfe[2024]]())&& (null!= _0x47f2x2[_0x1bfe[253]][_0x1bfe[685]]?_0x47f2x2[_0x1bfe[963]][_0x1bfe[176]](_0x47f2x2[_0x1bfe[253]][_0x1bfe[685]]):_0x47f2x2[_0x1bfe[963]][_0x1bfe[176]](_0x47f2x2[_0x1bfe[253]][_0x1bfe[252]])));null== _0x47f2x2[_0x1bfe[963]][_0x1bfe[252]]&& (_0x47f2x2[_0x1bfe[963]][_0x1bfe[176]](_0x47f2x2[_0x1bfe[441]][_0x1bfe[2024]]()),null!= _0x47f2x2[_0x1bfe[253]]&& null!= _0x47f2x2[_0x1bfe[963]]&& _0x47f2x2[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[265]][_0x1bfe[950]](_0x47f2x2[_0x1bfe[963]][_0x1bfe[252]],_0x47f2x2[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[287]]))};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2162]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[2200]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x4=null;if(null!= _0x47f2x3){for(var _0x47f2x4= new mxDictionary,_0x47f2x5=0;_0x47f2x5< _0x47f2x3[_0x1bfe[67]];_0x47f2x5++){var _0x47f2x9=null!= _0x47f2x2[_0x1bfe[1211]]?_0x47f2x2[_0x1bfe[1211]][_0x1bfe[205]](_0x47f2x3[_0x47f2x5]):null;null== _0x47f2x9&& (_0x47f2x9= new mxImageShape( new mxRectangle,_0x47f2x3[_0x47f2x5][_0x1bfe[618]][_0x1bfe[390]]),_0x47f2x9[_0x1bfe[507]]= _0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[507]],_0x47f2x9[_0x1bfe[1674]]= !1,_0x47f2x9[_0x1bfe[2201]]= _0x47f2x3[_0x47f2x5],this[_0x1bfe[2023]](_0x47f2x2,_0x47f2x9),this[_0x1bfe[2202]](_0x47f2x2,_0x47f2x3[_0x47f2x5],_0x47f2x9),null!= _0x47f2x3[_0x47f2x5][_0x1bfe[270]]&& (_0x47f2x9[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= _0x47f2x3[_0x47f2x5][_0x1bfe[270]]));_0x47f2x4[_0x1bfe[204]](_0x47f2x3[_0x47f2x5],_0x47f2x9)}};null!= _0x47f2x2[_0x1bfe[1211]]&& _0x47f2x2[_0x1bfe[1211]][_0x1bfe[209]](function(_0x47f2x2,_0x47f2x3){_0x47f2x3[_0x1bfe[515]]()});_0x47f2x2[_0x1bfe[1211]]= _0x47f2x4};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2023]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3[_0x1bfe[176]](_0x47f2x2[_0x1bfe[441]][_0x1bfe[1524]]())};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2202]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]];mxEvent[_0x1bfe[169]](_0x47f2x4[_0x1bfe[252]],_0x1bfe[173],function(_0x47f2x4){_0x47f2x5[_0x1bfe[2203]]()&& _0x47f2x5[_0x1bfe[2126]](!_0x47f2x5[_0x1bfe[2134]]());_0x47f2x3[_0x1bfe[746]]( new mxEventObject(mxEvent.CLICK,_0x1bfe[763],_0x47f2x4,_0x1bfe[246],_0x47f2x2[_0x1bfe[246]]))});mxEvent[_0x1bfe[759]](_0x47f2x4[_0x1bfe[252]],function(_0x47f2x2){mxEvent[_0x1bfe[722]](_0x47f2x2)},function(_0x47f2x3){_0x47f2x5[_0x1bfe[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x47f2x3,_0x47f2x2))});mxClient[_0x1bfe[754]]&& mxEvent[_0x1bfe[169]](_0x47f2x4[_0x1bfe[252]],_0x1bfe[757],function(_0x47f2x4){_0x47f2x3[_0x1bfe[746]]( new mxEventObject(mxEvent.CLICK,_0x1bfe[763],_0x47f2x4,_0x1bfe[246],_0x47f2x2[_0x1bfe[246]]))})};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2204]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]],_0x47f2x4=_0x47f2x3[_0x1bfe[2205]](_0x47f2x2);if(_0x47f2x3[_0x1bfe[2206]]&& null!= _0x47f2x4){if(null== _0x47f2x2[_0x1bfe[2207]]){var _0x47f2x5= new mxRectangle(0,0,_0x47f2x4[_0x1bfe[117]],_0x47f2x4[_0x1bfe[119]]);_0x47f2x2[_0x1bfe[2207]]= new mxImageShape(_0x47f2x5,_0x47f2x4[_0x1bfe[390]]);_0x47f2x2[_0x1bfe[2207]][_0x1bfe[1674]]= !1;_0x47f2x2[_0x1bfe[2207]][_0x1bfe[507]]= _0x47f2x3[_0x1bfe[507]];this[_0x1bfe[2208]](_0x47f2x2,_0x47f2x2[_0x1bfe[2207]],!0,function(_0x47f2x4){if(_0x47f2x3[_0x1bfe[994]]()){var _0x47f2x5=!_0x47f2x3[_0x1bfe[1742]](_0x47f2x2[_0x1bfe[246]]);_0x47f2x3[_0x1bfe[847]](_0x47f2x5,!1,[_0x47f2x2[_0x1bfe[246]]]);mxEvent[_0x1bfe[722]](_0x47f2x4)}})}}else {null!= _0x47f2x2[_0x1bfe[2207]]&& (_0x47f2x2[_0x1bfe[2207]][_0x1bfe[515]](),_0x47f2x2[_0x1bfe[2207]]= null)}};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2208]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]];_0x47f2x9[_0x1bfe[2186]](_0x47f2x2[_0x1bfe[246]])&& mxClient[_0x1bfe[2199]]&& _0x47f2x9[_0x1bfe[507]]== mxConstants[_0x1bfe[508]]?(_0x47f2x3[_0x1bfe[507]]= mxConstants[_0x1bfe[2209]],_0x47f2x3[_0x1bfe[176]](_0x47f2x9[_0x1bfe[526]]),_0x47f2x3[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[931]]= 1):_0x47f2x3[_0x1bfe[176]](_0x47f2x2[_0x1bfe[441]][_0x1bfe[1524]]());_0x47f2x3= _0x47f2x3[_0x1bfe[2210]]|| _0x47f2x3[_0x1bfe[252]];_0x47f2x5&& (_0x47f2x9[_0x1bfe[994]]()&& (_0x47f2x3[_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[356]),mxEvent[_0x1bfe[169]](_0x47f2x3,_0x1bfe[173],_0x47f2x5));_0x47f2x4&& mxEvent[_0x1bfe[759]](_0x47f2x3,function(_0x47f2x3){_0x47f2x9[_0x1bfe[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x47f2x3,_0x47f2x2));mxEvent[_0x1bfe[722]](_0x47f2x3)},function(_0x47f2x3){_0x47f2x9[_0x1bfe[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x47f2x3,_0x47f2x2))});return _0x47f2x3};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2211]]= function(_0x47f2x2,_0x47f2x3){return !0};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2197]]= function(_0x47f2x2,_0x47f2x3){return !0};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2163]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]],_0x47f2x4=function(_0x47f2x4){var _0x47f2x5=_0x47f2x2;if(_0x47f2x3[_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]&& _0x1bfe[2198]== mxEvent[_0x1bfe[728]](_0x47f2x4)[_0x1bfe[301]]|| mxClient[_0x1bfe[754]]){_0x47f2x5= mxEvent[_0x1bfe[731]](_0x47f2x4),_0x47f2x4= mxEvent[_0x1bfe[733]](_0x47f2x4),_0x47f2x4= mxUtils[_0x1bfe[2196]](_0x47f2x3[_0x1bfe[526]],_0x47f2x5,_0x47f2x4),_0x47f2x5= _0x47f2x3[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x3[_0x1bfe[999]](_0x47f2x4[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]]))};return _0x47f2x5},_0x47f2x5=!1;mxEvent[_0x1bfe[169]](_0x47f2x2[_0x1bfe[253]][_0x1bfe[252]],_0x1bfe[2212],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){_0x47f2x3[_0x1bfe[2213]]= 0;_0x47f2x5= !0;mxEvent[_0x1bfe[722]](_0x47f2x2)}));mxEvent[_0x1bfe[759]](_0x47f2x2[_0x1bfe[253]][_0x1bfe[252]],mxUtils[_0x1bfe[885]](this,function(_0x47f2x4){this[_0x1bfe[2211]](_0x47f2x2,_0x47f2x4)&& !_0x47f2x5?_0x47f2x3[_0x1bfe[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x47f2x4,null!= _0x47f2x2[_0x1bfe[253]]&& mxEvent[_0x1bfe[728]](_0x47f2x4)== _0x47f2x2[_0x1bfe[253]][_0x1bfe[905]]?null:_0x47f2x2)):_0x47f2x5&& mxEvent[_0x1bfe[722]](_0x47f2x4)}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x9){this[_0x1bfe[2211]](_0x47f2x2,_0x47f2x9)&& !_0x47f2x5?_0x47f2x3[_0x1bfe[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x47f2x9,null!= _0x47f2x2[_0x1bfe[253]]&& mxEvent[_0x1bfe[728]](_0x47f2x9)== _0x47f2x2[_0x1bfe[253]][_0x1bfe[905]]?null:_0x47f2x4(_0x47f2x9))):_0x47f2x5&& mxEvent[_0x1bfe[722]](_0x47f2x9)}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x9){this[_0x1bfe[2211]](_0x47f2x2,_0x47f2x9)&& !_0x47f2x5?_0x47f2x3[_0x1bfe[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x47f2x9,null!= _0x47f2x2[_0x1bfe[253]]&& mxEvent[_0x1bfe[728]](_0x47f2x9)== _0x47f2x2[_0x1bfe[253]][_0x1bfe[905]]?null:_0x47f2x4(_0x47f2x9))):_0x47f2x5&& mxEvent[_0x1bfe[722]](_0x47f2x9)}));var _0x47f2x9=mxClient[_0x1bfe[754]]?_0x1bfe[2214]:_0x1bfe[760];mxEvent[_0x1bfe[169]](_0x47f2x2[_0x1bfe[253]][_0x1bfe[252]],_0x47f2x9,mxUtils[_0x1bfe[885]](this,function(_0x47f2x4){_0x47f2x5= !1;_0x1bfe[2214]== _0x47f2x9?(_0x47f2x3[_0x1bfe[2213]]= 0,_0x47f2x3[_0x1bfe[2215]]&& (_0x47f2x3[_0x1bfe[2216]](_0x47f2x2,_0x47f2x4),mxEvent[_0x1bfe[722]](_0x47f2x4))):this[_0x1bfe[2211]](_0x47f2x2,_0x47f2x4)&& (_0x47f2x3[_0x1bfe[761]](_0x47f2x4,null!= _0x47f2x2[_0x1bfe[253]]&& mxEvent[_0x1bfe[728]](_0x47f2x4)== _0x47f2x2[_0x1bfe[253]][_0x1bfe[905]]?null:_0x47f2x2[_0x1bfe[246]]),mxEvent[_0x1bfe[722]](_0x47f2x4))}))};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2217]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[2182]](_0x47f2x2);if(null== _0x47f2x2[_0x1bfe[963]]&& null!= _0x47f2x4&& (mxUtils[_0x1bfe[1331]](_0x47f2x4)|| 0< _0x47f2x4[_0x1bfe[67]])){this[_0x1bfe[2184]](_0x47f2x2,_0x47f2x4)}else {if(null!= _0x47f2x2[_0x1bfe[963]]&& (null== _0x47f2x4|| 0== _0x47f2x4[_0x1bfe[67]])){_0x47f2x2[_0x1bfe[963]][_0x1bfe[515]](),_0x47f2x2[_0x1bfe[963]]= null}};if(null!= _0x47f2x2[_0x1bfe[963]]){var _0x47f2x5=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]],_0x47f2x9=_0x47f2x5[_0x1bfe[2131]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x5=_0x47f2x5[_0x1bfe[2130]](_0x47f2x2[_0x1bfe[246]]),_0x47f2xa=this[_0x1bfe[2218]](_0x47f2x2);if(_0x47f2x3|| _0x47f2x2[_0x1bfe[963]][_0x1bfe[131]]!= _0x47f2x4|| _0x47f2x2[_0x1bfe[963]][_0x1bfe[2131]]!= _0x47f2x9|| _0x47f2x2[_0x1bfe[963]][_0x1bfe[2219]]!= _0x47f2x5|| _0x47f2x2[_0x1bfe[963]][_0x1bfe[255]]!= _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]]|| !_0x47f2x2[_0x1bfe[963]][_0x1bfe[1562]][_0x1bfe[237]](_0x47f2xa)){_0x47f2x2[_0x1bfe[963]][_0x1bfe[131]]= _0x47f2x4,_0x47f2x2[_0x1bfe[963]][_0x1bfe[1562]]= _0x47f2xa,_0x47f2x2[_0x1bfe[963]][_0x1bfe[255]]= this[_0x1bfe[2220]](_0x47f2x2),_0x47f2x2[_0x1bfe[963]][_0x1bfe[2131]]= _0x47f2x9,_0x47f2x2[_0x1bfe[963]][_0x1bfe[2219]]= _0x47f2x5,_0x47f2x2[_0x1bfe[963]][_0x1bfe[258]]()}}};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2220]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]]};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2218]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]],_0x47f2x4=_0x47f2x2[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x5=_0x47f2x3[_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x9= new mxRectangle(_0x47f2x2[_0x1bfe[2079]][_0x1bfe[235]],_0x47f2x2[_0x1bfe[2079]][_0x1bfe[236]]);_0x47f2x2[_0x1bfe[963]][_0x1bfe[1672]]();_0x47f2x5?(_0x47f2x5= _0x47f2x2[_0x1bfe[963]][_0x1bfe[1673]](),_0x47f2x9[_0x1bfe[235]]+= _0x47f2x5[_0x1bfe[235]]* _0x47f2x4,_0x47f2x9[_0x1bfe[236]]+= _0x47f2x5[_0x1bfe[236]]* _0x47f2x4,_0x47f2x3= _0x47f2x3[_0x1bfe[1198]](_0x47f2x2[_0x1bfe[246]]),null!= _0x47f2x3&& (_0x47f2x9[_0x1bfe[117]]= Math[_0x1bfe[160]](0,_0x47f2x2[_0x1bfe[963]][_0x1bfe[1655]][_0x1bfe[235]]* _0x47f2x3[_0x1bfe[117]]* _0x47f2x4- _0x47f2x2[_0x1bfe[963]][_0x1bfe[659]]* _0x47f2x4- _0x47f2x2[_0x1bfe[963]][_0x1bfe[661]]* _0x47f2x4),_0x47f2x9[_0x1bfe[119]]= Math[_0x1bfe[160]](0,_0x47f2x2[_0x1bfe[963]][_0x1bfe[1655]][_0x1bfe[236]]* _0x47f2x3[_0x1bfe[119]]* _0x47f2x4- _0x47f2x2[_0x1bfe[963]][_0x1bfe[658]]* _0x47f2x4- _0x47f2x2[_0x1bfe[963]][_0x1bfe[660]]* _0x47f2x4))):(_0x47f2x2[_0x1bfe[963]][_0x1bfe[1590]]()&& (_0x47f2x5= _0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[235]]= _0x47f2x9[_0x1bfe[236]],_0x47f2x9[_0x1bfe[236]]= _0x47f2x5),_0x47f2x9[_0x1bfe[235]]+= _0x47f2x2[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]]+= _0x47f2x2[_0x1bfe[236]],_0x47f2x9[_0x1bfe[117]]= Math[_0x1bfe[160]](1,_0x47f2x2[_0x1bfe[117]]),_0x47f2x9[_0x1bfe[119]]= Math[_0x1bfe[160]](1,_0x47f2x2[_0x1bfe[119]]),_0x47f2x3[_0x1bfe[1730]](_0x47f2x2[_0x1bfe[246]])&& (_0x47f2x3= _0x47f2x3[_0x1bfe[1731]](_0x47f2x2[_0x1bfe[246]]),0< _0x47f2x3[_0x1bfe[117]]?(_0x47f2x5= Math[_0x1bfe[243]](_0x47f2x9[_0x1bfe[117]],_0x47f2x3[_0x1bfe[117]]* _0x47f2x4),_0x47f2x2[_0x1bfe[253]][_0x1bfe[623]]&& (_0x47f2x9[_0x1bfe[235]]+= _0x47f2x9[_0x1bfe[117]]- _0x47f2x5),_0x47f2x9[_0x1bfe[117]]= _0x47f2x5):0< _0x47f2x3[_0x1bfe[119]]&& (_0x47f2x5= Math[_0x1bfe[243]](_0x47f2x9[_0x1bfe[119]],_0x47f2x3[_0x1bfe[119]]* _0x47f2x4),_0x47f2x2[_0x1bfe[253]][_0x1bfe[624]]&& (_0x47f2x9[_0x1bfe[236]]+= _0x47f2x9[_0x1bfe[119]]- _0x47f2x5),_0x47f2x9[_0x1bfe[119]]= _0x47f2x5)),this[_0x1bfe[2221]](_0x47f2x2,_0x47f2x9));return _0x47f2x9};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2221]]= function(_0x47f2x2,_0x47f2x3){if(_0x47f2x2[_0x1bfe[963]][_0x1bfe[1590]]()){var _0x47f2x4=(_0x47f2x2[_0x1bfe[117]]- _0x47f2x2[_0x1bfe[119]])/ 2;_0x47f2x3[_0x1bfe[235]]+= _0x47f2x4;_0x47f2x3[_0x1bfe[236]]-= _0x47f2x4;_0x47f2x4= _0x47f2x3[_0x1bfe[117]];_0x47f2x3[_0x1bfe[117]]= _0x47f2x3[_0x1bfe[119]];_0x47f2x3[_0x1bfe[119]]= _0x47f2x4};_0x47f2x3[_0x1bfe[235]]-= _0x47f2x2[_0x1bfe[963]][_0x1bfe[1655]][_0x1bfe[235]]* _0x47f2x3[_0x1bfe[117]];_0x47f2x3[_0x1bfe[236]]-= _0x47f2x2[_0x1bfe[963]][_0x1bfe[1655]][_0x1bfe[236]]* _0x47f2x3[_0x1bfe[119]];if(_0x1bfe[1334]!= _0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2193]]]){var _0x47f2x4=_0x47f2x2[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x5=_0x47f2x2[_0x1bfe[963]][_0x1bfe[1673]]();_0x47f2x3[_0x1bfe[235]]+= _0x47f2x5[_0x1bfe[235]]* _0x47f2x4;_0x47f2x3[_0x1bfe[236]]+= _0x47f2x5[_0x1bfe[236]]* _0x47f2x4;_0x47f2x3[_0x1bfe[117]]= Math[_0x1bfe[160]](0,_0x47f2x3[_0x1bfe[117]]- _0x47f2x2[_0x1bfe[963]][_0x1bfe[659]]* _0x47f2x4- _0x47f2x2[_0x1bfe[963]][_0x1bfe[661]]* _0x47f2x4);_0x47f2x3[_0x1bfe[119]]= Math[_0x1bfe[160]](0,_0x47f2x3[_0x1bfe[119]]- _0x47f2x2[_0x1bfe[963]][_0x1bfe[658]]* _0x47f2x4- _0x47f2x2[_0x1bfe[963]][_0x1bfe[660]]* _0x47f2x4)};var _0x47f2x9=_0x47f2x2[_0x1bfe[963]][_0x1bfe[1615]]();if(0!= _0x47f2x9&& (null!= _0x47f2x2&& _0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[1193]](_0x47f2x2[_0x1bfe[246]]))&& (_0x47f2x4= _0x47f2x2[_0x1bfe[241]](),_0x47f2x5= _0x47f2x2[_0x1bfe[242]](),_0x47f2x3[_0x1bfe[235]]!= _0x47f2x4|| _0x47f2x3[_0x1bfe[236]]!= _0x47f2x5)){_0x47f2x9*= Math[_0x1bfe[424]]/ 180,pt= mxUtils[_0x1bfe[432]]( new mxPoint(_0x47f2x3[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]]),Math[_0x1bfe[426]](_0x47f2x9),Math[_0x1bfe[427]](_0x47f2x9), new mxPoint(_0x47f2x4,_0x47f2x5)),_0x47f2x3[_0x1bfe[235]]= pt[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]]= pt[_0x1bfe[236]]}};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2222]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[2162]](_0x47f2x2);if(null!= _0x47f2x2[_0x1bfe[1211]]){var _0x47f2x4=mxUtils[_0x1bfe[1454]](mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_ROTATION,0),90),_0x47f2x5=mxUtils[_0x1bfe[431]](_0x47f2x4),_0x47f2x9=Math[_0x1bfe[426]](_0x47f2x5),_0x47f2xa=Math[_0x1bfe[427]](_0x47f2x5);_0x47f2x2[_0x1bfe[1211]][_0x1bfe[209]](function(_0x47f2x5,_0x47f2x13){var _0x47f2x14=_0x47f2x13[_0x1bfe[2201]][_0x1bfe[1799]](_0x47f2x2);if(!_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]])&& null!= _0x47f2x2[_0x1bfe[253]]&& 0!= _0x47f2x4){var _0x47f2x15=_0x47f2x14[_0x1bfe[241]](),_0x47f2x16=_0x47f2x14[_0x1bfe[242]](),_0x47f2x16=mxUtils[_0x1bfe[432]]( new mxPoint(_0x47f2x15,_0x47f2x16),_0x47f2x9,_0x47f2xa, new mxPoint(_0x47f2x2[_0x1bfe[241]](),_0x47f2x2[_0x1bfe[242]]())),_0x47f2x15=_0x47f2x16[_0x1bfe[235]],_0x47f2x16=_0x47f2x16[_0x1bfe[236]];_0x47f2x14[_0x1bfe[235]]= Math[_0x1bfe[488]](_0x47f2x15- _0x47f2x14[_0x1bfe[117]]/ 2);_0x47f2x14[_0x1bfe[236]]= Math[_0x1bfe[488]](_0x47f2x16- _0x47f2x14[_0x1bfe[119]]/ 2)};if(_0x47f2x3|| null== _0x47f2x13[_0x1bfe[1562]]|| _0x47f2x13[_0x1bfe[255]]!= _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]]|| !_0x47f2x13[_0x1bfe[1562]][_0x1bfe[237]](_0x47f2x14)){_0x47f2x13[_0x1bfe[1562]]= _0x47f2x14,_0x47f2x13[_0x1bfe[255]]= _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x13[_0x1bfe[258]]()}})}};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2223]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2[_0x1bfe[2207]]){var _0x47f2x4=this[_0x1bfe[2224]](_0x47f2x2),_0x47f2x5=this[_0x1bfe[2152]]?mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_ROTATION,0):_0x47f2x2[_0x1bfe[253]][_0x1bfe[1615]](),_0x47f2x9=_0x47f2x2[_0x1bfe[441]][_0x1bfe[255]];if(_0x47f2x3|| _0x47f2x2[_0x1bfe[2207]][_0x1bfe[255]]!= _0x47f2x9|| !_0x47f2x2[_0x1bfe[2207]][_0x1bfe[1562]][_0x1bfe[237]](_0x47f2x4)|| _0x47f2x2[_0x1bfe[2207]][_0x1bfe[603]]!= _0x47f2x5){_0x47f2x2[_0x1bfe[2207]][_0x1bfe[603]]= _0x47f2x5,_0x47f2x2[_0x1bfe[2207]][_0x1bfe[1562]]= _0x47f2x4,_0x47f2x2[_0x1bfe[2207]][_0x1bfe[255]]= _0x47f2x9,_0x47f2x2[_0x1bfe[2207]][_0x1bfe[258]]()}}};mxCellRenderer[_0x1bfe[202]][_0x1bfe[2224]]= function(_0x47f2x2){if(null!= _0x47f2x2[_0x1bfe[2207]]){var _0x47f2x3=_0x47f2x2[_0x1bfe[2207]][_0x1bfe[255]],_0x47f2x4=_0x47f2x2[_0x1bfe[2207]][_0x1bfe[1562]][_0x1bfe[117]]/ _0x47f2x3,_0x47f2x3=_0x47f2x2[_0x1bfe[2207]][_0x1bfe[1562]][_0x1bfe[119]]/ _0x47f2x3,_0x47f2x5=_0x47f2x2[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x9=_0x47f2x2[_0x1bfe[241]](),_0x47f2xa=_0x47f2x2[_0x1bfe[242]]();if(!_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]])&& (_0x47f2x9= _0x47f2x2[_0x1bfe[235]]+ _0x47f2x4* _0x47f2x5,_0x47f2xa= _0x47f2x2[_0x1bfe[236]]+ _0x47f2x3* _0x47f2x5,null!= _0x47f2x2[_0x1bfe[253]])){var _0x47f2x12=_0x47f2x2[_0x1bfe[253]][_0x1bfe[1598]]();if(this[_0x1bfe[2152]]){_0x47f2x12= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_ROTATION,0)}else {if(_0x47f2x2[_0x1bfe[253]][_0x1bfe[1590]]()){var _0x47f2x13=(_0x47f2x2[_0x1bfe[117]]- _0x47f2x2[_0x1bfe[119]])/ 2,_0x47f2x9=_0x47f2x9+ _0x47f2x13,_0x47f2xa=_0x47f2xa- _0x47f2x13}};0!= _0x47f2x12&& (_0x47f2x13= mxUtils[_0x1bfe[431]](_0x47f2x12),_0x47f2x12= Math[_0x1bfe[426]](_0x47f2x13),_0x47f2x13= Math[_0x1bfe[427]](_0x47f2x13),_0x47f2xa= mxUtils[_0x1bfe[432]]( new mxPoint(_0x47f2x9,_0x47f2xa),_0x47f2x12,_0x47f2x13, new mxPoint(_0x47f2x2[_0x1bfe[241]](),_0x47f2x2[_0x1bfe[242]]())),_0x47f2x9= _0x47f2xa[_0x1bfe[235]],_0x47f2xa= _0x47f2xa[_0x1bfe[236]])};return _0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]]), new mxRectangle(Math[_0x1bfe[488]](_0x47f2x9- _0x47f2x4/ 2* _0x47f2x5),Math[_0x1bfe[488]](_0x47f2xa- _0x47f2x3/ 2* _0x47f2x5),Math[_0x1bfe[488]](_0x47f2x4* _0x47f2x5),Math[_0x1bfe[488]](_0x47f2x3* _0x47f2x5))};return null};mxCellRenderer[_0x1bfe[202]][_0x1bfe[258]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(null!= _0x47f2x2[_0x1bfe[253]]){var _0x47f2x5=!1;_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]]);reconfigure= null!= _0x47f2x3?_0x47f2x3:!1;this[_0x1bfe[2204]](_0x47f2x2);if(_0x47f2x2[_0x1bfe[2082]]|| _0x47f2x2[_0x1bfe[2081]]){_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[2158]]?this[_0x1bfe[2166]](_0x47f2x2):this[_0x1bfe[2167]](_0x47f2x2)};if(_0x47f2x2[_0x1bfe[2082]]|| !mxUtils[_0x1bfe[2225]](_0x47f2x2[_0x1bfe[253]][_0x1bfe[124]],_0x47f2x2[_0x1bfe[124]])){this[_0x1bfe[2170]](_0x47f2x2),_0x47f2x3= !0};delete _0x47f2x2[_0x1bfe[2081]];delete _0x47f2x2[_0x1bfe[2082]];if(_0x47f2x3|| null== _0x47f2x2[_0x1bfe[253]][_0x1bfe[1562]]|| _0x47f2x2[_0x1bfe[253]][_0x1bfe[255]]!= _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]]|| !_0x47f2x2[_0x1bfe[253]][_0x1bfe[1562]][_0x1bfe[237]](_0x47f2x2)|| !mxUtils[_0x1bfe[2226]](_0x47f2x2[_0x1bfe[253]][_0x1bfe[1525]],_0x47f2x2[_0x1bfe[439]])){_0x47f2x5= !0,_0x47f2x2[_0x1bfe[253]][_0x1bfe[1525]]= null!= _0x47f2x2[_0x1bfe[439]]?_0x47f2x2[_0x1bfe[439]][_0x1bfe[1853]]():null,_0x47f2x2[_0x1bfe[253]][_0x1bfe[1562]]= new mxRectangle(_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]],_0x47f2x2[_0x1bfe[117]],_0x47f2x2[_0x1bfe[119]]),_0x47f2x2[_0x1bfe[253]][_0x1bfe[255]]= _0x47f2x2[_0x1bfe[441]][_0x1bfe[255]],null== _0x47f2x4|| _0x47f2x4?_0x47f2x2[_0x1bfe[253]][_0x1bfe[258]]():_0x47f2x2[_0x1bfe[253]][_0x1bfe[1577]]()};if(null== _0x47f2x4|| _0x47f2x4){this[_0x1bfe[2217]](_0x47f2x2,_0x47f2x5),this[_0x1bfe[2222]](_0x47f2x2,_0x47f2x5),this[_0x1bfe[2223]](_0x47f2x2,_0x47f2x5)}}};mxCellRenderer[_0x1bfe[202]][_0x1bfe[515]]= function(_0x47f2x2){null!= _0x47f2x2[_0x1bfe[253]]&& (null!= _0x47f2x2[_0x1bfe[963]]&& (_0x47f2x2[_0x1bfe[963]][_0x1bfe[515]](),_0x47f2x2[_0x1bfe[963]]= null),null!= _0x47f2x2[_0x1bfe[1211]]&& (_0x47f2x2[_0x1bfe[1211]][_0x1bfe[209]](function(_0x47f2x2,_0x47f2x4){_0x47f2x4[_0x1bfe[515]]()}),_0x47f2x2[_0x1bfe[1211]]= null),null!= _0x47f2x2[_0x1bfe[2207]]&& (_0x47f2x2[_0x1bfe[2207]][_0x1bfe[515]](),_0x47f2x2[_0x1bfe[2207]]= null),_0x47f2x2[_0x1bfe[253]][_0x1bfe[515]](),_0x47f2x2[_0x1bfe[253]]= null)};var mxEdgeStyle={EntityRelation:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=_0x47f2x2[_0x1bfe[441]],_0x47f2x12=_0x47f2xa[_0x1bfe[1179]];_0x47f2x5= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)* _0x47f2xa[_0x1bfe[255]];var _0x47f2x13=_0x47f2x2[_0x1bfe[439]],_0x47f2x14=_0x47f2x13[0],_0x47f2x15=_0x47f2x13[_0x47f2x13[_0x1bfe[67]]- 1],_0x47f2x13=!1;if(null!= _0x47f2x14){_0x47f2x3= new mxCellState,_0x47f2x3[_0x1bfe[235]]= _0x47f2x14[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]]= _0x47f2x14[_0x1bfe[236]]}else {if(null!= _0x47f2x3){var _0x47f2x16=mxUtils[_0x1bfe[2227]](_0x47f2x3,_0x47f2x2,!0,mxConstants.DIRECTION_MASK_NONE);_0x47f2x16!= mxConstants[_0x1bfe[434]]?_0x47f2x13= _0x47f2x16== mxConstants[_0x1bfe[436]]:(_0x47f2x14= _0x47f2x12[_0x1bfe[1198]](_0x47f2x3[_0x1bfe[246]]),_0x47f2x14[_0x1bfe[1500]]?_0x47f2x13= 0.5>= _0x47f2x14[_0x1bfe[235]]:null!= _0x47f2x4&& (_0x47f2x13= _0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]]< _0x47f2x3[_0x1bfe[235]]))}else {return}};_0x47f2x14= !0;null!= _0x47f2x15?(_0x47f2x4= new mxCellState,_0x47f2x4[_0x1bfe[235]]= _0x47f2x15[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]]= _0x47f2x15[_0x1bfe[236]]):null!= _0x47f2x4&& (_0x47f2x16= mxUtils[_0x1bfe[2227]](_0x47f2x4,_0x47f2x2,!1,mxConstants.DIRECTION_MASK_NONE),_0x47f2x16!= mxConstants[_0x1bfe[434]]?_0x47f2x14= _0x47f2x16== mxConstants[_0x1bfe[436]]:(_0x47f2x2= _0x47f2x12[_0x1bfe[1198]](_0x47f2x4[_0x1bfe[246]]),_0x47f2x2[_0x1bfe[1500]]?_0x47f2x14= 0.5>= _0x47f2x2[_0x1bfe[235]]:null!= _0x47f2x3&& (_0x47f2x14= _0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]]< _0x47f2x4[_0x1bfe[235]])));null!= _0x47f2x3&& null!= _0x47f2x4&& (_0x47f2x2= _0x47f2x13?_0x47f2x3[_0x1bfe[235]]:_0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]],_0x47f2x3= _0x47f2xa[_0x1bfe[2228]](_0x47f2x3),_0x47f2x12= _0x47f2x14?_0x47f2x4[_0x1bfe[235]]:_0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]],_0x47f2x4= _0x47f2xa[_0x1bfe[2228]](_0x47f2x4),_0x47f2xa= new mxPoint(_0x47f2x2+ (_0x47f2x13?-_0x47f2x5:_0x47f2x5),_0x47f2x3),_0x47f2x15= new mxPoint(_0x47f2x12+ (_0x47f2x14?-_0x47f2x5:_0x47f2x5),_0x47f2x4),_0x47f2x13== _0x47f2x14?(_0x47f2x5= _0x47f2x13?Math[_0x1bfe[243]](_0x47f2x2,_0x47f2x12)- _0x47f2x5:Math[_0x1bfe[160]](_0x47f2x2,_0x47f2x12)+ _0x47f2x5,_0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x5,_0x47f2x3)),_0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x5,_0x47f2x4))):(_0x47f2xa[_0x1bfe[235]]< _0x47f2x15[_0x1bfe[235]]== _0x47f2x13?(_0x47f2x5= _0x47f2x3+ (_0x47f2x4- _0x47f2x3)/ 2,_0x47f2x9[_0x1bfe[207]](_0x47f2xa),_0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2xa[_0x1bfe[235]],_0x47f2x5)),_0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x15[_0x1bfe[235]],_0x47f2x5))):_0x47f2x9[_0x1bfe[207]](_0x47f2xa),_0x47f2x9[_0x1bfe[207]](_0x47f2x15)))},Loop:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){if(null!= _0x47f2x3){_0x47f2x4= _0x47f2x2[_0x1bfe[441]];var _0x47f2xa=_0x47f2x4[_0x1bfe[1179]];_0x47f2x5= null!= _0x47f2x5&& 0< _0x47f2x5[_0x1bfe[67]]?_0x47f2x5[0]:null;null!= _0x47f2x5&& (_0x47f2x5= _0x47f2x4[_0x1bfe[2229]](_0x47f2x2,_0x47f2x5),mxUtils[_0x1bfe[442]](_0x47f2x3,_0x47f2x5[_0x1bfe[235]],_0x47f2x5[_0x1bfe[236]])&& (_0x47f2x5= null));var _0x47f2x12=0,_0x47f2x13=0,_0x47f2x14=0,_0x47f2x15=0,_0x47f2xa=mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_SEGMENT,_0x47f2xa[_0x1bfe[1020]])* _0x47f2x4[_0x1bfe[255]];_0x47f2x2= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST);_0x47f2x2== mxConstants[_0x1bfe[1358]]|| _0x47f2x2== mxConstants[_0x1bfe[1354]]?(_0x47f2x12= _0x47f2x4[_0x1bfe[2230]](_0x47f2x3),_0x47f2x13= _0x47f2xa):(_0x47f2x14= _0x47f2x4[_0x1bfe[2228]](_0x47f2x3),_0x47f2x15= _0x47f2xa);null== _0x47f2x5|| _0x47f2x5[_0x1bfe[235]]< _0x47f2x3[_0x1bfe[235]]|| _0x47f2x5[_0x1bfe[235]]> _0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]]?null!= _0x47f2x5?(_0x47f2x12= _0x47f2x5[_0x1bfe[235]],_0x47f2x15= Math[_0x1bfe[160]](Math[_0x1bfe[425]](_0x47f2x14- _0x47f2x5[_0x1bfe[236]]),_0x47f2x15)):_0x47f2x2== mxConstants[_0x1bfe[1358]]?_0x47f2x14= _0x47f2x3[_0x1bfe[236]]- 2* _0x47f2x13:_0x47f2x2== mxConstants[_0x1bfe[1354]]?_0x47f2x14= _0x47f2x3[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[119]]+ 2* _0x47f2x13:_0x47f2x12= _0x47f2x2== mxConstants[_0x1bfe[1356]]?_0x47f2x3[_0x1bfe[235]]- 2* _0x47f2x15:_0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]]+ 2* _0x47f2x15:null!= _0x47f2x5&& (_0x47f2x12= _0x47f2x4[_0x1bfe[2230]](_0x47f2x3),_0x47f2x13= Math[_0x1bfe[160]](Math[_0x1bfe[425]](_0x47f2x12- _0x47f2x5[_0x1bfe[235]]),_0x47f2x15),_0x47f2x14= _0x47f2x5[_0x1bfe[236]],_0x47f2x15= 0);_0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x12- _0x47f2x13,_0x47f2x14- _0x47f2x15));_0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x12+ _0x47f2x13,_0x47f2x14+ _0x47f2x15))}},ElbowConnector:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=null!= _0x47f2x5&& 0< _0x47f2x5[_0x1bfe[67]]?_0x47f2x5[0]:null,_0x47f2x12=!1,_0x47f2x13=!1;if(null!= _0x47f2x3&& null!= _0x47f2x4){if(null!= _0x47f2xa){var _0x47f2x14=Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[235]],_0x47f2x4[_0x1bfe[235]]),_0x47f2x15=Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]],_0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]]),_0x47f2x13=Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[236]],_0x47f2x4[_0x1bfe[236]]),_0x47f2x16=Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[119]],_0x47f2x4[_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[119]]),_0x47f2xa=_0x47f2x2[_0x1bfe[441]][_0x1bfe[2229]](_0x47f2x2,_0x47f2xa),_0x47f2x12=_0x47f2xa[_0x1bfe[236]]< _0x47f2x13|| _0x47f2xa[_0x1bfe[236]]> _0x47f2x16,_0x47f2x13=_0x47f2xa[_0x1bfe[235]]< _0x47f2x14|| _0x47f2xa[_0x1bfe[235]]> _0x47f2x15}else {_0x47f2x14= Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[235]],_0x47f2x4[_0x1bfe[235]]),_0x47f2x15= Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]],_0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]]),_0x47f2x12= _0x47f2x14== _0x47f2x15,_0x47f2x12|| (_0x47f2x13= Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[236]],_0x47f2x4[_0x1bfe[236]]),_0x47f2x16= Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[119]],_0x47f2x4[_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[119]]),_0x47f2x13= _0x47f2x13== _0x47f2x16)}};!_0x47f2x13&& (_0x47f2x12|| _0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2231]]]== mxConstants[_0x1bfe[2232]])?mxEdgeStyle.TopToBottom(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9):mxEdgeStyle.SideToSide(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9)},SideToSide:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=_0x47f2x2[_0x1bfe[441]];_0x47f2x5= null!= _0x47f2x5&& 0< _0x47f2x5[_0x1bfe[67]]?_0x47f2x5[0]:null;var _0x47f2x12=_0x47f2x2[_0x1bfe[439]],_0x47f2x13=_0x47f2x12[0],_0x47f2x12=_0x47f2x12[_0x47f2x12[_0x1bfe[67]]- 1];null!= _0x47f2x5&& (_0x47f2x5= _0x47f2xa[_0x1bfe[2229]](_0x47f2x2,_0x47f2x5));null!= _0x47f2x13&& (_0x47f2x3= new mxCellState,_0x47f2x3[_0x1bfe[235]]= _0x47f2x13[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]]= _0x47f2x13[_0x1bfe[236]]);null!= _0x47f2x12&& (_0x47f2x4= new mxCellState,_0x47f2x4[_0x1bfe[235]]= _0x47f2x12[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]]= _0x47f2x12[_0x1bfe[236]]);null!= _0x47f2x3&& null!= _0x47f2x4&& (_0x47f2x2= Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[235]],_0x47f2x4[_0x1bfe[235]]),_0x47f2x13= Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]],_0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]]),_0x47f2x2= null!= _0x47f2x5?_0x47f2x5[_0x1bfe[235]]:_0x47f2x13+ (_0x47f2x2- _0x47f2x13)/ 2,_0x47f2x13= _0x47f2xa[_0x1bfe[2228]](_0x47f2x3),_0x47f2xa= _0x47f2xa[_0x1bfe[2228]](_0x47f2x4),null!= _0x47f2x5&& (_0x47f2x5[_0x1bfe[236]]>= _0x47f2x3[_0x1bfe[236]]&& _0x47f2x5[_0x1bfe[236]]<= _0x47f2x3[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[119]]&& (_0x47f2x13= _0x47f2x5[_0x1bfe[236]]),_0x47f2x5[_0x1bfe[236]]>= _0x47f2x4[_0x1bfe[236]]&& _0x47f2x5[_0x1bfe[236]]<= _0x47f2x4[_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[119]]&& (_0x47f2xa= _0x47f2x5[_0x1bfe[236]])),!mxUtils[_0x1bfe[442]](_0x47f2x4,_0x47f2x2,_0x47f2x13)&& !mxUtils[_0x1bfe[442]](_0x47f2x3,_0x47f2x2,_0x47f2x13)&& _0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x2,_0x47f2x13)),!mxUtils[_0x1bfe[442]](_0x47f2x4,_0x47f2x2,_0x47f2xa)&& !mxUtils[_0x1bfe[442]](_0x47f2x3,_0x47f2x2,_0x47f2xa)&& _0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x2,_0x47f2xa)),1== _0x47f2x9[_0x1bfe[67]]&& (null!= _0x47f2x5?!mxUtils[_0x1bfe[442]](_0x47f2x4,_0x47f2x2,_0x47f2x5[_0x1bfe[236]])&& !mxUtils[_0x1bfe[442]](_0x47f2x3,_0x47f2x2,_0x47f2x5[_0x1bfe[236]])&& _0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x2,_0x47f2x5[_0x1bfe[236]])):(_0x47f2xa= Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[236]],_0x47f2x4[_0x1bfe[236]]),_0x47f2x3= Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[119]],_0x47f2x4[_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[119]]),_0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x2,_0x47f2xa+ (_0x47f2x3- _0x47f2xa)/ 2)))))},TopToBottom:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=_0x47f2x2[_0x1bfe[441]];_0x47f2x5= null!= _0x47f2x5&& 0< _0x47f2x5[_0x1bfe[67]]?_0x47f2x5[0]:null;var _0x47f2x12=_0x47f2x2[_0x1bfe[439]],_0x47f2x13=_0x47f2x12[0],_0x47f2x12=_0x47f2x12[_0x47f2x12[_0x1bfe[67]]- 1];null!= _0x47f2x5&& (_0x47f2x5= _0x47f2xa[_0x1bfe[2229]](_0x47f2x2,_0x47f2x5));null!= _0x47f2x13&& (_0x47f2x3= new mxCellState,_0x47f2x3[_0x1bfe[235]]= _0x47f2x13[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]]= _0x47f2x13[_0x1bfe[236]]);null!= _0x47f2x12&& (_0x47f2x4= new mxCellState,_0x47f2x4[_0x1bfe[235]]= _0x47f2x12[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]]= _0x47f2x12[_0x1bfe[236]]);null!= _0x47f2x3&& null!= _0x47f2x4&& (_0x47f2x13= Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[236]],_0x47f2x4[_0x1bfe[236]]),_0x47f2x12= Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[119]],_0x47f2x4[_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[119]]),_0x47f2x2= _0x47f2xa[_0x1bfe[2230]](_0x47f2x3),null!= _0x47f2x5&& (_0x47f2x5[_0x1bfe[235]]>= _0x47f2x3[_0x1bfe[235]]&& _0x47f2x5[_0x1bfe[235]]<= _0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]])&& (_0x47f2x2= _0x47f2x5[_0x1bfe[235]]),_0x47f2x13= null!= _0x47f2x5?_0x47f2x5[_0x1bfe[236]]:_0x47f2x12+ (_0x47f2x13- _0x47f2x12)/ 2,!mxUtils[_0x1bfe[442]](_0x47f2x4,_0x47f2x2,_0x47f2x13)&& !mxUtils[_0x1bfe[442]](_0x47f2x3,_0x47f2x2,_0x47f2x13)&& _0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x2,_0x47f2x13)),_0x47f2x2= null!= _0x47f2x5&& _0x47f2x5[_0x1bfe[235]]>= _0x47f2x4[_0x1bfe[235]]&& _0x47f2x5[_0x1bfe[235]]<= _0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]]?_0x47f2x5[_0x1bfe[235]]:_0x47f2xa[_0x1bfe[2230]](_0x47f2x4),!mxUtils[_0x1bfe[442]](_0x47f2x4,_0x47f2x2,_0x47f2x13)&& !mxUtils[_0x1bfe[442]](_0x47f2x3,_0x47f2x2,_0x47f2x13)&& _0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x2,_0x47f2x13)),1== _0x47f2x9[_0x1bfe[67]]&& (null!= _0x47f2x5&& 1== _0x47f2x9[_0x1bfe[67]]?!mxUtils[_0x1bfe[442]](_0x47f2x4,_0x47f2x5[_0x1bfe[235]],_0x47f2x13)&& !mxUtils[_0x1bfe[442]](_0x47f2x3,_0x47f2x5[_0x1bfe[235]],_0x47f2x13)&& _0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x5[_0x1bfe[235]],_0x47f2x13)):(_0x47f2xa= Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[235]],_0x47f2x4[_0x1bfe[235]]),_0x47f2x3= Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]],_0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]]),_0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2xa+ (_0x47f2x3- _0x47f2xa)/ 2,_0x47f2x13)))))},SegmentConnector:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=_0x47f2x2[_0x1bfe[439]],_0x47f2x12=!0,_0x47f2x13=null,_0x47f2x14=_0x47f2xa[0];null== _0x47f2x14&& null!= _0x47f2x3?_0x47f2x14= new mxPoint(_0x47f2x2[_0x1bfe[441]][_0x1bfe[2230]](_0x47f2x3),_0x47f2x2[_0x1bfe[441]][_0x1bfe[2228]](_0x47f2x3)):null!= _0x47f2x14&& (_0x47f2x14= _0x47f2x14[_0x1bfe[238]]());var _0x47f2x15=_0x47f2xa[_0x1bfe[67]]- 1;if(null!= _0x47f2x5&& 0< _0x47f2x5[_0x1bfe[67]]){for(var _0x47f2x13=_0x47f2x2[_0x1bfe[441]][_0x1bfe[2229]](_0x47f2x2,_0x47f2x5[0]),_0x47f2x16=_0x47f2x3,_0x47f2x17=_0x47f2xa[0],_0x47f2x18=!1,_0x47f2x19=!1,_0x47f2x18=_0x47f2x13,_0x47f2x1a=_0x47f2x5[_0x1bfe[67]],_0x47f2x1b=0;2> _0x47f2x1b;_0x47f2x1b++){var _0x47f2x1c=null!= _0x47f2x17&& _0x47f2x17[_0x1bfe[235]]== _0x47f2x18[_0x1bfe[235]],_0x47f2x1d=null!= _0x47f2x17&& _0x47f2x17[_0x1bfe[236]]== _0x47f2x18[_0x1bfe[236]],_0x47f2x1e=null!= _0x47f2x16&& _0x47f2x18[_0x1bfe[236]]>= _0x47f2x16[_0x1bfe[236]]&& _0x47f2x18[_0x1bfe[236]]<= _0x47f2x16[_0x1bfe[236]]+ _0x47f2x16[_0x1bfe[119]],_0x47f2x16=null!= _0x47f2x16&& _0x47f2x18[_0x1bfe[235]]>= _0x47f2x16[_0x1bfe[235]]&& _0x47f2x18[_0x1bfe[235]]<= _0x47f2x16[_0x1bfe[235]]+ _0x47f2x16[_0x1bfe[117]],_0x47f2x18=_0x47f2x1d|| null== _0x47f2x17&& _0x47f2x1e,_0x47f2x19=_0x47f2x1c|| null== _0x47f2x17&& _0x47f2x16;if(null!= _0x47f2x17&& !_0x47f2x1d&& !_0x47f2x1c&& (_0x47f2x1e|| _0x47f2x16)){_0x47f2x12= _0x47f2x1e?!1:!0;break};if(_0x47f2x19|| _0x47f2x18){_0x47f2x12= _0x47f2x18;1== _0x47f2x1b&& (_0x47f2x12= 0== _0x47f2x5[_0x1bfe[67]]% 2?_0x47f2x18:_0x47f2x19);break};_0x47f2x16= _0x47f2x4;_0x47f2x17= _0x47f2xa[_0x47f2x15];_0x47f2x18= _0x47f2x2[_0x1bfe[441]][_0x1bfe[2229]](_0x47f2x2,_0x47f2x5[_0x47f2x1a- 1])};_0x47f2x12&& (null!= _0x47f2xa[0]&& _0x47f2xa[0][_0x1bfe[236]]!= _0x47f2x13[_0x1bfe[236]]|| null== _0x47f2xa[0]&& null!= _0x47f2x3&& (_0x47f2x13[_0x1bfe[236]]< _0x47f2x3[_0x1bfe[236]]|| _0x47f2x13[_0x1bfe[236]]> _0x47f2x3[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[119]]))?_0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x14[_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]])):!_0x47f2x12&& (null!= _0x47f2xa[0]&& _0x47f2xa[0][_0x1bfe[235]]!= _0x47f2x13[_0x1bfe[235]]|| null== _0x47f2xa[0]&& null!= _0x47f2x3&& (_0x47f2x13[_0x1bfe[235]]< _0x47f2x3[_0x1bfe[235]]|| _0x47f2x13[_0x1bfe[235]]> _0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]]))&& _0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x13[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]]));_0x47f2x12?_0x47f2x14[_0x1bfe[236]]= _0x47f2x13[_0x1bfe[236]]:_0x47f2x14[_0x1bfe[235]]= _0x47f2x13[_0x1bfe[235]];for(_0x47f2x1b= 0;_0x47f2x1b< _0x47f2x5[_0x1bfe[67]];_0x47f2x1b++){_0x47f2x12= !_0x47f2x12,_0x47f2x13= _0x47f2x2[_0x1bfe[441]][_0x1bfe[2229]](_0x47f2x2,_0x47f2x5[_0x47f2x1b]),_0x47f2x12?_0x47f2x14[_0x1bfe[236]]= _0x47f2x13[_0x1bfe[236]]:_0x47f2x14[_0x1bfe[235]]= _0x47f2x13[_0x1bfe[235]],_0x47f2x9[_0x1bfe[207]](_0x47f2x14[_0x1bfe[238]]())}}else {_0x47f2x13= _0x47f2x14,_0x47f2x12= !0};_0x47f2x14= _0x47f2xa[_0x47f2x15];null== _0x47f2x14&& null!= _0x47f2x4&& (_0x47f2x14= new mxPoint(_0x47f2x2[_0x1bfe[441]][_0x1bfe[2230]](_0x47f2x4),_0x47f2x2[_0x1bfe[441]][_0x1bfe[2228]](_0x47f2x4)));_0x47f2x12&& (null!= _0x47f2xa[_0x47f2x15]&& _0x47f2xa[_0x47f2x15][_0x1bfe[236]]!= _0x47f2x13[_0x1bfe[236]]|| null== _0x47f2xa[_0x47f2x15]&& null!= _0x47f2x4&& (_0x47f2x13[_0x1bfe[236]]< _0x47f2x4[_0x1bfe[236]]|| _0x47f2x13[_0x1bfe[236]]> _0x47f2x4[_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[119]]))?_0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x14[_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]])):!_0x47f2x12&& (null!= _0x47f2xa[_0x47f2x15]&& _0x47f2xa[_0x47f2x15][_0x1bfe[235]]!= _0x47f2x13[_0x1bfe[235]]|| null== _0x47f2xa[_0x47f2x15]&& null!= _0x47f2x4&& (_0x47f2x13[_0x1bfe[235]]< _0x47f2x4[_0x1bfe[235]]|| _0x47f2x13[_0x1bfe[235]]> _0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]]))&& _0x47f2x9[_0x1bfe[207]]( new mxPoint(_0x47f2x13[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]]));if(null== _0x47f2xa[0]&& null!= _0x47f2x3){for(;1< _0x47f2x9[_0x1bfe[67]]&& mxUtils[_0x1bfe[442]](_0x47f2x3,_0x47f2x9[1][_0x1bfe[235]],_0x47f2x9[1][_0x1bfe[236]]);){_0x47f2x9= _0x47f2x9[_0x1bfe[300]](1,1)}};if(null== _0x47f2xa[_0x47f2x15]&& null!= _0x47f2x4){for(;1< _0x47f2x9[_0x1bfe[67]]&& mxUtils[_0x1bfe[442]](_0x47f2x4,_0x47f2x9[_0x47f2x9[_0x1bfe[67]]- 1][_0x1bfe[235]],_0x47f2x9[_0x47f2x9[_0x1bfe[67]]- 1][_0x1bfe[236]]);){_0x47f2x9= _0x47f2x9[_0x1bfe[300]](_0x47f2x9[_0x1bfe[67]]- 1,1)}}},orthBuffer:10,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,OrthConnector:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]],_0x47f2x12=null== _0x47f2x3?!1:_0x47f2xa[_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x3[_0x1bfe[246]]),_0x47f2xa=null== _0x47f2x4?!1:_0x47f2xa[_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x4[_0x1bfe[246]]);if(null!= _0x47f2x5&& 0< _0x47f2x5[_0x1bfe[67]]|| _0x47f2x12|| _0x47f2xa){mxEdgeStyle.SegmentConnector(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9)}else {_0x47f2x5= _0x47f2x2[_0x1bfe[439]];var _0x47f2x13=_0x47f2x5[0],_0x47f2x14=_0x47f2x5[_0x47f2x5[_0x1bfe[67]]- 1];_0x47f2x5= null!= _0x47f2x3?_0x47f2x3[_0x1bfe[235]]:_0x47f2x13[_0x1bfe[235]];var _0x47f2x12=null!= _0x47f2x3?_0x47f2x3[_0x1bfe[236]]:_0x47f2x13[_0x1bfe[236]],_0x47f2x15=null!= _0x47f2x3?_0x47f2x3[_0x1bfe[117]]:1,_0x47f2x16=null!= _0x47f2x3?_0x47f2x3[_0x1bfe[119]]:1,_0x47f2x17=null!= _0x47f2x4?_0x47f2x4[_0x1bfe[235]]:_0x47f2x14[_0x1bfe[235]],_0x47f2x18=null!= _0x47f2x4?_0x47f2x4[_0x1bfe[236]]:_0x47f2x14[_0x1bfe[236]],_0x47f2x19=null!= _0x47f2x4?_0x47f2x4[_0x1bfe[117]]:1,_0x47f2x1a=null!= _0x47f2x4?_0x47f2x4[_0x1bfe[119]]:1,_0x47f2xa=_0x47f2x2[_0x1bfe[441]][_0x1bfe[255]]* mxEdgeStyle[_0x1bfe[2233]],_0x47f2x1b=[mxConstants[_0x1bfe[2234]],mxConstants[_0x1bfe[2234]]];null!= _0x47f2x3&& (_0x47f2x1b[0]= mxUtils[_0x1bfe[2227]](_0x47f2x3,_0x47f2x2,!0,mxConstants.DIRECTION_MASK_ALL));null!= _0x47f2x4&& (_0x47f2x1b[1]= mxUtils[_0x1bfe[2227]](_0x47f2x4,_0x47f2x2,!1,mxConstants.DIRECTION_MASK_ALL));_0x47f2x2= [0,0];_0x47f2x5= [[_0x47f2x5,_0x47f2x12,_0x47f2x15,_0x47f2x16],[_0x47f2x17,_0x47f2x18,_0x47f2x19,_0x47f2x1a]];for(_0x47f2x15= 0;2> _0x47f2x15;_0x47f2x15++){mxEdgeStyle[_0x1bfe[2235]][_0x47f2x15][1]= _0x47f2x5[_0x47f2x15][0]- _0x47f2xa,mxEdgeStyle[_0x1bfe[2235]][_0x47f2x15][2]= _0x47f2x5[_0x47f2x15][1]- _0x47f2xa,mxEdgeStyle[_0x1bfe[2235]][_0x47f2x15][4]= _0x47f2x5[_0x47f2x15][0]+ _0x47f2x5[_0x47f2x15][2]+ _0x47f2xa,mxEdgeStyle[_0x1bfe[2235]][_0x47f2x15][8]= _0x47f2x5[_0x47f2x15][1]+ _0x47f2x5[_0x47f2x15][3]+ _0x47f2xa};_0x47f2x15= _0x47f2x5[0][0]+ _0x47f2x5[0][2]/ 2- (_0x47f2x5[1][0]+ _0x47f2x5[1][2]/ 2);_0x47f2x16= _0x47f2x5[0][1]+ _0x47f2x5[0][3]/ 2- (_0x47f2x5[1][1]+ _0x47f2x5[1][3]/ 2);_0x47f2x12= 0;0> _0x47f2x15?_0x47f2x12= 0> _0x47f2x16?2:1:0>= _0x47f2x16&& (_0x47f2x12= 3,0== _0x47f2x15&& (_0x47f2x12= 2));_0x47f2x16= null;null!= _0x47f2x3&& (_0x47f2x16= _0x47f2x13);_0x47f2x3= [[0.5,0.5],[0.5,0.5]];for(_0x47f2x15= 0;2> _0x47f2x15;_0x47f2x15++){null!= _0x47f2x16&& (_0x47f2x3[_0x47f2x15][0]= (_0x47f2x16[_0x1bfe[235]]- _0x47f2x5[_0x47f2x15][0])/ _0x47f2x5[_0x47f2x15][2],0.01> _0x47f2x3[_0x47f2x15][0]?_0x47f2x2[_0x47f2x15]= mxConstants[_0x1bfe[436]]:0.99< _0x47f2x3[_0x47f2x15][0]&& (_0x47f2x2[_0x47f2x15]= mxConstants[_0x1bfe[438]]),_0x47f2x3[_0x47f2x15][1]= (_0x47f2x16[_0x1bfe[236]]- _0x47f2x5[_0x47f2x15][1])/ _0x47f2x5[_0x47f2x15][3],0.01> _0x47f2x3[_0x47f2x15][1]?_0x47f2x2[_0x47f2x15]= mxConstants[_0x1bfe[435]]:0.99< _0x47f2x3[_0x47f2x15][1]&& (_0x47f2x2[_0x47f2x15]= mxConstants[_0x1bfe[437]])),_0x47f2x16= null,null!= _0x47f2x4&& (_0x47f2x16= _0x47f2x14)};_0x47f2x15= _0x47f2x5[0][1]- (_0x47f2x5[1][1]+ _0x47f2x5[1][3]);_0x47f2x16= _0x47f2x5[0][0]- (_0x47f2x5[1][0]+ _0x47f2x5[1][2]);_0x47f2x17= _0x47f2x5[1][1]- (_0x47f2x5[0][1]+ _0x47f2x5[0][3]);_0x47f2x18= _0x47f2x5[1][0]- (_0x47f2x5[0][0]+ _0x47f2x5[0][2]);mxEdgeStyle[_0x1bfe[2236]][1]= Math[_0x1bfe[160]](_0x47f2x16- 2* _0x47f2xa,0);mxEdgeStyle[_0x1bfe[2236]][2]= Math[_0x1bfe[160]](_0x47f2x15- 2* _0x47f2xa,0);mxEdgeStyle[_0x1bfe[2236]][4]= Math[_0x1bfe[160]](_0x47f2x17- 2* _0x47f2xa,0);mxEdgeStyle[_0x1bfe[2236]][3]= Math[_0x1bfe[160]](_0x47f2x18- 2* _0x47f2xa,0);_0x47f2x4= [];_0x47f2x13= [];_0x47f2x14= [];_0x47f2x13[0]= _0x47f2x16>= _0x47f2x18?mxConstants[_0x1bfe[436]]:mxConstants[_0x1bfe[438]];_0x47f2x14[0]= _0x47f2x15>= _0x47f2x17?mxConstants[_0x1bfe[435]]:mxConstants[_0x1bfe[437]];_0x47f2x13[1]= mxUtils[_0x1bfe[2237]](_0x47f2x13[0]);_0x47f2x14[1]= mxUtils[_0x1bfe[2237]](_0x47f2x14[0]);_0x47f2x16= _0x47f2x16>= _0x47f2x18?_0x47f2x16:_0x47f2x18;_0x47f2x17= _0x47f2x15>= _0x47f2x17?_0x47f2x15:_0x47f2x17;_0x47f2x18= [[0,0],[0,0]];_0x47f2x19= !1;for(_0x47f2x15= 0;2> _0x47f2x15;_0x47f2x15++){0== _0x47f2x2[_0x47f2x15]&& (0== (_0x47f2x13[_0x47f2x15]& _0x47f2x1b[_0x47f2x15])&& (_0x47f2x13[_0x47f2x15]= mxUtils[_0x1bfe[2237]](_0x47f2x13[_0x47f2x15])),0== (_0x47f2x14[_0x47f2x15]& _0x47f2x1b[_0x47f2x15])&& (_0x47f2x14[_0x47f2x15]= mxUtils[_0x1bfe[2237]](_0x47f2x14[_0x47f2x15])),_0x47f2x18[_0x47f2x15][0]= _0x47f2x14[_0x47f2x15],_0x47f2x18[_0x47f2x15][1]= _0x47f2x13[_0x47f2x15])};_0x47f2x17> 2* _0x47f2xa&& _0x47f2x16> 2* _0x47f2xa&& (0< (_0x47f2x13[0]& _0x47f2x1b[0])&& 0< (_0x47f2x14[1]& _0x47f2x1b[1])?(_0x47f2x18[0][0]= _0x47f2x13[0],_0x47f2x18[0][1]= _0x47f2x14[0],_0x47f2x18[1][0]= _0x47f2x14[1],_0x47f2x18[1][1]= _0x47f2x13[1],_0x47f2x19= !0):0< (_0x47f2x14[0]& _0x47f2x1b[0])&& 0< (_0x47f2x13[1]& _0x47f2x1b[1])&& (_0x47f2x18[0][0]= _0x47f2x14[0],_0x47f2x18[0][1]= _0x47f2x13[0],_0x47f2x18[1][0]= _0x47f2x13[1],_0x47f2x18[1][1]= _0x47f2x14[1],_0x47f2x19= !0));_0x47f2x17> 2* _0x47f2xa&& !_0x47f2x19&& (_0x47f2x18[0][0]= _0x47f2x14[0],_0x47f2x18[0][1]= _0x47f2x13[0],_0x47f2x18[1][0]= _0x47f2x14[1],_0x47f2x18[1][1]= _0x47f2x13[1],_0x47f2x19= !0);_0x47f2x16> 2* _0x47f2xa&& !_0x47f2x19&& (_0x47f2x18[0][0]= _0x47f2x13[0],_0x47f2x18[0][1]= _0x47f2x14[0],_0x47f2x18[1][0]= _0x47f2x13[1],_0x47f2x18[1][1]= _0x47f2x14[1]);for(_0x47f2x15= 0;2> _0x47f2x15;_0x47f2x15++){if(0== _0x47f2x2[_0x47f2x15]&& (0== (_0x47f2x18[_0x47f2x15][0]& _0x47f2x1b[_0x47f2x15])&& (_0x47f2x18[_0x47f2x15][0]= _0x47f2x18[_0x47f2x15][1]),_0x47f2x4[_0x47f2x15]= _0x47f2x18[_0x47f2x15][0]& _0x47f2x1b[_0x47f2x15],_0x47f2x4[_0x47f2x15]|= (_0x47f2x18[_0x47f2x15][1]& _0x47f2x1b[_0x47f2x15])<< 8,_0x47f2x4[_0x47f2x15]|= (_0x47f2x18[1- _0x47f2x15][_0x47f2x15]& _0x47f2x1b[_0x47f2x15])<< 16,_0x47f2x4[_0x47f2x15]|= (_0x47f2x18[1- _0x47f2x15][1- _0x47f2x15]& _0x47f2x1b[_0x47f2x15])<< 24,0== (_0x47f2x4[_0x47f2x15]& 15)&& (_0x47f2x4[_0x47f2x15]<<= 8),0== (_0x47f2x4[_0x47f2x15]& 3840)&& (_0x47f2x4[_0x47f2x15]= _0x47f2x4[_0x47f2x15]& 15| _0x47f2x4[_0x47f2x15]>> 8),0== (_0x47f2x4[_0x47f2x15]& 983040)&& (_0x47f2x4[_0x47f2x15]= _0x47f2x4[_0x47f2x15]& 65535| (_0x47f2x4[_0x47f2x15]& 251658240)>> 8),_0x47f2x2[_0x47f2x15]= _0x47f2x4[_0x47f2x15]& 15,_0x47f2x1b[_0x47f2x15]== mxConstants[_0x1bfe[436]]|| _0x47f2x1b[_0x47f2x15]== mxConstants[_0x1bfe[435]]|| _0x47f2x1b[_0x47f2x15]== mxConstants[_0x1bfe[438]]|| _0x47f2x1b[_0x47f2x15]== mxConstants[_0x1bfe[437]])){_0x47f2x2[_0x47f2x15]= _0x47f2x1b[_0x47f2x15]}};_0x47f2x15= _0x47f2x2[0]== mxConstants[_0x1bfe[438]]?3:_0x47f2x2[0];_0x47f2x1b= _0x47f2x2[1]== mxConstants[_0x1bfe[438]]?3:_0x47f2x2[1];_0x47f2x15-= _0x47f2x12;_0x47f2x1b-= _0x47f2x12;1> _0x47f2x15&& (_0x47f2x15+= 4);1> _0x47f2x1b&& (_0x47f2x1b+= 4);_0x47f2x1b= mxEdgeStyle[_0x1bfe[2238]][_0x47f2x15- 1][_0x47f2x1b- 1];mxEdgeStyle[_0x1bfe[2239]][0][0]= _0x47f2x5[0][0];mxEdgeStyle[_0x1bfe[2239]][0][1]= _0x47f2x5[0][1];switch(_0x47f2x2[0]){case mxConstants[_0x1bfe[436]]:mxEdgeStyle[_0x1bfe[2239]][0][0]-= _0x47f2xa;mxEdgeStyle[_0x1bfe[2239]][0][1]+= _0x47f2x3[0][1]* _0x47f2x5[0][3];break;case mxConstants[_0x1bfe[437]]:mxEdgeStyle[_0x1bfe[2239]][0][0]+= _0x47f2x3[0][0]* _0x47f2x5[0][2];mxEdgeStyle[_0x1bfe[2239]][0][1]+= _0x47f2x5[0][3]+ _0x47f2xa;break;case mxConstants[_0x1bfe[438]]:mxEdgeStyle[_0x1bfe[2239]][0][0]+= _0x47f2x5[0][2]+ _0x47f2xa;mxEdgeStyle[_0x1bfe[2239]][0][1]+= _0x47f2x3[0][1]* _0x47f2x5[0][3];break;case mxConstants[_0x1bfe[435]]:mxEdgeStyle[_0x1bfe[2239]][0][0]+= _0x47f2x3[0][0]* _0x47f2x5[0][2],mxEdgeStyle[_0x1bfe[2239]][0][1]-= _0x47f2xa};_0x47f2xa= 0;_0x47f2x13= _0x47f2x4= 0< (_0x47f2x2[0]& (mxConstants[_0x1bfe[438]]| mxConstants[_0x1bfe[436]]))?0:1;for(_0x47f2x15= _0x47f2x14= 0;_0x47f2x15< _0x47f2x1b[_0x1bfe[67]];_0x47f2x15++){_0x47f2x14= _0x47f2x1b[_0x47f2x15]& 15;_0x47f2x1a= _0x47f2x14== mxConstants[_0x1bfe[438]]?3:_0x47f2x14;_0x47f2x1a+= _0x47f2x12;4< _0x47f2x1a&& (_0x47f2x1a-= 4);_0x47f2x16= mxEdgeStyle[_0x1bfe[2240]][_0x47f2x1a- 1];_0x47f2x14= 0< _0x47f2x1a% 2?0:1;_0x47f2x14!= _0x47f2x4&& (_0x47f2xa++,mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa][0]= mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa- 1][0],mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa][1]= mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa- 1][1]);var _0x47f2x1c=0< (_0x47f2x1b[_0x47f2x15]& mxEdgeStyle[_0x1bfe[2241]]),_0x47f2x19=0< (_0x47f2x1b[_0x47f2x15]& mxEdgeStyle[_0x1bfe[2242]]),_0x47f2x17=(_0x47f2x1b[_0x47f2x15]& mxEdgeStyle[_0x1bfe[2243]])>> 5,_0x47f2x17=_0x47f2x17<< _0x47f2x12;15< _0x47f2x17&& (_0x47f2x17>>= 4);_0x47f2x18= 0< (_0x47f2x1b[_0x47f2x15]& mxEdgeStyle[_0x1bfe[2244]]);(_0x47f2x19|| _0x47f2x1c)&& 9> _0x47f2x17?(_0x47f2x1a= 0,_0x47f2x19= _0x47f2x19?0:1,_0x47f2x1a= _0x47f2x18&& 0== _0x47f2x14?_0x47f2x5[_0x47f2x19][0]+ _0x47f2x3[_0x47f2x19][0]* _0x47f2x5[_0x47f2x19][2]:_0x47f2x18?_0x47f2x5[_0x47f2x19][1]+ _0x47f2x3[_0x47f2x19][1]* _0x47f2x5[_0x47f2x19][3]:mxEdgeStyle[_0x1bfe[2235]][_0x47f2x19][_0x47f2x17],0== _0x47f2x14?(_0x47f2x17= (_0x47f2x1a- mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa][0])* _0x47f2x16[0],0< _0x47f2x17&& (mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa][0]+= _0x47f2x16[0]* _0x47f2x17)):(_0x47f2x17= (_0x47f2x1a- mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa][1])* _0x47f2x16[1],0< _0x47f2x17&& (mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa][1]+= _0x47f2x16[1]* _0x47f2x17))):_0x47f2x18&& (mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa][0]+= _0x47f2x16[0]* Math[_0x1bfe[425]](mxEdgeStyle[_0x1bfe[2236]][_0x47f2x1a]/ 2),mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa][1]+= _0x47f2x16[1]* Math[_0x1bfe[425]](mxEdgeStyle[_0x1bfe[2236]][_0x47f2x1a]/ 2));0< _0x47f2xa&& mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa][_0x47f2x14]== mxEdgeStyle[_0x1bfe[2239]][_0x47f2xa- 1][_0x47f2x14]?_0x47f2xa--:_0x47f2x4= _0x47f2x14};for(_0x47f2x15= 0;_0x47f2x15<= _0x47f2xa&& !(_0x47f2x15== _0x47f2xa&& ((0< (_0x47f2x2[1]& (mxConstants[_0x1bfe[438]]| mxConstants[_0x1bfe[436]]))?0:1)== _0x47f2x13?0:1)!= (_0x47f2xa+ 1)% 2);_0x47f2x15++){_0x47f2x9[_0x1bfe[207]]( new mxPoint(mxEdgeStyle[_0x1bfe[2239]][_0x47f2x15][0],mxEdgeStyle[_0x1bfe[2239]][_0x47f2x15][1]))}}},getRoutePattern:function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=_0x47f2x2[0]== mxConstants[_0x1bfe[438]]?3:_0x47f2x2[0];_0x47f2x2= _0x47f2x2[1]== mxConstants[_0x1bfe[438]]?3:_0x47f2x2[1];_0x47f2x9-= _0x47f2x3;_0x47f2x2-= _0x47f2x3;1> _0x47f2x9&& (_0x47f2x9+= 4);1> _0x47f2x2&& (_0x47f2x2+= 4);_0x47f2x3= routePatterns[_0x47f2x9- 1][_0x47f2x2- 1];if(0== _0x47f2x4|| 0== _0x47f2x5){null!= inlineRoutePatterns[_0x47f2x9- 1][_0x47f2x2- 1]&& (_0x47f2x3= inlineRoutePatterns[_0x47f2x9- 1][_0x47f2x2- 1])};return _0x47f2x3}},mxStyleRegistry={values:[],putValue:function(_0x47f2x2,_0x47f2x3){mxStyleRegistry[_0x1bfe[2245]][_0x47f2x2]= _0x47f2x3},getValue:function(_0x47f2x2){return mxStyleRegistry[_0x1bfe[2245]][_0x47f2x2]},getName:function(_0x47f2x2){for(var _0x47f2x3 in mxStyleRegistry[_0x1bfe[2245]]){if(mxStyleRegistry[_0x1bfe[2245]][_0x47f2x3]== _0x47f2x2){return _0x47f2x3}};return null}};mxStyleRegistry[_0x1bfe[2246]](mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry[_0x1bfe[2246]](mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);mxStyleRegistry[_0x1bfe[2246]](mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry[_0x1bfe[2246]](mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry[_0x1bfe[2246]](mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry[_0x1bfe[2246]](mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);mxStyleRegistry[_0x1bfe[2246]](mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry[_0x1bfe[2246]](mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);mxStyleRegistry[_0x1bfe[2246]](mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry[_0x1bfe[2246]](mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry[_0x1bfe[2246]](mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);function mxGraphView(_0x47f2x2){this[_0x1bfe[1179]]= _0x47f2x2;this[_0x1bfe[513]]= new mxPoint;this[_0x1bfe[2247]]= new mxRectangle;this[_0x1bfe[1214]]= new mxDictionary}mxGraphView[_0x1bfe[202]]= new mxEventSource;mxGraphView[_0x1bfe[202]][_0x1bfe[196]]= mxGraphView;mxGraphView[_0x1bfe[202]][_0x1bfe[2248]]= new mxPoint;mxGraphView[_0x1bfe[202]][_0x1bfe[2091]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[819]:_0x1bfe[110];mxGraphView[_0x1bfe[202]][_0x1bfe[2249]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[2250]:_0x1bfe[110];mxGraphView[_0x1bfe[202]][_0x1bfe[2251]]= !1;mxGraphView[_0x1bfe[202]][_0x1bfe[2252]]= !0;mxGraphView[_0x1bfe[202]][_0x1bfe[2253]]= !0;mxGraphView[_0x1bfe[202]][_0x1bfe[2254]]= !0;mxGraphView[_0x1bfe[202]][_0x1bfe[1179]]= null;mxGraphView[_0x1bfe[202]][_0x1bfe[1741]]= null;mxGraphView[_0x1bfe[202]][_0x1bfe[2247]]= null;mxGraphView[_0x1bfe[202]][_0x1bfe[255]]= 1;mxGraphView[_0x1bfe[202]][_0x1bfe[513]]= null;mxGraphView[_0x1bfe[202]][_0x1bfe[2255]]= !1;mxGraphView[_0x1bfe[202]][_0x1bfe[517]]= function(){return this[_0x1bfe[2247]]};mxGraphView[_0x1bfe[202]][_0x1bfe[2256]]= function(_0x47f2x2){this[_0x1bfe[2247]]= _0x47f2x2};mxGraphView[_0x1bfe[202]][_0x1bfe[1799]]= function(_0x47f2x2){var _0x47f2x3=null;if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]){for(var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){if(_0x47f2x4[_0x1bfe[1193]](_0x47f2x2[_0x47f2x5])|| _0x47f2x4[_0x1bfe[250]](_0x47f2x2[_0x47f2x5])){var _0x47f2x9=this[_0x1bfe[248]](_0x47f2x2[_0x47f2x5]);null!= _0x47f2x9&& (null== _0x47f2x3?_0x47f2x3= new mxRectangle(_0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]],_0x47f2x9[_0x1bfe[117]],_0x47f2x9[_0x1bfe[119]]):_0x47f2x3[_0x1bfe[99]](_0x47f2x9))}}};return _0x47f2x3};mxGraphView[_0x1bfe[202]][_0x1bfe[2257]]= function(_0x47f2x2){if(this[_0x1bfe[1741]]!= _0x47f2x2){var _0x47f2x3= new mxCurrentRootChange(this,_0x47f2x2);_0x47f2x3[_0x1bfe[350]]();var _0x47f2x4= new mxUndoableEdit(this,!1);_0x47f2x4[_0x1bfe[99]](_0x47f2x3);this[_0x1bfe[746]]( new mxEventObject(mxEvent.UNDO,_0x1bfe[1061],_0x47f2x4));this[_0x1bfe[1179]][_0x1bfe[2258]]()};return _0x47f2x2};mxGraphView[_0x1bfe[202]][_0x1bfe[829]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[255]],_0x47f2x9= new mxPoint(this[_0x1bfe[513]][_0x1bfe[235]],this[_0x1bfe[513]][_0x1bfe[236]]);if(this[_0x1bfe[255]]!= _0x47f2x2|| this[_0x1bfe[513]][_0x1bfe[235]]!= _0x47f2x3|| this[_0x1bfe[513]][_0x1bfe[236]]!= _0x47f2x4){this[_0x1bfe[255]]= _0x47f2x2,this[_0x1bfe[513]][_0x1bfe[235]]= _0x47f2x3,this[_0x1bfe[513]][_0x1bfe[236]]= _0x47f2x4,this[_0x1bfe[503]]()&& (this[_0x1bfe[2259]](),this[_0x1bfe[1179]][_0x1bfe[2258]]())};this[_0x1bfe[746]]( new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,_0x1bfe[255],_0x47f2x2,_0x1bfe[2260],_0x47f2x5,_0x1bfe[513],this[_0x1bfe[513]],_0x1bfe[2261],_0x47f2x9))};mxGraphView[_0x1bfe[202]][_0x1bfe[518]]= function(){return this[_0x1bfe[255]]};mxGraphView[_0x1bfe[202]][_0x1bfe[2262]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[255]];this[_0x1bfe[255]]!= _0x47f2x2&& (this[_0x1bfe[255]]= _0x47f2x2,this[_0x1bfe[503]]()&& (this[_0x1bfe[2259]](),this[_0x1bfe[1179]][_0x1bfe[2258]]()));this[_0x1bfe[746]]( new mxEventObject(mxEvent.SCALE,_0x1bfe[255],_0x47f2x2,_0x1bfe[2260],_0x47f2x3))};mxGraphView[_0x1bfe[202]][_0x1bfe[512]]= function(){return this[_0x1bfe[513]]};mxGraphView[_0x1bfe[202]][_0x1bfe[1147]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4= new mxPoint(this[_0x1bfe[513]][_0x1bfe[235]],this[_0x1bfe[513]][_0x1bfe[236]]);if(this[_0x1bfe[513]][_0x1bfe[235]]!= _0x47f2x2|| this[_0x1bfe[513]][_0x1bfe[236]]!= _0x47f2x3){this[_0x1bfe[513]][_0x1bfe[235]]= _0x47f2x2,this[_0x1bfe[513]][_0x1bfe[236]]= _0x47f2x3,this[_0x1bfe[503]]()&& (this[_0x1bfe[2259]](),this[_0x1bfe[1179]][_0x1bfe[2258]]())};this[_0x1bfe[746]]( new mxEventObject(mxEvent.TRANSLATE,_0x1bfe[513],this[_0x1bfe[513]],_0x1bfe[2261],_0x47f2x4))};mxGraphView[_0x1bfe[202]][_0x1bfe[802]]= function(){null!= this[_0x1bfe[1741]]&& this[_0x1bfe[200]]();this[_0x1bfe[2259]]()};mxGraphView[_0x1bfe[202]][_0x1bfe[2259]]= function(){this[_0x1bfe[2263]]();this[_0x1bfe[2264]]()};mxGraphView[_0x1bfe[202]][_0x1bfe[200]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[502]]();_0x47f2x2= _0x47f2x2|| _0x47f2x5[_0x1bfe[501]]();_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!1;_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!0;this[_0x1bfe[2265]](_0x47f2x2);if(_0x47f2x4&& (_0x47f2x3|| _0x47f2x2!= this[_0x1bfe[1741]])){_0x47f2x4= _0x47f2x5[_0x1bfe[262]](_0x47f2x2);for(var _0x47f2x9=0;_0x47f2x9< _0x47f2x4;_0x47f2x9++){this[_0x1bfe[200]](_0x47f2x5[_0x1bfe[263]](_0x47f2x2,_0x47f2x9),_0x47f2x3)}}else {this[_0x1bfe[2263]](_0x47f2x2)}};mxGraphView[_0x1bfe[202]][_0x1bfe[2263]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[502]]();_0x47f2x2= _0x47f2x2|| _0x47f2x9[_0x1bfe[501]]();_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!0;_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!0;_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:!1;var _0x47f2xa=this[_0x1bfe[248]](_0x47f2x2);null!= _0x47f2xa&& (_0x47f2xa[_0x1bfe[2080]]= !0,_0x47f2x5&& (_0x47f2xa[_0x1bfe[2082]]= !0));if(_0x47f2x3){for(var _0x47f2x12=_0x47f2x9[_0x1bfe[262]](_0x47f2x2),_0x47f2xa=0;_0x47f2xa< _0x47f2x12;_0x47f2xa++){var _0x47f2x13=_0x47f2x9[_0x1bfe[263]](_0x47f2x2,_0x47f2xa);this[_0x1bfe[2263]](_0x47f2x13,_0x47f2x3,_0x47f2x4,_0x47f2x5)}};if(_0x47f2x4){_0x47f2x5= _0x47f2x9[_0x1bfe[1707]](_0x47f2x2);for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x5;_0x47f2xa++){this[_0x1bfe[2263]](_0x47f2x9[_0x1bfe[1708]](_0x47f2x2,_0x47f2xa),_0x47f2x3,_0x47f2x4)}}};mxGraphView[_0x1bfe[202]][_0x1bfe[2264]]= function(_0x47f2x2){var _0x47f2x3=mxLog[_0x1bfe[2109]](_0x1bfe[2266]);window[_0x1bfe[879]]= mxResources[_0x1bfe[203]](this[_0x1bfe[2249]])|| this[_0x1bfe[2249]];var _0x47f2x4=null;if(this[_0x1bfe[2253]]&& null!= this[_0x1bfe[510]]&& null== this[_0x1bfe[1653]]&& (8== document[_0x1bfe[5]]|| mxClient[_0x1bfe[496]])){_0x47f2x4= this[_0x1bfe[510]][_0x1bfe[124]][_0x1bfe[495]];this[_0x1bfe[510]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[130];var _0x47f2x5=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x5[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];_0x47f2x5[_0x1bfe[124]][_0x1bfe[493]]= _0x1bfe[494];_0x47f2x5[_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188];_0x47f2x5[_0x1bfe[124]][_0x1bfe[495]]= mxClient[_0x1bfe[496]]?_0x1bfe[497]:_0x1bfe[498];_0x47f2x5[_0x1bfe[124]][_0x1bfe[499]]= _0x1bfe[500];document[_0x1bfe[112]][_0x1bfe[62]](_0x47f2x5);this[_0x1bfe[1653]]= _0x47f2x5};_0x47f2x2= _0x47f2x2|| (null!= this[_0x1bfe[1741]]?this[_0x1bfe[1741]]:this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[501]]());this[_0x1bfe[2267]](null,_0x47f2x2);_0x47f2x2= this[_0x1bfe[2268]](null,_0x47f2x2);null== _0x47f2x2&& (_0x47f2x2= new mxRectangle);this[_0x1bfe[2256]](_0x47f2x2);this[_0x1bfe[2269]]();null!= _0x47f2x4&& (this[_0x1bfe[510]][_0x1bfe[124]][_0x1bfe[495]]= _0x47f2x4,document[_0x1bfe[112]][_0x1bfe[266]](this[_0x1bfe[1653]]),this[_0x1bfe[1653]]= null);window[_0x1bfe[879]]= mxResources[_0x1bfe[203]](this[_0x1bfe[2091]])|| this[_0x1bfe[2091]];mxLog[_0x1bfe[2110]](_0x1bfe[2266],_0x47f2x3)};mxGraphView[_0x1bfe[202]][_0x1bfe[2270]]= function(_0x47f2x2){return new mxRectangleShape(_0x47f2x2,_0x1bfe[1391],_0x1bfe[586])};mxGraphView[_0x1bfe[202]][_0x1bfe[2269]]= function(){var _0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[2271]]();if(null!= _0x47f2x2){if(null== this[_0x1bfe[1617]]|| this[_0x1bfe[1617]][_0x1bfe[618]]!= _0x47f2x2[_0x1bfe[390]]){null!= this[_0x1bfe[1617]]&& this[_0x1bfe[1617]][_0x1bfe[515]]();var _0x47f2x3= new mxRectangle(0,0,1,1);this[_0x1bfe[1617]]= new mxImageShape(_0x47f2x3,_0x47f2x2[_0x1bfe[390]]);this[_0x1bfe[1617]][_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]];this[_0x1bfe[1617]][_0x1bfe[176]](this[_0x1bfe[2053]]);this[_0x1bfe[1617]][_0x1bfe[258]]()};this[_0x1bfe[2272]](this[_0x1bfe[1617]],_0x47f2x2)}else {null!= this[_0x1bfe[1617]]&& (this[_0x1bfe[1617]][_0x1bfe[515]](),this[_0x1bfe[1617]]= null)};this[_0x1bfe[1179]][_0x1bfe[2273]]?(_0x47f2x3= this[_0x1bfe[2274]](),null== this[_0x1bfe[2275]]?(this[_0x1bfe[2275]]= this[_0x1bfe[2270]](_0x47f2x3),this[_0x1bfe[2275]][_0x1bfe[255]]= this[_0x1bfe[255]],this[_0x1bfe[2275]][_0x1bfe[1596]]= !0,this[_0x1bfe[2275]][_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]],this[_0x1bfe[2275]][_0x1bfe[176]](this[_0x1bfe[2053]]),this[_0x1bfe[2275]][_0x1bfe[258]](),mxEvent[_0x1bfe[169]](this[_0x1bfe[2275]][_0x1bfe[252]],_0x1bfe[760],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[1179]][_0x1bfe[761]](_0x47f2x2)})),mxEvent[_0x1bfe[759]](this[_0x1bfe[2275]][_0x1bfe[252]],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[1179]][_0x1bfe[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x47f2x2))}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){null!= this[_0x1bfe[1179]][_0x1bfe[2276]]&& this[_0x1bfe[1179]][_0x1bfe[2276]][_0x1bfe[2277]]()&& this[_0x1bfe[1179]][_0x1bfe[2276]][_0x1bfe[801]]();this[_0x1bfe[1179]][_0x1bfe[1009]]&& !mxEvent[_0x1bfe[721]](_0x47f2x2)&& this[_0x1bfe[1179]][_0x1bfe[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x47f2x2))}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[1179]][_0x1bfe[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x47f2x2))}))):(this[_0x1bfe[2275]][_0x1bfe[255]]= this[_0x1bfe[255]],this[_0x1bfe[2275]][_0x1bfe[1562]]= _0x47f2x3,this[_0x1bfe[2275]][_0x1bfe[258]]())):null!= this[_0x1bfe[2275]]&& (this[_0x1bfe[2275]][_0x1bfe[515]](),this[_0x1bfe[2275]]= null)};mxGraphView[_0x1bfe[202]][_0x1bfe[2274]]= function(){var _0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[2013]],_0x47f2x3=this[_0x1bfe[255]]* this[_0x1bfe[1179]][_0x1bfe[2012]];return new mxRectangle(this[_0x1bfe[255]]* this[_0x1bfe[513]][_0x1bfe[235]],this[_0x1bfe[255]]* this[_0x1bfe[513]][_0x1bfe[236]],_0x47f2x2[_0x1bfe[117]]* _0x47f2x3,_0x47f2x2[_0x1bfe[119]]* _0x47f2x3)};mxGraphView[_0x1bfe[202]][_0x1bfe[2272]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x2[_0x1bfe[255]]= this[_0x1bfe[255]];_0x47f2x2[_0x1bfe[1562]][_0x1bfe[235]]= this[_0x1bfe[255]]* this[_0x1bfe[513]][_0x1bfe[235]];_0x47f2x2[_0x1bfe[1562]][_0x1bfe[236]]= this[_0x1bfe[255]]* this[_0x1bfe[513]][_0x1bfe[236]];_0x47f2x2[_0x1bfe[1562]][_0x1bfe[117]]= this[_0x1bfe[255]]* _0x47f2x3[_0x1bfe[117]];_0x47f2x2[_0x1bfe[1562]][_0x1bfe[119]]= this[_0x1bfe[255]]* _0x47f2x3[_0x1bfe[119]];_0x47f2x2[_0x1bfe[258]]()};mxGraphView[_0x1bfe[202]][_0x1bfe[2267]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=this[_0x1bfe[248]](_0x47f2x3,!0);if(null!= _0x47f2x5&& _0x47f2x5[_0x1bfe[2080]]){if(this[_0x1bfe[1179]][_0x1bfe[1714]](_0x47f2x3)){if(_0x47f2x3!= this[_0x1bfe[1741]]&& null!= _0x47f2x2){_0x47f2x5[_0x1bfe[2079]][_0x1bfe[235]]= 0;_0x47f2x5[_0x1bfe[2079]][_0x1bfe[236]]= 0;_0x47f2x5[_0x1bfe[2078]][_0x1bfe[235]]= _0x47f2x2[_0x1bfe[2078]][_0x1bfe[235]];_0x47f2x5[_0x1bfe[2078]][_0x1bfe[236]]= _0x47f2x2[_0x1bfe[2078]][_0x1bfe[236]];var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x3);if(null!= _0x47f2x9){if(!_0x47f2x4[_0x1bfe[250]](_0x47f2x3)){var _0x47f2xa=_0x47f2x9[_0x1bfe[1368]]|| this[_0x1bfe[2248]];_0x47f2x9[_0x1bfe[1500]]?(_0x47f2x5[_0x1bfe[2078]][_0x1bfe[235]]+= _0x47f2x9[_0x1bfe[235]]* _0x47f2x2[_0x1bfe[117]]/ this[_0x1bfe[255]]+ _0x47f2xa[_0x1bfe[235]],_0x47f2x5[_0x1bfe[2078]][_0x1bfe[236]]+= _0x47f2x9[_0x1bfe[236]]* _0x47f2x2[_0x1bfe[119]]/ this[_0x1bfe[255]]+ _0x47f2xa[_0x1bfe[236]]):(_0x47f2x5[_0x1bfe[2079]][_0x1bfe[235]]= this[_0x1bfe[255]]* _0x47f2xa[_0x1bfe[235]],_0x47f2x5[_0x1bfe[2079]][_0x1bfe[236]]= this[_0x1bfe[255]]* _0x47f2xa[_0x1bfe[236]],_0x47f2x5[_0x1bfe[2078]][_0x1bfe[235]]+= _0x47f2x9[_0x1bfe[235]],_0x47f2x5[_0x1bfe[2078]][_0x1bfe[236]]+= _0x47f2x9[_0x1bfe[236]])};_0x47f2x5[_0x1bfe[235]]= this[_0x1bfe[255]]* (this[_0x1bfe[513]][_0x1bfe[235]]+ _0x47f2x5[_0x1bfe[2078]][_0x1bfe[235]]);_0x47f2x5[_0x1bfe[236]]= this[_0x1bfe[255]]* (this[_0x1bfe[513]][_0x1bfe[236]]+ _0x47f2x5[_0x1bfe[2078]][_0x1bfe[236]]);_0x47f2x5[_0x1bfe[117]]= this[_0x1bfe[255]]* _0x47f2x9[_0x1bfe[117]];_0x47f2x5[_0x1bfe[119]]= this[_0x1bfe[255]]* _0x47f2x9[_0x1bfe[119]];if(_0x47f2x4[_0x1bfe[1193]](_0x47f2x3)){if(_0x47f2x9[_0x1bfe[1500]]&& (_0x47f2xa= mxUtils[_0x1bfe[431]](_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]),0!= _0x47f2xa)){var _0x47f2x9=Math[_0x1bfe[426]](_0x47f2xa),_0x47f2xa=Math[_0x1bfe[427]](_0x47f2xa),_0x47f2x12= new mxPoint(_0x47f2x5[_0x1bfe[241]](),_0x47f2x5[_0x1bfe[242]]()),_0x47f2x13= new mxPoint(_0x47f2x2[_0x1bfe[241]](),_0x47f2x2[_0x1bfe[242]]()),_0x47f2x9=mxUtils[_0x1bfe[432]](_0x47f2x12,_0x47f2x9,_0x47f2xa,_0x47f2x13);_0x47f2x5[_0x1bfe[235]]= _0x47f2x9[_0x1bfe[235]]- _0x47f2x5[_0x1bfe[117]]/ 2;_0x47f2x5[_0x1bfe[236]]= _0x47f2x9[_0x1bfe[236]]- _0x47f2x5[_0x1bfe[119]]/ 2};this[_0x1bfe[2279]](_0x47f2x5)}}}}else {this[_0x1bfe[2265]](_0x47f2x3)};_0x47f2xa= this[_0x1bfe[1179]][_0x1bfe[2280]](_0x47f2x3);null!= _0x47f2xa&& (_0x47f2x5[_0x1bfe[2078]][_0x1bfe[235]]+= _0x47f2xa[_0x1bfe[235]],_0x47f2x5[_0x1bfe[2078]][_0x1bfe[236]]+= _0x47f2xa[_0x1bfe[236]])};if(null!= _0x47f2x5&& (!this[_0x1bfe[1179]][_0x1bfe[1742]](_0x47f2x3)|| _0x47f2x3== this[_0x1bfe[1741]])){_0x47f2x9= _0x47f2x4[_0x1bfe[262]](_0x47f2x3);for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x9;_0x47f2xa++){_0x47f2x12= _0x47f2x4[_0x1bfe[263]](_0x47f2x3,_0x47f2xa),this[_0x1bfe[2267]](_0x47f2x5,_0x47f2x12)}}};mxGraphView[_0x1bfe[202]][_0x1bfe[2279]]= function(_0x47f2x2){var _0x47f2x3=mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);_0x47f2x3== mxConstants[_0x1bfe[2132]]?_0x47f2x2[_0x1bfe[2079]][_0x1bfe[235]]-= _0x47f2x2[_0x1bfe[117]]:_0x47f2x3== mxConstants[_0x1bfe[480]]&& (_0x47f2x2[_0x1bfe[2079]][_0x1bfe[235]]+= _0x47f2x2[_0x1bfe[117]]);_0x47f2x3= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);_0x47f2x3== mxConstants[_0x1bfe[1687]]?_0x47f2x2[_0x1bfe[2079]][_0x1bfe[236]]-= _0x47f2x2[_0x1bfe[119]]:_0x47f2x3== mxConstants[_0x1bfe[482]]&& (_0x47f2x2[_0x1bfe[2079]][_0x1bfe[236]]+= _0x47f2x2[_0x1bfe[119]])};mxGraphView[_0x1bfe[202]][_0x1bfe[2268]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=this[_0x1bfe[248]](_0x47f2x3),_0x47f2x9=null;if(null!= _0x47f2x5){if(_0x47f2x5[_0x1bfe[2080]]){var _0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x3);if(null!= _0x47f2xa&& _0x47f2x4[_0x1bfe[250]](_0x47f2x3)){var _0x47f2x12=this[_0x1bfe[248]](this[_0x1bfe[1710]](_0x47f2x3,!0));_0x47f2x5[_0x1bfe[2090]](_0x47f2x12,!0);if(null!= _0x47f2x12&& _0x47f2x4[_0x1bfe[250]](_0x47f2x12[_0x1bfe[246]])&& !_0x47f2x4[_0x1bfe[1720]](_0x47f2x12[_0x1bfe[246]],_0x47f2x3)){var _0x47f2x13=this[_0x1bfe[248]](_0x47f2x4[_0x1bfe[1197]](_0x47f2x12[_0x1bfe[246]]));this[_0x1bfe[2268]](_0x47f2x13,_0x47f2x12[_0x1bfe[246]])};var _0x47f2x14=this[_0x1bfe[248]](this[_0x1bfe[1710]](_0x47f2x3,!1));_0x47f2x5[_0x1bfe[2090]](_0x47f2x14,!1);null!= _0x47f2x14&& (_0x47f2x4[_0x1bfe[250]](_0x47f2x14[_0x1bfe[246]])&& !_0x47f2x4[_0x1bfe[1720]](_0x47f2x14[_0x1bfe[246]],_0x47f2x3))&& (_0x47f2x13= this[_0x1bfe[248]](_0x47f2x4[_0x1bfe[1197]](_0x47f2x14[_0x1bfe[246]])),this[_0x1bfe[2268]](_0x47f2x13,_0x47f2x14[_0x1bfe[246]]));this[_0x1bfe[2281]](_0x47f2x5,_0x47f2x12,_0x47f2x14);this[_0x1bfe[2282]](_0x47f2x5,_0x47f2xa[_0x1bfe[1525]],_0x47f2x12,_0x47f2x14);this[_0x1bfe[2283]](_0x47f2x5,_0x47f2x12,_0x47f2x14);this[_0x1bfe[2284]](_0x47f2x5);this[_0x1bfe[2285]](_0x47f2x5)}else {null!= _0x47f2xa&& (_0x47f2xa[_0x1bfe[1500]]&& null!= _0x47f2x2&& _0x47f2x4[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]]))&& (_0x47f2xa= this[_0x1bfe[245]](_0x47f2x2,_0x47f2xa),null!= _0x47f2xa&& (_0x47f2x5[_0x1bfe[235]]= _0x47f2xa[_0x1bfe[235]],_0x47f2x5[_0x1bfe[236]]= _0x47f2xa[_0x1bfe[236]],_0x47f2xa[_0x1bfe[235]]= _0x47f2xa[_0x1bfe[235]]/ this[_0x1bfe[255]]- this[_0x1bfe[513]][_0x1bfe[235]],_0x47f2xa[_0x1bfe[236]]= _0x47f2xa[_0x1bfe[236]]/ this[_0x1bfe[255]]- this[_0x1bfe[513]][_0x1bfe[236]],_0x47f2x5[_0x1bfe[2078]]= _0x47f2xa,this[_0x1bfe[2286]](_0x47f2x2,_0x47f2x5)))};_0x47f2x5[_0x1bfe[2080]]= !1;_0x47f2x3!= this[_0x1bfe[1741]]&& this[_0x1bfe[1179]][_0x1bfe[259]][_0x1bfe[258]](_0x47f2x5,!1,this[_0x1bfe[2287]]())};if(_0x47f2x4[_0x1bfe[250]](_0x47f2x3)|| _0x47f2x4[_0x1bfe[1193]](_0x47f2x3)){null!= _0x47f2x5[_0x1bfe[253]]&& null!= _0x47f2x5[_0x1bfe[253]][_0x1bfe[1563]]&& (_0x47f2x9= _0x47f2x5[_0x1bfe[253]][_0x1bfe[1563]][_0x1bfe[238]]()),null!= _0x47f2x5[_0x1bfe[963]]&& !this[_0x1bfe[1179]][_0x1bfe[2130]](_0x47f2x5[_0x1bfe[246]])&& null!= _0x47f2x5[_0x1bfe[963]][_0x1bfe[1563]]&& (null!= _0x47f2x9?_0x47f2x9[_0x1bfe[99]](_0x47f2x5[_0x1bfe[963]][_0x1bfe[1563]]):_0x47f2x9= _0x47f2x5[_0x1bfe[963]][_0x1bfe[1563]][_0x1bfe[238]]())}};if(null!= _0x47f2x5&& (!this[_0x1bfe[1179]][_0x1bfe[1742]](_0x47f2x3)|| _0x47f2x3== this[_0x1bfe[1741]])){_0x47f2xa= _0x47f2x4[_0x1bfe[262]](_0x47f2x3);for(_0x47f2x12= 0;_0x47f2x12< _0x47f2xa;_0x47f2x12++){_0x47f2x13= _0x47f2x4[_0x1bfe[263]](_0x47f2x3,_0x47f2x12),_0x47f2x13= this[_0x1bfe[2268]](_0x47f2x5,_0x47f2x13),null!= _0x47f2x13&& (null== _0x47f2x9?_0x47f2x9= _0x47f2x13:_0x47f2x9[_0x1bfe[99]](_0x47f2x13))}};return _0x47f2x9};mxGraphView[_0x1bfe[202]][_0x1bfe[2286]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x3[_0x1bfe[246]];if(!this[_0x1bfe[1179]][_0x1bfe[1742]](_0x47f2x4)|| _0x47f2x4== this[_0x1bfe[1741]]){for(var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x9=_0x47f2x5[_0x1bfe[262]](_0x47f2x4),_0x47f2xa=0;_0x47f2xa< _0x47f2x9;_0x47f2xa++){this[_0x1bfe[2267]](_0x47f2x3,_0x47f2x5[_0x1bfe[263]](_0x47f2x4,_0x47f2xa))}}};mxGraphView[_0x1bfe[202]][_0x1bfe[2281]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[2289]](_0x47f2x2,_0x47f2x3,!0,this[_0x1bfe[1179]][_0x1bfe[2288]](_0x47f2x2,_0x47f2x3,!0));this[_0x1bfe[2289]](_0x47f2x2,_0x47f2x4,!1,this[_0x1bfe[1179]][_0x1bfe[2288]](_0x47f2x2,_0x47f2x4,!1))};mxGraphView[_0x1bfe[202]][_0x1bfe[2289]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=null;null!= _0x47f2x5&& (_0x47f2x9= this[_0x1bfe[1179]][_0x1bfe[2290]](_0x47f2x3,_0x47f2x5));if(null== _0x47f2x9&& null== _0x47f2x3){_0x47f2x3= this[_0x1bfe[255]];_0x47f2x5= this[_0x1bfe[513]];var _0x47f2xa=_0x47f2x2[_0x1bfe[2078]],_0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x2[_0x1bfe[246]])[_0x1bfe[2006]](_0x47f2x4);null!= _0x47f2x9&& (_0x47f2x9= new mxPoint(_0x47f2x3* (_0x47f2x5[_0x1bfe[235]]+ _0x47f2x9[_0x1bfe[235]]+ _0x47f2xa[_0x1bfe[235]]),_0x47f2x3* (_0x47f2x5[_0x1bfe[236]]+ _0x47f2x9[_0x1bfe[236]]+ _0x47f2xa[_0x1bfe[236]])))};_0x47f2x2[_0x1bfe[2088]](_0x47f2x9,_0x47f2x4)};mxGraphView[_0x1bfe[202]][_0x1bfe[2282]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x2){var _0x47f2x9=[];_0x47f2x9[_0x1bfe[207]](_0x47f2x2[_0x1bfe[439]][0]);var _0x47f2xa=this[_0x1bfe[2291]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5);if(null!= _0x47f2xa){_0x47f2x4= this[_0x1bfe[2292]](_0x47f2x2,_0x47f2x4,!0),_0x47f2x5= this[_0x1bfe[2292]](_0x47f2x2,_0x47f2x5,!1),_0x47f2xa(_0x47f2x2,_0x47f2x4,_0x47f2x5,_0x47f2x3,_0x47f2x9)}else {if(null!= _0x47f2x3){for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x3[_0x1bfe[67]];_0x47f2xa++){null!= _0x47f2x3[_0x47f2xa]&& (_0x47f2x5= mxUtils[_0x1bfe[238]](_0x47f2x3[_0x47f2xa]),_0x47f2x9[_0x1bfe[207]](this[_0x1bfe[2229]](_0x47f2x2,_0x47f2x5)))}}};_0x47f2x3= _0x47f2x2[_0x1bfe[439]];_0x47f2x9[_0x1bfe[207]](_0x47f2x3[_0x47f2x3[_0x1bfe[67]]- 1]);_0x47f2x2[_0x1bfe[439]]= _0x47f2x9}};mxGraphView[_0x1bfe[202]][_0x1bfe[2229]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x2[_0x1bfe[2078]];return new mxPoint(this[_0x1bfe[255]]* (_0x47f2x3[_0x1bfe[235]]+ this[_0x1bfe[513]][_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[235]]),this[_0x1bfe[255]]* (_0x47f2x3[_0x1bfe[236]]+ this[_0x1bfe[513]][_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[236]]))};mxGraphView[_0x1bfe[202]][_0x1bfe[2291]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x2= null!= _0x47f2x4&& _0x47f2x4== _0x47f2x5?mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_LOOP,this[_0x1bfe[1179]][_0x1bfe[2293]]):!mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_NOEDGESTYLE,!1)?_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2294]]]:null;_0x1bfe[1516]== typeof _0x47f2x2&& (_0x47f2x3= mxStyleRegistry[_0x1bfe[433]](_0x47f2x2),null== _0x47f2x3&& this[_0x1bfe[2295]]()&& (_0x47f2x3= mxUtils[_0x1bfe[1545]](_0x47f2x2)),_0x47f2x2= _0x47f2x3);return _0x1bfe[279]== typeof _0x47f2x2?_0x47f2x2:null};mxGraphView[_0x1bfe[202]][_0x1bfe[2283]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=_0x47f2x2[_0x1bfe[439]],_0x47f2x9=_0x47f2x5[0];null== _0x47f2x5[_0x47f2x5[_0x1bfe[67]]- 1]&& null!= _0x47f2x4&& this[_0x1bfe[2296]](_0x47f2x2,_0x47f2x4,_0x47f2x3,!1);null== _0x47f2x9&& null!= _0x47f2x3&& this[_0x1bfe[2296]](_0x47f2x2,_0x47f2x3,_0x47f2x4,!0)};mxGraphView[_0x1bfe[202]][_0x1bfe[2296]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x3= this[_0x1bfe[2292]](_0x47f2x2,_0x47f2x3,_0x47f2x5);var _0x47f2x9=this[_0x1bfe[2297]](_0x47f2x2,_0x47f2x4,_0x47f2x5),_0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[2298]](_0x47f2x2);_0x47f2x4= mxUtils[_0x1bfe[431]](Number(_0x47f2x3[_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]));var _0x47f2x12= new mxPoint(_0x47f2x3[_0x1bfe[241]](),_0x47f2x3[_0x1bfe[242]]());if(0!= _0x47f2x4){var _0x47f2x13=Math[_0x1bfe[426]](-_0x47f2x4),_0x47f2x14=Math[_0x1bfe[427]](-_0x47f2x4),_0x47f2x9=mxUtils[_0x1bfe[432]](_0x47f2x9,_0x47f2x13,_0x47f2x14,_0x47f2x12)};_0x47f2x13= parseFloat(_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2299]]]|| 0);_0x47f2x13+= parseFloat(_0x47f2x2[_0x1bfe[124]][_0x47f2x5?mxConstants[_0x1bfe[2300]]:mxConstants[_0x1bfe[2301]]]|| 0);_0x47f2x3= this[_0x1bfe[2302]](_0x47f2x3,_0x47f2x9,0== _0x47f2x4&& _0x47f2xa,_0x47f2x13);0!= _0x47f2x4&& (_0x47f2x13= Math[_0x1bfe[426]](_0x47f2x4),_0x47f2x14= Math[_0x1bfe[427]](_0x47f2x4),_0x47f2x3= mxUtils[_0x1bfe[432]](_0x47f2x3,_0x47f2x13,_0x47f2x14,_0x47f2x12));_0x47f2x2[_0x1bfe[2088]](_0x47f2x3,_0x47f2x5)};mxGraphView[_0x1bfe[202]][_0x1bfe[2292]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],_0x47f2x4?mxConstants[_0x1bfe[2303]]:mxConstants[_0x1bfe[2304]]);null!= _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[248]](this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[736]](_0x47f2x2)),null!= _0x47f2x2&& (_0x47f2x3= _0x47f2x2));return _0x47f2x3};mxGraphView[_0x1bfe[202]][_0x1bfe[2302]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=null;if(null!= _0x47f2x2){var _0x47f2xa=this[_0x1bfe[2305]](_0x47f2x2);if(null!= _0x47f2xa&& null!= _0x47f2x3&& (_0x47f2x5= this[_0x1bfe[2087]](_0x47f2x2,_0x47f2x5),0< _0x47f2x5[_0x1bfe[117]]|| 0< _0x47f2x5[_0x1bfe[119]])){_0x47f2x9= _0x47f2xa(_0x47f2x5,_0x47f2x2,_0x47f2x3,_0x47f2x4)};null== _0x47f2x9&& (_0x47f2x9= this[_0x1bfe[245]](_0x47f2x2))};return _0x47f2x9};mxGraphView[_0x1bfe[202]][_0x1bfe[2230]]= function(_0x47f2x2){var _0x47f2x3=null!= _0x47f2x2[_0x1bfe[124]]?parseFloat(_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2306]]])|| 0:0;return _0x47f2x2[_0x1bfe[241]]()+ _0x47f2x3* _0x47f2x2[_0x1bfe[117]]};mxGraphView[_0x1bfe[202]][_0x1bfe[2228]]= function(_0x47f2x2){var _0x47f2x3=null!= _0x47f2x2[_0x1bfe[124]]?parseFloat(_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2307]]])|| 0:0;return _0x47f2x2[_0x1bfe[242]]()+ _0x47f2x3* _0x47f2x2[_0x1bfe[119]]};mxGraphView[_0x1bfe[202]][_0x1bfe[2087]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:0;null!= _0x47f2x2&& (_0x47f2x3+= parseFloat(_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2299]]]|| 0));return _0x47f2x2[_0x1bfe[2087]](_0x47f2x3* this[_0x1bfe[255]])};mxGraphView[_0x1bfe[202]][_0x1bfe[2305]]= function(_0x47f2x2){_0x47f2x2= _0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2061]]];if(_0x1bfe[1516]== typeof _0x47f2x2){var _0x47f2x3=mxStyleRegistry[_0x1bfe[433]](_0x47f2x2);null== _0x47f2x3&& this[_0x1bfe[2295]]()&& (_0x47f2x3= mxUtils[_0x1bfe[1545]](_0x47f2x2));_0x47f2x2= _0x47f2x3};return _0x1bfe[279]== typeof _0x47f2x2?_0x47f2x2:null};mxGraphView[_0x1bfe[202]][_0x1bfe[2297]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2= _0x47f2x2[_0x1bfe[439]];var _0x47f2x5=null;if(null!= _0x47f2x2&& (_0x47f2x4|| 2< _0x47f2x2[_0x1bfe[67]]|| null== _0x47f2x3)){_0x47f2x5= _0x47f2x2[_0x1bfe[67]],_0x47f2x5= _0x47f2x2[_0x47f2x4?Math[_0x1bfe[243]](1,_0x47f2x5- 1):Math[_0x1bfe[160]](0,_0x47f2x5- 2)]};null== _0x47f2x5&& null!= _0x47f2x3&& (_0x47f2x5= new mxPoint(_0x47f2x3[_0x1bfe[241]](),_0x47f2x3[_0x1bfe[242]]()));return _0x47f2x5};mxGraphView[_0x1bfe[202]][_0x1bfe[1710]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=_0x47f2x4[_0x1bfe[1709]](_0x47f2x2,_0x47f2x3),_0x47f2x9=_0x47f2x5;null!= _0x47f2x5&& _0x47f2x5!= this[_0x1bfe[1741]];){if(!this[_0x1bfe[1179]][_0x1bfe[1714]](_0x47f2x9)|| this[_0x1bfe[1179]][_0x1bfe[1742]](_0x47f2x5)){_0x47f2x9= _0x47f2x5};_0x47f2x5= _0x47f2x4[_0x1bfe[1197]](_0x47f2x5)};_0x47f2x4[_0x1bfe[1197]](_0x47f2x9)== _0x47f2x4[_0x1bfe[501]]()&& (_0x47f2x9= null);return _0x47f2x9};mxGraphView[_0x1bfe[202]][_0x1bfe[2284]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[439]];_0x47f2x2[_0x1bfe[67]]= 0;if(null!= _0x47f2x3&& 0< _0x47f2x3[_0x1bfe[67]]){var _0x47f2x4=_0x47f2x3[0],_0x47f2x5=_0x47f2x3[_0x47f2x3[_0x1bfe[67]]- 1];if(null== _0x47f2x4|| null== _0x47f2x5){_0x47f2x2[_0x1bfe[246]]!= this[_0x1bfe[1741]]&& this[_0x1bfe[200]](_0x47f2x2[_0x1bfe[246]],!0)}else {if(_0x47f2x4[_0x1bfe[235]]!= _0x47f2x5[_0x1bfe[235]]|| _0x47f2x4[_0x1bfe[236]]!= _0x47f2x5[_0x1bfe[236]]){var _0x47f2x9=_0x47f2x5[_0x1bfe[235]]- _0x47f2x4[_0x1bfe[235]],_0x47f2xa=_0x47f2x5[_0x1bfe[236]]- _0x47f2x4[_0x1bfe[236]];_0x47f2x2[_0x1bfe[2085]]= Math[_0x1bfe[428]](_0x47f2x9* _0x47f2x9+ _0x47f2xa* _0x47f2xa)}else {_0x47f2x2[_0x1bfe[2085]]= 0};var _0x47f2x5=0,_0x47f2x12=[],_0x47f2xa=_0x47f2x4;if(null!= _0x47f2xa){for(var _0x47f2x4=_0x47f2xa[_0x1bfe[235]],_0x47f2x13=_0x47f2xa[_0x1bfe[236]],_0x47f2x14=_0x47f2x4,_0x47f2x15=_0x47f2x13,_0x47f2x16=1;_0x47f2x16< _0x47f2x3[_0x1bfe[67]];_0x47f2x16++){var _0x47f2x17=_0x47f2x3[_0x47f2x16];null!= _0x47f2x17&& (_0x47f2x9= _0x47f2xa[_0x1bfe[235]]- _0x47f2x17[_0x1bfe[235]],_0x47f2xa= _0x47f2xa[_0x1bfe[236]]- _0x47f2x17[_0x1bfe[236]],_0x47f2x9= Math[_0x1bfe[428]](_0x47f2x9* _0x47f2x9+ _0x47f2xa* _0x47f2xa),_0x47f2x12[_0x1bfe[207]](_0x47f2x9),_0x47f2x5+= _0x47f2x9,_0x47f2xa= _0x47f2x17,_0x47f2x4= Math[_0x1bfe[243]](_0x47f2xa[_0x1bfe[235]],_0x47f2x4),_0x47f2x13= Math[_0x1bfe[243]](_0x47f2xa[_0x1bfe[236]],_0x47f2x13),_0x47f2x14= Math[_0x1bfe[160]](_0x47f2xa[_0x1bfe[235]],_0x47f2x14),_0x47f2x15= Math[_0x1bfe[160]](_0x47f2xa[_0x1bfe[236]],_0x47f2x15))};_0x47f2x2[_0x1bfe[67]]= _0x47f2x5;_0x47f2x2[_0x1bfe[2086]]= _0x47f2x12;_0x47f2x2[_0x1bfe[235]]= _0x47f2x4;_0x47f2x2[_0x1bfe[236]]= _0x47f2x13;_0x47f2x2[_0x1bfe[117]]= Math[_0x1bfe[160]](1,_0x47f2x14- _0x47f2x4);_0x47f2x2[_0x1bfe[119]]= Math[_0x1bfe[160]](1,_0x47f2x15- _0x47f2x13)}}}};mxGraphView[_0x1bfe[202]][_0x1bfe[245]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x2[_0x1bfe[241]](),_0x47f2x5=_0x47f2x2[_0x1bfe[242]]();if(null!= _0x47f2x2[_0x1bfe[2086]]&& (null== _0x47f2x3|| _0x47f2x3[_0x1bfe[1500]])){for(var _0x47f2x9=_0x47f2x2[_0x1bfe[439]][_0x1bfe[67]],_0x47f2xa=((null!= _0x47f2x3?_0x47f2x3[_0x1bfe[235]]/ 2:0)+ 0.5)* _0x47f2x2[_0x1bfe[67]],_0x47f2x12=_0x47f2x2[_0x1bfe[2086]][0],_0x47f2x13=0,_0x47f2x14=1;_0x47f2xa> _0x47f2x13+ _0x47f2x12&& _0x47f2x14< _0x47f2x9- 1;){_0x47f2x13+= _0x47f2x12,_0x47f2x12= _0x47f2x2[_0x1bfe[2086]][_0x47f2x14++]};_0x47f2x9= 0== _0x47f2x12?0:(_0x47f2xa- _0x47f2x13)/ _0x47f2x12;_0x47f2xa= _0x47f2x2[_0x1bfe[439]][_0x47f2x14- 1];_0x47f2x14= _0x47f2x2[_0x1bfe[439]][_0x47f2x14];if(null!= _0x47f2xa&& null!= _0x47f2x14){_0x47f2x13= _0x47f2x4= _0x47f2x5= 0;if(null!= _0x47f2x3){var _0x47f2x5=_0x47f2x3[_0x1bfe[236]],_0x47f2x15=_0x47f2x3[_0x1bfe[1368]];null!= _0x47f2x15&& (_0x47f2x4= _0x47f2x15[_0x1bfe[235]],_0x47f2x13= _0x47f2x15[_0x1bfe[236]])};_0x47f2x15= _0x47f2x14[_0x1bfe[235]]- _0x47f2xa[_0x1bfe[235]];_0x47f2x14= _0x47f2x14[_0x1bfe[236]]- _0x47f2xa[_0x1bfe[236]];_0x47f2x4= _0x47f2xa[_0x1bfe[235]]+ _0x47f2x15* _0x47f2x9+ ((0== _0x47f2x12?0:_0x47f2x14/ _0x47f2x12)* _0x47f2x5+ _0x47f2x4)* this[_0x1bfe[255]];_0x47f2x5= _0x47f2xa[_0x1bfe[236]]+ _0x47f2x14* _0x47f2x9- ((0== _0x47f2x12?0:_0x47f2x15/ _0x47f2x12)* _0x47f2x5- _0x47f2x13)* this[_0x1bfe[255]]}}else {null!= _0x47f2x3&& (_0x47f2x15= _0x47f2x3[_0x1bfe[1368]],null!= _0x47f2x15&& (_0x47f2x4+= _0x47f2x15[_0x1bfe[235]],_0x47f2x5+= _0x47f2x15[_0x1bfe[236]]))};return new mxPoint(_0x47f2x4,_0x47f2x5)};mxGraphView[_0x1bfe[202]][_0x1bfe[2308]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1721]](_0x47f2x2[_0x1bfe[246]]);if(null!= _0x47f2x5){var _0x47f2x9=_0x47f2x2[_0x1bfe[439]][_0x1bfe[67]];if(_0x47f2x5[_0x1bfe[1500]]&& 1< _0x47f2x9){for(var _0x47f2x5=_0x47f2x2[_0x1bfe[67]],_0x47f2xa=_0x47f2x2[_0x1bfe[2086]],_0x47f2x12=_0x47f2x2[_0x1bfe[439]][0],_0x47f2x13=_0x47f2x2[_0x1bfe[439]][1],_0x47f2x14=mxUtils[_0x1bfe[440]](_0x47f2x12[_0x1bfe[235]],_0x47f2x12[_0x1bfe[236]],_0x47f2x13[_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]],_0x47f2x3,_0x47f2x4),_0x47f2x15=0,_0x47f2x16=0,_0x47f2x17=0,_0x47f2x18=2;_0x47f2x18< _0x47f2x9;_0x47f2x18++){_0x47f2x16+= _0x47f2xa[_0x47f2x18- 2],_0x47f2x13= _0x47f2x2[_0x1bfe[439]][_0x47f2x18],_0x47f2x12= mxUtils[_0x1bfe[440]](_0x47f2x12[_0x1bfe[235]],_0x47f2x12[_0x1bfe[236]],_0x47f2x13[_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]],_0x47f2x3,_0x47f2x4),_0x47f2x12<= _0x47f2x14&& (_0x47f2x14= _0x47f2x12,_0x47f2x15= _0x47f2x18- 1,_0x47f2x17= _0x47f2x16),_0x47f2x12= _0x47f2x13};_0x47f2x9= _0x47f2xa[_0x47f2x15];_0x47f2x12= _0x47f2x2[_0x1bfe[439]][_0x47f2x15];_0x47f2x13= _0x47f2x2[_0x1bfe[439]][_0x47f2x15+ 1];_0x47f2x14= _0x47f2x13[_0x1bfe[235]];_0x47f2xa= _0x47f2x13[_0x1bfe[236]];_0x47f2x2= _0x47f2x12[_0x1bfe[235]]- _0x47f2x14;_0x47f2x15= _0x47f2x12[_0x1bfe[236]]- _0x47f2xa;_0x47f2x14= _0x47f2x3- _0x47f2x14;_0x47f2xa= _0x47f2x4- _0x47f2xa;_0x47f2x14= _0x47f2x2- _0x47f2x14;_0x47f2xa= _0x47f2x15- _0x47f2xa;_0x47f2xa= _0x47f2x14* _0x47f2x2+ _0x47f2xa* _0x47f2x15;_0x47f2x2= Math[_0x1bfe[428]](0>= _0x47f2xa?0:_0x47f2xa* _0x47f2xa/ (_0x47f2x2* _0x47f2x2+ _0x47f2x15* _0x47f2x15));_0x47f2x2> _0x47f2x9&& (_0x47f2x2= _0x47f2x9);_0x47f2x9= Math[_0x1bfe[428]](mxUtils[_0x1bfe[440]](_0x47f2x12[_0x1bfe[235]],_0x47f2x12[_0x1bfe[236]],_0x47f2x13[_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]],_0x47f2x3,_0x47f2x4));-1== mxUtils[_0x1bfe[2309]](_0x47f2x12[_0x1bfe[235]],_0x47f2x12[_0x1bfe[236]],_0x47f2x13[_0x1bfe[235]],_0x47f2x13[_0x1bfe[236]],_0x47f2x3,_0x47f2x4)&& (_0x47f2x9= -_0x47f2x9);return new mxPoint(-2* ((_0x47f2x5/ 2- _0x47f2x17- _0x47f2x2)/ _0x47f2x5),_0x47f2x9/ this[_0x1bfe[255]])}};return new mxPoint};mxGraphView[_0x1bfe[202]][_0x1bfe[2285]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[439]];_0x47f2x2[_0x1bfe[2079]][_0x1bfe[235]]= _0x47f2x2[_0x1bfe[241]]();_0x47f2x2[_0x1bfe[2079]][_0x1bfe[236]]= _0x47f2x2[_0x1bfe[242]]();if(null!= _0x47f2x3&& 0< _0x47f2x3[_0x1bfe[67]]&& null!= _0x47f2x2[_0x1bfe[2086]]){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x2[_0x1bfe[246]]);if(_0x47f2x4[_0x1bfe[1500]]){var _0x47f2x5=this[_0x1bfe[245]](_0x47f2x2,_0x47f2x4);null!= _0x47f2x5&& (_0x47f2x2[_0x1bfe[2079]]= _0x47f2x5)}else {var _0x47f2x5=_0x47f2x3[0],_0x47f2x9=_0x47f2x3[_0x47f2x3[_0x1bfe[67]]- 1];if(null!= _0x47f2x5&& null!= _0x47f2x9){var _0x47f2x3=_0x47f2x9[_0x1bfe[235]]- _0x47f2x5[_0x1bfe[235]],_0x47f2xa=_0x47f2x9[_0x1bfe[236]]- _0x47f2x5[_0x1bfe[236]],_0x47f2x12=_0x47f2x9= 0,_0x47f2x4=_0x47f2x4[_0x1bfe[1368]];null!= _0x47f2x4&& (_0x47f2x9= _0x47f2x4[_0x1bfe[235]],_0x47f2x12= _0x47f2x4[_0x1bfe[236]]);_0x47f2x4= _0x47f2x5[_0x1bfe[236]]+ _0x47f2xa/ 2+ _0x47f2x12* this[_0x1bfe[255]];_0x47f2x2[_0x1bfe[2079]][_0x1bfe[235]]= _0x47f2x5[_0x1bfe[235]]+ _0x47f2x3/ 2+ _0x47f2x9* this[_0x1bfe[255]];_0x47f2x2[_0x1bfe[2079]][_0x1bfe[236]]= _0x47f2x4}}}};mxGraphView[_0x1bfe[202]][_0x1bfe[248]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= _0x47f2x3|| !1;var _0x47f2x4=null;null!= _0x47f2x2&& (_0x47f2x4= this[_0x1bfe[1214]][_0x1bfe[203]](_0x47f2x2),this[_0x1bfe[1179]][_0x1bfe[1714]](_0x47f2x2)&& (null== _0x47f2x4&& _0x47f2x3&& this[_0x1bfe[1179]][_0x1bfe[1714]](_0x47f2x2)?(_0x47f2x4= this[_0x1bfe[1230]](_0x47f2x2),this[_0x1bfe[1214]][_0x1bfe[204]](_0x47f2x2,_0x47f2x4)):_0x47f2x3&& (null!= _0x47f2x4&& this[_0x1bfe[2255]])&& (_0x47f2x4[_0x1bfe[124]]= this[_0x1bfe[1179]][_0x1bfe[1705]](_0x47f2x2))));return _0x47f2x4};mxGraphView[_0x1bfe[202]][_0x1bfe[2287]]= function(){return this[_0x1bfe[2254]]};mxGraphView[_0x1bfe[202]][_0x1bfe[2310]]= function(_0x47f2x2){this[_0x1bfe[2254]]= _0x47f2x2};mxGraphView[_0x1bfe[202]][_0x1bfe[2295]]= function(){return this[_0x1bfe[2251]]};mxGraphView[_0x1bfe[202]][_0x1bfe[2311]]= function(_0x47f2x2){this[_0x1bfe[2251]]= _0x47f2x2};mxGraphView[_0x1bfe[202]][_0x1bfe[2312]]= function(){return this[_0x1bfe[1214]]};mxGraphView[_0x1bfe[202]][_0x1bfe[1517]]= function(_0x47f2x2){this[_0x1bfe[1214]]= _0x47f2x2};mxGraphView[_0x1bfe[202]][_0x1bfe[2313]]= function(_0x47f2x2){if(null== _0x47f2x2){return this[_0x1bfe[1214]]};for(var _0x47f2x3=[],_0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){var _0x47f2x5=this[_0x1bfe[248]](_0x47f2x2[_0x47f2x4]);null!= _0x47f2x5&& _0x47f2x3[_0x1bfe[207]](_0x47f2x5)};return _0x47f2x3};mxGraphView[_0x1bfe[202]][_0x1bfe[2265]]= function(_0x47f2x2){var _0x47f2x3=null;null!= _0x47f2x2&& (_0x47f2x3= this[_0x1bfe[1214]][_0x1bfe[205]](_0x47f2x2),null!= _0x47f2x3&& (this[_0x1bfe[1179]][_0x1bfe[259]][_0x1bfe[515]](_0x47f2x3),_0x47f2x3[_0x1bfe[515]]()));return _0x47f2x3};mxGraphView[_0x1bfe[202]][_0x1bfe[1230]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[1705]](_0x47f2x2);_0x47f2x2= new mxCellState(this,_0x47f2x2,_0x47f2x3);this[_0x1bfe[1179]][_0x1bfe[259]][_0x1bfe[2155]](_0x47f2x2,this[_0x1bfe[2287]]());return _0x47f2x2};mxGraphView[_0x1bfe[202]][_0x1bfe[2051]]= function(){return this[_0x1bfe[510]]};mxGraphView[_0x1bfe[202]][_0x1bfe[2052]]= function(){return this[_0x1bfe[2053]]};mxGraphView[_0x1bfe[202]][_0x1bfe[2024]]= function(){return this[_0x1bfe[505]]};mxGraphView[_0x1bfe[202]][_0x1bfe[1524]]= function(){return this[_0x1bfe[506]]};mxGraphView[_0x1bfe[202]][_0x1bfe[2314]]= function(_0x47f2x2){_0x47f2x2= mxEvent[_0x1bfe[728]](_0x47f2x2);return _0x47f2x2== this[_0x1bfe[1179]][_0x1bfe[526]]|| _0x47f2x2[_0x1bfe[265]]== this[_0x1bfe[2053]]|| null!= _0x47f2x2[_0x1bfe[265]]&& _0x47f2x2[_0x1bfe[265]][_0x1bfe[265]]== this[_0x1bfe[2053]]|| _0x47f2x2== this[_0x1bfe[510]][_0x1bfe[265]]|| _0x47f2x2== this[_0x1bfe[510]]|| _0x47f2x2== this[_0x1bfe[2053]]|| _0x47f2x2== this[_0x1bfe[505]]|| _0x47f2x2== this[_0x1bfe[506]]};mxGraphView[_0x1bfe[202]][_0x1bfe[2315]]= function(_0x47f2x2){var _0x47f2x3=mxUtils[_0x1bfe[445]](this[_0x1bfe[1179]][_0x1bfe[526]]);_0x47f2x2= new mxPoint(_0x47f2x2[_0x1bfe[782]]- _0x47f2x3[_0x1bfe[235]],_0x47f2x2[_0x1bfe[784]]- _0x47f2x3[_0x1bfe[236]]);var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[359]],_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[159]];if(_0x47f2x3> _0x47f2x4&& _0x47f2x2[_0x1bfe[235]]> _0x47f2x4+ 2&& _0x47f2x2[_0x1bfe[235]]<= _0x47f2x3){return !0};_0x47f2x3= this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[167]];_0x47f2x4= this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[157]];return _0x47f2x3> _0x47f2x4&& _0x47f2x2[_0x1bfe[236]]> _0x47f2x4+ 2&& _0x47f2x2[_0x1bfe[236]]<= _0x47f2x3?!0:!1};mxGraphView[_0x1bfe[202]][_0x1bfe[176]]= function(){this[_0x1bfe[2163]]();var _0x47f2x2=this[_0x1bfe[1179]];_0x47f2x2[_0x1bfe[507]]== mxConstants[_0x1bfe[508]]?this[_0x1bfe[1569]]():_0x47f2x2[_0x1bfe[507]]== mxConstants[_0x1bfe[1523]]?this[_0x1bfe[1571]]():this[_0x1bfe[1570]]()};mxGraphView[_0x1bfe[202]][_0x1bfe[2163]]= function(){var _0x47f2x2=this[_0x1bfe[1179]],_0x47f2x3=_0x47f2x2[_0x1bfe[526]];if(null!= _0x47f2x3){mxEvent[_0x1bfe[759]](_0x47f2x3,mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){mxClient[_0x1bfe[754]]&& _0x47f2x2[_0x1bfe[2203]]()&& _0x47f2x2[_0x1bfe[2126]](!_0x47f2x2[_0x1bfe[2134]]());this[_0x1bfe[2314]](_0x47f2x3)&& (!mxClient[_0x1bfe[80]]&& !mxClient[_0x1bfe[76]]&& !mxClient[_0x1bfe[71]]&& !mxClient[_0x1bfe[75]]|| !this[_0x1bfe[2315]](_0x47f2x3))&& _0x47f2x2[_0x1bfe[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x47f2x3))}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){this[_0x1bfe[2314]](_0x47f2x3)&& _0x47f2x2[_0x1bfe[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x47f2x3))}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){this[_0x1bfe[2314]](_0x47f2x3)&& _0x47f2x2[_0x1bfe[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x47f2x3))}));mxEvent[_0x1bfe[169]](_0x47f2x3,_0x1bfe[760],mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){_0x47f2x2[_0x1bfe[761]](_0x47f2x3)}));var _0x47f2x4=function(_0x47f2x4){var _0x47f2x9=null;mxClient[_0x1bfe[754]]&& (_0x47f2x9= mxEvent[_0x1bfe[731]](_0x47f2x4),_0x47f2x4= mxEvent[_0x1bfe[733]](_0x47f2x4),_0x47f2x4= mxUtils[_0x1bfe[2196]](_0x47f2x3,_0x47f2x9,_0x47f2x4),_0x47f2x9= _0x47f2x2[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2[_0x1bfe[999]](_0x47f2x4[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]])));return _0x47f2x9};_0x47f2x2[_0x1bfe[1133]]({mouseDown:function(_0x47f2x3,_0x47f2x4){_0x47f2x2[_0x1bfe[2316]][_0x1bfe[1032]]()},mouseMove:function(){},mouseUp:function(){}});this[_0x1bfe[2317]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){null!= _0x47f2x2[_0x1bfe[2276]]&& _0x47f2x2[_0x1bfe[2276]][_0x1bfe[2277]]()&& _0x47f2x2[_0x1bfe[2276]][_0x1bfe[801]]();this[_0x1bfe[2252]]&& (_0x47f2x2[_0x1bfe[1009]]&& !mxEvent[_0x1bfe[721]](_0x47f2x3))&& _0x47f2x2[_0x1bfe[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x47f2x3,_0x47f2x4(_0x47f2x3)))});this[_0x1bfe[2318]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){this[_0x1bfe[2252]]&& _0x47f2x2[_0x1bfe[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x47f2x3))});mxEvent[_0x1bfe[759]](document,null,this[_0x1bfe[2317]],this[_0x1bfe[2318]])}};mxGraphView[_0x1bfe[202]][_0x1bfe[1570]]= function(){var _0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[526]];null!= _0x47f2x2&& (this[_0x1bfe[510]]= this[_0x1bfe[2319]](_0x1bfe[118],_0x1bfe[118]),this[_0x1bfe[2053]]= this[_0x1bfe[2319]](_0x1bfe[942],_0x1bfe[942]),this[_0x1bfe[505]]= this[_0x1bfe[2319]](_0x1bfe[942],_0x1bfe[942]),this[_0x1bfe[506]]= this[_0x1bfe[2319]](_0x1bfe[942],_0x1bfe[942]),this[_0x1bfe[510]][_0x1bfe[62]](this[_0x1bfe[2053]]),this[_0x1bfe[510]][_0x1bfe[62]](this[_0x1bfe[505]]),this[_0x1bfe[510]][_0x1bfe[62]](this[_0x1bfe[506]]),_0x47f2x2[_0x1bfe[62]](this[_0x1bfe[510]]),mxClient[_0x1bfe[496]]&& (_0x47f2x2= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[517]]();this[_0x1bfe[2320]](_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]+ this[_0x1bfe[1179]][_0x1bfe[467]],_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]+ this[_0x1bfe[1179]][_0x1bfe[467]])}),mxEvent[_0x1bfe[169]](window,_0x1bfe[129],_0x47f2x2)))};mxGraphView[_0x1bfe[202]][_0x1bfe[2320]]= function(_0x47f2x2,_0x47f2x3){if(null!= this[_0x1bfe[1179]][_0x1bfe[526]]){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[167]];this[_0x1bfe[510]][_0x1bfe[124]][_0x1bfe[117]]= this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[359]]< _0x47f2x2?_0x47f2x2+ _0x1bfe[168]:_0x1bfe[118];this[_0x1bfe[510]][_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x4< _0x47f2x3?_0x47f2x3+ _0x1bfe[168]:_0x1bfe[118]}};mxGraphView[_0x1bfe[202]][_0x1bfe[2319]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[529]);null!= _0x47f2x2&& null!= _0x47f2x3?(_0x47f2x4[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492],_0x47f2x4[_0x1bfe[124]][_0x1bfe[361]]= _0x1bfe[946],_0x47f2x4[_0x1bfe[124]][_0x1bfe[125]]= _0x1bfe[946],_0x47f2x4[_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x2,_0x47f2x4[_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x3):_0x47f2x4[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[1500];return _0x47f2x4};mxGraphView[_0x1bfe[202]][_0x1bfe[1571]]= function(){var _0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[526]];if(null!= _0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[359]],_0x47f2x4=_0x47f2x2[_0x1bfe[167]];this[_0x1bfe[510]]= this[_0x1bfe[2321]](_0x47f2x3,_0x47f2x4);this[_0x1bfe[2053]]= this[_0x1bfe[2321]](_0x47f2x3,_0x47f2x4);this[_0x1bfe[505]]= this[_0x1bfe[2321]](_0x47f2x3,_0x47f2x4);this[_0x1bfe[506]]= this[_0x1bfe[2321]](_0x47f2x3,_0x47f2x4);this[_0x1bfe[510]][_0x1bfe[62]](this[_0x1bfe[2053]]);this[_0x1bfe[510]][_0x1bfe[62]](this[_0x1bfe[505]]);this[_0x1bfe[510]][_0x1bfe[62]](this[_0x1bfe[506]]);_0x47f2x2[_0x1bfe[62]](this[_0x1bfe[510]])}};mxGraphView[_0x1bfe[202]][_0x1bfe[2321]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=document[_0x1bfe[55]](mxClient[_0x1bfe[463]]+ _0x1bfe[1499]);_0x47f2x4[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];_0x47f2x4[_0x1bfe[124]][_0x1bfe[361]]= _0x1bfe[946];_0x47f2x4[_0x1bfe[124]][_0x1bfe[125]]= _0x1bfe[946];_0x47f2x4[_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x2+ _0x1bfe[168];_0x47f2x4[_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x3+ _0x1bfe[168];_0x47f2x4[_0x1bfe[57]](_0x1bfe[1462],_0x47f2x2+ _0x1bfe[537]+ _0x47f2x3);_0x47f2x4[_0x1bfe[57]](_0x1bfe[2322],_0x1bfe[2323]);return _0x47f2x4};mxGraphView[_0x1bfe[202]][_0x1bfe[1569]]= function(){var _0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[526]];this[_0x1bfe[510]]= document[_0x1bfe[509]](mxConstants.NS_SVG,_0x1bfe[449]);this[_0x1bfe[2053]]= document[_0x1bfe[509]](mxConstants.NS_SVG,_0x1bfe[449]);this[_0x1bfe[510]][_0x1bfe[62]](this[_0x1bfe[2053]]);this[_0x1bfe[505]]= document[_0x1bfe[509]](mxConstants.NS_SVG,_0x1bfe[449]);this[_0x1bfe[510]][_0x1bfe[62]](this[_0x1bfe[505]]);this[_0x1bfe[506]]= document[_0x1bfe[509]](mxConstants.NS_SVG,_0x1bfe[449]);this[_0x1bfe[510]][_0x1bfe[62]](this[_0x1bfe[506]]);var _0x47f2x3=document[_0x1bfe[509]](mxConstants.NS_SVG,_0x1bfe[571]);_0x47f2x3[_0x1bfe[124]][_0x1bfe[117]]= _0x1bfe[118];_0x47f2x3[_0x1bfe[124]][_0x1bfe[119]]= _0x1bfe[118];_0x47f2x3[_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[694];_0x47f2x3[_0x1bfe[62]](this[_0x1bfe[510]]);null!= _0x47f2x2&& (_0x47f2x2[_0x1bfe[62]](_0x47f2x3),_0x1bfe[2324]== mxUtils[_0x1bfe[275]](_0x47f2x2)[_0x1bfe[491]]&& (_0x47f2x2[_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[1500]))};mxGraphView[_0x1bfe[202]][_0x1bfe[515]]= function(){var _0x47f2x2=null!= this[_0x1bfe[510]]?this[_0x1bfe[510]][_0x1bfe[538]]:null;null== _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[510]]);null!= _0x47f2x2&& null!= _0x47f2x2[_0x1bfe[265]]&& (this[_0x1bfe[200]](this[_0x1bfe[1741]],!0),mxEvent[_0x1bfe[938]](document,null,this[_0x1bfe[2317]],this[_0x1bfe[2318]]),mxEvent[_0x1bfe[762]](this[_0x1bfe[1179]][_0x1bfe[526]]),_0x47f2x2[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x2),this[_0x1bfe[506]]= this[_0x1bfe[505]]= this[_0x1bfe[2053]]= this[_0x1bfe[510]]= this[_0x1bfe[2318]]= this[_0x1bfe[2317]]= null)};function mxCurrentRootChange(_0x47f2x2,_0x47f2x3){this[_0x1bfe[441]]= _0x47f2x2;this[_0x1bfe[257]]= this[_0x1bfe[813]]= _0x47f2x3;this[_0x1bfe[2325]]= null== _0x47f2x3;if(!this[_0x1bfe[2325]]){for(var _0x47f2x4=this[_0x1bfe[441]][_0x1bfe[1741]],_0x47f2x5=this[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[502]]();null!= _0x47f2x4;){if(_0x47f2x4== _0x47f2x3){this[_0x1bfe[2325]]= !0;break};_0x47f2x4= _0x47f2x5[_0x1bfe[1197]](_0x47f2x4)}}}mxCurrentRootChange[_0x1bfe[202]][_0x1bfe[350]]= function(){var _0x47f2x2=this[_0x1bfe[441]][_0x1bfe[1741]];this[_0x1bfe[441]][_0x1bfe[1741]]= this[_0x1bfe[257]];this[_0x1bfe[257]]= _0x47f2x2;_0x47f2x2= this[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[2326]](this[_0x1bfe[441]][_0x1bfe[1741]]);null!= _0x47f2x2&& (this[_0x1bfe[441]][_0x1bfe[513]]= new mxPoint(-_0x47f2x2[_0x1bfe[235]],-_0x47f2x2[_0x1bfe[236]]));this[_0x1bfe[441]][_0x1bfe[746]]( new mxEventObject(this[_0x1bfe[2325]]?mxEvent[_0x1bfe[2327]]:mxEvent[_0x1bfe[2328]],_0x1bfe[813],this[_0x1bfe[441]][_0x1bfe[1741]],_0x1bfe[257],this[_0x1bfe[257]]));this[_0x1bfe[2325]]?(this[_0x1bfe[441]][_0x1bfe[200]](this[_0x1bfe[441]][_0x1bfe[1741]],!0),this[_0x1bfe[441]][_0x1bfe[2264]]()):this[_0x1bfe[441]][_0x1bfe[802]]();this[_0x1bfe[2325]]= !this[_0x1bfe[2325]]};function mxGraph(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[2329]]= null;this[_0x1bfe[2330]]= _0x47f2x4;this[_0x1bfe[507]]= mxClient[_0x1bfe[48]]?mxConstants[_0x1bfe[508]]:_0x47f2x4== mxConstants[_0x1bfe[2331]]&& mxClient[_0x1bfe[47]]?mxConstants[_0x1bfe[1523]]:_0x47f2x4== mxConstants[_0x1bfe[2332]]?mxConstants[_0x1bfe[1656]]:_0x47f2x4== mxConstants[_0x1bfe[2333]]?mxConstants[_0x1bfe[2209]]:mxConstants[_0x1bfe[2334]];this[_0x1bfe[251]]= null!= _0x47f2x3?_0x47f2x3: new mxGraphModel;this[_0x1bfe[2335]]= [];this[_0x1bfe[2336]]= [];this[_0x1bfe[259]]= this[_0x1bfe[2337]]();this[_0x1bfe[2339]](this[_0x1bfe[2338]]());this[_0x1bfe[2341]](null!= _0x47f2x5?_0x47f2x5:this[_0x1bfe[2340]]());this[_0x1bfe[441]]= this[_0x1bfe[2342]]();this[_0x1bfe[2343]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1177]](_0x47f2x3[_0x1bfe[720]](_0x1bfe[1061])[_0x1bfe[1065]])});this[_0x1bfe[251]][_0x1bfe[169]](mxEvent.CHANGE,this[_0x1bfe[2343]]);this[_0x1bfe[2344]]();null!= _0x47f2x2&& this[_0x1bfe[176]](_0x47f2x2);this[_0x1bfe[441]][_0x1bfe[2259]]()}mxLoadResources&& mxResources[_0x1bfe[99]](mxClient[_0x1bfe[86]]+ _0x1bfe[2345]);mxGraph[_0x1bfe[202]]= new mxEventSource;mxGraph[_0x1bfe[202]][_0x1bfe[196]]= mxGraph;mxGraph[_0x1bfe[202]][_0x1bfe[2346]]= [];mxGraph[_0x1bfe[202]][_0x1bfe[2329]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[1009]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[251]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[441]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[94]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[2105]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[2347]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[259]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[2335]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[2330]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[507]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[1020]]= 10;mxGraph[_0x1bfe[202]][_0x1bfe[991]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2348]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2349]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2350]]= 700;mxGraph[_0x1bfe[202]][_0x1bfe[2351]]= 25;mxGraph[_0x1bfe[202]][_0x1bfe[2352]]= 0;mxGraph[_0x1bfe[202]][_0x1bfe[2352]]= 0;mxGraph[_0x1bfe[202]][_0x1bfe[2213]]= 0;mxGraph[_0x1bfe[202]][_0x1bfe[2215]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2353]]= 4;mxGraph[_0x1bfe[202]][_0x1bfe[2354]]= 0.5;mxGraph[_0x1bfe[202]][_0x1bfe[2355]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[2356]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[1617]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[2273]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2357]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2358]]= _0x1bfe[579];mxGraph[_0x1bfe[202]][_0x1bfe[2359]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2360]]= 20;mxGraph[_0x1bfe[202]][_0x1bfe[2361]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2013]]= mxConstants[_0x1bfe[516]];mxGraph[_0x1bfe[202]][_0x1bfe[2012]]= 1.5;mxGraph[_0x1bfe[202]][_0x1bfe[984]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2362]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2363]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2364]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2365]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2366]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2367]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2368]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2369]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2206]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2370]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2371]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2372]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2373]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2374]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2375]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2376]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2377]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2378]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2379]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2380]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2381]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[1012]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2382]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2383]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2384]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[1013]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2385]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[2386]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[2387]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[2388]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[2389]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[467]]= 0;mxGraph[_0x1bfe[202]][_0x1bfe[2158]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2159]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2168]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2390]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2391]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2392]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2393]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2394]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2395]]= 1.2;mxGraph[_0x1bfe[202]][_0x1bfe[2396]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2397]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2398]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2399]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2400]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2401]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2402]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2293]]= mxEdgeStyle[_0x1bfe[2403]];mxGraph[_0x1bfe[202]][_0x1bfe[2404]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2405]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2406]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2407]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2408]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2409]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2410]]= !1;mxGraph[_0x1bfe[202]][_0x1bfe[2411]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2412]]= !0;mxGraph[_0x1bfe[202]][_0x1bfe[2180]]= mxConstants[_0x1bfe[2065]];mxGraph[_0x1bfe[202]][_0x1bfe[2336]]= null;mxGraph[_0x1bfe[202]][_0x1bfe[2413]]= 0.1;mxGraph[_0x1bfe[202]][_0x1bfe[2414]]= 8;mxGraph[_0x1bfe[202]][_0x1bfe[1136]]= 0;mxGraph[_0x1bfe[202]][_0x1bfe[1137]]= 0;mxGraph[_0x1bfe[202]][_0x1bfe[2415]]= new mxImage(mxClient[_0x1bfe[88]]+ _0x1bfe[2416],9,9);mxGraph[_0x1bfe[202]][_0x1bfe[2417]]= new mxImage(mxClient[_0x1bfe[88]]+ _0x1bfe[2418],9,9);mxGraph[_0x1bfe[202]][_0x1bfe[2419]]= new mxImage(_0x1bfe[2420],16,16);mxGraph[_0x1bfe[202]][_0x1bfe[2421]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[2422]:_0x1bfe[110];mxGraph[_0x1bfe[202]][_0x1bfe[2423]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[2424]:_0x1bfe[110];mxGraph[_0x1bfe[202]][_0x1bfe[2425]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[2426]:_0x1bfe[110];mxGraph[_0x1bfe[202]][_0x1bfe[176]]= function(_0x47f2x2){this[_0x1bfe[526]]= _0x47f2x2;this[_0x1bfe[2347]]= this[_0x1bfe[2427]]();this[_0x1bfe[441]][_0x1bfe[176]]();this[_0x1bfe[2258]]();mxClient[_0x1bfe[80]]&& (mxEvent[_0x1bfe[169]](window,_0x1bfe[2428],mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[515]]()})),mxEvent[_0x1bfe[169]](_0x47f2x2,_0x1bfe[2429],mxUtils[_0x1bfe[885]](this,function(){return this[_0x1bfe[2203]]()})));8== document[_0x1bfe[5]]&& _0x47f2x2[_0x1bfe[1583]](_0x1bfe[1582],_0x1bfe[2430])};mxGraph[_0x1bfe[202]][_0x1bfe[2344]]= function(_0x47f2x2){this[_0x1bfe[2276]]= new mxTooltipHandler(this);this[_0x1bfe[2276]][_0x1bfe[995]](!1);this[_0x1bfe[2316]]= new mxPanningHandler(this);this[_0x1bfe[2316]][_0x1bfe[2431]]= !1;this[_0x1bfe[2432]]= new mxSelectionCellsHandler(this);this[_0x1bfe[2433]]= new mxConnectionHandler(this);this[_0x1bfe[2433]][_0x1bfe[995]](!1);this[_0x1bfe[1011]]= new mxGraphHandler(this)};mxGraph[_0x1bfe[202]][_0x1bfe[2338]]= function(){return new mxGraphSelectionModel(this)};mxGraph[_0x1bfe[202]][_0x1bfe[2340]]= function(){return new mxStylesheet};mxGraph[_0x1bfe[202]][_0x1bfe[2342]]= function(){return new mxGraphView(this)};mxGraph[_0x1bfe[202]][_0x1bfe[2337]]= function(){return new mxCellRenderer};mxGraph[_0x1bfe[202]][_0x1bfe[2427]]= function(){return new mxCellEditor(this)};mxGraph[_0x1bfe[202]][_0x1bfe[502]]= function(){return this[_0x1bfe[251]]};mxGraph[_0x1bfe[202]][_0x1bfe[249]]= function(){return this[_0x1bfe[441]]};mxGraph[_0x1bfe[202]][_0x1bfe[2434]]= function(){return this[_0x1bfe[94]]};mxGraph[_0x1bfe[202]][_0x1bfe[2341]]= function(_0x47f2x2){this[_0x1bfe[94]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2435]]= function(){return this[_0x1bfe[2105]]};mxGraph[_0x1bfe[202]][_0x1bfe[2339]]= function(_0x47f2x2){this[_0x1bfe[2105]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2436]]= function(_0x47f2x2){for(var _0x47f2x3=[],_0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){var _0x47f2x5=_0x47f2x2[_0x47f2x4];if(_0x47f2x5[_0x1bfe[196]]!= mxRootChange){var _0x47f2x9=null;_0x47f2x5 instanceof mxChildChange&& null== _0x47f2x5[_0x1bfe[257]]?_0x47f2x9= _0x47f2x5[_0x1bfe[247]]:null!= _0x47f2x5[_0x1bfe[246]]&& _0x47f2x5[_0x1bfe[246]] instanceof mxCell&& (_0x47f2x9= _0x47f2x5[_0x1bfe[246]]);null!= _0x47f2x9&& 0> mxUtils[_0x1bfe[2]](_0x47f2x3,_0x47f2x9)&& _0x47f2x3[_0x1bfe[207]](_0x47f2x9)}};return this[_0x1bfe[502]]()[_0x1bfe[1964]](_0x47f2x3)};mxGraph[_0x1bfe[202]][_0x1bfe[1177]]= function(_0x47f2x2){for(var _0x47f2x3=0;_0x47f2x3< _0x47f2x2[_0x1bfe[67]];_0x47f2x3++){this[_0x1bfe[2437]](_0x47f2x2[_0x47f2x3])};this[_0x1bfe[2439]](this[_0x1bfe[2438]](_0x47f2x2));this[_0x1bfe[441]][_0x1bfe[2264]]();this[_0x1bfe[2258]]()};mxGraph[_0x1bfe[202]][_0x1bfe[2438]]= function(_0x47f2x2){for(var _0x47f2x3=[],_0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){var _0x47f2x5=_0x47f2x2[_0x47f2x4];if(_0x47f2x5 instanceof mxRootChange){break}else {_0x47f2x5 instanceof mxChildChange?null!= _0x47f2x5[_0x1bfe[257]]&& null== _0x47f2x5[_0x1bfe[1101]]&& (_0x47f2x3= _0x47f2x3[_0x1bfe[1919]](this[_0x1bfe[251]][_0x1bfe[1939]](_0x47f2x5[_0x1bfe[247]]))):_0x47f2x5 instanceof mxVisibleChange&& (_0x47f2x3= _0x47f2x3[_0x1bfe[1919]](this[_0x1bfe[251]][_0x1bfe[1939]](_0x47f2x5[_0x1bfe[246]])))}};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[2437]]= function(_0x47f2x2){if(_0x47f2x2 instanceof mxRootChange){this[_0x1bfe[2440]](),this[_0x1bfe[2441]](_0x47f2x2[_0x1bfe[257]]),this[_0x1bfe[2398]]&& (this[_0x1bfe[441]][_0x1bfe[255]]= 1,this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]]= 0,this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]]= 0),this[_0x1bfe[746]]( new mxEventObject(mxEvent.ROOT))}else {if(_0x47f2x2 instanceof mxChildChange){var _0x47f2x3=this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2[_0x1bfe[247]]);null!= _0x47f2x3?this[_0x1bfe[441]][_0x1bfe[2263]](_0x47f2x2[_0x1bfe[247]],!0,!1,null!= _0x47f2x2[_0x1bfe[257]]):(this[_0x1bfe[2441]](_0x47f2x2[_0x1bfe[247]]),this[_0x1bfe[441]][_0x1bfe[1741]]== _0x47f2x2[_0x1bfe[247]]&& this[_0x1bfe[2442]]());_0x47f2x3!= _0x47f2x2[_0x1bfe[257]]&& (null!= _0x47f2x3&& this[_0x1bfe[441]][_0x1bfe[2263]](_0x47f2x3,!1,!1),null!= _0x47f2x2[_0x1bfe[257]]&& this[_0x1bfe[441]][_0x1bfe[2263]](_0x47f2x2[_0x1bfe[257]],!1,!1))}else {_0x47f2x2 instanceof mxTerminalChange|| _0x47f2x2 instanceof mxGeometryChange?this[_0x1bfe[441]][_0x1bfe[2263]](_0x47f2x2[_0x1bfe[246]]):_0x47f2x2 instanceof mxValueChange?this[_0x1bfe[441]][_0x1bfe[2263]](_0x47f2x2[_0x1bfe[246]],!1,!1):_0x47f2x2 instanceof mxStyleChange?(this[_0x1bfe[441]][_0x1bfe[2263]](_0x47f2x2[_0x1bfe[246]],!0,!0,!1),this[_0x1bfe[441]][_0x1bfe[2265]](_0x47f2x2[_0x1bfe[246]])):null!= _0x47f2x2[_0x1bfe[246]]&& _0x47f2x2[_0x1bfe[246]] instanceof mxCell&& this[_0x1bfe[2441]](_0x47f2x2[_0x1bfe[246]])}}};mxGraph[_0x1bfe[202]][_0x1bfe[2441]]= function(_0x47f2x2){for(var _0x47f2x3=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2),_0x47f2x4=0;_0x47f2x4< _0x47f2x3;_0x47f2x4++){this[_0x1bfe[2441]](this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x2,_0x47f2x4))};this[_0x1bfe[441]][_0x1bfe[2265]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2443]]= function(_0x47f2x2,_0x47f2x3){null== _0x47f2x2[_0x1bfe[1211]]&& (_0x47f2x2[_0x1bfe[1211]]= []);_0x47f2x2[_0x1bfe[1211]][_0x1bfe[207]](_0x47f2x3);var _0x47f2x4=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);null!= _0x47f2x4&& this[_0x1bfe[259]][_0x1bfe[258]](_0x47f2x4);this[_0x1bfe[746]]( new mxEventObject(mxEvent.ADD_OVERLAY,_0x1bfe[246],_0x47f2x2,_0x1bfe[2201],_0x47f2x3));return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[2200]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[1211]]};mxGraph[_0x1bfe[202]][_0x1bfe[2444]]= function(_0x47f2x2,_0x47f2x3){if(null== _0x47f2x3){this[_0x1bfe[2445]](_0x47f2x2)}else {var _0x47f2x4=mxUtils[_0x1bfe[2]](_0x47f2x2[_0x1bfe[1211]],_0x47f2x3);0<= _0x47f2x4?(_0x47f2x2[_0x1bfe[1211]][_0x1bfe[300]](_0x47f2x4,1),0== _0x47f2x2[_0x1bfe[1211]][_0x1bfe[67]]&& (_0x47f2x2[_0x1bfe[1211]]= null),_0x47f2x4= this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2),null!= _0x47f2x4&& this[_0x1bfe[259]][_0x1bfe[258]](_0x47f2x4),this[_0x1bfe[746]]( new mxEventObject(mxEvent.REMOVE_OVERLAY,_0x1bfe[246],_0x47f2x2,_0x1bfe[2201],_0x47f2x3))):_0x47f2x3= null};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[2445]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[1211]];if(null!= _0x47f2x3){_0x47f2x2[_0x1bfe[1211]]= null;var _0x47f2x4=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);null!= _0x47f2x4&& this[_0x1bfe[259]][_0x1bfe[258]](_0x47f2x4);for(_0x47f2x4= 0;_0x47f2x4< _0x47f2x3[_0x1bfe[67]];_0x47f2x4++){this[_0x1bfe[746]]( new mxEventObject(mxEvent.REMOVE_OVERLAY,_0x1bfe[246],_0x47f2x2,_0x1bfe[2201],_0x47f2x3[_0x47f2x4]))}};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[2446]]= function(_0x47f2x2){_0x47f2x2= null!= _0x47f2x2?_0x47f2x2:this[_0x1bfe[251]][_0x1bfe[501]]();this[_0x1bfe[2445]](_0x47f2x2);for(var _0x47f2x3=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2),_0x47f2x4=0;_0x47f2x4< _0x47f2x3;_0x47f2x4++){var _0x47f2x5=this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x2,_0x47f2x4);this[_0x1bfe[2446]](_0x47f2x5)}};mxGraph[_0x1bfe[202]][_0x1bfe[2447]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x3&& 0< _0x47f2x3[_0x1bfe[67]]){return _0x47f2x4= null!= _0x47f2x4?_0x47f2x4:this[_0x1bfe[2419]],_0x47f2x3= new mxCellOverlay(_0x47f2x4,_0x1bfe[2448]+ _0x47f2x3+ _0x1bfe[2449]),_0x47f2x5&& _0x47f2x3[_0x1bfe[169]](mxEvent.CLICK,mxUtils[_0x1bfe[885]](this,function(_0x47f2x3,_0x47f2x4){this[_0x1bfe[994]]()&& this[_0x1bfe[2450]](_0x47f2x2)})),this[_0x1bfe[2443]](_0x47f2x2,_0x47f2x3)};this[_0x1bfe[2445]](_0x47f2x2);return null};mxGraph[_0x1bfe[202]][_0x1bfe[855]]= function(_0x47f2x2){this[_0x1bfe[2451]](null,_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2451]]= function(_0x47f2x2,_0x47f2x3){null== _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[2452]](),null!= _0x47f2x2&& !this[_0x1bfe[2453]](_0x47f2x2)&& (_0x47f2x2= null));null!= _0x47f2x2&& (this[_0x1bfe[746]]( new mxEventObject(mxEvent.START_EDITING,_0x1bfe[246],_0x47f2x2,_0x1bfe[763],_0x47f2x3)),this[_0x1bfe[2347]][_0x1bfe[855]](_0x47f2x2,_0x47f2x3))};mxGraph[_0x1bfe[202]][_0x1bfe[2142]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[2454]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2126]]= function(_0x47f2x2){this[_0x1bfe[2347]][_0x1bfe[2126]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[850]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[251]][_0x1bfe[473]]();try{this[_0x1bfe[2456]](_0x47f2x2,_0x47f2x3,this[_0x1bfe[2455]](_0x47f2x2)),this[_0x1bfe[746]]( new mxEventObject(mxEvent.LABEL_CHANGED,_0x1bfe[246],_0x47f2x2,_0x1bfe[131],_0x47f2x3,_0x1bfe[763],_0x47f2x4))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2456]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[251]][_0x1bfe[473]]();try{this[_0x1bfe[251]][_0x1bfe[1966]](_0x47f2x2,_0x47f2x3),_0x47f2x4&& this[_0x1bfe[2457]](_0x47f2x2,!1)}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}};mxGraph[_0x1bfe[202]][_0x1bfe[859]]= function(_0x47f2x2){this[_0x1bfe[2126]](!0);this[_0x1bfe[2433]][_0x1bfe[862]]();this[_0x1bfe[1011]][_0x1bfe[862]]();_0x47f2x2= this[_0x1bfe[897]]();for(var _0x47f2x3=0;_0x47f2x3< _0x47f2x2[_0x1bfe[67]];_0x47f2x3++){var _0x47f2x4=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2[_0x47f2x3]);null!= _0x47f2x4&& null!= _0x47f2x4[_0x1bfe[2458]]&& _0x47f2x4[_0x1bfe[2458]][_0x1bfe[862]]()}};mxGraph[_0x1bfe[202]][_0x1bfe[173]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[727]](),_0x47f2x4=_0x47f2x2[_0x1bfe[736]](),_0x47f2x5= new mxEventObject(mxEvent.CLICK,_0x1bfe[763],_0x47f2x3,_0x1bfe[246],_0x47f2x4);_0x47f2x2[_0x1bfe[721]]()&& _0x47f2x5[_0x1bfe[722]]();this[_0x1bfe[746]](_0x47f2x5);this[_0x1bfe[994]]()&& (!mxEvent[_0x1bfe[721]](_0x47f2x3)&& !_0x47f2x5[_0x1bfe[721]]())&& (null!= _0x47f2x4?this[_0x1bfe[2459]](_0x47f2x4,_0x47f2x3):(_0x47f2x4= null,this[_0x1bfe[2460]]()&& (_0x47f2x4= this[_0x1bfe[2461]](_0x47f2x2[_0x1bfe[734]](),_0x47f2x2[_0x1bfe[735]]())),null!= _0x47f2x4?this[_0x1bfe[2459]](_0x47f2x4,_0x47f2x3):this[_0x1bfe[2462]](_0x47f2x3)|| this[_0x1bfe[2440]]()))};mxGraph[_0x1bfe[202]][_0x1bfe[761]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4= new mxEventObject(mxEvent.DOUBLE_CLICK,_0x1bfe[763],_0x47f2x2,_0x1bfe[246],_0x47f2x3);this[_0x1bfe[746]](_0x47f2x4);this[_0x1bfe[994]]()&& (!mxEvent[_0x1bfe[721]](_0x47f2x2)&& !_0x47f2x4[_0x1bfe[721]]()&& null!= _0x47f2x3&& this[_0x1bfe[2453]](_0x47f2x3))&& this[_0x1bfe[2451]](_0x47f2x3,_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[1014]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(!this[_0x1bfe[2382]]&& (this[_0x1bfe[2384]]|| mxUtils[_0x1bfe[1134]](this[_0x1bfe[526]]))){var _0x47f2x9=this[_0x1bfe[526]];_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:20;if(_0x47f2x2>= _0x47f2x9[_0x1bfe[360]]&& _0x47f2x3>= _0x47f2x9[_0x1bfe[190]]&& _0x47f2x2<= _0x47f2x9[_0x1bfe[360]]+ _0x47f2x9[_0x1bfe[159]]&& _0x47f2x3<= _0x47f2x9[_0x1bfe[190]]+ _0x47f2x9[_0x1bfe[157]]){var _0x47f2xa=_0x47f2x9[_0x1bfe[360]]+ _0x47f2x9[_0x1bfe[159]]- _0x47f2x2;if(_0x47f2xa< _0x47f2x5){if(_0x47f2x2= _0x47f2x9[_0x1bfe[360]],_0x47f2x9[_0x1bfe[360]]+= _0x47f2x5- _0x47f2xa,_0x47f2x4&& _0x47f2x2== _0x47f2x9[_0x1bfe[360]]){if(this[_0x1bfe[507]]== mxConstants[_0x1bfe[508]]){_0x47f2x2= this[_0x1bfe[441]][_0x1bfe[2024]]()[_0x1bfe[538]];var _0x47f2x12=this[_0x1bfe[526]][_0x1bfe[1526]]+ _0x47f2x5- _0x47f2xa}else {_0x47f2x12= Math[_0x1bfe[160]](_0x47f2x9[_0x1bfe[159]],_0x47f2x9[_0x1bfe[1526]])+ _0x47f2x5- _0x47f2xa,_0x47f2x2= this[_0x1bfe[441]][_0x1bfe[2051]]()};_0x47f2x2[_0x1bfe[124]][_0x1bfe[117]]= _0x47f2x12+ _0x1bfe[168];_0x47f2x9[_0x1bfe[360]]+= _0x47f2x5- _0x47f2xa}}else {_0x47f2xa= _0x47f2x2- _0x47f2x9[_0x1bfe[360]],_0x47f2xa< _0x47f2x5&& (_0x47f2x9[_0x1bfe[360]]-= _0x47f2x5- _0x47f2xa)};_0x47f2xa= _0x47f2x9[_0x1bfe[190]]+ _0x47f2x9[_0x1bfe[157]]- _0x47f2x3;_0x47f2xa< _0x47f2x5?(_0x47f2x2= _0x47f2x9[_0x1bfe[190]],_0x47f2x9[_0x1bfe[190]]+= _0x47f2x5- _0x47f2xa,_0x47f2x2== _0x47f2x9[_0x1bfe[190]]&& _0x47f2x4&& (this[_0x1bfe[507]]== mxConstants[_0x1bfe[508]]?(_0x47f2x2= this[_0x1bfe[441]][_0x1bfe[2024]]()[_0x1bfe[538]],_0x47f2x3= this[_0x1bfe[526]][_0x1bfe[191]]+ _0x47f2x5- _0x47f2xa):(_0x47f2x3= Math[_0x1bfe[160]](_0x47f2x9[_0x1bfe[157]],_0x47f2x9[_0x1bfe[191]])+ _0x47f2x5- _0x47f2xa,_0x47f2x2= this[_0x1bfe[441]][_0x1bfe[2051]]()),_0x47f2x2[_0x1bfe[124]][_0x1bfe[119]]= _0x47f2x3+ _0x1bfe[168],_0x47f2x9[_0x1bfe[190]]+= _0x47f2x5- _0x47f2xa)):(_0x47f2xa= _0x47f2x3- _0x47f2x9[_0x1bfe[190]],_0x47f2xa< _0x47f2x5&& (_0x47f2x9[_0x1bfe[190]]-= _0x47f2x5- _0x47f2xa))}}else {this[_0x1bfe[2383]]&& !this[_0x1bfe[2316]][_0x1bfe[1124]]&& (null== this[_0x1bfe[2463]]&& (this[_0x1bfe[2463]]= this[_0x1bfe[2464]]()),this[_0x1bfe[2463]][_0x1bfe[1143]](_0x47f2x2+ this[_0x1bfe[1136]],_0x47f2x3+ this[_0x1bfe[1137]]))}};mxGraph[_0x1bfe[202]][_0x1bfe[2464]]= function(){return new mxPanningManager(this)};mxGraph[_0x1bfe[202]][_0x1bfe[2465]]= function(){function _0x47f2x2(_0x47f2x2){var _0x47f2x3=0,_0x47f2x3=_0x1bfe[2466]== _0x47f2x2?2:_0x1bfe[2467]== _0x47f2x2?4:_0x1bfe[2468]== _0x47f2x2?6:parseInt(_0x47f2x2);isNaN(_0x47f2x3)&& (_0x47f2x3= 0);return _0x47f2x3}var _0x47f2x3=mxUtils[_0x1bfe[275]](this[_0x1bfe[526]]),_0x47f2x4= new mxRectangle;_0x47f2x4[_0x1bfe[235]]= _0x47f2x2(_0x47f2x3[_0x1bfe[2469]])+ parseInt(_0x47f2x3[_0x1bfe[357]]|| 0);_0x47f2x4[_0x1bfe[236]]= _0x47f2x2(_0x47f2x3[_0x1bfe[2470]])+ parseInt(_0x47f2x3[_0x1bfe[2471]]|| 0);_0x47f2x4[_0x1bfe[117]]= _0x47f2x2(_0x47f2x3[_0x1bfe[2472]])+ parseInt(_0x47f2x3[_0x1bfe[1164]]|| 0);_0x47f2x4[_0x1bfe[119]]= _0x47f2x2(_0x47f2x3[_0x1bfe[2473]])+ parseInt(_0x47f2x3[_0x1bfe[2474]]|| 0);return _0x47f2x4};mxGraph[_0x1bfe[202]][_0x1bfe[2475]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2= this[_0x1bfe[441]][_0x1bfe[255]];var _0x47f2x5=this[_0x1bfe[441]][_0x1bfe[513]],_0x47f2x9=this[_0x1bfe[2013]],_0x47f2xa=_0x47f2x2* this[_0x1bfe[2012]],_0x47f2x9= new mxRectangle(0,0,_0x47f2x9[_0x1bfe[117]]* _0x47f2xa,_0x47f2x9[_0x1bfe[119]]* _0x47f2xa);_0x47f2x3= this[_0x1bfe[2357]]?Math[_0x1bfe[430]](_0x47f2x3/ _0x47f2x9[_0x1bfe[117]]):1;_0x47f2x4= this[_0x1bfe[2357]]?Math[_0x1bfe[430]](_0x47f2x4/ _0x47f2x9[_0x1bfe[119]]):1;return new mxRectangle(0,0,_0x47f2x3* _0x47f2x9[_0x1bfe[117]]+ 2+ _0x47f2x5[_0x1bfe[235]]/ _0x47f2x2,_0x47f2x4* _0x47f2x9[_0x1bfe[119]]+ 2+ _0x47f2x5[_0x1bfe[236]]/ _0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2258]]= function(){var _0x47f2x2=this[_0x1bfe[517]]();if(null!= this[_0x1bfe[526]]){var _0x47f2x3=this[_0x1bfe[2476]](),_0x47f2x4=Math[_0x1bfe[160]](0,_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]+ 1+ _0x47f2x3),_0x47f2x3=Math[_0x1bfe[160]](0,_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]+ 1+ _0x47f2x3);null!= this[_0x1bfe[2387]]&& (_0x47f2x4= Math[_0x1bfe[160]](_0x47f2x4,this[_0x1bfe[2387]][_0x1bfe[117]]),_0x47f2x3= Math[_0x1bfe[160]](_0x47f2x3,this[_0x1bfe[2387]][_0x1bfe[119]]));this[_0x1bfe[2389]]&& this[_0x1bfe[2477]](_0x47f2x4,_0x47f2x3);if(this[_0x1bfe[2361]]|| !mxClient[_0x1bfe[80]]&& this[_0x1bfe[2273]]){var _0x47f2x5=this[_0x1bfe[2475]](_0x47f2x2,_0x47f2x4,_0x47f2x3);null!= _0x47f2x5&& (_0x47f2x4= _0x47f2x5[_0x1bfe[117]],_0x47f2x3= _0x47f2x5[_0x1bfe[119]])};null!= this[_0x1bfe[2386]]&& (_0x47f2x4= Math[_0x1bfe[160]](_0x47f2x4,this[_0x1bfe[2386]][_0x1bfe[117]]* this[_0x1bfe[441]][_0x1bfe[255]]),_0x47f2x3= Math[_0x1bfe[160]](_0x47f2x3,this[_0x1bfe[2386]][_0x1bfe[119]]* this[_0x1bfe[441]][_0x1bfe[255]]));_0x47f2x4= Math[_0x1bfe[430]](_0x47f2x4- 1);_0x47f2x3= Math[_0x1bfe[430]](_0x47f2x3- 1);this[_0x1bfe[507]]== mxConstants[_0x1bfe[508]]?(_0x47f2x5= this[_0x1bfe[441]][_0x1bfe[2024]]()[_0x1bfe[538]],_0x47f2x5[_0x1bfe[124]][_0x1bfe[2478]]= Math[_0x1bfe[160]](1,_0x47f2x4)+ _0x1bfe[168],_0x47f2x5[_0x1bfe[124]][_0x1bfe[2479]]= Math[_0x1bfe[160]](1,_0x47f2x3)+ _0x1bfe[168],_0x47f2x5[_0x1bfe[124]][_0x1bfe[117]]= _0x1bfe[118],_0x47f2x5[_0x1bfe[124]][_0x1bfe[119]]= _0x1bfe[118]):mxClient[_0x1bfe[496]]?this[_0x1bfe[441]][_0x1bfe[2320]](Math[_0x1bfe[160]](1,_0x47f2x4),Math[_0x1bfe[160]](1,_0x47f2x3)):(this[_0x1bfe[441]][_0x1bfe[510]][_0x1bfe[124]][_0x1bfe[2478]]= Math[_0x1bfe[160]](1,_0x47f2x4)+ _0x1bfe[168],this[_0x1bfe[441]][_0x1bfe[510]][_0x1bfe[124]][_0x1bfe[2479]]= Math[_0x1bfe[160]](1,_0x47f2x3)+ _0x1bfe[168]);this[_0x1bfe[2480]](this[_0x1bfe[2357]],_0x47f2x4- 1,_0x47f2x3- 1)};this[_0x1bfe[746]]( new mxEventObject(mxEvent.SIZE,_0x1bfe[1562],_0x47f2x2))};mxGraph[_0x1bfe[202]][_0x1bfe[2477]]= function(_0x47f2x2,_0x47f2x3){if(mxClient[_0x1bfe[80]]){if(mxClient[_0x1bfe[496]]){var _0x47f2x4=this[_0x1bfe[2465]]();_0x47f2x2+= Math[_0x1bfe[160]](2,_0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]]+ 1);_0x47f2x3+= Math[_0x1bfe[160]](2,_0x47f2x4[_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[119]]+ 1)}else {9<= document[_0x1bfe[5]]?(_0x47f2x2+= 3,_0x47f2x3+= 5):(_0x47f2x2+= 1,_0x47f2x3+= 1)}}else {_0x47f2x3+= 1};null!= this[_0x1bfe[2388]]&& (_0x47f2x2= Math[_0x1bfe[243]](this[_0x1bfe[2388]][_0x1bfe[117]],_0x47f2x2),_0x47f2x3= Math[_0x1bfe[243]](this[_0x1bfe[2388]][_0x1bfe[119]],_0x47f2x3));this[_0x1bfe[526]][_0x1bfe[124]][_0x1bfe[117]]= Math[_0x1bfe[430]](_0x47f2x2)+ _0x1bfe[168];this[_0x1bfe[526]][_0x1bfe[124]][_0x1bfe[119]]= Math[_0x1bfe[430]](_0x47f2x3)+ _0x1bfe[168]};mxGraph[_0x1bfe[202]][_0x1bfe[2480]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x9=this[_0x1bfe[441]][_0x1bfe[513]],_0x47f2xa=this[_0x1bfe[2013]],_0x47f2x12=_0x47f2x5* this[_0x1bfe[2012]],_0x47f2x9= new mxRectangle(_0x47f2x5* _0x47f2x9[_0x1bfe[235]],_0x47f2x5* _0x47f2x9[_0x1bfe[236]],_0x47f2xa[_0x1bfe[117]]* _0x47f2x12,_0x47f2xa[_0x1bfe[119]]* _0x47f2x12);_0x47f2x2= _0x47f2x2&& Math[_0x1bfe[243]](_0x47f2x9[_0x1bfe[117]],_0x47f2x9[_0x1bfe[119]])> this[_0x1bfe[2360]];_0x47f2x9[_0x1bfe[235]]= mxUtils[_0x1bfe[1454]](_0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[117]]);_0x47f2x9[_0x1bfe[236]]= mxUtils[_0x1bfe[1454]](_0x47f2x9[_0x1bfe[236]],_0x47f2x9[_0x1bfe[119]]);_0x47f2xa= _0x47f2x2?Math[_0x1bfe[430]]((_0x47f2x3- _0x47f2x9[_0x1bfe[235]])/ _0x47f2x9[_0x1bfe[117]]):0;_0x47f2x2= _0x47f2x2?Math[_0x1bfe[430]]((_0x47f2x4- _0x47f2x9[_0x1bfe[236]])/ _0x47f2x9[_0x1bfe[119]]):0;null== this[_0x1bfe[2481]]&& 0< _0x47f2xa&& (this[_0x1bfe[2481]]= []);if(null!= this[_0x1bfe[2481]]){for(_0x47f2x12= 0;_0x47f2x12<= _0x47f2xa;_0x47f2x12++){var _0x47f2x13=[ new mxPoint(_0x47f2x9[_0x1bfe[235]]+ _0x47f2x12* _0x47f2x9[_0x1bfe[117]],1), new mxPoint(_0x47f2x9[_0x1bfe[235]]+ _0x47f2x12* _0x47f2x9[_0x1bfe[117]],_0x47f2x4)];null!= this[_0x1bfe[2481]][_0x47f2x12]?(this[_0x1bfe[2481]][_0x47f2x12][_0x1bfe[255]]= 1,this[_0x1bfe[2481]][_0x47f2x12][_0x1bfe[1525]]= _0x47f2x13,this[_0x1bfe[2481]][_0x47f2x12][_0x1bfe[258]]()):(_0x47f2x13= new mxPolyline(_0x47f2x13,this[_0x1bfe[2358]],this[_0x1bfe[255]]),_0x47f2x13[_0x1bfe[507]]= this[_0x1bfe[507]],_0x47f2x13[_0x1bfe[1522]]= this[_0x1bfe[2359]],_0x47f2x13[_0x1bfe[255]]= _0x47f2x5,_0x47f2x13[_0x1bfe[176]](this[_0x1bfe[441]][_0x1bfe[2053]]),_0x47f2x13[_0x1bfe[258]](),this[_0x1bfe[2481]][_0x47f2x12]= _0x47f2x13)};for(_0x47f2x12= _0x47f2xa;_0x47f2x12< this[_0x1bfe[2481]][_0x1bfe[67]];_0x47f2x12++){this[_0x1bfe[2481]][_0x47f2x12][_0x1bfe[515]]()};this[_0x1bfe[2481]][_0x1bfe[300]](_0x47f2xa,this[_0x1bfe[2481]][_0x1bfe[67]]- _0x47f2xa)};null== this[_0x1bfe[2482]]&& 0< _0x47f2x2&& (this[_0x1bfe[2482]]= []);if(null!= this[_0x1bfe[2482]]){for(_0x47f2x12= 0;_0x47f2x12<= _0x47f2x2;_0x47f2x12++){_0x47f2x13= [ new mxPoint(1,_0x47f2x9[_0x1bfe[236]]+ _0x47f2x12* _0x47f2x9[_0x1bfe[119]]), new mxPoint(_0x47f2x3,_0x47f2x9[_0x1bfe[236]]+ _0x47f2x12* _0x47f2x9[_0x1bfe[119]])],null!= this[_0x1bfe[2482]][_0x47f2x12]?(this[_0x1bfe[2482]][_0x47f2x12][_0x1bfe[255]]= 1,this[_0x1bfe[2482]][_0x47f2x12][_0x1bfe[1525]]= _0x47f2x13,this[_0x1bfe[2482]][_0x47f2x12][_0x1bfe[258]]()):(_0x47f2x13= new mxPolyline(_0x47f2x13,this[_0x1bfe[2358]],_0x47f2x5),_0x47f2x13[_0x1bfe[507]]= this[_0x1bfe[507]],_0x47f2x13[_0x1bfe[1522]]= this[_0x1bfe[2359]],_0x47f2x13[_0x1bfe[255]]= _0x47f2x5,_0x47f2x13[_0x1bfe[176]](this[_0x1bfe[441]][_0x1bfe[2053]]),_0x47f2x13[_0x1bfe[258]](),this[_0x1bfe[2482]][_0x47f2x12]= _0x47f2x13)};for(_0x47f2x12= _0x47f2x2;_0x47f2x12< this[_0x1bfe[2482]][_0x1bfe[67]];_0x47f2x12++){this[_0x1bfe[2482]][_0x47f2x12][_0x1bfe[515]]()};this[_0x1bfe[2482]][_0x1bfe[300]](_0x47f2x2,this[_0x1bfe[2482]][_0x1bfe[67]]- _0x47f2x2)}};mxGraph[_0x1bfe[202]][_0x1bfe[1705]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[251]][_0x1bfe[474]](_0x47f2x2),_0x47f2x4=null,_0x47f2x4=this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2)?this[_0x1bfe[94]][_0x1bfe[2077]]():this[_0x1bfe[94]][_0x1bfe[2076]]();null!= _0x47f2x3&& (_0x47f2x4= this[_0x1bfe[2483]](this[_0x1bfe[94]][_0x1bfe[1705]](_0x47f2x3,_0x47f2x4)));null== _0x47f2x4&& (_0x47f2x4= mxGraph[_0x1bfe[202]][_0x1bfe[2346]]);return _0x47f2x4};mxGraph[_0x1bfe[202]][_0x1bfe[2483]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=_0x47f2x2[mxConstants[_0x1bfe[2484]]],_0x47f2x4=this[_0x1bfe[2485]](_0x47f2x3);null!= _0x47f2x4?_0x47f2x2[mxConstants[_0x1bfe[2484]]]= _0x47f2x4:_0x47f2x4= _0x47f2x3;null!= _0x47f2x4&& _0x1bfe[2486]== _0x47f2x4[_0x1bfe[85]](0,11)&& (_0x47f2x3= _0x47f2x4[_0x1bfe[2]](_0x1bfe[537]),0< _0x47f2x3&& (_0x47f2x4= _0x47f2x4[_0x1bfe[85]](0,_0x47f2x3)+ _0x1bfe[2487]+ _0x47f2x4[_0x1bfe[85]](_0x47f2x3+ 1)),_0x47f2x2[mxConstants[_0x1bfe[2484]]]= _0x47f2x4)};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2488]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= _0x47f2x3|| this[_0x1bfe[897]]();if(null!= _0x47f2x3){this[_0x1bfe[251]][_0x1bfe[473]]();try{for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x3[_0x1bfe[67]];_0x47f2x4++){this[_0x1bfe[251]][_0x1bfe[475]](_0x47f2x3[_0x47f2x4],_0x47f2x2)}}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[2489]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= _0x47f2x4|| this[_0x1bfe[2452]]();this[_0x1bfe[2490]](_0x47f2x2,_0x47f2x3,[_0x47f2x4])};mxGraph[_0x1bfe[202]][_0x1bfe[2490]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!1;_0x47f2x4= _0x47f2x4|| this[_0x1bfe[897]]();if(null!= _0x47f2x4&& 0< _0x47f2x4[_0x1bfe[67]]){var _0x47f2x5=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x4[0]),_0x47f2x5=null!= _0x47f2x5?_0x47f2x5[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x4[0]);null!= _0x47f2x5&& (_0x47f2x3= mxUtils[_0x1bfe[433]](_0x47f2x5,_0x47f2x2,_0x47f2x3)?0:1,this[_0x1bfe[1717]](_0x47f2x2,_0x47f2x3,_0x47f2x4))}};mxGraph[_0x1bfe[202]][_0x1bfe[1717]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= _0x47f2x4|| this[_0x1bfe[897]]();mxUtils[_0x1bfe[1717]](this[_0x1bfe[251]],_0x47f2x4,_0x47f2x2,_0x47f2x3)};mxGraph[_0x1bfe[202]][_0x1bfe[2491]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[2492]](_0x47f2x2,_0x47f2x3,null,_0x47f2x4)};mxGraph[_0x1bfe[202]][_0x1bfe[2492]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x5= _0x47f2x5|| this[_0x1bfe[897]]();if(null!= _0x47f2x5&& 0< _0x47f2x5[_0x1bfe[67]]){if(null== _0x47f2x4){var _0x47f2x9=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x5[0]),_0x47f2x9=null!= _0x47f2x9?_0x47f2x9[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x5[0]);null!= _0x47f2x9&& (_0x47f2x4= (parseInt(_0x47f2x9[_0x47f2x2]|| 0)& _0x47f2x3)!= _0x47f2x3)};mxUtils[_0x1bfe[2492]](this[_0x1bfe[251]],_0x47f2x5,_0x47f2x2,_0x47f2x3,_0x47f2x4)}};mxGraph[_0x1bfe[202]][_0x1bfe[849]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){null== _0x47f2x3&& (_0x47f2x3= this[_0x1bfe[897]]());if(null!= _0x47f2x3&& 1< _0x47f2x3[_0x1bfe[67]]){if(null== _0x47f2x4){for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x3[_0x1bfe[67]];_0x47f2x5++){var _0x47f2x9=this[_0x1bfe[1198]](_0x47f2x3[_0x47f2x5]);if(null!= _0x47f2x9&& !this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x3[_0x47f2x5])){if(null== _0x47f2x4){if(_0x47f2x2== mxConstants[_0x1bfe[479]]){_0x47f2x4= _0x47f2x9[_0x1bfe[235]]+ _0x47f2x9[_0x1bfe[117]]/ 2;break}else {if(_0x47f2x2== mxConstants[_0x1bfe[480]]){_0x47f2x4= _0x47f2x9[_0x1bfe[235]]+ _0x47f2x9[_0x1bfe[117]]}else {if(_0x47f2x2== mxConstants[_0x1bfe[1687]]){_0x47f2x4= _0x47f2x9[_0x1bfe[236]]}else {if(_0x47f2x2== mxConstants[_0x1bfe[481]]){_0x47f2x4= _0x47f2x9[_0x1bfe[236]]+ _0x47f2x9[_0x1bfe[119]]/ 2;break}else {_0x47f2x4= _0x47f2x2== mxConstants[_0x1bfe[482]]?_0x47f2x9[_0x1bfe[236]]+ _0x47f2x9[_0x1bfe[119]]:_0x47f2x9[_0x1bfe[235]]}}}}}else {_0x47f2x4= _0x47f2x2== mxConstants[_0x1bfe[480]]?Math[_0x1bfe[160]](_0x47f2x4,_0x47f2x9[_0x1bfe[235]]+ _0x47f2x9[_0x1bfe[117]]):_0x47f2x2== mxConstants[_0x1bfe[1687]]?Math[_0x1bfe[243]](_0x47f2x4,_0x47f2x9[_0x1bfe[236]]):_0x47f2x2== mxConstants[_0x1bfe[482]]?Math[_0x1bfe[160]](_0x47f2x4,_0x47f2x9[_0x1bfe[236]]+ _0x47f2x9[_0x1bfe[119]]):Math[_0x1bfe[243]](_0x47f2x4,_0x47f2x9[_0x1bfe[235]])}}}};if(null!= _0x47f2x4){this[_0x1bfe[251]][_0x1bfe[473]]();try{for(_0x47f2x5= 0;_0x47f2x5< _0x47f2x3[_0x1bfe[67]];_0x47f2x5++){_0x47f2x9= this[_0x1bfe[1198]](_0x47f2x3[_0x47f2x5]),null!= _0x47f2x9&& !this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x3[_0x47f2x5])&& (_0x47f2x9= _0x47f2x9[_0x1bfe[238]](),_0x47f2x2== mxConstants[_0x1bfe[479]]?_0x47f2x9[_0x1bfe[235]]= _0x47f2x4- _0x47f2x9[_0x1bfe[117]]/ 2:_0x47f2x2== mxConstants[_0x1bfe[480]]?_0x47f2x9[_0x1bfe[235]]= _0x47f2x4- _0x47f2x9[_0x1bfe[117]]:_0x47f2x2== mxConstants[_0x1bfe[1687]]?_0x47f2x9[_0x1bfe[236]]= _0x47f2x4:_0x47f2x2== mxConstants[_0x1bfe[481]]?_0x47f2x9[_0x1bfe[236]]= _0x47f2x4- _0x47f2x9[_0x1bfe[119]]/ 2:_0x47f2x2== mxConstants[_0x1bfe[482]]?_0x47f2x9[_0x1bfe[236]]= _0x47f2x4- _0x47f2x9[_0x1bfe[119]]:_0x47f2x9[_0x1bfe[235]]= _0x47f2x4,this[_0x1bfe[251]][_0x1bfe[1724]](_0x47f2x3[_0x47f2x5],_0x47f2x9))};this[_0x1bfe[746]]( new mxEventObject(mxEvent.ALIGN_CELLS,_0x1bfe[611],_0x47f2x2,_0x1bfe[895],_0x47f2x3))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[854]]= function(_0x47f2x2){if(null!= _0x47f2x2&& null!= this[_0x1bfe[2356]]){this[_0x1bfe[251]][_0x1bfe[473]]();try{var _0x47f2x3=this[_0x1bfe[251]][_0x1bfe[474]](_0x47f2x2);null== _0x47f2x3|| 0== _0x47f2x3[_0x1bfe[67]]?this[_0x1bfe[251]][_0x1bfe[475]](_0x47f2x2,this[_0x1bfe[2356]]):this[_0x1bfe[251]][_0x1bfe[475]](_0x47f2x2,null);this[_0x1bfe[1809]](_0x47f2x2);this[_0x1bfe[746]]( new mxEventObject(mxEvent.FLIP_EDGE,_0x1bfe[1989],_0x47f2x2))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2493]]= function(_0x47f2x2){this[_0x1bfe[2336]][_0x1bfe[207]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2494]]= function(_0x47f2x2){for(var _0x47f2x3=[],_0x47f2x4=0;_0x47f2x4< this[_0x1bfe[2336]][_0x1bfe[67]];_0x47f2x4++){this[_0x1bfe[2336]][_0x47f2x4]!= _0x47f2x2&& _0x47f2x3[_0x1bfe[207]](this[_0x1bfe[2336]][_0x47f2x4])};this[_0x1bfe[2336]]= _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[2485]]= function(_0x47f2x2){if(null!= _0x47f2x2){for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[2336]][_0x1bfe[67]];_0x47f2x3++){var _0x47f2x4=this[_0x1bfe[2336]][_0x47f2x3][_0x1bfe[1202]](_0x47f2x2);if(null!= _0x47f2x4){return _0x47f2x4}}};return null};mxGraph[_0x1bfe[202]][_0x1bfe[840]]= function(_0x47f2x2,_0x47f2x3){null== _0x47f2x3&& (_0x47f2x3= mxUtils[_0x1bfe[1779]](this[_0x1bfe[897]](),!0));this[_0x1bfe[251]][_0x1bfe[473]]();try{this[_0x1bfe[841]](_0x47f2x3,_0x47f2x2),this[_0x1bfe[746]]( new mxEventObject(mxEvent.ORDER_CELLS,_0x1bfe[2495],_0x47f2x2,_0x1bfe[895],_0x47f2x3))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[841]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2){this[_0x1bfe[251]][_0x1bfe[473]]();try{for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){var _0x47f2x5=this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2[_0x47f2x4]);_0x47f2x3?this[_0x1bfe[251]][_0x1bfe[99]](_0x47f2x5,_0x47f2x2[_0x47f2x4],_0x47f2x4):this[_0x1bfe[251]][_0x1bfe[99]](_0x47f2x5,_0x47f2x2[_0x47f2x4],this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x5)- 1)};this[_0x1bfe[746]]( new mxEventObject(mxEvent.CELLS_ORDERED,_0x1bfe[2495],_0x47f2x3,_0x1bfe[895],_0x47f2x2))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[844]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){null== _0x47f2x4&& (_0x47f2x4= mxUtils[_0x1bfe[1779]](this[_0x1bfe[897]](),!0));_0x47f2x4= this[_0x1bfe[2496]](_0x47f2x4);null== _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[2497]](_0x47f2x4));var _0x47f2x5=this[_0x1bfe[2498]](_0x47f2x2,_0x47f2x4,_0x47f2x3);if(0< _0x47f2x4[_0x1bfe[67]]&& null!= _0x47f2x5){var _0x47f2x9=this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2);null== _0x47f2x9&& (_0x47f2x9= this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x4[0]));this[_0x1bfe[251]][_0x1bfe[473]]();try{null== this[_0x1bfe[1198]](_0x47f2x2)&& this[_0x1bfe[251]][_0x1bfe[1724]](_0x47f2x2, new mxGeometry);var _0x47f2xa=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x9);this[_0x1bfe[833]]([_0x47f2x2],_0x47f2x9,_0x47f2xa,null,null,!1);_0x47f2xa= this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2);this[_0x1bfe[833]](_0x47f2x4,_0x47f2x2,_0x47f2xa,null,null,!1,!1);this[_0x1bfe[835]](_0x47f2x4,-_0x47f2x5[_0x1bfe[235]],-_0x47f2x5[_0x1bfe[236]],!1,!0);this[_0x1bfe[837]]([_0x47f2x2],[_0x47f2x5]);this[_0x1bfe[746]]( new mxEventObject(mxEvent.GROUP_CELLS,_0x1bfe[1504],_0x47f2x2,_0x1bfe[467],_0x47f2x3,_0x1bfe[895],_0x47f2x4))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2496]]= function(_0x47f2x2){var _0x47f2x3=[];if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]){var _0x47f2x4=this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2[0]);_0x47f2x3[_0x1bfe[207]](_0x47f2x2[0]);for(var _0x47f2x5=1;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2[_0x47f2x5])== _0x47f2x4&& _0x47f2x3[_0x1bfe[207]](_0x47f2x2[_0x47f2x5])}};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[2498]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= this[_0x1bfe[1729]](_0x47f2x3);null!= _0x47f2x3&& (this[_0x1bfe[1730]](_0x47f2x2)&& (_0x47f2x2= this[_0x1bfe[1731]](_0x47f2x2),_0x47f2x3[_0x1bfe[235]]-= _0x47f2x2[_0x1bfe[117]],_0x47f2x3[_0x1bfe[236]]-= _0x47f2x2[_0x1bfe[119]],_0x47f2x3[_0x1bfe[117]]+= _0x47f2x2[_0x1bfe[117]],_0x47f2x3[_0x1bfe[119]]+= _0x47f2x2[_0x1bfe[119]]),_0x47f2x3[_0x1bfe[235]]-= _0x47f2x4,_0x47f2x3[_0x1bfe[236]]-= _0x47f2x4,_0x47f2x3[_0x1bfe[117]]+= 2* _0x47f2x4,_0x47f2x3[_0x1bfe[119]]+= 2* _0x47f2x4);return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[2497]]= function(_0x47f2x2){_0x47f2x2= new mxCell(_0x1bfe[110]);_0x47f2x2[_0x1bfe[1993]](!0);_0x47f2x2[_0x1bfe[1995]](!1);return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[845]]= function(_0x47f2x2){var _0x47f2x3=[];if(null== _0x47f2x2){_0x47f2x2= this[_0x1bfe[897]]();for(var _0x47f2x4=[],_0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){0< this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2[_0x47f2x5])&& _0x47f2x4[_0x1bfe[207]](_0x47f2x2[_0x47f2x5])};_0x47f2x2= _0x47f2x4};if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]){this[_0x1bfe[251]][_0x1bfe[473]]();try{for(_0x47f2x5= 0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){var _0x47f2x9=this[_0x1bfe[251]][_0x1bfe[1953]](_0x47f2x2[_0x47f2x5]);if(null!= _0x47f2x9&& 0< _0x47f2x9[_0x1bfe[67]]){var _0x47f2x9=_0x47f2x9[_0x1bfe[1853]](),_0x47f2xa=this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2[_0x47f2x5]),_0x47f2x12=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2xa);this[_0x1bfe[833]](_0x47f2x9,_0x47f2xa,_0x47f2x12,null,null,!0);_0x47f2x3= _0x47f2x3[_0x1bfe[1919]](_0x47f2x9)}};this[_0x1bfe[843]](this[_0x1bfe[2499]](_0x47f2x2));this[_0x1bfe[746]]( new mxEventObject(mxEvent.UNGROUP_CELLS,_0x1bfe[895],_0x47f2x2))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[846]]= function(_0x47f2x2){null== _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[897]]());this[_0x1bfe[251]][_0x1bfe[473]]();try{var _0x47f2x3=this[_0x1bfe[902]](),_0x47f2x4=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x3);this[_0x1bfe[833]](_0x47f2x2,_0x47f2x3,_0x47f2x4,null,null,!0);this[_0x1bfe[746]]( new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,_0x1bfe[895],_0x47f2x2))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[1917]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){null== _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[897]]());_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:0;_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!1;this[_0x1bfe[251]][_0x1bfe[473]]();try{for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){var _0x47f2x9=this[_0x1bfe[1198]](_0x47f2x2[_0x47f2x5]);if(null!= _0x47f2x9){var _0x47f2xa=this[_0x1bfe[1955]](_0x47f2x2[_0x47f2x5]);if(null!= _0x47f2xa&& 0< _0x47f2xa[_0x1bfe[67]]){var _0x47f2x12=this[_0x1bfe[1729]](_0x47f2xa);if(0< _0x47f2x12[_0x1bfe[117]]&& 0< _0x47f2x12[_0x1bfe[119]]){var _0x47f2x13=this[_0x1bfe[1730]](_0x47f2x2[_0x47f2x5])?this[_0x1bfe[1731]](_0x47f2x2[_0x47f2x5]): new mxRectangle,_0x47f2x9=_0x47f2x9[_0x1bfe[238]]();_0x47f2x4&& (_0x47f2x9[_0x1bfe[235]]+= _0x47f2x12[_0x1bfe[235]]- _0x47f2x13[_0x1bfe[117]]- _0x47f2x3,_0x47f2x9[_0x1bfe[236]]+= _0x47f2x12[_0x1bfe[236]]- _0x47f2x13[_0x1bfe[119]]- _0x47f2x3);_0x47f2x9[_0x1bfe[117]]= _0x47f2x12[_0x1bfe[117]]+ _0x47f2x13[_0x1bfe[117]]+ 2* _0x47f2x3;_0x47f2x9[_0x1bfe[119]]= _0x47f2x12[_0x1bfe[119]]+ _0x47f2x13[_0x1bfe[119]]+ 2* _0x47f2x3;this[_0x1bfe[251]][_0x1bfe[1724]](_0x47f2x2[_0x47f2x5],_0x47f2x9);this[_0x1bfe[834]](_0x47f2xa,-_0x47f2x12[_0x1bfe[235]]+ _0x47f2x13[_0x1bfe[117]]+ _0x47f2x3,-_0x47f2x12[_0x1bfe[236]]+ _0x47f2x13[_0x1bfe[119]]+ _0x47f2x3)}}}}}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[899]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!0;var _0x47f2x4=null;if(null!= _0x47f2x2){for(var _0x47f2x5={},_0x47f2x4=[],_0x47f2x9=0;_0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9++){var _0x47f2xa=mxCellPath[_0x1bfe[385]](_0x47f2x2[_0x47f2x9]);_0x47f2x5[_0x47f2xa]= _0x47f2x2[_0x47f2x9];_0x47f2x4[_0x1bfe[207]](_0x47f2x2[_0x47f2x9])};if(0< _0x47f2x4[_0x1bfe[67]]){for(var _0x47f2xa=this[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x12=this[_0x1bfe[441]][_0x1bfe[513]],_0x47f2x4=this[_0x1bfe[251]][_0x1bfe[899]](_0x47f2x2,!0),_0x47f2x9=0;_0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9++){if(!_0x47f2x3&& this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x4[_0x47f2x9])&& null!= this[_0x1bfe[2500]](_0x47f2x4[_0x47f2x9],this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x4[_0x47f2x9],!0),this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x4[_0x47f2x9],!1))){_0x47f2x4[_0x47f2x9]= null}else {var _0x47f2x13=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x4[_0x47f2x9]);if(null!= _0x47f2x13){var _0x47f2x14=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2[_0x47f2x9]),_0x47f2x15=this[_0x1bfe[441]][_0x1bfe[248]](this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2[_0x47f2x9]));if(null!= _0x47f2x14&& null!= _0x47f2x15){var _0x47f2x16=_0x47f2x15[_0x1bfe[2078]][_0x1bfe[235]],_0x47f2x15=_0x47f2x15[_0x1bfe[2078]][_0x1bfe[236]];if(this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x4[_0x47f2x9])){for(var _0x47f2x14=_0x47f2x14[_0x1bfe[439]],_0x47f2x17=this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2[_0x47f2x9],!0),_0x47f2x18=mxCellPath[_0x1bfe[385]](_0x47f2x17);null!= _0x47f2x17&& null== _0x47f2x5[_0x47f2x18];){_0x47f2x17= this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x17),_0x47f2x18= mxCellPath[_0x1bfe[385]](_0x47f2x17)};null== _0x47f2x17&& _0x47f2x13[_0x1bfe[2007]]( new mxPoint(_0x47f2x14[0][_0x1bfe[235]]/ _0x47f2xa- _0x47f2x12[_0x1bfe[235]],_0x47f2x14[0][_0x1bfe[236]]/ _0x47f2xa- _0x47f2x12[_0x1bfe[236]]),!0);_0x47f2x17= this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2[_0x47f2x9],!1);for(_0x47f2x18= mxCellPath[_0x1bfe[385]](_0x47f2x17);null!= _0x47f2x17&& null== _0x47f2x5[_0x47f2x18];){_0x47f2x17= this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x17),_0x47f2x18= mxCellPath[_0x1bfe[385]](_0x47f2x17)};null== _0x47f2x17&& (_0x47f2x17= _0x47f2x14[_0x1bfe[67]]- 1,_0x47f2x13[_0x1bfe[2007]]( new mxPoint(_0x47f2x14[_0x47f2x17][_0x1bfe[235]]/ _0x47f2xa- _0x47f2x12[_0x1bfe[235]],_0x47f2x14[_0x47f2x17][_0x1bfe[236]]/ _0x47f2xa- _0x47f2x12[_0x1bfe[236]]),!1));_0x47f2x13= _0x47f2x13[_0x1bfe[1525]];if(null!= _0x47f2x13){for(_0x47f2x14= 0;_0x47f2x14< _0x47f2x13[_0x1bfe[67]];_0x47f2x14++){_0x47f2x13[_0x47f2x14][_0x1bfe[235]]+= _0x47f2x16,_0x47f2x13[_0x47f2x14][_0x1bfe[236]]+= _0x47f2x15}}}else {_0x47f2x13[_0x1bfe[235]]+= _0x47f2x16,_0x47f2x13[_0x1bfe[236]]+= _0x47f2x15}}}}}}else {_0x47f2x4= []}};return _0x47f2x4};mxGraph[_0x1bfe[202]][_0x1bfe[2501]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14){_0x47f2x3= this[_0x1bfe[2502]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14);return this[_0x1bfe[2103]](_0x47f2x3,_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2502]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14){_0x47f2x2= new mxGeometry(_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12);_0x47f2x2[_0x1bfe[1500]]= null!= _0x47f2x14?_0x47f2x14:!1;_0x47f2x4= new mxCell(_0x47f2x4,_0x47f2x2,_0x47f2x13);_0x47f2x4[_0x1bfe[1945]](_0x47f2x3);_0x47f2x4[_0x1bfe[1993]](!0);_0x47f2x4[_0x1bfe[1995]](!0);return _0x47f2x4};mxGraph[_0x1bfe[202]][_0x1bfe[1960]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x3= this[_0x1bfe[2503]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa);return this[_0x1bfe[2504]](_0x47f2x3,_0x47f2x2,_0x47f2x5,_0x47f2x9)};mxGraph[_0x1bfe[202]][_0x1bfe[2503]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x2= new mxCell(_0x47f2x4, new mxGeometry,_0x47f2xa);_0x47f2x2[_0x1bfe[1945]](_0x47f2x3);_0x47f2x2[_0x1bfe[1994]](!0);_0x47f2x2[_0x1bfe[256]][_0x1bfe[1500]]= !0;return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2504]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){return this[_0x1bfe[2103]](_0x47f2x2,_0x47f2x3,_0x47f2x9,_0x47f2x4,_0x47f2x5)};mxGraph[_0x1bfe[202]][_0x1bfe[2103]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){return this[_0x1bfe[832]]([_0x47f2x2],_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9)[0]};mxGraph[_0x1bfe[202]][_0x1bfe[832]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){null== _0x47f2x3&& (_0x47f2x3= this[_0x1bfe[902]]());null== _0x47f2x4&& (_0x47f2x4= this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x3));this[_0x1bfe[251]][_0x1bfe[473]]();try{this[_0x1bfe[833]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,!1,!0),this[_0x1bfe[746]]( new mxEventObject(mxEvent.ADD_CELLS,_0x1bfe[895],_0x47f2x2,_0x1bfe[1101],_0x47f2x3,_0x1bfe[1983],_0x47f2x4,_0x1bfe[1097],_0x47f2x5,_0x1bfe[772],_0x47f2x9))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[833]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12){if(null!= _0x47f2x2&& null!= _0x47f2x3&& null!= _0x47f2x4){this[_0x1bfe[251]][_0x1bfe[473]]();try{for(var _0x47f2x13=_0x47f2xa?this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x3):null,_0x47f2x14=null!= _0x47f2x13?_0x47f2x13[_0x1bfe[2078]]:null,_0x47f2x15= new mxPoint(0,0),_0x47f2x13=0;_0x47f2x13< _0x47f2x2[_0x1bfe[67]];_0x47f2x13++){if(null== _0x47f2x2[_0x47f2x13]){_0x47f2x4--}else {var _0x47f2x16=this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2[_0x47f2x13]);if(null!= _0x47f2x14&& _0x47f2x2[_0x47f2x13]!= _0x47f2x3&& _0x47f2x3!= _0x47f2x16){var _0x47f2x17=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x16),_0x47f2x18=null!= _0x47f2x17?_0x47f2x17[_0x1bfe[2078]]:_0x47f2x15,_0x47f2x19=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2[_0x47f2x13]);if(null!= _0x47f2x19){var _0x47f2x1a=_0x47f2x18[_0x1bfe[235]]- _0x47f2x14[_0x1bfe[235]],_0x47f2x1b=_0x47f2x18[_0x1bfe[236]]- _0x47f2x14[_0x1bfe[236]],_0x47f2x19=_0x47f2x19[_0x1bfe[238]]();_0x47f2x19[_0x1bfe[513]](_0x47f2x1a,_0x47f2x1b);!_0x47f2x19[_0x1bfe[1500]]&& (this[_0x1bfe[251]][_0x1bfe[1193]](_0x47f2x2[_0x47f2x13])&& !this[_0x1bfe[2505]]())&& (_0x47f2x19[_0x1bfe[235]]= Math[_0x1bfe[160]](0,_0x47f2x19[_0x1bfe[235]]),_0x47f2x19[_0x1bfe[236]]= Math[_0x1bfe[160]](0,_0x47f2x19[_0x1bfe[236]]));this[_0x1bfe[251]][_0x1bfe[1724]](_0x47f2x2[_0x47f2x13],_0x47f2x19)}};_0x47f2x3== _0x47f2x16&& _0x47f2x4+ _0x47f2x13> this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x3)&& _0x47f2x4--;this[_0x1bfe[251]][_0x1bfe[99]](_0x47f2x3,_0x47f2x2[_0x47f2x13],_0x47f2x4+ _0x47f2x13);this[_0x1bfe[2506]]()&& this[_0x1bfe[2507]](_0x47f2x2[_0x47f2x13])&& this[_0x1bfe[2508]](_0x47f2x2[_0x47f2x13]);(null== _0x47f2x12|| _0x47f2x12)&& this[_0x1bfe[2509]](_0x47f2x2[_0x47f2x13]);null!= _0x47f2x5&& this[_0x1bfe[852]](_0x47f2x2[_0x47f2x13],_0x47f2x5,!0);null!= _0x47f2x9&& this[_0x1bfe[852]](_0x47f2x2[_0x47f2x13],_0x47f2x9,!1)}};this[_0x1bfe[746]]( new mxEventObject(mxEvent.CELLS_ADDED,_0x1bfe[895],_0x47f2x2,_0x1bfe[1101],_0x47f2x3,_0x1bfe[1983],_0x47f2x4,_0x1bfe[1097],_0x47f2x5,_0x1bfe[772],_0x47f2x9,_0x1bfe[492],_0x47f2xa))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[842]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!0;null== _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[2510]](this[_0x1bfe[897]]()));_0x47f2x3&& (_0x47f2x2= this[_0x1bfe[2510]](this[_0x1bfe[2499]](_0x47f2x2)));this[_0x1bfe[251]][_0x1bfe[473]]();try{this[_0x1bfe[843]](_0x47f2x2),this[_0x1bfe[746]]( new mxEventObject(mxEvent.REMOVE_CELLS,_0x1bfe[895],_0x47f2x2,_0x1bfe[2511],_0x47f2x3))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[843]]= function(_0x47f2x2){if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]){var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x4=this[_0x1bfe[441]][_0x1bfe[513]];this[_0x1bfe[251]][_0x1bfe[473]]();try{for(var _0x47f2x5={},_0x47f2x9=0;_0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9++){var _0x47f2xa=mxCellPath[_0x1bfe[385]](_0x47f2x2[_0x47f2x9]);_0x47f2x5[_0x47f2xa]= _0x47f2x2[_0x47f2x9]};for(_0x47f2x9= 0;_0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9++){for(var _0x47f2x12=this[_0x1bfe[1756]](_0x47f2x2[_0x47f2x9]),_0x47f2x13=0;_0x47f2x13< _0x47f2x12[_0x1bfe[67]];_0x47f2x13++){if(_0x47f2xa= mxCellPath[_0x1bfe[385]](_0x47f2x12[_0x47f2x13]),null== _0x47f2x5[_0x47f2xa]){var _0x47f2x14=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x12[_0x47f2x13]);if(null!= _0x47f2x14){var _0x47f2x15=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x12[_0x47f2x13]);if(null!= _0x47f2x15){var _0x47f2x14=_0x47f2x14[_0x1bfe[238]](),_0x47f2x16=_0x47f2x15[_0x1bfe[1710]](!0) == _0x47f2x2[_0x47f2x9],_0x47f2x17=_0x47f2x15[_0x1bfe[439]],_0x47f2x18=_0x47f2x16?0:_0x47f2x17[_0x1bfe[67]]- 1;_0x47f2x14[_0x1bfe[2007]]( new mxPoint(_0x47f2x17[_0x47f2x18][_0x1bfe[235]]/ _0x47f2x3- _0x47f2x4[_0x1bfe[235]],_0x47f2x17[_0x47f2x18][_0x1bfe[236]]/ _0x47f2x3- _0x47f2x4[_0x1bfe[236]]),_0x47f2x16);this[_0x1bfe[251]][_0x1bfe[1957]](_0x47f2x12[_0x47f2x13],null,_0x47f2x16);this[_0x1bfe[251]][_0x1bfe[1724]](_0x47f2x12[_0x47f2x13],_0x47f2x14)}}}};this[_0x1bfe[251]][_0x1bfe[205]](_0x47f2x2[_0x47f2x9])};this[_0x1bfe[746]]( new mxEventObject(mxEvent.CELLS_REMOVED,_0x1bfe[895],_0x47f2x2))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[853]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x5= _0x47f2x5|| 0;_0x47f2x9= _0x47f2x9|| 0;null== _0x47f2x4&& (_0x47f2x4= this[_0x1bfe[899]]([_0x47f2x2])[0]);var _0x47f2xa=this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2),_0x47f2x12=this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2,!0);this[_0x1bfe[251]][_0x1bfe[473]]();try{this[_0x1bfe[835]](_0x47f2x3,_0x47f2x5,_0x47f2x9,!1,!1),this[_0x1bfe[833]](_0x47f2x3,_0x47f2xa,this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2xa),null,null,!0),this[_0x1bfe[833]]([_0x47f2x4],_0x47f2xa,this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2xa),_0x47f2x12,_0x47f2x3[0],!1),this[_0x1bfe[852]](_0x47f2x2,_0x47f2x3[0],!0),this[_0x1bfe[746]]( new mxEventObject(mxEvent.SPLIT_EDGE,_0x1bfe[1989],_0x47f2x2,_0x1bfe[895],_0x47f2x3,_0x1bfe[2512],_0x47f2x4,_0x1bfe[1126],_0x47f2x5,_0x1bfe[1125],_0x47f2x9))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x4};mxGraph[_0x1bfe[202]][_0x1bfe[838]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){null== _0x47f2x3&& (_0x47f2x3= this[_0x1bfe[897]]());_0x47f2x4&& (_0x47f2x3= this[_0x1bfe[2499]](_0x47f2x3));this[_0x1bfe[251]][_0x1bfe[473]]();try{this[_0x1bfe[839]](_0x47f2x3,_0x47f2x2),this[_0x1bfe[746]]( new mxEventObject(mxEvent.TOGGLE_CELLS,_0x1bfe[539],_0x47f2x2,_0x1bfe[895],_0x47f2x3,_0x1bfe[2511],_0x47f2x4))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[839]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]){this[_0x1bfe[251]][_0x1bfe[473]]();try{for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){this[_0x1bfe[251]][_0x1bfe[175]](_0x47f2x2[_0x47f2x4],_0x47f2x3)}}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[847]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!1;null== _0x47f2x4&& (_0x47f2x4= this[_0x1bfe[2513]](this[_0x1bfe[897]](),_0x47f2x2));this[_0x1bfe[2126]](!1);this[_0x1bfe[251]][_0x1bfe[473]]();try{this[_0x1bfe[848]](_0x47f2x4,_0x47f2x2,_0x47f2x3,_0x47f2x5),this[_0x1bfe[746]]( new mxEventObject(mxEvent.FOLD_CELLS,_0x1bfe[2514],_0x47f2x2,_0x1bfe[2515],_0x47f2x3,_0x1bfe[895],_0x47f2x4))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x4};mxGraph[_0x1bfe[202]][_0x1bfe[848]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]){this[_0x1bfe[251]][_0x1bfe[473]]();try{for(var _0x47f2x9=0;_0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9++){if((!_0x47f2x5|| this[_0x1bfe[2516]](_0x47f2x2[_0x47f2x9],_0x47f2x3)) && _0x47f2x3!= this[_0x1bfe[1742]](_0x47f2x2[_0x47f2x9])){if(this[_0x1bfe[251]][_0x1bfe[1972]](_0x47f2x2[_0x47f2x9],_0x47f2x3),this[_0x1bfe[2517]](_0x47f2x2[_0x47f2x9],_0x47f2x3),this[_0x1bfe[2507]](_0x47f2x2[_0x47f2x9])&& this[_0x1bfe[2508]](_0x47f2x2[_0x47f2x9]),_0x47f2x4){var _0x47f2xa=this[_0x1bfe[251]][_0x1bfe[1953]](_0x47f2x2[_0x47f2x9]);this[_0x1bfe[847]](_0x47f2xa,_0x47f2x3,_0x47f2x4)}}};this[_0x1bfe[746]]( new mxEventObject(mxEvent.CELLS_FOLDED,_0x1bfe[895],_0x47f2x2,_0x1bfe[2514],_0x47f2x3,_0x1bfe[2515],_0x47f2x4))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[2517]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2){var _0x47f2x4=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2);null!= _0x47f2x4&& (_0x47f2x4= _0x47f2x4[_0x1bfe[238]](),this[_0x1bfe[2518]](_0x47f2x2,_0x47f2x4,_0x47f2x3),_0x47f2x4[_0x1bfe[2005]](),this[_0x1bfe[251]][_0x1bfe[1724]](_0x47f2x2,_0x47f2x4))}};mxGraph[_0x1bfe[202]][_0x1bfe[2518]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(null!= _0x47f2x2&& null!= _0x47f2x3){_0x47f2x4= this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);_0x47f2x4= null!= _0x47f2x4?_0x47f2x4[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);if(null== _0x47f2x3[_0x1bfe[2002]]){var _0x47f2x5=_0x47f2x3;this[_0x1bfe[2394]]&& (_0x47f2x2= this[_0x1bfe[2519]](_0x47f2x2),null!= _0x47f2x2&& (_0x47f2x5= _0x47f2x2,_0x47f2x2= mxUtils[_0x1bfe[433]](_0x47f2x4,mxConstants.STYLE_STARTSIZE),0< _0x47f2x2&& (_0x47f2x5[_0x1bfe[119]]= Math[_0x1bfe[160]](_0x47f2x5[_0x1bfe[119]],_0x47f2x2))));_0x47f2x3[_0x1bfe[2002]]= new mxRectangle(0,0,_0x47f2x5[_0x1bfe[117]],_0x47f2x5[_0x1bfe[119]])};if(null!= _0x47f2x3[_0x1bfe[2002]]){_0x47f2x3[_0x1bfe[2002]][_0x1bfe[235]]= _0x47f2x3[_0x1bfe[235]];_0x47f2x3[_0x1bfe[2002]][_0x1bfe[236]]= _0x47f2x3[_0x1bfe[236]];var _0x47f2x9=mxUtils[_0x1bfe[431]](_0x47f2x4[mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]);0!= _0x47f2x9&& (_0x47f2x2= _0x47f2x3[_0x1bfe[2002]][_0x1bfe[241]]()- _0x47f2x3[_0x1bfe[241]](),_0x47f2x4= _0x47f2x3[_0x1bfe[2002]][_0x1bfe[242]]()- _0x47f2x3[_0x1bfe[242]](),_0x47f2x5= Math[_0x1bfe[426]](_0x47f2x9),_0x47f2x9= Math[_0x1bfe[427]](_0x47f2x9),_0x47f2x3[_0x1bfe[2002]][_0x1bfe[235]]+= _0x47f2x5* _0x47f2x2- _0x47f2x9* _0x47f2x4- _0x47f2x2,_0x47f2x3[_0x1bfe[2002]][_0x1bfe[236]]+= _0x47f2x9* _0x47f2x2+ _0x47f2x5* _0x47f2x4- _0x47f2x4)}}};mxGraph[_0x1bfe[202]][_0x1bfe[2499]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[1853]]();return _0x47f2x3= _0x47f2x3[_0x1bfe[1919]](this[_0x1bfe[2520]](_0x47f2x2))};mxGraph[_0x1bfe[202]][_0x1bfe[2520]]= function(_0x47f2x2){var _0x47f2x3=[];if(null!= _0x47f2x2){for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){for(var _0x47f2x5=this[_0x1bfe[251]][_0x1bfe[1707]](_0x47f2x2[_0x47f2x4]),_0x47f2x9=0;_0x47f2x9< _0x47f2x5;_0x47f2x9++){_0x47f2x3[_0x1bfe[207]](this[_0x1bfe[251]][_0x1bfe[1708]](_0x47f2x2[_0x47f2x4],_0x47f2x9))};_0x47f2x5= this[_0x1bfe[251]][_0x1bfe[1953]](_0x47f2x2[_0x47f2x4]);_0x47f2x3= _0x47f2x3[_0x1bfe[1919]](this[_0x1bfe[2520]](_0x47f2x5))}};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[858]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!1;this[_0x1bfe[251]][_0x1bfe[473]]();try{this[_0x1bfe[2457]](_0x47f2x2,_0x47f2x3),this[_0x1bfe[746]]( new mxEventObject(mxEvent.UPDATE_CELL_SIZE,_0x1bfe[246],_0x47f2x2,_0x1bfe[2521],_0x47f2x3))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2457]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2){this[_0x1bfe[251]][_0x1bfe[473]]();try{var _0x47f2x4=this[_0x1bfe[2519]](_0x47f2x2),_0x47f2x5=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2);if(null!= _0x47f2x4&& null!= _0x47f2x5){var _0x47f2x9=this[_0x1bfe[1742]](_0x47f2x2),_0x47f2x5=_0x47f2x5[_0x1bfe[238]]();if(this[_0x1bfe[1730]](_0x47f2x2)){var _0x47f2xa=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2),_0x47f2x12=null!= _0x47f2xa?_0x47f2xa[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2),_0x47f2x13=this[_0x1bfe[251]][_0x1bfe[474]](_0x47f2x2);null== _0x47f2x13&& (_0x47f2x13= _0x1bfe[110]);mxUtils[_0x1bfe[433]](_0x47f2x12,mxConstants.STYLE_HORIZONTAL,!0)?(_0x47f2x13= mxUtils[_0x1bfe[475]](_0x47f2x13,mxConstants.STYLE_STARTSIZE,_0x47f2x4[_0x1bfe[119]]+ 8),_0x47f2x9&& (_0x47f2x5[_0x1bfe[119]]= _0x47f2x4[_0x1bfe[119]]+ 8),_0x47f2x5[_0x1bfe[117]]= _0x47f2x4[_0x1bfe[117]]):(_0x47f2x13= mxUtils[_0x1bfe[475]](_0x47f2x13,mxConstants.STYLE_STARTSIZE,_0x47f2x4[_0x1bfe[117]]+ 8),_0x47f2x9&& (_0x47f2x5[_0x1bfe[117]]= _0x47f2x4[_0x1bfe[117]]+ 8),_0x47f2x5[_0x1bfe[119]]= _0x47f2x4[_0x1bfe[119]]);this[_0x1bfe[251]][_0x1bfe[475]](_0x47f2x2,_0x47f2x13)}else {_0x47f2x5[_0x1bfe[117]]= _0x47f2x4[_0x1bfe[117]],_0x47f2x5[_0x1bfe[119]]= _0x47f2x4[_0x1bfe[119]]};if(!_0x47f2x3&& !_0x47f2x9){var _0x47f2x14=this[_0x1bfe[441]][_0x1bfe[1799]](this[_0x1bfe[251]][_0x1bfe[1953]](_0x47f2x2));if(null!= _0x47f2x14){var _0x47f2x15=this[_0x1bfe[441]][_0x1bfe[513]],_0x47f2x16=this[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x17=(_0x47f2x14[_0x1bfe[236]]+ _0x47f2x14[_0x1bfe[119]])/ _0x47f2x16- _0x47f2x5[_0x1bfe[236]]- _0x47f2x15[_0x1bfe[236]];_0x47f2x5[_0x1bfe[117]]= Math[_0x1bfe[160]](_0x47f2x5[_0x1bfe[117]],(_0x47f2x14[_0x1bfe[235]]+ _0x47f2x14[_0x1bfe[117]])/ _0x47f2x16- _0x47f2x5[_0x1bfe[235]]- _0x47f2x15[_0x1bfe[235]]);_0x47f2x5[_0x1bfe[119]]= Math[_0x1bfe[160]](_0x47f2x5[_0x1bfe[119]],_0x47f2x17)}};this[_0x1bfe[837]]([_0x47f2x2],[_0x47f2x5])}}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[2519]]= function(_0x47f2x2){var _0x47f2x3=null;if(null!= _0x47f2x2){var _0x47f2x4=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2),_0x47f2x5=null!= _0x47f2x4?_0x47f2x4[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);if(null!= _0x47f2x5&& !this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2)){var _0x47f2x9=_0x47f2x5[mxConstants[_0x1bfe[2185]]]|| mxConstants[_0x1bfe[483]],_0x47f2xa=0,_0x47f2x3=0;if((null!= this[_0x1bfe[1202]](_0x47f2x4)|| null!= _0x47f2x5[mxConstants[_0x1bfe[2484]]])&& _0x47f2x5[mxConstants[_0x1bfe[2059]]]== mxConstants[_0x1bfe[2522]]){_0x47f2x5[mxConstants[_0x1bfe[2063]]]== mxConstants[_0x1bfe[481]]&& (_0x47f2xa+= parseFloat(_0x47f2x5[mxConstants[_0x1bfe[2523]]])|| mxLabel[_0x1bfe[202]][_0x1bfe[1680]]),_0x47f2x5[mxConstants[_0x1bfe[2064]]]!= mxConstants[_0x1bfe[479]]&& (_0x47f2x3+= parseFloat(_0x47f2x5[mxConstants[_0x1bfe[2524]]])|| mxLabel[_0x1bfe[202]][_0x1bfe[1680]])};_0x47f2xa+= 2* (_0x47f2x5[mxConstants[_0x1bfe[2143]]]|| 0);_0x47f2xa+= _0x47f2x5[mxConstants[_0x1bfe[2147]]]|| 0;_0x47f2xa+= _0x47f2x5[mxConstants[_0x1bfe[2145]]]|| 0;_0x47f2x3+= 2* (_0x47f2x5[mxConstants[_0x1bfe[2143]]]|| 0);_0x47f2x3+= _0x47f2x5[mxConstants[_0x1bfe[2144]]]|| 0;_0x47f2x3+= _0x47f2x5[mxConstants[_0x1bfe[2146]]]|| 0;_0x47f2x4= this[_0x1bfe[2205]](_0x47f2x4);null!= _0x47f2x4&& (_0x47f2xa+= _0x47f2x4[_0x1bfe[117]]+ 8);_0x47f2x4= this[_0x1bfe[2183]](_0x47f2x2);null!= _0x47f2x4&& 0< _0x47f2x4[_0x1bfe[67]]?(this[_0x1bfe[2186]](_0x47f2x2)|| (_0x47f2x4= _0x47f2x4[_0x1bfe[230]](/\n/g,_0x1bfe[545])),_0x47f2x9= mxUtils[_0x1bfe[2525]](_0x47f2x4,_0x47f2x9,_0x47f2x5[mxConstants[_0x1bfe[2188]]]),_0x47f2x2= _0x47f2x9[_0x1bfe[117]]+ _0x47f2xa,_0x47f2x3= _0x47f2x9[_0x1bfe[119]]+ _0x47f2x3,mxUtils[_0x1bfe[433]](_0x47f2x5,mxConstants.STYLE_HORIZONTAL,!0)|| (_0x47f2x5= _0x47f2x3,_0x47f2x3= _0x47f2x2,_0x47f2x2= _0x47f2x5),this[_0x1bfe[991]]&& (_0x47f2x2= this[_0x1bfe[1021]](_0x47f2x2+ this[_0x1bfe[1020]]/ 2),_0x47f2x3= this[_0x1bfe[1021]](_0x47f2x3+ this[_0x1bfe[1020]]/ 2)),_0x47f2x3= new mxRectangle(0,0,_0x47f2x2,_0x47f2x3)):(_0x47f2x5= 4* this[_0x1bfe[1020]],_0x47f2x3= new mxRectangle(0,0,_0x47f2x5,_0x47f2x5))}};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[2216]]= function(_0x47f2x2,_0x47f2x3){if(0.2< Math[_0x1bfe[425]](1- _0x47f2x3[_0x1bfe[255]])){var _0x47f2x4=this[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x5=this[_0x1bfe[441]][_0x1bfe[513]],_0x47f2x9=_0x47f2x2[_0x1bfe[117]]* _0x47f2x3[_0x1bfe[255]],_0x47f2xa=_0x47f2x2[_0x1bfe[119]]* _0x47f2x3[_0x1bfe[255]],_0x47f2x12=_0x47f2x2[_0x1bfe[236]]- (_0x47f2xa- _0x47f2x2[_0x1bfe[119]])/ 2,_0x47f2x4= new mxRectangle(this[_0x1bfe[1021]]((_0x47f2x2[_0x1bfe[235]]- (_0x47f2x9- _0x47f2x2[_0x1bfe[117]])/ 2)/ _0x47f2x4)- _0x47f2x5[_0x1bfe[235]],this[_0x1bfe[1021]](_0x47f2x12/ _0x47f2x4)- _0x47f2x5[_0x1bfe[236]],this[_0x1bfe[1021]](_0x47f2x9/ _0x47f2x4),this[_0x1bfe[1021]](_0x47f2xa/ _0x47f2x4));this[_0x1bfe[2526]](_0x47f2x2[_0x1bfe[246]],_0x47f2x4)}};mxGraph[_0x1bfe[202]][_0x1bfe[2526]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[836]]([_0x47f2x2],[_0x47f2x3])[0]};mxGraph[_0x1bfe[202]][_0x1bfe[836]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[251]][_0x1bfe[473]]();try{this[_0x1bfe[837]](_0x47f2x2,_0x47f2x3),this[_0x1bfe[746]]( new mxEventObject(mxEvent.RESIZE_CELLS,_0x1bfe[895],_0x47f2x2,_0x1bfe[1562],_0x47f2x3))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[837]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2&& null!= _0x47f2x3&& _0x47f2x2[_0x1bfe[67]]== _0x47f2x3[_0x1bfe[67]]){this[_0x1bfe[251]][_0x1bfe[473]]();try{for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){var _0x47f2x5=_0x47f2x3[_0x47f2x4],_0x47f2x9=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2[_0x47f2x4]);if(null!= _0x47f2x9&& (_0x47f2x9[_0x1bfe[235]]!= _0x47f2x5[_0x1bfe[235]]|| _0x47f2x9[_0x1bfe[236]]!= _0x47f2x5[_0x1bfe[236]]|| _0x47f2x9[_0x1bfe[117]]!= _0x47f2x5[_0x1bfe[117]]|| _0x47f2x9[_0x1bfe[119]]!= _0x47f2x5[_0x1bfe[119]])){_0x47f2x9= _0x47f2x9[_0x1bfe[238]]();if(_0x47f2x9[_0x1bfe[1500]]){var _0x47f2xa=_0x47f2x9[_0x1bfe[1368]];null!= _0x47f2xa&& (_0x47f2xa[_0x1bfe[235]]+= _0x47f2x5[_0x1bfe[235]]- _0x47f2x9[_0x1bfe[235]],_0x47f2xa[_0x1bfe[236]]+= _0x47f2x5[_0x1bfe[236]]- _0x47f2x9[_0x1bfe[236]])}else {_0x47f2x9[_0x1bfe[235]]= _0x47f2x5[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]]= _0x47f2x5[_0x1bfe[236]]};_0x47f2x9[_0x1bfe[117]]= _0x47f2x5[_0x1bfe[117]];_0x47f2x9[_0x1bfe[119]]= _0x47f2x5[_0x1bfe[119]];!_0x47f2x9[_0x1bfe[1500]]&& (this[_0x1bfe[251]][_0x1bfe[1193]](_0x47f2x2[_0x47f2x4])&& !this[_0x1bfe[2505]]())&& (_0x47f2x9[_0x1bfe[235]]= Math[_0x1bfe[160]](0,_0x47f2x9[_0x1bfe[235]]),_0x47f2x9[_0x1bfe[236]]= Math[_0x1bfe[160]](0,_0x47f2x9[_0x1bfe[236]]));this[_0x1bfe[251]][_0x1bfe[1724]](_0x47f2x2[_0x47f2x4],_0x47f2x9);this[_0x1bfe[2507]](_0x47f2x2[_0x47f2x4])&& this[_0x1bfe[2508]](_0x47f2x2[_0x47f2x4])}};this[_0x1bfe[2399]]&& this[_0x1bfe[1750]](_0x47f2x2);this[_0x1bfe[746]]( new mxEventObject(mxEvent.CELLS_RESIZED,_0x1bfe[895],_0x47f2x2,_0x1bfe[1562],_0x47f2x3))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[2508]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2),_0x47f2x4=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x3);if(null!= _0x47f2x3&& (null!= _0x47f2x4&& !this[_0x1bfe[1742]](_0x47f2x3))&& (_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2),null!= _0x47f2x2&& (_0x47f2x4[_0x1bfe[117]]< _0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]|| _0x47f2x4[_0x1bfe[119]]< _0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]))){_0x47f2x4= _0x47f2x4[_0x1bfe[238]](),_0x47f2x4[_0x1bfe[117]]= Math[_0x1bfe[160]](_0x47f2x4[_0x1bfe[117]],_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]),_0x47f2x4[_0x1bfe[119]]= Math[_0x1bfe[160]](_0x47f2x4[_0x1bfe[119]],_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]),this[_0x1bfe[837]]([_0x47f2x3],[_0x47f2x4])}}};mxGraph[_0x1bfe[202]][_0x1bfe[903]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){return this[_0x1bfe[834]](_0x47f2x2,_0x47f2x3,_0x47f2x4,!0,_0x47f2x5,_0x47f2x9)};mxGraph[_0x1bfe[202]][_0x1bfe[834]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:0;_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:0;_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:!1;if(null!= _0x47f2x2&& (0!= _0x47f2x3|| 0!= _0x47f2x4|| _0x47f2x5|| null!= _0x47f2x9)){this[_0x1bfe[251]][_0x1bfe[473]]();try{_0x47f2x5&& (_0x47f2x2= this[_0x1bfe[899]](_0x47f2x2,this[_0x1bfe[2527]]()),null== _0x47f2x9&& (_0x47f2x9= this[_0x1bfe[902]]()));var _0x47f2x12=this[_0x1bfe[2505]]();null!= _0x47f2x9&& this[_0x1bfe[2528]](!0);this[_0x1bfe[835]](_0x47f2x2,_0x47f2x3,_0x47f2x4,!_0x47f2x5&& this[_0x1bfe[2529]]()&& this[_0x1bfe[2530]](),null== _0x47f2x9);this[_0x1bfe[2528]](_0x47f2x12);if(null!= _0x47f2x9){var _0x47f2x13=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x9);this[_0x1bfe[833]](_0x47f2x2,_0x47f2x9,_0x47f2x13,null,null,!0)};this[_0x1bfe[746]]( new mxEventObject(mxEvent.MOVE_CELLS,_0x1bfe[895],_0x47f2x2,_0x1bfe[1126],_0x47f2x3,_0x1bfe[1125],_0x47f2x4,_0x1bfe[238],_0x47f2x5,_0x1bfe[772],_0x47f2x9,_0x1bfe[763],_0x47f2xa))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[835]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){if(null!= _0x47f2x2&& (0!= _0x47f2x3|| 0!= _0x47f2x4)){this[_0x1bfe[251]][_0x1bfe[473]]();try{_0x47f2x5&& this[_0x1bfe[2531]](_0x47f2x2);for(var _0x47f2xa=0;_0x47f2xa< _0x47f2x2[_0x1bfe[67]];_0x47f2xa++){this[_0x1bfe[2532]](_0x47f2x2[_0x47f2xa],_0x47f2x3,_0x47f2x4),_0x47f2x9&& this[_0x1bfe[2509]](_0x47f2x2[_0x47f2xa])};this[_0x1bfe[2400]]&& this[_0x1bfe[1750]](_0x47f2x2);this[_0x1bfe[746]]( new mxEventObject(mxEvent.CELLS_MOVED,_0x1bfe[895],_0x47f2x2,_0x1bfe[1126],_0x47f2x4,_0x1bfe[1125],_0x47f2x4,_0x1bfe[808],_0x47f2x5))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[2532]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2);null!= _0x47f2x5&& (_0x47f2x5= _0x47f2x5[_0x1bfe[238]](),_0x47f2x5[_0x1bfe[513]](_0x47f2x3,_0x47f2x4),!_0x47f2x5[_0x1bfe[1500]]&& (this[_0x1bfe[251]][_0x1bfe[1193]](_0x47f2x2)&& !this[_0x1bfe[2505]]())&& (_0x47f2x5[_0x1bfe[235]]= Math[_0x1bfe[160]](0,_0x47f2x5[_0x1bfe[235]]),_0x47f2x5[_0x1bfe[236]]= Math[_0x1bfe[160]](0,_0x47f2x5[_0x1bfe[236]])),_0x47f2x5[_0x1bfe[1500]]&& !this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2)&& (null== _0x47f2x5[_0x1bfe[1368]]?_0x47f2x5[_0x1bfe[1368]]= new mxPoint(_0x47f2x3,_0x47f2x4):(_0x47f2x5[_0x1bfe[1368]][_0x1bfe[235]]+= _0x47f2x3,_0x47f2x5[_0x1bfe[1368]][_0x1bfe[236]]+= _0x47f2x4)),this[_0x1bfe[251]][_0x1bfe[1724]](_0x47f2x2,_0x47f2x5))};mxGraph[_0x1bfe[202]][_0x1bfe[2533]]= function(_0x47f2x2){if(null!= _0x47f2x2&& !this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2)){var _0x47f2x3=this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2);if(_0x47f2x3== this[_0x1bfe[902]]()|| _0x47f2x3== this[_0x1bfe[2534]]()){return this[_0x1bfe[2535]]()};if(null!= _0x47f2x3&& _0x47f2x3!= this[_0x1bfe[902]]()){var _0x47f2x4=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x3);if(null!= _0x47f2x4){var _0x47f2x5=_0x47f2x2= 0,_0x47f2x9=_0x47f2x4[_0x1bfe[117]],_0x47f2x4=_0x47f2x4[_0x1bfe[119]];this[_0x1bfe[1730]](_0x47f2x3)&& (_0x47f2x3= this[_0x1bfe[1731]](_0x47f2x3),_0x47f2x2= _0x47f2x3[_0x1bfe[117]],_0x47f2x9-= _0x47f2x3[_0x1bfe[117]],_0x47f2x5= _0x47f2x3[_0x1bfe[119]],_0x47f2x4-= _0x47f2x3[_0x1bfe[119]]);return new mxRectangle(_0x47f2x2,_0x47f2x5,_0x47f2x9,_0x47f2x4)}}};return null};mxGraph[_0x1bfe[202]][_0x1bfe[2535]]= function(){return this[_0x1bfe[2385]]};mxGraph[_0x1bfe[202]][_0x1bfe[2509]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2),_0x47f2x4=this[_0x1bfe[2536]](_0x47f2x2)?this[_0x1bfe[2533]](_0x47f2x2):this[_0x1bfe[2535]]();if(null!= _0x47f2x3&& null!= _0x47f2x4&& !_0x47f2x3[_0x1bfe[1500]]&& (_0x47f2x3[_0x1bfe[235]]< _0x47f2x4[_0x1bfe[235]]|| _0x47f2x3[_0x1bfe[236]]< _0x47f2x4[_0x1bfe[236]]|| _0x47f2x4[_0x1bfe[117]]< _0x47f2x3[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[117]]|| _0x47f2x4[_0x1bfe[119]]< _0x47f2x3[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[119]])){_0x47f2x2= this[_0x1bfe[2537]](_0x47f2x2),0< _0x47f2x4[_0x1bfe[117]]&& (_0x47f2x3[_0x1bfe[235]]= Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[235]],_0x47f2x4[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[117]]- (1- _0x47f2x2)* _0x47f2x3[_0x1bfe[117]])),0< _0x47f2x4[_0x1bfe[119]]&& (_0x47f2x3[_0x1bfe[236]]= Math[_0x1bfe[243]](_0x47f2x3[_0x1bfe[236]],_0x47f2x4[_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[119]]- (1- _0x47f2x2)* _0x47f2x3[_0x1bfe[119]])),_0x47f2x3[_0x1bfe[235]]= Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[235]],_0x47f2x4[_0x1bfe[235]]- _0x47f2x3[_0x1bfe[117]]* _0x47f2x2),_0x47f2x3[_0x1bfe[236]]= Math[_0x1bfe[160]](_0x47f2x3[_0x1bfe[236]],_0x47f2x4[_0x1bfe[236]]- _0x47f2x3[_0x1bfe[119]]* _0x47f2x2)}}};mxGraph[_0x1bfe[202]][_0x1bfe[1750]]= function(_0x47f2x2){if(null!= _0x47f2x2){for(var _0x47f2x3={},_0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){var _0x47f2x5=mxCellPath[_0x1bfe[385]](_0x47f2x2[_0x47f2x4]);_0x47f2x3[_0x47f2x5]= _0x47f2x2[_0x47f2x4]};this[_0x1bfe[251]][_0x1bfe[473]]();try{for(_0x47f2x4= 0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){var _0x47f2x9=this[_0x1bfe[251]][_0x1bfe[264]](_0x47f2x2[_0x47f2x4]);if(null!= _0x47f2x9){for(_0x47f2x5= 0;_0x47f2x5< _0x47f2x9[_0x1bfe[67]];_0x47f2x5++){var _0x47f2xa=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x9[_0x47f2x5]),_0x47f2x12=null!= _0x47f2xa?_0x47f2xa[_0x1bfe[1710]](!0):this[_0x1bfe[441]][_0x1bfe[1710]](_0x47f2x9[_0x47f2x5],!0),_0x47f2x13=null!= _0x47f2xa?_0x47f2xa[_0x1bfe[1710]](!1):this[_0x1bfe[441]][_0x1bfe[1710]](_0x47f2x9[_0x47f2x5],!1),_0x47f2x14=mxCellPath[_0x1bfe[385]](_0x47f2x12),_0x47f2x15=mxCellPath[_0x1bfe[385]](_0x47f2x13);(null== _0x47f2x3[_0x47f2x14]|| null== _0x47f2x3[_0x47f2x15])&& this[_0x1bfe[1809]](_0x47f2x9[_0x47f2x5])}};this[_0x1bfe[1750]](this[_0x1bfe[251]][_0x1bfe[1953]](_0x47f2x2[_0x47f2x4]))}}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[1809]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2);null!= _0x47f2x3&& (null!= _0x47f2x3[_0x1bfe[1525]]&& 0< _0x47f2x3[_0x1bfe[1525]][_0x1bfe[67]])&& (_0x47f2x3= _0x47f2x3[_0x1bfe[238]](),_0x47f2x3[_0x1bfe[1525]]= [],this[_0x1bfe[251]][_0x1bfe[1724]](_0x47f2x2,_0x47f2x3));return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2538]]= function(_0x47f2x2,_0x47f2x3){return null!= _0x47f2x2&& null!= _0x47f2x2[_0x1bfe[253]]&& null!= _0x47f2x2[_0x1bfe[253]][_0x1bfe[1561]]?_0x47f2x2[_0x1bfe[253]][_0x1bfe[1561]][_0x1bfe[1531]]:null};mxGraph[_0x1bfe[202]][_0x1bfe[2288]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= null;var _0x47f2x5=_0x47f2x2[_0x1bfe[124]][_0x47f2x4?mxConstants[_0x1bfe[2539]]:mxConstants[_0x1bfe[2540]]];if(null!= _0x47f2x5){var _0x47f2x9=_0x47f2x2[_0x1bfe[124]][_0x47f2x4?mxConstants[_0x1bfe[2541]]:mxConstants[_0x1bfe[2542]]];null!= _0x47f2x9&& (_0x47f2x3= new mxPoint(parseFloat(_0x47f2x5),parseFloat(_0x47f2x9)))};_0x47f2x5= !1;null!= _0x47f2x3&& (_0x47f2x5= mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],_0x47f2x4?mxConstants[_0x1bfe[2543]]:mxConstants[_0x1bfe[2544]],!0));return new mxConnectionConstraint(_0x47f2x3,_0x47f2x5)};mxGraph[_0x1bfe[202]][_0x1bfe[2545]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x5){this[_0x1bfe[251]][_0x1bfe[473]]();try{null== _0x47f2x5|| null== _0x47f2x5[_0x1bfe[2546]]?(this[_0x1bfe[1717]](_0x47f2x4?mxConstants[_0x1bfe[2539]]:mxConstants[_0x1bfe[2540]],null,[_0x47f2x2]),this[_0x1bfe[1717]](_0x47f2x4?mxConstants[_0x1bfe[2541]]:mxConstants[_0x1bfe[2542]],null,[_0x47f2x2]),this[_0x1bfe[1717]](_0x47f2x4?mxConstants[_0x1bfe[2543]]:mxConstants[_0x1bfe[2544]],null,[_0x47f2x2])):null!= _0x47f2x5[_0x1bfe[2546]]&& (this[_0x1bfe[1717]](_0x47f2x4?mxConstants[_0x1bfe[2539]]:mxConstants[_0x1bfe[2540]],_0x47f2x5[_0x1bfe[2546]][_0x1bfe[235]],[_0x47f2x2]),this[_0x1bfe[1717]](_0x47f2x4?mxConstants[_0x1bfe[2541]]:mxConstants[_0x1bfe[2542]],_0x47f2x5[_0x1bfe[2546]][_0x1bfe[236]],[_0x47f2x2]),_0x47f2x5[_0x1bfe[591]]?this[_0x1bfe[1717]](_0x47f2x4?mxConstants[_0x1bfe[2543]]:mxConstants[_0x1bfe[2544]],null,[_0x47f2x2]):this[_0x1bfe[1717]](_0x47f2x4?mxConstants[_0x1bfe[2543]]:mxConstants[_0x1bfe[2544]],_0x1bfe[468],[_0x47f2x2]))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[2290]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=null;if(null!= _0x47f2x2){var _0x47f2x5=this[_0x1bfe[441]][_0x1bfe[2087]](_0x47f2x2),_0x47f2x9= new mxPoint(_0x47f2x5[_0x1bfe[241]](),_0x47f2x5[_0x1bfe[242]]()),_0x47f2xa=_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2011]]],_0x47f2x12=0;if(null!= _0x47f2xa&& (_0x1bfe[700]== _0x47f2xa?_0x47f2x12+= 270:_0x1bfe[703]== _0x47f2xa?_0x47f2x12+= 180:_0x1bfe[701]== _0x47f2xa&& (_0x47f2x12+= 90),_0x1bfe[700]== _0x47f2xa|| _0x1bfe[701]== _0x47f2xa)){_0x47f2x5[_0x1bfe[235]]+= _0x47f2x5[_0x1bfe[117]]/ 2- _0x47f2x5[_0x1bfe[119]]/ 2;_0x47f2x5[_0x1bfe[236]]+= _0x47f2x5[_0x1bfe[119]]/ 2- _0x47f2x5[_0x1bfe[117]]/ 2;var _0x47f2x13=_0x47f2x5[_0x1bfe[117]];_0x47f2x5[_0x1bfe[117]]= _0x47f2x5[_0x1bfe[119]];_0x47f2x5[_0x1bfe[119]]= _0x47f2x13};if(null!= _0x47f2x3[_0x1bfe[2546]]){var _0x47f2x14=_0x47f2x4= 1,_0x47f2x15=0,_0x47f2x16=0;if(this[_0x1bfe[502]]()[_0x1bfe[1193]](_0x47f2x2[_0x1bfe[246]])){var _0x47f2x17=_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2547]]],_0x47f2x18=_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2548]]];null!= _0x47f2x2[_0x1bfe[253]][_0x1bfe[1561]]&& (_0x47f2x17= 1== mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],_0x1bfe[1607],0)|| _0x47f2x17,_0x47f2x18= 1== mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],_0x1bfe[1608],0)|| _0x47f2x18);if(_0x1bfe[700]== _0x47f2xa|| _0x1bfe[701]== _0x47f2xa){_0x47f2x13= _0x47f2x17,_0x47f2x17= _0x47f2x18,_0x47f2x18= _0x47f2x13};_0x47f2x17&& (_0x47f2x4= -1,_0x47f2x15= -_0x47f2x5[_0x1bfe[117]]);_0x47f2x18&& (_0x47f2x14= -1,_0x47f2x16= -_0x47f2x5[_0x1bfe[119]])};_0x47f2x4= new mxPoint(_0x47f2x5[_0x1bfe[235]]+ _0x47f2x3[_0x1bfe[2546]][_0x1bfe[235]]* _0x47f2x5[_0x1bfe[117]]* _0x47f2x4- _0x47f2x15,_0x47f2x5[_0x1bfe[236]]+ _0x47f2x3[_0x1bfe[2546]][_0x1bfe[236]]* _0x47f2x5[_0x1bfe[119]]* _0x47f2x14- _0x47f2x16)};_0x47f2xa= _0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| 0;_0x47f2x3[_0x1bfe[591]]?(0!= _0x47f2x12&& null!= _0x47f2x4&& (_0x47f2x13= _0x47f2x5= 0,90== _0x47f2x12?_0x47f2x13= 1:180== _0x47f2x12?_0x47f2x5= -1:270== _0x47f2xa&& (_0x47f2x13= -1),_0x47f2x4= mxUtils[_0x1bfe[432]](_0x47f2x4,_0x47f2x5,_0x47f2x13,_0x47f2x9)),null!= _0x47f2x4&& _0x47f2x3[_0x1bfe[591]]&& (_0x47f2x4= this[_0x1bfe[441]][_0x1bfe[2302]](_0x47f2x2,_0x47f2x4,!1))):_0x47f2xa+= _0x47f2x12;0!= _0x47f2xa&& null!= _0x47f2x4&& (_0x47f2x12= mxUtils[_0x1bfe[431]](_0x47f2xa),_0x47f2x5= Math[_0x1bfe[426]](_0x47f2x12),_0x47f2x13= Math[_0x1bfe[427]](_0x47f2x12),_0x47f2x4= mxUtils[_0x1bfe[432]](_0x47f2x4,_0x47f2x5,_0x47f2x13,_0x47f2x9))};return _0x47f2x4};mxGraph[_0x1bfe[202]][_0x1bfe[851]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[251]][_0x1bfe[473]]();try{var _0x47f2x9=this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2,_0x47f2x4);this[_0x1bfe[852]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5);this[_0x1bfe[746]]( new mxEventObject(mxEvent.CONNECT_CELL,_0x1bfe[1989],_0x47f2x2,_0x1bfe[1984],_0x47f2x3,_0x1bfe[1097],_0x47f2x4,_0x1bfe[257],_0x47f2x9))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[852]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x2){this[_0x1bfe[251]][_0x1bfe[473]]();try{var _0x47f2x9=this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2,_0x47f2x4);this[_0x1bfe[2545]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5);this[_0x1bfe[2549]]()&& (_0x47f2x5= null,this[_0x1bfe[1908]](_0x47f2x3)&& (_0x47f2x5= _0x47f2x3[_0x1bfe[1103]](),_0x47f2x3= this[_0x1bfe[2550]](_0x47f2x3,_0x47f2x4)),this[_0x1bfe[1717]](_0x47f2x4?mxConstants[_0x1bfe[2303]]:mxConstants[_0x1bfe[2304]],_0x47f2x5,[_0x47f2x2]));this[_0x1bfe[251]][_0x1bfe[1957]](_0x47f2x2,_0x47f2x3,_0x47f2x4);this[_0x1bfe[2401]]&& this[_0x1bfe[1809]](_0x47f2x2);this[_0x1bfe[746]]( new mxEventObject(mxEvent.CELL_CONNECTED,_0x1bfe[1989],_0x47f2x2,_0x1bfe[1984],_0x47f2x3,_0x1bfe[1097],_0x47f2x4,_0x1bfe[257],_0x47f2x9))}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[2531]]= function(_0x47f2x2){if(null!= _0x47f2x2){this[_0x1bfe[251]][_0x1bfe[473]]();try{for(var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x4=this[_0x1bfe[441]][_0x1bfe[513]],_0x47f2x5={},_0x47f2x9=0;_0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9++){var _0x47f2xa=mxCellPath[_0x1bfe[385]](_0x47f2x2[_0x47f2x9]);_0x47f2x5[_0x47f2xa]= _0x47f2x2[_0x47f2x9]};for(_0x47f2x9= 0;_0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9++){if(this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2[_0x47f2x9])){var _0x47f2x12=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2[_0x47f2x9]);if(null!= _0x47f2x12){var _0x47f2x13=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2[_0x47f2x9]),_0x47f2x14=this[_0x1bfe[441]][_0x1bfe[248]](this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2[_0x47f2x9]));if(null!= _0x47f2x13&& null!= _0x47f2x14){var _0x47f2x12=_0x47f2x12[_0x1bfe[238]](),_0x47f2x15=-_0x47f2x14[_0x1bfe[2078]][_0x1bfe[235]],_0x47f2x16=-_0x47f2x14[_0x1bfe[2078]][_0x1bfe[236]],_0x47f2x17=_0x47f2x13[_0x1bfe[439]],_0x47f2x18=this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2[_0x47f2x9],!0);if(null!= _0x47f2x18&& this[_0x1bfe[2551]](_0x47f2x2[_0x47f2x9],_0x47f2x18,!0)){for(var _0x47f2x19=mxCellPath[_0x1bfe[385]](_0x47f2x18);null!= _0x47f2x18&& null== _0x47f2x5[_0x47f2x19];){_0x47f2x18= this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x18),_0x47f2x19= mxCellPath[_0x1bfe[385]](_0x47f2x18)};null== _0x47f2x18&& (_0x47f2x12[_0x1bfe[2007]]( new mxPoint(_0x47f2x17[0][_0x1bfe[235]]/ _0x47f2x3- _0x47f2x4[_0x1bfe[235]]+ _0x47f2x15,_0x47f2x17[0][_0x1bfe[236]]/ _0x47f2x3- _0x47f2x4[_0x1bfe[236]]+ _0x47f2x16),!0),this[_0x1bfe[251]][_0x1bfe[1957]](_0x47f2x2[_0x47f2x9],null,!0))};var _0x47f2x1a=this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2[_0x47f2x9],!1);if(null!= _0x47f2x1a&& this[_0x1bfe[2551]](_0x47f2x2[_0x47f2x9],_0x47f2x1a,!1)){for(var _0x47f2x1b=mxCellPath[_0x1bfe[385]](_0x47f2x1a);null!= _0x47f2x1a&& null== _0x47f2x5[_0x47f2x1b];){_0x47f2x1a= this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x1a),_0x47f2x1b= mxCellPath[_0x1bfe[385]](_0x47f2x1a)};if(null== _0x47f2x1a){var _0x47f2x1c=_0x47f2x17[_0x1bfe[67]]- 1;_0x47f2x12[_0x1bfe[2007]]( new mxPoint(_0x47f2x17[_0x47f2x1c][_0x1bfe[235]]/ _0x47f2x3- _0x47f2x4[_0x1bfe[235]]+ _0x47f2x15,_0x47f2x17[_0x47f2x1c][_0x1bfe[236]]/ _0x47f2x3- _0x47f2x4[_0x1bfe[236]]+ _0x47f2x16),!1);this[_0x1bfe[251]][_0x1bfe[1957]](_0x47f2x2[_0x47f2x9],null,!1)}};this[_0x1bfe[251]][_0x1bfe[1724]](_0x47f2x2[_0x47f2x9],_0x47f2x12)}}}}}finally{this[_0x1bfe[251]][_0x1bfe[476]]()}}};mxGraph[_0x1bfe[202]][_0x1bfe[2534]]= function(){return this[_0x1bfe[441]][_0x1bfe[1741]]};mxGraph[_0x1bfe[202]][_0x1bfe[2326]]= function(_0x47f2x2){return null};mxGraph[_0x1bfe[202]][_0x1bfe[1908]]= function(_0x47f2x2){return !1};mxGraph[_0x1bfe[202]][_0x1bfe[2550]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2280]]= function(_0x47f2x2){return null};mxGraph[_0x1bfe[202]][_0x1bfe[2552]]= function(_0x47f2x2){_0x47f2x2= _0x47f2x2|| this[_0x1bfe[2452]]();null!= _0x47f2x2&& this[_0x1bfe[2553]](_0x47f2x2)&& (this[_0x1bfe[441]][_0x1bfe[2257]](_0x47f2x2),this[_0x1bfe[2440]]())};mxGraph[_0x1bfe[202]][_0x1bfe[2554]]= function(){var _0x47f2x2=this[_0x1bfe[251]][_0x1bfe[501]](),_0x47f2x3=this[_0x1bfe[2534]]();if(null!= _0x47f2x3){for(var _0x47f2x4=this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x3);_0x47f2x4!= _0x47f2x2&& !this[_0x1bfe[2553]](_0x47f2x4)&& this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x4)!= _0x47f2x2;){_0x47f2x4= this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x4)};_0x47f2x4== _0x47f2x2|| this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x4)== _0x47f2x2?this[_0x1bfe[441]][_0x1bfe[2257]](null):this[_0x1bfe[441]][_0x1bfe[2257]](_0x47f2x4);null!= this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x3)&& this[_0x1bfe[2450]](_0x47f2x3)}};mxGraph[_0x1bfe[202]][_0x1bfe[2442]]= function(){var _0x47f2x2=this[_0x1bfe[2534]]();null!= _0x47f2x2&& (this[_0x1bfe[441]][_0x1bfe[2257]](null),null!= this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2)&& this[_0x1bfe[2450]](_0x47f2x2))};mxGraph[_0x1bfe[202]][_0x1bfe[2553]]= function(_0x47f2x2){return null!= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[517]]= function(){return this[_0x1bfe[441]][_0x1bfe[517]]()};mxGraph[_0x1bfe[202]][_0x1bfe[2555]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=[_0x47f2x2];_0x47f2x3&& (_0x47f2x5= _0x47f2x5[_0x1bfe[1919]](this[_0x1bfe[251]][_0x1bfe[264]](_0x47f2x2)));_0x47f2x5= this[_0x1bfe[441]][_0x1bfe[1799]](_0x47f2x5);if(_0x47f2x4){_0x47f2x4= this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2);for(var _0x47f2x9=0;_0x47f2x9< _0x47f2x4;_0x47f2x9++){var _0x47f2xa=this[_0x1bfe[2555]](this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x2,_0x47f2x9),_0x47f2x3,!0);null!= _0x47f2x5?_0x47f2x5[_0x1bfe[99]](_0x47f2xa):_0x47f2x5= _0x47f2xa}};return _0x47f2x5};mxGraph[_0x1bfe[202]][_0x1bfe[1729]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!1;var _0x47f2x4=null;if(null!= _0x47f2x2){for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){if(_0x47f2x3|| this[_0x1bfe[251]][_0x1bfe[1193]](_0x47f2x2[_0x47f2x5])){var _0x47f2x9=this[_0x1bfe[1198]](_0x47f2x2[_0x47f2x5]);if(null!= _0x47f2x9){var _0x47f2xa=_0x47f2x9[_0x1bfe[1525]];if(null!= _0x47f2xa&& 0< _0x47f2xa[_0x1bfe[67]]){for(var _0x47f2x12= new mxRectangle(_0x47f2xa[0][_0x1bfe[235]],_0x47f2xa[0][_0x1bfe[236]],0,0),_0x47f2x13=function(_0x47f2x2){null!= _0x47f2x2&& _0x47f2x12[_0x1bfe[99]]( new mxRectangle(_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]],0,0))},_0x47f2x14=1;_0x47f2x14< _0x47f2xa[_0x1bfe[67]];_0x47f2x14++){_0x47f2x13(_0x47f2xa[_0x47f2x14])};_0x47f2x13(_0x47f2x9[_0x1bfe[2006]](!0));_0x47f2x13(_0x47f2x9[_0x1bfe[2006]](!1))};null== _0x47f2x4?_0x47f2x4= new mxRectangle(_0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]],_0x47f2x9[_0x1bfe[117]],_0x47f2x9[_0x1bfe[119]]):_0x47f2x4[_0x1bfe[99]](_0x47f2x9)}}}};return _0x47f2x4};mxGraph[_0x1bfe[202]][_0x1bfe[802]]= function(_0x47f2x2){this[_0x1bfe[441]][_0x1bfe[200]](_0x47f2x2,null== _0x47f2x2);this[_0x1bfe[441]][_0x1bfe[2264]]();this[_0x1bfe[2258]]();this[_0x1bfe[746]]( new mxEventObject(mxEvent.REFRESH))};mxGraph[_0x1bfe[202]][_0x1bfe[1021]]= function(_0x47f2x2){this[_0x1bfe[991]]&& (_0x47f2x2= Math[_0x1bfe[488]](_0x47f2x2/ this[_0x1bfe[1020]])* this[_0x1bfe[1020]]);return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[1135]]= function(_0x47f2x2,_0x47f2x3){if(this[_0x1bfe[2365]]&& mxUtils[_0x1bfe[1134]](this[_0x1bfe[526]])){this[_0x1bfe[526]][_0x1bfe[360]]= -_0x47f2x2,this[_0x1bfe[526]][_0x1bfe[190]]= -_0x47f2x3}else {var _0x47f2x4=this[_0x1bfe[441]][_0x1bfe[2051]]();if(this[_0x1bfe[507]]== mxConstants[_0x1bfe[508]]){if(0== _0x47f2x2&& 0== _0x47f2x3){if(mxClient[_0x1bfe[80]]?_0x47f2x4[_0x1bfe[57]](_0x1bfe[535],_0x1bfe[536]+ _0x47f2x2+ _0x1bfe[537]+ _0x47f2x3+ _0x1bfe[460]):_0x47f2x4[_0x1bfe[1390]](_0x1bfe[535]),null!= this[_0x1bfe[2556]]){for(var _0x47f2x5=this[_0x1bfe[2556]][_0x1bfe[285]];null!= _0x47f2x5;){var _0x47f2x9=_0x47f2x5[_0x1bfe[287]];this[_0x1bfe[526]][_0x1bfe[62]](_0x47f2x5);_0x47f2x5= _0x47f2x9};this[_0x1bfe[2556]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[2556]]);this[_0x1bfe[2556]]= null;this[_0x1bfe[526]][_0x1bfe[62]](_0x47f2x4[_0x1bfe[265]]);for(_0x47f2x5= this[_0x1bfe[2557]][_0x1bfe[285]];null!= _0x47f2x5;){_0x47f2x9= _0x47f2x5[_0x1bfe[287]],this[_0x1bfe[526]][_0x1bfe[62]](_0x47f2x5),_0x47f2x5= _0x47f2x9};this[_0x1bfe[2557]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[2557]]);this[_0x1bfe[2557]]= null}}else {_0x47f2x4[_0x1bfe[57]](_0x1bfe[535],_0x1bfe[536]+ _0x47f2x2+ _0x1bfe[537]+ _0x47f2x3+ _0x1bfe[460]);if(null== this[_0x1bfe[2556]]){this[_0x1bfe[2556]]= document[_0x1bfe[55]](_0x1bfe[485]);this[_0x1bfe[2556]][_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];this[_0x1bfe[2556]][_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[189];this[_0x1bfe[2557]]= document[_0x1bfe[55]](_0x1bfe[485]);this[_0x1bfe[2557]][_0x1bfe[124]][_0x1bfe[491]]= _0x1bfe[492];this[_0x1bfe[2557]][_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[189];for(var _0x47f2xa=this[_0x1bfe[2556]],_0x47f2x5=this[_0x1bfe[526]][_0x1bfe[285]];null!= _0x47f2x5;){_0x47f2x9= _0x47f2x5[_0x1bfe[287]],_0x47f2x5!= _0x47f2x4[_0x1bfe[265]]?_0x47f2xa[_0x1bfe[62]](_0x47f2x5):_0x47f2xa= this[_0x1bfe[2557]],_0x47f2x5= _0x47f2x9};this[_0x1bfe[526]][_0x1bfe[950]](this[_0x1bfe[2556]],_0x47f2x4[_0x1bfe[265]]);this[_0x1bfe[526]][_0x1bfe[62]](this[_0x1bfe[2557]])};this[_0x1bfe[2556]][_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x2+ _0x1bfe[168];this[_0x1bfe[2556]][_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x3+ _0x1bfe[168];this[_0x1bfe[2557]][_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x2+ _0x1bfe[168];this[_0x1bfe[2557]][_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x3+ _0x1bfe[168]}}else {_0x47f2x4[_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x2+ _0x1bfe[168],_0x47f2x4[_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x3+ _0x1bfe[168]};this[_0x1bfe[1136]]= _0x47f2x2;this[_0x1bfe[1137]]= _0x47f2x3;this[_0x1bfe[746]]( new mxEventObject(mxEvent.PAN))}};mxGraph[_0x1bfe[202]][_0x1bfe[2558]]= function(){this[_0x1bfe[499]](this[_0x1bfe[2395]])};mxGraph[_0x1bfe[202]][_0x1bfe[2559]]= function(){this[_0x1bfe[499]](1/ this[_0x1bfe[2395]])};mxGraph[_0x1bfe[202]][_0x1bfe[2560]]= function(){1== this[_0x1bfe[441]][_0x1bfe[255]]?this[_0x1bfe[441]][_0x1bfe[1147]](0,0):(this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]]= 0,this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]]= 0,this[_0x1bfe[441]][_0x1bfe[2262]](1))};mxGraph[_0x1bfe[202]][_0x1bfe[2561]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[499]](_0x47f2x2/ this[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x3)};mxGraph[_0x1bfe[202]][_0x1bfe[499]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:this[_0x1bfe[2397]];var _0x47f2x4=this[_0x1bfe[441]][_0x1bfe[255]]* _0x47f2x2,_0x47f2x5=this[_0x1bfe[441]][_0x1bfe[248]](this[_0x1bfe[2452]]());if(this[_0x1bfe[2396]]&& null!= _0x47f2x5){_0x47f2x5= new mxRectangle(_0x47f2x5[_0x1bfe[235]]* _0x47f2x2,_0x47f2x5[_0x1bfe[236]]* _0x47f2x2,_0x47f2x5[_0x1bfe[117]]* _0x47f2x2,_0x47f2x5[_0x1bfe[119]]* _0x47f2x2),this[_0x1bfe[441]][_0x1bfe[255]]= _0x47f2x4,this[_0x1bfe[2562]](_0x47f2x5)|| (this[_0x1bfe[441]][_0x1bfe[2259]](),this[_0x1bfe[441]][_0x1bfe[2262]](_0x47f2x4))}else {if(_0x47f2x3&& !mxUtils[_0x1bfe[1134]](this[_0x1bfe[526]])){var _0x47f2x5=this[_0x1bfe[526]][_0x1bfe[359]],_0x47f2x9=this[_0x1bfe[526]][_0x1bfe[167]];if(1< _0x47f2x2){var _0x47f2xa=(_0x47f2x2- 1)/ (2* _0x47f2x4),_0x47f2x5=_0x47f2x5* -_0x47f2xa,_0x47f2x9=_0x47f2x9* -_0x47f2xa}else {_0x47f2xa= (1/ _0x47f2x2- 1)/ (2* this[_0x1bfe[441]][_0x1bfe[255]]),_0x47f2x5*= _0x47f2xa,_0x47f2x9*= _0x47f2xa};this[_0x1bfe[441]][_0x1bfe[829]](_0x47f2x4,this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]]+ _0x47f2x5,this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]]+ _0x47f2x9)}else {this[_0x1bfe[441]][_0x1bfe[2262]](_0x47f2x4),mxUtils[_0x1bfe[1134]](this[_0x1bfe[526]])&& (_0x47f2x9= _0x47f2x5= 0,_0x47f2x3&& (_0x47f2x5= this[_0x1bfe[526]][_0x1bfe[359]]* (_0x47f2x2- 1)/ 2,_0x47f2x9= this[_0x1bfe[526]][_0x1bfe[167]]* (_0x47f2x2- 1)/ 2),this[_0x1bfe[526]][_0x1bfe[360]]= Math[_0x1bfe[488]](this[_0x1bfe[526]][_0x1bfe[360]]* _0x47f2x2+ _0x47f2x5),this[_0x1bfe[526]][_0x1bfe[190]]= Math[_0x1bfe[488]](this[_0x1bfe[526]][_0x1bfe[190]]* _0x47f2x2+ _0x47f2x9))}}};mxGraph[_0x1bfe[202]][_0x1bfe[2563]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[526]][_0x1bfe[159]]/ _0x47f2x2[_0x1bfe[117]]/ (this[_0x1bfe[526]][_0x1bfe[157]]/ _0x47f2x2[_0x1bfe[119]]);_0x47f2x2[_0x1bfe[235]]= Math[_0x1bfe[160]](0,_0x47f2x2[_0x1bfe[235]]);_0x47f2x2[_0x1bfe[236]]= Math[_0x1bfe[160]](0,_0x47f2x2[_0x1bfe[236]]);var _0x47f2x4=Math[_0x1bfe[243]](this[_0x1bfe[526]][_0x1bfe[1526]],_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]),_0x47f2x5=Math[_0x1bfe[243]](this[_0x1bfe[526]][_0x1bfe[191]],_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]);_0x47f2x2[_0x1bfe[117]]= _0x47f2x4- _0x47f2x2[_0x1bfe[235]];_0x47f2x2[_0x1bfe[119]]= _0x47f2x5- _0x47f2x2[_0x1bfe[236]];1> _0x47f2x3?(_0x47f2x3= _0x47f2x2[_0x1bfe[119]]/ _0x47f2x3,_0x47f2x4= (_0x47f2x3- _0x47f2x2[_0x1bfe[119]])/ 2,_0x47f2x2[_0x1bfe[119]]= _0x47f2x3,_0x47f2x3= Math[_0x1bfe[243]](_0x47f2x2[_0x1bfe[236]],_0x47f2x4),_0x47f2x2[_0x1bfe[236]]-= _0x47f2x3,_0x47f2x5= Math[_0x1bfe[243]](this[_0x1bfe[526]][_0x1bfe[191]],_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]),_0x47f2x2[_0x1bfe[119]]= _0x47f2x5- _0x47f2x2[_0x1bfe[236]]):(_0x47f2x3*= _0x47f2x2[_0x1bfe[117]],_0x47f2x4= (_0x47f2x3- _0x47f2x2[_0x1bfe[117]])/ 2,_0x47f2x2[_0x1bfe[117]]= _0x47f2x3,_0x47f2x3= Math[_0x1bfe[243]](_0x47f2x2[_0x1bfe[235]],_0x47f2x4),_0x47f2x2[_0x1bfe[235]]-= _0x47f2x3,_0x47f2x4= Math[_0x1bfe[243]](this[_0x1bfe[526]][_0x1bfe[1526]],_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]),_0x47f2x2[_0x1bfe[117]]= _0x47f2x4- _0x47f2x2[_0x1bfe[235]]);_0x47f2x3= this[_0x1bfe[526]][_0x1bfe[159]]/ _0x47f2x2[_0x1bfe[117]];_0x47f2x4= this[_0x1bfe[441]][_0x1bfe[255]]* _0x47f2x3;mxUtils[_0x1bfe[1134]](this[_0x1bfe[526]])?(this[_0x1bfe[441]][_0x1bfe[2262]](_0x47f2x4),this[_0x1bfe[526]][_0x1bfe[360]]= Math[_0x1bfe[488]](_0x47f2x2[_0x1bfe[235]]* _0x47f2x3),this[_0x1bfe[526]][_0x1bfe[190]]= Math[_0x1bfe[488]](_0x47f2x2[_0x1bfe[236]]* _0x47f2x3)):this[_0x1bfe[441]][_0x1bfe[829]](_0x47f2x4,this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]]- _0x47f2x2[_0x1bfe[235]]/ this[_0x1bfe[441]][_0x1bfe[255]],this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]]- _0x47f2x2[_0x1bfe[236]]/ this[_0x1bfe[441]][_0x1bfe[255]])};mxGraph[_0x1bfe[202]][_0x1bfe[933]]= function(_0x47f2x2,_0x47f2x3){if(null!= this[_0x1bfe[526]]){_0x47f2x2= null!= _0x47f2x2?_0x47f2x2:0;_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!1;var _0x47f2x4=this[_0x1bfe[526]][_0x1bfe[159]],_0x47f2x5=this[_0x1bfe[526]][_0x1bfe[157]],_0x47f2x9=this[_0x1bfe[441]][_0x1bfe[517]]();_0x47f2x3&& (null!= _0x47f2x9[_0x1bfe[235]]&& null!= _0x47f2x9[_0x1bfe[236]])&& (_0x47f2x9[_0x1bfe[117]]+= _0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[119]]+= _0x47f2x9[_0x1bfe[236]],_0x47f2x9[_0x1bfe[235]]= 0,_0x47f2x9[_0x1bfe[236]]= 0);var _0x47f2xa=this[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x12=_0x47f2x9[_0x1bfe[117]]/ _0x47f2xa,_0x47f2x13=_0x47f2x9[_0x1bfe[119]]/ _0x47f2xa;null!= this[_0x1bfe[1617]]&& (_0x47f2x12= Math[_0x1bfe[160]](_0x47f2x12,this[_0x1bfe[1617]][_0x1bfe[117]]- _0x47f2x9[_0x1bfe[235]]/ _0x47f2xa),_0x47f2x13= Math[_0x1bfe[160]](_0x47f2x13,this[_0x1bfe[1617]][_0x1bfe[119]]- _0x47f2x9[_0x1bfe[236]]/ _0x47f2xa));var _0x47f2x14=_0x47f2x3?_0x47f2x2:2* _0x47f2x2,_0x47f2x4=Math[_0x1bfe[519]](100* Math[_0x1bfe[243]](_0x47f2x4/ (_0x47f2x12+ _0x47f2x14),_0x47f2x5/ (_0x47f2x13+ _0x47f2x14)))/ 100;null!= this[_0x1bfe[2413]]&& (_0x47f2x4= Math[_0x1bfe[160]](_0x47f2x4,this[_0x1bfe[2413]]));null!= this[_0x1bfe[2414]]&& (_0x47f2x4= Math[_0x1bfe[243]](_0x47f2x4,this[_0x1bfe[2414]]));_0x47f2x3?this[_0x1bfe[441]][_0x1bfe[255]]!= _0x47f2x4&& this[_0x1bfe[441]][_0x1bfe[2262]](_0x47f2x4):mxUtils[_0x1bfe[1134]](this[_0x1bfe[526]])?(this[_0x1bfe[441]][_0x1bfe[2262]](_0x47f2x4),null!= _0x47f2x9[_0x1bfe[235]]&& (this[_0x1bfe[526]][_0x1bfe[360]]= Math[_0x1bfe[488]](_0x47f2x9[_0x1bfe[235]]/ _0x47f2xa)* _0x47f2x4- _0x47f2x2- Math[_0x1bfe[160]](0,(this[_0x1bfe[526]][_0x1bfe[159]]- _0x47f2x12* _0x47f2x4)/ 2)),null!= _0x47f2x9[_0x1bfe[236]]&& (this[_0x1bfe[526]][_0x1bfe[190]]= Math[_0x1bfe[488]](_0x47f2x9[_0x1bfe[236]]/ _0x47f2xa)* _0x47f2x4- _0x47f2x2- Math[_0x1bfe[160]](0,(this[_0x1bfe[526]][_0x1bfe[157]]- _0x47f2x13* _0x47f2x4)/ 2))):this[_0x1bfe[441]][_0x1bfe[829]](_0x47f2x4,null!= _0x47f2x9[_0x1bfe[235]]?Math[_0x1bfe[519]](this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]]- _0x47f2x9[_0x1bfe[235]]/ _0x47f2xa+ _0x47f2x2+ 1):_0x47f2x2,null!= _0x47f2x9[_0x1bfe[236]]?Math[_0x1bfe[519]](this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]]- _0x47f2x9[_0x1bfe[236]]/ _0x47f2xa+ _0x47f2x2+ 1):_0x47f2x2)};return this[_0x1bfe[441]][_0x1bfe[255]]};mxGraph[_0x1bfe[202]][_0x1bfe[2564]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=-this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]],_0x47f2x5=-this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]],_0x47f2x9=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);null!= _0x47f2x9&& (_0x47f2x4= new mxRectangle(_0x47f2x4+ _0x47f2x9[_0x1bfe[235]],_0x47f2x5+ _0x47f2x9[_0x1bfe[236]],_0x47f2x9[_0x1bfe[117]],_0x47f2x9[_0x1bfe[119]]),_0x47f2x3&& null!= this[_0x1bfe[526]]&& (_0x47f2x5= this[_0x1bfe[526]][_0x1bfe[159]],_0x47f2x9= this[_0x1bfe[526]][_0x1bfe[157]],_0x47f2x4[_0x1bfe[235]]= _0x47f2x4[_0x1bfe[241]]()- _0x47f2x5/ 2,_0x47f2x4[_0x1bfe[117]]= _0x47f2x5,_0x47f2x4[_0x1bfe[236]]= _0x47f2x4[_0x1bfe[242]]()- _0x47f2x9/ 2,_0x47f2x4[_0x1bfe[119]]= _0x47f2x9),this[_0x1bfe[2562]](_0x47f2x4)&& this[_0x1bfe[441]][_0x1bfe[1147]](this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]],this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]]))};mxGraph[_0x1bfe[202]][_0x1bfe[2562]]= function(_0x47f2x2){var _0x47f2x3=!1;if(null!= _0x47f2x2){var _0x47f2x4=this[_0x1bfe[526]][_0x1bfe[359]],_0x47f2x5=this[_0x1bfe[526]][_0x1bfe[167]],_0x47f2x9=Math[_0x1bfe[243]](_0x47f2x4,_0x47f2x2[_0x1bfe[117]]),_0x47f2xa=Math[_0x1bfe[243]](_0x47f2x5,_0x47f2x2[_0x1bfe[119]]);if(mxUtils[_0x1bfe[1134]](this[_0x1bfe[526]])){_0x47f2x4= this[_0x1bfe[526]];_0x47f2x2[_0x1bfe[235]]+= this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]];_0x47f2x2[_0x1bfe[236]]+= this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]];var _0x47f2x12=_0x47f2x4[_0x1bfe[360]]- _0x47f2x2[_0x1bfe[235]],_0x47f2x5=Math[_0x1bfe[160]](_0x47f2x12- _0x47f2x4[_0x1bfe[360]],0);0< _0x47f2x12?_0x47f2x4[_0x1bfe[360]]-= _0x47f2x12+ 2:(_0x47f2x12= _0x47f2x2[_0x1bfe[235]]+ _0x47f2x9- _0x47f2x4[_0x1bfe[360]]- _0x47f2x4[_0x1bfe[159]],0< _0x47f2x12&& (_0x47f2x4[_0x1bfe[360]]+= _0x47f2x12+ 2));_0x47f2x9= _0x47f2x4[_0x1bfe[190]]- _0x47f2x2[_0x1bfe[236]];_0x47f2x12= Math[_0x1bfe[160]](0,_0x47f2x9- _0x47f2x4[_0x1bfe[190]]);0< _0x47f2x9?_0x47f2x4[_0x1bfe[190]]-= _0x47f2x9+ 2:(_0x47f2x9= _0x47f2x2[_0x1bfe[236]]+ _0x47f2xa- _0x47f2x4[_0x1bfe[190]]- _0x47f2x4[_0x1bfe[157]],0< _0x47f2x9&& (_0x47f2x4[_0x1bfe[190]]+= _0x47f2x9+ 2));!this[_0x1bfe[2365]]&& (0!= _0x47f2x5|| 0!= _0x47f2x12)&& this[_0x1bfe[441]][_0x1bfe[1147]](_0x47f2x5,_0x47f2x12)}else {var _0x47f2x12=-this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]],_0x47f2x13=-this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]],_0x47f2x14=this[_0x1bfe[441]][_0x1bfe[255]];_0x47f2x2[_0x1bfe[235]]+ _0x47f2x9> _0x47f2x12+ _0x47f2x4&& (this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]]-= (_0x47f2x2[_0x1bfe[235]]+ _0x47f2x9- _0x47f2x4- _0x47f2x12)/ _0x47f2x14,_0x47f2x3= !0);_0x47f2x2[_0x1bfe[236]]+ _0x47f2xa> _0x47f2x13+ _0x47f2x5&& (this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]]-= (_0x47f2x2[_0x1bfe[236]]+ _0x47f2xa- _0x47f2x5- _0x47f2x13)/ _0x47f2x14,_0x47f2x3= !0);_0x47f2x2[_0x1bfe[235]]< _0x47f2x12&& (this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]]+= (_0x47f2x12- _0x47f2x2[_0x1bfe[235]])/ _0x47f2x14,_0x47f2x3= !0);_0x47f2x2[_0x1bfe[236]]< _0x47f2x13&& (this[_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]]+= (_0x47f2x13- _0x47f2x2[_0x1bfe[236]])/ _0x47f2x14,_0x47f2x3= !0);_0x47f2x3&& (this[_0x1bfe[441]][_0x1bfe[802]](),null!= this[_0x1bfe[2432]]&& this[_0x1bfe[2432]][_0x1bfe[802]]())}};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[1198]]= function(_0x47f2x2){return this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[1714]]= function(_0x47f2x2){return this[_0x1bfe[251]][_0x1bfe[174]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[1742]]= function(_0x47f2x2){return this[_0x1bfe[251]][_0x1bfe[1971]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2565]]= function(_0x47f2x2){return this[_0x1bfe[251]][_0x1bfe[1965]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2298]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2566]]];if(null!= _0x47f2x3){return _0x47f2x3};_0x47f2x2= this[_0x1bfe[441]][_0x1bfe[2291]](_0x47f2x2);return _0x47f2x2== mxEdgeStyle[_0x1bfe[2567]]|| _0x47f2x2== mxEdgeStyle[_0x1bfe[2568]]|| _0x47f2x2== mxEdgeStyle[_0x1bfe[2569]]|| _0x47f2x2== mxEdgeStyle[_0x1bfe[2570]]|| _0x47f2x2== mxEdgeStyle[_0x1bfe[2571]]|| _0x47f2x2== mxEdgeStyle[_0x1bfe[2572]]};mxGraph[_0x1bfe[202]][_0x1bfe[2573]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[2089]](!0);_0x47f2x2= _0x47f2x2[_0x1bfe[2089]](!1);return null!= _0x47f2x3&& _0x47f2x3== _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2574]]= function(_0x47f2x2){return mxEvent[_0x1bfe[775]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2462]]= function(_0x47f2x2){return mxClient[_0x1bfe[2575]]?mxEvent[_0x1bfe[2576]](_0x47f2x2):mxEvent[_0x1bfe[775]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[1018]]= function(_0x47f2x2){return null!= _0x47f2x2&& !mxEvent[_0x1bfe[2577]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2578]]= function(_0x47f2x2){return mxEvent[_0x1bfe[774]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2579]]= function(_0x47f2x2){return mxEvent[_0x1bfe[2577]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2580]]= function(_0x47f2x2){mxUtils[_0x1bfe[150]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2581]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return null== this[_0x1bfe[2500]](_0x47f2x2,_0x47f2x3,_0x47f2x4)};mxGraph[_0x1bfe[202]][_0x1bfe[2500]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(null!= _0x47f2x2&& !this[_0x1bfe[2530]]()&& (null== _0x47f2x3|| null== _0x47f2x4)){return _0x1bfe[110]};if(null!= _0x47f2x2&& null== this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2,!0)&& null== this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2,!1)){return null};if(!this[_0x1bfe[2402]]&& _0x47f2x3== _0x47f2x4&& null!= _0x47f2x3|| !this[_0x1bfe[2582]](_0x47f2x3,_0x47f2x4)){return _0x1bfe[110]};if(null!= _0x47f2x3&& null!= _0x47f2x4){var _0x47f2x5=_0x1bfe[110];if(!this[_0x1bfe[2404]]){var _0x47f2x9=this[_0x1bfe[251]][_0x1bfe[1781]](_0x47f2x3,_0x47f2x4,!0);if(1< _0x47f2x9[_0x1bfe[67]]|| 1== _0x47f2x9[_0x1bfe[67]]&& _0x47f2x9[0]!= _0x47f2x2){_0x47f2x5+= (mxResources[_0x1bfe[203]](this[_0x1bfe[2421]])|| this[_0x1bfe[2421]])+ _0x1bfe[192]}};var _0x47f2x9=this[_0x1bfe[251]][_0x1bfe[1962]](_0x47f2x3,!0,_0x47f2x2),_0x47f2xa=this[_0x1bfe[251]][_0x1bfe[1962]](_0x47f2x4,!1,_0x47f2x2);if(null!= this[_0x1bfe[2335]]){for(var _0x47f2x12=0;_0x47f2x12< this[_0x1bfe[2335]][_0x1bfe[67]];_0x47f2x12++){var _0x47f2x13=this[_0x1bfe[2335]][_0x47f2x12][_0x1bfe[2583]](this,_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x9,_0x47f2xa);null!= _0x47f2x13&& (_0x47f2x5+= _0x47f2x13)}};_0x47f2x13= this[_0x1bfe[2584]](_0x47f2x2,_0x47f2x3,_0x47f2x4);null!= _0x47f2x13&& (_0x47f2x5+= _0x47f2x13);return 0< _0x47f2x5[_0x1bfe[67]]?_0x47f2x5:null};return this[_0x1bfe[2406]]?null:_0x1bfe[110]};mxGraph[_0x1bfe[202]][_0x1bfe[2584]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return null};mxGraph[_0x1bfe[202]][_0x1bfe[2585]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x2= null!= _0x47f2x2?_0x47f2x2:this[_0x1bfe[251]][_0x1bfe[501]]();_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:{};for(var _0x47f2x4=!0,_0x47f2x5=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2),_0x47f2x9=0;_0x47f2x9< _0x47f2x5;_0x47f2x9++){var _0x47f2xa=this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x2,_0x47f2x9),_0x47f2x12=_0x47f2x3;this[_0x1bfe[2553]](_0x47f2xa)&& (_0x47f2x12= {});_0x47f2x12= this[_0x1bfe[2585]](_0x47f2xa,_0x47f2x12);null!= _0x47f2x12?this[_0x1bfe[2447]](_0x47f2xa,_0x47f2x12[_0x1bfe[230]](/\n/g,_0x1bfe[545])):this[_0x1bfe[2447]](_0x47f2xa,null);_0x47f2x4= _0x47f2x4&& null== _0x47f2x12};_0x47f2x5= _0x1bfe[110];this[_0x1bfe[1742]](_0x47f2x2)&& !_0x47f2x4&& (_0x47f2x5+= (mxResources[_0x1bfe[203]](this[_0x1bfe[2423]])|| this[_0x1bfe[2423]])+ _0x1bfe[192]);_0x47f2x5= this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2)?_0x47f2x5+ (this[_0x1bfe[2500]](_0x47f2x2,this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2,!0),this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2,!1))|| _0x1bfe[110]):_0x47f2x5+ (this[_0x1bfe[2586]](_0x47f2x2)|| _0x1bfe[110]);_0x47f2x9= this[_0x1bfe[2587]](_0x47f2x2,_0x47f2x3);null!= _0x47f2x9&& (_0x47f2x5+= _0x47f2x9);null== this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2)&& this[_0x1bfe[441]][_0x1bfe[2264]]();return 0< _0x47f2x5[_0x1bfe[67]]|| !_0x47f2x4?_0x47f2x5:null};mxGraph[_0x1bfe[202]][_0x1bfe[2586]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[251]][_0x1bfe[1962]](_0x47f2x2,!0),_0x47f2x4=this[_0x1bfe[251]][_0x1bfe[1962]](_0x47f2x2,!1);_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[433]](_0x47f2x2);var _0x47f2x5=_0x1bfe[110];if(null!= this[_0x1bfe[2335]]){for(var _0x47f2x9=0;_0x47f2x9< this[_0x1bfe[2335]][_0x1bfe[67]];_0x47f2x9++){var _0x47f2xa=this[_0x1bfe[2335]][_0x47f2x9];if(_0x47f2xa[_0x1bfe[1097]]&& mxUtils[_0x1bfe[1331]](_0x47f2x2,_0x47f2xa[_0x1bfe[60]],_0x47f2xa[_0x1bfe[2588]],_0x47f2xa[_0x1bfe[131]])&& (0== _0x47f2xa[_0x1bfe[160]]&& 0< _0x47f2x3|| 1== _0x47f2xa[_0x1bfe[243]]&& 0== _0x47f2x3|| 1== _0x47f2xa[_0x1bfe[160]]&& 1< _0x47f2x3)){_0x47f2x5+= _0x47f2xa[_0x1bfe[2589]]+ _0x1bfe[192]}else {if(!_0x47f2xa[_0x1bfe[1097]]&& mxUtils[_0x1bfe[1331]](_0x47f2x2,_0x47f2xa[_0x1bfe[60]],_0x47f2xa[_0x1bfe[2588]],_0x47f2xa[_0x1bfe[131]])&& (0== _0x47f2xa[_0x1bfe[160]]&& 0< _0x47f2x4|| 1== _0x47f2xa[_0x1bfe[243]]&& 0== _0x47f2x4|| 1== _0x47f2xa[_0x1bfe[160]]&& 1< _0x47f2x4)){_0x47f2x5+= _0x47f2xa[_0x1bfe[2589]]+ _0x1bfe[192]}}}};return 0< _0x47f2x5[_0x1bfe[67]]?_0x47f2x5:null};mxGraph[_0x1bfe[202]][_0x1bfe[2587]]= function(_0x47f2x2,_0x47f2x3){return null};mxGraph[_0x1bfe[202]][_0x1bfe[2271]]= function(){return this[_0x1bfe[1617]]};mxGraph[_0x1bfe[202]][_0x1bfe[2590]]= function(_0x47f2x2){this[_0x1bfe[1617]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2205]]= function(_0x47f2x2){if(null!= _0x47f2x2&& this[_0x1bfe[2206]]&& !this[_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]])){var _0x47f2x3=this[_0x1bfe[1742]](_0x47f2x2[_0x1bfe[246]]);if(this[_0x1bfe[2516]](_0x47f2x2[_0x1bfe[246]],!_0x47f2x3)){return _0x47f2x3?this[_0x1bfe[2415]]:this[_0x1bfe[2417]]}};return null};mxGraph[_0x1bfe[202]][_0x1bfe[2454]]= function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[433]](_0x47f2x2);if(null!= _0x47f2x2){if(mxUtils[_0x1bfe[1331]](_0x47f2x2)){return _0x47f2x2[_0x1bfe[301]]};if(_0x1bfe[279]== typeof _0x47f2x2[_0x1bfe[2591]]){return _0x47f2x2.toString()}};return _0x1bfe[110]};mxGraph[_0x1bfe[202]][_0x1bfe[2183]]= function(_0x47f2x2){var _0x47f2x3=_0x1bfe[110];if(this[_0x1bfe[2409]]&& null!= _0x47f2x2){var _0x47f2x4=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2),_0x47f2x4=null!= _0x47f2x4?_0x47f2x4[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);mxUtils[_0x1bfe[433]](_0x47f2x4,mxConstants.STYLE_NOLABEL,!1)|| (_0x47f2x3= this[_0x1bfe[2454]](_0x47f2x2))};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[2186]]= function(_0x47f2x2){return this[_0x1bfe[2592]]()};mxGraph[_0x1bfe[202]][_0x1bfe[2592]]= function(){return this[_0x1bfe[2410]]};mxGraph[_0x1bfe[202]][_0x1bfe[2593]]= function(_0x47f2x2){this[_0x1bfe[2410]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2131]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);_0x47f2x2= null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);return null!= _0x47f2x2?_0x1bfe[1333]== _0x47f2x2[mxConstants[_0x1bfe[2594]]]:!1};mxGraph[_0x1bfe[202]][_0x1bfe[2130]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);_0x47f2x2= null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);return null!= _0x47f2x2?_0x1bfe[188]== _0x47f2x2[mxConstants[_0x1bfe[2193]]]:!1};mxGraph[_0x1bfe[202]][_0x1bfe[2595]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=null;if(null!= _0x47f2x2){if(null!= _0x47f2x2[_0x1bfe[2207]]&& (_0x47f2x3== _0x47f2x2[_0x1bfe[2207]][_0x1bfe[252]]|| _0x47f2x3[_0x1bfe[265]]== _0x47f2x2[_0x1bfe[2207]][_0x1bfe[252]])){_0x47f2x9= this[_0x1bfe[2425]],_0x47f2x9= mxResources[_0x1bfe[203]](_0x47f2x9)|| _0x47f2x9};null== _0x47f2x9&& null!= _0x47f2x2[_0x1bfe[1211]]&& _0x47f2x2[_0x1bfe[1211]][_0x1bfe[209]](function(_0x47f2x2,_0x47f2x4){if(null== _0x47f2x9&& (_0x47f2x3== _0x47f2x4[_0x1bfe[252]]|| _0x47f2x3[_0x1bfe[265]]== _0x47f2x4[_0x1bfe[252]])){_0x47f2x9= _0x47f2x4[_0x1bfe[2201]].toString()}});null== _0x47f2x9&& (_0x47f2x4= this[_0x1bfe[2432]][_0x1bfe[2596]](_0x47f2x2[_0x1bfe[246]]),null!= _0x47f2x4&& _0x1bfe[279]== typeof _0x47f2x4[_0x1bfe[2597]]&& (_0x47f2x9= _0x47f2x4[_0x1bfe[2597]](_0x47f2x3)));null== _0x47f2x9&& (_0x47f2x9= this[_0x1bfe[2598]](_0x47f2x2[_0x1bfe[246]]))};return _0x47f2x9};mxGraph[_0x1bfe[202]][_0x1bfe[2598]]= function(_0x47f2x2){var _0x47f2x3=null;return _0x47f2x3= null!= _0x47f2x2&& null!= _0x47f2x2[_0x1bfe[2595]]?_0x47f2x2[_0x1bfe[2595]]():this[_0x1bfe[2454]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2599]]= function(_0x47f2x2){return null};mxGraph[_0x1bfe[202]][_0x1bfe[1731]]= function(_0x47f2x2){var _0x47f2x3= new mxRectangle,_0x47f2x4=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);_0x47f2x2= null!= _0x47f2x4?_0x47f2x4[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);null!= _0x47f2x2&& (_0x47f2x4= parseInt(mxUtils[_0x1bfe[433]](_0x47f2x2,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),mxUtils[_0x1bfe[433]](_0x47f2x2,mxConstants.STYLE_HORIZONTAL,!0)?_0x47f2x3[_0x1bfe[119]]= _0x47f2x4:_0x47f2x3[_0x1bfe[117]]= _0x47f2x4);return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[1202]]= function(_0x47f2x2){return null!= _0x47f2x2&& null!= _0x47f2x2[_0x1bfe[124]]?_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2484]]]:null};mxGraph[_0x1bfe[202]][_0x1bfe[2187]]= function(_0x47f2x2){return null!= _0x47f2x2&& null!= _0x47f2x2[_0x1bfe[124]]?_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2063]]]|| mxConstants[_0x1bfe[481]]:null};mxGraph[_0x1bfe[202]][_0x1bfe[2173]]= function(_0x47f2x2){return null!= _0x47f2x2&& null!= _0x47f2x2[_0x1bfe[124]]?_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2600]]]:null};mxGraph[_0x1bfe[202]][_0x1bfe[2174]]= function(_0x47f2x2){return null!= _0x47f2x2&& null!= _0x47f2x2[_0x1bfe[124]]?_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2601]]]:null};mxGraph[_0x1bfe[202]][_0x1bfe[2172]]= function(_0x47f2x2){return null!= _0x47f2x2&& null!= _0x47f2x2[_0x1bfe[124]]?_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2602]]]:null};mxGraph[_0x1bfe[202]][_0x1bfe[2176]]= function(_0x47f2x2){return null!= _0x47f2x2&& null!= _0x47f2x2[_0x1bfe[124]]?_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2603]]]:null};mxGraph[_0x1bfe[202]][_0x1bfe[2476]]= function(){return this[_0x1bfe[467]]};mxGraph[_0x1bfe[202]][_0x1bfe[2604]]= function(_0x47f2x2){this[_0x1bfe[467]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[1730]]= function(_0x47f2x2){if(null!= _0x47f2x2&& this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2)!= this[_0x1bfe[251]][_0x1bfe[501]]()){var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2),_0x47f2x3=null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);if(null!= _0x47f2x3&& !this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2)){return _0x47f2x3[mxConstants[_0x1bfe[2059]]]== mxConstants[_0x1bfe[2605]]}};return !1};mxGraph[_0x1bfe[202]][_0x1bfe[2606]]= function(){return this[_0x1bfe[2389]]};mxGraph[_0x1bfe[202]][_0x1bfe[2607]]= function(_0x47f2x2){this[_0x1bfe[2389]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxGraph[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2608]]= function(){return this[_0x1bfe[2362]]};mxGraph[_0x1bfe[202]][_0x1bfe[2609]]= function(_0x47f2x2){this[_0x1bfe[2362]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2134]]= function(){return this[_0x1bfe[2363]]};mxGraph[_0x1bfe[202]][_0x1bfe[2610]]= function(_0x47f2x2){this[_0x1bfe[2363]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2125]]= function(){return this[_0x1bfe[2364]]};mxGraph[_0x1bfe[202]][_0x1bfe[2611]]= function(_0x47f2x2){this[_0x1bfe[2364]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2612]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2);return this[_0x1bfe[2613]]()|| null!= _0x47f2x3&& this[_0x1bfe[251]][_0x1bfe[1193]](_0x47f2x2)&& _0x47f2x3[_0x1bfe[1500]]};mxGraph[_0x1bfe[202]][_0x1bfe[2613]]= function(){return this[_0x1bfe[2368]]};mxGraph[_0x1bfe[202]][_0x1bfe[2614]]= function(_0x47f2x2){this[_0x1bfe[2368]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2615]]= function(_0x47f2x2){return this[_0x1bfe[251]][_0x1bfe[1938]](_0x47f2x2,mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){return this[_0x1bfe[2616]](_0x47f2x2)}))};mxGraph[_0x1bfe[202]][_0x1bfe[2616]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);_0x47f2x2= null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);return this[_0x1bfe[2617]]()&& 0!= _0x47f2x2[mxConstants[_0x1bfe[2618]]]};mxGraph[_0x1bfe[202]][_0x1bfe[2617]]= function(){return this[_0x1bfe[2369]]};mxGraph[_0x1bfe[202]][_0x1bfe[2619]]= function(_0x47f2x2){this[_0x1bfe[2369]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[898]]= function(_0x47f2x2){return this[_0x1bfe[251]][_0x1bfe[1938]](_0x47f2x2,mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){return this[_0x1bfe[2620]](_0x47f2x2)}))};mxGraph[_0x1bfe[202]][_0x1bfe[2620]]= function(_0x47f2x2){return this[_0x1bfe[2366]]};mxGraph[_0x1bfe[202]][_0x1bfe[900]]= function(_0x47f2x2){return this[_0x1bfe[251]][_0x1bfe[1938]](_0x47f2x2,mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){return this[_0x1bfe[2621]](_0x47f2x2)}))};mxGraph[_0x1bfe[202]][_0x1bfe[2621]]= function(_0x47f2x2){return this[_0x1bfe[2367]]};mxGraph[_0x1bfe[202]][_0x1bfe[2102]]= function(_0x47f2x2){return this[_0x1bfe[2622]]()};mxGraph[_0x1bfe[202]][_0x1bfe[2622]]= function(){return this[_0x1bfe[2379]]};mxGraph[_0x1bfe[202]][_0x1bfe[2623]]= function(_0x47f2x2){this[_0x1bfe[2379]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2510]]= function(_0x47f2x2){return this[_0x1bfe[251]][_0x1bfe[1938]](_0x47f2x2,mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){return this[_0x1bfe[2624]](_0x47f2x2)}))};mxGraph[_0x1bfe[202]][_0x1bfe[2624]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);_0x47f2x2= null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);return this[_0x1bfe[2625]]()&& 0!= _0x47f2x2[mxConstants[_0x1bfe[2626]]]};mxGraph[_0x1bfe[202]][_0x1bfe[2625]]= function(){return this[_0x1bfe[2371]]};mxGraph[_0x1bfe[202]][_0x1bfe[2627]]= function(_0x47f2x2){this[_0x1bfe[2371]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2628]]= function(_0x47f2x2){return !this[_0x1bfe[2612]](_0x47f2x2)&& (this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2)&& this[_0x1bfe[2373]]|| this[_0x1bfe[251]][_0x1bfe[1193]](_0x47f2x2)&& this[_0x1bfe[2374]])};mxGraph[_0x1bfe[202]][_0x1bfe[2629]]= function(_0x47f2x2){return this[_0x1bfe[251]][_0x1bfe[1938]](_0x47f2x2,mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){return this[_0x1bfe[1712]](_0x47f2x2)}))};mxGraph[_0x1bfe[202]][_0x1bfe[1712]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2),_0x47f2x3=null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);return this[_0x1bfe[2630]]()&& !this[_0x1bfe[2612]](_0x47f2x2)&& 0!= _0x47f2x3[mxConstants[_0x1bfe[2631]]]};mxGraph[_0x1bfe[202]][_0x1bfe[2630]]= function(){return this[_0x1bfe[2372]]};mxGraph[_0x1bfe[202]][_0x1bfe[2632]]= function(_0x47f2x2){this[_0x1bfe[2372]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[997]]= function(){return this[_0x1bfe[991]]};mxGraph[_0x1bfe[202]][_0x1bfe[998]]= function(_0x47f2x2){this[_0x1bfe[991]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2549]]= function(){return this[_0x1bfe[2348]]};mxGraph[_0x1bfe[202]][_0x1bfe[2633]]= function(_0x47f2x2){this[_0x1bfe[2348]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2634]]= function(){return this[_0x1bfe[1020]]};mxGraph[_0x1bfe[202]][_0x1bfe[2635]]= function(_0x47f2x2){this[_0x1bfe[1020]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2636]]= function(){return this[_0x1bfe[2353]]};mxGraph[_0x1bfe[202]][_0x1bfe[2637]]= function(_0x47f2x2){this[_0x1bfe[2353]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2638]]= function(){return this[_0x1bfe[2374]]};mxGraph[_0x1bfe[202]][_0x1bfe[2639]]= function(_0x47f2x2){this[_0x1bfe[2374]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2640]]= function(){return this[_0x1bfe[2373]]};mxGraph[_0x1bfe[202]][_0x1bfe[2641]]= function(_0x47f2x2){this[_0x1bfe[2373]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2642]]= function(){return this[_0x1bfe[2412]]};mxGraph[_0x1bfe[202]][_0x1bfe[2643]]= function(_0x47f2x2){this[_0x1bfe[2412]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2460]]= function(){return this[_0x1bfe[2411]]};mxGraph[_0x1bfe[202]][_0x1bfe[2644]]= function(_0x47f2x2){this[_0x1bfe[2411]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2645]]= function(){return this[_0x1bfe[2404]]};mxGraph[_0x1bfe[202]][_0x1bfe[2646]]= function(_0x47f2x2){this[_0x1bfe[2404]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2647]]= function(){return this[_0x1bfe[2402]]};mxGraph[_0x1bfe[202]][_0x1bfe[2648]]= function(_0x47f2x2){this[_0x1bfe[2406]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2530]]= function(){return this[_0x1bfe[2406]]};mxGraph[_0x1bfe[202]][_0x1bfe[2649]]= function(_0x47f2x2){this[_0x1bfe[2405]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2650]]= function(){return this[_0x1bfe[2405]]};mxGraph[_0x1bfe[202]][_0x1bfe[2651]]= function(_0x47f2x2){this[_0x1bfe[2407]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2527]]= function(){return this[_0x1bfe[2407]]};mxGraph[_0x1bfe[202]][_0x1bfe[2652]]= function(_0x47f2x2){this[_0x1bfe[2402]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2529]]= function(){return this[_0x1bfe[2408]]};mxGraph[_0x1bfe[202]][_0x1bfe[2653]]= function(_0x47f2x2){this[_0x1bfe[2408]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[1015]]= function(){return this[_0x1bfe[2375]]};mxGraph[_0x1bfe[202]][_0x1bfe[2654]]= function(_0x47f2x2){this[_0x1bfe[2375]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2655]]= function(){return this[_0x1bfe[2376]]};mxGraph[_0x1bfe[202]][_0x1bfe[2656]]= function(_0x47f2x2){this[_0x1bfe[2376]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2657]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2),_0x47f2x3=null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);return this[_0x1bfe[2658]]()&& !this[_0x1bfe[2612]](_0x47f2x2)&& 0!= _0x47f2x3[mxConstants[_0x1bfe[2659]]]};mxGraph[_0x1bfe[202]][_0x1bfe[2658]]= function(){return this[_0x1bfe[2377]]};mxGraph[_0x1bfe[202]][_0x1bfe[2660]]= function(_0x47f2x2){this[_0x1bfe[2377]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2661]]= function(_0x47f2x2,_0x47f2x3){return !0};mxGraph[_0x1bfe[202]][_0x1bfe[2662]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2),_0x47f2x3=null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);return this[_0x1bfe[2663]]()&& !this[_0x1bfe[2612]](_0x47f2x2)&& 0!= _0x47f2x3[mxConstants[_0x1bfe[2664]]]};mxGraph[_0x1bfe[202]][_0x1bfe[2663]]= function(){return this[_0x1bfe[2378]]};mxGraph[_0x1bfe[202]][_0x1bfe[2665]]= function(_0x47f2x2){this[_0x1bfe[2378]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2453]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2),_0x47f2x3=null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);return this[_0x1bfe[2666]]()&& !this[_0x1bfe[2612]](_0x47f2x2)&& 0!= _0x47f2x3[mxConstants[_0x1bfe[2667]]]};mxGraph[_0x1bfe[202]][_0x1bfe[2666]]= function(){return this[_0x1bfe[2370]]};mxGraph[_0x1bfe[202]][_0x1bfe[2668]]= function(_0x47f2x2){this[_0x1bfe[2370]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2551]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return this[_0x1bfe[2669]]()&& !this[_0x1bfe[2612]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2669]]= function(){return this[_0x1bfe[2380]]};mxGraph[_0x1bfe[202]][_0x1bfe[2670]]= function(_0x47f2x2){this[_0x1bfe[2380]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2671]]= function(_0x47f2x2){return null== _0x47f2x2&& this[_0x1bfe[2406]]|| null!= _0x47f2x2&& (!this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2)|| this[_0x1bfe[2405]])&& this[_0x1bfe[2565]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2672]]= function(_0x47f2x2){return this[_0x1bfe[2671]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2582]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[2671]](_0x47f2x2)&& this[_0x1bfe[2672]](_0x47f2x3)};mxGraph[_0x1bfe[202]][_0x1bfe[1995]]= function(_0x47f2x2){this[_0x1bfe[2433]][_0x1bfe[995]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[1965]]= function(_0x47f2x2){return this[_0x1bfe[2433]][_0x1bfe[994]]()};mxGraph[_0x1bfe[202]][_0x1bfe[2673]]= function(_0x47f2x2){this[_0x1bfe[2276]][_0x1bfe[995]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2674]]= function(_0x47f2x2){this[_0x1bfe[2316]][_0x1bfe[2431]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2203]]= function(_0x47f2x2){if(null!= this[_0x1bfe[2347]]){var _0x47f2x3=this[_0x1bfe[2347]][_0x1bfe[2148]]();return null== _0x47f2x2?null!= _0x47f2x3:_0x47f2x2== _0x47f2x3};return !1};mxGraph[_0x1bfe[202]][_0x1bfe[2455]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);_0x47f2x2= null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);return this[_0x1bfe[2675]]()|| 1== _0x47f2x2[mxConstants[_0x1bfe[2676]]]};mxGraph[_0x1bfe[202]][_0x1bfe[2675]]= function(){return this[_0x1bfe[2381]]};mxGraph[_0x1bfe[202]][_0x1bfe[2677]]= function(_0x47f2x2){this[_0x1bfe[2381]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2507]]= function(_0x47f2x2){return !this[_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2)&& this[_0x1bfe[2678]]()};mxGraph[_0x1bfe[202]][_0x1bfe[2678]]= function(){return this[_0x1bfe[2392]]};mxGraph[_0x1bfe[202]][_0x1bfe[2679]]= function(_0x47f2x2){this[_0x1bfe[2392]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2506]]= function(){return this[_0x1bfe[2393]]};mxGraph[_0x1bfe[202]][_0x1bfe[2680]]= function(_0x47f2x2){this[_0x1bfe[2393]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2536]]= function(_0x47f2x2){return this[_0x1bfe[2681]]()&& !this[_0x1bfe[502]]()[_0x1bfe[250]](this[_0x1bfe[502]]()[_0x1bfe[1197]](_0x47f2x2))};mxGraph[_0x1bfe[202]][_0x1bfe[2681]]= function(){return this[_0x1bfe[2391]]};mxGraph[_0x1bfe[202]][_0x1bfe[2682]]= function(_0x47f2x2){this[_0x1bfe[2391]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2505]]= function(){return this[_0x1bfe[2390]]};mxGraph[_0x1bfe[202]][_0x1bfe[2528]]= function(_0x47f2x2){this[_0x1bfe[2390]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2537]]= function(_0x47f2x2){return this[_0x1bfe[2683]](_0x47f2x2)?this[_0x1bfe[2354]]:0};mxGraph[_0x1bfe[202]][_0x1bfe[2683]]= function(_0x47f2x2){return !1};mxGraph[_0x1bfe[202]][_0x1bfe[2513]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[251]][_0x1bfe[1938]](_0x47f2x2,mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){return this[_0x1bfe[2516]](_0x47f2x2,_0x47f2x3)}))};mxGraph[_0x1bfe[202]][_0x1bfe[2516]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2),_0x47f2x4=null!= _0x47f2x4?_0x47f2x4[_0x1bfe[124]]:this[_0x1bfe[1705]](_0x47f2x2);return 0< this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2)&& 0!= _0x47f2x4[mxConstants[_0x1bfe[2684]]]};mxGraph[_0x1bfe[202]][_0x1bfe[2685]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return null!= _0x47f2x2&& (this[_0x1bfe[2655]]()&& this[_0x1bfe[2686]](_0x47f2x2,_0x47f2x3,_0x47f2x4)|| !this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2)&& (this[_0x1bfe[1730]](_0x47f2x2)|| 0< this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2)&& !this[_0x1bfe[1742]](_0x47f2x2)))};mxGraph[_0x1bfe[202]][_0x1bfe[2686]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2)&& null!= _0x47f2x3&& 1== _0x47f2x3[_0x1bfe[67]]&& this[_0x1bfe[2565]](_0x47f2x3[0])&& null== this[_0x1bfe[2500]](_0x47f2x2,this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2,!0),_0x47f2x3[0])?(_0x47f2x4= this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2,!0),_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2,!1),!this[_0x1bfe[251]][_0x1bfe[1720]](_0x47f2x3[0],_0x47f2x4)&& !this[_0x1bfe[251]][_0x1bfe[1720]](_0x47f2x3[0],_0x47f2x2)):!1};mxGraph[_0x1bfe[202]][_0x1bfe[564]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(!this[_0x1bfe[2642]]()){for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){if(this[_0x1bfe[1730]](_0x47f2x2[_0x47f2x5])){return null}}};_0x47f2x5= mxUtils[_0x1bfe[2196]](this[_0x1bfe[526]],mxEvent[_0x1bfe[731]](_0x47f2x3),mxEvent[_0x1bfe[733]](_0x47f2x3));_0x47f2x5[_0x1bfe[235]]-= this[_0x1bfe[1136]];_0x47f2x5[_0x1bfe[236]]-= this[_0x1bfe[1137]];_0x47f2x5= this[_0x1bfe[2461]](_0x47f2x5[_0x1bfe[235]],_0x47f2x5[_0x1bfe[236]]);if(null== _0x47f2x4){_0x47f2x4= _0x47f2x5}else {if(null!= _0x47f2x5){for(var _0x47f2x9=this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x5);null!= _0x47f2x9&& this[_0x1bfe[1730]](_0x47f2x9)&& _0x47f2x9!= _0x47f2x4;){_0x47f2x9= this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x9)};_0x47f2x9== _0x47f2x4&& (_0x47f2x4= _0x47f2x5)}};for(;null!= _0x47f2x4&& !this[_0x1bfe[2685]](_0x47f2x4,_0x47f2x2,_0x47f2x3)&& !this[_0x1bfe[251]][_0x1bfe[1740]](_0x47f2x4);){_0x47f2x4= this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x4)};return !this[_0x1bfe[251]][_0x1bfe[1740]](_0x47f2x4)&& 0> mxUtils[_0x1bfe[2]](_0x47f2x2,_0x47f2x4)?_0x47f2x4:null};mxGraph[_0x1bfe[202]][_0x1bfe[902]]= function(){var _0x47f2x2=this[_0x1bfe[2355]];null== _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[2534]](),null== _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[501]](),_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x2,0)));return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2687]]= function(_0x47f2x2){this[_0x1bfe[2355]]= _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2179]]= function(_0x47f2x2){for(;null!= _0x47f2x2&& !this[_0x1bfe[1730]](_0x47f2x2);){_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2)};return _0x47f2x2};mxGraph[_0x1bfe[202]][_0x1bfe[2461]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= _0x47f2x4|| this[_0x1bfe[902]]();if(null!= _0x47f2x4){for(var _0x47f2x5=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x4),_0x47f2x9=0;_0x47f2x9< _0x47f2x5;_0x47f2x9++){var _0x47f2xa=this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x4,_0x47f2x9),_0x47f2x12=this[_0x1bfe[2461]](_0x47f2x2,_0x47f2x3,_0x47f2xa);if(null!= _0x47f2x12){return _0x47f2x12};if(this[_0x1bfe[1730]](_0x47f2xa)&& (_0x47f2x12= this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2xa),this[_0x1bfe[1825]](_0x47f2x12,_0x47f2x2,_0x47f2x3))){return _0x47f2xa}}};return null};mxGraph[_0x1bfe[202]][_0x1bfe[999]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:!0;_0x47f2x9= null!= _0x47f2x9?_0x47f2x9:!0;_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:this[_0x1bfe[902]]();if(null!= _0x47f2x4){for(var _0x47f2xa=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x4)- 1;0<= _0x47f2xa;_0x47f2xa--){var _0x47f2x12=this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x4,_0x47f2xa),_0x47f2x13=this[_0x1bfe[999]](_0x47f2x2,_0x47f2x3,_0x47f2x12,_0x47f2x5,_0x47f2x9);if(null!= _0x47f2x13){return _0x47f2x13};if(this[_0x1bfe[1714]](_0x47f2x12)&& (_0x47f2x9&& this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x12)|| _0x47f2x5&& this[_0x1bfe[251]][_0x1bfe[1193]](_0x47f2x12))){if(_0x47f2x13= this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x12),this[_0x1bfe[1825]](_0x47f2x13,_0x47f2x2,_0x47f2x3)){return _0x47f2x12}}}};return null};mxGraph[_0x1bfe[202]][_0x1bfe[1825]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(null!= _0x47f2x2){var _0x47f2x5=_0x47f2x2[_0x1bfe[439]];if(null!= _0x47f2x5){_0x47f2x2= this[_0x1bfe[2353]]* this[_0x1bfe[2353]];for(var _0x47f2x9=_0x47f2x5[0],_0x47f2xa=1;_0x47f2xa< _0x47f2x5[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=_0x47f2x5[_0x47f2xa];if(mxUtils[_0x1bfe[440]](_0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]],_0x47f2x12[_0x1bfe[235]],_0x47f2x12[_0x1bfe[236]],_0x47f2x3,_0x47f2x4)<= _0x47f2x2){return !0};_0x47f2x9= _0x47f2x12}}else {if(_0x47f2x9= mxUtils[_0x1bfe[431]](mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_ROTATION)|| 0),0!= _0x47f2x9&& (_0x47f2x5= Math[_0x1bfe[426]](-_0x47f2x9),_0x47f2x9= Math[_0x1bfe[427]](-_0x47f2x9),_0x47f2xa= new mxPoint(_0x47f2x2[_0x1bfe[241]](),_0x47f2x2[_0x1bfe[242]]()),_0x47f2x9= mxUtils[_0x1bfe[432]]( new mxPoint(_0x47f2x3,_0x47f2x4),_0x47f2x5,_0x47f2x9,_0x47f2xa),_0x47f2x3= _0x47f2x9[_0x1bfe[235]],_0x47f2x4= _0x47f2x9[_0x1bfe[236]]),mxUtils[_0x1bfe[442]](_0x47f2x2,_0x47f2x3,_0x47f2x4)){return !0}}};return !1};mxGraph[_0x1bfe[202]][_0x1bfe[2688]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x2);_0x47f2x2= this[_0x1bfe[1731]](_0x47f2x2);if(null!= _0x47f2x5){var _0x47f2x9=this[_0x1bfe[249]]()[_0x1bfe[518]]();_0x47f2x3-= _0x47f2x5[_0x1bfe[235]];_0x47f2x4-= _0x47f2x5[_0x1bfe[236]];if(0< _0x47f2x2[_0x1bfe[117]]&& 0< _0x47f2x3&& _0x47f2x3> _0x47f2x2[_0x1bfe[117]]* _0x47f2x9|| 0< _0x47f2x2[_0x1bfe[119]]&& 0< _0x47f2x4&& _0x47f2x4> _0x47f2x2[_0x1bfe[119]]* _0x47f2x9){return !0}};return !1};mxGraph[_0x1bfe[202]][_0x1bfe[1728]]= function(_0x47f2x2){return this[_0x1bfe[1955]](_0x47f2x2,!0,!1)};mxGraph[_0x1bfe[202]][_0x1bfe[1956]]= function(_0x47f2x2){return this[_0x1bfe[1955]](_0x47f2x2,!1,!0)};mxGraph[_0x1bfe[202]][_0x1bfe[1955]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2= null!= _0x47f2x2?_0x47f2x2:this[_0x1bfe[902]]();_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[1955]](_0x47f2x2,null!= _0x47f2x3?_0x47f2x3:!1,null!= _0x47f2x4?_0x47f2x4:!1);_0x47f2x3= [];for(_0x47f2x4= 0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){this[_0x1bfe[1714]](_0x47f2x2[_0x47f2x4])&& _0x47f2x3[_0x1bfe[207]](_0x47f2x2[_0x47f2x4])};return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[1756]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[264]](_0x47f2x2,_0x47f2x3,!0,!0,!1)};mxGraph[_0x1bfe[202]][_0x1bfe[1867]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[264]](_0x47f2x2,_0x47f2x3,!0,!1,!1)};mxGraph[_0x1bfe[202]][_0x1bfe[1963]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[264]](_0x47f2x2,_0x47f2x3,!1,!0,!1)};mxGraph[_0x1bfe[202]][_0x1bfe[264]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!0;_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:!0;_0x47f2x9= null!= _0x47f2x9?_0x47f2x9:!0;_0x47f2xa= null!= _0x47f2xa?_0x47f2xa:!1;for(var _0x47f2x12=[],_0x47f2x13=this[_0x1bfe[1742]](_0x47f2x2),_0x47f2x14=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x2),_0x47f2x15=0;_0x47f2x15< _0x47f2x14;_0x47f2x15++){var _0x47f2x16=this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x2,_0x47f2x15);if(_0x47f2x13|| !this[_0x1bfe[1714]](_0x47f2x16)){_0x47f2x12= _0x47f2x12[_0x1bfe[1919]](this[_0x1bfe[251]][_0x1bfe[264]](_0x47f2x16,_0x47f2x4,_0x47f2x5))}};_0x47f2x12= _0x47f2x12[_0x1bfe[1919]](this[_0x1bfe[251]][_0x1bfe[264]](_0x47f2x2,_0x47f2x4,_0x47f2x5));_0x47f2x13= [];for(_0x47f2x15= 0;_0x47f2x15< _0x47f2x12[_0x1bfe[67]];_0x47f2x15++){_0x47f2x16= this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x12[_0x47f2x15]),_0x47f2x14= null!= _0x47f2x16?_0x47f2x16[_0x1bfe[1710]](!0):this[_0x1bfe[441]][_0x1bfe[1710]](_0x47f2x12[_0x47f2x15],!0),_0x47f2x16= null!= _0x47f2x16?_0x47f2x16[_0x1bfe[1710]](!1):this[_0x1bfe[441]][_0x1bfe[1710]](_0x47f2x12[_0x47f2x15],!1),(_0x47f2x9&& _0x47f2x14== _0x47f2x16|| _0x47f2x14!= _0x47f2x16&& (_0x47f2x4&& _0x47f2x16== _0x47f2x2&& (null== _0x47f2x3|| this[_0x1bfe[1920]](_0x47f2x14,_0x47f2x3,_0x47f2xa))|| _0x47f2x5&& _0x47f2x14== _0x47f2x2&& (null== _0x47f2x3|| this[_0x1bfe[1920]](_0x47f2x16,_0x47f2x3,_0x47f2xa))))&& _0x47f2x13[_0x1bfe[207]](_0x47f2x12[_0x47f2x15])};return _0x47f2x13};mxGraph[_0x1bfe[202]][_0x1bfe[1920]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return _0x47f2x4?this[_0x1bfe[251]][_0x1bfe[1720]](_0x47f2x3,_0x47f2x2):this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x2)== _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[1808]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!0;_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:!0;var _0x47f2x9=[],_0x47f2xa={};if(null!= _0x47f2x2){for(var _0x47f2x12=0;_0x47f2x12< _0x47f2x2[_0x1bfe[67]];_0x47f2x12++){var _0x47f2x13=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2[_0x47f2x12]),_0x47f2x14=null!= _0x47f2x13?_0x47f2x13[_0x1bfe[1710]](!0):this[_0x1bfe[441]][_0x1bfe[1710]](_0x47f2x2[_0x47f2x12],!0),_0x47f2x13=null!= _0x47f2x13?_0x47f2x13[_0x1bfe[1710]](!1):this[_0x1bfe[441]][_0x1bfe[1710]](_0x47f2x2[_0x47f2x12],!1);if(_0x47f2x14== _0x47f2x3&& null!= _0x47f2x13&& _0x47f2x13!= _0x47f2x3&& _0x47f2x5){var _0x47f2x15=mxCellPath[_0x1bfe[385]](_0x47f2x13);null== _0x47f2xa[_0x47f2x15]&& (_0x47f2xa[_0x47f2x15]= _0x47f2x13,_0x47f2x9[_0x1bfe[207]](_0x47f2x13))}else {_0x47f2x13== _0x47f2x3&& (null!= _0x47f2x14&& _0x47f2x14!= _0x47f2x3&& _0x47f2x4)&& (_0x47f2x15= mxCellPath[_0x1bfe[385]](_0x47f2x14),null== _0x47f2xa[_0x47f2x15]&& (_0x47f2xa[_0x47f2x15]= _0x47f2x14,_0x47f2x9[_0x1bfe[207]](_0x47f2x14)))}}};return _0x47f2x9};mxGraph[_0x1bfe[202]][_0x1bfe[1781]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!1;for(var _0x47f2x5=this[_0x1bfe[264]](_0x47f2x2),_0x47f2x9=[],_0x47f2xa=0;_0x47f2xa< _0x47f2x5[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x5[_0x47f2xa]),_0x47f2x13=null!= _0x47f2x12?_0x47f2x12[_0x1bfe[1710]](!0):this[_0x1bfe[441]][_0x1bfe[1710]](_0x47f2x5[_0x47f2xa],!0),_0x47f2x12=null!= _0x47f2x12?_0x47f2x12[_0x1bfe[1710]](!1):this[_0x1bfe[441]][_0x1bfe[1710]](_0x47f2x5[_0x47f2xa],!1);(_0x47f2x13== _0x47f2x2&& _0x47f2x12== _0x47f2x3|| !_0x47f2x4&& _0x47f2x13== _0x47f2x3&& _0x47f2x12== _0x47f2x2)&& _0x47f2x9[_0x1bfe[207]](_0x47f2x5[_0x47f2xa])};return _0x47f2x9};mxGraph[_0x1bfe[202]][_0x1bfe[2689]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=mxUtils[_0x1bfe[2196]](this[_0x1bfe[526]],mxEvent[_0x1bfe[731]](_0x47f2x2),mxEvent[_0x1bfe[733]](_0x47f2x2)),_0x47f2x5=this[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x9=this[_0x1bfe[441]][_0x1bfe[513]],_0x47f2xa=!1!= _0x47f2x3?this[_0x1bfe[1020]]/ 2:0;_0x47f2x4[_0x1bfe[235]]= this[_0x1bfe[1021]](_0x47f2x4[_0x1bfe[235]]/ _0x47f2x5- _0x47f2x9[_0x1bfe[235]]- _0x47f2xa);_0x47f2x4[_0x1bfe[236]]= this[_0x1bfe[1021]](_0x47f2x4[_0x1bfe[236]]/ _0x47f2x5- _0x47f2x9[_0x1bfe[236]]- _0x47f2xa);return _0x47f2x4};mxGraph[_0x1bfe[202]][_0x1bfe[2690]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2xa= null!= _0x47f2xa?_0x47f2xa:[];if(0< _0x47f2x4|| 0< _0x47f2x5){var _0x47f2x12=_0x47f2x2+ _0x47f2x4,_0x47f2x13=_0x47f2x3+ _0x47f2x5;_0x47f2x9= _0x47f2x9|| this[_0x1bfe[902]]();if(null!= _0x47f2x9){for(var _0x47f2x14=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x9),_0x47f2x15=0;_0x47f2x15< _0x47f2x14;_0x47f2x15++){var _0x47f2x16=this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x9,_0x47f2x15),_0x47f2x17=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x16);if(this[_0x1bfe[1714]](_0x47f2x16)&& null!= _0x47f2x17){var _0x47f2x18=_0x47f2x17,_0x47f2x17=mxUtils[_0x1bfe[433]](_0x47f2x17[_0x1bfe[124]],mxConstants.STYLE_ROTATION)|| 0;0!= _0x47f2x17&& (_0x47f2x18= mxUtils[_0x1bfe[1613]](_0x47f2x18,_0x47f2x17));_0x47f2x18[_0x1bfe[235]]>= _0x47f2x2&& _0x47f2x18[_0x1bfe[236]]+ _0x47f2x18[_0x1bfe[119]]<= _0x47f2x13&& _0x47f2x18[_0x1bfe[236]]>= _0x47f2x3&& _0x47f2x18[_0x1bfe[235]]+ _0x47f2x18[_0x1bfe[117]]<= _0x47f2x12?_0x47f2xa[_0x1bfe[207]](_0x47f2x16):this[_0x1bfe[2690]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x16,_0x47f2xa)}}}};return _0x47f2xa};mxGraph[_0x1bfe[202]][_0x1bfe[2691]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=[];if(_0x47f2x5|| _0x47f2x9){if(null== _0x47f2x4&& (_0x47f2x4= this[_0x1bfe[902]]()),null!= _0x47f2x4){for(var _0x47f2x12=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x4),_0x47f2x13=0;_0x47f2x13< _0x47f2x12;_0x47f2x13++){var _0x47f2x14=this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x4,_0x47f2x13),_0x47f2x15=this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x14);this[_0x1bfe[1714]](_0x47f2x14)&& null!= _0x47f2x15&& (!_0x47f2x5|| _0x47f2x15[_0x1bfe[235]]>= _0x47f2x2) && (!_0x47f2x9|| _0x47f2x15[_0x1bfe[236]]>= _0x47f2x3) && _0x47f2xa[_0x1bfe[207]](_0x47f2x14)}}};return _0x47f2xa};mxGraph[_0x1bfe[202]][_0x1bfe[1757]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!1;_0x47f2x4= null!= _0x47f2x4?_0x47f2x4:!1;var _0x47f2x5=[];if(null!= _0x47f2x2){for(var _0x47f2x9=this[_0x1bfe[502]](),_0x47f2xa=_0x47f2x9[_0x1bfe[262]](_0x47f2x2),_0x47f2x12=null,_0x47f2x13=0,_0x47f2x14=0;_0x47f2x14< _0x47f2xa;_0x47f2x14++){var _0x47f2x15=_0x47f2x9[_0x1bfe[263]](_0x47f2x2,_0x47f2x14);if(this[_0x1bfe[251]][_0x1bfe[1193]](_0x47f2x15)&& this[_0x1bfe[1714]](_0x47f2x15)){for(var _0x47f2x16=this[_0x1bfe[1756]](_0x47f2x15,_0x47f2x3?_0x47f2x2:null),_0x47f2x17=0,_0x47f2x18=0,_0x47f2x19=0;_0x47f2x19< _0x47f2x16[_0x1bfe[67]];_0x47f2x19++){this[_0x1bfe[441]][_0x1bfe[1710]](_0x47f2x16[_0x47f2x19],!0)== _0x47f2x15?_0x47f2x17++:_0x47f2x18++};(_0x47f2x4&& 0== _0x47f2x17&& 0< _0x47f2x18|| !_0x47f2x4&& 0== _0x47f2x18&& 0< _0x47f2x17)&& _0x47f2x5[_0x1bfe[207]](_0x47f2x15);_0x47f2x16= _0x47f2x4?_0x47f2x18- _0x47f2x17:_0x47f2x17- _0x47f2x18;_0x47f2x16> _0x47f2x13&& (_0x47f2x13= _0x47f2x16,_0x47f2x12= _0x47f2x15)}};0== _0x47f2x5[_0x1bfe[67]]&& null!= _0x47f2x12&& _0x47f2x5[_0x1bfe[207]](_0x47f2x12)};return _0x47f2x5};mxGraph[_0x1bfe[202]][_0x1bfe[1706]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){if(null!= _0x47f2x4&& null!= _0x47f2x2){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!0;_0x47f2x9= _0x47f2x9|| [];var _0x47f2xa=mxCellPath[_0x1bfe[385]](_0x47f2x2);if(null== _0x47f2x9[_0x47f2xa]&& (_0x47f2x9[_0x47f2xa]= _0x47f2x2,_0x47f2x5= _0x47f2x4(_0x47f2x2,_0x47f2x5),null== _0x47f2x5|| _0x47f2x5)){if(_0x47f2x5= this[_0x1bfe[251]][_0x1bfe[1707]](_0x47f2x2),0< _0x47f2x5){for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x5;_0x47f2xa++){var _0x47f2x12=this[_0x1bfe[251]][_0x1bfe[1708]](_0x47f2x2,_0x47f2xa),_0x47f2x13=this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x12,!0)== _0x47f2x2;if(!_0x47f2x3|| _0x47f2x13){_0x47f2x13= this[_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x12,!_0x47f2x13),this[_0x1bfe[1706]](_0x47f2x13,_0x47f2x3,_0x47f2x4,_0x47f2x12,_0x47f2x9)}}}}}};mxGraph[_0x1bfe[202]][_0x1bfe[2692]]= function(_0x47f2x2){return this[_0x1bfe[2435]]()[_0x1bfe[2097]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2693]]= function(){return this[_0x1bfe[2435]]()[_0x1bfe[1107]]()};mxGraph[_0x1bfe[202]][_0x1bfe[2440]]= function(){return this[_0x1bfe[2435]]()[_0x1bfe[200]]()};mxGraph[_0x1bfe[202]][_0x1bfe[2694]]= function(){return this[_0x1bfe[2435]]()[_0x1bfe[895]][_0x1bfe[67]]};mxGraph[_0x1bfe[202]][_0x1bfe[2452]]= function(){return this[_0x1bfe[2435]]()[_0x1bfe[895]][0]};mxGraph[_0x1bfe[202]][_0x1bfe[897]]= function(){return this[_0x1bfe[2435]]()[_0x1bfe[895]][_0x1bfe[1853]]()};mxGraph[_0x1bfe[202]][_0x1bfe[2450]]= function(_0x47f2x2){this[_0x1bfe[2435]]()[_0x1bfe[2099]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[904]]= function(_0x47f2x2){this[_0x1bfe[2435]]()[_0x1bfe[2100]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2695]]= function(_0x47f2x2){this[_0x1bfe[2435]]()[_0x1bfe[2103]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2696]]= function(_0x47f2x2){this[_0x1bfe[2435]]()[_0x1bfe[832]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2697]]= function(_0x47f2x2){this[_0x1bfe[2435]]()[_0x1bfe[2104]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2439]]= function(_0x47f2x2){this[_0x1bfe[2435]]()[_0x1bfe[842]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2698]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[2690]](_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]],_0x47f2x2[_0x1bfe[117]],_0x47f2x2[_0x1bfe[119]]);this[_0x1bfe[2699]](_0x47f2x4,_0x47f2x3);return _0x47f2x4};mxGraph[_0x1bfe[202]][_0x1bfe[2700]]= function(){this[_0x1bfe[2701]](!0)};mxGraph[_0x1bfe[202]][_0x1bfe[2702]]= function(){this[_0x1bfe[2701]]()};mxGraph[_0x1bfe[202]][_0x1bfe[2703]]= function(){this[_0x1bfe[2701]](!1,!0)};mxGraph[_0x1bfe[202]][_0x1bfe[2704]]= function(){this[_0x1bfe[2701]](!1,!1,!0)};mxGraph[_0x1bfe[202]][_0x1bfe[2701]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[2105]],_0x47f2x9=0< _0x47f2x5[_0x1bfe[895]][_0x1bfe[67]]?_0x47f2x5[_0x1bfe[895]][0]:null;1< _0x47f2x5[_0x1bfe[895]][_0x1bfe[67]]&& _0x47f2x5[_0x1bfe[200]]();var _0x47f2x5=null!= _0x47f2x9?this[_0x1bfe[251]][_0x1bfe[1197]](_0x47f2x9):this[_0x1bfe[902]](),_0x47f2xa=this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x5);null== _0x47f2x9&& 0< _0x47f2xa?(_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x5,0),this[_0x1bfe[2450]](_0x47f2x2)):(null== _0x47f2x9|| _0x47f2x3)&& null!= this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x5)&& null!= this[_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x5)?this[_0x1bfe[2534]]()!= _0x47f2x5&& this[_0x1bfe[2450]](_0x47f2x5):null!= _0x47f2x9&& _0x47f2x4?0< this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x9)&& (_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x9,0),this[_0x1bfe[2450]](_0x47f2x2)):0< _0x47f2xa&& (_0x47f2x3= _0x47f2x5[_0x1bfe[1738]](_0x47f2x9),_0x47f2x2?(_0x47f2x3++,_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x5,_0x47f2x3% _0x47f2xa)):(_0x47f2x3--,_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[263]](_0x47f2x5,0> _0x47f2x3?_0x47f2xa- 1:_0x47f2x3)),this[_0x1bfe[2450]](_0x47f2x2))};mxGraph[_0x1bfe[202]][_0x1bfe[2705]]= function(_0x47f2x2){_0x47f2x2= _0x47f2x2|| this[_0x1bfe[902]]();_0x47f2x2= this[_0x1bfe[251]][_0x1bfe[1953]](_0x47f2x2);null!= _0x47f2x2&& this[_0x1bfe[904]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2706]]= function(_0x47f2x2){this[_0x1bfe[2707]](!0,!1,_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2708]]= function(_0x47f2x2){this[_0x1bfe[2707]](!1,!0,_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2707]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= _0x47f2x4|| this[_0x1bfe[902]]();var _0x47f2x5=mxUtils[_0x1bfe[885]](this,function(_0x47f2x4){return null!= this[_0x1bfe[441]][_0x1bfe[248]](_0x47f2x4)&& 0== this[_0x1bfe[251]][_0x1bfe[262]](_0x47f2x4)&& (this[_0x1bfe[251]][_0x1bfe[1193]](_0x47f2x4)&& _0x47f2x2|| this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x4)&& _0x47f2x3)});_0x47f2x4= this[_0x1bfe[251]][_0x1bfe[1921]](_0x47f2x5,_0x47f2x4);this[_0x1bfe[904]](_0x47f2x4)};mxGraph[_0x1bfe[202]][_0x1bfe[2459]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[2692]](_0x47f2x2);this[_0x1bfe[2462]](_0x47f2x3)?_0x47f2x4?this[_0x1bfe[2697]](_0x47f2x2):this[_0x1bfe[2695]](_0x47f2x2):(!_0x47f2x4|| 1!= this[_0x1bfe[2694]]()) && this[_0x1bfe[2450]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2699]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[2462]](_0x47f2x3)?this[_0x1bfe[2696]](_0x47f2x2):this[_0x1bfe[904]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[2709]]= function(_0x47f2x2){var _0x47f2x3=null;null!= _0x47f2x2&& (this[_0x1bfe[251]][_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]])?(_0x47f2x3= this[_0x1bfe[441]][_0x1bfe[2291]](_0x47f2x2),_0x47f2x3= this[_0x1bfe[2573]](_0x47f2x2)|| _0x47f2x3== mxEdgeStyle[_0x1bfe[2568]]|| _0x47f2x3== mxEdgeStyle[_0x1bfe[2569]]|| _0x47f2x3== mxEdgeStyle[_0x1bfe[2570]]? new mxElbowEdgeHandler(_0x47f2x2):_0x47f2x3== mxEdgeStyle[_0x1bfe[2567]]|| _0x47f2x3== mxEdgeStyle[_0x1bfe[2572]]? new mxEdgeSegmentHandler(_0x47f2x2): new mxEdgeHandler(_0x47f2x2)):_0x47f2x3= new mxVertexHandler(_0x47f2x2));return _0x47f2x3};mxGraph[_0x1bfe[202]][_0x1bfe[1133]]= function(_0x47f2x2){null== this[_0x1bfe[2329]]&& (this[_0x1bfe[2329]]= []);this[_0x1bfe[2329]][_0x1bfe[207]](_0x47f2x2)};mxGraph[_0x1bfe[202]][_0x1bfe[1148]]= function(_0x47f2x2){if(null!= this[_0x1bfe[2329]]){for(var _0x47f2x3=0;_0x47f2x3< this[_0x1bfe[2329]][_0x1bfe[67]];_0x47f2x3++){if(this[_0x1bfe[2329]][_0x47f2x3]== _0x47f2x2){this[_0x1bfe[2329]][_0x1bfe[300]](_0x47f2x3,1);break}}}};mxGraph[_0x1bfe[202]][_0x1bfe[2710]]= function(_0x47f2x2){if(null== _0x47f2x2[_0x1bfe[725]]|| null== _0x47f2x2[_0x1bfe[726]]){var _0x47f2x3=mxUtils[_0x1bfe[2196]](this[_0x1bfe[526]],_0x47f2x2[_0x1bfe[730]](),_0x47f2x2[_0x1bfe[732]]());_0x47f2x2[_0x1bfe[725]]= _0x47f2x3[_0x1bfe[235]]- this[_0x1bfe[1136]];_0x47f2x2[_0x1bfe[726]]= _0x47f2x3[_0x1bfe[236]]- this[_0x1bfe[1137]]}};mxGraph[_0x1bfe[202]][_0x1bfe[758]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){null== _0x47f2x4&& (_0x47f2x4= this);this[_0x1bfe[2710]](_0x47f2x3);_0x47f2x2== mxEvent[_0x1bfe[2711]]&& (this[_0x1bfe[1009]]= !0);if(mxClient[_0x1bfe[754]]&& this[_0x1bfe[2349]]&& _0x47f2x2== mxEvent[_0x1bfe[2711]]){var _0x47f2x5=( new Date)[_0x1bfe[178]]();_0x47f2x5- this[_0x1bfe[2213]]< this[_0x1bfe[2350]]&& Math[_0x1bfe[425]](this[_0x1bfe[2712]]- _0x47f2x3[_0x1bfe[730]]())< this[_0x1bfe[2351]]&& Math[_0x1bfe[425]](this[_0x1bfe[2352]]- _0x47f2x3[_0x1bfe[732]]())< this[_0x1bfe[2351]]?(this[_0x1bfe[2213]]= 0,this[_0x1bfe[761]](_0x47f2x3[_0x1bfe[727]](),_0x47f2x3[_0x1bfe[736]]()),_0x47f2x3[_0x1bfe[727]]()[_0x1bfe[786]]= !0):(this[_0x1bfe[2712]]= _0x47f2x3[_0x1bfe[730]](),this[_0x1bfe[2352]]= _0x47f2x3[_0x1bfe[732]](),this[_0x1bfe[2213]]= _0x47f2x5)};_0x47f2x5= 2!= _0x47f2x3[_0x1bfe[727]]()[_0x1bfe[764]];if(mxClient[_0x1bfe[80]]&& _0x1bfe[462]== document[_0x1bfe[135]]){if(null!= this[_0x1bfe[2713]]&& Math[_0x1bfe[425]](this[_0x1bfe[2713]]- _0x47f2x3[_0x1bfe[730]]())> this[_0x1bfe[2351]]|| null!= this[_0x1bfe[2714]]&& Math[_0x1bfe[425]](this[_0x1bfe[2714]]- _0x47f2x3[_0x1bfe[732]]())> this[_0x1bfe[2351]]){_0x47f2x5= !0};_0x47f2x2== mxEvent[_0x1bfe[2715]]&& (this[_0x1bfe[2713]]= _0x47f2x3[_0x1bfe[730]](),this[_0x1bfe[2714]]= _0x47f2x3[_0x1bfe[732]]())};if((_0x47f2x2!= mxEvent[_0x1bfe[2715]]|| this[_0x1bfe[1009]])&& _0x47f2x5){if(_0x47f2x2== mxEvent[_0x1bfe[2715]]&& (this[_0x1bfe[1009]]= !1),!this[_0x1bfe[2203]]()&& (mxClient[_0x1bfe[71]]|| mxClient[_0x1bfe[75]]|| mxClient[_0x1bfe[76]]|| mxClient[_0x1bfe[80]]&& mxClient[_0x1bfe[48]]|| _0x47f2x3[_0x1bfe[727]]()[_0x1bfe[772]]!= this[_0x1bfe[526]])){_0x47f2x2== mxEvent[_0x1bfe[2716]]&& (this[_0x1bfe[1009]]&& this[_0x1bfe[1012]])&& this[_0x1bfe[1014]](_0x47f2x3[_0x1bfe[734]](),_0x47f2x3[_0x1bfe[735]](),this[_0x1bfe[1013]]);if(null!= this[_0x1bfe[2329]]){_0x47f2x4= [_0x47f2x4,_0x47f2x3];_0x47f2x3[_0x1bfe[727]]()[_0x1bfe[739]]= !0;for(_0x47f2x5= 0;_0x47f2x5< this[_0x1bfe[2329]][_0x1bfe[67]];_0x47f2x5++){var _0x47f2x9=this[_0x1bfe[2329]][_0x47f2x5];_0x47f2x2== mxEvent[_0x1bfe[2711]]?_0x47f2x9[_0x1bfe[787]][_0x1bfe[183]](_0x47f2x9,_0x47f2x4):_0x47f2x2== mxEvent[_0x1bfe[2716]]?_0x47f2x9[_0x1bfe[788]][_0x1bfe[183]](_0x47f2x9,_0x47f2x4):_0x47f2x2== mxEvent[_0x1bfe[2715]]&& _0x47f2x9[_0x1bfe[789]][_0x1bfe[183]](_0x47f2x9,_0x47f2x4)}};_0x47f2x2== mxEvent[_0x1bfe[2715]]&& this[_0x1bfe[173]](_0x47f2x3)}}else {_0x47f2x2== mxEvent[_0x1bfe[2715]]&& (this[_0x1bfe[1009]]= !1)}};mxGraph[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[2717]]|| (this[_0x1bfe[2717]]= !0,null!= this[_0x1bfe[2276]]&& this[_0x1bfe[2276]][_0x1bfe[515]](),null!= this[_0x1bfe[2432]]&& this[_0x1bfe[2432]][_0x1bfe[515]](),null!= this[_0x1bfe[2316]]&& this[_0x1bfe[2316]][_0x1bfe[515]](),null!= this[_0x1bfe[2433]]&& this[_0x1bfe[2433]][_0x1bfe[515]](),null!= this[_0x1bfe[1011]]&& this[_0x1bfe[1011]][_0x1bfe[515]](),null!= this[_0x1bfe[2347]]&& this[_0x1bfe[2347]][_0x1bfe[515]](),null!= this[_0x1bfe[441]]&& this[_0x1bfe[441]][_0x1bfe[515]](),null!= this[_0x1bfe[251]]&& null!= this[_0x1bfe[2343]]&& (this[_0x1bfe[251]][_0x1bfe[745]](this[_0x1bfe[2343]]),this[_0x1bfe[2343]]= null),this[_0x1bfe[526]]= null)};function mxCellOverlay(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){this[_0x1bfe[618]]= _0x47f2x2;this[_0x1bfe[2718]]= _0x47f2x3;this[_0x1bfe[611]]= null!= _0x47f2x4?_0x47f2x4:this[_0x1bfe[611]];this[_0x1bfe[123]]= null!= _0x47f2x5?_0x47f2x5:this[_0x1bfe[123]];this[_0x1bfe[1368]]= null!= _0x47f2x9?_0x47f2x9: new mxPoint;this[_0x1bfe[270]]= null!= _0x47f2xa?_0x47f2xa:_0x1bfe[2719]}mxCellOverlay[_0x1bfe[202]]= new mxEventSource;mxCellOverlay[_0x1bfe[202]][_0x1bfe[196]]= mxCellOverlay;mxCellOverlay[_0x1bfe[202]][_0x1bfe[618]]= null;mxCellOverlay[_0x1bfe[202]][_0x1bfe[2718]]= null;mxCellOverlay[_0x1bfe[202]][_0x1bfe[611]]= mxConstants[_0x1bfe[480]];mxCellOverlay[_0x1bfe[202]][_0x1bfe[123]]= mxConstants[_0x1bfe[482]];mxCellOverlay[_0x1bfe[202]][_0x1bfe[1368]]= null;mxCellOverlay[_0x1bfe[202]][_0x1bfe[270]]= null;mxCellOverlay[_0x1bfe[202]][_0x1bfe[2354]]= 0.5;mxCellOverlay[_0x1bfe[202]][_0x1bfe[1799]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[441]][_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x4=_0x47f2x2[_0x1bfe[441]][_0x1bfe[255]],_0x47f2x5=null,_0x47f2x9=this[_0x1bfe[618]][_0x1bfe[117]],_0x47f2xa=this[_0x1bfe[618]][_0x1bfe[119]];_0x47f2x3?(_0x47f2x3= _0x47f2x2[_0x1bfe[439]],1== _0x47f2x3[_0x1bfe[67]]% 2?_0x47f2x5= _0x47f2x3[Math[_0x1bfe[519]](_0x47f2x3[_0x1bfe[67]]/ 2)]:(_0x47f2x5= _0x47f2x3[_0x1bfe[67]]/ 2,_0x47f2x2= _0x47f2x3[_0x47f2x5- 1],_0x47f2x3= _0x47f2x3[_0x47f2x5],_0x47f2x5= new mxPoint(_0x47f2x2[_0x1bfe[235]]+ (_0x47f2x3[_0x1bfe[235]]- _0x47f2x2[_0x1bfe[235]])/ 2,_0x47f2x2[_0x1bfe[236]]+ (_0x47f2x3[_0x1bfe[236]]- _0x47f2x2[_0x1bfe[236]])/ 2))):(_0x47f2x5= new mxPoint,_0x47f2x5[_0x1bfe[235]]= this[_0x1bfe[611]]== mxConstants[_0x1bfe[2132]]?_0x47f2x2[_0x1bfe[235]]:this[_0x1bfe[611]]== mxConstants[_0x1bfe[479]]?_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]/ 2:_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]],_0x47f2x5[_0x1bfe[236]]= this[_0x1bfe[123]]== mxConstants[_0x1bfe[1687]]?_0x47f2x2[_0x1bfe[236]]:this[_0x1bfe[123]]== mxConstants[_0x1bfe[481]]?_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]/ 2:_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]);return new mxRectangle(Math[_0x1bfe[488]](_0x47f2x5[_0x1bfe[235]]- (_0x47f2x9* this[_0x1bfe[2354]]- this[_0x1bfe[1368]][_0x1bfe[235]])* _0x47f2x4),Math[_0x1bfe[488]](_0x47f2x5[_0x1bfe[236]]- (_0x47f2xa* this[_0x1bfe[2354]]- this[_0x1bfe[1368]][_0x1bfe[236]])* _0x47f2x4),_0x47f2x9* _0x47f2x4,_0x47f2xa* _0x47f2x4)};mxCellOverlay[_0x1bfe[202]][_0x1bfe[2591]]= function(){return this[_0x1bfe[2718]]};function mxOutline(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1097]]= _0x47f2x2;null!= _0x47f2x3&& this[_0x1bfe[176]](_0x47f2x3)}mxOutline[_0x1bfe[202]][_0x1bfe[1097]]= null;mxOutline[_0x1bfe[202]][_0x1bfe[2136]]= null;mxOutline[_0x1bfe[202]][_0x1bfe[2720]]= mxConstants[_0x1bfe[2333]];mxOutline[_0x1bfe[202]][_0x1bfe[984]]= !0;mxOutline[_0x1bfe[202]][_0x1bfe[2721]]= !0;mxOutline[_0x1bfe[202]][_0x1bfe[467]]= 10;mxOutline[_0x1bfe[202]][_0x1bfe[2722]]= 8;mxOutline[_0x1bfe[202]][_0x1bfe[2723]]= !1;mxOutline[_0x1bfe[202]][_0x1bfe[2724]]= null;mxOutline[_0x1bfe[202]][_0x1bfe[1063]]= !1;mxOutline[_0x1bfe[202]][_0x1bfe[176]]= function(_0x47f2x2){this[_0x1bfe[2136]]= new mxGraph(_0x47f2x2,this[_0x1bfe[1097]][_0x1bfe[502]](),this[_0x1bfe[2720]],this[_0x1bfe[1097]][_0x1bfe[2434]]());this[_0x1bfe[2136]][_0x1bfe[2206]]= !1;this[_0x1bfe[2136]][_0x1bfe[1012]]= !1;var _0x47f2x3=this[_0x1bfe[2136]][_0x1bfe[1177]];this[_0x1bfe[2136]][_0x1bfe[1177]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){!this[_0x1bfe[1063]]&& null!= this[_0x1bfe[2136]]&& _0x47f2x3[_0x1bfe[183]](this[_0x1bfe[2136]],arguments)});mxClient[_0x1bfe[48]]&& (_0x47f2x2= this[_0x1bfe[2136]][_0x1bfe[249]]()[_0x1bfe[2051]]()[_0x1bfe[265]],_0x47f2x2[_0x1bfe[57]](_0x1bfe[2725],_0x1bfe[2726]),_0x47f2x2[_0x1bfe[57]](_0x1bfe[2727],_0x1bfe[2726]));this[_0x1bfe[2136]][_0x1bfe[2409]]= !1;this[_0x1bfe[2136]][_0x1bfe[995]](!1);this[_0x1bfe[2728]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){!this[_0x1bfe[1063]]&& !this[_0x1bfe[1124]]&& this[_0x1bfe[2729]]()});this[_0x1bfe[1097]][_0x1bfe[502]]()[_0x1bfe[169]](mxEvent.CHANGE,this[_0x1bfe[2728]]);this[_0x1bfe[2136]][_0x1bfe[1133]](this);_0x47f2x2= this[_0x1bfe[1097]][_0x1bfe[249]]();_0x47f2x2[_0x1bfe[169]](mxEvent.SCALE,this[_0x1bfe[2728]]);_0x47f2x2[_0x1bfe[169]](mxEvent.TRANSLATE,this[_0x1bfe[2728]]);_0x47f2x2[_0x1bfe[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0x1bfe[2728]]);_0x47f2x2[_0x1bfe[169]](mxEvent.DOWN,this[_0x1bfe[2728]]);_0x47f2x2[_0x1bfe[169]](mxEvent.UP,this[_0x1bfe[2728]]);mxEvent[_0x1bfe[169]](this[_0x1bfe[1097]][_0x1bfe[526]],_0x1bfe[276],this[_0x1bfe[2728]]);this[_0x1bfe[2730]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[2723]]&& this[_0x1bfe[2728]][_0x1bfe[183]](this,arguments)});this[_0x1bfe[1097]][_0x1bfe[169]](mxEvent.PAN,this[_0x1bfe[2730]]);this[_0x1bfe[2731]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[2136]][_0x1bfe[2341]](this[_0x1bfe[1097]][_0x1bfe[2434]]());this[_0x1bfe[2136]][_0x1bfe[802]]()});this[_0x1bfe[1097]][_0x1bfe[169]](mxEvent.REFRESH,this[_0x1bfe[2731]]);this[_0x1bfe[1562]]= new mxRectangle(0,0,0,0);this[_0x1bfe[2732]]= new mxRectangleShape(this[_0x1bfe[1562]],null,mxConstants.OUTLINE_COLOR,mxConstants.OUTLINE_STROKEWIDTH);this[_0x1bfe[2732]][_0x1bfe[507]]= this[_0x1bfe[2136]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[1523]]:mxConstants[_0x1bfe[508]];this[_0x1bfe[2732]][_0x1bfe[176]](this[_0x1bfe[2136]][_0x1bfe[249]]()[_0x1bfe[1524]]());mxEvent[_0x1bfe[2733]](this[_0x1bfe[2732]][_0x1bfe[252]],this[_0x1bfe[2136]]);this[_0x1bfe[2732]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[1537]]= _0x1bfe[110];this[_0x1bfe[2734]]= this[_0x1bfe[2735]]();this[_0x1bfe[2734]][_0x1bfe[176]](this[_0x1bfe[2136]][_0x1bfe[249]]()[_0x1bfe[1524]]());this[_0x1bfe[984]]&& (this[_0x1bfe[2734]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[356]);mxEvent[_0x1bfe[169]](this[_0x1bfe[2734]][_0x1bfe[252]],mxClient[_0x1bfe[754]]?_0x1bfe[755]:_0x1bfe[751],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[2136]][_0x1bfe[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x47f2x2))}));this[_0x1bfe[2732]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[495]]= this[_0x1bfe[2721]]?_0x1bfe[110]:_0x1bfe[130];this[_0x1bfe[2734]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[495]]= this[_0x1bfe[2732]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[495]];this[_0x1bfe[2732]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[582];this[_0x1bfe[2729]](!1)};mxOutline[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxOutline[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxOutline[_0x1bfe[202]][_0x1bfe[2736]]= function(_0x47f2x2){this[_0x1bfe[2734]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x47f2x2?_0x1bfe[189]:_0x1bfe[188]};mxOutline[_0x1bfe[202]][_0x1bfe[802]]= function(){this[_0x1bfe[2729]](!0)};mxOutline[_0x1bfe[202]][_0x1bfe[2735]]= function(){var _0x47f2x2=null!= this[_0x1bfe[2724]]? new mxImageShape( new mxRectangle(0,0,this[_0x1bfe[2724]][_0x1bfe[117]],this[_0x1bfe[2724]][_0x1bfe[119]]),this[_0x1bfe[2724]][_0x1bfe[390]]): new mxRectangleShape( new mxRectangle(0,0,this[_0x1bfe[2722]],this[_0x1bfe[2722]]),mxConstants.OUTLINE_HANDLE_FILLCOLOR,mxConstants.OUTLINE_HANDLE_STROKECOLOR);_0x47f2x2[_0x1bfe[507]]= this[_0x1bfe[2136]][_0x1bfe[507]];return _0x47f2x2};mxOutline[_0x1bfe[202]][_0x1bfe[2737]]= function(){return new mxRectangle(0,0,this[_0x1bfe[1097]][_0x1bfe[526]][_0x1bfe[1526]],this[_0x1bfe[1097]][_0x1bfe[526]][_0x1bfe[191]])};mxOutline[_0x1bfe[202]][_0x1bfe[2738]]= function(_0x47f2x2){return null};mxOutline[_0x1bfe[202]][_0x1bfe[2729]]= function(_0x47f2x2){if(null!= this[_0x1bfe[1097]]){var _0x47f2x3=this[_0x1bfe[1097]][_0x1bfe[441]][_0x1bfe[255]],_0x47f2x4=this[_0x1bfe[1097]][_0x1bfe[517]](),_0x47f2x4= new mxRectangle(_0x47f2x4[_0x1bfe[235]]/ _0x47f2x3+ this[_0x1bfe[1097]][_0x1bfe[1136]],_0x47f2x4[_0x1bfe[236]]/ _0x47f2x3+ this[_0x1bfe[1097]][_0x1bfe[1137]],_0x47f2x4[_0x1bfe[117]]/ _0x47f2x3,_0x47f2x4[_0x1bfe[119]]/ _0x47f2x3),_0x47f2x5= new mxRectangle(0,0,this[_0x1bfe[1097]][_0x1bfe[526]][_0x1bfe[159]]/ _0x47f2x3,this[_0x1bfe[1097]][_0x1bfe[526]][_0x1bfe[157]]/ _0x47f2x3),_0x47f2x9=_0x47f2x4[_0x1bfe[238]]();_0x47f2x9[_0x1bfe[99]](_0x47f2x5);var _0x47f2xa=this[_0x1bfe[2737]](),_0x47f2x5=Math[_0x1bfe[160]](_0x47f2xa[_0x1bfe[117]]/ _0x47f2x3,_0x47f2x9[_0x1bfe[117]]),_0x47f2x3=Math[_0x1bfe[160]](_0x47f2xa[_0x1bfe[119]]/ _0x47f2x3,_0x47f2x9[_0x1bfe[119]]),_0x47f2x9=Math[_0x1bfe[160]](0,this[_0x1bfe[2136]][_0x1bfe[526]][_0x1bfe[159]]- this[_0x1bfe[467]]),_0x47f2xa=Math[_0x1bfe[160]](0,this[_0x1bfe[2136]][_0x1bfe[526]][_0x1bfe[157]]- this[_0x1bfe[467]]),_0x47f2x9=Math[_0x1bfe[243]](_0x47f2x9/ _0x47f2x5,_0x47f2xa/ _0x47f2x3);if(0< _0x47f2x9){this[_0x1bfe[2136]][_0x1bfe[249]]()[_0x1bfe[255]]!= _0x47f2x9&& (this[_0x1bfe[2136]][_0x1bfe[249]]()[_0x1bfe[255]]= _0x47f2x9,_0x47f2x2= !0);_0x47f2x5= this[_0x1bfe[2136]][_0x1bfe[249]]();_0x47f2x5[_0x1bfe[1741]]!= this[_0x1bfe[1097]][_0x1bfe[249]]()[_0x1bfe[1741]]&& _0x47f2x5[_0x1bfe[2257]](this[_0x1bfe[1097]][_0x1bfe[249]]()[_0x1bfe[1741]]);var _0x47f2x3=this[_0x1bfe[1097]][_0x1bfe[441]][_0x1bfe[513]],_0x47f2xa=_0x47f2x3[_0x1bfe[235]]+ this[_0x1bfe[1097]][_0x1bfe[1136]],_0x47f2x12=_0x47f2x3[_0x1bfe[236]]+ this[_0x1bfe[1097]][_0x1bfe[1137]],_0x47f2x9=this[_0x1bfe[2738]](_0x47f2x9);null!= _0x47f2x9&& (_0x47f2xa+= _0x47f2x9[_0x1bfe[235]],_0x47f2x12+= _0x47f2x9[_0x1bfe[236]]);0> _0x47f2x4[_0x1bfe[235]]&& (_0x47f2xa-= _0x47f2x4[_0x1bfe[235]]);0> _0x47f2x4[_0x1bfe[236]]&& (_0x47f2x12-= _0x47f2x4[_0x1bfe[236]]);if(_0x47f2x5[_0x1bfe[513]][_0x1bfe[235]]!= _0x47f2xa|| _0x47f2x5[_0x1bfe[513]][_0x1bfe[236]]!= _0x47f2x12){_0x47f2x5[_0x1bfe[513]][_0x1bfe[235]]= _0x47f2xa,_0x47f2x5[_0x1bfe[513]][_0x1bfe[236]]= _0x47f2x12,_0x47f2x2= !0};var _0x47f2x4=_0x47f2x5[_0x1bfe[513]],_0x47f2x9=this[_0x1bfe[1097]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2xa=_0x47f2x9/ _0x47f2x5[_0x1bfe[255]],_0x47f2x12=1/ _0x47f2x5[_0x1bfe[255]],_0x47f2x13=this[_0x1bfe[1097]][_0x1bfe[526]];this[_0x1bfe[1562]]= new mxRectangle((_0x47f2x4[_0x1bfe[235]]- _0x47f2x3[_0x1bfe[235]]- this[_0x1bfe[1097]][_0x1bfe[1136]])/ _0x47f2x12,(_0x47f2x4[_0x1bfe[236]]- _0x47f2x3[_0x1bfe[236]]- this[_0x1bfe[1097]][_0x1bfe[1137]])/ _0x47f2x12,_0x47f2x13[_0x1bfe[159]]/ _0x47f2xa,_0x47f2x13[_0x1bfe[157]]/ _0x47f2xa);this[_0x1bfe[1562]][_0x1bfe[235]]+= this[_0x1bfe[1097]][_0x1bfe[526]][_0x1bfe[360]]* _0x47f2x5[_0x1bfe[255]]/ _0x47f2x9;this[_0x1bfe[1562]][_0x1bfe[236]]+= this[_0x1bfe[1097]][_0x1bfe[526]][_0x1bfe[190]]* _0x47f2x5[_0x1bfe[255]]/ _0x47f2x9;_0x47f2x4= this[_0x1bfe[2732]][_0x1bfe[1562]];if(_0x47f2x4[_0x1bfe[235]]!= this[_0x1bfe[1562]][_0x1bfe[235]]|| _0x47f2x4[_0x1bfe[236]]!= this[_0x1bfe[1562]][_0x1bfe[236]]|| _0x47f2x4[_0x1bfe[117]]!= this[_0x1bfe[1562]][_0x1bfe[117]]|| _0x47f2x4[_0x1bfe[119]]!= this[_0x1bfe[1562]][_0x1bfe[119]]){this[_0x1bfe[2732]][_0x1bfe[1562]]= this[_0x1bfe[1562]],this[_0x1bfe[2732]][_0x1bfe[258]]()};_0x47f2x4= this[_0x1bfe[2734]][_0x1bfe[1562]];_0x47f2x5= new mxRectangle(this[_0x1bfe[1562]][_0x1bfe[235]]+ this[_0x1bfe[1562]][_0x1bfe[117]]- _0x47f2x4[_0x1bfe[117]]/ 2,this[_0x1bfe[1562]][_0x1bfe[236]]+ this[_0x1bfe[1562]][_0x1bfe[119]]- _0x47f2x4[_0x1bfe[119]]/ 2,_0x47f2x4[_0x1bfe[117]],_0x47f2x4[_0x1bfe[119]]);if(_0x47f2x4[_0x1bfe[235]]!= _0x47f2x5[_0x1bfe[235]]|| _0x47f2x4[_0x1bfe[236]]!= _0x47f2x5[_0x1bfe[236]]|| _0x47f2x4[_0x1bfe[117]]!= _0x47f2x5[_0x1bfe[117]]|| _0x47f2x4[_0x1bfe[119]]!= _0x47f2x5[_0x1bfe[119]]){this[_0x1bfe[2734]][_0x1bfe[1562]]= _0x47f2x5,_0x1bfe[188]!= this[_0x1bfe[2734]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]&& this[_0x1bfe[2734]][_0x1bfe[258]]()};_0x47f2x2&& this[_0x1bfe[2136]][_0x1bfe[441]][_0x1bfe[2259]]()}}};mxOutline[_0x1bfe[202]][_0x1bfe[787]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[984]]&& this[_0x1bfe[2721]]&& (this[_0x1bfe[499]]= _0x47f2x3[_0x1bfe[729]](this[_0x1bfe[2734]]),this[_0x1bfe[2739]]= _0x47f2x3[_0x1bfe[730]](),this[_0x1bfe[2740]]= _0x47f2x3[_0x1bfe[732]](),this[_0x1bfe[1124]]= !0,this[_0x1bfe[1097]][_0x1bfe[2365]]&& mxUtils[_0x1bfe[1134]](this[_0x1bfe[1097]][_0x1bfe[526]])?(this[_0x1bfe[2741]]= this[_0x1bfe[1097]][_0x1bfe[526]][_0x1bfe[360]],this[_0x1bfe[2742]]= this[_0x1bfe[1097]][_0x1bfe[526]][_0x1bfe[190]]):this[_0x1bfe[2742]]= this[_0x1bfe[2741]]= 0);_0x47f2x3[_0x1bfe[722]]()};mxOutline[_0x1bfe[202]][_0x1bfe[788]]= function(_0x47f2x2,_0x47f2x3){if(this[_0x1bfe[1124]]){this[_0x1bfe[2732]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[495]]= this[_0x1bfe[2721]]?_0x1bfe[110]:_0x1bfe[130];this[_0x1bfe[2734]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[495]]= this[_0x1bfe[2732]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[495]];var _0x47f2x4=_0x47f2x3[_0x1bfe[730]]()- this[_0x1bfe[2739]],_0x47f2x5=_0x47f2x3[_0x1bfe[732]]()- this[_0x1bfe[2740]],_0x47f2x9=null;if(this[_0x1bfe[499]]){_0x47f2x9= this[_0x1bfe[1097]][_0x1bfe[526]],_0x47f2x5= _0x47f2x4/ (_0x47f2x9[_0x1bfe[159]]/ _0x47f2x9[_0x1bfe[157]]),_0x47f2x9= new mxRectangle(this[_0x1bfe[1562]][_0x1bfe[235]],this[_0x1bfe[1562]][_0x1bfe[236]],Math[_0x1bfe[160]](1,this[_0x1bfe[1562]][_0x1bfe[117]]+ _0x47f2x4),Math[_0x1bfe[160]](1,this[_0x1bfe[1562]][_0x1bfe[119]]+ _0x47f2x5)),this[_0x1bfe[2732]][_0x1bfe[1562]]= _0x47f2x9,this[_0x1bfe[2732]][_0x1bfe[258]]()}else {var _0x47f2xa=this[_0x1bfe[2136]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x9= new mxRectangle(this[_0x1bfe[1562]][_0x1bfe[235]]+ _0x47f2x4,this[_0x1bfe[1562]][_0x1bfe[236]]+ _0x47f2x5,this[_0x1bfe[1562]][_0x1bfe[117]],this[_0x1bfe[1562]][_0x1bfe[119]]);this[_0x1bfe[2732]][_0x1bfe[1562]]= _0x47f2x9;this[_0x1bfe[2732]][_0x1bfe[258]]();_0x47f2x4= _0x47f2x4/ _0x47f2xa* this[_0x1bfe[1097]][_0x1bfe[249]]()[_0x1bfe[255]];_0x47f2x5= _0x47f2x5/ _0x47f2xa* this[_0x1bfe[1097]][_0x1bfe[249]]()[_0x1bfe[255]];this[_0x1bfe[1097]][_0x1bfe[1135]](-_0x47f2x4- this[_0x1bfe[2741]],-_0x47f2x5- this[_0x1bfe[2742]])};_0x47f2x4= this[_0x1bfe[2734]][_0x1bfe[1562]];this[_0x1bfe[2734]][_0x1bfe[1562]]= new mxRectangle(_0x47f2x9[_0x1bfe[235]]+ _0x47f2x9[_0x1bfe[117]]- _0x47f2x4[_0x1bfe[117]]/ 2,_0x47f2x9[_0x1bfe[236]]+ _0x47f2x9[_0x1bfe[119]]- _0x47f2x4[_0x1bfe[119]]/ 2,_0x47f2x4[_0x1bfe[117]],_0x47f2x4[_0x1bfe[119]]);_0x1bfe[188]!= this[_0x1bfe[2734]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]&& this[_0x1bfe[2734]][_0x1bfe[258]]();_0x47f2x3[_0x1bfe[722]]()}};mxOutline[_0x1bfe[202]][_0x1bfe[789]]= function(_0x47f2x2,_0x47f2x3){if(this[_0x1bfe[1124]]){var _0x47f2x4=_0x47f2x3[_0x1bfe[730]]()- this[_0x1bfe[2739]],_0x47f2x5=_0x47f2x3[_0x1bfe[732]]()- this[_0x1bfe[2740]];if(0< Math[_0x1bfe[425]](_0x47f2x4)|| 0< Math[_0x1bfe[425]](_0x47f2x5)){if(this[_0x1bfe[499]]){var _0x47f2x5=this[_0x1bfe[2732]][_0x1bfe[1562]][_0x1bfe[117]],_0x47f2x9=this[_0x1bfe[1097]][_0x1bfe[249]]()[_0x1bfe[255]];this[_0x1bfe[1097]][_0x1bfe[2561]](_0x47f2x9- _0x47f2x4* _0x47f2x9/ _0x47f2x5,!1)}else {if(!this[_0x1bfe[1097]][_0x1bfe[2365]]|| !mxUtils[_0x1bfe[1134]](this[_0x1bfe[1097]][_0x1bfe[526]])){this[_0x1bfe[1097]][_0x1bfe[1135]](0,0),_0x47f2x4/= this[_0x1bfe[2136]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x5/= this[_0x1bfe[2136]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x9= this[_0x1bfe[1097]][_0x1bfe[249]]()[_0x1bfe[513]],this[_0x1bfe[1097]][_0x1bfe[249]]()[_0x1bfe[1147]](_0x47f2x9[_0x1bfe[235]]- _0x47f2x4,_0x47f2x9[_0x1bfe[236]]- _0x47f2x5)}};this[_0x1bfe[2729]]();_0x47f2x3[_0x1bfe[722]]()};this[_0x1bfe[1983]]= null;this[_0x1bfe[1124]]= !1}};mxOutline[_0x1bfe[202]][_0x1bfe[515]]= function(){null!= this[_0x1bfe[1097]]&& (this[_0x1bfe[1097]][_0x1bfe[745]](this[_0x1bfe[2730]]),this[_0x1bfe[1097]][_0x1bfe[745]](this[_0x1bfe[2731]]),this[_0x1bfe[1097]][_0x1bfe[502]]()[_0x1bfe[745]](this[_0x1bfe[2728]]),this[_0x1bfe[1097]][_0x1bfe[249]]()[_0x1bfe[745]](this[_0x1bfe[2728]]),mxEvent[_0x1bfe[169]](this[_0x1bfe[1097]][_0x1bfe[526]],_0x1bfe[276],this[_0x1bfe[2728]]),this[_0x1bfe[1097]]= null);null!= this[_0x1bfe[2136]]&& (this[_0x1bfe[2136]][_0x1bfe[1148]](this),this[_0x1bfe[2136]][_0x1bfe[515]](),this[_0x1bfe[2136]]= null);null!= this[_0x1bfe[2732]]&& (this[_0x1bfe[2732]][_0x1bfe[515]](),this[_0x1bfe[2732]]= null);null!= this[_0x1bfe[2734]]&& (this[_0x1bfe[2734]][_0x1bfe[515]](),this[_0x1bfe[2734]]= null)};function mxMultiplicity(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15){this[_0x1bfe[1097]]= _0x47f2x2;this[_0x1bfe[60]]= _0x47f2x3;this[_0x1bfe[2588]]= _0x47f2x4;this[_0x1bfe[131]]= _0x47f2x5;this[_0x1bfe[243]]= null!= _0x47f2x9?_0x47f2x9:0;this[_0x1bfe[160]]= null!= _0x47f2xa?_0x47f2xa:_0x1bfe[2743];this[_0x1bfe[2744]]= _0x47f2x12;this[_0x1bfe[2589]]= mxResources[_0x1bfe[203]](_0x47f2x13)|| _0x47f2x13;this[_0x1bfe[2745]]= mxResources[_0x1bfe[203]](_0x47f2x14)|| _0x47f2x14;this[_0x1bfe[2746]]= null!= _0x47f2x15?_0x47f2x15:!0}mxMultiplicity[_0x1bfe[202]][_0x1bfe[60]]= null;mxMultiplicity[_0x1bfe[202]][_0x1bfe[2588]]= null;mxMultiplicity[_0x1bfe[202]][_0x1bfe[131]]= null;mxMultiplicity[_0x1bfe[202]][_0x1bfe[1097]]= null;mxMultiplicity[_0x1bfe[202]][_0x1bfe[243]]= null;mxMultiplicity[_0x1bfe[202]][_0x1bfe[160]]= null;mxMultiplicity[_0x1bfe[202]][_0x1bfe[2744]]= null;mxMultiplicity[_0x1bfe[202]][_0x1bfe[2746]]= !0;mxMultiplicity[_0x1bfe[202]][_0x1bfe[2589]]= null;mxMultiplicity[_0x1bfe[202]][_0x1bfe[2745]]= null;mxMultiplicity[_0x1bfe[202]][_0x1bfe[2583]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){var _0x47f2x12=_0x1bfe[110];if(this[_0x1bfe[1097]]&& this[_0x1bfe[2747]](_0x47f2x2,_0x47f2x4,_0x47f2x3)|| !this[_0x1bfe[1097]]&& this[_0x1bfe[2747]](_0x47f2x2,_0x47f2x5,_0x47f2x3)){if(null!= this[_0x1bfe[2589]]&& (this[_0x1bfe[1097]]&& (0== this[_0x1bfe[160]]|| _0x47f2x9>= this[_0x1bfe[160]])|| !this[_0x1bfe[1097]]&& (0== this[_0x1bfe[160]]|| _0x47f2xa>= this[_0x1bfe[160]]))){_0x47f2x12+= this[_0x1bfe[2589]]+ _0x1bfe[192]};null!= this[_0x1bfe[2744]]&& (null!= this[_0x1bfe[2745]]&& 0< this[_0x1bfe[2744]][_0x1bfe[67]])&& (this[_0x1bfe[2748]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5)|| (_0x47f2x12+= this[_0x1bfe[2745]]+ _0x1bfe[192]))};return 0< _0x47f2x12[_0x1bfe[67]]?_0x47f2x12:null};mxMultiplicity[_0x1bfe[202]][_0x1bfe[2748]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x3= _0x47f2x2[_0x1bfe[251]][_0x1bfe[433]](_0x47f2x4);_0x47f2x5= _0x47f2x2[_0x1bfe[251]][_0x1bfe[433]](_0x47f2x5);_0x47f2x4= !this[_0x1bfe[2746]];for(var _0x47f2x9=this[_0x1bfe[2744]],_0x47f2xa=0;_0x47f2xa< _0x47f2x9[_0x1bfe[67]];_0x47f2xa++){if(this[_0x1bfe[1097]]&& this[_0x1bfe[2749]](_0x47f2x2,_0x47f2x5,_0x47f2x9[_0x47f2xa])){_0x47f2x4= this[_0x1bfe[2746]];break}else {if(!this[_0x1bfe[1097]]&& this[_0x1bfe[2749]](_0x47f2x2,_0x47f2x3,_0x47f2x9[_0x47f2xa])){_0x47f2x4= this[_0x1bfe[2746]];break}}};return _0x47f2x4};mxMultiplicity[_0x1bfe[202]][_0x1bfe[2747]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= _0x47f2x2[_0x1bfe[251]][_0x1bfe[433]](_0x47f2x3);return this[_0x1bfe[2749]](_0x47f2x2,_0x47f2x3,this[_0x1bfe[60]],this[_0x1bfe[2588]],this[_0x1bfe[131]])};mxMultiplicity[_0x1bfe[202]][_0x1bfe[2749]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){return null!= _0x47f2x3?isNaN(_0x47f2x3[_0x1bfe[288]])?_0x47f2x3== _0x47f2x4:mxUtils[_0x1bfe[1331]](_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9):!1};function mxLayoutManager(_0x47f2x2){this[_0x1bfe[2750]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x4){this[_0x1bfe[994]]()&& this[_0x1bfe[823]](_0x47f2x4[_0x1bfe[720]](_0x1bfe[1061]))});this[_0x1bfe[2317]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x4){this[_0x1bfe[994]]()&& this[_0x1bfe[835]](_0x47f2x4[_0x1bfe[720]](_0x1bfe[895]),_0x47f2x4[_0x1bfe[720]](_0x1bfe[763]))});this[_0x1bfe[1178]](_0x47f2x2)}mxLayoutManager[_0x1bfe[202]]= new mxEventSource;mxLayoutManager[_0x1bfe[202]][_0x1bfe[196]]= mxLayoutManager;mxLayoutManager[_0x1bfe[202]][_0x1bfe[1179]]= null;mxLayoutManager[_0x1bfe[202]][_0x1bfe[2751]]= !0;mxLayoutManager[_0x1bfe[202]][_0x1bfe[984]]= !0;mxLayoutManager[_0x1bfe[202]][_0x1bfe[2728]]= null;mxLayoutManager[_0x1bfe[202]][_0x1bfe[2317]]= null;mxLayoutManager[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxLayoutManager[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxLayoutManager[_0x1bfe[202]][_0x1bfe[2752]]= function(){return this[_0x1bfe[2751]]};mxLayoutManager[_0x1bfe[202]][_0x1bfe[2753]]= function(_0x47f2x2){this[_0x1bfe[2751]]= _0x47f2x2};mxLayoutManager[_0x1bfe[202]][_0x1bfe[1703]]= function(){return this[_0x1bfe[1179]]};mxLayoutManager[_0x1bfe[202]][_0x1bfe[1178]]= function(_0x47f2x2){if(null!= this[_0x1bfe[1179]]){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]]();_0x47f2x3[_0x1bfe[745]](this[_0x1bfe[2750]]);this[_0x1bfe[1179]][_0x1bfe[745]](this[_0x1bfe[2317]])};this[_0x1bfe[1179]]= _0x47f2x2;null!= this[_0x1bfe[1179]]&& (_0x47f2x3= this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x3[_0x1bfe[169]](mxEvent.BEFORE_UNDO,this[_0x1bfe[2750]]),this[_0x1bfe[1179]][_0x1bfe[169]](mxEvent.MOVE_CELLS,this[_0x1bfe[2317]]))};mxLayoutManager[_0x1bfe[202]][_0x1bfe[2754]]= function(_0x47f2x2){return null};mxLayoutManager[_0x1bfe[202]][_0x1bfe[823]]= function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[2755]](_0x47f2x2[_0x1bfe[1065]]);var _0x47f2x3=this[_0x1bfe[1703]]()[_0x1bfe[502]]();if(this[_0x1bfe[2752]]()){for(var _0x47f2x4=_0x47f2x3[_0x1bfe[1977]](_0x47f2x2);0< _0x47f2x4[_0x1bfe[67]];){_0x47f2x2= _0x47f2x2[_0x1bfe[1919]](_0x47f2x4),_0x47f2x4= _0x47f2x3[_0x1bfe[1977]](_0x47f2x4)}};this[_0x1bfe[828]](mxUtils[_0x1bfe[1779]](_0x47f2x2,!1))};mxLayoutManager[_0x1bfe[202]][_0x1bfe[835]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2&& null!= _0x47f2x3){for(var _0x47f2x4=mxUtils[_0x1bfe[2196]](this[_0x1bfe[1703]]()[_0x1bfe[526]],mxEvent[_0x1bfe[731]](_0x47f2x3),mxEvent[_0x1bfe[733]](_0x47f2x3)),_0x47f2x5=this[_0x1bfe[1703]]()[_0x1bfe[502]](),_0x47f2x9=0;_0x47f2x9< _0x47f2x2[_0x1bfe[67]];_0x47f2x9++){var _0x47f2xa=this[_0x1bfe[2754]](_0x47f2x5[_0x1bfe[1197]](_0x47f2x2[_0x47f2x9]));null!= _0x47f2xa&& _0x47f2xa[_0x1bfe[1702]](_0x47f2x2[_0x47f2x9],_0x47f2x4[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]])}}};mxLayoutManager[_0x1bfe[202]][_0x1bfe[2755]]= function(_0x47f2x2){for(var _0x47f2x3=[],_0x47f2x4={},_0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){var _0x47f2x9=_0x47f2x2[_0x47f2x5];if(_0x47f2x9 instanceof mxRootChange){return []};for(var _0x47f2x9=this[_0x1bfe[2756]](_0x47f2x9),_0x47f2xa=0;_0x47f2xa< _0x47f2x9[_0x1bfe[67]];_0x47f2xa++){if(null!= _0x47f2x9[_0x47f2xa]){var _0x47f2x12=mxCellPath[_0x1bfe[385]](_0x47f2x9[_0x47f2xa]);null== _0x47f2x4[_0x47f2x12]&& (_0x47f2x4[_0x47f2x12]= _0x47f2x9[_0x47f2xa],_0x47f2x3[_0x1bfe[207]](_0x47f2x9[_0x47f2xa]))}}};return _0x47f2x3};mxLayoutManager[_0x1bfe[202]][_0x1bfe[2756]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1703]]()[_0x1bfe[502]]();return _0x47f2x2 instanceof mxChildChange?[_0x47f2x2[_0x1bfe[247]],_0x47f2x2[_0x1bfe[257]],_0x47f2x3[_0x1bfe[1197]](_0x47f2x2[_0x1bfe[247]])]:_0x47f2x2 instanceof mxTerminalChange|| _0x47f2x2 instanceof mxGeometryChange?[_0x47f2x2[_0x1bfe[246]],_0x47f2x3[_0x1bfe[1197]](_0x47f2x2[_0x1bfe[246]])]:[]};mxLayoutManager[_0x1bfe[202]][_0x1bfe[828]]= function(_0x47f2x2){if(0< _0x47f2x2[_0x1bfe[67]]){var _0x47f2x3=this[_0x1bfe[1703]]()[_0x1bfe[502]]();_0x47f2x3[_0x1bfe[473]]();try{for(var _0x47f2x4=null,_0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){_0x47f2x2[_0x47f2x5]!= _0x47f2x3[_0x1bfe[501]]()&& _0x47f2x2[_0x47f2x5]!= _0x47f2x4&& (_0x47f2x4= _0x47f2x2[_0x47f2x5],this[_0x1bfe[2757]](this[_0x1bfe[2754]](_0x47f2x4),_0x47f2x4))};this[_0x1bfe[746]]( new mxEventObject(mxEvent.LAYOUT_CELLS,_0x1bfe[895],_0x47f2x2))}finally{_0x47f2x3[_0x1bfe[476]]()}}};mxLayoutManager[_0x1bfe[202]][_0x1bfe[2757]]= function(_0x47f2x2,_0x47f2x3){null!= _0x47f2x2&& null!= _0x47f2x3&& _0x47f2x2[_0x1bfe[350]](_0x47f2x3)};mxLayoutManager[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[1178]](null)};function mxSpaceManager(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[2758]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[994]]()&& this[_0x1bfe[837]](_0x47f2x3[_0x1bfe[720]](_0x1bfe[895]))});this[_0x1bfe[2759]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[994]]()&& this[_0x1bfe[837]](_0x47f2x3[_0x1bfe[720]](_0x1bfe[895]))});this[_0x1bfe[2760]]= null!= _0x47f2x3?_0x47f2x3:!0;this[_0x1bfe[2761]]= null!= _0x47f2x4?_0x47f2x4:!0;this[_0x1bfe[2392]]= null!= _0x47f2x5?_0x47f2x5:!0;this[_0x1bfe[1178]](_0x47f2x2)}mxSpaceManager[_0x1bfe[202]]= new mxEventSource;mxSpaceManager[_0x1bfe[202]][_0x1bfe[196]]= mxSpaceManager;mxSpaceManager[_0x1bfe[202]][_0x1bfe[1179]]= null;mxSpaceManager[_0x1bfe[202]][_0x1bfe[984]]= !0;mxSpaceManager[_0x1bfe[202]][_0x1bfe[2760]]= !0;mxSpaceManager[_0x1bfe[202]][_0x1bfe[2761]]= !0;mxSpaceManager[_0x1bfe[202]][_0x1bfe[2392]]= !0;mxSpaceManager[_0x1bfe[202]][_0x1bfe[2758]]= null;mxSpaceManager[_0x1bfe[202]][_0x1bfe[2759]]= null;mxSpaceManager[_0x1bfe[202]][_0x1bfe[2762]]= function(_0x47f2x2){return !this[_0x1bfe[1703]]()[_0x1bfe[502]]()[_0x1bfe[1193]](_0x47f2x2)};mxSpaceManager[_0x1bfe[202]][_0x1bfe[2763]]= function(_0x47f2x2){return this[_0x1bfe[1703]]()[_0x1bfe[502]]()[_0x1bfe[1193]](_0x47f2x2)&& this[_0x1bfe[1703]]()[_0x1bfe[1712]](_0x47f2x2)};mxSpaceManager[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxSpaceManager[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxSpaceManager[_0x1bfe[202]][_0x1bfe[2764]]= function(){return this[_0x1bfe[2760]]};mxSpaceManager[_0x1bfe[202]][_0x1bfe[2765]]= function(_0x47f2x2){this[_0x1bfe[2760]]= _0x47f2x2};mxSpaceManager[_0x1bfe[202]][_0x1bfe[2766]]= function(){return this[_0x1bfe[2761]]};mxSpaceManager[_0x1bfe[202]][_0x1bfe[2767]]= function(_0x47f2x2){this[_0x1bfe[2761]]= _0x47f2x2};mxSpaceManager[_0x1bfe[202]][_0x1bfe[2678]]= function(){return this[_0x1bfe[2392]]};mxSpaceManager[_0x1bfe[202]][_0x1bfe[2679]]= function(_0x47f2x2){this[_0x1bfe[2392]]= _0x47f2x2};mxSpaceManager[_0x1bfe[202]][_0x1bfe[1703]]= function(){return this[_0x1bfe[1179]]};mxSpaceManager[_0x1bfe[202]][_0x1bfe[1178]]= function(_0x47f2x2){null!= this[_0x1bfe[1179]]&& (this[_0x1bfe[1179]][_0x1bfe[745]](this[_0x1bfe[2758]]),this[_0x1bfe[1179]][_0x1bfe[745]](this[_0x1bfe[2759]]));this[_0x1bfe[1179]]= _0x47f2x2;null!= this[_0x1bfe[1179]]&& (this[_0x1bfe[1179]][_0x1bfe[169]](mxEvent.RESIZE_CELLS,this[_0x1bfe[2758]]),this[_0x1bfe[1179]][_0x1bfe[169]](mxEvent.FOLD_CELLS,this[_0x1bfe[2759]]))};mxSpaceManager[_0x1bfe[202]][_0x1bfe[837]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]]();_0x47f2x3[_0x1bfe[473]]();try{for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){if(!this[_0x1bfe[2762]](_0x47f2x2[_0x47f2x4])){this[_0x1bfe[2768]](_0x47f2x2[_0x47f2x4]);break}}}finally{_0x47f2x3[_0x1bfe[476]]()}}};mxSpaceManager[_0x1bfe[202]][_0x1bfe[2768]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1703]](),_0x47f2x4=_0x47f2x3[_0x1bfe[249]](),_0x47f2x5=_0x47f2x3[_0x1bfe[502]](),_0x47f2x9=_0x47f2x4[_0x1bfe[248]](_0x47f2x2),_0x47f2xa=_0x47f2x4[_0x1bfe[248]](_0x47f2x5[_0x1bfe[1197]](_0x47f2x2));if(null!= _0x47f2x9&& null!= _0x47f2xa){var _0x47f2x12=this[_0x1bfe[2769]](_0x47f2x9),_0x47f2x13=_0x47f2x5[_0x1bfe[1721]](_0x47f2x2);if(null!= _0x47f2x12&& null!= _0x47f2x13){var _0x47f2x14=_0x47f2x4[_0x1bfe[513]],_0x47f2x15=_0x47f2x4[_0x1bfe[255]],_0x47f2x4=_0x47f2x9[_0x1bfe[235]]- _0x47f2xa[_0x1bfe[2078]][_0x1bfe[235]]- _0x47f2x14[_0x1bfe[235]]* _0x47f2x15,_0x47f2xa=_0x47f2x9[_0x1bfe[236]]- _0x47f2xa[_0x1bfe[2078]][_0x1bfe[236]]- _0x47f2x14[_0x1bfe[236]]* _0x47f2x15,_0x47f2x14=_0x47f2x9[_0x1bfe[235]]+ _0x47f2x9[_0x1bfe[117]],_0x47f2x16=_0x47f2x9[_0x1bfe[236]]+ _0x47f2x9[_0x1bfe[119]],_0x47f2x17=_0x47f2x9[_0x1bfe[117]]- _0x47f2x13[_0x1bfe[117]]* _0x47f2x15+ _0x47f2x4- _0x47f2x13[_0x1bfe[235]]* _0x47f2x15,_0x47f2x18=_0x47f2x9[_0x1bfe[119]]- _0x47f2x13[_0x1bfe[119]]* _0x47f2x15+ _0x47f2xa- _0x47f2x13[_0x1bfe[236]]* _0x47f2x15,_0x47f2x19=1- _0x47f2x13[_0x1bfe[117]]* _0x47f2x15/ _0x47f2x9[_0x1bfe[117]],_0x47f2x9=1- _0x47f2x13[_0x1bfe[119]]* _0x47f2x15/ _0x47f2x9[_0x1bfe[119]];_0x47f2x5[_0x1bfe[473]]();try{for(_0x47f2x13= 0;_0x47f2x13< _0x47f2x12[_0x1bfe[67]];_0x47f2x13++){_0x47f2x12[_0x47f2x13]!= _0x47f2x2&& this[_0x1bfe[2763]](_0x47f2x12[_0x47f2x13])&& this[_0x1bfe[2770]](_0x47f2x12[_0x47f2x13],_0x47f2x17,_0x47f2x18,_0x47f2x4,_0x47f2xa,_0x47f2x14,_0x47f2x16,_0x47f2x19,_0x47f2x9,this[_0x1bfe[2678]]()&& _0x47f2x3[_0x1bfe[2507]](_0x47f2x12[_0x47f2x13]))}}finally{_0x47f2x5[_0x1bfe[476]]()}}}};mxSpaceManager[_0x1bfe[202]][_0x1bfe[2770]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14,_0x47f2x15){_0x47f2x5= this[_0x1bfe[1703]]();var _0x47f2x16=_0x47f2x5[_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x2);if(null!= _0x47f2x16){var _0x47f2x17=_0x47f2x5[_0x1bfe[502]](),_0x47f2x18=_0x47f2x17[_0x1bfe[1721]](_0x47f2x2);if(null!= _0x47f2x18){_0x47f2x17[_0x1bfe[473]]();try{if(this[_0x1bfe[2764]]()){if(_0x47f2x16[_0x1bfe[235]]>= _0x47f2xa){_0x47f2x18= _0x47f2x18[_0x1bfe[238]](),_0x47f2x18[_0x1bfe[513]](-_0x47f2x3,0)}else {var _0x47f2x19=Math[_0x1bfe[160]](0,_0x47f2x16[_0x1bfe[235]]- x0),_0x47f2x18=_0x47f2x18[_0x1bfe[238]]();_0x47f2x18[_0x1bfe[513]](-_0x47f2x13* _0x47f2x19,0)}};if(this[_0x1bfe[2766]]()){if(_0x47f2x16[_0x1bfe[236]]>= _0x47f2x12){_0x47f2x18= _0x47f2x18[_0x1bfe[238]](),_0x47f2x18[_0x1bfe[513]](0,-_0x47f2x4)}else {var _0x47f2x1a=Math[_0x1bfe[160]](0,_0x47f2x16[_0x1bfe[236]]- _0x47f2x9),_0x47f2x18=_0x47f2x18[_0x1bfe[238]]();_0x47f2x18[_0x1bfe[513]](0,-_0x47f2x14* _0x47f2x1a)}};_0x47f2x18!= _0x47f2x17[_0x1bfe[1721]](_0x47f2x2)&& (_0x47f2x17[_0x1bfe[1724]](_0x47f2x2,_0x47f2x18),_0x47f2x15&& _0x47f2x5[_0x1bfe[2508]](_0x47f2x2))}finally{_0x47f2x17[_0x1bfe[476]]()}}}};mxSpaceManager[_0x1bfe[202]][_0x1bfe[2769]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1703]](),_0x47f2x4=_0x47f2x3[_0x1bfe[502]]()[_0x1bfe[1197]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x5=this[_0x1bfe[2766]](),_0x47f2x9=this[_0x1bfe[2764]]();return _0x47f2x3[_0x1bfe[2691]](_0x47f2x2[_0x1bfe[235]]+ (_0x47f2x5?0:_0x47f2x2[_0x1bfe[117]]),_0x47f2x2[_0x1bfe[236]]+ (_0x47f2x5&& _0x47f2x9?0:_0x47f2x2[_0x1bfe[119]]),_0x47f2x4,_0x47f2x9,_0x47f2x5)};mxSpaceManager[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[1178]](null)};function mxSwimlaneManager(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[662]]= null!= _0x47f2x3?_0x47f2x3:!0;this[_0x1bfe[2771]]= null!= _0x47f2x4?_0x47f2x4:!0;this[_0x1bfe[2772]]= null!= _0x47f2x5?_0x47f2x5:!0;this[_0x1bfe[2773]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[994]]()&& this[_0x1bfe[2774]]()&& this[_0x1bfe[833]](_0x47f2x3[_0x1bfe[720]](_0x1bfe[895]))});this[_0x1bfe[2758]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[994]]()&& this[_0x1bfe[2775]]()&& this[_0x1bfe[837]](_0x47f2x3[_0x1bfe[720]](_0x1bfe[895]))});this[_0x1bfe[1178]](_0x47f2x2)}mxSwimlaneManager[_0x1bfe[202]]= new mxEventSource;mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[196]]= mxSwimlaneManager;mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[1179]]= null;mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[984]]= !0;mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[662]]= !0;mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2771]]= !0;mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2772]]= !0;mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2773]]= null;mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2758]]= null;mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[1737]]= function(){return this[_0x1bfe[662]]};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2776]]= function(_0x47f2x2){this[_0x1bfe[662]]= _0x47f2x2};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2774]]= function(){return this[_0x1bfe[2771]]};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2777]]= function(_0x47f2x2){this[_0x1bfe[2771]]= _0x47f2x2};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2775]]= function(){return this[_0x1bfe[2772]]};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2778]]= function(_0x47f2x2){this[_0x1bfe[2772]]= _0x47f2x2};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[1703]]= function(){return this[_0x1bfe[1179]]};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[1178]]= function(_0x47f2x2){null!= this[_0x1bfe[1179]]&& (this[_0x1bfe[1179]][_0x1bfe[745]](this[_0x1bfe[2773]]),this[_0x1bfe[1179]][_0x1bfe[745]](this[_0x1bfe[2758]]));this[_0x1bfe[1179]]= _0x47f2x2;null!= this[_0x1bfe[1179]]&& (this[_0x1bfe[1179]][_0x1bfe[169]](mxEvent.ADD_CELLS,this[_0x1bfe[2773]]),this[_0x1bfe[1179]][_0x1bfe[169]](mxEvent.CELLS_RESIZED,this[_0x1bfe[2758]]))};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2779]]= function(_0x47f2x2){return !this[_0x1bfe[1703]]()[_0x1bfe[1730]](_0x47f2x2)};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2780]]= function(_0x47f2x2){if(this[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x2)){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);_0x47f2x2= null!= _0x47f2x3?_0x47f2x3[_0x1bfe[124]]:this[_0x1bfe[1179]][_0x1bfe[1705]](_0x47f2x2);return 1== mxUtils[_0x1bfe[433]](_0x47f2x2,mxConstants.STYLE_HORIZONTAL,1)};return !this[_0x1bfe[1737]]()};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[833]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=this[_0x1bfe[1703]]()[_0x1bfe[502]]();_0x47f2x3[_0x1bfe[473]]();try{for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){this[_0x1bfe[2779]](_0x47f2x2[_0x47f2x4])|| this[_0x1bfe[2781]](_0x47f2x2[_0x47f2x4])}}finally{_0x47f2x3[_0x1bfe[476]]()}}};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2781]]= function(_0x47f2x2){for(var _0x47f2x3=this[_0x1bfe[1703]]()[_0x1bfe[502]](),_0x47f2x4=_0x47f2x3[_0x1bfe[1197]](_0x47f2x2),_0x47f2x5=_0x47f2x3[_0x1bfe[262]](_0x47f2x4),_0x47f2x9=null,_0x47f2xa=0;_0x47f2xa< _0x47f2x5;_0x47f2xa++){var _0x47f2x12=_0x47f2x3[_0x1bfe[263]](_0x47f2x4,_0x47f2xa);if(_0x47f2x12!= _0x47f2x2&& !this[_0x1bfe[2779]](_0x47f2x12)&& (_0x47f2x9= _0x47f2x3[_0x1bfe[1721]](_0x47f2x12),null!= _0x47f2x9)){break}};null!= _0x47f2x9&& this[_0x1bfe[2782]](_0x47f2x2,_0x47f2x9[_0x1bfe[117]],_0x47f2x9[_0x1bfe[119]])};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[837]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=this[_0x1bfe[1703]]()[_0x1bfe[502]]();_0x47f2x3[_0x1bfe[473]]();try{for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x2[_0x1bfe[67]];_0x47f2x4++){if(!this[_0x1bfe[2779]](_0x47f2x2[_0x47f2x4])){var _0x47f2x5=_0x47f2x3[_0x1bfe[1721]](_0x47f2x2[_0x47f2x4]);if(null!= _0x47f2x5){for(var _0x47f2x9= new mxRectangle(0,0,_0x47f2x5[_0x1bfe[117]],_0x47f2x5[_0x1bfe[119]]),_0x47f2xa=_0x47f2x2[_0x47f2x4],_0x47f2x12=_0x47f2xa;null!= _0x47f2x12;){var _0x47f2xa=_0x47f2x12,_0x47f2x12=_0x47f2x3[_0x1bfe[1197]](_0x47f2x12),_0x47f2x13=this[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x12)?this[_0x1bfe[1179]][_0x1bfe[1731]](_0x47f2x12): new mxRectangle;_0x47f2x9[_0x1bfe[117]]+= _0x47f2x13[_0x1bfe[117]];_0x47f2x9[_0x1bfe[119]]+= _0x47f2x13[_0x1bfe[119]]};this[_0x1bfe[2782]](_0x47f2xa,_0x47f2x9[_0x1bfe[117]],_0x47f2x9[_0x1bfe[119]])}}}}finally{_0x47f2x3[_0x1bfe[476]]()}}};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[2782]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1703]]()[_0x1bfe[502]]();_0x47f2x5[_0x1bfe[473]]();try{if(!this[_0x1bfe[2779]](_0x47f2x2)){var _0x47f2x9=_0x47f2x5[_0x1bfe[1721]](_0x47f2x2);if(null!= _0x47f2x9){var _0x47f2xa=this[_0x1bfe[2780]](_0x47f2x2);if(_0x47f2xa&& _0x47f2x9[_0x1bfe[119]]!= _0x47f2x4|| !_0x47f2xa&& _0x47f2x9[_0x1bfe[117]]!= _0x47f2x3){_0x47f2x9= _0x47f2x9[_0x1bfe[238]](),_0x47f2xa?_0x47f2x9[_0x1bfe[119]]= _0x47f2x4:_0x47f2x9[_0x1bfe[117]]= _0x47f2x3,_0x47f2x5[_0x1bfe[1724]](_0x47f2x2,_0x47f2x9)}}};var _0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x2)?this[_0x1bfe[1179]][_0x1bfe[1731]](_0x47f2x2): new mxRectangle;_0x47f2x3-= _0x47f2x12[_0x1bfe[117]];_0x47f2x4-= _0x47f2x12[_0x1bfe[119]];for(var _0x47f2x13=_0x47f2x5[_0x1bfe[262]](_0x47f2x2),_0x47f2x9=0;_0x47f2x9< _0x47f2x13;_0x47f2x9++){var _0x47f2x14=_0x47f2x5[_0x1bfe[263]](_0x47f2x2,_0x47f2x9);this[_0x1bfe[2782]](_0x47f2x14,_0x47f2x3,_0x47f2x4)}}finally{_0x47f2x5[_0x1bfe[476]]()}};mxSwimlaneManager[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[1178]](null)};function mxTemporaryCellStates(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[441]]= _0x47f2x2;_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:1;this[_0x1bfe[2783]]= _0x47f2x2[_0x1bfe[517]]();this[_0x1bfe[2784]]= _0x47f2x2[_0x1bfe[2312]]();this[_0x1bfe[2785]]= _0x47f2x2[_0x1bfe[518]]();_0x47f2x2[_0x1bfe[1517]]( new mxDictionary);_0x47f2x2[_0x1bfe[2262]](_0x47f2x3);if(null!= _0x47f2x4){_0x47f2x3= _0x47f2x2[_0x1bfe[1230]]( new mxCell);for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x4[_0x1bfe[67]];_0x47f2x5++){_0x47f2x2[_0x1bfe[2267]](_0x47f2x3,_0x47f2x4[_0x47f2x5])};for(var _0x47f2x9=null,_0x47f2x5=0;_0x47f2x5< _0x47f2x4[_0x1bfe[67]];_0x47f2x5++){var _0x47f2xa=_0x47f2x2[_0x1bfe[2268]](_0x47f2x3,_0x47f2x4[_0x47f2x5]);null== _0x47f2x9?_0x47f2x9= _0x47f2xa:_0x47f2x9[_0x1bfe[99]](_0x47f2xa)};null== _0x47f2x9&& (_0x47f2x9= new mxRectangle);_0x47f2x2[_0x1bfe[2256]](_0x47f2x9)}}mxTemporaryCellStates[_0x1bfe[202]][_0x1bfe[441]]= null;mxTemporaryCellStates[_0x1bfe[202]][_0x1bfe[2784]]= null;mxTemporaryCellStates[_0x1bfe[202]][_0x1bfe[2783]]= null;mxTemporaryCellStates[_0x1bfe[202]][_0x1bfe[2785]]= null;mxTemporaryCellStates[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[441]][_0x1bfe[2262]](this[_0x1bfe[2785]]);this[_0x1bfe[441]][_0x1bfe[1517]](this[_0x1bfe[2784]]);this[_0x1bfe[441]][_0x1bfe[2256]](this[_0x1bfe[2783]])};function mxCellStatePreview(_0x47f2x2){this[_0x1bfe[1179]]= _0x47f2x2;this[_0x1bfe[2786]]= {}}mxCellStatePreview[_0x1bfe[202]][_0x1bfe[1179]]= null;mxCellStatePreview[_0x1bfe[202]][_0x1bfe[2786]]= null;mxCellStatePreview[_0x1bfe[202]][_0x1bfe[2787]]= 0;mxCellStatePreview[_0x1bfe[202]][_0x1bfe[1107]]= function(){return 0== this[_0x1bfe[2787]]};mxCellStatePreview[_0x1bfe[202]][_0x1bfe[1194]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x5= null!= _0x47f2x5?_0x47f2x5:!0;_0x47f2x9= null!= _0x47f2x9?_0x47f2x9:!0;var _0x47f2xa=mxCellPath[_0x1bfe[385]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x12=this[_0x1bfe[2786]][_0x47f2xa];null== _0x47f2x12?(_0x47f2x12= new mxPoint(_0x47f2x3,_0x47f2x4),this[_0x1bfe[2786]][_0x47f2xa]= _0x47f2x12,this[_0x1bfe[2787]]++):_0x47f2x5?(_0x47f2x12[_0x1bfe[2788]]+= _0x47f2x3,_0x47f2x12[_0x1bfe[2789]]+= _0x47f2x4):(_0x47f2x12[_0x1bfe[2788]]= _0x47f2x3,_0x47f2x12[_0x1bfe[2789]]= _0x47f2x4);_0x47f2x9&& this[_0x1bfe[2790]](_0x47f2x2);return _0x47f2x12};mxCellStatePreview[_0x1bfe[202]][_0x1bfe[539]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x4=_0x47f2x3[_0x1bfe[501]](),_0x47f2x5;for(_0x47f2x5 in this[_0x1bfe[2786]]){var _0x47f2x9=mxCellPath[_0x1bfe[2791]](_0x47f2x4,_0x47f2x5),_0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x9),_0x47f2x12=this[_0x1bfe[2786]][_0x47f2x5],_0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x3[_0x1bfe[1197]](_0x47f2x9));this[_0x1bfe[2792]](_0x47f2x9,_0x47f2xa,_0x47f2x12[_0x1bfe[235]],_0x47f2x12[_0x1bfe[236]])};for(_0x47f2x5 in this[_0x1bfe[2786]]){_0x47f2x9= mxCellPath[_0x1bfe[2791]](_0x47f2x4,_0x47f2x5),_0x47f2xa= this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x9),_0x47f2x12= this[_0x1bfe[2786]][_0x47f2x5],_0x47f2x9= this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x3[_0x1bfe[1197]](_0x47f2x9)),this[_0x1bfe[2793]](_0x47f2x9,_0x47f2xa,_0x47f2x12[_0x1bfe[235]],_0x47f2x12[_0x1bfe[236]],_0x47f2x2)}};mxCellStatePreview[_0x1bfe[202]][_0x1bfe[2792]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x3){var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[502]]();if(_0x47f2x9[_0x1bfe[1193]](_0x47f2x3[_0x1bfe[246]])){_0x47f2x3[_0x1bfe[2080]]= !0;this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[2267]](_0x47f2x2,_0x47f2x3[_0x1bfe[246]]);_0x47f2x2= _0x47f2x9[_0x1bfe[1721]](_0x47f2x3[_0x1bfe[246]]);var _0x47f2xa=mxCellPath[_0x1bfe[385]](_0x47f2x3[_0x1bfe[246]]);if((0!= _0x47f2x4|| 0!= _0x47f2x5)&& null!= _0x47f2x2&& (!_0x47f2x2[_0x1bfe[1500]]|| null!= this[_0x1bfe[2786]][_0x47f2xa])){_0x47f2x3[_0x1bfe[235]]+= _0x47f2x4,_0x47f2x3[_0x1bfe[236]]+= _0x47f2x5}};_0x47f2x2= _0x47f2x9[_0x1bfe[262]](_0x47f2x3[_0x1bfe[246]]);for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x2;_0x47f2xa++){this[_0x1bfe[2792]](_0x47f2x3,this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x9[_0x1bfe[263]](_0x47f2x3[_0x1bfe[246]],_0x47f2xa)),_0x47f2x4,_0x47f2x5)}}};mxCellStatePreview[_0x1bfe[202]][_0x1bfe[2793]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){if(null!= _0x47f2x3){_0x47f2x3[_0x1bfe[2080]]= !0;this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[2268]](_0x47f2x2,_0x47f2x3[_0x1bfe[246]]);var _0x47f2xa=mxCellPath[_0x1bfe[385]](_0x47f2x3[_0x1bfe[246]]),_0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x13=this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x3[_0x1bfe[246]]);if((0!= _0x47f2x4|| 0!= _0x47f2x5)&& null!= _0x47f2x13&& _0x47f2x13[_0x1bfe[1500]]&& _0x47f2x12[_0x1bfe[1193]](_0x47f2x3[_0x1bfe[246]])&& (null== _0x47f2x2|| _0x47f2x12[_0x1bfe[1193]](_0x47f2x2[_0x1bfe[246]])|| null!= this[_0x1bfe[2786]][_0x47f2xa])){_0x47f2x3[_0x1bfe[235]]+= _0x47f2x4,_0x47f2x3[_0x1bfe[236]]+= _0x47f2x5,this[_0x1bfe[1179]][_0x1bfe[259]][_0x1bfe[258]](_0x47f2x3)};null!= _0x47f2x9&& _0x47f2x9(_0x47f2x3);_0x47f2x2= _0x47f2x12[_0x1bfe[262]](_0x47f2x3[_0x1bfe[246]]);for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x2;_0x47f2xa++){this[_0x1bfe[2793]](_0x47f2x3,this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x12[_0x1bfe[263]](_0x47f2x3[_0x1bfe[246]],_0x47f2xa)),_0x47f2x4,_0x47f2x5,_0x47f2x9)}}};mxCellStatePreview[_0x1bfe[202]][_0x1bfe[2790]]= function(_0x47f2x2){for(var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x4=_0x47f2x3[_0x1bfe[1707]](_0x47f2x2[_0x1bfe[246]]),_0x47f2x5=0;_0x47f2x5< _0x47f2x4;_0x47f2x5++){var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x3[_0x1bfe[1708]](_0x47f2x2[_0x1bfe[246]],_0x47f2x5));null!= _0x47f2x9&& this[_0x1bfe[1194]](_0x47f2x9,0,0)}};function mxConnectionConstraint(_0x47f2x2,_0x47f2x3){this[_0x1bfe[2546]]= _0x47f2x2;this[_0x1bfe[591]]= null!= _0x47f2x3?_0x47f2x3:!0}mxConnectionConstraint[_0x1bfe[202]][_0x1bfe[2546]]= null;mxConnectionConstraint[_0x1bfe[202]][_0x1bfe[591]]= null;function mxGraphHandler(_0x47f2x2){this[_0x1bfe[1179]]= _0x47f2x2;this[_0x1bfe[1179]][_0x1bfe[1133]](this);this[_0x1bfe[2730]]= mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[2794]]()});this[_0x1bfe[1179]][_0x1bfe[169]](mxEvent.PAN,this[_0x1bfe[2730]])}mxGraphHandler[_0x1bfe[202]][_0x1bfe[1179]]= null;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2795]]= mxClient[_0x1bfe[80]]?20:50;mxGraphHandler[_0x1bfe[202]][_0x1bfe[984]]= !0;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2796]]= !0;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2797]]= !0;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2798]]= !0;mxGraphHandler[_0x1bfe[202]][_0x1bfe[990]]= !1;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2799]]= null;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2800]]= null;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2801]]= null;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2802]]= !0;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2803]]= !0;mxGraphHandler[_0x1bfe[202]][_0x1bfe[846]]= !0;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2804]]= !1;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2805]]= !0;mxGraphHandler[_0x1bfe[202]][_0x1bfe[923]]= 6;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2806]]= _0x1bfe[586];mxGraphHandler[_0x1bfe[202]][_0x1bfe[2807]]= !1;mxGraphHandler[_0x1bfe[202]][_0x1bfe[253]]= null;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2808]]= !1;mxGraphHandler[_0x1bfe[202]][_0x1bfe[2809]]= !0;mxGraphHandler[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxGraphHandler[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2810]]= function(){return this[_0x1bfe[2797]]};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2811]]= function(_0x47f2x2){this[_0x1bfe[2797]]= _0x47f2x2};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2812]]= function(){return this[_0x1bfe[2798]]};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2813]]= function(_0x47f2x2){this[_0x1bfe[2798]]= _0x47f2x2};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2814]]= function(){return this[_0x1bfe[2803]]};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2815]]= function(_0x47f2x2){this[_0x1bfe[2803]]= _0x47f2x2};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2816]]= function(){return this[_0x1bfe[846]]};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2817]]= function(_0x47f2x2){this[_0x1bfe[846]]= _0x47f2x2};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2818]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[736]]()};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2819]]= function(_0x47f2x2){return this[_0x1bfe[1179]][_0x1bfe[2692]](_0x47f2x2)};mxGraphHandler[_0x1bfe[202]][_0x1bfe[787]]= function(_0x47f2x2,_0x47f2x3){if(!_0x47f2x3[_0x1bfe[721]]()&& this[_0x1bfe[994]]()&& this[_0x1bfe[1179]][_0x1bfe[994]]()&& !this[_0x1bfe[1179]][_0x1bfe[2579]](_0x47f2x3[_0x1bfe[727]]())&& null!= _0x47f2x3[_0x1bfe[248]]()){var _0x47f2x4=this[_0x1bfe[2818]](_0x47f2x3);this[_0x1bfe[246]]= null;this[_0x1bfe[2820]]= this[_0x1bfe[2819]](_0x47f2x4);this[_0x1bfe[2814]]()&& !this[_0x1bfe[2820]]&& this[_0x1bfe[1179]][_0x1bfe[2459]](_0x47f2x4,_0x47f2x3[_0x1bfe[727]]());if(this[_0x1bfe[2812]]()){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[251]],_0x47f2x9=_0x47f2x5[_0x1bfe[1721]](_0x47f2x4);this[_0x1bfe[1179]][_0x1bfe[1712]](_0x47f2x4)&& (!_0x47f2x5[_0x1bfe[250]](_0x47f2x4)|| 1< this[_0x1bfe[1179]][_0x1bfe[2694]]()|| null!= _0x47f2x9[_0x1bfe[1525]]&& 0< _0x47f2x9[_0x1bfe[1525]][_0x1bfe[67]]|| null== _0x47f2x5[_0x1bfe[1709]](_0x47f2x4,!0)|| null== _0x47f2x5[_0x1bfe[1709]](_0x47f2x4,!1)|| this[_0x1bfe[1179]][_0x1bfe[2406]]|| this[_0x1bfe[1179]][_0x1bfe[2574]](_0x47f2x3[_0x1bfe[727]]())&& this[_0x1bfe[1179]][_0x1bfe[2617]]())&& this[_0x1bfe[861]](_0x47f2x4,_0x47f2x3[_0x1bfe[730]](),_0x47f2x3[_0x1bfe[732]]());this[_0x1bfe[2821]]= !0;!mxClient[_0x1bfe[75]]&& !mxClient[_0x1bfe[76]]|| _0x1bfe[2822]!= _0x47f2x3[_0x1bfe[728]]()[_0x1bfe[301]]?_0x47f2x3[_0x1bfe[722]]():mxClient[_0x1bfe[75]]&& _0x1bfe[2822]== _0x47f2x3[_0x1bfe[728]]()[_0x1bfe[301]]&& (this[_0x1bfe[2821]]= !1,this[_0x1bfe[2823]]= null)}}};mxGraphHandler[_0x1bfe[202]][_0x1bfe[1010]]= function(){var _0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[902]](),_0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x4=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){return null!= this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2)&& _0x47f2x3[_0x1bfe[1193]](_0x47f2x2)&& null!= _0x47f2x3[_0x1bfe[1721]](_0x47f2x2)&& !_0x47f2x3[_0x1bfe[1721]](_0x47f2x2)[_0x1bfe[1500]]});return this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[2313]](_0x47f2x3[_0x1bfe[1921]](_0x47f2x4,_0x47f2x2))};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2690]]= function(_0x47f2x2){return !this[_0x1bfe[2820]]&& this[_0x1bfe[1179]][_0x1bfe[1712]](_0x47f2x2)?[_0x47f2x2]:this[_0x1bfe[1179]][_0x1bfe[2629]](this[_0x1bfe[1179]][_0x1bfe[897]]())};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2824]]= function(_0x47f2x2){_0x47f2x2= this[_0x1bfe[1613]](_0x47f2x2);null!= _0x47f2x2&& (_0x47f2x2[_0x1bfe[244]](-1,-1),_0x47f2x2[_0x1bfe[117]]< this[_0x1bfe[923]]&& (_0x47f2x2[_0x1bfe[235]]-= (this[_0x1bfe[923]]- _0x47f2x2[_0x1bfe[117]])/ 2,_0x47f2x2[_0x1bfe[117]]= this[_0x1bfe[923]]),_0x47f2x2[_0x1bfe[119]]< this[_0x1bfe[923]]&& (_0x47f2x2[_0x1bfe[236]]-= (this[_0x1bfe[923]]- _0x47f2x2[_0x1bfe[119]])/ 2,_0x47f2x2[_0x1bfe[119]]= this[_0x1bfe[923]]));return _0x47f2x2};mxGraphHandler[_0x1bfe[202]][_0x1bfe[1613]]= function(_0x47f2x2){var _0x47f2x3=null;if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]){for(var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=0;_0x47f2x5< _0x47f2x2[_0x1bfe[67]];_0x47f2x5++){if(_0x47f2x4[_0x1bfe[1193]](_0x47f2x2[_0x47f2x5])|| _0x47f2x4[_0x1bfe[250]](_0x47f2x2[_0x47f2x5])){var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2[_0x47f2x5]);if(null!= _0x47f2x9){var _0x47f2xa=_0x47f2x9;_0x47f2x4[_0x1bfe[1193]](_0x47f2x2[_0x47f2x5])&& (null!= _0x47f2x9[_0x1bfe[253]]&& null!= _0x47f2x9[_0x1bfe[253]][_0x1bfe[1563]])&& (_0x47f2xa= _0x47f2x9[_0x1bfe[253]][_0x1bfe[1563]]);null== _0x47f2x3?_0x47f2x3= new mxRectangle(_0x47f2xa[_0x1bfe[235]],_0x47f2xa[_0x1bfe[236]],_0x47f2xa[_0x1bfe[117]],_0x47f2xa[_0x1bfe[119]]):_0x47f2x3[_0x1bfe[99]](_0x47f2xa)}}}};return _0x47f2x3};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2825]]= function(_0x47f2x2){_0x47f2x2= new mxRectangleShape(_0x47f2x2,null,this[_0x1bfe[2806]]);_0x47f2x2[_0x1bfe[1522]]= !0;this[_0x1bfe[2807]]?(_0x47f2x2[_0x1bfe[507]]= mxConstants[_0x1bfe[1656]],_0x47f2x2[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[526]])):(_0x47f2x2[_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[1523]]:mxConstants[_0x1bfe[508]],_0x47f2x2[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]()),_0x47f2x2[_0x1bfe[1229]]= !1);return _0x47f2x2};mxGraphHandler[_0x1bfe[202]][_0x1bfe[861]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[246]]= _0x47f2x2;this[_0x1bfe[2823]]= mxUtils[_0x1bfe[2196]](this[_0x1bfe[1179]][_0x1bfe[526]],_0x47f2x3,_0x47f2x4);this[_0x1bfe[895]]= this[_0x1bfe[2690]](this[_0x1bfe[246]]);this[_0x1bfe[1562]]= this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1799]](this[_0x1bfe[895]]);this[_0x1bfe[2826]]= this[_0x1bfe[2824]](this[_0x1bfe[895]]);this[_0x1bfe[990]]&& (this[_0x1bfe[2799]]= new mxGuide(this[_0x1bfe[1179]],this[_0x1bfe[1010]]()))};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2827]]= function(_0x47f2x2){return null!= this[_0x1bfe[2799]]?this[_0x1bfe[2799]][_0x1bfe[1019]](_0x47f2x2[_0x1bfe[727]]()):!0};mxGraphHandler[_0x1bfe[202]][_0x1bfe[1021]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[2808]]?this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]]:1;_0x47f2x2[_0x1bfe[235]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x2[_0x1bfe[235]]/ _0x47f2x3)* _0x47f2x3;_0x47f2x2[_0x1bfe[236]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x2[_0x1bfe[236]]/ _0x47f2x3)* _0x47f2x3;return _0x47f2x2};mxGraphHandler[_0x1bfe[202]][_0x1bfe[788]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]];if(!_0x47f2x3[_0x1bfe[721]]()&& _0x47f2x4[_0x1bfe[1009]]&& null!= this[_0x1bfe[246]]&& null!= this[_0x1bfe[2823]]&& null!= this[_0x1bfe[1562]]){var _0x47f2x5=mxUtils[_0x1bfe[2196]](_0x47f2x4[_0x1bfe[526]],_0x47f2x3[_0x1bfe[730]](),_0x47f2x3[_0x1bfe[732]]()),_0x47f2x9=_0x47f2x5[_0x1bfe[235]]- this[_0x1bfe[2823]][_0x1bfe[235]],_0x47f2xa=_0x47f2x5[_0x1bfe[236]]- this[_0x1bfe[2823]][_0x1bfe[236]],_0x47f2x5=_0x47f2x4[_0x1bfe[2353]];if(null!= this[_0x1bfe[253]]|| Math[_0x1bfe[425]](_0x47f2x9)> _0x47f2x5|| Math[_0x1bfe[425]](_0x47f2xa)> _0x47f2x5){null== this[_0x1bfe[1016]]&& (this[_0x1bfe[1016]]= new mxCellHighlight(this[_0x1bfe[1179]],mxConstants.DROP_TARGET_COLOR,3));null== this[_0x1bfe[253]]&& (this[_0x1bfe[253]]= this[_0x1bfe[2825]](this[_0x1bfe[1562]]));var _0x47f2x12=_0x47f2x4[_0x1bfe[1018]](_0x47f2x3[_0x1bfe[727]]()),_0x47f2x5=!0;if(null!= this[_0x1bfe[2799]]&& this[_0x1bfe[2827]](_0x47f2x3)){_0x47f2xa= this[_0x1bfe[2799]][_0x1bfe[582]](this[_0x1bfe[1562]], new mxPoint(_0x47f2x9,_0x47f2xa),_0x47f2x12),_0x47f2x5= !1,_0x47f2x9= _0x47f2xa[_0x1bfe[235]],_0x47f2xa= _0x47f2xa[_0x1bfe[236]]}else {if(_0x47f2x12){var _0x47f2x13=_0x47f2x4[_0x1bfe[249]]()[_0x1bfe[513]],_0x47f2x14=_0x47f2x4[_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x12=this[_0x1bfe[1562]][_0x1bfe[235]]- (_0x47f2x4[_0x1bfe[1021]](this[_0x1bfe[1562]][_0x1bfe[235]]/ _0x47f2x14- _0x47f2x13[_0x1bfe[235]])+ _0x47f2x13[_0x1bfe[235]])* _0x47f2x14,_0x47f2x13=this[_0x1bfe[1562]][_0x1bfe[236]]- (_0x47f2x4[_0x1bfe[1021]](this[_0x1bfe[1562]][_0x1bfe[236]]/ _0x47f2x14- _0x47f2x13[_0x1bfe[236]])+ _0x47f2x13[_0x1bfe[236]])* _0x47f2x14,_0x47f2xa=this[_0x1bfe[1021]]( new mxPoint(_0x47f2x9,_0x47f2xa)),_0x47f2x9=_0x47f2xa[_0x1bfe[235]]- _0x47f2x12,_0x47f2xa=_0x47f2xa[_0x1bfe[236]]- _0x47f2x13}};null!= this[_0x1bfe[2799]]&& _0x47f2x5&& this[_0x1bfe[2799]][_0x1bfe[801]]();_0x47f2x4[_0x1bfe[2578]](_0x47f2x3[_0x1bfe[727]]())&& (Math[_0x1bfe[425]](_0x47f2x9)> Math[_0x1bfe[425]](_0x47f2xa)?_0x47f2xa= 0:_0x47f2x9= 0);this[_0x1bfe[2800]]= _0x47f2x9;this[_0x1bfe[2801]]= _0x47f2xa;this[_0x1bfe[2794]]();_0x47f2x5= null;_0x47f2xa= _0x47f2x3[_0x1bfe[736]]();_0x47f2x4[_0x1bfe[1015]]()&& this[_0x1bfe[2796]]&& (_0x47f2x5= _0x47f2x4[_0x1bfe[564]](this[_0x1bfe[895]],_0x47f2x3[_0x1bfe[727]](),_0x47f2xa));_0x47f2x12= _0x47f2x5;for(_0x47f2x13= _0x47f2x4[_0x1bfe[502]]();null!= _0x47f2x12&& _0x47f2x12!= this[_0x1bfe[895]][0];){_0x47f2x12= _0x47f2x13[_0x1bfe[1197]](_0x47f2x12)};var _0x47f2x14=_0x47f2x4[_0x1bfe[2574]](_0x47f2x3[_0x1bfe[727]]())&& _0x47f2x4[_0x1bfe[2617]]()&& this[_0x1bfe[2810]](),_0x47f2x9=_0x47f2x4[_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x5),_0x47f2x15=!1;null!= _0x47f2x9&& null== _0x47f2x12&& (_0x47f2x13[_0x1bfe[1197]](this[_0x1bfe[246]])!= _0x47f2x5|| _0x47f2x14)?(this[_0x1bfe[772]]!= _0x47f2x5&& (this[_0x1bfe[772]]= _0x47f2x5,this[_0x1bfe[2828]](mxConstants.DROP_TARGET_COLOR)),_0x47f2x15= !0):(this[_0x1bfe[772]]= null,this[_0x1bfe[2804]]&& (null!= _0x47f2xa&& 1== this[_0x1bfe[895]][_0x1bfe[67]]&& _0x47f2x4[_0x1bfe[502]]()[_0x1bfe[1193]](_0x47f2xa)&& _0x47f2x4[_0x1bfe[2565]](_0x47f2xa))&& (_0x47f2x9= _0x47f2x4[_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2xa),null!= _0x47f2x9&& (_0x47f2x4= null== _0x47f2x4[_0x1bfe[2500]](null,this[_0x1bfe[246]],_0x47f2xa)?mxConstants[_0x1bfe[2829]]:mxConstants[_0x1bfe[2830]],this[_0x1bfe[2828]](_0x47f2x4),_0x47f2x15= !0)));null!= _0x47f2x9&& _0x47f2x15?this[_0x1bfe[1016]][_0x1bfe[1016]](_0x47f2x9):this[_0x1bfe[1016]][_0x1bfe[801]]()};_0x47f2x3[_0x1bfe[722]]();mxEvent[_0x1bfe[722]](_0x47f2x3[_0x1bfe[727]]())}else {if((this[_0x1bfe[2812]]()|| this[_0x1bfe[2810]]())&& this[_0x1bfe[2802]]&& !_0x47f2x3[_0x1bfe[721]]()&& null!= _0x47f2x3[_0x1bfe[248]]()&& !_0x47f2x4[_0x1bfe[1009]]){_0x47f2x9= _0x47f2x4[_0x1bfe[2599]](_0x47f2x3[_0x1bfe[736]]()),null== _0x47f2x9&& (_0x47f2x4[_0x1bfe[994]]()&& _0x47f2x4[_0x1bfe[1712]](_0x47f2x3[_0x1bfe[736]]()))&& (_0x47f2x9= _0x47f2x4[_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x3[_0x1bfe[736]]())?mxConstants[_0x1bfe[2831]]:mxConstants[_0x1bfe[2832]]),_0x47f2x3[_0x1bfe[248]]()[_0x1bfe[1609]](_0x47f2x9),_0x47f2x3[_0x1bfe[722]]()}}};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2794]]= function(){null!= this[_0x1bfe[253]]&& (this[_0x1bfe[253]][_0x1bfe[1562]]= new mxRectangle(Math[_0x1bfe[488]](this[_0x1bfe[2826]][_0x1bfe[235]]+ this[_0x1bfe[2800]]- this[_0x1bfe[1179]][_0x1bfe[1136]]),Math[_0x1bfe[488]](this[_0x1bfe[2826]][_0x1bfe[236]]+ this[_0x1bfe[2801]]- this[_0x1bfe[1179]][_0x1bfe[1137]]),this[_0x1bfe[2826]][_0x1bfe[117]],this[_0x1bfe[2826]][_0x1bfe[119]]),this[_0x1bfe[253]][_0x1bfe[258]]())};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2828]]= function(_0x47f2x2){null!= this[_0x1bfe[1016]]&& this[_0x1bfe[1016]][_0x1bfe[2828]](_0x47f2x2)};mxGraphHandler[_0x1bfe[202]][_0x1bfe[789]]= function(_0x47f2x2,_0x47f2x3){if(!_0x47f2x3[_0x1bfe[721]]()){var _0x47f2x4=this[_0x1bfe[1179]];if(null!= this[_0x1bfe[246]]&& null!= this[_0x1bfe[2823]]&& null!= this[_0x1bfe[253]]&& null!= this[_0x1bfe[2800]]&& null!= this[_0x1bfe[2801]]){var _0x47f2x5=_0x47f2x4[_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x9=_0x47f2x4[_0x1bfe[2574]](_0x47f2x3[_0x1bfe[727]]())&& _0x47f2x4[_0x1bfe[2617]]()&& this[_0x1bfe[2810]](),_0x47f2xa=this[_0x1bfe[2800]]/ _0x47f2x5,_0x47f2x5=this[_0x1bfe[2801]]/ _0x47f2x5,_0x47f2x12=_0x47f2x3[_0x1bfe[736]]();this[_0x1bfe[2804]]&& null== this[_0x1bfe[772]]&& null!= _0x47f2x12&& _0x47f2x4[_0x1bfe[502]]()[_0x1bfe[1193]](_0x47f2x12)&& _0x47f2x4[_0x1bfe[2565]](_0x47f2x12)&& _0x47f2x4[_0x1bfe[2581]](null,this[_0x1bfe[246]],_0x47f2x12)?_0x47f2x4[_0x1bfe[2433]][_0x1bfe[807]](this[_0x1bfe[246]],_0x47f2x12,_0x47f2x3[_0x1bfe[727]]()):(_0x47f2x12= this[_0x1bfe[772]],_0x47f2x4[_0x1bfe[2655]]()&& _0x47f2x4[_0x1bfe[2686]](_0x47f2x12,this[_0x1bfe[895]],_0x47f2x3[_0x1bfe[727]]())?_0x47f2x4[_0x1bfe[853]](_0x47f2x12,this[_0x1bfe[895]],null,_0x47f2xa,_0x47f2x5):this[_0x1bfe[834]](this[_0x1bfe[895]],_0x47f2xa,_0x47f2x5,_0x47f2x9,this[_0x1bfe[772]],_0x47f2x3[_0x1bfe[727]]()))}else {this[_0x1bfe[2814]]()&& (this[_0x1bfe[2820]]&& null!= this[_0x1bfe[246]])&& this[_0x1bfe[2833]](_0x47f2x3)}};this[_0x1bfe[2821]]&& _0x47f2x3[_0x1bfe[722]]();this[_0x1bfe[862]]()};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2833]]= function(_0x47f2x2){this[_0x1bfe[1179]][_0x1bfe[2459]](this[_0x1bfe[246]],_0x47f2x2[_0x1bfe[727]]())};mxGraphHandler[_0x1bfe[202]][_0x1bfe[862]]= function(){this[_0x1bfe[2834]]();this[_0x1bfe[2820]]= this[_0x1bfe[2821]]= !1;this[_0x1bfe[772]]= this[_0x1bfe[246]]= this[_0x1bfe[2823]]= this[_0x1bfe[2835]]= this[_0x1bfe[2801]]= this[_0x1bfe[2800]]= null};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2836]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1193]](_0x47f2x2)){_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x2);_0x47f2x4= mxUtils[_0x1bfe[2196]](this[_0x1bfe[1179]][_0x1bfe[526]],mxEvent[_0x1bfe[731]](_0x47f2x4),mxEvent[_0x1bfe[733]](_0x47f2x4));var _0x47f2x5=mxUtils[_0x1bfe[431]](mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_ROTATION)|| 0);if(0!= _0x47f2x5){_0x47f2x3= Math[_0x1bfe[426]](-_0x47f2x5);var _0x47f2x5=Math[_0x1bfe[427]](-_0x47f2x5),_0x47f2x9= new mxPoint(_0x47f2x2[_0x1bfe[241]](),_0x47f2x2[_0x1bfe[242]]());_0x47f2x4= mxUtils[_0x1bfe[432]](_0x47f2x4,_0x47f2x3,_0x47f2x5,_0x47f2x9)};return null!= _0x47f2x2&& !mxUtils[_0x1bfe[442]](_0x47f2x2,_0x47f2x4[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]])};return !1};mxGraphHandler[_0x1bfe[202]][_0x1bfe[834]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){_0x47f2x5&& (_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[2615]](_0x47f2x2));null== _0x47f2x9&& (this[_0x1bfe[2816]]()&& this[_0x1bfe[2836]](this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1197]](this[_0x1bfe[246]]),_0x47f2x2,_0x47f2xa))&& (_0x47f2x9= this[_0x1bfe[1179]][_0x1bfe[902]]());_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[834]](_0x47f2x2,_0x47f2x3- this[_0x1bfe[1179]][_0x1bfe[1136]]/ this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]],_0x47f2x4- this[_0x1bfe[1179]][_0x1bfe[1137]]/ this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]],_0x47f2x5,_0x47f2x9,_0x47f2xa);this[_0x1bfe[2814]]()&& this[_0x1bfe[2805]]&& this[_0x1bfe[1179]][_0x1bfe[2564]](_0x47f2x2[0]);_0x47f2x5&& this[_0x1bfe[1179]][_0x1bfe[904]](_0x47f2x2)};mxGraphHandler[_0x1bfe[202]][_0x1bfe[2834]]= function(){null!= this[_0x1bfe[253]]&& (this[_0x1bfe[253]][_0x1bfe[515]](),this[_0x1bfe[253]]= null);null!= this[_0x1bfe[2799]]&& (this[_0x1bfe[2799]][_0x1bfe[515]](),this[_0x1bfe[2799]]= null);null!= this[_0x1bfe[1016]]&& (this[_0x1bfe[1016]][_0x1bfe[515]](),this[_0x1bfe[1016]]= null)};mxGraphHandler[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[1179]][_0x1bfe[1148]](this);this[_0x1bfe[1179]][_0x1bfe[745]](this[_0x1bfe[2730]]);this[_0x1bfe[2834]]()};function mxPanningHandler(_0x47f2x2,_0x47f2x3){null!= _0x47f2x2&& (this[_0x1bfe[1179]]= _0x47f2x2,this[_0x1bfe[1033]]= _0x47f2x3,this[_0x1bfe[1179]][_0x1bfe[1133]](this),this[_0x1bfe[176]]())}mxPanningHandler[_0x1bfe[202]]= new mxPopupMenu;mxPanningHandler[_0x1bfe[202]][_0x1bfe[196]]= mxPanningHandler;mxPanningHandler[_0x1bfe[202]][_0x1bfe[1179]]= null;mxPanningHandler[_0x1bfe[202]][_0x1bfe[2837]]= null;mxPanningHandler[_0x1bfe[202]][_0x1bfe[2838]]= null;mxPanningHandler[_0x1bfe[202]][_0x1bfe[2839]]= !0;mxPanningHandler[_0x1bfe[202]][_0x1bfe[2840]]= !1;mxPanningHandler[_0x1bfe[202]][_0x1bfe[2841]]= !0;mxPanningHandler[_0x1bfe[202]][_0x1bfe[2842]]= !0;mxPanningHandler[_0x1bfe[202]][_0x1bfe[2843]]= !1;mxPanningHandler[_0x1bfe[202]][_0x1bfe[2844]]= !0;mxPanningHandler[_0x1bfe[202]][_0x1bfe[2845]]= !1;mxPanningHandler[_0x1bfe[202]][_0x1bfe[2431]]= !0;mxPanningHandler[_0x1bfe[202]][_0x1bfe[2846]]= function(){return this[_0x1bfe[2431]]};mxPanningHandler[_0x1bfe[202]][_0x1bfe[2847]]= function(_0x47f2x2){this[_0x1bfe[2431]]= _0x47f2x2};mxPanningHandler[_0x1bfe[202]][_0x1bfe[176]]= function(){mxPopupMenu[_0x1bfe[202]][_0x1bfe[176]][_0x1bfe[183]](this);mxEvent[_0x1bfe[169]](this[_0x1bfe[485]],mxClient[_0x1bfe[754]]?_0x1bfe[756]:_0x1bfe[752],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[1179]][_0x1bfe[2276]][_0x1bfe[801]]()}))};mxPanningHandler[_0x1bfe[202]][_0x1bfe[2848]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[727]]();return this[_0x1bfe[2840]]&& (this[_0x1bfe[2843]]|| null== _0x47f2x2[_0x1bfe[248]]())&& mxEvent[_0x1bfe[1158]](_0x47f2x3)|| mxEvent[_0x1bfe[775]](_0x47f2x3)&& mxEvent[_0x1bfe[774]](_0x47f2x3)|| this[_0x1bfe[2839]]&& mxEvent[_0x1bfe[737]](_0x47f2x3)};mxPanningHandler[_0x1bfe[202]][_0x1bfe[787]]= function(_0x47f2x2,_0x47f2x3){if(!_0x47f2x3[_0x1bfe[721]]()&& this[_0x1bfe[994]]()){this[_0x1bfe[1032]]();this[_0x1bfe[2741]]= -this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[360]];this[_0x1bfe[2742]]= -this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[190]];var _0x47f2x4=mxUtils[_0x1bfe[2196]](this[_0x1bfe[1179]][_0x1bfe[526]],_0x47f2x3[_0x1bfe[730]](),_0x47f2x3[_0x1bfe[732]]());this[_0x1bfe[2837]]= _0x47f2x4[_0x1bfe[235]];this[_0x1bfe[2838]]= _0x47f2x4[_0x1bfe[236]];this[_0x1bfe[2849]]= this[_0x1bfe[737]](_0x47f2x3);this[_0x1bfe[2850]]= this[_0x1bfe[2846]]()&& this[_0x1bfe[2848]](_0x47f2x3);this[_0x1bfe[2739]]= _0x47f2x3[_0x1bfe[730]]();this[_0x1bfe[2740]]= _0x47f2x3[_0x1bfe[732]]();this[_0x1bfe[2850]]&& this[_0x1bfe[2851]](_0x47f2x3)}};mxPanningHandler[_0x1bfe[202]][_0x1bfe[2851]]= function(_0x47f2x2){_0x47f2x2[_0x1bfe[722]]()};mxPanningHandler[_0x1bfe[202]][_0x1bfe[788]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x3[_0x1bfe[730]]()- this[_0x1bfe[2739]],_0x47f2x5=_0x47f2x3[_0x1bfe[732]]()- this[_0x1bfe[2740]];if(this[_0x1bfe[1124]]){this[_0x1bfe[2844]]&& (this[_0x1bfe[2845]]&& (_0x47f2x4= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x4),_0x47f2x5= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x5)),this[_0x1bfe[1179]][_0x1bfe[1135]](_0x47f2x4+ this[_0x1bfe[2741]],_0x47f2x5+ this[_0x1bfe[2742]])),this[_0x1bfe[746]]( new mxEventObject(mxEvent.PAN,_0x1bfe[763],_0x47f2x3)),_0x47f2x3[_0x1bfe[722]]()}else {if(this[_0x1bfe[2850]]){var _0x47f2x9=this[_0x1bfe[1124]];this[_0x1bfe[1124]]= Math[_0x1bfe[425]](_0x47f2x4)> this[_0x1bfe[1179]][_0x1bfe[2353]]|| Math[_0x1bfe[425]](_0x47f2x5)> this[_0x1bfe[1179]][_0x1bfe[2353]];!_0x47f2x9&& this[_0x1bfe[1124]]&& this[_0x1bfe[746]]( new mxEventObject(mxEvent.PAN_START,_0x1bfe[763],_0x47f2x3))}}};mxPanningHandler[_0x1bfe[202]][_0x1bfe[789]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=Math[_0x1bfe[425]](_0x47f2x3[_0x1bfe[730]]()- this[_0x1bfe[2739]]),_0x47f2x5=Math[_0x1bfe[425]](_0x47f2x3[_0x1bfe[732]]()- this[_0x1bfe[2740]]);if(this[_0x1bfe[1124]]){if(!this[_0x1bfe[1179]][_0x1bfe[2365]]|| !mxUtils[_0x1bfe[1134]](this[_0x1bfe[1179]][_0x1bfe[526]])){_0x47f2x4= _0x47f2x3[_0x1bfe[730]]()- this[_0x1bfe[2739]];_0x47f2x5= _0x47f2x3[_0x1bfe[732]]()- this[_0x1bfe[2740]];this[_0x1bfe[2845]]&& (_0x47f2x4= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x4),_0x47f2x5= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x5));var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[513]];this[_0x1bfe[1179]][_0x1bfe[1135]](0,0);this[_0x1bfe[1135]](_0x47f2xa[_0x1bfe[235]]+ _0x47f2x4/ _0x47f2x9,_0x47f2xa[_0x1bfe[236]]+ _0x47f2x5/ _0x47f2x9)};this[_0x1bfe[1124]]= !1;this[_0x1bfe[746]]( new mxEventObject(mxEvent.PAN_END,_0x1bfe[763],_0x47f2x3));_0x47f2x3[_0x1bfe[722]]()}else {this[_0x1bfe[2849]]&& (_0x47f2x4< this[_0x1bfe[1179]][_0x1bfe[2353]]&& _0x47f2x5< this[_0x1bfe[1179]][_0x1bfe[2353]])&& (_0x47f2x4= this[_0x1bfe[2852]](_0x47f2x3),this[_0x1bfe[1179]][_0x1bfe[994]]()&& this[_0x1bfe[2841]]&& null!= _0x47f2x4&& !this[_0x1bfe[1179]][_0x1bfe[2692]](_0x47f2x4)?this[_0x1bfe[1179]][_0x1bfe[2450]](_0x47f2x4):this[_0x1bfe[2842]]&& null== _0x47f2x4&& this[_0x1bfe[1179]][_0x1bfe[2440]](),this[_0x1bfe[1179]][_0x1bfe[2276]][_0x1bfe[801]](),_0x47f2x5= mxUtils[_0x1bfe[444]](),_0x47f2x5= new mxPoint(_0x47f2x3[_0x1bfe[730]]()+ _0x47f2x5[_0x1bfe[235]],_0x47f2x3[_0x1bfe[732]]()+ _0x47f2x5[_0x1bfe[236]]),this[_0x1bfe[152]](_0x47f2x5[_0x1bfe[235]]+ 1,_0x47f2x5[_0x1bfe[236]]+ 1,_0x47f2x4,_0x47f2x3[_0x1bfe[727]]()),_0x47f2x3[_0x1bfe[722]]())};this[_0x1bfe[2849]]= this[_0x1bfe[2850]]= !1};mxPanningHandler[_0x1bfe[202]][_0x1bfe[2852]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[736]]()};mxPanningHandler[_0x1bfe[202]][_0x1bfe[1135]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1147]](_0x47f2x2,_0x47f2x3)};mxPanningHandler[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[1179]][_0x1bfe[1148]](this);mxPopupMenu[_0x1bfe[202]][_0x1bfe[515]][_0x1bfe[183]](this)};function mxCellMarker(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){mxEventSource[_0x1bfe[239]](this);null!= _0x47f2x2&& (this[_0x1bfe[1179]]= _0x47f2x2,this[_0x1bfe[2853]]= null!= _0x47f2x3?_0x47f2x3:mxConstants[_0x1bfe[2854]],this[_0x1bfe[2855]]= null!= _0x47f2x3?_0x47f2x4:mxConstants[_0x1bfe[2856]],this[_0x1bfe[2857]]= null!= _0x47f2x5?_0x47f2x5:mxConstants[_0x1bfe[2858]],this[_0x1bfe[1016]]= new mxCellHighlight(_0x47f2x2))}mxUtils[_0x1bfe[1284]](mxCellMarker,mxEventSource);mxCellMarker[_0x1bfe[202]][_0x1bfe[1179]]= null;mxCellMarker[_0x1bfe[202]][_0x1bfe[984]]= !0;mxCellMarker[_0x1bfe[202]][_0x1bfe[2857]]= mxConstants[_0x1bfe[2858]];mxCellMarker[_0x1bfe[202]][_0x1bfe[2859]]= !1;mxCellMarker[_0x1bfe[202]][_0x1bfe[2853]]= null;mxCellMarker[_0x1bfe[202]][_0x1bfe[2855]]= null;mxCellMarker[_0x1bfe[202]][_0x1bfe[2860]]= null;mxCellMarker[_0x1bfe[202]][_0x1bfe[2861]]= null;mxCellMarker[_0x1bfe[202]][_0x1bfe[2862]]= null;mxCellMarker[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxCellMarker[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxCellMarker[_0x1bfe[202]][_0x1bfe[2863]]= function(_0x47f2x2){this[_0x1bfe[2857]]= _0x47f2x2};mxCellMarker[_0x1bfe[202]][_0x1bfe[2864]]= function(){return this[_0x1bfe[2857]]};mxCellMarker[_0x1bfe[202]][_0x1bfe[2865]]= function(_0x47f2x2){this[_0x1bfe[2859]]= _0x47f2x2};mxCellMarker[_0x1bfe[202]][_0x1bfe[2866]]= function(){return this[_0x1bfe[2859]]};mxCellMarker[_0x1bfe[202]][_0x1bfe[2867]]= function(){return null!= this[_0x1bfe[2861]]};mxCellMarker[_0x1bfe[202]][_0x1bfe[2868]]= function(){return this[_0x1bfe[2861]]};mxCellMarker[_0x1bfe[202]][_0x1bfe[2869]]= function(){return this[_0x1bfe[2862]]};mxCellMarker[_0x1bfe[202]][_0x1bfe[862]]= function(){this[_0x1bfe[2861]]= null;null!= this[_0x1bfe[2862]]&& (this[_0x1bfe[2862]]= null,this[_0x1bfe[2870]]())};mxCellMarker[_0x1bfe[202]][_0x1bfe[2871]]= function(_0x47f2x2){var _0x47f2x3=null;if(this[_0x1bfe[994]]()){var _0x47f2x3=this[_0x1bfe[248]](_0x47f2x2),_0x47f2x4=null!= _0x47f2x3?this[_0x1bfe[2872]](_0x47f2x3):!1;_0x47f2x2= this[_0x1bfe[2873]](_0x47f2x2[_0x1bfe[727]](),_0x47f2x3,_0x47f2x4);this[_0x1bfe[2861]]= _0x47f2x4?_0x47f2x3:null;if(_0x47f2x3!= this[_0x1bfe[2862]]|| _0x47f2x2!= this[_0x1bfe[2860]]){this[_0x1bfe[2860]]= _0x47f2x2,null!= _0x47f2x3&& null!= this[_0x1bfe[2860]]?(this[_0x1bfe[2862]]= _0x47f2x3,this[_0x1bfe[811]]()):null!= this[_0x1bfe[2862]]&& (this[_0x1bfe[2862]]= null,this[_0x1bfe[2870]]())}};return _0x47f2x3};mxCellMarker[_0x1bfe[202]][_0x1bfe[2874]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x2);null!= _0x47f2x4&& (this[_0x1bfe[2860]]= null!= _0x47f2x3?_0x47f2x3:this[_0x1bfe[2853]],this[_0x1bfe[2862]]= _0x47f2x4,this[_0x1bfe[811]]())};mxCellMarker[_0x1bfe[202]][_0x1bfe[811]]= function(){this[_0x1bfe[1016]][_0x1bfe[2828]](this[_0x1bfe[2860]]);this[_0x1bfe[1016]][_0x1bfe[1016]](this[_0x1bfe[2862]]);this[_0x1bfe[746]]( new mxEventObject(mxEvent.MARK,_0x1bfe[724],this[_0x1bfe[2862]]))};mxCellMarker[_0x1bfe[202]][_0x1bfe[2870]]= function(){this[_0x1bfe[811]]()};mxCellMarker[_0x1bfe[202]][_0x1bfe[2872]]= function(_0x47f2x2){return !0};mxCellMarker[_0x1bfe[202]][_0x1bfe[2873]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return _0x47f2x4?this[_0x1bfe[2853]]:this[_0x1bfe[2855]]};mxCellMarker[_0x1bfe[202]][_0x1bfe[248]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[249]]();cell= this[_0x1bfe[736]](_0x47f2x2);_0x47f2x3= this[_0x1bfe[2875]](_0x47f2x3[_0x1bfe[248]](cell));return null!= _0x47f2x3&& this[_0x1bfe[1825]](_0x47f2x3,_0x47f2x2)?_0x47f2x3:null};mxCellMarker[_0x1bfe[202]][_0x1bfe[736]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[736]]()};mxCellMarker[_0x1bfe[202]][_0x1bfe[2875]]= function(_0x47f2x2){return _0x47f2x2};mxCellMarker[_0x1bfe[202]][_0x1bfe[1825]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[2859]]?mxUtils[_0x1bfe[2876]](_0x47f2x2,_0x47f2x3[_0x1bfe[734]](),_0x47f2x3[_0x1bfe[735]](),this[_0x1bfe[2857]],mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[745]](this[_0x1bfe[2877]]);this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[745]](this[_0x1bfe[2877]]);this[_0x1bfe[1016]][_0x1bfe[515]]()};function mxSelectionCellsHandler(_0x47f2x2){mxEventSource[_0x1bfe[239]](this);this[_0x1bfe[1179]]= _0x47f2x2;this[_0x1bfe[2878]]= new mxDictionary;this[_0x1bfe[1179]][_0x1bfe[1133]](this);this[_0x1bfe[2731]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x4){this[_0x1bfe[994]]()&& this[_0x1bfe[802]]()});this[_0x1bfe[1179]][_0x1bfe[2435]]()[_0x1bfe[169]](mxEvent.CHANGE,this[_0x1bfe[2731]]);this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[169]](mxEvent.CHANGE,this[_0x1bfe[2731]]);this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.SCALE,this[_0x1bfe[2731]]);this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.TRANSLATE,this[_0x1bfe[2731]]);this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0x1bfe[2731]]);this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.DOWN,this[_0x1bfe[2731]]);this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.UP,this[_0x1bfe[2731]])}mxUtils[_0x1bfe[1284]](mxSelectionCellsHandler,mxEventSource);mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[1179]]= null;mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[984]]= !0;mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[2731]]= null;mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[2879]]= 100;mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[2878]]= null;mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[2596]]= function(_0x47f2x2){return this[_0x1bfe[2878]][_0x1bfe[203]](_0x47f2x2)};mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[862]]= function(){this[_0x1bfe[2878]][_0x1bfe[209]](function(_0x47f2x2,_0x47f2x3){_0x47f2x3[_0x1bfe[862]][_0x1bfe[183]](_0x47f2x3)})};mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[802]]= function(){var _0x47f2x2=this[_0x1bfe[2878]];this[_0x1bfe[2878]]= new mxDictionary;for(var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[897]](),_0x47f2x4=0;_0x47f2x4< _0x47f2x3[_0x1bfe[67]];_0x47f2x4++){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x3[_0x47f2x4]);if(null!= _0x47f2x5){var _0x47f2x9=_0x47f2x2[_0x1bfe[205]](_0x47f2x3[_0x47f2x4]);null!= _0x47f2x9&& (_0x47f2x9[_0x1bfe[724]]!= _0x47f2x5?(_0x47f2x9[_0x1bfe[515]](),_0x47f2x9= null):_0x47f2x9[_0x1bfe[258]]());null== _0x47f2x9&& (_0x47f2x9= this[_0x1bfe[1179]][_0x1bfe[2709]](_0x47f2x5),this[_0x1bfe[746]]( new mxEventObject(mxEvent.ADD,_0x1bfe[724],_0x47f2x5)));null!= _0x47f2x9&& this[_0x1bfe[2878]][_0x1bfe[204]](_0x47f2x3[_0x47f2x4],_0x47f2x9)}};_0x47f2x2[_0x1bfe[209]](mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[746]]( new mxEventObject(mxEvent.REMOVE,_0x1bfe[724],_0x47f2x3[_0x1bfe[724]]));_0x47f2x3[_0x1bfe[515]]()}))};mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[787]]= function(_0x47f2x2,_0x47f2x3){if(this[_0x1bfe[1179]][_0x1bfe[994]]()&& this[_0x1bfe[994]]()){var _0x47f2x4=[_0x47f2x2,_0x47f2x3];this[_0x1bfe[2878]][_0x1bfe[209]](function(_0x47f2x2,_0x47f2x3){_0x47f2x3[_0x1bfe[787]][_0x1bfe[183]](_0x47f2x3,_0x47f2x4)})}};mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[788]]= function(_0x47f2x2,_0x47f2x3){if(this[_0x1bfe[1179]][_0x1bfe[994]]()&& this[_0x1bfe[994]]()){var _0x47f2x4=[_0x47f2x2,_0x47f2x3];this[_0x1bfe[2878]][_0x1bfe[209]](function(_0x47f2x2,_0x47f2x3){_0x47f2x3[_0x1bfe[788]][_0x1bfe[183]](_0x47f2x3,_0x47f2x4)})}};mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[789]]= function(_0x47f2x2,_0x47f2x3){if(this[_0x1bfe[1179]][_0x1bfe[994]]()&& this[_0x1bfe[994]]()){var _0x47f2x4=[_0x47f2x2,_0x47f2x3];this[_0x1bfe[2878]][_0x1bfe[209]](function(_0x47f2x2,_0x47f2x3){_0x47f2x3[_0x1bfe[789]][_0x1bfe[183]](_0x47f2x3,_0x47f2x4)})}};mxSelectionCellsHandler[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[1179]][_0x1bfe[1148]](this);null!= this[_0x1bfe[2731]]&& (this[_0x1bfe[1179]][_0x1bfe[2435]]()[_0x1bfe[745]](this[_0x1bfe[2731]]),this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[745]](this[_0x1bfe[2731]]),this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[745]](this[_0x1bfe[2731]]),this[_0x1bfe[2731]]= null)};function mxConnectionHandler(_0x47f2x2,_0x47f2x3){mxEventSource[_0x1bfe[239]](this);null!= _0x47f2x2&& (this[_0x1bfe[1179]]= _0x47f2x2,this[_0x1bfe[1033]]= _0x47f2x3,this[_0x1bfe[176]]())}mxUtils[_0x1bfe[1284]](mxConnectionHandler,mxEventSource);mxConnectionHandler[_0x1bfe[202]][_0x1bfe[1179]]= null;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[1033]]= !0;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2880]]= !1;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2881]]= !1;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2882]]= null;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2883]]= !1;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[984]]= !0;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[804]]= !0;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2884]]= !1;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2885]]= null;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2886]]= null;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[267]]= null;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2887]]= !1;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2888]]= !0;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2889]]= 500;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2890]]= !1;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2891]]= !1;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2892]]= 4;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2893]]= 0;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2894]]= 0;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2895]]= !1;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2823]]= null;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2896]]= new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET);mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2897]]= null;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[1176]]= null;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2898]]= null;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2899]]= 0;mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2900]]= mxClient[_0x1bfe[47]];mxConnectionHandler[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2901]]= function(){return this[_0x1bfe[2884]]};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2902]]= function(_0x47f2x2){this[_0x1bfe[2884]]= _0x47f2x2};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2156]]= function(){var _0x47f2x2= new mxPolyline([],mxConstants.INVALID_COLOR);_0x47f2x2[_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[1523]]:mxConstants[_0x1bfe[508]];_0x47f2x2[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]());_0x47f2x2[_0x1bfe[1564]]= 0;_0x47f2x2[_0x1bfe[1229]]= !1;_0x47f2x2[_0x1bfe[1522]]= !0;if(this[_0x1bfe[1179]][_0x1bfe[507]]== mxConstants[_0x1bfe[508]]){_0x47f2x2[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[130])}else {var _0x47f2x3=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){_0x47f2x2= mxUtils[_0x1bfe[2196]](this[_0x1bfe[1179]][_0x1bfe[526]],mxEvent[_0x1bfe[731]](_0x47f2x2),mxEvent[_0x1bfe[733]](_0x47f2x2));return this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](this[_0x1bfe[1179]][_0x1bfe[999]](_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]]))});mxEvent[_0x1bfe[2733]](_0x47f2x2[_0x1bfe[252]],this[_0x1bfe[1179]],_0x47f2x3)};return _0x47f2x2};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[176]]= function(){this[_0x1bfe[1179]][_0x1bfe[1133]](this);this[_0x1bfe[2885]]= this[_0x1bfe[1689]]();this[_0x1bfe[2886]]= new mxConstraintHandler(this[_0x1bfe[1179]]);this[_0x1bfe[1176]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){null!= this[_0x1bfe[2903]]&& (this[_0x1bfe[2903]]= this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](this[_0x1bfe[2903]][_0x1bfe[246]]));null!= this[_0x1bfe[2903]]?this[_0x1bfe[2905]](this[_0x1bfe[2904]],this[_0x1bfe[2903]]):(this[_0x1bfe[2906]](this[_0x1bfe[2904]]),this[_0x1bfe[257]]= null);this[_0x1bfe[2886]][_0x1bfe[862]]()});this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[169]](mxEvent.CHANGE,this[_0x1bfe[1176]]);this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.SCALE,this[_0x1bfe[1176]]);this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.TRANSLATE,this[_0x1bfe[1176]]);this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0x1bfe[1176]]);this[_0x1bfe[2898]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[2906]](this[_0x1bfe[2904]])});this[_0x1bfe[1179]][_0x1bfe[169]](mxEvent.START_EDITING,this[_0x1bfe[2898]]);this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.DOWN,this[_0x1bfe[2898]]);this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.UP,this[_0x1bfe[2898]])};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2907]]= function(_0x47f2x2){return !0};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[1689]]= function(){var _0x47f2x2= new mxCellMarker(this[_0x1bfe[1179]]);_0x47f2x2[_0x1bfe[2859]]= !0;_0x47f2x2[_0x1bfe[736]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x3,_0x47f2x4){_0x47f2x4= mxCellMarker[_0x1bfe[202]][_0x1bfe[736]][_0x1bfe[183]](_0x47f2x2,arguments);this[_0x1bfe[267]]= null;if(!this[_0x1bfe[2907]](_0x47f2x4)){return null};null!= _0x47f2x4?this[_0x1bfe[2908]]()?null!= this[_0x1bfe[257]]&& (this[_0x1bfe[267]]= this[_0x1bfe[2909]](this[_0x1bfe[257]][_0x1bfe[246]],_0x47f2x4),null!= this[_0x1bfe[267]]&& 0== this[_0x1bfe[267]][_0x1bfe[67]]&& (_0x47f2x4= null,this[_0x1bfe[2901]]()&& (this[_0x1bfe[267]]= null))):this[_0x1bfe[2671]](_0x47f2x4)|| (_0x47f2x4= null):this[_0x1bfe[2908]]()&& (!this[_0x1bfe[2901]]()&& !this[_0x1bfe[1179]][_0x1bfe[2406]])&& (this[_0x1bfe[267]]= _0x1bfe[110]);return _0x47f2x4});_0x47f2x2[_0x1bfe[2872]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){return this[_0x1bfe[2908]]()?null== this[_0x1bfe[267]]:mxCellMarker[_0x1bfe[202]][_0x1bfe[2872]][_0x1bfe[183]](_0x47f2x2,arguments)});_0x47f2x2[_0x1bfe[2873]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x3,_0x47f2x4,_0x47f2x5){return null== this[_0x1bfe[2882]]|| this[_0x1bfe[2908]]()?mxCellMarker[_0x1bfe[202]][_0x1bfe[2873]][_0x1bfe[183]](_0x47f2x2,arguments):null});_0x47f2x2[_0x1bfe[1825]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x3,_0x47f2x4){return null!= this[_0x1bfe[2882]]|| this[_0x1bfe[2908]]()?!0:mxCellMarker[_0x1bfe[202]][_0x1bfe[1825]][_0x1bfe[183]](_0x47f2x2,arguments)});return _0x47f2x2};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[861]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[257]]= _0x47f2x2;this[_0x1bfe[2823]]= new mxPoint(_0x47f2x3,_0x47f2x4);this[_0x1bfe[2897]]= null!= _0x47f2x5?_0x47f2x5:this[_0x1bfe[2910]](null);this[_0x1bfe[2885]][_0x1bfe[2860]]= this[_0x1bfe[2885]][_0x1bfe[2853]];this[_0x1bfe[2885]][_0x1bfe[2862]]= _0x47f2x2;this[_0x1bfe[2885]][_0x1bfe[811]]();this[_0x1bfe[746]]( new mxEventObject(mxEvent.START,_0x1bfe[724],this[_0x1bfe[257]]))};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2908]]= function(){return null!= this[_0x1bfe[2823]]&& null!= this[_0x1bfe[253]]};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2671]]= function(_0x47f2x2){return this[_0x1bfe[1179]][_0x1bfe[2671]](_0x47f2x2)};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2672]]= function(_0x47f2x2){return !0};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2909]]= function(_0x47f2x2,_0x47f2x3){return !this[_0x1bfe[2672]](_0x47f2x3)?_0x1bfe[110]:this[_0x1bfe[1179]][_0x1bfe[2500]](null,_0x47f2x2,_0x47f2x3)};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2911]]= function(_0x47f2x2){return this[_0x1bfe[2882]]};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2912]]= function(_0x47f2x2){return null!= _0x47f2x2[_0x1bfe[963]]&& _0x47f2x2[_0x1bfe[963]][_0x1bfe[252]][_0x1bfe[265]]== this[_0x1bfe[1179]][_0x1bfe[526]]?!0:this[_0x1bfe[2880]]};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2913]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[2911]](_0x47f2x2);if(null!= _0x47f2x3&& null!= _0x47f2x2){this[_0x1bfe[2903]]= _0x47f2x2;var _0x47f2x4=[],_0x47f2x5= new mxRectangle(0,0,_0x47f2x3[_0x1bfe[117]],_0x47f2x3[_0x1bfe[119]]),_0x47f2x9= new mxImageShape(_0x47f2x5,_0x47f2x3[_0x1bfe[390]],null,null,0);_0x47f2x9[_0x1bfe[1674]]= !1;this[_0x1bfe[2912]](_0x47f2x2)?(_0x47f2x9[_0x1bfe[507]]= mxConstants[_0x1bfe[1656]],_0x47f2x9[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[526]])):(_0x47f2x9[_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]== mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[508]]:mxConstants[_0x1bfe[1523]],_0x47f2x9[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]()),this[_0x1bfe[2881]]&& null!= _0x47f2x9[_0x1bfe[252]][_0x1bfe[328]]&& _0x47f2x9[_0x1bfe[252]][_0x1bfe[265]][_0x1bfe[950]](_0x47f2x9[_0x1bfe[252]],_0x47f2x9[_0x1bfe[252]][_0x1bfe[265]][_0x1bfe[285]]));_0x47f2x9[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= mxConstants[_0x1bfe[2914]];var _0x47f2xa=mxUtils[_0x1bfe[885]](this,function(){return null!= this[_0x1bfe[2915]]?this[_0x1bfe[2915]]:_0x47f2x2}),_0x47f2x3=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){mxEvent[_0x1bfe[721]](_0x47f2x2)|| (this[_0x1bfe[2916]]= _0x47f2x9,this[_0x1bfe[1179]][_0x1bfe[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x47f2x2,_0x47f2xa())))});mxEvent[_0x1bfe[2733]](_0x47f2x9[_0x1bfe[252]],this[_0x1bfe[1179]],_0x47f2xa,_0x47f2x3);_0x47f2x4[_0x1bfe[207]](_0x47f2x9);this[_0x1bfe[2905]](_0x47f2x4,this[_0x1bfe[2903]]);return _0x47f2x4};return null};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2905]]= function(_0x47f2x2,_0x47f2x3){if(null!= _0x47f2x2&& null!= _0x47f2x2[0]&& null!= _0x47f2x3){var _0x47f2x4=this[_0x1bfe[2917]](_0x47f2x2[0],_0x47f2x3);_0x47f2x2[0][_0x1bfe[1562]][_0x1bfe[235]]= _0x47f2x4[_0x1bfe[235]];_0x47f2x2[0][_0x1bfe[1562]][_0x1bfe[236]]= _0x47f2x4[_0x1bfe[236]];_0x47f2x2[0][_0x1bfe[258]]()}};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2917]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x5=_0x47f2x3[_0x1bfe[241]](),_0x47f2x9=_0x47f2x3[_0x1bfe[242]]();if(this[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x3[_0x1bfe[246]])){var _0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[1731]](_0x47f2x3[_0x1bfe[246]]),_0x47f2x5=0!= _0x47f2xa[_0x1bfe[117]]?_0x47f2x3[_0x1bfe[235]]+ _0x47f2xa[_0x1bfe[117]]* _0x47f2x4/ 2:_0x47f2x5,_0x47f2x9=0!= _0x47f2xa[_0x1bfe[119]]?_0x47f2x3[_0x1bfe[236]]+ _0x47f2xa[_0x1bfe[119]]* _0x47f2x4/ 2:_0x47f2x9,_0x47f2xa=mxUtils[_0x1bfe[431]](mxUtils[_0x1bfe[433]](_0x47f2x3[_0x1bfe[124]],mxConstants.STYLE_ROTATION)|| 0);if(0!= _0x47f2xa){var _0x47f2x4=Math[_0x1bfe[426]](_0x47f2xa),_0x47f2xa=Math[_0x1bfe[427]](_0x47f2xa),_0x47f2x12= new mxPoint(_0x47f2x3[_0x1bfe[241]](),_0x47f2x3[_0x1bfe[242]]()),_0x47f2x9=mxUtils[_0x1bfe[432]]( new mxPoint(_0x47f2x5,_0x47f2x9),_0x47f2x4,_0x47f2xa,_0x47f2x12),_0x47f2x5=_0x47f2x9[_0x1bfe[235]],_0x47f2x9=_0x47f2x9[_0x1bfe[236]]}};return new mxPoint(_0x47f2x5- _0x47f2x2[_0x1bfe[1562]][_0x1bfe[117]]/ 2,_0x47f2x9- _0x47f2x2[_0x1bfe[1562]][_0x1bfe[119]]/ 2)};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2906]]= function(_0x47f2x2){if(null!= _0x47f2x2){this[_0x1bfe[2903]]= null;for(var _0x47f2x3=0;_0x47f2x3< _0x47f2x2[_0x1bfe[67]];_0x47f2x3++){_0x47f2x2[_0x47f2x3][_0x1bfe[515]]()}}};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2918]]= function(_0x47f2x2){return !this[_0x1bfe[1179]][_0x1bfe[2579]](_0x47f2x2[_0x1bfe[727]]())&& (null!= this[_0x1bfe[2886]][_0x1bfe[2919]]&& null!= this[_0x1bfe[2886]][_0x1bfe[2920]]|| null!= this[_0x1bfe[257]]&& null== this[_0x1bfe[267]]&& (null== this[_0x1bfe[2904]]|| null!= this[_0x1bfe[2904]]&& null!= this[_0x1bfe[2916]]))};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[787]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[2899]]++;if(this[_0x1bfe[994]]()&& this[_0x1bfe[1179]][_0x1bfe[994]]()&& !_0x47f2x3[_0x1bfe[721]]()&& !this[_0x1bfe[2908]]()&& this[_0x1bfe[2918]](_0x47f2x3)){null!= this[_0x1bfe[2886]][_0x1bfe[2920]]&& null!= this[_0x1bfe[2886]][_0x1bfe[2919]]&& null!= this[_0x1bfe[2886]][_0x1bfe[987]]?(this[_0x1bfe[2921]]= this[_0x1bfe[2886]][_0x1bfe[2920]],this[_0x1bfe[257]]= this[_0x1bfe[2886]][_0x1bfe[2919]],this[_0x1bfe[2823]]= this[_0x1bfe[2886]][_0x1bfe[987]][_0x1bfe[238]]()):this[_0x1bfe[2823]]= new mxPoint(_0x47f2x3[_0x1bfe[734]](),_0x47f2x3[_0x1bfe[735]]());this[_0x1bfe[2897]]= this[_0x1bfe[2910]](_0x47f2x3);this[_0x1bfe[2899]]= 1;this[_0x1bfe[2887]]&& null== this[_0x1bfe[253]]&& (this[_0x1bfe[2922]]= null,this[_0x1bfe[253]]= this[_0x1bfe[2156]]());if(null== this[_0x1bfe[257]]&& null!= this[_0x1bfe[2897]]){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[2689]](_0x47f2x3[_0x1bfe[727]]());this[_0x1bfe[2897]][_0x1bfe[246]][_0x1bfe[256]][_0x1bfe[2007]](_0x47f2x4,!0)};this[_0x1bfe[746]]( new mxEventObject(mxEvent.START,_0x1bfe[724],this[_0x1bfe[257]]));_0x47f2x3[_0x1bfe[722]]()}else {if(mxClient[_0x1bfe[754]]&& this[_0x1bfe[2888]]&& !this[_0x1bfe[2890]]&& this[_0x1bfe[994]]()&& this[_0x1bfe[1179]][_0x1bfe[994]]()&& !this[_0x1bfe[2908]]()){this[_0x1bfe[2890]]= !0;this[_0x1bfe[2893]]= _0x47f2x3[_0x1bfe[730]]();this[_0x1bfe[2894]]= _0x47f2x3[_0x1bfe[732]]();var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](this[_0x1bfe[2885]][_0x1bfe[736]](_0x47f2x3));this[_0x1bfe[2923]]&& window[_0x1bfe[2924]](this[_0x1bfe[2923]]);this[_0x1bfe[2923]]= window[_0x1bfe[261]](mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[2891]]&& this[_0x1bfe[2925]](_0x47f2x3,_0x47f2x5);this[_0x1bfe[2891]]= this[_0x1bfe[2890]]= !1}),this[_0x1bfe[2889]]);this[_0x1bfe[2891]]= !0}};this[_0x1bfe[2926]]= this[_0x1bfe[2916]];this[_0x1bfe[2916]]= null};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2925]]= function(_0x47f2x2,_0x47f2x3){null!= _0x47f2x3&& (this[_0x1bfe[2885]][_0x1bfe[2860]]= this[_0x1bfe[2885]][_0x1bfe[2853]],this[_0x1bfe[2885]][_0x1bfe[2862]]= _0x47f2x3,this[_0x1bfe[2885]][_0x1bfe[811]](),this[_0x1bfe[2823]]= new mxPoint(_0x47f2x2[_0x1bfe[734]](),_0x47f2x2[_0x1bfe[735]]()),this[_0x1bfe[2897]]= this[_0x1bfe[2910]](_0x47f2x2),this[_0x1bfe[257]]= _0x47f2x3,this[_0x1bfe[746]]( new mxEventObject(mxEvent.START,_0x1bfe[724],this[_0x1bfe[257]])))};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2927]]= function(_0x47f2x2){return !this[_0x1bfe[1179]][_0x1bfe[1712]](_0x47f2x2[_0x1bfe[246]])};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2910]]= function(_0x47f2x2){return null};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2928]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[2885]][_0x1bfe[2871]](_0x47f2x2);this[_0x1bfe[2886]][_0x1bfe[2729]](_0x47f2x2,null== this[_0x1bfe[2823]]);this[_0x1bfe[2915]]= _0x47f2x3};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2929]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[518]](),_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[512]]();_0x47f2x2[_0x1bfe[235]]= _0x47f2x2[_0x1bfe[235]]/ _0x47f2x3- _0x47f2x4[_0x1bfe[235]];_0x47f2x2[_0x1bfe[236]]= _0x47f2x2[_0x1bfe[236]]/ _0x47f2x3- _0x47f2x4[_0x1bfe[236]]};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[788]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[2891]]&& (this[_0x1bfe[2891]]= Math[_0x1bfe[425]](this[_0x1bfe[2893]]- _0x47f2x3[_0x1bfe[730]]())< this[_0x1bfe[2892]]&& Math[_0x1bfe[425]](this[_0x1bfe[2894]]- _0x47f2x3[_0x1bfe[732]]())< this[_0x1bfe[2892]]);if(!_0x47f2x3[_0x1bfe[721]]()&& (this[_0x1bfe[2895]]|| null!= this[_0x1bfe[2823]]|| !this[_0x1bfe[1179]][_0x1bfe[1009]])){!this[_0x1bfe[994]]()&& null!= this[_0x1bfe[2915]]&& (this[_0x1bfe[2906]](this[_0x1bfe[2904]]),this[_0x1bfe[2915]]= null);(null!= this[_0x1bfe[2823]]|| this[_0x1bfe[994]]()&& this[_0x1bfe[1179]][_0x1bfe[994]]())&& this[_0x1bfe[2928]](_0x47f2x3);if(null!= this[_0x1bfe[2823]]){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x4= new mxPoint(this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x3[_0x1bfe[734]]()/ _0x47f2x4)* _0x47f2x4,this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x3[_0x1bfe[735]]()/ _0x47f2x4)* _0x47f2x4),_0x47f2x5=null,_0x47f2x9=_0x47f2x4;null!= this[_0x1bfe[2886]][_0x1bfe[2920]]&& (null!= this[_0x1bfe[2886]][_0x1bfe[2919]]&& null!= this[_0x1bfe[2886]][_0x1bfe[987]])&& (_0x47f2x5= this[_0x1bfe[2886]][_0x1bfe[2920]],_0x47f2x9= this[_0x1bfe[2886]][_0x1bfe[987]][_0x1bfe[238]]());var _0x47f2xa=this[_0x1bfe[2823]];if(null!= this[_0x1bfe[2926]]){var _0x47f2x12=this[_0x1bfe[2926]][_0x1bfe[1562]][_0x1bfe[117]],_0x47f2x13=this[_0x1bfe[2926]][_0x1bfe[1562]][_0x1bfe[119]];null!= this[_0x1bfe[2915]]&& this[_0x1bfe[2883]]?(_0x47f2x12= this[_0x1bfe[2917]](this[_0x1bfe[2926]],this[_0x1bfe[2915]]),this[_0x1bfe[2926]][_0x1bfe[1562]][_0x1bfe[235]]= _0x47f2x12[_0x1bfe[235]],this[_0x1bfe[2926]][_0x1bfe[1562]][_0x1bfe[236]]= _0x47f2x12[_0x1bfe[236]]):(_0x47f2x12= new mxRectangle(_0x47f2x3[_0x1bfe[734]]()+ this[_0x1bfe[2896]][_0x1bfe[235]],_0x47f2x3[_0x1bfe[735]]()+ this[_0x1bfe[2896]][_0x1bfe[236]],_0x47f2x12,_0x47f2x13),this[_0x1bfe[2926]][_0x1bfe[1562]]= _0x47f2x12);this[_0x1bfe[2926]][_0x1bfe[258]]()};if(null!= this[_0x1bfe[2897]]){this[_0x1bfe[2897]][_0x1bfe[439]]= [null,null!= this[_0x1bfe[2915]]?null:_0x47f2x9];this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[2289]](this[_0x1bfe[2897]],this[_0x1bfe[257]],!0,this[_0x1bfe[2921]]);null!= this[_0x1bfe[2915]]&& (null== _0x47f2x5&& (_0x47f2x5= this[_0x1bfe[1179]][_0x1bfe[2288]](this[_0x1bfe[2897]],this[_0x1bfe[257]],!1)),this[_0x1bfe[2897]][_0x1bfe[2088]](null,!1),this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[2289]](this[_0x1bfe[2897]],this[_0x1bfe[2915]],!1,_0x47f2x5));_0x47f2xa= null;if(null!= this[_0x1bfe[2922]]){_0x47f2xa= [];for(_0x47f2x9= 0;_0x47f2x9< this[_0x1bfe[2922]][_0x1bfe[67]];_0x47f2x9++){_0x47f2x5= this[_0x1bfe[2922]][_0x47f2x9][_0x1bfe[238]](),this[_0x1bfe[2929]](_0x47f2x5),_0x47f2xa[_0x47f2x9]= _0x47f2x5}};this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[2282]](this[_0x1bfe[2897]],_0x47f2xa,this[_0x1bfe[257]],this[_0x1bfe[2915]]);this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[2283]](this[_0x1bfe[2897]],this[_0x1bfe[257]],this[_0x1bfe[2915]]);_0x47f2x9= this[_0x1bfe[2897]][_0x1bfe[439]][this[_0x1bfe[2897]][_0x1bfe[439]][_0x1bfe[67]]- 1];_0x47f2xa= this[_0x1bfe[2897]][_0x1bfe[439]][0]}else {null!= this[_0x1bfe[2915]]&& null== this[_0x1bfe[2886]][_0x1bfe[2920]]&& (_0x47f2x12= this[_0x1bfe[2930]](this[_0x1bfe[2915]],_0x47f2x3),null!= _0x47f2x12&& (_0x47f2x9= _0x47f2x12)),null== this[_0x1bfe[2921]]&& null!= this[_0x1bfe[257]]&& (_0x47f2x12= this[_0x1bfe[2931]](this[_0x1bfe[257]],null!= this[_0x1bfe[2922]]&& 0< this[_0x1bfe[2922]][_0x1bfe[67]]?this[_0x1bfe[2922]][0]:_0x47f2x9,_0x47f2x3),null!= _0x47f2x12&& (_0x47f2xa= _0x47f2x12))};if(null== this[_0x1bfe[2915]]&& this[_0x1bfe[2900]]){_0x47f2x12= _0x47f2xa;null!= this[_0x1bfe[2897]]&& 2< this[_0x1bfe[2897]][_0x1bfe[439]][_0x1bfe[67]]&& (_0x47f2x5= this[_0x1bfe[2897]][_0x1bfe[439]][this[_0x1bfe[2897]][_0x1bfe[439]][_0x1bfe[67]]- 2],null!= _0x47f2x5&& (_0x47f2x12= _0x47f2x5));_0x47f2x5= _0x47f2x9[_0x1bfe[235]]- _0x47f2x12[_0x1bfe[235]];_0x47f2x12= _0x47f2x9[_0x1bfe[236]]- _0x47f2x12[_0x1bfe[236]];_0x47f2x13= Math[_0x1bfe[428]](_0x47f2x5* _0x47f2x5+ _0x47f2x12* _0x47f2x12);if(0== _0x47f2x13){return};_0x47f2x9[_0x1bfe[235]]-= 4* _0x47f2x5/ _0x47f2x13;_0x47f2x9[_0x1bfe[236]]-= 4* _0x47f2x12/ _0x47f2x13};if(null== this[_0x1bfe[253]]&& (_0x47f2x5= Math[_0x1bfe[425]](_0x47f2x4[_0x1bfe[235]]- this[_0x1bfe[2823]][_0x1bfe[235]]),_0x47f2x12= Math[_0x1bfe[425]](_0x47f2x4[_0x1bfe[236]]- this[_0x1bfe[2823]][_0x1bfe[236]]),_0x47f2x5> this[_0x1bfe[1179]][_0x1bfe[2353]]|| _0x47f2x12> this[_0x1bfe[1179]][_0x1bfe[2353]])){this[_0x1bfe[253]]= this[_0x1bfe[2156]](),this[_0x1bfe[2928]](_0x47f2x3)};null!= this[_0x1bfe[253]]&& (null!= this[_0x1bfe[2897]]?this[_0x1bfe[253]][_0x1bfe[1525]]= this[_0x1bfe[2897]][_0x1bfe[439]]:(_0x47f2x4= [_0x47f2xa],null!= this[_0x1bfe[2922]]&& (_0x47f2x4= _0x47f2x4[_0x1bfe[1919]](this[_0x1bfe[2922]])),_0x47f2x4[_0x1bfe[207]](_0x47f2x9),this[_0x1bfe[253]][_0x1bfe[1525]]= _0x47f2x4),this[_0x1bfe[2932]]());mxEvent[_0x1bfe[722]](_0x47f2x3[_0x1bfe[727]]());_0x47f2x3[_0x1bfe[722]]()}else {!this[_0x1bfe[994]]()|| !this[_0x1bfe[1179]][_0x1bfe[994]]()?this[_0x1bfe[2886]][_0x1bfe[862]]():this[_0x1bfe[257]]!= this[_0x1bfe[2915]]&& null== this[_0x1bfe[2897]]?(this[_0x1bfe[2906]](this[_0x1bfe[2904]]),this[_0x1bfe[2904]]= null,null!= this[_0x1bfe[2915]]&& null== this[_0x1bfe[267]]&& (this[_0x1bfe[2904]]= this[_0x1bfe[2913]](this[_0x1bfe[2915]]),null== this[_0x1bfe[2904]]&& (this[_0x1bfe[2915]][_0x1bfe[1609]](mxConstants.CURSOR_CONNECT),_0x47f2x3[_0x1bfe[722]]())),this[_0x1bfe[257]]= this[_0x1bfe[2915]]):this[_0x1bfe[257]]== this[_0x1bfe[2915]]&& (null!= this[_0x1bfe[2915]]&& null== this[_0x1bfe[2904]]&& !this[_0x1bfe[1179]][_0x1bfe[1009]])&& _0x47f2x3[_0x1bfe[722]]()};null!= this[_0x1bfe[2886]][_0x1bfe[2920]]&& this[_0x1bfe[2885]][_0x1bfe[862]]();if(!this[_0x1bfe[1179]][_0x1bfe[1009]]&& null!= this[_0x1bfe[2915]]&& null!= this[_0x1bfe[2904]]){_0x47f2x4= !1;_0x47f2xa= _0x47f2x3[_0x1bfe[728]]();for(_0x47f2x9= 0;_0x47f2x9< this[_0x1bfe[2904]][_0x1bfe[67]]&& !_0x47f2x4;_0x47f2x9++){_0x47f2x4= _0x47f2xa== this[_0x1bfe[2904]][_0x47f2x9][_0x1bfe[252]]|| _0x47f2xa[_0x1bfe[265]]== this[_0x1bfe[2904]][_0x47f2x9][_0x1bfe[252]]};_0x47f2x4|| this[_0x1bfe[2933]](this[_0x1bfe[2915]],this[_0x1bfe[2904]],_0x47f2x3)}}else {this[_0x1bfe[2886]][_0x1bfe[862]]()}};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2930]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=null,_0x47f2x5=_0x47f2x2[_0x1bfe[441]],_0x47f2x9=_0x47f2x5[_0x1bfe[2305]](_0x47f2x2);if(null!= _0x47f2x9){var _0x47f2xa=null!= this[_0x1bfe[2922]]&& 0< this[_0x1bfe[2922]][_0x1bfe[67]]?this[_0x1bfe[2922]][this[_0x1bfe[2922]][_0x1bfe[67]]- 1]: new mxPoint(this[_0x1bfe[257]][_0x1bfe[241]](),this[_0x1bfe[257]][_0x1bfe[242]]()),_0x47f2x5=_0x47f2x9(_0x47f2x5[_0x1bfe[2087]](_0x47f2x2),this[_0x1bfe[2897]],_0x47f2xa,!1);null!= _0x47f2x5&& (_0x47f2x4= _0x47f2x5)}else {_0x47f2x4= new mxPoint(_0x47f2x2[_0x1bfe[241]](),_0x47f2x2[_0x1bfe[242]]())};return _0x47f2x4};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2931]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x4= null;var _0x47f2x5=_0x47f2x2[_0x1bfe[441]],_0x47f2x9=_0x47f2x5[_0x1bfe[2305]](_0x47f2x2),_0x47f2xa= new mxPoint(_0x47f2x2[_0x1bfe[241]](),_0x47f2x2[_0x1bfe[242]]());if(null!= _0x47f2x9){var _0x47f2x12=mxUtils[_0x1bfe[433]](_0x47f2x2[_0x1bfe[124]],mxConstants.STYLE_ROTATION,0),_0x47f2x13=-_0x47f2x12* (Math[_0x1bfe[424]]/ 180);0!= _0x47f2x12&& (_0x47f2x3= mxUtils[_0x1bfe[432]]( new mxPoint(_0x47f2x3[_0x1bfe[235]],_0x47f2x3[_0x1bfe[236]]),Math[_0x1bfe[426]](_0x47f2x13),Math[_0x1bfe[427]](_0x47f2x13),_0x47f2xa));_0x47f2x2= _0x47f2x9(_0x47f2x5[_0x1bfe[2087]](_0x47f2x2),_0x47f2x2,_0x47f2x3,!1);null!= _0x47f2x2&& (0!= _0x47f2x12&& (_0x47f2x2= mxUtils[_0x1bfe[432]]( new mxPoint(_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]]),Math[_0x1bfe[426]](-_0x47f2x13),Math[_0x1bfe[427]](-_0x47f2x13),_0x47f2xa)),_0x47f2x4= _0x47f2x2)}else {_0x47f2x4= _0x47f2xa};return _0x47f2x4};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2933]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2934]]= function(_0x47f2x2){return null!= _0x47f2x2[_0x1bfe[248]]()};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2935]]= function(_0x47f2x2){var _0x47f2x3=mxUtils[_0x1bfe[2196]](this[_0x1bfe[1179]][_0x1bfe[526]],_0x47f2x2[_0x1bfe[730]](),_0x47f2x2[_0x1bfe[732]]()),_0x47f2x4=Math[_0x1bfe[425]](_0x47f2x3[_0x1bfe[235]]- this[_0x1bfe[2823]][_0x1bfe[235]]),_0x47f2x3=Math[_0x1bfe[425]](_0x47f2x3[_0x1bfe[236]]- this[_0x1bfe[2823]][_0x1bfe[236]]);if(null!= this[_0x1bfe[2922]]|| 1< this[_0x1bfe[2899]]&& (_0x47f2x4> this[_0x1bfe[1179]][_0x1bfe[2353]]|| _0x47f2x3> this[_0x1bfe[1179]][_0x1bfe[2353]])){null== this[_0x1bfe[2922]]&& (this[_0x1bfe[2922]]= []),_0x47f2x4= this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]],_0x47f2x3= new mxPoint(this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x2[_0x1bfe[734]]()/ _0x47f2x4)* _0x47f2x4,this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x2[_0x1bfe[735]]()/ _0x47f2x4)* _0x47f2x4),this[_0x1bfe[2922]][_0x1bfe[207]](_0x47f2x3)}};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[789]]= function(_0x47f2x2,_0x47f2x3){if(!_0x47f2x3[_0x1bfe[721]]()&& this[_0x1bfe[2908]]()){if(this[_0x1bfe[2887]]&& !this[_0x1bfe[2934]](_0x47f2x3)){this[_0x1bfe[2935]](_0x47f2x3);_0x47f2x3[_0x1bfe[722]]();return};if(null== this[_0x1bfe[267]]){var _0x47f2x4=null!= this[_0x1bfe[257]]?this[_0x1bfe[257]][_0x1bfe[246]]:null,_0x47f2x5=null;null!= this[_0x1bfe[2886]][_0x1bfe[2920]]&& null!= this[_0x1bfe[2886]][_0x1bfe[2919]]&& (_0x47f2x5= this[_0x1bfe[2886]][_0x1bfe[2919]][_0x1bfe[246]]);null== _0x47f2x5&& this[_0x1bfe[2885]][_0x1bfe[2867]]()&& (_0x47f2x5= this[_0x1bfe[2885]][_0x1bfe[2861]][_0x1bfe[246]]);this[_0x1bfe[807]](_0x47f2x4,_0x47f2x5,_0x47f2x3[_0x1bfe[727]](),_0x47f2x3[_0x1bfe[736]]())}else {null!= this[_0x1bfe[257]]&& (null!= this[_0x1bfe[2885]][_0x1bfe[2861]]&& this[_0x1bfe[257]][_0x1bfe[246]]== this[_0x1bfe[2885]][_0x1bfe[2861]][_0x1bfe[246]])&& this[_0x1bfe[1179]][_0x1bfe[2459]](this[_0x1bfe[2885]][_0x1bfe[1097]],evt),0< this[_0x1bfe[267]][_0x1bfe[67]]&& this[_0x1bfe[1179]][_0x1bfe[2580]](this[_0x1bfe[267]])};this[_0x1bfe[2906]](this[_0x1bfe[2904]]);_0x47f2x3[_0x1bfe[722]]()};null!= this[_0x1bfe[2823]]&& this[_0x1bfe[862]]();this[_0x1bfe[2891]]= this[_0x1bfe[2890]]= !1};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[862]]= function(){null!= this[_0x1bfe[253]]&& (this[_0x1bfe[253]][_0x1bfe[515]](),this[_0x1bfe[253]]= null);this[_0x1bfe[2906]](this[_0x1bfe[2904]]);this[_0x1bfe[2904]]= null;this[_0x1bfe[2885]][_0x1bfe[862]]();this[_0x1bfe[2886]][_0x1bfe[862]]();this[_0x1bfe[2921]]= this[_0x1bfe[267]]= this[_0x1bfe[257]]= this[_0x1bfe[2897]]= this[_0x1bfe[2926]]= null;this[_0x1bfe[2899]]= 0;this[_0x1bfe[2916]]= this[_0x1bfe[2823]]= null;this[_0x1bfe[746]]( new mxEventObject(mxEvent.RESET))};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2932]]= function(){var _0x47f2x2=null== this[_0x1bfe[267]];this[_0x1bfe[253]][_0x1bfe[1307]]= this[_0x1bfe[2936]](_0x47f2x2);_0x47f2x2= this[_0x1bfe[2937]](_0x47f2x2);this[_0x1bfe[253]][_0x1bfe[1336]]= _0x47f2x2;this[_0x1bfe[253]][_0x1bfe[258]]()};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2937]]= function(_0x47f2x2){return _0x47f2x2?mxConstants[_0x1bfe[2829]]:mxConstants[_0x1bfe[2938]]};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2936]]= function(_0x47f2x2){return _0x47f2x2?3:1};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[807]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x3|| this[_0x1bfe[2901]]()|| this[_0x1bfe[1179]][_0x1bfe[2406]]){var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2xa=null;_0x47f2x9[_0x1bfe[473]]();try{if(null!= _0x47f2x2&& (null== _0x47f2x3&& this[_0x1bfe[2901]]())&& (_0x47f2x3= this[_0x1bfe[2939]](_0x47f2x4,_0x47f2x2),null!= _0x47f2x3)){_0x47f2x5= this[_0x1bfe[1179]][_0x1bfe[564]]([_0x47f2x3],_0x47f2x4,_0x47f2x5);if(null== _0x47f2x5|| !this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[250]](_0x47f2x5)){var _0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x5);if(null!= _0x47f2x12){var _0x47f2x13=_0x47f2x9[_0x1bfe[1721]](_0x47f2x3);_0x47f2x13[_0x1bfe[235]]-= _0x47f2x12[_0x1bfe[2078]][_0x1bfe[235]];_0x47f2x13[_0x1bfe[236]]-= _0x47f2x12[_0x1bfe[2078]][_0x1bfe[236]]}}else {_0x47f2x5= this[_0x1bfe[1179]][_0x1bfe[902]]()};this[_0x1bfe[1179]][_0x1bfe[2103]](_0x47f2x3,_0x47f2x5)};var _0x47f2x14=this[_0x1bfe[1179]][_0x1bfe[902]]();null!= _0x47f2x2&& (null!= _0x47f2x3&& _0x47f2x9[_0x1bfe[1197]](_0x47f2x2)== _0x47f2x9[_0x1bfe[1197]](_0x47f2x3)&& _0x47f2x9[_0x1bfe[1197]](_0x47f2x9[_0x1bfe[1197]](_0x47f2x2))!= _0x47f2x9[_0x1bfe[501]]())&& (_0x47f2x14= _0x47f2x9[_0x1bfe[1197]](_0x47f2x2),null!= _0x47f2x2[_0x1bfe[256]]&& _0x47f2x2[_0x1bfe[256]][_0x1bfe[1500]]&& (null!= _0x47f2x3[_0x1bfe[256]]&& _0x47f2x3[_0x1bfe[256]][_0x1bfe[1500]])&& (_0x47f2x14= _0x47f2x9[_0x1bfe[1197]](_0x47f2x14)));_0x47f2x13= _0x47f2x12= null;null!= this[_0x1bfe[2897]]&& (_0x47f2x12= this[_0x1bfe[2897]][_0x1bfe[246]][_0x1bfe[131]],_0x47f2x13= this[_0x1bfe[2897]][_0x1bfe[246]][_0x1bfe[124]]);_0x47f2xa= this[_0x1bfe[1960]](_0x47f2x14,null,_0x47f2x12,_0x47f2x2,_0x47f2x3,_0x47f2x13);if(null!= _0x47f2xa){this[_0x1bfe[1179]][_0x1bfe[2545]](_0x47f2xa,_0x47f2x2,!0,this[_0x1bfe[2921]]);this[_0x1bfe[1179]][_0x1bfe[2545]](_0x47f2xa,_0x47f2x3,!1,this[_0x1bfe[2886]][_0x1bfe[2920]]);null!= this[_0x1bfe[2897]]&& _0x47f2x9[_0x1bfe[1724]](_0x47f2xa,this[_0x1bfe[2897]][_0x1bfe[246]][_0x1bfe[256]]);var _0x47f2x15=_0x47f2x9[_0x1bfe[1721]](_0x47f2xa);null== _0x47f2x15&& (_0x47f2x15= new mxGeometry,_0x47f2x15[_0x1bfe[1500]]= !0,_0x47f2x9[_0x1bfe[1724]](_0x47f2xa,_0x47f2x15));if(null!= this[_0x1bfe[2922]]&& 0< this[_0x1bfe[2922]][_0x1bfe[67]]){var _0x47f2x16=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]],_0x47f2x17=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[513]];_0x47f2x15[_0x1bfe[1525]]= [];for(_0x47f2x2= 0;_0x47f2x2< this[_0x1bfe[2922]][_0x1bfe[67]];_0x47f2x2++){var _0x47f2x18=this[_0x1bfe[2922]][_0x47f2x2];_0x47f2x15[_0x1bfe[1525]][_0x1bfe[207]]( new mxPoint(_0x47f2x18[_0x1bfe[235]]/ _0x47f2x16- _0x47f2x17[_0x1bfe[235]],_0x47f2x18[_0x1bfe[236]]/ _0x47f2x16- _0x47f2x17[_0x1bfe[236]]))}};null== _0x47f2x3&& (_0x47f2x18= this[_0x1bfe[1179]][_0x1bfe[2689]](_0x47f2x4,!1),_0x47f2x18[_0x1bfe[235]]-= this[_0x1bfe[1179]][_0x1bfe[1136]]/ this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]],_0x47f2x18[_0x1bfe[236]]-= this[_0x1bfe[1179]][_0x1bfe[1137]]/ this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]],_0x47f2x15[_0x1bfe[2007]](_0x47f2x18,!1));this[_0x1bfe[746]]( new mxEventObject(mxEvent.CONNECT,_0x1bfe[246],_0x47f2xa,_0x1bfe[763],_0x47f2x4,_0x1bfe[772],_0x47f2x5))}}catch(q){mxLog[_0x1bfe[539]](),mxLog[_0x1bfe[143]](q[_0x1bfe[281]])}finally{_0x47f2x9[_0x1bfe[476]]()};this[_0x1bfe[804]]&& this[_0x1bfe[2707]](_0x47f2xa,_0x47f2x3)}};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2707]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1179]][_0x1bfe[2450]](_0x47f2x2)};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[1960]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){if(null== this[_0x1bfe[1033]]){return this[_0x1bfe[1179]][_0x1bfe[1960]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa)};_0x47f2x3= this[_0x1bfe[2503]](_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa);return _0x47f2x3= this[_0x1bfe[1179]][_0x1bfe[2504]](_0x47f2x3,_0x47f2x2,_0x47f2x5,_0x47f2x9)};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2939]]= function(_0x47f2x2,_0x47f2x3){for(var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x3);null!= _0x47f2x4&& _0x47f2x4[_0x1bfe[1500]];){_0x47f2x3= this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1197]](_0x47f2x3),_0x47f2x4= this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x3)};var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[899]]([_0x47f2x3])[0],_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1721]](_0x47f2x5);if(null!= _0x47f2x4){var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[2689]](_0x47f2x2);_0x47f2x4[_0x1bfe[235]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x9[_0x1bfe[235]]- _0x47f2x4[_0x1bfe[117]]/ 2)- this[_0x1bfe[1179]][_0x1bfe[1136]]/ this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]];_0x47f2x4[_0x1bfe[236]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x9[_0x1bfe[236]]- _0x47f2x4[_0x1bfe[119]]/ 2)- this[_0x1bfe[1179]][_0x1bfe[1137]]/ this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]];if(null!= this[_0x1bfe[2823]]){var _0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x3);if(null!= _0x47f2xa){var _0x47f2x12=this[_0x1bfe[2940]]();Math[_0x1bfe[425]](this[_0x1bfe[1179]][_0x1bfe[1021]](this[_0x1bfe[2823]][_0x1bfe[235]])- this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x9[_0x1bfe[235]]))<= _0x47f2x12?_0x47f2x4[_0x1bfe[235]]= _0x47f2xa[_0x1bfe[235]]:Math[_0x1bfe[425]](this[_0x1bfe[1179]][_0x1bfe[1021]](this[_0x1bfe[2823]][_0x1bfe[236]])- this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x9[_0x1bfe[236]]))<= _0x47f2x12&& (_0x47f2x4[_0x1bfe[236]]= _0x47f2xa[_0x1bfe[236]])}}};return _0x47f2x5};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2940]]= function(){return this[_0x1bfe[1179]][_0x1bfe[997]]()?this[_0x1bfe[1179]][_0x1bfe[1020]]:this[_0x1bfe[1179]][_0x1bfe[2353]]};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[2503]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=null;null!= this[_0x1bfe[1033]]&& (_0x47f2x9= this[_0x1bfe[1033]](_0x47f2x3,_0x47f2x4,_0x47f2x5));null== _0x47f2x9&& (_0x47f2x9= new mxCell(_0x47f2x2|| _0x1bfe[110]),_0x47f2x9[_0x1bfe[1994]](!0),_0x47f2x9[_0x1bfe[475]](_0x47f2x5),_0x47f2x2= new mxGeometry,_0x47f2x2[_0x1bfe[1500]]= !0,_0x47f2x9[_0x1bfe[1724]](_0x47f2x2));return _0x47f2x9};mxConnectionHandler[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[1179]][_0x1bfe[1148]](this);null!= this[_0x1bfe[253]]&& (this[_0x1bfe[253]][_0x1bfe[515]](),this[_0x1bfe[253]]= null);null!= this[_0x1bfe[2885]]&& (this[_0x1bfe[2885]][_0x1bfe[515]](),this[_0x1bfe[2885]]= null);null!= this[_0x1bfe[2886]]&& (this[_0x1bfe[2886]][_0x1bfe[515]](),this[_0x1bfe[2886]]= null);null!= this[_0x1bfe[1176]]&& (this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[745]](this[_0x1bfe[1176]]),this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[745]](this[_0x1bfe[1176]]),this[_0x1bfe[1176]]= null);null!= this[_0x1bfe[2898]]&& (this[_0x1bfe[1179]][_0x1bfe[745]](this[_0x1bfe[2898]]),this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[745]](this[_0x1bfe[2898]]),this[_0x1bfe[2898]]= null)};function mxConstraintHandler(_0x47f2x2){this[_0x1bfe[1179]]= _0x47f2x2}mxConstraintHandler[_0x1bfe[202]][_0x1bfe[2941]]= new mxImage(mxClient[_0x1bfe[88]]+ _0x1bfe[2942],5,5);mxConstraintHandler[_0x1bfe[202]][_0x1bfe[1179]]= null;mxConstraintHandler[_0x1bfe[202]][_0x1bfe[984]]= !0;mxConstraintHandler[_0x1bfe[202]][_0x1bfe[2943]]= mxConstants[_0x1bfe[2854]];mxConstraintHandler[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxConstraintHandler[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxConstraintHandler[_0x1bfe[202]][_0x1bfe[862]]= function(){if(null!= this[_0x1bfe[2944]]){for(var _0x47f2x2=0;_0x47f2x2< this[_0x1bfe[2944]][_0x1bfe[67]];_0x47f2x2++){this[_0x1bfe[2944]][_0x47f2x2][_0x1bfe[515]]()};this[_0x1bfe[2944]]= null};null!= this[_0x1bfe[2945]]&& (this[_0x1bfe[2945]][_0x1bfe[515]](),this[_0x1bfe[2945]]= null);this[_0x1bfe[2946]]= this[_0x1bfe[2919]]= this[_0x1bfe[987]]= this[_0x1bfe[2947]]= this[_0x1bfe[2920]]= null};mxConstraintHandler[_0x1bfe[202]][_0x1bfe[2636]]= function(){return this[_0x1bfe[1179]][_0x1bfe[2636]]()};mxConstraintHandler[_0x1bfe[202]][_0x1bfe[2948]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return this[_0x1bfe[2941]]};mxConstraintHandler[_0x1bfe[202]][_0x1bfe[2949]]= function(_0x47f2x2,_0x47f2x3){return !1};mxConstraintHandler[_0x1bfe[202]][_0x1bfe[2729]]= function(_0x47f2x2,_0x47f2x3){if(this[_0x1bfe[994]]()&& !this[_0x1bfe[2949]](_0x47f2x2)){var _0x47f2x4=this[_0x1bfe[2636]](),_0x47f2x5= new mxRectangle(_0x47f2x2[_0x1bfe[734]]()- _0x47f2x4,_0x47f2x2[_0x1bfe[735]]()- _0x47f2x4,2* _0x47f2x4,2* _0x47f2x4),_0x47f2x9=null!= _0x47f2x2[_0x1bfe[736]]()?this[_0x1bfe[1179]][_0x1bfe[2565]](_0x47f2x2[_0x1bfe[736]]()):!1;if(null== this[_0x1bfe[2947]]|| !mxUtils[_0x1bfe[1825]](this[_0x1bfe[2947]],_0x47f2x5)|| null!= _0x47f2x2[_0x1bfe[248]]()&& null!= this[_0x1bfe[2919]]&& _0x47f2x9){if(this[_0x1bfe[2947]]= null,_0x47f2x2[_0x1bfe[248]]()!= this[_0x1bfe[2919]]){if(this[_0x1bfe[2919]]= null,this[_0x1bfe[1531]]= null!= _0x47f2x2[_0x1bfe[248]]()&& _0x47f2x9?this[_0x1bfe[1179]][_0x1bfe[2538]](_0x47f2x2[_0x1bfe[248]](),_0x47f2x3):null,null!= this[_0x1bfe[1531]]){this[_0x1bfe[2919]]= _0x47f2x2[_0x1bfe[248]]();this[_0x1bfe[2947]]= new mxRectangle(_0x47f2x2[_0x1bfe[248]]()[_0x1bfe[235]],_0x47f2x2[_0x1bfe[248]]()[_0x1bfe[236]],_0x47f2x2[_0x1bfe[248]]()[_0x1bfe[117]],_0x47f2x2[_0x1bfe[248]]()[_0x1bfe[119]]);if(null!= this[_0x1bfe[2944]]){for(_0x47f2x9= 0;_0x47f2x9< this[_0x1bfe[2944]][_0x1bfe[67]];_0x47f2x9++){this[_0x1bfe[2944]][_0x47f2x9][_0x1bfe[515]]()};this[_0x1bfe[2946]]= this[_0x1bfe[2944]]= null};this[_0x1bfe[2944]]= [];this[_0x1bfe[2946]]= [];for(_0x47f2x9= 0;_0x47f2x9< this[_0x1bfe[1531]][_0x1bfe[67]];_0x47f2x9++){var _0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[2290]](_0x47f2x2[_0x1bfe[248]](),this[_0x1bfe[1531]][_0x47f2x9]),_0x47f2x12=this[_0x1bfe[2948]](_0x47f2x2[_0x1bfe[248]](),this[_0x1bfe[1531]][_0x47f2x9],_0x47f2xa),_0x47f2x13=_0x47f2x12[_0x1bfe[390]],_0x47f2x12= new mxRectangle(_0x47f2xa[_0x1bfe[235]]- _0x47f2x12[_0x1bfe[117]]/ 2,_0x47f2xa[_0x1bfe[236]]- _0x47f2x12[_0x1bfe[119]]/ 2,_0x47f2x12[_0x1bfe[117]],_0x47f2x12[_0x1bfe[119]]),_0x47f2x12= new mxImageShape(_0x47f2x12,_0x47f2x13);_0x47f2x12[_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[2334]]:mxConstants[_0x1bfe[508]];_0x47f2x12[_0x1bfe[1674]]= !1;_0x47f2x12[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]());null!= _0x47f2x12[_0x1bfe[252]][_0x1bfe[328]]&& _0x47f2x12[_0x1bfe[252]][_0x1bfe[265]][_0x1bfe[950]](_0x47f2x12[_0x1bfe[252]],_0x47f2x12[_0x1bfe[252]][_0x1bfe[265]][_0x1bfe[285]]);_0x47f2x13= mxUtils[_0x1bfe[885]](this,function(){return null!= this[_0x1bfe[2919]]?this[_0x1bfe[2919]]:_0x47f2x2[_0x1bfe[248]]()});_0x47f2x12[_0x1bfe[258]]();mxEvent[_0x1bfe[2733]](_0x47f2x12[_0x1bfe[252]],this[_0x1bfe[1179]],_0x47f2x13);this[_0x1bfe[2947]][_0x1bfe[99]](_0x47f2x12[_0x1bfe[1562]]);this[_0x1bfe[2944]][_0x1bfe[207]](_0x47f2x12);this[_0x1bfe[2946]][_0x1bfe[207]](_0x47f2xa)};this[_0x1bfe[2947]][_0x1bfe[244]](_0x47f2x4)}else {if(null!= this[_0x1bfe[2944]]){null!= this[_0x1bfe[2945]]&& (this[_0x1bfe[2945]][_0x1bfe[515]](),this[_0x1bfe[2945]]= null);for(_0x47f2x9= 0;_0x47f2x9< this[_0x1bfe[2944]][_0x1bfe[67]];_0x47f2x9++){this[_0x1bfe[2944]][_0x47f2x9][_0x1bfe[515]]()};this[_0x1bfe[2946]]= this[_0x1bfe[2944]]= null}}}};this[_0x1bfe[987]]= this[_0x1bfe[2920]]= null;if(null!= this[_0x1bfe[2944]]&& null!= this[_0x1bfe[1531]]&& (null== _0x47f2x2[_0x1bfe[248]]()|| this[_0x1bfe[2919]]== _0x47f2x2[_0x1bfe[248]]())){for(_0x47f2x9= 0;_0x47f2x9< this[_0x1bfe[2944]][_0x1bfe[67]];_0x47f2x9++){if(mxUtils[_0x1bfe[1825]](this[_0x1bfe[2944]][_0x47f2x9][_0x1bfe[1562]],_0x47f2x5)){this[_0x1bfe[2920]]= this[_0x1bfe[1531]][_0x47f2x9];this[_0x1bfe[987]]= this[_0x1bfe[2946]][_0x47f2x9];_0x47f2x4= this[_0x1bfe[2944]][_0x47f2x9][_0x1bfe[1562]][_0x1bfe[238]]();_0x47f2x4[_0x1bfe[244]](mxClient[_0x1bfe[80]]?3:2);mxClient[_0x1bfe[80]]&& (_0x47f2x4[_0x1bfe[117]]-= 1,_0x47f2x4[_0x1bfe[119]]-= 1);null== this[_0x1bfe[2945]]?(_0x47f2x4= new mxRectangleShape(_0x47f2x4,null,this[_0x1bfe[2943]],3),_0x47f2x4[_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]== mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[508]]:mxConstants[_0x1bfe[1523]],_0x47f2x4[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]()),this[_0x1bfe[2945]]= _0x47f2x4,_0x47f2x13= mxUtils[_0x1bfe[885]](this,function(){return null!= this[_0x1bfe[2919]]?this[_0x1bfe[2919]]:_0x47f2x2[_0x1bfe[248]]()}),mxEvent[_0x1bfe[2733]](_0x47f2x4[_0x1bfe[252]],this[_0x1bfe[1179]],_0x47f2x13)):(this[_0x1bfe[2945]][_0x1bfe[1562]]= _0x47f2x4,this[_0x1bfe[2945]][_0x1bfe[258]]());break}}};null== this[_0x1bfe[2920]]&& null!= this[_0x1bfe[2945]]&& (this[_0x1bfe[2945]][_0x1bfe[515]](),this[_0x1bfe[2945]]= null)}};mxConstraintHandler[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[862]]()};function mxRubberband(_0x47f2x2){null!= _0x47f2x2&& (this[_0x1bfe[1179]]= _0x47f2x2,this[_0x1bfe[1179]][_0x1bfe[1133]](this),this[_0x1bfe[2730]]= mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[2950]]()}),this[_0x1bfe[1179]][_0x1bfe[169]](mxEvent.PAN,this[_0x1bfe[2730]]),mxClient[_0x1bfe[80]]&& mxEvent[_0x1bfe[169]](window,_0x1bfe[2428],mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[515]]()})))}mxRubberband[_0x1bfe[202]][_0x1bfe[2951]]= 20;mxRubberband[_0x1bfe[202]][_0x1bfe[984]]= !0;mxRubberband[_0x1bfe[202]][_0x1bfe[485]]= null;mxRubberband[_0x1bfe[202]][_0x1bfe[2952]]= null;mxRubberband[_0x1bfe[202]][_0x1bfe[2953]]= 0;mxRubberband[_0x1bfe[202]][_0x1bfe[2954]]= 0;mxRubberband[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxRubberband[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxRubberband[_0x1bfe[202]][_0x1bfe[787]]= function(_0x47f2x2,_0x47f2x3){if(!_0x47f2x3[_0x1bfe[721]]()&& this[_0x1bfe[994]]()&& this[_0x1bfe[1179]][_0x1bfe[994]]()&& (this[_0x1bfe[1179]][_0x1bfe[2579]](_0x47f2x3[_0x1bfe[727]]())|| null== _0x47f2x3[_0x1bfe[248]]())){var _0x47f2x4=mxUtils[_0x1bfe[445]](this[_0x1bfe[1179]][_0x1bfe[526]]),_0x47f2x5=mxUtils[_0x1bfe[444]](this[_0x1bfe[1179]][_0x1bfe[526]]);_0x47f2x5[_0x1bfe[235]]-= _0x47f2x4[_0x1bfe[235]];_0x47f2x5[_0x1bfe[236]]-= _0x47f2x4[_0x1bfe[236]];this[_0x1bfe[861]](_0x47f2x3[_0x1bfe[730]]()+ _0x47f2x5[_0x1bfe[235]],_0x47f2x3[_0x1bfe[732]]()+ _0x47f2x5[_0x1bfe[236]]);if(mxClient[_0x1bfe[133]]&& !mxClient[_0x1bfe[75]]&& !mxClient[_0x1bfe[76]]){var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[526]],_0x47f2xa=function(_0x47f2x2){_0x47f2x2= new mxMouseEvent(_0x47f2x2);var _0x47f2x3=mxUtils[_0x1bfe[2196]](_0x47f2x9,_0x47f2x2[_0x1bfe[730]](),_0x47f2x2[_0x1bfe[732]]());_0x47f2x2[_0x1bfe[725]]= _0x47f2x3[_0x1bfe[235]];_0x47f2x2[_0x1bfe[726]]= _0x47f2x3[_0x1bfe[236]];return _0x47f2x2};this[_0x1bfe[2955]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[788]](this[_0x1bfe[1179]],_0x47f2xa(_0x47f2x2))});this[_0x1bfe[981]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[789]](this[_0x1bfe[1179]],_0x47f2xa(_0x47f2x2))});mxEvent[_0x1bfe[169]](document,_0x1bfe[752],this[_0x1bfe[2955]]);mxEvent[_0x1bfe[169]](document,_0x1bfe[753],this[_0x1bfe[981]])};_0x47f2x3[_0x1bfe[722]](!1)}};mxRubberband[_0x1bfe[202]][_0x1bfe[861]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[2823]]= new mxPoint(_0x47f2x2,_0x47f2x3)};mxRubberband[_0x1bfe[202]][_0x1bfe[788]]= function(_0x47f2x2,_0x47f2x3){if(!_0x47f2x3[_0x1bfe[721]]()&& null!= this[_0x1bfe[2823]]){var _0x47f2x4=mxUtils[_0x1bfe[444]](this[_0x1bfe[1179]][_0x1bfe[526]]),_0x47f2x5=mxUtils[_0x1bfe[445]](this[_0x1bfe[1179]][_0x1bfe[526]]);_0x47f2x4[_0x1bfe[235]]-= _0x47f2x5[_0x1bfe[235]];_0x47f2x4[_0x1bfe[236]]-= _0x47f2x5[_0x1bfe[236]];var _0x47f2x5=_0x47f2x3[_0x1bfe[730]]()+ _0x47f2x4[_0x1bfe[235]],_0x47f2x4=_0x47f2x3[_0x1bfe[732]]()+ _0x47f2x4[_0x1bfe[236]],_0x47f2x9=this[_0x1bfe[2823]][_0x1bfe[235]]- _0x47f2x5,_0x47f2xa=this[_0x1bfe[2823]][_0x1bfe[236]]- _0x47f2x4,_0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[2353]];if(null!= this[_0x1bfe[485]]|| Math[_0x1bfe[425]](_0x47f2x9)> _0x47f2x12|| Math[_0x1bfe[425]](_0x47f2xa)> _0x47f2x12){null== this[_0x1bfe[485]]&& (this[_0x1bfe[485]]= this[_0x1bfe[2156]]()),mxUtils[_0x1bfe[2440]](),this[_0x1bfe[2729]](_0x47f2x5,_0x47f2x4),_0x47f2x3[_0x1bfe[722]]()}}};mxRubberband[_0x1bfe[202]][_0x1bfe[2156]]= function(){null== this[_0x1bfe[2952]]&& (this[_0x1bfe[2952]]= document[_0x1bfe[55]](_0x1bfe[485]),this[_0x1bfe[2952]][_0x1bfe[926]]= _0x1bfe[2956],mxUtils[_0x1bfe[254]](this[_0x1bfe[2952]],this[_0x1bfe[2951]]));this[_0x1bfe[1179]][_0x1bfe[526]][_0x1bfe[62]](this[_0x1bfe[2952]]);return this[_0x1bfe[2952]]};mxRubberband[_0x1bfe[202]][_0x1bfe[789]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=null!= this[_0x1bfe[485]];this[_0x1bfe[862]]();_0x47f2x4&& (_0x47f2x4= new mxRectangle(this[_0x1bfe[235]],this[_0x1bfe[236]],this[_0x1bfe[117]],this[_0x1bfe[119]]),this[_0x1bfe[1179]][_0x1bfe[2698]](_0x47f2x4,_0x47f2x3[_0x1bfe[727]]()),_0x47f2x3[_0x1bfe[722]]())};mxRubberband[_0x1bfe[202]][_0x1bfe[862]]= function(){null!= this[_0x1bfe[485]]&& this[_0x1bfe[485]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[485]]);null!= this[_0x1bfe[2955]]&& (mxEvent[_0x1bfe[745]](document,_0x1bfe[752],this[_0x1bfe[2955]]),this[_0x1bfe[2955]]= null);null!= this[_0x1bfe[981]]&& (mxEvent[_0x1bfe[745]](document,_0x1bfe[753],this[_0x1bfe[981]]),this[_0x1bfe[981]]= null);this[_0x1bfe[2954]]= this[_0x1bfe[2953]]= 0;this[_0x1bfe[485]]= this[_0x1bfe[2823]]= null};mxRubberband[_0x1bfe[202]][_0x1bfe[2729]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[2953]]= _0x47f2x2;this[_0x1bfe[2954]]= _0x47f2x3;this[_0x1bfe[2950]]()};mxRubberband[_0x1bfe[202]][_0x1bfe[2950]]= function(){if(null!= this[_0x1bfe[485]]){var _0x47f2x2=this[_0x1bfe[2953]]- this[_0x1bfe[1179]][_0x1bfe[1136]],_0x47f2x3=this[_0x1bfe[2954]]- this[_0x1bfe[1179]][_0x1bfe[1137]];this[_0x1bfe[235]]= Math[_0x1bfe[243]](this[_0x1bfe[2823]][_0x1bfe[235]],_0x47f2x2);this[_0x1bfe[236]]= Math[_0x1bfe[243]](this[_0x1bfe[2823]][_0x1bfe[236]],_0x47f2x3);this[_0x1bfe[117]]= Math[_0x1bfe[160]](this[_0x1bfe[2823]][_0x1bfe[235]],_0x47f2x2)- this[_0x1bfe[235]];this[_0x1bfe[119]]= Math[_0x1bfe[160]](this[_0x1bfe[2823]][_0x1bfe[236]],_0x47f2x3)- this[_0x1bfe[236]];_0x47f2x2= mxClient[_0x1bfe[47]]?this[_0x1bfe[1179]][_0x1bfe[1137]]:0;this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]]= this[_0x1bfe[235]]+ (mxClient[_0x1bfe[47]]?this[_0x1bfe[1179]][_0x1bfe[1136]]:0)+ _0x1bfe[168];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[125]]= this[_0x1bfe[236]]+ _0x47f2x2+ _0x1bfe[168];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[117]]= Math[_0x1bfe[160]](1,this[_0x1bfe[117]])+ _0x1bfe[168];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[119]]= Math[_0x1bfe[160]](1,this[_0x1bfe[119]])+ _0x1bfe[168]}};mxRubberband[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[2717]]|| (this[_0x1bfe[2717]]= !0,this[_0x1bfe[1179]][_0x1bfe[1148]](this),this[_0x1bfe[1179]][_0x1bfe[745]](this[_0x1bfe[2730]]),this[_0x1bfe[862]](),null!= this[_0x1bfe[2952]]&& (this[_0x1bfe[2952]]= null))};function mxVertexHandler(_0x47f2x2){null!= _0x47f2x2&& (this[_0x1bfe[724]]= _0x47f2x2,this[_0x1bfe[176]]())}mxVertexHandler[_0x1bfe[202]][_0x1bfe[1179]]= null;mxVertexHandler[_0x1bfe[202]][_0x1bfe[724]]= null;mxVertexHandler[_0x1bfe[202]][_0x1bfe[2957]]= !1;mxVertexHandler[_0x1bfe[202]][_0x1bfe[1983]]= null;mxVertexHandler[_0x1bfe[202]][_0x1bfe[2958]]= !0;mxVertexHandler[_0x1bfe[202]][_0x1bfe[2959]]= null;mxVertexHandler[_0x1bfe[202]][_0x1bfe[2353]]= 0;mxVertexHandler[_0x1bfe[202]][_0x1bfe[2809]]= !1;mxVertexHandler[_0x1bfe[202]][_0x1bfe[2960]]= !0;mxVertexHandler[_0x1bfe[202]][_0x1bfe[176]]= function(){this[_0x1bfe[1179]]= this[_0x1bfe[724]][_0x1bfe[441]][_0x1bfe[1179]];this[_0x1bfe[2961]]= this[_0x1bfe[2962]](this[_0x1bfe[724]]);this[_0x1bfe[1562]]= new mxRectangle(this[_0x1bfe[2961]][_0x1bfe[235]],this[_0x1bfe[2961]][_0x1bfe[236]],this[_0x1bfe[2961]][_0x1bfe[117]],this[_0x1bfe[2961]][_0x1bfe[119]]);this[_0x1bfe[2732]]= this[_0x1bfe[2963]](this[_0x1bfe[1562]]);this[_0x1bfe[2732]][_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[1523]]:mxConstants[_0x1bfe[508]];this[_0x1bfe[2732]][_0x1bfe[1229]]= !1;this[_0x1bfe[2732]][_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]());this[_0x1bfe[1179]][_0x1bfe[1712]](this[_0x1bfe[724]][_0x1bfe[246]])&& (this[_0x1bfe[2732]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= mxConstants[_0x1bfe[2832]]);mxEvent[_0x1bfe[2733]](this[_0x1bfe[2732]][_0x1bfe[252]],this[_0x1bfe[1179]],this[_0x1bfe[724]]);if(0>= mxGraphHandler[_0x1bfe[202]][_0x1bfe[2795]]|| this[_0x1bfe[1179]][_0x1bfe[2694]]()< mxGraphHandler[_0x1bfe[202]][_0x1bfe[2795]]){var _0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[2657]](this[_0x1bfe[724]][_0x1bfe[246]]);this[_0x1bfe[2964]]= [];if(_0x47f2x2|| this[_0x1bfe[1179]][_0x1bfe[2628]](this[_0x1bfe[724]][_0x1bfe[246]])&& 2<= this[_0x1bfe[724]][_0x1bfe[117]]&& 2<= this[_0x1bfe[724]][_0x1bfe[119]]){var _0x47f2x3=0;_0x47f2x2&& (this[_0x1bfe[2957]]|| (this[_0x1bfe[2964]][_0x1bfe[207]](this[_0x1bfe[2735]](_0x1bfe[936],_0x47f2x3++)),this[_0x1bfe[2964]][_0x1bfe[207]](this[_0x1bfe[2735]](_0x1bfe[2965],_0x47f2x3++)),this[_0x1bfe[2964]][_0x1bfe[207]](this[_0x1bfe[2735]](_0x1bfe[2966],_0x47f2x3++)),this[_0x1bfe[2964]][_0x1bfe[207]](this[_0x1bfe[2735]](_0x1bfe[2967],_0x47f2x3++)),this[_0x1bfe[2964]][_0x1bfe[207]](this[_0x1bfe[2735]](_0x1bfe[2968],_0x47f2x3++)),this[_0x1bfe[2964]][_0x1bfe[207]](this[_0x1bfe[2735]](_0x1bfe[2969],_0x47f2x3++)),this[_0x1bfe[2964]][_0x1bfe[207]](this[_0x1bfe[2735]](_0x1bfe[2970],_0x47f2x3++))),this[_0x1bfe[2964]][_0x1bfe[207]](this[_0x1bfe[2735]](_0x1bfe[2971],_0x47f2x3++)));_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[1721]](this[_0x1bfe[724]][_0x1bfe[246]]);null!= _0x47f2x2&& (!_0x47f2x2[_0x1bfe[1500]]&& !this[_0x1bfe[1179]][_0x1bfe[1730]](this[_0x1bfe[724]][_0x1bfe[246]])&& this[_0x1bfe[1179]][_0x1bfe[2628]](this[_0x1bfe[724]][_0x1bfe[246]]))&& (this[_0x1bfe[2972]]= this[_0x1bfe[2735]](mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),this[_0x1bfe[2964]][_0x1bfe[207]](this[_0x1bfe[2972]]))}else {this[_0x1bfe[1179]][_0x1bfe[1712]](this[_0x1bfe[724]][_0x1bfe[246]])&& (!this[_0x1bfe[1179]][_0x1bfe[2657]](this[_0x1bfe[724]][_0x1bfe[246]])&& 2> this[_0x1bfe[724]][_0x1bfe[117]]&& 2> this[_0x1bfe[724]][_0x1bfe[119]])&& (this[_0x1bfe[2972]]= this[_0x1bfe[2735]](mxConstants.CURSOR_MOVABLE_VERTEX,null,null,mxConstants.LABEL_HANDLE_FILLCOLOR),this[_0x1bfe[2964]][_0x1bfe[207]](this[_0x1bfe[2972]]))}};if(this[_0x1bfe[2809]]&& (0>= mxGraphHandler[_0x1bfe[202]][_0x1bfe[2795]]|| this[_0x1bfe[1179]][_0x1bfe[2694]]()< mxGraphHandler[_0x1bfe[202]][_0x1bfe[2795]])){this[_0x1bfe[2973]]= this[_0x1bfe[2735]](_0x1bfe[356],mxEvent.ROTATION_HANDLE,mxConstants[_0x1bfe[2974]]+ 3,mxConstants.HANDLE_FILLCOLOR),this[_0x1bfe[2964]][_0x1bfe[207]](this[_0x1bfe[2973]])};this[_0x1bfe[258]]()};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2962]]= function(_0x47f2x2){return new mxRectangle(Math[_0x1bfe[488]](_0x47f2x2[_0x1bfe[235]]),Math[_0x1bfe[488]](_0x47f2x2[_0x1bfe[236]]),Math[_0x1bfe[488]](_0x47f2x2[_0x1bfe[117]]),Math[_0x1bfe[488]](_0x47f2x2[_0x1bfe[119]]))};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2963]]= function(_0x47f2x2){_0x47f2x2= new mxRectangleShape(_0x47f2x2,null,this[_0x1bfe[2975]]());_0x47f2x2[_0x1bfe[1307]]= this[_0x1bfe[2976]]();_0x47f2x2[_0x1bfe[1522]]= this[_0x1bfe[2977]]();return _0x47f2x2};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2975]]= function(){return mxConstants[_0x1bfe[2978]]};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2976]]= function(){return mxConstants[_0x1bfe[2979]]};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2977]]= function(){return mxConstants[_0x1bfe[2980]]};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2735]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){_0x47f2x4= _0x47f2x4|| mxConstants[_0x1bfe[2974]];_0x47f2x4= new mxRectangle(0,0,_0x47f2x4,_0x47f2x4);_0x47f2x5= this[_0x1bfe[2981]](_0x47f2x4,_0x47f2x3,_0x47f2x5);_0x47f2x5[_0x1bfe[1567]]()&& null!= this[_0x1bfe[724]][_0x1bfe[963]]&& this[_0x1bfe[724]][_0x1bfe[963]][_0x1bfe[252]][_0x1bfe[265]]== this[_0x1bfe[1179]][_0x1bfe[526]]?(_0x47f2x5[_0x1bfe[1562]][_0x1bfe[119]]-= 1,_0x47f2x5[_0x1bfe[1562]][_0x1bfe[117]]-= 1,_0x47f2x5[_0x1bfe[507]]= mxConstants[_0x1bfe[1656]],_0x47f2x5[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[526]])):(_0x47f2x5[_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[2334]]:mxConstants[_0x1bfe[508]],_0x47f2x5[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]()));mxEvent[_0x1bfe[2733]](_0x47f2x5[_0x1bfe[252]],this[_0x1bfe[1179]],this[_0x1bfe[724]]);this[_0x1bfe[1179]][_0x1bfe[994]]()&& (_0x47f2x5[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= _0x47f2x2);this[_0x1bfe[2982]](_0x47f2x3)|| (_0x47f2x5[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188]);return _0x47f2x5};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2982]]= function(_0x47f2x2){return !0};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2981]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return null!= this[_0x1bfe[2959]]?(_0x47f2x2[_0x1bfe[117]]= this[_0x1bfe[2959]][_0x1bfe[117]],_0x47f2x2[_0x1bfe[119]]= this[_0x1bfe[2959]][_0x1bfe[119]], new mxImageShape(_0x47f2x2,this[_0x1bfe[2959]][_0x1bfe[390]])):_0x47f2x3== mxEvent[_0x1bfe[2983]]? new mxEllipse(_0x47f2x2,_0x47f2x4|| mxConstants[_0x1bfe[2984]],mxConstants.HANDLE_STROKECOLOR): new mxRectangleShape(_0x47f2x2,_0x47f2x4|| mxConstants[_0x1bfe[2984]],mxConstants.HANDLE_STROKECOLOR)};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2985]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){null!= _0x47f2x2&& (_0x47f2x2[_0x1bfe[1562]][_0x1bfe[235]]= Math[_0x1bfe[488]](_0x47f2x3- _0x47f2x2[_0x1bfe[1562]][_0x1bfe[117]]/ 2),_0x47f2x2[_0x1bfe[1562]][_0x1bfe[236]]= Math[_0x1bfe[488]](_0x47f2x4- _0x47f2x2[_0x1bfe[1562]][_0x1bfe[119]]/ 2),_0x47f2x2[_0x1bfe[258]]())};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2986]]= function(_0x47f2x2){if(_0x47f2x2[_0x1bfe[729]](this[_0x1bfe[2973]])){return mxEvent[_0x1bfe[2983]]};if(_0x47f2x2[_0x1bfe[729]](this[_0x1bfe[2972]])){return mxEvent[_0x1bfe[2987]]};if(null!= this[_0x1bfe[2964]]){for(var _0x47f2x3=this[_0x1bfe[2353]],_0x47f2x3=this[_0x1bfe[2958]]&& (mxClient[_0x1bfe[80]]|| 0< _0x47f2x3)? new mxRectangle(_0x47f2x2[_0x1bfe[734]]()- _0x47f2x3,_0x47f2x2[_0x1bfe[735]]()- _0x47f2x3,2* _0x47f2x3,2* _0x47f2x3):null,_0x47f2x4=0;_0x47f2x4< this[_0x1bfe[2964]][_0x1bfe[67]];_0x47f2x4++){if(_0x47f2x2[_0x1bfe[729]](this[_0x1bfe[2964]][_0x47f2x4])|| null!= _0x47f2x3&& mxUtils[_0x1bfe[1825]](this[_0x1bfe[2964]][_0x47f2x4][_0x1bfe[1562]],_0x47f2x3)){return _0x47f2x4}}};return null};mxVertexHandler[_0x1bfe[202]][_0x1bfe[787]]= function(_0x47f2x2,_0x47f2x3){if(!_0x47f2x3[_0x1bfe[721]]()&& this[_0x1bfe[1179]][_0x1bfe[994]]()&& !this[_0x1bfe[1179]][_0x1bfe[2579]](_0x47f2x3[_0x1bfe[727]]())&& (0< this[_0x1bfe[2353]]|| _0x47f2x3[_0x1bfe[248]]()== this[_0x1bfe[724]])){var _0x47f2x4=this[_0x1bfe[2986]](_0x47f2x3);null!= _0x47f2x4&& (this[_0x1bfe[861]](_0x47f2x3[_0x1bfe[730]](),_0x47f2x3[_0x1bfe[732]](),_0x47f2x4),_0x47f2x3[_0x1bfe[722]]())}};mxVertexHandler[_0x1bfe[202]][_0x1bfe[861]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2= mxUtils[_0x1bfe[2196]](this[_0x1bfe[1179]][_0x1bfe[526]],_0x47f2x2,_0x47f2x3);this[_0x1bfe[2739]]= _0x47f2x2[_0x1bfe[235]];this[_0x1bfe[2740]]= _0x47f2x2[_0x1bfe[236]];this[_0x1bfe[1983]]= _0x47f2x4;this[_0x1bfe[2732]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[495]]= _0x47f2x4== mxEvent[_0x1bfe[2983]]?_0x1bfe[497]:_0x1bfe[130];this[_0x1bfe[2988]]= this[_0x1bfe[2963]](this[_0x1bfe[1562]]);!(mxClient[_0x1bfe[48]]&& 0!= Number(this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]))&& null!= this[_0x1bfe[724]][_0x1bfe[963]]&& this[_0x1bfe[724]][_0x1bfe[963]][_0x1bfe[252]][_0x1bfe[265]]== this[_0x1bfe[1179]][_0x1bfe[526]]?(this[_0x1bfe[2988]][_0x1bfe[507]]= mxConstants[_0x1bfe[1656]],this[_0x1bfe[2988]][_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[526]])):(this[_0x1bfe[2988]][_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[1523]]:mxConstants[_0x1bfe[508]],this[_0x1bfe[2988]][_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[1524]]()))};mxVertexHandler[_0x1bfe[202]][_0x1bfe[788]]= function(_0x47f2x2,_0x47f2x3){if(!_0x47f2x3[_0x1bfe[721]]()&& null!= this[_0x1bfe[1983]]){var _0x47f2x4= new mxPoint(_0x47f2x3[_0x1bfe[734]](),_0x47f2x3[_0x1bfe[735]]()),_0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[1018]](_0x47f2x3[_0x1bfe[727]]()),_0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]];if(this[_0x1bfe[1983]]== mxEvent[_0x1bfe[2987]]){_0x47f2x5&& (_0x47f2x4[_0x1bfe[235]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x4[_0x1bfe[235]]/ _0x47f2x9)* _0x47f2x9,_0x47f2x4[_0x1bfe[236]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x4[_0x1bfe[236]]/ _0x47f2x9)* _0x47f2x9),this[_0x1bfe[2985]](this[_0x1bfe[2964]][this[_0x1bfe[2964]][_0x1bfe[67]]- 1],_0x47f2x4[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]])}else {if(this[_0x1bfe[1983]]== mxEvent[_0x1bfe[2983]]){var _0x47f2xa=this[_0x1bfe[724]][_0x1bfe[235]]+ this[_0x1bfe[724]][_0x1bfe[117]]/ 2- _0x47f2x4[_0x1bfe[235]],_0x47f2x12=this[_0x1bfe[724]][_0x1bfe[236]]+ this[_0x1bfe[724]][_0x1bfe[119]]/ 2- _0x47f2x4[_0x1bfe[236]];this[_0x1bfe[2989]]= 0!= _0x47f2xa?180* Math[_0x1bfe[2990]](_0x47f2x12/ _0x47f2xa)/ Math[_0x1bfe[424]]+ 90:0> _0x47f2x12?180:0;0< _0x47f2xa&& (this[_0x1bfe[2989]]-= 180);this[_0x1bfe[2960]]&& (_0x47f2xa= _0x47f2x4[_0x1bfe[235]]- this[_0x1bfe[724]][_0x1bfe[241]](),_0x47f2x12= _0x47f2x4[_0x1bfe[236]]- this[_0x1bfe[724]][_0x1bfe[242]](),_0x47f2xa= Math[_0x1bfe[425]](Math[_0x1bfe[428]](_0x47f2xa* _0x47f2xa+ _0x47f2x12* _0x47f2x12)- this[_0x1bfe[724]][_0x1bfe[119]]/ 2- 20),_0x47f2xa= Math[_0x1bfe[160]](1,5* Math[_0x1bfe[243]](3,Math[_0x1bfe[160]](0,Math[_0x1bfe[488]](80/ Math[_0x1bfe[425]](_0x47f2xa))))),this[_0x1bfe[2989]]= Math[_0x1bfe[488]](this[_0x1bfe[2989]]/ _0x47f2xa)* _0x47f2xa);this[_0x1bfe[2732]][_0x1bfe[603]]= this[_0x1bfe[2989]];this[_0x1bfe[2732]][_0x1bfe[258]]()}else {var _0x47f2x13=mxUtils[_0x1bfe[431]](this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]),_0x47f2x14=Math[_0x1bfe[426]](-_0x47f2x13),_0x47f2x15=Math[_0x1bfe[427]](-_0x47f2x13),_0x47f2x16= new mxPoint(this[_0x1bfe[724]][_0x1bfe[241]](),this[_0x1bfe[724]][_0x1bfe[242]]()),_0x47f2xa=_0x47f2x4[_0x1bfe[235]]- this[_0x1bfe[2739]],_0x47f2x12=_0x47f2x4[_0x1bfe[236]]- this[_0x1bfe[2740]],_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[513]],_0x47f2x17=_0x47f2x15* _0x47f2xa+ _0x47f2x14* _0x47f2x12,_0x47f2xa=_0x47f2x14* _0x47f2xa- _0x47f2x15* _0x47f2x12;this[_0x1bfe[1562]]= this[_0x1bfe[2991]](this[_0x1bfe[2961]],_0x47f2xa,_0x47f2x17,this[_0x1bfe[1983]],_0x47f2x5,_0x47f2x9,_0x47f2x4);_0x47f2x14= Math[_0x1bfe[426]](_0x47f2x13);_0x47f2x15= Math[_0x1bfe[427]](_0x47f2x13);_0x47f2x12= new mxPoint(this[_0x1bfe[1562]][_0x1bfe[241]](),this[_0x1bfe[1562]][_0x1bfe[242]]());_0x47f2xa= _0x47f2x12[_0x1bfe[235]]- _0x47f2x16[_0x1bfe[235]];_0x47f2x12= _0x47f2x12[_0x1bfe[236]]- _0x47f2x16[_0x1bfe[236]];_0x47f2x16= _0x47f2x15* _0x47f2xa+ _0x47f2x14* _0x47f2x12- _0x47f2x12;this[_0x1bfe[1562]][_0x1bfe[235]]+= _0x47f2x14* _0x47f2xa- _0x47f2x15* _0x47f2x12- _0x47f2xa;this[_0x1bfe[1562]][_0x1bfe[236]]+= _0x47f2x16;this[_0x1bfe[2932]]()}};_0x47f2x3[_0x1bfe[722]]()}else {null!= this[_0x1bfe[2986]](_0x47f2x3)&& _0x47f2x3[_0x1bfe[722]](!1)}};mxVertexHandler[_0x1bfe[202]][_0x1bfe[789]]= function(_0x47f2x2,_0x47f2x3){if(!_0x47f2x3[_0x1bfe[721]]()&& null!= this[_0x1bfe[1983]]&& null!= this[_0x1bfe[724]]){var _0x47f2x4= new mxPoint(_0x47f2x3[_0x1bfe[734]](),_0x47f2x3[_0x1bfe[735]]());this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[473]]();try{if(this[_0x1bfe[1983]]== mxEvent[_0x1bfe[2983]]){null!= this[_0x1bfe[2989]]&& this[_0x1bfe[2992]](this[_0x1bfe[724]][_0x1bfe[246]],this[_0x1bfe[2989]]- (this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| 0))}else {var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[1018]](_0x47f2x3[_0x1bfe[727]]()),_0x47f2x9=mxUtils[_0x1bfe[431]](this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]),_0x47f2xa=Math[_0x1bfe[426]](-_0x47f2x9),_0x47f2x12=Math[_0x1bfe[427]](-_0x47f2x9),_0x47f2x13=_0x47f2x4[_0x1bfe[235]]- this[_0x1bfe[2739]],_0x47f2x14=_0x47f2x4[_0x1bfe[236]]- this[_0x1bfe[2740]],_0x47f2x4=_0x47f2x12* _0x47f2x13+ _0x47f2xa* _0x47f2x14,_0x47f2x13=_0x47f2xa* _0x47f2x13- _0x47f2x12* _0x47f2x14,_0x47f2x14=_0x47f2x4,_0x47f2x15=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]];this[_0x1bfe[2526]](this[_0x1bfe[724]][_0x1bfe[246]],_0x47f2x13/ _0x47f2x15,_0x47f2x14/ _0x47f2x15,this[_0x1bfe[1983]],_0x47f2x5)}}finally{this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[476]]()};this[_0x1bfe[862]]();_0x47f2x3[_0x1bfe[722]]()}};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2992]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]]();if(_0x47f2x4[_0x1bfe[1193]](_0x47f2x2)){var _0x47f2x5=_0x47f2x2== this[_0x1bfe[724]]?this[_0x1bfe[724]]:this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x2);null!= _0x47f2x5&& this[_0x1bfe[1179]][_0x1bfe[1717]](mxConstants.STYLE_ROTATION,(_0x47f2x5[_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| 0)+ _0x47f2x3,[_0x47f2x2]);if(this[_0x1bfe[724]][_0x1bfe[246]]!= _0x47f2x2&& (_0x47f2x5= this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x2),null!= _0x47f2x5&& !_0x47f2x5[_0x1bfe[1500]])){if(0!= _0x47f2x3){var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1197]](_0x47f2x2),_0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x9);if(!_0x47f2x5[_0x1bfe[1500]]&& null!= _0x47f2xa){var _0x47f2x12=mxUtils[_0x1bfe[431]](_0x47f2x3),_0x47f2x9=Math[_0x1bfe[426]](_0x47f2x12),_0x47f2x12=Math[_0x1bfe[427]](_0x47f2x12),_0x47f2x13= new mxPoint(_0x47f2x5[_0x1bfe[241]](),_0x47f2x5[_0x1bfe[242]]()),_0x47f2xa= new mxPoint(_0x47f2xa[_0x1bfe[117]]/ 2,_0x47f2xa[_0x1bfe[119]]/ 2),_0x47f2x9=mxUtils[_0x1bfe[432]](_0x47f2x13,_0x47f2x9,_0x47f2x12,_0x47f2xa),_0x47f2x5=_0x47f2x5[_0x1bfe[238]]();_0x47f2x5[_0x1bfe[235]]= _0x47f2x9[_0x1bfe[235]]- _0x47f2x5[_0x1bfe[117]]/ 2;_0x47f2x5[_0x1bfe[236]]= _0x47f2x9[_0x1bfe[236]]- _0x47f2x5[_0x1bfe[119]]/ 2;_0x47f2x4[_0x1bfe[1724]](_0x47f2x2,_0x47f2x5)}}else {_0x47f2x5= _0x47f2x5[_0x1bfe[238]](),_0x47f2x5[_0x1bfe[235]]+= dx,_0x47f2x5[_0x1bfe[236]]+= dy,_0x47f2x4[_0x1bfe[1724]](_0x47f2x2,_0x47f2x5)}};_0x47f2x5= _0x47f2x4[_0x1bfe[262]](_0x47f2x2);for(_0x47f2x9= 0;_0x47f2x9< _0x47f2x5;_0x47f2x9++){this[_0x1bfe[2992]](_0x47f2x4[_0x1bfe[263]](_0x47f2x2,_0x47f2x9),_0x47f2x3)}}};mxVertexHandler[_0x1bfe[202]][_0x1bfe[862]]= function(){this[_0x1bfe[1983]]= this[_0x1bfe[2989]]= null;null!= this[_0x1bfe[2988]]&& (this[_0x1bfe[2988]][_0x1bfe[515]](),this[_0x1bfe[2988]]= null);null!= this[_0x1bfe[2732]]&& (this[_0x1bfe[2732]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[497],this[_0x1bfe[2961]]= this[_0x1bfe[2962]](this[_0x1bfe[724]]),this[_0x1bfe[1562]]= new mxRectangle(this[_0x1bfe[2961]][_0x1bfe[235]],this[_0x1bfe[2961]][_0x1bfe[236]],this[_0x1bfe[2961]][_0x1bfe[117]],this[_0x1bfe[2961]][_0x1bfe[119]]),this[_0x1bfe[2932]]())};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2526]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[1721]](_0x47f2x2);if(null!= _0x47f2xa){if(_0x47f2x5== mxEvent[_0x1bfe[2987]]){_0x47f2x5= this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]],_0x47f2x3= (this[_0x1bfe[2972]][_0x1bfe[1562]][_0x1bfe[241]]()- this[_0x1bfe[2739]])/ _0x47f2x5,_0x47f2x4= (this[_0x1bfe[2972]][_0x1bfe[1562]][_0x1bfe[242]]()- this[_0x1bfe[2740]])/ _0x47f2x5,_0x47f2xa= _0x47f2xa[_0x1bfe[238]](),null== _0x47f2xa[_0x1bfe[1368]]?_0x47f2xa[_0x1bfe[1368]]= new mxPoint(_0x47f2x3,_0x47f2x4):(_0x47f2xa[_0x1bfe[1368]][_0x1bfe[235]]+= _0x47f2x3,_0x47f2xa[_0x1bfe[1368]][_0x1bfe[236]]+= _0x47f2x4),this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[1724]](_0x47f2x2,_0x47f2xa)}else {_0x47f2x5= this[_0x1bfe[2991]](_0x47f2xa,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,1, new mxPoint(0,0));var _0x47f2x12=mxUtils[_0x1bfe[431]](this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]);if(0!= _0x47f2x12){_0x47f2x3= _0x47f2x5[_0x1bfe[241]]()- _0x47f2xa[_0x1bfe[241]]();_0x47f2x4= _0x47f2x5[_0x1bfe[242]]()- _0x47f2xa[_0x1bfe[242]]();_0x47f2x9= Math[_0x1bfe[426]](_0x47f2x12);var _0x47f2x13=Math[_0x1bfe[427]](_0x47f2x12),_0x47f2x12=_0x47f2x9* _0x47f2x3- _0x47f2x13* _0x47f2x4- _0x47f2x3;_0x47f2x3= _0x47f2x13* _0x47f2x3+ _0x47f2x9* _0x47f2x4- _0x47f2x4;_0x47f2x4= _0x47f2x5[_0x1bfe[235]]- _0x47f2xa[_0x1bfe[235]];var _0x47f2x14=_0x47f2x5[_0x1bfe[236]]- _0x47f2xa[_0x1bfe[236]],_0x47f2x15=_0x47f2x9* _0x47f2x4- _0x47f2x13* _0x47f2x14;_0x47f2x9= _0x47f2x13* _0x47f2x4+ _0x47f2x9* _0x47f2x14;_0x47f2x5[_0x1bfe[235]]+= _0x47f2x12;_0x47f2x5[_0x1bfe[236]]+= _0x47f2x3;if(!this[_0x1bfe[1179]][_0x1bfe[1742]](_0x47f2x2)&& (0!= _0x47f2x12|| 0!= _0x47f2x3)){_0x47f2x4= _0x47f2xa[_0x1bfe[235]]- _0x47f2x5[_0x1bfe[235]]+ _0x47f2x15,_0x47f2x14= _0x47f2xa[_0x1bfe[236]]- _0x47f2x5[_0x1bfe[236]]+ _0x47f2x9,this[_0x1bfe[2993]](_0x47f2x2,_0x47f2x4,_0x47f2x14)}};this[_0x1bfe[1179]][_0x1bfe[2526]](_0x47f2x2,_0x47f2x5)}}};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2993]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){for(var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x9=_0x47f2x5[_0x1bfe[262]](_0x47f2x2),_0x47f2xa=0;_0x47f2xa< _0x47f2x9;_0x47f2xa++){var _0x47f2x12=_0x47f2x5[_0x1bfe[263]](_0x47f2x2,_0x47f2xa);if(_0x47f2x5[_0x1bfe[1193]](_0x47f2x12)){var _0x47f2x13=this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x12);null!= _0x47f2x13&& !_0x47f2x13[_0x1bfe[1500]]&& (_0x47f2x13= _0x47f2x13[_0x1bfe[238]](),_0x47f2x13[_0x1bfe[235]]+= _0x47f2x3,_0x47f2x13[_0x1bfe[236]]+= _0x47f2x4,_0x47f2x5[_0x1bfe[1724]](_0x47f2x12,_0x47f2x13))}}};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2991]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12){if(this[_0x1bfe[2957]]){_0x47f2x12= _0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]+ _0x47f2x3;var _0x47f2x13=_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]+ _0x47f2x4;_0x47f2x9&& (_0x47f2x12= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x12/ _0x47f2xa)* _0x47f2xa,_0x47f2x13= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x13/ _0x47f2xa)* _0x47f2xa);_0x47f2xa= new mxRectangle(_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]],0,0);_0x47f2xa[_0x1bfe[99]]( new mxRectangle(_0x47f2x12,_0x47f2x13,0,0));return _0x47f2xa};var _0x47f2x13=_0x47f2x2[_0x1bfe[235]]- _0x47f2x12[_0x1bfe[235]]* _0x47f2xa,_0x47f2x14=_0x47f2x13+ _0x47f2x2[_0x1bfe[117]],_0x47f2x15=_0x47f2x2[_0x1bfe[236]]- _0x47f2x12[_0x1bfe[236]]* _0x47f2xa;_0x47f2x2= _0x47f2x15+ _0x47f2x2[_0x1bfe[119]];4< _0x47f2x5?(_0x47f2x2+= _0x47f2x4,_0x47f2x9&& (_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x2/ _0x47f2xa)* _0x47f2xa)):3> _0x47f2x5&& (_0x47f2x15+= _0x47f2x4,_0x47f2x9&& (_0x47f2x15= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x15/ _0x47f2xa)* _0x47f2xa));if(0== _0x47f2x5|| 3== _0x47f2x5|| 5== _0x47f2x5){_0x47f2x13+= _0x47f2x3,_0x47f2x9&& (_0x47f2x13= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x13/ _0x47f2xa)* _0x47f2xa)}else {if(2== _0x47f2x5|| 4== _0x47f2x5|| 7== _0x47f2x5){_0x47f2x14+= _0x47f2x3,_0x47f2x9&& (_0x47f2x14= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x14/ _0x47f2xa)* _0x47f2xa)}};_0x47f2x9= _0x47f2x14- _0x47f2x13;_0x47f2x2-= _0x47f2x15;0> _0x47f2x9&& (_0x47f2x13+= _0x47f2x9,_0x47f2x9= Math[_0x1bfe[425]](_0x47f2x9));0> _0x47f2x2&& (_0x47f2x15+= _0x47f2x2,_0x47f2x2= Math[_0x1bfe[425]](_0x47f2x2));return new mxRectangle(_0x47f2x13+ _0x47f2x12[_0x1bfe[235]]* _0x47f2xa,_0x47f2x15+ _0x47f2x12[_0x1bfe[236]]* _0x47f2xa,_0x47f2x9,_0x47f2x2)};mxVertexHandler[_0x1bfe[202]][_0x1bfe[258]]= function(){this[_0x1bfe[2961]]= this[_0x1bfe[2962]](this[_0x1bfe[724]]);this[_0x1bfe[1562]]= new mxRectangle(this[_0x1bfe[724]][_0x1bfe[235]],this[_0x1bfe[724]][_0x1bfe[236]],this[_0x1bfe[724]][_0x1bfe[117]],this[_0x1bfe[724]][_0x1bfe[119]]);var _0x47f2x2=this[_0x1bfe[724]];if(null!= this[_0x1bfe[2964]]){var _0x47f2x3=_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]],_0x47f2x4=_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]];if(this[_0x1bfe[2957]]){this[_0x1bfe[2985]](this[_0x1bfe[2964]][0],_0x47f2x3,_0x47f2x4)}else {var _0x47f2x5=_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]/ 2,_0x47f2x9=_0x47f2x2[_0x1bfe[236]]+ _0x47f2x2[_0x1bfe[119]]/ 2;if(1< this[_0x1bfe[2964]][_0x1bfe[67]]){var _0x47f2xa=mxUtils[_0x1bfe[431]](_0x47f2x2[_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]),_0x47f2x12=Math[_0x1bfe[426]](_0x47f2xa),_0x47f2xa=Math[_0x1bfe[427]](_0x47f2xa),_0x47f2x13= new mxPoint(_0x47f2x2[_0x1bfe[241]](),_0x47f2x2[_0x1bfe[242]]()),_0x47f2x14=mxUtils[_0x1bfe[432]]( new mxPoint(_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]]),_0x47f2x12,_0x47f2xa,_0x47f2x13);this[_0x1bfe[2985]](this[_0x1bfe[2964]][0],_0x47f2x14[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]]);_0x47f2x14[_0x1bfe[235]]= _0x47f2x5;_0x47f2x14[_0x1bfe[236]]= _0x47f2x2[_0x1bfe[236]];_0x47f2x14= mxUtils[_0x1bfe[432]](_0x47f2x14,_0x47f2x12,_0x47f2xa,_0x47f2x13);this[_0x1bfe[2985]](this[_0x1bfe[2964]][1],_0x47f2x14[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]]);_0x47f2x14[_0x1bfe[235]]= _0x47f2x3;_0x47f2x14[_0x1bfe[236]]= _0x47f2x2[_0x1bfe[236]];_0x47f2x14= mxUtils[_0x1bfe[432]](_0x47f2x14,_0x47f2x12,_0x47f2xa,_0x47f2x13);this[_0x1bfe[2985]](this[_0x1bfe[2964]][2],_0x47f2x14[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]]);_0x47f2x14[_0x1bfe[235]]= _0x47f2x2[_0x1bfe[235]];_0x47f2x14[_0x1bfe[236]]= _0x47f2x9;_0x47f2x14= mxUtils[_0x1bfe[432]](_0x47f2x14,_0x47f2x12,_0x47f2xa,_0x47f2x13);this[_0x1bfe[2985]](this[_0x1bfe[2964]][3],_0x47f2x14[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]]);_0x47f2x14[_0x1bfe[235]]= _0x47f2x3;_0x47f2x14[_0x1bfe[236]]= _0x47f2x9;_0x47f2x14= mxUtils[_0x1bfe[432]](_0x47f2x14,_0x47f2x12,_0x47f2xa,_0x47f2x13);this[_0x1bfe[2985]](this[_0x1bfe[2964]][4],_0x47f2x14[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]]);_0x47f2x14[_0x1bfe[235]]= _0x47f2x2[_0x1bfe[235]];_0x47f2x14[_0x1bfe[236]]= _0x47f2x4;_0x47f2x14= mxUtils[_0x1bfe[432]](_0x47f2x14,_0x47f2x12,_0x47f2xa,_0x47f2x13);this[_0x1bfe[2985]](this[_0x1bfe[2964]][5],_0x47f2x14[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]]);_0x47f2x14[_0x1bfe[235]]= _0x47f2x5;_0x47f2x14[_0x1bfe[236]]= _0x47f2x4;_0x47f2x14= mxUtils[_0x1bfe[432]](_0x47f2x14,_0x47f2x12,_0x47f2xa,_0x47f2x13);this[_0x1bfe[2985]](this[_0x1bfe[2964]][6],_0x47f2x14[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]]);_0x47f2x14[_0x1bfe[235]]= _0x47f2x3;_0x47f2x14[_0x1bfe[236]]= _0x47f2x4;_0x47f2x14= mxUtils[_0x1bfe[432]](_0x47f2x14,_0x47f2x12,_0x47f2xa,_0x47f2x13);this[_0x1bfe[2985]](this[_0x1bfe[2964]][7],_0x47f2x14[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]]);this[_0x1bfe[2985]](this[_0x1bfe[2964]][8],_0x47f2x5+ _0x47f2x2[_0x1bfe[2079]][_0x1bfe[235]],_0x47f2x9+ _0x47f2x2[_0x1bfe[2079]][_0x1bfe[236]])}else {2<= this[_0x1bfe[724]][_0x1bfe[117]]&& 2<= this[_0x1bfe[724]][_0x1bfe[119]]?this[_0x1bfe[2985]](this[_0x1bfe[2964]][0],_0x47f2x5+ _0x47f2x2[_0x1bfe[2079]][_0x1bfe[235]],_0x47f2x9+ _0x47f2x2[_0x1bfe[2079]][_0x1bfe[236]]):this[_0x1bfe[2985]](this[_0x1bfe[2964]][0],_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]])}}};null!= this[_0x1bfe[2973]]&& (_0x47f2xa= mxUtils[_0x1bfe[431]](this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]),_0x47f2x12= Math[_0x1bfe[426]](_0x47f2xa),_0x47f2xa= Math[_0x1bfe[427]](_0x47f2xa),_0x47f2x13= new mxPoint(this[_0x1bfe[724]][_0x1bfe[241]](),this[_0x1bfe[724]][_0x1bfe[242]]()),_0x47f2x14= mxUtils[_0x1bfe[432]]( new mxPoint(_0x47f2x2[_0x1bfe[235]]+ _0x47f2x2[_0x1bfe[117]]/ 2,_0x47f2x2[_0x1bfe[236]]- 16),_0x47f2x12,_0x47f2xa,_0x47f2x13),this[_0x1bfe[2985]](this[_0x1bfe[2973]],_0x47f2x14[_0x1bfe[235]],_0x47f2x14[_0x1bfe[236]]));this[_0x1bfe[2732]][_0x1bfe[603]]= Number(this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]);this[_0x1bfe[2932]]()};mxVertexHandler[_0x1bfe[202]][_0x1bfe[2932]]= function(){null!= this[_0x1bfe[2988]]&& (this[_0x1bfe[2988]][_0x1bfe[1562]]= this[_0x1bfe[1562]],this[_0x1bfe[2988]][_0x1bfe[252]][_0x1bfe[265]]== this[_0x1bfe[1179]][_0x1bfe[526]]&& (this[_0x1bfe[2988]][_0x1bfe[1562]][_0x1bfe[117]]= Math[_0x1bfe[160]](0,this[_0x1bfe[2988]][_0x1bfe[1562]][_0x1bfe[117]]- 1),this[_0x1bfe[2988]][_0x1bfe[1562]][_0x1bfe[119]]= Math[_0x1bfe[160]](0,this[_0x1bfe[2988]][_0x1bfe[1562]][_0x1bfe[119]]- 1)),this[_0x1bfe[2988]][_0x1bfe[603]]= Number(this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]),this[_0x1bfe[2988]][_0x1bfe[258]]());this[_0x1bfe[2732]][_0x1bfe[1562]]= this[_0x1bfe[1562]];this[_0x1bfe[2732]][_0x1bfe[258]]()};mxVertexHandler[_0x1bfe[202]][_0x1bfe[515]]= function(){null!= this[_0x1bfe[2988]]&& (this[_0x1bfe[2988]][_0x1bfe[515]](),this[_0x1bfe[2988]]= null);this[_0x1bfe[2732]][_0x1bfe[515]]();this[_0x1bfe[2972]]= this[_0x1bfe[2732]]= null;if(null!= this[_0x1bfe[2964]]){for(var _0x47f2x2=0;_0x47f2x2< this[_0x1bfe[2964]][_0x1bfe[67]];_0x47f2x2++){this[_0x1bfe[2964]][_0x47f2x2][_0x1bfe[515]](),this[_0x1bfe[2964]][_0x47f2x2]= null}}};function mxEdgeHandler(_0x47f2x2){null!= _0x47f2x2&& (this[_0x1bfe[724]]= _0x47f2x2,this[_0x1bfe[176]]())}mxEdgeHandler[_0x1bfe[202]][_0x1bfe[1179]]= null;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[724]]= null;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2885]]= null;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2886]]= null;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[267]]= null;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[253]]= null;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2994]]= null;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2972]]= null;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2797]]= !0;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2771]]= !1;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2995]]= !1;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[574]]= !1;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2958]]= !0;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2996]]= !1;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2959]]= null;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2353]]= 0;mxEdgeHandler[_0x1bfe[202]][_0x1bfe[176]]= function(){this[_0x1bfe[1179]]= this[_0x1bfe[724]][_0x1bfe[441]][_0x1bfe[1179]];this[_0x1bfe[2885]]= this[_0x1bfe[1689]]();this[_0x1bfe[2886]]= new mxConstraintHandler(this[_0x1bfe[1179]]);this[_0x1bfe[1525]]= [];this[_0x1bfe[2997]]= this[_0x1bfe[2998]](this[_0x1bfe[724]]);this[_0x1bfe[253]]= this[_0x1bfe[2963]](this[_0x1bfe[2997]]);this[_0x1bfe[253]][_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[2334]]:mxConstants[_0x1bfe[508]];this[_0x1bfe[253]][_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]());this[_0x1bfe[253]][_0x1bfe[1564]]= 0;this[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= mxConstants[_0x1bfe[2831]];mxEvent[_0x1bfe[169]](this[_0x1bfe[253]][_0x1bfe[252]],_0x1bfe[760],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[1179]][_0x1bfe[761]](_0x47f2x2,this[_0x1bfe[724]][_0x1bfe[246]])}));mxEvent[_0x1bfe[759]](this[_0x1bfe[253]][_0x1bfe[252]],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[2771]]&& this[_0x1bfe[2999]](_0x47f2x2)?this[_0x1bfe[3000]](this[_0x1bfe[724]],_0x47f2x2):this[_0x1bfe[1179]][_0x1bfe[758]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x47f2x2,this[_0x1bfe[724]]))}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){var _0x47f2x4=this[_0x1bfe[724]][_0x1bfe[246]];if(null!= this[_0x1bfe[1983]]){var _0x47f2x5=mxUtils[_0x1bfe[2196]](this[_0x1bfe[1179]][_0x1bfe[526]],mxEvent[_0x1bfe[731]](_0x47f2x2),mxEvent[_0x1bfe[733]](_0x47f2x2)),_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[999]](_0x47f2x5[_0x1bfe[235]],_0x47f2x5[_0x1bfe[236]]);this[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x4)&& this[_0x1bfe[1179]][_0x1bfe[2688]](_0x47f2x4,_0x47f2x5[_0x1bfe[235]],_0x47f2x5[_0x1bfe[236]])&& (_0x47f2x4= null)};this[_0x1bfe[1179]][_0x1bfe[758]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x47f2x2,this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x4)))}),mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[1179]][_0x1bfe[758]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x47f2x2,this[_0x1bfe[724]]))}));this[_0x1bfe[574]]= null!= this[_0x1bfe[724]][_0x1bfe[963]]&& this[_0x1bfe[724]][_0x1bfe[963]][_0x1bfe[252]][_0x1bfe[265]]== this[_0x1bfe[1179]][_0x1bfe[526]];if(!this[_0x1bfe[574]]){var _0x47f2x2=this[_0x1bfe[724]][_0x1bfe[2089]](!0);null!= _0x47f2x2&& (this[_0x1bfe[574]]= null!= _0x47f2x2[_0x1bfe[963]]&& _0x47f2x2[_0x1bfe[963]][_0x1bfe[252]][_0x1bfe[265]]== this[_0x1bfe[1179]][_0x1bfe[526]]);this[_0x1bfe[574]]|| (_0x47f2x2= this[_0x1bfe[724]][_0x1bfe[2089]](!1),null!= _0x47f2x2&& (this[_0x1bfe[574]]= null!= _0x47f2x2[_0x1bfe[963]]&& _0x47f2x2[_0x1bfe[963]][_0x1bfe[252]][_0x1bfe[265]]== this[_0x1bfe[1179]][_0x1bfe[526]]))};if(this[_0x1bfe[1179]][_0x1bfe[2694]]()< mxGraphHandler[_0x1bfe[202]][_0x1bfe[2795]]|| 0>= mxGraphHandler[_0x1bfe[202]][_0x1bfe[2795]]){this[_0x1bfe[2994]]= this[_0x1bfe[3001]]()};this[_0x1bfe[685]]= new mxPoint(this[_0x1bfe[724]][_0x1bfe[2079]][_0x1bfe[235]],this[_0x1bfe[724]][_0x1bfe[2079]][_0x1bfe[236]]);this[_0x1bfe[2972]]= new mxRectangleShape( new mxRectangle,mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR);this[_0x1bfe[2972]][_0x1bfe[1229]]= !1;this[_0x1bfe[3002]](this[_0x1bfe[2972]]);this[_0x1bfe[2972]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= mxConstants[_0x1bfe[3003]];mxEvent[_0x1bfe[2733]](this[_0x1bfe[2972]][_0x1bfe[252]],this[_0x1bfe[1179]],this[_0x1bfe[724]]);this[_0x1bfe[258]]()};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2999]]= function(_0x47f2x2){return mxEvent[_0x1bfe[774]](_0x47f2x2)};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3004]]= function(_0x47f2x2){return mxEvent[_0x1bfe[774]](_0x47f2x2)};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2998]]= function(_0x47f2x2){return _0x47f2x2[_0x1bfe[439]]};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2963]]= function(_0x47f2x2){_0x47f2x2= new mxPolyline(_0x47f2x2,this[_0x1bfe[2975]]());_0x47f2x2[_0x1bfe[1307]]= this[_0x1bfe[2976]]();_0x47f2x2[_0x1bfe[1522]]= this[_0x1bfe[2977]]();return _0x47f2x2};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2975]]= function(){return mxConstants[_0x1bfe[3005]]};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2976]]= function(){return mxConstants[_0x1bfe[3006]]};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2977]]= function(){return mxConstants[_0x1bfe[3007]]};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2907]]= function(_0x47f2x2){return !0};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[1689]]= function(){var _0x47f2x2= new mxCellMarker(this[_0x1bfe[1179]]),_0x47f2x3=this;_0x47f2x2[_0x1bfe[736]]= function(_0x47f2x2){var _0x47f2x5=mxCellMarker[_0x1bfe[202]][_0x1bfe[736]][_0x1bfe[183]](this,arguments);if(!_0x47f2x3[_0x1bfe[2907]](_0x47f2x5)){return null};var _0x47f2x9=_0x47f2x3[_0x1bfe[1179]][_0x1bfe[502]]();if(_0x47f2x5== _0x47f2x3[_0x1bfe[724]][_0x1bfe[246]]|| null!= _0x47f2x5&& !_0x47f2x3[_0x1bfe[1179]][_0x1bfe[2405]]&& _0x47f2x9[_0x1bfe[250]](_0x47f2x5)){_0x47f2x5= null};return _0x47f2x5};_0x47f2x2[_0x1bfe[2872]]= function(_0x47f2x2){var _0x47f2x5=_0x47f2x3[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=_0x47f2x3[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[2292]](_0x47f2x2,_0x47f2x3[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](_0x47f2x5[_0x1bfe[1709]](_0x47f2x3[_0x1bfe[724]][_0x1bfe[246]],!_0x47f2x3[_0x1bfe[729]])),!_0x47f2x3[_0x1bfe[729]]),_0x47f2x5=null!= _0x47f2x5?_0x47f2x5[_0x1bfe[246]]:null;_0x47f2x3[_0x1bfe[267]]= _0x47f2x3[_0x1bfe[2909]](_0x47f2x3[_0x1bfe[729]]?_0x47f2x2[_0x1bfe[246]]:_0x47f2x5,_0x47f2x3[_0x1bfe[729]]?_0x47f2x5:_0x47f2x2[_0x1bfe[246]]);return null== _0x47f2x3[_0x1bfe[267]]};return _0x47f2x2};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2909]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[1179]][_0x1bfe[2500]](this[_0x1bfe[724]][_0x1bfe[246]],_0x47f2x2,_0x47f2x3)};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3001]]= function(){for(var _0x47f2x2=this[_0x1bfe[724]][_0x1bfe[246]],_0x47f2x3=[],_0x47f2x4=0;_0x47f2x4< this[_0x1bfe[2997]][_0x1bfe[67]];_0x47f2x4++){if(this[_0x1bfe[3008]](_0x47f2x4)){var _0x47f2x5=_0x47f2x4== this[_0x1bfe[2997]][_0x1bfe[67]]- 1;if((_0x47f2x5= 0== _0x47f2x4|| _0x47f2x5)|| this[_0x1bfe[1179]][_0x1bfe[2662]](_0x47f2x2)){var _0x47f2x9=this[_0x1bfe[3009]](_0x47f2x4);this[_0x1bfe[3002]](_0x47f2x9);mxClient[_0x1bfe[754]]&& _0x47f2x9[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[130]);if(this[_0x1bfe[3010]](_0x47f2x4)){if(mxClient[_0x1bfe[754]]){var _0x47f2xa=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){_0x47f2x2= mxUtils[_0x1bfe[2196]](this[_0x1bfe[1179]][_0x1bfe[526]],mxEvent[_0x1bfe[731]](_0x47f2x2),mxEvent[_0x1bfe[733]](_0x47f2x2));return this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[248]](this[_0x1bfe[1179]][_0x1bfe[999]](_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]]))});mxEvent[_0x1bfe[2733]](_0x47f2x9[_0x1bfe[252]],this[_0x1bfe[1179]],_0x47f2xa)}else {_0x47f2x9[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= mxConstants[_0x1bfe[3011]],mxEvent[_0x1bfe[2733]](_0x47f2x9[_0x1bfe[252]],this[_0x1bfe[1179]],this[_0x1bfe[724]])}};_0x47f2x3[_0x1bfe[207]](_0x47f2x9);_0x47f2x5|| (this[_0x1bfe[1525]][_0x1bfe[207]]( new mxPoint(0,0)),_0x47f2x9[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188])}}};return _0x47f2x3};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3010]]= function(_0x47f2x2){return !0};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3008]]= function(_0x47f2x2){return !0};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3009]]= function(_0x47f2x2){if(null!= this[_0x1bfe[2959]]){return new mxImageShape( new mxRectangle(0,0,this[_0x1bfe[2959]][_0x1bfe[117]],this[_0x1bfe[2959]][_0x1bfe[119]]),this[_0x1bfe[2959]][_0x1bfe[390]])};_0x47f2x2= mxConstants[_0x1bfe[2974]];this[_0x1bfe[574]]&& (_0x47f2x2-= 1);return new mxRectangleShape( new mxRectangle(0,0,_0x47f2x2,_0x47f2x2),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3002]]= function(_0x47f2x2){this[_0x1bfe[574]]?(_0x47f2x2[_0x1bfe[507]]= mxConstants[_0x1bfe[1656]],_0x47f2x2[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[526]])):(_0x47f2x2[_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[2334]]:mxConstants[_0x1bfe[508]],_0x47f2x2[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]()))};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2986]]= function(_0x47f2x2){if(null!= this[_0x1bfe[2994]]){for(var _0x47f2x3=this[_0x1bfe[2353]],_0x47f2x3=this[_0x1bfe[2958]]&& (mxClient[_0x1bfe[80]]|| 0< _0x47f2x3)? new mxRectangle(_0x47f2x2[_0x1bfe[734]]()- _0x47f2x3,_0x47f2x2[_0x1bfe[735]]()- _0x47f2x3,2* _0x47f2x3,2* _0x47f2x3):null,_0x47f2x4=0;_0x47f2x4< this[_0x1bfe[2994]][_0x1bfe[67]];_0x47f2x4++){if((_0x47f2x2[_0x1bfe[729]](this[_0x1bfe[2994]][_0x47f2x4])|| null!= _0x47f2x3&& mxUtils[_0x1bfe[1825]](this[_0x1bfe[2994]][_0x47f2x4][_0x1bfe[1562]],_0x47f2x3))&& _0x1bfe[188]!= this[_0x1bfe[2994]][_0x47f2x4][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]){return _0x47f2x4}}};if(_0x47f2x2[_0x1bfe[729]](this[_0x1bfe[2972]])&& _0x1bfe[188]!= this[_0x1bfe[2972]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]|| _0x47f2x2[_0x1bfe[729]](this[_0x1bfe[724]][_0x1bfe[963]])){if(!mxClient[_0x1bfe[75]]&& !mxClient[_0x1bfe[76]]|| _0x1bfe[2822]!= _0x47f2x2[_0x1bfe[728]]()[_0x1bfe[301]]){return mxEvent[_0x1bfe[2987]]}};return null};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[787]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=null,_0x47f2x4=this[_0x1bfe[2986]](_0x47f2x3);null!= _0x47f2x4&& (!_0x47f2x3[_0x1bfe[721]]()&& this[_0x1bfe[1179]][_0x1bfe[994]]()&& !this[_0x1bfe[1179]][_0x1bfe[2579]](_0x47f2x3[_0x1bfe[727]]()))&& (this[_0x1bfe[2995]]&& this[_0x1bfe[3004]](_0x47f2x3[_0x1bfe[727]]())?this[_0x1bfe[3012]](this[_0x1bfe[724]],_0x47f2x4):(_0x47f2x4!= mxEvent[_0x1bfe[2987]]|| this[_0x1bfe[1179]][_0x1bfe[2628]](_0x47f2x3[_0x1bfe[736]]()))&& this[_0x1bfe[861]](_0x47f2x3[_0x1bfe[730]](),_0x47f2x3[_0x1bfe[732]](),_0x47f2x4),_0x47f2x3[_0x1bfe[722]]())};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[861]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[2739]]= _0x47f2x2;this[_0x1bfe[2740]]= _0x47f2x3;this[_0x1bfe[729]]= null== this[_0x1bfe[2994]]?!1:0== _0x47f2x4;this[_0x1bfe[3013]]= null== this[_0x1bfe[2994]]?!1:_0x47f2x4== this[_0x1bfe[2994]][_0x1bfe[67]]- 1;this[_0x1bfe[3014]]= _0x47f2x4== mxEvent[_0x1bfe[2987]];if(this[_0x1bfe[729]]|| this[_0x1bfe[3013]]){if(_0x47f2x2= this[_0x1bfe[724]][_0x1bfe[246]],_0x47f2x3= this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[1709]](_0x47f2x2,this[_0x1bfe[729]]),null== _0x47f2x3&& this[_0x1bfe[1179]][_0x1bfe[2661]](_0x47f2x2,this[_0x1bfe[729]])|| null!= _0x47f2x3&& this[_0x1bfe[1179]][_0x1bfe[2551]](_0x47f2x2,_0x47f2x3,this[_0x1bfe[729]])){this[_0x1bfe[1983]]= _0x47f2x4}}else {this[_0x1bfe[1983]]= _0x47f2x4}};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3015]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[724]][_0x1bfe[238]]()};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3016]]= function(){return this[_0x1bfe[1179]][_0x1bfe[1020]]* this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]]/ 2};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2689]]= function(_0x47f2x2){var _0x47f2x3= new mxPoint(_0x47f2x2[_0x1bfe[734]](),_0x47f2x2[_0x1bfe[735]]()),_0x47f2x4=this[_0x1bfe[3016]](),_0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[249]](),_0x47f2x9=!1,_0x47f2xa=!1;if(this[_0x1bfe[2996]]&& 0< _0x47f2x4){var _0x47f2x12=function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x5=_0x47f2x2[_0x1bfe[235]];Math[_0x1bfe[425]](_0x47f2x3[_0x1bfe[235]]- _0x47f2x5)< _0x47f2x4&& (_0x47f2x3[_0x1bfe[235]]= _0x47f2x5,_0x47f2x9= !0);_0x47f2x2= _0x47f2x2[_0x1bfe[236]];Math[_0x1bfe[425]](_0x47f2x3[_0x1bfe[236]]- _0x47f2x2)< _0x47f2x4&& (_0x47f2x3[_0x1bfe[236]]= _0x47f2x2,_0x47f2xa= !0)}},_0x47f2x13=function(_0x47f2x2){null!= _0x47f2x2&& _0x47f2x12[_0x1bfe[239]](this, new mxPoint(_0x47f2x5[_0x1bfe[2230]](_0x47f2x2),_0x47f2x5[_0x1bfe[2228]](_0x47f2x2)))};_0x47f2x13[_0x1bfe[239]](this,this[_0x1bfe[724]][_0x1bfe[2089]](!0));_0x47f2x13[_0x1bfe[239]](this,this[_0x1bfe[724]][_0x1bfe[2089]](!1));if(null!= this[_0x1bfe[2997]]){for(_0x47f2x13= 0;_0x47f2x13< this[_0x1bfe[2997]];_0x47f2x13++){_0x47f2x13!= this[_0x1bfe[1983]]&& _0x47f2x12[_0x1bfe[239]](this,this[_0x1bfe[2997]][_0x47f2x13])}}};this[_0x1bfe[1179]][_0x1bfe[1018]](_0x47f2x2[_0x1bfe[727]]())&& (_0x47f2x2= _0x47f2x5[_0x1bfe[255]],_0x47f2x13= _0x47f2x5[_0x1bfe[513]],_0x47f2x9|| (_0x47f2x3[_0x1bfe[235]]= (this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x3[_0x1bfe[235]]/ _0x47f2x2- _0x47f2x13[_0x1bfe[235]])+ _0x47f2x13[_0x1bfe[235]])* _0x47f2x2),_0x47f2xa|| (_0x47f2x3[_0x1bfe[236]]= (this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x3[_0x1bfe[236]]/ _0x47f2x2- _0x47f2x13[_0x1bfe[236]])+ _0x47f2x13[_0x1bfe[236]])* _0x47f2x2));return _0x47f2x3};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3017]]= function(_0x47f2x2){this[_0x1bfe[2886]][_0x1bfe[2729]](_0x47f2x2,this[_0x1bfe[729]]);this[_0x1bfe[2885]][_0x1bfe[2871]](_0x47f2x2);_0x47f2x2= this[_0x1bfe[2885]][_0x1bfe[2868]]();var _0x47f2x3=null;null!= this[_0x1bfe[2886]][_0x1bfe[2919]]&& null!= this[_0x1bfe[2886]][_0x1bfe[2920]]&& this[_0x1bfe[2885]][_0x1bfe[862]]();null!= _0x47f2x2?_0x47f2x3= _0x47f2x2:null!= this[_0x1bfe[2886]][_0x1bfe[2920]]&& null!= this[_0x1bfe[2886]][_0x1bfe[2919]]&& (_0x47f2x3= this[_0x1bfe[2886]][_0x1bfe[2919]]);return _0x47f2x3};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3018]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[1198]](this[_0x1bfe[724]][_0x1bfe[246]]),_0x47f2x3=null!= _0x47f2x3[_0x1bfe[1525]]?_0x47f2x3[_0x1bfe[1525]][_0x1bfe[1853]]():null;!this[_0x1bfe[729]]&& !this[_0x1bfe[3013]]?(this[_0x1bfe[2196]](_0x47f2x2,!1),null== _0x47f2x3?_0x47f2x3= [_0x47f2x2]:_0x47f2x3[this[_0x1bfe[1983]]- 1]= _0x47f2x2):this[_0x1bfe[1179]][_0x1bfe[2401]]&& (_0x47f2x3= null);return _0x47f2x3};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3019]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[729]]?_0x47f2x4:this[_0x1bfe[724]][_0x1bfe[2089]](!0),_0x47f2x9=this[_0x1bfe[3013]]?_0x47f2x4:this[_0x1bfe[724]][_0x1bfe[2089]](!1),_0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[2288]](_0x47f2x2,_0x47f2x5,!0),_0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[2288]](_0x47f2x2,_0x47f2x9,!1),_0x47f2x13=this[_0x1bfe[2886]][_0x1bfe[2920]];null== _0x47f2x13&& (_0x47f2x13= new mxConnectionConstraint);this[_0x1bfe[729]]?_0x47f2xa= _0x47f2x13:this[_0x1bfe[3013]]&& (_0x47f2x12= _0x47f2x13);(!this[_0x1bfe[729]]|| null!= _0x47f2x5)&& _0x47f2x2[_0x1bfe[441]][_0x1bfe[2289]](_0x47f2x2,_0x47f2x5,!0,_0x47f2xa);(!this[_0x1bfe[3013]]|| null!= _0x47f2x9)&& _0x47f2x2[_0x1bfe[441]][_0x1bfe[2289]](_0x47f2x2,_0x47f2x9,!1,_0x47f2x12);if((this[_0x1bfe[729]]|| this[_0x1bfe[3013]])&& null== _0x47f2x4){_0x47f2x2[_0x1bfe[2088]](_0x47f2x3,this[_0x1bfe[729]]),null== this[_0x1bfe[2885]][_0x1bfe[2869]]()&& (this[_0x1bfe[267]]= this[_0x1bfe[1179]][_0x1bfe[2406]]?null:_0x1bfe[110])};_0x47f2x2[_0x1bfe[441]][_0x1bfe[2282]](_0x47f2x2,this[_0x1bfe[1525]],_0x47f2x5,_0x47f2x9);_0x47f2x2[_0x1bfe[441]][_0x1bfe[2283]](_0x47f2x2,_0x47f2x5,_0x47f2x9)};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[788]]= function(_0x47f2x2,_0x47f2x3){if(null!= this[_0x1bfe[1983]]&& null!= this[_0x1bfe[2885]]){var _0x47f2x4=this[_0x1bfe[2689]](_0x47f2x3);if(this[_0x1bfe[3014]]){this[_0x1bfe[685]][_0x1bfe[235]]= _0x47f2x4[_0x1bfe[235]],this[_0x1bfe[685]][_0x1bfe[236]]= _0x47f2x4[_0x1bfe[236]]}else {this[_0x1bfe[1525]]= this[_0x1bfe[3018]](_0x47f2x4);var _0x47f2x5=this[_0x1bfe[729]]|| this[_0x1bfe[3013]]?this[_0x1bfe[3017]](_0x47f2x3):null,_0x47f2x9=this[_0x1bfe[3015]](_0x47f2x4,null!= _0x47f2x5?_0x47f2x5[_0x1bfe[246]]:null);this[_0x1bfe[3019]](_0x47f2x9,_0x47f2x4,_0x47f2x5);this[_0x1bfe[3020]](null== this[_0x1bfe[267]]?this[_0x1bfe[2885]][_0x1bfe[2853]]:this[_0x1bfe[2885]][_0x1bfe[2855]]);this[_0x1bfe[2997]]= _0x47f2x9[_0x1bfe[439]];this[_0x1bfe[1124]]= !0};this[_0x1bfe[2932]]();mxEvent[_0x1bfe[722]](_0x47f2x3[_0x1bfe[727]]());_0x47f2x3[_0x1bfe[722]]()}else {mxClient[_0x1bfe[80]]&& null!= this[_0x1bfe[2986]](_0x47f2x3)&& _0x47f2x3[_0x1bfe[722]](!1)}};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[789]]= function(_0x47f2x2,_0x47f2x3){if(null!= this[_0x1bfe[1983]]&& null!= this[_0x1bfe[2885]]){var _0x47f2x4=this[_0x1bfe[724]][_0x1bfe[246]];if(_0x47f2x3[_0x1bfe[730]]()!= this[_0x1bfe[2739]]|| _0x47f2x3[_0x1bfe[732]]()!= this[_0x1bfe[2740]]){if(null!= this[_0x1bfe[267]]){0< this[_0x1bfe[267]][_0x1bfe[67]]&& this[_0x1bfe[1179]][_0x1bfe[2580]](this[_0x1bfe[267]])}else {if(this[_0x1bfe[3014]]){this[_0x1bfe[3021]](this[_0x1bfe[724]],this[_0x1bfe[685]][_0x1bfe[235]],this[_0x1bfe[685]][_0x1bfe[236]])}else {if(this[_0x1bfe[729]]|| this[_0x1bfe[3013]]){var _0x47f2x5=null;null!= this[_0x1bfe[2886]][_0x1bfe[2920]]&& null!= this[_0x1bfe[2886]][_0x1bfe[2919]]&& (_0x47f2x5= this[_0x1bfe[2886]][_0x1bfe[2919]][_0x1bfe[246]]);null== _0x47f2x5&& this[_0x1bfe[2885]][_0x1bfe[2867]]()&& (_0x47f2x5= this[_0x1bfe[2885]][_0x1bfe[2861]][_0x1bfe[246]]);if(null!= _0x47f2x5){_0x47f2x4= this[_0x1bfe[807]](_0x47f2x4,_0x47f2x5,this[_0x1bfe[729]],this[_0x1bfe[1179]][_0x1bfe[2574]](_0x47f2x3[_0x1bfe[727]]())&& this[_0x1bfe[2797]]&& this[_0x1bfe[1179]][_0x1bfe[2617]](),_0x47f2x3)}else {if(this[_0x1bfe[1179]][_0x1bfe[2530]]()){_0x47f2x5= this[_0x1bfe[2997]][this[_0x1bfe[729]]?0:this[_0x1bfe[2997]][_0x1bfe[67]]- 1];_0x47f2x5[_0x1bfe[235]]= _0x47f2x5[_0x1bfe[235]]/ this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]]- this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[235]];_0x47f2x5[_0x1bfe[236]]= _0x47f2x5[_0x1bfe[236]]/ this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]]- this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[513]][_0x1bfe[236]];var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1197]](_0x47f2x4));null!= _0x47f2x9&& (_0x47f2x5[_0x1bfe[235]]-= _0x47f2x9[_0x1bfe[2078]][_0x1bfe[235]],_0x47f2x5[_0x1bfe[236]]-= _0x47f2x9[_0x1bfe[2078]][_0x1bfe[236]]);_0x47f2x5[_0x1bfe[235]]-= this[_0x1bfe[1179]][_0x1bfe[1136]]/ this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]];_0x47f2x5[_0x1bfe[236]]-= this[_0x1bfe[1179]][_0x1bfe[1137]]/ this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]];this[_0x1bfe[3022]](_0x47f2x4,_0x47f2x5,this[_0x1bfe[729]])}}}else {this[_0x1bfe[1124]]?this[_0x1bfe[3023]](_0x47f2x4,this[_0x1bfe[1525]]):(this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[2263]](this[_0x1bfe[724]][_0x1bfe[246]]),this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[2259]](this[_0x1bfe[724]][_0x1bfe[246]]))}}}};null!= this[_0x1bfe[2885]]&& (this[_0x1bfe[862]](),_0x47f2x4!= this[_0x1bfe[724]][_0x1bfe[246]]&& this[_0x1bfe[1179]][_0x1bfe[2450]](_0x47f2x4));_0x47f2x3[_0x1bfe[722]]()}};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[862]]= function(){this[_0x1bfe[1525]]= this[_0x1bfe[685]]= this[_0x1bfe[1983]]= this[_0x1bfe[267]]= null;this[_0x1bfe[3013]]= this[_0x1bfe[729]]= this[_0x1bfe[3014]]= this[_0x1bfe[1124]]= !1;this[_0x1bfe[2885]][_0x1bfe[862]]();this[_0x1bfe[2886]][_0x1bfe[862]]();this[_0x1bfe[3020]](mxConstants.EDGE_SELECTION_COLOR);this[_0x1bfe[258]]()};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3020]]= function(_0x47f2x2){null!= this[_0x1bfe[253]]&& (this[_0x1bfe[253]][_0x1bfe[1336]]= _0x47f2x2)};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2196]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[518]](),_0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[512]]();_0x47f2x3&& (_0x47f2x2[_0x1bfe[235]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x2[_0x1bfe[235]]),_0x47f2x2[_0x1bfe[236]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x2[_0x1bfe[236]]));_0x47f2x2[_0x1bfe[235]]= Math[_0x1bfe[488]](_0x47f2x2[_0x1bfe[235]]/ _0x47f2x4- _0x47f2x5[_0x1bfe[235]]);_0x47f2x2[_0x1bfe[236]]= Math[_0x1bfe[488]](_0x47f2x2[_0x1bfe[236]]/ _0x47f2x4- _0x47f2x5[_0x1bfe[236]]);_0x47f2x4= this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1197]](this[_0x1bfe[724]][_0x1bfe[246]]));null!= _0x47f2x4&& (_0x47f2x2[_0x1bfe[235]]-= _0x47f2x4[_0x1bfe[2078]][_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]]-= _0x47f2x4[_0x1bfe[2078]][_0x1bfe[236]]);return _0x47f2x2};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3021]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x9=_0x47f2x5[_0x1bfe[1721]](_0x47f2x2[_0x1bfe[246]]);if(null!= _0x47f2x9){var _0x47f2x9=_0x47f2x9[_0x1bfe[238]](),_0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[2308]](_0x47f2x2,_0x47f2x3,_0x47f2x4);_0x47f2x9[_0x1bfe[235]]= _0x47f2xa[_0x1bfe[235]];_0x47f2x9[_0x1bfe[236]]= _0x47f2xa[_0x1bfe[236]];var _0x47f2x12=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]];_0x47f2x9[_0x1bfe[1368]]= new mxPoint(0,0);_0x47f2xa= this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[245]](_0x47f2x2,_0x47f2x9);_0x47f2x9[_0x1bfe[1368]]= new mxPoint((_0x47f2x3- _0x47f2xa[_0x1bfe[235]])/ _0x47f2x12,(_0x47f2x4- _0x47f2xa[_0x1bfe[236]])/ _0x47f2x12);_0x47f2x5[_0x1bfe[1724]](_0x47f2x2[_0x1bfe[246]],_0x47f2x9)}};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[807]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x9= this[_0x1bfe[1179]][_0x1bfe[502]]();var _0x47f2xa=_0x47f2x9[_0x1bfe[1197]](_0x47f2x2);_0x47f2x9[_0x1bfe[473]]();try{if(_0x47f2x5){var _0x47f2x12=_0x47f2x2[_0x1bfe[238]]();_0x47f2x9[_0x1bfe[99]](_0x47f2xa,_0x47f2x12,_0x47f2x9[_0x1bfe[262]](_0x47f2xa));var _0x47f2x13=_0x47f2x9[_0x1bfe[1709]](_0x47f2x2,!_0x47f2x4);this[_0x1bfe[1179]][_0x1bfe[851]](_0x47f2x12,_0x47f2x13,!_0x47f2x4);_0x47f2x2= _0x47f2x12};var _0x47f2x14=this[_0x1bfe[2886]][_0x1bfe[2920]];null== _0x47f2x14&& (_0x47f2x14= new mxConnectionConstraint);this[_0x1bfe[1179]][_0x1bfe[851]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x14)}finally{_0x47f2x9[_0x1bfe[476]]()};return _0x47f2x2};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3022]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x9=_0x47f2x5[_0x1bfe[1721]](_0x47f2x2);if(null!= _0x47f2x9){_0x47f2x5[_0x1bfe[473]]();try{_0x47f2x9= _0x47f2x9[_0x1bfe[238]](),_0x47f2x9[_0x1bfe[2007]](_0x47f2x3,_0x47f2x4),_0x47f2x5[_0x1bfe[1724]](_0x47f2x2,_0x47f2x9),this[_0x1bfe[1179]][_0x1bfe[851]](_0x47f2x2,null,_0x47f2x4, new mxConnectionConstraint)}finally{_0x47f2x5[_0x1bfe[476]]()}}};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3023]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x5=_0x47f2x4[_0x1bfe[1721]](_0x47f2x2);null!= _0x47f2x5&& (_0x47f2x5= _0x47f2x5[_0x1bfe[238]](),_0x47f2x5[_0x1bfe[1525]]= _0x47f2x3,_0x47f2x4[_0x1bfe[1724]](_0x47f2x2,_0x47f2x5))};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3000]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=mxUtils[_0x1bfe[2196]](this[_0x1bfe[1179]][_0x1bfe[526]],mxEvent[_0x1bfe[731]](_0x47f2x3),mxEvent[_0x1bfe[733]](_0x47f2x3)),_0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[1018]](_0x47f2x3);this[_0x1bfe[2196]](_0x47f2x4,_0x47f2x5);this[_0x1bfe[3024]](_0x47f2x2,_0x47f2x4[_0x1bfe[235]],_0x47f2x4[_0x1bfe[236]]);mxEvent[_0x1bfe[722]](_0x47f2x3)};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3024]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x2[_0x1bfe[246]]);_0x47f2x3= new mxPoint(_0x47f2x3,_0x47f2x4);if(null!= _0x47f2x5){_0x47f2x5= _0x47f2x5[_0x1bfe[238]]();_0x47f2x4= this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[513]];var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[441]][_0x1bfe[255]];_0x47f2x4= mxUtils[_0x1bfe[3025]](_0x47f2x2,(_0x47f2x3[_0x1bfe[235]]+ _0x47f2x4[_0x1bfe[235]])* _0x47f2x9,(_0x47f2x3[_0x1bfe[236]]+ _0x47f2x4[_0x1bfe[236]])* _0x47f2x9);null== _0x47f2x5[_0x1bfe[1525]]?_0x47f2x5[_0x1bfe[1525]]= [_0x47f2x3]:_0x47f2x5[_0x1bfe[1525]][_0x1bfe[300]](_0x47f2x4,0,_0x47f2x3);this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1724]](_0x47f2x2[_0x1bfe[246]],_0x47f2x5);this[_0x1bfe[515]]();this[_0x1bfe[176]]()}};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3012]]= function(_0x47f2x2,_0x47f2x3){if(0< _0x47f2x3&& _0x47f2x3< this[_0x1bfe[2997]][_0x1bfe[67]]- 1){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[1198]](this[_0x1bfe[724]][_0x1bfe[246]]);null!= _0x47f2x4&& null!= _0x47f2x4[_0x1bfe[1525]]&& (_0x47f2x4= _0x47f2x4[_0x1bfe[238]](),_0x47f2x4[_0x1bfe[1525]][_0x1bfe[300]](_0x47f2x3- 1,1),this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1724]](_0x47f2x2[_0x1bfe[246]],_0x47f2x4),this[_0x1bfe[515]](),this[_0x1bfe[176]]())}};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3026]]= function(_0x47f2x2){_0x47f2x2= 0== _0x47f2x2;var _0x47f2x3=this[_0x1bfe[724]][_0x1bfe[246]],_0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1709]](_0x47f2x3,_0x47f2x2),_0x47f2x5=mxConstants[_0x1bfe[2984]];null!= _0x47f2x4&& !this[_0x1bfe[1179]][_0x1bfe[2551]](_0x47f2x3,_0x47f2x4,_0x47f2x2)|| null== _0x47f2x4&& !this[_0x1bfe[1179]][_0x1bfe[2661]](_0x47f2x3,_0x47f2x2)?_0x47f2x5= mxConstants[_0x1bfe[3027]]:null!= _0x47f2x4&& this[_0x1bfe[1179]][_0x1bfe[2551]](_0x47f2x3,_0x47f2x4,_0x47f2x2)&& (_0x47f2x5= mxConstants[_0x1bfe[3028]]);return _0x47f2x5};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[258]]= function(){this[_0x1bfe[2997]]= this[_0x1bfe[724]][_0x1bfe[439]][_0x1bfe[1853]]();var _0x47f2x2=this[_0x1bfe[724]][_0x1bfe[246]],_0x47f2x3=mxConstants[_0x1bfe[3029]];this[_0x1bfe[685]]= new mxPoint(this[_0x1bfe[724]][_0x1bfe[2079]][_0x1bfe[235]],this[_0x1bfe[724]][_0x1bfe[2079]][_0x1bfe[236]]);this[_0x1bfe[2972]][_0x1bfe[1562]]= new mxRectangle(Math[_0x1bfe[488]](this[_0x1bfe[685]][_0x1bfe[235]]- _0x47f2x3/ 2),Math[_0x1bfe[488]](this[_0x1bfe[685]][_0x1bfe[236]]- _0x47f2x3/ 2),_0x47f2x3,_0x47f2x3);this[_0x1bfe[2972]][_0x1bfe[258]]();_0x47f2x3= this[_0x1bfe[1179]][_0x1bfe[2183]](_0x47f2x2);null!= _0x47f2x3&& 0< _0x47f2x3[_0x1bfe[67]]&& this[_0x1bfe[1179]][_0x1bfe[2628]](_0x47f2x2)?this[_0x1bfe[2972]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[189]:this[_0x1bfe[2972]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188];if(null!= this[_0x1bfe[2994]]&& 0< this[_0x1bfe[2994]][_0x1bfe[67]]){var _0x47f2x4=this[_0x1bfe[2997]][_0x1bfe[67]]- 1,_0x47f2x2=this[_0x1bfe[2997]][0],_0x47f2x5=this[_0x1bfe[2997]][0][_0x1bfe[236]],_0x47f2x3=this[_0x1bfe[2994]][0][_0x1bfe[1562]];this[_0x1bfe[2994]][0][_0x1bfe[1562]]= new mxRectangle(Math[_0x1bfe[488]](this[_0x1bfe[2997]][0][_0x1bfe[235]]- _0x47f2x3[_0x1bfe[117]]/ 2),Math[_0x1bfe[488]](_0x47f2x5- _0x47f2x3[_0x1bfe[119]]/ 2),_0x47f2x3[_0x1bfe[117]],_0x47f2x3[_0x1bfe[119]]);this[_0x1bfe[2994]][0][_0x1bfe[1334]]= this[_0x1bfe[3026]](0);this[_0x1bfe[2994]][0][_0x1bfe[258]]();var _0x47f2x5=this[_0x1bfe[2997]][_0x47f2x4],_0x47f2x9=this[_0x1bfe[2997]][_0x47f2x4][_0x1bfe[235]],_0x47f2x4=this[_0x1bfe[2997]][_0x47f2x4][_0x1bfe[236]],_0x47f2xa=this[_0x1bfe[2994]][_0x1bfe[67]]- 1,_0x47f2x3=this[_0x1bfe[2994]][_0x47f2xa][_0x1bfe[1562]];this[_0x1bfe[2994]][_0x47f2xa][_0x1bfe[1562]]= new mxRectangle(Math[_0x1bfe[488]](_0x47f2x9- _0x47f2x3[_0x1bfe[117]]/ 2),Math[_0x1bfe[488]](_0x47f2x4- _0x47f2x3[_0x1bfe[119]]/ 2),_0x47f2x3[_0x1bfe[117]],_0x47f2x3[_0x1bfe[119]]);this[_0x1bfe[2994]][_0x47f2xa][_0x1bfe[1334]]= this[_0x1bfe[3026]](_0x47f2xa);this[_0x1bfe[2994]][_0x47f2xa][_0x1bfe[258]]();this[_0x1bfe[3030]](_0x47f2x2,_0x47f2x5)};this[_0x1bfe[2932]]()};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[3030]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1721]](this[_0x1bfe[724]][_0x1bfe[246]])[_0x1bfe[1525]];if(null!= _0x47f2x4){null== this[_0x1bfe[1525]]&& (this[_0x1bfe[1525]]= []);for(var _0x47f2x5=1;_0x47f2x5< this[_0x1bfe[2994]][_0x1bfe[67]]- 1;_0x47f2x5++){if(null!= this[_0x1bfe[2994]][_0x47f2x5]){if(null!= this[_0x1bfe[2997]][_0x47f2x5]){var _0x47f2x9=this[_0x1bfe[2997]][_0x47f2x5][_0x1bfe[235]],_0x47f2xa=this[_0x1bfe[2997]][_0x47f2x5][_0x1bfe[236]],_0x47f2x12=this[_0x1bfe[2994]][_0x47f2x5][_0x1bfe[1562]];this[_0x1bfe[2994]][_0x47f2x5][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[189];this[_0x1bfe[2994]][_0x47f2x5][_0x1bfe[1562]]= new mxRectangle(Math[_0x1bfe[488]](_0x47f2x9- _0x47f2x12[_0x1bfe[117]]/ 2),Math[_0x1bfe[488]](_0x47f2xa- _0x47f2x12[_0x1bfe[119]]/ 2),_0x47f2x12[_0x1bfe[117]],_0x47f2x12[_0x1bfe[119]]);this[_0x1bfe[2994]][_0x47f2x5][_0x1bfe[258]]();this[_0x1bfe[1525]][_0x47f2x5- 1]= _0x47f2x4[_0x47f2x5- 1]}else {this[_0x1bfe[2994]][_0x47f2x5][_0x1bfe[515]](),this[_0x1bfe[2994]][_0x47f2x5]= null}}}}};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[2932]]= function(){if(this[_0x1bfe[3014]]){var _0x47f2x2=mxConstants[_0x1bfe[3029]],_0x47f2x2= new mxRectangle(Math[_0x1bfe[488]](this[_0x1bfe[685]][_0x1bfe[235]]- _0x47f2x2/ 2),Math[_0x1bfe[488]](this[_0x1bfe[685]][_0x1bfe[236]]- _0x47f2x2/ 2),_0x47f2x2,_0x47f2x2);this[_0x1bfe[2972]][_0x1bfe[1562]]= _0x47f2x2;this[_0x1bfe[2972]][_0x1bfe[258]]()}else {this[_0x1bfe[253]][_0x1bfe[1525]]= this[_0x1bfe[2997]],this[_0x1bfe[253]][_0x1bfe[258]]()}};mxEdgeHandler[_0x1bfe[202]][_0x1bfe[515]]= function(){null!= this[_0x1bfe[2885]]&& (this[_0x1bfe[2885]][_0x1bfe[515]](),this[_0x1bfe[2885]]= null);null!= this[_0x1bfe[253]]&& (this[_0x1bfe[253]][_0x1bfe[515]](),this[_0x1bfe[253]]= null);null!= this[_0x1bfe[2972]]&& (this[_0x1bfe[2972]][_0x1bfe[515]](),this[_0x1bfe[2972]]= null);null!= this[_0x1bfe[2886]]&& (this[_0x1bfe[2886]][_0x1bfe[515]](),this[_0x1bfe[2886]]= null);if(null!= this[_0x1bfe[2994]]){for(var _0x47f2x2=0;_0x47f2x2< this[_0x1bfe[2994]][_0x1bfe[67]];_0x47f2x2++){null!= this[_0x1bfe[2994]][_0x47f2x2]&& (this[_0x1bfe[2994]][_0x47f2x2][_0x1bfe[515]](),this[_0x1bfe[2994]][_0x47f2x2]= null)}}};function mxElbowEdgeHandler(_0x47f2x2){mxEdgeHandler[_0x1bfe[239]](this,_0x47f2x2)}mxUtils[_0x1bfe[1284]](mxElbowEdgeHandler,mxEdgeHandler);mxElbowEdgeHandler[_0x1bfe[202]]= new mxEdgeHandler;mxElbowEdgeHandler[_0x1bfe[202]][_0x1bfe[196]]= mxElbowEdgeHandler;mxElbowEdgeHandler[_0x1bfe[202]][_0x1bfe[3031]]= !0;mxElbowEdgeHandler[_0x1bfe[202]][_0x1bfe[3032]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[3033]:_0x1bfe[110];mxElbowEdgeHandler[_0x1bfe[202]][_0x1bfe[3001]]= function(){var _0x47f2x2=[],_0x47f2x3=this[_0x1bfe[3009]](0);this[_0x1bfe[3002]](_0x47f2x3);_0x47f2x3[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= mxConstants[_0x1bfe[3011]];mxEvent[_0x1bfe[2733]](_0x47f2x3[_0x1bfe[252]],this[_0x1bfe[1179]],this[_0x1bfe[724]]);_0x47f2x2[_0x1bfe[207]](_0x47f2x3);mxClient[_0x1bfe[754]]&& _0x47f2x3[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[130]);_0x47f2x2[_0x1bfe[207]](this[_0x1bfe[3034]]());this[_0x1bfe[1525]][_0x1bfe[207]]( new mxPoint(0,0));_0x47f2x3= this[_0x1bfe[3009]](2);this[_0x1bfe[3002]](_0x47f2x3);_0x47f2x3[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= mxConstants[_0x1bfe[3011]];mxEvent[_0x1bfe[2733]](_0x47f2x3[_0x1bfe[252]],this[_0x1bfe[1179]],this[_0x1bfe[724]]);_0x47f2x2[_0x1bfe[207]](_0x47f2x3);mxClient[_0x1bfe[754]]&& _0x47f2x3[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[130]);return _0x47f2x2};mxElbowEdgeHandler[_0x1bfe[202]][_0x1bfe[3034]]= function(){var _0x47f2x2=this[_0x1bfe[3009]]();this[_0x1bfe[3002]](_0x47f2x2);var _0x47f2x3=this[_0x1bfe[3035]]();_0x47f2x2[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= _0x47f2x3;_0x47f2x3= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){!mxEvent[_0x1bfe[721]](_0x47f2x2)&& this[_0x1bfe[3031]]&& (this[_0x1bfe[1179]][_0x1bfe[854]](this[_0x1bfe[724]][_0x1bfe[246]],_0x47f2x2),mxEvent[_0x1bfe[722]](_0x47f2x2))});mxEvent[_0x1bfe[2733]](_0x47f2x2[_0x1bfe[252]],this[_0x1bfe[1179]],this[_0x1bfe[724]],null,null,null,_0x47f2x3);this[_0x1bfe[1179]][_0x1bfe[2662]](this[_0x1bfe[724]][_0x1bfe[246]])|| (_0x47f2x2[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[495]]= _0x1bfe[130]);return _0x47f2x2};mxElbowEdgeHandler[_0x1bfe[202]][_0x1bfe[3035]]= function(){return this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2294]]]== mxEdgeStyle[_0x1bfe[2570]]|| this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2294]]]== mxConstants[_0x1bfe[3036]]|| (this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2294]]]== mxEdgeStyle[_0x1bfe[2568]]|| this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2294]]]== mxConstants[_0x1bfe[3037]])&& this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2231]]]== mxConstants[_0x1bfe[2232]]?_0x1bfe[3038]:_0x1bfe[3039]};mxElbowEdgeHandler[_0x1bfe[202]][_0x1bfe[2597]]= function(_0x47f2x2){var _0x47f2x3=null;if(null!= this[_0x1bfe[2994]]&& null!= this[_0x1bfe[2994]][1]&& (_0x47f2x2== this[_0x1bfe[2994]][1][_0x1bfe[252]]|| _0x47f2x2[_0x1bfe[265]]== this[_0x1bfe[2994]][1][_0x1bfe[252]])){_0x47f2x3= this[_0x1bfe[3032]],_0x47f2x3= mxResources[_0x1bfe[203]](_0x47f2x3)|| _0x47f2x3};return _0x47f2x3};mxElbowEdgeHandler[_0x1bfe[202]][_0x1bfe[2196]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[518]](),_0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[512]](),_0x47f2x9=this[_0x1bfe[724]][_0x1bfe[2078]];_0x47f2x3&& (_0x47f2x2[_0x1bfe[235]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x2[_0x1bfe[235]]),_0x47f2x2[_0x1bfe[236]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x2[_0x1bfe[236]]));_0x47f2x2[_0x1bfe[235]]= Math[_0x1bfe[488]](_0x47f2x2[_0x1bfe[235]]/ _0x47f2x4- _0x47f2x5[_0x1bfe[235]]- _0x47f2x9[_0x1bfe[235]]);_0x47f2x2[_0x1bfe[236]]= Math[_0x1bfe[488]](_0x47f2x2[_0x1bfe[236]]/ _0x47f2x4- _0x47f2x5[_0x1bfe[236]]- _0x47f2x9[_0x1bfe[236]])};mxElbowEdgeHandler[_0x1bfe[202]][_0x1bfe[3030]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1721]](this[_0x1bfe[724]][_0x1bfe[246]])[_0x1bfe[1525]],_0x47f2x4=null!= _0x47f2x4?_0x47f2x4[0]:null,_0x47f2x4=null== _0x47f2x4? new mxPoint(_0x47f2x2[_0x1bfe[235]]+ (_0x47f2x3[_0x1bfe[235]]- _0x47f2x2[_0x1bfe[235]])/ 2,_0x47f2x2[_0x1bfe[236]]+ (_0x47f2x3[_0x1bfe[236]]- _0x47f2x2[_0x1bfe[236]])/ 2): new mxPoint(this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]]* (_0x47f2x4[_0x1bfe[235]]+ this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[513]][_0x1bfe[235]]+ this[_0x1bfe[724]][_0x1bfe[2078]][_0x1bfe[235]]),this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]]* (_0x47f2x4[_0x1bfe[236]]+ this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[513]][_0x1bfe[236]]+ this[_0x1bfe[724]][_0x1bfe[2078]][_0x1bfe[236]])),_0x47f2x5=this[_0x1bfe[2994]][1][_0x1bfe[1562]],_0x47f2x9=_0x47f2x5[_0x1bfe[117]],_0x47f2x5=_0x47f2x5[_0x1bfe[119]];null== this[_0x1bfe[2959]]&& (_0x47f2x5= _0x47f2x9= mxConstants[_0x1bfe[2974]]);var _0x47f2xa= new mxRectangle(Math[_0x1bfe[488]](_0x47f2x4[_0x1bfe[235]]- _0x47f2x9/ 2),Math[_0x1bfe[488]](_0x47f2x4[_0x1bfe[236]]- _0x47f2x5/ 2),_0x47f2x9,_0x47f2x5);null== this[_0x1bfe[2959]]&& (_0x1bfe[188]!= this[_0x1bfe[2972]][_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[187]]&& mxUtils[_0x1bfe[1825]](_0x47f2xa,this[_0x1bfe[2972]][_0x1bfe[1562]]))&& (_0x47f2x9+= 3,_0x47f2x5+= 3,_0x47f2xa= new mxRectangle(Math[_0x1bfe[488]](_0x47f2x4[_0x1bfe[235]]- _0x47f2x9/ 2),Math[_0x1bfe[488]](_0x47f2x4[_0x1bfe[236]]- _0x47f2x5/ 2),_0x47f2x9,_0x47f2x5));this[_0x1bfe[2994]][1][_0x1bfe[1562]]= _0x47f2xa;this[_0x1bfe[2994]][1][_0x1bfe[258]]()};function mxEdgeSegmentHandler(_0x47f2x2){mxEdgeHandler[_0x1bfe[239]](this,_0x47f2x2)}mxUtils[_0x1bfe[1284]](mxEdgeSegmentHandler,mxEdgeHandler);mxEdgeSegmentHandler[_0x1bfe[202]]= new mxElbowEdgeHandler;mxEdgeSegmentHandler[_0x1bfe[202]][_0x1bfe[196]]= mxEdgeSegmentHandler;mxEdgeSegmentHandler[_0x1bfe[202]][_0x1bfe[3018]]= function(_0x47f2x2){if(this[_0x1bfe[729]]|| this[_0x1bfe[3013]]){return mxElbowEdgeHandler[_0x1bfe[202]][_0x1bfe[3018]][_0x1bfe[183]](this,arguments)};this[_0x1bfe[2196]](_0x47f2x2,!1);var _0x47f2x3=this[_0x1bfe[724]][_0x1bfe[439]],_0x47f2x4=_0x47f2x3[0][_0x1bfe[238]]();this[_0x1bfe[2196]](_0x47f2x4,!1);for(var _0x47f2x5=[],_0x47f2x9=1;_0x47f2x9< _0x47f2x3[_0x1bfe[67]];_0x47f2x9++){var _0x47f2xa=_0x47f2x3[_0x47f2x9][_0x1bfe[238]]();this[_0x1bfe[2196]](_0x47f2xa,!1);_0x47f2x9== this[_0x1bfe[1983]]&& (_0x47f2x4[_0x1bfe[235]]== _0x47f2xa[_0x1bfe[235]]?(_0x47f2x4[_0x1bfe[235]]= _0x47f2x2[_0x1bfe[235]],_0x47f2xa[_0x1bfe[235]]= _0x47f2x2[_0x1bfe[235]]):(_0x47f2x4[_0x1bfe[236]]= _0x47f2x2[_0x1bfe[236]],_0x47f2xa[_0x1bfe[236]]= _0x47f2x2[_0x1bfe[236]]));_0x47f2x9< _0x47f2x3[_0x1bfe[67]]- 1&& _0x47f2x5[_0x1bfe[207]](_0x47f2xa);_0x47f2x4= _0x47f2xa};if(1== _0x47f2x5[_0x1bfe[67]]){if(_0x47f2x4= this[_0x1bfe[724]][_0x1bfe[441]],_0x47f2x9= this[_0x1bfe[724]][_0x1bfe[2089]](!0),_0x47f2xa= this[_0x1bfe[724]][_0x1bfe[2089]](!1),null!= _0x47f2xa& null!= _0x47f2x9){var _0x47f2x12=this[_0x1bfe[724]][_0x1bfe[2078]][_0x1bfe[235]],_0x47f2x13=this[_0x1bfe[724]][_0x1bfe[2078]][_0x1bfe[236]];mxUtils[_0x1bfe[442]](_0x47f2xa,_0x47f2x5[0][_0x1bfe[235]]+ _0x47f2x12,_0x47f2x5[0][_0x1bfe[236]]+ _0x47f2x13)?_0x47f2x3[1][_0x1bfe[236]]== _0x47f2x3[2][_0x1bfe[236]]?_0x47f2x5[0][_0x1bfe[236]]= _0x47f2x4[_0x1bfe[2228]](_0x47f2x9)- _0x47f2x13:_0x47f2x5[0][_0x1bfe[235]]= _0x47f2x4[_0x1bfe[2230]](_0x47f2x9)- _0x47f2x12:mxUtils[_0x1bfe[442]](_0x47f2x9,_0x47f2x5[0][_0x1bfe[235]]+ _0x47f2x12,_0x47f2x5[0][_0x1bfe[236]]+ _0x47f2x13)&& (_0x47f2x3[1][_0x1bfe[236]]== _0x47f2x3[0][_0x1bfe[236]]?_0x47f2x5[0][_0x1bfe[236]]= _0x47f2x4[_0x1bfe[2228]](_0x47f2xa)- _0x47f2x13:_0x47f2x5[0][_0x1bfe[235]]= _0x47f2x4[_0x1bfe[2230]](_0x47f2xa)- _0x47f2x12)}}else {0== _0x47f2x5[_0x1bfe[67]]&& (_0x47f2x5= [_0x47f2x2])};return _0x47f2x5};mxEdgeSegmentHandler[_0x1bfe[202]][_0x1bfe[3001]]= function(){var _0x47f2x2=[],_0x47f2x3=this[_0x1bfe[3009]](0);this[_0x1bfe[3002]](_0x47f2x3);_0x47f2x3[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= mxConstants[_0x1bfe[3011]];mxEvent[_0x1bfe[2733]](_0x47f2x3[_0x1bfe[252]],this[_0x1bfe[1179]],this[_0x1bfe[724]]);_0x47f2x2[_0x1bfe[207]](_0x47f2x3);mxClient[_0x1bfe[754]]&& _0x47f2x3[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[130]);var _0x47f2x4=this[_0x1bfe[724]][_0x1bfe[439]];if(this[_0x1bfe[1179]][_0x1bfe[2662]](this[_0x1bfe[724]][_0x1bfe[246]])){null== this[_0x1bfe[1525]]&& (this[_0x1bfe[1525]]= []);for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x4[_0x1bfe[67]]- 1;_0x47f2x5++){_0x47f2x3= this[_0x1bfe[3034]](),_0x47f2x2[_0x1bfe[207]](_0x47f2x3),_0x47f2x3[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= 0== _0x47f2x4[_0x47f2x5][_0x1bfe[235]]- _0x47f2x4[_0x47f2x5+ 1][_0x1bfe[235]]?_0x1bfe[3039]:_0x1bfe[3038],this[_0x1bfe[1525]][_0x1bfe[207]]( new mxPoint(0,0)),mxClient[_0x1bfe[754]]&& _0x47f2x3[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[130])}};_0x47f2x3= this[_0x1bfe[3009]](_0x47f2x4[_0x1bfe[67]]);this[_0x1bfe[3002]](_0x47f2x3);_0x47f2x3[_0x1bfe[252]][_0x1bfe[124]][_0x1bfe[270]]= mxConstants[_0x1bfe[3011]];mxEvent[_0x1bfe[2733]](_0x47f2x3[_0x1bfe[252]],this[_0x1bfe[1179]],this[_0x1bfe[724]]);_0x47f2x2[_0x1bfe[207]](_0x47f2x3);mxClient[_0x1bfe[754]]&& _0x47f2x3[_0x1bfe[252]][_0x1bfe[57]](_0x1bfe[1377],_0x1bfe[130]);return _0x47f2x2};mxEdgeSegmentHandler[_0x1bfe[202]][_0x1bfe[258]]= function(){this[_0x1bfe[802]]();mxEdgeHandler[_0x1bfe[202]][_0x1bfe[258]][_0x1bfe[183]](this,arguments)};mxEdgeSegmentHandler[_0x1bfe[202]][_0x1bfe[802]]= function(){if(null!= this[_0x1bfe[2994]]){for(var _0x47f2x2=0;_0x47f2x2< this[_0x1bfe[2994]][_0x1bfe[67]];_0x47f2x2++){null!= this[_0x1bfe[2994]][_0x47f2x2]&& (this[_0x1bfe[2994]][_0x47f2x2][_0x1bfe[515]](),this[_0x1bfe[2994]][_0x47f2x2]= null)};this[_0x1bfe[2994]]= this[_0x1bfe[3001]]()}};mxEdgeSegmentHandler[_0x1bfe[202]][_0x1bfe[3030]]= function(_0x47f2x2,_0x47f2x3){if(this[_0x1bfe[1179]][_0x1bfe[2662]](this[_0x1bfe[724]][_0x1bfe[246]])){var _0x47f2x4=mxConstants[_0x1bfe[2974]],_0x47f2x5=this[_0x1bfe[724]][_0x1bfe[439]];if(null!= _0x47f2x5&& 1< _0x47f2x5[_0x1bfe[67]]){for(var _0x47f2x9=0;_0x47f2x9< this[_0x1bfe[724]][_0x1bfe[439]][_0x1bfe[67]]- 1;_0x47f2x9++){if(null!= this[_0x1bfe[2994]][_0x47f2x9+ 1]){_0x47f2x2= _0x47f2x5[_0x47f2x9];_0x47f2x3= _0x47f2x5[_0x47f2x9+ 1];var _0x47f2xa= new mxPoint(_0x47f2x2[_0x1bfe[235]]+ (_0x47f2x3[_0x1bfe[235]]- _0x47f2x2[_0x1bfe[235]])/ 2,_0x47f2x2[_0x1bfe[236]]+ (_0x47f2x3[_0x1bfe[236]]- _0x47f2x2[_0x1bfe[236]])/ 2);this[_0x1bfe[2994]][_0x47f2x9+ 1][_0x1bfe[1562]]= new mxRectangle(Math[_0x1bfe[488]](_0x47f2xa[_0x1bfe[235]]- _0x47f2x4/ 2),Math[_0x1bfe[488]](_0x47f2xa[_0x1bfe[236]]- _0x47f2x4/ 2),_0x47f2x4,_0x47f2x4);this[_0x1bfe[2994]][_0x47f2x9+ 1][_0x1bfe[258]]()}}}}};mxEdgeSegmentHandler[_0x1bfe[202]][_0x1bfe[3023]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= [];var _0x47f2x4=this[_0x1bfe[2997]];if(1< _0x47f2x4[_0x1bfe[67]]){for(var _0x47f2x5=_0x47f2x4[0],_0x47f2x9=_0x47f2x4[1],_0x47f2xa=2;_0x47f2xa< _0x47f2x4[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=_0x47f2x4[_0x47f2xa];if((Math[_0x1bfe[488]](_0x47f2x5[_0x1bfe[235]])!= Math[_0x1bfe[488]](_0x47f2x9[_0x1bfe[235]])|| Math[_0x1bfe[488]](_0x47f2x9[_0x1bfe[235]])!= Math[_0x1bfe[488]](_0x47f2x12[_0x1bfe[235]]))&& (Math[_0x1bfe[488]](_0x47f2x5[_0x1bfe[236]])!= Math[_0x1bfe[488]](_0x47f2x9[_0x1bfe[236]])|| Math[_0x1bfe[488]](_0x47f2x9[_0x1bfe[236]])!= Math[_0x1bfe[488]](_0x47f2x12[_0x1bfe[236]]))){_0x47f2x5= _0x47f2x9,_0x47f2x9= _0x47f2x9[_0x1bfe[238]](),this[_0x1bfe[2196]](_0x47f2x9,!1),_0x47f2x3[_0x1bfe[207]](_0x47f2x9)};_0x47f2x9= _0x47f2x12}};mxElbowEdgeHandler[_0x1bfe[202]][_0x1bfe[3023]][_0x1bfe[183]](this,arguments)};function mxKeyHandler(_0x47f2x2,_0x47f2x3){null!= _0x47f2x2&& (this[_0x1bfe[1179]]= _0x47f2x2,this[_0x1bfe[772]]= _0x47f2x3|| document[_0x1bfe[158]],this[_0x1bfe[3040]]= [],this[_0x1bfe[3041]]= [],this[_0x1bfe[3042]]= [],this[_0x1bfe[3043]]= [],mxEvent[_0x1bfe[169]](this[_0x1bfe[772]],_0x1bfe[2123],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[3044]](_0x47f2x2)})),mxClient[_0x1bfe[80]]&& mxEvent[_0x1bfe[169]](window,_0x1bfe[2428],mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[515]]()})))}mxKeyHandler[_0x1bfe[202]][_0x1bfe[1179]]= null;mxKeyHandler[_0x1bfe[202]][_0x1bfe[772]]= null;mxKeyHandler[_0x1bfe[202]][_0x1bfe[3040]]= null;mxKeyHandler[_0x1bfe[202]][_0x1bfe[3041]]= null;mxKeyHandler[_0x1bfe[202]][_0x1bfe[3042]]= null;mxKeyHandler[_0x1bfe[202]][_0x1bfe[3043]]= null;mxKeyHandler[_0x1bfe[202]][_0x1bfe[984]]= !0;mxKeyHandler[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxKeyHandler[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxKeyHandler[_0x1bfe[202]][_0x1bfe[3045]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[3040]][_0x47f2x2]= _0x47f2x3};mxKeyHandler[_0x1bfe[202]][_0x1bfe[3046]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[3041]][_0x47f2x2]= _0x47f2x3};mxKeyHandler[_0x1bfe[202]][_0x1bfe[3047]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[3042]][_0x47f2x2]= _0x47f2x3};mxKeyHandler[_0x1bfe[202]][_0x1bfe[3048]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[3043]][_0x47f2x2]= _0x47f2x3};mxKeyHandler[_0x1bfe[202]][_0x1bfe[775]]= function(_0x47f2x2){return mxEvent[_0x1bfe[775]](_0x47f2x2)};mxKeyHandler[_0x1bfe[202]][_0x1bfe[3049]]= function(_0x47f2x2){return null!= _0x47f2x2?this[_0x1bfe[775]](_0x47f2x2)?mxEvent[_0x1bfe[774]](_0x47f2x2)?this[_0x1bfe[3043]][_0x47f2x2[_0x1bfe[2124]]]:this[_0x1bfe[3042]][_0x47f2x2[_0x1bfe[2124]]]:mxEvent[_0x1bfe[774]](_0x47f2x2)?this[_0x1bfe[3041]][_0x47f2x2[_0x1bfe[2124]]]:this[_0x1bfe[3040]][_0x47f2x2[_0x1bfe[2124]]]:null};mxKeyHandler[_0x1bfe[202]][_0x1bfe[3050]]= function(_0x47f2x2){_0x47f2x2= mxEvent[_0x1bfe[728]](_0x47f2x2);if(_0x47f2x2== this[_0x1bfe[772]]|| _0x47f2x2[_0x1bfe[265]]== this[_0x1bfe[772]]|| null!= this[_0x1bfe[1179]][_0x1bfe[2347]]&& _0x47f2x2== this[_0x1bfe[1179]][_0x1bfe[2347]][_0x1bfe[126]]){return !0};for(;null!= _0x47f2x2;){if(_0x47f2x2== this[_0x1bfe[1179]][_0x1bfe[526]]){return !0};_0x47f2x2= _0x47f2x2[_0x1bfe[265]]};return !1};mxKeyHandler[_0x1bfe[202]][_0x1bfe[3044]]= function(_0x47f2x2){if(this[_0x1bfe[1179]][_0x1bfe[994]]()&& !mxEvent[_0x1bfe[721]](_0x47f2x2)&& this[_0x1bfe[3050]](_0x47f2x2)&& this[_0x1bfe[994]]()){if(27== _0x47f2x2[_0x1bfe[2124]]){this[_0x1bfe[859]](_0x47f2x2)}else {if(!this[_0x1bfe[1179]][_0x1bfe[2203]]()){var _0x47f2x3=this[_0x1bfe[3049]](_0x47f2x2);null!= _0x47f2x3&& (_0x47f2x3(_0x47f2x2),mxEvent[_0x1bfe[722]](_0x47f2x2))}}}};mxKeyHandler[_0x1bfe[202]][_0x1bfe[859]]= function(_0x47f2x2){this[_0x1bfe[1179]][_0x1bfe[2608]]()&& this[_0x1bfe[1179]][_0x1bfe[859]](_0x47f2x2)};mxKeyHandler[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[772]]= null};function mxTooltipHandler(_0x47f2x2,_0x47f2x3){null!= _0x47f2x2&& (this[_0x1bfe[1179]]= _0x47f2x2,this[_0x1bfe[1140]]= _0x47f2x3|| 500,this[_0x1bfe[1179]][_0x1bfe[1133]](this))}mxTooltipHandler[_0x1bfe[202]][_0x1bfe[931]]= 10005;mxTooltipHandler[_0x1bfe[202]][_0x1bfe[1179]]= null;mxTooltipHandler[_0x1bfe[202]][_0x1bfe[1140]]= null;mxTooltipHandler[_0x1bfe[202]][_0x1bfe[3051]]= !1;mxTooltipHandler[_0x1bfe[202]][_0x1bfe[984]]= !0;mxTooltipHandler[_0x1bfe[202]][_0x1bfe[994]]= function(){return this[_0x1bfe[984]]};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[995]]= function(_0x47f2x2){this[_0x1bfe[984]]= _0x47f2x2};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[2277]]= function(){return this[_0x1bfe[3051]]};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[3052]]= function(_0x47f2x2){this[_0x1bfe[3051]]= _0x47f2x2};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[176]]= function(){null!= document[_0x1bfe[112]]&& (this[_0x1bfe[485]]= document[_0x1bfe[55]](_0x1bfe[485]),this[_0x1bfe[485]][_0x1bfe[926]]= _0x1bfe[3053],this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188],this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[931]]= this[_0x1bfe[931]],document[_0x1bfe[112]][_0x1bfe[62]](this[_0x1bfe[485]]),mxEvent[_0x1bfe[169]](this[_0x1bfe[485]],_0x1bfe[751],mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[3054]]()})))};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[787]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[862]](_0x47f2x3,!1);this[_0x1bfe[3054]]()};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[788]]= function(_0x47f2x2,_0x47f2x3){if(_0x47f2x3[_0x1bfe[730]]()!= this[_0x1bfe[1217]]|| _0x47f2x3[_0x1bfe[732]]()!= this[_0x1bfe[1218]]){this[_0x1bfe[862]](_0x47f2x3,!0),(this[_0x1bfe[2277]]()|| _0x47f2x3[_0x1bfe[248]]()!= this[_0x1bfe[724]]|| _0x47f2x3[_0x1bfe[728]]()!= this[_0x1bfe[252]]&& (!this[_0x1bfe[3055]]|| null!= _0x47f2x3[_0x1bfe[248]]()&& this[_0x1bfe[3055]]== (_0x47f2x3[_0x1bfe[729]](_0x47f2x3[_0x1bfe[248]]()[_0x1bfe[253]])|| !_0x47f2x3[_0x1bfe[729]](_0x47f2x3[_0x1bfe[248]]()[_0x1bfe[963]]))))&& this[_0x1bfe[3054]]()};this[_0x1bfe[1217]]= _0x47f2x3[_0x1bfe[730]]();this[_0x1bfe[1218]]= _0x47f2x3[_0x1bfe[732]]()};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[789]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[862]](_0x47f2x3,!0);this[_0x1bfe[3054]]()};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[3056]]= function(){null!= this[_0x1bfe[1123]]&& (window[_0x1bfe[2924]](this[_0x1bfe[1123]]),this[_0x1bfe[1123]]= null)};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[862]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[3056]]();if(_0x47f2x3&& this[_0x1bfe[994]]()&& null!= _0x47f2x2[_0x1bfe[248]]()&& (null== this[_0x1bfe[485]]|| _0x1bfe[188]== this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[187]])){var _0x47f2x4=_0x47f2x2[_0x1bfe[248]](),_0x47f2x5=_0x47f2x2[_0x1bfe[728]](),_0x47f2x9=_0x47f2x2[_0x1bfe[730]](),_0x47f2xa=_0x47f2x2[_0x1bfe[732]](),_0x47f2x12=_0x47f2x2[_0x1bfe[729]](_0x47f2x4[_0x1bfe[253]])|| _0x47f2x2[_0x1bfe[729]](_0x47f2x4[_0x1bfe[963]]);this[_0x1bfe[1123]]= window[_0x1bfe[261]](mxUtils[_0x1bfe[885]](this,function(){if(!this[_0x1bfe[1179]][_0x1bfe[2203]]()&& !this[_0x1bfe[1179]][_0x1bfe[2316]][_0x1bfe[1031]]()){var _0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[2595]](_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa);this[_0x1bfe[539]](_0x47f2x2,_0x47f2x9,_0x47f2xa);this[_0x1bfe[724]]= _0x47f2x4;this[_0x1bfe[252]]= _0x47f2x5;this[_0x1bfe[3055]]= _0x47f2x12}}),this[_0x1bfe[1140]])}};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[801]]= function(){this[_0x1bfe[3056]]();this[_0x1bfe[3054]]()};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[3054]]= function(){null!= this[_0x1bfe[485]]&& (this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[188])};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[539]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]){null== this[_0x1bfe[485]]&& this[_0x1bfe[176]]();var _0x47f2x5=mxUtils[_0x1bfe[444]]();this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[361]]= _0x47f2x3+ _0x47f2x5[_0x1bfe[235]]+ _0x1bfe[168];this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[125]]= _0x47f2x4+ mxConstants[_0x1bfe[560]]+ _0x47f2x5[_0x1bfe[236]]+ _0x1bfe[168];mxUtils[_0x1bfe[1331]](_0x47f2x2)?(this[_0x1bfe[485]][_0x1bfe[339]]= _0x1bfe[110],this[_0x1bfe[485]][_0x1bfe[62]](_0x47f2x2)):this[_0x1bfe[485]][_0x1bfe[339]]= _0x47f2x2[_0x1bfe[230]](/\n/g,_0x1bfe[545]);this[_0x1bfe[485]][_0x1bfe[124]][_0x1bfe[187]]= _0x1bfe[110];mxUtils[_0x1bfe[933]](this[_0x1bfe[485]])}};mxTooltipHandler[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[1179]][_0x1bfe[1148]](this);mxEvent[_0x1bfe[762]](this[_0x1bfe[485]]);null!= this[_0x1bfe[485]]&& null!= this[_0x1bfe[485]][_0x1bfe[265]]&& this[_0x1bfe[485]][_0x1bfe[265]][_0x1bfe[266]](this[_0x1bfe[485]]);this[_0x1bfe[485]]= null};function mxCellTracker(_0x47f2x2,_0x47f2x3,_0x47f2x4){mxCellMarker[_0x1bfe[239]](this,_0x47f2x2,_0x47f2x3);this[_0x1bfe[1179]][_0x1bfe[1133]](this);null!= _0x47f2x4&& (this[_0x1bfe[736]]= _0x47f2x4);mxClient[_0x1bfe[80]]&& mxEvent[_0x1bfe[169]](window,_0x1bfe[2428],mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[515]]()}))}mxUtils[_0x1bfe[1284]](mxCellTracker,mxCellMarker);mxCellTracker[_0x1bfe[202]][_0x1bfe[787]]= function(_0x47f2x2,_0x47f2x3){};mxCellTracker[_0x1bfe[202]][_0x1bfe[788]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[994]]()&& this[_0x1bfe[2871]](_0x47f2x3)};mxCellTracker[_0x1bfe[202]][_0x1bfe[789]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[862]]()};mxCellTracker[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[2717]]|| (this[_0x1bfe[2717]]= !0,this[_0x1bfe[1179]][_0x1bfe[1148]](this),mxCellMarker[_0x1bfe[202]][_0x1bfe[515]][_0x1bfe[183]](this))};function mxCellHighlight(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){null!= _0x47f2x2&& (this[_0x1bfe[1179]]= _0x47f2x2,this[_0x1bfe[2943]]= null!= _0x47f2x3?_0x47f2x3:mxConstants[_0x1bfe[2854]],this[_0x1bfe[610]]= null!= _0x47f2x4?_0x47f2x4:mxConstants[_0x1bfe[3057]],this[_0x1bfe[648]]= null!= _0x47f2x5?_0x47f2x5:!1,this[_0x1bfe[3058]]= mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[2950]]()}),this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.SCALE,this[_0x1bfe[3058]]),this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.TRANSLATE,this[_0x1bfe[3058]]),this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.SCALE_AND_TRANSLATE,this[_0x1bfe[3058]]),this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[169]](mxEvent.CHANGE,this[_0x1bfe[3058]]),this[_0x1bfe[2877]]= mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[801]]()}),this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.DOWN,this[_0x1bfe[2877]]),this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.UP,this[_0x1bfe[2877]]))}mxCellHighlight[_0x1bfe[202]][_0x1bfe[3059]]= !1;mxCellHighlight[_0x1bfe[202]][_0x1bfe[1179]]= !0;mxCellHighlight[_0x1bfe[202]][_0x1bfe[724]]= null;mxCellHighlight[_0x1bfe[202]][_0x1bfe[657]]= 2;mxCellHighlight[_0x1bfe[202]][_0x1bfe[2877]]= null;mxCellHighlight[_0x1bfe[202]][_0x1bfe[2828]]= function(_0x47f2x2){this[_0x1bfe[2943]]= _0x47f2x2;null!= this[_0x1bfe[253]]&& (this[_0x1bfe[253]][_0x1bfe[1336]]= _0x47f2x2)};mxCellHighlight[_0x1bfe[202]][_0x1bfe[3060]]= function(){this[_0x1bfe[253]]= this[_0x1bfe[2156]]();this[_0x1bfe[2950]]();!this[_0x1bfe[3059]]&& this[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[265]][_0x1bfe[285]]!= this[_0x1bfe[253]][_0x1bfe[252]]&& this[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[265]][_0x1bfe[950]](this[_0x1bfe[253]][_0x1bfe[252]],this[_0x1bfe[253]][_0x1bfe[252]][_0x1bfe[265]][_0x1bfe[285]])};mxCellHighlight[_0x1bfe[202]][_0x1bfe[2156]]= function(){var _0x47f2x2=null,_0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[250]](this[_0x1bfe[724]][_0x1bfe[246]])? new mxPolyline(this[_0x1bfe[724]][_0x1bfe[439]],this[_0x1bfe[2943]],this[_0x1bfe[610]]): new mxRectangleShape( new mxRectangle,null,this[_0x1bfe[2943]],this[_0x1bfe[610]]);_0x47f2x2[_0x1bfe[507]]= this[_0x1bfe[1179]][_0x1bfe[507]]!= mxConstants[_0x1bfe[508]]?mxConstants[_0x1bfe[1523]]:mxConstants[_0x1bfe[508]];_0x47f2x2[_0x1bfe[176]](this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[1524]]());mxEvent[_0x1bfe[2733]](_0x47f2x2[_0x1bfe[252]],this[_0x1bfe[1179]],this[_0x1bfe[724]]);_0x47f2x2[_0x1bfe[1564]]= 0;_0x47f2x2[_0x1bfe[1229]]= !1;_0x47f2x2[_0x1bfe[1522]]= this[_0x1bfe[648]];return _0x47f2x2};mxCellHighlight[_0x1bfe[202]][_0x1bfe[2950]]= function(){if(null!= this[_0x1bfe[724]]&& null!= this[_0x1bfe[253]]){var _0x47f2x2=0;this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[250]](this[_0x1bfe[724]][_0x1bfe[246]])?this[_0x1bfe[253]][_0x1bfe[1525]]= this[_0x1bfe[724]][_0x1bfe[439]]:(this[_0x1bfe[253]][_0x1bfe[1562]]= new mxRectangle(this[_0x1bfe[724]][_0x1bfe[235]]- this[_0x1bfe[657]],this[_0x1bfe[724]][_0x1bfe[236]]- this[_0x1bfe[657]],this[_0x1bfe[724]][_0x1bfe[117]]+ 2* this[_0x1bfe[657]],this[_0x1bfe[724]][_0x1bfe[119]]+ 2* this[_0x1bfe[657]]),_0x47f2x2= Number(this[_0x1bfe[724]][_0x1bfe[124]][mxConstants[_0x1bfe[2278]]]|| _0x1bfe[468]));null!= this[_0x1bfe[724]][_0x1bfe[253]]&& this[_0x1bfe[253]][_0x1bfe[1609]](this[_0x1bfe[724]][_0x1bfe[253]][_0x1bfe[1610]]());0!= _0x47f2x2&& (this[_0x1bfe[253]][_0x1bfe[603]]= _0x47f2x2);this[_0x1bfe[253]][_0x1bfe[258]]()}};mxCellHighlight[_0x1bfe[202]][_0x1bfe[801]]= function(){this[_0x1bfe[1016]](null)};mxCellHighlight[_0x1bfe[202]][_0x1bfe[1016]]= function(_0x47f2x2){this[_0x1bfe[724]]!= _0x47f2x2&& (null!= this[_0x1bfe[253]]&& (this[_0x1bfe[253]][_0x1bfe[515]](),this[_0x1bfe[253]]= null),this[_0x1bfe[724]]= _0x47f2x2,null!= this[_0x1bfe[724]]&& this[_0x1bfe[3060]]())};mxCellHighlight[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[745]](this[_0x1bfe[3058]]);this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[745]](this[_0x1bfe[3058]]);this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[745]](this[_0x1bfe[2877]]);this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[745]](this[_0x1bfe[2877]]);null!= this[_0x1bfe[253]]&& (this[_0x1bfe[253]][_0x1bfe[515]](),this[_0x1bfe[253]]= null)};function mxDefaultKeyHandler(_0x47f2x2){if(null!= _0x47f2x2){this[_0x1bfe[3061]]= _0x47f2x2;this[_0x1bfe[2458]]= new mxKeyHandler(_0x47f2x2[_0x1bfe[1179]]);var _0x47f2x3=this[_0x1bfe[2458]][_0x1bfe[859]];this[_0x1bfe[2458]][_0x1bfe[859]]= function(_0x47f2x4){_0x47f2x3[_0x1bfe[183]](this,arguments);_0x47f2x2[_0x1bfe[3062]]();_0x47f2x2[_0x1bfe[746]]( new mxEventObject(mxEvent.ESCAPE,_0x1bfe[763],_0x47f2x4))}}}mxDefaultKeyHandler[_0x1bfe[202]][_0x1bfe[3061]]= null;mxDefaultKeyHandler[_0x1bfe[202]][_0x1bfe[2458]]= null;mxDefaultKeyHandler[_0x1bfe[202]][_0x1bfe[3063]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[3061]][_0x1bfe[350]](_0x47f2x3)});_0x47f2x4?this[_0x1bfe[2458]][_0x1bfe[3047]](_0x47f2x2,_0x47f2x5):this[_0x1bfe[2458]][_0x1bfe[3045]](_0x47f2x2,_0x47f2x5)};mxDefaultKeyHandler[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[2458]][_0x1bfe[515]]();this[_0x1bfe[2458]]= null};function mxDefaultPopupMenu(_0x47f2x2){this[_0x1bfe[3064]]= _0x47f2x2}mxDefaultPopupMenu[_0x1bfe[202]][_0x1bfe[88]]= null;mxDefaultPopupMenu[_0x1bfe[202]][_0x1bfe[3064]]= null;mxDefaultPopupMenu[_0x1bfe[202]][_0x1bfe[3065]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){if(null!= this[_0x1bfe[3064]]){var _0x47f2x9=this[_0x1bfe[3066]](_0x47f2x2,_0x47f2x4,_0x47f2x5);this[_0x1bfe[3067]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,this[_0x1bfe[3064]][_0x1bfe[285]],null)}};mxDefaultPopupMenu[_0x1bfe[202]][_0x1bfe[3067]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12){for(var _0x47f2x13=!1;null!= _0x47f2xa;){if(_0x1bfe[99]== _0x47f2xa[_0x1bfe[301]]){var _0x47f2x14=_0x47f2xa[_0x1bfe[284]](_0x1bfe[3068]);if(null== _0x47f2x14|| _0x47f2x9[_0x47f2x14]){var _0x47f2x14=_0x47f2xa[_0x1bfe[284]](_0x1bfe[3069]),_0x47f2x14=mxResources[_0x1bfe[203]](_0x47f2x14)|| _0x47f2x14,_0x47f2x15=mxUtils[_0x1bfe[1545]](mxUtils[_0x1bfe[329]](_0x47f2xa)),_0x47f2x16=_0x47f2xa[_0x1bfe[284]](_0x1bfe[892]),_0x47f2x17=_0x47f2xa[_0x1bfe[284]](_0x1bfe[2916]),_0x47f2x18=_0x47f2xa[_0x1bfe[284]](_0x1bfe[3070]);_0x47f2x13&& (_0x47f2x3[_0x1bfe[1051]](_0x47f2x12),_0x47f2x13= !1);null!= _0x47f2x17&& this[_0x1bfe[88]]&& (_0x47f2x17= this[_0x1bfe[88]]+ _0x47f2x17);_0x47f2x14= this[_0x1bfe[3071]](_0x47f2x3,_0x47f2x2,_0x47f2x14,_0x47f2x17,_0x47f2x15,_0x47f2x16,_0x47f2x4,_0x47f2x12,_0x47f2x18);this[_0x1bfe[3067]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa[_0x1bfe[285]],_0x47f2x14)}}else {_0x1bfe[3072]== _0x47f2xa[_0x1bfe[301]]&& (_0x47f2x13= !0)};_0x47f2xa= _0x47f2xa[_0x1bfe[287]]}};mxDefaultPopupMenu[_0x1bfe[202]][_0x1bfe[3071]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa,_0x47f2x12,_0x47f2x13,_0x47f2x14){return _0x47f2x2[_0x1bfe[1025]](_0x47f2x4,_0x47f2x5,function(_0x47f2x2){_0x1bfe[279]== typeof _0x47f2x9&& _0x47f2x9[_0x1bfe[239]](_0x47f2x3,_0x47f2x3,_0x47f2x12,_0x47f2x2);null!= _0x47f2xa&& _0x47f2x3[_0x1bfe[350]](_0x47f2xa,_0x47f2x12,_0x47f2x2)},_0x47f2x13,_0x47f2x14)};mxDefaultPopupMenu[_0x1bfe[202]][_0x1bfe[3066]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=_0x47f2x2[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x9=_0x47f2x5[_0x1bfe[262]](_0x47f2x3),_0x47f2xa=[];_0x47f2xa[_0x1bfe[3073]]= null== _0x47f2x3;_0x47f2xa[_0x1bfe[3074]]= 1< _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2694]]();_0x47f2xa[_0x1bfe[3075]]= _0x47f2x5[_0x1bfe[501]]()!= _0x47f2x5[_0x1bfe[1197]](_0x47f2x2[_0x1bfe[1179]][_0x1bfe[902]]());_0x47f2xa[_0x1bfe[246]]= null!= _0x47f2x3;_0x47f2x5= null!= _0x47f2x3&& 1== _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2694]]();_0x47f2xa[_0x1bfe[3076]]= _0x47f2x5&& 0< _0x47f2x9;_0x47f2xa[_0x1bfe[3077]]= _0x47f2x5&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2516]](_0x47f2x3,!1);_0x47f2xa[_0x1bfe[3078]]= _0x47f2x5&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2516]](_0x47f2x3,!0);_0x47f2xa[_0x1bfe[3079]]= _0x47f2x5&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2553]](_0x47f2x3);_0x47f2xa[_0x1bfe[3080]]= _0x47f2xa[_0x1bfe[3079]]&& 0== _0x47f2x9;_0x47f2xa[_0x1bfe[687]]= _0x47f2x5&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x3);_0x47f2x9= this[_0x1bfe[3064]][_0x1bfe[64]](_0x1bfe[3081]);for(_0x47f2x5= 0;_0x47f2x5< _0x47f2x9[_0x1bfe[67]];_0x47f2x5++){var _0x47f2x12=mxUtils[_0x1bfe[1545]](mxUtils[_0x1bfe[329]](_0x47f2x9[_0x47f2x5])),_0x47f2x13=_0x47f2x9[_0x47f2x5][_0x1bfe[284]](_0x1bfe[298]);null!= _0x47f2x13&& _0x1bfe[279]== typeof _0x47f2x12&& (_0x47f2xa[_0x47f2x13]= _0x47f2x12(_0x47f2x2,_0x47f2x3,_0x47f2x4))};return _0x47f2xa};function mxDefaultToolbar(_0x47f2x2,_0x47f2x3){this[_0x1bfe[3061]]= _0x47f2x3;null!= _0x47f2x2&& null!= _0x47f2x3&& this[_0x1bfe[176]](_0x47f2x2)}mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[3061]]= null;mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[3082]]= null;mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[2877]]= null;mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[657]]= 4;mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[2804]]= !1;mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[176]]= function(_0x47f2x2){null!= _0x47f2x2&& (this[_0x1bfe[3082]]= new mxToolbar(_0x47f2x2),this[_0x1bfe[3082]][_0x1bfe[169]](mxEvent.SELECT,mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x4){var _0x47f2x5=_0x47f2x4[_0x1bfe[720]](_0x1bfe[279]);this[_0x1bfe[3061]][_0x1bfe[3083]]= null!= _0x47f2x5?mxUtils[_0x1bfe[885]](this,function(){_0x47f2x5[_0x1bfe[183]](this,arguments);this[_0x1bfe[3082]][_0x1bfe[1050]]()}):null})),this[_0x1bfe[2877]]= mxUtils[_0x1bfe[885]](this,function(){null!= this[_0x1bfe[3082]]&& this[_0x1bfe[3082]][_0x1bfe[1050]](!0)}),this[_0x1bfe[3061]][_0x1bfe[1179]][_0x1bfe[169]](mxEvent.DOUBLE_CLICK,this[_0x1bfe[2877]]),this[_0x1bfe[3061]][_0x1bfe[169]](mxEvent.ESCAPE,this[_0x1bfe[2877]]))};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[1025]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=mxUtils[_0x1bfe[885]](this,function(){null!= _0x47f2x4&& 0< _0x47f2x4[_0x1bfe[67]]&& this[_0x1bfe[3061]][_0x1bfe[350]](_0x47f2x4)});return this[_0x1bfe[3082]][_0x1bfe[1025]](_0x47f2x2,_0x47f2x3,_0x47f2x9,_0x47f2x5)};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[1051]]= function(_0x47f2x2){_0x47f2x2= _0x47f2x2|| mxClient[_0x1bfe[88]]+ _0x1bfe[3084];this[_0x1bfe[3082]][_0x1bfe[1051]](_0x47f2x2)};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[970]]= function(){return this[_0x1bfe[3082]][_0x1bfe[970]]()};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[1038]]= function(_0x47f2x2){return this[_0x1bfe[3082]][_0x1bfe[1038]](_0x47f2x2)};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[3085]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[3061]][_0x1bfe[350]](_0x47f2x4)});this[_0x1bfe[972]](_0x47f2x2,_0x47f2x3,_0x47f2x5)};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[972]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return this[_0x1bfe[3082]][_0x1bfe[972]](_0x47f2x2,_0x47f2x3,_0x47f2x4)};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[1048]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){var _0x47f2xa=mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[3061]][_0x1bfe[3086]](_0x47f2x4);null!= _0x47f2x9&& _0x47f2x9(this[_0x1bfe[3061]])});return this[_0x1bfe[3082]][_0x1bfe[1042]](_0x47f2x2,_0x47f2x3,_0x47f2xa,_0x47f2x5)};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[3087]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9,_0x47f2xa){var _0x47f2x12=function(){return _0x1bfe[279]== typeof _0x47f2x4?_0x47f2x4():null!= _0x47f2x4?_0x47f2x4[_0x1bfe[238]]():null},_0x47f2x13=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){_0x1bfe[279]== typeof _0x47f2x9?_0x47f2x9(this[_0x1bfe[3061]],_0x47f2x12(),_0x47f2x2,_0x47f2x3):this[_0x1bfe[1008]](_0x47f2x12(),_0x47f2x2,_0x47f2x3);this[_0x1bfe[3082]][_0x1bfe[1050]]();mxEvent[_0x1bfe[722]](_0x47f2x2)});_0x47f2x2= this[_0x1bfe[3082]][_0x1bfe[1048]](_0x47f2x2,_0x47f2x3,_0x47f2x13,_0x47f2x5,null,_0x47f2xa);this[_0x1bfe[3088]](_0x47f2x2,function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x13(_0x47f2x3,_0x47f2x4)});return _0x47f2x2};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[1008]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[3061]][_0x1bfe[1179]],_0x47f2x9=_0x47f2x5[_0x1bfe[502]]();if(null== _0x47f2x4|| _0x47f2x9[_0x1bfe[250]](_0x47f2x4)|| !this[_0x1bfe[2804]]|| !_0x47f2x5[_0x1bfe[2565]](_0x47f2x4)){for(;null!= _0x47f2x4&& !_0x47f2x5[_0x1bfe[2685]](_0x47f2x4,[_0x47f2x2],_0x47f2x3);){_0x47f2x4= _0x47f2x9[_0x1bfe[1197]](_0x47f2x4)};this[_0x1bfe[1937]](_0x47f2x2,_0x47f2x3,_0x47f2x4)}else {this[_0x1bfe[807]](_0x47f2x2,_0x47f2x3,_0x47f2x4)}};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[1937]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[3061]][_0x1bfe[1179]];if(_0x47f2x5[_0x1bfe[2621]](_0x47f2x2)){var _0x47f2x9=mxEvent[_0x1bfe[731]](_0x47f2x3),_0x47f2xa=mxEvent[_0x1bfe[733]](_0x47f2x3),_0x47f2x9=mxUtils[_0x1bfe[2196]](_0x47f2x5[_0x1bfe[526]],_0x47f2x9,_0x47f2xa);return _0x47f2x5[_0x1bfe[2655]]()&& _0x47f2x5[_0x1bfe[2686]](_0x47f2x4,[_0x47f2x2],_0x47f2x3)?_0x47f2x5[_0x1bfe[853]](_0x47f2x4,[_0x47f2x2],null,_0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]]):this[_0x1bfe[3061]][_0x1bfe[817]](_0x47f2x4,_0x47f2x2,_0x47f2x9[_0x1bfe[235]],_0x47f2x9[_0x1bfe[236]])};return null};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[807]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= this[_0x1bfe[3061]][_0x1bfe[1179]];var _0x47f2x5=_0x47f2x3[_0x1bfe[502]]();if(null!= _0x47f2x4&& _0x47f2x3[_0x1bfe[2565]](_0x47f2x2)&& _0x47f2x3[_0x1bfe[2581]](null,_0x47f2x4,_0x47f2x2)){var _0x47f2x9=null;_0x47f2x5[_0x1bfe[473]]();try{var _0x47f2xa=_0x47f2x5[_0x1bfe[1721]](_0x47f2x4),_0x47f2x12=_0x47f2x5[_0x1bfe[1721]](_0x47f2x2)[_0x1bfe[238]]();_0x47f2x12[_0x1bfe[235]]= _0x47f2xa[_0x1bfe[235]]+ (_0x47f2xa[_0x1bfe[117]]- _0x47f2x12[_0x1bfe[117]])/ 2;_0x47f2x12[_0x1bfe[236]]= _0x47f2xa[_0x1bfe[236]]+ (_0x47f2xa[_0x1bfe[119]]- _0x47f2x12[_0x1bfe[119]])/ 2;var _0x47f2x13=this[_0x1bfe[657]]* _0x47f2x3[_0x1bfe[1020]],_0x47f2x14=20* _0x47f2x5[_0x1bfe[1962]](_0x47f2x4,!0);this[_0x1bfe[3061]][_0x1bfe[3089]]?_0x47f2x12[_0x1bfe[235]]+= (_0x47f2x12[_0x1bfe[117]]+ _0x47f2xa[_0x1bfe[117]])/ 2+ _0x47f2x13+ _0x47f2x14:_0x47f2x12[_0x1bfe[236]]+= (_0x47f2x12[_0x1bfe[119]]+ _0x47f2xa[_0x1bfe[119]])/ 2+ _0x47f2x13+ _0x47f2x14;_0x47f2x2[_0x1bfe[1724]](_0x47f2x12);var _0x47f2x15=_0x47f2x5[_0x1bfe[1197]](_0x47f2x4);_0x47f2x3[_0x1bfe[2103]](_0x47f2x2,_0x47f2x15);_0x47f2x3[_0x1bfe[2509]](_0x47f2x2);_0x47f2x9= this[_0x1bfe[3061]][_0x1bfe[2503]](_0x47f2x4,_0x47f2x2);if(null== _0x47f2x5[_0x1bfe[1721]](_0x47f2x9)){var _0x47f2x16= new mxGeometry;_0x47f2x16[_0x1bfe[1500]]= !0;_0x47f2x5[_0x1bfe[1724]](_0x47f2x9,_0x47f2x16)};_0x47f2x3[_0x1bfe[2504]](_0x47f2x9,_0x47f2x15,_0x47f2x4,_0x47f2x2)}finally{_0x47f2x5[_0x1bfe[476]]()};_0x47f2x3[_0x1bfe[904]]([_0x47f2x2,_0x47f2x9]);_0x47f2x3[_0x1bfe[2564]](_0x47f2x2)}};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[3088]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=document[_0x1bfe[55]](_0x1bfe[466]);_0x47f2x4[_0x1bfe[57]](_0x1bfe[390],_0x47f2x2[_0x1bfe[284]](_0x1bfe[390]));var _0x47f2x5=mxUtils[_0x1bfe[885]](this,function(_0x47f2x9){_0x47f2x4[_0x1bfe[124]][_0x1bfe[117]]= 2* _0x47f2x2[_0x1bfe[359]]+ _0x1bfe[168];_0x47f2x4[_0x1bfe[124]][_0x1bfe[119]]= 2* _0x47f2x2[_0x1bfe[167]]+ _0x1bfe[168];mxUtils[_0x1bfe[3090]](_0x47f2x2,this[_0x1bfe[3061]][_0x1bfe[1179]],_0x47f2x3,_0x47f2x4);mxEvent[_0x1bfe[745]](_0x47f2x4,_0x1bfe[219],_0x47f2x5)});mxClient[_0x1bfe[80]]?_0x47f2x5():mxEvent[_0x1bfe[169]](_0x47f2x4,_0x1bfe[219],_0x47f2x5)};mxDefaultToolbar[_0x1bfe[202]][_0x1bfe[515]]= function(){null!= this[_0x1bfe[2877]]&& (this[_0x1bfe[3061]][_0x1bfe[1179]][_0x1bfe[745]](_0x1bfe[760],this[_0x1bfe[2877]]),this[_0x1bfe[3061]][_0x1bfe[745]](_0x1bfe[859],this[_0x1bfe[2877]]),this[_0x1bfe[2877]]= null);null!= this[_0x1bfe[3082]]&& (this[_0x1bfe[3082]][_0x1bfe[515]](),this[_0x1bfe[3082]]= null)};function mxEditor(_0x47f2x2){this[_0x1bfe[3091]]= [];this[_0x1bfe[3092]]();if(null!= document[_0x1bfe[112]]){this[_0x1bfe[3093]]= [];this[_0x1bfe[3094]]= new mxDefaultPopupMenu;this[_0x1bfe[3095]]= new mxUndoManager;this[_0x1bfe[1179]]= this[_0x1bfe[3096]]();this[_0x1bfe[3082]]= this[_0x1bfe[3097]]();this[_0x1bfe[3098]]= new mxDefaultKeyHandler(this);this[_0x1bfe[3099]](_0x47f2x2);this[_0x1bfe[1179]][_0x1bfe[2180]]= this[_0x1bfe[3100]];!mxClient[_0x1bfe[3101]]&& null!= this[_0x1bfe[1056]]&& (this[_0x1bfe[812]]= this[_0x1bfe[3102]]());if(null!= this[_0x1bfe[1987]]){this[_0x1bfe[1987]]()};mxClient[_0x1bfe[80]]&& mxEvent[_0x1bfe[169]](window,_0x1bfe[2428],mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[515]]()}))}}mxLoadResources&& mxResources[_0x1bfe[99]](mxClient[_0x1bfe[86]]+ _0x1bfe[3103]);mxEditor[_0x1bfe[202]]= new mxEventSource;mxEditor[_0x1bfe[202]][_0x1bfe[196]]= mxEditor;mxEditor[_0x1bfe[202]][_0x1bfe[3104]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[3105]:_0x1bfe[110];mxEditor[_0x1bfe[202]][_0x1bfe[3106]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[3107]:_0x1bfe[110];mxEditor[_0x1bfe[202]][_0x1bfe[3108]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[3109]:_0x1bfe[110];mxEditor[_0x1bfe[202]][_0x1bfe[3110]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[716]:_0x1bfe[110];mxEditor[_0x1bfe[202]][_0x1bfe[3111]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[3112]:_0x1bfe[110];mxEditor[_0x1bfe[202]][_0x1bfe[3113]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[2719]:_0x1bfe[110];mxEditor[_0x1bfe[202]][_0x1bfe[3114]]= _0x1bfe[130]!= mxClient[_0x1bfe[90]]?_0x1bfe[2136]:_0x1bfe[110];mxEditor[_0x1bfe[202]][_0x1bfe[2136]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[1179]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[2720]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3082]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[812]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[879]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3094]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3095]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3098]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3091]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3115]]= _0x1bfe[1061];mxEditor[_0x1bfe[202]][_0x1bfe[3116]]= !1;mxEditor[_0x1bfe[202]][_0x1bfe[1157]]= !0;mxEditor[_0x1bfe[202]][_0x1bfe[3083]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3117]]= !1;mxEditor[_0x1bfe[202]][_0x1bfe[3118]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[2075]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3119]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3120]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3121]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3122]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[1069]]= _0x1bfe[336];mxEditor[_0x1bfe[202]][_0x1bfe[3123]]= _0x1bfe[338];mxEditor[_0x1bfe[202]][_0x1bfe[1070]]= !0;mxEditor[_0x1bfe[202]][_0x1bfe[3124]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3125]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[1056]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[1058]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[1057]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3089]]= !1;mxEditor[_0x1bfe[202]][_0x1bfe[3126]]= !1;mxEditor[_0x1bfe[202]][_0x1bfe[3127]]= 0;mxEditor[_0x1bfe[202]][_0x1bfe[3128]]= !1;mxEditor[_0x1bfe[202]][_0x1bfe[3129]]= !1;mxEditor[_0x1bfe[202]][_0x1bfe[3093]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3130]]= 0;mxEditor[_0x1bfe[202]][_0x1bfe[3100]]= _0x1bfe[604];mxEditor[_0x1bfe[202]][_0x1bfe[3112]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3131]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3132]]= 20;mxEditor[_0x1bfe[202]][_0x1bfe[2719]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3133]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3134]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3135]]= 300;mxEditor[_0x1bfe[202]][_0x1bfe[3136]]= 260;mxEditor[_0x1bfe[202]][_0x1bfe[3137]]= 240;mxEditor[_0x1bfe[202]][_0x1bfe[3138]]= null;mxEditor[_0x1bfe[202]][_0x1bfe[3139]]= !1;mxEditor[_0x1bfe[202]][_0x1bfe[3140]]= !1;mxEditor[_0x1bfe[202]][_0x1bfe[2113]]= !1;mxEditor[_0x1bfe[202]][_0x1bfe[2133]]= function(){return this[_0x1bfe[2113]]};mxEditor[_0x1bfe[202]][_0x1bfe[2128]]= function(_0x47f2x2){this[_0x1bfe[2113]]= _0x47f2x2};mxEditor[_0x1bfe[202]][_0x1bfe[3092]]= function(){this[_0x1bfe[3071]](_0x1bfe[815],function(_0x47f2x2){_0x47f2x2[_0x1bfe[815]]()});this[_0x1bfe[3071]](_0x1bfe[540],function(_0x47f2x2){( new mxPrintPreview(_0x47f2x2[_0x1bfe[1179]],1))[_0x1bfe[392]]()});this[_0x1bfe[3071]](_0x1bfe[539],function(_0x47f2x2){mxUtils[_0x1bfe[539]](_0x47f2x2[_0x1bfe[1179]],null,10,10)});this[_0x1bfe[3071]](_0x1bfe[3141],function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[3142]]();if(null== _0x47f2x3|| mxClient[_0x1bfe[3101]]){_0x47f2x2[_0x1bfe[350]](_0x1bfe[539])}else {var _0x47f2x4=mxUtils[_0x1bfe[3143]](_0x47f2x2[_0x1bfe[1179]],1),_0x47f2x4=mxUtils[_0x1bfe[875]](_0x47f2x4,_0x1bfe[192]);mxUtils[_0x1bfe[894]](_0x47f2x3,_0x47f2x2[_0x1bfe[3123]]+ _0x1bfe[226]+ encodeURIComponent(_0x47f2x4),document,_0x1bfe[3144])}});this[_0x1bfe[3071]](_0x1bfe[802],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[802]]()});this[_0x1bfe[3071]](_0x1bfe[3145],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& mxClipboard[_0x1bfe[3145]](_0x47f2x2[_0x1bfe[1179]])});this[_0x1bfe[3071]](_0x1bfe[149],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& mxClipboard[_0x1bfe[149]](_0x47f2x2[_0x1bfe[1179]])});this[_0x1bfe[3071]](_0x1bfe[3146],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& mxClipboard[_0x1bfe[3146]](_0x47f2x2[_0x1bfe[1179]])});this[_0x1bfe[3071]](_0x1bfe[3147],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[842]]()});this[_0x1bfe[3071]](_0x1bfe[1504],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2450]](_0x47f2x2[_0x1bfe[844]]())});this[_0x1bfe[3071]](_0x1bfe[3148],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[904]](_0x47f2x2[_0x1bfe[1179]][_0x1bfe[845]]())});this[_0x1bfe[3071]](_0x1bfe[1997],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[846]]()});this[_0x1bfe[3071]](_0x1bfe[824],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[824]]()});this[_0x1bfe[3071]](_0x1bfe[825],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[825]]()});this[_0x1bfe[3071]](_0x1bfe[2558],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[2558]]()});this[_0x1bfe[3071]](_0x1bfe[2559],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[2559]]()});this[_0x1bfe[3071]](_0x1bfe[3149],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[2560]]()});this[_0x1bfe[3071]](_0x1bfe[933],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[933]]()});this[_0x1bfe[3071]](_0x1bfe[3150],function(_0x47f2x2,_0x47f2x3){_0x47f2x2[_0x1bfe[3150]](_0x47f2x3)});this[_0x1bfe[3071]](_0x1bfe[2705],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2705]]()});this[_0x1bfe[3071]](_0x1bfe[3151],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2440]]()});this[_0x1bfe[3071]](_0x1bfe[2706],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2706]]()});this[_0x1bfe[3071]](_0x1bfe[2708],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2708]]()});this[_0x1bfe[3071]](_0x1bfe[1061],function(_0x47f2x2,_0x47f2x3){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2453]](_0x47f2x3)&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2451]](_0x47f2x3)});this[_0x1bfe[3071]](_0x1bfe[3152],function(_0x47f2x2,_0x47f2x3){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[840]](!0)});this[_0x1bfe[3071]](_0x1bfe[3153],function(_0x47f2x2,_0x47f2x3){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[840]](!1)});this[_0x1bfe[3071]](_0x1bfe[2552],function(_0x47f2x2,_0x47f2x3){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[2552]](_0x47f2x3)});this[_0x1bfe[3071]](_0x1bfe[2554],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[2554]]()});this[_0x1bfe[3071]](_0x1bfe[2442],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[2442]]()});this[_0x1bfe[3071]](_0x1bfe[3154],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2702]]()});this[_0x1bfe[3071]](_0x1bfe[3155],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2700]]()});this[_0x1bfe[3071]](_0x1bfe[3156],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2703]]()});this[_0x1bfe[3071]](_0x1bfe[3157],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2704]]()});this[_0x1bfe[3071]](_0x1bfe[2514],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[847]](!0)});this[_0x1bfe[3071]](_0x1bfe[3158],function(_0x47f2x2){if(_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()){var _0x47f2x3=_0x47f2x2[_0x1bfe[1179]][_0x1bfe[1728]]();_0x47f2x2[_0x1bfe[1179]][_0x1bfe[847]](!0,!1,_0x47f2x3)}});this[_0x1bfe[3071]](_0x1bfe[3159],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[847]](!1)});this[_0x1bfe[3071]](_0x1bfe[3160],function(_0x47f2x2){if(_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()){var _0x47f2x3=_0x47f2x2[_0x1bfe[1179]][_0x1bfe[1728]]();_0x47f2x2[_0x1bfe[1179]][_0x1bfe[847]](!1,!1,_0x47f2x3)}});this[_0x1bfe[3071]](_0x1bfe[1447],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_BOLD)});this[_0x1bfe[3071]](_0x1bfe[1449],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_ITALIC)});this[_0x1bfe[3071]](_0x1bfe[355],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_UNDERLINE)});this[_0x1bfe[3071]](_0x1bfe[639],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[2491]](mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_SHADOW)});this[_0x1bfe[3071]](_0x1bfe[3161],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[849]](mxConstants.ALIGN_LEFT)});this[_0x1bfe[3071]](_0x1bfe[3162],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[849]](mxConstants.ALIGN_CENTER)});this[_0x1bfe[3071]](_0x1bfe[3163],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[849]](mxConstants.ALIGN_RIGHT)});this[_0x1bfe[3071]](_0x1bfe[3164],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[849]](mxConstants.ALIGN_TOP)});this[_0x1bfe[3071]](_0x1bfe[3165],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[849]](mxConstants.ALIGN_MIDDLE)});this[_0x1bfe[3071]](_0x1bfe[3166],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[849]](mxConstants.ALIGN_BOTTOM)});this[_0x1bfe[3071]](_0x1bfe[3167],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[1717]](mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT)});this[_0x1bfe[3071]](_0x1bfe[3168],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[1717]](mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER)});this[_0x1bfe[3071]](_0x1bfe[3169],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[1717]](mxConstants.STYLE_ALIGN,mxConstants.ALIGN_RIGHT)});this[_0x1bfe[3071]](_0x1bfe[3170],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[1717]](mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP)});this[_0x1bfe[3071]](_0x1bfe[3171],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[1717]](mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)});this[_0x1bfe[3071]](_0x1bfe[3172],function(_0x47f2x2){_0x47f2x2[_0x1bfe[1179]][_0x1bfe[994]]()&& _0x47f2x2[_0x1bfe[1179]][_0x1bfe[1717]](mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_BOTTOM)});this[_0x1bfe[3071]](_0x1bfe[499],function(_0x47f2x2){var _0x47f2x3=100* _0x47f2x2[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x3=parseFloat(mxUtils[_0x1bfe[3173]](mxResources[_0x1bfe[203]](_0x47f2x2[_0x1bfe[3104]])|| _0x47f2x2[_0x1bfe[3104]],_0x47f2x3))/ 100;isNaN(_0x47f2x3)|| _0x47f2x2[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[2262]](_0x47f2x3)});this[_0x1bfe[3071]](_0x1bfe[3174],function(_0x47f2x2){null!= _0x47f2x2[_0x1bfe[3112]]?_0x47f2x2[_0x1bfe[3112]][_0x1bfe[175]](!_0x47f2x2[_0x1bfe[3112]][_0x1bfe[174]]()):_0x47f2x2[_0x1bfe[3175]]()});this[_0x1bfe[3071]](_0x1bfe[3176],function(_0x47f2x2){null!= _0x47f2x2[_0x1bfe[2719]]?_0x47f2x2[_0x1bfe[2719]][_0x1bfe[175]](!_0x47f2x2[_0x1bfe[2719]][_0x1bfe[174]]()):_0x47f2x2[_0x1bfe[3177]]()});this[_0x1bfe[3071]](_0x1bfe[3178],function(_0x47f2x2){null== _0x47f2x2[_0x1bfe[2136]]?_0x47f2x2[_0x1bfe[3179]]():_0x47f2x2[_0x1bfe[2136]][_0x1bfe[175]](!_0x47f2x2[_0x1bfe[2136]][_0x1bfe[174]]())});this[_0x1bfe[3071]](_0x1bfe[3180],function(_0x47f2x2){mxLog[_0x1bfe[175]](!mxLog[_0x1bfe[174]]())})};mxEditor[_0x1bfe[202]][_0x1bfe[3102]]= function(){var _0x47f2x2=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[746]]( new mxEventObject(mxEvent.SESSION,_0x1bfe[812],_0x47f2x2))});return this[_0x1bfe[807]](this[_0x1bfe[1056]],this[_0x1bfe[1057]],this[_0x1bfe[1058]],_0x47f2x2)};mxEditor[_0x1bfe[202]][_0x1bfe[3099]]= function(_0x47f2x2){null!= _0x47f2x2&& (( new mxCodec(_0x47f2x2[_0x1bfe[295]]))[_0x1bfe[1093]](_0x47f2x2,this),this[_0x1bfe[3181]]())};mxEditor[_0x1bfe[202]][_0x1bfe[3182]]= function(){document[_0x1bfe[3183]]= _0x1bfe[3184]};mxEditor[_0x1bfe[202]][_0x1bfe[3181]]= function(){this[_0x1bfe[1184]]= ( new Date)[_0x1bfe[178]]();this[_0x1bfe[3095]][_0x1bfe[200]]();this[_0x1bfe[1183]]= 0;this[_0x1bfe[2128]](!1)};mxEditor[_0x1bfe[202]][_0x1bfe[3071]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[3091]][_0x47f2x2]= _0x47f2x3};mxEditor[_0x1bfe[202]][_0x1bfe[350]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[3091]][_0x47f2x2];if(null!= _0x47f2x5){try{var _0x47f2x9=arguments;_0x47f2x9[0]= this;_0x47f2x5[_0x1bfe[183]](this,_0x47f2x9)}catch(f){throw mxUtils[_0x1bfe[267]](_0x1bfe[3185]+ _0x47f2x2+ _0x1bfe[3186]+ f[_0x1bfe[281]],280,!0),f}}else {mxUtils[_0x1bfe[267]](_0x1bfe[3187]+ _0x47f2x2,280,!0)}};mxEditor[_0x1bfe[202]][_0x1bfe[3188]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[3118]][_0x47f2x2]= _0x47f2x3};mxEditor[_0x1bfe[202]][_0x1bfe[3189]]= function(_0x47f2x2){return this[_0x1bfe[3118]][_0x47f2x2]};mxEditor[_0x1bfe[202]][_0x1bfe[3096]]= function(){var _0x47f2x2= new mxGraph(null,null,this[_0x1bfe[2720]]);_0x47f2x2[_0x1bfe[2673]](!0);_0x47f2x2[_0x1bfe[2674]](!0);this[_0x1bfe[3190]](_0x47f2x2);this[_0x1bfe[3191]](_0x47f2x2);this[_0x1bfe[3192]](_0x47f2x2);this[_0x1bfe[3193]](_0x47f2x2);this[_0x1bfe[3194]](_0x47f2x2);_0x47f2x2[_0x1bfe[2316]][_0x1bfe[1033]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x4,_0x47f2x5){return this[_0x1bfe[3195]](_0x47f2x2,_0x47f2x4,_0x47f2x5)});_0x47f2x2[_0x1bfe[2433]][_0x1bfe[1033]]= mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x4){return this[_0x1bfe[2503]](_0x47f2x2,_0x47f2x4)});this[_0x1bfe[3196]](_0x47f2x2);this[_0x1bfe[3197]](_0x47f2x2);return _0x47f2x2};mxEditor[_0x1bfe[202]][_0x1bfe[3196]]= function(_0x47f2x2){_0x47f2x2= new mxSwimlaneManager(_0x47f2x2,!1);_0x47f2x2[_0x1bfe[1737]]= mxUtils[_0x1bfe[885]](this,function(){return this[_0x1bfe[3089]]});_0x47f2x2[_0x1bfe[994]]= mxUtils[_0x1bfe[885]](this,function(){return this[_0x1bfe[3128]]});return _0x47f2x2};mxEditor[_0x1bfe[202]][_0x1bfe[3197]]= function(_0x47f2x2){var _0x47f2x3= new mxLayoutManager(_0x47f2x2),_0x47f2x4=this;_0x47f2x3[_0x1bfe[2754]]= function(_0x47f2x3){var _0x47f2x9=null,_0x47f2xa=_0x47f2x4[_0x1bfe[1179]][_0x1bfe[502]]();if(null!= _0x47f2xa[_0x1bfe[1197]](_0x47f2x3)){if(_0x47f2x4[_0x1bfe[3129]]&& _0x47f2x2[_0x1bfe[1730]](_0x47f2x3)){null== _0x47f2x4[_0x1bfe[3198]]&& (_0x47f2x4[_0x1bfe[3198]]= _0x47f2x4[_0x1bfe[3199]]()),_0x47f2x9= _0x47f2x4[_0x1bfe[3198]]}else {if(_0x47f2x4[_0x1bfe[3126]]&& (_0x47f2x2[_0x1bfe[2553]](_0x47f2x3)|| null== _0x47f2xa[_0x1bfe[1197]](_0x47f2xa[_0x1bfe[1197]](_0x47f2x3)))){null== _0x47f2x4[_0x1bfe[3200]]&& (_0x47f2x4[_0x1bfe[3200]]= _0x47f2x4[_0x1bfe[3201]]()),_0x47f2x9= _0x47f2x4[_0x1bfe[3200]]}}};return _0x47f2x9};return _0x47f2x3};mxEditor[_0x1bfe[202]][_0x1bfe[3202]]= function(_0x47f2x2){null== this[_0x1bfe[1179]][_0x1bfe[526]]&& (this[_0x1bfe[1179]][_0x1bfe[176]](_0x47f2x2),this[_0x1bfe[3203]]= new mxRubberband(this[_0x1bfe[1179]]),this[_0x1bfe[1157]]&& mxEvent[_0x1bfe[1157]](_0x47f2x2),mxClient[_0x1bfe[496]]&& new mxDivResizer(_0x47f2x2))};mxEditor[_0x1bfe[202]][_0x1bfe[3190]]= function(_0x47f2x2){_0x47f2x2[_0x1bfe[169]](mxEvent.DOUBLE_CLICK,mxUtils[_0x1bfe[885]](this,function(_0x47f2x3,_0x47f2x4){var _0x47f2x5=_0x47f2x4[_0x1bfe[720]](_0x1bfe[246]);null!= _0x47f2x5&& (_0x47f2x2[_0x1bfe[994]]()&& null!= this[_0x1bfe[3115]])&& (this[_0x1bfe[350]](this[_0x1bfe[3115]],_0x47f2x5),_0x47f2x4[_0x1bfe[722]]())}))};mxEditor[_0x1bfe[202]][_0x1bfe[3191]]= function(_0x47f2x2){var _0x47f2x3=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){var _0x47f2x9=_0x47f2x3[_0x1bfe[720]](_0x1bfe[1061]);this[_0x1bfe[3095]][_0x1bfe[1114]](_0x47f2x9)});_0x47f2x2[_0x1bfe[502]]()[_0x1bfe[169]](mxEvent.UNDO,_0x47f2x3);_0x47f2x2[_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.UNDO,_0x47f2x3);_0x47f2x3= function(_0x47f2x3,_0x47f2x5){var _0x47f2x9=_0x47f2x5[_0x1bfe[720]](_0x1bfe[1061])[_0x1bfe[1065]];_0x47f2x2[_0x1bfe[904]](_0x47f2x2[_0x1bfe[2436]](_0x47f2x9))};this[_0x1bfe[3095]][_0x1bfe[169]](mxEvent.UNDO,_0x47f2x3);this[_0x1bfe[3095]][_0x1bfe[169]](mxEvent.REDO,_0x47f2x3)};mxEditor[_0x1bfe[202]][_0x1bfe[3192]]= function(_0x47f2x2){var _0x47f2x3=mxUtils[_0x1bfe[885]](this,function(_0x47f2x2){this[_0x1bfe[746]]( new mxEventObject(mxEvent.ROOT))});_0x47f2x2[_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.DOWN,_0x47f2x3);_0x47f2x2[_0x1bfe[249]]()[_0x1bfe[169]](mxEvent.UP,_0x47f2x3)};mxEditor[_0x1bfe[202]][_0x1bfe[3193]]= function(_0x47f2x2){var _0x47f2x3=mxUtils[_0x1bfe[885]](this,function(_0x47f2x3,_0x47f2x5){this[_0x1bfe[2128]](!0);!0== this[_0x1bfe[3140]]&& _0x47f2x2[_0x1bfe[2585]]();for(var _0x47f2x9=_0x47f2x5[_0x1bfe[720]](_0x1bfe[1061])[_0x1bfe[1065]],_0x47f2xa=0;_0x47f2xa< _0x47f2x9[_0x1bfe[67]];_0x47f2xa++){var _0x47f2x12=_0x47f2x9[_0x47f2xa];if(_0x47f2x12 instanceof mxRootChange|| _0x47f2x12 instanceof mxValueChange&& _0x47f2x12[_0x1bfe[246]]== this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[813]]|| _0x47f2x12 instanceof mxCellAttributeChange&& _0x47f2x12[_0x1bfe[246]]== this[_0x1bfe[1179]][_0x1bfe[251]][_0x1bfe[813]]){this[_0x1bfe[746]]( new mxEventObject(mxEvent.ROOT));break}}});_0x47f2x2[_0x1bfe[502]]()[_0x1bfe[169]](mxEvent.CHANGE,_0x47f2x3)};mxEditor[_0x1bfe[202]][_0x1bfe[3194]]= function(_0x47f2x2){var _0x47f2x3=this;_0x47f2x2[_0x1bfe[1133]]({mouseDown:function(_0x47f2x2,_0x47f2x5){if(null!= _0x47f2x3[_0x1bfe[3083]]&& !_0x47f2x5[_0x1bfe[737]]()&& (_0x47f2x3[_0x1bfe[3117]]|| null== _0x47f2x5[_0x1bfe[248]]())){_0x47f2x3[_0x1bfe[1179]][_0x1bfe[2440]](),_0x47f2x3[_0x1bfe[3083]](_0x47f2x5[_0x1bfe[727]](),_0x47f2x5[_0x1bfe[736]]()),this[_0x1bfe[1142]]= !0,_0x47f2x5[_0x1bfe[722]]()}},mouseMove:function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1142]]&& _0x47f2x3[_0x1bfe[722]]()},mouseUp:function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1142]]&& (this[_0x1bfe[1142]]= !1,_0x47f2x3[_0x1bfe[722]]())}})};mxEditor[_0x1bfe[202]][_0x1bfe[3201]]= function(){var _0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[1020]],_0x47f2x3= new mxStackLayout(this[_0x1bfe[1179]],!this[_0x1bfe[3089]],this[_0x1bfe[3127]],2* _0x47f2x2,2* _0x47f2x2);_0x47f2x3[_0x1bfe[1713]]= function(_0x47f2x2){return !_0x47f2x3[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x2)};return _0x47f2x3};mxEditor[_0x1bfe[202]][_0x1bfe[3199]]= function(){return new mxCompactTreeLayout(this[_0x1bfe[1179]],this[_0x1bfe[3089]])};mxEditor[_0x1bfe[202]][_0x1bfe[3097]]= function(){return new mxDefaultToolbar(null,this)};mxEditor[_0x1bfe[202]][_0x1bfe[3204]]= function(_0x47f2x2){this[_0x1bfe[3082]][_0x1bfe[176]](_0x47f2x2);mxClient[_0x1bfe[496]]&& new mxDivResizer(_0x47f2x2)};mxEditor[_0x1bfe[202]][_0x1bfe[3205]]= function(_0x47f2x2){null== this[_0x1bfe[879]]&& (this[_0x1bfe[879]]= _0x47f2x2,this[_0x1bfe[169]](mxEvent.SAVE,mxUtils[_0x1bfe[885]](this,function(){var _0x47f2x2=( new Date)[_0x1bfe[3206]]();this[_0x1bfe[3207]]((mxResources[_0x1bfe[203]](this[_0x1bfe[3106]])|| this[_0x1bfe[3106]])+ _0x1bfe[3186]+ _0x47f2x2)})),this[_0x1bfe[169]](mxEvent.OPEN,mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[3207]]((mxResources[_0x1bfe[203]](this[_0x1bfe[3108]])|| this[_0x1bfe[3108]])+ _0x1bfe[3186]+ this[_0x1bfe[3122]])})),mxClient[_0x1bfe[496]]&& new mxDivResizer(_0x47f2x2))};mxEditor[_0x1bfe[202]][_0x1bfe[3207]]= function(_0x47f2x2){null!= this[_0x1bfe[879]]&& null!= _0x47f2x2&& (this[_0x1bfe[879]][_0x1bfe[339]]= _0x47f2x2)};mxEditor[_0x1bfe[202]][_0x1bfe[3208]]= function(_0x47f2x2){this[_0x1bfe[169]](mxEvent.ROOT,mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){_0x47f2x2[_0x1bfe[339]]= this[_0x1bfe[3209]]()}));mxClient[_0x1bfe[496]]&& new mxDivResizer(_0x47f2x2)};mxEditor[_0x1bfe[202]][_0x1bfe[3210]]= function(_0x47f2x2,_0x47f2x3){null!= _0x47f2x2&& ( new mxCompactTreeLayout(this[_0x1bfe[1179]],_0x47f2x3))[_0x1bfe[350]](_0x47f2x2)};mxEditor[_0x1bfe[202]][_0x1bfe[3209]]= function(){for(var _0x47f2x2=_0x1bfe[110],_0x47f2x3=this[_0x1bfe[1179]],_0x47f2x4=_0x47f2x3[_0x1bfe[2534]]();null!= _0x47f2x4&& null!= _0x47f2x3[_0x1bfe[502]]()[_0x1bfe[1197]](_0x47f2x3[_0x1bfe[502]]()[_0x1bfe[1197]](_0x47f2x4));){_0x47f2x3[_0x1bfe[2553]](_0x47f2x4)&& (_0x47f2x2= _0x1bfe[3211]+ _0x47f2x3[_0x1bfe[2454]](_0x47f2x4)+ _0x47f2x2),_0x47f2x4= _0x47f2x3[_0x1bfe[502]]()[_0x1bfe[1197]](_0x47f2x4)};return this[_0x1bfe[3212]]()+ _0x47f2x2};mxEditor[_0x1bfe[202]][_0x1bfe[3212]]= function(){var _0x47f2x2=this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[501]]();return this[_0x1bfe[1179]][_0x1bfe[2454]](_0x47f2x2)};mxEditor[_0x1bfe[202]][_0x1bfe[824]]= function(){this[_0x1bfe[3095]][_0x1bfe[824]]()};mxEditor[_0x1bfe[202]][_0x1bfe[825]]= function(){this[_0x1bfe[3095]][_0x1bfe[825]]()};mxEditor[_0x1bfe[202]][_0x1bfe[844]]= function(){var _0x47f2x2=null!= this[_0x1bfe[3121]]?this[_0x1bfe[3121]]:this[_0x1bfe[1179]][_0x1bfe[1020]];return this[_0x1bfe[1179]][_0x1bfe[844]](this[_0x1bfe[3213]](),_0x47f2x2)};mxEditor[_0x1bfe[202]][_0x1bfe[3213]]= function(){return this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1978]](this[_0x1bfe[3120]])};mxEditor[_0x1bfe[202]][_0x1bfe[392]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=mxUtils[_0x1bfe[219]](_0x47f2x2)[_0x1bfe[875]]();this[_0x1bfe[3214]](_0x47f2x3[_0x1bfe[158]]);this[_0x1bfe[3122]]= _0x47f2x2;this[_0x1bfe[746]]( new mxEventObject(mxEvent.OPEN,_0x1bfe[3122],_0x47f2x2))}};mxEditor[_0x1bfe[202]][_0x1bfe[3214]]= function(_0x47f2x2){( new mxCodec(_0x47f2x2[_0x1bfe[295]]))[_0x1bfe[1093]](_0x47f2x2,this[_0x1bfe[1179]][_0x1bfe[502]]());this[_0x1bfe[3181]]()};mxEditor[_0x1bfe[202]][_0x1bfe[815]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x2= _0x47f2x2|| this[_0x1bfe[3215]]();if(null!= _0x47f2x2&& 0< _0x47f2x2[_0x1bfe[67]]){var _0x47f2x4=this[_0x1bfe[3216]](_0x47f2x3);this[_0x1bfe[3217]](_0x47f2x2,_0x47f2x4);this[_0x1bfe[2128]](!1)};this[_0x1bfe[746]]( new mxEventObject(mxEvent.SAVE,_0x1bfe[863],_0x47f2x2))};mxEditor[_0x1bfe[202]][_0x1bfe[3217]]= function(_0x47f2x2,_0x47f2x3){this[_0x1bfe[1070]]&& (_0x47f2x3= encodeURIComponent(_0x47f2x3));mxUtils[_0x1bfe[814]](_0x47f2x2,this[_0x1bfe[3123]]+ _0x1bfe[226]+ _0x47f2x3,mxUtils[_0x1bfe[885]](this,function(_0x47f2x4){this[_0x1bfe[746]]( new mxEventObject(mxEvent.POST,_0x1bfe[870],_0x47f2x4,_0x1bfe[863],_0x47f2x2,_0x1bfe[410],_0x47f2x3))}))};mxEditor[_0x1bfe[202]][_0x1bfe[3216]]= function(_0x47f2x2){_0x47f2x2= null!= _0x47f2x2?_0x47f2x2:this[_0x1bfe[1069]];var _0x47f2x3=( new mxCodec)[_0x1bfe[514]](this[_0x1bfe[1179]][_0x1bfe[502]]());return mxUtils[_0x1bfe[875]](_0x47f2x3,_0x47f2x2)};mxEditor[_0x1bfe[202]][_0x1bfe[3215]]= function(){return this[_0x1bfe[3124]]};mxEditor[_0x1bfe[202]][_0x1bfe[3142]]= function(){return this[_0x1bfe[3125]]};mxEditor[_0x1bfe[202]][_0x1bfe[807]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){var _0x47f2x9=null;mxClient[_0x1bfe[3101]]|| (_0x47f2x9= new mxSession(this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x2,_0x47f2x3,_0x47f2x4),_0x47f2x9[_0x1bfe[169]](mxEvent.RECEIVE,mxUtils[_0x1bfe[885]](this,function(_0x47f2x2,_0x47f2x3){null!= _0x47f2x3[_0x1bfe[720]](_0x1bfe[252])[_0x1bfe[284]](_0x1bfe[1088])&& this[_0x1bfe[3181]]()})),_0x47f2x9[_0x1bfe[169]](mxEvent.DISCONNECT,_0x47f2x5),_0x47f2x9[_0x1bfe[169]](mxEvent.CONNECT,_0x47f2x5),_0x47f2x9[_0x1bfe[169]](mxEvent.NOTIFY,_0x47f2x5),_0x47f2x9[_0x1bfe[169]](mxEvent.GET,_0x47f2x5),_0x47f2x9[_0x1bfe[861]]());return _0x47f2x9};mxEditor[_0x1bfe[202]][_0x1bfe[3218]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=this[_0x1bfe[1179]][_0x1bfe[2434]]()[_0x1bfe[2054]][_0x47f2x3];this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[2434]]()[_0x1bfe[2074]](_0x47f2x3,this[_0x1bfe[1179]][_0x1bfe[2434]]()[_0x1bfe[2054]][_0x47f2x2]);this[_0x1bfe[1179]][_0x1bfe[2434]]()[_0x1bfe[2074]](_0x47f2x2,_0x47f2x4);this[_0x1bfe[1179]][_0x1bfe[802]]()};mxEditor[_0x1bfe[202]][_0x1bfe[3150]]= function(_0x47f2x2){_0x47f2x2= _0x47f2x2|| this[_0x1bfe[1179]][_0x1bfe[2452]]();null== _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[2534]](),null== _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[501]]()));if(null!= _0x47f2x2){this[_0x1bfe[1179]][_0x1bfe[2126]](!0);var _0x47f2x3=mxUtils[_0x1bfe[445]](this[_0x1bfe[1179]][_0x1bfe[526]]),_0x47f2x4=_0x47f2x3[_0x1bfe[235]]+ 10,_0x47f2x3=_0x47f2x3[_0x1bfe[236]];if(null!= this[_0x1bfe[716]]&& !this[_0x1bfe[3139]]){_0x47f2x4= this[_0x1bfe[716]][_0x1bfe[730]](),_0x47f2x3= this[_0x1bfe[716]][_0x1bfe[732]]()}else {var _0x47f2x5=this[_0x1bfe[1179]][_0x1bfe[2555]](_0x47f2x2);null!= _0x47f2x5&& (_0x47f2x4+= _0x47f2x5[_0x1bfe[235]]+ Math[_0x1bfe[243]](200,_0x47f2x5[_0x1bfe[117]]),_0x47f2x3+= _0x47f2x5[_0x1bfe[236]])};this[_0x1bfe[3062]]();_0x47f2x2= this[_0x1bfe[3219]](_0x47f2x2);null!= _0x47f2x2&& (this[_0x1bfe[716]]= new mxWindow(mxResources[_0x1bfe[203]](this[_0x1bfe[3110]])|| this[_0x1bfe[3110]],_0x47f2x2,_0x47f2x4,_0x47f2x3,this[_0x1bfe[3137]],this[_0x1bfe[3138]],!1),this[_0x1bfe[716]][_0x1bfe[175]](!0))}};mxEditor[_0x1bfe[202]][_0x1bfe[3220]]= function(){return null!= this[_0x1bfe[716]]};mxEditor[_0x1bfe[202]][_0x1bfe[3219]]= function(_0x47f2x2){var _0x47f2x3=this[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2x4=_0x47f2x3[_0x1bfe[433]](_0x47f2x2);if(mxUtils[_0x1bfe[1331]](_0x47f2x4)){var _0x47f2x5= new mxForm(_0x1bfe[716]);_0x47f2x5[_0x1bfe[961]](_0x1bfe[3222],_0x47f2x2[_0x1bfe[1103]]())[_0x1bfe[57]](_0x1bfe[3221],_0x1bfe[128]);var _0x47f2x9=null,_0x47f2xa=null,_0x47f2x12=null,_0x47f2x13=null,_0x47f2x14=null;_0x47f2x3[_0x1bfe[1193]](_0x47f2x2)&& (_0x47f2x9= _0x47f2x3[_0x1bfe[1721]](_0x47f2x2),null!= _0x47f2x9&& (_0x47f2xa= _0x47f2x5[_0x1bfe[961]](_0x1bfe[125],_0x47f2x9[_0x1bfe[236]]),_0x47f2x12= _0x47f2x5[_0x1bfe[961]](_0x1bfe[361],_0x47f2x9[_0x1bfe[235]]),_0x47f2x13= _0x47f2x5[_0x1bfe[961]](_0x1bfe[117],_0x47f2x9[_0x1bfe[117]]),_0x47f2x14= _0x47f2x5[_0x1bfe[961]](_0x1bfe[119],_0x47f2x9[_0x1bfe[119]])));for(var _0x47f2x15=_0x47f2x3[_0x1bfe[474]](_0x47f2x2),_0x47f2x16=_0x47f2x5[_0x1bfe[961]](_0x1bfe[3223],_0x47f2x15|| _0x1bfe[110]),_0x47f2x17=_0x47f2x4[_0x1bfe[320]],_0x47f2x18=[],_0x47f2x4=0;_0x47f2x4< _0x47f2x17[_0x1bfe[67]];_0x47f2x4++){_0x47f2x18[_0x47f2x4]= _0x47f2x5[_0x1bfe[968]](_0x47f2x17[_0x47f2x4][_0x1bfe[301]],_0x47f2x17[_0x47f2x4][_0x1bfe[318]],_0x1bfe[685]== _0x47f2x17[_0x47f2x4][_0x1bfe[301]]?4:2)};_0x47f2x4= mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[3062]]();_0x47f2x3[_0x1bfe[473]]();try{null!= _0x47f2x9&& (_0x47f2x9= _0x47f2x9[_0x1bfe[238]](),_0x47f2x9[_0x1bfe[235]]= parseFloat(_0x47f2x12[_0x1bfe[131]]),_0x47f2x9[_0x1bfe[236]]= parseFloat(_0x47f2xa[_0x1bfe[131]]),_0x47f2x9[_0x1bfe[117]]= parseFloat(_0x47f2x13[_0x1bfe[131]]),_0x47f2x9[_0x1bfe[119]]= parseFloat(_0x47f2x14[_0x1bfe[131]]),_0x47f2x3[_0x1bfe[1724]](_0x47f2x2,_0x47f2x9));0< _0x47f2x16[_0x1bfe[131]][_0x1bfe[67]]?_0x47f2x3[_0x1bfe[475]](_0x47f2x2,_0x47f2x16[_0x1bfe[131]]):_0x47f2x3[_0x1bfe[475]](_0x47f2x2,null);for(var _0x47f2x4=0;_0x47f2x4< _0x47f2x17[_0x1bfe[67]];_0x47f2x4++){var _0x47f2x5= new mxCellAttributeChange(_0x47f2x2,_0x47f2x17[_0x47f2x4][_0x1bfe[301]],_0x47f2x18[_0x47f2x4][_0x1bfe[131]]);_0x47f2x3[_0x1bfe[350]](_0x47f2x5)};this[_0x1bfe[1179]][_0x1bfe[2455]](_0x47f2x2)&& this[_0x1bfe[1179]][_0x1bfe[858]](_0x47f2x2)}finally{_0x47f2x3[_0x1bfe[476]]()}});_0x47f2x15= mxUtils[_0x1bfe[885]](this,function(){this[_0x1bfe[3062]]()});_0x47f2x5[_0x1bfe[956]](_0x47f2x4,_0x47f2x15);return _0x47f2x5[_0x1bfe[116]]};return null};mxEditor[_0x1bfe[202]][_0x1bfe[3062]]= function(){null!= this[_0x1bfe[716]]&& (this[_0x1bfe[716]][_0x1bfe[515]](),this[_0x1bfe[716]]= null)};mxEditor[_0x1bfe[202]][_0x1bfe[3175]]= function(){if(null== this[_0x1bfe[3112]]){var _0x47f2x2=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[549]]= _0x1bfe[952];_0x47f2x2[_0x1bfe[124]][_0x1bfe[357]]= _0x1bfe[550];var _0x47f2x3=document[_0x1bfe[112]][_0x1bfe[159]],_0x47f2x3= new mxWindow(mxResources[_0x1bfe[203]](this[_0x1bfe[3111]])|| this[_0x1bfe[3111]],_0x47f2x2,_0x47f2x3- 220,this[_0x1bfe[3132]],200);_0x47f2x3[_0x1bfe[164]](!0);_0x47f2x3[_0x1bfe[165]]= !1;var _0x47f2x4=mxUtils[_0x1bfe[885]](this,function(_0x47f2x3){mxEvent[_0x1bfe[762]](_0x47f2x2);_0x47f2x2[_0x1bfe[339]]= _0x1bfe[110];this[_0x1bfe[3224]](_0x47f2x2)});this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[169]](mxEvent.CHANGE,_0x47f2x4);this[_0x1bfe[1179]][_0x1bfe[2435]]()[_0x1bfe[169]](mxEvent.CHANGE,_0x47f2x4);this[_0x1bfe[1179]][_0x1bfe[169]](mxEvent.ROOT,_0x47f2x4);null!= this[_0x1bfe[3131]]&& _0x47f2x3[_0x1bfe[951]](this[_0x1bfe[3131]]);this[_0x1bfe[3112]]= _0x47f2x3;this[_0x1bfe[3224]](_0x47f2x2)};this[_0x1bfe[3112]][_0x1bfe[175]](!0)};mxEditor[_0x1bfe[202]][_0x1bfe[3225]]= function(_0x47f2x2){null!= this[_0x1bfe[3112]]&& (_0x47f2x2= this[_0x1bfe[3112]][_0x1bfe[905]],mxEvent[_0x1bfe[762]](_0x47f2x2),_0x47f2x2[_0x1bfe[339]]= _0x1bfe[110],this[_0x1bfe[3224]](_0x47f2x2))};mxEditor[_0x1bfe[202]][_0x1bfe[3224]]= function(_0x47f2x2){};mxEditor[_0x1bfe[202]][_0x1bfe[3177]]= function(_0x47f2x2){if(null== this[_0x1bfe[2719]]){var _0x47f2x3=document[_0x1bfe[55]](_0x1bfe[389]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[390],mxResources[_0x1bfe[203]](_0x1bfe[3134])|| this[_0x1bfe[3134]]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[119],_0x1bfe[118]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[117],_0x1bfe[118]);_0x47f2x3[_0x1bfe[57]](_0x1bfe[3226],_0x1bfe[468]);_0x47f2x3[_0x1bfe[124]][_0x1bfe[1028]]= _0x1bfe[1391];_0x47f2x2= document[_0x1bfe[112]][_0x1bfe[159]];var _0x47f2x4=document[_0x1bfe[112]][_0x1bfe[157]]|| document[_0x1bfe[158]][_0x1bfe[157]],_0x47f2x5= new mxWindow(mxResources[_0x1bfe[203]](this[_0x1bfe[3113]])|| this[_0x1bfe[3113]],_0x47f2x3,(_0x47f2x2- this[_0x1bfe[3135]])/ 2,(_0x47f2x4- this[_0x1bfe[3136]])/ 3,this[_0x1bfe[3135]],this[_0x1bfe[3136]]);_0x47f2x5[_0x1bfe[161]](!0);_0x47f2x5[_0x1bfe[164]](!0);_0x47f2x5[_0x1bfe[165]]= !1;_0x47f2x5[_0x1bfe[163]](!0);null!= this[_0x1bfe[3133]]&& _0x47f2x5[_0x1bfe[951]](this[_0x1bfe[3133]]);mxClient[_0x1bfe[133]]&& (_0x47f2x2= function(_0x47f2x2){_0x47f2x3[_0x1bfe[57]](_0x1bfe[119],_0x47f2x5[_0x1bfe[485]][_0x1bfe[167]]- 26+ _0x1bfe[168])},_0x47f2x5[_0x1bfe[169]](mxEvent.RESIZE_END,_0x47f2x2),_0x47f2x5[_0x1bfe[169]](mxEvent.MAXIMIZE,_0x47f2x2),_0x47f2x5[_0x1bfe[169]](mxEvent.NORMALIZE,_0x47f2x2),_0x47f2x5[_0x1bfe[169]](mxEvent.SHOW,_0x47f2x2));this[_0x1bfe[2719]]= _0x47f2x5};this[_0x1bfe[2719]][_0x1bfe[175]](!0)};mxEditor[_0x1bfe[202]][_0x1bfe[3179]]= function(){if(null== this[_0x1bfe[2136]]){var _0x47f2x2=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x2[_0x1bfe[124]][_0x1bfe[277]]= _0x1bfe[188];_0x47f2x2[_0x1bfe[124]][_0x1bfe[117]]= _0x1bfe[118];_0x47f2x2[_0x1bfe[124]][_0x1bfe[119]]= _0x1bfe[118];_0x47f2x2[_0x1bfe[124]][_0x1bfe[1537]]= _0x1bfe[1391];_0x47f2x2[_0x1bfe[124]][_0x1bfe[270]]= _0x1bfe[582];var _0x47f2x3= new mxWindow(mxResources[_0x1bfe[203]](this[_0x1bfe[3114]])|| this[_0x1bfe[3114]],_0x47f2x2,600,480,200,200,!1),_0x47f2x4= new mxOutline(this[_0x1bfe[1179]],_0x47f2x2);_0x47f2x3[_0x1bfe[164]](!0);_0x47f2x3[_0x1bfe[163]](!0);_0x47f2x3[_0x1bfe[165]]= !1;_0x47f2x3[_0x1bfe[169]](mxEvent.RESIZE_END,function(){_0x47f2x4[_0x1bfe[2729]]()});this[_0x1bfe[2136]]= _0x47f2x3;this[_0x1bfe[2136]][_0x1bfe[2136]]= _0x47f2x4};this[_0x1bfe[2136]][_0x1bfe[175]](!0);this[_0x1bfe[2136]][_0x1bfe[2136]][_0x1bfe[2729]](!0)};mxEditor[_0x1bfe[202]][_0x1bfe[3086]]= function(_0x47f2x2){_0x1bfe[804]== _0x47f2x2?(this[_0x1bfe[1179]][_0x1bfe[2316]][_0x1bfe[2840]]= !1,this[_0x1bfe[1179]][_0x1bfe[1995]](!1)):_0x1bfe[807]== _0x47f2x2?(this[_0x1bfe[1179]][_0x1bfe[2316]][_0x1bfe[2840]]= !1,this[_0x1bfe[1179]][_0x1bfe[1995]](!0)):_0x1bfe[796]== _0x47f2x2&& (this[_0x1bfe[1179]][_0x1bfe[2316]][_0x1bfe[2840]]= !0,this[_0x1bfe[1179]][_0x1bfe[1995]](!1))};mxEditor[_0x1bfe[202]][_0x1bfe[3195]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){this[_0x1bfe[3094]][_0x1bfe[3065]](this,_0x47f2x2,_0x47f2x3,_0x47f2x4)};mxEditor[_0x1bfe[202]][_0x1bfe[2503]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=null;if(null!= this[_0x1bfe[2075]]){_0x47f2x4= this[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[1978]](this[_0x1bfe[2075]])}else {_0x47f2x4= new mxCell(_0x1bfe[110]);_0x47f2x4[_0x1bfe[1994]](!0);var _0x47f2x5= new mxGeometry;_0x47f2x5[_0x1bfe[1500]]= !0;_0x47f2x4[_0x1bfe[1724]](_0x47f2x5)};_0x47f2x5= this[_0x1bfe[2291]]();null!= _0x47f2x5&& _0x47f2x4[_0x1bfe[475]](_0x47f2x5);return _0x47f2x4};mxEditor[_0x1bfe[202]][_0x1bfe[2291]]= function(){return this[_0x1bfe[3119]]};mxEditor[_0x1bfe[202]][_0x1bfe[3227]]= function(_0x47f2x2){return null!= this[_0x1bfe[3093]]&& 0< this[_0x1bfe[3093]][_0x1bfe[67]]&& this[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x2)?this[_0x1bfe[3093]][this[_0x1bfe[3130]]++ % this[_0x1bfe[3093]][_0x1bfe[67]]]:null};mxEditor[_0x1bfe[202]][_0x1bfe[3228]]= function(_0x47f2x2){if(null!= this[_0x1bfe[3100]]){var _0x47f2x3=this[_0x1bfe[3227]](_0x47f2x2);null!= _0x47f2x3&& _0x47f2x2[_0x1bfe[475]](_0x47f2x2[_0x1bfe[474]]()+ _0x1bfe[471]+ this[_0x1bfe[3100]]+ _0x1bfe[226]+ _0x47f2x3)}};mxEditor[_0x1bfe[202]][_0x1bfe[817]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){for(var _0x47f2x9=this[_0x1bfe[1179]][_0x1bfe[502]]();null!= _0x47f2x2&& !this[_0x1bfe[1179]][_0x1bfe[2685]](_0x47f2x2);){_0x47f2x2= _0x47f2x9[_0x1bfe[1197]](_0x47f2x2)};_0x47f2x2= null!= _0x47f2x2?_0x47f2x2:this[_0x1bfe[1179]][_0x1bfe[2461]](_0x47f2x4,_0x47f2x5);var _0x47f2xa=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[255]],_0x47f2x12=_0x47f2x9[_0x1bfe[1721]](_0x47f2x3),_0x47f2x13=_0x47f2x9[_0x1bfe[1721]](_0x47f2x2);if(this[_0x1bfe[1179]][_0x1bfe[1730]](_0x47f2x3)&& !this[_0x1bfe[1179]][_0x1bfe[2412]]){_0x47f2x2= null}else {if(null== _0x47f2x2&& this[_0x1bfe[3116]]){return null};if(null!= _0x47f2x2&& null!= _0x47f2x13){var _0x47f2x14=this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[248]](_0x47f2x2);if(null!= _0x47f2x14){if(_0x47f2x4-= _0x47f2x14[_0x1bfe[2078]][_0x1bfe[235]]* _0x47f2xa,_0x47f2x5-= _0x47f2x14[_0x1bfe[2078]][_0x1bfe[236]]* _0x47f2xa,this[_0x1bfe[1179]][_0x1bfe[3229]]){var _0x47f2x13=_0x47f2x12[_0x1bfe[117]],_0x47f2x15=_0x47f2x12[_0x1bfe[119]],_0x47f2x16=_0x47f2x14[_0x1bfe[235]]+ _0x47f2x14[_0x1bfe[117]];_0x47f2x4+ _0x47f2x13> _0x47f2x16&& (_0x47f2x4-= _0x47f2x4+ _0x47f2x13- _0x47f2x16);_0x47f2x16= _0x47f2x14[_0x1bfe[236]]+ _0x47f2x14[_0x1bfe[119]];_0x47f2x5+ _0x47f2x15> _0x47f2x16&& (_0x47f2x5-= _0x47f2x5+ _0x47f2x15- _0x47f2x16)}}else {null!= _0x47f2x13&& (_0x47f2x4-= _0x47f2x13[_0x1bfe[235]]* _0x47f2xa,_0x47f2x5-= _0x47f2x13[_0x1bfe[236]]* _0x47f2xa)}}};_0x47f2x12= _0x47f2x12[_0x1bfe[238]]();_0x47f2x12[_0x1bfe[235]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x4/ _0x47f2xa- this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[513]][_0x1bfe[235]]- this[_0x1bfe[1179]][_0x1bfe[1020]]/ 2);_0x47f2x12[_0x1bfe[236]]= this[_0x1bfe[1179]][_0x1bfe[1021]](_0x47f2x5/ _0x47f2xa- this[_0x1bfe[1179]][_0x1bfe[249]]()[_0x1bfe[513]][_0x1bfe[236]]- this[_0x1bfe[1179]][_0x1bfe[1020]]/ 2);_0x47f2x3[_0x1bfe[1724]](_0x47f2x12);null== _0x47f2x2&& (_0x47f2x2= this[_0x1bfe[1179]][_0x1bfe[902]]());this[_0x1bfe[3228]](_0x47f2x3);this[_0x1bfe[746]]( new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,_0x1bfe[1988],_0x47f2x3,_0x1bfe[1101],_0x47f2x2));_0x47f2x9[_0x1bfe[473]]();try{_0x47f2x3= this[_0x1bfe[1179]][_0x1bfe[2103]](_0x47f2x3,_0x47f2x2),null!= _0x47f2x3&& (this[_0x1bfe[1179]][_0x1bfe[2509]](_0x47f2x3),this[_0x1bfe[746]]( new mxEventObject(mxEvent.ADD_VERTEX,_0x1bfe[1988],_0x47f2x3)))}finally{_0x47f2x9[_0x1bfe[476]]()};null!= _0x47f2x3&& (this[_0x1bfe[1179]][_0x1bfe[2450]](_0x47f2x3),this[_0x1bfe[1179]][_0x1bfe[2564]](_0x47f2x3),this[_0x1bfe[746]]( new mxEventObject(mxEvent.AFTER_ADD_VERTEX,_0x1bfe[1988],_0x47f2x3)));return _0x47f2x3};mxEditor[_0x1bfe[202]][_0x1bfe[515]]= function(){this[_0x1bfe[2717]]|| (this[_0x1bfe[2717]]= !0,null!= this[_0x1bfe[3112]]&& this[_0x1bfe[3112]][_0x1bfe[515]](),null!= this[_0x1bfe[2136]]&& this[_0x1bfe[2136]][_0x1bfe[515]](),null!= this[_0x1bfe[716]]&& this[_0x1bfe[716]][_0x1bfe[515]](),null!= this[_0x1bfe[3098]]&& this[_0x1bfe[3098]][_0x1bfe[515]](),null!= this[_0x1bfe[3203]]&& this[_0x1bfe[3203]][_0x1bfe[515]](),null!= this[_0x1bfe[3082]]&& this[_0x1bfe[3082]][_0x1bfe[515]](),null!= this[_0x1bfe[1179]]&& this[_0x1bfe[1179]][_0x1bfe[515]](),this[_0x1bfe[3118]]= this[_0x1bfe[879]]= null)};var mxCodecRegistry={codecs:[],aliases:[],register:function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[718]]();mxCodecRegistry[_0x1bfe[3230]][_0x47f2x3]= _0x47f2x2;var _0x47f2x4=mxUtils[_0x1bfe[197]](_0x47f2x2[_0x1bfe[3231]][_0x1bfe[196]]);_0x47f2x4!= _0x47f2x3&& mxCodecRegistry[_0x1bfe[3232]](_0x47f2x4,_0x47f2x3)};return _0x47f2x2},addAlias:function(_0x47f2x2,_0x47f2x3){mxCodecRegistry[_0x1bfe[3233]][_0x47f2x2]= _0x47f2x3},getCodec:function(_0x47f2x2){var _0x47f2x3=null;if(null!= _0x47f2x2){var _0x47f2x3=mxUtils[_0x1bfe[197]](_0x47f2x2),_0x47f2x4=mxCodecRegistry[_0x1bfe[3233]][_0x47f2x3];null!= _0x47f2x4&& (_0x47f2x3= _0x47f2x4);_0x47f2x3= mxCodecRegistry[_0x1bfe[3230]][_0x47f2x3];if(null== _0x47f2x3){try{_0x47f2x3= new mxObjectCodec( new _0x47f2x2),mxCodecRegistry[_0x1bfe[3234]](_0x47f2x3)}catch(d){}}};return _0x47f2x3}};function mxCodec(_0x47f2x2){this[_0x1bfe[395]]= _0x47f2x2|| mxUtils[_0x1bfe[306]]();this[_0x1bfe[68]]= []}mxCodec[_0x1bfe[202]][_0x1bfe[395]]= null;mxCodec[_0x1bfe[202]][_0x1bfe[68]]= null;mxCodec[_0x1bfe[202]][_0x1bfe[3235]]= !1;mxCodec[_0x1bfe[202]][_0x1bfe[1104]]= function(_0x47f2x2,_0x47f2x3){return this[_0x1bfe[68]][_0x47f2x2]= _0x47f2x3};mxCodec[_0x1bfe[202]][_0x1bfe[3236]]= function(_0x47f2x2){var _0x47f2x3=null;null!= _0x47f2x2&& (_0x47f2x3= this[_0x1bfe[68]][_0x47f2x2],null== _0x47f2x3&& (_0x47f2x3= this[_0x1bfe[1060]](_0x47f2x2),null== _0x47f2x3&& (_0x47f2x2= this[_0x1bfe[1362]](_0x47f2x2),null!= _0x47f2x2&& (_0x47f2x3= this[_0x1bfe[1093]](_0x47f2x2)))));return _0x47f2x3};mxCodec[_0x1bfe[202]][_0x1bfe[1060]]= function(_0x47f2x2){return null};mxCodec[_0x1bfe[202]][_0x1bfe[1362]]= function(_0x47f2x2,_0x47f2x3){return mxUtils[_0x1bfe[290]](this[_0x1bfe[395]][_0x1bfe[158]],null!= _0x47f2x3?_0x47f2x3:_0x1bfe[1363],_0x47f2x2)};mxCodec[_0x1bfe[202]][_0x1bfe[1103]]= function(_0x47f2x2){var _0x47f2x3=null;null!= _0x47f2x2&& (_0x47f2x3= this[_0x1bfe[3237]](_0x47f2x2),null== _0x47f2x3&& _0x47f2x2 instanceof mxCell&& (_0x47f2x3= _0x47f2x2[_0x1bfe[1103]](),null== _0x47f2x3&& (_0x47f2x3= mxCellPath[_0x1bfe[385]](_0x47f2x2),0== _0x47f2x3[_0x1bfe[67]]&& (_0x47f2x3= _0x1bfe[813]))));return _0x47f2x3};mxCodec[_0x1bfe[202]][_0x1bfe[3237]]= function(_0x47f2x2){return null};mxCodec[_0x1bfe[202]][_0x1bfe[514]]= function(_0x47f2x2){var _0x47f2x3=null;if(null!= _0x47f2x2&& null!= _0x47f2x2[_0x1bfe[196]]){var _0x47f2x4=mxCodecRegistry[_0x1bfe[3238]](_0x47f2x2[_0x1bfe[196]]);null!= _0x47f2x4?_0x47f2x3= _0x47f2x4[_0x1bfe[514]](this,_0x47f2x2):mxUtils[_0x1bfe[1331]](_0x47f2x2)?_0x47f2x3= mxClient[_0x1bfe[80]]?_0x47f2x2[_0x1bfe[511]](!0):this[_0x1bfe[395]][_0x1bfe[3239]](_0x47f2x2,!0):mxLog[_0x1bfe[283]](_0x1bfe[3240]+ mxUtils[_0x1bfe[197]](_0x47f2x2[_0x1bfe[196]]))};return _0x47f2x3};mxCodec[_0x1bfe[202]][_0x1bfe[1093]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=null;if(null!= _0x47f2x2&& _0x47f2x2[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]){var _0x47f2x5=null;try{_0x47f2x5= eval(_0x47f2x2[_0x1bfe[301]])}catch(e){};try{var _0x47f2xa=mxCodecRegistry[_0x1bfe[3238]](_0x47f2x5);null!= _0x47f2xa?_0x47f2x4= _0x47f2xa[_0x1bfe[1093]](this,_0x47f2x2,_0x47f2x3):(_0x47f2x4= _0x47f2x2[_0x1bfe[511]](!0),_0x47f2x4[_0x1bfe[1390]](_0x1bfe[3069]))}catch(g){mxLog[_0x1bfe[143]](_0x1bfe[3241]+ _0x47f2x2[_0x1bfe[301]]+ _0x1bfe[3186]+ g[_0x1bfe[281]])}};return _0x47f2x4};mxCodec[_0x1bfe[202]][_0x1bfe[3242]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3[_0x1bfe[62]](this[_0x1bfe[514]](_0x47f2x2));if(null== _0x47f2x4|| _0x47f2x4){_0x47f2x4= _0x47f2x2[_0x1bfe[262]]();for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x4;_0x47f2x5++){this[_0x1bfe[3242]](_0x47f2x2[_0x1bfe[263]](_0x47f2x5),_0x47f2x3)}}};mxCodec[_0x1bfe[202]][_0x1bfe[3243]]= function(_0x47f2x2){return null!= _0x47f2x2&& _0x1bfe[279]== typeof _0x47f2x2[_0x1bfe[3243]]?_0x47f2x2[_0x1bfe[3243]]():!1};mxCodec[_0x1bfe[202]][_0x1bfe[3244]]= function(_0x47f2x2,_0x47f2x3){_0x47f2x3= null!= _0x47f2x3?_0x47f2x3:!0;var _0x47f2x4=null;if(null!= _0x47f2x2&& _0x47f2x2[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]){_0x47f2x4= mxCodecRegistry[_0x1bfe[3238]](_0x47f2x2[_0x1bfe[301]]);if(!this[_0x1bfe[3243]](_0x47f2x4)){for(var _0x47f2x5=_0x47f2x2[_0x1bfe[285]];null!= _0x47f2x5&& !this[_0x1bfe[3243]](_0x47f2x4);){_0x47f2x4= mxCodecRegistry[_0x1bfe[3238]](_0x47f2x5[_0x1bfe[301]]),_0x47f2x5= _0x47f2x5[_0x1bfe[287]]}};this[_0x1bfe[3243]](_0x47f2x4)|| (_0x47f2x4= mxCodecRegistry[_0x1bfe[3238]](mxCell));_0x47f2x4= _0x47f2x4[_0x1bfe[1093]](this,_0x47f2x2);_0x47f2x3&& this[_0x1bfe[3245]](_0x47f2x4)};return _0x47f2x4};mxCodec[_0x1bfe[202]][_0x1bfe[3245]]= function(_0x47f2x2){var _0x47f2x3=_0x47f2x2[_0x1bfe[1101]],_0x47f2x4=_0x47f2x2[_0x1bfe[1709]](!0),_0x47f2x5=_0x47f2x2[_0x1bfe[1709]](!1);_0x47f2x2[_0x1bfe[1957]](null,!1);_0x47f2x2[_0x1bfe[1957]](null,!0);_0x47f2x2[_0x1bfe[1101]]= null;null!= _0x47f2x3&& _0x47f2x3[_0x1bfe[1937]](_0x47f2x2);null!= _0x47f2x4&& _0x47f2x4[_0x1bfe[1960]](_0x47f2x2,!0);null!= _0x47f2x5&& _0x47f2x5[_0x1bfe[1960]](_0x47f2x2,!1)};mxCodec[_0x1bfe[202]][_0x1bfe[57]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){null!= _0x47f2x3&& null!= _0x47f2x4&& _0x47f2x2[_0x1bfe[57]](_0x47f2x3,_0x47f2x4)};function mxObjectCodec(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){this[_0x1bfe[3231]]= _0x47f2x2;this[_0x1bfe[3246]]= null!= _0x47f2x3?_0x47f2x3:[];this[_0x1bfe[3247]]= null!= _0x47f2x4?_0x47f2x4:[];this[_0x1bfe[3248]]= null!= _0x47f2x5?_0x47f2x5:[];this[_0x1bfe[3249]]= {};for(var _0x47f2x9 in this[_0x1bfe[3248]]){this[_0x1bfe[3249]][this[_0x1bfe[3248]][_0x47f2x9]]= _0x47f2x9}}mxObjectCodec[_0x1bfe[202]][_0x1bfe[3231]]= null;mxObjectCodec[_0x1bfe[202]][_0x1bfe[3246]]= null;mxObjectCodec[_0x1bfe[202]][_0x1bfe[3247]]= null;mxObjectCodec[_0x1bfe[202]][_0x1bfe[3248]]= null;mxObjectCodec[_0x1bfe[202]][_0x1bfe[3249]]= null;mxObjectCodec[_0x1bfe[202]][_0x1bfe[718]]= function(){return mxUtils[_0x1bfe[197]](this[_0x1bfe[3231]][_0x1bfe[196]])};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3250]]= function(){return new this[_0x1bfe[3231]][_0x1bfe[196]]};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3251]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=this[_0x1bfe[3249]][_0x47f2x2];null!= _0x47f2x3&& (_0x47f2x2= _0x47f2x3)};return _0x47f2x2};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3252]]= function(_0x47f2x2){if(null!= _0x47f2x2){var _0x47f2x3=this[_0x1bfe[3248]][_0x47f2x2];null!= _0x47f2x3&& (_0x47f2x2= _0x47f2x3)};return _0x47f2x2};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3253]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){return _0x47f2x3== mxObjectIdentity[_0x1bfe[195]]|| 0<= mxUtils[_0x1bfe[2]](this[_0x1bfe[3246]],_0x47f2x3)};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3254]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){return 0<= mxUtils[_0x1bfe[2]](this[_0x1bfe[3247]],_0x47f2x3)};mxObjectCodec[_0x1bfe[202]][_0x1bfe[514]]= function(_0x47f2x2,_0x47f2x3){var _0x47f2x4=_0x47f2x2[_0x1bfe[395]][_0x1bfe[55]](this[_0x1bfe[718]]());_0x47f2x3= this[_0x1bfe[3255]](_0x47f2x2,_0x47f2x3,_0x47f2x4);this[_0x1bfe[3256]](_0x47f2x2,_0x47f2x3,_0x47f2x4);return this[_0x1bfe[3257]](_0x47f2x2,_0x47f2x3,_0x47f2x4)};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3256]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2[_0x1bfe[57]](_0x47f2x4,_0x1bfe[1363],_0x47f2x2[_0x1bfe[1103]](_0x47f2x3));for(var _0x47f2x5 in _0x47f2x3){var _0x47f2x9=_0x47f2x5,_0x47f2xa=_0x47f2x3[_0x47f2x9];null!= _0x47f2xa&& !this[_0x1bfe[3253]](_0x47f2x3,_0x47f2x9,_0x47f2xa,!0)&& (mxUtils[_0x1bfe[1946]](_0x47f2x9)&& (_0x47f2x9= null),this[_0x1bfe[3258]](_0x47f2x2,_0x47f2x3,_0x47f2x9,_0x47f2xa,_0x47f2x4))}};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3258]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){if(null!= _0x47f2x5){if(this[_0x1bfe[3254]](_0x47f2x3,_0x47f2x4,_0x47f2x5,!0)){var _0x47f2xa=_0x47f2x2[_0x1bfe[1103]](_0x47f2x5);if(null== _0x47f2xa){mxLog[_0x1bfe[283]](_0x1bfe[3259]+ this[_0x1bfe[718]]()+ _0x1bfe[87]+ _0x47f2x4+ _0x1bfe[226]+ _0x47f2x5);return};_0x47f2x5= _0x47f2xa};_0x47f2xa= this[_0x1bfe[3231]][_0x47f2x4];if(null== _0x47f2x4|| _0x47f2x2[_0x1bfe[3235]]|| _0x47f2xa!= _0x47f2x5){_0x47f2x4= this[_0x1bfe[3252]](_0x47f2x4),this[_0x1bfe[3260]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9)}}};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3260]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x1bfe[194]!= typeof _0x47f2x5?this[_0x1bfe[3261]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9):this[_0x1bfe[3262]](_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9)};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3261]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x5= this[_0x1bfe[3263]](_0x47f2x5);null== _0x47f2x4?(_0x47f2x3= _0x47f2x2[_0x1bfe[395]][_0x1bfe[55]](_0x1bfe[99]),_0x1bfe[279]== typeof _0x47f2x5?_0x47f2x3[_0x1bfe[62]](_0x47f2x2[_0x1bfe[395]][_0x1bfe[344]](_0x47f2x5)):_0x47f2x2[_0x1bfe[57]](_0x47f2x3,_0x1bfe[131],_0x47f2x5),_0x47f2x9[_0x1bfe[62]](_0x47f2x3)):_0x1bfe[279]!= typeof _0x47f2x5&& _0x47f2x2[_0x1bfe[57]](_0x47f2x9,_0x47f2x4,_0x47f2x5)};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3262]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5,_0x47f2x9){_0x47f2x2= _0x47f2x2[_0x1bfe[514]](_0x47f2x5);null!= _0x47f2x2?(null!= _0x47f2x4&& _0x47f2x2[_0x1bfe[57]](_0x1bfe[3069],_0x47f2x4),_0x47f2x9[_0x1bfe[62]](_0x47f2x2)):mxLog[_0x1bfe[283]](_0x1bfe[3264]+ this[_0x1bfe[718]]()+ _0x1bfe[87]+ _0x47f2x4+ _0x1bfe[3186]+ _0x47f2x5)};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3263]]= function(_0x47f2x2){if(_0x1bfe[82]== typeof _0x47f2x2[_0x1bfe[67]]&& (!0== _0x47f2x2|| !1== _0x47f2x2)){_0x47f2x2= !0== _0x47f2x2?_0x1bfe[500]:_0x1bfe[468]};return _0x47f2x2};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3265]]= function(_0x47f2x2){mxUtils[_0x1bfe[1946]](_0x47f2x2)&& (_0x47f2x2= parseFloat(_0x47f2x2));return _0x47f2x2};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3255]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return _0x47f2x3};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3257]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return _0x47f2x4};mxObjectCodec[_0x1bfe[202]][_0x1bfe[1093]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=_0x47f2x3[_0x1bfe[284]](_0x1bfe[1363]),_0x47f2x9=_0x47f2x2[_0x1bfe[68]][_0x47f2x5];null== _0x47f2x9&& (_0x47f2x9= _0x47f2x4|| this[_0x1bfe[3250]](),null!= _0x47f2x5&& _0x47f2x2[_0x1bfe[1104]](_0x47f2x5,_0x47f2x9));_0x47f2x3= this[_0x1bfe[3266]](_0x47f2x2,_0x47f2x3,_0x47f2x9);this[_0x1bfe[3267]](_0x47f2x2,_0x47f2x3,_0x47f2x9);return this[_0x1bfe[3268]](_0x47f2x2,_0x47f2x3,_0x47f2x9)};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3267]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){null!= _0x47f2x3&& (this[_0x1bfe[3269]](_0x47f2x2,_0x47f2x3,_0x47f2x4),this[_0x1bfe[3270]](_0x47f2x2,_0x47f2x3,_0x47f2x4))};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3269]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x3= _0x47f2x3[_0x1bfe[320]];if(null!= _0x47f2x3){for(var _0x47f2x5=0;_0x47f2x5< _0x47f2x3[_0x1bfe[67]];_0x47f2x5++){this[_0x1bfe[3271]](_0x47f2x2,_0x47f2x3[_0x47f2x5],_0x47f2x4)}}};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3271]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=_0x47f2x3[_0x1bfe[301]];if(_0x1bfe[3069]!= _0x47f2x5&& _0x1bfe[1363]!= _0x47f2x5){_0x47f2x3= this[_0x1bfe[3265]](_0x47f2x3[_0x1bfe[318]]);var _0x47f2x9=this[_0x1bfe[3251]](_0x47f2x5);if(this[_0x1bfe[3254]](_0x47f2x4,_0x47f2x9,_0x47f2x3,!1)){_0x47f2x2= _0x47f2x2[_0x1bfe[3236]](_0x47f2x3);if(null== _0x47f2x2){mxLog[_0x1bfe[283]](_0x1bfe[3272]+ this[_0x1bfe[718]]()+ _0x1bfe[87]+ _0x47f2x5+ _0x1bfe[226]+ _0x47f2x3);return};_0x47f2x3= _0x47f2x2};this[_0x1bfe[3253]](_0x47f2x4,_0x47f2x5,_0x47f2x3,!1)|| (_0x47f2x4[_0x47f2x5]= _0x47f2x3)}};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3270]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){for(_0x47f2x3= _0x47f2x3[_0x1bfe[285]];null!= _0x47f2x3;){var _0x47f2x5=_0x47f2x3[_0x1bfe[287]];_0x47f2x3[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]&& !this[_0x1bfe[3273]](_0x47f2x2,_0x47f2x3,_0x47f2x4)&& this[_0x1bfe[3274]](_0x47f2x2,_0x47f2x3,_0x47f2x4);_0x47f2x3= _0x47f2x5}};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3274]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){var _0x47f2x5=this[_0x1bfe[3251]](_0x47f2x3[_0x1bfe[284]](_0x1bfe[3069]));if(null== _0x47f2x5|| !this[_0x1bfe[3253]](_0x47f2x4,_0x47f2x5,_0x47f2x3,!1)){var _0x47f2x9=this[_0x1bfe[3275]](_0x47f2x4,_0x47f2x5,_0x47f2x3),_0x47f2xa=null;_0x1bfe[99]== _0x47f2x3[_0x1bfe[301]]?(_0x47f2xa= _0x47f2x3[_0x1bfe[284]](_0x1bfe[131]),null== _0x47f2xa&& (_0x47f2xa= mxUtils[_0x1bfe[1545]](mxUtils[_0x1bfe[329]](_0x47f2x3)))):_0x47f2xa= _0x47f2x2[_0x1bfe[1093]](_0x47f2x3,_0x47f2x9);this[_0x1bfe[3276]](_0x47f2x4,_0x47f2x5,_0x47f2xa,_0x47f2x9)}};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3275]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){_0x47f2x2= _0x47f2x2[_0x47f2x3];_0x47f2x2 instanceof Array&& 0< _0x47f2x2[_0x1bfe[67]]&& (_0x47f2x2= null);return _0x47f2x2};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3276]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4,_0x47f2x5){null!= _0x47f2x4&& _0x47f2x4!= _0x47f2x5&& (null!= _0x47f2x3&& 0< _0x47f2x3[_0x1bfe[67]]?_0x47f2x2[_0x47f2x3]= _0x47f2x4:_0x47f2x2[_0x1bfe[207]](_0x47f2x4))};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3273]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){if(_0x1bfe[3277]== _0x47f2x3[_0x1bfe[301]]){_0x47f2x3= _0x47f2x3[_0x1bfe[284]](_0x1bfe[298]);if(null!= _0x47f2x3){try{var _0x47f2x5=mxUtils[_0x1bfe[219]](_0x47f2x3)[_0x1bfe[874]]();null!= _0x47f2x5&& _0x47f2x2[_0x1bfe[1093]](_0x47f2x5,_0x47f2x4)}catch(e){}};return !0};return !1};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3266]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return _0x47f2x3};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3268]]= function(_0x47f2x2,_0x47f2x3,_0x47f2x4){return _0x47f2x4};mxCodecRegistry[_0x1bfe[3234]](function(){var _0x47f2x2= new mxObjectCodec( new mxCell,[_0x1bfe[1954],_0x1bfe[1842],_0x1bfe[1211],_0x1bfe[1991]],[_0x1bfe[1101],_0x1bfe[1097],_0x1bfe[772]]);_0x47f2x2[_0x1bfe[3243]]= function(){return !0};_0x47f2x2[_0x1bfe[3253]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5,_0x47f2x9){return mxObjectCodec[_0x1bfe[202]][_0x1bfe[3253]][_0x1bfe[183]](this,arguments)|| _0x47f2x9&& _0x1bfe[131]== _0x47f2x4&& _0x47f2x5[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]};_0x47f2x2[_0x1bfe[3257]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x4[_0x1bfe[131]]&& _0x47f2x4[_0x1bfe[131]][_0x1bfe[288]]== mxConstants[_0x1bfe[289]]){var _0x47f2x9=_0x47f2x5;_0x47f2x5= mxClient[_0x1bfe[80]]?_0x47f2x4[_0x1bfe[131]][_0x1bfe[511]](!0):_0x47f2x2[_0x1bfe[395]][_0x1bfe[3239]](_0x47f2x4[_0x1bfe[131]],!0);_0x47f2x5[_0x1bfe[62]](_0x47f2x9);_0x47f2x2= _0x47f2x9[_0x1bfe[284]](_0x1bfe[1363]);_0x47f2x5[_0x1bfe[57]](_0x1bfe[1363],_0x47f2x2);_0x47f2x9[_0x1bfe[1390]](_0x1bfe[1363])};return _0x47f2x5};_0x47f2x2[_0x1bfe[3266]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){var _0x47f2x9=_0x47f2x4,_0x47f2xa=this[_0x1bfe[718]]();_0x47f2x4[_0x1bfe[301]]!= _0x47f2xa?(_0x47f2x9= _0x47f2x4[_0x1bfe[64]](_0x47f2xa)[0],null!= _0x47f2x9&& _0x47f2x9[_0x1bfe[265]]== _0x47f2x4?(mxUtils[_0x1bfe[3278]](_0x47f2x9,!0),mxUtils[_0x1bfe[3278]](_0x47f2x9,!1),_0x47f2x9[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x9)):_0x47f2x9= null,_0x47f2x5[_0x1bfe[131]]= _0x47f2x4[_0x1bfe[511]](!0),_0x47f2x4= _0x47f2x5[_0x1bfe[131]][_0x1bfe[284]](_0x1bfe[1363]),null!= _0x47f2x4&& (_0x47f2x5[_0x1bfe[1945]](_0x47f2x4),_0x47f2x5[_0x1bfe[131]][_0x1bfe[1390]](_0x1bfe[1363]))):_0x47f2x5[_0x1bfe[1945]](_0x47f2x4[_0x1bfe[284]](_0x1bfe[1363]));if(null!= _0x47f2x9){for(_0x47f2x4= 0;_0x47f2x4< this[_0x1bfe[3247]][_0x1bfe[67]];_0x47f2x4++){var _0x47f2xa=this[_0x1bfe[3247]][_0x47f2x4],_0x47f2x12=_0x47f2x9[_0x1bfe[284]](_0x47f2xa);if(null!= _0x47f2x12){_0x47f2x9[_0x1bfe[1390]](_0x47f2xa);var _0x47f2x13=_0x47f2x2[_0x1bfe[68]][_0x47f2x12]|| _0x47f2x2[_0x1bfe[1060]](_0x47f2x12);null== _0x47f2x13&& (_0x47f2x12= _0x47f2x2[_0x1bfe[1362]](_0x47f2x12),null!= _0x47f2x12&& (_0x47f2x13= (mxCodecRegistry[_0x1bfe[3230]][_0x47f2x12[_0x1bfe[301]]]|| this)[_0x1bfe[1093]](_0x47f2x2,_0x47f2x12)));_0x47f2x5[_0x47f2xa]= _0x47f2x13}}};return _0x47f2x9};return _0x47f2x2}());mxCodecRegistry[_0x1bfe[3234]](function(){var _0x47f2x2= new mxObjectCodec( new mxGraphModel);_0x47f2x2[_0x1bfe[3256]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){var _0x47f2x9=_0x47f2x2[_0x1bfe[395]][_0x1bfe[55]](_0x1bfe[813]);_0x47f2x2[_0x1bfe[3242]](_0x47f2x4[_0x1bfe[501]](),_0x47f2x9);_0x47f2x5[_0x1bfe[62]](_0x47f2x9)};_0x47f2x2[_0x1bfe[3274]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){_0x1bfe[813]== _0x47f2x4[_0x1bfe[301]]?this[_0x1bfe[3279]](_0x47f2x2,_0x47f2x4,_0x47f2x5):mxObjectCodec[_0x1bfe[202]][_0x1bfe[3274]][_0x1bfe[183]](this,arguments)};_0x47f2x2[_0x1bfe[3279]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){var _0x47f2x9=null;for(_0x47f2x4= _0x47f2x4[_0x1bfe[285]];null!= _0x47f2x4;){var _0x47f2xa=_0x47f2x2[_0x1bfe[3244]](_0x47f2x4);null!= _0x47f2xa&& null== _0x47f2xa[_0x1bfe[1197]]()&& (_0x47f2x9= _0x47f2xa);_0x47f2x4= _0x47f2x4[_0x1bfe[287]]};null!= _0x47f2x9&& _0x47f2x5[_0x1bfe[1927]](_0x47f2x9)};return _0x47f2x2}());mxCodecRegistry[_0x1bfe[3234]](function(){var _0x47f2x2= new mxObjectCodec( new mxRootChange,[_0x1bfe[251],_0x1bfe[257],_0x1bfe[813]]);_0x47f2x2[_0x1bfe[3257]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){_0x47f2x2[_0x1bfe[3242]](_0x47f2x4[_0x1bfe[813]],_0x47f2x5);return _0x47f2x5};_0x47f2x2[_0x1bfe[3266]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x4[_0x1bfe[285]]&& _0x47f2x4[_0x1bfe[285]][_0x1bfe[288]]== mxConstants[_0x1bfe[289]]){_0x47f2x4= _0x47f2x4[_0x1bfe[511]](!0);var _0x47f2x9=_0x47f2x4[_0x1bfe[285]];_0x47f2x5[_0x1bfe[813]]= _0x47f2x2[_0x1bfe[3244]](_0x47f2x9,!1);_0x47f2x5= _0x47f2x9[_0x1bfe[287]];_0x47f2x9[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x9);for(_0x47f2x9= _0x47f2x5;null!= _0x47f2x9;){_0x47f2x5= _0x47f2x9[_0x1bfe[287]],_0x47f2x2[_0x1bfe[3244]](_0x47f2x9),_0x47f2x9[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x9),_0x47f2x9= _0x47f2x5}};return _0x47f2x4};_0x47f2x2[_0x1bfe[3268]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){_0x47f2x5[_0x1bfe[257]]= _0x47f2x5[_0x1bfe[813]];return _0x47f2x5};return _0x47f2x2}());mxCodecRegistry[_0x1bfe[3234]](function(){var _0x47f2x2= new mxObjectCodec( new mxChildChange,[_0x1bfe[251],_0x1bfe[247],_0x1bfe[1982]],[_0x1bfe[1101],_0x1bfe[257]]);_0x47f2x2[_0x1bfe[3254]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5,_0x47f2x9){return _0x1bfe[247]== _0x47f2x4&& (null!= _0x47f2x2[_0x1bfe[257]]|| !_0x47f2x9)?!0:0<= mxUtils[_0x1bfe[2]](this[_0x1bfe[3247]],_0x47f2x4)};_0x47f2x2[_0x1bfe[3257]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){this[_0x1bfe[3254]](_0x47f2x4,_0x1bfe[247],_0x47f2x4[_0x1bfe[247]],!0)?_0x47f2x5[_0x1bfe[57]](_0x1bfe[247],_0x47f2x2[_0x1bfe[1103]](_0x47f2x4[_0x1bfe[247]])):_0x47f2x2[_0x1bfe[3242]](_0x47f2x4[_0x1bfe[247]],_0x47f2x5);return _0x47f2x5};_0x47f2x2[_0x1bfe[3266]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x4[_0x1bfe[285]]&& _0x47f2x4[_0x1bfe[285]][_0x1bfe[288]]== mxConstants[_0x1bfe[289]]){_0x47f2x4= _0x47f2x4[_0x1bfe[511]](!0);var _0x47f2x9=_0x47f2x4[_0x1bfe[285]];_0x47f2x5[_0x1bfe[247]]= _0x47f2x2[_0x1bfe[3244]](_0x47f2x9,!1);_0x47f2x5= _0x47f2x9[_0x1bfe[287]];_0x47f2x9[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x9);for(_0x47f2x9= _0x47f2x5;null!= _0x47f2x9;){_0x47f2x5= _0x47f2x9[_0x1bfe[287]];if(_0x47f2x9[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]){var _0x47f2xa=_0x47f2x9[_0x1bfe[284]](_0x1bfe[1363]);null== _0x47f2x2[_0x1bfe[1060]](_0x47f2xa)&& _0x47f2x2[_0x1bfe[3244]](_0x47f2x9)};_0x47f2x9[_0x1bfe[265]][_0x1bfe[266]](_0x47f2x9);_0x47f2x9= _0x47f2x5}}else {_0x47f2x9= _0x47f2x4[_0x1bfe[284]](_0x1bfe[247]),_0x47f2x5[_0x1bfe[247]]= _0x47f2x2[_0x1bfe[3236]](_0x47f2x9)};return _0x47f2x4};_0x47f2x2[_0x1bfe[3268]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){_0x47f2x5[_0x1bfe[247]][_0x1bfe[1101]]= _0x47f2x5[_0x1bfe[257]];_0x47f2x5[_0x1bfe[257]]= _0x47f2x5[_0x1bfe[1101]];_0x47f2x5[_0x1bfe[1982]]= _0x47f2x5[_0x1bfe[1983]];return _0x47f2x5};return _0x47f2x2}());mxCodecRegistry[_0x1bfe[3234]](function(){var _0x47f2x2= new mxObjectCodec( new mxTerminalChange,[_0x1bfe[251],_0x1bfe[257]],[_0x1bfe[246],_0x1bfe[1984]]);_0x47f2x2[_0x1bfe[3268]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){_0x47f2x5[_0x1bfe[257]]= _0x47f2x5[_0x1bfe[1984]];return _0x47f2x5};return _0x47f2x2}());var mxGenericChangeCodec=function(_0x47f2x2,_0x47f2x3){var _0x47f2x4= new mxObjectCodec(_0x47f2x2,[_0x1bfe[251],_0x1bfe[257]],[_0x1bfe[246]]);_0x47f2x4[_0x1bfe[3268]]= function(_0x47f2x2,_0x47f2x4,_0x47f2xa){mxUtils[_0x1bfe[1331]](_0x47f2xa[_0x1bfe[246]])&& (_0x47f2xa[_0x1bfe[246]]= _0x47f2x2[_0x1bfe[3244]](_0x47f2xa[_0x1bfe[246]],!1));_0x47f2xa[_0x1bfe[257]]= _0x47f2xa[_0x47f2x3];return _0x47f2xa};return _0x47f2x4};mxCodecRegistry[_0x1bfe[3234]](mxGenericChangeCodec( new mxValueChange,_0x1bfe[131]));mxCodecRegistry[_0x1bfe[3234]](mxGenericChangeCodec( new mxStyleChange,_0x1bfe[124]));mxCodecRegistry[_0x1bfe[3234]](mxGenericChangeCodec( new mxGeometryChange,_0x1bfe[256]));mxCodecRegistry[_0x1bfe[3234]](mxGenericChangeCodec( new mxCollapseChange,_0x1bfe[1985]));mxCodecRegistry[_0x1bfe[3234]](mxGenericChangeCodec( new mxVisibleChange,_0x1bfe[189]));mxCodecRegistry[_0x1bfe[3234]](mxGenericChangeCodec( new mxCellAttributeChange,_0x1bfe[131]));mxCodecRegistry[_0x1bfe[3234]](function(){return new mxObjectCodec( new mxGraph,_0x1bfe[3280][_0x1bfe[224]](_0x1bfe[185]))}());mxCodecRegistry[_0x1bfe[3234]](function(){var _0x47f2x2= new mxObjectCodec( new mxGraphView);_0x47f2x2[_0x1bfe[514]]= function(_0x47f2x2,_0x47f2x4){return this[_0x1bfe[3242]](_0x47f2x2,_0x47f2x4,_0x47f2x4[_0x1bfe[1179]][_0x1bfe[502]]()[_0x1bfe[501]]())};_0x47f2x2[_0x1bfe[3242]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){var _0x47f2x9=_0x47f2x4[_0x1bfe[1179]][_0x1bfe[502]](),_0x47f2xa=_0x47f2x4[_0x1bfe[248]](_0x47f2x5),_0x47f2x12=_0x47f2x9[_0x1bfe[1197]](_0x47f2x5);if(null== _0x47f2x12|| null!= _0x47f2xa){var _0x47f2x13=_0x47f2x9[_0x1bfe[262]](_0x47f2x5),_0x47f2x14=_0x47f2x4[_0x1bfe[1179]][_0x1bfe[1198]](_0x47f2x5),_0x47f2x15=null;_0x47f2x12== _0x47f2x9[_0x1bfe[501]]()?_0x47f2x15= _0x1bfe[3281]:null== _0x47f2x12?_0x47f2x15= _0x1bfe[1179]:_0x47f2x9[_0x1bfe[250]](_0x47f2x5)?_0x47f2x15= _0x1bfe[1989]:0< _0x47f2x13&& null!= _0x47f2x14?_0x47f2x15= _0x1bfe[1504]:_0x47f2x9[_0x1bfe[1193]](_0x47f2x5)&& (_0x47f2x15= _0x1bfe[1988]);if(null!= _0x47f2x15){var _0x47f2x16=_0x47f2x2[_0x1bfe[395]][_0x1bfe[55]](_0x47f2x15);null!= _0x47f2x4[_0x1bfe[1179]][_0x1bfe[2183]](_0x47f2x5)&& (_0x47f2x16[_0x1bfe[57]](_0x1bfe[685],_0x47f2x4[_0x1bfe[1179]][_0x1bfe[2183]](_0x47f2x5)),_0x47f2x4[_0x1bfe[1179]][_0x1bfe[2186]](_0x47f2x5)&& _0x47f2x16[_0x1bfe[57]](_0x1bfe[1428],!0));if(null== _0x47f2x12){var _0x47f2x17=_0x47f2x4[_0x1bfe[517]]();null!= _0x47f2x17&& (_0x47f2x16[_0x1bfe[57]](_0x1bfe[235],Math[_0x1bfe[488]](_0x47f2x17[_0x1bfe[235]])),_0x47f2x16[_0x1bfe[57]](_0x1bfe[236],Math[_0x1bfe[488]](_0x47f2x17[_0x1bfe[236]])),_0x47f2x16[_0x1bfe[57]](_0x1bfe[117],Math[_0x1bfe[488]](_0x47f2x17[_0x1bfe[117]])),_0x47f2x16[_0x1bfe[57]](_0x1bfe[119],Math[_0x1bfe[488]](_0x47f2x17[_0x1bfe[119]])));_0x47f2x16[_0x1bfe[57]](_0x1bfe[255],_0x47f2x4[_0x1bfe[255]])}else {if(null!= _0x47f2xa&& null!= _0x47f2x14){for(_0x47f2x17 in _0x47f2xa[_0x1bfe[124]]){_0x47f2x12= _0x47f2xa[_0x1bfe[124]][_0x47f2x17],_0x1bfe[279]== typeof _0x47f2x12&& _0x1bfe[194]== typeof _0x47f2x12&& (_0x47f2x12= mxStyleRegistry[_0x1bfe[718]](_0x47f2x12)),null!= _0x47f2x12&& (_0x1bfe[279]!= typeof _0x47f2x12&& _0x1bfe[194]!= typeof _0x47f2x12)&& _0x47f2x16[_0x1bfe[57]](_0x47f2x17,_0x47f2x12)};_0x47f2x12= _0x47f2xa[_0x1bfe[439]];if(null!= _0x47f2x12&& 0< _0x47f2x12[_0x1bfe[67]]){_0x47f2x14= Math[_0x1bfe[488]](_0x47f2x12[0][_0x1bfe[235]])+ _0x1bfe[537]+ Math[_0x1bfe[488]](_0x47f2x12[0][_0x1bfe[236]]);for(_0x47f2x17= 1;_0x47f2x17< _0x47f2x12[_0x1bfe[67]];_0x47f2x17++){_0x47f2x14+= _0x1bfe[185]+ Math[_0x1bfe[488]](_0x47f2x12[_0x47f2x17][_0x1bfe[235]])+ _0x1bfe[537]+ Math[_0x1bfe[488]](_0x47f2x12[_0x47f2x17][_0x1bfe[236]])};_0x47f2x16[_0x1bfe[57]](_0x1bfe[1525],_0x47f2x14)}else {_0x47f2x16[_0x1bfe[57]](_0x1bfe[235],Math[_0x1bfe[488]](_0x47f2xa[_0x1bfe[235]])),_0x47f2x16[_0x1bfe[57]](_0x1bfe[236],Math[_0x1bfe[488]](_0x47f2xa[_0x1bfe[236]])),_0x47f2x16[_0x1bfe[57]](_0x1bfe[117],Math[_0x1bfe[488]](_0x47f2xa[_0x1bfe[117]])),_0x47f2x16[_0x1bfe[57]](_0x1bfe[119],Math[_0x1bfe[488]](_0x47f2xa[_0x1bfe[119]]))};_0x47f2x17= _0x47f2xa[_0x1bfe[2079]];null!= _0x47f2x17&& (0!= _0x47f2x17[_0x1bfe[235]]&& _0x47f2x16[_0x1bfe[57]](_0x1bfe[1126],Math[_0x1bfe[488]](_0x47f2x17[_0x1bfe[235]])),0!= _0x47f2x17[_0x1bfe[236]]&& _0x47f2x16[_0x1bfe[57]](_0x1bfe[1125],Math[_0x1bfe[488]](_0x47f2x17[_0x1bfe[236]])))}};for(_0x47f2x17= 0;_0x47f2x17< _0x47f2x13;_0x47f2x17++){_0x47f2xa= this[_0x1bfe[3242]](_0x47f2x2,_0x47f2x4,_0x47f2x9[_0x1bfe[263]](_0x47f2x5,_0x47f2x17)),null!= _0x47f2xa&& _0x47f2x16[_0x1bfe[62]](_0x47f2xa)}}};return _0x47f2x16};return _0x47f2x2}());mxCodecRegistry[_0x1bfe[3234]](function(){var _0x47f2x2= new mxObjectCodec( new mxStylesheet);_0x47f2x2[_0x1bfe[514]]= function(_0x47f2x2,_0x47f2x4){var _0x47f2x5=_0x47f2x2[_0x1bfe[395]][_0x1bfe[55]](this[_0x1bfe[718]]()),_0x47f2x9;for(_0x47f2x9 in _0x47f2x4[_0x1bfe[2054]]){var _0x47f2xa=_0x47f2x4[_0x1bfe[2054]][_0x47f2x9],_0x47f2x12=_0x47f2x2[_0x1bfe[395]][_0x1bfe[55]](_0x1bfe[99]);if(null!= _0x47f2x9){_0x47f2x12[_0x1bfe[57]](_0x1bfe[3069],_0x47f2x9);for(var _0x47f2x13 in _0x47f2xa){var _0x47f2x14=this[_0x1bfe[3282]](_0x47f2x13,_0x47f2xa[_0x47f2x13]);if(null!= _0x47f2x14){var _0x47f2x15=_0x47f2x2[_0x1bfe[395]][_0x1bfe[55]](_0x1bfe[99]);_0x47f2x15[_0x1bfe[57]](_0x1bfe[131],_0x47f2x14);_0x47f2x15[_0x1bfe[57]](_0x1bfe[3069],_0x47f2x13);_0x47f2x12[_0x1bfe[62]](_0x47f2x15)}};0< _0x47f2x12[_0x1bfe[271]][_0x1bfe[67]]&& _0x47f2x5[_0x1bfe[62]](_0x47f2x12)}};return _0x47f2x5};_0x47f2x2[_0x1bfe[3282]]= function(_0x47f2x2,_0x47f2x4){var _0x47f2x5= typeof _0x47f2x4;_0x1bfe[279]== _0x47f2x5?_0x47f2x4= mxStyleRegistry[_0x1bfe[718]](style[j]):_0x1bfe[194]== _0x47f2x5&& (_0x47f2x4= null);return _0x47f2x4};_0x47f2x2[_0x1bfe[1093]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){_0x47f2x5= _0x47f2x5|| new this[_0x1bfe[3231]][_0x1bfe[196]];var _0x47f2x9=_0x47f2x4[_0x1bfe[284]](_0x1bfe[1363]);null!= _0x47f2x9&& (_0x47f2x2[_0x1bfe[68]][_0x47f2x9]= _0x47f2x5);for(_0x47f2x4= _0x47f2x4[_0x1bfe[285]];null!= _0x47f2x4;){if(!this[_0x1bfe[3273]](_0x47f2x2,_0x47f2x4,_0x47f2x5)&& _0x1bfe[99]== _0x47f2x4[_0x1bfe[301]]&& (_0x47f2x9= _0x47f2x4[_0x1bfe[284]](_0x1bfe[3069]),null!= _0x47f2x9)){var _0x47f2xa=_0x47f2x4[_0x1bfe[284]](_0x1bfe[1284]),_0x47f2x12=null!= _0x47f2xa?mxUtils[_0x1bfe[238]](_0x47f2x5[_0x1bfe[2054]][_0x47f2xa]):null;null== _0x47f2x12&& (null!= _0x47f2xa&& mxLog[_0x1bfe[283]](_0x1bfe[3283]+ _0x47f2xa+ _0x1bfe[3284]),_0x47f2x12= {});for(_0x47f2xa= _0x47f2x4[_0x1bfe[285]];null!= _0x47f2xa;){if(_0x47f2xa[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]){var _0x47f2x13=_0x47f2xa[_0x1bfe[284]](_0x1bfe[3069]);if(_0x1bfe[99]== _0x47f2xa[_0x1bfe[301]]){var _0x47f2x14=mxUtils[_0x1bfe[329]](_0x47f2xa),_0x47f2x15=null;null!= _0x47f2x14&& 0< _0x47f2x14[_0x1bfe[67]]?_0x47f2x15= mxUtils[_0x1bfe[1545]](_0x47f2x14):(_0x47f2x15= _0x47f2xa[_0x1bfe[284]](_0x1bfe[131]),mxUtils[_0x1bfe[1946]](_0x47f2x15)&& (_0x47f2x15= parseFloat(_0x47f2x15)));null!= _0x47f2x15&& (_0x47f2x12[_0x47f2x13]= _0x47f2x15)}else {_0x1bfe[205]== _0x47f2xa[_0x1bfe[301]]&& delete _0x47f2x12[_0x47f2x13]}};_0x47f2xa= _0x47f2xa[_0x1bfe[287]]};_0x47f2x5[_0x1bfe[2074]](_0x47f2x9,_0x47f2x12)};_0x47f2x4= _0x47f2x4[_0x1bfe[287]]};return _0x47f2x5};return _0x47f2x2}());mxCodecRegistry[_0x1bfe[3234]](function(){var _0x47f2x2= new mxObjectCodec( new mxDefaultKeyHandler);_0x47f2x2[_0x1bfe[514]]= function(_0x47f2x2,_0x47f2x4){return null};_0x47f2x2[_0x1bfe[1093]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x5){for(_0x47f2x4= _0x47f2x4[_0x1bfe[285]];null!= _0x47f2x4;){if(!this[_0x1bfe[3273]](_0x47f2x2,_0x47f2x4,_0x47f2x5)&& _0x1bfe[99]== _0x47f2x4[_0x1bfe[301]]){var _0x47f2x9=_0x47f2x4[_0x1bfe[284]](_0x1bfe[3069]),_0x47f2xa=_0x47f2x4[_0x1bfe[284]](_0x1bfe[892]),_0x47f2x12=_0x47f2x4[_0x1bfe[284]](_0x1bfe[2207]);_0x47f2x5[_0x1bfe[3063]](_0x47f2x9,_0x47f2xa,_0x47f2x12)};_0x47f2x4= _0x47f2x4[_0x1bfe[287]]}};return _0x47f2x5};return _0x47f2x2}());mxCodecRegistry[_0x1bfe[3234]](function(){var _0x47f2x2= new mxObjectCodec( new mxDefaultToolbar);_0x47f2x2[_0x1bfe[514]]= function(_0x47f2x2,_0x47f2x4){return null};_0x47f2x2[_0x1bfe[1093]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){if(null!= _0x47f2x5){var _0x47f2x9=_0x47f2x5[_0x1bfe[3061]];for(_0x47f2x4= _0x47f2x4[_0x1bfe[285]];null!= _0x47f2x4;){if(_0x47f2x4[_0x1bfe[288]]== mxConstants[_0x1bfe[289]]&& !this[_0x1bfe[3273]](_0x47f2x2,_0x47f2x4,_0x47f2x5)){if(_0x1bfe[3072]== _0x47f2x4[_0x1bfe[301]]){_0x47f2x5[_0x1bfe[1051]]()}else {if(_0x1bfe[345]== _0x47f2x4[_0x1bfe[301]]){_0x47f2x5[_0x1bfe[3082]][_0x1bfe[1052]]()}else {if(_0x1bfe[1054]== _0x47f2x4[_0x1bfe[301]]){_0x47f2x5[_0x1bfe[3082]][_0x1bfe[1053]]()}else {if(_0x1bfe[99]== _0x47f2x4[_0x1bfe[301]]){var _0x47f2xa=_0x47f2x4[_0x1bfe[284]](_0x1bfe[3069]),_0x47f2xa=mxResources[_0x1bfe[203]](_0x47f2xa)|| _0x47f2xa,_0x47f2x12=_0x47f2x4[_0x1bfe[284]](_0x1bfe[2916]),_0x47f2x13=_0x47f2x4[_0x1bfe[284]](_0x1bfe[3285]),_0x47f2x14=_0x47f2x4[_0x1bfe[284]](_0x1bfe[892]),_0x47f2x15=_0x47f2x4[_0x1bfe[284]](_0x1bfe[3286]),_0x47f2x16=_0x47f2x4[_0x1bfe[284]](_0x1bfe[3231]),_0x47f2x17=_0x1bfe[468]!= _0x47f2x4[_0x1bfe[284]](_0x1bfe[3287]),_0x47f2x18=mxUtils[_0x1bfe[329]](_0x47f2x4),_0x47f2x19=null;if(null!= _0x47f2x14){_0x47f2x19= _0x47f2x5[_0x1bfe[1025]](_0x47f2xa,_0x47f2x12,_0x47f2x14,_0x47f2x13)}else {if(null!= _0x47f2x15){var _0x47f2x1a=mxUtils[_0x1bfe[1545]](_0x47f2x18),_0x47f2x19=_0x47f2x5[_0x1bfe[1048]](_0x47f2xa,_0x47f2x12,_0x47f2x15,_0x47f2x13,_0x47f2x1a)}else {if(null!= _0x47f2x16|| null!= _0x47f2x18&& 0< _0x47f2x18[_0x1bfe[67]]){_0x47f2x19= _0x47f2x9[_0x1bfe[3118]][_0x47f2x16],_0x47f2x16= _0x47f2x4[_0x1bfe[284]](_0x1bfe[124]),null!= _0x47f2x19&& null!= _0x47f2x16&& (_0x47f2x19= _0x47f2x19[_0x1bfe[238]](),_0x47f2x19[_0x1bfe[475]](_0x47f2x16)),_0x47f2x16= null,null!= _0x47f2x18&& 0< _0x47f2x18[_0x1bfe[67]]&& (_0x47f2x16= mxUtils[_0x1bfe[1545]](_0x47f2x18)),_0x47f2x19= _0x47f2x5[_0x1bfe[3087]](_0x47f2xa,_0x47f2x12,_0x47f2x19,_0x47f2x13,_0x47f2x16,_0x47f2x17)}else {if(_0x47f2x13= mxUtils[_0x1bfe[1540]](_0x47f2x4),0< _0x47f2x13[_0x1bfe[67]]){if(null== _0x47f2x12){_0x47f2x16= _0x47f2x5[_0x1bfe[1038]](_0x47f2xa);for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x13[_0x1bfe[67]];_0x47f2xa++){_0x47f2x17= _0x47f2x13[_0x47f2xa],_0x1bfe[3072]== _0x47f2x17[_0x1bfe[301]]?_0x47f2x5[_0x1bfe[972]](_0x47f2x16,_0x1bfe[3288]):_0x1bfe[99]== _0x47f2x17[_0x1bfe[301]]&& (_0x47f2x12= _0x47f2x17[_0x1bfe[284]](_0x1bfe[3069]),_0x47f2x17= _0x47f2x17[_0x1bfe[284]](_0x1bfe[892]),_0x47f2x5[_0x1bfe[3085]](_0x47f2x16,_0x47f2x12,_0x47f2x17))}}else {var _0x47f2x1b=null,_0x47f2x1c=_0x47f2x5[_0x1bfe[3087]](_0x47f2xa,_0x47f2x12,function(){var _0x47f2x2=_0x47f2x9[_0x1bfe[3118]][_0x47f2x1b[_0x1bfe[131]]];if(null!= _0x47f2x2){var _0x47f2x2=_0x47f2x2[_0x1bfe[238]](),_0x47f2x3=_0x47f2x1b[_0x1bfe[1040]][_0x47f2x1b[_0x1bfe[1039]]][_0x1bfe[3289]];null!= _0x47f2x3&& _0x47f2x2[_0x1bfe[475]](_0x47f2x3);return _0x47f2x2};mxLog[_0x1bfe[283]](_0x1bfe[3290]+ _0x47f2x2+ _0x1bfe[3291]);return null},null,null,_0x47f2x17),_0x47f2x1b=_0x47f2x5[_0x1bfe[970]]();mxEvent[_0x1bfe[169]](_0x47f2x1b,_0x1bfe[826],function(){_0x47f2x5[_0x1bfe[3082]][_0x1bfe[1047]](_0x47f2x1c,function(_0x47f2x2){_0x47f2x2= mxUtils[_0x1bfe[2196]](_0x47f2x9[_0x1bfe[1179]][_0x1bfe[526]],mxEvent[_0x1bfe[731]](_0x47f2x2),mxEvent[_0x1bfe[733]](_0x47f2x2));return _0x47f2x9[_0x1bfe[817]](null,_0x47f2x1a(),_0x47f2x2[_0x1bfe[235]],_0x47f2x2[_0x1bfe[236]])});_0x47f2x5[_0x1bfe[3082]][_0x1bfe[1023]]= !1});for(_0x47f2xa= 0;_0x47f2xa< _0x47f2x13[_0x1bfe[67]];_0x47f2xa++){_0x47f2x17= _0x47f2x13[_0x47f2xa],_0x1bfe[3072]== _0x47f2x17[_0x1bfe[301]]?_0x47f2x5[_0x1bfe[972]](_0x47f2x1b,_0x1bfe[3288]):_0x1bfe[99]== _0x47f2x17[_0x1bfe[301]]&& (_0x47f2x12= _0x47f2x17[_0x1bfe[284]](_0x1bfe[3069]),_0x47f2x18= _0x47f2x17[_0x1bfe[284]](_0x1bfe[3231]),_0x47f2x5[_0x1bfe[972]](_0x47f2x1b,_0x47f2x12,_0x47f2x18|| _0x47f2x16)[_0x1bfe[3289]]= _0x47f2x17[_0x1bfe[284]](_0x1bfe[124]))}}}}}};null!= _0x47f2x19&& (_0x47f2x16= _0x47f2x4[_0x1bfe[284]](_0x1bfe[1363]),null!= _0x47f2x16&& 0< _0x47f2x16[_0x1bfe[67]]&& _0x47f2x19[_0x1bfe[57]](_0x1bfe[1363],_0x47f2x16))}}}}};_0x47f2x4= _0x47f2x4[_0x1bfe[287]]}};return _0x47f2x5};return _0x47f2x2}());mxCodecRegistry[_0x1bfe[3234]](function(){var _0x47f2x2= new mxObjectCodec( new mxDefaultPopupMenu);_0x47f2x2[_0x1bfe[514]]= function(_0x47f2x2,_0x47f2x4){return null};_0x47f2x2[_0x1bfe[1093]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){var _0x47f2x9=_0x47f2x4[_0x1bfe[64]](_0x1bfe[3277])[0];null!= _0x47f2x9?this[_0x1bfe[3273]](_0x47f2x2,_0x47f2x9,_0x47f2x5):null!= _0x47f2x5&& (_0x47f2x5[_0x1bfe[3064]]= _0x47f2x4);return _0x47f2x5};return _0x47f2x2}());mxCodecRegistry[_0x1bfe[3234]](function(){var _0x47f2x2= new mxObjectCodec( new mxEditor,_0x1bfe[3292][_0x1bfe[224]](_0x1bfe[185]));_0x47f2x2[_0x1bfe[3268]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){_0x47f2x2= _0x47f2x4[_0x1bfe[284]](_0x1bfe[2075]);null!= _0x47f2x2&& (_0x47f2x4[_0x1bfe[1390]](_0x1bfe[2075]),_0x47f2x5[_0x1bfe[2075]]= _0x47f2x5[_0x1bfe[3118]][_0x47f2x2]);_0x47f2x2= _0x47f2x4[_0x1bfe[284]](_0x1bfe[3120]);null!= _0x47f2x2&& (_0x47f2x4[_0x1bfe[1390]](_0x1bfe[3120]),_0x47f2x5[_0x1bfe[3120]]= _0x47f2x5[_0x1bfe[3118]][_0x47f2x2]);return _0x47f2x5};_0x47f2x2[_0x1bfe[3274]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){if(_0x1bfe[3293]== _0x47f2x4[_0x1bfe[301]]){if(_0x1bfe[3118]== _0x47f2x4[_0x1bfe[284]](_0x1bfe[3069])){this[_0x1bfe[3294]](_0x47f2x2,_0x47f2x4,_0x47f2x5);return}}else {if(_0x1bfe[3295]== _0x47f2x4[_0x1bfe[301]]){this[_0x1bfe[3296]](_0x47f2x2,_0x47f2x4,_0x47f2x5);return}};mxObjectCodec[_0x1bfe[202]][_0x1bfe[3274]][_0x1bfe[183]](this,arguments)};_0x47f2x2[_0x1bfe[3296]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){for(_0x47f2x2= _0x47f2x4[_0x1bfe[285]];null!= _0x47f2x2;){if(_0x1bfe[99]== _0x47f2x2[_0x1bfe[301]]){_0x47f2x4= _0x47f2x2[_0x1bfe[284]](_0x1bfe[3069]);var _0x47f2x9=_0x47f2x2[_0x1bfe[284]](_0x1bfe[980]),_0x47f2xa=_0x47f2x2[_0x1bfe[284]](_0x1bfe[124]),_0x47f2x12=null;if(null!= _0x47f2x9){_0x47f2x12= document[_0x1bfe[1362]](_0x47f2x9),null!= _0x47f2x12&& null!= _0x47f2xa&& (_0x47f2x12[_0x1bfe[124]][_0x1bfe[103]]+= _0x1bfe[471]+ _0x47f2xa)}else {var _0x47f2x9=parseInt(_0x47f2x2[_0x1bfe[284]](_0x1bfe[235])),_0x47f2x13=parseInt(_0x47f2x2[_0x1bfe[284]](_0x1bfe[236])),_0x47f2x14=_0x47f2x2[_0x1bfe[284]](_0x1bfe[117]),_0x47f2x15=_0x47f2x2[_0x1bfe[284]](_0x1bfe[119]),_0x47f2x12=document[_0x1bfe[55]](_0x1bfe[485]);_0x47f2x12[_0x1bfe[124]][_0x1bfe[103]]= _0x47f2xa;( new mxWindow(mxResources[_0x1bfe[203]](_0x47f2x4)|| _0x47f2x4,_0x47f2x12,_0x47f2x9,_0x47f2x13,_0x47f2x14,_0x47f2x15,!1,!0))[_0x1bfe[175]](!0)};_0x1bfe[1179]== _0x47f2x4?_0x47f2x5[_0x1bfe[3202]](_0x47f2x12):_0x1bfe[3082]== _0x47f2x4?_0x47f2x5[_0x1bfe[3204]](_0x47f2x12):_0x1bfe[924]== _0x47f2x4?_0x47f2x5[_0x1bfe[3208]](_0x47f2x12):_0x1bfe[879]== _0x47f2x4?_0x47f2x5[_0x1bfe[3205]](_0x47f2x12):_0x1bfe[201]== _0x47f2x4&& _0x47f2x5[_0x1bfe[3297]](_0x47f2x12)}else {_0x1bfe[3298]== _0x47f2x2[_0x1bfe[301]]?mxResources[_0x1bfe[99]](_0x47f2x2[_0x1bfe[284]](_0x1bfe[3299])):_0x1bfe[94]== _0x47f2x2[_0x1bfe[301]]&& mxClient[_0x1bfe[54]](_0x1bfe[94],_0x47f2x2[_0x1bfe[284]](_0x1bfe[298]))};_0x47f2x2= _0x47f2x2[_0x1bfe[287]]}};_0x47f2x2[_0x1bfe[3294]]= function(_0x47f2x2,_0x47f2x4,_0x47f2x5){null== _0x47f2x5[_0x1bfe[3118]]&& (_0x47f2x5[_0x1bfe[3118]]= []);_0x47f2x4= mxUtils[_0x1bfe[1540]](_0x47f2x4);for(var _0x47f2x9=0;_0x47f2x9< _0x47f2x4[_0x1bfe[67]];_0x47f2x9++){for(var _0x47f2xa=_0x47f2x4[_0x47f2x9][_0x1bfe[284]](_0x1bfe[3069]),_0x47f2x12=_0x47f2x4[_0x47f2x9][_0x1bfe[285]];null!= _0x47f2x12&& 1!= _0x47f2x12[_0x1bfe[288]];){_0x47f2x12= _0x47f2x12[_0x1bfe[287]]};null!= _0x47f2x12&& (_0x47f2x5[_0x1bfe[3118]][_0x47f2xa]= _0x47f2x2[_0x1bfe[3244]](_0x47f2x12))}};return _0x47f2x2}()) \ No newline at end of file diff --git a/public/assets/plugins/square/js/Actions.js b/public/assets/plugins/square/js/Actions.js index 891e88f..b6faa56 100644 --- a/public/assets/plugins/square/js/Actions.js +++ b/public/assets/plugins/square/js/Actions.js @@ -1,638 +1 @@ -'use strict'; -/** - * $Id: Actions.js,v 1.7 2013-02-14 07:48:01 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Constructs the actions object for the given UI. - */ -function Actions(editorUi) { - this.editorUi = editorUi; - this.actions = new Object(); - this.init(); -}; - -/** - * Adds the default actions. - */ -Actions.prototype.init = function() { - var ui = this.editorUi; - var editor = ui.editor; - var graph = editor.graph; - - // File actions - this.addAction('new', function() { - ui.showDialog(new NewDialog(ui).container, 300, 180, true, true); - }); - this.addAction('open', function() { - ui.showDialog(new OpenDialog(ui).container, 300, 180, true, true); - }); - this.addAction('save', function() { - ui.saveFile(false); - }, null, null, 'Ctrl+S'); - this.addAction('saveAs', function() { - ui.saveFile(true); - }, null, null, 'Ctrl+Shift-S'); - this.addAction('publish', function() { - ui.publishFile(false); - }, null, null, 'Ctrl+Shift+P'); - this.addAction('variable', function() { - ui.showDialog(new VariableDialog(ui).container, 300, 180, true, true); - }); - this.addAction('description', function() { - ui.showDialog(new DescriptionDialog(ui).container, 300, 180, true, true); - }); - this.addAction('import', function() { - ui.showDialog(new ImportDialog(ui).container, 300, 200, true, true); - }); - this.addAction('export', function() { - ui.showDialog(new ExportDialog(ui).container, 300, 200, true, true); - }, null, null, 'Ctrl+E'); - this.put('editFile', new Action(mxResources.get('edit'), mxUtils.bind(this, - function() { - this.editorUi.showDialog(new EditFileDialog(ui).container, 620, 420, - true, true); - }))); - // this.addAction('rename', function() { - // ui.showDialog(new RenameDialog(ui).container, 300, 180, true, true); - // }); - this.addAction('print', function() { - mxUtils.printScreen(graph); - }, null, 'sprite-print', 'Ctrl+P'); - this.addAction('preview', function() { - mxUtils.show(graph, null, 10, 10); - }); - - // Edit actions - this.addAction('undo', function() { - editor.undoManager.undo(); - }, null, 'sprite-undo', 'Ctrl+Z'); - this.addAction('redo', function() { - editor.undoManager.redo(); - }, null, 'sprite-redo', 'Ctrl+Y'); - this.addAction('cut', function() { - mxClipboard.cut(graph); - }, null, 'sprite-cut', 'Ctrl+X'); - this.addAction('copy', function() { - mxClipboard.copy(graph); - }, null, 'sprite-copy', 'Ctrl+C'); - this.addAction('paste', function() { - mxClipboard.paste(graph); - }, false, 'sprite-paste', 'Ctrl+V'); - this.addAction('delete', function() { - graph.removeCells(); - }, null, null, 'Delete'); - this.addAction('duplicate', function() { - var s = graph.gridSize; - graph.setSelectionCells(graph.moveCells(graph.getSelectionCells(), s, s, - true)); - }, null, null, 'Ctrl+D'); - this.addAction('selectVertices', function() { - graph.selectVertices(); - }, null, null, 'Ctrl+Shift+V'); - this.addAction('selectEdges', function() { - graph.selectEdges(); - }, null, null, 'Ctrl+Shift+E'); - this.addAction('selectAll', function() { - graph.selectAll(); - }, null, null, 'Ctrl+A'); - - // Navigation actions - this.addAction('home', function() { - graph.home(); - }, null, null, 'Home'); - this.addAction('exitGroup', function() { - graph.exitGroup(); - }, null, null, 'Page Up'); - this.addAction('enterGroup', function() { - graph.enterGroup(); - }, null, null, 'Page Down'); - this.addAction('expand', function() { - graph.foldCells(false); - }, null, null, 'Enter'); - this.addAction('collapse', function() { - graph.foldCells(true); - }, null, null, 'Backspace'); - - // Arrange actions - this.addAction('toFront', function() { - graph.orderCells(false); - }, null, null, 'Ctrl+F'); - this.addAction('toBack', function() { - graph.orderCells(true); - }, null, null, 'Ctrl+B'); - this.addAction('group', function() { - graph.setSelectionCell(graph.groupCells(null, 0)); - }, null, null, 'Ctrl+G'); - this.addAction('ungroup', function() { - graph.setSelectionCells(graph.ungroupCells()); - }, null, null, 'Ctrl+U'); - this.addAction('removeFromGroup', function() { - graph.removeCellsFromParent(); - }); - this.addAction('editLink', function() { - var cell = graph.getSelectionCell(); - var link = graph.getLinkForCell(cell); - - if (link == null) { - link = ''; - } - - link = mxUtils.prompt(mxResources.get('enterValue'), link); - - if (link != null) { - graph.setLinkForCell(cell, link); - } - }); - this.addAction('openLink', function() { - var cell = graph.getSelectionCell(); - var link = graph.getLinkForCell(cell); - - if (link != null) { - window.open(link); - } - }); - this.addAction('autosize', function() { - var cells = graph.getSelectionCells(); - - if (cells != null) { - graph.getModel().beginUpdate(); - try { - for (var i = 0; i < cells.length; i++) { - var cell = cells[i]; - - if (graph.getModel().getChildCount(cell)) { - graph.updateGroupBounds([cell], 20); - } else { - graph.updateCellSize(cell); - } - } - } finally { - graph.getModel().endUpdate(); - } - } - }); - this.addAction('wordWrap', function() { - var state = graph.getView().getState(graph.getSelectionCell()); - var value = 'wrap'; - - if (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap') { - value = null; - } - - graph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value); - }); - this.addAction('rotation', function() { - var value = '0'; - var state = graph.getView().getState(graph.getSelectionCell()); - - if (state != null) { - value = state.style[mxConstants.STYLE_ROTATION] || value; - } - - value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + - mxResources.get('rotation') + ' 0-360)', value); - - if (value != null) { - graph.setCellStyles(mxConstants.STYLE_ROTATION, value); - } - }); - this.addAction('tilt', function() { - var cells = graph.getSelectionCells(); - - if (cells != null) { - graph.getModel().beginUpdate(); - try { - for (var i = 0; i < cells.length; i++) { - var cell = cells[i]; - - if (graph.getModel().isVertex(cell) && graph.getModel().getChildCount( - cell) == 0) { - var geo = graph.getCellGeometry(cell); - - if (geo != null) { - // Rotates the size and position in the geometry - geo = geo.clone(); - geo.x += geo.width / 2 - geo.height / 2; - geo.y += geo.height / 2 - geo.width / 2; - var tmp = geo.width; - geo.width = geo.height; - geo.height = tmp; - graph.getModel().setGeometry(cell, geo); - - // Reads the current direction and advances by 90 degrees - var state = graph.view.getState(cell); - - if (state != null) { - var dir = state.style[mxConstants.STYLE_DIRECTION] || 'east' /*default*/ ; - - if (dir == 'east') { - dir = 'south'; - } else if (dir == 'south') { - dir = 'west'; - } else if (dir == 'west') { - dir = 'north'; - } else if (dir == 'north') { - dir = 'east'; - } - - graph.setCellStyles(mxConstants.STYLE_DIRECTION, dir, [cell]); - } - } - } - } - } finally { - graph.getModel().endUpdate(); - } - } - }, null, null, 'Ctrl+R'); - - // View actions - this.addAction('actualSize', function() { - graph.zoomTo(1); - }); - this.addAction('zoomIn', function() { - graph.zoomIn(); - }, null, null, 'Add'); - this.addAction('zoomOut', function() { - graph.zoomOut(); - }, null, null, 'Subtract'); - this.addAction('fitWindow', function() { - graph.fit(); - }); - - this.addAction('fitPage', mxUtils.bind(this, function() { - if (!graph.pageVisible) { - this.get('pageView').funct(); - } - - var fmt = graph.pageFormat; - var ps = graph.pageScale; - var cw = graph.container.clientWidth - 20; - var ch = graph.container.clientHeight - 20; - - var scale = Math.floor(100 * Math.min(cw / fmt.width / ps, ch / fmt.height / - ps)) / 100; - graph.zoomTo(scale); - - graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2) - ); - graph.container.scrollTop = Math.round(graph.view.translate.y * scale - - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / - 2)); - })); - this.addAction('fitPageWidth', mxUtils.bind(this, function() { - if (!graph.pageVisible) { - this.get('pageView').funct(); - } - - var fmt = graph.pageFormat; - var ps = graph.pageScale; - var cw = graph.container.clientWidth - 20; - - var scale = Math.floor(100 * cw / fmt.width / ps) / 100; - graph.zoomTo(scale); - - graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2) - ); - graph.container.scrollTop = Math.round(graph.view.translate.y * scale - - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / - 2)); - })); - this.put('customZoom', new Action(mxResources.get('custom'), function() { - var value = mxUtils.prompt(mxResources.get('enterValue') + ' (%)', - parseInt(graph.getView().getScale() * 100)); - - if (value != null && value.length > 0 && !isNaN(parseInt(value))) { - graph.zoomTo(parseInt(value) / 100); - } - })); - - // Option actions - var action = null; - action = this.addAction('grid', function() { - graph.setGridEnabled(!graph.isGridEnabled()); - editor.updateGraphComponents(); - }, null, null, 'Ctrl+Shift+G'); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.isGridEnabled(); - }); - action = this.addAction('guides', function() { - graph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled; - }); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.graphHandler.guidesEnabled; - }); - action = this.addAction('tooltips', function() { - graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled()); - }); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.tooltipHandler.isEnabled(); - }); - action = this.addAction('navigation', function() { - graph.foldingEnabled = !graph.foldingEnabled; - graph.view.revalidate(); - }); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.foldingEnabled; - }); - action = this.addAction('scrollbars', function() { - graph.scrollbars = !graph.scrollbars; - editor.updateGraphComponents(); - - if (!graph.scrollbars) { - var t = graph.view.translate; - graph.view.setTranslate(t.x - graph.container.scrollLeft / graph.view.scale, - t.y - graph.container.scrollTop / graph.view.scale); - graph.container.scrollLeft = 0; - graph.container.scrollTop = 0; - graph.sizeDidChange(); - } else { - var dx = graph.view.translate.x; - var dy = graph.view.translate.y; - - graph.view.translate.x = 0; - graph.view.translate.y = 0; - graph.sizeDidChange(); - graph.container.scrollLeft -= Math.round(dx * graph.view.scale); - graph.container.scrollTop -= Math.round(dy * graph.view.scale); - } - }, !mxClient.IS_TOUCH); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.container.style.overflow == 'auto'; - }); - action = this.addAction('pageView', mxUtils.bind(this, function() { - graph.pageVisible = !graph.pageVisible; - graph.pageBreaksVisible = graph.pageVisible; - graph.preferPageSize = graph.pageBreaksVisible; - graph.view.validate(); - graph.sizeDidChange(); - - editor.updateGraphComponents(); - editor.outline.update(); - - if (mxUtils.hasScrollbars(graph.container)) { - if (graph.pageVisible) { - graph.container.scrollLeft -= 20; - graph.container.scrollTop -= 20; - } else { - graph.container.scrollLeft += 20; - graph.container.scrollTop += 20; - } - } - })); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.pageVisible; - }); - action = this.addAction('connect', function() { - graph.setConnectable(!graph.connectionHandler.isEnabled()); - }, null, null, 'Ctrl+Q'); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.connectionHandler.isEnabled(); - }); - action = this.addAction('copyConnect', function() { - graph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget()); - }); - action.setToggleAction(true); - action.setSelectedCallback(function() { - return graph.connectionHandler.isCreateTarget(); - }); - - // Help actions - this.addAction('help', function() { - var ext = ''; - - if (mxResources.isLanguageSupported(mxClient.language)) { - ext = '_' + mxClient.language; - } - - window.open("https://wiki.xcallymotion.com/display/XMD/Cally+Square"); - //window.open(RESOURCES_PATH + '/help' + ext + '.html'); - }); - this.put('about', new Action(mxResources.get('about') + ' Cally Square', - function() { - ui.showDialog(new AboutDialog(ui).container, 320, 280, true, true); - }, null, null, 'F1')); - - // Font style actions - var toggleFontStyle = mxUtils.bind(this, function(key, style) { - this.addAction(key, function() { - graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style); - }); - }); - - toggleFontStyle('bold', mxConstants.FONT_BOLD); - toggleFontStyle('italic', mxConstants.FONT_ITALIC); - toggleFontStyle('underline', mxConstants.FONT_UNDERLINE); - - // Format actions - this.addAction('shadow', function() { - graph.toggleCellStyles(mxConstants.STYLE_SHADOW); - }); - this.addAction('dashed', function() { - graph.toggleCellStyles(mxConstants.STYLE_DASHED); - }); - this.addAction('rounded', function() { - graph.toggleCellStyles(mxConstants.STYLE_ROUNDED); - }); - this.addAction('curved', function() { - graph.toggleCellStyles(mxConstants.STYLE_CURVED); - }); - this.addAction('style', function() { - var cells = graph.getSelectionCells(); - - if (cells != null && cells.length > 0) { - var model = graph.getModel(); - var style = mxUtils.prompt(mxResources.get('enterValue') + ' (' + - mxResources.get('style') + ')', - model.getStyle(cells[0]) || ''); - - if (style != null) { - graph.setCellStyle(style, cells); - } - } - }); - this.addAction('setAsDefaultEdge', function() { - graph.setDefaultEdge(graph.getSelectionCell()); - }); - this.addAction('addWaypoint', function() { - var cell = graph.getSelectionCell(); - - if (cell != null && graph.getModel().isEdge(cell)) { - var handler = editor.graph.selectionCellsHandler.getHandler(cell); - - if (handler instanceof mxEdgeHandler) { - var t = graph.view.translate; - var s = graph.view.scale; - var dx = t.x; - var dy = t.y; - - var parent = graph.getModel().getParent(cell); - var pgeo = graph.getCellGeometry(parent); - - if (graph.getModel().isVertex(parent) && pgeo != null) { - dx += pgeo.x; - dy += pgeo.y; - } - - handler.addPointAt(handler.state, graph.panningHandler.triggerX / s - dx, - graph.panningHandler.triggerY / s - dy); - } - } - }); - this.addAction('removeWaypoint', function() { - // TODO: Action should run with "this" set to action - var rmWaypointAction = ui.actions.get('removeWaypoint'); - - if (rmWaypointAction.handler != null) { - // NOTE: Popupevent handled and action updated in Menus.createPopupMenu - rmWaypointAction.handler.removePoint(rmWaypointAction.handler.state, - rmWaypointAction.index); - } - }); - this.addAction('image', function() { - function updateImage(value, w, h) { - var select = null; - var cells = graph.getSelectionCells(); - - graph.getModel().beginUpdate(); - try { - // Inserts new cell if no cell is selected - if (cells.length == 0) { - var gs = graph.getGridSize(); - cells = [graph.insertVertex(graph.getDefaultParent(), null, '', gs, gs, - w, h)]; - select = cells; - } - - graph.setCellStyles(mxConstants.STYLE_IMAGE, value, cells); - graph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells); - - if (graph.getSelectionCount() == 1) { - if (w != null && h != null) { - var cell = cells[0]; - var geo = graph.getModel().getGeometry(cell); - - if (geo != null) { - geo = geo.clone(); - geo.width = w; - geo.height = h; - graph.getModel().setGeometry(cell, geo); - } - } - } - } finally { - graph.getModel().endUpdate(); - } - - if (select != null) { - graph.setSelectionCells(select); - graph.scrollCellToVisible(select[0]); - } - }; - - var value = ''; - var state = graph.getView().getState(graph.getSelectionCell()); - - if (state != null) { - value = state.style[mxConstants.STYLE_IMAGE] || value; - } - - value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get( - 'url') + ')', value); - - if (value != null) { - if (value.length > 0) { - var img = new Image(); - - img.onload = function() { - updateImage(value, img.width, img.height); - }; - img.onerror = function() { - mxUtils.alert(mxResources.get('fileNotFound')); - }; - - img.src = value; - } - } - }); -}; - -/** - * Registers the given action under the given name. - */ -Actions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut) { - return this.put(key, new Action(mxResources.get(key), funct, enabled, iconCls, - shortcut)); -}; - -/** - * Registers the given action under the given name. - */ -Actions.prototype.put = function(name, action) { - this.actions[name] = action; - - return action; -}; - -/** - * Returns the action for the given name or null if no such action exists. - */ -Actions.prototype.get = function(name) { - return this.actions[name]; -}; - -/** - * Constructs a new action for the given parameters. - */ -function Action(label, funct, enabled, iconCls, shortcut) { - mxEventSource.call(this); - this.label = label; - this.funct = funct; - this.enabled = (enabled != null) ? enabled : true; - this.iconCls = iconCls; - this.shortcut = shortcut; -}; - -// Action inherits from mxEventSource -mxUtils.extend(Action, mxEventSource); - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Action.prototype.setEnabled = function(value) { - if (this.enabled != value) { - this.enabled = value; - this.fireEvent(new mxEventObject('stateChanged')); - } -}; - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Action.prototype.setToggleAction = function(value) { - this.toggleAction = value; -}; - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Action.prototype.setSelectedCallback = function(funct) { - this.selectedCallback = funct; -}; - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Action.prototype.isSelected = function() { - return this.selectedCallback(); -}; +var _0xde73=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x61\x63\x74\x69\x6F\x6E\x73","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x64\x69\x74\x6F\x72","\x67\x72\x61\x70\x68","\x6E\x65\x77","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x61\x64\x64\x41\x63\x74\x69\x6F\x6E","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53","\x73\x61\x76\x65\x41\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2D\x53","\x70\x75\x62\x6C\x69\x73\x68","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x50","\x76\x61\x72\x69\x61\x62\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x43\x74\x72\x6C\x2B\x45","\x65\x64\x69\x74\x46\x69\x6C\x65","\x65\x64\x69\x74","\x67\x65\x74","\x62\x69\x6E\x64","\x70\x75\x74","\x70\x72\x69\x6E\x74","\x70\x72\x69\x6E\x74\x53\x63\x72\x65\x65\x6E","\x73\x70\x72\x69\x74\x65\x2D\x70\x72\x69\x6E\x74","\x43\x74\x72\x6C\x2B\x50","\x70\x72\x65\x76\x69\x65\x77","\x73\x68\x6F\x77","\x75\x6E\x64\x6F","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x70\x72\x69\x74\x65\x2D\x75\x6E\x64\x6F","\x43\x74\x72\x6C\x2B\x5A","\x72\x65\x64\x6F","\x73\x70\x72\x69\x74\x65\x2D\x72\x65\x64\x6F","\x43\x74\x72\x6C\x2B\x59","\x63\x75\x74","\x73\x70\x72\x69\x74\x65\x2D\x63\x75\x74","\x43\x74\x72\x6C\x2B\x58","\x63\x6F\x70\x79","\x73\x70\x72\x69\x74\x65\x2D\x63\x6F\x70\x79","\x43\x74\x72\x6C\x2B\x43","\x70\x61\x73\x74\x65","\x73\x70\x72\x69\x74\x65\x2D\x70\x61\x73\x74\x65","\x43\x74\x72\x6C\x2B\x56","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x44\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x44","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x56","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x45","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x43\x74\x72\x6C\x2B\x41","\x68\x6F\x6D\x65","\x48\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x55\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x50\x61\x67\x65\x20\x44\x6F\x77\x6E","\x65\x78\x70\x61\x6E\x64","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x45\x6E\x74\x65\x72","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x42\x61\x63\x6B\x73\x70\x61\x63\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x6F\x72\x64\x65\x72\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x46","\x74\x6F\x42\x61\x63\x6B","\x43\x74\x72\x6C\x2B\x42","\x67\x72\x6F\x75\x70","\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x43\x74\x72\x6C\x2B\x47","\x75\x6E\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70\x43\x65\x6C\x6C\x73","\x43\x74\x72\x6C\x2B\x55","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x70\x72\x6F\x6D\x70\x74","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x75\x70\x64\x61\x74\x65\x47\x72\x6F\x75\x70\x42\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x43\x65\x6C\x6C\x53\x69\x7A\x65","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x77\x72\x61\x70","\x53\x54\x59\x4C\x45\x5F\x57\x48\x49\x54\x45\x5F\x53\x50\x41\x43\x45","\x73\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x30","\x53\x54\x59\x4C\x45\x5F\x52\x4F\x54\x41\x54\x49\x4F\x4E","\x20\x28","\x20\x30\x2D\x33\x36\x30\x29","\x74\x69\x6C\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x63\x6C\x6F\x6E\x65","\x78","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x79","\x73\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x76\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x44\x49\x52\x45\x43\x54\x49\x4F\x4E","\x65\x61\x73\x74","\x73\x6F\x75\x74\x68","\x77\x65\x73\x74","\x6E\x6F\x72\x74\x68","\x43\x74\x72\x6C\x2B\x52","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x41\x64\x64","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x53\x75\x62\x74\x72\x61\x63\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x66\x69\x74","\x66\x69\x74\x50\x61\x67\x65","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x66\x75\x6E\x63\x74","\x70\x61\x67\x65\x56\x69\x65\x77","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x6D\x61\x78","\x72\x6F\x75\x6E\x64","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x63\x75\x73\x74\x6F\x6D","\x20\x28\x25\x29","\x67\x65\x74\x53\x63\x61\x6C\x65","\x67\x72\x69\x64","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x43\x74\x72\x6C\x2B\x53\x68\x69\x66\x74\x2B\x47","\x73\x65\x74\x54\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x67\x75\x69\x64\x65\x73","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x72\x65\x76\x61\x6C\x69\x64\x61\x74\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x73\x63\x61\x6C\x65","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x61\x75\x74\x6F","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x76\x61\x6C\x69\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x43\x74\x72\x6C\x2B\x51","\x63\x6F\x70\x79\x43\x6F\x6E\x6E\x65\x63\x74","\x69\x73\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x68\x65\x6C\x70","\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x73\x4C\x61\x6E\x67\x75\x61\x67\x65\x53\x75\x70\x70\x6F\x72\x74\x65\x64","\x5F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x43\x61\x6C\x6C\x79\x2B\x53\x71\x75\x61\x72\x65","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x46\x31","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x46\x6C\x61\x67\x73","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x73\x68\x61\x64\x6F\x77","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x63\x75\x72\x76\x65\x64","\x29","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x73\x74\x61\x74\x65","\x74\x72\x69\x67\x67\x65\x72\x58","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x74\x72\x69\x67\x67\x65\x72\x59","\x61\x64\x64\x50\x6F\x69\x6E\x74\x41\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x72\x65\x6D\x6F\x76\x65\x50\x6F\x69\x6E\x74","\x69\x6D\x61\x67\x65","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x69\x6E\x73\x65\x72\x74\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x65\x74\x47\x65\x6F\x6D\x65\x74\x72\x79","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x53\x54\x59\x4C\x45\x5F\x49\x4D\x41\x47\x45","\x75\x72\x6C","\x6F\x6E\x6C\x6F\x61\x64","\x6F\x6E\x65\x72\x72\x6F\x72","\x66\x69\x6C\x65\x4E\x6F\x74\x46\x6F\x75\x6E\x64","\x61\x6C\x65\x72\x74","\x73\x72\x63","\x63\x61\x6C\x6C","\x6C\x61\x62\x65\x6C","\x65\x6E\x61\x62\x6C\x65\x64","\x69\x63\x6F\x6E\x43\x6C\x73","\x73\x68\x6F\x72\x74\x63\x75\x74","\x65\x78\x74\x65\x6E\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x65\x64\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64"];_0xde73[0];function Actions(_0x2859x2){this[_0xde73[1]]= _0x2859x2;this[_0xde73[2]]= new Object();this[_0xde73[3]]()}Actions[_0xde73[4]][_0xde73[3]]= function(){var _0x2859x3=this[_0xde73[1]];var _0x2859x4=_0x2859x3[_0xde73[5]];var _0x2859x5=_0x2859x4[_0xde73[6]];this[_0xde73[10]](_0xde73[7],function(){_0x2859x3[_0xde73[9]]( new NewDialog(_0x2859x3)[_0xde73[8]],300,180,true,true)});this[_0xde73[10]](_0xde73[11],function(){_0x2859x3[_0xde73[9]]( new OpenDialog(_0x2859x3)[_0xde73[8]],300,180,true,true)});this[_0xde73[10]](_0xde73[12],function(){_0x2859x3[_0xde73[13]](false)},null,null,_0xde73[14]);this[_0xde73[10]](_0xde73[15],function(){_0x2859x3[_0xde73[13]](true)},null,null,_0xde73[16]);this[_0xde73[10]](_0xde73[17],function(){_0x2859x3[_0xde73[18]](false)},null,null,_0xde73[19]);this[_0xde73[10]](_0xde73[20],function(){_0x2859x3[_0xde73[9]]( new VariableDialog(_0x2859x3)[_0xde73[8]],300,180,true,true)});this[_0xde73[10]](_0xde73[21],function(){_0x2859x3[_0xde73[9]]( new DescriptionDialog(_0x2859x3)[_0xde73[8]],300,180,true,true)});this[_0xde73[10]](_0xde73[22],function(){_0x2859x3[_0xde73[9]]( new ImportDialog(_0x2859x3)[_0xde73[8]],300,200,true,true)});this[_0xde73[10]](_0xde73[23],function(){_0x2859x3[_0xde73[9]]( new ExportDialog(_0x2859x3)[_0xde73[8]],300,200,true,true)},null,null,_0xde73[24]);this[_0xde73[29]](_0xde73[25], new Action(mxResources[_0xde73[27]](_0xde73[26]),mxUtils[_0xde73[28]](this,function(){this[_0xde73[1]][_0xde73[9]]( new EditFileDialog(_0x2859x3)[_0xde73[8]],620,420,true,true)})));this[_0xde73[10]](_0xde73[30],function(){mxUtils[_0xde73[31]](_0x2859x5)},null,_0xde73[32],_0xde73[33]);this[_0xde73[10]](_0xde73[34],function(){mxUtils[_0xde73[35]](_0x2859x5,null,10,10)});this[_0xde73[10]](_0xde73[36],function(){_0x2859x4[_0xde73[37]][_0xde73[36]]()},null,_0xde73[38],_0xde73[39]);this[_0xde73[10]](_0xde73[40],function(){_0x2859x4[_0xde73[37]][_0xde73[40]]()},null,_0xde73[41],_0xde73[42]);this[_0xde73[10]](_0xde73[43],function(){mxClipboard[_0xde73[43]](_0x2859x5)},null,_0xde73[44],_0xde73[45]);this[_0xde73[10]](_0xde73[46],function(){mxClipboard[_0xde73[46]](_0x2859x5)},null,_0xde73[47],_0xde73[48]);this[_0xde73[10]](_0xde73[49],function(){mxClipboard[_0xde73[49]](_0x2859x5)},false,_0xde73[50],_0xde73[51]);this[_0xde73[10]](_0xde73[52],function(){_0x2859x5[_0xde73[53]]()},null,null,_0xde73[54]);this[_0xde73[10]](_0xde73[55],function(){var _0x2859x6=_0x2859x5[_0xde73[56]];_0x2859x5[_0xde73[59]](_0x2859x5[_0xde73[58]](_0x2859x5[_0xde73[57]](),_0x2859x6,_0x2859x6,true))},null,null,_0xde73[60]);this[_0xde73[10]](_0xde73[61],function(){_0x2859x5[_0xde73[61]]()},null,null,_0xde73[62]);this[_0xde73[10]](_0xde73[63],function(){_0x2859x5[_0xde73[63]]()},null,null,_0xde73[64]);this[_0xde73[10]](_0xde73[65],function(){_0x2859x5[_0xde73[65]]()},null,null,_0xde73[66]);this[_0xde73[10]](_0xde73[67],function(){_0x2859x5[_0xde73[67]]()},null,null,_0xde73[68]);this[_0xde73[10]](_0xde73[69],function(){_0x2859x5[_0xde73[69]]()},null,null,_0xde73[70]);this[_0xde73[10]](_0xde73[71],function(){_0x2859x5[_0xde73[71]]()},null,null,_0xde73[72]);this[_0xde73[10]](_0xde73[73],function(){_0x2859x5[_0xde73[74]](false)},null,null,_0xde73[75]);this[_0xde73[10]](_0xde73[76],function(){_0x2859x5[_0xde73[74]](true)},null,null,_0xde73[77]);this[_0xde73[10]](_0xde73[78],function(){_0x2859x5[_0xde73[79]](false)},null,null,_0xde73[80]);this[_0xde73[10]](_0xde73[81],function(){_0x2859x5[_0xde73[79]](true)},null,null,_0xde73[82]);this[_0xde73[10]](_0xde73[83],function(){_0x2859x5[_0xde73[85]](_0x2859x5[_0xde73[84]](null,0))},null,null,_0xde73[86]);this[_0xde73[10]](_0xde73[87],function(){_0x2859x5[_0xde73[59]](_0x2859x5[_0xde73[88]]())},null,null,_0xde73[89]);this[_0xde73[10]](_0xde73[90],function(){_0x2859x5[_0xde73[91]]()});this[_0xde73[10]](_0xde73[92],function(){var _0x2859x7=_0x2859x5[_0xde73[93]]();var _0x2859x8=_0x2859x5[_0xde73[94]](_0x2859x7);if(_0x2859x8== null){_0x2859x8= _0xde73[95]};_0x2859x8= mxUtils[_0xde73[97]](mxResources[_0xde73[27]](_0xde73[96]),_0x2859x8);if(_0x2859x8!= null){_0x2859x5[_0xde73[98]](_0x2859x7,_0x2859x8)}});this[_0xde73[10]](_0xde73[99],function(){var _0x2859x7=_0x2859x5[_0xde73[93]]();var _0x2859x8=_0x2859x5[_0xde73[94]](_0x2859x7);if(_0x2859x8!= null){window[_0xde73[11]](_0x2859x8)}});this[_0xde73[10]](_0xde73[100],function(){var _0x2859x9=_0x2859x5[_0xde73[57]]();if(_0x2859x9!= null){_0x2859x5[_0xde73[102]]()[_0xde73[101]]();try{for(var _0x2859xa=0;_0x2859xa< _0x2859x9[_0xde73[103]];_0x2859xa++){var _0x2859x7=_0x2859x9[_0x2859xa];if(_0x2859x5[_0xde73[102]]()[_0xde73[104]](_0x2859x7)){_0x2859x5[_0xde73[105]]([_0x2859x7],20)}else {_0x2859x5[_0xde73[106]](_0x2859x7)}}}finally{_0x2859x5[_0xde73[102]]()[_0xde73[107]]()}}});this[_0xde73[10]](_0xde73[108],function(){var _0x2859xb=_0x2859x5[_0xde73[110]]()[_0xde73[109]](_0x2859x5[_0xde73[93]]());var _0x2859xc=_0xde73[111];if(_0x2859xb!= null&& _0x2859xb[_0xde73[113]][mxConstants[_0xde73[112]]]== _0xde73[111]){_0x2859xc= null};_0x2859x5[_0xde73[114]](mxConstants.STYLE_WHITE_SPACE,_0x2859xc)});this[_0xde73[10]](_0xde73[115],function(){var _0x2859xc=_0xde73[116];var _0x2859xb=_0x2859x5[_0xde73[110]]()[_0xde73[109]](_0x2859x5[_0xde73[93]]());if(_0x2859xb!= null){_0x2859xc= _0x2859xb[_0xde73[113]][mxConstants[_0xde73[117]]]|| _0x2859xc};_0x2859xc= mxUtils[_0xde73[97]](mxResources[_0xde73[27]](_0xde73[96])+ _0xde73[118]+ mxResources[_0xde73[27]](_0xde73[115])+ _0xde73[119],_0x2859xc);if(_0x2859xc!= null){_0x2859x5[_0xde73[114]](mxConstants.STYLE_ROTATION,_0x2859xc)}});this[_0xde73[10]](_0xde73[120],function(){var _0x2859x9=_0x2859x5[_0xde73[57]]();if(_0x2859x9!= null){_0x2859x5[_0xde73[102]]()[_0xde73[101]]();try{for(var _0x2859xa=0;_0x2859xa< _0x2859x9[_0xde73[103]];_0x2859xa++){var _0x2859x7=_0x2859x9[_0x2859xa];if(_0x2859x5[_0xde73[102]]()[_0xde73[121]](_0x2859x7)&& _0x2859x5[_0xde73[102]]()[_0xde73[104]](_0x2859x7)== 0){var _0x2859xd=_0x2859x5[_0xde73[122]](_0x2859x7);if(_0x2859xd!= null){_0x2859xd= _0x2859xd[_0xde73[123]]();_0x2859xd[_0xde73[124]]+= _0x2859xd[_0xde73[125]]/ 2- _0x2859xd[_0xde73[126]]/ 2;_0x2859xd[_0xde73[127]]+= _0x2859xd[_0xde73[126]]/ 2- _0x2859xd[_0xde73[125]]/ 2;var _0x2859xe=_0x2859xd[_0xde73[125]];_0x2859xd[_0xde73[125]]= _0x2859xd[_0xde73[126]];_0x2859xd[_0xde73[126]]= _0x2859xe;_0x2859x5[_0xde73[102]]()[_0xde73[128]](_0x2859x7,_0x2859xd);var _0x2859xb=_0x2859x5[_0xde73[129]][_0xde73[109]](_0x2859x7);if(_0x2859xb!= null){var _0x2859xf=_0x2859xb[_0xde73[113]][mxConstants[_0xde73[130]]]|| _0xde73[131];if(_0x2859xf== _0xde73[131]){_0x2859xf= _0xde73[132]}else {if(_0x2859xf== _0xde73[132]){_0x2859xf= _0xde73[133]}else {if(_0x2859xf== _0xde73[133]){_0x2859xf= _0xde73[134]}else {if(_0x2859xf== _0xde73[134]){_0x2859xf= _0xde73[131]}}}};_0x2859x5[_0xde73[114]](mxConstants.STYLE_DIRECTION,_0x2859xf,[_0x2859x7])}}}}}finally{_0x2859x5[_0xde73[102]]()[_0xde73[107]]()}}},null,null,_0xde73[135]);this[_0xde73[10]](_0xde73[136],function(){_0x2859x5[_0xde73[137]](1)});this[_0xde73[10]](_0xde73[138],function(){_0x2859x5[_0xde73[138]]()},null,null,_0xde73[139]);this[_0xde73[10]](_0xde73[140],function(){_0x2859x5[_0xde73[140]]()},null,null,_0xde73[141]);this[_0xde73[10]](_0xde73[142],function(){_0x2859x5[_0xde73[143]]()});this[_0xde73[10]](_0xde73[144],mxUtils[_0xde73[28]](this,function(){if(!_0x2859x5[_0xde73[145]]){this[_0xde73[27]](_0xde73[147])[_0xde73[146]]()};var _0x2859x10=_0x2859x5[_0xde73[148]];var _0x2859x11=_0x2859x5[_0xde73[149]];var _0x2859x12=_0x2859x5[_0xde73[8]][_0xde73[150]]- 20;var _0x2859x13=_0x2859x5[_0xde73[8]][_0xde73[151]]- 20;var _0x2859x14=Math[_0xde73[153]](100* Math[_0xde73[152]](_0x2859x12/ _0x2859x10[_0xde73[125]]/ _0x2859x11,_0x2859x13/ _0x2859x10[_0xde73[126]]/ _0x2859x11))/ 100;_0x2859x5[_0xde73[137]](_0x2859x14);_0x2859x5[_0xde73[8]][_0xde73[154]]= Math[_0xde73[157]](_0x2859x5[_0xde73[129]][_0xde73[155]][_0xde73[124]]* _0x2859x14- Math[_0xde73[156]](10,(_0x2859x5[_0xde73[8]][_0xde73[150]]- _0x2859x10[_0xde73[125]]* _0x2859x11* _0x2859x14)/ 2));_0x2859x5[_0xde73[8]][_0xde73[158]]= Math[_0xde73[157]](_0x2859x5[_0xde73[129]][_0xde73[155]][_0xde73[127]]* _0x2859x14- Math[_0xde73[156]](10,(_0x2859x5[_0xde73[8]][_0xde73[151]]- _0x2859x10[_0xde73[126]]* _0x2859x11* _0x2859x14)/ 2))}));this[_0xde73[10]](_0xde73[159],mxUtils[_0xde73[28]](this,function(){if(!_0x2859x5[_0xde73[145]]){this[_0xde73[27]](_0xde73[147])[_0xde73[146]]()};var _0x2859x10=_0x2859x5[_0xde73[148]];var _0x2859x11=_0x2859x5[_0xde73[149]];var _0x2859x12=_0x2859x5[_0xde73[8]][_0xde73[150]]- 20;var _0x2859x14=Math[_0xde73[153]](100* _0x2859x12/ _0x2859x10[_0xde73[125]]/ _0x2859x11)/ 100;_0x2859x5[_0xde73[137]](_0x2859x14);_0x2859x5[_0xde73[8]][_0xde73[154]]= Math[_0xde73[157]](_0x2859x5[_0xde73[129]][_0xde73[155]][_0xde73[124]]* _0x2859x14- Math[_0xde73[156]](10,(_0x2859x5[_0xde73[8]][_0xde73[150]]- _0x2859x10[_0xde73[125]]* _0x2859x11* _0x2859x14)/ 2));_0x2859x5[_0xde73[8]][_0xde73[158]]= Math[_0xde73[157]](_0x2859x5[_0xde73[129]][_0xde73[155]][_0xde73[127]]* _0x2859x14- Math[_0xde73[156]](10,(_0x2859x5[_0xde73[8]][_0xde73[151]]- _0x2859x10[_0xde73[126]]* _0x2859x11* _0x2859x14)/ 2))}));this[_0xde73[29]](_0xde73[160], new Action(mxResources[_0xde73[27]](_0xde73[161]),function(){var _0x2859xc=mxUtils[_0xde73[97]](mxResources[_0xde73[27]](_0xde73[96])+ _0xde73[162],parseInt(_0x2859x5[_0xde73[110]]()[_0xde73[163]]()* 100));if(_0x2859xc!= null&& _0x2859xc[_0xde73[103]]> 0&& !isNaN(parseInt(_0x2859xc))){_0x2859x5[_0xde73[137]](parseInt(_0x2859xc)/ 100)}}));var _0x2859x15=null;_0x2859x15= this[_0xde73[10]](_0xde73[164],function(){_0x2859x5[_0xde73[166]](!_0x2859x5[_0xde73[165]]());_0x2859x4[_0xde73[167]]()},null,null,_0xde73[168]);_0x2859x15[_0xde73[169]](true);_0x2859x15[_0xde73[170]](function(){return _0x2859x5[_0xde73[165]]()});_0x2859x15= this[_0xde73[10]](_0xde73[171],function(){_0x2859x5[_0xde73[173]][_0xde73[172]]= !_0x2859x5[_0xde73[173]][_0xde73[172]]});_0x2859x15[_0xde73[169]](true);_0x2859x15[_0xde73[170]](function(){return _0x2859x5[_0xde73[173]][_0xde73[172]]});_0x2859x15= this[_0xde73[10]](_0xde73[174],function(){_0x2859x5[_0xde73[176]][_0xde73[177]](!_0x2859x5[_0xde73[176]][_0xde73[175]]())});_0x2859x15[_0xde73[169]](true);_0x2859x15[_0xde73[170]](function(){return _0x2859x5[_0xde73[176]][_0xde73[175]]()});_0x2859x15= this[_0xde73[10]](_0xde73[178],function(){_0x2859x5[_0xde73[179]]= !_0x2859x5[_0xde73[179]];_0x2859x5[_0xde73[129]][_0xde73[180]]()});_0x2859x15[_0xde73[169]](true);_0x2859x15[_0xde73[170]](function(){return _0x2859x5[_0xde73[179]]});_0x2859x15= this[_0xde73[10]](_0xde73[181],function(){_0x2859x5[_0xde73[181]]= !_0x2859x5[_0xde73[181]];_0x2859x4[_0xde73[167]]();if(!_0x2859x5[_0xde73[181]]){var _0x2859x16=_0x2859x5[_0xde73[129]][_0xde73[155]];_0x2859x5[_0xde73[129]][_0xde73[183]](_0x2859x16[_0xde73[124]]- _0x2859x5[_0xde73[8]][_0xde73[154]]/ _0x2859x5[_0xde73[129]][_0xde73[182]],_0x2859x16[_0xde73[127]]- _0x2859x5[_0xde73[8]][_0xde73[158]]/ _0x2859x5[_0xde73[129]][_0xde73[182]]);_0x2859x5[_0xde73[8]][_0xde73[154]]= 0;_0x2859x5[_0xde73[8]][_0xde73[158]]= 0;_0x2859x5[_0xde73[184]]()}else {var _0x2859x17=_0x2859x5[_0xde73[129]][_0xde73[155]][_0xde73[124]];var _0x2859x18=_0x2859x5[_0xde73[129]][_0xde73[155]][_0xde73[127]];_0x2859x5[_0xde73[129]][_0xde73[155]][_0xde73[124]]= 0;_0x2859x5[_0xde73[129]][_0xde73[155]][_0xde73[127]]= 0;_0x2859x5[_0xde73[184]]();_0x2859x5[_0xde73[8]][_0xde73[154]]-= Math[_0xde73[157]](_0x2859x17* _0x2859x5[_0xde73[129]][_0xde73[182]]);_0x2859x5[_0xde73[8]][_0xde73[158]]-= Math[_0xde73[157]](_0x2859x18* _0x2859x5[_0xde73[129]][_0xde73[182]])}},!mxClient.IS_TOUCH);_0x2859x15[_0xde73[169]](true);_0x2859x15[_0xde73[170]](function(){return _0x2859x5[_0xde73[8]][_0xde73[113]][_0xde73[185]]== _0xde73[186]});_0x2859x15= this[_0xde73[10]](_0xde73[147],mxUtils[_0xde73[28]](this,function(){_0x2859x5[_0xde73[145]]= !_0x2859x5[_0xde73[145]];_0x2859x5[_0xde73[187]]= _0x2859x5[_0xde73[145]];_0x2859x5[_0xde73[188]]= _0x2859x5[_0xde73[187]];_0x2859x5[_0xde73[129]][_0xde73[189]]();_0x2859x5[_0xde73[184]]();_0x2859x4[_0xde73[167]]();_0x2859x4[_0xde73[191]][_0xde73[190]]();if(mxUtils[_0xde73[192]](_0x2859x5[_0xde73[8]])){if(_0x2859x5[_0xde73[145]]){_0x2859x5[_0xde73[8]][_0xde73[154]]-= 20;_0x2859x5[_0xde73[8]][_0xde73[158]]-= 20}else {_0x2859x5[_0xde73[8]][_0xde73[154]]+= 20;_0x2859x5[_0xde73[8]][_0xde73[158]]+= 20}}}));_0x2859x15[_0xde73[169]](true);_0x2859x15[_0xde73[170]](function(){return _0x2859x5[_0xde73[145]]});_0x2859x15= this[_0xde73[10]](_0xde73[193],function(){_0x2859x5[_0xde73[195]](!_0x2859x5[_0xde73[194]][_0xde73[175]]())},null,null,_0xde73[196]);_0x2859x15[_0xde73[169]](true);_0x2859x15[_0xde73[170]](function(){return _0x2859x5[_0xde73[194]][_0xde73[175]]()});_0x2859x15= this[_0xde73[10]](_0xde73[197],function(){_0x2859x5[_0xde73[194]][_0xde73[199]](!_0x2859x5[_0xde73[194]][_0xde73[198]]())});_0x2859x15[_0xde73[169]](true);_0x2859x15[_0xde73[170]](function(){return _0x2859x5[_0xde73[194]][_0xde73[198]]()});this[_0xde73[10]](_0xde73[200],function(){var _0x2859x19=_0xde73[95];if(mxResources[_0xde73[202]](mxClient[_0xde73[201]])){_0x2859x19= _0xde73[203]+ mxClient[_0xde73[201]]};window[_0xde73[11]](_0xde73[204])});this[_0xde73[29]](_0xde73[205], new Action(mxResources[_0xde73[27]](_0xde73[205])+ _0xde73[206],function(){_0x2859x3[_0xde73[9]]( new AboutDialog(_0x2859x3)[_0xde73[8]],320,280,true,true)},null,null,_0xde73[207]));var _0x2859x1a=mxUtils[_0xde73[28]](this,function(_0x2859x1b,_0x2859x1c){this[_0xde73[10]](_0x2859x1b,function(){_0x2859x5[_0xde73[208]](mxConstants.STYLE_FONTSTYLE,_0x2859x1c)})});_0x2859x1a(_0xde73[209],mxConstants.FONT_BOLD);_0x2859x1a(_0xde73[210],mxConstants.FONT_ITALIC);_0x2859x1a(_0xde73[211],mxConstants.FONT_UNDERLINE);this[_0xde73[10]](_0xde73[212],function(){_0x2859x5[_0xde73[213]](mxConstants.STYLE_SHADOW)});this[_0xde73[10]](_0xde73[214],function(){_0x2859x5[_0xde73[213]](mxConstants.STYLE_DASHED)});this[_0xde73[10]](_0xde73[215],function(){_0x2859x5[_0xde73[213]](mxConstants.STYLE_ROUNDED)});this[_0xde73[10]](_0xde73[216],function(){_0x2859x5[_0xde73[213]](mxConstants.STYLE_CURVED)});this[_0xde73[10]](_0xde73[113],function(){var _0x2859x9=_0x2859x5[_0xde73[57]]();if(_0x2859x9!= null&& _0x2859x9[_0xde73[103]]> 0){var _0x2859x1d=_0x2859x5[_0xde73[102]]();var _0x2859x1c=mxUtils[_0xde73[97]](mxResources[_0xde73[27]](_0xde73[96])+ _0xde73[118]+ mxResources[_0xde73[27]](_0xde73[113])+ _0xde73[217],_0x2859x1d[_0xde73[218]](_0x2859x9[0])|| _0xde73[95]);if(_0x2859x1c!= null){_0x2859x5[_0xde73[219]](_0x2859x1c,_0x2859x9)}}});this[_0xde73[10]](_0xde73[220],function(){_0x2859x5[_0xde73[221]](_0x2859x5[_0xde73[93]]())});this[_0xde73[10]](_0xde73[222],function(){var _0x2859x7=_0x2859x5[_0xde73[93]]();if(_0x2859x7!= null&& _0x2859x5[_0xde73[102]]()[_0xde73[223]](_0x2859x7)){var _0x2859x1e=_0x2859x4[_0xde73[6]][_0xde73[225]][_0xde73[224]](_0x2859x7);if(_0x2859x1e instanceof mxEdgeHandler){var _0x2859x16=_0x2859x5[_0xde73[129]][_0xde73[155]];var _0x2859x6=_0x2859x5[_0xde73[129]][_0xde73[182]];var _0x2859x17=_0x2859x16[_0xde73[124]];var _0x2859x18=_0x2859x16[_0xde73[127]];var _0x2859x1f=_0x2859x5[_0xde73[102]]()[_0xde73[226]](_0x2859x7);var _0x2859x20=_0x2859x5[_0xde73[122]](_0x2859x1f);if(_0x2859x5[_0xde73[102]]()[_0xde73[121]](_0x2859x1f)&& _0x2859x20!= null){_0x2859x17+= _0x2859x20[_0xde73[124]];_0x2859x18+= _0x2859x20[_0xde73[127]]};_0x2859x1e[_0xde73[231]](_0x2859x1e[_0xde73[227]],_0x2859x5[_0xde73[229]][_0xde73[228]]/ _0x2859x6- _0x2859x17,_0x2859x5[_0xde73[229]][_0xde73[230]]/ _0x2859x6- _0x2859x18)}}});this[_0xde73[10]](_0xde73[232],function(){var _0x2859x21=_0x2859x3[_0xde73[2]][_0xde73[27]](_0xde73[232]);if(_0x2859x21[_0xde73[233]]!= null){_0x2859x21[_0xde73[233]][_0xde73[235]](_0x2859x21[_0xde73[233]][_0xde73[227]],_0x2859x21[_0xde73[234]])}});this[_0xde73[10]](_0xde73[236],function(){function _0x2859x22(_0x2859xc,_0x2859x23,_0x2859x24){var _0x2859x25=null;var _0x2859x9=_0x2859x5[_0xde73[57]]();_0x2859x5[_0xde73[102]]()[_0xde73[101]]();try{if(_0x2859x9[_0xde73[103]]== 0){var _0x2859x26=_0x2859x5[_0xde73[237]]();_0x2859x9= [_0x2859x5[_0xde73[239]](_0x2859x5[_0xde73[238]](),null,_0xde73[95],_0x2859x26,_0x2859x26,_0x2859x23,_0x2859x24)];_0x2859x25= _0x2859x9};_0x2859x5[_0xde73[114]](mxConstants.STYLE_IMAGE,_0x2859xc,_0x2859x9);_0x2859x5[_0xde73[114]](mxConstants.STYLE_SHAPE,_0xde73[236],_0x2859x9);if(_0x2859x5[_0xde73[240]]()== 1){if(_0x2859x23!= null&& _0x2859x24!= null){var _0x2859x7=_0x2859x9[0];var _0x2859xd=_0x2859x5[_0xde73[102]]()[_0xde73[241]](_0x2859x7);if(_0x2859xd!= null){_0x2859xd= _0x2859xd[_0xde73[123]]();_0x2859xd[_0xde73[125]]= _0x2859x23;_0x2859xd[_0xde73[126]]= _0x2859x24;_0x2859x5[_0xde73[102]]()[_0xde73[128]](_0x2859x7,_0x2859xd)}}}}finally{_0x2859x5[_0xde73[102]]()[_0xde73[107]]()};if(_0x2859x25!= null){_0x2859x5[_0xde73[59]](_0x2859x25);_0x2859x5[_0xde73[242]](_0x2859x25[0])}}var _0x2859xc=_0xde73[95];var _0x2859xb=_0x2859x5[_0xde73[110]]()[_0xde73[109]](_0x2859x5[_0xde73[93]]());if(_0x2859xb!= null){_0x2859xc= _0x2859xb[_0xde73[113]][mxConstants[_0xde73[243]]]|| _0x2859xc};_0x2859xc= mxUtils[_0xde73[97]](mxResources[_0xde73[27]](_0xde73[96])+ _0xde73[118]+ mxResources[_0xde73[27]](_0xde73[244])+ _0xde73[217],_0x2859xc);if(_0x2859xc!= null){if(_0x2859xc[_0xde73[103]]> 0){var _0x2859x27= new Image();_0x2859x27[_0xde73[245]]= function(){_0x2859x22(_0x2859xc,_0x2859x27[_0xde73[125]],_0x2859x27[_0xde73[126]])};_0x2859x27[_0xde73[246]]= function(){mxUtils[_0xde73[248]](mxResources[_0xde73[27]](_0xde73[247]))};_0x2859x27[_0xde73[249]]= _0x2859xc}}})};Actions[_0xde73[4]][_0xde73[10]]= function(_0x2859x1b,_0x2859x28,_0x2859x29,_0x2859x2a,_0x2859x2b){return this[_0xde73[29]](_0x2859x1b, new Action(mxResources[_0xde73[27]](_0x2859x1b),_0x2859x28,_0x2859x29,_0x2859x2a,_0x2859x2b))};Actions[_0xde73[4]][_0xde73[29]]= function(_0x2859x2c,_0x2859x15){this[_0xde73[2]][_0x2859x2c]= _0x2859x15;return _0x2859x15};Actions[_0xde73[4]][_0xde73[27]]= function(_0x2859x2c){return this[_0xde73[2]][_0x2859x2c]};function Action(_0x2859x2e,_0x2859x28,_0x2859x29,_0x2859x2a,_0x2859x2b){mxEventSource[_0xde73[250]](this);this[_0xde73[251]]= _0x2859x2e;this[_0xde73[146]]= _0x2859x28;this[_0xde73[252]]= (_0x2859x29!= null)?_0x2859x29:true;this[_0xde73[253]]= _0x2859x2a;this[_0xde73[254]]= _0x2859x2b}mxUtils[_0xde73[255]](Action,mxEventSource);Action[_0xde73[4]][_0xde73[177]]= function(_0x2859xc){if(this[_0xde73[252]]!= _0x2859xc){this[_0xde73[252]]= _0x2859xc;this[_0xde73[257]]( new mxEventObject(_0xde73[256]))}};Action[_0xde73[4]][_0xde73[169]]= function(_0x2859xc){this[_0xde73[258]]= _0x2859xc};Action[_0xde73[4]][_0xde73[170]]= function(_0x2859x28){this[_0xde73[259]]= _0x2859x28};Action[_0xde73[4]][_0xde73[260]]= function(){return this[_0xde73[259]]()} \ No newline at end of file diff --git a/public/assets/plugins/square/js/Dialogs.js b/public/assets/plugins/square/js/Dialogs.js index 17e2529..ce327fe 100644 --- a/public/assets/plugins/square/js/Dialogs.js +++ b/public/assets/plugins/square/js/Dialogs.js @@ -1,1276 +1 @@ -'use strict'; -/** - * $Id: Dialogs.js,v 1.5 2013-01-29 17:23:31 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Constructs a new dialog. - */ - -function createCheckbox(value) { - var input = document.createElement('input'); - input.setAttribute('type', 'checkbox'); - if (value) { - input.setAttribute('checked', true); - } - return input; -} - -function createDropdownFromApi(path, value, option_name, option_value, editorUi, keys, pattern) { - var req = new XMLHttpRequest(); - req.open('GET', path, false); // `false` makes the request synchronous - req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token); - req.send(null); - var res = []; - if (req.status === 200) { - res = JSON.parse(req.response); - } - var input = document.createElement('select'); - var option = document.createElement('option'); - option.text = '-- None --'; - option.value = '-1'; - input.appendChild(option); - res.rows.forEach(function(elem) { - option = document.createElement('option'); - option.text = elem[option_name]; - if (keys && pattern) { - option.value = pattern; - keys.forEach(function(key) { - option.value = option.value.replace('%' + key + '%', elem[key]); - }); - option.selected = (option.value == value); - } else { - option.value = elem[option_value]; - option.selected = (elem[option_value] == value); - } - input.appendChild(option); - }); - input.className = 'form-control select2'; - - return input; -} - -function createDropdownWithOptgroupFromApi(path, value, option_name, option_value, editorUi, propertyGroup) { - var req = new XMLHttpRequest(); - req.open('GET', path, false); // `false` makes the request synchronous - req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token); - req.send(null); - var res = []; - if (req.status === 200) { - res = JSON.parse(req.response); - } - var input = document.createElement('select'); - var option = document.createElement('option'); - option.text = '-- None --'; - option.value = '-1'; - input.appendChild(option); - - var values = _.groupBy(res.rows, propertyGroup); - - for (var group in values) { - if (values.hasOwnProperty(group)) { - var optgroup = document.createElement('optgroup'); - optgroup.label = _.capitalize(group); - - var valGroup = values[group]; - valGroup.forEach(function(elem) { - // elem is the option - option = document.createElement('option'); - option.text = elem[option_name]; - option.value = elem[option_value]; - option.selected = (elem[option_value] == value); - optgroup.appendChild(option); - }) - - input.appendChild(optgroup); - } - } - - input.className = 'form-control select2'; - - return input; -} - -function createGroupedDropdownFromApi(path, value, option_name, option_value, editorUi, associationArray) { - var req = new XMLHttpRequest(); - req.open('GET', path, false); // `false` makes the request synchronous - req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token); - req.send(null); - var res = []; - if (req.status === 200) { - res = JSON.parse(req.response); - } - var input = document.createElement('select'); - var option = document.createElement('option'); - option.text = '-- None --'; - option.value = '0'; - input.appendChild(option); - res.rows.forEach(function(elem) { - option = document.createElement('option'); - option.className = 'select-group-father'; - option.text = elem[option_name].toUpperCase(); - option.value = elem[option_value]; - option.selected = (elem[option_value] == value); - input.appendChild(option); - elem[associationArray].forEach(function(elem) { - option = document.createElement('option'); - option.className = 'select-group-son'; - option.text = '-' + _.capitalize(elem[option_name]); - option.value = elem[option_value]; - option.selected = (elem[option_value] == value); - input.appendChild(option); - }); - }) - input.className = 'form-control select2'; - - return input; -} - -function createDropdownFromArray(array, value) { - var input = document.createElement('select'); - - for (var item in array) { - var option = document.createElement('option'); - option.text = array[item]; - option.value = item; - if (value > 0 || value != '') - option.selected = (value === item) ? true : false; - - input.appendChild(option); - } - - input.className = 'form-control select2'; - - return input; -} - -function createDropdownFromTigerDialList(value) { - var input = document.createElement('select'); - - var array = []; - var request = new XMLHttpRequest(); - try { - request.open('POST', '/api/rest/list/list', false); - request.send(JSON.stringify({ - page: 1, - size: 600000 //Max items ui-grid - })); - - if (request.status === 200) { - var res = JSON.parse(request.response); - if (res.status > 0) { - var rows = res.response.RMI.rows; - for (var index in rows) { - array[rows[index].id] = rows[index].name; - } - } - } - } catch (e) { - console.log(e); - } - - for (var item in array) { - var option = document.createElement('option'); - option.text = array[item]; - option.value = item; - if (value > 0 || value != '') - option.selected = (value === item) ? true : false; - - input.appendChild(option); - } - - input.className = 'form-control select2'; - - return input; -} - -function Dialog(editorUi, elt, w, h, modal, closable, onClose) { - var dx = 0; - - if (mxClient.IS_IE && document.documentMode != 9) { - dx = 60; - } - - w += dx; - h += dx; - - var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2)); - var top = Math.max(0, Math.round((Math.max(document.body.scrollHeight, - document.documentElement.scrollHeight) - h) / 3)); - - var div = editorUi.createDiv('geDialog'); - div.className = 'modal fade in center'; - div.style.display = 'block'; - div.style.paddingRight = '12px'; - // div.style.width = w + 'px'; - // div.style.height = h + 'px'; - // div.style.left = left + 'px'; - // div.style.top = top + 'px'; - - var divModalDialog = editorUi.createDiv('geModalDialog'); - divModalDialog.className = 'modal-dialog'; - - divModalDialog.appendChild(elt); - div.appendChild(divModalDialog); - - if (this.bg == null) { - this.bg = editorUi.createDiv('background'); - this.bg.className = 'modal-backdrop fade in'; - - if (mxClient.IS_QUIRKS) { - new mxDivResizer(this.bg); - } - } - - if (modal) { - document.body.appendChild(this.bg); - } - - document.body.appendChild(div); - - this.onDialogClose = onClose; - this.container = div; -}; - -/** - * Removes the dialog from the DOM. - */ -Dialog.prototype.close = function() { - if (this.onDialogClose != null) { - this.onDialogClose(); - this.onDialogClose = null; - } - - this.container.parentNode.removeChild(this.container); - this.bg.parentNode.removeChild(this.bg); -}; - -/** - * Constructs a new open dialog. - */ -function ImportDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('import') + ' XML'); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-12'); - - var textarea = document.createElement('textarea'); - textarea.style.width = '100%'; - textarea.style.height = '374px'; - - var input = document.createElement('input'); - input.type = 'file'; - input.setAttribute('accept', 'text/xml'); - - input.addEventListener('change', function readSingleFile(evt) { - //Retrieve the first (and only!) File from the FileList object - var f = evt.target.files[0]; - console.log(f); - if (f) { - if (f.type === 'text/xml') { - var r = new FileReader(); - r.onload = function(e) { - var contents = e.target.result; - mxUtils.write(textarea, contents); - }; - r.readAsText(f); - } else { - alert('Failed to load format file'); - } - } else { - alert('Failed to load file'); - } - }, false); - - col1.appendChild(input); - col1.appendChild(textarea); - - row.appendChild(col1); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('import'), mxUtils.bind(this, - function(data) { - var doc = mxUtils.parseXml(textarea.value); - editorUi.editor.setGraphXml(doc.documentElement); - editorUi.hideDialog(); - })); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - -}; - -/** - * Constructs a new about dialog. - */ -function AboutDialog(editorUi) { - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('about') + ' Cally Square'); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var img = document.createElement('img'); - img.style.border = '0px'; - img.setAttribute('width', '176'); - img.setAttribute('width', '151'); - img.setAttribute('src', IMAGE_PATH + '/logo.png'); - body.appendChild(img); - mxUtils.br(body); - mxUtils.write(body, 'Powered by Xenialab ' + mxClient.VERSION); - mxUtils.br(body); - var link = document.createElement('a'); - link.setAttribute('href', 'http://www.callysquare.com/'); - link.setAttribute('target', '_blank'); - mxUtils.write(link, 'www.callysquare.com'); - body.appendChild(link); - mxUtils.br(body); - mxUtils.br(body); - //--- END BODY - - var close = mxUtils.button(mxResources.get('close'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; -}; - -/** - * Constructs a new save dialog. - */ -function SaveDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('saveAs')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var name = 'name'; - var id = '_' + name; - var value = editorUi.editor.getOrCreateFilename(); - - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-4'); - var col2 = editorUi.createDiv('col-md-8'); - - var label = document.createElement('label'); - label.className = 'control-label pull-right'; - mxUtils.write(label, mxResources.get(name)); - col1.appendChild(label); - - var select = document.createElement('input'); - select.setAttribute('value', value + '_copy'); - select.setAttribute('id', id) - select.className = 'form-control'; - col2.appendChild(select); - - row.appendChild(col1); - row.appendChild(col2); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('save'), function() { - editorUi.saveAs(select.value); - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename()); -}; - -/** - * Constructs a new save dialog. - */ -function NewDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('new')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var name = 'name'; - var id = '_' + name; - var value = editorUi.editor.getOrCreateFilename(); - - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-4'); - var col2 = editorUi.createDiv('col-md-8'); - - var label = document.createElement('label'); - label.className = 'control-label pull-right'; - mxUtils.write(label, mxResources.get(name)); - col1.appendChild(label); - - var select = document.createElement('input'); - select.setAttribute('value', value + '_new'); - select.setAttribute('id', id) - select.className = 'form-control'; - col2.appendChild(select); - - row.appendChild(col1); - row.appendChild(col2); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('new'), function() { - editorUi.new(select.value); - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename()); -}; - -/** - * Constructs a new description dialog. - */ -function DescriptionDialog(editorUi) { - console.log(editorUi.editor.data); - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('description')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - - var form = editorUi.createDiv('form-horizontal form-row-seperated'); - - // START DESCRIPTION field - var name = 'description'; - var id = '_' + name; - var value = editorUi.editor.data.description || ''; - var group = editorUi.createDiv('form-group'); - - var label = document.createElement('label'); - label.className = 'col-sm-4 control-label'; - mxUtils.write(label, mxResources.get(name)); - group.appendChild(label); - - var input = document.createElement('input'); - input.setAttribute('value', value); - input.className = 'form-control'; - input.setAttribute('id', id); - - var div = editorUi.createDiv('col-sm-8'); - div.appendChild(input); - - group.appendChild(div); - form.appendChild(group); - //END DESCRIPTION field - - body.appendChild(form); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('update'), function() { - editorUi.description(input.value); - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename()); -} - -/** - * Constructs a new variable dialog. - */ -function VariableDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('variable')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - - var form = editorUi.createDiv('form-horizontal form-row-seperated'); - - //NAME field - var name = 'name'; - var id = '_' + name; - var value = 'variable name'; - var group = editorUi.createDiv('form-group'); - - var label = document.createElement('label'); - label.className = 'col-sm-4 control-label'; - mxUtils.write(label, mxResources.get(name)); - group.appendChild(label); - - var input = document.createElement('input'); - input.setAttribute('value', value); - input.className = 'form-control'; - input.setAttribute('id', id); - - var div = editorUi.createDiv('col-sm-8'); - div.appendChild(input); - - group.appendChild(div); - form.appendChild(group); - //END NAME field - - //DESCRIPTION field - name = 'description'; - id = '_' + name; - value = 'variable description'; - group = editorUi.createDiv('form-group last'); - - label = document.createElement('label'); - label.className = 'col-sm-4 control-label'; - mxUtils.write(label, mxResources.get(name)); - group.appendChild(label); - - var inputDesc = document.createElement('input'); - inputDesc.setAttribute('value', value); - inputDesc.className = 'form-control'; - inputDesc.setAttribute('id', id); - - div = editorUi.createDiv('col-sm-8'); - div.appendChild(inputDesc); - - group.appendChild(div); - form.appendChild(group); - //END DESCRIPTION field - - body.appendChild(form); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('new'), function() { - editorUi.variable(input.value, inputDesc.value); - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename()); -} - -/** - * Constructs a new save dialog. - */ -function OpenDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('open')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-4'); - var col2 = editorUi.createDiv('col-md-8'); - - var label = document.createElement('label'); - label.className = 'control-label pull-right'; - mxUtils.write(label, mxResources.get('name')); - col1.appendChild(label); - - var req = new XMLHttpRequest(); - req.open('GET', '/api/square/projects', false); // `false` makes the request synchronous - req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token); - req.send(null); - var res = []; - if (req.status === 200) { - res = JSON.parse(req.response); - } - - var select = document.createElement('select'); - - for (var j = 0; j < res.length; j++) { - var option = document.createElement('option'); - option.text = res[j].name; - option.value = res[j].id; - select.appendChild(option); - } - select.className = 'form-control'; - col2.appendChild(select); - - row.appendChild(col1); - row.appendChild(col2); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('open'), function() { - console.log(select); - console.log(select.value); - window.open('square/project/' + select.value, '_blank'); - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename()); -}; -/** - * Constructs a new rename dialog. - */ -function RenameDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('rename')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-4'); - var col2 = editorUi.createDiv('col-md-8'); - - var label = document.createElement('label'); - label.className = 'control-label pull-right'; - mxUtils.write(label, mxResources.get('name')); - col1.appendChild(label); - var name = editorUi.editor.filename; - var input = document.createElement('input'); - input.setAttribute('value', name); - input.className = 'form-control'; - - col2.appendChild(input); - - row.appendChild(col1); - row.appendChild(col2); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('save'), function() { - var req = new XMLHttpRequest(); - - req.open("PUT", SAVE_URL + editorUi.editor.data.id, true); - req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - req.setRequestHeader('Authorization', 'Bearer ' + editorUi.editor.data.token); - req.send('name=' + input.value); - - req.onload = function(e) { - if (req.status === 200) { - editorUi.editor.setStatus('Project successfully renamed'); - editorUi.editor.filename = input.value; - - } else { - console.log(req.response); - editorUi.editor.setStatus(JSON.parse(req.response).errors[0].message); - } - } - req.onerror = function(e) { - mxUtils.alert(req.statusText); - }; - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; - //nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename()); -}; - -/** - * Constructs a new edit file dialog. - */ -function EditFileDialog(editorUi) { - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('edit')); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var row = editorUi.createDiv('row'); - var col1 = editorUi.createDiv('col-md-12'); - - var textarea = document.createElement('textarea'); - textarea.style.width = '100%'; - textarea.style.height = '374px'; - textarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml()); - - // Enables dropping files - if (fileSupport) { - function handleDrop(evt) { - evt.stopPropagation(); - evt.preventDefault(); - - if (evt.dataTransfer.files.length > 0) { - var file = evt.dataTransfer.files[0]; - - var reader = new FileReader(); - reader.onload = function(e) { - textarea.value = e.target.result; - }; - reader.readAsText(file); - } - }; - - function handleDragOver(evt) { - evt.stopPropagation(); - evt.preventDefault(); - }; - - // Setup the dnd listeners. - textarea.addEventListener('dragover', handleDragOver, false); - textarea.addEventListener('drop', handleDrop, false); - } - col1.appendChild(textarea); - - row.appendChild(col1); - body.appendChild(row); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('save'), function() { - var doc = mxUtils.parseXml(textarea.value); - editorUi.editor.setGraphXml(doc.documentElement); - editorUi.hideDialog(); - }); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; -}; - -/** - * Constructs a new export dialog. - */ -function ExportDialog(editorUi) { - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body form'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('export') + ' XML'); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var form = editorUi.createDiv('form-horizontal form-row-seperated'); - var group = editorUi.createDiv('form-group last'); - - var label = document.createElement('label'); - label.className = 'col-sm-4 control-label'; - mxUtils.write(label, mxResources.get('filename')); - - var input = document.createElement('input'); - input.setAttribute('value', editorUi.editor.getOrCreateFilename()); - input.className = 'form-control'; - - var div = editorUi.createDiv('col-sm-8'); - div.appendChild(input); - - group.appendChild(label); - group.appendChild(div); - form.appendChild(group); - - body.appendChild(form); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('export'), mxUtils.bind(this, - function(data) { - editorUi.save(false); - - var xml = encodeURIComponent(mxUtils.getXml(editorUi.editor.getGraphXml())); - new mxXmlRequest(SAVE_URL + editorUi.editor.data.id + '/download', - 'filename=' + input.value, 'GET').simulate(document, "_blank"); - editorUi.hideDialog(); - })); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; -}; - -/** - * Giuseppe Careri - * Constructs a new general dialog. - */ -function GeneralDialog(editorUi, cell) { - var graph = editorUi.editor.graph; - - var content = editorUi.createDiv('modal-content'); - var header = editorUi.createDiv('modal-header'); - var body = editorUi.createDiv('modal-body form modal-body-scroll'); - var footer = editorUi.createDiv('modal-footer'); - - //--- START HEADER - var title = editorUi.createHeader('h4'); - mxUtils.write(title, mxResources.get('edit') + ' ' + mxResources.get(cell.value - .nodeName)); - - var x = mxUtils.button('', function() { - editorUi.hideDialog(); - }); - x.className = 'close'; - - header.appendChild(x); - header.appendChild(title); - //--- END HEADER - - //--- START BODY - var length = cell.value.attributes.length; - var form = editorUi.createDiv('form-horizontal form-row-seperated'); - - for (var i = 0; i < length; i++) { - var name = cell.value.attributes[i].name; - var id = '_' + name; - var value = cell.value.attributes[i].value; - - var group = editorUi.createDiv((i == length - 1) ? 'form-group last' : - 'form-group'); - - var label = document.createElement('label'); - label.className = 'col-sm-4 control-label'; - mxUtils.write(label, mxResources.get(name)); - group.appendChild(label); - - var input; - - switch (name) { - case 'sip_id': - input = createDropdownWithOptgroupFromApi('/api/users/all', value, 'fullname', 'id', editorUi, 'role'); - break; - case 'queue_id': - input = createDropdownFromApi('/api/voice/queues', value, 'name', 'name', - editorUi); - break; - case 'trunk_name': - input = createDropdownFromApi('/api/trunks', value, 'name', 'name', editorUi); - break; - case 'variable_id': - input = createDropdownFromApi('/api/variables', value, 'name', 'id', - editorUi); - break; - case 'account_id': - if (cell.value.nodeName == 'sendMail') { - input = createDropdownFromApi('/api/mail/servers/out', value, 'username', 'id', - editorUi); - } else { - input = createDropdownFromApi('/api/sms/accounts', value, 'name', 'id', - editorUi); - } - break; - case 'template_id': - input = createDropdownFromApi('/api/templates', value, 'name', 'id', - editorUi); - break; - case 'context': - input = createDropdownFromApi('/api/voice/contexts', value, 'name', 'name', - editorUi); - break; - case 'mailbox': - input = createDropdownFromApi('/api/voice/voicemails', value, 'mailbox', - 'id', editorUi, ['mailbox', 'context'], '%mailbox%@%context%'); - break; - case 'model': - input = createDropdownFromArray(ISPEECHASRMODEL, value); - break; - case 'ispeech_asr_language': - input = createDropdownFromArray(ISPEECHASRLANG, value); - break; - case 'beep': - input = createDropdownFromArray(ISPEECHBEEP, value); - break; - case 'hiddendigitspos': - input = createDropdownFromArray(SECRETDIGITSPOS, value); - break; - case 'ispeech_tts_language': - input = createDropdownFromArray(ISPEECHLANG, value); - break; - case 'google_tts_language': - input = createDropdownFromArray(GOOGLETTSLANG, value); - break; - case 'intKey': - input = createDropdownFromArray(ASRINTKEYS, value); - break; - case 'recordingFormat': - input = createDropdownFromArray(RECORDINGFORMAT, value); - break; - case 'answer': - input = createDropdownFromArray(BOOLSELECT, value); - break; - case 'list_id': - input = createDropdownFromTigerDialList(value); - break; - case 'interval_id': - input = createGroupedDropdownFromApi('/api/intervals', value, 'name', 'id', - editorUi, 'SubIntervals'); - break; - case 'project_id': - input = createDropdownFromApi('/api/square/projects', value, 'name', 'id', - editorUi); - break; - case 'odbc_id': - input = createDropdownFromApi('/api/square/odbc', value, 'name', 'id', - editorUi); - break; - case 'file_id': - input = createDropdownFromApi('/api/sounds', value, 'display_name', 'id', - editorUi); - break; - case 'timeout': - case 'digit': - case 'mindigit': - case 'maxdigit': - case 'response': - case 'retry': - case 'speed': - input = document.createElement('input'); - input.setAttribute('type', 'number'); - input.setAttribute('min', 0); - input.setAttribute('max', 1000); - input.setAttribute('value', value); - input.className = 'form-control'; - break; - case 'text': - case 'key': - case 'query': - case 'condition': - case 'command': - case 'body': - input = document.createElement('textarea'); - input.innerHTML = value; - input.className = 'form-control'; - break; - case 'sms_text': - input = document.createElement('textarea'); - input.innerHTML = value; - input.className = 'form-control'; - input.setAttribute('maxlength', '160'); - break; - default: - input = document.createElement('input'); - input.setAttribute('value', value); - input.className = 'form-control'; - break; - } - - input.setAttribute('id', id); - - var div = editorUi.createDiv('col-sm-8'); - div.appendChild(input); - - // Help - if (mxResources.get('help_' + name)) { - var help = editorUi.createDiv('p'); - help.className = 'help-block'; - mxUtils.write(help, mxResources.get('help_' + name)); - div.appendChild(help); - } - - group.appendChild(div); - form.appendChild(group); - } - body.appendChild(form); - //--- END BODY - - //--- START FOOTER - var save = mxUtils.button(mxResources.get('save'), mxUtils.bind(this, - function(data) { - for (var i = 0; i < cell.value.attributes.length; i++) { - var id = '_' + cell.value.attributes[i].name; - var name = cell.value.attributes[i].name; - // console.log(name, document.getElementById(id).value); - cell.setAttribute(name, document.getElementById(id).value); - }; - graph.refresh(cell); - editorUi.hideDialog(); - })); - save.className = 'btn blue'; - - var close = mxUtils.button(mxResources.get('cancel'), function() { - editorUi.hideDialog(); - }); - close.className = 'btn default'; - - footer.appendChild(save); - footer.appendChild(close); - //--- END FOOTER - - //--- START CONTENT - content.appendChild(header); - content.appendChild(body); - content.appendChild(footer); - //--- END CONTENT - - this.container = content; -}; +var _0x78a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x69\x6E\x70\x75\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x79\x70\x65","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x68\x65\x63\x6B\x65\x64","\x47\x45\x54","\x6F\x70\x65\x6E","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x64\x61\x74\x61","\x65\x64\x69\x74\x6F\x72","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x73\x65\x6C\x65\x63\x74","\x6F\x70\x74\x69\x6F\x6E","\x74\x65\x78\x74","\x2D\x2D\x20\x4E\x6F\x6E\x65\x20\x2D\x2D","\x76\x61\x6C\x75\x65","\x2D\x31","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x25","\x72\x65\x70\x6C\x61\x63\x65","\x66\x6F\x72\x45\x61\x63\x68","\x73\x65\x6C\x65\x63\x74\x65\x64","\x72\x6F\x77\x73","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x73\x65\x6C\x65\x63\x74\x32","\x67\x72\x6F\x75\x70\x42\x79","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6F\x70\x74\x67\x72\x6F\x75\x70","\x6C\x61\x62\x65\x6C","\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65","\x30","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x66\x61\x74\x68\x65\x72","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x73\x65\x6C\x65\x63\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6F\x6E","\x2D","","\x50\x4F\x53\x54","\x2F\x61\x70\x69\x2F\x72\x65\x73\x74\x2F\x6C\x69\x73\x74\x2F\x6C\x69\x73\x74","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x52\x4D\x49","\x69\x64","\x6E\x61\x6D\x65","\x6C\x6F\x67","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x73\x63\x72\x6F\x6C\x6C\x57\x69\x64\x74\x68","\x62\x6F\x64\x79","\x72\x6F\x75\x6E\x64","\x6D\x61\x78","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x44\x69\x61\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x20\x63\x65\x6E\x74\x65\x72","\x64\x69\x73\x70\x6C\x61\x79","\x73\x74\x79\x6C\x65","\x62\x6C\x6F\x63\x6B","\x70\x61\x64\x64\x69\x6E\x67\x52\x69\x67\x68\x74","\x31\x32\x70\x78","\x67\x65\x4D\x6F\x64\x61\x6C\x44\x69\x61\x6C\x6F\x67","\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67","\x62\x67","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x6D\x6F\x64\x61\x6C\x2D\x62\x61\x63\x6B\x64\x72\x6F\x70\x20\x66\x61\x64\x65\x20\x69\x6E","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x6E\x44\x69\x61\x6C\x6F\x67\x43\x6C\x6F\x73\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x6C\x6F\x73\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x64\x61\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74","\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79","\x6D\x6F\x64\x61\x6C\x2D\x66\x6F\x6F\x74\x65\x72","\x68\x34","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x69\x6D\x70\x6F\x72\x74","\x67\x65\x74","\x20\x58\x4D\x4C","\x77\x72\x69\x74\x65","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x62\x75\x74\x74\x6F\x6E","\x72\x6F\x77","\x63\x6F\x6C\x2D\x6D\x64\x2D\x31\x32","\x74\x65\x78\x74\x61\x72\x65\x61","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x68\x65\x69\x67\x68\x74","\x33\x37\x34\x70\x78","\x66\x69\x6C\x65","\x61\x63\x63\x65\x70\x74","\x74\x65\x78\x74\x2F\x78\x6D\x6C","\x63\x68\x61\x6E\x67\x65","\x66\x69\x6C\x65\x73","\x74\x61\x72\x67\x65\x74","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x73\x75\x6C\x74","\x72\x65\x61\x64\x41\x73\x54\x65\x78\x74","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x6F\x72\x6D\x61\x74\x20\x66\x69\x6C\x65","\x46\x61\x69\x6C\x65\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64\x20\x66\x69\x6C\x65","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x62\x69\x6E\x64","\x62\x74\x6E\x20\x62\x6C\x75\x65","\x63\x61\x6E\x63\x65\x6C","\x62\x74\x6E\x20\x64\x65\x66\x61\x75\x6C\x74","\x61\x62\x6F\x75\x74","\x20\x43\x61\x6C\x6C\x79\x20\x53\x71\x75\x61\x72\x65","\x69\x6D\x67","\x62\x6F\x72\x64\x65\x72","\x30\x70\x78","\x31\x37\x36","\x31\x35\x31","\x73\x72\x63","\x2F\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x62\x72","\x50\x6F\x77\x65\x72\x65\x64\x20\x62\x79\x20\x58\x65\x6E\x69\x61\x6C\x61\x62\x20","\x56\x45\x52\x53\x49\x4F\x4E","\x61","\x68\x72\x65\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D\x2F","\x5F\x62\x6C\x61\x6E\x6B","\x77\x77\x77\x2E\x63\x61\x6C\x6C\x79\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6D","\x73\x61\x76\x65\x41\x73","\x5F","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x63\x6F\x6C\x2D\x6D\x64\x2D\x34","\x63\x6F\x6C\x2D\x6D\x64\x2D\x38","\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C\x20\x70\x75\x6C\x6C\x2D\x72\x69\x67\x68\x74","\x5F\x63\x6F\x70\x79","\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C","\x73\x61\x76\x65","\x6E\x65\x77","\x5F\x6E\x65\x77","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x2D\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x20\x66\x6F\x72\x6D\x2D\x72\x6F\x77\x2D\x73\x65\x70\x65\x72\x61\x74\x65\x64","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70","\x63\x6F\x6C\x2D\x73\x6D\x2D\x34\x20\x63\x6F\x6E\x74\x72\x6F\x6C\x2D\x6C\x61\x62\x65\x6C","\x63\x6F\x6C\x2D\x73\x6D\x2D\x38","\x75\x70\x64\x61\x74\x65","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x6E\x61\x6D\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x2D\x67\x72\x6F\x75\x70\x20\x6C\x61\x73\x74","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x2F","\x72\x65\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x50\x55\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6E\x61\x6D\x65\x3D","\x50\x72\x6F\x6A\x65\x63\x74\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x72\x65\x6E\x61\x6D\x65\x64","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72\x73","\x6F\x6E\x65\x72\x72\x6F\x72","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x6C\x65\x72\x74","\x65\x64\x69\x74","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x73\x74\x6F\x70\x50\x72\x6F\x70\x61\x67\x61\x74\x69\x6F\x6E","\x70\x72\x65\x76\x65\x6E\x74\x44\x65\x66\x61\x75\x6C\x74","\x64\x61\x74\x61\x54\x72\x61\x6E\x73\x66\x65\x72","\x64\x72\x61\x67\x6F\x76\x65\x72","\x64\x72\x6F\x70","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D","\x65\x78\x70\x6F\x72\x74","\x67\x65\x74\x58\x6D\x6C","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D","\x67\x72\x61\x70\x68","\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x20\x66\x6F\x72\x6D\x20\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x2D\x73\x63\x72\x6F\x6C\x6C","\x20","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x73\x2F\x61\x6C\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x73\x69\x70\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x71\x75\x65\x75\x65\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x73","\x74\x72\x75\x6E\x6B\x5F\x6E\x61\x6D\x65","\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x6F\x75\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x74\x65\x6D\x70\x6C\x61\x74\x65\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x63\x6F\x6E\x74\x65\x78\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x6D\x61\x69\x6C\x62\x6F\x78","\x25\x6D\x61\x69\x6C\x62\x6F\x78\x25\x40\x25\x63\x6F\x6E\x74\x65\x78\x74\x25","\x6D\x6F\x64\x65\x6C","\x69\x73\x70\x65\x65\x63\x68\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x62\x65\x65\x70","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x70\x6F\x73","\x69\x73\x70\x65\x65\x63\x68\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x67\x6F\x6F\x67\x6C\x65\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x6E\x74\x4B\x65\x79","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x61\x6E\x73\x77\x65\x72","\x6C\x69\x73\x74\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x6F\x64\x62\x63","\x6F\x64\x62\x63\x5F\x69\x64","\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x73","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x66\x69\x6C\x65\x5F\x69\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x64\x69\x67\x69\x74","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x6D\x61\x78\x64\x69\x67\x69\x74","\x72\x65\x74\x72\x79","\x6E\x75\x6D\x62\x65\x72","\x6D\x69\x6E","\x73\x70\x65\x65\x64","\x6B\x65\x79","\x71\x75\x65\x72\x79","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x63\x6F\x6D\x6D\x61\x6E\x64","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x6D\x61\x78\x6C\x65\x6E\x67\x74\x68","\x31\x36\x30","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x68\x65\x6C\x70\x5F","\x70","\x68\x65\x6C\x70\x2D\x62\x6C\x6F\x63\x6B","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x72\x65\x66\x72\x65\x73\x68"];_0x78a3[0];function createCheckbox(_0x2583x2){var _0x2583x3=document[_0x78a3[2]](_0x78a3[1]);_0x2583x3[_0x78a3[5]](_0x78a3[3],_0x78a3[4]);if(_0x2583x2){_0x2583x3[_0x78a3[5]](_0x78a3[6],true)};return _0x2583x3}function createDropdownFromApi(_0x2583x5,_0x2583x2,_0x2583x6,_0x2583x7,_0x2583x8,_0x2583x9,_0x2583xa){var _0x2583xb= new XMLHttpRequest();_0x2583xb[_0x78a3[8]](_0x78a3[7],_0x2583x5,false);_0x2583xb[_0x78a3[14]](_0x78a3[9],_0x78a3[10]+ _0x2583x8[_0x78a3[13]][_0x78a3[12]][_0x78a3[11]]);_0x2583xb[_0x78a3[15]](null);var _0x2583xc=[];if(_0x2583xb[_0x78a3[16]]=== 200){_0x2583xc= JSON[_0x78a3[18]](_0x2583xb[_0x78a3[17]])};var _0x2583x3=document[_0x78a3[2]](_0x78a3[19]);var _0x2583xd=document[_0x78a3[2]](_0x78a3[20]);_0x2583xd[_0x78a3[21]]= _0x78a3[22];_0x2583xd[_0x78a3[23]]= _0x78a3[24];_0x2583x3[_0x78a3[25]](_0x2583xd);_0x2583xc[_0x78a3[30]][_0x78a3[28]](function(_0x2583xe){_0x2583xd= document[_0x78a3[2]](_0x78a3[20]);_0x2583xd[_0x78a3[21]]= _0x2583xe[_0x2583x6];if(_0x2583x9&& _0x2583xa){_0x2583xd[_0x78a3[23]]= _0x2583xa;_0x2583x9[_0x78a3[28]](function(_0x2583xf){_0x2583xd[_0x78a3[23]]= _0x2583xd[_0x78a3[23]][_0x78a3[27]](_0x78a3[26]+ _0x2583xf+ _0x78a3[26],_0x2583xe[_0x2583xf])});_0x2583xd[_0x78a3[29]]= (_0x2583xd[_0x78a3[23]]== _0x2583x2)}else {_0x2583xd[_0x78a3[23]]= _0x2583xe[_0x2583x7];_0x2583xd[_0x78a3[29]]= (_0x2583xe[_0x2583x7]== _0x2583x2)};_0x2583x3[_0x78a3[25]](_0x2583xd)});_0x2583x3[_0x78a3[31]]= _0x78a3[32];return _0x2583x3}function createDropdownWithOptgroupFromApi(_0x2583x5,_0x2583x2,_0x2583x6,_0x2583x7,_0x2583x8,_0x2583x11){var _0x2583xb= new XMLHttpRequest();_0x2583xb[_0x78a3[8]](_0x78a3[7],_0x2583x5,false);_0x2583xb[_0x78a3[14]](_0x78a3[9],_0x78a3[10]+ _0x2583x8[_0x78a3[13]][_0x78a3[12]][_0x78a3[11]]);_0x2583xb[_0x78a3[15]](null);var _0x2583xc=[];if(_0x2583xb[_0x78a3[16]]=== 200){_0x2583xc= JSON[_0x78a3[18]](_0x2583xb[_0x78a3[17]])};var _0x2583x3=document[_0x78a3[2]](_0x78a3[19]);var _0x2583xd=document[_0x78a3[2]](_0x78a3[20]);_0x2583xd[_0x78a3[21]]= _0x78a3[22];_0x2583xd[_0x78a3[23]]= _0x78a3[24];_0x2583x3[_0x78a3[25]](_0x2583xd);var _0x2583x12=_[_0x78a3[33]](_0x2583xc[_0x78a3[30]],_0x2583x11);for(var _0x2583x13 in _0x2583x12){if(_0x2583x12[_0x78a3[34]](_0x2583x13)){var _0x2583x14=document[_0x78a3[2]](_0x78a3[35]);_0x2583x14[_0x78a3[36]]= _[_0x78a3[37]](_0x2583x13);var _0x2583x15=_0x2583x12[_0x2583x13];_0x2583x15[_0x78a3[28]](function(_0x2583xe){_0x2583xd= document[_0x78a3[2]](_0x78a3[20]);_0x2583xd[_0x78a3[21]]= _0x2583xe[_0x2583x6];_0x2583xd[_0x78a3[23]]= _0x2583xe[_0x2583x7];_0x2583xd[_0x78a3[29]]= (_0x2583xe[_0x2583x7]== _0x2583x2);_0x2583x14[_0x78a3[25]](_0x2583xd)});_0x2583x3[_0x78a3[25]](_0x2583x14)}};_0x2583x3[_0x78a3[31]]= _0x78a3[32];return _0x2583x3}function createGroupedDropdownFromApi(_0x2583x5,_0x2583x2,_0x2583x6,_0x2583x7,_0x2583x8,_0x2583x17){var _0x2583xb= new XMLHttpRequest();_0x2583xb[_0x78a3[8]](_0x78a3[7],_0x2583x5,false);_0x2583xb[_0x78a3[14]](_0x78a3[9],_0x78a3[10]+ _0x2583x8[_0x78a3[13]][_0x78a3[12]][_0x78a3[11]]);_0x2583xb[_0x78a3[15]](null);var _0x2583xc=[];if(_0x2583xb[_0x78a3[16]]=== 200){_0x2583xc= JSON[_0x78a3[18]](_0x2583xb[_0x78a3[17]])};var _0x2583x3=document[_0x78a3[2]](_0x78a3[19]);var _0x2583xd=document[_0x78a3[2]](_0x78a3[20]);_0x2583xd[_0x78a3[21]]= _0x78a3[22];_0x2583xd[_0x78a3[23]]= _0x78a3[38];_0x2583x3[_0x78a3[25]](_0x2583xd);_0x2583xc[_0x78a3[30]][_0x78a3[28]](function(_0x2583xe){_0x2583xd= document[_0x78a3[2]](_0x78a3[20]);_0x2583xd[_0x78a3[31]]= _0x78a3[39];_0x2583xd[_0x78a3[21]]= _0x2583xe[_0x2583x6][_0x78a3[40]]();_0x2583xd[_0x78a3[23]]= _0x2583xe[_0x2583x7];_0x2583xd[_0x78a3[29]]= (_0x2583xe[_0x2583x7]== _0x2583x2);_0x2583x3[_0x78a3[25]](_0x2583xd);_0x2583xe[_0x2583x17][_0x78a3[28]](function(_0x2583xe){_0x2583xd= document[_0x78a3[2]](_0x78a3[20]);_0x2583xd[_0x78a3[31]]= _0x78a3[41];_0x2583xd[_0x78a3[21]]= _0x78a3[42]+ _[_0x78a3[37]](_0x2583xe[_0x2583x6]);_0x2583xd[_0x78a3[23]]= _0x2583xe[_0x2583x7];_0x2583xd[_0x78a3[29]]= (_0x2583xe[_0x2583x7]== _0x2583x2);_0x2583x3[_0x78a3[25]](_0x2583xd)})});_0x2583x3[_0x78a3[31]]= _0x78a3[32];return _0x2583x3}function createDropdownFromArray(_0x2583x19,_0x2583x2){var _0x2583x3=document[_0x78a3[2]](_0x78a3[19]);for(var _0x2583x1a in _0x2583x19){var _0x2583xd=document[_0x78a3[2]](_0x78a3[20]);_0x2583xd[_0x78a3[21]]= _0x2583x19[_0x2583x1a];_0x2583xd[_0x78a3[23]]= _0x2583x1a;if(_0x2583x2> 0|| _0x2583x2!= _0x78a3[43]){_0x2583xd[_0x78a3[29]]= (_0x2583x2=== _0x2583x1a)?true:false};_0x2583x3[_0x78a3[25]](_0x2583xd)};_0x2583x3[_0x78a3[31]]= _0x78a3[32];return _0x2583x3}function createDropdownFromTigerDialList(_0x2583x2){var _0x2583x3=document[_0x78a3[2]](_0x78a3[19]);var _0x2583x19=[];var _0x2583x1c= new XMLHttpRequest();try{_0x2583x1c[_0x78a3[8]](_0x78a3[44],_0x78a3[45],false);_0x2583x1c[_0x78a3[15]](JSON[_0x78a3[46]]({page:1,size:600000}));if(_0x2583x1c[_0x78a3[16]]=== 200){var _0x2583xc=JSON[_0x78a3[18]](_0x2583x1c[_0x78a3[17]]);if(_0x2583xc[_0x78a3[16]]> 0){var _0x2583x1d=_0x2583xc[_0x78a3[17]][_0x78a3[47]][_0x78a3[30]];for(var _0x2583x1e in _0x2583x1d){_0x2583x19[_0x2583x1d[_0x2583x1e][_0x78a3[48]]]= _0x2583x1d[_0x2583x1e][_0x78a3[49]]}}}}catch(e){console[_0x78a3[50]](e)};for(var _0x2583x1a in _0x2583x19){var _0x2583xd=document[_0x78a3[2]](_0x78a3[20]);_0x2583xd[_0x78a3[21]]= _0x2583x19[_0x2583x1a];_0x2583xd[_0x78a3[23]]= _0x2583x1a;if(_0x2583x2> 0|| _0x2583x2!= _0x78a3[43]){_0x2583xd[_0x78a3[29]]= (_0x2583x2=== _0x2583x1a)?true:false};_0x2583x3[_0x78a3[25]](_0x2583xd)};_0x2583x3[_0x78a3[31]]= _0x78a3[32];return _0x2583x3}function Dialog(_0x2583x8,_0x2583x20,_0x2583x21,_0x2583x22,_0x2583x23,_0x2583x24,_0x2583x25){var _0x2583x26=0;if(mxClient[_0x78a3[51]]&& document[_0x78a3[52]]!= 9){_0x2583x26= 60};_0x2583x21+= _0x2583x26;_0x2583x22+= _0x2583x26;var _0x2583x27=Math[_0x78a3[56]](0,Math[_0x78a3[55]]((document[_0x78a3[54]][_0x78a3[53]]- _0x2583x21)/ 2));var _0x2583x28=Math[_0x78a3[56]](0,Math[_0x78a3[55]]((Math[_0x78a3[56]](document[_0x78a3[54]][_0x78a3[57]],document[_0x78a3[58]][_0x78a3[57]])- _0x2583x22)/ 3));var _0x2583x29=_0x2583x8[_0x78a3[60]](_0x78a3[59]);_0x2583x29[_0x78a3[31]]= _0x78a3[61];_0x2583x29[_0x78a3[63]][_0x78a3[62]]= _0x78a3[64];_0x2583x29[_0x78a3[63]][_0x78a3[65]]= _0x78a3[66];var _0x2583x2a=_0x2583x8[_0x78a3[60]](_0x78a3[67]);_0x2583x2a[_0x78a3[31]]= _0x78a3[68];_0x2583x2a[_0x78a3[25]](_0x2583x20);_0x2583x29[_0x78a3[25]](_0x2583x2a);if(this[_0x78a3[69]]== null){this[_0x78a3[69]]= _0x2583x8[_0x78a3[60]](_0x78a3[70]);this[_0x78a3[69]][_0x78a3[31]]= _0x78a3[71];if(mxClient[_0x78a3[72]]){ new mxDivResizer(this[_0x78a3[69]])}};if(_0x2583x23){document[_0x78a3[54]][_0x78a3[25]](this[_0x78a3[69]])};document[_0x78a3[54]][_0x78a3[25]](_0x2583x29);this[_0x78a3[73]]= _0x2583x25;this[_0x78a3[74]]= _0x2583x29}Dialog[_0x78a3[76]][_0x78a3[75]]= function(){if(this[_0x78a3[73]]!= null){this[_0x78a3[73]]();this[_0x78a3[73]]= null};this[_0x78a3[74]][_0x78a3[78]][_0x78a3[77]](this[_0x78a3[74]]);this[_0x78a3[69]][_0x78a3[78]][_0x78a3[77]](this[_0x78a3[69]])};function ImportDialog(_0x2583x8){var _0x2583x2c=_0x2583x8[_0x78a3[60]](_0x78a3[79]);var _0x2583x2d=_0x2583x8[_0x78a3[60]](_0x78a3[80]);var _0x2583x2e=_0x2583x8[_0x78a3[60]](_0x78a3[81]);var _0x2583x2f=_0x2583x8[_0x78a3[60]](_0x78a3[82]);var _0x2583x30=_0x2583x8[_0x78a3[84]](_0x78a3[83]);mxUtils[_0x78a3[88]](_0x2583x30,mxResources[_0x78a3[86]](_0x78a3[85])+ _0x78a3[87]);var _0x2583x31=mxUtils[_0x78a3[90]](_0x78a3[43],function(){_0x2583x8[_0x78a3[89]]()});_0x2583x31[_0x78a3[31]]= _0x78a3[75];_0x2583x2d[_0x78a3[25]](_0x2583x31);_0x2583x2d[_0x78a3[25]](_0x2583x30);var _0x2583x32=_0x2583x8[_0x78a3[60]](_0x78a3[91]);var _0x2583x33=_0x2583x8[_0x78a3[60]](_0x78a3[92]);var _0x2583x34=document[_0x78a3[2]](_0x78a3[93]);_0x2583x34[_0x78a3[63]][_0x78a3[94]]= _0x78a3[95];_0x2583x34[_0x78a3[63]][_0x78a3[96]]= _0x78a3[97];var _0x2583x3=document[_0x78a3[2]](_0x78a3[1]);_0x2583x3[_0x78a3[3]]= _0x78a3[98];_0x2583x3[_0x78a3[5]](_0x78a3[99],_0x78a3[100]);_0x2583x3[_0x78a3[109]](_0x78a3[101],function _0x2583x35(_0x2583x36){var _0x2583x37=_0x2583x36[_0x78a3[103]][_0x78a3[102]][0];console[_0x78a3[50]](_0x2583x37);if(_0x2583x37){if(_0x2583x37[_0x78a3[3]]=== _0x78a3[100]){var _0x2583x38= new FileReader();_0x2583x38[_0x78a3[104]]= function(_0x2583x39){var _0x2583x3a=_0x2583x39[_0x78a3[103]][_0x78a3[105]];mxUtils[_0x78a3[88]](_0x2583x34,_0x2583x3a)};_0x2583x38[_0x78a3[106]](_0x2583x37)}else {alert(_0x78a3[107])}}else {alert(_0x78a3[108])}},false);_0x2583x33[_0x78a3[25]](_0x2583x3);_0x2583x33[_0x78a3[25]](_0x2583x34);_0x2583x32[_0x78a3[25]](_0x2583x33);_0x2583x2e[_0x78a3[25]](_0x2583x32);var _0x2583x3b=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[85]),mxUtils[_0x78a3[112]](this,function(_0x2583x3c){var _0x2583x3d=mxUtils[_0x78a3[110]](_0x2583x34[_0x78a3[23]]);_0x2583x8[_0x78a3[13]][_0x78a3[111]](_0x2583x3d[_0x78a3[58]]);_0x2583x8[_0x78a3[89]]()}));_0x2583x3b[_0x78a3[31]]= _0x78a3[113];var _0x2583x3e=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[114]),function(){_0x2583x8[_0x78a3[89]]()});_0x2583x3e[_0x78a3[31]]= _0x78a3[115];_0x2583x2f[_0x78a3[25]](_0x2583x3b);_0x2583x2f[_0x78a3[25]](_0x2583x3e);_0x2583x2c[_0x78a3[25]](_0x2583x2d);_0x2583x2c[_0x78a3[25]](_0x2583x2e);_0x2583x2c[_0x78a3[25]](_0x2583x2f);this[_0x78a3[74]]= _0x2583x2c}function AboutDialog(_0x2583x8){var _0x2583x2c=_0x2583x8[_0x78a3[60]](_0x78a3[79]);var _0x2583x2d=_0x2583x8[_0x78a3[60]](_0x78a3[80]);var _0x2583x2e=_0x2583x8[_0x78a3[60]](_0x78a3[81]);var _0x2583x2f=_0x2583x8[_0x78a3[60]](_0x78a3[82]);var _0x2583x30=_0x2583x8[_0x78a3[84]](_0x78a3[83]);mxUtils[_0x78a3[88]](_0x2583x30,mxResources[_0x78a3[86]](_0x78a3[116])+ _0x78a3[117]);var _0x2583x31=mxUtils[_0x78a3[90]](_0x78a3[43],function(){_0x2583x8[_0x78a3[89]]()});_0x2583x31[_0x78a3[31]]= _0x78a3[75];_0x2583x2d[_0x78a3[25]](_0x2583x31);_0x2583x2d[_0x78a3[25]](_0x2583x30);var _0x2583x40=document[_0x78a3[2]](_0x78a3[118]);_0x2583x40[_0x78a3[63]][_0x78a3[119]]= _0x78a3[120];_0x2583x40[_0x78a3[5]](_0x78a3[94],_0x78a3[121]);_0x2583x40[_0x78a3[5]](_0x78a3[94],_0x78a3[122]);_0x2583x40[_0x78a3[5]](_0x78a3[123],IMAGE_PATH+ _0x78a3[124]);_0x2583x2e[_0x78a3[25]](_0x2583x40);mxUtils[_0x78a3[125]](_0x2583x2e);mxUtils[_0x78a3[88]](_0x2583x2e,_0x78a3[126]+ mxClient[_0x78a3[127]]);mxUtils[_0x78a3[125]](_0x2583x2e);var _0x2583x41=document[_0x78a3[2]](_0x78a3[128]);_0x2583x41[_0x78a3[5]](_0x78a3[129],_0x78a3[130]);_0x2583x41[_0x78a3[5]](_0x78a3[103],_0x78a3[131]);mxUtils[_0x78a3[88]](_0x2583x41,_0x78a3[132]);_0x2583x2e[_0x78a3[25]](_0x2583x41);mxUtils[_0x78a3[125]](_0x2583x2e);mxUtils[_0x78a3[125]](_0x2583x2e);var _0x2583x3e=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[75]),function(){_0x2583x8[_0x78a3[89]]()});_0x2583x3e[_0x78a3[31]]= _0x78a3[115];_0x2583x2f[_0x78a3[25]](_0x2583x3e);_0x2583x2c[_0x78a3[25]](_0x2583x2d);_0x2583x2c[_0x78a3[25]](_0x2583x2e);_0x2583x2c[_0x78a3[25]](_0x2583x2f);this[_0x78a3[74]]= _0x2583x2c}function SaveDialog(_0x2583x8){var _0x2583x2c=_0x2583x8[_0x78a3[60]](_0x78a3[79]);var _0x2583x2d=_0x2583x8[_0x78a3[60]](_0x78a3[80]);var _0x2583x2e=_0x2583x8[_0x78a3[60]](_0x78a3[81]);var _0x2583x2f=_0x2583x8[_0x78a3[60]](_0x78a3[82]);var _0x2583x30=_0x2583x8[_0x78a3[84]](_0x78a3[83]);mxUtils[_0x78a3[88]](_0x2583x30,mxResources[_0x78a3[86]](_0x78a3[133]));var _0x2583x31=mxUtils[_0x78a3[90]](_0x78a3[43],function(){_0x2583x8[_0x78a3[89]]()});_0x2583x31[_0x78a3[31]]= _0x78a3[75];_0x2583x2d[_0x78a3[25]](_0x2583x31);_0x2583x2d[_0x78a3[25]](_0x2583x30);var _0x2583x43=_0x78a3[49];var _0x2583x44=_0x78a3[134]+ _0x2583x43;var _0x2583x2=_0x2583x8[_0x78a3[13]][_0x78a3[135]]();var _0x2583x32=_0x2583x8[_0x78a3[60]](_0x78a3[91]);var _0x2583x33=_0x2583x8[_0x78a3[60]](_0x78a3[136]);var _0x2583x45=_0x2583x8[_0x78a3[60]](_0x78a3[137]);var _0x2583x46=document[_0x78a3[2]](_0x78a3[36]);_0x2583x46[_0x78a3[31]]= _0x78a3[138];mxUtils[_0x78a3[88]](_0x2583x46,mxResources[_0x78a3[86]](_0x2583x43));_0x2583x33[_0x78a3[25]](_0x2583x46);var _0x2583x47=document[_0x78a3[2]](_0x78a3[1]);_0x2583x47[_0x78a3[5]](_0x78a3[23],_0x2583x2+ _0x78a3[139]);_0x2583x47[_0x78a3[5]](_0x78a3[48],_0x2583x44);_0x2583x47[_0x78a3[31]]= _0x78a3[140];_0x2583x45[_0x78a3[25]](_0x2583x47);_0x2583x32[_0x78a3[25]](_0x2583x33);_0x2583x32[_0x78a3[25]](_0x2583x45);_0x2583x2e[_0x78a3[25]](_0x2583x32);var _0x2583x3b=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[141]),function(){_0x2583x8[_0x78a3[133]](_0x2583x47[_0x78a3[23]]);_0x2583x8[_0x78a3[89]]()});_0x2583x3b[_0x78a3[31]]= _0x78a3[113];var _0x2583x3e=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[114]),function(){_0x2583x8[_0x78a3[89]]()});_0x2583x3e[_0x78a3[31]]= _0x78a3[115];_0x2583x2f[_0x78a3[25]](_0x2583x3b);_0x2583x2f[_0x78a3[25]](_0x2583x3e);_0x2583x2c[_0x78a3[25]](_0x2583x2d);_0x2583x2c[_0x78a3[25]](_0x2583x2e);_0x2583x2c[_0x78a3[25]](_0x2583x2f);this[_0x78a3[74]]= _0x2583x2c}function NewDialog(_0x2583x8){var _0x2583x2c=_0x2583x8[_0x78a3[60]](_0x78a3[79]);var _0x2583x2d=_0x2583x8[_0x78a3[60]](_0x78a3[80]);var _0x2583x2e=_0x2583x8[_0x78a3[60]](_0x78a3[81]);var _0x2583x2f=_0x2583x8[_0x78a3[60]](_0x78a3[82]);var _0x2583x30=_0x2583x8[_0x78a3[84]](_0x78a3[83]);mxUtils[_0x78a3[88]](_0x2583x30,mxResources[_0x78a3[86]](_0x78a3[142]));var _0x2583x31=mxUtils[_0x78a3[90]](_0x78a3[43],function(){_0x2583x8[_0x78a3[89]]()});_0x2583x31[_0x78a3[31]]= _0x78a3[75];_0x2583x2d[_0x78a3[25]](_0x2583x31);_0x2583x2d[_0x78a3[25]](_0x2583x30);var _0x2583x43=_0x78a3[49];var _0x2583x44=_0x78a3[134]+ _0x2583x43;var _0x2583x2=_0x2583x8[_0x78a3[13]][_0x78a3[135]]();var _0x2583x32=_0x2583x8[_0x78a3[60]](_0x78a3[91]);var _0x2583x33=_0x2583x8[_0x78a3[60]](_0x78a3[136]);var _0x2583x45=_0x2583x8[_0x78a3[60]](_0x78a3[137]);var _0x2583x46=document[_0x78a3[2]](_0x78a3[36]);_0x2583x46[_0x78a3[31]]= _0x78a3[138];mxUtils[_0x78a3[88]](_0x2583x46,mxResources[_0x78a3[86]](_0x2583x43));_0x2583x33[_0x78a3[25]](_0x2583x46);var _0x2583x47=document[_0x78a3[2]](_0x78a3[1]);_0x2583x47[_0x78a3[5]](_0x78a3[23],_0x2583x2+ _0x78a3[143]);_0x2583x47[_0x78a3[5]](_0x78a3[48],_0x2583x44);_0x2583x47[_0x78a3[31]]= _0x78a3[140];_0x2583x45[_0x78a3[25]](_0x2583x47);_0x2583x32[_0x78a3[25]](_0x2583x33);_0x2583x32[_0x78a3[25]](_0x2583x45);_0x2583x2e[_0x78a3[25]](_0x2583x32);var _0x2583x3b=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[142]),function(){_0x2583x8[_0x78a3[142]](_0x2583x47[_0x78a3[23]]);_0x2583x8[_0x78a3[89]]()});_0x2583x3b[_0x78a3[31]]= _0x78a3[113];var _0x2583x3e=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[114]),function(){_0x2583x8[_0x78a3[89]]()});_0x2583x3e[_0x78a3[31]]= _0x78a3[115];_0x2583x2f[_0x78a3[25]](_0x2583x3b);_0x2583x2f[_0x78a3[25]](_0x2583x3e);_0x2583x2c[_0x78a3[25]](_0x2583x2d);_0x2583x2c[_0x78a3[25]](_0x2583x2e);_0x2583x2c[_0x78a3[25]](_0x2583x2f);this[_0x78a3[74]]= _0x2583x2c}function DescriptionDialog(_0x2583x8){console[_0x78a3[50]](_0x2583x8[_0x78a3[13]][_0x78a3[12]]);var _0x2583x2c=_0x2583x8[_0x78a3[60]](_0x78a3[79]);var _0x2583x2d=_0x2583x8[_0x78a3[60]](_0x78a3[80]);var _0x2583x2e=_0x2583x8[_0x78a3[60]](_0x78a3[81]);var _0x2583x2f=_0x2583x8[_0x78a3[60]](_0x78a3[82]);var _0x2583x30=_0x2583x8[_0x78a3[84]](_0x78a3[83]);mxUtils[_0x78a3[88]](_0x2583x30,mxResources[_0x78a3[86]](_0x78a3[144]));var _0x2583x31=mxUtils[_0x78a3[90]](_0x78a3[43],function(){_0x2583x8[_0x78a3[89]]()});_0x2583x31[_0x78a3[31]]= _0x78a3[75];_0x2583x2d[_0x78a3[25]](_0x2583x31);_0x2583x2d[_0x78a3[25]](_0x2583x30);var _0x2583x4a=_0x2583x8[_0x78a3[60]](_0x78a3[145]);var _0x2583x43=_0x78a3[144];var _0x2583x44=_0x78a3[134]+ _0x2583x43;var _0x2583x2=_0x2583x8[_0x78a3[13]][_0x78a3[12]][_0x78a3[144]]|| _0x78a3[43];var _0x2583x13=_0x2583x8[_0x78a3[60]](_0x78a3[146]);var _0x2583x46=document[_0x78a3[2]](_0x78a3[36]);_0x2583x46[_0x78a3[31]]= _0x78a3[147];mxUtils[_0x78a3[88]](_0x2583x46,mxResources[_0x78a3[86]](_0x2583x43));_0x2583x13[_0x78a3[25]](_0x2583x46);var _0x2583x3=document[_0x78a3[2]](_0x78a3[1]);_0x2583x3[_0x78a3[5]](_0x78a3[23],_0x2583x2);_0x2583x3[_0x78a3[31]]= _0x78a3[140];_0x2583x3[_0x78a3[5]](_0x78a3[48],_0x2583x44);var _0x2583x29=_0x2583x8[_0x78a3[60]](_0x78a3[148]);_0x2583x29[_0x78a3[25]](_0x2583x3);_0x2583x13[_0x78a3[25]](_0x2583x29);_0x2583x4a[_0x78a3[25]](_0x2583x13);_0x2583x2e[_0x78a3[25]](_0x2583x4a);var _0x2583x3b=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[149]),function(){_0x2583x8[_0x78a3[144]](_0x2583x3[_0x78a3[23]]);_0x2583x8[_0x78a3[89]]()});_0x2583x3b[_0x78a3[31]]= _0x78a3[113];var _0x2583x3e=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[114]),function(){_0x2583x8[_0x78a3[89]]()});_0x2583x3e[_0x78a3[31]]= _0x78a3[115];_0x2583x2f[_0x78a3[25]](_0x2583x3b);_0x2583x2f[_0x78a3[25]](_0x2583x3e);_0x2583x2c[_0x78a3[25]](_0x2583x2d);_0x2583x2c[_0x78a3[25]](_0x2583x2e);_0x2583x2c[_0x78a3[25]](_0x2583x2f);this[_0x78a3[74]]= _0x2583x2c}function VariableDialog(_0x2583x8){var _0x2583x2c=_0x2583x8[_0x78a3[60]](_0x78a3[79]);var _0x2583x2d=_0x2583x8[_0x78a3[60]](_0x78a3[80]);var _0x2583x2e=_0x2583x8[_0x78a3[60]](_0x78a3[81]);var _0x2583x2f=_0x2583x8[_0x78a3[60]](_0x78a3[82]);var _0x2583x30=_0x2583x8[_0x78a3[84]](_0x78a3[83]);mxUtils[_0x78a3[88]](_0x2583x30,mxResources[_0x78a3[86]](_0x78a3[150]));var _0x2583x31=mxUtils[_0x78a3[90]](_0x78a3[43],function(){_0x2583x8[_0x78a3[89]]()});_0x2583x31[_0x78a3[31]]= _0x78a3[75];_0x2583x2d[_0x78a3[25]](_0x2583x31);_0x2583x2d[_0x78a3[25]](_0x2583x30);var _0x2583x4a=_0x2583x8[_0x78a3[60]](_0x78a3[145]);var _0x2583x43=_0x78a3[49];var _0x2583x44=_0x78a3[134]+ _0x2583x43;var _0x2583x2=_0x78a3[151];var _0x2583x13=_0x2583x8[_0x78a3[60]](_0x78a3[146]);var _0x2583x46=document[_0x78a3[2]](_0x78a3[36]);_0x2583x46[_0x78a3[31]]= _0x78a3[147];mxUtils[_0x78a3[88]](_0x2583x46,mxResources[_0x78a3[86]](_0x2583x43));_0x2583x13[_0x78a3[25]](_0x2583x46);var _0x2583x3=document[_0x78a3[2]](_0x78a3[1]);_0x2583x3[_0x78a3[5]](_0x78a3[23],_0x2583x2);_0x2583x3[_0x78a3[31]]= _0x78a3[140];_0x2583x3[_0x78a3[5]](_0x78a3[48],_0x2583x44);var _0x2583x29=_0x2583x8[_0x78a3[60]](_0x78a3[148]);_0x2583x29[_0x78a3[25]](_0x2583x3);_0x2583x13[_0x78a3[25]](_0x2583x29);_0x2583x4a[_0x78a3[25]](_0x2583x13);_0x2583x43= _0x78a3[144];_0x2583x44= _0x78a3[134]+ _0x2583x43;_0x2583x2= _0x78a3[152];_0x2583x13= _0x2583x8[_0x78a3[60]](_0x78a3[153]);_0x2583x46= document[_0x78a3[2]](_0x78a3[36]);_0x2583x46[_0x78a3[31]]= _0x78a3[147];mxUtils[_0x78a3[88]](_0x2583x46,mxResources[_0x78a3[86]](_0x2583x43));_0x2583x13[_0x78a3[25]](_0x2583x46);var _0x2583x4c=document[_0x78a3[2]](_0x78a3[1]);_0x2583x4c[_0x78a3[5]](_0x78a3[23],_0x2583x2);_0x2583x4c[_0x78a3[31]]= _0x78a3[140];_0x2583x4c[_0x78a3[5]](_0x78a3[48],_0x2583x44);_0x2583x29= _0x2583x8[_0x78a3[60]](_0x78a3[148]);_0x2583x29[_0x78a3[25]](_0x2583x4c);_0x2583x13[_0x78a3[25]](_0x2583x29);_0x2583x4a[_0x78a3[25]](_0x2583x13);_0x2583x2e[_0x78a3[25]](_0x2583x4a);var _0x2583x3b=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[142]),function(){_0x2583x8[_0x78a3[150]](_0x2583x3[_0x78a3[23]],_0x2583x4c[_0x78a3[23]]);_0x2583x8[_0x78a3[89]]()});_0x2583x3b[_0x78a3[31]]= _0x78a3[113];var _0x2583x3e=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[114]),function(){_0x2583x8[_0x78a3[89]]()});_0x2583x3e[_0x78a3[31]]= _0x78a3[115];_0x2583x2f[_0x78a3[25]](_0x2583x3b);_0x2583x2f[_0x78a3[25]](_0x2583x3e);_0x2583x2c[_0x78a3[25]](_0x2583x2d);_0x2583x2c[_0x78a3[25]](_0x2583x2e);_0x2583x2c[_0x78a3[25]](_0x2583x2f);this[_0x78a3[74]]= _0x2583x2c}function OpenDialog(_0x2583x8){var _0x2583x2c=_0x2583x8[_0x78a3[60]](_0x78a3[79]);var _0x2583x2d=_0x2583x8[_0x78a3[60]](_0x78a3[80]);var _0x2583x2e=_0x2583x8[_0x78a3[60]](_0x78a3[81]);var _0x2583x2f=_0x2583x8[_0x78a3[60]](_0x78a3[82]);var _0x2583x30=_0x2583x8[_0x78a3[84]](_0x78a3[83]);mxUtils[_0x78a3[88]](_0x2583x30,mxResources[_0x78a3[86]](_0x78a3[8]));var _0x2583x31=mxUtils[_0x78a3[90]](_0x78a3[43],function(){_0x2583x8[_0x78a3[89]]()});_0x2583x31[_0x78a3[31]]= _0x78a3[75];_0x2583x2d[_0x78a3[25]](_0x2583x31);_0x2583x2d[_0x78a3[25]](_0x2583x30);var _0x2583x32=_0x2583x8[_0x78a3[60]](_0x78a3[91]);var _0x2583x33=_0x2583x8[_0x78a3[60]](_0x78a3[136]);var _0x2583x45=_0x2583x8[_0x78a3[60]](_0x78a3[137]);var _0x2583x46=document[_0x78a3[2]](_0x78a3[36]);_0x2583x46[_0x78a3[31]]= _0x78a3[138];mxUtils[_0x78a3[88]](_0x2583x46,mxResources[_0x78a3[86]](_0x78a3[49]));_0x2583x33[_0x78a3[25]](_0x2583x46);var _0x2583xb= new XMLHttpRequest();_0x2583xb[_0x78a3[8]](_0x78a3[7],_0x78a3[154],false);_0x2583xb[_0x78a3[14]](_0x78a3[9],_0x78a3[10]+ _0x2583x8[_0x78a3[13]][_0x78a3[12]][_0x78a3[11]]);_0x2583xb[_0x78a3[15]](null);var _0x2583xc=[];if(_0x2583xb[_0x78a3[16]]=== 200){_0x2583xc= JSON[_0x78a3[18]](_0x2583xb[_0x78a3[17]])};var _0x2583x47=document[_0x78a3[2]](_0x78a3[19]);for(var _0x2583x4e=0;_0x2583x4e< _0x2583xc[_0x78a3[155]];_0x2583x4e++){var _0x2583xd=document[_0x78a3[2]](_0x78a3[20]);_0x2583xd[_0x78a3[21]]= _0x2583xc[_0x2583x4e][_0x78a3[49]];_0x2583xd[_0x78a3[23]]= _0x2583xc[_0x2583x4e][_0x78a3[48]];_0x2583x47[_0x78a3[25]](_0x2583xd)};_0x2583x47[_0x78a3[31]]= _0x78a3[140];_0x2583x45[_0x78a3[25]](_0x2583x47);_0x2583x32[_0x78a3[25]](_0x2583x33);_0x2583x32[_0x78a3[25]](_0x2583x45);_0x2583x2e[_0x78a3[25]](_0x2583x32);var _0x2583x3b=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[8]),function(){console[_0x78a3[50]](_0x2583x47);console[_0x78a3[50]](_0x2583x47[_0x78a3[23]]);window[_0x78a3[8]](_0x78a3[156]+ _0x2583x47[_0x78a3[23]],_0x78a3[131]);_0x2583x8[_0x78a3[89]]()});_0x2583x3b[_0x78a3[31]]= _0x78a3[113];var _0x2583x3e=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[114]),function(){_0x2583x8[_0x78a3[89]]()});_0x2583x3e[_0x78a3[31]]= _0x78a3[115];_0x2583x2f[_0x78a3[25]](_0x2583x3b);_0x2583x2f[_0x78a3[25]](_0x2583x3e);_0x2583x2c[_0x78a3[25]](_0x2583x2d);_0x2583x2c[_0x78a3[25]](_0x2583x2e);_0x2583x2c[_0x78a3[25]](_0x2583x2f);this[_0x78a3[74]]= _0x2583x2c}function RenameDialog(_0x2583x8){var _0x2583x2c=_0x2583x8[_0x78a3[60]](_0x78a3[79]);var _0x2583x2d=_0x2583x8[_0x78a3[60]](_0x78a3[80]);var _0x2583x2e=_0x2583x8[_0x78a3[60]](_0x78a3[81]);var _0x2583x2f=_0x2583x8[_0x78a3[60]](_0x78a3[82]);var _0x2583x30=_0x2583x8[_0x78a3[84]](_0x78a3[83]);mxUtils[_0x78a3[88]](_0x2583x30,mxResources[_0x78a3[86]](_0x78a3[157]));var _0x2583x31=mxUtils[_0x78a3[90]](_0x78a3[43],function(){_0x2583x8[_0x78a3[89]]()});_0x2583x31[_0x78a3[31]]= _0x78a3[75];_0x2583x2d[_0x78a3[25]](_0x2583x31);_0x2583x2d[_0x78a3[25]](_0x2583x30);var _0x2583x32=_0x2583x8[_0x78a3[60]](_0x78a3[91]);var _0x2583x33=_0x2583x8[_0x78a3[60]](_0x78a3[136]);var _0x2583x45=_0x2583x8[_0x78a3[60]](_0x78a3[137]);var _0x2583x46=document[_0x78a3[2]](_0x78a3[36]);_0x2583x46[_0x78a3[31]]= _0x78a3[138];mxUtils[_0x78a3[88]](_0x2583x46,mxResources[_0x78a3[86]](_0x78a3[49]));_0x2583x33[_0x78a3[25]](_0x2583x46);var _0x2583x43=_0x2583x8[_0x78a3[13]][_0x78a3[158]];var _0x2583x3=document[_0x78a3[2]](_0x78a3[1]);_0x2583x3[_0x78a3[5]](_0x78a3[23],_0x2583x43);_0x2583x3[_0x78a3[31]]= _0x78a3[140];_0x2583x45[_0x78a3[25]](_0x2583x3);_0x2583x32[_0x78a3[25]](_0x2583x33);_0x2583x32[_0x78a3[25]](_0x2583x45);_0x2583x2e[_0x78a3[25]](_0x2583x32);var _0x2583x3b=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[141]),function(){var _0x2583xb= new XMLHttpRequest();_0x2583xb[_0x78a3[8]](_0x78a3[159],SAVE_URL+ _0x2583x8[_0x78a3[13]][_0x78a3[12]][_0x78a3[48]],true);_0x2583xb[_0x78a3[14]](_0x78a3[160],_0x78a3[161]);_0x2583xb[_0x78a3[14]](_0x78a3[9],_0x78a3[10]+ _0x2583x8[_0x78a3[13]][_0x78a3[12]][_0x78a3[11]]);_0x2583xb[_0x78a3[15]](_0x78a3[162]+ _0x2583x3[_0x78a3[23]]);_0x2583xb[_0x78a3[104]]= function(_0x2583x39){if(_0x2583xb[_0x78a3[16]]=== 200){_0x2583x8[_0x78a3[13]][_0x78a3[164]](_0x78a3[163]);_0x2583x8[_0x78a3[13]][_0x78a3[158]]= _0x2583x3[_0x78a3[23]]}else {console[_0x78a3[50]](_0x2583xb[_0x78a3[17]]);_0x2583x8[_0x78a3[13]][_0x78a3[164]](JSON[_0x78a3[18]](_0x2583xb[_0x78a3[17]])[_0x78a3[166]][0][_0x78a3[165]])}};_0x2583xb[_0x78a3[167]]= function(_0x2583x39){mxUtils[_0x78a3[169]](_0x2583xb[_0x78a3[168]])};_0x2583x8[_0x78a3[89]]()});_0x2583x3b[_0x78a3[31]]= _0x78a3[113];var _0x2583x3e=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[114]),function(){_0x2583x8[_0x78a3[89]]()});_0x2583x3e[_0x78a3[31]]= _0x78a3[115];_0x2583x2f[_0x78a3[25]](_0x2583x3b);_0x2583x2f[_0x78a3[25]](_0x2583x3e);_0x2583x2c[_0x78a3[25]](_0x2583x2d);_0x2583x2c[_0x78a3[25]](_0x2583x2e);_0x2583x2c[_0x78a3[25]](_0x2583x2f);this[_0x78a3[74]]= _0x2583x2c}function EditFileDialog(_0x2583x8){var _0x2583x2c=_0x2583x8[_0x78a3[60]](_0x78a3[79]);var _0x2583x2d=_0x2583x8[_0x78a3[60]](_0x78a3[80]);var _0x2583x2e=_0x2583x8[_0x78a3[60]](_0x78a3[81]);var _0x2583x2f=_0x2583x8[_0x78a3[60]](_0x78a3[82]);var _0x2583x30=_0x2583x8[_0x78a3[84]](_0x78a3[83]);mxUtils[_0x78a3[88]](_0x2583x30,mxResources[_0x78a3[86]](_0x78a3[170]));var _0x2583x31=mxUtils[_0x78a3[90]](_0x78a3[43],function(){_0x2583x8[_0x78a3[89]]()});_0x2583x31[_0x78a3[31]]= _0x78a3[75];_0x2583x2d[_0x78a3[25]](_0x2583x31);_0x2583x2d[_0x78a3[25]](_0x2583x30);var _0x2583x32=_0x2583x8[_0x78a3[60]](_0x78a3[91]);var _0x2583x33=_0x2583x8[_0x78a3[60]](_0x78a3[92]);var _0x2583x34=document[_0x78a3[2]](_0x78a3[93]);_0x2583x34[_0x78a3[63]][_0x78a3[94]]= _0x78a3[95];_0x2583x34[_0x78a3[63]][_0x78a3[96]]= _0x78a3[97];_0x2583x34[_0x78a3[23]]= mxUtils[_0x78a3[172]](_0x2583x8[_0x78a3[13]][_0x78a3[171]]());if(fileSupport){function _0x2583x51(_0x2583x36){_0x2583x36[_0x78a3[173]]();_0x2583x36[_0x78a3[174]]();if(_0x2583x36[_0x78a3[175]][_0x78a3[102]][_0x78a3[155]]> 0){var _0x2583x52=_0x2583x36[_0x78a3[175]][_0x78a3[102]][0];var _0x2583x53= new FileReader();_0x2583x53[_0x78a3[104]]= function(_0x2583x39){_0x2583x34[_0x78a3[23]]= _0x2583x39[_0x78a3[103]][_0x78a3[105]]};_0x2583x53[_0x78a3[106]](_0x2583x52)}}function _0x2583x54(_0x2583x36){_0x2583x36[_0x78a3[173]]();_0x2583x36[_0x78a3[174]]()}_0x2583x34[_0x78a3[109]](_0x78a3[176],_0x2583x54,false);_0x2583x34[_0x78a3[109]](_0x78a3[177],_0x2583x51,false)};_0x2583x33[_0x78a3[25]](_0x2583x34);_0x2583x32[_0x78a3[25]](_0x2583x33);_0x2583x2e[_0x78a3[25]](_0x2583x32);var _0x2583x3b=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[141]),function(){var _0x2583x3d=mxUtils[_0x78a3[110]](_0x2583x34[_0x78a3[23]]);_0x2583x8[_0x78a3[13]][_0x78a3[111]](_0x2583x3d[_0x78a3[58]]);_0x2583x8[_0x78a3[89]]()});_0x2583x3b[_0x78a3[31]]= _0x78a3[113];var _0x2583x3e=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[114]),function(){_0x2583x8[_0x78a3[89]]()});_0x2583x3e[_0x78a3[31]]= _0x78a3[115];_0x2583x2f[_0x78a3[25]](_0x2583x3b);_0x2583x2f[_0x78a3[25]](_0x2583x3e);_0x2583x2c[_0x78a3[25]](_0x2583x2d);_0x2583x2c[_0x78a3[25]](_0x2583x2e);_0x2583x2c[_0x78a3[25]](_0x2583x2f);this[_0x78a3[74]]= _0x2583x2c}function ExportDialog(_0x2583x8){var _0x2583x2c=_0x2583x8[_0x78a3[60]](_0x78a3[79]);var _0x2583x2d=_0x2583x8[_0x78a3[60]](_0x78a3[80]);var _0x2583x2e=_0x2583x8[_0x78a3[60]](_0x78a3[178]);var _0x2583x2f=_0x2583x8[_0x78a3[60]](_0x78a3[82]);var _0x2583x30=_0x2583x8[_0x78a3[84]](_0x78a3[83]);mxUtils[_0x78a3[88]](_0x2583x30,mxResources[_0x78a3[86]](_0x78a3[179])+ _0x78a3[87]);var _0x2583x31=mxUtils[_0x78a3[90]](_0x78a3[43],function(){_0x2583x8[_0x78a3[89]]()});_0x2583x31[_0x78a3[31]]= _0x78a3[75];_0x2583x2d[_0x78a3[25]](_0x2583x31);_0x2583x2d[_0x78a3[25]](_0x2583x30);var _0x2583x4a=_0x2583x8[_0x78a3[60]](_0x78a3[145]);var _0x2583x13=_0x2583x8[_0x78a3[60]](_0x78a3[153]);var _0x2583x46=document[_0x78a3[2]](_0x78a3[36]);_0x2583x46[_0x78a3[31]]= _0x78a3[147];mxUtils[_0x78a3[88]](_0x2583x46,mxResources[_0x78a3[86]](_0x78a3[158]));var _0x2583x3=document[_0x78a3[2]](_0x78a3[1]);_0x2583x3[_0x78a3[5]](_0x78a3[23],_0x2583x8[_0x78a3[13]][_0x78a3[135]]());_0x2583x3[_0x78a3[31]]= _0x78a3[140];var _0x2583x29=_0x2583x8[_0x78a3[60]](_0x78a3[148]);_0x2583x29[_0x78a3[25]](_0x2583x3);_0x2583x13[_0x78a3[25]](_0x2583x46);_0x2583x13[_0x78a3[25]](_0x2583x29);_0x2583x4a[_0x78a3[25]](_0x2583x13);_0x2583x2e[_0x78a3[25]](_0x2583x4a);var _0x2583x3b=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[179]),mxUtils[_0x78a3[112]](this,function(_0x2583x3c){_0x2583x8[_0x78a3[141]](false);var _0x2583x56=encodeURIComponent(mxUtils[_0x78a3[180]](_0x2583x8[_0x78a3[13]][_0x78a3[171]]())); new mxXmlRequest(SAVE_URL+ _0x2583x8[_0x78a3[13]][_0x78a3[12]][_0x78a3[48]]+ _0x78a3[182],_0x78a3[183]+ _0x2583x3[_0x78a3[23]],_0x78a3[7])[_0x78a3[181]](document,_0x78a3[131]);_0x2583x8[_0x78a3[89]]()}));_0x2583x3b[_0x78a3[31]]= _0x78a3[113];var _0x2583x3e=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[114]),function(){_0x2583x8[_0x78a3[89]]()});_0x2583x3e[_0x78a3[31]]= _0x78a3[115];_0x2583x2f[_0x78a3[25]](_0x2583x3b);_0x2583x2f[_0x78a3[25]](_0x2583x3e);_0x2583x2c[_0x78a3[25]](_0x2583x2d);_0x2583x2c[_0x78a3[25]](_0x2583x2e);_0x2583x2c[_0x78a3[25]](_0x2583x2f);this[_0x78a3[74]]= _0x2583x2c}function GeneralDialog(_0x2583x8,_0x2583x58){var _0x2583x59=_0x2583x8[_0x78a3[13]][_0x78a3[184]];var _0x2583x2c=_0x2583x8[_0x78a3[60]](_0x78a3[79]);var _0x2583x2d=_0x2583x8[_0x78a3[60]](_0x78a3[80]);var _0x2583x2e=_0x2583x8[_0x78a3[60]](_0x78a3[185]);var _0x2583x2f=_0x2583x8[_0x78a3[60]](_0x78a3[82]);var _0x2583x30=_0x2583x8[_0x78a3[84]](_0x78a3[83]);mxUtils[_0x78a3[88]](_0x2583x30,mxResources[_0x78a3[86]](_0x78a3[170])+ _0x78a3[186]+ mxResources[_0x78a3[86]](_0x2583x58[_0x78a3[23]][_0x78a3[187]]));var _0x2583x31=mxUtils[_0x78a3[90]](_0x78a3[43],function(){_0x2583x8[_0x78a3[89]]()});_0x2583x31[_0x78a3[31]]= _0x78a3[75];_0x2583x2d[_0x78a3[25]](_0x2583x31);_0x2583x2d[_0x78a3[25]](_0x2583x30);var _0x2583x5a=_0x2583x58[_0x78a3[23]][_0x78a3[188]][_0x78a3[155]];var _0x2583x4a=_0x2583x8[_0x78a3[60]](_0x78a3[145]);for(var _0x2583x5b=0;_0x2583x5b< _0x2583x5a;_0x2583x5b++){var _0x2583x43=_0x2583x58[_0x78a3[23]][_0x78a3[188]][_0x2583x5b][_0x78a3[49]];var _0x2583x44=_0x78a3[134]+ _0x2583x43;var _0x2583x2=_0x2583x58[_0x78a3[23]][_0x78a3[188]][_0x2583x5b][_0x78a3[23]];var _0x2583x13=_0x2583x8[_0x78a3[60]]((_0x2583x5b== _0x2583x5a- 1)?_0x78a3[153]:_0x78a3[146]);var _0x2583x46=document[_0x78a3[2]](_0x78a3[36]);_0x2583x46[_0x78a3[31]]= _0x78a3[147];mxUtils[_0x78a3[88]](_0x2583x46,mxResources[_0x78a3[86]](_0x2583x43));_0x2583x13[_0x78a3[25]](_0x2583x46);var _0x2583x3;switch(_0x2583x43){case _0x78a3[192]:_0x2583x3= createDropdownWithOptgroupFromApi(_0x78a3[189],_0x2583x2,_0x78a3[190],_0x78a3[48],_0x2583x8,_0x78a3[191]);break;case _0x78a3[194]:_0x2583x3= createDropdownFromApi(_0x78a3[193],_0x2583x2,_0x78a3[49],_0x78a3[49],_0x2583x8);break;case _0x78a3[196]:_0x2583x3= createDropdownFromApi(_0x78a3[195],_0x2583x2,_0x78a3[49],_0x78a3[49],_0x2583x8);break;case _0x78a3[198]:_0x2583x3= createDropdownFromApi(_0x78a3[197],_0x2583x2,_0x78a3[49],_0x78a3[48],_0x2583x8);break;case _0x78a3[203]:if(_0x2583x58[_0x78a3[23]][_0x78a3[187]]== _0x78a3[199]){_0x2583x3= createDropdownFromApi(_0x78a3[200],_0x2583x2,_0x78a3[201],_0x78a3[48],_0x2583x8)}else {_0x2583x3= createDropdownFromApi(_0x78a3[202],_0x2583x2,_0x78a3[49],_0x78a3[48],_0x2583x8)};break;case _0x78a3[205]:_0x2583x3= createDropdownFromApi(_0x78a3[204],_0x2583x2,_0x78a3[49],_0x78a3[48],_0x2583x8);break;case _0x78a3[207]:_0x2583x3= createDropdownFromApi(_0x78a3[206],_0x2583x2,_0x78a3[49],_0x78a3[49],_0x2583x8);break;case _0x78a3[209]:_0x2583x3= createDropdownFromApi(_0x78a3[208],_0x2583x2,_0x78a3[209],_0x78a3[48],_0x2583x8,[_0x78a3[209],_0x78a3[207]],_0x78a3[210]);break;case _0x78a3[211]:_0x2583x3= createDropdownFromArray(ISPEECHASRMODEL,_0x2583x2);break;case _0x78a3[212]:_0x2583x3= createDropdownFromArray(ISPEECHASRLANG,_0x2583x2);break;case _0x78a3[213]:_0x2583x3= createDropdownFromArray(ISPEECHBEEP,_0x2583x2);break;case _0x78a3[214]:_0x2583x3= createDropdownFromArray(SECRETDIGITSPOS,_0x2583x2);break;case _0x78a3[215]:_0x2583x3= createDropdownFromArray(ISPEECHLANG,_0x2583x2);break;case _0x78a3[216]:_0x2583x3= createDropdownFromArray(GOOGLETTSLANG,_0x2583x2);break;case _0x78a3[217]:_0x2583x3= createDropdownFromArray(ASRINTKEYS,_0x2583x2);break;case _0x78a3[218]:_0x2583x3= createDropdownFromArray(RECORDINGFORMAT,_0x2583x2);break;case _0x78a3[219]:_0x2583x3= createDropdownFromArray(BOOLSELECT,_0x2583x2);break;case _0x78a3[220]:_0x2583x3= createDropdownFromTigerDialList(_0x2583x2);break;case _0x78a3[223]:_0x2583x3= createGroupedDropdownFromApi(_0x78a3[221],_0x2583x2,_0x78a3[49],_0x78a3[48],_0x2583x8,_0x78a3[222]);break;case _0x78a3[224]:_0x2583x3= createDropdownFromApi(_0x78a3[154],_0x2583x2,_0x78a3[49],_0x78a3[48],_0x2583x8);break;case _0x78a3[226]:_0x2583x3= createDropdownFromApi(_0x78a3[225],_0x2583x2,_0x78a3[49],_0x78a3[48],_0x2583x8);break;case _0x78a3[229]:_0x2583x3= createDropdownFromApi(_0x78a3[227],_0x2583x2,_0x78a3[228],_0x78a3[48],_0x2583x8);break;case _0x78a3[230]:;case _0x78a3[231]:;case _0x78a3[232]:;case _0x78a3[233]:;case _0x78a3[17]:;case _0x78a3[234]:;case _0x78a3[237]:_0x2583x3= document[_0x78a3[2]](_0x78a3[1]);_0x2583x3[_0x78a3[5]](_0x78a3[3],_0x78a3[235]);_0x2583x3[_0x78a3[5]](_0x78a3[236],0);_0x2583x3[_0x78a3[5]](_0x78a3[56],1000);_0x2583x3[_0x78a3[5]](_0x78a3[23],_0x2583x2);_0x2583x3[_0x78a3[31]]= _0x78a3[140];break;case _0x78a3[21]:;case _0x78a3[238]:;case _0x78a3[239]:;case _0x78a3[240]:;case _0x78a3[241]:;case _0x78a3[54]:_0x2583x3= document[_0x78a3[2]](_0x78a3[93]);_0x2583x3[_0x78a3[242]]= _0x2583x2;_0x2583x3[_0x78a3[31]]= _0x78a3[140];break;case _0x78a3[245]:_0x2583x3= document[_0x78a3[2]](_0x78a3[93]);_0x2583x3[_0x78a3[242]]= _0x2583x2;_0x2583x3[_0x78a3[31]]= _0x78a3[140];_0x2583x3[_0x78a3[5]](_0x78a3[243],_0x78a3[244]);break;default:_0x2583x3= document[_0x78a3[2]](_0x78a3[1]);_0x2583x3[_0x78a3[5]](_0x78a3[23],_0x2583x2);_0x2583x3[_0x78a3[31]]= _0x78a3[140];break};_0x2583x3[_0x78a3[5]](_0x78a3[48],_0x2583x44);var _0x2583x29=_0x2583x8[_0x78a3[60]](_0x78a3[148]);_0x2583x29[_0x78a3[25]](_0x2583x3);if(mxResources[_0x78a3[86]](_0x78a3[246]+ _0x2583x43)){var _0x2583x5c=_0x2583x8[_0x78a3[60]](_0x78a3[247]);_0x2583x5c[_0x78a3[31]]= _0x78a3[248];mxUtils[_0x78a3[88]](_0x2583x5c,mxResources[_0x78a3[86]](_0x78a3[246]+ _0x2583x43));_0x2583x29[_0x78a3[25]](_0x2583x5c)};_0x2583x13[_0x78a3[25]](_0x2583x29);_0x2583x4a[_0x78a3[25]](_0x2583x13)};_0x2583x2e[_0x78a3[25]](_0x2583x4a);var _0x2583x3b=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[141]),mxUtils[_0x78a3[112]](this,function(_0x2583x3c){for(var _0x2583x5b=0;_0x2583x5b< _0x2583x58[_0x78a3[23]][_0x78a3[188]][_0x78a3[155]];_0x2583x5b++){var _0x2583x44=_0x78a3[134]+ _0x2583x58[_0x78a3[23]][_0x78a3[188]][_0x2583x5b][_0x78a3[49]];var _0x2583x43=_0x2583x58[_0x78a3[23]][_0x78a3[188]][_0x2583x5b][_0x78a3[49]];_0x2583x58[_0x78a3[5]](_0x2583x43,document[_0x78a3[249]](_0x2583x44)[_0x78a3[23]])};_0x2583x59[_0x78a3[250]](_0x2583x58);_0x2583x8[_0x78a3[89]]()}));_0x2583x3b[_0x78a3[31]]= _0x78a3[113];var _0x2583x3e=mxUtils[_0x78a3[90]](mxResources[_0x78a3[86]](_0x78a3[114]),function(){_0x2583x8[_0x78a3[89]]()});_0x2583x3e[_0x78a3[31]]= _0x78a3[115];_0x2583x2f[_0x78a3[25]](_0x2583x3b);_0x2583x2f[_0x78a3[25]](_0x2583x3e);_0x2583x2c[_0x78a3[25]](_0x2583x2d);_0x2583x2c[_0x78a3[25]](_0x2583x2e);_0x2583x2c[_0x78a3[25]](_0x2583x2f);this[_0x78a3[74]]= _0x2583x2c} \ No newline at end of file diff --git a/public/assets/plugins/square/js/Editor.js b/public/assets/plugins/square/js/Editor.js index 9858989..579b27d 100644 --- a/public/assets/plugins/square/js/Editor.js +++ b/public/assets/plugins/square/js/Editor.js @@ -1,888 +1 @@ -/** - * $Id: Editor.js,v 1.14 2013/03/06 17:57:10 boris Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -// Specifies if local storage should be used (eg. on the iPad which has no filesystem) -var useLocalStorage = (mxClient.IS_TOUCH || urlParams['storage'] == 'local') && typeof(localStorage) != 'undefined'; -var fileSupport = window.File != null && window.FileReader != null && window.FileList != null; - -// Specifies if connector should be shown on selected cells -var touchStyle = mxClient.IS_TOUCH || urlParams['touch'] == '1'; - -// Counts open editor tabs (must be global for cross-window access) -var counter = 0; - -// Cross-domain window access is not allowed in FF, so if we -// were opened from another domain then this will fail. -try { - var op = window; - - while (op.opener != null && !isNaN(op.opener.counter)) { - op = op.opener; - } - - // Increments the counter in the first opener in the chain - if (op != null) { - op.counter++; - counter = op.counter; - } -} catch (e) { - // ignore -} - -/** - * Editor constructor executed on page load. - */ -Editor = function() { - mxEventSource.call(this); - this.init(); - this.initStencilRegistry(); - this.graph = new Graph(); - this.outline = new mxOutline(this.graph); - this.outline.updateOnPan = true; - this.undoManager = this.createUndoManager(); - this.status = ''; - - // Contains the name which was used for the last save. Default value is null. - this.filename = null; - - this.getOrCreateFilename = function() { - return this.filename || mxResources.get('drawing', [counter]) + '.xml'; - }; - - this.getFilename = function() { - return this.filename; - }; - - // Sets the status and fires a statusChanged event - this.setStatus = function(value) { - this.status = value; - this.fireEvent(new mxEventObject('statusChanged')); - }; - - // Returns the current status - this.getStatus = function() { - return this.status; - }; - - // Contains the current modified state of the diagram. This is false for - // new diagrams and after the diagram was saved. - this.modified = false; - - // Updates modified state if graph changes - this.graphChangeListener = function() { - this.modified = true; - }; - this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function() { - this.graphChangeListener.apply(this, arguments); - })); - - // Installs dialog if browser window is closed without saving - // This must be disabled during save and image export - window.onbeforeunload = mxUtils.bind(this, function() { - if (this.modified) { - return mxResources.get('allChangesLost'); - } - }); - - // Sets persistent graph state defaults - this.graph.resetViewOnRootChange = false; - this.graph.scrollbars = true; - this.graph.background = null; -}; - -// Editor inherits from mxEventSource -mxUtils.extend(Editor, mxEventSource); - -/** - * Specifies the image URL to be used for the grid. - */ -Editor.prototype.gridImage = IMAGE_PATH + '/grid.gif'; - -/** - * Specifies the image URL to be used for the transparent background. - */ -Editor.prototype.transparentImage = IMAGE_PATH + '/transparent.gif'; - -/** - * Sets the XML node for the current diagram. - */ -Editor.prototype.setGraphXml = function(node) { - var dec = new mxCodec(node.ownerDocument); - - if (node.nodeName == 'mxGraphModel') { - this.graph.view.scale = 1; - this.graph.gridEnabled = node.getAttribute('grid') != '0'; - this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0'; - this.graph.setTooltips(node.getAttribute('tooltips') != '0'); - this.graph.setConnectable(node.getAttribute('connect') != '0'); - this.graph.foldingEnabled = node.getAttribute('fold') != '0'; - this.graph.scrollbars = node.getAttribute('scrollbars') != '0'; - - if (!this.graph.scrollbars) { - this.graph.container.scrollLeft = 0; - this.graph.container.scrollTop = 0; - this.graph.view.translate.x = Number(node.getAttribute('dx') || 0); - this.graph.view.translate.y = Number(node.getAttribute('dy') || 0); - } - - this.graph.pageVisible = node.getAttribute('page') == '1'; - this.graph.pageBreaksVisible = this.graph.pageVisible; - this.graph.preferPageSize = this.graph.pageBreaksVisible; - - // Loads the persistent state settings - var ps = node.getAttribute('pageScale'); - - if (ps != null) { - this.graph.pageScale = ps; - } else { - this.graph.pageScale = 1.5; - } - - var pw = node.getAttribute('pageWidth'); - var ph = node.getAttribute('pageHeight'); - - if (pw != null && ph != null) { - this.graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph)); - this.outline.outline.pageFormat = this.graph.pageFormat; - } - - // Loads the persistent state settings - var bg = node.getAttribute('background'); - - if (bg != null && bg.length > 0) { - this.graph.background = bg; - } - - dec.decode(node, this.graph.getModel()); - this.updateGraphComponents(); - } -}; - -/** - * Returns the XML node that represents the current diagram. - */ -Editor.prototype.getGraphXml = function() { - var enc = new mxCodec(mxUtils.createXmlDocument()); - var node = enc.encode(this.graph.getModel()); - - if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0) { - node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100); - node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100); - } - - node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0'); - node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0'); - node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0'); - node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0'); - node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0'); - node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0'); - node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0'); - node.setAttribute('pageScale', this.graph.pageScale); - node.setAttribute('pageWidth', this.graph.pageFormat.width); - node.setAttribute('pageHeight', this.graph.pageFormat.height); - - if (!this.graph.scrollbars) { - node.setAttribute('scrollbars', '0'); - } - - if (this.graph.background != null) { - node.setAttribute('background', this.graph.background); - } - - return node; -}; - -/** - * Keeps the graph container in sync with the persistent graph state - */ -Editor.prototype.updateGraphComponents = function() { - var graph = this.graph; - var outline = this.outline; - - if (graph.container != null && outline.outline.container != null) { - if (graph.background != null) { - if (graph.background == 'none') { - graph.container.style.backgroundColor = 'transparent'; - } else { - if (graph.view.backgroundPageShape != null) { - graph.view.backgroundPageShape.fill = graph.background; - graph.view.backgroundPageShape.reconfigure(); - } - - graph.container.style.backgroundColor = graph.background; - } - } else { - graph.container.style.backgroundColor = ''; - } - - if (graph.pageVisible) { - graph.container.style.backgroundColor = '#ebebeb'; - graph.container.style.borderStyle = 'solid'; - graph.container.style.borderColor = '#e5e5e5'; - graph.container.style.borderTopWidth = '1px'; - graph.container.style.borderLeftWidth = '1px'; - graph.container.style.borderRightWidth = '0px'; - graph.container.style.borderBottomWidth = '0px'; - } else { - graph.container.style.border = ''; - } - - outline.outline.container.style.backgroundColor = graph.container.style.backgroundColor; - - if (outline.outline.pageVisible != graph.pageVisible || - outline.outline.pageScale != graph.pageScale) { - outline.outline.pageScale = graph.pageScale; - outline.outline.pageVisible = graph.pageVisible; - outline.outline.view.validate(); - } - - if (graph.scrollbars && graph.container.style.overflow == 'hidden' && !touchStyle) { - graph.container.style.overflow = 'auto'; - } else if (!graph.scrollbars || touchStyle) { - graph.container.style.overflow = 'hidden'; - } - - // Transparent.gif is a workaround for focus repaint problems in IE - var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.transparentImage + ')' : 'none'; - graph.container.style.backgroundImage = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : noBackground; - - if (graph.view.backgroundPageShape != null) { - graph.view.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : 'none'; - } - } -}; - -/** - * Initializes the environment. - */ -Editor.prototype.init = function() { - // Adds stylesheet for IE6 - if (mxClient.IS_IE6) { - mxClient.link('stylesheet', CSS_PATH + '/grapheditor-ie6.css'); - } - - // Adds required resources (disables loading of fallback properties, this can only - // be used if we know that all keys are defined in the language specific file) - mxResources.loadDefaultBundle = false; - mxResources.add(RESOURCE_BASE); - - // Makes the connection hotspot smaller - mxConstants.DEFAULT_HOTSPOT = 0.3; - - var mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker; - mxConnectionHandler.prototype.createMarker = function() { - var marker = mxConnectionHandlerCreateMarker.apply(this, arguments); - - // Overrides to ignore hotspot only for target terminal - marker.intersects = mxUtils.bind(this, function(state, evt) { - if (this.isConnecting()) { - return true; - } - - return mxCellMarker.prototype.intersects.apply(marker, arguments); - }); - - return marker; - }; - - // Makes the shadow brighter - mxConstants.SHADOWCOLOR = '#d0d0d0'; - - // Changes some default colors - mxConstants.HANDLE_FILLCOLOR = '#99ccff'; - mxConstants.HANDLE_STROKECOLOR = '#0088cf'; - mxConstants.VERTEX_SELECTION_COLOR = '#00a8ff'; - mxConstants.OUTLINE_COLOR = '#00a8ff'; - mxConstants.OUTLINE_HANDLE_FILLCOLOR = '#99ccff'; - mxConstants.OUTLINE_HANDLE_STROKECOLOR = '#00a8ff'; - mxConstants.CONNECT_HANDLE_FILLCOLOR = '#cee7ff'; - mxConstants.EDGE_SELECTION_COLOR = '#00a8ff'; - mxConstants.DEFAULT_VALID_COLOR = '#00a8ff'; - mxConstants.LABEL_HANDLE_FILLCOLOR = '#cee7ff'; - mxConstants.GUIDE_COLOR = '#0088cf'; - - mxGraph.prototype.pageBreakColor = '#c0c0c0'; - mxGraph.prototype.pageScale = 1; - - // Increases default rubberband opacity (default is 20) - mxRubberband.prototype.defaultOpacity = 30; - - // Changes border color of background page shape - mxGraphView.prototype.createBackgroundPageShape = function(bounds) { - return new mxRectangleShape(bounds, this.graph.background || 'white', '#cacaca'); - }; - - // Fits the number of background pages to the graph - mxGraphView.prototype.getBackgroundPageBounds = function() { - var gb = this.getGraphBounds(); - - // Computes unscaled, untranslated graph bounds - var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0; - var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0; - var w = gb.width / this.scale; - var h = gb.height / this.scale; - - var fmt = this.graph.pageFormat; - var ps = this.graph.pageScale; - - var pw = fmt.width * ps; - var ph = fmt.height * ps; - - var x0 = Math.floor(Math.min(0, x) / pw); - var y0 = Math.floor(Math.min(0, y) / ph); - var xe = Math.ceil(Math.max(1, x + w) / pw); - var ye = Math.ceil(Math.max(1, y + h) / ph); - - var rows = xe - x0; - var cols = ye - y0; - - var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale * - (this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph); - - return bounds; - }; - - // Add panning for background page in VML - var graphPanGraph = mxGraph.prototype.panGraph; - mxGraph.prototype.panGraph = function(dx, dy) { - graphPanGraph.apply(this, arguments); - - if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) && - (!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container))) { - this.view.backgroundPageShape.node.style.marginLeft = dx + 'px'; - this.view.backgroundPageShape.node.style.marginTop = dy + 'px'; - } - }; - - var editor = this; - - // Uses HTML for background pages (to support grid background image) - mxGraphView.prototype.validateBackground = function() { - var bg = this.graph.getBackgroundImage(); - - if (bg != null) { - if (this.backgroundImage == null || this.backgroundImage.image != bg.src) { - if (this.backgroundImage != null) { - this.backgroundImage.destroy(); - } - - var bounds = new mxRectangle(0, 0, 1, 1); - - this.backgroundImage = new mxImageShape(bounds, bg.src); - this.backgroundImage.dialect = this.graph.dialect; - this.backgroundImage.init(this.backgroundPane); - this.backgroundImage.redraw(); - } - - this.redrawBackgroundImage(this.backgroundImage, bg); - } else if (this.backgroundImage != null) { - this.backgroundImage.destroy(); - this.backgroundImage = null; - } - - if (this.graph.pageVisible) { - var bounds = this.getBackgroundPageBounds(); - - if (this.backgroundPageShape == null) { - this.backgroundPageShape = this.createBackgroundPageShape(bounds); - this.backgroundPageShape.scale = 1; - this.backgroundPageShape.isShadow = true; - this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML; - this.backgroundPageShape.init(this.graph.container); - // Required for the browser to render the background page in correct order - this.graph.container.firstChild.style.position = 'absolute'; - this.graph.container.insertBefore(this.backgroundPageShape.node, this.graph.container.firstChild); - this.backgroundPageShape.redraw(); - - this.backgroundPageShape.node.className = 'geBackgroundPage'; - this.backgroundPageShape.node.style.backgroundPosition = '-1px -1px'; - - // Adds listener for double click handling on background - mxEvent.addListener(this.backgroundPageShape.node, 'dblclick', - mxUtils.bind(this, function(evt) { - this.graph.dblClick(evt); - }) - ); - - // Adds basic listeners for graph event dispatching outside of the - // container and finishing the handling of a single gesture - mxEvent.addGestureListeners(this.backgroundPageShape.node, - mxUtils.bind(this, function(evt) { - this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt)); - }), - mxUtils.bind(this, function(evt) { - // Hides the tooltip if mouse is outside container - if (this.graph.tooltipHandler != null && - this.graph.tooltipHandler.isHideOnHover()) { - this.graph.tooltipHandler.hide(); - } - - if (this.graph.isMouseDown && - !mxEvent.isConsumed(evt)) { - this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, - new mxMouseEvent(evt)); - } - }), - mxUtils.bind(this, function(evt) { - this.graph.fireMouseEvent(mxEvent.MOUSE_UP, - new mxMouseEvent(evt)); - })); - } else { - this.backgroundPageShape.scale = 1; - this.backgroundPageShape.bounds = bounds; - this.backgroundPageShape.redraw(); - } - - this.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? - 'url(' + editor.gridImage + ')' : 'none'; - } else if (this.backgroundPageShape != null) { - this.backgroundPageShape.destroy(); - this.backgroundPageShape = null; - } - }; - - // Draws page breaks only within the page - mxGraph.prototype.updatePageBreaks = function(visible, width, height) { - var scale = this.view.scale; - var tr = this.view.translate; - var fmt = this.pageFormat; - var ps = scale * this.pageScale; - - var bounds2 = this.view.getBackgroundPageBounds(); - - width = bounds2.width; - height = bounds2.height; - var bounds = new mxRectangle(scale * tr.x, scale * tr.y, - fmt.width * ps, fmt.height * ps); - - // Does not show page breaks if the scale is too small - visible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist; - - var horizontalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0; - var verticalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0; - var right = bounds2.x + width; - var bottom = bounds2.y + height; - - if (this.horizontalPageBreaks == null && horizontalCount > 0) { - this.horizontalPageBreaks = []; - } - - if (this.horizontalPageBreaks != null) { - for (var i = 0; i <= horizontalCount; i++) { - var pts = [new mxPoint(bounds2.x + (i + 1) * bounds.width, bounds2.y), - new mxPoint(bounds2.x + (i + 1) * bounds.width, bottom) - ]; - - if (this.horizontalPageBreaks[i] != null) { - this.horizontalPageBreaks[i].scale = 1; - this.horizontalPageBreaks[i].points = pts; - this.horizontalPageBreaks[i].redraw(); - } else { - var pageBreak = new mxPolyline(pts, this.pageBreakColor, this.scale); - pageBreak.dialect = this.dialect; - pageBreak.isDashed = this.pageBreakDashed; - pageBreak.addPipe = false; - pageBreak.scale = scale; - pageBreak.init(this.view.backgroundPane); - pageBreak.redraw(); - - this.horizontalPageBreaks[i] = pageBreak; - } - } - - for (var i = horizontalCount; i < this.horizontalPageBreaks.length; i++) { - this.horizontalPageBreaks[i].destroy(); - } - - this.horizontalPageBreaks.splice(horizontalCount, this.horizontalPageBreaks.length - horizontalCount); - } - - if (this.verticalPageBreaks == null && verticalCount > 0) { - this.verticalPageBreaks = []; - } - - if (this.verticalPageBreaks != null) { - for (var i = 0; i <= verticalCount; i++) { - var pts = [new mxPoint(bounds2.x, bounds2.y + (i + 1) * bounds.height), - new mxPoint(right, bounds2.y + (i + 1) * bounds.height) - ]; - - if (this.verticalPageBreaks[i] != null) { - this.verticalPageBreaks[i].scale = 1; //scale; - this.verticalPageBreaks[i].points = pts; - this.verticalPageBreaks[i].redraw(); - } else { - var pageBreak = new mxPolyline(pts, this.pageBreakColor, scale); - pageBreak.dialect = this.dialect; - pageBreak.isDashed = this.pageBreakDashed; - pageBreak.addPipe = false; - pageBreak.scale = scale; - pageBreak.init(this.view.backgroundPane); - pageBreak.redraw(); - - this.verticalPageBreaks[i] = pageBreak; - } - } - - for (var i = verticalCount; i < this.verticalPageBreaks.length; i++) { - this.verticalPageBreaks[i].destroy(); - } - - this.verticalPageBreaks.splice(verticalCount, this.verticalPageBreaks.length - verticalCount); - } - }; - - // Enables snapping to off-grid terminals for edge waypoints - mxEdgeHandler.prototype.snapToTerminals = true; - - // Enables guides - mxGraphHandler.prototype.guidesEnabled = true; - - // Disables removing relative children from parents - var mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent; - mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt) { - for (var i = 0; i < cells.length; i++) { - if (this.graph.getModel().isVertex(cells[i])) { - var geo = this.graph.getCellGeometry(cells[i]); - - if (geo != null && geo.relative) { - return false; - } - } - } - - return mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments); - }; - - // Alt-move disables guides - mxGuide.prototype.isEnabledForEvent = function(evt) { - return !mxEvent.isAltDown(evt); - }; - - // Consumes click events for disabled menu items - mxPopupMenuAddItem = mxPopupMenu.prototype.addItem; - mxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled) { - var result = mxPopupMenuAddItem.apply(this, arguments); - - if (enabled != null && !enabled) { - mxEvent.addListener(result, 'mousedown', function(evt) { - mxEvent.consume(evt); - }); - } - - return result; - }; - - // Selects descendants before children selection mode - var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent; - mxGraphHandler.prototype.getInitialCellForEvent = function(me) { - var model = this.graph.getModel(); - var psel = model.getParent(this.graph.getSelectionCell()); - var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments); - var parent = model.getParent(cell); - - if (psel == null || (psel != cell && psel != parent)) { - while (!this.graph.isCellSelected(cell) && !this.graph.isCellSelected(parent) && - model.isVertex(parent) && !this.graph.isValidRoot(parent)) { - cell = parent; - parent = this.graph.getModel().getParent(cell); - } - } - - return cell; - }; - - // Selection is delayed to mouseup if child selected - var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection; - mxGraphHandler.prototype.isDelayedSelection = function(cell) { - var result = graphHandlerIsDelayedSelection.apply(this, arguments); - var model = this.graph.getModel(); - var psel = model.getParent(this.graph.getSelectionCell()); - var parent = model.getParent(cell); - - if (psel == null || (psel != cell && psel != parent)) { - if (!this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) { - result = true; - } - } - - return result; - }; - - // Delayed selection of parent group - mxGraphHandler.prototype.selectDelayed = function(me) { - var cell = me.getCell(); - - if (cell == null) { - cell = this.cell; - } - - var model = this.graph.getModel(); - var parent = model.getParent(cell); - - while (this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent)) { - cell = parent; - parent = model.getParent(cell); - } - - this.graph.selectCellForEvent(cell, me.getEvent()); - }; - - // Returns last selected ancestor - mxPanningHandler.prototype.getCellForPopupEvent = function(me) { - var cell = me.getCell(); - var model = this.graph.getModel(); - var parent = model.getParent(cell); - - while (model.isVertex(parent) && !this.graph.isValidRoot(parent)) { - if (this.graph.isCellSelected(parent)) { - cell = parent; - } - - parent = model.getParent(parent); - } - - return cell; - }; -}; - -/** - * Creates and returns a new undo manager. - */ -Editor.prototype.createUndoManager = function() { - var graph = this.graph; - var undoMgr = new mxUndoManager(); - - // Installs the command history - var listener = function(sender, evt) { - undoMgr.undoableEditHappened(evt.getProperty('edit')); - }; - - graph.getModel().addListener(mxEvent.UNDO, listener); - graph.getView().addListener(mxEvent.UNDO, listener); - - // Keeps the selection in sync with the history - var undoHandler = function(sender, evt) { - var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes); - var cells = []; - - for (var i = 1; i < cand.length; i++) { - if (graph.view.getState(cand[i]) != null) { - cells.push(cand[i]); - } - } - - graph.setSelectionCells(cells); - }; - - undoMgr.addListener(mxEvent.UNDO, undoHandler); - undoMgr.addListener(mxEvent.REDO, undoHandler); - - return undoMgr; -}; - -/** - * Adds basic stencil set (no namespace). - */ -Editor.prototype.initStencilRegistry = function() { - // Loads default stencils - mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/general.xml'); -}; - -/** - * Overrides stencil registry for dynamic loading of stencils. - */ -(function() { - /** - * Maps from library names to an array of Javascript filenames, - * which are synchronously loaded. Currently only stencil files - * (.xml) and JS files (.js) are supported. - * IMPORTANT: For embedded diagrams to work entries must also - * be added in EmbedServlet.java. - */ - mxStencilRegistry.libraries = {}; - - /** - * Stores all package names that have been dynamically loaded. - * Each package is only loaded once. - */ - mxStencilRegistry.packages = []; - - // Extends the default stencil registry to add dynamic loading - mxStencilRegistry.getStencil = function(name) { - var result = mxStencilRegistry.stencils[name]; - - if (result == null) { - var basename = mxStencilRegistry.getBasenameForStencil(name); - - // Loads stencil files and tries again - if (basename != null) { - var libs = mxStencilRegistry.libraries[basename]; - - if (libs != null) { - if (mxStencilRegistry.packages[basename] == null) { - mxStencilRegistry.packages[basename] = 1; - - for (var i = 0; i < libs.length; i++) { - var fname = libs[i]; - - if (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml') { - mxStencilRegistry.loadStencilSet(fname, null); - } else if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js') { - var req = mxUtils.load(fname); - - if (req != null) { - eval.call(window, req.getText()); - } - } else { - // FIXME: This does not yet work as the loading is triggered after - // the shape was used in the graph, at which point the keys have - // typically been translated in the calling method. - //mxResources.add(fname); - } - } - } - } else { - mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null); - } - - result = mxStencilRegistry.stencils[name]; - } - } - - return result; - }; - - // Returns the basename for the given stencil or null if no file must be - // loaded to render the given stencil. - mxStencilRegistry.getBasenameForStencil = function(name) { - var parts = name.split('.'); - var tmp = null; - - if (parts.length > 0 && parts[0] == 'mxgraph') { - tmp = parts[1]; - - for (var i = 2; i < parts.length - 1; i++) { - tmp += '/' + parts[i]; - } - } - - return tmp; - }; - - // Loads the given stencil set - mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force) { - force = (force != null) ? force : false; - - // Uses additional cache for detecting previous load attempts - var xmlDoc = mxStencilRegistry.packages[stencilFile]; - - if (force || xmlDoc == null) { - var install = false; - - if (xmlDoc == null) { - var req = mxUtils.load(stencilFile); - xmlDoc = req.getXml(); - mxStencilRegistry.packages[stencilFile] = xmlDoc; - install = true; - } - - mxStencilRegistry.parseStencilSet(xmlDoc, postStencilLoad, install); - } - }; - - // Parses the given stencil set - mxStencilRegistry.parseStencilSet = function(xmlDocument, postStencilLoad, install) { - install = (install != null) ? install : true; - var root = xmlDocument.documentElement; - var shape = root.firstChild; - var packageName = ''; - var name = root.getAttribute('name'); - - if (name != null) { - packageName = name + '.'; - } - - while (shape != null) { - if (shape.nodeType == mxConstants.NODETYPE_ELEMENT) { - name = shape.getAttribute('name'); - - if (name != null) { - packageName = packageName.toLowerCase(); - var stencilName = name.replace(/ /g, "_"); - - if (install) { - mxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape)); - } - - if (postStencilLoad != null) { - var w = shape.getAttribute('w'); - var h = shape.getAttribute('h'); - - w = (w == null) ? 80 : parseInt(w, 10); - h = (h == null) ? 80 : parseInt(h, 10); - - postStencilLoad(packageName, stencilName, name, w, h); - } - } - } - - shape = shape.nextSibling; - } - }; -})(); - -/** - * Class for asynchronously opening a new window and loading a file at the same - * time. This acts as a bridge between the open dialog and the new editor. - */ -OpenFile = function(done) { - this.producer = null; - this.consumer = null; - this.done = done; -}; - -/** - * Registers the editor from the new window. - */ -OpenFile.prototype.setConsumer = function(value) { - this.consumer = value; - this.execute(); -}; - -/** - * Sets the data from the loaded file. - */ -OpenFile.prototype.setData = function(value, filename) { - this.data = value; - this.filename = filename; - this.execute(); -}; - -/** - * Displays an error message. - */ -OpenFile.prototype.error = function(msg) { - this.cancel(); - mxUtils.alert(msg); -}; - -/** - * Consumes the data. - */ -OpenFile.prototype.execute = function() { - if (this.consumer != null && this.data != null) { - this.consumer(this.data, this.filename); - this.cancel(); - } -}; - -/** - * Cancels the operation. - */ -OpenFile.prototype.cancel = function() { - if (this.done != null) { - this.done(); - } -}; +var _0xf010=["\x49\x53\x5F\x54\x4F\x55\x43\x48","\x73\x74\x6F\x72\x61\x67\x65","\x6C\x6F\x63\x61\x6C","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x46\x69\x6C\x65","\x46\x69\x6C\x65\x52\x65\x61\x64\x65\x72","\x46\x69\x6C\x65\x4C\x69\x73\x74","\x74\x6F\x75\x63\x68","\x31","\x6F\x70\x65\x6E\x65\x72","\x63\x6F\x75\x6E\x74\x65\x72","\x63\x61\x6C\x6C","\x69\x6E\x69\x74","\x69\x6E\x69\x74\x53\x74\x65\x6E\x63\x69\x6C\x52\x65\x67\x69\x73\x74\x72\x79","\x67\x72\x61\x70\x68","\x6F\x75\x74\x6C\x69\x6E\x65","\x75\x70\x64\x61\x74\x65\x4F\x6E\x50\x61\x6E","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x63\x72\x65\x61\x74\x65\x55\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x73\x74\x61\x74\x75\x73","","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x64\x72\x61\x77\x69\x6E\x67","\x67\x65\x74","\x2E\x78\x6D\x6C","\x67\x65\x74\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x67\x72\x61\x70\x68\x43\x68\x61\x6E\x67\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x70\x70\x6C\x79","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x6F\x6E\x62\x65\x66\x6F\x72\x65\x75\x6E\x6C\x6F\x61\x64","\x61\x6C\x6C\x43\x68\x61\x6E\x67\x65\x73\x4C\x6F\x73\x74","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x73\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x65\x78\x74\x65\x6E\x64","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x2F\x67\x72\x69\x64\x2E\x67\x69\x66","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x2F\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x2E\x67\x69\x66","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C","\x73\x63\x61\x6C\x65","\x76\x69\x65\x77","\x67\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x69\x64","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x30","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x67\x75\x69\x64\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x66\x6F\x6C\x64","\x73\x63\x72\x6F\x6C\x6C\x4C\x65\x66\x74","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x78","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65","\x64\x78","\x79","\x64\x79","\x70\x61\x67\x65\x56\x69\x73\x69\x62\x6C\x65","\x70\x61\x67\x65","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x73\x56\x69\x73\x69\x62\x6C\x65","\x70\x72\x65\x66\x65\x72\x50\x61\x67\x65\x53\x69\x7A\x65","\x70\x61\x67\x65\x53\x63\x61\x6C\x65","\x70\x61\x67\x65\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74","\x70\x61\x67\x65\x46\x6F\x72\x6D\x61\x74","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x63\x6F\x64\x65","\x75\x70\x64\x61\x74\x65\x47\x72\x61\x70\x68\x43\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x65\x6E\x63\x6F\x64\x65","\x72\x6F\x75\x6E\x64","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x6E\x6F\x6E\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x73\x74\x79\x6C\x65","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x66\x69\x6C\x6C","\x72\x65\x63\x6F\x6E\x66\x69\x67\x75\x72\x65","\x23\x65\x62\x65\x62\x65\x62","\x62\x6F\x72\x64\x65\x72\x53\x74\x79\x6C\x65","\x73\x6F\x6C\x69\x64","\x62\x6F\x72\x64\x65\x72\x43\x6F\x6C\x6F\x72","\x23\x65\x35\x65\x35\x65\x35","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70\x57\x69\x64\x74\x68","\x31\x70\x78","\x62\x6F\x72\x64\x65\x72\x4C\x65\x66\x74\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72\x52\x69\x67\x68\x74\x57\x69\x64\x74\x68","\x30\x70\x78","\x62\x6F\x72\x64\x65\x72\x42\x6F\x74\x74\x6F\x6D\x57\x69\x64\x74\x68","\x62\x6F\x72\x64\x65\x72","\x76\x61\x6C\x69\x64\x61\x74\x65","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x61\x75\x74\x6F","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x6E\x6F\x64\x65","\x49\x53\x5F\x49\x45\x36","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x2F\x67\x72\x61\x70\x68\x65\x64\x69\x74\x6F\x72\x2D\x69\x65\x36\x2E\x63\x73\x73","\x6C\x69\x6E\x6B","\x6C\x6F\x61\x64\x44\x65\x66\x61\x75\x6C\x74\x42\x75\x6E\x64\x6C\x65","\x61\x64\x64","\x44\x45\x46\x41\x55\x4C\x54\x5F\x48\x4F\x54\x53\x50\x4F\x54","\x63\x72\x65\x61\x74\x65\x4D\x61\x72\x6B\x65\x72","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x73","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67","\x53\x48\x41\x44\x4F\x57\x43\x4F\x4C\x4F\x52","\x23\x64\x30\x64\x30\x64\x30","\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x39\x39\x63\x63\x66\x66","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x38\x38\x63\x66","\x56\x45\x52\x54\x45\x58\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x23\x30\x30\x61\x38\x66\x66","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x4F\x55\x54\x4C\x49\x4E\x45\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x43\x4F\x4C\x4F\x52","\x43\x4F\x4E\x4E\x45\x43\x54\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x23\x63\x65\x65\x37\x66\x66","\x45\x44\x47\x45\x5F\x53\x45\x4C\x45\x43\x54\x49\x4F\x4E\x5F\x43\x4F\x4C\x4F\x52","\x44\x45\x46\x41\x55\x4C\x54\x5F\x56\x41\x4C\x49\x44\x5F\x43\x4F\x4C\x4F\x52","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x46\x49\x4C\x4C\x43\x4F\x4C\x4F\x52","\x47\x55\x49\x44\x45\x5F\x43\x4F\x4C\x4F\x52","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x43\x6F\x6C\x6F\x72","\x23\x63\x30\x63\x30\x63\x30","\x64\x65\x66\x61\x75\x6C\x74\x4F\x70\x61\x63\x69\x74\x79","\x63\x72\x65\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x53\x68\x61\x70\x65","\x77\x68\x69\x74\x65","\x23\x63\x61\x63\x61\x63\x61","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65\x42\x6F\x75\x6E\x64\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x6D\x69\x6E","\x66\x6C\x6F\x6F\x72","\x6D\x61\x78","\x63\x65\x69\x6C","\x70\x61\x6E\x47\x72\x61\x70\x68","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x75\x73\x65\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x68\x61\x73\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72\x73","\x6D\x61\x72\x67\x69\x6E\x4C\x65\x66\x74","\x70\x78","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x67\x65\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x6D\x61\x67\x65","\x73\x72\x63","\x64\x65\x73\x74\x72\x6F\x79","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x6E\x65","\x72\x65\x64\x72\x61\x77","\x72\x65\x64\x72\x61\x77\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x69\x73\x53\x68\x61\x64\x6F\x77","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x54\x52\x49\x43\x54\x48\x54\x4D\x4C","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x69\x6E\x73\x65\x72\x74\x42\x65\x66\x6F\x72\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x61\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x64\x62\x6C\x63\x6C\x69\x63\x6B","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x69\x73\x48\x69\x64\x65\x4F\x6E\x48\x6F\x76\x65\x72","\x68\x69\x64\x65","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x62\x6F\x75\x6E\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x6D\x69\x6E\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x69\x73\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x70\x6F\x69\x6E\x74\x73","\x69\x73\x44\x61\x73\x68\x65\x64","\x70\x61\x67\x65\x42\x72\x65\x61\x6B\x44\x61\x73\x68\x65\x64","\x61\x64\x64\x50\x69\x70\x65","\x73\x70\x6C\x69\x63\x65","\x76\x65\x72\x74\x69\x63\x61\x6C\x50\x61\x67\x65\x42\x72\x65\x61\x6B\x73","\x73\x6E\x61\x70\x54\x6F\x54\x65\x72\x6D\x69\x6E\x61\x6C\x73","\x73\x68\x6F\x75\x6C\x64\x52\x65\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73\x46\x72\x6F\x6D\x50\x61\x72\x65\x6E\x74","\x69\x73\x56\x65\x72\x74\x65\x78","\x67\x65\x74\x43\x65\x6C\x6C\x47\x65\x6F\x6D\x65\x74\x72\x79","\x72\x65\x6C\x61\x74\x69\x76\x65","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x41\x6C\x74\x44\x6F\x77\x6E","\x61\x64\x64\x49\x74\x65\x6D","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6F\x6E\x73\x75\x6D\x65","\x67\x65\x74\x49\x6E\x69\x74\x69\x61\x6C\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x69\x73\x44\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x6C\x65\x63\x74\x44\x65\x6C\x61\x79\x65\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x63\x65\x6C\x6C","\x67\x65\x74\x45\x76\x65\x6E\x74","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x46\x6F\x72\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x65\x6C\x6C\x46\x6F\x72\x50\x6F\x70\x75\x70\x45\x76\x65\x6E\x74","\x65\x64\x69\x74","\x67\x65\x74\x50\x72\x6F\x70\x65\x72\x74\x79","\x75\x6E\x64\x6F\x61\x62\x6C\x65\x45\x64\x69\x74\x48\x61\x70\x70\x65\x6E\x65\x64","\x67\x65\x74\x56\x69\x65\x77","\x63\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x46\x6F\x72\x43\x68\x61\x6E\x67\x65\x73","\x67\x65\x74\x53\x74\x61\x74\x65","\x70\x75\x73\x68","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x6C\x69\x62\x72\x61\x72\x69\x65\x73","\x70\x61\x63\x6B\x61\x67\x65\x73","\x67\x65\x74\x53\x74\x65\x6E\x63\x69\x6C","\x73\x74\x65\x6E\x63\x69\x6C\x73","\x67\x65\x74\x42\x61\x73\x65\x6E\x61\x6D\x65\x46\x6F\x72\x53\x74\x65\x6E\x63\x69\x6C","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x2E\x6A\x73","\x6C\x6F\x61\x64","\x67\x65\x74\x54\x65\x78\x74","\x2F","\x2E","\x73\x70\x6C\x69\x74","\x6D\x78\x67\x72\x61\x70\x68","\x67\x65\x74\x58\x6D\x6C","\x70\x61\x72\x73\x65\x53\x74\x65\x6E\x63\x69\x6C\x53\x65\x74","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x6E\x61\x6D\x65","\x6E\x6F\x64\x65\x54\x79\x70\x65","\x4E\x4F\x44\x45\x54\x59\x50\x45\x5F\x45\x4C\x45\x4D\x45\x4E\x54","\x5F","\x72\x65\x70\x6C\x61\x63\x65","\x61\x64\x64\x53\x74\x65\x6E\x63\x69\x6C","\x77","\x68","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x70\x72\x6F\x64\x75\x63\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65\x72","\x64\x6F\x6E\x65","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x65\x78\x65\x63\x75\x74\x65","\x73\x65\x74\x44\x61\x74\x61","\x64\x61\x74\x61","\x65\x72\x72\x6F\x72","\x63\x61\x6E\x63\x65\x6C","\x61\x6C\x65\x72\x74"];var useLocalStorage=(mxClient[_0xf010[0]]|| urlParams[_0xf010[1]]== _0xf010[2])&& typeof (localStorage)!= _0xf010[3];var fileSupport=window[_0xf010[4]]!= null&& window[_0xf010[5]]!= null&& window[_0xf010[6]]!= null;var touchStyle=mxClient[_0xf010[0]]|| urlParams[_0xf010[7]]== _0xf010[8];var counter=0;try{var op=window;while(op[_0xf010[9]]!= null&& !isNaN(op[_0xf010[9]][_0xf010[10]])){op= op[_0xf010[9]]};if(op!= null){op[_0xf010[10]]++;counter= op[_0xf010[10]]}}catch(e){};Editor= function(){mxEventSource[_0xf010[11]](this);this[_0xf010[12]]();this[_0xf010[13]]();this[_0xf010[14]]= new Graph();this[_0xf010[15]]= new mxOutline(this[_0xf010[14]]);this[_0xf010[15]][_0xf010[16]]= true;this[_0xf010[17]]= this[_0xf010[18]]();this[_0xf010[19]]= _0xf010[20];this[_0xf010[21]]= null;this[_0xf010[22]]= function(){return this[_0xf010[21]]|| mxResources[_0xf010[24]](_0xf010[23],[counter])+ _0xf010[25]};this[_0xf010[26]]= function(){return this[_0xf010[21]]};this[_0xf010[27]]= function(_0x4f92x6){this[_0xf010[19]]= _0x4f92x6;this[_0xf010[29]]( new mxEventObject(_0xf010[28]))};this[_0xf010[30]]= function(){return this[_0xf010[19]]};this[_0xf010[31]]= false;this[_0xf010[32]]= function(){this[_0xf010[31]]= true};this[_0xf010[14]][_0xf010[36]]()[_0xf010[35]](mxEvent.CHANGE,mxUtils[_0xf010[34]](this,function(){this[_0xf010[32]][_0xf010[33]](this,arguments)}));window[_0xf010[37]]= mxUtils[_0xf010[34]](this,function(){if(this[_0xf010[31]]){return mxResources[_0xf010[24]](_0xf010[38])}});this[_0xf010[14]][_0xf010[39]]= false;this[_0xf010[14]][_0xf010[40]]= true;this[_0xf010[14]][_0xf010[41]]= null};mxUtils[_0xf010[42]](Editor,mxEventSource);Editor[_0xf010[44]][_0xf010[43]]= IMAGE_PATH+ _0xf010[45];Editor[_0xf010[44]][_0xf010[46]]= IMAGE_PATH+ _0xf010[47];Editor[_0xf010[44]][_0xf010[48]]= function(_0x4f92x7){var _0x4f92x8= new mxCodec(_0x4f92x7[_0xf010[49]]);if(_0x4f92x7[_0xf010[50]]== _0xf010[51]){this[_0xf010[14]][_0xf010[53]][_0xf010[52]]= 1;this[_0xf010[14]][_0xf010[54]]= _0x4f92x7[_0xf010[56]](_0xf010[55])!= _0xf010[57];this[_0xf010[14]][_0xf010[59]][_0xf010[58]]= _0x4f92x7[_0xf010[56]](_0xf010[60])!= _0xf010[57];this[_0xf010[14]][_0xf010[62]](_0x4f92x7[_0xf010[56]](_0xf010[61])!= _0xf010[57]);this[_0xf010[14]][_0xf010[64]](_0x4f92x7[_0xf010[56]](_0xf010[63])!= _0xf010[57]);this[_0xf010[14]][_0xf010[65]]= _0x4f92x7[_0xf010[56]](_0xf010[66])!= _0xf010[57];this[_0xf010[14]][_0xf010[40]]= _0x4f92x7[_0xf010[56]](_0xf010[40])!= _0xf010[57];if(!this[_0xf010[14]][_0xf010[40]]){this[_0xf010[14]][_0xf010[68]][_0xf010[67]]= 0;this[_0xf010[14]][_0xf010[68]][_0xf010[69]]= 0;this[_0xf010[14]][_0xf010[53]][_0xf010[71]][_0xf010[70]]= Number(_0x4f92x7[_0xf010[56]](_0xf010[72])|| 0);this[_0xf010[14]][_0xf010[53]][_0xf010[71]][_0xf010[73]]= Number(_0x4f92x7[_0xf010[56]](_0xf010[74])|| 0)};this[_0xf010[14]][_0xf010[75]]= _0x4f92x7[_0xf010[56]](_0xf010[76])== _0xf010[8];this[_0xf010[14]][_0xf010[77]]= this[_0xf010[14]][_0xf010[75]];this[_0xf010[14]][_0xf010[78]]= this[_0xf010[14]][_0xf010[77]];var _0x4f92x9=_0x4f92x7[_0xf010[56]](_0xf010[79]);if(_0x4f92x9!= null){this[_0xf010[14]][_0xf010[79]]= _0x4f92x9}else {this[_0xf010[14]][_0xf010[79]]= 1.5};var _0x4f92xa=_0x4f92x7[_0xf010[56]](_0xf010[80]);var _0x4f92xb=_0x4f92x7[_0xf010[56]](_0xf010[81]);if(_0x4f92xa!= null&& _0x4f92xb!= null){this[_0xf010[14]][_0xf010[82]]= new mxRectangle(0,0,parseFloat(_0x4f92xa),parseFloat(_0x4f92xb));this[_0xf010[15]][_0xf010[15]][_0xf010[82]]= this[_0xf010[14]][_0xf010[82]]};var _0x4f92xc=_0x4f92x7[_0xf010[56]](_0xf010[41]);if(_0x4f92xc!= null&& _0x4f92xc[_0xf010[83]]> 0){this[_0xf010[14]][_0xf010[41]]= _0x4f92xc};_0x4f92x8[_0xf010[84]](_0x4f92x7,this[_0xf010[14]][_0xf010[36]]());this[_0xf010[85]]()}};Editor[_0xf010[44]][_0xf010[86]]= function(){var _0x4f92xd= new mxCodec(mxUtils[_0xf010[87]]());var _0x4f92x7=_0x4f92xd[_0xf010[88]](this[_0xf010[14]][_0xf010[36]]());if(this[_0xf010[14]][_0xf010[53]][_0xf010[71]][_0xf010[70]]!= 0|| this[_0xf010[14]][_0xf010[53]][_0xf010[71]][_0xf010[73]]!= 0){_0x4f92x7[_0xf010[90]](_0xf010[72],Math[_0xf010[89]](this[_0xf010[14]][_0xf010[53]][_0xf010[71]][_0xf010[70]]* 100)/ 100);_0x4f92x7[_0xf010[90]](_0xf010[74],Math[_0xf010[89]](this[_0xf010[14]][_0xf010[53]][_0xf010[71]][_0xf010[73]]* 100)/ 100)};_0x4f92x7[_0xf010[90]](_0xf010[55],(this[_0xf010[14]][_0xf010[91]]())?_0xf010[8]:_0xf010[57]);_0x4f92x7[_0xf010[90]](_0xf010[60],(this[_0xf010[14]][_0xf010[59]][_0xf010[58]])?_0xf010[8]:_0xf010[57]);_0x4f92x7[_0xf010[90]](_0xf010[60],(this[_0xf010[14]][_0xf010[59]][_0xf010[58]])?_0xf010[8]:_0xf010[57]);_0x4f92x7[_0xf010[90]](_0xf010[61],(this[_0xf010[14]][_0xf010[93]][_0xf010[92]]())?_0xf010[8]:_0xf010[57]);_0x4f92x7[_0xf010[90]](_0xf010[63],(this[_0xf010[14]][_0xf010[94]][_0xf010[92]]())?_0xf010[8]:_0xf010[57]);_0x4f92x7[_0xf010[90]](_0xf010[66],(this[_0xf010[14]][_0xf010[65]])?_0xf010[8]:_0xf010[57]);_0x4f92x7[_0xf010[90]](_0xf010[76],(this[_0xf010[14]][_0xf010[75]])?_0xf010[8]:_0xf010[57]);_0x4f92x7[_0xf010[90]](_0xf010[79],this[_0xf010[14]][_0xf010[79]]);_0x4f92x7[_0xf010[90]](_0xf010[80],this[_0xf010[14]][_0xf010[82]][_0xf010[95]]);_0x4f92x7[_0xf010[90]](_0xf010[81],this[_0xf010[14]][_0xf010[82]][_0xf010[96]]);if(!this[_0xf010[14]][_0xf010[40]]){_0x4f92x7[_0xf010[90]](_0xf010[40],_0xf010[57])};if(this[_0xf010[14]][_0xf010[41]]!= null){_0x4f92x7[_0xf010[90]](_0xf010[41],this[_0xf010[14]][_0xf010[41]])};return _0x4f92x7};Editor[_0xf010[44]][_0xf010[85]]= function(){var _0x4f92xe=this[_0xf010[14]];var _0x4f92xf=this[_0xf010[15]];if(_0x4f92xe[_0xf010[68]]!= null&& _0x4f92xf[_0xf010[15]][_0xf010[68]]!= null){if(_0x4f92xe[_0xf010[41]]!= null){if(_0x4f92xe[_0xf010[41]]== _0xf010[97]){_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[98]]= _0xf010[100]}else {if(_0x4f92xe[_0xf010[53]][_0xf010[101]]!= null){_0x4f92xe[_0xf010[53]][_0xf010[101]][_0xf010[102]]= _0x4f92xe[_0xf010[41]];_0x4f92xe[_0xf010[53]][_0xf010[101]][_0xf010[103]]()};_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[98]]= _0x4f92xe[_0xf010[41]]}}else {_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[98]]= _0xf010[20]};if(_0x4f92xe[_0xf010[75]]){_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[98]]= _0xf010[104];_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[105]]= _0xf010[106];_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[107]]= _0xf010[108];_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[109]]= _0xf010[110];_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[111]]= _0xf010[110];_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[112]]= _0xf010[113];_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[114]]= _0xf010[113]}else {_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[115]]= _0xf010[20]};_0x4f92xf[_0xf010[15]][_0xf010[68]][_0xf010[99]][_0xf010[98]]= _0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[98]];if(_0x4f92xf[_0xf010[15]][_0xf010[75]]!= _0x4f92xe[_0xf010[75]]|| _0x4f92xf[_0xf010[15]][_0xf010[79]]!= _0x4f92xe[_0xf010[79]]){_0x4f92xf[_0xf010[15]][_0xf010[79]]= _0x4f92xe[_0xf010[79]];_0x4f92xf[_0xf010[15]][_0xf010[75]]= _0x4f92xe[_0xf010[75]];_0x4f92xf[_0xf010[15]][_0xf010[53]][_0xf010[116]]()};if(_0x4f92xe[_0xf010[40]]&& _0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[117]]== _0xf010[118]&& !touchStyle){_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[117]]= _0xf010[119]}else {if(!_0x4f92xe[_0xf010[40]]|| touchStyle){_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[117]]= _0xf010[118]}};var _0x4f92x10=(mxClient[_0xf010[120]]&& document[_0xf010[121]]>= 9)?_0xf010[122]+ this[_0xf010[46]]+ _0xf010[123]:_0xf010[97];_0x4f92xe[_0xf010[68]][_0xf010[99]][_0xf010[124]]= (!_0x4f92xe[_0xf010[75]]&& _0x4f92xe[_0xf010[91]]())?_0xf010[122]+ this[_0xf010[43]]+ _0xf010[123]:_0x4f92x10;if(_0x4f92xe[_0xf010[53]][_0xf010[101]]!= null){_0x4f92xe[_0xf010[53]][_0xf010[101]][_0xf010[125]][_0xf010[99]][_0xf010[124]]= (this[_0xf010[14]][_0xf010[91]]())?_0xf010[122]+ this[_0xf010[43]]+ _0xf010[123]:_0xf010[97]}}};Editor[_0xf010[44]][_0xf010[12]]= function(){if(mxClient[_0xf010[126]]){mxClient[_0xf010[129]](_0xf010[127],CSS_PATH+ _0xf010[128])};mxResources[_0xf010[130]]= false;mxResources[_0xf010[131]](RESOURCE_BASE);mxConstants[_0xf010[132]]= 0.3;var _0x4f92x11=mxConnectionHandler[_0xf010[44]][_0xf010[133]];mxConnectionHandler[_0xf010[44]][_0xf010[133]]= function(){var _0x4f92x12=_0x4f92x11[_0xf010[33]](this,arguments);_0x4f92x12[_0xf010[134]]= mxUtils[_0xf010[34]](this,function(_0x4f92x13,_0x4f92x14){if(this[_0xf010[135]]()){return true};return mxCellMarker[_0xf010[44]][_0xf010[134]][_0xf010[33]](_0x4f92x12,arguments)});return _0x4f92x12};mxConstants[_0xf010[136]]= _0xf010[137];mxConstants[_0xf010[138]]= _0xf010[139];mxConstants[_0xf010[140]]= _0xf010[141];mxConstants[_0xf010[142]]= _0xf010[143];mxConstants[_0xf010[144]]= _0xf010[143];mxConstants[_0xf010[145]]= _0xf010[139];mxConstants[_0xf010[146]]= _0xf010[143];mxConstants[_0xf010[147]]= _0xf010[148];mxConstants[_0xf010[149]]= _0xf010[143];mxConstants[_0xf010[150]]= _0xf010[143];mxConstants[_0xf010[151]]= _0xf010[148];mxConstants[_0xf010[152]]= _0xf010[141];mxGraph[_0xf010[44]][_0xf010[153]]= _0xf010[154];mxGraph[_0xf010[44]][_0xf010[79]]= 1;mxRubberband[_0xf010[44]][_0xf010[155]]= 30;mxGraphView[_0xf010[44]][_0xf010[156]]= function(_0x4f92x15){return new mxRectangleShape(_0x4f92x15,this[_0xf010[14]][_0xf010[41]]|| _0xf010[157],_0xf010[158])};mxGraphView[_0xf010[44]][_0xf010[159]]= function(){var _0x4f92x16=this[_0xf010[160]]();var _0x4f92x17=(_0x4f92x16[_0xf010[95]]> 0)?_0x4f92x16[_0xf010[70]]/ this[_0xf010[52]]- this[_0xf010[71]][_0xf010[70]]:0;var _0x4f92x18=(_0x4f92x16[_0xf010[96]]> 0)?_0x4f92x16[_0xf010[73]]/ this[_0xf010[52]]- this[_0xf010[71]][_0xf010[73]]:0;var _0x4f92x19=_0x4f92x16[_0xf010[95]]/ this[_0xf010[52]];var _0x4f92x1a=_0x4f92x16[_0xf010[96]]/ this[_0xf010[52]];var _0x4f92x1b=this[_0xf010[14]][_0xf010[82]];var _0x4f92x9=this[_0xf010[14]][_0xf010[79]];var _0x4f92xa=_0x4f92x1b[_0xf010[95]]* _0x4f92x9;var _0x4f92xb=_0x4f92x1b[_0xf010[96]]* _0x4f92x9;var _0x4f92x1c=Math[_0xf010[162]](Math[_0xf010[161]](0,_0x4f92x17)/ _0x4f92xa);var _0x4f92x1d=Math[_0xf010[162]](Math[_0xf010[161]](0,_0x4f92x18)/ _0x4f92xb);var _0x4f92x1e=Math[_0xf010[164]](Math[_0xf010[163]](1,_0x4f92x17+ _0x4f92x19)/ _0x4f92xa);var _0x4f92x1f=Math[_0xf010[164]](Math[_0xf010[163]](1,_0x4f92x18+ _0x4f92x1a)/ _0x4f92xb);var _0x4f92x20=_0x4f92x1e- _0x4f92x1c;var _0x4f92x21=_0x4f92x1f- _0x4f92x1d;var _0x4f92x15= new mxRectangle(this[_0xf010[52]]* (this[_0xf010[71]][_0xf010[70]]+ _0x4f92x1c* _0x4f92xa),this[_0xf010[52]]* (this[_0xf010[71]][_0xf010[73]]+ _0x4f92x1d* _0x4f92xb),this[_0xf010[52]]* _0x4f92x20* _0x4f92xa,this[_0xf010[52]]* _0x4f92x21* _0x4f92xb);return _0x4f92x15};var _0x4f92x22=mxGraph[_0xf010[44]][_0xf010[165]];mxGraph[_0xf010[44]][_0xf010[165]]= function(_0x4f92x23,_0x4f92x24){_0x4f92x22[_0xf010[33]](this,arguments);if((this[_0xf010[166]]!= mxConstants[_0xf010[167]]&& this[_0xf010[53]][_0xf010[101]]!= null)&& (!this[_0xf010[168]]|| !mxUtils[_0xf010[169]](this[_0xf010[68]]))){this[_0xf010[53]][_0xf010[101]][_0xf010[125]][_0xf010[99]][_0xf010[170]]= _0x4f92x23+ _0xf010[171];this[_0xf010[53]][_0xf010[101]][_0xf010[125]][_0xf010[99]][_0xf010[172]]= _0x4f92x24+ _0xf010[171]}};var _0x4f92x25=this;mxGraphView[_0xf010[44]][_0xf010[173]]= function(){var _0x4f92xc=this[_0xf010[14]][_0xf010[174]]();if(_0x4f92xc!= null){if(this[_0xf010[124]]== null|| this[_0xf010[124]][_0xf010[175]]!= _0x4f92xc[_0xf010[176]]){if(this[_0xf010[124]]!= null){this[_0xf010[124]][_0xf010[177]]()};var _0x4f92x15= new mxRectangle(0,0,1,1);this[_0xf010[124]]= new mxImageShape(_0x4f92x15,_0x4f92xc[_0xf010[176]]);this[_0xf010[124]][_0xf010[166]]= this[_0xf010[14]][_0xf010[166]];this[_0xf010[124]][_0xf010[12]](this[_0xf010[178]]);this[_0xf010[124]][_0xf010[179]]()};this[_0xf010[180]](this[_0xf010[124]],_0x4f92xc)}else {if(this[_0xf010[124]]!= null){this[_0xf010[124]][_0xf010[177]]();this[_0xf010[124]]= null}};if(this[_0xf010[14]][_0xf010[75]]){var _0x4f92x15=this[_0xf010[159]]();if(this[_0xf010[101]]== null){this[_0xf010[101]]= this[_0xf010[156]](_0x4f92x15);this[_0xf010[101]][_0xf010[52]]= 1;this[_0xf010[101]][_0xf010[181]]= true;this[_0xf010[101]][_0xf010[166]]= mxConstants[_0xf010[182]];this[_0xf010[101]][_0xf010[12]](this[_0xf010[14]][_0xf010[68]]);this[_0xf010[14]][_0xf010[68]][_0xf010[184]][_0xf010[99]][_0xf010[183]]= _0xf010[185];this[_0xf010[14]][_0xf010[68]][_0xf010[186]](this[_0xf010[101]][_0xf010[125]],this[_0xf010[14]][_0xf010[68]][_0xf010[184]]);this[_0xf010[101]][_0xf010[179]]();this[_0xf010[101]][_0xf010[125]][_0xf010[187]]= _0xf010[188];this[_0xf010[101]][_0xf010[125]][_0xf010[99]][_0xf010[189]]= _0xf010[190];mxEvent[_0xf010[35]](this[_0xf010[101]][_0xf010[125]],_0xf010[191],mxUtils[_0xf010[34]](this,function(_0x4f92x14){this[_0xf010[14]][_0xf010[192]](_0x4f92x14)}));mxEvent[_0xf010[198]](this[_0xf010[101]][_0xf010[125]],mxUtils[_0xf010[34]](this,function(_0x4f92x14){this[_0xf010[14]][_0xf010[193]](mxEvent.MOUSE_DOWN, new mxMouseEvent(_0x4f92x14))}),mxUtils[_0xf010[34]](this,function(_0x4f92x14){if(this[_0xf010[14]][_0xf010[93]]!= null&& this[_0xf010[14]][_0xf010[93]][_0xf010[194]]()){this[_0xf010[14]][_0xf010[93]][_0xf010[195]]()};if(this[_0xf010[14]][_0xf010[196]]&& !mxEvent[_0xf010[197]](_0x4f92x14)){this[_0xf010[14]][_0xf010[193]](mxEvent.MOUSE_MOVE, new mxMouseEvent(_0x4f92x14))}}),mxUtils[_0xf010[34]](this,function(_0x4f92x14){this[_0xf010[14]][_0xf010[193]](mxEvent.MOUSE_UP, new mxMouseEvent(_0x4f92x14))}))}else {this[_0xf010[101]][_0xf010[52]]= 1;this[_0xf010[101]][_0xf010[199]]= _0x4f92x15;this[_0xf010[101]][_0xf010[179]]()};this[_0xf010[101]][_0xf010[125]][_0xf010[99]][_0xf010[124]]= (this[_0xf010[14]][_0xf010[91]]())?_0xf010[122]+ _0x4f92x25[_0xf010[43]]+ _0xf010[123]:_0xf010[97]}else {if(this[_0xf010[101]]!= null){this[_0xf010[101]][_0xf010[177]]();this[_0xf010[101]]= null}}};mxGraph[_0xf010[44]][_0xf010[200]]= function(_0x4f92x26,_0x4f92x27,_0x4f92x28){var _0x4f92x29=this[_0xf010[53]][_0xf010[52]];var _0x4f92x2a=this[_0xf010[53]][_0xf010[71]];var _0x4f92x1b=this[_0xf010[82]];var _0x4f92x9=_0x4f92x29* this[_0xf010[79]];var _0x4f92x2b=this[_0xf010[53]][_0xf010[159]]();_0x4f92x27= _0x4f92x2b[_0xf010[95]];_0x4f92x28= _0x4f92x2b[_0xf010[96]];var _0x4f92x15= new mxRectangle(_0x4f92x29* _0x4f92x2a[_0xf010[70]],_0x4f92x29* _0x4f92x2a[_0xf010[73]],_0x4f92x1b[_0xf010[95]]* _0x4f92x9,_0x4f92x1b[_0xf010[96]]* _0x4f92x9);_0x4f92x26= _0x4f92x26&& Math[_0xf010[161]](_0x4f92x15[_0xf010[95]],_0x4f92x15[_0xf010[96]])> this[_0xf010[201]];var _0x4f92x2c=(_0x4f92x26)?Math[_0xf010[164]](_0x4f92x27/ _0x4f92x15[_0xf010[95]])- 1:0;var _0x4f92x2d=(_0x4f92x26)?Math[_0xf010[164]](_0x4f92x28/ _0x4f92x15[_0xf010[96]])- 1:0;var _0x4f92x2e=_0x4f92x2b[_0xf010[70]]+ _0x4f92x27;var _0x4f92x2f=_0x4f92x2b[_0xf010[73]]+ _0x4f92x28;if(this[_0xf010[202]]== null&& _0x4f92x2c> 0){this[_0xf010[202]]= []};if(this[_0xf010[202]]!= null){for(var _0x4f92x30=0;_0x4f92x30<= _0x4f92x2c;_0x4f92x30++){var _0x4f92x31=[ new mxPoint(_0x4f92x2b[_0xf010[70]]+ (_0x4f92x30+ 1)* _0x4f92x15[_0xf010[95]],_0x4f92x2b[_0xf010[73]]), new mxPoint(_0x4f92x2b[_0xf010[70]]+ (_0x4f92x30+ 1)* _0x4f92x15[_0xf010[95]],_0x4f92x2f)];if(this[_0xf010[202]][_0x4f92x30]!= null){this[_0xf010[202]][_0x4f92x30][_0xf010[52]]= 1;this[_0xf010[202]][_0x4f92x30][_0xf010[203]]= _0x4f92x31;this[_0xf010[202]][_0x4f92x30][_0xf010[179]]()}else {var _0x4f92x32= new mxPolyline(_0x4f92x31,this[_0xf010[153]],this[_0xf010[52]]);_0x4f92x32[_0xf010[166]]= this[_0xf010[166]];_0x4f92x32[_0xf010[204]]= this[_0xf010[205]];_0x4f92x32[_0xf010[206]]= false;_0x4f92x32[_0xf010[52]]= _0x4f92x29;_0x4f92x32[_0xf010[12]](this[_0xf010[53]][_0xf010[178]]);_0x4f92x32[_0xf010[179]]();this[_0xf010[202]][_0x4f92x30]= _0x4f92x32}};for(var _0x4f92x30=_0x4f92x2c;_0x4f92x30< this[_0xf010[202]][_0xf010[83]];_0x4f92x30++){this[_0xf010[202]][_0x4f92x30][_0xf010[177]]()};this[_0xf010[202]][_0xf010[207]](_0x4f92x2c,this[_0xf010[202]][_0xf010[83]]- _0x4f92x2c)};if(this[_0xf010[208]]== null&& _0x4f92x2d> 0){this[_0xf010[208]]= []};if(this[_0xf010[208]]!= null){for(var _0x4f92x30=0;_0x4f92x30<= _0x4f92x2d;_0x4f92x30++){var _0x4f92x31=[ new mxPoint(_0x4f92x2b[_0xf010[70]],_0x4f92x2b[_0xf010[73]]+ (_0x4f92x30+ 1)* _0x4f92x15[_0xf010[96]]), new mxPoint(_0x4f92x2e,_0x4f92x2b[_0xf010[73]]+ (_0x4f92x30+ 1)* _0x4f92x15[_0xf010[96]])];if(this[_0xf010[208]][_0x4f92x30]!= null){this[_0xf010[208]][_0x4f92x30][_0xf010[52]]= 1;this[_0xf010[208]][_0x4f92x30][_0xf010[203]]= _0x4f92x31;this[_0xf010[208]][_0x4f92x30][_0xf010[179]]()}else {var _0x4f92x32= new mxPolyline(_0x4f92x31,this[_0xf010[153]],_0x4f92x29);_0x4f92x32[_0xf010[166]]= this[_0xf010[166]];_0x4f92x32[_0xf010[204]]= this[_0xf010[205]];_0x4f92x32[_0xf010[206]]= false;_0x4f92x32[_0xf010[52]]= _0x4f92x29;_0x4f92x32[_0xf010[12]](this[_0xf010[53]][_0xf010[178]]);_0x4f92x32[_0xf010[179]]();this[_0xf010[208]][_0x4f92x30]= _0x4f92x32}};for(var _0x4f92x30=_0x4f92x2d;_0x4f92x30< this[_0xf010[208]][_0xf010[83]];_0x4f92x30++){this[_0xf010[208]][_0x4f92x30][_0xf010[177]]()};this[_0xf010[208]][_0xf010[207]](_0x4f92x2d,this[_0xf010[208]][_0xf010[83]]- _0x4f92x2d)}};mxEdgeHandler[_0xf010[44]][_0xf010[209]]= true;mxGraphHandler[_0xf010[44]][_0xf010[58]]= true;var _0x4f92x33=mxGraphHandler[_0xf010[44]][_0xf010[210]];mxGraphHandler[_0xf010[44]][_0xf010[210]]= function(_0x4f92x34,_0x4f92x35,_0x4f92x14){for(var _0x4f92x30=0;_0x4f92x30< _0x4f92x35[_0xf010[83]];_0x4f92x30++){if(this[_0xf010[14]][_0xf010[36]]()[_0xf010[211]](_0x4f92x35[_0x4f92x30])){var _0x4f92x36=this[_0xf010[14]][_0xf010[212]](_0x4f92x35[_0x4f92x30]);if(_0x4f92x36!= null&& _0x4f92x36[_0xf010[213]]){return false}}};return _0x4f92x33[_0xf010[33]](this,arguments)};mxGuide[_0xf010[44]][_0xf010[214]]= function(_0x4f92x14){return !mxEvent[_0xf010[215]](_0x4f92x14)};mxPopupMenuAddItem= mxPopupMenu[_0xf010[44]][_0xf010[216]];mxPopupMenu[_0xf010[44]][_0xf010[216]]= function(_0x4f92x37,_0x4f92x38,_0x4f92x39,_0x4f92x34,_0x4f92x3a,_0x4f92x3b){var _0x4f92x3c=mxPopupMenuAddItem[_0xf010[33]](this,arguments);if(_0x4f92x3b!= null&& !_0x4f92x3b){mxEvent[_0xf010[35]](_0x4f92x3c,_0xf010[217],function(_0x4f92x14){mxEvent[_0xf010[218]](_0x4f92x14)})};return _0x4f92x3c};var _0x4f92x3d=mxGraphHandler[_0xf010[44]][_0xf010[219]];mxGraphHandler[_0xf010[44]][_0xf010[219]]= function(_0x4f92x3e){var _0x4f92x3f=this[_0xf010[14]][_0xf010[36]]();var _0x4f92x40=_0x4f92x3f[_0xf010[221]](this[_0xf010[14]][_0xf010[220]]());var _0x4f92x41=_0x4f92x3d[_0xf010[33]](this,arguments);var _0x4f92x34=_0x4f92x3f[_0xf010[221]](_0x4f92x41);if(_0x4f92x40== null|| (_0x4f92x40!= _0x4f92x41&& _0x4f92x40!= _0x4f92x34)){while(!this[_0xf010[14]][_0xf010[222]](_0x4f92x41)&& !this[_0xf010[14]][_0xf010[222]](_0x4f92x34)&& _0x4f92x3f[_0xf010[211]](_0x4f92x34)&& !this[_0xf010[14]][_0xf010[223]](_0x4f92x34)){_0x4f92x41= _0x4f92x34;_0x4f92x34= this[_0xf010[14]][_0xf010[36]]()[_0xf010[221]](_0x4f92x41)}};return _0x4f92x41};var _0x4f92x42=mxGraphHandler[_0xf010[44]][_0xf010[224]];mxGraphHandler[_0xf010[44]][_0xf010[224]]= function(_0x4f92x41){var _0x4f92x3c=_0x4f92x42[_0xf010[33]](this,arguments);var _0x4f92x3f=this[_0xf010[14]][_0xf010[36]]();var _0x4f92x40=_0x4f92x3f[_0xf010[221]](this[_0xf010[14]][_0xf010[220]]());var _0x4f92x34=_0x4f92x3f[_0xf010[221]](_0x4f92x41);if(_0x4f92x40== null|| (_0x4f92x40!= _0x4f92x41&& _0x4f92x40!= _0x4f92x34)){if(!this[_0xf010[14]][_0xf010[222]](_0x4f92x41)&& _0x4f92x3f[_0xf010[211]](_0x4f92x34)&& !this[_0xf010[14]][_0xf010[223]](_0x4f92x34)){_0x4f92x3c= true}};return _0x4f92x3c};mxGraphHandler[_0xf010[44]][_0xf010[225]]= function(_0x4f92x3e){var _0x4f92x41=_0x4f92x3e[_0xf010[226]]();if(_0x4f92x41== null){_0x4f92x41= this[_0xf010[227]]};var _0x4f92x3f=this[_0xf010[14]][_0xf010[36]]();var _0x4f92x34=_0x4f92x3f[_0xf010[221]](_0x4f92x41);while(this[_0xf010[14]][_0xf010[222]](_0x4f92x41)&& _0x4f92x3f[_0xf010[211]](_0x4f92x34)&& !this[_0xf010[14]][_0xf010[223]](_0x4f92x34)){_0x4f92x41= _0x4f92x34;_0x4f92x34= _0x4f92x3f[_0xf010[221]](_0x4f92x41)};this[_0xf010[14]][_0xf010[229]](_0x4f92x41,_0x4f92x3e[_0xf010[228]]())};mxPanningHandler[_0xf010[44]][_0xf010[230]]= function(_0x4f92x3e){var _0x4f92x41=_0x4f92x3e[_0xf010[226]]();var _0x4f92x3f=this[_0xf010[14]][_0xf010[36]]();var _0x4f92x34=_0x4f92x3f[_0xf010[221]](_0x4f92x41);while(_0x4f92x3f[_0xf010[211]](_0x4f92x34)&& !this[_0xf010[14]][_0xf010[223]](_0x4f92x34)){if(this[_0xf010[14]][_0xf010[222]](_0x4f92x34)){_0x4f92x41= _0x4f92x34};_0x4f92x34= _0x4f92x3f[_0xf010[221]](_0x4f92x34)};return _0x4f92x41}};Editor[_0xf010[44]][_0xf010[18]]= function(){var _0x4f92xe=this[_0xf010[14]];var _0x4f92x43= new mxUndoManager();var _0x4f92x44=function(_0x4f92x45,_0x4f92x14){_0x4f92x43[_0xf010[233]](_0x4f92x14[_0xf010[232]](_0xf010[231]))};_0x4f92xe[_0xf010[36]]()[_0xf010[35]](mxEvent.UNDO,_0x4f92x44);_0x4f92xe[_0xf010[234]]()[_0xf010[35]](mxEvent.UNDO,_0x4f92x44);var _0x4f92x46=function(_0x4f92x45,_0x4f92x14){var _0x4f92x47=_0x4f92xe[_0xf010[236]](_0x4f92x14[_0xf010[232]](_0xf010[231])[_0xf010[235]]);var _0x4f92x35=[];for(var _0x4f92x30=1;_0x4f92x30< _0x4f92x47[_0xf010[83]];_0x4f92x30++){if(_0x4f92xe[_0xf010[53]][_0xf010[237]](_0x4f92x47[_0x4f92x30])!= null){_0x4f92x35[_0xf010[238]](_0x4f92x47[_0x4f92x30])}};_0x4f92xe[_0xf010[239]](_0x4f92x35)};_0x4f92x43[_0xf010[35]](mxEvent.UNDO,_0x4f92x46);_0x4f92x43[_0xf010[35]](mxEvent.REDO,_0x4f92x46);return _0x4f92x43};Editor[_0xf010[44]][_0xf010[13]]= function(){mxStencilRegistry[_0xf010[241]](STENCIL_PATH+ _0xf010[240])};(function(){mxStencilRegistry[_0xf010[242]]= {};mxStencilRegistry[_0xf010[243]]= [];mxStencilRegistry[_0xf010[244]]= function(_0x4f92x48){var _0x4f92x3c=mxStencilRegistry[_0xf010[245]][_0x4f92x48];if(_0x4f92x3c== null){var _0x4f92x49=mxStencilRegistry[_0xf010[246]](_0x4f92x48);if(_0x4f92x49!= null){var _0x4f92x4a=mxStencilRegistry[_0xf010[242]][_0x4f92x49];if(_0x4f92x4a!= null){if(mxStencilRegistry[_0xf010[243]][_0x4f92x49]== null){mxStencilRegistry[_0xf010[243]][_0x4f92x49]= 1;for(var _0x4f92x30=0;_0x4f92x30< _0x4f92x4a[_0xf010[83]];_0x4f92x30++){var _0x4f92x4b=_0x4f92x4a[_0x4f92x30];if(_0x4f92x4b[_0xf010[248]]()[_0xf010[247]](_0x4f92x4b[_0xf010[83]]- 4,_0x4f92x4b[_0xf010[83]])== _0xf010[25]){mxStencilRegistry[_0xf010[241]](_0x4f92x4b,null)}else {if(_0x4f92x4b[_0xf010[248]]()[_0xf010[247]](_0x4f92x4b[_0xf010[83]]- 3,_0x4f92x4b[_0xf010[83]])== _0xf010[249]){var _0x4f92x4c=mxUtils[_0xf010[250]](_0x4f92x4b);if(_0x4f92x4c!= null){eval[_0xf010[11]](window,_0x4f92x4c[_0xf010[251]]())}}else {}}}}}else {mxStencilRegistry[_0xf010[241]](STENCIL_PATH+ _0xf010[252]+ _0x4f92x49+ _0xf010[25],null)};_0x4f92x3c= mxStencilRegistry[_0xf010[245]][_0x4f92x48]}};return _0x4f92x3c};mxStencilRegistry[_0xf010[246]]= function(_0x4f92x48){var _0x4f92x4d=_0x4f92x48[_0xf010[254]](_0xf010[253]);var _0x4f92x4e=null;if(_0x4f92x4d[_0xf010[83]]> 0&& _0x4f92x4d[0]== _0xf010[255]){_0x4f92x4e= _0x4f92x4d[1];for(var _0x4f92x30=2;_0x4f92x30< _0x4f92x4d[_0xf010[83]]- 1;_0x4f92x30++){_0x4f92x4e+= _0xf010[252]+ _0x4f92x4d[_0x4f92x30]}};return _0x4f92x4e};mxStencilRegistry[_0xf010[241]]= function(_0x4f92x4f,_0x4f92x50,_0x4f92x51){_0x4f92x51= (_0x4f92x51!= null)?_0x4f92x51:false;var _0x4f92x52=mxStencilRegistry[_0xf010[243]][_0x4f92x4f];if(_0x4f92x51|| _0x4f92x52== null){var _0x4f92x53=false;if(_0x4f92x52== null){var _0x4f92x4c=mxUtils[_0xf010[250]](_0x4f92x4f);_0x4f92x52= _0x4f92x4c[_0xf010[256]]();mxStencilRegistry[_0xf010[243]][_0x4f92x4f]= _0x4f92x52;_0x4f92x53= true};mxStencilRegistry[_0xf010[257]](_0x4f92x52,_0x4f92x50,_0x4f92x53)}};mxStencilRegistry[_0xf010[257]]= function(_0x4f92x54,_0x4f92x50,_0x4f92x53){_0x4f92x53= (_0x4f92x53!= null)?_0x4f92x53:true;var _0x4f92x55=_0x4f92x54[_0xf010[258]];var _0x4f92x56=_0x4f92x55[_0xf010[184]];var _0x4f92x57=_0xf010[20];var _0x4f92x48=_0x4f92x55[_0xf010[56]](_0xf010[259]);if(_0x4f92x48!= null){_0x4f92x57= _0x4f92x48+ _0xf010[253]};while(_0x4f92x56!= null){if(_0x4f92x56[_0xf010[260]]== mxConstants[_0xf010[261]]){_0x4f92x48= _0x4f92x56[_0xf010[56]](_0xf010[259]);if(_0x4f92x48!= null){_0x4f92x57= _0x4f92x57[_0xf010[248]]();var _0x4f92x58=_0x4f92x48[_0xf010[263]](/ /g,_0xf010[262]);if(_0x4f92x53){mxStencilRegistry[_0xf010[264]](_0x4f92x57+ _0x4f92x58[_0xf010[248]](), new mxStencil(_0x4f92x56))};if(_0x4f92x50!= null){var _0x4f92x19=_0x4f92x56[_0xf010[56]](_0xf010[265]);var _0x4f92x1a=_0x4f92x56[_0xf010[56]](_0xf010[266]);_0x4f92x19= (_0x4f92x19== null)?80:parseInt(_0x4f92x19,10);_0x4f92x1a= (_0x4f92x1a== null)?80:parseInt(_0x4f92x1a,10);_0x4f92x50(_0x4f92x57,_0x4f92x58,_0x4f92x48,_0x4f92x19,_0x4f92x1a)}}};_0x4f92x56= _0x4f92x56[_0xf010[267]]}}})();OpenFile= function(_0x4f92x59){this[_0xf010[268]]= null;this[_0xf010[269]]= null;this[_0xf010[270]]= _0x4f92x59};OpenFile[_0xf010[44]][_0xf010[271]]= function(_0x4f92x6){this[_0xf010[269]]= _0x4f92x6;this[_0xf010[272]]()};OpenFile[_0xf010[44]][_0xf010[273]]= function(_0x4f92x6,_0x4f92x5a){this[_0xf010[274]]= _0x4f92x6;this[_0xf010[21]]= _0x4f92x5a;this[_0xf010[272]]()};OpenFile[_0xf010[44]][_0xf010[275]]= function(_0x4f92x5b){this[_0xf010[276]]();mxUtils[_0xf010[277]](_0x4f92x5b)};OpenFile[_0xf010[44]][_0xf010[272]]= function(){if(this[_0xf010[269]]!= null&& this[_0xf010[274]]!= null){this[_0xf010[269]](this[_0xf010[274]],this[_0xf010[21]]);this[_0xf010[276]]()}};OpenFile[_0xf010[44]][_0xf010[276]]= function(){if(this[_0xf010[270]]!= null){this[_0xf010[270]]()}} \ No newline at end of file diff --git a/public/assets/plugins/square/js/EditorUi.js b/public/assets/plugins/square/js/EditorUi.js index cfdbef9..98df9c8 100644 --- a/public/assets/plugins/square/js/EditorUi.js +++ b/public/assets/plugins/square/js/EditorUi.js @@ -1,1623 +1 @@ -/** - * $Id: EditorUi.js,v 1.21 2013/03/14 20:46:36 david Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Constructs a new graph editor - */ - -EditorUi = function(editor, container) { - this.editor = editor || new Editor(); - this.container = container || document.getElementById('geEditor'); - var graph = editor.graph; - var self = this; - - // Disables scrollbars - this.container.style.overflow = 'hidden'; - - // Pre-fetches submenu image - new Image().src = mxPopupMenu.prototype.submenuImage; - - // Pre-fetches connect image - if (mxConnectionHandler.prototype.connectImage != null) { - new Image().src = mxConnectionHandler.prototype.connectImage.src; - } - - // Creates the user interface - this.actions = new Actions(this); - this.menus = new Menus(this); - this.createDivs(); - this.refresh(); - this.createUi(); - - // Disables HTML and text selection - var textEditing = mxUtils.bind(this, function(evt) { - if (evt == null) { - evt = window.event; - } - - if (this.isSelectionAllowed(evt)) { - return true; - } - - return graph.isEditing(); - }); - - // Disables text selection while not editing and no dialog visible - if (this.container == document.body) { - this.menubarContainer.onselectstart = textEditing; - this.menubarContainer.onmousedown = textEditing; - this.toolbarContainer.onselectstart = textEditing; - this.toolbarContainer.onmousedown = textEditing; - this.diagramContainer.onselectstart = textEditing; - this.diagramContainer.onmousedown = textEditing; - this.sidebarContainer.onselectstart = textEditing; - this.sidebarContainer.onmousedown = textEditing; - this.footerContainer.onselectstart = textEditing; - this.footerContainer.onmousedown = textEditing; - } - - // And uses built-in context menu while editing - if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' || - document.documentMode < 9)) { - mxEvent.addListener(this.diagramContainer, 'contextmenu', textEditing); - mxEvent.addListener(this.sidebarContainer, 'contextmenu', textEditing); - } else { - // Allows browser context menu outside of diagram and sidebar - this.diagramContainer.oncontextmenu = textEditing; - this.sidebarContainer.oncontextmenu = textEditing; - } - - // Contains the main graph instance inside the given panel - graph.init(this.diagramContainer); - graph.refresh(); - - // Enables scrollbars and sets cursor style for the container - graph.container.setAttribute('tabindex', '0'); - // graph.container.style.overflow = (touchStyle) ? 'hidden' : 'auto'; - graph.container.style.cursor = 'default'; - graph.container.style.backgroundImage = 'url(' + editor.gridImage + ')'; - graph.container.style.backgroundPosition = '-1px -1px'; - graph.container.focus(); - - // Keeps graph container focused on mouse down - var graphFireMouseEvent = graph.fireMouseEvent; - graph.fireMouseEvent = function(evtName, me, sender) { - if (evtName == mxEvent.MOUSE_DOWN) { - this.container.focus(); - } - - graphFireMouseEvent.apply(this, arguments); - }; - - // Giuseppe Careri - // Defines invalid connections along with the error messages that they produce. - this.createMultiplicities(graph.multiplicities, ['start', 'finally', 'end'], [ - [1, 1], - [1, 1], - [0, 0] - ], [ - [0, 0], - [0, 0], - [1, 'n'] - ]); - this.createMultiplicities(graph.multiplicities, ['answer', 'hangup', 'dial', - 'ext_dial', 'queue', 'voicemail', 'callback' - ], [ - [1, 1], - [0, 0], - [0, 1], - [0, 1], - [0, 1], - [1, 1], - [0, 1] - ], [ - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'] - ]); - this.createMultiplicities(graph.multiplicities, ['set', 'math'], [ - [1, 1], - [1, 1] - ], [ - [1, 'n'], - [1, 'n'] - ]); - this.createMultiplicities(graph.multiplicities, ['background', 'playback', - 'menu', 'saydigits', 'saynumber', 'sayphonetic', 'tts', 'ispeechtts', - 'getdigits', 'getsecretdigits' - ], [ - [1, 'n'], - [1, 1], - [1, 'n'], - [1, 1], - [1, 1], - [1, 1], - [1, 1], - [1, 1], - [1, 'n'], - [1, 'n'] - ], [ - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'] - ]); - this.createMultiplicities(graph.multiplicities, ['record'], [ - [1, 1] - ], [ - [1, 'n'] - ]); - this.createMultiplicities(graph.multiplicities, ['database', 'ispeechasr', 'sendSMS', 'sendMail'], [ - [1, 1], - [1, 1], - [1, 1], - [1, 1] - ], [ - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'] - ]); - this.createMultiplicities(graph.multiplicities, ['gotoc', 'gotoif', - 'gotoiftime', 'gotoifmultitime', 'vswitch' - ], [ - [0, 0], - [1, 2], - [1, 2], - [1, 2], - [1, 'n'] - ], [ - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'] - ]); - this.createMultiplicities(graph.multiplicities, ['queuelog', 'goal'], [ - [1, 1], - [1, 1] - ], [ - [1, 'n'], - [1, 'n'] - ]); - this.createMultiplicities(graph.multiplicities, ['noop', 'system', 'agi', - 'subproject', 'custom_app' - ], [ - [1, 1], - [1, 1], - [0, 1], - [0, 1], - [0, 1] - ], [ - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'], - [1, 'n'] - ]); - - // Giuseppe Careri - // Processes a doubleclick on an optional cell and fires a event. - // The event is fired initially. - // If the graph is enabled and the event has not been consumed, then is called with the given cell. - // The event is ignored if no cell was specified. - graph.dblClick = function(evt, cell) { - var edges = ['background', 'gotoif', 'gotoiftime', 'menu', 'getdigits', 'getsecretdigits', - 'vswitch' - ]; - var mxe = new mxEventObject(mxEvent.DOUBLE_CLICK, 'event', evt, 'cell', - cell); - this.fireEvent(mxe); - - if (this.isEnabled() && !mxEvent.isConsumed(evt) && !mxe.isConsumed()) { - // Override dblClick Vertices and Edges - if (this.getModel().isEdge(cell)) { - if (edges.indexOf(cell.source.value.tagName) >= 0) - this.startEditingAtCell(cell); - } else if (this.getModel().isVertex(cell)) { - self.showDialog(new GeneralDialog(self, cell).container, 320, 280, true, - true); - } - mxe.consume(); - } - } - - // Configures automatic expand on mouseover - graph.panningHandler.autoExpand = true; - - // Installs context menu - graph.panningHandler.factoryMethod = mxUtils.bind(this, function(menu, cell, - evt) { - this.menus.createPopupMenu(menu, cell, evt); - }); - - // Initializes the outline - editor.outline.init(this.outlineContainer); - - // Hides context menu - mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) { - graph.panningHandler.hideMenu(); - })); - - // Adds gesture handling (pinch to zoom) - if (mxClient.IS_TOUCH) { - mxEvent.addListener(graph.container, 'gesturechange', - mxUtils.bind(this, function(evt) { - graph.view.getDrawPane().setAttribute('transform', 'scale(' + evt.scale + - ')'); - graph.view.getOverlayPane().style.visibility = 'hidden'; - }) - ); - - mxEvent.addListener(graph.container, 'gestureend', - mxUtils.bind(this, function(evt) { - graph.view.getDrawPane().removeAttribute('transform'); - graph.zoomToCenter = true; - graph.zoom(evt.scale); - graph.view.getOverlayPane().style.visibility = 'visible'; - }) - ); - } - - // Create handler for key events - var keyHandler = this.createKeyHandler(editor); - - // Getter for key handler - this.getKeyHandler = function() { - return keyHandler; - }; - - // Updates the editor UI after the window has been resized - mxEvent.addListener(window, 'resize', mxUtils.bind(this, function() { - this.refresh(); - graph.sizeDidChange(); - this.editor.outline.update(false); - this.editor.outline.outline.sizeDidChange(); - })); - - // Updates action and menu states - this.init(); - this.open(); -}; - -/** - * Specifies the size of the split bar. - */ -EditorUi.prototype.splitSize = (mxClient.IS_TOUCH) ? 16 : 8; - -/** - * Specifies the height of the menubar. Default is 34. - */ -EditorUi.prototype.menubarHeight = 33; - -/** - * Specifies the height of the toolbar. Default is 36. - */ -EditorUi.prototype.toolbarHeight = 36; - -/** - * Specifies the height of the footer. Default is 28. - */ -EditorUi.prototype.footerHeight = 28; - -/** - * Specifies the position of the horizontal split bar. Default is 212. - */ -EditorUi.prototype.hsplitPosition = 204; - -/** - * Specifies the position of the vertical split bar. Default is 190. - */ -EditorUi.prototype.vsplitPosition = 190; - -/** - * Installs the listeners to update the action states. - */ -EditorUi.prototype.init = function() { - // Updates action states - this.addUndoListener(); - this.addSelectionListener(); - - // Overrides clipboard to update paste action state - var paste = this.actions.get('paste'); - - var updatePaste = function() { - paste.setEnabled(!mxClipboard.isEmpty()); - }; - - var mxClipboardCut = mxClipboard.cut; - mxClipboard.cut = function() { - mxClipboardCut.apply(this, arguments); - updatePaste(); - }; - - var mxClipboardCopy = mxClipboard.copy; - mxClipboard.copy = function() { - mxClipboardCopy.apply(this, arguments); - updatePaste(); - }; -}; - -/** - * Hook for allowing selection and context menu for certain events. - */ -EditorUi.prototype.isSelectionAllowed = function(evt) { - return false; -}; - -/** - * Opens the current diagram via the window.opener if one exists. - */ -EditorUi.prototype.open = function() { - // Cross-domain window access is not allowed in FF, so if we - // were opened from another domain then this will fail. - try { - if (window.opener != null && window.opener.openFile != null) { - window.opener.openFile.setConsumer(mxUtils.bind(this, function(xml, - filename) { - try { - var doc = mxUtils.parseXml(xml); - this.editor.setGraphXml(doc.documentElement); - this.editor.modified = false; - this.editor.undoManager.clear(); - - if (filename != null) { - this.editor.filename = filename; - } - } catch (e) { - mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message); - } - })); - } - } catch (e) { - // ignore - } -}; - -/** - * Giuseppe Careri - * Opens the current diagram via string. - */ -EditorUi.prototype.openString = function(xml, filename, data) { - try { - var doc = mxUtils.parseXml(xml); - this.editor.setGraphXml(doc.documentElement); - this.editor.modified = false; - this.editor.undoManager.clear(); - - if (filename != null) { - this.editor.filename = filename; - } - - if (data != null) { - this.editor.data = data; - } - } catch (e) { - mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message); - } -}; - -/** - * Saves As the current graph under the given project name. - */ -EditorUi.prototype.new = function(name) { - var editor = this.editor; - - if (name != null) { - var xml = mxUtils.getPrettyXml(this.editor.getGraphXml()); - try { - if (useLocalStorage) { - if (localStorage.getItem(name) != null && - !mxUtils.confirm(mxResources.get('replace', [name]))) { - return; - } - - localStorage.setItem(name, xml); - this.editor.setStatus(mxResources.get('saved') + ' ' + new Date()); - } else { - console.log(xml.length); - console.log(MAX_REQUEST_SIZE); - if (xml.length < MAX_REQUEST_SIZE) { - xml = encodeURIComponent(xml); - name = encodeURIComponent(name); - - var xhr = new XMLHttpRequest(); - xhr.open("POST", SAVE_URL, true); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token); - xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 201) { - editor.setStatus('Project ' + JSON.parse(xhr.response).name + - ' is opening in new window!'); - setTimeout(function() { - window.open('square/projects/view/' + JSON.parse(xhr.response).id, - '_blank'); - }, 1500); - } else { - try { - var response = JSON.parse(xhr.response); - editor.setStatus('Error creating project: ' + response.errors[0].message); - } catch (e) { - editor.setStatus('Error creating project' + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } - } - } - }; - xhr.onerror = function(e) { - mxUtils.alert(xhr.statusText); - }; - xhr.send('description=project_new&name=' + name); - } else { - mxUtils.alert(mxResources.get('drawingTooLarge')); - mxUtils.popup(xml); - - return; - } - } - - this.editor.filename = name; - this.editor.modified = false; - } catch (e) { - this.editor.setStatus('Error creating project'); - } - } else { - this.editor.setStatus('Error creating project'); - } -}; - - -/** - * Saves the current graph under the given project name. - */ -EditorUi.prototype.save = function(name) { - var editor = this.editor; - - if (name != null) { - var xml = mxUtils.getPrettyXml(this.editor.getGraphXml()); - try { - if (useLocalStorage) { - if (localStorage.getItem(name) != null && - !mxUtils.confirm(mxResources.get('replace', [name]))) { - return; - } - - localStorage.setItem(name, xml); - this.editor.setStatus(mxResources.get('saved') + ' ' + new Date()); - } else { - console.log(xml.length); - console.log(MAX_REQUEST_SIZE); - if (xml.length < MAX_REQUEST_SIZE) { - xml = encodeURIComponent(xml); - - var xhr = new XMLHttpRequest(); - xhr.open("PUT", SAVE_URL + this.editor.data.id, true); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token); - xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 200) { - editor.setStatus('Updated at ' + JSON.parse(xhr.response).updatedAt + - ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } else { - try { - var response = JSON.parse(xhr.response); - editor.setStatus('Error saving project: ' + response.errors[0].message); - } catch (e) { - editor.setStatus('Error saving project' + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } - } - } - }; - xhr.onerror = function(e) { - mxUtils.alert(xhr.statusText); - }; - xhr.send('preproduction=' + xml); - } else { - mxUtils.alert(mxResources.get('drawingTooLarge')); - mxUtils.popup(xml); - - return; - } - } - - this.editor.filename = name; - this.editor.modified = false; - } catch (e) { - this.editor.setStatus('Error saving file'); - } - } else { - this.editor.setStatus('Error saving file'); - } -}; - -/** - * Saves the current graph under the given project name. - */ -EditorUi.prototype.description = function(description) { - var editor = this.editor; - - if (description !== null) { - var xhr = new XMLHttpRequest(); - xhr.open("PUT", SAVE_URL + this.editor.data.id, true); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token); - - xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 200) { - editor.setStatus('Updated at ' + JSON.parse(xhr.response).updatedAt + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - editor.data.description = description; - } else { - try { - var response = JSON.parse(xhr.response); - editor.setStatus('Error updating description: ' + response.errors[0].message); - } catch (e) { - editor.setStatus('Error updating description' + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } - } - } - }; - xhr.onerror = function(e) { - mxUtils.alert(xhr.statusText); - }; - xhr.send('description=' + description); - } else { - this.editor.setStatus('Error updating description'); - } -}; - -/** - * Saves As the current graph under the given project name. - */ -EditorUi.prototype.saveAs = function(name) { - var editor = this.editor; - - if (name != null) { - var xml = mxUtils.getPrettyXml(this.editor.getGraphXml()); - try { - if (useLocalStorage) { - if (localStorage.getItem(name) != null && - !mxUtils.confirm(mxResources.get('replace', [name]))) { - return; - } - - localStorage.setItem(name, xml); - this.editor.setStatus(mxResources.get('saved') + ' ' + new Date()); - } else { - console.log(xml.length); - console.log(MAX_REQUEST_SIZE); - if (xml.length < MAX_REQUEST_SIZE) { - xml = encodeURIComponent(xml); - name = encodeURIComponent(name); - - var xhr = new XMLHttpRequest(); - xhr.open("POST", SAVE_URL, true); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token); - xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 201) { - editor.setStatus('Project ' + JSON.parse(xhr.response).name + - ' is opening in new window!'); - setTimeout(function() { - window.open('square/projects/view/' + JSON.parse(xhr.response).id, - '_blank'); - }, 1500); - } else { - try { - var response = JSON.parse(xhr.response); - editor.setStatus('Error cloning project: ' + response.errors[0].message); - } catch (e) { - editor.setStatus('Error cloning project' + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } - } - } - }; - xhr.onerror = function(e) { - mxUtils.alert(xhr.statusText); - }; - xhr.send('description=project_cloned&name=' + name + - '&preproduction=' + xml + '&production=' + xml); - } else { - mxUtils.alert(mxResources.get('drawingTooLarge')); - mxUtils.popup(xml); - - return; - } - } - - this.editor.filename = name; - this.editor.modified = false; - } catch (e) { - this.editor.setStatus('Error saving file'); - } - } else { - this.editor.setStatus('Error saving file'); - } -}; - -/** - * Plush the current graph under the given project name. - */ -EditorUi.prototype.validate = function(a, b) { - var graph = this.editor.graph; - for (var a = a != null ? a : graph.model.getRoot(), b = b != null ? b : {}, c = - true, d = graph.model.getChildCount(a), e = 0; e < d; e++) { - var f = graph.model.getChildAt(a, e), - g = b; - graph.isValidRoot(f) && (g = {}); - g = this.validate(f, g); - g != null ? graph.setCellWarning(f, g.replace(/\n/g, "
")) : graph.setCellWarning( - f, null); - c = c && g == null - } - - d = ""; - - //--- Giuseppe Careri - Modify 12/12/2013 - giuseppe.careri@gmail.com - if (graph.model.isVertex(a)) { - switch (a.value.nodeName) { - case 'start': - d = this.validateBlock('start') ? '' : "Only one Start block is allowed" + - "\n"; - break; - case 'finally': - d = this.validateBlock('finally') ? '' : - "Only one Finally block is allowed" + "\n"; - break; - case 'playback': - d = (a.value.getAttribute('file_id') > 0) ? "" : mxResources.get( - 'noAudioSelected') + "\n"; - break; - case 'background': - case 'menu': - d = (a.value.getAttribute('file_id') > 0) ? "" : mxResources.get( - 'noAudioSelected') + "\n"; - d += (a.value.getAttribute('digit') > 0) ? "" : mxResources.get( - 'wrongMaxDigit') + "\n"; - break; - case 'getdigits': - d = (a.value.getAttribute('file_id') > 0) ? "" : mxResources.get( - 'noAudioSelected') + "\n"; - d += (a.value.getAttribute('variable_id') > 0) ? "" : mxResources.get( - 'noVariableSelected') + "\n"; - d += (a.value.getAttribute('mindigit') > 0) ? "" : mxResources.get( - 'wrongMinDigit') + "\n"; - d += (a.value.getAttribute('maxdigit') > 0) ? "" : mxResources.get( - 'wrongMaxDigit') + "\n"; - case 'getsecretdigits': - d = (a.value.getAttribute('file_id') > 0) ? "" : mxResources.get( - 'noAudioSelected') + "\n"; - d += (a.value.getAttribute('variable_id') > 0) ? "" : mxResources.get( - 'noVariableSelected') + "\n"; - d += (a.value.getAttribute('mindigit') > 0) ? "" : mxResources.get( - 'wrongMinDigit') + "\n"; - d += (a.value.getAttribute('maxdigit') > 0) ? "" : mxResources.get( - 'wrongMaxDigit') + "\n"; - d += (a.value.getAttribute('hiddendigitsnum') >= 0) ? "" : mxResources.get( - 'wrongHiddenDigitsnum') + "\n"; - break; - case 'vswitch': - d = (a.value.getAttribute('variable') !== "") ? "" : mxResources.get( - 'noVariableSelected') + "\n"; - break; - case 'database': - d = (a.value.getAttribute('odbc_id') > 0) ? "" : mxResources.get( - 'noDatabaseSelected') + "\n"; - break; - case 'ext_dial': - d = (a.value.getAttribute('trunk_name') !== '-1') ? "" : mxResources.get( - 'noTrunkSelected') + "\n"; - break; - case 'set': - case 'math': - d = (a.value.getAttribute('variable_id') > 0) ? "" : mxResources.get( - 'noVariableSelected') + "\n"; - break; - case 'gotoc': - d = (a.value.getAttribute('extension') !== "") ? "" : mxResources.get( - 'noExtensionSelected') + "\n"; - break; - case 'system': - case 'agi': - d = (a.value.getAttribute('command') !== "") ? "" : mxResources.get( - 'noCommandSelected') + "\n"; - break; - case 'gotoif': - d = (a.value.getAttribute('condition') !== "") ? "" : mxResources.get( - 'noConditionSelected') + "\n"; - break; - case 'saydigits': - d = (a.value.getAttribute('digits') !== "") ? "" : mxResources.get( - 'noDigitsSelected') + "\n"; - break; - case 'saynumber': - d = (a.value.getAttribute('number') !== "") ? "" : mxResources.get( - 'noNumberSelected') + "\n"; - break; - case 'sayphonetic': - d = (a.value.getAttribute('text') !== "") ? "" : mxResources.get( - 'noTextSelected') + "\n"; - break; - case 'record': - d = (a.value.getAttribute('file') !== "") ? "" : mxResources.get( - 'noFileSelected') + "\n"; - break; - case 'goal': - d = (a.value.getAttribute('goalname') !== "") ? "" : mxResources.get( - 'noGoalSelected') + "\n"; - break; - case 'ext_dial': - d = (a.value.getAttribute('phone') !== "") ? "" : mxResources.get( - 'noIdentifierSelected') + "\n"; - break; - case 'dial': - d = (a.value.getAttribute('sip_id') > 0) ? "" : mxResources.get( - 'noIdentifierSelected') + "\n"; - break; - case 'queue': - d = (a.value.getAttribute('queue_id') !== "-1") ? "" : mxResources.get( - 'noQueueSelected') + "\n"; - break; - case 'callback': - d = (a.value.getAttribute('list_id') > 0) ? "" : mxResources.get( - 'noListSelected') + "\n"; - break; - case 'gotoiftime': - d = (a.value.getAttribute('interval_id') > 0) ? "" : mxResources.get( - 'noIntervalSelected') + "\n"; - break; - case 'gotoifmultitime': - d = (a.value.getAttribute('interval_id') != "") ? "" : mxResources.get( - 'noIntervalSelected') + "\n"; - break; - case 'voicemail': - d = (a.value.getAttribute('mailbox') !== "") ? "" : mxResources.get( - 'noBoxNumberSelected') + "\n"; - break; - case 'subproject': - d = (a.value.getAttribute('project_id') > 0) ? "" : mxResources.get( - 'noProjectSelected') + "\n"; - break; - case 'sendSMS': - d = (a.value.getAttribute('account_id') > 0) ? "" : mxResources.get( - 'noAccountSelected') + "\n"; - d += (a.value.getAttribute('to') !== "") ? "" : mxResources.get( - 'noRecipientSelected') + "\n"; - d += (a.value.getAttribute('sms_text') !== "") ? "" : mxResources.get( - 'noTextSelected') + "\n"; - break; - case 'sendMail': - d = (a.value.getAttribute('account_id') > 0) ? "" : mxResources.get( - 'noAccountSelected') + "\n"; - d += (a.value.getAttribute('to') !== "") ? "" : mxResources.get( - 'noRecipientSelected') + "\n"; - break; - case 'tts': - d = (a.value.getAttribute('text') !== "") ? "" : mxResources.get( - 'noTextSelected') + "\n"; - break; - case 'ispeechtts': - d = (a.value.getAttribute('text') !== "") ? "" : mxResources.get( - 'noTextSelected') + "\n"; - d += (a.value.getAttribute('key') !== "") ? "" : mxResources.get( - 'noKeySelected') + "\n"; - break; - case 'ispeechasr': - d = (a.value.getAttribute('key') !== "") ? "" : mxResources.get( - 'noKeySelected') + "\n"; - break; - } - } - - if (graph.model.isEdge(a)) { - var z = graph.model.getCell(a.source.getId()); - switch (z.value.nodeName) { - case 'background': - var patt = /^[0-9]{1,45}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/; - d = d + ((patt.test(String(a.getValue()))) ? "" : mxResources.get( - 'numberOrInvalidOrTimeout') + "\n"); - break; - case 'menu': - var patt = /^[0-9]{1,45}$|^[-]{1}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/; - var str = String(a.getValue()); - var res = str.split(","); - res.forEach(function(entry) { - d = d + ((patt.test(entry)) ? "" : mxResources.get('numberOrAll') + - "\n"); - }); - break; - case 'getsecretdigits': - case 'getdigits': - var patt = /^(x|i|-)$/; - var str = String(a.getValue()); - d = d + ((patt.test(str)) ? "" : mxResources.get( - 'numberOrInvalidOrDefault') + "\n"); - break; - case 'gotoif': - case 'gotoiftime': - case 'gotoifmultitime': - var patt = /^(true){1}$|^(false){1}$/; - d = d + ((patt.test(String(a.getValue()))) ? "" : mxResources.get( - 'trueOrFalse') + "\n"); - break; - - } - } - // ----------------------------------------------------------------- - - - graph.isCellCollapsed(a) && !c && (d = d + ((mxResources.get(graph.containsValidationErrorsResource) || - graph.containsValidationErrorsResource) + "\n")); - d = graph.model.isEdge(a) ? - d + (graph.getEdgeValidationError(a, graph.model.getTerminal(a, true), graph - .model.getTerminal(a, false)) || "") : d + (graph.getCellValidationError(a) || - ""); - e = graph.validateCell(a, b); - e != null && (d = d + e); - graph.model.getParent(a) == null && graph.view.validate(); - return d.length > 0 || !c ? d : null -}; -EditorUi.prototype.validateBlock = function(blockName) { - var graph = this.editor.graph; - var parent = graph.getDefaultParent(); - var count = 0; - // var model = graph.getModel(); - //We can also use model.getChildren(parent) - parent.children.forEach(function(n) { - if (graph.model.isVertex(n) && n.value.nodeName == blockName) { - count++; - } - }); - return count > 1 ? false : true; -} -EditorUi.prototype.publish = function(name) { - var editor = this.editor; - - if (name != null) { - var response = this.validate(); - if (response === null) { - - var xml = mxUtils.getPrettyXml(this.editor.getGraphXml()); - try { - if (useLocalStorage) { - if (localStorage.getItem(name) != null && - !mxUtils.confirm(mxResources.get('replace', [name]))) { - return; - } - - localStorage.setItem(name, xml); - this.editor.setStatus(mxResources.get('saved') + ' ' + new Date()); - } else { - console.log(xml.length); - console.log(MAX_REQUEST_SIZE); - if (xml.length < MAX_REQUEST_SIZE) { - xml = encodeURIComponent(xml); - - var xhr = new XMLHttpRequest(); - xhr.open("PUT", SAVE_URL + this.editor.data.id, true); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token); - xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 200) { - editor.setStatus('Published at ' + JSON.parse(xhr.response).updatedAt + - ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } else { - try { - var response = JSON.parse(xhr.response); - editor.setStatus('Error publishing project: ' + response.errors[0].message); - } catch (e) { - editor.setStatus('Error publishing project' + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } - } - } - }; - xhr.onerror = function(e) { - mxUtils.alert(xhr.statusText); - }; - xhr.send('preproduction=' + xml + '&production=' + xml); - } else { - mxUtils.alert(mxResources.get('drawingTooLarge')); - mxUtils.popup(xml); - - return; - } - } - - this.editor.filename = name; - this.editor.modified = false; - } catch (e) { - this.editor.setStatus('Error publishing file'); - } - } else { - editor.setStatus('Error publishing project: '); - } - } else { - this.editor.setStatus('Error publishing file'); - } -}; - - -/** - * Create variable - */ -EditorUi.prototype.variable = function(name, description) { - var editor = this.editor; - - if (name != null) { - try { - - var xhr = new XMLHttpRequest(); - xhr.open("POST", VARIABLE_URL, true); - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); - xhr.setRequestHeader('Authorization', 'Bearer ' + editor.data.token); - xhr.onload = function(e) { - if (xhr.readyState === 4) { - if (xhr.status === 201) { - editor.setStatus('Variable created at ' + JSON.parse(xhr.response).createdAt + - ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } else { - try { - var response = JSON.parse(xhr.response); - editor.setStatus('Error creating variable: ' + response.errors[0].message); - } catch (e) { - editor.setStatus('Error creating variable' + ' (' + xhr.status + ' ' + xhr.statusText + ')'); - } - } - } - }; - xhr.onerror = function(e) { - mxUtils.alert(xhr.statusText); - }; - xhr.send('name=' + name + '&description=' + description); - } catch (e) { - this.editor.setStatus('Error creating variable'); - } - } else { - this.editor.setStatus('Error creating variable'); - } -}; - -/** - * Returns the URL for a copy of this editor with no state. - */ -EditorUi.prototype.getUrl = function(pathname) { - var href = (pathname != null) ? pathname : window.location.pathname; - var parms = (href.indexOf('?') > 0) ? 1 : 0; - - // Removes template URL parameter for new blank diagram - for (var key in urlParams) { - if (parms == 0) { - href += '?'; - } else { - href += '&'; - } - - href += key + '=' + urlParams[key]; - parms++; - } - - return href; -}; - -/** - * Updates the states of the given undo/redo items. - */ -EditorUi.prototype.addUndoListener = function() { - var undo = this.actions.get('undo'); - var redo = this.actions.get('redo'); - - var undoMgr = this.editor.undoManager; - - var undoListener = function() { - undo.setEnabled(undoMgr.canUndo()); - redo.setEnabled(undoMgr.canRedo()); - }; - - undoMgr.addListener(mxEvent.ADD, undoListener); - undoMgr.addListener(mxEvent.UNDO, undoListener); - undoMgr.addListener(mxEvent.REDO, undoListener); - undoMgr.addListener(mxEvent.CLEAR, undoListener); - - // Updates the button states once - undoListener(); -}; - -/** - * Updates the states of the given toolbar items based on the selection. - */ -EditorUi.prototype.addSelectionListener = function() { - var selectionListener = mxUtils.bind(this, function() { - var graph = this.editor.graph; - var selected = !graph.isSelectionEmpty(); - var vertexSelected = false; - var edgeSelected = false; - - var cells = graph.getSelectionCells(); - - if (cells != null) { - for (var i = 0; i < cells.length; i++) { - var cell = cells[i]; - - if (graph.getModel().isEdge(cell)) { - edgeSelected = true; - } - - if (graph.getModel().isVertex(cell)) { - vertexSelected = true; - } - - if (edgeSelected && vertexSelected) { - break; - } - } - } - - // Updates action states - var actions = ['cut', 'copy', 'delete', 'duplicate', 'bold', 'italic', - 'style', 'underline', 'toFront', 'toBack', 'dashed', 'rounded', - 'shadow', - 'tilt', 'autosize' - ]; - - for (var i = 0; i < actions.length; i++) { - this.actions.get(actions[i]).setEnabled(selected); - } - - this.actions.get('curved').setEnabled(edgeSelected); - this.actions.get('rotation').setEnabled(vertexSelected); - this.actions.get('wordWrap').setEnabled(vertexSelected); - this.actions.get('group').setEnabled(graph.getSelectionCount() > 1); - this.actions.get('ungroup').setEnabled(graph.getSelectionCount() == 1 && - graph.getModel().getChildCount(graph.getSelectionCell()) > 0); - var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1; - this.actions.get('removeFromGroup').setEnabled(oneVertexSelected && - graph.getModel().isVertex(graph.getModel().getParent(graph.getSelectionCell())) - ); - - // Updates menu states - var menus = ['fontFamily', 'fontSize', 'alignment', 'position', 'text', - 'format', - 'arrange', 'linewidth', 'spacing' - ]; - - for (var i = 0; i < menus.length; i++) { - this.menus.get(menus[i]).setEnabled(selected); - } - - menus = ['line', 'lineend', 'linestart']; - - for (var i = 0; i < menus.length; i++) { - this.menus.get(menus[i]).setEnabled(edgeSelected); - } - - this.actions.get('setAsDefaultEdge').setEnabled(edgeSelected); - - this.menus.get('align').setEnabled(graph.getSelectionCount() > 1); - this.menus.get('direction').setEnabled(vertexSelected || (edgeSelected && - graph.isLoop(graph.view.getState(graph.getSelectionCell())))); - this.menus.get('navigation').setEnabled(graph.foldingEnabled && ((graph.view - .currentRoot != null) || - (graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell())) - )); - this.actions.get('home').setEnabled(graph.view.currentRoot != null); - this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null); - var groupEnabled = graph.getSelectionCount() == 1 && graph.isValidRoot( - graph.getSelectionCell()); - this.actions.get('enterGroup').setEnabled(groupEnabled); - this.actions.get('expand').setEnabled(groupEnabled); - this.actions.get('collapse').setEnabled(groupEnabled); - this.actions.get('editLink').setEnabled(graph.getSelectionCount() == 1); - this.actions.get('openLink').setEnabled(graph.getSelectionCount() == 1 && - graph.getLinkForCell(graph.getSelectionCell()) != null); - }); - - this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE, - selectionListener); - selectionListener(); -}; - -/** - * Refreshes the viewport. - */ -EditorUi.prototype.refresh = function() { - var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode == - 5); - var w = this.container.clientWidth; - var h = this.container.clientHeight; - - if (this.container == document.body) { - w = document.body.clientWidth || document.documentElement.clientWidth; - h = (quirks) ? document.body.clientHeight || document.documentElement.clientHeight : - document.documentElement.clientHeight; - } - - var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize - - 20)); - var effVsplitPosition = Math.max(0, Math.min(this.vsplitPosition, h - this.menubarHeight - - this.toolbarHeight - this.footerHeight - this.splitSize - 1)); - - this.menubarContainer.style.height = this.menubarHeight + 'px'; - this.toolbarContainer.style.top = this.menubarHeight + 'px'; - this.toolbarContainer.style.height = this.toolbarHeight + 'px'; - - var tmp = this.menubarHeight + this.toolbarHeight; - - if (!mxClient.IS_QUIRKS) { - tmp += 1; - } - - this.sidebarContainer.style.top = tmp + 'px'; - this.sidebarContainer.style.width = effHsplitPosition + 'px'; - this.outlineContainer.style.width = effHsplitPosition + 'px'; - this.outlineContainer.style.height = effVsplitPosition + 'px'; - this.outlineContainer.style.bottom = this.footerHeight + 'px'; - this.diagramContainer.style.left = (effHsplitPosition + this.splitSize) + - 'px'; - this.diagramContainer.style.top = this.sidebarContainer.style.top; - this.footerContainer.style.height = this.footerHeight + 'px'; - this.footerContainer.style.display = 'none'; - this.hsplit.style.top = this.sidebarContainer.style.top; - this.hsplit.style.bottom = this.outlineContainer.style.bottom; - this.hsplit.style.left = effHsplitPosition + 'px'; - this.vsplit.style.width = this.sidebarContainer.style.width; - this.vsplit.style.bottom = (effVsplitPosition + this.footerHeight) + 'px'; - - if (quirks) { - this.menubarContainer.style.width = w + 'px'; - this.toolbarContainer.style.width = this.menubarContainer.style.width; - var sidebarHeight = (h - effVsplitPosition - this.splitSize - this.footerHeight - - this.menubarHeight - this.toolbarHeight); - this.sidebarContainer.style.height = sidebarHeight + 'px'; - this.diagramContainer.style.width = (w - effHsplitPosition - this.splitSize) + - 'px'; - var diagramHeight = (h - this.footerHeight - this.menubarHeight - this.toolbarHeight); - this.diagramContainer.style.height = diagramHeight + 'px'; - this.footerContainer.style.width = this.menubarContainer.style.width; - this.hsplit.style.height = diagramHeight + 'px'; - } else { - this.sidebarContainer.style.bottom = (effVsplitPosition + this.splitSize + - this.footerHeight) + 'px'; - this.diagramContainer.style.bottom = this.outlineContainer.style.bottom; - } -}; - -/** - * Creates the required containers. - */ -EditorUi.prototype.createDivs = function() { - this.menubarContainer = this.createDiv('geMenubarContainer'); - this.toolbarContainer = this.createDiv('geToolbarContainer'); - this.sidebarContainer = this.createDiv('geSidebarContainer'); - this.outlineContainer = this.createDiv('geOutlineContainer'); - this.diagramContainer = this.createDiv('geDiagramContainer'); - this.footerContainer = this.createDiv('geFooterContainer'); - this.hsplit = this.createDiv('geHsplit'); - this.vsplit = this.createDiv('geVsplit'); - - // Sets static style for containers - this.menubarContainer.style.top = '0px'; - this.menubarContainer.style.left = '0px'; - this.menubarContainer.style.right = '0px'; - this.toolbarContainer.style.left = '0px'; - this.toolbarContainer.style.right = '0px'; - this.sidebarContainer.style.left = '0px'; - this.outlineContainer.style.left = '0px'; - this.diagramContainer.style.right = '0px'; - this.footerContainer.style.left = '0px'; - this.footerContainer.style.right = '0px'; - this.footerContainer.style.bottom = '0px'; - this.vsplit.style.left = '0px'; - this.vsplit.style.height = this.splitSize + 'px'; - this.hsplit.style.width = this.splitSize + 'px'; -}; - -/** - * Creates the required containers. - */ -EditorUi.prototype.createUi = function() { - // Creates menubar - this.menubar = this.menus.createMenubar(this.createDiv('geMenubar')); - this.menubarContainer.appendChild(this.menubar.container); - - // Creates toolbar - this.toolbar = this.createToolbar(this.createDiv('geToolbar')); - this.toolbarContainer.appendChild(this.toolbar.container); - - // Creates the sidebar - this.sidebar = this.createSidebar(this.sidebarContainer); - - // Creates the footer - this.footerContainer.appendChild(this.createFooter()); - - // Adds status bar in menubar - this.statusContainer = this.createStatusContainer(); - - // Connects the status bar to the editor status - this.editor.addListener('statusChanged', mxUtils.bind(this, function() { - this.setStatusText(this.editor.getStatus()); - })); - - this.setStatusText(this.editor.getStatus()); - this.menubar.container.appendChild(this.statusContainer); - - // Inserts into DOM - this.container.appendChild(this.menubarContainer); - this.container.appendChild(this.toolbarContainer); - this.container.appendChild(this.sidebarContainer); - this.container.appendChild(this.outlineContainer); - this.container.appendChild(this.diagramContainer); - this.container.appendChild(this.footerContainer); - this.container.appendChild(this.hsplit); - this.container.appendChild(this.vsplit); - - // HSplit - this.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function( - value) { - this.hsplitPosition = value; - this.refresh(); - this.editor.graph.sizeDidChange(); - this.editor.outline.update(false); - this.editor.outline.outline.sizeDidChange(); - })); - - // VSplit - this.addSplitHandler(this.vsplit, false, this.footerHeight, mxUtils.bind( - this, - function(value) { - this.vsplitPosition = value; - this.refresh(); - this.editor.outline.update(false); - this.editor.outline.outline.sizeDidChange(); - })); -}; - -/** - * Creates a new toolbar for the given container. - */ -EditorUi.prototype.createStatusContainer = function() { - var container = document.createElement('a'); - container.className = 'geItem geStatus'; - - return container; -}; - -/** - * Creates a new toolbar for the given container. - */ -EditorUi.prototype.createStatusContainer = function() { - var container = document.createElement('a'); - container.className = 'geItem geStatus'; - - return container; -}; - -/** - * Creates a new toolbar for the given container. - */ -EditorUi.prototype.setStatusText = function(value) { - this.statusContainer.innerHTML = value; -}; - -/** - * Creates a new toolbar for the given container. - */ -EditorUi.prototype.createToolbar = function(container) { - return new Toolbar(this, container); -}; - -/** - * Creates a new sidebar for the given container. - */ -EditorUi.prototype.createSidebar = function(container) { - return new Sidebar(this, container); -}; - -/** - * Creates and returns a new footer. - */ -EditorUi.prototype.createFooter = function() { - return this.createDiv('geFooter'); -}; - -/** - * Creates the actual toolbar for the toolbar container. - */ -EditorUi.prototype.createDiv = function(classname) { - var elt = document.createElement('div'); - elt.className = classname; - - return elt; -}; - -/** - * Creates the custom header. - */ -EditorUi.prototype.createHeader = function(classname) { - var elt = document.createElement(classname); - return elt; -}; - -/** - * Creates the custom header. - */ -EditorUi.prototype.createForm = function(classname) { - var elt = document.createElement('form'); - elt.className = classname; - - return elt; -}; - -/** - * Updates the states of the given undo/redo items. - */ -EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange) { - var start = null; - var initial = null; - - function getValue() { - return parseInt(((horizontal) ? elt.style.left : elt.style.bottom)); - }; - - function moveHandler(evt) { - if (start != null) { - var pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y - - pt.y)) - dx)); - mxEvent.consume(evt); - } - }; - - function dropHandler(evt) { - moveHandler(evt); - start = null; - initial = null; - }; - - mxEvent.addGestureListeners(elt, function(evt) { - start = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - initial = getValue(); - mxEvent.consume(evt); - }); - - mxEvent.addListener(document, 'mousemove', moveHandler); - mxEvent.addListener(document, 'touchmove', moveHandler); - mxEvent.addListener(document, 'mouseup', dropHandler); - mxEvent.addListener(document, 'touchend', dropHandler); -}; - -/** - * Displays a print dialog. - */ -EditorUi.prototype.showDialog = function(elt, w, h, modal, closable, onClose) { - this.hideDialog(); - this.dialog = new Dialog(this, elt, w, (mxClient.IS_VML) ? h - 12 : h, - modal, - closable, onClose); -}; - -/** - * Displays a print dialog. - */ -EditorUi.prototype.hideDialog = function() { - if (this.dialog != null) { - this.dialog.close(); - this.dialog = null; - this.editor.graph.container.focus(); - } -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -EditorUi.prototype.saveFile = function(forceDialog) { - if (!forceDialog && this.editor.filename != null) { - this.save(this.editor.getOrCreateFilename()); - } else { - this.showDialog(new SaveDialog(this).container, 300, 100, true, true); - } -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -EditorUi.prototype.publishFile = function(forceDialog) { - if (!forceDialog && this.editor.filename != null) { - this.publish(this.editor.getOrCreateFilename()); - } else { - //this.showDialog(new SaveDialog(this).container, 300, 100, true, true); - } -}; - -/** - * Executes the given layout. - */ -EditorUi.prototype.executeLayout = function(layout, animate, ignoreChildCount) { - var graph = this.editor.graph; - var cell = graph.getSelectionCell(); - - // Allow global overridding of animation - animate = this.animate != null ? this.animate : animate; - - graph.getModel().beginUpdate(); - try { - layout.execute(graph.getDefaultParent(), cell); - } catch (e) { - throw e; - } finally { - // Animates the changes in the graph model except - // for Camino, where animation is too slow - if (animate && navigator.userAgent.indexOf('Camino') < 0) { - // New API for animating graph layout results asynchronously - var morph = new mxMorphing(graph); - morph.addListener(mxEvent.DONE, mxUtils.bind(this, function() { - graph.getModel().endUpdate(); - })); - - morph.startAnimation(); - } else { - graph.getModel().endUpdate(); - } - } -}; - -/** - * Creates the keyboard event handler for the current graph and history. - */ -EditorUi.prototype.createKeyHandler = function(editor) { - var graph = this.editor.graph; - var keyHandler = new mxKeyHandler(graph); - - // Routes command-key to control-key on Mac - keyHandler.isControlDown = function(evt) { - return mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey); - }; - - // Helper function to move cells with the cursor keys - function nudge(keyCode) { - if (!graph.isSelectionEmpty()) { - var dx = 0; - var dy = 0; - - if (keyCode == 37) { - dx = -1; - } else if (keyCode == 38) { - dy = -1; - } else if (keyCode == 39) { - dx = 1; - } else if (keyCode == 40) { - dy = 1; - } - - graph.moveCells(graph.getSelectionCells(), dx, dy); - graph.scrollCellToVisible(graph.getSelectionCell()); - } - }; - - // Binds keystrokes to actions - var bindAction = mxUtils.bind(this, function(code, control, key, shift) { - var action = this.actions.get(key); - - if (action != null) { - var f = function() { - if (action.enabled) { - action.funct(); - } - }; - - if (control) { - if (shift) { - keyHandler.bindControlShiftKey(code, f); - } else { - keyHandler.bindControlKey(code, f); - } - } else { - if (shift) { - keyHandler.bindShiftKey(code, f); - } else { - keyHandler.bindKey(code, f); - } - } - } - }); - - var ui = this; - var keyHandleEscape = keyHandler.escape; - keyHandler.escape = function(evt) { - ui.hideDialog(); - keyHandleEscape.apply(this, arguments); - }; - - // Ignores enter keystroke. Remove this line if you want the - // enter keystroke to stop editing. - keyHandler.enter = function() {}; - keyHandler.bindKey(8, function() { - graph.foldCells(true); - }); // Backspace - keyHandler.bindKey(13, function() { - graph.foldCells(false); - }); // Enter - keyHandler.bindKey(33, function() { - graph.exitGroup(); - }); // Page Up - keyHandler.bindKey(34, function() { - graph.enterGroup(); - }); // Page Down - keyHandler.bindKey(36, function() { - graph.home(); - }); // Home - keyHandler.bindKey(35, function() { - graph.refresh(); - }); // End - keyHandler.bindKey(37, function() { - nudge(37); - }); // Left arrow - keyHandler.bindKey(38, function() { - nudge(38); - }); // Up arrow - keyHandler.bindKey(39, function() { - nudge(39); - }); // Right arrow - keyHandler.bindKey(40, function() { - nudge(40); - }); // Down arrow - keyHandler.bindKey(113, function() { - graph.startEditingAtCell(); - }); - bindAction(46, false, 'delete'); // Delete - bindAction(82, true, 'tilt'); // Ctrl+R - bindAction(83, true, 'save'); // Ctrl+S - bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S - bindAction(107, false, 'zoomIn'); // Add - bindAction(109, false, 'zoomOut'); // Subtract - bindAction(65, true, 'selectAll'); // Ctrl+A - bindAction(86, true, 'selectVertices', true); // Ctrl+Shift+V - bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E - bindAction(69, true, 'export'); // Ctrl+Shift+E - bindAction(66, true, 'toBack'); // Ctrl+B - bindAction(70, true, 'toFront'); // Ctrl+F - bindAction(68, true, 'duplicate'); // Ctrl+D - bindAction(90, true, 'undo'); // Ctrl+Z - bindAction(89, true, 'redo'); // Ctrl+Y - bindAction(88, true, 'cut'); // Ctrl+X - bindAction(67, true, 'copy'); // Ctrl+C - bindAction(81, true, 'connect'); // Ctrl+Q - bindAction(86, true, 'paste'); // Ctrl+V - bindAction(71, true, 'group'); // Ctrl+G - bindAction(71, true, 'grid', true); // Ctrl+Shift+G - bindAction(85, true, 'ungroup'); // Ctrl+U - bindAction(112, false, 'about'); // F1 - bindAction(80, true, 'publish', true); // Ctrl+Shift+P - - return keyHandler; -}; - -/** - * Giuseppe Careri - * Creates a new toolbar for the given container. - */ -EditorUi.prototype.createMultiplicities = function(graph, cells, source, - target) { - for (var i = 0; i < cells.length; i++) { - - graph.push(new mxMultiplicity(true, cells[i], null, null, source[i][0], - source[i][1], null, mxResources.get(cells[i]) + mxResources.get( - 'musthave') + source[i][0] + mxResources.get('outgoingedge'), null)); - graph.push(new mxMultiplicity(false, cells[i], null, null, target[i][0], - target[i][1], null, mxResources.get(cells[i]) + mxResources.get( - 'musthave') + target[i][0] + mxResources.get('incomingedge'), null)); - }; -}; +var _0x4d30=["\x65\x64\x69\x74\x6F\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x45\x64\x69\x74\x6F\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x67\x72\x61\x70\x68","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x73\x72\x63","\x73\x75\x62\x6D\x65\x6E\x75\x49\x6D\x61\x67\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x65\x6E\x75\x73","\x63\x72\x65\x61\x74\x65\x44\x69\x76\x73","\x72\x65\x66\x72\x65\x73\x68","\x63\x72\x65\x61\x74\x65\x55\x69","\x65\x76\x65\x6E\x74","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x41\x6C\x6C\x6F\x77\x65\x64","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x62\x69\x6E\x64","\x62\x6F\x64\x79","\x6F\x6E\x73\x65\x6C\x65\x63\x74\x73\x74\x61\x72\x74","\x6D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x6E\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x74\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x64\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x66\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x49\x53\x5F\x49\x45","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x4D\x6F\x64\x65","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6F\x6E\x63\x6F\x6E\x74\x65\x78\x74\x6D\x65\x6E\x75","\x69\x6E\x69\x74","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x75\x72\x73\x6F\x72","\x64\x65\x66\x61\x75\x6C\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x67\x72\x69\x64\x49\x6D\x61\x67\x65","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x2D\x31\x70\x78\x20\x2D\x31\x70\x78","\x66\x6F\x63\x75\x73","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x61\x70\x70\x6C\x79","\x6D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x73\x74\x61\x72\x74","\x66\x69\x6E\x61\x6C\x6C\x79","\x65\x6E\x64","\x6E","\x63\x72\x65\x61\x74\x65\x4D\x75\x6C\x74\x69\x70\x6C\x69\x63\x69\x74\x69\x65\x73","\x61\x6E\x73\x77\x65\x72","\x68\x61\x6E\x67\x75\x70","\x64\x69\x61\x6C","\x65\x78\x74\x5F\x64\x69\x61\x6C","\x71\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x73\x65\x74","\x6D\x61\x74\x68","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x6D\x65\x6E\x75","\x73\x61\x79\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x6E\x75\x6D\x62\x65\x72","\x73\x61\x79\x70\x68\x6F\x6E\x65\x74\x69\x63","\x74\x74\x73","\x69\x73\x70\x65\x65\x63\x68\x74\x74\x73","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x67\x65\x74\x73\x65\x63\x72\x65\x74\x64\x69\x67\x69\x74\x73","\x72\x65\x63\x6F\x72\x64","\x64\x61\x74\x61\x62\x61\x73\x65","\x69\x73\x70\x65\x65\x63\x68\x61\x73\x72","\x73\x65\x6E\x64\x53\x4D\x53","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x67\x6F\x74\x6F\x63","\x67\x6F\x74\x6F\x69\x66","\x67\x6F\x74\x6F\x69\x66\x74\x69\x6D\x65","\x67\x6F\x74\x6F\x69\x66\x6D\x75\x6C\x74\x69\x74\x69\x6D\x65","\x76\x73\x77\x69\x74\x63\x68","\x71\x75\x65\x75\x65\x6C\x6F\x67","\x67\x6F\x61\x6C","\x6E\x6F\x6F\x70","\x73\x79\x73\x74\x65\x6D","\x61\x67\x69","\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x5F\x61\x70\x70","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x65\x6C\x6C","\x66\x69\x72\x65\x45\x76\x65\x6E\x74","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x74\x61\x67\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x73\x6F\x75\x72\x63\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x74\x61\x72\x74\x45\x64\x69\x74\x69\x6E\x67\x41\x74\x43\x65\x6C\x6C","\x69\x73\x56\x65\x72\x74\x65\x78","\x73\x68\x6F\x77\x44\x69\x61\x6C\x6F\x67","\x63\x6F\x6E\x73\x75\x6D\x65","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x6F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x6F\x75\x74\x6C\x69\x6E\x65","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x67\x65\x73\x74\x75\x72\x65\x63\x68\x61\x6E\x67\x65","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x73\x63\x61\x6C\x65\x28","\x73\x63\x61\x6C\x65","\x67\x65\x74\x44\x72\x61\x77\x50\x61\x6E\x65","\x76\x69\x65\x77","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x73\x74\x75\x72\x65\x65\x6E\x64","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x7A\x6F\x6F\x6D\x54\x6F\x43\x65\x6E\x74\x65\x72","\x7A\x6F\x6F\x6D","\x76\x69\x73\x69\x62\x6C\x65","\x63\x72\x65\x61\x74\x65\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x4B\x65\x79\x48\x61\x6E\x64\x6C\x65\x72","\x72\x65\x73\x69\x7A\x65","\x73\x69\x7A\x65\x44\x69\x64\x43\x68\x61\x6E\x67\x65","\x75\x70\x64\x61\x74\x65","\x6F\x70\x65\x6E","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6D\x65\x6E\x75\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x74\x6F\x6F\x6C\x62\x61\x72\x48\x65\x69\x67\x68\x74","\x66\x6F\x6F\x74\x65\x72\x48\x65\x69\x67\x68\x74","\x68\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x73\x70\x6C\x69\x74\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x64\x64\x55\x6E\x64\x6F\x4C\x69\x73\x74\x65\x6E\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x73\x74\x65","\x67\x65\x74","\x69\x73\x45\x6D\x70\x74\x79","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x74","\x63\x6F\x70\x79","\x6F\x70\x65\x6E\x65\x72","\x6F\x70\x65\x6E\x46\x69\x6C\x65","\x70\x61\x72\x73\x65\x58\x6D\x6C","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x73\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x6D\x6F\x64\x69\x66\x69\x65\x64","\x63\x6C\x65\x61\x72","\x75\x6E\x64\x6F\x4D\x61\x6E\x61\x67\x65\x72","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x69\x6E\x76\x61\x6C\x69\x64\x4F\x72\x4D\x69\x73\x73\x69\x6E\x67\x46\x69\x6C\x65","\x3A\x20","\x6D\x65\x73\x73\x61\x67\x65","\x61\x6C\x65\x72\x74","\x73\x65\x74\x43\x6F\x6E\x73\x75\x6D\x65\x72","\x6F\x70\x65\x6E\x53\x74\x72\x69\x6E\x67","\x64\x61\x74\x61","\x6E\x65\x77","\x67\x65\x74\x47\x72\x61\x70\x68\x58\x6D\x6C","\x67\x65\x74\x50\x72\x65\x74\x74\x79\x58\x6D\x6C","\x67\x65\x74\x49\x74\x65\x6D","\x72\x65\x70\x6C\x61\x63\x65","\x63\x6F\x6E\x66\x69\x72\x6D","\x73\x65\x74\x49\x74\x65\x6D","\x73\x61\x76\x65\x64","\x20","\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x6C\x6F\x67","\x50\x4F\x53\x54","\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x65\x61\x72\x65\x72\x20","\x74\x6F\x6B\x65\x6E","\x6F\x6E\x6C\x6F\x61\x64","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x50\x72\x6F\x6A\x65\x63\x74\x20","\x6E\x61\x6D\x65","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x70\x61\x72\x73\x65","\x20\x69\x73\x20\x6F\x70\x65\x6E\x69\x6E\x67\x20\x69\x6E\x20\x6E\x65\x77\x20\x77\x69\x6E\x64\x6F\x77\x21","\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x76\x69\x65\x77\x2F","\x69\x64","\x5F\x62\x6C\x61\x6E\x6B","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x65\x72\x72\x6F\x72\x73","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x20\x28","\x73\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x6F\x6E\x65\x72\x72\x6F\x72","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x65\x77\x26\x6E\x61\x6D\x65\x3D","\x73\x65\x6E\x64","\x64\x72\x61\x77\x69\x6E\x67\x54\x6F\x6F\x4C\x61\x72\x67\x65","\x70\x6F\x70\x75\x70","\x73\x61\x76\x65","\x50\x55\x54","\x55\x70\x64\x61\x74\x65\x64\x20\x61\x74\x20","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x66\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3A\x20","\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D","\x73\x61\x76\x65\x41\x73","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x6E\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x63\x6C\x6F\x6E\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D\x70\x72\x6F\x6A\x65\x63\x74\x5F\x63\x6C\x6F\x6E\x65\x64\x26\x6E\x61\x6D\x65\x3D","\x26\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x26\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E\x3D","\x76\x61\x6C\x69\x64\x61\x74\x65","\x67\x65\x74\x52\x6F\x6F\x74","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x43\x68\x69\x6C\x64\x43\x6F\x75\x6E\x74","\x67\x65\x74\x43\x68\x69\x6C\x64\x41\x74","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x3C\x62\x72\x3E","\x73\x65\x74\x43\x65\x6C\x6C\x57\x61\x72\x6E\x69\x6E\x67","","\x76\x61\x6C\x69\x64\x61\x74\x65\x42\x6C\x6F\x63\x6B","\x4F\x6E\x6C\x79\x20\x6F\x6E\x65\x20\x53\x74\x61\x72\x74\x20\x62\x6C\x6F\x63\x6B\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64","\x0A","\x4F\x6E\x6C\x79\x20\x6F\x6E\x65\x20\x46\x69\x6E\x61\x6C\x6C\x79\x20\x62\x6C\x6F\x63\x6B\x20\x69\x73\x20\x61\x6C\x6C\x6F\x77\x65\x64","\x66\x69\x6C\x65\x5F\x69\x64","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6E\x6F\x41\x75\x64\x69\x6F\x53\x65\x6C\x65\x63\x74\x65\x64","\x64\x69\x67\x69\x74","\x77\x72\x6F\x6E\x67\x4D\x61\x78\x44\x69\x67\x69\x74","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x6E\x6F\x56\x61\x72\x69\x61\x62\x6C\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x77\x72\x6F\x6E\x67\x4D\x69\x6E\x44\x69\x67\x69\x74","\x6D\x61\x78\x64\x69\x67\x69\x74","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x6E\x75\x6D","\x77\x72\x6F\x6E\x67\x48\x69\x64\x64\x65\x6E\x44\x69\x67\x69\x74\x73\x6E\x75\x6D","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6F\x64\x62\x63\x5F\x69\x64","\x6E\x6F\x44\x61\x74\x61\x62\x61\x73\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x74\x72\x75\x6E\x6B\x5F\x6E\x61\x6D\x65","\x2D\x31","\x6E\x6F\x54\x72\x75\x6E\x6B\x53\x65\x6C\x65\x63\x74\x65\x64","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x6E\x6F\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x53\x65\x6C\x65\x63\x74\x65\x64","\x63\x6F\x6D\x6D\x61\x6E\x64","\x6E\x6F\x43\x6F\x6D\x6D\x61\x6E\x64\x53\x65\x6C\x65\x63\x74\x65\x64","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x6E\x6F\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x53\x65\x6C\x65\x63\x74\x65\x64","\x64\x69\x67\x69\x74\x73","\x6E\x6F\x44\x69\x67\x69\x74\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x6E\x75\x6D\x62\x65\x72","\x6E\x6F\x4E\x75\x6D\x62\x65\x72\x53\x65\x6C\x65\x63\x74\x65\x64","\x74\x65\x78\x74","\x6E\x6F\x54\x65\x78\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x66\x69\x6C\x65","\x6E\x6F\x46\x69\x6C\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x67\x6F\x61\x6C\x6E\x61\x6D\x65","\x6E\x6F\x47\x6F\x61\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x70\x68\x6F\x6E\x65","\x6E\x6F\x49\x64\x65\x6E\x74\x69\x66\x69\x65\x72\x53\x65\x6C\x65\x63\x74\x65\x64","\x73\x69\x70\x5F\x69\x64","\x71\x75\x65\x75\x65\x5F\x69\x64","\x6E\x6F\x51\x75\x65\x75\x65\x53\x65\x6C\x65\x63\x74\x65\x64","\x6C\x69\x73\x74\x5F\x69\x64","\x6E\x6F\x4C\x69\x73\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x6E\x6F\x49\x6E\x74\x65\x72\x76\x61\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x6D\x61\x69\x6C\x62\x6F\x78","\x6E\x6F\x42\x6F\x78\x4E\x75\x6D\x62\x65\x72\x53\x65\x6C\x65\x63\x74\x65\x64","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x6E\x6F\x50\x72\x6F\x6A\x65\x63\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x6E\x6F\x41\x63\x63\x6F\x75\x6E\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x74\x6F","\x6E\x6F\x52\x65\x63\x69\x70\x69\x65\x6E\x74\x53\x65\x6C\x65\x63\x74\x65\x64","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x6B\x65\x79","\x6E\x6F\x4B\x65\x79\x53\x65\x6C\x65\x63\x74\x65\x64","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x67\x65\x74\x49\x64","\x67\x65\x74\x43\x65\x6C\x6C","\x67\x65\x74\x56\x61\x6C\x75\x65","\x74\x65\x73\x74","\x6E\x75\x6D\x62\x65\x72\x4F\x72\x49\x6E\x76\x61\x6C\x69\x64\x4F\x72\x54\x69\x6D\x65\x6F\x75\x74","\x2C","\x73\x70\x6C\x69\x74","\x6E\x75\x6D\x62\x65\x72\x4F\x72\x41\x6C\x6C","\x66\x6F\x72\x45\x61\x63\x68","\x6E\x75\x6D\x62\x65\x72\x4F\x72\x49\x6E\x76\x61\x6C\x69\x64\x4F\x72\x44\x65\x66\x61\x75\x6C\x74","\x74\x72\x75\x65\x4F\x72\x46\x61\x6C\x73\x65","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6C\x6C\x61\x70\x73\x65\x64","\x63\x6F\x6E\x74\x61\x69\x6E\x73\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72\x73\x52\x65\x73\x6F\x75\x72\x63\x65","\x67\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C","\x67\x65\x74\x45\x64\x67\x65\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x67\x65\x74\x43\x65\x6C\x6C\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E\x45\x72\x72\x6F\x72","\x76\x61\x6C\x69\x64\x61\x74\x65\x43\x65\x6C\x6C","\x67\x65\x74\x50\x61\x72\x65\x6E\x74","\x67\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x50\x61\x72\x65\x6E\x74","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x70\x75\x62\x6C\x69\x73\x68","\x50\x75\x62\x6C\x69\x73\x68\x65\x64\x20\x61\x74\x20","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74\x3A\x20","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x70\x72\x6F\x6A\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x70\x75\x62\x6C\x69\x73\x68\x69\x6E\x67\x20\x66\x69\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64\x20\x61\x74\x20","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x3A\x20","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65","\x6E\x61\x6D\x65\x3D","\x26\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3D","\x67\x65\x74\x55\x72\x6C","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x26","\x3D","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x61\x6E\x55\x6E\x64\x6F","\x63\x61\x6E\x52\x65\x64\x6F","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x64\x61\x73\x68\x65\x64","\x72\x6F\x75\x6E\x64\x65\x64","\x73\x68\x61\x64\x6F\x77","\x74\x69\x6C\x74","\x61\x75\x74\x6F\x73\x69\x7A\x65","\x63\x75\x72\x76\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x77\x6F\x72\x64\x57\x72\x61\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x67\x72\x6F\x75\x70","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x61\x74","\x61\x72\x72\x61\x6E\x67\x65","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x73\x70\x61\x63\x69\x6E\x67","\x6C\x69\x6E\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x61\x6C\x69\x67\x6E","\x67\x65\x74\x53\x74\x61\x74\x65","\x69\x73\x4C\x6F\x6F\x70","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x63\x75\x72\x72\x65\x6E\x74\x52\x6F\x6F\x74","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x65\x64\x69\x74\x4C\x69\x6E\x6B","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x63\x6C\x69\x65\x6E\x74\x48\x65\x69\x67\x68\x74","\x6D\x69\x6E","\x6D\x61\x78","\x68\x65\x69\x67\x68\x74","\x70\x78","\x74\x6F\x70","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x77\x69\x64\x74\x68","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x64\x69\x73\x70\x6C\x61\x79","\x6E\x6F\x6E\x65","\x68\x73\x70\x6C\x69\x74","\x76\x73\x70\x6C\x69\x74","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x44\x69\x76","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x4F\x75\x74\x6C\x69\x6E\x65\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x44\x69\x61\x67\x72\x61\x6D\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x46\x6F\x6F\x74\x65\x72\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x67\x65\x48\x73\x70\x6C\x69\x74","\x67\x65\x56\x73\x70\x6C\x69\x74","\x30\x70\x78","\x72\x69\x67\x68\x74","\x6D\x65\x6E\x75\x62\x61\x72","\x67\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x74\x6F\x6F\x6C\x62\x61\x72","\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x54\x6F\x6F\x6C\x62\x61\x72","\x73\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x53\x69\x64\x65\x62\x61\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x6F\x74\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x75\x73\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x73\x74\x61\x74\x75\x73\x43\x68\x61\x6E\x67\x65\x64","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x74\x53\x74\x61\x74\x75\x73\x54\x65\x78\x74","\x61\x64\x64\x53\x70\x6C\x69\x74\x48\x61\x6E\x64\x6C\x65\x72","\x61","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D\x20\x67\x65\x53\x74\x61\x74\x75\x73","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x67\x65\x46\x6F\x6F\x74\x65\x72","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x48\x65\x61\x64\x65\x72","\x63\x72\x65\x61\x74\x65\x46\x6F\x72\x6D","\x66\x6F\x72\x6D","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x78","\x79","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x74\x6F\x75\x63\x68\x6D\x6F\x76\x65","\x6D\x6F\x75\x73\x65\x75\x70","\x74\x6F\x75\x63\x68\x65\x6E\x64","\x68\x69\x64\x65\x44\x69\x61\x6C\x6F\x67","\x64\x69\x61\x6C\x6F\x67","\x49\x53\x5F\x56\x4D\x4C","\x63\x6C\x6F\x73\x65","\x73\x61\x76\x65\x46\x69\x6C\x65","\x67\x65\x74\x4F\x72\x43\x72\x65\x61\x74\x65\x46\x69\x6C\x65\x6E\x61\x6D\x65","\x70\x75\x62\x6C\x69\x73\x68\x46\x69\x6C\x65","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x61\x6E\x69\x6D\x61\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x65\x78\x65\x63\x75\x74\x65","\x43\x61\x6D\x69\x6E\x6F","\x75\x73\x65\x72\x41\x67\x65\x6E\x74","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x41\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x49\x53\x5F\x4D\x41\x43","\x6D\x65\x74\x61\x4B\x65\x79","\x6D\x6F\x76\x65\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x65\x6E\x61\x62\x6C\x65\x64","\x66\x75\x6E\x63\x74","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x43\x6F\x6E\x74\x72\x6F\x6C\x4B\x65\x79","\x62\x69\x6E\x64\x53\x68\x69\x66\x74\x4B\x65\x79","\x62\x69\x6E\x64\x4B\x65\x79","\x65\x73\x63\x61\x70\x65","\x65\x6E\x74\x65\x72","\x66\x6F\x6C\x64\x43\x65\x6C\x6C\x73","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x65\x78\x70\x6F\x72\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x67\x72\x69\x64","\x61\x62\x6F\x75\x74","\x6D\x75\x73\x74\x68\x61\x76\x65","\x6F\x75\x74\x67\x6F\x69\x6E\x67\x65\x64\x67\x65","\x70\x75\x73\x68","\x69\x6E\x63\x6F\x6D\x69\x6E\x67\x65\x64\x67\x65"];EditorUi= function(_0xeec3x1,_0xeec3x2){this[_0x4d30[0]]= _0xeec3x1|| new Editor();this[_0x4d30[1]]= _0xeec3x2|| document[_0x4d30[3]](_0x4d30[2]);var _0xeec3x3=_0xeec3x1[_0x4d30[4]];var _0xeec3x4=this;this[_0x4d30[1]][_0x4d30[6]][_0x4d30[5]]= _0x4d30[7]; new Image()[_0x4d30[8]]= mxPopupMenu[_0x4d30[10]][_0x4d30[9]];if(mxConnectionHandler[_0x4d30[10]][_0x4d30[11]]!= null){ new Image()[_0x4d30[8]]= mxConnectionHandler[_0x4d30[10]][_0x4d30[11]][_0x4d30[8]]};this[_0x4d30[12]]= new Actions(this);this[_0x4d30[13]]= new Menus(this);this[_0x4d30[14]]();this[_0x4d30[15]]();this[_0x4d30[16]]();var _0xeec3x5=mxUtils[_0x4d30[20]](this,function(_0xeec3x6){if(_0xeec3x6== null){_0xeec3x6= window[_0x4d30[17]]};if(this[_0x4d30[18]](_0xeec3x6)){return true};return _0xeec3x3[_0x4d30[19]]()});if(this[_0x4d30[1]]== document[_0x4d30[21]]){this[_0x4d30[23]][_0x4d30[22]]= _0xeec3x5;this[_0x4d30[23]][_0x4d30[24]]= _0xeec3x5;this[_0x4d30[25]][_0x4d30[22]]= _0xeec3x5;this[_0x4d30[25]][_0x4d30[24]]= _0xeec3x5;this[_0x4d30[26]][_0x4d30[22]]= _0xeec3x5;this[_0x4d30[26]][_0x4d30[24]]= _0xeec3x5;this[_0x4d30[27]][_0x4d30[22]]= _0xeec3x5;this[_0x4d30[27]][_0x4d30[24]]= _0xeec3x5;this[_0x4d30[28]][_0x4d30[22]]= _0xeec3x5;this[_0x4d30[28]][_0x4d30[24]]= _0xeec3x5};if(mxClient[_0x4d30[29]]&& ( typeof (document[_0x4d30[30]])=== _0x4d30[31]|| document[_0x4d30[30]]< 9)){mxEvent[_0x4d30[33]](this[_0x4d30[26]],_0x4d30[32],_0xeec3x5);mxEvent[_0x4d30[33]](this[_0x4d30[27]],_0x4d30[32],_0xeec3x5)}else {this[_0x4d30[26]][_0x4d30[34]]= _0xeec3x5;this[_0x4d30[27]][_0x4d30[34]]= _0xeec3x5};_0xeec3x3[_0x4d30[35]](this[_0x4d30[26]]);_0xeec3x3[_0x4d30[15]]();_0xeec3x3[_0x4d30[1]][_0x4d30[38]](_0x4d30[36],_0x4d30[37]);_0xeec3x3[_0x4d30[1]][_0x4d30[6]][_0x4d30[39]]= _0x4d30[40];_0xeec3x3[_0x4d30[1]][_0x4d30[6]][_0x4d30[41]]= _0x4d30[42]+ _0xeec3x1[_0x4d30[43]]+ _0x4d30[44];_0xeec3x3[_0x4d30[1]][_0x4d30[6]][_0x4d30[45]]= _0x4d30[46];_0xeec3x3[_0x4d30[1]][_0x4d30[47]]();var _0xeec3x7=_0xeec3x3[_0x4d30[48]];_0xeec3x3[_0x4d30[48]]= function(_0xeec3x8,_0xeec3x9,_0xeec3xa){if(_0xeec3x8== mxEvent[_0x4d30[49]]){this[_0x4d30[1]][_0x4d30[47]]()};_0xeec3x7[_0x4d30[50]](this,arguments)};this[_0x4d30[56]](_0xeec3x3[_0x4d30[51]],[_0x4d30[52],_0x4d30[53],_0x4d30[54]],[[1,1],[1,1],[0,0]],[[0,0],[0,0],[1,_0x4d30[55]]]);this[_0x4d30[56]](_0xeec3x3[_0x4d30[51]],[_0x4d30[57],_0x4d30[58],_0x4d30[59],_0x4d30[60],_0x4d30[61],_0x4d30[62],_0x4d30[63]],[[1,1],[0,0],[0,1],[0,1],[0,1],[1,1],[0,1]],[[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]]]);this[_0x4d30[56]](_0xeec3x3[_0x4d30[51]],[_0x4d30[64],_0x4d30[65]],[[1,1],[1,1]],[[1,_0x4d30[55]],[1,_0x4d30[55]]]);this[_0x4d30[56]](_0xeec3x3[_0x4d30[51]],[_0x4d30[66],_0x4d30[67],_0x4d30[68],_0x4d30[69],_0x4d30[70],_0x4d30[71],_0x4d30[72],_0x4d30[73],_0x4d30[74],_0x4d30[75]],[[1,_0x4d30[55]],[1,1],[1,_0x4d30[55]],[1,1],[1,1],[1,1],[1,1],[1,1],[1,_0x4d30[55]],[1,_0x4d30[55]]],[[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]]]);this[_0x4d30[56]](_0xeec3x3[_0x4d30[51]],[_0x4d30[76]],[[1,1]],[[1,_0x4d30[55]]]);this[_0x4d30[56]](_0xeec3x3[_0x4d30[51]],[_0x4d30[77],_0x4d30[78],_0x4d30[79],_0x4d30[80]],[[1,1],[1,1],[1,1],[1,1]],[[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]]]);this[_0x4d30[56]](_0xeec3x3[_0x4d30[51]],[_0x4d30[81],_0x4d30[82],_0x4d30[83],_0x4d30[84],_0x4d30[85]],[[0,0],[1,2],[1,2],[1,2],[1,_0x4d30[55]]],[[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]]]);this[_0x4d30[56]](_0xeec3x3[_0x4d30[51]],[_0x4d30[86],_0x4d30[87]],[[1,1],[1,1]],[[1,_0x4d30[55]],[1,_0x4d30[55]]]);this[_0x4d30[56]](_0xeec3x3[_0x4d30[51]],[_0x4d30[88],_0x4d30[89],_0x4d30[90],_0x4d30[91],_0x4d30[92]],[[1,1],[1,1],[0,1],[0,1],[0,1]],[[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]],[1,_0x4d30[55]]]);_0xeec3x3[_0x4d30[93]]= function(_0xeec3x6,_0xeec3xb){var _0xeec3xc=[_0x4d30[66],_0x4d30[82],_0x4d30[83],_0x4d30[68],_0x4d30[74],_0x4d30[75],_0x4d30[85]];var _0xeec3xd= new mxEventObject(mxEvent.DOUBLE_CLICK,_0x4d30[17],_0xeec3x6,_0x4d30[94],_0xeec3xb);this[_0x4d30[95]](_0xeec3xd);if(this[_0x4d30[96]]()&& !mxEvent[_0x4d30[97]](_0xeec3x6)&& !_0xeec3xd[_0x4d30[97]]()){if(this[_0x4d30[99]]()[_0x4d30[98]](_0xeec3xb)){if(_0xeec3xc[_0x4d30[103]](_0xeec3xb[_0x4d30[102]][_0x4d30[101]][_0x4d30[100]])>= 0){this[_0x4d30[104]](_0xeec3xb)}}else {if(this[_0x4d30[99]]()[_0x4d30[105]](_0xeec3xb)){_0xeec3x4[_0x4d30[106]]( new GeneralDialog(_0xeec3x4,_0xeec3xb)[_0x4d30[1]],320,280,true,true)}};_0xeec3xd[_0x4d30[107]]()}};_0xeec3x3[_0x4d30[109]][_0x4d30[108]]= true;_0xeec3x3[_0x4d30[109]][_0x4d30[110]]= mxUtils[_0x4d30[20]](this,function(_0xeec3xe,_0xeec3xb,_0xeec3x6){this[_0x4d30[13]][_0x4d30[111]](_0xeec3xe,_0xeec3xb,_0xeec3x6)});_0xeec3x1[_0x4d30[113]][_0x4d30[35]](this[_0x4d30[112]]);mxEvent[_0x4d30[115]](document,mxUtils[_0x4d30[20]](this,function(_0xeec3x6){_0xeec3x3[_0x4d30[109]][_0x4d30[114]]()}));if(mxClient[_0x4d30[116]]){mxEvent[_0x4d30[33]](_0xeec3x3[_0x4d30[1]],_0x4d30[117],mxUtils[_0x4d30[20]](this,function(_0xeec3x6){_0xeec3x3[_0x4d30[122]][_0x4d30[121]]()[_0x4d30[38]](_0x4d30[118],_0x4d30[119]+ _0xeec3x6[_0x4d30[120]]+ _0x4d30[44]);_0xeec3x3[_0x4d30[122]][_0x4d30[124]]()[_0x4d30[6]][_0x4d30[123]]= _0x4d30[7]}));mxEvent[_0x4d30[33]](_0xeec3x3[_0x4d30[1]],_0x4d30[125],mxUtils[_0x4d30[20]](this,function(_0xeec3x6){_0xeec3x3[_0x4d30[122]][_0x4d30[121]]()[_0x4d30[126]](_0x4d30[118]);_0xeec3x3[_0x4d30[127]]= true;_0xeec3x3[_0x4d30[128]](_0xeec3x6[_0x4d30[120]]);_0xeec3x3[_0x4d30[122]][_0x4d30[124]]()[_0x4d30[6]][_0x4d30[123]]= _0x4d30[129]}))};var _0xeec3xf=this[_0x4d30[130]](_0xeec3x1);this[_0x4d30[131]]= function(){return _0xeec3xf};mxEvent[_0x4d30[33]](window,_0x4d30[132],mxUtils[_0x4d30[20]](this,function(){this[_0x4d30[15]]();_0xeec3x3[_0x4d30[133]]();this[_0x4d30[0]][_0x4d30[113]][_0x4d30[134]](false);this[_0x4d30[0]][_0x4d30[113]][_0x4d30[113]][_0x4d30[133]]()}));this[_0x4d30[35]]();this[_0x4d30[135]]()};EditorUi[_0x4d30[10]][_0x4d30[136]]= (mxClient[_0x4d30[116]])?16:8;EditorUi[_0x4d30[10]][_0x4d30[137]]= 33;EditorUi[_0x4d30[10]][_0x4d30[138]]= 36;EditorUi[_0x4d30[10]][_0x4d30[139]]= 28;EditorUi[_0x4d30[10]][_0x4d30[140]]= 204;EditorUi[_0x4d30[10]][_0x4d30[141]]= 190;EditorUi[_0x4d30[10]][_0x4d30[35]]= function(){this[_0x4d30[142]]();this[_0x4d30[143]]();var _0xeec3x10=this[_0x4d30[12]][_0x4d30[145]](_0x4d30[144]);var _0xeec3x11=function(){_0xeec3x10[_0x4d30[147]](!mxClipboard[_0x4d30[146]]())};var _0xeec3x12=mxClipboard[_0x4d30[148]];mxClipboard[_0x4d30[148]]= function(){_0xeec3x12[_0x4d30[50]](this,arguments);_0xeec3x11()};var _0xeec3x13=mxClipboard[_0x4d30[149]];mxClipboard[_0x4d30[149]]= function(){_0xeec3x13[_0x4d30[50]](this,arguments);_0xeec3x11()}};EditorUi[_0x4d30[10]][_0x4d30[18]]= function(_0xeec3x6){return false};EditorUi[_0x4d30[10]][_0x4d30[135]]= function(){try{if(window[_0x4d30[150]]!= null&& window[_0x4d30[150]][_0x4d30[151]]!= null){window[_0x4d30[150]][_0x4d30[151]][_0x4d30[163]](mxUtils[_0x4d30[20]](this,function(_0xeec3x14,_0xeec3x15){try{var _0xeec3x16=mxUtils[_0x4d30[152]](_0xeec3x14);this[_0x4d30[0]][_0x4d30[154]](_0xeec3x16[_0x4d30[153]]);this[_0x4d30[0]][_0x4d30[155]]= false;this[_0x4d30[0]][_0x4d30[157]][_0x4d30[156]]();if(_0xeec3x15!= null){this[_0x4d30[0]][_0x4d30[158]]= _0xeec3x15}}catch(e){mxUtils[_0x4d30[162]](mxResources[_0x4d30[145]](_0x4d30[159])+ _0x4d30[160]+ e[_0x4d30[161]])}}))}}catch(e){}};EditorUi[_0x4d30[10]][_0x4d30[164]]= function(_0xeec3x14,_0xeec3x15,_0xeec3x17){try{var _0xeec3x16=mxUtils[_0x4d30[152]](_0xeec3x14);this[_0x4d30[0]][_0x4d30[154]](_0xeec3x16[_0x4d30[153]]);this[_0x4d30[0]][_0x4d30[155]]= false;this[_0x4d30[0]][_0x4d30[157]][_0x4d30[156]]();if(_0xeec3x15!= null){this[_0x4d30[0]][_0x4d30[158]]= _0xeec3x15};if(_0xeec3x17!= null){this[_0x4d30[0]][_0x4d30[165]]= _0xeec3x17}}catch(e){mxUtils[_0x4d30[162]](mxResources[_0x4d30[145]](_0x4d30[159])+ _0x4d30[160]+ e[_0x4d30[161]])}};EditorUi[_0x4d30[10]][_0x4d30[166]]= function(_0xeec3x18){var _0xeec3x1=this[_0x4d30[0]];if(_0xeec3x18!= null){var _0xeec3x14=mxUtils[_0x4d30[168]](this[_0x4d30[0]][_0x4d30[167]]());try{if(useLocalStorage){if(localStorage[_0x4d30[169]](_0xeec3x18)!= null&& !mxUtils[_0x4d30[171]](mxResources[_0x4d30[145]](_0x4d30[170],[_0xeec3x18]))){return};localStorage[_0x4d30[172]](_0xeec3x18,_0xeec3x14);this[_0x4d30[0]][_0x4d30[175]](mxResources[_0x4d30[145]](_0x4d30[173])+ _0x4d30[174]+ new Date())}else {console[_0x4d30[177]](_0xeec3x14[_0x4d30[176]]);console[_0x4d30[177]](MAX_REQUEST_SIZE);if(_0xeec3x14[_0x4d30[176]]< MAX_REQUEST_SIZE){_0xeec3x14= encodeURIComponent(_0xeec3x14);_0xeec3x18= encodeURIComponent(_0xeec3x18);var _0xeec3x19= new XMLHttpRequest();_0xeec3x19[_0x4d30[135]](_0x4d30[178],SAVE_URL,true);_0xeec3x19[_0x4d30[181]](_0x4d30[179],_0x4d30[180]);_0xeec3x19[_0x4d30[181]](_0x4d30[182],_0x4d30[183]+ _0xeec3x1[_0x4d30[165]][_0x4d30[184]]);_0xeec3x19[_0x4d30[185]]= function(_0xeec3x1a){if(_0xeec3x19[_0x4d30[186]]=== 4){if(_0xeec3x19[_0x4d30[187]]=== 201){_0xeec3x1[_0x4d30[175]](_0x4d30[188]+ JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]])[_0x4d30[189]]+ _0x4d30[192]);setTimeout(function(){window[_0x4d30[135]](_0x4d30[193]+ JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]])[_0x4d30[194]],_0x4d30[195])},1500)}else {try{var _0xeec3x1b=JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]]);_0xeec3x1[_0x4d30[175]](_0x4d30[196]+ _0xeec3x1b[_0x4d30[197]][0][_0x4d30[161]])}catch(_0xeec3x1a){_0xeec3x1[_0x4d30[175]](_0x4d30[198]+ _0x4d30[199]+ _0xeec3x19[_0x4d30[187]]+ _0x4d30[174]+ _0xeec3x19[_0x4d30[200]]+ _0x4d30[44])}}}};_0xeec3x19[_0x4d30[201]]= function(_0xeec3x1a){mxUtils[_0x4d30[162]](_0xeec3x19[_0x4d30[200]])};_0xeec3x19[_0x4d30[203]](_0x4d30[202]+ _0xeec3x18)}else {mxUtils[_0x4d30[162]](mxResources[_0x4d30[145]](_0x4d30[204]));mxUtils[_0x4d30[205]](_0xeec3x14);return}};this[_0x4d30[0]][_0x4d30[158]]= _0xeec3x18;this[_0x4d30[0]][_0x4d30[155]]= false}catch(e){this[_0x4d30[0]][_0x4d30[175]](_0x4d30[198])}}else {this[_0x4d30[0]][_0x4d30[175]](_0x4d30[198])}};EditorUi[_0x4d30[10]][_0x4d30[206]]= function(_0xeec3x18){var _0xeec3x1=this[_0x4d30[0]];if(_0xeec3x18!= null){var _0xeec3x14=mxUtils[_0x4d30[168]](this[_0x4d30[0]][_0x4d30[167]]());try{if(useLocalStorage){if(localStorage[_0x4d30[169]](_0xeec3x18)!= null&& !mxUtils[_0x4d30[171]](mxResources[_0x4d30[145]](_0x4d30[170],[_0xeec3x18]))){return};localStorage[_0x4d30[172]](_0xeec3x18,_0xeec3x14);this[_0x4d30[0]][_0x4d30[175]](mxResources[_0x4d30[145]](_0x4d30[173])+ _0x4d30[174]+ new Date())}else {console[_0x4d30[177]](_0xeec3x14[_0x4d30[176]]);console[_0x4d30[177]](MAX_REQUEST_SIZE);if(_0xeec3x14[_0x4d30[176]]< MAX_REQUEST_SIZE){_0xeec3x14= encodeURIComponent(_0xeec3x14);var _0xeec3x19= new XMLHttpRequest();_0xeec3x19[_0x4d30[135]](_0x4d30[207],SAVE_URL+ this[_0x4d30[0]][_0x4d30[165]][_0x4d30[194]],true);_0xeec3x19[_0x4d30[181]](_0x4d30[179],_0x4d30[180]);_0xeec3x19[_0x4d30[181]](_0x4d30[182],_0x4d30[183]+ _0xeec3x1[_0x4d30[165]][_0x4d30[184]]);_0xeec3x19[_0x4d30[185]]= function(_0xeec3x1a){if(_0xeec3x19[_0x4d30[186]]=== 4){if(_0xeec3x19[_0x4d30[187]]=== 200){_0xeec3x1[_0x4d30[175]](_0x4d30[208]+ JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]])[_0x4d30[209]]+ _0x4d30[199]+ _0xeec3x19[_0x4d30[187]]+ _0x4d30[174]+ _0xeec3x19[_0x4d30[200]]+ _0x4d30[44])}else {try{var _0xeec3x1b=JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]]);_0xeec3x1[_0x4d30[175]](_0x4d30[210]+ _0xeec3x1b[_0x4d30[197]][0][_0x4d30[161]])}catch(_0xeec3x1a){_0xeec3x1[_0x4d30[175]](_0x4d30[211]+ _0x4d30[199]+ _0xeec3x19[_0x4d30[187]]+ _0x4d30[174]+ _0xeec3x19[_0x4d30[200]]+ _0x4d30[44])}}}};_0xeec3x19[_0x4d30[201]]= function(_0xeec3x1a){mxUtils[_0x4d30[162]](_0xeec3x19[_0x4d30[200]])};_0xeec3x19[_0x4d30[203]](_0x4d30[212]+ _0xeec3x14)}else {mxUtils[_0x4d30[162]](mxResources[_0x4d30[145]](_0x4d30[204]));mxUtils[_0x4d30[205]](_0xeec3x14);return}};this[_0x4d30[0]][_0x4d30[158]]= _0xeec3x18;this[_0x4d30[0]][_0x4d30[155]]= false}catch(e){this[_0x4d30[0]][_0x4d30[175]](_0x4d30[213])}}else {this[_0x4d30[0]][_0x4d30[175]](_0x4d30[213])}};EditorUi[_0x4d30[10]][_0x4d30[214]]= function(_0xeec3x1c){var _0xeec3x1=this[_0x4d30[0]];if(_0xeec3x1c!== null){var _0xeec3x19= new XMLHttpRequest();_0xeec3x19[_0x4d30[135]](_0x4d30[207],SAVE_URL+ this[_0x4d30[0]][_0x4d30[165]][_0x4d30[194]],true);_0xeec3x19[_0x4d30[181]](_0x4d30[179],_0x4d30[180]);_0xeec3x19[_0x4d30[181]](_0x4d30[182],_0x4d30[183]+ _0xeec3x1[_0x4d30[165]][_0x4d30[184]]);_0xeec3x19[_0x4d30[185]]= function(_0xeec3x1a){if(_0xeec3x19[_0x4d30[186]]=== 4){if(_0xeec3x19[_0x4d30[187]]=== 200){_0xeec3x1[_0x4d30[175]](_0x4d30[208]+ JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]])[_0x4d30[209]]+ _0x4d30[199]+ _0xeec3x19[_0x4d30[187]]+ _0x4d30[174]+ _0xeec3x19[_0x4d30[200]]+ _0x4d30[44]);_0xeec3x1[_0x4d30[165]][_0x4d30[214]]= _0xeec3x1c}else {try{var _0xeec3x1b=JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]]);_0xeec3x1[_0x4d30[175]](_0x4d30[215]+ _0xeec3x1b[_0x4d30[197]][0][_0x4d30[161]])}catch(_0xeec3x1a){_0xeec3x1[_0x4d30[175]](_0x4d30[216]+ _0x4d30[199]+ _0xeec3x19[_0x4d30[187]]+ _0x4d30[174]+ _0xeec3x19[_0x4d30[200]]+ _0x4d30[44])}}}};_0xeec3x19[_0x4d30[201]]= function(_0xeec3x1a){mxUtils[_0x4d30[162]](_0xeec3x19[_0x4d30[200]])};_0xeec3x19[_0x4d30[203]](_0x4d30[217]+ _0xeec3x1c)}else {this[_0x4d30[0]][_0x4d30[175]](_0x4d30[216])}};EditorUi[_0x4d30[10]][_0x4d30[218]]= function(_0xeec3x18){var _0xeec3x1=this[_0x4d30[0]];if(_0xeec3x18!= null){var _0xeec3x14=mxUtils[_0x4d30[168]](this[_0x4d30[0]][_0x4d30[167]]());try{if(useLocalStorage){if(localStorage[_0x4d30[169]](_0xeec3x18)!= null&& !mxUtils[_0x4d30[171]](mxResources[_0x4d30[145]](_0x4d30[170],[_0xeec3x18]))){return};localStorage[_0x4d30[172]](_0xeec3x18,_0xeec3x14);this[_0x4d30[0]][_0x4d30[175]](mxResources[_0x4d30[145]](_0x4d30[173])+ _0x4d30[174]+ new Date())}else {console[_0x4d30[177]](_0xeec3x14[_0x4d30[176]]);console[_0x4d30[177]](MAX_REQUEST_SIZE);if(_0xeec3x14[_0x4d30[176]]< MAX_REQUEST_SIZE){_0xeec3x14= encodeURIComponent(_0xeec3x14);_0xeec3x18= encodeURIComponent(_0xeec3x18);var _0xeec3x19= new XMLHttpRequest();_0xeec3x19[_0x4d30[135]](_0x4d30[178],SAVE_URL,true);_0xeec3x19[_0x4d30[181]](_0x4d30[179],_0x4d30[180]);_0xeec3x19[_0x4d30[181]](_0x4d30[182],_0x4d30[183]+ _0xeec3x1[_0x4d30[165]][_0x4d30[184]]);_0xeec3x19[_0x4d30[185]]= function(_0xeec3x1a){if(_0xeec3x19[_0x4d30[186]]=== 4){if(_0xeec3x19[_0x4d30[187]]=== 201){_0xeec3x1[_0x4d30[175]](_0x4d30[188]+ JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]])[_0x4d30[189]]+ _0x4d30[192]);setTimeout(function(){window[_0x4d30[135]](_0x4d30[193]+ JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]])[_0x4d30[194]],_0x4d30[195])},1500)}else {try{var _0xeec3x1b=JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]]);_0xeec3x1[_0x4d30[175]](_0x4d30[219]+ _0xeec3x1b[_0x4d30[197]][0][_0x4d30[161]])}catch(_0xeec3x1a){_0xeec3x1[_0x4d30[175]](_0x4d30[220]+ _0x4d30[199]+ _0xeec3x19[_0x4d30[187]]+ _0x4d30[174]+ _0xeec3x19[_0x4d30[200]]+ _0x4d30[44])}}}};_0xeec3x19[_0x4d30[201]]= function(_0xeec3x1a){mxUtils[_0x4d30[162]](_0xeec3x19[_0x4d30[200]])};_0xeec3x19[_0x4d30[203]](_0x4d30[221]+ _0xeec3x18+ _0x4d30[222]+ _0xeec3x14+ _0x4d30[223]+ _0xeec3x14)}else {mxUtils[_0x4d30[162]](mxResources[_0x4d30[145]](_0x4d30[204]));mxUtils[_0x4d30[205]](_0xeec3x14);return}};this[_0x4d30[0]][_0x4d30[158]]= _0xeec3x18;this[_0x4d30[0]][_0x4d30[155]]= false}catch(e){this[_0x4d30[0]][_0x4d30[175]](_0x4d30[213])}}else {this[_0x4d30[0]][_0x4d30[175]](_0x4d30[213])}};EditorUi[_0x4d30[10]][_0x4d30[224]]= function(_0xeec3x1d,_0xeec3x1e){var _0xeec3x3=this[_0x4d30[0]][_0x4d30[4]];for(var _0xeec3x1d=_0xeec3x1d!= null?_0xeec3x1d:_0xeec3x3[_0x4d30[226]][_0x4d30[225]](),_0xeec3x1e=_0xeec3x1e!= null?_0xeec3x1e:{},_0xeec3x1f=true,_0xeec3x20=_0xeec3x3[_0x4d30[226]][_0x4d30[227]](_0xeec3x1d),_0xeec3x1a=0;_0xeec3x1a< _0xeec3x20;_0xeec3x1a++){var _0xeec3x21=_0xeec3x3[_0x4d30[226]][_0x4d30[228]](_0xeec3x1d,_0xeec3x1a),_0xeec3x22=_0xeec3x1e;_0xeec3x3[_0x4d30[229]](_0xeec3x21)&& (_0xeec3x22= {});_0xeec3x22= this[_0x4d30[224]](_0xeec3x21,_0xeec3x22);_0xeec3x22!= null?_0xeec3x3[_0x4d30[231]](_0xeec3x21,_0xeec3x22[_0x4d30[170]](/\n/g,_0x4d30[230])):_0xeec3x3[_0x4d30[231]](_0xeec3x21,null);_0xeec3x1f= _0xeec3x1f&& _0xeec3x22== null};_0xeec3x20= _0x4d30[232];if(_0xeec3x3[_0x4d30[226]][_0x4d30[105]](_0xeec3x1d)){switch(_0xeec3x1d[_0x4d30[101]][_0x4d30[291]]){case _0x4d30[52]:_0xeec3x20= this[_0x4d30[233]](_0x4d30[52])?_0x4d30[232]:_0x4d30[234]+ _0x4d30[235];break;case _0x4d30[53]:_0xeec3x20= this[_0x4d30[233]](_0x4d30[53])?_0x4d30[232]:_0x4d30[236]+ _0x4d30[235];break;case _0x4d30[67]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[237])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[239])+ _0x4d30[235];break;case _0x4d30[66]:;case _0x4d30[68]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[237])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[239])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[240])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[241])+ _0x4d30[235];break;case _0x4d30[74]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[237])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[239])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[242])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[243])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[244])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[245])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[246])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[241])+ _0x4d30[235];case _0x4d30[75]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[237])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[239])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[242])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[243])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[244])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[245])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[246])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[241])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[247])>= 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[248])+ _0x4d30[235];break;case _0x4d30[85]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[249])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[243])+ _0x4d30[235];break;case _0x4d30[77]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[250])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[251])+ _0x4d30[235];break;case _0x4d30[60]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[252])!== _0x4d30[253])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[254])+ _0x4d30[235];break;case _0x4d30[64]:;case _0x4d30[65]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[242])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[243])+ _0x4d30[235];break;case _0x4d30[81]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[255])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[256])+ _0x4d30[235];break;case _0x4d30[89]:;case _0x4d30[90]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[257])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[258])+ _0x4d30[235];break;case _0x4d30[82]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[259])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[260])+ _0x4d30[235];break;case _0x4d30[69]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[261])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[262])+ _0x4d30[235];break;case _0x4d30[70]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[263])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[264])+ _0x4d30[235];break;case _0x4d30[71]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[265])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[266])+ _0x4d30[235];break;case _0x4d30[76]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[267])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[268])+ _0x4d30[235];break;case _0x4d30[87]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[269])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[270])+ _0x4d30[235];break;case _0x4d30[60]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[271])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[272])+ _0x4d30[235];break;case _0x4d30[59]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[273])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[272])+ _0x4d30[235];break;case _0x4d30[61]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[274])!== _0x4d30[253])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[275])+ _0x4d30[235];break;case _0x4d30[63]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[276])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[277])+ _0x4d30[235];break;case _0x4d30[83]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[278])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[279])+ _0x4d30[235];break;case _0x4d30[84]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[278])!= _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[279])+ _0x4d30[235];break;case _0x4d30[62]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[280])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[281])+ _0x4d30[235];break;case _0x4d30[91]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[282])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[283])+ _0x4d30[235];break;case _0x4d30[79]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[284])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[285])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[286])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[287])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[288])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[266])+ _0x4d30[235];break;case _0x4d30[80]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[284])> 0)?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[285])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[286])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[287])+ _0x4d30[235];break;case _0x4d30[72]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[265])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[266])+ _0x4d30[235];break;case _0x4d30[73]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[265])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[266])+ _0x4d30[235];_0xeec3x20+= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[289])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[290])+ _0x4d30[235];break;case _0x4d30[78]:_0xeec3x20= (_0xeec3x1d[_0x4d30[101]][_0x4d30[238]](_0x4d30[289])!== _0x4d30[232])?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[290])+ _0x4d30[235];break}};if(_0xeec3x3[_0x4d30[226]][_0x4d30[98]](_0xeec3x1d)){var _0xeec3x23=_0xeec3x3[_0x4d30[226]][_0x4d30[293]](_0xeec3x1d[_0x4d30[102]][_0x4d30[292]]());switch(_0xeec3x23[_0x4d30[101]][_0x4d30[291]]){case _0x4d30[66]:var _0xeec3x24=/^[0-9]{1,45}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/;_0xeec3x20= _0xeec3x20+ ((_0xeec3x24[_0x4d30[295]](String(_0xeec3x1d[_0x4d30[294]]())))?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[296])+ _0x4d30[235]);break;case _0x4d30[68]:var _0xeec3x24=/^[0-9]{1,45}$|^[-]{1}$|^[i]{1}$|^[t]{1}|^[#]{1}|^[*]{1}$/;var _0xeec3x25=String(_0xeec3x1d[_0x4d30[294]]());var _0xeec3x26=_0xeec3x25[_0x4d30[298]](_0x4d30[297]);_0xeec3x26[_0x4d30[300]](function(_0xeec3x27){_0xeec3x20= _0xeec3x20+ ((_0xeec3x24[_0x4d30[295]](_0xeec3x27))?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[299])+ _0x4d30[235])});break;case _0x4d30[75]:;case _0x4d30[74]:var _0xeec3x24=/^(x|i|-)$/;var _0xeec3x25=String(_0xeec3x1d[_0x4d30[294]]());_0xeec3x20= _0xeec3x20+ ((_0xeec3x24[_0x4d30[295]](_0xeec3x25))?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[301])+ _0x4d30[235]);break;case _0x4d30[82]:;case _0x4d30[83]:;case _0x4d30[84]:var _0xeec3x24=/^(true){1}$|^(false){1}$/;_0xeec3x20= _0xeec3x20+ ((_0xeec3x24[_0x4d30[295]](String(_0xeec3x1d[_0x4d30[294]]())))?_0x4d30[232]:mxResources[_0x4d30[145]](_0x4d30[302])+ _0x4d30[235]);break}};_0xeec3x3[_0x4d30[303]](_0xeec3x1d)&& !_0xeec3x1f&& (_0xeec3x20= _0xeec3x20+ ((mxResources[_0x4d30[145]](_0xeec3x3[_0x4d30[304]])|| _0xeec3x3[_0x4d30[304]])+ _0x4d30[235]));_0xeec3x20= _0xeec3x3[_0x4d30[226]][_0x4d30[98]](_0xeec3x1d)?_0xeec3x20+ (_0xeec3x3[_0x4d30[306]](_0xeec3x1d,_0xeec3x3[_0x4d30[226]][_0x4d30[305]](_0xeec3x1d,true),_0xeec3x3[_0x4d30[226]][_0x4d30[305]](_0xeec3x1d,false))|| _0x4d30[232]):_0xeec3x20+ (_0xeec3x3[_0x4d30[307]](_0xeec3x1d)|| _0x4d30[232]);_0xeec3x1a= _0xeec3x3[_0x4d30[308]](_0xeec3x1d,_0xeec3x1e);_0xeec3x1a!= null&& (_0xeec3x20= _0xeec3x20+ _0xeec3x1a);_0xeec3x3[_0x4d30[226]][_0x4d30[309]](_0xeec3x1d)== null&& _0xeec3x3[_0x4d30[122]][_0x4d30[224]]();return _0xeec3x20[_0x4d30[176]]> 0|| !_0xeec3x1f?_0xeec3x20:null};EditorUi[_0x4d30[10]][_0x4d30[233]]= function(_0xeec3x28){var _0xeec3x3=this[_0x4d30[0]][_0x4d30[4]];var _0xeec3x29=_0xeec3x3[_0x4d30[310]]();var _0xeec3x2a=0;_0xeec3x29[_0x4d30[311]][_0x4d30[300]](function(_0xeec3x2b){if(_0xeec3x3[_0x4d30[226]][_0x4d30[105]](_0xeec3x2b)&& _0xeec3x2b[_0x4d30[101]][_0x4d30[291]]== _0xeec3x28){_0xeec3x2a++}});return _0xeec3x2a> 1?false:true};EditorUi[_0x4d30[10]][_0x4d30[312]]= function(_0xeec3x18){var _0xeec3x1=this[_0x4d30[0]];if(_0xeec3x18!= null){var _0xeec3x1b=this[_0x4d30[224]]();if(_0xeec3x1b=== null){var _0xeec3x14=mxUtils[_0x4d30[168]](this[_0x4d30[0]][_0x4d30[167]]());try{if(useLocalStorage){if(localStorage[_0x4d30[169]](_0xeec3x18)!= null&& !mxUtils[_0x4d30[171]](mxResources[_0x4d30[145]](_0x4d30[170],[_0xeec3x18]))){return};localStorage[_0x4d30[172]](_0xeec3x18,_0xeec3x14);this[_0x4d30[0]][_0x4d30[175]](mxResources[_0x4d30[145]](_0x4d30[173])+ _0x4d30[174]+ new Date())}else {console[_0x4d30[177]](_0xeec3x14[_0x4d30[176]]);console[_0x4d30[177]](MAX_REQUEST_SIZE);if(_0xeec3x14[_0x4d30[176]]< MAX_REQUEST_SIZE){_0xeec3x14= encodeURIComponent(_0xeec3x14);var _0xeec3x19= new XMLHttpRequest();_0xeec3x19[_0x4d30[135]](_0x4d30[207],SAVE_URL+ this[_0x4d30[0]][_0x4d30[165]][_0x4d30[194]],true);_0xeec3x19[_0x4d30[181]](_0x4d30[179],_0x4d30[180]);_0xeec3x19[_0x4d30[181]](_0x4d30[182],_0x4d30[183]+ _0xeec3x1[_0x4d30[165]][_0x4d30[184]]);_0xeec3x19[_0x4d30[185]]= function(_0xeec3x1a){if(_0xeec3x19[_0x4d30[186]]=== 4){if(_0xeec3x19[_0x4d30[187]]=== 200){_0xeec3x1[_0x4d30[175]](_0x4d30[313]+ JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]])[_0x4d30[209]]+ _0x4d30[199]+ _0xeec3x19[_0x4d30[187]]+ _0x4d30[174]+ _0xeec3x19[_0x4d30[200]]+ _0x4d30[44])}else {try{var _0xeec3x1b=JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]]);_0xeec3x1[_0x4d30[175]](_0x4d30[314]+ _0xeec3x1b[_0x4d30[197]][0][_0x4d30[161]])}catch(_0xeec3x1a){_0xeec3x1[_0x4d30[175]](_0x4d30[315]+ _0x4d30[199]+ _0xeec3x19[_0x4d30[187]]+ _0x4d30[174]+ _0xeec3x19[_0x4d30[200]]+ _0x4d30[44])}}}};_0xeec3x19[_0x4d30[201]]= function(_0xeec3x1a){mxUtils[_0x4d30[162]](_0xeec3x19[_0x4d30[200]])};_0xeec3x19[_0x4d30[203]](_0x4d30[212]+ _0xeec3x14+ _0x4d30[223]+ _0xeec3x14)}else {mxUtils[_0x4d30[162]](mxResources[_0x4d30[145]](_0x4d30[204]));mxUtils[_0x4d30[205]](_0xeec3x14);return}};this[_0x4d30[0]][_0x4d30[158]]= _0xeec3x18;this[_0x4d30[0]][_0x4d30[155]]= false}catch(e){this[_0x4d30[0]][_0x4d30[175]](_0x4d30[316])}}else {_0xeec3x1[_0x4d30[175]](_0x4d30[314])}}else {this[_0x4d30[0]][_0x4d30[175]](_0x4d30[316])}};EditorUi[_0x4d30[10]][_0x4d30[249]]= function(_0xeec3x18,_0xeec3x1c){var _0xeec3x1=this[_0x4d30[0]];if(_0xeec3x18!= null){try{var _0xeec3x19= new XMLHttpRequest();_0xeec3x19[_0x4d30[135]](_0x4d30[178],VARIABLE_URL,true);_0xeec3x19[_0x4d30[181]](_0x4d30[179],_0x4d30[180]);_0xeec3x19[_0x4d30[181]](_0x4d30[182],_0x4d30[183]+ _0xeec3x1[_0x4d30[165]][_0x4d30[184]]);_0xeec3x19[_0x4d30[185]]= function(_0xeec3x1a){if(_0xeec3x19[_0x4d30[186]]=== 4){if(_0xeec3x19[_0x4d30[187]]=== 201){_0xeec3x1[_0x4d30[175]](_0x4d30[317]+ JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]])[_0x4d30[318]]+ _0x4d30[199]+ _0xeec3x19[_0x4d30[187]]+ _0x4d30[174]+ _0xeec3x19[_0x4d30[200]]+ _0x4d30[44])}else {try{var _0xeec3x1b=JSON[_0x4d30[191]](_0xeec3x19[_0x4d30[190]]);_0xeec3x1[_0x4d30[175]](_0x4d30[319]+ _0xeec3x1b[_0x4d30[197]][0][_0x4d30[161]])}catch(_0xeec3x1a){_0xeec3x1[_0x4d30[175]](_0x4d30[320]+ _0x4d30[199]+ _0xeec3x19[_0x4d30[187]]+ _0x4d30[174]+ _0xeec3x19[_0x4d30[200]]+ _0x4d30[44])}}}};_0xeec3x19[_0x4d30[201]]= function(_0xeec3x1a){mxUtils[_0x4d30[162]](_0xeec3x19[_0x4d30[200]])};_0xeec3x19[_0x4d30[203]](_0x4d30[321]+ _0xeec3x18+ _0x4d30[322]+ _0xeec3x1c)}catch(e){this[_0x4d30[0]][_0x4d30[175]](_0x4d30[320])}}else {this[_0x4d30[0]][_0x4d30[175]](_0x4d30[320])}};EditorUi[_0x4d30[10]][_0x4d30[323]]= function(_0xeec3x2c){var _0xeec3x2d=(_0xeec3x2c!= null)?_0xeec3x2c:window[_0x4d30[325]][_0x4d30[324]];var _0xeec3x2e=(_0xeec3x2d[_0x4d30[103]](_0x4d30[326])> 0)?1:0;for(var _0xeec3x2f in urlParams){if(_0xeec3x2e== 0){_0xeec3x2d+= _0x4d30[326]}else {_0xeec3x2d+= _0x4d30[327]};_0xeec3x2d+= _0xeec3x2f+ _0x4d30[328]+ urlParams[_0xeec3x2f];_0xeec3x2e++};return _0xeec3x2d};EditorUi[_0x4d30[10]][_0x4d30[142]]= function(){var _0xeec3x30=this[_0x4d30[12]][_0x4d30[145]](_0x4d30[329]);var _0xeec3x31=this[_0x4d30[12]][_0x4d30[145]](_0x4d30[330]);var _0xeec3x32=this[_0x4d30[0]][_0x4d30[157]];var _0xeec3x33=function(){_0xeec3x30[_0x4d30[147]](_0xeec3x32[_0x4d30[331]]());_0xeec3x31[_0x4d30[147]](_0xeec3x32[_0x4d30[332]]())};_0xeec3x32[_0x4d30[33]](mxEvent.ADD,_0xeec3x33);_0xeec3x32[_0x4d30[33]](mxEvent.UNDO,_0xeec3x33);_0xeec3x32[_0x4d30[33]](mxEvent.REDO,_0xeec3x33);_0xeec3x32[_0x4d30[33]](mxEvent.CLEAR,_0xeec3x33);_0xeec3x33()};EditorUi[_0x4d30[10]][_0x4d30[143]]= function(){var _0xeec3x34=mxUtils[_0x4d30[20]](this,function(){var _0xeec3x3=this[_0x4d30[0]][_0x4d30[4]];var _0xeec3x35=!_0xeec3x3[_0x4d30[333]]();var _0xeec3x36=false;var _0xeec3x37=false;var _0xeec3x38=_0xeec3x3[_0x4d30[334]]();if(_0xeec3x38!= null){for(var _0xeec3x39=0;_0xeec3x39< _0xeec3x38[_0x4d30[176]];_0xeec3x39++){var _0xeec3xb=_0xeec3x38[_0xeec3x39];if(_0xeec3x3[_0x4d30[99]]()[_0x4d30[98]](_0xeec3xb)){_0xeec3x37= true};if(_0xeec3x3[_0x4d30[99]]()[_0x4d30[105]](_0xeec3xb)){_0xeec3x36= true};if(_0xeec3x37&& _0xeec3x36){break}}};var _0xeec3x3a=[_0x4d30[148],_0x4d30[149],_0x4d30[335],_0x4d30[336],_0x4d30[337],_0x4d30[338],_0x4d30[6],_0x4d30[339],_0x4d30[340],_0x4d30[341],_0x4d30[342],_0x4d30[343],_0x4d30[344],_0x4d30[345],_0x4d30[346]];for(var _0xeec3x39=0;_0xeec3x39< _0xeec3x3a[_0x4d30[176]];_0xeec3x39++){this[_0x4d30[12]][_0x4d30[145]](_0xeec3x3a[_0xeec3x39])[_0x4d30[147]](_0xeec3x35)};this[_0x4d30[12]][_0x4d30[145]](_0x4d30[347])[_0x4d30[147]](_0xeec3x37);this[_0x4d30[12]][_0x4d30[145]](_0x4d30[348])[_0x4d30[147]](_0xeec3x36);this[_0x4d30[12]][_0x4d30[145]](_0x4d30[349])[_0x4d30[147]](_0xeec3x36);this[_0x4d30[12]][_0x4d30[145]](_0x4d30[351])[_0x4d30[147]](_0xeec3x3[_0x4d30[350]]()> 1);this[_0x4d30[12]][_0x4d30[145]](_0x4d30[353])[_0x4d30[147]](_0xeec3x3[_0x4d30[350]]()== 1&& _0xeec3x3[_0x4d30[99]]()[_0x4d30[227]](_0xeec3x3[_0x4d30[352]]())> 0);var _0xeec3x3b=_0xeec3x36&& _0xeec3x3[_0x4d30[350]]()== 1;this[_0x4d30[12]][_0x4d30[145]](_0x4d30[354])[_0x4d30[147]](_0xeec3x3b&& _0xeec3x3[_0x4d30[99]]()[_0x4d30[105]](_0xeec3x3[_0x4d30[99]]()[_0x4d30[309]](_0xeec3x3[_0x4d30[352]]())));var _0xeec3x3c=[_0x4d30[355],_0x4d30[356],_0x4d30[357],_0x4d30[358],_0x4d30[265],_0x4d30[359],_0x4d30[360],_0x4d30[361],_0x4d30[362]];for(var _0xeec3x39=0;_0xeec3x39< _0xeec3x3c[_0x4d30[176]];_0xeec3x39++){this[_0x4d30[13]][_0x4d30[145]](_0xeec3x3c[_0xeec3x39])[_0x4d30[147]](_0xeec3x35)};_0xeec3x3c= [_0x4d30[363],_0x4d30[364],_0x4d30[365]];for(var _0xeec3x39=0;_0xeec3x39< _0xeec3x3c[_0x4d30[176]];_0xeec3x39++){this[_0x4d30[13]][_0x4d30[145]](_0xeec3x3c[_0xeec3x39])[_0x4d30[147]](_0xeec3x37)};this[_0x4d30[12]][_0x4d30[145]](_0x4d30[366])[_0x4d30[147]](_0xeec3x37);this[_0x4d30[13]][_0x4d30[145]](_0x4d30[367])[_0x4d30[147]](_0xeec3x3[_0x4d30[350]]()> 1);this[_0x4d30[13]][_0x4d30[145]](_0x4d30[370])[_0x4d30[147]](_0xeec3x36|| (_0xeec3x37&& _0xeec3x3[_0x4d30[369]](_0xeec3x3[_0x4d30[122]][_0x4d30[368]](_0xeec3x3[_0x4d30[352]]()))));this[_0x4d30[13]][_0x4d30[145]](_0x4d30[373])[_0x4d30[147]](_0xeec3x3[_0x4d30[371]]&& ((_0xeec3x3[_0x4d30[122]][_0x4d30[372]]!= null)|| (_0xeec3x3[_0x4d30[350]]()== 1&& _0xeec3x3[_0x4d30[229]](_0xeec3x3[_0x4d30[352]]()))));this[_0x4d30[12]][_0x4d30[145]](_0x4d30[374])[_0x4d30[147]](_0xeec3x3[_0x4d30[122]][_0x4d30[372]]!= null);this[_0x4d30[12]][_0x4d30[145]](_0x4d30[375])[_0x4d30[147]](_0xeec3x3[_0x4d30[122]][_0x4d30[372]]!= null);var _0xeec3x3d=_0xeec3x3[_0x4d30[350]]()== 1&& _0xeec3x3[_0x4d30[229]](_0xeec3x3[_0x4d30[352]]());this[_0x4d30[12]][_0x4d30[145]](_0x4d30[376])[_0x4d30[147]](_0xeec3x3d);this[_0x4d30[12]][_0x4d30[145]](_0x4d30[377])[_0x4d30[147]](_0xeec3x3d);this[_0x4d30[12]][_0x4d30[145]](_0x4d30[378])[_0x4d30[147]](_0xeec3x3d);this[_0x4d30[12]][_0x4d30[145]](_0x4d30[379])[_0x4d30[147]](_0xeec3x3[_0x4d30[350]]()== 1);this[_0x4d30[12]][_0x4d30[145]](_0x4d30[381])[_0x4d30[147]](_0xeec3x3[_0x4d30[350]]()== 1&& _0xeec3x3[_0x4d30[380]](_0xeec3x3[_0x4d30[352]]())!= null)});this[_0x4d30[0]][_0x4d30[4]][_0x4d30[382]]()[_0x4d30[33]](mxEvent.CHANGE,_0xeec3x34);_0xeec3x34()};EditorUi[_0x4d30[10]][_0x4d30[15]]= function(){var _0xeec3x3e=mxClient[_0x4d30[29]]&& (document[_0x4d30[30]]== null|| document[_0x4d30[30]]== 5);var _0xeec3x3f=this[_0x4d30[1]][_0x4d30[383]];var _0xeec3x40=this[_0x4d30[1]][_0x4d30[384]];if(this[_0x4d30[1]]== document[_0x4d30[21]]){_0xeec3x3f= document[_0x4d30[21]][_0x4d30[383]]|| document[_0x4d30[153]][_0x4d30[383]];_0xeec3x40= (_0xeec3x3e)?document[_0x4d30[21]][_0x4d30[384]]|| document[_0x4d30[153]][_0x4d30[384]]:document[_0x4d30[153]][_0x4d30[384]]};var _0xeec3x41=Math[_0x4d30[386]](0,Math[_0x4d30[385]](this[_0x4d30[140]],_0xeec3x3f- this[_0x4d30[136]]- 20));var _0xeec3x42=Math[_0x4d30[386]](0,Math[_0x4d30[385]](this[_0x4d30[141]],_0xeec3x40- this[_0x4d30[137]]- this[_0x4d30[138]]- this[_0x4d30[139]]- this[_0x4d30[136]]- 1));this[_0x4d30[23]][_0x4d30[6]][_0x4d30[387]]= this[_0x4d30[137]]+ _0x4d30[388];this[_0x4d30[25]][_0x4d30[6]][_0x4d30[389]]= this[_0x4d30[137]]+ _0x4d30[388];this[_0x4d30[25]][_0x4d30[6]][_0x4d30[387]]= this[_0x4d30[138]]+ _0x4d30[388];var _0xeec3x43=this[_0x4d30[137]]+ this[_0x4d30[138]];if(!mxClient[_0x4d30[390]]){_0xeec3x43+= 1};this[_0x4d30[27]][_0x4d30[6]][_0x4d30[389]]= _0xeec3x43+ _0x4d30[388];this[_0x4d30[27]][_0x4d30[6]][_0x4d30[391]]= _0xeec3x41+ _0x4d30[388];this[_0x4d30[112]][_0x4d30[6]][_0x4d30[391]]= _0xeec3x41+ _0x4d30[388];this[_0x4d30[112]][_0x4d30[6]][_0x4d30[387]]= _0xeec3x42+ _0x4d30[388];this[_0x4d30[112]][_0x4d30[6]][_0x4d30[392]]= this[_0x4d30[139]]+ _0x4d30[388];this[_0x4d30[26]][_0x4d30[6]][_0x4d30[393]]= (_0xeec3x41+ this[_0x4d30[136]])+ _0x4d30[388];this[_0x4d30[26]][_0x4d30[6]][_0x4d30[389]]= this[_0x4d30[27]][_0x4d30[6]][_0x4d30[389]];this[_0x4d30[28]][_0x4d30[6]][_0x4d30[387]]= this[_0x4d30[139]]+ _0x4d30[388];this[_0x4d30[28]][_0x4d30[6]][_0x4d30[394]]= _0x4d30[395];this[_0x4d30[396]][_0x4d30[6]][_0x4d30[389]]= this[_0x4d30[27]][_0x4d30[6]][_0x4d30[389]];this[_0x4d30[396]][_0x4d30[6]][_0x4d30[392]]= this[_0x4d30[112]][_0x4d30[6]][_0x4d30[392]];this[_0x4d30[396]][_0x4d30[6]][_0x4d30[393]]= _0xeec3x41+ _0x4d30[388];this[_0x4d30[397]][_0x4d30[6]][_0x4d30[391]]= this[_0x4d30[27]][_0x4d30[6]][_0x4d30[391]];this[_0x4d30[397]][_0x4d30[6]][_0x4d30[392]]= (_0xeec3x42+ this[_0x4d30[139]])+ _0x4d30[388];if(_0xeec3x3e){this[_0x4d30[23]][_0x4d30[6]][_0x4d30[391]]= _0xeec3x3f+ _0x4d30[388];this[_0x4d30[25]][_0x4d30[6]][_0x4d30[391]]= this[_0x4d30[23]][_0x4d30[6]][_0x4d30[391]];var _0xeec3x44=(_0xeec3x40- _0xeec3x42- this[_0x4d30[136]]- this[_0x4d30[139]]- this[_0x4d30[137]]- this[_0x4d30[138]]);this[_0x4d30[27]][_0x4d30[6]][_0x4d30[387]]= _0xeec3x44+ _0x4d30[388];this[_0x4d30[26]][_0x4d30[6]][_0x4d30[391]]= (_0xeec3x3f- _0xeec3x41- this[_0x4d30[136]])+ _0x4d30[388];var _0xeec3x45=(_0xeec3x40- this[_0x4d30[139]]- this[_0x4d30[137]]- this[_0x4d30[138]]);this[_0x4d30[26]][_0x4d30[6]][_0x4d30[387]]= _0xeec3x45+ _0x4d30[388];this[_0x4d30[28]][_0x4d30[6]][_0x4d30[391]]= this[_0x4d30[23]][_0x4d30[6]][_0x4d30[391]];this[_0x4d30[396]][_0x4d30[6]][_0x4d30[387]]= _0xeec3x45+ _0x4d30[388]}else {this[_0x4d30[27]][_0x4d30[6]][_0x4d30[392]]= (_0xeec3x42+ this[_0x4d30[136]]+ this[_0x4d30[139]])+ _0x4d30[388];this[_0x4d30[26]][_0x4d30[6]][_0x4d30[392]]= this[_0x4d30[112]][_0x4d30[6]][_0x4d30[392]]}};EditorUi[_0x4d30[10]][_0x4d30[14]]= function(){this[_0x4d30[23]]= this[_0x4d30[399]](_0x4d30[398]);this[_0x4d30[25]]= this[_0x4d30[399]](_0x4d30[400]);this[_0x4d30[27]]= this[_0x4d30[399]](_0x4d30[401]);this[_0x4d30[112]]= this[_0x4d30[399]](_0x4d30[402]);this[_0x4d30[26]]= this[_0x4d30[399]](_0x4d30[403]);this[_0x4d30[28]]= this[_0x4d30[399]](_0x4d30[404]);this[_0x4d30[396]]= this[_0x4d30[399]](_0x4d30[405]);this[_0x4d30[397]]= this[_0x4d30[399]](_0x4d30[406]);this[_0x4d30[23]][_0x4d30[6]][_0x4d30[389]]= _0x4d30[407];this[_0x4d30[23]][_0x4d30[6]][_0x4d30[393]]= _0x4d30[407];this[_0x4d30[23]][_0x4d30[6]][_0x4d30[408]]= _0x4d30[407];this[_0x4d30[25]][_0x4d30[6]][_0x4d30[393]]= _0x4d30[407];this[_0x4d30[25]][_0x4d30[6]][_0x4d30[408]]= _0x4d30[407];this[_0x4d30[27]][_0x4d30[6]][_0x4d30[393]]= _0x4d30[407];this[_0x4d30[112]][_0x4d30[6]][_0x4d30[393]]= _0x4d30[407];this[_0x4d30[26]][_0x4d30[6]][_0x4d30[408]]= _0x4d30[407];this[_0x4d30[28]][_0x4d30[6]][_0x4d30[393]]= _0x4d30[407];this[_0x4d30[28]][_0x4d30[6]][_0x4d30[408]]= _0x4d30[407];this[_0x4d30[28]][_0x4d30[6]][_0x4d30[392]]= _0x4d30[407];this[_0x4d30[397]][_0x4d30[6]][_0x4d30[393]]= _0x4d30[407];this[_0x4d30[397]][_0x4d30[6]][_0x4d30[387]]= this[_0x4d30[136]]+ _0x4d30[388];this[_0x4d30[396]][_0x4d30[6]][_0x4d30[391]]= this[_0x4d30[136]]+ _0x4d30[388]};EditorUi[_0x4d30[10]][_0x4d30[16]]= function(){this[_0x4d30[409]]= this[_0x4d30[13]][_0x4d30[411]](this[_0x4d30[399]](_0x4d30[410]));this[_0x4d30[23]][_0x4d30[412]](this[_0x4d30[409]][_0x4d30[1]]);this[_0x4d30[413]]= this[_0x4d30[415]](this[_0x4d30[399]](_0x4d30[414]));this[_0x4d30[25]][_0x4d30[412]](this[_0x4d30[413]][_0x4d30[1]]);this[_0x4d30[416]]= this[_0x4d30[417]](this[_0x4d30[27]]);this[_0x4d30[28]][_0x4d30[412]](this[_0x4d30[418]]());this[_0x4d30[419]]= this[_0x4d30[420]]();this[_0x4d30[0]][_0x4d30[33]](_0x4d30[421],mxUtils[_0x4d30[20]](this,function(){this[_0x4d30[423]](this[_0x4d30[0]][_0x4d30[422]]())}));this[_0x4d30[423]](this[_0x4d30[0]][_0x4d30[422]]());this[_0x4d30[409]][_0x4d30[1]][_0x4d30[412]](this[_0x4d30[419]]);this[_0x4d30[1]][_0x4d30[412]](this[_0x4d30[23]]);this[_0x4d30[1]][_0x4d30[412]](this[_0x4d30[25]]);this[_0x4d30[1]][_0x4d30[412]](this[_0x4d30[27]]);this[_0x4d30[1]][_0x4d30[412]](this[_0x4d30[112]]);this[_0x4d30[1]][_0x4d30[412]](this[_0x4d30[26]]);this[_0x4d30[1]][_0x4d30[412]](this[_0x4d30[28]]);this[_0x4d30[1]][_0x4d30[412]](this[_0x4d30[396]]);this[_0x4d30[1]][_0x4d30[412]](this[_0x4d30[397]]);this[_0x4d30[424]](this[_0x4d30[396]],true,0,mxUtils[_0x4d30[20]](this,function(_0xeec3x46){this[_0x4d30[140]]= _0xeec3x46;this[_0x4d30[15]]();this[_0x4d30[0]][_0x4d30[4]][_0x4d30[133]]();this[_0x4d30[0]][_0x4d30[113]][_0x4d30[134]](false);this[_0x4d30[0]][_0x4d30[113]][_0x4d30[113]][_0x4d30[133]]()}));this[_0x4d30[424]](this[_0x4d30[397]],false,this[_0x4d30[139]],mxUtils[_0x4d30[20]](this,function(_0xeec3x46){this[_0x4d30[141]]= _0xeec3x46;this[_0x4d30[15]]();this[_0x4d30[0]][_0x4d30[113]][_0x4d30[134]](false);this[_0x4d30[0]][_0x4d30[113]][_0x4d30[113]][_0x4d30[133]]()}))};EditorUi[_0x4d30[10]][_0x4d30[420]]= function(){var _0xeec3x2=document[_0x4d30[426]](_0x4d30[425]);_0xeec3x2[_0x4d30[427]]= _0x4d30[428];return _0xeec3x2};EditorUi[_0x4d30[10]][_0x4d30[420]]= function(){var _0xeec3x2=document[_0x4d30[426]](_0x4d30[425]);_0xeec3x2[_0x4d30[427]]= _0x4d30[428];return _0xeec3x2};EditorUi[_0x4d30[10]][_0x4d30[423]]= function(_0xeec3x46){this[_0x4d30[419]][_0x4d30[429]]= _0xeec3x46};EditorUi[_0x4d30[10]][_0x4d30[415]]= function(_0xeec3x2){return new Toolbar(this,_0xeec3x2)};EditorUi[_0x4d30[10]][_0x4d30[417]]= function(_0xeec3x2){return new Sidebar(this,_0xeec3x2)};EditorUi[_0x4d30[10]][_0x4d30[418]]= function(){return this[_0x4d30[399]](_0x4d30[430])};EditorUi[_0x4d30[10]][_0x4d30[399]]= function(_0xeec3x47){var _0xeec3x48=document[_0x4d30[426]](_0x4d30[431]);_0xeec3x48[_0x4d30[427]]= _0xeec3x47;return _0xeec3x48};EditorUi[_0x4d30[10]][_0x4d30[432]]= function(_0xeec3x47){var _0xeec3x48=document[_0x4d30[426]](_0xeec3x47);return _0xeec3x48};EditorUi[_0x4d30[10]][_0x4d30[433]]= function(_0xeec3x47){var _0xeec3x48=document[_0x4d30[426]](_0x4d30[434]);_0xeec3x48[_0x4d30[427]]= _0xeec3x47;return _0xeec3x48};EditorUi[_0x4d30[10]][_0x4d30[424]]= function(_0xeec3x48,_0xeec3x49,_0xeec3x4a,_0xeec3x4b){var _0xeec3x4c=null;var _0xeec3x4d=null;function _0xeec3x4e(){return parseInt(((_0xeec3x49)?_0xeec3x48[_0x4d30[6]][_0x4d30[393]]:_0xeec3x48[_0x4d30[6]][_0x4d30[392]]))}function _0xeec3x4f(_0xeec3x6){if(_0xeec3x4c!= null){var _0xeec3x50= new mxPoint(mxEvent[_0x4d30[435]](_0xeec3x6),mxEvent[_0x4d30[436]](_0xeec3x6));_0xeec3x4b(Math[_0x4d30[386]](0,_0xeec3x4d+ ((_0xeec3x49)?(_0xeec3x50[_0x4d30[437]]- _0xeec3x4c[_0x4d30[437]]):(_0xeec3x4c[_0x4d30[438]]- _0xeec3x50[_0x4d30[438]]))- _0xeec3x4a));mxEvent[_0x4d30[107]](_0xeec3x6)}}function _0xeec3x51(_0xeec3x6){_0xeec3x4f(_0xeec3x6);_0xeec3x4c= null;_0xeec3x4d= null}mxEvent[_0x4d30[115]](_0xeec3x48,function(_0xeec3x6){_0xeec3x4c= new mxPoint(mxEvent[_0x4d30[435]](_0xeec3x6),mxEvent[_0x4d30[436]](_0xeec3x6));_0xeec3x4d= _0xeec3x4e();mxEvent[_0x4d30[107]](_0xeec3x6)});mxEvent[_0x4d30[33]](document,_0x4d30[439],_0xeec3x4f);mxEvent[_0x4d30[33]](document,_0x4d30[440],_0xeec3x4f);mxEvent[_0x4d30[33]](document,_0x4d30[441],_0xeec3x51);mxEvent[_0x4d30[33]](document,_0x4d30[442],_0xeec3x51)};EditorUi[_0x4d30[10]][_0x4d30[106]]= function(_0xeec3x48,_0xeec3x3f,_0xeec3x40,_0xeec3x52,_0xeec3x53,_0xeec3x54){this[_0x4d30[443]]();this[_0x4d30[444]]= new Dialog(this,_0xeec3x48,_0xeec3x3f,(mxClient[_0x4d30[445]])?_0xeec3x40- 12:_0xeec3x40,_0xeec3x52,_0xeec3x53,_0xeec3x54)};EditorUi[_0x4d30[10]][_0x4d30[443]]= function(){if(this[_0x4d30[444]]!= null){this[_0x4d30[444]][_0x4d30[446]]();this[_0x4d30[444]]= null;this[_0x4d30[0]][_0x4d30[4]][_0x4d30[1]][_0x4d30[47]]()}};EditorUi[_0x4d30[10]][_0x4d30[447]]= function(_0xeec3x55){if(!_0xeec3x55&& this[_0x4d30[0]][_0x4d30[158]]!= null){this[_0x4d30[206]](this[_0x4d30[0]][_0x4d30[448]]())}else {this[_0x4d30[106]]( new SaveDialog(this)[_0x4d30[1]],300,100,true,true)}};EditorUi[_0x4d30[10]][_0x4d30[449]]= function(_0xeec3x55){if(!_0xeec3x55&& this[_0x4d30[0]][_0x4d30[158]]!= null){this[_0x4d30[312]](this[_0x4d30[0]][_0x4d30[448]]())}else {}};EditorUi[_0x4d30[10]][_0x4d30[450]]= function(_0xeec3x56,_0xeec3x57,_0xeec3x58){var _0xeec3x3=this[_0x4d30[0]][_0x4d30[4]];var _0xeec3xb=_0xeec3x3[_0x4d30[352]]();_0xeec3x57= this[_0x4d30[451]]!= null?this[_0x4d30[451]]:_0xeec3x57;_0xeec3x3[_0x4d30[99]]()[_0x4d30[452]]();try{_0xeec3x56[_0x4d30[453]](_0xeec3x3[_0x4d30[310]](),_0xeec3xb)}catch(e){throw e}finally{if(_0xeec3x57&& navigator[_0x4d30[455]][_0x4d30[103]](_0x4d30[454])< 0){var _0xeec3x59= new mxMorphing(_0xeec3x3);_0xeec3x59[_0x4d30[33]](mxEvent.DONE,mxUtils[_0x4d30[20]](this,function(){_0xeec3x3[_0x4d30[99]]()[_0x4d30[456]]()}));_0xeec3x59[_0x4d30[457]]()}else {_0xeec3x3[_0x4d30[99]]()[_0x4d30[456]]()}}};EditorUi[_0x4d30[10]][_0x4d30[130]]= function(_0xeec3x1){var _0xeec3x3=this[_0x4d30[0]][_0x4d30[4]];var _0xeec3xf= new mxKeyHandler(_0xeec3x3);_0xeec3xf[_0x4d30[458]]= function(_0xeec3x6){return mxEvent[_0x4d30[458]](_0xeec3x6)|| (mxClient[_0x4d30[459]]&& _0xeec3x6[_0x4d30[460]])};function _0xeec3x5a(_0xeec3x5b){if(!_0xeec3x3[_0x4d30[333]]()){var _0xeec3x4a=0;var _0xeec3x5c=0;if(_0xeec3x5b== 37){_0xeec3x4a= -1}else {if(_0xeec3x5b== 38){_0xeec3x5c= -1}else {if(_0xeec3x5b== 39){_0xeec3x4a= 1}else {if(_0xeec3x5b== 40){_0xeec3x5c= 1}}}};_0xeec3x3[_0x4d30[461]](_0xeec3x3[_0x4d30[334]](),_0xeec3x4a,_0xeec3x5c);_0xeec3x3[_0x4d30[462]](_0xeec3x3[_0x4d30[352]]())}}var _0xeec3x5d=mxUtils[_0x4d30[20]](this,function(_0xeec3x5e,_0xeec3x5f,_0xeec3x2f,_0xeec3x60){var _0xeec3x61=this[_0x4d30[12]][_0x4d30[145]](_0xeec3x2f);if(_0xeec3x61!= null){var _0xeec3x21=function(){if(_0xeec3x61[_0x4d30[463]]){_0xeec3x61[_0x4d30[464]]()}};if(_0xeec3x5f){if(_0xeec3x60){_0xeec3xf[_0x4d30[465]](_0xeec3x5e,_0xeec3x21)}else {_0xeec3xf[_0x4d30[466]](_0xeec3x5e,_0xeec3x21)}}else {if(_0xeec3x60){_0xeec3xf[_0x4d30[467]](_0xeec3x5e,_0xeec3x21)}else {_0xeec3xf[_0x4d30[468]](_0xeec3x5e,_0xeec3x21)}}}});var _0xeec3x62=this;var _0xeec3x63=_0xeec3xf[_0x4d30[469]];_0xeec3xf[_0x4d30[469]]= function(_0xeec3x6){_0xeec3x62[_0x4d30[443]]();_0xeec3x63[_0x4d30[50]](this,arguments)};_0xeec3xf[_0x4d30[470]]= function(){};_0xeec3xf[_0x4d30[468]](8,function(){_0xeec3x3[_0x4d30[471]](true)});_0xeec3xf[_0x4d30[468]](13,function(){_0xeec3x3[_0x4d30[471]](false)});_0xeec3xf[_0x4d30[468]](33,function(){_0xeec3x3[_0x4d30[375]]()});_0xeec3xf[_0x4d30[468]](34,function(){_0xeec3x3[_0x4d30[376]]()});_0xeec3xf[_0x4d30[468]](36,function(){_0xeec3x3[_0x4d30[374]]()});_0xeec3xf[_0x4d30[468]](35,function(){_0xeec3x3[_0x4d30[15]]()});_0xeec3xf[_0x4d30[468]](37,function(){_0xeec3x5a(37)});_0xeec3xf[_0x4d30[468]](38,function(){_0xeec3x5a(38)});_0xeec3xf[_0x4d30[468]](39,function(){_0xeec3x5a(39)});_0xeec3xf[_0x4d30[468]](40,function(){_0xeec3x5a(40)});_0xeec3xf[_0x4d30[468]](113,function(){_0xeec3x3[_0x4d30[104]]()});_0xeec3x5d(46,false,_0x4d30[335]);_0xeec3x5d(82,true,_0x4d30[345]);_0xeec3x5d(83,true,_0x4d30[206]);_0xeec3x5d(83,true,_0x4d30[218],true);_0xeec3x5d(107,false,_0x4d30[472]);_0xeec3x5d(109,false,_0x4d30[473]);_0xeec3x5d(65,true,_0x4d30[474]);_0xeec3x5d(86,true,_0x4d30[475],true);_0xeec3x5d(69,true,_0x4d30[476],true);_0xeec3x5d(69,true,_0x4d30[477]);_0xeec3x5d(66,true,_0x4d30[341]);_0xeec3x5d(70,true,_0x4d30[340]);_0xeec3x5d(68,true,_0x4d30[336]);_0xeec3x5d(90,true,_0x4d30[329]);_0xeec3x5d(89,true,_0x4d30[330]);_0xeec3x5d(88,true,_0x4d30[148]);_0xeec3x5d(67,true,_0x4d30[149]);_0xeec3x5d(81,true,_0x4d30[478]);_0xeec3x5d(86,true,_0x4d30[144]);_0xeec3x5d(71,true,_0x4d30[351]);_0xeec3x5d(71,true,_0x4d30[479],true);_0xeec3x5d(85,true,_0x4d30[353]);_0xeec3x5d(112,false,_0x4d30[480]);_0xeec3x5d(80,true,_0x4d30[312],true);return _0xeec3xf};EditorUi[_0x4d30[10]][_0x4d30[56]]= function(_0xeec3x3,_0xeec3x38,_0xeec3x64,_0xeec3x65){for(var _0xeec3x39=0;_0xeec3x39< _0xeec3x38[_0x4d30[176]];_0xeec3x39++){_0xeec3x3[_0x4d30[483]]( new mxMultiplicity(true,_0xeec3x38[_0xeec3x39],null,null,_0xeec3x64[_0xeec3x39][0],_0xeec3x64[_0xeec3x39][1],null,mxResources[_0x4d30[145]](_0xeec3x38[_0xeec3x39])+ mxResources[_0x4d30[145]](_0x4d30[481])+ _0xeec3x64[_0xeec3x39][0]+ mxResources[_0x4d30[145]](_0x4d30[482]),null));_0xeec3x3[_0x4d30[483]]( new mxMultiplicity(false,_0xeec3x38[_0xeec3x39],null,null,_0xeec3x65[_0xeec3x39][0],_0xeec3x65[_0xeec3x39][1],null,mxResources[_0x4d30[145]](_0xeec3x38[_0xeec3x39])+ mxResources[_0x4d30[145]](_0x4d30[481])+ _0xeec3x65[_0xeec3x39][0]+ mxResources[_0x4d30[145]](_0x4d30[484]),null))}} \ No newline at end of file diff --git a/public/assets/plugins/square/js/Graph.js b/public/assets/plugins/square/js/Graph.js index dda2a33..3e068d6 100644 --- a/public/assets/plugins/square/js/Graph.js +++ b/public/assets/plugins/square/js/Graph.js @@ -1,644 +1 @@ -/** - * $Id: Graph.js,v 1.14 2013-02-16 10:19:54 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Constructs a new graph instance. Note that the constructor does not take a - * container because the graph instance is needed for creating the UI, which - * in turn will create the container for the graph. Hence, the container is - * assigned later in EditorUi. - */ -Graph = function(container, model, renderHint, stylesheet) { - mxGraph.call(this, container, model, renderHint, stylesheet); - - this.setConnectable(true); - this.setDropEnabled(false); - this.setPanning(true); - this.setTooltips(!mxClient.IS_TOUCH); - this.setAllowLoops(false); - this.setMultigraph(false); - this.allowAutoPanning = true; - this.resetEdgesOnConnect = false; - this.constrainChildren = false; - - // Centers the port icon on the target port - this.connectionHandler.targetConnectImage = true; - - // Does not allow dangling edges - this.setAllowDanglingEdges(false); - - // Enables cloning of connection sources - this.connectionHandler.setCreateTarget(false); - - // Disables built-in connection starts - this.connectionHandler.isValidSource = function() { - return mxConnectionHandler.prototype.isValidSource.apply(this, arguments) && urlParams['connect'] != '2'; - }; - - // Sets the style to be used when an elbow edge is double clicked - this.alternateEdgeStyle = 'vertical'; - - if (stylesheet == null) { - this.loadStylesheet(); - } - - // Creates rubberband selection - var rubberband = new mxRubberband(this); - - this.getRubberband = function() { - return rubberband; - }; - - // Shows hand cursor while panning - this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function() { - this.container.style.cursor = 'pointer'; - })); - - this.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function() { - this.container.style.cursor = 'default'; - })); - - // Adds support for HTML labels via style. Note: Currently, only the Java - // backend supports HTML labels but CSS support is limited to the following: - // http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html - this.isHtmlLabel = function(cell) { - var state = this.view.getState(cell); - var style = (state != null) ? state.style : this.getCellStyle(cell); - - return style['html'] == '1' || style['whiteSpace'] == 'wrap'; - }; - - // HTML entities are displayed as plain text in wrapped plain text labels - this.cellRenderer.getLabelValue = function(state) { - var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments); - - if (state.style['whiteSpace'] == 'wrap' && state.style['html'] != 1) { - result = mxUtils.htmlEntities(result, false); - } - - return result; - }; - - // Unlocks all cells - this.isCellLocked = function(cell) { - return false; - }; - - // Tap and hold brings up context menu. - // Tolerance slightly below graph tolerance is better. - this.connectionHandler.tapAndHoldTolerance = 16; - - // Tap and hold on background starts rubberband on cell starts connecting - var connectionHandlerTapAndHold = this.connectionHandler.tapAndHold; - this.connectionHandler.tapAndHold = function(me, state) { - if (state == null) { - if (!this.graph.panningHandler.active) { - rubberband.start(me.getGraphX(), me.getGraphY()); - this.graph.panningHandler.panningTrigger = false; - } - } else if (tapAndHoldStartsConnection) { - connectionHandlerTapAndHold.apply(this, arguments); - } else if (this.graph.isCellSelected(state.cell) && this.graph.getSelectionCount() > 1) { - this.graph.removeSelectionCell(state.cell); - } - }; - - if (touchStyle) { - this.initTouch(); - } -}; - -// Graph inherits from mxGraph -mxUtils.extend(Graph, mxGraph); - -/** - * Allows to all values in fit. - */ -Graph.prototype.minFitScale = null; - -/** - * Allows to all values in fit. - */ -Graph.prototype.maxFitScale = null; - -/** - * Loads the stylesheet for this graph. - */ -Graph.prototype.loadStylesheet = function() { - var node = mxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement(); - var dec = new mxCodec(node.ownerDocument); - dec.decode(node, this.getStylesheet()); -}; - -/** - * Inverts the elbow edge style without removing existing styles. - */ -Graph.prototype.flipEdge = function(edge) { - if (edge != null) { - var state = this.view.getState(edge); - var style = (state != null) ? state.style : this.getCellStyle(edge); - - if (style != null) { - var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW, - mxConstants.ELBOW_HORIZONTAL); - var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ? - mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL; - this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]); - } - } -}; - -/** - * Sets the default edge for future connections. - */ -Graph.prototype.setDefaultEdge = function(cell) { - if (cell != null && this.getModel().isEdge(cell)) { - // Take a snapshot of the cell at the moment of calling - var proto = this.getModel().cloneCells([cell])[0]; - - // Delete existing points - if (proto.geometry != null) { - proto.geometry.points = null; - } - - // Delete entry-/exitXY styles - var style = proto.getStyle(); - style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_X, null); - style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_Y, null); - style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_X, null); - style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_Y, null); - proto.setStyle(style); - - // Uses edge template for connect preview - this.connectionHandler.createEdgeState = function(me) { - return this.graph.view.createState(proto); - }; - - // Creates new connections from edge template - this.connectionHandler.factoryMethod = function() { - return this.graph.cloneCells([proto])[0]; - }; - } -}; - -/** - * Disables folding for non-swimlanes. - */ -Graph.prototype.isCellFoldable = function(cell) { - return this.foldingEnabled && this.isSwimlane(cell); -}; - -/** - * Disables drill-down for non-swimlanes. - */ -Graph.prototype.isValidRoot = function(cell) { - return this.isSwimlane(cell); -}; - -/** - * Overrides createGroupCell to set the group style for new groups to 'group'. - */ -Graph.prototype.createGroupCell = function() { - var group = mxGraph.prototype.createGroupCell.apply(this, arguments); - group.setStyle('group'); - - return group; -}; - -/** - * Giuseppe Careri - * Overrides tooltips to show position and size - */ -Graph.prototype.getTooltipForCell = function(cell) { - var tip = ''; - - if (this.getModel().isVertex(cell)) { - // var geo = this.getCellGeometry(cell); - - // var f2 = function(x) - // { - // return Math.round(parseFloat(x) * 100) / 100; - // }; - - // if (geo != null) - // { - // if (tip == null) - // { - // tip = ''; - // } - // else if (tip.length > 0) - // { - // tip += '\n'; - // } - - // tip += 'X: ' + f2(geo.x) + '\nY: ' + f2(geo.y) + '\nW: ' + f2(geo.width) + '\nH: ' + f2(geo.height); - // } - - tip += mxResources.get('description_' + cell.value.nodeName) || ''; - } else if (this.getModel().isEdge(cell)) { - tip = mxGraph.prototype.getTooltipForCell.apply(this, arguments); - } - - return tip; -}; - -/** - * Giuseppe Careri - * Returns the label for the given cell. - */ -Graph.prototype.convertValueToString = function(cell) { - if (cell.value != null && typeof(cell.value) == 'object') { - return cell.value.getAttribute('label'); - } - - return mxGraph.prototype.convertValueToString.apply(this, arguments); -}; - -/** - * Giuseppe Careri - * Handles label changes for XML user objects. - */ -Graph.prototype.cellLabelChanged = function(cell, value, autoSize) { - if (cell.value != null && typeof(cell.value) == 'object') { - var tmp = cell.value.cloneNode(true); - tmp.setAttribute('label', value); - value = tmp; - } - - mxGraph.prototype.cellLabelChanged.apply(this, arguments); -}; - -/** - * Sets the link for the given cell. - */ -Graph.prototype.setLinkForCell = function(cell, link) { - var value = null; - - if (cell.value != null && typeof(cell.value) == 'object') { - value = cell.value.cloneNode(true); - } else { - var doc = mxUtils.createXmlDocument(); - - value = doc.createElement('UserObject'); - value.setAttribute('label', cell.value); - } - - if (link != null && link.length > 0) { - value.setAttribute('link', link); - } else { - value.removeAttribute('link'); - } - - this.model.setValue(cell, value); -}; - -/** - * Returns the link for the given cell. - */ -Graph.prototype.getLinkForCell = function(cell) { - if (cell.value != null && typeof(cell.value) == 'object') { - return cell.value.getAttribute('link'); - } - - return null; -}; - -/** - * Customized graph for touch devices. - */ -Graph.prototype.initTouch = function() { - // Disables new connections via "hotspot" - this.connectionHandler.marker.isEnabled = function() { - return this.graph.connectionHandler.first != null; - }; - - // Hides menu when editing starts - this.addListener(mxEvent.START_EDITING, function(sender, evt) { - this.panningHandler.hideMenu(); - }); - - // Context menu for touchstyle - var showMenu = false; - var menuCell = null; - - // Checks if native hit detection did not return anything and does custom - // hit detection for edges to take into account the tolerance - this.updateMouseEvent = function(me) { - mxGraph.prototype.updateMouseEvent.apply(this, arguments); - - if (me.getState() == null) { - var cell = this.getCellAt(me.graphX, me.graphY); - - if (this.getModel().isEdge(cell)) { - me.state = this.view.getState(cell); - - if (me.state != null && me.state.shape != null) { - this.container.style.cursor = me.state.shape.node.style.cursor; - } - } - } - - if (me.getState() == null) { - this.container.style.cursor = 'default'; - } - }; - - // Handles popup menu on touch devices (tap selected cell) - this.fireMouseEvent = function(evtName, me, sender) { - if (evtName == mxEvent.MOUSE_DOWN) { - if (!this.panningHandler.isMenuShowing()) { - menuCell = me.getCell(); - showMenu = (menuCell != null) ? this.isCellSelected(menuCell) : this.isSelectionEmpty(); - } else { - showMenu = false; - menuCell = null; - } - } else if (evtName == mxEvent.MOUSE_UP) { - if (showMenu && !this.isEditing()) { - if (!this.panningHandler.isMenuShowing()) { - var x = mxEvent.getClientX(me.getEvent()); - var y = mxEvent.getClientY(me.getEvent()); - - this.panningHandler.popup(x + 16, y, menuCell, me.getEvent()); - } - - showMenu = false; - menuCell = null; - me.consume(); - - return; - } - - showMenu = false; - menuCell = null; - } - - mxGraph.prototype.fireMouseEvent.apply(this, arguments); - - if (evtName == mxEvent.MOUSE_MOVE && me.isConsumed()) { - showMenu = false; - menuCell = null; - } - }; -}; - -/** - * Implements touch devices. - */ -(function() { - // Enables rotation handle - mxVertexHandler.prototype.rotationEnabled = true; - - // Matches label positions of mxGraph 1.x - mxText.prototype.baseSpacingTop = 5; - mxText.prototype.baseSpacingBottom = 1; - - // Touch-specific static overrides - if (touchStyle) { - // Sets constants for touch style - mxConstants.HANDLE_SIZE = 16; - mxConstants.LABEL_HANDLE_SIZE = 7; - - // Larger tolerance and grid for real touch devices - if (mxClient.IS_TOUCH) { - mxVertexHandler.prototype.tolerance = 4; - mxEdgeHandler.prototype.tolerance = 6; - Graph.prototype.tolerance = 14; - Graph.prototype.gridSize = 20; - - // One finger pans (no rubberband selection) must start regardless of mouse button - mxPanningHandler.prototype.selectOnPopup = false; - mxPanningHandler.prototype.useLeftButtonForPanning = true; - mxPanningHandler.prototype.isPanningTrigger = function(me) { - var evt = me.getEvent(); - - return (this.useLeftButtonForPanning && (this.ignoreCell || me.getState() == null) - /* && - mxEvent.isLeftMouseButton(evt)*/ - ) || (mxEvent.isControlDown(evt) && - mxEvent.isShiftDown(evt)) || (this.usePopupTrigger && - mxEvent.isPopupTrigger(evt)); - }; - } - - // Don't clear selection if multiple cells selected - var graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown; - mxGraphHandler.prototype.mouseDown = function(sender, me) { - graphHandlerMouseDown.apply(this, arguments); - - if (this.graph.isCellSelected(me.getCell()) && this.graph.getSelectionCount() > 1) { - this.delayedSelection = false; - } - }; - - // Changes order of panninghandler - Graph.prototype.createHandlers = function(container) { - this.tooltipHandler = new mxTooltipHandler(this); - this.tooltipHandler.setEnabled(false); - // Selection cells first - this.selectionCellsHandler = new mxSelectionCellsHandler(this); - this.panningHandler = new mxPanningHandler(this); - this.panningHandler.panningEnabled = false; - this.connectionHandler = new mxConnectionHandler(this); - this.connectionHandler.setEnabled(false); - this.graphHandler = new mxGraphHandler(this); - }; - - // On connect the target is selected and we clone the cell of the preview edge for insert - mxConnectionHandler.prototype.selectCells = function(edge, target) { - if (touchStyle && target != null) { - this.graph.setSelectionCell(target); - } else { - this.graph.setSelectionCell(edge); - } - }; - - // Overrides double click handling to use the tolerance - // FIXME: Double click on edges in iPad needs focus on textarea - var graphDblClick = mxGraph.prototype.dblClick; - Graph.prototype.dblClick = function(evt, cell) { - if (cell == null) { - var pt = mxUtils.convertPoint(this.container, - mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - cell = this.getCellAt(pt.x, pt.y); - } - - graphDblClick.call(this, evt, cell); - }; - - // Rounded edge and vertex handles - var touchHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16); - mxVertexHandler.prototype.handleImage = touchHandle; - mxEdgeHandler.prototype.handleImage = touchHandle; - mxOutline.prototype.sizerImage = touchHandle; - - // Pre-fetches touch handle - new Image().src = touchHandle.src; - - // Adds connect icon to selected vertices - var connectorSrc = IMAGE_PATH + '/touch-connector.png'; - - var vertexHandlerInit = mxVertexHandler.prototype.init; - mxVertexHandler.prototype.init = function() { - vertexHandlerInit.apply(this, arguments); - - // Only show connector image on one cell and do not show on containers - if (showConnectorImg && this.graph.connectionHandler.isEnabled() && - this.graph.isCellConnectable(this.state.cell) && - !this.graph.isValidRoot(this.state.cell) && - this.graph.getSelectionCount() == 1) { - this.connectorImg = mxUtils.createImage(connectorSrc); - this.connectorImg.style.cursor = 'pointer'; - this.connectorImg.style.width = '29px'; - this.connectorImg.style.height = '29px'; - this.connectorImg.style.position = 'absolute'; - - if (!mxClient.IS_TOUCH) { - this.connectorImg.setAttribute('title', mxResources.get('connect')); - mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state); - } - - // Adds 2px tolerance - this.connectorImg.style.padding = '2px'; - - // Starts connecting on touch/mouse down - mxEvent.addGestureListeners(this.connectorImg, - mxUtils.bind(this, function(evt) { - this.graph.panningHandler.hideMenu(); - var pt = mxUtils.convertPoint(this.graph.container, - mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - this.graph.connectionHandler.start(this.state, pt.x, pt.y); - this.graph.isMouseDown = true; - mxEvent.consume(evt); - }) - ); - - this.graph.container.appendChild(this.connectorImg); - } - - this.redrawTools(); - }; - - var vertexHandlerRedraw = mxVertexHandler.prototype.redraw; - mxVertexHandler.prototype.redraw = function() { - vertexHandlerRedraw.apply(this); - this.redrawTools(); - }; - - mxVertexHandler.prototype.redrawTools = function() { - if (this.state != null && this.connectorImg != null) { - // Top right for single-sizer - if (mxVertexHandler.prototype.singleSizer) { - this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px'; - this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px'; - } else { - this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 4 /* - 2 padding*/ ) + 'px'; - this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px'; - } - } - }; - - var vertexHandlerDestroy = mxVertexHandler.prototype.destroy; - mxVertexHandler.prototype.destroy = function(sender, me) { - vertexHandlerDestroy.apply(this, arguments); - - if (this.connectorImg != null) { - this.connectorImg.parentNode.removeChild(this.connectorImg); - this.connectorImg = null; - } - }; - - // Pre-fetches touch connector - new Image().src = connectorSrc; - } else { - var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15); - mxConnectionHandler.prototype.connectImage = img; - - // Pre-fetches img - new Image().src = img.src; - - if (urlParams['connect'] == '2') // not touchStyle - { - var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15); - - var vertexHandlerInit = mxVertexHandler.prototype.init; - mxVertexHandler.prototype.init = function() { - vertexHandlerInit.apply(this, arguments); - - // Only show connector image on one cell and do not show on containers - if (showConnectorImg && this.graph.connectionHandler.isEnabled() && - this.graph.isCellConnectable(this.state.cell) && - !this.graph.isValidRoot(this.state.cell) && - this.graph.getSelectionCount() == 1) { - // Workaround for event redirection via image tag in quirks and IE8 - if (mxClient.IS_IE && !mxClient.IS_SVG) { - this.connectorImg = document.createElement('div'); - this.connectorImg.style.backgroundImage = 'url(' + img.src + ')'; - this.connectorImg.style.backgroundPosition = 'center'; - this.connectorImg.style.backgroundRepeat = 'no-repeat'; - this.connectorImg.style.width = (img.width + 4) + 'px'; - this.connectorImg.style.height = (img.height + 4) + 'px'; - this.connectorImg.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block'; - } else { - this.connectorImg = mxUtils.createImage(img.src); - this.connectorImg.style.width = img.width + 'px'; - this.connectorImg.style.height = img.height + 'px'; - } - - this.connectorImg.style.cursor = 'pointer'; - this.connectorImg.style.position = 'absolute'; - this.connectorImg.setAttribute('title', mxResources.get('connect')); - mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state); - - // Adds 2px tolerance - this.connectorImg.style.padding = '2px'; - - // Starts connecting on touch/mouse down - mxEvent.addListener(this.connectorImg, 'mousedown', - mxUtils.bind(this, function(evt) { - this.graph.panningHandler.hideMenu(); - var pt = mxUtils.convertPoint(this.graph.container, - mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - this.graph.connectionHandler.start(this.state, pt.x, pt.y); - this.graph.isMouseDown = true; - mxEvent.consume(evt); - }) - ); - - this.graph.container.appendChild(this.connectorImg); - } - - this.redrawTools(); - }; - - var vertexHandlerRedraw = mxVertexHandler.prototype.redraw; - mxVertexHandler.prototype.redraw = function() { - vertexHandlerRedraw.apply(this); - this.redrawTools(); - }; - - mxVertexHandler.prototype.redrawTools = function() { - if (this.state != null && this.connectorImg != null) { - // Top right for single-sizer - if (mxVertexHandler.prototype.singleSizer) { - this.connectorImg.style.left = (this.state.x + this.state.width - this.connectorImg.offsetWidth / 2) + 'px'; - this.connectorImg.style.top = (this.state.y - this.connectorImg.offsetHeight / 2) + 'px'; - } else { - this.connectorImg.style.left = (this.state.x + this.state.width + mxConstants.HANDLE_SIZE / 2 + 2 /* - 2 padding*/ ) + 'px'; - this.connectorImg.style.top = (this.state.y + (this.state.height - this.connectorImg.offsetHeight) / 2) + 'px'; - } - } - }; - - var vertexHandlerDestroy = mxVertexHandler.prototype.destroy; - mxVertexHandler.prototype.destroy = function(sender, me) { - vertexHandlerDestroy.apply(this, arguments); - - if (this.connectorImg != null) { - this.connectorImg.parentNode.removeChild(this.connectorImg); - this.connectorImg = null; - } - }; - } - } -})(); +var _0xdce8=["\x63\x61\x6C\x6C","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x73\x65\x74\x44\x72\x6F\x70\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x50\x61\x6E\x6E\x69\x6E\x67","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x4C\x6F\x6F\x70\x73","\x73\x65\x74\x4D\x75\x6C\x74\x69\x67\x72\x61\x70\x68","\x61\x6C\x6C\x6F\x77\x41\x75\x74\x6F\x50\x61\x6E\x6E\x69\x6E\x67","\x72\x65\x73\x65\x74\x45\x64\x67\x65\x73\x4F\x6E\x43\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x43\x68\x69\x6C\x64\x72\x65\x6E","\x74\x61\x72\x67\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x44\x61\x6E\x67\x6C\x69\x6E\x67\x45\x64\x67\x65\x73","\x73\x65\x74\x43\x72\x65\x61\x74\x65\x54\x61\x72\x67\x65\x74","\x69\x73\x56\x61\x6C\x69\x64\x53\x6F\x75\x72\x63\x65","\x61\x70\x70\x6C\x79","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x32","\x61\x6C\x74\x65\x72\x6E\x61\x74\x65\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6C\x6F\x61\x64\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x67\x65\x74\x52\x75\x62\x62\x65\x72\x62\x61\x6E\x64","\x63\x75\x72\x73\x6F\x72","\x73\x74\x79\x6C\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x65\x66\x61\x75\x6C\x74","\x69\x73\x48\x74\x6D\x6C\x4C\x61\x62\x65\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x76\x69\x65\x77","\x67\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65","\x68\x74\x6D\x6C","\x31","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x77\x72\x61\x70","\x67\x65\x74\x4C\x61\x62\x65\x6C\x56\x61\x6C\x75\x65","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x68\x74\x6D\x6C\x45\x6E\x74\x69\x74\x69\x65\x73","\x69\x73\x43\x65\x6C\x6C\x4C\x6F\x63\x6B\x65\x64","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64\x54\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x74\x61\x70\x41\x6E\x64\x48\x6F\x6C\x64","\x61\x63\x74\x69\x76\x65","\x67\x72\x61\x70\x68","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x73\x74\x61\x72\x74","\x70\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x63\x65\x6C\x6C","\x69\x73\x43\x65\x6C\x6C\x53\x65\x6C\x65\x63\x74\x65\x64","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x69\x6E\x69\x74\x54\x6F\x75\x63\x68","\x65\x78\x74\x65\x6E\x64","\x6D\x69\x6E\x46\x69\x74\x53\x63\x61\x6C\x65","\x6D\x61\x78\x46\x69\x74\x53\x63\x61\x6C\x65","\x67\x65\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x2F\x64\x65\x66\x61\x75\x6C\x74\x2E\x78\x6D\x6C","\x6C\x6F\x61\x64","\x6F\x77\x6E\x65\x72\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x64\x65\x63\x6F\x64\x65","\x66\x6C\x69\x70\x45\x64\x67\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x45\x4C\x42\x4F\x57\x5F\x48\x4F\x52\x49\x5A\x4F\x4E\x54\x41\x4C","\x45\x4C\x42\x4F\x57\x5F\x56\x45\x52\x54\x49\x43\x41\x4C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x69\x73\x45\x64\x67\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x6C\x6F\x6E\x65\x43\x65\x6C\x6C\x73","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x70\x6F\x69\x6E\x74\x73","\x67\x65\x74\x53\x74\x79\x6C\x65","\x73\x65\x74\x53\x74\x79\x6C\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x53\x74\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x53\x74\x61\x74\x65","\x66\x61\x63\x74\x6F\x72\x79\x4D\x65\x74\x68\x6F\x64","\x69\x73\x43\x65\x6C\x6C\x46\x6F\x6C\x64\x61\x62\x6C\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x77\x69\x6D\x6C\x61\x6E\x65","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x63\x72\x65\x61\x74\x65\x47\x72\x6F\x75\x70\x43\x65\x6C\x6C","\x67\x72\x6F\x75\x70","\x67\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x46\x6F\x72\x43\x65\x6C\x6C","","\x69\x73\x56\x65\x72\x74\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x5F","\x6E\x6F\x64\x65\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x67\x65\x74","\x63\x6F\x6E\x76\x65\x72\x74\x56\x61\x6C\x75\x65\x54\x6F\x53\x74\x72\x69\x6E\x67","\x6F\x62\x6A\x65\x63\x74","\x6C\x61\x62\x65\x6C","\x67\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x65\x6C\x6C\x4C\x61\x62\x65\x6C\x43\x68\x61\x6E\x67\x65\x64","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x55\x73\x65\x72\x4F\x62\x6A\x65\x63\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6E\x6B","\x72\x65\x6D\x6F\x76\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x73\x65\x74\x56\x61\x6C\x75\x65","\x6D\x6F\x64\x65\x6C","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x6D\x61\x72\x6B\x65\x72","\x66\x69\x72\x73\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x75\x70\x64\x61\x74\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x67\x72\x61\x70\x68\x58","\x67\x72\x61\x70\x68\x59","\x67\x65\x74\x43\x65\x6C\x6C\x41\x74","\x73\x74\x61\x74\x65","\x73\x68\x61\x70\x65","\x6E\x6F\x64\x65","\x66\x69\x72\x65\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74","\x4D\x4F\x55\x53\x45\x5F\x44\x4F\x57\x4E","\x69\x73\x4D\x65\x6E\x75\x53\x68\x6F\x77\x69\x6E\x67","\x67\x65\x74\x43\x65\x6C\x6C","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x4D\x4F\x55\x53\x45\x5F\x55\x50","\x69\x73\x45\x64\x69\x74\x69\x6E\x67","\x67\x65\x74\x45\x76\x65\x6E\x74","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x4D\x4F\x55\x53\x45\x5F\x4D\x4F\x56\x45","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x72\x6F\x74\x61\x74\x69\x6F\x6E\x45\x6E\x61\x62\x6C\x65\x64","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x54\x6F\x70","\x62\x61\x73\x65\x53\x70\x61\x63\x69\x6E\x67\x42\x6F\x74\x74\x6F\x6D","\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x4C\x41\x42\x45\x4C\x5F\x48\x41\x4E\x44\x4C\x45\x5F\x53\x49\x5A\x45","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x67\x72\x69\x64\x53\x69\x7A\x65","\x73\x65\x6C\x65\x63\x74\x4F\x6E\x50\x6F\x70\x75\x70","\x75\x73\x65\x4C\x65\x66\x74\x42\x75\x74\x74\x6F\x6E\x46\x6F\x72\x50\x61\x6E\x6E\x69\x6E\x67","\x69\x73\x50\x61\x6E\x6E\x69\x6E\x67\x54\x72\x69\x67\x67\x65\x72","\x69\x67\x6E\x6F\x72\x65\x43\x65\x6C\x6C","\x69\x73\x43\x6F\x6E\x74\x72\x6F\x6C\x44\x6F\x77\x6E","\x69\x73\x53\x68\x69\x66\x74\x44\x6F\x77\x6E","\x75\x73\x65\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x6D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x64\x65\x6C\x61\x79\x65\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x43\x65\x6C\x6C\x73","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x64\x62\x6C\x43\x6C\x69\x63\x6B","\x63\x6F\x6E\x76\x65\x72\x74\x50\x6F\x69\x6E\x74","\x78","\x79","\x2F\x74\x6F\x75\x63\x68\x2D\x68\x61\x6E\x64\x6C\x65\x2E\x70\x6E\x67","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x69\x7A\x65\x72\x49\x6D\x61\x67\x65","\x73\x72\x63","\x2F\x74\x6F\x75\x63\x68\x2D\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x69\x6E\x69\x74","\x69\x73\x43\x65\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x49\x6D\x67","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x32\x39\x70\x78","\x68\x65\x69\x67\x68\x74","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x74\x69\x74\x6C\x65","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x70\x61\x64\x64\x69\x6E\x67","\x32\x70\x78","\x69\x73\x4D\x6F\x75\x73\x65\x44\x6F\x77\x6E","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x72\x65\x64\x72\x61\x77\x54\x6F\x6F\x6C\x73","\x72\x65\x64\x72\x61\x77","\x73\x69\x6E\x67\x6C\x65\x53\x69\x7A\x65\x72","\x6C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x78","\x74\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x2F\x63\x6F\x6E\x6E\x65\x63\x74\x6F\x72\x2E\x70\x6E\x67","\x63\x6F\x6E\x6E\x65\x63\x74\x49\x6D\x61\x67\x65","\x49\x53\x5F\x49\x45","\x49\x53\x5F\x53\x56\x47","\x64\x69\x76","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x65\x6E\x74\x65\x72","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x64\x69\x73\x70\x6C\x61\x79","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x69\x6E\x6C\x69\x6E\x65","\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E"];Graph= function(_0x71b2x1,_0x71b2x2,_0x71b2x3,_0x71b2x4){mxGraph[_0xdce8[0]](this,_0x71b2x1,_0x71b2x2,_0x71b2x3,_0x71b2x4);this[_0xdce8[1]](true);this[_0xdce8[2]](false);this[_0xdce8[3]](true);this[_0xdce8[4]](!mxClient.IS_TOUCH);this[_0xdce8[5]](false);this[_0xdce8[6]](false);this[_0xdce8[7]]= true;this[_0xdce8[8]]= false;this[_0xdce8[9]]= false;this[_0xdce8[11]][_0xdce8[10]]= true;this[_0xdce8[12]](false);this[_0xdce8[11]][_0xdce8[13]](false);this[_0xdce8[11]][_0xdce8[14]]= function(){return mxConnectionHandler[_0xdce8[16]][_0xdce8[14]][_0xdce8[15]](this,arguments)&& urlParams[_0xdce8[17]]!= _0xdce8[18]};this[_0xdce8[19]]= _0xdce8[20];if(_0x71b2x4== null){this[_0xdce8[21]]()};var _0x71b2x5= new mxRubberband(this);this[_0xdce8[22]]= function(){return _0x71b2x5};this[_0xdce8[29]][_0xdce8[28]](mxEvent.PAN_START,mxUtils[_0xdce8[27]](this,function(){this[_0xdce8[25]][_0xdce8[24]][_0xdce8[23]]= _0xdce8[26]}));this[_0xdce8[29]][_0xdce8[28]](mxEvent.PAN_END,mxUtils[_0xdce8[27]](this,function(){this[_0xdce8[25]][_0xdce8[24]][_0xdce8[23]]= _0xdce8[30]}));this[_0xdce8[31]]= function(_0x71b2x6){var _0x71b2x7=this[_0xdce8[33]][_0xdce8[32]](_0x71b2x6);var _0x71b2x8=(_0x71b2x7!= null)?_0x71b2x7[_0xdce8[24]]:this[_0xdce8[34]](_0x71b2x6);return _0x71b2x8[_0xdce8[35]]== _0xdce8[36]|| _0x71b2x8[_0xdce8[37]]== _0xdce8[38]};this[_0xdce8[40]][_0xdce8[39]]= function(_0x71b2x7){var _0x71b2x9=mxCellRenderer[_0xdce8[16]][_0xdce8[39]][_0xdce8[15]](this,arguments);if(_0x71b2x7[_0xdce8[24]][_0xdce8[37]]== _0xdce8[38]&& _0x71b2x7[_0xdce8[24]][_0xdce8[35]]!= 1){_0x71b2x9= mxUtils[_0xdce8[41]](_0x71b2x9,false)};return _0x71b2x9};this[_0xdce8[42]]= function(_0x71b2x6){return false};this[_0xdce8[11]][_0xdce8[43]]= 16;var _0x71b2xa=this[_0xdce8[11]][_0xdce8[44]];this[_0xdce8[11]][_0xdce8[44]]= function(_0x71b2xb,_0x71b2x7){if(_0x71b2x7== null){if(!this[_0xdce8[46]][_0xdce8[29]][_0xdce8[45]]){_0x71b2x5[_0xdce8[49]](_0x71b2xb[_0xdce8[47]](),_0x71b2xb[_0xdce8[48]]());this[_0xdce8[46]][_0xdce8[29]][_0xdce8[50]]= false}}else {if(tapAndHoldStartsConnection){_0x71b2xa[_0xdce8[15]](this,arguments)}else {if(this[_0xdce8[46]][_0xdce8[52]](_0x71b2x7[_0xdce8[51]])&& this[_0xdce8[46]][_0xdce8[53]]()> 1){this[_0xdce8[46]][_0xdce8[54]](_0x71b2x7[_0xdce8[51]])}}}};if(touchStyle){this[_0xdce8[55]]()}};mxUtils[_0xdce8[56]](Graph,mxGraph);Graph[_0xdce8[16]][_0xdce8[57]]= null;Graph[_0xdce8[16]][_0xdce8[58]]= null;Graph[_0xdce8[16]][_0xdce8[21]]= function(){var _0x71b2xc=mxUtils[_0xdce8[61]](STYLE_PATH+ _0xdce8[60])[_0xdce8[59]]();var _0x71b2xd= new mxCodec(_0x71b2xc[_0xdce8[62]]);_0x71b2xd[_0xdce8[64]](_0x71b2xc,this[_0xdce8[63]]())};Graph[_0xdce8[16]][_0xdce8[65]]= function(_0x71b2xe){if(_0x71b2xe!= null){var _0x71b2x7=this[_0xdce8[33]][_0xdce8[32]](_0x71b2xe);var _0x71b2x8=(_0x71b2x7!= null)?_0x71b2x7[_0xdce8[24]]:this[_0xdce8[34]](_0x71b2xe);if(_0x71b2x8!= null){var _0x71b2xf=mxUtils[_0xdce8[66]](_0x71b2x8,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL);var _0x71b2x10=(_0x71b2xf== mxConstants[_0xdce8[67]])?mxConstants[_0xdce8[68]]:mxConstants[_0xdce8[67]];this[_0xdce8[69]](mxConstants.STYLE_ELBOW,_0x71b2x10,[_0x71b2xe])}}};Graph[_0xdce8[16]][_0xdce8[70]]= function(_0x71b2x6){if(_0x71b2x6!= null&& this[_0xdce8[72]]()[_0xdce8[71]](_0x71b2x6)){var _0x71b2x11=this[_0xdce8[72]]()[_0xdce8[73]]([_0x71b2x6])[0];if(_0x71b2x11[_0xdce8[74]]!= null){_0x71b2x11[_0xdce8[74]][_0xdce8[75]]= null};var _0x71b2x8=_0x71b2x11[_0xdce8[76]]();_0x71b2x8= mxUtils[_0xdce8[77]](_0x71b2x8,mxConstants.STYLE_ENTRY_X,null);_0x71b2x8= mxUtils[_0xdce8[77]](_0x71b2x8,mxConstants.STYLE_ENTRY_Y,null);_0x71b2x8= mxUtils[_0xdce8[77]](_0x71b2x8,mxConstants.STYLE_EXIT_X,null);_0x71b2x8= mxUtils[_0xdce8[77]](_0x71b2x8,mxConstants.STYLE_EXIT_Y,null);_0x71b2x11[_0xdce8[77]](_0x71b2x8);this[_0xdce8[11]][_0xdce8[78]]= function(_0x71b2xb){return this[_0xdce8[46]][_0xdce8[33]][_0xdce8[79]](_0x71b2x11)};this[_0xdce8[11]][_0xdce8[80]]= function(){return this[_0xdce8[46]][_0xdce8[73]]([_0x71b2x11])[0]}}};Graph[_0xdce8[16]][_0xdce8[81]]= function(_0x71b2x6){return this[_0xdce8[82]]&& this[_0xdce8[83]](_0x71b2x6)};Graph[_0xdce8[16]][_0xdce8[84]]= function(_0x71b2x6){return this[_0xdce8[83]](_0x71b2x6)};Graph[_0xdce8[16]][_0xdce8[85]]= function(){var _0x71b2x12=mxGraph[_0xdce8[16]][_0xdce8[85]][_0xdce8[15]](this,arguments);_0x71b2x12[_0xdce8[77]](_0xdce8[86]);return _0x71b2x12};Graph[_0xdce8[16]][_0xdce8[87]]= function(_0x71b2x6){var _0x71b2x13=_0xdce8[88];if(this[_0xdce8[72]]()[_0xdce8[89]](_0x71b2x6)){_0x71b2x13+= mxResources[_0xdce8[93]](_0xdce8[90]+ _0x71b2x6[_0xdce8[92]][_0xdce8[91]])|| _0xdce8[88]}else {if(this[_0xdce8[72]]()[_0xdce8[71]](_0x71b2x6)){_0x71b2x13= mxGraph[_0xdce8[16]][_0xdce8[87]][_0xdce8[15]](this,arguments)}};return _0x71b2x13};Graph[_0xdce8[16]][_0xdce8[94]]= function(_0x71b2x6){if(_0x71b2x6[_0xdce8[92]]!= null&& typeof (_0x71b2x6[_0xdce8[92]])== _0xdce8[95]){return _0x71b2x6[_0xdce8[92]][_0xdce8[97]](_0xdce8[96])};return mxGraph[_0xdce8[16]][_0xdce8[94]][_0xdce8[15]](this,arguments)};Graph[_0xdce8[16]][_0xdce8[98]]= function(_0x71b2x6,_0x71b2x10,_0x71b2x14){if(_0x71b2x6[_0xdce8[92]]!= null&& typeof (_0x71b2x6[_0xdce8[92]])== _0xdce8[95]){var _0x71b2x15=_0x71b2x6[_0xdce8[92]][_0xdce8[99]](true);_0x71b2x15[_0xdce8[100]](_0xdce8[96],_0x71b2x10);_0x71b2x10= _0x71b2x15};mxGraph[_0xdce8[16]][_0xdce8[98]][_0xdce8[15]](this,arguments)};Graph[_0xdce8[16]][_0xdce8[101]]= function(_0x71b2x6,_0x71b2x16){var _0x71b2x10=null;if(_0x71b2x6[_0xdce8[92]]!= null&& typeof (_0x71b2x6[_0xdce8[92]])== _0xdce8[95]){_0x71b2x10= _0x71b2x6[_0xdce8[92]][_0xdce8[99]](true)}else {var _0x71b2x17=mxUtils[_0xdce8[102]]();_0x71b2x10= _0x71b2x17[_0xdce8[104]](_0xdce8[103]);_0x71b2x10[_0xdce8[100]](_0xdce8[96],_0x71b2x6[_0xdce8[92]])};if(_0x71b2x16!= null&& _0x71b2x16[_0xdce8[105]]> 0){_0x71b2x10[_0xdce8[100]](_0xdce8[106],_0x71b2x16)}else {_0x71b2x10[_0xdce8[107]](_0xdce8[106])};this[_0xdce8[109]][_0xdce8[108]](_0x71b2x6,_0x71b2x10)};Graph[_0xdce8[16]][_0xdce8[110]]= function(_0x71b2x6){if(_0x71b2x6[_0xdce8[92]]!= null&& typeof (_0x71b2x6[_0xdce8[92]])== _0xdce8[95]){return _0x71b2x6[_0xdce8[92]][_0xdce8[97]](_0xdce8[106])};return null};Graph[_0xdce8[16]][_0xdce8[55]]= function(){this[_0xdce8[11]][_0xdce8[112]][_0xdce8[111]]= function(){return this[_0xdce8[46]][_0xdce8[11]][_0xdce8[113]]!= null};this[_0xdce8[28]](mxEvent.START_EDITING,function(_0x71b2x18,_0x71b2x19){this[_0xdce8[29]][_0xdce8[114]]()});var _0x71b2x1a=false;var _0x71b2x1b=null;this[_0xdce8[115]]= function(_0x71b2xb){mxGraph[_0xdce8[16]][_0xdce8[115]][_0xdce8[15]](this,arguments);if(_0x71b2xb[_0xdce8[32]]()== null){var _0x71b2x6=this[_0xdce8[118]](_0x71b2xb[_0xdce8[116]],_0x71b2xb[_0xdce8[117]]);if(this[_0xdce8[72]]()[_0xdce8[71]](_0x71b2x6)){_0x71b2xb[_0xdce8[119]]= this[_0xdce8[33]][_0xdce8[32]](_0x71b2x6);if(_0x71b2xb[_0xdce8[119]]!= null&& _0x71b2xb[_0xdce8[119]][_0xdce8[120]]!= null){this[_0xdce8[25]][_0xdce8[24]][_0xdce8[23]]= _0x71b2xb[_0xdce8[119]][_0xdce8[120]][_0xdce8[121]][_0xdce8[24]][_0xdce8[23]]}}};if(_0x71b2xb[_0xdce8[32]]()== null){this[_0xdce8[25]][_0xdce8[24]][_0xdce8[23]]= _0xdce8[30]}};this[_0xdce8[122]]= function(_0x71b2x1c,_0x71b2xb,_0x71b2x18){if(_0x71b2x1c== mxEvent[_0xdce8[123]]){if(!this[_0xdce8[29]][_0xdce8[124]]()){_0x71b2x1b= _0x71b2xb[_0xdce8[125]]();_0x71b2x1a= (_0x71b2x1b!= null)?this[_0xdce8[52]](_0x71b2x1b):this[_0xdce8[126]]()}else {_0x71b2x1a= false;_0x71b2x1b= null}}else {if(_0x71b2x1c== mxEvent[_0xdce8[127]]){if(_0x71b2x1a&& !this[_0xdce8[128]]()){if(!this[_0xdce8[29]][_0xdce8[124]]()){var _0x71b2x1d=mxEvent[_0xdce8[130]](_0x71b2xb[_0xdce8[129]]());var _0x71b2x1e=mxEvent[_0xdce8[131]](_0x71b2xb[_0xdce8[129]]());this[_0xdce8[29]][_0xdce8[132]](_0x71b2x1d+ 16,_0x71b2x1e,_0x71b2x1b,_0x71b2xb[_0xdce8[129]]())};_0x71b2x1a= false;_0x71b2x1b= null;_0x71b2xb[_0xdce8[133]]();return};_0x71b2x1a= false;_0x71b2x1b= null}};mxGraph[_0xdce8[16]][_0xdce8[122]][_0xdce8[15]](this,arguments);if(_0x71b2x1c== mxEvent[_0xdce8[134]]&& _0x71b2xb[_0xdce8[135]]()){_0x71b2x1a= false;_0x71b2x1b= null}}};(function(){mxVertexHandler[_0xdce8[16]][_0xdce8[136]]= true;mxText[_0xdce8[16]][_0xdce8[137]]= 5;mxText[_0xdce8[16]][_0xdce8[138]]= 1;if(touchStyle){mxConstants[_0xdce8[139]]= 16;mxConstants[_0xdce8[140]]= 7;if(mxClient[_0xdce8[141]]){mxVertexHandler[_0xdce8[16]][_0xdce8[142]]= 4;mxEdgeHandler[_0xdce8[16]][_0xdce8[142]]= 6;Graph[_0xdce8[16]][_0xdce8[142]]= 14;Graph[_0xdce8[16]][_0xdce8[143]]= 20;mxPanningHandler[_0xdce8[16]][_0xdce8[144]]= false;mxPanningHandler[_0xdce8[16]][_0xdce8[145]]= true;mxPanningHandler[_0xdce8[16]][_0xdce8[146]]= function(_0x71b2xb){var _0x71b2x19=_0x71b2xb[_0xdce8[129]]();return (this[_0xdce8[145]]&& (this[_0xdce8[147]]|| _0x71b2xb[_0xdce8[32]]()== null))|| (mxEvent[_0xdce8[148]](_0x71b2x19)&& mxEvent[_0xdce8[149]](_0x71b2x19))|| (this[_0xdce8[150]]&& mxEvent[_0xdce8[151]](_0x71b2x19))}};var _0x71b2x1f=mxGraphHandler[_0xdce8[16]][_0xdce8[152]];mxGraphHandler[_0xdce8[16]][_0xdce8[152]]= function(_0x71b2x18,_0x71b2xb){_0x71b2x1f[_0xdce8[15]](this,arguments);if(this[_0xdce8[46]][_0xdce8[52]](_0x71b2xb[_0xdce8[125]]())&& this[_0xdce8[46]][_0xdce8[53]]()> 1){this[_0xdce8[153]]= false}};Graph[_0xdce8[16]][_0xdce8[154]]= function(_0x71b2x1){this[_0xdce8[155]]= new mxTooltipHandler(this);this[_0xdce8[155]][_0xdce8[156]](false);this[_0xdce8[157]]= new mxSelectionCellsHandler(this);this[_0xdce8[29]]= new mxPanningHandler(this);this[_0xdce8[29]][_0xdce8[158]]= false;this[_0xdce8[11]]= new mxConnectionHandler(this);this[_0xdce8[11]][_0xdce8[156]](false);this[_0xdce8[159]]= new mxGraphHandler(this)};mxConnectionHandler[_0xdce8[16]][_0xdce8[160]]= function(_0x71b2xe,_0x71b2x20){if(touchStyle&& _0x71b2x20!= null){this[_0xdce8[46]][_0xdce8[161]](_0x71b2x20)}else {this[_0xdce8[46]][_0xdce8[161]](_0x71b2xe)}};var _0x71b2x21=mxGraph[_0xdce8[16]][_0xdce8[162]];Graph[_0xdce8[16]][_0xdce8[162]]= function(_0x71b2x19,_0x71b2x6){if(_0x71b2x6== null){var _0x71b2x22=mxUtils[_0xdce8[163]](this[_0xdce8[25]],mxEvent[_0xdce8[130]](_0x71b2x19),mxEvent[_0xdce8[131]](_0x71b2x19));_0x71b2x6= this[_0xdce8[118]](_0x71b2x22[_0xdce8[164]],_0x71b2x22[_0xdce8[165]])};_0x71b2x21[_0xdce8[0]](this,_0x71b2x19,_0x71b2x6)};var _0x71b2x23= new mxImage(IMAGE_PATH+ _0xdce8[166],16,16);mxVertexHandler[_0xdce8[16]][_0xdce8[167]]= _0x71b2x23;mxEdgeHandler[_0xdce8[16]][_0xdce8[167]]= _0x71b2x23;mxOutline[_0xdce8[16]][_0xdce8[168]]= _0x71b2x23; new Image()[_0xdce8[169]]= _0x71b2x23[_0xdce8[169]];var _0x71b2x24=IMAGE_PATH+ _0xdce8[170];var _0x71b2x25=mxVertexHandler[_0xdce8[16]][_0xdce8[171]];mxVertexHandler[_0xdce8[16]][_0xdce8[171]]= function(){_0x71b2x25[_0xdce8[15]](this,arguments);if(showConnectorImg&& this[_0xdce8[46]][_0xdce8[11]][_0xdce8[111]]()&& this[_0xdce8[46]][_0xdce8[172]](this[_0xdce8[119]][_0xdce8[51]])&& !this[_0xdce8[46]][_0xdce8[84]](this[_0xdce8[119]][_0xdce8[51]])&& this[_0xdce8[46]][_0xdce8[53]]()== 1){this[_0xdce8[173]]= mxUtils[_0xdce8[174]](_0x71b2x24);this[_0xdce8[173]][_0xdce8[24]][_0xdce8[23]]= _0xdce8[26];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[175]]= _0xdce8[176];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[177]]= _0xdce8[176];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[178]]= _0xdce8[179];if(!mxClient[_0xdce8[141]]){this[_0xdce8[173]][_0xdce8[100]](_0xdce8[180],mxResources[_0xdce8[93]](_0xdce8[17]));mxEvent[_0xdce8[181]](this[_0xdce8[173]],this[_0xdce8[46]],this[_0xdce8[119]])};this[_0xdce8[173]][_0xdce8[24]][_0xdce8[182]]= _0xdce8[183];mxEvent[_0xdce8[185]](this[_0xdce8[173]],mxUtils[_0xdce8[27]](this,function(_0x71b2x19){this[_0xdce8[46]][_0xdce8[29]][_0xdce8[114]]();var _0x71b2x22=mxUtils[_0xdce8[163]](this[_0xdce8[46]][_0xdce8[25]],mxEvent[_0xdce8[130]](_0x71b2x19),mxEvent[_0xdce8[131]](_0x71b2x19));this[_0xdce8[46]][_0xdce8[11]][_0xdce8[49]](this[_0xdce8[119]],_0x71b2x22[_0xdce8[164]],_0x71b2x22[_0xdce8[165]]);this[_0xdce8[46]][_0xdce8[184]]= true;mxEvent[_0xdce8[133]](_0x71b2x19)}));this[_0xdce8[46]][_0xdce8[25]][_0xdce8[186]](this[_0xdce8[173]])};this[_0xdce8[187]]()};var _0x71b2x26=mxVertexHandler[_0xdce8[16]][_0xdce8[188]];mxVertexHandler[_0xdce8[16]][_0xdce8[188]]= function(){_0x71b2x26[_0xdce8[15]](this);this[_0xdce8[187]]()};mxVertexHandler[_0xdce8[16]][_0xdce8[187]]= function(){if(this[_0xdce8[119]]!= null&& this[_0xdce8[173]]!= null){if(mxVertexHandler[_0xdce8[16]][_0xdce8[189]]){this[_0xdce8[173]][_0xdce8[24]][_0xdce8[190]]= (this[_0xdce8[119]][_0xdce8[164]]+ this[_0xdce8[119]][_0xdce8[175]]- this[_0xdce8[173]][_0xdce8[191]]/ 2)+ _0xdce8[192];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[193]]= (this[_0xdce8[119]][_0xdce8[165]]- this[_0xdce8[173]][_0xdce8[194]]/ 2)+ _0xdce8[192]}else {this[_0xdce8[173]][_0xdce8[24]][_0xdce8[190]]= (this[_0xdce8[119]][_0xdce8[164]]+ this[_0xdce8[119]][_0xdce8[175]]+ mxConstants[_0xdce8[139]]/ 2+ 4)+ _0xdce8[192];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[193]]= (this[_0xdce8[119]][_0xdce8[165]]+ (this[_0xdce8[119]][_0xdce8[177]]- this[_0xdce8[173]][_0xdce8[194]])/ 2)+ _0xdce8[192]}}};var _0x71b2x27=mxVertexHandler[_0xdce8[16]][_0xdce8[195]];mxVertexHandler[_0xdce8[16]][_0xdce8[195]]= function(_0x71b2x18,_0x71b2xb){_0x71b2x27[_0xdce8[15]](this,arguments);if(this[_0xdce8[173]]!= null){this[_0xdce8[173]][_0xdce8[197]][_0xdce8[196]](this[_0xdce8[173]]);this[_0xdce8[173]]= null}}; new Image()[_0xdce8[169]]= _0x71b2x24}else {var _0x71b2x28= new mxImage(IMAGE_PATH+ _0xdce8[198],15,15);mxConnectionHandler[_0xdce8[16]][_0xdce8[199]]= _0x71b2x28; new Image()[_0xdce8[169]]= _0x71b2x28[_0xdce8[169]];if(urlParams[_0xdce8[17]]== _0xdce8[18]){var _0x71b2x28= new mxImage(IMAGE_PATH+ _0xdce8[198],15,15);var _0x71b2x25=mxVertexHandler[_0xdce8[16]][_0xdce8[171]];mxVertexHandler[_0xdce8[16]][_0xdce8[171]]= function(){_0x71b2x25[_0xdce8[15]](this,arguments);if(showConnectorImg&& this[_0xdce8[46]][_0xdce8[11]][_0xdce8[111]]()&& this[_0xdce8[46]][_0xdce8[172]](this[_0xdce8[119]][_0xdce8[51]])&& !this[_0xdce8[46]][_0xdce8[84]](this[_0xdce8[119]][_0xdce8[51]])&& this[_0xdce8[46]][_0xdce8[53]]()== 1){if(mxClient[_0xdce8[200]]&& !mxClient[_0xdce8[201]]){this[_0xdce8[173]]= document[_0xdce8[104]](_0xdce8[202]);this[_0xdce8[173]][_0xdce8[24]][_0xdce8[203]]= _0xdce8[204]+ _0x71b2x28[_0xdce8[169]]+ _0xdce8[205];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[206]]= _0xdce8[207];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[208]]= _0xdce8[209];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[175]]= (_0x71b2x28[_0xdce8[175]]+ 4)+ _0xdce8[192];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[177]]= (_0x71b2x28[_0xdce8[177]]+ 4)+ _0xdce8[192];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[210]]= (mxClient[_0xdce8[211]])?_0xdce8[212]:_0xdce8[213]}else {this[_0xdce8[173]]= mxUtils[_0xdce8[174]](_0x71b2x28[_0xdce8[169]]);this[_0xdce8[173]][_0xdce8[24]][_0xdce8[175]]= _0x71b2x28[_0xdce8[175]]+ _0xdce8[192];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[177]]= _0x71b2x28[_0xdce8[177]]+ _0xdce8[192]};this[_0xdce8[173]][_0xdce8[24]][_0xdce8[23]]= _0xdce8[26];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[178]]= _0xdce8[179];this[_0xdce8[173]][_0xdce8[100]](_0xdce8[180],mxResources[_0xdce8[93]](_0xdce8[17]));mxEvent[_0xdce8[181]](this[_0xdce8[173]],this[_0xdce8[46]],this[_0xdce8[119]]);this[_0xdce8[173]][_0xdce8[24]][_0xdce8[182]]= _0xdce8[183];mxEvent[_0xdce8[28]](this[_0xdce8[173]],_0xdce8[214],mxUtils[_0xdce8[27]](this,function(_0x71b2x19){this[_0xdce8[46]][_0xdce8[29]][_0xdce8[114]]();var _0x71b2x22=mxUtils[_0xdce8[163]](this[_0xdce8[46]][_0xdce8[25]],mxEvent[_0xdce8[130]](_0x71b2x19),mxEvent[_0xdce8[131]](_0x71b2x19));this[_0xdce8[46]][_0xdce8[11]][_0xdce8[49]](this[_0xdce8[119]],_0x71b2x22[_0xdce8[164]],_0x71b2x22[_0xdce8[165]]);this[_0xdce8[46]][_0xdce8[184]]= true;mxEvent[_0xdce8[133]](_0x71b2x19)}));this[_0xdce8[46]][_0xdce8[25]][_0xdce8[186]](this[_0xdce8[173]])};this[_0xdce8[187]]()};var _0x71b2x26=mxVertexHandler[_0xdce8[16]][_0xdce8[188]];mxVertexHandler[_0xdce8[16]][_0xdce8[188]]= function(){_0x71b2x26[_0xdce8[15]](this);this[_0xdce8[187]]()};mxVertexHandler[_0xdce8[16]][_0xdce8[187]]= function(){if(this[_0xdce8[119]]!= null&& this[_0xdce8[173]]!= null){if(mxVertexHandler[_0xdce8[16]][_0xdce8[189]]){this[_0xdce8[173]][_0xdce8[24]][_0xdce8[190]]= (this[_0xdce8[119]][_0xdce8[164]]+ this[_0xdce8[119]][_0xdce8[175]]- this[_0xdce8[173]][_0xdce8[191]]/ 2)+ _0xdce8[192];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[193]]= (this[_0xdce8[119]][_0xdce8[165]]- this[_0xdce8[173]][_0xdce8[194]]/ 2)+ _0xdce8[192]}else {this[_0xdce8[173]][_0xdce8[24]][_0xdce8[190]]= (this[_0xdce8[119]][_0xdce8[164]]+ this[_0xdce8[119]][_0xdce8[175]]+ mxConstants[_0xdce8[139]]/ 2+ 2)+ _0xdce8[192];this[_0xdce8[173]][_0xdce8[24]][_0xdce8[193]]= (this[_0xdce8[119]][_0xdce8[165]]+ (this[_0xdce8[119]][_0xdce8[177]]- this[_0xdce8[173]][_0xdce8[194]])/ 2)+ _0xdce8[192]}}};var _0x71b2x27=mxVertexHandler[_0xdce8[16]][_0xdce8[195]];mxVertexHandler[_0xdce8[16]][_0xdce8[195]]= function(_0x71b2x18,_0x71b2xb){_0x71b2x27[_0xdce8[15]](this,arguments);if(this[_0xdce8[173]]!= null){this[_0xdce8[173]][_0xdce8[197]][_0xdce8[196]](this[_0xdce8[173]]);this[_0xdce8[173]]= null}}}}})() \ No newline at end of file diff --git a/public/assets/plugins/square/js/Menus.js b/public/assets/plugins/square/js/Menus.js index f6563c8..854b6c8 100644 --- a/public/assets/plugins/square/js/Menus.js +++ b/public/assets/plugins/square/js/Menus.js @@ -1,716 +1 @@ -/** - * $Id: Menus.js,v 1.13 2013-02-20 16:21:29 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Constructs a new graph editor - */ -Menus = function(editorUi) { - this.editorUi = editorUi; - this.menus = new Object(); - this.init(); - - // Pre-fetches checkmark image - new Image().src = IMAGE_PATH + '/checkmark.gif'; -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -Menus.prototype.init = function() { - var graph = this.editorUi.editor.graph; - - this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent) { - var fonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond', - 'Comic Sans MS', - 'Courier New', 'Georgia', 'Lucida Console', 'Tahoma' - ]; - - for (var i = 0; i < fonts.length; i++) { - var tr = this.styleChange(menu, fonts[i], [mxConstants.STYLE_FONTFAMILY], [ - fonts[i] - ], null, parent); - tr.firstChild.nextSibling.style.fontFamily = fonts[i]; - } - - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('custom'), '', mxConstants.DEFAULT_FONTFAMILY, - mxConstants.STYLE_FONTFAMILY, parent); - }))); - this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent) { - var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72]; - - for (var i = 0; i < sizes.length; i++) { - this.styleChange(menu, sizes[i], [mxConstants.STYLE_FONTSIZE], [sizes[i]], - null, parent); - } - - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('custom'), '(pt)', '12', - mxConstants.STYLE_FONTSIZE, parent); - }))); - this.put('linewidth', new Menu(mxUtils.bind(this, function(menu, parent) { - var sizes = [1, 2, 3, 4, 8, 12, 16, 24]; - - for (var i = 0; i < sizes.length; i++) { - this.styleChange(menu, sizes[i] + 'px', [mxConstants.STYLE_STROKEWIDTH], [ - sizes[i] - ], null, parent); - } - - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('custom'), '(px)', '1', - mxConstants.STYLE_STROKEWIDTH, parent); - }))); - this.put('line', new Menu(mxUtils.bind(this, function(menu, parent) { - this.styleChange(menu, mxResources.get('straight'), [mxConstants.STYLE_EDGE], [ - null - ], null, parent); - this.styleChange(menu, mxResources.get('entityRelation'), [mxConstants.STYLE_EDGE], [ - 'entityRelationEdgeStyle' - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('horizontal'), [mxConstants.STYLE_EDGE, - mxConstants.STYLE_ELBOW - ], ['elbowEdgeStyle', 'horizontal'], null, parent); - this.styleChange(menu, mxResources.get('vertical'), [mxConstants.STYLE_EDGE, - mxConstants.STYLE_ELBOW - ], ['elbowEdgeStyle', 'vertical'], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('manual'), [mxConstants.STYLE_EDGE], [ - 'segmentEdgeStyle' - ], null, parent); - this.styleChange(menu, mxResources.get('automatic'), [mxConstants.STYLE_EDGE], [ - 'orthogonalEdgeStyle' - ], null, parent); - }))); - this.put('lineend', new Menu(mxUtils.bind(this, function(menu, parent) { - this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_CLASSIC - ], null, parent); - this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_OPEN - ], null, parent); - this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_BLOCK - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_OVAL - ], null, parent); - this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_DIAMOND - ], null, parent); - this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.ARROW_DIAMOND_THIN - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_ENDARROW], [ - mxConstants.NONE - ], null, parent); - menu.addSeparator(parent); - menu.addItem(mxResources.get('transparent'), null, function() { - graph.toggleCellStyles('endFill', true); - }, parent, null, true); - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE, - mxConstants.STYLE_ENDSIZE, parent); - }))); - this.put('linestart', new Menu(mxUtils.bind(this, function(menu, parent) { - this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_CLASSIC - ], null, parent); - this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_OPEN - ], null, parent); - this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_BLOCK - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_OVAL - ], null, parent); - this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_DIAMOND - ], null, parent); - this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.ARROW_DIAMOND_THIN - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_STARTARROW], [ - mxConstants.NONE - ], null, parent); - menu.addSeparator(parent); - menu.addItem(mxResources.get('transparent'), null, function() { - graph.toggleCellStyles('startFill', true); - }, parent, null, true); - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('size'), '(px)', mxConstants.DEFAULT_MARKERSIZE, - mxConstants.STYLE_STARTSIZE, parent); - }))); - this.put('spacing', new Menu(mxUtils.bind(this, function(menu, parent) { - // Uses shadow action and line menu to analyze selection - var vertexSelected = this.editorUi.actions.get('shadow').enabled; - var edgeSelected = this.get('line').enabled; - - if (vertexSelected || menu.showDisabled) { - this.promptChange(menu, mxResources.get('top'), '(px)', '0', - mxConstants.STYLE_SPACING_TOP, parent, vertexSelected); - this.promptChange(menu, mxResources.get('right'), '(px)', '0', - mxConstants.STYLE_SPACING_RIGHT, parent, vertexSelected); - this.promptChange(menu, mxResources.get('bottom'), '(px)', '0', - mxConstants.STYLE_SPACING_BOTTOM, parent, vertexSelected); - this.promptChange(menu, mxResources.get('left'), '(px)', '0', - mxConstants.STYLE_SPACING_LEFT, parent, vertexSelected); - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('global'), '(px)', '0', - mxConstants.STYLE_SPACING, parent, vertexSelected); - this.promptChange(menu, mxResources.get('perimeter'), '(px)', '0', - mxConstants.STYLE_PERIMETER_SPACING, parent, vertexSelected); - } - - if (edgeSelected || menu.showDisabled) { - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('sourceSpacing'), '(px)', '0', - mxConstants.STYLE_SOURCE_PERIMETER_SPACING, parent, edgeSelected); - this.promptChange(menu, mxResources.get('targetSpacing'), '(px)', '0', - mxConstants.STYLE_TARGET_PERIMETER_SPACING, parent, edgeSelected); - } - }))); - this.put('format', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItem(menu, 'style', parent); - }))); - this.put('text', new Menu(mxUtils.bind(this, function(menu, parent) { - var enabled = this.get('text').enabled; - menu.addSeparator(parent); - this.addSubmenu('fontFamily', menu, parent); - this.addSubmenu('fontSize', menu, parent); - this.addMenuItems(menu, ['-', 'bold', 'italic', 'underline', '-'], - parent); - this.addSubmenu('alignment', menu, parent); - this.addMenuItem(menu, 'wordWrap', parent); - menu.addSeparator(parent); - this.promptChange(menu, mxResources.get('textOpacity'), '(%)', '100', - mxConstants.STYLE_TEXT_OPACITY, parent, enabled); - menu.addItem(mxResources.get('hide'), null, function() { - graph.toggleCellStyles(mxConstants.STYLE_NOLABEL, false); - }, parent, null, enabled); - }))); - this.put('alignment', new Menu(mxUtils.bind(this, function(menu, parent) { - this.styleChange(menu, mxResources.get('leftAlign'), [mxConstants.STYLE_ALIGN], [ - mxConstants.ALIGN_LEFT - ], null, parent); - this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_ALIGN], [ - mxConstants.ALIGN_CENTER - ], null, parent); - this.styleChange(menu, mxResources.get('rightAlign'), [mxConstants.STYLE_ALIGN], [ - mxConstants.ALIGN_RIGHT - ], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('topAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [ - mxConstants.ALIGN_TOP - ], null, parent); - this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_ALIGN], [ - mxConstants.ALIGN_MIDDLE - ], null, parent); - this.styleChange(menu, mxResources.get('bottomAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [ - mxConstants.ALIGN_BOTTOM - ], null, parent); - menu.addSeparator(parent); - this.addSubmenu('position', menu, parent); - this.addSubmenu('spacing', menu, parent); - menu.addSeparator(parent); - var enabled = this.get('text').enabled; - menu.addItem(mxResources.get('vertical'), null, function() { - graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true); - }, parent, null, enabled); - }))); - this.put('position', new Menu(mxUtils.bind(this, function(menu, parent) { - this.styleChange(menu, mxResources.get('left'), [mxConstants.STYLE_LABEL_POSITION, - mxConstants.STYLE_ALIGN - ], [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_RIGHT], null, parent); - this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_LABEL_POSITION, - mxConstants.STYLE_ALIGN - ], [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_CENTER], null, parent); - this.styleChange(menu, mxResources.get('right'), [mxConstants.STYLE_LABEL_POSITION, - mxConstants.STYLE_ALIGN - ], [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_LEFT], null, parent); - menu.addSeparator(parent); - this.styleChange(menu, mxResources.get('top'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, - mxConstants.STYLE_VERTICAL_ALIGN - ], [mxConstants.ALIGN_TOP, mxConstants.ALIGN_BOTTOM], null, parent); - this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, - mxConstants.STYLE_VERTICAL_ALIGN - ], [mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_MIDDLE], null, parent); - this.styleChange(menu, mxResources.get('bottom'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, - mxConstants.STYLE_VERTICAL_ALIGN - ], [mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_TOP], null, parent); - }))); - this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent) { - menu.addItem(mxResources.get('flipH'), null, function() { - graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false); - }, parent); - menu.addItem(mxResources.get('flipV'), null, function() { - graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false); - }, parent); - this.addMenuItems(menu, ['-', 'tilt', 'rotation'], parent); - }))); - this.put('align', new Menu(mxUtils.bind(this, function(menu, parent) { - menu.addItem(mxResources.get('leftAlign'), null, function() { - graph.alignCells(mxConstants.ALIGN_LEFT); - }, parent); - menu.addItem(mxResources.get('center'), null, function() { - graph.alignCells(mxConstants.ALIGN_CENTER); - }, parent); - menu.addItem(mxResources.get('rightAlign'), null, function() { - graph.alignCells(mxConstants.ALIGN_RIGHT); - }, parent); - menu.addSeparator(parent); - menu.addItem(mxResources.get('topAlign'), null, function() { - graph.alignCells(mxConstants.ALIGN_TOP); - }, parent); - menu.addItem(mxResources.get('middle'), null, function() { - graph.alignCells(mxConstants.ALIGN_MIDDLE); - }, parent); - menu.addItem(mxResources.get('bottomAlign'), null, function() { - graph.alignCells(mxConstants.ALIGN_BOTTOM); - }, parent); - }))); - this.put('layout', new Menu(mxUtils.bind(this, function(menu, parent) { - // menu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function() - // { - // if (!graph.isSelectionEmpty()) - // { - // var layout = new mxCompactTreeLayout(graph, true); - // layout.edgeRouting = false; - // layout.levelDistance = 30; - // this.editorUi.executeLayout(layout, true, true); - // } - // }), parent); - // menu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function() - // { - // if (!graph.isSelectionEmpty()) - // { - // var layout = new mxCompactTreeLayout(graph, false); - // layout.edgeRouting = false; - // layout.levelDistance = 30; - // this.editorUi.executeLayout(layout, true, true); - // } - // }), parent); - // menu.addSeparator(parent); - menu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this, - function() { - var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST); - this.editorUi.executeLayout(layout, true, true); - }), parent); - menu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this, - function() { - var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH); - this.editorUi.executeLayout(layout, true, true); - }), parent); - //menu.addSeparator(parent); - // menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function() - // { - // var layout = new mxFastOrganicLayout(graph); - // this.editorUi.executeLayout(layout, true, true); - // }), parent); - // menu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function() - // { - // var layout = new mxCircleLayout(graph); - // this.editorUi.executeLayout(layout, true, true, graph.getSelectionCells()); - // }), parent); - }))); - this.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-', - 'expand', 'collapse' - ], parent); - }))); - this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent); - //this.addSubmenu('direction', menu, parent); - this.addSubmenu('layout', menu, parent); - //this.addSubmenu('align', menu, parent); - menu.addSeparator(parent); - //this.addSubmenu('navigation', menu, parent); - this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup'], - parent); - //this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'autosize'], parent); - }))); - this.put('view', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['actualSize'], parent); - menu.addSeparator(); - var scales = [0.25, 0.5, 0.75, 1, 2, 4]; - - for (var i = 0; i < scales.length; i++) { - (function(scale) { - menu.addItem((scale * 100) + '%', null, function() { - graph.zoomTo(scale); - }, parent); - })(scales[i]); - } - - this.addMenuItems(menu, ['-', 'zoomIn', 'zoomOut', '-', 'fitWindow', - 'customZoom', '-', 'fitPage', 'fitPageWidth' - ], parent); - }))); - this.put('file', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', 'publish', - '-', 'variable', '-', 'import', 'export', '-', 'editFile', 'description', '-', - 'print' - ], parent); - }))); - this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste', - 'delete', '-', 'duplicate', '-', - 'selectVertices', 'selectEdges', 'selectAll' - ]); - }))); - this.put('help', new Menu(mxUtils.bind(this, function(menu, parent) { - this.addMenuItems(menu, ['help', '-', 'about']); - }))); -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -Menus.prototype.put = function(name, menu) { - this.menus[name] = menu; -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -Menus.prototype.get = function(name) { - return this.menus[name]; -}; - -/** - * Adds the given submenu. - */ -Menus.prototype.addSubmenu = function(name, menu, parent) { - var enabled = this.get(name).enabled; - - if (menu.showDisabled || enabled) { - var submenu = menu.addItem(mxResources.get(name), null, null, parent, null, - enabled); - this.addMenu(name, menu, submenu); - } -}; - -/** - * Adds the label menu items to the given menu and parent. - */ -Menus.prototype.addMenu = function(name, popupMenu, parent) { - var menu = this.get(name); - - if (menu != null && (popupMenu.showDisabled || menu.enabled)) { - this.get(name).execute(popupMenu, parent); - } -}; - -/** - * Adds a style change item to the given menu. - */ -Menus.prototype.styleChange = function(menu, label, keys, values, sprite, - parent) { - return menu.addItem(label, null, mxUtils.bind(this, function() { - var graph = this.editorUi.editor.graph; - - graph.getModel().beginUpdate(); - try { - for (var i = 0; i < keys.length; i++) { - graph.setCellStyles(keys[i], values[i]); - } - } finally { - graph.getModel().endUpdate(); - } - }), parent, sprite); -}; - -/** - * Adds a style change item with a prompt to the given menu. - */ -Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, - parent, enabled) { - return menu.addItem(label, null, mxUtils.bind(this, function() { - var graph = this.editorUi.editor.graph; - var value = defaultValue; - var state = graph.getView().getState(graph.getSelectionCell()); - - if (state != null) { - value = state.style[key] || value; - } - - value = mxUtils.prompt(mxResources.get('enterValue') + ((hint.length > 0) ? - (' ' + hint) : ''), value); - - if (value != null && value.length > 0) { - graph.setCellStyles(key, value); - } - }), parent, null, enabled); -}; - -/** - * Creates the keyboard event handler for the current graph and history. - */ -Menus.prototype.addMenuItem = function(menu, key, parent) { - var action = this.editorUi.actions.get(key); - - if (action != null && (menu.showDisabled || action.enabled)) { - var item = menu.addItem(action.label, null, action.funct, parent, null, - action.enabled); - - // Adds checkmark image - if (action.toggleAction && action.isSelected()) { - this.addCheckmark(item); - } - - this.addShortcut(item, action); - - return item; - } - - return null; -}; - -/** - * Adds a checkmark to the given menuitem. - */ -Menus.prototype.addShortcut = function(item, action) { - if (action.shortcut != null) { - var td = item.firstChild.nextSibling.nextSibling; - var span = document.createElement('span'); - span.style.color = 'gray'; - mxUtils.write(span, action.shortcut); - td.appendChild(span); - } -}; - -/** - * Adds a checkmark to the given menuitem. - */ -Menus.prototype.addCheckmark = function(item) { - var td = item.firstChild.nextSibling; - td.style.backgroundImage = 'url(' + IMAGE_PATH + '/checkmark.gif)'; - td.style.backgroundRepeat = 'no-repeat'; - td.style.backgroundPosition = '2px 50%'; -}; - -/** - * Creates the keyboard event handler for the current graph and history. - */ -Menus.prototype.addMenuItems = function(menu, keys, parent) { - for (var i = 0; i < keys.length; i++) { - if (keys[i] == '-') { - menu.addSeparator(parent); - } else { - this.addMenuItem(menu, keys[i], parent); - } - } -}; - -/** - * Creates the keyboard event handler for the current graph and history. - */ -Menus.prototype.createPopupMenu = function(menu, cell, evt) { - var graph = this.editorUi.editor.graph; - menu.smartSeparators = true; - - if (graph.isSelectionEmpty()) { - this.addMenuItems(menu, ['undo', 'redo', '-', 'paste', '-']); - } else { - this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate']); - - if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(graph.getSelectionCell())) { - this.addMenuItems(menu, ['setAsDefaultEdge']); - } - - menu.addSeparator(); - } - - if (graph.getSelectionCount() > 0) { - this.addMenuItems(menu, ['toFront', 'toBack', '-']); - - if (graph.getModel().isEdge(graph.getSelectionCell())) { - var isWaypoint = false; - var cell = graph.getSelectionCell(); - - if (cell != null && graph.getModel().isEdge(cell)) { - var handler = graph.selectionCellsHandler.getHandler(cell); - - if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends - .length > 2) { - var index = handler.getHandleForEvent(new mxMouseEvent(evt)); - - // Configures removeWaypoint action before execution - var rmWaypointAction = this.editorUi.actions.get('removeWaypoint'); - rmWaypointAction.handler = handler; - rmWaypointAction.index = index; - - isWaypoint = index > 0 && index < handler.bends.length; - } - } - - this.addMenuItems(menu, ['-', (isWaypoint) ? 'removeWaypoint' : - 'addWaypoint' - ]); - } else if (graph.getSelectionCount() > 1) { - menu.addSeparator(); - this.addMenuItems(menu, ['group']); - } - - menu.addSeparator(); - - if (graph.getSelectionCount() == 1) { - var link = graph.getLinkForCell(graph.getSelectionCell()); - - if (link != null) { - this.addMenuItems(menu, ['openLink']); - } - } - } else { - this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-', - 'selectAll' - ]); - } -}; - -/** - * Creates the keyboard event handler for the current graph and history. - */ -Menus.prototype.createMenubar = function(container) { - var menubar = new Menubar(this.editorUi, container); - var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange', - 'help' - ]; - - for (var i = 0; i < menus.length; i++) { - menubar.addMenu(mxResources.get(menus[i]), this.get(menus[i]).funct); - } - - return menubar; -}; - -/** - * Construcs a new menubar for the given editor. - */ -function Menubar(editorUi, container) { - this.editorUi = editorUi; - this.container = container; - - // Global handler to hide the current menu - mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) { - this.hideMenu(); - })); -}; - -/** - * Adds the menubar elements. - */ -Menubar.prototype.hideMenu = function() { - if (this.currentMenu != null) { - this.currentMenu.hideMenu(); - } -}; - -/** - * Adds a submenu to this menubar. - */ -Menubar.prototype.addMenu = function(label, funct) { - var elt = document.createElement('a'); - elt.setAttribute('href', 'javascript:void(0);'); - elt.className = 'geItem'; - mxUtils.write(elt, label); - - this.addMenuHandler(elt, funct); - this.container.appendChild(elt); - - return elt; -}; - -/** - * Adds a handler for showing a menu in the given element. - */ -Menubar.prototype.addMenuHandler = function(elt, funct) { - if (funct != null) { - var show = true; - - var clickHandler = mxUtils.bind(this, function(evt) { - if (show && elt.enabled == null || elt.enabled) { - this.editorUi.editor.graph.panningHandler.hideMenu(); - var menu = new mxPopupMenu(funct); - menu.div.className += ' geMenubarMenu'; - menu.smartSeparators = true; - menu.showDisabled = true; - menu.autoExpand = true; - - // Disables autoexpand and destroys menu when hidden - menu.hideMenu = mxUtils.bind(this, function() { - mxPopupMenu.prototype.hideMenu.apply(menu, arguments); - menu.destroy(); - this.currentMenu = null; - this.currentElt = null; - }); - - // Added width of the page-sidebar - var x = elt.offsetLeft + document.getElementById('page-sidebar').offsetWidth + - 22; - // Added static height of the page-navbar - var y = elt.offsetTop + elt.offsetHeight + 140; - - menu.popup(x, y, null, evt); - - //menu.popup(elt.offsetLeft + 4, elt.offsetTop + elt.offsetHeight + 4, null, evt); - this.currentMenu = menu; - this.currentElt = elt; - } - - show = true; - mxEvent.consume(evt); - }); - - // Shows menu automatically while in expanded state - mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) { - if (this.currentMenu != null && this.currentElt != elt) { - this.hideMenu(); - clickHandler(evt); - } - })); - - // Hides menu if already showing - mxEvent.addListener(elt, 'mousedown', mxUtils.bind(this, function() { - show = this.currentElt != elt; - })); - - mxEvent.addListener(elt, 'click', clickHandler); - } -}; - -/** - * Constructs a new action for the given parameters. - */ -function Menu(funct, enabled) { - mxEventSource.call(this); - this.funct = funct; - this.enabled = (enabled != null) ? enabled : true; -}; - -// Menu inherits from mxEventSource -mxUtils.extend(Menu, mxEventSource); - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Menu.prototype.setEnabled = function(value) { - if (this.enabled != value) { - this.enabled = value; - this.fireEvent(new mxEventObject('stateChanged')); - } -}; - -/** - * Sets the enabled state of the action and fires a stateChanged event. - */ -Menu.prototype.execute = function(menu, parent) { - this.funct(menu, parent); -}; +var _0x334e=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x6D\x65\x6E\x75\x73","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x56\x65\x72\x64\x61\x6E\x61","\x54\x69\x6D\x65\x73\x20\x4E\x65\x77\x20\x52\x6F\x6D\x61\x6E","\x47\x61\x72\x61\x6D\x6F\x6E\x64","\x43\x6F\x6D\x69\x63\x20\x53\x61\x6E\x73\x20\x4D\x53","\x43\x6F\x75\x72\x69\x65\x72\x20\x4E\x65\x77","\x47\x65\x6F\x72\x67\x69\x61","\x4C\x75\x63\x69\x64\x61\x20\x43\x6F\x6E\x73\x6F\x6C\x65","\x54\x61\x68\x6F\x6D\x61","\x6C\x65\x6E\x67\x74\x68","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x73\x74\x79\x6C\x65\x43\x68\x61\x6E\x67\x65","\x73\x74\x79\x6C\x65","\x6E\x65\x78\x74\x53\x69\x62\x6C\x69\x6E\x67","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D","\x67\x65\x74","","\x70\x72\x6F\x6D\x70\x74\x43\x68\x61\x6E\x67\x65","\x62\x69\x6E\x64","\x70\x75\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x28\x70\x74\x29","\x31\x32","\x6C\x69\x6E\x65\x77\x69\x64\x74\x68","\x70\x78","\x53\x54\x59\x4C\x45\x5F\x53\x54\x52\x4F\x4B\x45\x57\x49\x44\x54\x48","\x28\x70\x78\x29","\x31","\x6C\x69\x6E\x65","\x73\x74\x72\x61\x69\x67\x68\x74","\x53\x54\x59\x4C\x45\x5F\x45\x44\x47\x45","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E","\x65\x6E\x74\x69\x74\x79\x52\x65\x6C\x61\x74\x69\x6F\x6E\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x53\x54\x59\x4C\x45\x5F\x45\x4C\x42\x4F\x57","\x65\x6C\x62\x6F\x77\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x76\x65\x72\x74\x69\x63\x61\x6C","\x6D\x61\x6E\x75\x61\x6C","\x73\x65\x67\x6D\x65\x6E\x74\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x61\x75\x74\x6F\x6D\x61\x74\x69\x63","\x6F\x72\x74\x68\x6F\x67\x6F\x6E\x61\x6C\x45\x64\x67\x65\x53\x74\x79\x6C\x65","\x6C\x69\x6E\x65\x65\x6E\x64","\x63\x6C\x61\x73\x73\x69\x63","\x53\x54\x59\x4C\x45\x5F\x45\x4E\x44\x41\x52\x52\x4F\x57","\x41\x52\x52\x4F\x57\x5F\x43\x4C\x41\x53\x53\x49\x43","\x6F\x70\x65\x6E\x41\x72\x72\x6F\x77","\x41\x52\x52\x4F\x57\x5F\x4F\x50\x45\x4E","\x62\x6C\x6F\x63\x6B","\x41\x52\x52\x4F\x57\x5F\x42\x4C\x4F\x43\x4B","\x6F\x76\x61\x6C","\x41\x52\x52\x4F\x57\x5F\x4F\x56\x41\x4C","\x64\x69\x61\x6D\x6F\x6E\x64","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44","\x64\x69\x61\x6D\x6F\x6E\x64\x54\x68\x69\x6E","\x41\x52\x52\x4F\x57\x5F\x44\x49\x41\x4D\x4F\x4E\x44\x5F\x54\x48\x49\x4E","\x6E\x6F\x6E\x65","\x4E\x4F\x4E\x45","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x65\x6E\x64\x46\x69\x6C\x6C","\x74\x6F\x67\x67\x6C\x65\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x61\x64\x64\x49\x74\x65\x6D","\x73\x69\x7A\x65","\x6C\x69\x6E\x65\x73\x74\x61\x72\x74","\x53\x54\x59\x4C\x45\x5F\x53\x54\x41\x52\x54\x41\x52\x52\x4F\x57","\x73\x74\x61\x72\x74\x46\x69\x6C\x6C","\x73\x70\x61\x63\x69\x6E\x67","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x68\x61\x64\x6F\x77","\x61\x63\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x74\x6F\x70","\x30","\x72\x69\x67\x68\x74","\x62\x6F\x74\x74\x6F\x6D","\x6C\x65\x66\x74","\x67\x6C\x6F\x62\x61\x6C","\x70\x65\x72\x69\x6D\x65\x74\x65\x72","\x73\x6F\x75\x72\x63\x65\x53\x70\x61\x63\x69\x6E\x67","\x74\x61\x72\x67\x65\x74\x53\x70\x61\x63\x69\x6E\x67","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D","\x74\x65\x78\x74","\x61\x64\x64\x53\x75\x62\x6D\x65\x6E\x75","\x2D","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x61\x64\x64\x4D\x65\x6E\x75\x49\x74\x65\x6D\x73","\x61\x6C\x69\x67\x6E\x6D\x65\x6E\x74","\x77\x6F\x72\x64\x57\x72\x61\x70","\x74\x65\x78\x74\x4F\x70\x61\x63\x69\x74\x79","\x28\x25\x29","\x31\x30\x30","\x68\x69\x64\x65","\x6C\x65\x66\x74\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x4C\x45\x46\x54","\x63\x65\x6E\x74\x65\x72","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x72\x69\x67\x68\x74\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x74\x6F\x70\x41\x6C\x69\x67\x6E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x41\x4C\x49\x47\x4E","\x41\x4C\x49\x47\x4E\x5F\x54\x4F\x50","\x6D\x69\x64\x64\x6C\x65","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x62\x6F\x74\x74\x6F\x6D\x41\x6C\x69\x67\x6E","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x53\x54\x59\x4C\x45\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x53\x54\x59\x4C\x45\x5F\x56\x45\x52\x54\x49\x43\x41\x4C\x5F\x4C\x41\x42\x45\x4C\x5F\x50\x4F\x53\x49\x54\x49\x4F\x4E","\x64\x69\x72\x65\x63\x74\x69\x6F\x6E","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x74\x69\x6C\x74","\x72\x6F\x74\x61\x74\x69\x6F\x6E","\x61\x6C\x69\x67\x6E","\x61\x6C\x69\x67\x6E\x43\x65\x6C\x6C\x73","\x6C\x61\x79\x6F\x75\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C\x46\x6C\x6F\x77","\x65\x78\x65\x63\x75\x74\x65\x4C\x61\x79\x6F\x75\x74","\x76\x65\x72\x74\x69\x63\x61\x6C\x46\x6C\x6F\x77","\x6E\x61\x76\x69\x67\x61\x74\x69\x6F\x6E","\x68\x6F\x6D\x65","\x65\x78\x69\x74\x47\x72\x6F\x75\x70","\x65\x6E\x74\x65\x72\x47\x72\x6F\x75\x70","\x65\x78\x70\x61\x6E\x64","\x63\x6F\x6C\x6C\x61\x70\x73\x65","\x61\x72\x72\x61\x6E\x67\x65","\x74\x6F\x46\x72\x6F\x6E\x74","\x74\x6F\x42\x61\x63\x6B","\x67\x72\x6F\x75\x70","\x75\x6E\x67\x72\x6F\x75\x70","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x47\x72\x6F\x75\x70","\x76\x69\x65\x77","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x25","\x7A\x6F\x6F\x6D\x54\x6F","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x66\x69\x74\x57\x69\x6E\x64\x6F\x77","\x63\x75\x73\x74\x6F\x6D\x5A\x6F\x6F\x6D","\x66\x69\x74\x50\x61\x67\x65","\x66\x69\x74\x50\x61\x67\x65\x57\x69\x64\x74\x68","\x66\x69\x6C\x65","\x6E\x65\x77","\x6F\x70\x65\x6E","\x73\x61\x76\x65","\x73\x61\x76\x65\x41\x73","\x70\x75\x62\x6C\x69\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x69\x6D\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x65\x64\x69\x74\x46\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x70\x72\x69\x6E\x74","\x65\x64\x69\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x75\x74","\x63\x6F\x70\x79","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x73\x65\x6C\x65\x63\x74\x56\x65\x72\x74\x69\x63\x65\x73","\x73\x65\x6C\x65\x63\x74\x45\x64\x67\x65\x73","\x73\x65\x6C\x65\x63\x74\x41\x6C\x6C","\x68\x65\x6C\x70","\x61\x62\x6F\x75\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x65\x78\x65\x63\x75\x74\x65","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x65\x6E\x74\x65\x72\x56\x61\x6C\x75\x65","\x20","\x70\x72\x6F\x6D\x70\x74","\x6C\x61\x62\x65\x6C","\x66\x75\x6E\x63\x74","\x74\x6F\x67\x67\x6C\x65\x41\x63\x74\x69\x6F\x6E","\x69\x73\x53\x65\x6C\x65\x63\x74\x65\x64","\x61\x64\x64\x43\x68\x65\x63\x6B\x6D\x61\x72\x6B","\x61\x64\x64\x53\x68\x6F\x72\x74\x63\x75\x74","\x73\x68\x6F\x72\x74\x63\x75\x74","\x73\x70\x61\x6E","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6F\x6C\x6F\x72","\x67\x72\x61\x79","\x77\x72\x69\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x2F\x63\x68\x65\x63\x6B\x6D\x61\x72\x6B\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x32\x70\x78\x20\x35\x30\x25","\x63\x72\x65\x61\x74\x65\x50\x6F\x70\x75\x70\x4D\x65\x6E\x75","\x73\x6D\x61\x72\x74\x53\x65\x70\x61\x72\x61\x74\x6F\x72\x73","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x6F\x75\x6E\x74","\x69\x73\x45\x64\x67\x65","\x73\x65\x74\x41\x73\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x72","\x73\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73\x48\x61\x6E\x64\x6C\x65\x72","\x62\x65\x6E\x64\x73","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x72\x65\x6D\x6F\x76\x65\x57\x61\x79\x70\x6F\x69\x6E\x74","\x68\x61\x6E\x64\x6C\x65\x72","\x69\x6E\x64\x65\x78","\x61\x64\x64\x57\x61\x79\x70\x6F\x69\x6E\x74","\x67\x65\x74\x4C\x69\x6E\x6B\x46\x6F\x72\x43\x65\x6C\x6C","\x6F\x70\x65\x6E\x4C\x69\x6E\x6B","\x63\x72\x65\x61\x74\x65\x4D\x65\x6E\x75\x62\x61\x72","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x49\x74\x65\x6D","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x64\x69\x76","\x20\x67\x65\x4D\x65\x6E\x75\x62\x61\x72\x4D\x65\x6E\x75","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x61\x70\x70\x6C\x79","\x64\x65\x73\x74\x72\x6F\x79","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x2D\x73\x69\x64\x65\x62\x61\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x63\x6C\x69\x63\x6B","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x66\x69\x72\x65\x45\x76\x65\x6E\x74"];Menus= function(_0x51f9x1){this[_0x334e[0]]= _0x51f9x1;this[_0x334e[1]]= new Object();this[_0x334e[2]](); new Image()[_0x334e[3]]= IMAGE_PATH+ _0x334e[4]};Menus[_0x334e[5]][_0x334e[2]]= function(){var _0x51f9x2=this[_0x334e[0]][_0x334e[7]][_0x334e[6]];this[_0x334e[30]](_0x334e[8], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){var _0x51f9x5=[_0x334e[9],_0x334e[10],_0x334e[11],_0x334e[12],_0x334e[13],_0x334e[14],_0x334e[15],_0x334e[16],_0x334e[17]];for(var _0x51f9x6=0;_0x51f9x6< _0x51f9x5[_0x334e[18]];_0x51f9x6++){var _0x51f9x7=this[_0x334e[20]](_0x51f9x3,_0x51f9x5[_0x51f9x6],[mxConstants[_0x334e[19]]],[_0x51f9x5[_0x51f9x6]],null,_0x51f9x4);_0x51f9x7[_0x334e[23]][_0x334e[22]][_0x334e[21]][_0x334e[8]]= _0x51f9x5[_0x51f9x6]};_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[25]),_0x334e[27],mxConstants.DEFAULT_FONTFAMILY,mxConstants.STYLE_FONTFAMILY,_0x51f9x4)})));this[_0x334e[30]](_0x334e[31], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){var _0x51f9x8=[6,8,9,10,11,12,14,18,24,36,48,72];for(var _0x51f9x6=0;_0x51f9x6< _0x51f9x8[_0x334e[18]];_0x51f9x6++){this[_0x334e[20]](_0x51f9x3,_0x51f9x8[_0x51f9x6],[mxConstants[_0x334e[32]]],[_0x51f9x8[_0x51f9x6]],null,_0x51f9x4)};_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[25]),_0x334e[33],_0x334e[34],mxConstants.STYLE_FONTSIZE,_0x51f9x4)})));this[_0x334e[30]](_0x334e[35], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){var _0x51f9x8=[1,2,3,4,8,12,16,24];for(var _0x51f9x6=0;_0x51f9x6< _0x51f9x8[_0x334e[18]];_0x51f9x6++){this[_0x334e[20]](_0x51f9x3,_0x51f9x8[_0x51f9x6]+ _0x334e[36],[mxConstants[_0x334e[37]]],[_0x51f9x8[_0x51f9x6]],null,_0x51f9x4)};_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[25]),_0x334e[38],_0x334e[39],mxConstants.STYLE_STROKEWIDTH,_0x51f9x4)})));this[_0x334e[30]](_0x334e[40], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[41]),[mxConstants[_0x334e[42]]],[null],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[43]),[mxConstants[_0x334e[42]]],[_0x334e[44]],null,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[45]),[mxConstants[_0x334e[42]],mxConstants[_0x334e[46]]],[_0x334e[47],_0x334e[45]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[48]),[mxConstants[_0x334e[42]],mxConstants[_0x334e[46]]],[_0x334e[47],_0x334e[48]],null,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[49]),[mxConstants[_0x334e[42]]],[_0x334e[50]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[51]),[mxConstants[_0x334e[42]]],[_0x334e[52]],null,_0x51f9x4)})));this[_0x334e[30]](_0x334e[53], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[54]),[mxConstants[_0x334e[55]]],[mxConstants[_0x334e[56]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[57]),[mxConstants[_0x334e[55]]],[mxConstants[_0x334e[58]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[59]),[mxConstants[_0x334e[55]]],[mxConstants[_0x334e[60]]],null,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[61]),[mxConstants[_0x334e[55]]],[mxConstants[_0x334e[62]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[63]),[mxConstants[_0x334e[55]]],[mxConstants[_0x334e[64]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[65]),[mxConstants[_0x334e[55]]],[mxConstants[_0x334e[66]]],null,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[67]),[mxConstants[_0x334e[55]]],[mxConstants[_0x334e[68]]],null,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[69]),null,function(){_0x51f9x2[_0x334e[71]](_0x334e[70],true)},_0x51f9x4,null,true);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[73]),_0x334e[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_ENDSIZE,_0x51f9x4)})));this[_0x334e[30]](_0x334e[74], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[54]),[mxConstants[_0x334e[75]]],[mxConstants[_0x334e[56]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[57]),[mxConstants[_0x334e[75]]],[mxConstants[_0x334e[58]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[59]),[mxConstants[_0x334e[75]]],[mxConstants[_0x334e[60]]],null,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[61]),[mxConstants[_0x334e[75]]],[mxConstants[_0x334e[62]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[63]),[mxConstants[_0x334e[75]]],[mxConstants[_0x334e[64]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[65]),[mxConstants[_0x334e[75]]],[mxConstants[_0x334e[66]]],null,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[67]),[mxConstants[_0x334e[75]]],[mxConstants[_0x334e[68]]],null,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[69]),null,function(){_0x51f9x2[_0x334e[71]](_0x334e[76],true)},_0x51f9x4,null,true);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[73]),_0x334e[38],mxConstants.DEFAULT_MARKERSIZE,mxConstants.STYLE_STARTSIZE,_0x51f9x4)})));this[_0x334e[30]](_0x334e[77], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){var _0x51f9x9=this[_0x334e[0]][_0x334e[80]][_0x334e[26]](_0x334e[79])[_0x334e[78]];var _0x51f9xa=this[_0x334e[26]](_0x334e[40])[_0x334e[78]];if(_0x51f9x9|| _0x51f9x3[_0x334e[81]]){this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[82]),_0x334e[38],_0x334e[83],mxConstants.STYLE_SPACING_TOP,_0x51f9x4,_0x51f9x9);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[84]),_0x334e[38],_0x334e[83],mxConstants.STYLE_SPACING_RIGHT,_0x51f9x4,_0x51f9x9);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[85]),_0x334e[38],_0x334e[83],mxConstants.STYLE_SPACING_BOTTOM,_0x51f9x4,_0x51f9x9);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[86]),_0x334e[38],_0x334e[83],mxConstants.STYLE_SPACING_LEFT,_0x51f9x4,_0x51f9x9);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[87]),_0x334e[38],_0x334e[83],mxConstants.STYLE_SPACING,_0x51f9x4,_0x51f9x9);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[88]),_0x334e[38],_0x334e[83],mxConstants.STYLE_PERIMETER_SPACING,_0x51f9x4,_0x51f9x9)};if(_0x51f9xa|| _0x51f9x3[_0x334e[81]]){_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[89]),_0x334e[38],_0x334e[83],mxConstants.STYLE_SOURCE_PERIMETER_SPACING,_0x51f9x4,_0x51f9xa);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[90]),_0x334e[38],_0x334e[83],mxConstants.STYLE_TARGET_PERIMETER_SPACING,_0x51f9x4,_0x51f9xa)}})));this[_0x334e[30]](_0x334e[91], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[92]](_0x51f9x3,_0x334e[21],_0x51f9x4)})));this[_0x334e[30]](_0x334e[93], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){var _0x51f9xb=this[_0x334e[26]](_0x334e[93])[_0x334e[78]];_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[94]](_0x334e[8],_0x51f9x3,_0x51f9x4);this[_0x334e[94]](_0x334e[31],_0x51f9x3,_0x51f9x4);this[_0x334e[99]](_0x51f9x3,[_0x334e[95],_0x334e[96],_0x334e[97],_0x334e[98],_0x334e[95]],_0x51f9x4);this[_0x334e[94]](_0x334e[100],_0x51f9x3,_0x51f9x4);this[_0x334e[92]](_0x51f9x3,_0x334e[101],_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[28]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[102]),_0x334e[103],_0x334e[104],mxConstants.STYLE_TEXT_OPACITY,_0x51f9x4,_0x51f9xb);_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[105]),null,function(){_0x51f9x2[_0x334e[71]](mxConstants.STYLE_NOLABEL,false)},_0x51f9x4,null,_0x51f9xb)})));this[_0x334e[30]](_0x334e[100], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[106]),[mxConstants[_0x334e[107]]],[mxConstants[_0x334e[108]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[109]),[mxConstants[_0x334e[107]]],[mxConstants[_0x334e[110]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[111]),[mxConstants[_0x334e[107]]],[mxConstants[_0x334e[112]]],null,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[113]),[mxConstants[_0x334e[114]]],[mxConstants[_0x334e[115]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[116]),[mxConstants[_0x334e[114]]],[mxConstants[_0x334e[117]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[118]),[mxConstants[_0x334e[114]]],[mxConstants[_0x334e[119]]],null,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[94]](_0x334e[120],_0x51f9x3,_0x51f9x4);this[_0x334e[94]](_0x334e[77],_0x51f9x3,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);var _0x51f9xb=this[_0x334e[26]](_0x334e[93])[_0x334e[78]];_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[48]),null,function(){_0x51f9x2[_0x334e[71]](mxConstants.STYLE_HORIZONTAL,true)},_0x51f9x4,null,_0x51f9xb)})));this[_0x334e[30]](_0x334e[120], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[86]),[mxConstants[_0x334e[121]],mxConstants[_0x334e[107]]],[mxConstants[_0x334e[108]],mxConstants[_0x334e[112]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[109]),[mxConstants[_0x334e[121]],mxConstants[_0x334e[107]]],[mxConstants[_0x334e[110]],mxConstants[_0x334e[110]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[84]),[mxConstants[_0x334e[121]],mxConstants[_0x334e[107]]],[mxConstants[_0x334e[112]],mxConstants[_0x334e[108]]],null,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[82]),[mxConstants[_0x334e[122]],mxConstants[_0x334e[114]]],[mxConstants[_0x334e[115]],mxConstants[_0x334e[119]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[116]),[mxConstants[_0x334e[122]],mxConstants[_0x334e[114]]],[mxConstants[_0x334e[117]],mxConstants[_0x334e[117]]],null,_0x51f9x4);this[_0x334e[20]](_0x51f9x3,mxResources[_0x334e[26]](_0x334e[85]),[mxConstants[_0x334e[122]],mxConstants[_0x334e[114]]],[mxConstants[_0x334e[119]],mxConstants[_0x334e[115]]],null,_0x51f9x4)})));this[_0x334e[30]](_0x334e[123], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[124]),null,function(){_0x51f9x2[_0x334e[71]](mxConstants.STYLE_FLIPH,false)},_0x51f9x4);_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[125]),null,function(){_0x51f9x2[_0x334e[71]](mxConstants.STYLE_FLIPV,false)},_0x51f9x4);this[_0x334e[99]](_0x51f9x3,[_0x334e[95],_0x334e[126],_0x334e[127]],_0x51f9x4)})));this[_0x334e[30]](_0x334e[128], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[106]),null,function(){_0x51f9x2[_0x334e[129]](mxConstants.ALIGN_LEFT)},_0x51f9x4);_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[109]),null,function(){_0x51f9x2[_0x334e[129]](mxConstants.ALIGN_CENTER)},_0x51f9x4);_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[111]),null,function(){_0x51f9x2[_0x334e[129]](mxConstants.ALIGN_RIGHT)},_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[113]),null,function(){_0x51f9x2[_0x334e[129]](mxConstants.ALIGN_TOP)},_0x51f9x4);_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[116]),null,function(){_0x51f9x2[_0x334e[129]](mxConstants.ALIGN_MIDDLE)},_0x51f9x4);_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[118]),null,function(){_0x51f9x2[_0x334e[129]](mxConstants.ALIGN_BOTTOM)},_0x51f9x4)})));this[_0x334e[30]](_0x334e[130], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[131]),null,mxUtils[_0x334e[29]](this,function(){var _0x51f9xc= new mxHierarchicalLayout(_0x51f9x2,mxConstants.DIRECTION_WEST);this[_0x334e[0]][_0x334e[132]](_0x51f9xc,true,true)}),_0x51f9x4);_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x334e[133]),null,mxUtils[_0x334e[29]](this,function(){var _0x51f9xc= new mxHierarchicalLayout(_0x51f9x2,mxConstants.DIRECTION_NORTH);this[_0x334e[0]][_0x334e[132]](_0x51f9xc,true,true)}),_0x51f9x4)})));this[_0x334e[30]](_0x334e[134], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[99]](_0x51f9x3,[_0x334e[135],_0x334e[95],_0x334e[136],_0x334e[137],_0x334e[95],_0x334e[138],_0x334e[139]],_0x51f9x4)})));this[_0x334e[30]](_0x334e[140], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[99]](_0x51f9x3,[_0x334e[141],_0x334e[142],_0x334e[95]],_0x51f9x4);this[_0x334e[94]](_0x334e[130],_0x51f9x3,_0x51f9x4);_0x51f9x3[_0x334e[24]](_0x51f9x4);this[_0x334e[99]](_0x51f9x3,[_0x334e[95],_0x334e[143],_0x334e[144],_0x334e[145]],_0x51f9x4)})));this[_0x334e[30]](_0x334e[146], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[99]](_0x51f9x3,[_0x334e[147]],_0x51f9x4);_0x51f9x3[_0x334e[24]]();var _0x51f9xd=[0.25,0.5,0.75,1,2,4];for(var _0x51f9x6=0;_0x51f9x6< _0x51f9xd[_0x334e[18]];_0x51f9x6++){(function(_0x51f9xe){_0x51f9x3[_0x334e[72]]((_0x51f9xe* 100)+ _0x334e[148],null,function(){_0x51f9x2[_0x334e[149]](_0x51f9xe)},_0x51f9x4)})(_0x51f9xd[_0x51f9x6])};this[_0x334e[99]](_0x51f9x3,[_0x334e[95],_0x334e[150],_0x334e[151],_0x334e[95],_0x334e[152],_0x334e[153],_0x334e[95],_0x334e[154],_0x334e[155]],_0x51f9x4)})));this[_0x334e[30]](_0x334e[156], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[99]](_0x51f9x3,[_0x334e[157],_0x334e[158],_0x334e[95],_0x334e[159],_0x334e[160],_0x334e[161],_0x334e[95],_0x334e[162],_0x334e[95],_0x334e[163],_0x334e[164],_0x334e[95],_0x334e[165],_0x334e[166],_0x334e[95],_0x334e[167]],_0x51f9x4)})));this[_0x334e[30]](_0x334e[168], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[99]](_0x51f9x3,[_0x334e[169],_0x334e[170],_0x334e[95],_0x334e[171],_0x334e[172],_0x334e[173],_0x334e[174],_0x334e[95],_0x334e[175],_0x334e[95],_0x334e[176],_0x334e[177],_0x334e[178]])})));this[_0x334e[30]](_0x334e[179], new Menu(mxUtils[_0x334e[29]](this,function(_0x51f9x3,_0x51f9x4){this[_0x334e[99]](_0x51f9x3,[_0x334e[179],_0x334e[95],_0x334e[180]])})))};Menus[_0x334e[5]][_0x334e[30]]= function(_0x51f9xf,_0x51f9x3){this[_0x334e[1]][_0x51f9xf]= _0x51f9x3};Menus[_0x334e[5]][_0x334e[26]]= function(_0x51f9xf){return this[_0x334e[1]][_0x51f9xf]};Menus[_0x334e[5]][_0x334e[94]]= function(_0x51f9xf,_0x51f9x3,_0x51f9x4){var _0x51f9xb=this[_0x334e[26]](_0x51f9xf)[_0x334e[78]];if(_0x51f9x3[_0x334e[81]]|| _0x51f9xb){var _0x51f9x10=_0x51f9x3[_0x334e[72]](mxResources[_0x334e[26]](_0x51f9xf),null,null,_0x51f9x4,null,_0x51f9xb);this[_0x334e[181]](_0x51f9xf,_0x51f9x3,_0x51f9x10)}};Menus[_0x334e[5]][_0x334e[181]]= function(_0x51f9xf,_0x51f9x11,_0x51f9x4){var _0x51f9x3=this[_0x334e[26]](_0x51f9xf);if(_0x51f9x3!= null&& (_0x51f9x11[_0x334e[81]]|| _0x51f9x3[_0x334e[78]])){this[_0x334e[26]](_0x51f9xf)[_0x334e[182]](_0x51f9x11,_0x51f9x4)}};Menus[_0x334e[5]][_0x334e[20]]= function(_0x51f9x3,_0x51f9x12,_0x51f9x13,_0x51f9x14,_0x51f9x15,_0x51f9x4){return _0x51f9x3[_0x334e[72]](_0x51f9x12,null,mxUtils[_0x334e[29]](this,function(){var _0x51f9x2=this[_0x334e[0]][_0x334e[7]][_0x334e[6]];_0x51f9x2[_0x334e[184]]()[_0x334e[183]]();try{for(var _0x51f9x6=0;_0x51f9x6< _0x51f9x13[_0x334e[18]];_0x51f9x6++){_0x51f9x2[_0x334e[185]](_0x51f9x13[_0x51f9x6],_0x51f9x14[_0x51f9x6])}}finally{_0x51f9x2[_0x334e[184]]()[_0x334e[186]]()}}),_0x51f9x4,_0x51f9x15)};Menus[_0x334e[5]][_0x334e[28]]= function(_0x51f9x3,_0x51f9x12,_0x51f9x16,_0x51f9x17,_0x51f9x18,_0x51f9x4,_0x51f9xb){return _0x51f9x3[_0x334e[72]](_0x51f9x12,null,mxUtils[_0x334e[29]](this,function(){var _0x51f9x2=this[_0x334e[0]][_0x334e[7]][_0x334e[6]];var _0x51f9x19=_0x51f9x17;var _0x51f9x1a=_0x51f9x2[_0x334e[189]]()[_0x334e[188]](_0x51f9x2[_0x334e[187]]());if(_0x51f9x1a!= null){_0x51f9x19= _0x51f9x1a[_0x334e[21]][_0x51f9x18]|| _0x51f9x19};_0x51f9x19= mxUtils[_0x334e[192]](mxResources[_0x334e[26]](_0x334e[190])+ ((_0x51f9x16[_0x334e[18]]> 0)?(_0x334e[191]+ _0x51f9x16):_0x334e[27]),_0x51f9x19);if(_0x51f9x19!= null&& _0x51f9x19[_0x334e[18]]> 0){_0x51f9x2[_0x334e[185]](_0x51f9x18,_0x51f9x19)}}),_0x51f9x4,null,_0x51f9xb)};Menus[_0x334e[5]][_0x334e[92]]= function(_0x51f9x3,_0x51f9x18,_0x51f9x4){var _0x51f9x1b=this[_0x334e[0]][_0x334e[80]][_0x334e[26]](_0x51f9x18);if(_0x51f9x1b!= null&& (_0x51f9x3[_0x334e[81]]|| _0x51f9x1b[_0x334e[78]])){var _0x51f9x1c=_0x51f9x3[_0x334e[72]](_0x51f9x1b[_0x334e[193]],null,_0x51f9x1b[_0x334e[194]],_0x51f9x4,null,_0x51f9x1b[_0x334e[78]]);if(_0x51f9x1b[_0x334e[195]]&& _0x51f9x1b[_0x334e[196]]()){this[_0x334e[197]](_0x51f9x1c)};this[_0x334e[198]](_0x51f9x1c,_0x51f9x1b);return _0x51f9x1c};return null};Menus[_0x334e[5]][_0x334e[198]]= function(_0x51f9x1c,_0x51f9x1b){if(_0x51f9x1b[_0x334e[199]]!= null){var _0x51f9x1d=_0x51f9x1c[_0x334e[23]][_0x334e[22]][_0x334e[22]];var _0x51f9x1e=document[_0x334e[201]](_0x334e[200]);_0x51f9x1e[_0x334e[21]][_0x334e[202]]= _0x334e[203];mxUtils[_0x334e[204]](_0x51f9x1e,_0x51f9x1b[_0x334e[199]]);_0x51f9x1d[_0x334e[205]](_0x51f9x1e)}};Menus[_0x334e[5]][_0x334e[197]]= function(_0x51f9x1c){var _0x51f9x1d=_0x51f9x1c[_0x334e[23]][_0x334e[22]];_0x51f9x1d[_0x334e[21]][_0x334e[206]]= _0x334e[207]+ IMAGE_PATH+ _0x334e[208];_0x51f9x1d[_0x334e[21]][_0x334e[209]]= _0x334e[210];_0x51f9x1d[_0x334e[21]][_0x334e[211]]= _0x334e[212]};Menus[_0x334e[5]][_0x334e[99]]= function(_0x51f9x3,_0x51f9x13,_0x51f9x4){for(var _0x51f9x6=0;_0x51f9x6< _0x51f9x13[_0x334e[18]];_0x51f9x6++){if(_0x51f9x13[_0x51f9x6]== _0x334e[95]){_0x51f9x3[_0x334e[24]](_0x51f9x4)}else {this[_0x334e[92]](_0x51f9x3,_0x51f9x13[_0x51f9x6],_0x51f9x4)}}};Menus[_0x334e[5]][_0x334e[213]]= function(_0x51f9x3,_0x51f9x1f,_0x51f9x20){var _0x51f9x2=this[_0x334e[0]][_0x334e[7]][_0x334e[6]];_0x51f9x3[_0x334e[214]]= true;if(_0x51f9x2[_0x334e[215]]()){this[_0x334e[99]](_0x51f9x3,[_0x334e[169],_0x334e[170],_0x334e[95],_0x334e[173],_0x334e[95]])}else {this[_0x334e[99]](_0x51f9x3,[_0x334e[174],_0x334e[95],_0x334e[171],_0x334e[172],_0x334e[95],_0x334e[175]]);if(_0x51f9x2[_0x334e[216]]()== 1&& _0x51f9x2[_0x334e[184]]()[_0x334e[217]](_0x51f9x2[_0x334e[187]]())){this[_0x334e[99]](_0x51f9x3,[_0x334e[218]])};_0x51f9x3[_0x334e[24]]()};if(_0x51f9x2[_0x334e[216]]()> 0){this[_0x334e[99]](_0x51f9x3,[_0x334e[141],_0x334e[142],_0x334e[95]]);if(_0x51f9x2[_0x334e[184]]()[_0x334e[217]](_0x51f9x2[_0x334e[187]]())){var _0x51f9x21=false;var _0x51f9x1f=_0x51f9x2[_0x334e[187]]();if(_0x51f9x1f!= null&& _0x51f9x2[_0x334e[184]]()[_0x334e[217]](_0x51f9x1f)){var _0x51f9x22=_0x51f9x2[_0x334e[220]][_0x334e[219]](_0x51f9x1f);if(_0x51f9x22 instanceof mxEdgeHandler&& _0x51f9x22[_0x334e[221]]!= null&& _0x51f9x22[_0x334e[221]][_0x334e[18]]> 2){var _0x51f9x23=_0x51f9x22[_0x334e[222]]( new mxMouseEvent(_0x51f9x20));var _0x51f9x24=this[_0x334e[0]][_0x334e[80]][_0x334e[26]](_0x334e[223]);_0x51f9x24[_0x334e[224]]= _0x51f9x22;_0x51f9x24[_0x334e[225]]= _0x51f9x23;_0x51f9x21= _0x51f9x23> 0&& _0x51f9x23< _0x51f9x22[_0x334e[221]][_0x334e[18]]}};this[_0x334e[99]](_0x51f9x3,[_0x334e[95],(_0x51f9x21)?_0x334e[223]:_0x334e[226]])}else {if(_0x51f9x2[_0x334e[216]]()> 1){_0x51f9x3[_0x334e[24]]();this[_0x334e[99]](_0x51f9x3,[_0x334e[143]])}};_0x51f9x3[_0x334e[24]]();if(_0x51f9x2[_0x334e[216]]()== 1){var _0x51f9x25=_0x51f9x2[_0x334e[227]](_0x51f9x2[_0x334e[187]]());if(_0x51f9x25!= null){this[_0x334e[99]](_0x51f9x3,[_0x334e[228]])}}}else {this[_0x334e[99]](_0x51f9x3,[_0x334e[95],_0x334e[176],_0x334e[177],_0x334e[95],_0x334e[178]])}};Menus[_0x334e[5]][_0x334e[229]]= function(_0x51f9x26){var _0x51f9x27= new Menubar(this[_0x334e[0]],_0x51f9x26);var _0x51f9x28=[_0x334e[156],_0x334e[168],_0x334e[146],_0x334e[91],_0x334e[93],_0x334e[140],_0x334e[179]];for(var _0x51f9x6=0;_0x51f9x6< _0x51f9x28[_0x334e[18]];_0x51f9x6++){_0x51f9x27[_0x334e[181]](mxResources[_0x334e[26]](_0x51f9x28[_0x51f9x6]),this[_0x334e[26]](_0x51f9x28[_0x51f9x6])[_0x334e[194]])};return _0x51f9x27};function Menubar(_0x51f9x1,_0x51f9x26){this[_0x334e[0]]= _0x51f9x1;this[_0x334e[230]]= _0x51f9x26;mxEvent[_0x334e[232]](document,mxUtils[_0x334e[29]](this,function(_0x51f9x20){this[_0x334e[231]]()}))}Menubar[_0x334e[5]][_0x334e[231]]= function(){if(this[_0x334e[233]]!= null){this[_0x334e[233]][_0x334e[231]]()}};Menubar[_0x334e[5]][_0x334e[181]]= function(_0x51f9x12,_0x51f9x2a){var _0x51f9x2b=document[_0x334e[201]](_0x334e[234]);_0x51f9x2b[_0x334e[237]](_0x334e[235],_0x334e[236]);_0x51f9x2b[_0x334e[238]]= _0x334e[239];mxUtils[_0x334e[204]](_0x51f9x2b,_0x51f9x12);this[_0x334e[240]](_0x51f9x2b,_0x51f9x2a);this[_0x334e[230]][_0x334e[205]](_0x51f9x2b);return _0x51f9x2b};Menubar[_0x334e[5]][_0x334e[240]]= function(_0x51f9x2b,_0x51f9x2a){if(_0x51f9x2a!= null){var _0x51f9x2c=true;var _0x51f9x2d=mxUtils[_0x334e[29]](this,function(_0x51f9x20){if(_0x51f9x2c&& _0x51f9x2b[_0x334e[78]]== null|| _0x51f9x2b[_0x334e[78]]){this[_0x334e[0]][_0x334e[7]][_0x334e[6]][_0x334e[241]][_0x334e[231]]();var _0x51f9x3= new mxPopupMenu(_0x51f9x2a);_0x51f9x3[_0x334e[242]][_0x334e[238]]+= _0x334e[243];_0x51f9x3[_0x334e[214]]= true;_0x51f9x3[_0x334e[81]]= true;_0x51f9x3[_0x334e[244]]= true;_0x51f9x3[_0x334e[231]]= mxUtils[_0x334e[29]](this,function(){mxPopupMenu[_0x334e[5]][_0x334e[231]][_0x334e[245]](_0x51f9x3,arguments);_0x51f9x3[_0x334e[246]]();this[_0x334e[233]]= null;this[_0x334e[247]]= null});var _0x51f9x2e=_0x51f9x2b[_0x334e[248]]+ document[_0x334e[251]](_0x334e[250])[_0x334e[249]]+ 22;var _0x51f9x2f=_0x51f9x2b[_0x334e[252]]+ _0x51f9x2b[_0x334e[253]]+ 140;_0x51f9x3[_0x334e[254]](_0x51f9x2e,_0x51f9x2f,null,_0x51f9x20);this[_0x334e[233]]= _0x51f9x3;this[_0x334e[247]]= _0x51f9x2b};_0x51f9x2c= true;mxEvent[_0x334e[255]](_0x51f9x20)});mxEvent[_0x334e[257]](_0x51f9x2b,_0x334e[256],mxUtils[_0x334e[29]](this,function(_0x51f9x20){if(this[_0x334e[233]]!= null&& this[_0x334e[247]]!= _0x51f9x2b){this[_0x334e[231]]();_0x51f9x2d(_0x51f9x20)}}));mxEvent[_0x334e[257]](_0x51f9x2b,_0x334e[258],mxUtils[_0x334e[29]](this,function(){_0x51f9x2c= this[_0x334e[247]]!= _0x51f9x2b}));mxEvent[_0x334e[257]](_0x51f9x2b,_0x334e[259],_0x51f9x2d)}};function Menu(_0x51f9x2a,_0x51f9xb){mxEventSource[_0x334e[260]](this);this[_0x334e[194]]= _0x51f9x2a;this[_0x334e[78]]= (_0x51f9xb!= null)?_0x51f9xb:true}mxUtils[_0x334e[261]](Menu,mxEventSource);Menu[_0x334e[5]][_0x334e[262]]= function(_0x51f9x19){if(this[_0x334e[78]]!= _0x51f9x19){this[_0x334e[78]]= _0x51f9x19;this[_0x334e[264]]( new mxEventObject(_0x334e[263]))}};Menu[_0x334e[5]][_0x334e[182]]= function(_0x51f9x3,_0x51f9x4){this[_0x334e[194]](_0x51f9x3,_0x51f9x4)} \ No newline at end of file diff --git a/public/assets/plugins/square/js/Shapes.js b/public/assets/plugins/square/js/Shapes.js index 42e13ca..581ed0c 100644 --- a/public/assets/plugins/square/js/Shapes.js +++ b/public/assets/plugins/square/js/Shapes.js @@ -1,1234 +1 @@ -/** - * $Id: Shapes.js,v 1.13 2013-02-02 06:44:30 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ - -/** - * Registers shapes. - */ -(function() -{ - // Cube Shape, supports size style - function CubeShape() { }; - CubeShape.prototype = new mxCylinder(); - CubeShape.prototype.constructor = CubeShape; - CubeShape.prototype.size = 20; - CubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size))); - - if (isForeground) - { - path.moveTo(s, h); - path.lineTo(s, s); - path.lineTo(0, 0); - path.moveTo(s, s); - path.lineTo(w, s); - path.end(); - } - else - { - path.moveTo(0, 0); - path.lineTo(w - s, 0); - path.lineTo(w, s); - path.lineTo(w, h); - path.lineTo(s, h); - path.lineTo(0, h - s); - path.lineTo(0, 0); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['cube'] = CubeShape; - - // Note Shape, supports size style - function NoteShape() { }; - NoteShape.prototype = new mxCylinder(); - NoteShape.prototype.constructor = NoteShape; - NoteShape.prototype.size = 30; - NoteShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size))); - - if (isForeground) - { - path.moveTo(w - s, 0); - path.lineTo(w - s, s); - path.lineTo(w, s); - path.end(); - } - else - { - path.moveTo(0, 0); - path.lineTo(w - s, 0); - path.lineTo(w, s); - path.lineTo(w, h); - path.lineTo(0, h); - path.lineTo(0, 0); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['note'] = NoteShape; - - // Folder Shape, supports tabWidth, tabHeight styles - function FolderShape() { }; - FolderShape.prototype = new mxCylinder(); - FolderShape.prototype.constructor = FolderShape; - FolderShape.prototype.tabWidth = 60; - FolderShape.prototype.tabHeight = 20; - FolderShape.prototype.tabPosition = 'right'; - FolderShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var tw = mxUtils.getValue(this.style, 'tabWidth', this.tabWidth); - var th = mxUtils.getValue(this.style, 'tabHeight', this.tabHeight); - var tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition); - var dx = Math.min(w, tw); - var dy = Math.min(h, th); - - if (isForeground) - { - if (tp == 'left') - { - path.moveTo(0, dy); - path.lineTo(dx, dy); - } - // Right is default - else - { - path.moveTo(w - dx, dy); - path.lineTo(w, dy); - } - - path.end(); - } - else - { - if (tp == 'left') - { - path.moveTo(0, 0); - path.lineTo(dx, 0); - path.lineTo(dx, dy); - path.lineTo(w, dy); - } - // Right is default - else - { - path.moveTo(0, dy); - path.lineTo(w - dx, dy); - path.lineTo(w - dx, 0); - path.lineTo(w, 0); - } - - path.lineTo(w, h); - path.lineTo(0, h); - path.lineTo(0, dy); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['folder'] = FolderShape; - - // Card Shape, supports size style - function CardShape() { }; - CardShape.prototype = new mxCylinder(); - CardShape.prototype.constructor = CardShape; - CardShape.prototype.size = 30; - CardShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size))); - - if (!isForeground) - { - path.moveTo(s, 0); - path.lineTo(w, 0); - path.lineTo(w, h); - path.lineTo(0, h); - path.lineTo(0, s); - path.lineTo(s, 0); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['card'] = CardShape; - - // Tape Shape, supports size style - function TapeShape() { }; - TapeShape.prototype = new mxCylinder(); - TapeShape.prototype.constructor = TapeShape; - TapeShape.prototype.size = 0.4; - TapeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var s = mxUtils.getValue(this.style, 'size', this.size); - var dy = h * s; - var fy = 1.4; - - if (!isForeground) - { - path.moveTo(0, dy / 2); - path.quadTo(w / 4, dy * fy, w / 2, dy / 2); - path.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2); - path.lineTo(w, h - dy / 2); - path.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2); - path.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2); - path.lineTo(0, dy / 2); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['tape'] = TapeShape; - - // Tape Shape, supports size style - function StepShape() { }; - StepShape.prototype = new mxCylinder(); - StepShape.prototype.constructor = StepShape; - StepShape.prototype.size = 0.2; - StepShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var s = w * mxUtils.getValue(this.style, 'size', this.size); - - if (!isForeground) - { - path.moveTo(0, 0); - path.lineTo(w - s, 0); - path.lineTo(w, h / 2); - path.lineTo(w - s, h); - path.lineTo(0, h); - path.lineTo(s, h / 2); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['step'] = StepShape; - - // Plus Shape - function PlusShape() - { - mxRectangleShape.call(this); - }; - mxUtils.extend(PlusShape, mxRectangleShape); - PlusShape.prototype.isHtmlAllowed = function() - { - return false; - }; - PlusShape.prototype.paintForeground = function(c, x, y, w, h) - { - var border = Math.min(w / 5, h / 5) + 1; - - c.begin(); - c.moveTo(x + w / 2, y + border); - c.lineTo(x + w / 2, y + h - border); - c.moveTo(x + border, y + h / 2); - c.lineTo(x + w - border, y + h / 2); - c.end(); - c.stroke(); - mxRectangleShape.prototype.paintForeground.apply(this, arguments); - }; - - mxCellRenderer.prototype.defaultShapes['plus'] = PlusShape; - - // CompositeShape - function ExtendedShape() - { - mxRectangleShape.call(this); - }; - mxUtils.extend(ExtendedShape, mxRectangleShape); - ExtendedShape.prototype.isHtmlAllowed = function() - { - return false; - }; - ExtendedShape.prototype.paintForeground = function(c, x, y, w, h) - { - if (this.style != null) - { - if (this.style['double'] == 1) - { - var inset = Math.max(2, this.strokewidth + 1); - - mxRectangleShape.prototype.paintBackground.call(this, c, x + inset, y + inset, w - 2 * inset, h - 2 * inset); - mxRectangleShape.prototype.paintForeground.apply(this, arguments); - - x += inset; - y += inset; - w -= 2 * inset; - h -= 2 * inset; - } - - c.setDashed(false); - - // Draws the symbols defined in the style. The symbols are - // numbered from 1...n. Possible postfixes are align, - // verticalAlign, spacing, arcSpacing, width, height - var counter = 0; - var shape = null; - - do - { - shape = mxCellRenderer.prototype.defaultShapes[this.style['symbol' + counter]]; - - if (shape != null) - { - var align = this.style['symbol' + counter + 'Align']; - var valign = this.style['symbol' + counter + 'VerticalAlign']; - var width = this.style['symbol' + counter + 'Width']; - var height = this.style['symbol' + counter + 'Height']; - var spacing = this.style['symbol' + counter + 'Spacing'] || 0; - var arcspacing = this.style['symbol' + counter + 'ArcSpacing']; - - if (arcspacing != null) - { - spacing += this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing; - } - - var x2 = x; - var y2 = y; - - if (align == mxConstants.ALIGN_CENTER) - { - x2 += (w - width) / 2; - } - else if (align == mxConstants.ALIGN_RIGHT) - { - x2 += w - width - spacing; - } - else - { - x2 += spacing; - } - - if (valign == mxConstants.ALIGN_MIDDLE) - { - y2 += (h - height) / 2; - } - else if (valign == mxConstants.ALIGN_BOTTOM) - { - y2 += h - height - spacing; - } - else - { - y2 += spacing; - } - - c.save(); - - // Small hack to pass style along into subshape - var tmp = new shape(); - // TODO: Clone style and override settings (eg. strokewidth) - tmp.style = this.style; - shape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height); - c.restore(); - } - - counter++; - } - while (shape != null); - } - }; - - mxCellRenderer.prototype.defaultShapes['ext'] = ExtendedShape; - - // Tape Shape, supports size style - function MessageShape() { }; - MessageShape.prototype = new mxCylinder(); - MessageShape.prototype.constructor = MessageShape; - MessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - if (isForeground) - { - path.moveTo(0, 0); - path.lineTo(w / 2, h / 2); - path.lineTo(w, 0); - path.end(); - } - else - { - path.moveTo(0, 0); - path.lineTo(w, 0); - path.lineTo(w, h); - path.lineTo(0, h); - path.close(); - } - }; - - mxCellRenderer.prototype.defaultShapes['message'] = MessageShape; - - // New Actor Shape - function UmlActorShape() { }; - UmlActorShape.prototype = new mxCylinder(); - UmlActorShape.prototype.constructor = UmlActorShape; - UmlActorShape.prototype.addPipe = true; - UmlActorShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var width = w / 3; - var height = h / 4; - - if (!isForeground) - { - path.moveTo(w / 2, height); - path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0); - path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height); - path.close(); - - path.moveTo(w / 2, height); - path.lineTo(w / 2, 2 * h / 3); - - // Arms - path.moveTo(w / 2, h / 3); - path.lineTo(0, h / 3); - path.moveTo(w / 2, h / 3); - path.lineTo(w, h / 3); - - // Legs - path.moveTo(w / 2, 2 * h / 3); - path.lineTo(0, h); - path.moveTo(w / 2, 2 * h / 3); - path.lineTo(w, h); - path.end(); - } - }; - - // Replaces existing actor shape - mxCellRenderer.prototype.defaultShapes['umlActor'] = UmlActorShape; - - // New Actor Shape - function LollipopShape() { }; - LollipopShape.prototype = new mxCylinder(); - LollipopShape.prototype.constructor = LollipopShape; - LollipopShape.prototype.size = 10; - LollipopShape.prototype.addPipe = true; - LollipopShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var ss = mxUtils.getValue(this.style, 'size', this.size); - var width = ss * 2 / 3; - var height = ss; - - if (!isForeground) - { - path.moveTo(w / 2, height); - path.curveTo(w / 2 - width, height, w / 2 - width, 0, w / 2, 0); - path.curveTo(w / 2 + width, 0, w / 2 + width, height, w / 2, height); - path.close(); - - path.moveTo(w / 2, height); - path.lineTo(w / 2, h); - path.end(); - } - }; - - // Replaces existing actor shape - mxCellRenderer.prototype.defaultShapes['lollipop'] = LollipopShape; - - // Folder Shape, supports tabWidth, tabHeight styles - function ComponentShape() { }; - ComponentShape.prototype = new mxCylinder(); - ComponentShape.prototype.constructor = ComponentShape; - ComponentShape.prototype.jettyWidth = 32; - ComponentShape.prototype.jettyHeight = 12; - ComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground) - { - var dx = mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth); - var dy = mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight); - var x0 = dx / 2; - var x1 = x0 + dx / 2; - var y0 = 0.3 * h - dy / 2; - var y1 = 0.7 * h - dy / 2; - - if (isForeground) - { - path.moveTo(x0, y0); - path.lineTo(x1, y0); - path.lineTo(x1, y0 + dy); - path.lineTo(x0, y0 + dy); - path.moveTo(x0, y1); - path.lineTo(x1, y1); - path.lineTo(x1, y1 + dy); - path.lineTo(x0, y1 + dy); - path.end(); - } - else - { - path.moveTo(x0, 0); - path.lineTo(w, 0); - path.lineTo(w, h); - path.lineTo(x0, h); - path.lineTo(x0, y1 + dy); - path.lineTo(0, y1 + dy); - path.lineTo(0, y1); - path.lineTo(x0, y1); - path.lineTo(x0, y0 + dy); - path.lineTo(0, y0 + dy); - path.lineTo(0, y0); - path.lineTo(x0, y0); - path.close(); - path.end(); - } - }; - - mxCellRenderer.prototype.defaultShapes['component'] = ComponentShape; - - // State Shapes derives from double ellipse - function StateShape() { }; - StateShape.prototype = new mxDoubleEllipse(); - StateShape.prototype.constructor = StateShape; - StateShape.prototype.outerStroke = true; - StateShape.prototype.paintVertexShape = function(c, x, y, w, h) - { - var inset = Math.min(4, Math.min(w / 5, h / 5)); - - if (w > 0 && h > 0) - { - c.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset); - c.fillAndStroke(); - } - - c.setShadow(false); - - if (this.outerStroke) - { - c.ellipse(x, y, w, h); - c.stroke(); - } - }; - - mxCellRenderer.prototype.defaultShapes['endState'] = StateShape; - - function StartStateShape() { }; - StartStateShape.prototype = new StateShape(); - StartStateShape.prototype.constructor = StartStateShape; - StartStateShape.prototype.outerStroke = false; - - mxCellRenderer.prototype.defaultShapes['startState'] = StartStateShape; - - // Image export for state shapes - var imageExportInitShapes = mxImageExport.prototype.initShapes; - mxImageExport.prototype.initShapes = function() - { - imageExportInitShapes.apply(this, arguments); - - function createStateShape(outerStroke) - { - return { - drawShape: function(canvas, state, bounds, background) - { - var x = bounds.x; - var y = bounds.y; - var w = bounds.width; - var h = bounds.height; - - if (background) - { - var inset = Math.min(4, Math.min(w / 5, h / 5)); - x += inset; - y += inset; - w -= 2 * inset; - h -= 2 * inset; - - if (w > 0 && h > 0) - { - canvas.ellipse(x, y, w, h); - } - - return true; - } - else - { - canvas.fillAndStroke(); - - if (outerStroke) - { - canvas.ellipse(x, y, w, h); - canvas.stroke(); - } - } - } - }; - }; - - this.shapes['endState'] = createStateShape(true); - this.shapes['startState'] = createStateShape(false); - }; - - // Defines custom edge shape - function LinkShape() - { - mxArrow.call(this); - }; - mxUtils.extend(LinkShape, mxArrow); - LinkShape.prototype.paintEdgeShape = function(c, pts) - { - var width = 10; - - // Base vector (between end points) - var p0 = pts[0]; - var pe = pts[pts.length - 1]; - - var dx = pe.x - p0.x; - var dy = pe.y - p0.y; - var dist = Math.sqrt(dx * dx + dy * dy); - var length = dist; - - // Computes the norm and the inverse norm - var nx = dx / dist; - var ny = dy / dist; - var basex = length * nx; - var basey = length * ny; - var floorx = width * ny/3; - var floory = -width * nx/3; - - // Computes points - var p0x = p0.x - floorx / 2; - var p0y = p0.y - floory / 2; - var p1x = p0x + floorx; - var p1y = p0y + floory; - var p2x = p1x + basex; - var p2y = p1y + basey; - var p3x = p2x + floorx; - var p3y = p2y + floory; - // p4 not necessary - var p5x = p3x - 3 * floorx; - var p5y = p3y - 3 * floory; - - c.begin(); - c.moveTo(p1x, p1y); - c.lineTo(p2x, p2y); - c.moveTo(p5x + floorx, p5y + floory); - c.lineTo(p0x, p0y); - c.stroke(); - }; - - // Registers the link shape - mxCellRenderer.prototype.defaultShapes['link'] = LinkShape; - - // Registers and defines the custom marker - mxMarker.addMarker('dash', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled) - { - var nx = unitX * (size + sw + 1); - var ny = unitY * (size + sw + 1); - - return function() - { - canvas.begin(); - canvas.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2); - canvas.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2); - canvas.stroke(); - }; - }); - - // Implements custom handlers - var SPECIAL_HANDLE_INDEX = -99; - - // Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph) - if (typeof(mxVertexHandler) != 'undefined') - { - function mxExtVertexHandler(state) - { - mxVertexHandler.call(this, state); - }; - - mxUtils.extend(mxExtVertexHandler, mxVertexHandler); - - mxExtVertexHandler.prototype.useGridForSpecialHandle = false; - - mxExtVertexHandler.prototype.init = function() - { - this.horizontal = mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true); - var graph = this.state.view.graph; - - if (this.handleImage != null) - { - var bounds = new mxRectangle(0, 0, this.handleImage.width, this.handleImage.height); - this.specialHandle = new mxImageShape(bounds, this.handleImage.src); - } - else - { - var size = 10; - var bounds = new mxRectangle(0, 0, size, size); - this.specialHandle = new mxRhombus(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR); - } - - this.specialHandle.dialect = (graph.dialect != mxConstants.DIALECT_SVG) ? - mxConstants.DIALECT_VML : mxConstants.DIALECT_SVG; - this.specialHandle.init(graph.getView().getOverlayPane()); - this.specialHandle.node.style.cursor = this.getSpecialHandleCursor(); - - mxEvent.redirectMouseEvents(this.specialHandle.node, graph, this.state); - mxVertexHandler.prototype.init.apply(this, arguments); - }; - - mxExtVertexHandler.prototype.getSpecialHandleCursor = function() - { - return 'default'; - }; - - mxExtVertexHandler.prototype.redraw = function() - { - mxVertexHandler.prototype.redraw.apply(this, arguments); - - var size = this.specialHandle.bounds.width; - this.specialHandle.bounds = this.getSpecialHandleBounds(size); - this.specialHandle.redraw(); - }; - - mxExtVertexHandler.prototype.destroy = function() - { - mxVertexHandler.prototype.destroy.apply(this, arguments); - - if (this.specialHandle != null) - { - this.specialHandle.destroy(); - this.specialHandle = null; - } - }; - - mxExtVertexHandler.prototype.getHandleForEvent = function(me) - { - if (me.isSource(this.specialHandle)) - { - return SPECIAL_HANDLE_INDEX; - } - - return mxVertexHandler.prototype.getHandleForEvent.apply(this, arguments); - }; - - mxExtVertexHandler.prototype.mouseMove = function(sender, me) - { - if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX) - { - var point = new mxPoint(me.getGraphX(), me.getGraphY()); - this.constrainPoint(point); - var gridEnabled = this.graph.isGridEnabledEvent(me.getEvent()); - var scale = this.graph.getView().scale; - - if (gridEnabled && this.useGridForSpecialHandle) - { - point.x = this.graph.snap(point.x / scale) * scale; - point.y = this.graph.snap(point.y / scale) * scale; - } - - this.updateStyle(point); - this.moveSizerTo(this.specialHandle, point.x, point.y); - this.state.view.graph.cellRenderer.redraw(this.state, true); - me.consume(); - } - else - { - mxVertexHandler.prototype.mouseMove.apply(this, arguments); - } - }; - - mxExtVertexHandler.prototype.mouseUp = function(sender, me) - { - if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX) - { - this.applyStyle(); - this.reset(); - me.consume(); - } - else - { - mxVertexHandler.prototype.mouseUp.apply(this, arguments); - } - }; - - mxExtVertexHandler.prototype.getSpecialHandleBounds = function(size) - { - var rotation = this.state.shape.getShapeRotation(); - var alpha = mxUtils.toRadians(rotation); - var cos = Math.cos(alpha); - var sin = Math.sin(alpha); - - var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height); - - if (this.state.shape.isPaintBoundsInverted()) - { - var t = (bounds.width - bounds.height) / 2; - bounds.x += t; - bounds.y -= t; - var tmp = bounds.width; - bounds.width = bounds.height; - bounds.height = tmp; - } - - var pt = this.getSpecialHandlePoint(bounds); - - if (this.state.shape.flipH) - { - pt.x = 2 * bounds.x + bounds.width - pt.x; - } - - if (this.state.shape.flipV) - { - pt.y = 2 * bounds.y + bounds.height - pt.y; - } - - pt = mxUtils.getRotatedPoint(pt, cos, sin, - new mxPoint(this.state.getCenterX(), this.state.getCenterY())); - - return new mxRectangle(pt.x - size / 2, pt.y - size / 2, size, size); - }; - - mxExtVertexHandler.prototype.getSpecialHandlePoint = function(bounds) - { - // Hook for subclassers - return null; - }; - - mxExtVertexHandler.prototype.updateStyle = function(point) - { - // Hook for subclassers - }; - - mxExtVertexHandler.prototype.constrainPoint = function(point) - { - point.x = Math.max(this.state.x, Math.min(this.state.x + this.state.width, point.x)); - point.y = Math.max(this.state.y, Math.min(this.state.y + this.state.height, point.y)); - }; - - mxExtVertexHandler.prototype.applyStyle = function() - { - // Hook for subclassers - }; - - // Folder Handler - function mxFolderHandler(state) - { - mxExtVertexHandler.call(this, state); - }; - - mxUtils.extend(mxFolderHandler, mxExtVertexHandler); - - mxFolderHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var scale = this.graph.getView().scale; - var tw = Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', 60) * scale); - var th = Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', 20) * scale); - - var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right'); - var x = (tp == 'left') ? bounds.x + tw : bounds.x + bounds.width - tw; - - return new mxPoint(x, bounds.y + th); - }; - - mxFolderHandler.prototype.updateStyle = function(point) - { - var rotation = this.state.shape.getShapeRotation(); - var alpha = mxUtils.toRadians(rotation); - var cos = Math.cos(-alpha); - var sin = Math.sin(-alpha); - - var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height); - - if (this.state.shape.isPaintBoundsInverted()) - { - var t = (bounds.width - bounds.height) / 2; - bounds.x += t; - bounds.y -= t; - var tmp = bounds.width; - bounds.width = bounds.height; - bounds.height = tmp; - } - - var pt = new mxPoint(point.x, point.y); - pt = mxUtils.getRotatedPoint(pt, cos, sin, - new mxPoint(this.state.getCenterX(), this.state.getCenterY())); - - if (this.state.shape.flipH) - { - pt.x = 2 * bounds.x + bounds.width - pt.x; - } - - if (this.state.shape.flipV) - { - pt.y = 2 * bounds.y + bounds.height - pt.y; - } - - var result = this.updateStyleUnrotated(pt, bounds); - - // Modifies point to use rotated coordinates of return value - if (result != null) - { - if (this.state.shape.flipH) - { - result.x = 2 * bounds.x + bounds.width - result.x; - } - - if (this.state.shape.flipV) - { - result.y = 2 * bounds.y + bounds.height - result.y; - } - - cos = Math.cos(alpha); - sin = Math.sin(alpha); - result = mxUtils.getRotatedPoint(result, cos, sin, - new mxPoint(this.state.getCenterX(), this.state.getCenterY())); - point.x = result.x; - point.y = result.y; - } - }; - - mxFolderHandler.prototype.updateStyleUnrotated = function(pt, bounds) - { - var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right'); - var tw = (tp == 'left') ? pt.x - bounds.x : bounds.x + bounds.width - pt.x; - var th = pt.y - bounds.y; - - var scale = this.graph.getView().scale; - this.state.style['tabWidth'] = Math.round(Math.max(1, tw) / scale); - this.state.style['tabHeight'] = Math.round(Math.max(1, th) / scale); - }; - - mxFolderHandler.prototype.applyStyle = function() - { - var model = this.graph.getModel(); - model.beginUpdate(); - try - { - this.state.view.graph.setCellStyles('tabWidth', this.state.style['tabWidth'], [this.state.cell]); - this.state.view.graph.setCellStyles('tabHeight', this.state.style['tabHeight'], [this.state.cell]); - } - finally - { - model.endUpdate(); - } - }; - - // Swimlane Handler - function mxSwimlaneHandler(state) - { - mxFolderHandler.call(this, state); - }; - - mxUtils.extend(mxSwimlaneHandler, mxFolderHandler); - - mxSwimlaneHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var scale = this.graph.getView().scale; - var startSize = mxUtils.getValue(this.state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE); - - return new mxPoint(bounds.x + bounds.width / 2, bounds.y + Math.min(bounds.height, startSize * scale)); - }; - - mxSwimlaneHandler.prototype.updateStyleUnrotated = function(point, bounds) - { - point.x = bounds.x + bounds.width / 2; - startSize = point.y - bounds.y; - var scale = this.graph.getView().scale; - this.state.style['startSize'] = Math.round(Math.max(1, startSize) / scale); - - return point; - }; - - mxSwimlaneHandler.prototype.applyStyle = function() - { - this.state.view.graph.setCellStyles('startSize', this.state.style['startSize'], [this.state.cell]); - }; - - // Cube Handler - function mxCubeHandler(state) - { - mxFolderHandler.call(this, state); - }; - - mxUtils.extend(mxCubeHandler, mxFolderHandler); - - mxCubeHandler.prototype.defaultValue = 20; - - mxCubeHandler.prototype.scaleFactor = 1; - - mxCubeHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var scale = this.graph.getView().scale; - var sz = Math.min(bounds.width, Math.min(bounds.height, - mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor)); - - return new mxPoint(bounds.x + sz, bounds.y + sz); - }; - - mxCubeHandler.prototype.updateStyleUnrotated = function(pt, bounds) - { - var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x), - Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y))); - var scale = this.graph.getView().scale; - this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor; - - // Stays on the diagonal - return new mxPoint(bounds.x + size, bounds.y + size); - }; - - mxCubeHandler.prototype.applyStyle = function() - { - this.state.view.graph.setCellStyles('size', this.state.style['size'], [this.state.cell]); - }; - - // Card Handler - function mxCardHandler(state) - { - mxCubeHandler.call(this, state); - }; - - mxUtils.extend(mxCardHandler, mxCubeHandler); - - mxCardHandler.prototype.defaultValue = 30; - - mxCardHandler.prototype.scaleFactor = 2; - - // Note Handler - function mxNoteHandler(state) - { - mxCubeHandler.call(this, state); - }; - - mxUtils.extend(mxNoteHandler, mxCubeHandler); - - mxNoteHandler.prototype.defaultValue = 30; - - mxNoteHandler.prototype.scaleFactor = 1; - - mxNoteHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var scale = this.graph.getView().scale; - var sz = Math.min(bounds.width, Math.min(bounds.height, - mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor)); - - return new mxPoint(bounds.x + bounds.width - sz, bounds.y + sz); - }; - - mxNoteHandler.prototype.updateStyleUnrotated = function(pt, bounds) - { - var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x + bounds.width), - Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y))); - var scale = this.graph.getView().scale; - this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor; - - // Stays on the diagonal - return new mxPoint(bounds.x + bounds.width - size, bounds.y + size); - }; - - // Step Handler - function mxStepHandler(state) - { - mxCubeHandler.call(this, state); - }; - - mxUtils.extend(mxStepHandler, mxCubeHandler); - - mxStepHandler.prototype.defaultValue = 0.2; - - mxStepHandler.prototype.scaleFactor = 1; - - mxStepHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue); - - return new mxPoint(bounds.x + bounds.width * sz, bounds.y + bounds.height / 2); - }; - - mxStepHandler.prototype.updateStyleUnrotated = function(pt, bounds) - { - var size = Math.min(1, (pt.x - bounds.x) / bounds.width); - this.state.style['size'] = size; - - return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 2); - }; - - // Tape Handler - function mxTapeHandler(state) - { - mxCubeHandler.call(this, state); - }; - - mxUtils.extend(mxTapeHandler, mxCubeHandler); - - mxTapeHandler.prototype.defaultValue = 0.4; - - mxTapeHandler.prototype.scaleFactor = 1; - - mxTapeHandler.prototype.getSpecialHandlePoint = function(bounds) - { - var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue); - - return new mxPoint(bounds.x + bounds.width / 2, bounds.y + sz * bounds.height / 2); - }; - - mxTapeHandler.prototype.updateStyleUnrotated = function(pt, bounds) - { - var size = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2)); - this.state.style['size'] = size; - - return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size * bounds.height / 2); - }; - - var handlers = {'swimlane': mxSwimlaneHandler, 'folder': mxFolderHandler, 'cube': mxCubeHandler, - 'card': mxCardHandler, 'note': mxNoteHandler, 'step': mxStepHandler, 'tape': mxTapeHandler}; - - var mxGraphCreateHandler = mxGraph.prototype.createHandler; - mxGraph.prototype.createHandler = function(state) - { - if (state != null) - { - var ctor = handlers[state.style['shape']]; - - if (ctor != null) - { - return new ctor(state); - } - } - - return mxGraphCreateHandler.apply(this, arguments); - }; - } - - // Constraints - mxGraph.prototype.getAllConnectionConstraints = function(terminal, source) - { - if (terminal != null && terminal.shape != null) - { - if (terminal.shape.stencil != null) - { - if (terminal.shape.stencil != null) - { - return terminal.shape.stencil.constraints; - } - } - else if (terminal.shape.constraints != null) - { - return terminal.shape.constraints; - } - } - - return null; - }; - - mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.75, 0), true), - new mxConnectionConstraint(new mxPoint(0, 0.25), true), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), - new mxConnectionConstraint(new mxPoint(0, 0.75), true), - new mxConnectionConstraint(new mxPoint(1, 0.25), true), - new mxConnectionConstraint(new mxPoint(1, 0.5), true), - new mxConnectionConstraint(new mxPoint(1, 0.75), true), - new mxConnectionConstraint(new mxPoint(0.25, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.75, 1), true)]; - mxLabel.prototype.constraints = mxRectangleShape.prototype.constraints; - mxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints; - mxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints; - PlusShape.prototype.constraints = mxRectangleShape.prototype.constraints; - NoteShape.prototype.constraints = mxRectangleShape.prototype.constraints; - CardShape.prototype.constraints = mxRectangleShape.prototype.constraints; - CubeShape.prototype.constraints = mxRectangleShape.prototype.constraints; - FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints; - mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.85, 0.05), false), - new mxConnectionConstraint(new mxPoint(0, 0.3), true), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), - new mxConnectionConstraint(new mxPoint(0, 0.7), true), - new mxConnectionConstraint(new mxPoint(1, 0.3), true), - new mxConnectionConstraint(new mxPoint(1, 0.5), true), - new mxConnectionConstraint(new mxPoint(1, 0.7), true), - new mxConnectionConstraint(new mxPoint(0.15, 0.95), false), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)]; - UmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false), - new mxConnectionConstraint(new mxPoint(0.5, 0), false), - new mxConnectionConstraint(new mxPoint(0.75, 0.1), false), - new mxConnectionConstraint(new mxPoint(0, 1/3), false), - new mxConnectionConstraint(new mxPoint(0, 1), false), - new mxConnectionConstraint(new mxPoint(1, 1/3), false), - new mxConnectionConstraint(new mxPoint(1, 1), false), - new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)]; - ComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.75, 0), true), - new mxConnectionConstraint(new mxPoint(0, 0.3), true), - new mxConnectionConstraint(new mxPoint(0, 0.7), true), - new mxConnectionConstraint(new mxPoint(1, 0.25), true), - new mxConnectionConstraint(new mxPoint(1, 0.5), true), - new mxConnectionConstraint(new mxPoint(1, 0.75), true), - new mxConnectionConstraint(new mxPoint(0.25, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.75, 1), true)]; - mxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.25, 0.2), false), - new mxConnectionConstraint(new mxPoint(0.1, 0.5), false), - new mxConnectionConstraint(new mxPoint(0, 0.75), true), - new mxConnectionConstraint(new mxPoint(0.75, 0.25), false), - new mxConnectionConstraint(new mxPoint(0.9, 0.5), false), - new mxConnectionConstraint(new mxPoint(1, 0.75), true), - new mxConnectionConstraint(new mxPoint(0.25, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.75, 1), true)]; - TapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false), - new mxConnectionConstraint(new mxPoint(0, 0.5), false), - new mxConnectionConstraint(new mxPoint(0, 0.65), false), - new mxConnectionConstraint(new mxPoint(1, 0.35), false), - new mxConnectionConstraint(new mxPoint(1, 0.5), false), - new mxConnectionConstraint(new mxPoint(1, 0.65), false), - new mxConnectionConstraint(new mxPoint(0.25, 1), false), - new mxConnectionConstraint(new mxPoint(0.75, 0), false)]; - // TODO: Relative ports - StepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.75, 0), true), - new mxConnectionConstraint(new mxPoint(0.25, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.75, 1), true), - new mxConnectionConstraint(new mxPoint(0.1, 0.25), false), - new mxConnectionConstraint(new mxPoint(0.2, 0.5), false), - new mxConnectionConstraint(new mxPoint(0.1, 0.75), false), - new mxConnectionConstraint(new mxPoint(0.9, 0.25), false), - new mxConnectionConstraint(new mxPoint(1, 0.5), false), - new mxConnectionConstraint(new mxPoint(0.9, 0.75), false)]; - mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false), - new mxConnectionConstraint(new mxPoint(0.25, 0.5), false), - new mxConnectionConstraint(new mxPoint(0.75, 0.5), false), - new mxConnectionConstraint(new mxPoint(1, 0.5), false)]; - LollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false), - new mxConnectionConstraint(new mxPoint(0.5, 1), false)]; - mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true), - new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))]; - mxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints; - mxRhombus.prototype.constraints = mxEllipse.prototype.constraints; - mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), - new mxConnectionConstraint(new mxPoint(0, 0.75), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(1, 0.5), true)]; - mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true), - new mxConnectionConstraint(new mxPoint(0.5, 0), true), - new mxConnectionConstraint(new mxPoint(0.625, 0), true), - new mxConnectionConstraint(new mxPoint(0.125, 0.25), false), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), - new mxConnectionConstraint(new mxPoint(0.125, 0.75), false), - new mxConnectionConstraint(new mxPoint(0.875, 0.25), false), - new mxConnectionConstraint(new mxPoint(0, 0.5), true), - new mxConnectionConstraint(new mxPoint(1, 0.5), true), - new mxConnectionConstraint(new mxPoint(0.875, 0.75), false), - new mxConnectionConstraint(new mxPoint(0.375, 1), true), - new mxConnectionConstraint(new mxPoint(0.5, 1), true), - new mxConnectionConstraint(new mxPoint(0.625, 1), true)]; - mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false), - new mxConnectionConstraint(new mxPoint(0.4, 0.1), false), - new mxConnectionConstraint(new mxPoint(0.16, 0.55), false), - new mxConnectionConstraint(new mxPoint(0.07, 0.4), false), - new mxConnectionConstraint(new mxPoint(0.31, 0.8), false), - new mxConnectionConstraint(new mxPoint(0.13, 0.77), false), - new mxConnectionConstraint(new mxPoint(0.8, 0.8), false), - new mxConnectionConstraint(new mxPoint(0.55, 0.95), false), - new mxConnectionConstraint(new mxPoint(0.875, 0.5), false), - new mxConnectionConstraint(new mxPoint(0.96, 0.7), false), - new mxConnectionConstraint(new mxPoint(0.625, 0.2), false), - new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)]; - mxArrow.prototype.constraints = null; -})(); +var _0x141d=["\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x6F\x6E\x73\x74\x72\x75\x63\x74\x6F\x72","\x73\x69\x7A\x65","\x72\x65\x64\x72\x61\x77\x50\x61\x74\x68","\x73\x74\x79\x6C\x65","\x67\x65\x74\x56\x61\x6C\x75\x65","\x6D\x69\x6E","\x6D\x6F\x76\x65\x54\x6F","\x6C\x69\x6E\x65\x54\x6F","\x65\x6E\x64","\x63\x6C\x6F\x73\x65","\x63\x75\x62\x65","\x64\x65\x66\x61\x75\x6C\x74\x53\x68\x61\x70\x65\x73","\x6E\x6F\x74\x65","\x74\x61\x62\x57\x69\x64\x74\x68","\x74\x61\x62\x48\x65\x69\x67\x68\x74","\x74\x61\x62\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x72\x69\x67\x68\x74","\x6C\x65\x66\x74","\x66\x6F\x6C\x64\x65\x72","\x63\x61\x72\x64","\x71\x75\x61\x64\x54\x6F","\x74\x61\x70\x65","\x73\x74\x65\x70","\x63\x61\x6C\x6C","\x65\x78\x74\x65\x6E\x64","\x69\x73\x48\x74\x6D\x6C\x41\x6C\x6C\x6F\x77\x65\x64","\x70\x61\x69\x6E\x74\x46\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64","\x62\x65\x67\x69\x6E","\x73\x74\x72\x6F\x6B\x65","\x61\x70\x70\x6C\x79","\x70\x6C\x75\x73","\x64\x6F\x75\x62\x6C\x65","\x73\x74\x72\x6F\x6B\x65\x77\x69\x64\x74\x68","\x6D\x61\x78","\x70\x61\x69\x6E\x74\x42\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x73\x65\x74\x44\x61\x73\x68\x65\x64","\x73\x79\x6D\x62\x6F\x6C","\x41\x6C\x69\x67\x6E","\x56\x65\x72\x74\x69\x63\x61\x6C\x41\x6C\x69\x67\x6E","\x57\x69\x64\x74\x68","\x48\x65\x69\x67\x68\x74","\x53\x70\x61\x63\x69\x6E\x67","\x41\x72\x63\x53\x70\x61\x63\x69\x6E\x67","\x67\x65\x74\x41\x72\x63\x53\x69\x7A\x65","\x41\x4C\x49\x47\x4E\x5F\x43\x45\x4E\x54\x45\x52","\x41\x4C\x49\x47\x4E\x5F\x52\x49\x47\x48\x54","\x41\x4C\x49\x47\x4E\x5F\x4D\x49\x44\x44\x4C\x45","\x41\x4C\x49\x47\x4E\x5F\x42\x4F\x54\x54\x4F\x4D","\x73\x61\x76\x65","\x70\x61\x69\x6E\x74\x56\x65\x72\x74\x65\x78\x53\x68\x61\x70\x65","\x72\x65\x73\x74\x6F\x72\x65","\x65\x78\x74","\x6D\x65\x73\x73\x61\x67\x65","\x61\x64\x64\x50\x69\x70\x65","\x63\x75\x72\x76\x65\x54\x6F","\x75\x6D\x6C\x41\x63\x74\x6F\x72","\x6C\x6F\x6C\x6C\x69\x70\x6F\x70","\x6A\x65\x74\x74\x79\x57\x69\x64\x74\x68","\x6A\x65\x74\x74\x79\x48\x65\x69\x67\x68\x74","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74","\x6F\x75\x74\x65\x72\x53\x74\x72\x6F\x6B\x65","\x65\x6C\x6C\x69\x70\x73\x65","\x66\x69\x6C\x6C\x41\x6E\x64\x53\x74\x72\x6F\x6B\x65","\x73\x65\x74\x53\x68\x61\x64\x6F\x77","\x65\x6E\x64\x53\x74\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x74\x61\x74\x65","\x69\x6E\x69\x74\x53\x68\x61\x70\x65\x73","\x78","\x79","\x77\x69\x64\x74\x68","\x68\x65\x69\x67\x68\x74","\x73\x68\x61\x70\x65\x73","\x70\x61\x69\x6E\x74\x45\x64\x67\x65\x53\x68\x61\x70\x65","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x72\x74","\x6C\x69\x6E\x6B","\x64\x61\x73\x68","\x61\x64\x64\x4D\x61\x72\x6B\x65\x72","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x75\x73\x65\x47\x72\x69\x64\x46\x6F\x72\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x69\x6E\x69\x74","\x68\x6F\x72\x69\x7A\x6F\x6E\x74\x61\x6C","\x73\x74\x61\x74\x65","\x67\x72\x61\x70\x68","\x76\x69\x65\x77","\x68\x61\x6E\x64\x6C\x65\x49\x6D\x61\x67\x65","\x73\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65","\x73\x72\x63","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x44\x49\x41\x4C\x45\x43\x54\x5F\x56\x4D\x4C","\x67\x65\x74\x4F\x76\x65\x72\x6C\x61\x79\x50\x61\x6E\x65","\x67\x65\x74\x56\x69\x65\x77","\x63\x75\x72\x73\x6F\x72","\x6E\x6F\x64\x65","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x43\x75\x72\x73\x6F\x72","\x72\x65\x64\x69\x72\x65\x63\x74\x4D\x6F\x75\x73\x65\x45\x76\x65\x6E\x74\x73","\x64\x65\x66\x61\x75\x6C\x74","\x72\x65\x64\x72\x61\x77","\x62\x6F\x75\x6E\x64\x73","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x42\x6F\x75\x6E\x64\x73","\x64\x65\x73\x74\x72\x6F\x79","\x67\x65\x74\x48\x61\x6E\x64\x6C\x65\x46\x6F\x72\x45\x76\x65\x6E\x74","\x69\x73\x53\x6F\x75\x72\x63\x65","\x6D\x6F\x75\x73\x65\x4D\x6F\x76\x65","\x69\x73\x43\x6F\x6E\x73\x75\x6D\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74\x47\x72\x61\x70\x68\x58","\x67\x65\x74\x47\x72\x61\x70\x68\x59","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x50\x6F\x69\x6E\x74","\x67\x65\x74\x45\x76\x65\x6E\x74","\x69\x73\x47\x72\x69\x64\x45\x6E\x61\x62\x6C\x65\x64\x45\x76\x65\x6E\x74","\x73\x63\x61\x6C\x65","\x73\x6E\x61\x70","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65","\x6D\x6F\x76\x65\x53\x69\x7A\x65\x72\x54\x6F","\x63\x65\x6C\x6C\x52\x65\x6E\x64\x65\x72\x65\x72","\x63\x6F\x6E\x73\x75\x6D\x65","\x6D\x6F\x75\x73\x65\x55\x70","\x61\x70\x70\x6C\x79\x53\x74\x79\x6C\x65","\x72\x65\x73\x65\x74","\x67\x65\x74\x53\x68\x61\x70\x65\x52\x6F\x74\x61\x74\x69\x6F\x6E","\x73\x68\x61\x70\x65","\x74\x6F\x52\x61\x64\x69\x61\x6E\x73","\x63\x6F\x73","\x73\x69\x6E","\x69\x73\x50\x61\x69\x6E\x74\x42\x6F\x75\x6E\x64\x73\x49\x6E\x76\x65\x72\x74\x65\x64","\x67\x65\x74\x53\x70\x65\x63\x69\x61\x6C\x48\x61\x6E\x64\x6C\x65\x50\x6F\x69\x6E\x74","\x66\x6C\x69\x70\x48","\x66\x6C\x69\x70\x56","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x58","\x67\x65\x74\x43\x65\x6E\x74\x65\x72\x59","\x67\x65\x74\x52\x6F\x74\x61\x74\x65\x64\x50\x6F\x69\x6E\x74","\x75\x70\x64\x61\x74\x65\x53\x74\x79\x6C\x65\x55\x6E\x72\x6F\x74\x61\x74\x65\x64","\x72\x6F\x75\x6E\x64","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x62\x65\x67\x69\x6E\x55\x70\x64\x61\x74\x65","\x63\x65\x6C\x6C","\x73\x65\x74\x43\x65\x6C\x6C\x53\x74\x79\x6C\x65\x73","\x65\x6E\x64\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x72\x74\x53\x69\x7A\x65","\x64\x65\x66\x61\x75\x6C\x74\x56\x61\x6C\x75\x65","\x73\x63\x61\x6C\x65\x46\x61\x63\x74\x6F\x72","\x63\x72\x65\x61\x74\x65\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x41\x6C\x6C\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73","\x73\x74\x65\x6E\x63\x69\x6C","\x63\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x73"];(function(){function _0x33c7x1(){}_0x33c7x1[_0x141d[0]]= new mxCylinder();_0x33c7x1[_0x141d[0]][_0x141d[1]]= _0x33c7x1;_0x33c7x1[_0x141d[0]][_0x141d[2]]= 20;_0x33c7x1[_0x141d[0]][_0x141d[3]]= function(_0x33c7x2,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6,_0x33c7x7){var _0x33c7x8=Math[_0x141d[6]](_0x33c7x5,Math[_0x141d[6]](_0x33c7x6,mxUtils[_0x141d[5]](this[_0x141d[4]],_0x141d[2],this[_0x141d[2]])));if(_0x33c7x7){_0x33c7x2[_0x141d[7]](_0x33c7x8,_0x33c7x6);_0x33c7x2[_0x141d[8]](_0x33c7x8,_0x33c7x8);_0x33c7x2[_0x141d[8]](0,0);_0x33c7x2[_0x141d[7]](_0x33c7x8,_0x33c7x8);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x8);_0x33c7x2[_0x141d[9]]()}else {_0x33c7x2[_0x141d[7]](0,0);_0x33c7x2[_0x141d[8]](_0x33c7x5- _0x33c7x8,0);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x8);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x6);_0x33c7x2[_0x141d[8]](_0x33c7x8,_0x33c7x6);_0x33c7x2[_0x141d[8]](0,_0x33c7x6- _0x33c7x8);_0x33c7x2[_0x141d[8]](0,0);_0x33c7x2[_0x141d[10]]();_0x33c7x2[_0x141d[9]]()}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[11]]= _0x33c7x1;function _0x33c7x9(){}_0x33c7x9[_0x141d[0]]= new mxCylinder();_0x33c7x9[_0x141d[0]][_0x141d[1]]= _0x33c7x9;_0x33c7x9[_0x141d[0]][_0x141d[2]]= 30;_0x33c7x9[_0x141d[0]][_0x141d[3]]= function(_0x33c7x2,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6,_0x33c7x7){var _0x33c7x8=Math[_0x141d[6]](_0x33c7x5,Math[_0x141d[6]](_0x33c7x6,mxUtils[_0x141d[5]](this[_0x141d[4]],_0x141d[2],this[_0x141d[2]])));if(_0x33c7x7){_0x33c7x2[_0x141d[7]](_0x33c7x5- _0x33c7x8,0);_0x33c7x2[_0x141d[8]](_0x33c7x5- _0x33c7x8,_0x33c7x8);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x8);_0x33c7x2[_0x141d[9]]()}else {_0x33c7x2[_0x141d[7]](0,0);_0x33c7x2[_0x141d[8]](_0x33c7x5- _0x33c7x8,0);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x8);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x6);_0x33c7x2[_0x141d[8]](0,_0x33c7x6);_0x33c7x2[_0x141d[8]](0,0);_0x33c7x2[_0x141d[10]]();_0x33c7x2[_0x141d[9]]()}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[13]]= _0x33c7x9;function _0x33c7xa(){}_0x33c7xa[_0x141d[0]]= new mxCylinder();_0x33c7xa[_0x141d[0]][_0x141d[1]]= _0x33c7xa;_0x33c7xa[_0x141d[0]][_0x141d[14]]= 60;_0x33c7xa[_0x141d[0]][_0x141d[15]]= 20;_0x33c7xa[_0x141d[0]][_0x141d[16]]= _0x141d[17];_0x33c7xa[_0x141d[0]][_0x141d[3]]= function(_0x33c7x2,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6,_0x33c7x7){var _0x33c7xb=mxUtils[_0x141d[5]](this[_0x141d[4]],_0x141d[14],this[_0x141d[14]]);var _0x33c7xc=mxUtils[_0x141d[5]](this[_0x141d[4]],_0x141d[15],this[_0x141d[15]]);var _0x33c7xd=mxUtils[_0x141d[5]](this[_0x141d[4]],_0x141d[16],this[_0x141d[16]]);var _0x33c7xe=Math[_0x141d[6]](_0x33c7x5,_0x33c7xb);var _0x33c7xf=Math[_0x141d[6]](_0x33c7x6,_0x33c7xc);if(_0x33c7x7){if(_0x33c7xd== _0x141d[18]){_0x33c7x2[_0x141d[7]](0,_0x33c7xf);_0x33c7x2[_0x141d[8]](_0x33c7xe,_0x33c7xf)}else {_0x33c7x2[_0x141d[7]](_0x33c7x5- _0x33c7xe,_0x33c7xf);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7xf)};_0x33c7x2[_0x141d[9]]()}else {if(_0x33c7xd== _0x141d[18]){_0x33c7x2[_0x141d[7]](0,0);_0x33c7x2[_0x141d[8]](_0x33c7xe,0);_0x33c7x2[_0x141d[8]](_0x33c7xe,_0x33c7xf);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7xf)}else {_0x33c7x2[_0x141d[7]](0,_0x33c7xf);_0x33c7x2[_0x141d[8]](_0x33c7x5- _0x33c7xe,_0x33c7xf);_0x33c7x2[_0x141d[8]](_0x33c7x5- _0x33c7xe,0);_0x33c7x2[_0x141d[8]](_0x33c7x5,0)};_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x6);_0x33c7x2[_0x141d[8]](0,_0x33c7x6);_0x33c7x2[_0x141d[8]](0,_0x33c7xf);_0x33c7x2[_0x141d[10]]();_0x33c7x2[_0x141d[9]]()}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[19]]= _0x33c7xa;function _0x33c7x10(){}_0x33c7x10[_0x141d[0]]= new mxCylinder();_0x33c7x10[_0x141d[0]][_0x141d[1]]= _0x33c7x10;_0x33c7x10[_0x141d[0]][_0x141d[2]]= 30;_0x33c7x10[_0x141d[0]][_0x141d[3]]= function(_0x33c7x2,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6,_0x33c7x7){var _0x33c7x8=Math[_0x141d[6]](_0x33c7x5,Math[_0x141d[6]](_0x33c7x6,mxUtils[_0x141d[5]](this[_0x141d[4]],_0x141d[2],this[_0x141d[2]])));if(!_0x33c7x7){_0x33c7x2[_0x141d[7]](_0x33c7x8,0);_0x33c7x2[_0x141d[8]](_0x33c7x5,0);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x6);_0x33c7x2[_0x141d[8]](0,_0x33c7x6);_0x33c7x2[_0x141d[8]](0,_0x33c7x8);_0x33c7x2[_0x141d[8]](_0x33c7x8,0);_0x33c7x2[_0x141d[10]]();_0x33c7x2[_0x141d[9]]()}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[20]]= _0x33c7x10;function _0x33c7x11(){}_0x33c7x11[_0x141d[0]]= new mxCylinder();_0x33c7x11[_0x141d[0]][_0x141d[1]]= _0x33c7x11;_0x33c7x11[_0x141d[0]][_0x141d[2]]= 0.4;_0x33c7x11[_0x141d[0]][_0x141d[3]]= function(_0x33c7x2,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6,_0x33c7x7){var _0x33c7x8=mxUtils[_0x141d[5]](this[_0x141d[4]],_0x141d[2],this[_0x141d[2]]);var _0x33c7xf=_0x33c7x6* _0x33c7x8;var _0x33c7x12=1.4;if(!_0x33c7x7){_0x33c7x2[_0x141d[7]](0,_0x33c7xf/ 2);_0x33c7x2[_0x141d[21]](_0x33c7x5/ 4,_0x33c7xf* _0x33c7x12,_0x33c7x5/ 2,_0x33c7xf/ 2);_0x33c7x2[_0x141d[21]](_0x33c7x5* 3/ 4,_0x33c7xf* (1- _0x33c7x12),_0x33c7x5,_0x33c7xf/ 2);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x6- _0x33c7xf/ 2);_0x33c7x2[_0x141d[21]](_0x33c7x5* 3/ 4,_0x33c7x6- _0x33c7xf* _0x33c7x12,_0x33c7x5/ 2,_0x33c7x6- _0x33c7xf/ 2);_0x33c7x2[_0x141d[21]](_0x33c7x5/ 4,_0x33c7x6- _0x33c7xf* (1- _0x33c7x12),0,_0x33c7x6- _0x33c7xf/ 2);_0x33c7x2[_0x141d[8]](0,_0x33c7xf/ 2);_0x33c7x2[_0x141d[10]]();_0x33c7x2[_0x141d[9]]()}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[22]]= _0x33c7x11;function _0x33c7x13(){}_0x33c7x13[_0x141d[0]]= new mxCylinder();_0x33c7x13[_0x141d[0]][_0x141d[1]]= _0x33c7x13;_0x33c7x13[_0x141d[0]][_0x141d[2]]= 0.2;_0x33c7x13[_0x141d[0]][_0x141d[3]]= function(_0x33c7x2,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6,_0x33c7x7){var _0x33c7x8=_0x33c7x5* mxUtils[_0x141d[5]](this[_0x141d[4]],_0x141d[2],this[_0x141d[2]]);if(!_0x33c7x7){_0x33c7x2[_0x141d[7]](0,0);_0x33c7x2[_0x141d[8]](_0x33c7x5- _0x33c7x8,0);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x6/ 2);_0x33c7x2[_0x141d[8]](_0x33c7x5- _0x33c7x8,_0x33c7x6);_0x33c7x2[_0x141d[8]](0,_0x33c7x6);_0x33c7x2[_0x141d[8]](_0x33c7x8,_0x33c7x6/ 2);_0x33c7x2[_0x141d[10]]();_0x33c7x2[_0x141d[9]]()}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[23]]= _0x33c7x13;function _0x33c7x14(){mxRectangleShape[_0x141d[24]](this)}mxUtils[_0x141d[25]](_0x33c7x14,mxRectangleShape);_0x33c7x14[_0x141d[0]][_0x141d[26]]= function(){return false};_0x33c7x14[_0x141d[0]][_0x141d[27]]= function(_0x33c7x15,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6){var _0x33c7x16=Math[_0x141d[6]](_0x33c7x5/ 5,_0x33c7x6/ 5)+ 1;_0x33c7x15[_0x141d[28]]();_0x33c7x15[_0x141d[7]](_0x33c7x3+ _0x33c7x5/ 2,_0x33c7x4+ _0x33c7x16);_0x33c7x15[_0x141d[8]](_0x33c7x3+ _0x33c7x5/ 2,_0x33c7x4+ _0x33c7x6- _0x33c7x16);_0x33c7x15[_0x141d[7]](_0x33c7x3+ _0x33c7x16,_0x33c7x4+ _0x33c7x6/ 2);_0x33c7x15[_0x141d[8]](_0x33c7x3+ _0x33c7x5- _0x33c7x16,_0x33c7x4+ _0x33c7x6/ 2);_0x33c7x15[_0x141d[9]]();_0x33c7x15[_0x141d[29]]();mxRectangleShape[_0x141d[0]][_0x141d[27]][_0x141d[30]](this,arguments)};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[31]]= _0x33c7x14;function _0x33c7x17(){mxRectangleShape[_0x141d[24]](this)}mxUtils[_0x141d[25]](_0x33c7x17,mxRectangleShape);_0x33c7x17[_0x141d[0]][_0x141d[26]]= function(){return false};_0x33c7x17[_0x141d[0]][_0x141d[27]]= function(_0x33c7x15,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6){if(this[_0x141d[4]]!= null){if(this[_0x141d[4]][_0x141d[32]]== 1){var _0x33c7x18=Math[_0x141d[34]](2,this[_0x141d[33]]+ 1);mxRectangleShape[_0x141d[0]][_0x141d[35]][_0x141d[24]](this,_0x33c7x15,_0x33c7x3+ _0x33c7x18,_0x33c7x4+ _0x33c7x18,_0x33c7x5- 2* _0x33c7x18,_0x33c7x6- 2* _0x33c7x18);mxRectangleShape[_0x141d[0]][_0x141d[27]][_0x141d[30]](this,arguments);_0x33c7x3+= _0x33c7x18;_0x33c7x4+= _0x33c7x18;_0x33c7x5-= 2* _0x33c7x18;_0x33c7x6-= 2* _0x33c7x18};_0x33c7x15[_0x141d[36]](false);var _0x33c7x19=0;var _0x33c7x1a=null;do{_0x33c7x1a= mxCellRenderer[_0x141d[0]][_0x141d[12]][this[_0x141d[4]][_0x141d[37]+ _0x33c7x19]];if(_0x33c7x1a!= null){var _0x33c7x1b=this[_0x141d[4]][_0x141d[37]+ _0x33c7x19+ _0x141d[38]];var _0x33c7x1c=this[_0x141d[4]][_0x141d[37]+ _0x33c7x19+ _0x141d[39]];var _0x33c7x1d=this[_0x141d[4]][_0x141d[37]+ _0x33c7x19+ _0x141d[40]];var _0x33c7x1e=this[_0x141d[4]][_0x141d[37]+ _0x33c7x19+ _0x141d[41]];var _0x33c7x1f=this[_0x141d[4]][_0x141d[37]+ _0x33c7x19+ _0x141d[42]]|| 0;var _0x33c7x20=this[_0x141d[4]][_0x141d[37]+ _0x33c7x19+ _0x141d[43]];if(_0x33c7x20!= null){_0x33c7x1f+= this[_0x141d[44]](_0x33c7x5+ this[_0x141d[33]],_0x33c7x6+ this[_0x141d[33]])* _0x33c7x20};var _0x33c7x21=_0x33c7x3;var _0x33c7x22=_0x33c7x4;if(_0x33c7x1b== mxConstants[_0x141d[45]]){_0x33c7x21+= (_0x33c7x5- _0x33c7x1d)/ 2}else {if(_0x33c7x1b== mxConstants[_0x141d[46]]){_0x33c7x21+= _0x33c7x5- _0x33c7x1d- _0x33c7x1f}else {_0x33c7x21+= _0x33c7x1f}};if(_0x33c7x1c== mxConstants[_0x141d[47]]){_0x33c7x22+= (_0x33c7x6- _0x33c7x1e)/ 2}else {if(_0x33c7x1c== mxConstants[_0x141d[48]]){_0x33c7x22+= _0x33c7x6- _0x33c7x1e- _0x33c7x1f}else {_0x33c7x22+= _0x33c7x1f}};_0x33c7x15[_0x141d[49]]();var _0x33c7x23= new _0x33c7x1a();_0x33c7x23[_0x141d[4]]= this[_0x141d[4]];_0x33c7x1a[_0x141d[0]][_0x141d[50]][_0x141d[24]](_0x33c7x23,_0x33c7x15,_0x33c7x21,_0x33c7x22,_0x33c7x1d,_0x33c7x1e);_0x33c7x15[_0x141d[51]]()};_0x33c7x19++}while(_0x33c7x1a!= null);}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[52]]= _0x33c7x17;function _0x33c7x24(){}_0x33c7x24[_0x141d[0]]= new mxCylinder();_0x33c7x24[_0x141d[0]][_0x141d[1]]= _0x33c7x24;_0x33c7x24[_0x141d[0]][_0x141d[3]]= function(_0x33c7x2,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6,_0x33c7x7){if(_0x33c7x7){_0x33c7x2[_0x141d[7]](0,0);_0x33c7x2[_0x141d[8]](_0x33c7x5/ 2,_0x33c7x6/ 2);_0x33c7x2[_0x141d[8]](_0x33c7x5,0);_0x33c7x2[_0x141d[9]]()}else {_0x33c7x2[_0x141d[7]](0,0);_0x33c7x2[_0x141d[8]](_0x33c7x5,0);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x6);_0x33c7x2[_0x141d[8]](0,_0x33c7x6);_0x33c7x2[_0x141d[10]]()}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[53]]= _0x33c7x24;function _0x33c7x25(){}_0x33c7x25[_0x141d[0]]= new mxCylinder();_0x33c7x25[_0x141d[0]][_0x141d[1]]= _0x33c7x25;_0x33c7x25[_0x141d[0]][_0x141d[54]]= true;_0x33c7x25[_0x141d[0]][_0x141d[3]]= function(_0x33c7x2,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6,_0x33c7x7){var _0x33c7x1d=_0x33c7x5/ 3;var _0x33c7x1e=_0x33c7x6/ 4;if(!_0x33c7x7){_0x33c7x2[_0x141d[7]](_0x33c7x5/ 2,_0x33c7x1e);_0x33c7x2[_0x141d[55]](_0x33c7x5/ 2- _0x33c7x1d,_0x33c7x1e,_0x33c7x5/ 2- _0x33c7x1d,0,_0x33c7x5/ 2,0);_0x33c7x2[_0x141d[55]](_0x33c7x5/ 2+ _0x33c7x1d,0,_0x33c7x5/ 2+ _0x33c7x1d,_0x33c7x1e,_0x33c7x5/ 2,_0x33c7x1e);_0x33c7x2[_0x141d[10]]();_0x33c7x2[_0x141d[7]](_0x33c7x5/ 2,_0x33c7x1e);_0x33c7x2[_0x141d[8]](_0x33c7x5/ 2,2* _0x33c7x6/ 3);_0x33c7x2[_0x141d[7]](_0x33c7x5/ 2,_0x33c7x6/ 3);_0x33c7x2[_0x141d[8]](0,_0x33c7x6/ 3);_0x33c7x2[_0x141d[7]](_0x33c7x5/ 2,_0x33c7x6/ 3);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x6/ 3);_0x33c7x2[_0x141d[7]](_0x33c7x5/ 2,2* _0x33c7x6/ 3);_0x33c7x2[_0x141d[8]](0,_0x33c7x6);_0x33c7x2[_0x141d[7]](_0x33c7x5/ 2,2* _0x33c7x6/ 3);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x6);_0x33c7x2[_0x141d[9]]()}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[56]]= _0x33c7x25;function _0x33c7x26(){}_0x33c7x26[_0x141d[0]]= new mxCylinder();_0x33c7x26[_0x141d[0]][_0x141d[1]]= _0x33c7x26;_0x33c7x26[_0x141d[0]][_0x141d[2]]= 10;_0x33c7x26[_0x141d[0]][_0x141d[54]]= true;_0x33c7x26[_0x141d[0]][_0x141d[3]]= function(_0x33c7x2,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6,_0x33c7x7){var _0x33c7x27=mxUtils[_0x141d[5]](this[_0x141d[4]],_0x141d[2],this[_0x141d[2]]);var _0x33c7x1d=_0x33c7x27* 2/ 3;var _0x33c7x1e=_0x33c7x27;if(!_0x33c7x7){_0x33c7x2[_0x141d[7]](_0x33c7x5/ 2,_0x33c7x1e);_0x33c7x2[_0x141d[55]](_0x33c7x5/ 2- _0x33c7x1d,_0x33c7x1e,_0x33c7x5/ 2- _0x33c7x1d,0,_0x33c7x5/ 2,0);_0x33c7x2[_0x141d[55]](_0x33c7x5/ 2+ _0x33c7x1d,0,_0x33c7x5/ 2+ _0x33c7x1d,_0x33c7x1e,_0x33c7x5/ 2,_0x33c7x1e);_0x33c7x2[_0x141d[10]]();_0x33c7x2[_0x141d[7]](_0x33c7x5/ 2,_0x33c7x1e);_0x33c7x2[_0x141d[8]](_0x33c7x5/ 2,_0x33c7x6);_0x33c7x2[_0x141d[9]]()}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[57]]= _0x33c7x26;function _0x33c7x28(){}_0x33c7x28[_0x141d[0]]= new mxCylinder();_0x33c7x28[_0x141d[0]][_0x141d[1]]= _0x33c7x28;_0x33c7x28[_0x141d[0]][_0x141d[58]]= 32;_0x33c7x28[_0x141d[0]][_0x141d[59]]= 12;_0x33c7x28[_0x141d[0]][_0x141d[3]]= function(_0x33c7x2,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6,_0x33c7x7){var _0x33c7xe=mxUtils[_0x141d[5]](this[_0x141d[4]],_0x141d[58],this[_0x141d[58]]);var _0x33c7xf=mxUtils[_0x141d[5]](this[_0x141d[4]],_0x141d[59],this[_0x141d[59]]);var _0x33c7x29=_0x33c7xe/ 2;var _0x33c7x2a=_0x33c7x29+ _0x33c7xe/ 2;var _0x33c7x2b=0.3* _0x33c7x6- _0x33c7xf/ 2;var _0x33c7x2c=0.7* _0x33c7x6- _0x33c7xf/ 2;if(_0x33c7x7){_0x33c7x2[_0x141d[7]](_0x33c7x29,_0x33c7x2b);_0x33c7x2[_0x141d[8]](_0x33c7x2a,_0x33c7x2b);_0x33c7x2[_0x141d[8]](_0x33c7x2a,_0x33c7x2b+ _0x33c7xf);_0x33c7x2[_0x141d[8]](_0x33c7x29,_0x33c7x2b+ _0x33c7xf);_0x33c7x2[_0x141d[7]](_0x33c7x29,_0x33c7x2c);_0x33c7x2[_0x141d[8]](_0x33c7x2a,_0x33c7x2c);_0x33c7x2[_0x141d[8]](_0x33c7x2a,_0x33c7x2c+ _0x33c7xf);_0x33c7x2[_0x141d[8]](_0x33c7x29,_0x33c7x2c+ _0x33c7xf);_0x33c7x2[_0x141d[9]]()}else {_0x33c7x2[_0x141d[7]](_0x33c7x29,0);_0x33c7x2[_0x141d[8]](_0x33c7x5,0);_0x33c7x2[_0x141d[8]](_0x33c7x5,_0x33c7x6);_0x33c7x2[_0x141d[8]](_0x33c7x29,_0x33c7x6);_0x33c7x2[_0x141d[8]](_0x33c7x29,_0x33c7x2c+ _0x33c7xf);_0x33c7x2[_0x141d[8]](0,_0x33c7x2c+ _0x33c7xf);_0x33c7x2[_0x141d[8]](0,_0x33c7x2c);_0x33c7x2[_0x141d[8]](_0x33c7x29,_0x33c7x2c);_0x33c7x2[_0x141d[8]](_0x33c7x29,_0x33c7x2b+ _0x33c7xf);_0x33c7x2[_0x141d[8]](0,_0x33c7x2b+ _0x33c7xf);_0x33c7x2[_0x141d[8]](0,_0x33c7x2b);_0x33c7x2[_0x141d[8]](_0x33c7x29,_0x33c7x2b);_0x33c7x2[_0x141d[10]]();_0x33c7x2[_0x141d[9]]()}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[60]]= _0x33c7x28;function _0x33c7x2d(){}_0x33c7x2d[_0x141d[0]]= new mxDoubleEllipse();_0x33c7x2d[_0x141d[0]][_0x141d[1]]= _0x33c7x2d;_0x33c7x2d[_0x141d[0]][_0x141d[61]]= true;_0x33c7x2d[_0x141d[0]][_0x141d[50]]= function(_0x33c7x15,_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6){var _0x33c7x18=Math[_0x141d[6]](4,Math[_0x141d[6]](_0x33c7x5/ 5,_0x33c7x6/ 5));if(_0x33c7x5> 0&& _0x33c7x6> 0){_0x33c7x15[_0x141d[62]](_0x33c7x3+ _0x33c7x18,_0x33c7x4+ _0x33c7x18,_0x33c7x5- 2* _0x33c7x18,_0x33c7x6- 2* _0x33c7x18);_0x33c7x15[_0x141d[63]]()};_0x33c7x15[_0x141d[64]](false);if(this[_0x141d[61]]){_0x33c7x15[_0x141d[62]](_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6);_0x33c7x15[_0x141d[29]]()}};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[65]]= _0x33c7x2d;function _0x33c7x2e(){}_0x33c7x2e[_0x141d[0]]= new _0x33c7x2d();_0x33c7x2e[_0x141d[0]][_0x141d[1]]= _0x33c7x2e;_0x33c7x2e[_0x141d[0]][_0x141d[61]]= false;mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[66]]= _0x33c7x2e;var _0x33c7x2f=mxImageExport[_0x141d[0]][_0x141d[67]];mxImageExport[_0x141d[0]][_0x141d[67]]= function(){_0x33c7x2f[_0x141d[30]](this,arguments);function _0x33c7x30(_0x33c7x31){return {drawShape:function(_0x33c7x32,_0x33c7x33,_0x33c7x34,_0x33c7x35){var _0x33c7x3=_0x33c7x34[_0x141d[68]];var _0x33c7x4=_0x33c7x34[_0x141d[69]];var _0x33c7x5=_0x33c7x34[_0x141d[70]];var _0x33c7x6=_0x33c7x34[_0x141d[71]];if(_0x33c7x35){var _0x33c7x18=Math[_0x141d[6]](4,Math[_0x141d[6]](_0x33c7x5/ 5,_0x33c7x6/ 5));_0x33c7x3+= _0x33c7x18;_0x33c7x4+= _0x33c7x18;_0x33c7x5-= 2* _0x33c7x18;_0x33c7x6-= 2* _0x33c7x18;if(_0x33c7x5> 0&& _0x33c7x6> 0){_0x33c7x32[_0x141d[62]](_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6)};return true}else {_0x33c7x32[_0x141d[63]]();if(_0x33c7x31){_0x33c7x32[_0x141d[62]](_0x33c7x3,_0x33c7x4,_0x33c7x5,_0x33c7x6);_0x33c7x32[_0x141d[29]]()}}}}}this[_0x141d[72]][_0x141d[65]]= _0x33c7x30(true);this[_0x141d[72]][_0x141d[66]]= _0x33c7x30(false)};function _0x33c7x36(){mxArrow[_0x141d[24]](this)}mxUtils[_0x141d[25]](_0x33c7x36,mxArrow);_0x33c7x36[_0x141d[0]][_0x141d[73]]= function(_0x33c7x15,_0x33c7x37){var _0x33c7x1d=10;var _0x33c7x38=_0x33c7x37[0];var _0x33c7x39=_0x33c7x37[_0x33c7x37[_0x141d[74]]- 1];var _0x33c7xe=_0x33c7x39[_0x141d[68]]- _0x33c7x38[_0x141d[68]];var _0x33c7xf=_0x33c7x39[_0x141d[69]]- _0x33c7x38[_0x141d[69]];var _0x33c7x3a=Math[_0x141d[75]](_0x33c7xe* _0x33c7xe+ _0x33c7xf* _0x33c7xf);var _0x33c7x3b=_0x33c7x3a;var _0x33c7x3c=_0x33c7xe/ _0x33c7x3a;var _0x33c7x3d=_0x33c7xf/ _0x33c7x3a;var _0x33c7x3e=_0x33c7x3b* _0x33c7x3c;var _0x33c7x3f=_0x33c7x3b* _0x33c7x3d;var _0x33c7x40=_0x33c7x1d* _0x33c7x3d/ 3;var _0x33c7x41=-_0x33c7x1d* _0x33c7x3c/ 3;var _0x33c7x42=_0x33c7x38[_0x141d[68]]- _0x33c7x40/ 2;var _0x33c7x43=_0x33c7x38[_0x141d[69]]- _0x33c7x41/ 2;var _0x33c7x44=_0x33c7x42+ _0x33c7x40;var _0x33c7x45=_0x33c7x43+ _0x33c7x41;var _0x33c7x46=_0x33c7x44+ _0x33c7x3e;var _0x33c7x47=_0x33c7x45+ _0x33c7x3f;var _0x33c7x48=_0x33c7x46+ _0x33c7x40;var _0x33c7x49=_0x33c7x47+ _0x33c7x41;var _0x33c7x4a=_0x33c7x48- 3* _0x33c7x40;var _0x33c7x4b=_0x33c7x49- 3* _0x33c7x41;_0x33c7x15[_0x141d[28]]();_0x33c7x15[_0x141d[7]](_0x33c7x44,_0x33c7x45);_0x33c7x15[_0x141d[8]](_0x33c7x46,_0x33c7x47);_0x33c7x15[_0x141d[7]](_0x33c7x4a+ _0x33c7x40,_0x33c7x4b+ _0x33c7x41);_0x33c7x15[_0x141d[8]](_0x33c7x42,_0x33c7x43);_0x33c7x15[_0x141d[29]]()};mxCellRenderer[_0x141d[0]][_0x141d[12]][_0x141d[76]]= _0x33c7x36;mxMarker[_0x141d[78]](_0x141d[77],function(_0x33c7x32,_0x33c7x1a,_0x33c7x4c,_0x33c7x39,_0x33c7x4d,_0x33c7x4e,_0x33c7x4f,_0x33c7x50,_0x33c7x51,_0x33c7x52){var _0x33c7x3c=_0x33c7x4d* (_0x33c7x4f+ _0x33c7x51+ 1);var _0x33c7x3d=_0x33c7x4e* (_0x33c7x4f+ _0x33c7x51+ 1);return function(){_0x33c7x32[_0x141d[28]]();_0x33c7x32[_0x141d[7]](_0x33c7x39[_0x141d[68]]- _0x33c7x3c/ 2- _0x33c7x3d/ 2,_0x33c7x39[_0x141d[69]]- _0x33c7x3d/ 2+ _0x33c7x3c/ 2);_0x33c7x32[_0x141d[8]](_0x33c7x39[_0x141d[68]]+ _0x33c7x3d/ 2- 3* _0x33c7x3c/ 2,_0x33c7x39[_0x141d[69]]- 3* _0x33c7x3d/ 2- _0x33c7x3c/ 2);_0x33c7x32[_0x141d[29]]()}});var _0x33c7x53=-99;if( typeof (mxVertexHandler)!= _0x141d[79]){function _0x33c7x54(_0x33c7x33){mxVertexHandler[_0x141d[24]](this,_0x33c7x33)}mxUtils[_0x141d[25]](_0x33c7x54,mxVertexHandler);_0x33c7x54[_0x141d[0]][_0x141d[80]]= false;_0x33c7x54[_0x141d[0]][_0x141d[81]]= function(){this[_0x141d[82]]= mxUtils[_0x141d[5]](this[_0x141d[83]][_0x141d[4]],mxConstants.STYLE_HORIZONTAL,true);var _0x33c7x55=this[_0x141d[83]][_0x141d[85]][_0x141d[84]];if(this[_0x141d[86]]!= null){var _0x33c7x34= new mxRectangle(0,0,this[_0x141d[86]][_0x141d[70]],this[_0x141d[86]][_0x141d[71]]);this[_0x141d[87]]= new mxImageShape(_0x33c7x34,this[_0x141d[86]][_0x141d[88]])}else {var _0x33c7x4f=10;var _0x33c7x34= new mxRectangle(0,0,_0x33c7x4f,_0x33c7x4f);this[_0x141d[87]]= new mxRhombus(_0x33c7x34,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};this[_0x141d[87]][_0x141d[89]]= (_0x33c7x55[_0x141d[89]]!= mxConstants[_0x141d[90]])?mxConstants[_0x141d[91]]:mxConstants[_0x141d[90]];this[_0x141d[87]][_0x141d[81]](_0x33c7x55[_0x141d[93]]()[_0x141d[92]]());this[_0x141d[87]][_0x141d[95]][_0x141d[4]][_0x141d[94]]= this[_0x141d[96]]();mxEvent[_0x141d[97]](this[_0x141d[87]][_0x141d[95]],_0x33c7x55,this[_0x141d[83]]);mxVertexHandler[_0x141d[0]][_0x141d[81]][_0x141d[30]](this,arguments)};_0x33c7x54[_0x141d[0]][_0x141d[96]]= function(){return _0x141d[98]};_0x33c7x54[_0x141d[0]][_0x141d[99]]= function(){mxVertexHandler[_0x141d[0]][_0x141d[99]][_0x141d[30]](this,arguments);var _0x33c7x4f=this[_0x141d[87]][_0x141d[100]][_0x141d[70]];this[_0x141d[87]][_0x141d[100]]= this[_0x141d[101]](_0x33c7x4f);this[_0x141d[87]][_0x141d[99]]()};_0x33c7x54[_0x141d[0]][_0x141d[102]]= function(){mxVertexHandler[_0x141d[0]][_0x141d[102]][_0x141d[30]](this,arguments);if(this[_0x141d[87]]!= null){this[_0x141d[87]][_0x141d[102]]();this[_0x141d[87]]= null}};_0x33c7x54[_0x141d[0]][_0x141d[103]]= function(_0x33c7x56){if(_0x33c7x56[_0x141d[104]](this[_0x141d[87]])){return _0x33c7x53};return mxVertexHandler[_0x141d[0]][_0x141d[103]][_0x141d[30]](this,arguments)};_0x33c7x54[_0x141d[0]][_0x141d[105]]= function(_0x33c7x57,_0x33c7x56){if(!_0x33c7x56[_0x141d[106]]()&& this[_0x141d[107]]== _0x33c7x53){var _0x33c7x58= new mxPoint(_0x33c7x56[_0x141d[108]](),_0x33c7x56[_0x141d[109]]());this[_0x141d[110]](_0x33c7x58);var _0x33c7x59=this[_0x141d[84]][_0x141d[112]](_0x33c7x56[_0x141d[111]]());var _0x33c7x5a=this[_0x141d[84]][_0x141d[93]]()[_0x141d[113]];if(_0x33c7x59&& this[_0x141d[80]]){_0x33c7x58[_0x141d[68]]= this[_0x141d[84]][_0x141d[114]](_0x33c7x58[_0x141d[68]]/ _0x33c7x5a)* _0x33c7x5a;_0x33c7x58[_0x141d[69]]= this[_0x141d[84]][_0x141d[114]](_0x33c7x58[_0x141d[69]]/ _0x33c7x5a)* _0x33c7x5a};this[_0x141d[115]](_0x33c7x58);this[_0x141d[116]](this[_0x141d[87]],_0x33c7x58[_0x141d[68]],_0x33c7x58[_0x141d[69]]);this[_0x141d[83]][_0x141d[85]][_0x141d[84]][_0x141d[117]][_0x141d[99]](this[_0x141d[83]],true);_0x33c7x56[_0x141d[118]]()}else {mxVertexHandler[_0x141d[0]][_0x141d[105]][_0x141d[30]](this,arguments)}};_0x33c7x54[_0x141d[0]][_0x141d[119]]= function(_0x33c7x57,_0x33c7x56){if(!_0x33c7x56[_0x141d[106]]()&& this[_0x141d[107]]== _0x33c7x53){this[_0x141d[120]]();this[_0x141d[121]]();_0x33c7x56[_0x141d[118]]()}else {mxVertexHandler[_0x141d[0]][_0x141d[119]][_0x141d[30]](this,arguments)}};_0x33c7x54[_0x141d[0]][_0x141d[101]]= function(_0x33c7x4f){var _0x33c7x5b=this[_0x141d[83]][_0x141d[123]][_0x141d[122]]();var _0x33c7x5c=mxUtils[_0x141d[124]](_0x33c7x5b);var _0x33c7x5d=Math[_0x141d[125]](_0x33c7x5c);var _0x33c7x5e=Math[_0x141d[126]](_0x33c7x5c);var _0x33c7x34= new mxRectangle(this[_0x141d[83]][_0x141d[68]],this[_0x141d[83]][_0x141d[69]],this[_0x141d[83]][_0x141d[70]],this[_0x141d[83]][_0x141d[71]]);if(this[_0x141d[83]][_0x141d[123]][_0x141d[127]]()){var _0x33c7x5f=(_0x33c7x34[_0x141d[70]]- _0x33c7x34[_0x141d[71]])/ 2;_0x33c7x34[_0x141d[68]]+= _0x33c7x5f;_0x33c7x34[_0x141d[69]]-= _0x33c7x5f;var _0x33c7x23=_0x33c7x34[_0x141d[70]];_0x33c7x34[_0x141d[70]]= _0x33c7x34[_0x141d[71]];_0x33c7x34[_0x141d[71]]= _0x33c7x23};var _0x33c7x60=this[_0x141d[128]](_0x33c7x34);if(this[_0x141d[83]][_0x141d[123]][_0x141d[129]]){_0x33c7x60[_0x141d[68]]= 2* _0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]- _0x33c7x60[_0x141d[68]]};if(this[_0x141d[83]][_0x141d[123]][_0x141d[130]]){_0x33c7x60[_0x141d[69]]= 2* _0x33c7x34[_0x141d[69]]+ _0x33c7x34[_0x141d[71]]- _0x33c7x60[_0x141d[69]]};_0x33c7x60= mxUtils[_0x141d[133]](_0x33c7x60,_0x33c7x5d,_0x33c7x5e, new mxPoint(this[_0x141d[83]][_0x141d[131]](),this[_0x141d[83]][_0x141d[132]]()));return new mxRectangle(_0x33c7x60[_0x141d[68]]- _0x33c7x4f/ 2,_0x33c7x60[_0x141d[69]]- _0x33c7x4f/ 2,_0x33c7x4f,_0x33c7x4f)};_0x33c7x54[_0x141d[0]][_0x141d[128]]= function(_0x33c7x34){return null};_0x33c7x54[_0x141d[0]][_0x141d[115]]= function(_0x33c7x58){};_0x33c7x54[_0x141d[0]][_0x141d[110]]= function(_0x33c7x58){_0x33c7x58[_0x141d[68]]= Math[_0x141d[34]](this[_0x141d[83]][_0x141d[68]],Math[_0x141d[6]](this[_0x141d[83]][_0x141d[68]]+ this[_0x141d[83]][_0x141d[70]],_0x33c7x58[_0x141d[68]]));_0x33c7x58[_0x141d[69]]= Math[_0x141d[34]](this[_0x141d[83]][_0x141d[69]],Math[_0x141d[6]](this[_0x141d[83]][_0x141d[69]]+ this[_0x141d[83]][_0x141d[71]],_0x33c7x58[_0x141d[69]]))};_0x33c7x54[_0x141d[0]][_0x141d[120]]= function(){};function _0x33c7x61(_0x33c7x33){_0x33c7x54[_0x141d[24]](this,_0x33c7x33)}mxUtils[_0x141d[25]](_0x33c7x61,_0x33c7x54);_0x33c7x61[_0x141d[0]][_0x141d[128]]= function(_0x33c7x34){var _0x33c7x5a=this[_0x141d[84]][_0x141d[93]]()[_0x141d[113]];var _0x33c7xb=Math[_0x141d[6]](_0x33c7x34[_0x141d[70]],mxUtils[_0x141d[5]](this[_0x141d[83]][_0x141d[4]],_0x141d[14],60)* _0x33c7x5a);var _0x33c7xc=Math[_0x141d[6]](_0x33c7x34[_0x141d[71]],mxUtils[_0x141d[5]](this[_0x141d[83]][_0x141d[4]],_0x141d[15],20)* _0x33c7x5a);var _0x33c7xd=mxUtils[_0x141d[5]](this[_0x141d[83]][_0x141d[4]],_0x141d[16],_0x141d[17]);var _0x33c7x3=(_0x33c7xd== _0x141d[18])?_0x33c7x34[_0x141d[68]]+ _0x33c7xb:_0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]- _0x33c7xb;return new mxPoint(_0x33c7x3,_0x33c7x34[_0x141d[69]]+ _0x33c7xc)};_0x33c7x61[_0x141d[0]][_0x141d[115]]= function(_0x33c7x58){var _0x33c7x5b=this[_0x141d[83]][_0x141d[123]][_0x141d[122]]();var _0x33c7x5c=mxUtils[_0x141d[124]](_0x33c7x5b);var _0x33c7x5d=Math[_0x141d[125]](-_0x33c7x5c);var _0x33c7x5e=Math[_0x141d[126]](-_0x33c7x5c);var _0x33c7x34= new mxRectangle(this[_0x141d[83]][_0x141d[68]],this[_0x141d[83]][_0x141d[69]],this[_0x141d[83]][_0x141d[70]],this[_0x141d[83]][_0x141d[71]]);if(this[_0x141d[83]][_0x141d[123]][_0x141d[127]]()){var _0x33c7x5f=(_0x33c7x34[_0x141d[70]]- _0x33c7x34[_0x141d[71]])/ 2;_0x33c7x34[_0x141d[68]]+= _0x33c7x5f;_0x33c7x34[_0x141d[69]]-= _0x33c7x5f;var _0x33c7x23=_0x33c7x34[_0x141d[70]];_0x33c7x34[_0x141d[70]]= _0x33c7x34[_0x141d[71]];_0x33c7x34[_0x141d[71]]= _0x33c7x23};var _0x33c7x60= new mxPoint(_0x33c7x58[_0x141d[68]],_0x33c7x58[_0x141d[69]]);_0x33c7x60= mxUtils[_0x141d[133]](_0x33c7x60,_0x33c7x5d,_0x33c7x5e, new mxPoint(this[_0x141d[83]][_0x141d[131]](),this[_0x141d[83]][_0x141d[132]]()));if(this[_0x141d[83]][_0x141d[123]][_0x141d[129]]){_0x33c7x60[_0x141d[68]]= 2* _0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]- _0x33c7x60[_0x141d[68]]};if(this[_0x141d[83]][_0x141d[123]][_0x141d[130]]){_0x33c7x60[_0x141d[69]]= 2* _0x33c7x34[_0x141d[69]]+ _0x33c7x34[_0x141d[71]]- _0x33c7x60[_0x141d[69]]};var _0x33c7x62=this[_0x141d[134]](_0x33c7x60,_0x33c7x34);if(_0x33c7x62!= null){if(this[_0x141d[83]][_0x141d[123]][_0x141d[129]]){_0x33c7x62[_0x141d[68]]= 2* _0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]- _0x33c7x62[_0x141d[68]]};if(this[_0x141d[83]][_0x141d[123]][_0x141d[130]]){_0x33c7x62[_0x141d[69]]= 2* _0x33c7x34[_0x141d[69]]+ _0x33c7x34[_0x141d[71]]- _0x33c7x62[_0x141d[69]]};_0x33c7x5d= Math[_0x141d[125]](_0x33c7x5c);_0x33c7x5e= Math[_0x141d[126]](_0x33c7x5c);_0x33c7x62= mxUtils[_0x141d[133]](_0x33c7x62,_0x33c7x5d,_0x33c7x5e, new mxPoint(this[_0x141d[83]][_0x141d[131]](),this[_0x141d[83]][_0x141d[132]]()));_0x33c7x58[_0x141d[68]]= _0x33c7x62[_0x141d[68]];_0x33c7x58[_0x141d[69]]= _0x33c7x62[_0x141d[69]]}};_0x33c7x61[_0x141d[0]][_0x141d[134]]= function(_0x33c7x60,_0x33c7x34){var _0x33c7xd=mxUtils[_0x141d[5]](this[_0x141d[83]][_0x141d[4]],_0x141d[16],_0x141d[17]);var _0x33c7xb=(_0x33c7xd== _0x141d[18])?_0x33c7x60[_0x141d[68]]- _0x33c7x34[_0x141d[68]]:_0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]- _0x33c7x60[_0x141d[68]];var _0x33c7xc=_0x33c7x60[_0x141d[69]]- _0x33c7x34[_0x141d[69]];var _0x33c7x5a=this[_0x141d[84]][_0x141d[93]]()[_0x141d[113]];this[_0x141d[83]][_0x141d[4]][_0x141d[14]]= Math[_0x141d[135]](Math[_0x141d[34]](1,_0x33c7xb)/ _0x33c7x5a);this[_0x141d[83]][_0x141d[4]][_0x141d[15]]= Math[_0x141d[135]](Math[_0x141d[34]](1,_0x33c7xc)/ _0x33c7x5a)};_0x33c7x61[_0x141d[0]][_0x141d[120]]= function(){var _0x33c7x63=this[_0x141d[84]][_0x141d[136]]();_0x33c7x63[_0x141d[137]]();try{this[_0x141d[83]][_0x141d[85]][_0x141d[84]][_0x141d[139]](_0x141d[14],this[_0x141d[83]][_0x141d[4]][_0x141d[14]],[this[_0x141d[83]][_0x141d[138]]]);this[_0x141d[83]][_0x141d[85]][_0x141d[84]][_0x141d[139]](_0x141d[15],this[_0x141d[83]][_0x141d[4]][_0x141d[15]],[this[_0x141d[83]][_0x141d[138]]])}finally{_0x33c7x63[_0x141d[140]]()}};function _0x33c7x64(_0x33c7x33){_0x33c7x61[_0x141d[24]](this,_0x33c7x33)}mxUtils[_0x141d[25]](_0x33c7x64,_0x33c7x61);_0x33c7x64[_0x141d[0]][_0x141d[128]]= function(_0x33c7x34){var _0x33c7x5a=this[_0x141d[84]][_0x141d[93]]()[_0x141d[113]];var _0x33c7x65=mxUtils[_0x141d[5]](this[_0x141d[83]][_0x141d[4]],mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);return new mxPoint(_0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]/ 2,_0x33c7x34[_0x141d[69]]+ Math[_0x141d[6]](_0x33c7x34[_0x141d[71]],_0x33c7x65* _0x33c7x5a))};_0x33c7x64[_0x141d[0]][_0x141d[134]]= function(_0x33c7x58,_0x33c7x34){_0x33c7x58[_0x141d[68]]= _0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]/ 2;startSize= _0x33c7x58[_0x141d[69]]- _0x33c7x34[_0x141d[69]];var _0x33c7x5a=this[_0x141d[84]][_0x141d[93]]()[_0x141d[113]];this[_0x141d[83]][_0x141d[4]][_0x141d[141]]= Math[_0x141d[135]](Math[_0x141d[34]](1,startSize)/ _0x33c7x5a);return _0x33c7x58};_0x33c7x64[_0x141d[0]][_0x141d[120]]= function(){this[_0x141d[83]][_0x141d[85]][_0x141d[84]][_0x141d[139]](_0x141d[141],this[_0x141d[83]][_0x141d[4]][_0x141d[141]],[this[_0x141d[83]][_0x141d[138]]])};function _0x33c7x66(_0x33c7x33){_0x33c7x61[_0x141d[24]](this,_0x33c7x33)}mxUtils[_0x141d[25]](_0x33c7x66,_0x33c7x61);_0x33c7x66[_0x141d[0]][_0x141d[142]]= 20;_0x33c7x66[_0x141d[0]][_0x141d[143]]= 1;_0x33c7x66[_0x141d[0]][_0x141d[128]]= function(_0x33c7x34){var _0x33c7x5a=this[_0x141d[84]][_0x141d[93]]()[_0x141d[113]];var _0x33c7x67=Math[_0x141d[6]](_0x33c7x34[_0x141d[70]],Math[_0x141d[6]](_0x33c7x34[_0x141d[71]],mxUtils[_0x141d[5]](this[_0x141d[83]][_0x141d[4]],_0x141d[2],this[_0x141d[142]])* _0x33c7x5a/ this[_0x141d[143]]));return new mxPoint(_0x33c7x34[_0x141d[68]]+ _0x33c7x67,_0x33c7x34[_0x141d[69]]+ _0x33c7x67)};_0x33c7x66[_0x141d[0]][_0x141d[134]]= function(_0x33c7x60,_0x33c7x34){var _0x33c7x4f=Math[_0x141d[34]](0,Math[_0x141d[6]](Math[_0x141d[6]](_0x33c7x34[_0x141d[70]]/ this[_0x141d[143]],_0x33c7x60[_0x141d[68]]- _0x33c7x34[_0x141d[68]]),Math[_0x141d[6]](_0x33c7x34[_0x141d[71]]/ this[_0x141d[143]],_0x33c7x60[_0x141d[69]]- _0x33c7x34[_0x141d[69]])));var _0x33c7x5a=this[_0x141d[84]][_0x141d[93]]()[_0x141d[113]];this[_0x141d[83]][_0x141d[4]][_0x141d[2]]= Math[_0x141d[135]](Math[_0x141d[34]](1,_0x33c7x4f)/ _0x33c7x5a)* this[_0x141d[143]];return new mxPoint(_0x33c7x34[_0x141d[68]]+ _0x33c7x4f,_0x33c7x34[_0x141d[69]]+ _0x33c7x4f)};_0x33c7x66[_0x141d[0]][_0x141d[120]]= function(){this[_0x141d[83]][_0x141d[85]][_0x141d[84]][_0x141d[139]](_0x141d[2],this[_0x141d[83]][_0x141d[4]][_0x141d[2]],[this[_0x141d[83]][_0x141d[138]]])};function _0x33c7x68(_0x33c7x33){_0x33c7x66[_0x141d[24]](this,_0x33c7x33)}mxUtils[_0x141d[25]](_0x33c7x68,_0x33c7x66);_0x33c7x68[_0x141d[0]][_0x141d[142]]= 30;_0x33c7x68[_0x141d[0]][_0x141d[143]]= 2;function _0x33c7x69(_0x33c7x33){_0x33c7x66[_0x141d[24]](this,_0x33c7x33)}mxUtils[_0x141d[25]](_0x33c7x69,_0x33c7x66);_0x33c7x69[_0x141d[0]][_0x141d[142]]= 30;_0x33c7x69[_0x141d[0]][_0x141d[143]]= 1;_0x33c7x69[_0x141d[0]][_0x141d[128]]= function(_0x33c7x34){var _0x33c7x5a=this[_0x141d[84]][_0x141d[93]]()[_0x141d[113]];var _0x33c7x67=Math[_0x141d[6]](_0x33c7x34[_0x141d[70]],Math[_0x141d[6]](_0x33c7x34[_0x141d[71]],mxUtils[_0x141d[5]](this[_0x141d[83]][_0x141d[4]],_0x141d[2],this[_0x141d[142]])* _0x33c7x5a/ this[_0x141d[143]]));return new mxPoint(_0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]- _0x33c7x67,_0x33c7x34[_0x141d[69]]+ _0x33c7x67)};_0x33c7x69[_0x141d[0]][_0x141d[134]]= function(_0x33c7x60,_0x33c7x34){var _0x33c7x4f=Math[_0x141d[34]](0,Math[_0x141d[6]](Math[_0x141d[6]](_0x33c7x34[_0x141d[70]]/ this[_0x141d[143]],_0x33c7x60[_0x141d[68]]- _0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]),Math[_0x141d[6]](_0x33c7x34[_0x141d[71]]/ this[_0x141d[143]],_0x33c7x60[_0x141d[69]]- _0x33c7x34[_0x141d[69]])));var _0x33c7x5a=this[_0x141d[84]][_0x141d[93]]()[_0x141d[113]];this[_0x141d[83]][_0x141d[4]][_0x141d[2]]= Math[_0x141d[135]](Math[_0x141d[34]](1,_0x33c7x4f)/ _0x33c7x5a)* this[_0x141d[143]];return new mxPoint(_0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]- _0x33c7x4f,_0x33c7x34[_0x141d[69]]+ _0x33c7x4f)};function _0x33c7x6a(_0x33c7x33){_0x33c7x66[_0x141d[24]](this,_0x33c7x33)}mxUtils[_0x141d[25]](_0x33c7x6a,_0x33c7x66);_0x33c7x6a[_0x141d[0]][_0x141d[142]]= 0.2;_0x33c7x6a[_0x141d[0]][_0x141d[143]]= 1;_0x33c7x6a[_0x141d[0]][_0x141d[128]]= function(_0x33c7x34){var _0x33c7x67=mxUtils[_0x141d[5]](this[_0x141d[83]][_0x141d[4]],_0x141d[2],this[_0x141d[142]]);return new mxPoint(_0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]* _0x33c7x67,_0x33c7x34[_0x141d[69]]+ _0x33c7x34[_0x141d[71]]/ 2)};_0x33c7x6a[_0x141d[0]][_0x141d[134]]= function(_0x33c7x60,_0x33c7x34){var _0x33c7x4f=Math[_0x141d[6]](1,(_0x33c7x60[_0x141d[68]]- _0x33c7x34[_0x141d[68]])/ _0x33c7x34[_0x141d[70]]);this[_0x141d[83]][_0x141d[4]][_0x141d[2]]= _0x33c7x4f;return new mxPoint(_0x33c7x34[_0x141d[68]]+ _0x33c7x4f* _0x33c7x34[_0x141d[70]],_0x33c7x34[_0x141d[69]]+ _0x33c7x34[_0x141d[71]]/ 2)};function _0x33c7x6b(_0x33c7x33){_0x33c7x66[_0x141d[24]](this,_0x33c7x33)}mxUtils[_0x141d[25]](_0x33c7x6b,_0x33c7x66);_0x33c7x6b[_0x141d[0]][_0x141d[142]]= 0.4;_0x33c7x6b[_0x141d[0]][_0x141d[143]]= 1;_0x33c7x6b[_0x141d[0]][_0x141d[128]]= function(_0x33c7x34){var _0x33c7x67=mxUtils[_0x141d[5]](this[_0x141d[83]][_0x141d[4]],_0x141d[2],this[_0x141d[142]]);return new mxPoint(_0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]/ 2,_0x33c7x34[_0x141d[69]]+ _0x33c7x67* _0x33c7x34[_0x141d[71]]/ 2)};_0x33c7x6b[_0x141d[0]][_0x141d[134]]= function(_0x33c7x60,_0x33c7x34){var _0x33c7x4f=Math[_0x141d[34]](0,Math[_0x141d[6]](1,((_0x33c7x60[_0x141d[69]]- _0x33c7x34[_0x141d[69]])/ _0x33c7x34[_0x141d[71]])* 2));this[_0x141d[83]][_0x141d[4]][_0x141d[2]]= _0x33c7x4f;return new mxPoint(_0x33c7x34[_0x141d[68]]+ _0x33c7x34[_0x141d[70]]/ 2,_0x33c7x34[_0x141d[69]]+ _0x33c7x4f* _0x33c7x34[_0x141d[71]]/ 2)};var _0x33c7x6c={"\x73\x77\x69\x6D\x6C\x61\x6E\x65":_0x33c7x64,"\x66\x6F\x6C\x64\x65\x72":_0x33c7x61,"\x63\x75\x62\x65":_0x33c7x66,"\x63\x61\x72\x64":_0x33c7x68,"\x6E\x6F\x74\x65":_0x33c7x69,"\x73\x74\x65\x70":_0x33c7x6a,"\x74\x61\x70\x65":_0x33c7x6b};var _0x33c7x6d=mxGraph[_0x141d[0]][_0x141d[144]];mxGraph[_0x141d[0]][_0x141d[144]]= function(_0x33c7x33){if(_0x33c7x33!= null){var _0x33c7x6e=_0x33c7x6c[_0x33c7x33[_0x141d[4]][_0x141d[123]]];if(_0x33c7x6e!= null){return new _0x33c7x6e(_0x33c7x33)}};return _0x33c7x6d[_0x141d[30]](this,arguments)}};mxGraph[_0x141d[0]][_0x141d[145]]= function(_0x33c7x6f,_0x33c7x50){if(_0x33c7x6f!= null&& _0x33c7x6f[_0x141d[123]]!= null){if(_0x33c7x6f[_0x141d[123]][_0x141d[146]]!= null){if(_0x33c7x6f[_0x141d[123]][_0x141d[146]]!= null){return _0x33c7x6f[_0x141d[123]][_0x141d[146]][_0x141d[147]]}}else {if(_0x33c7x6f[_0x141d[123]][_0x141d[147]]!= null){return _0x33c7x6f[_0x141d[123]][_0x141d[147]]}}};return null};mxRectangleShape[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxLabel[_0x141d[0]][_0x141d[147]]= mxRectangleShape[_0x141d[0]][_0x141d[147]];mxImageShape[_0x141d[0]][_0x141d[147]]= mxRectangleShape[_0x141d[0]][_0x141d[147]];mxSwimlane[_0x141d[0]][_0x141d[147]]= mxRectangleShape[_0x141d[0]][_0x141d[147]];_0x33c7x14[_0x141d[0]][_0x141d[147]]= mxRectangleShape[_0x141d[0]][_0x141d[147]];_0x33c7x9[_0x141d[0]][_0x141d[147]]= mxRectangleShape[_0x141d[0]][_0x141d[147]];_0x33c7x10[_0x141d[0]][_0x141d[147]]= mxRectangleShape[_0x141d[0]][_0x141d[147]];_0x33c7x1[_0x141d[0]][_0x141d[147]]= mxRectangleShape[_0x141d[0]][_0x141d[147]];_0x33c7xa[_0x141d[0]][_0x141d[147]]= mxRectangleShape[_0x141d[0]][_0x141d[147]];mxCylinder[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0.15,0.05),false), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.85,0.05),false), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.3),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.7),true), new mxConnectionConstraint( new mxPoint(0.15,0.95),false), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.85,0.95),false)];_0x33c7x25[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0.1),false), new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.75,0.1),false), new mxConnectionConstraint( new mxPoint(0,1/ 3),false), new mxConnectionConstraint( new mxPoint(0,1),false), new mxConnectionConstraint( new mxPoint(1,1/ 3),false), new mxConnectionConstraint( new mxPoint(1,1),false), new mxConnectionConstraint( new mxPoint(0.5,0.5),false)];_0x33c7x28[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0,0.3),true), new mxConnectionConstraint( new mxPoint(0,0.7),true), new mxConnectionConstraint( new mxPoint(1,0.25),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];mxActor[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.25,0.2),false), new mxConnectionConstraint( new mxPoint(0.1,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.75,0.25),false), new mxConnectionConstraint( new mxPoint(0.9,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.75),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true)];_0x33c7x11[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.35),false), new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0,0.65),false), new mxConnectionConstraint( new mxPoint(1,0.35),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.65),false), new mxConnectionConstraint( new mxPoint(0.25,1),false), new mxConnectionConstraint( new mxPoint(0.75,0),false)];_0x33c7x13[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.75,0),true), new mxConnectionConstraint( new mxPoint(0.25,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.75,1),true), new mxConnectionConstraint( new mxPoint(0.1,0.25),false), new mxConnectionConstraint( new mxPoint(0.2,0.5),false), new mxConnectionConstraint( new mxPoint(0.1,0.75),false), new mxConnectionConstraint( new mxPoint(0.9,0.25),false), new mxConnectionConstraint( new mxPoint(1,0.5),false), new mxConnectionConstraint( new mxPoint(0.9,0.75),false)];mxLine[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.5),false), new mxConnectionConstraint( new mxPoint(0.25,0.5),false), new mxConnectionConstraint( new mxPoint(0.75,0.5),false), new mxConnectionConstraint( new mxPoint(1,0.5),false)];_0x33c7x26[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0.5,0),false), new mxConnectionConstraint( new mxPoint(0.5,1),false)];mxEllipse[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0,0),true), new mxConnectionConstraint( new mxPoint(1,0),true), new mxConnectionConstraint( new mxPoint(0,1),true), new mxConnectionConstraint( new mxPoint(1,1),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5))];mxDoubleEllipse[_0x141d[0]][_0x141d[147]]= mxEllipse[_0x141d[0]][_0x141d[147]];mxRhombus[_0x141d[0]][_0x141d[147]]= mxEllipse[_0x141d[0]][_0x141d[147]];mxTriangle[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0,0.25),true), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0,0.75),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(1,0.5),true)];mxHexagon[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0.375,0),true), new mxConnectionConstraint( new mxPoint(0.5,0),true), new mxConnectionConstraint( new mxPoint(0.625,0),true), new mxConnectionConstraint( new mxPoint(0.125,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(0.125,0.75),false), new mxConnectionConstraint( new mxPoint(0.875,0.25),false), new mxConnectionConstraint( new mxPoint(0,0.5),true), new mxConnectionConstraint( new mxPoint(1,0.5),true), new mxConnectionConstraint( new mxPoint(0.875,0.75),false), new mxConnectionConstraint( new mxPoint(0.375,1),true), new mxConnectionConstraint( new mxPoint(0.5,1),true), new mxConnectionConstraint( new mxPoint(0.625,1),true)];mxCloud[_0x141d[0]][_0x141d[147]]= [ new mxConnectionConstraint( new mxPoint(0.25,0.25),false), new mxConnectionConstraint( new mxPoint(0.4,0.1),false), new mxConnectionConstraint( new mxPoint(0.16,0.55),false), new mxConnectionConstraint( new mxPoint(0.07,0.4),false), new mxConnectionConstraint( new mxPoint(0.31,0.8),false), new mxConnectionConstraint( new mxPoint(0.13,0.77),false), new mxConnectionConstraint( new mxPoint(0.8,0.8),false), new mxConnectionConstraint( new mxPoint(0.55,0.95),false), new mxConnectionConstraint( new mxPoint(0.875,0.5),false), new mxConnectionConstraint( new mxPoint(0.96,0.7),false), new mxConnectionConstraint( new mxPoint(0.625,0.2),false), new mxConnectionConstraint( new mxPoint(0.88,0.25),false)];mxArrow[_0x141d[0]][_0x141d[147]]= null})() \ No newline at end of file diff --git a/public/assets/plugins/square/js/Sidebar.js b/public/assets/plugins/square/js/Sidebar.js index 6e4129c..2ddc35b 100644 --- a/public/assets/plugins/square/js/Sidebar.js +++ b/public/assets/plugins/square/js/Sidebar.js @@ -1,932 +1 @@ -'use strict'; - -/** - * Construcs a new sidebar for the given editor. - */ -function Sidebar(editorUi, container) { - this.editorUi = editorUi; - this.container = container; - this.palettes = new Object(); - this.showTooltips = true; - this.graph = new Graph(document.createElement('div'), null, null, this.editorUi - .editor.graph.getStylesheet()); - this.graph.resetViewOnRootChange = false; - this.graph.foldingEnabled = false; - this.graph.setConnectable(false); - this.graph.autoScroll = false; - this.graph.setTooltips(false); - this.graph.setEnabled(false); - - // Container must be in the DOM for correct HTML rendering - this.graph.container.style.visibility = 'hidden'; - this.graph.container.style.position = 'absolute'; - document.body.appendChild(this.graph.container); - - if (!mxClient.IS_TOUCH) { - mxEvent.addListener(document, 'mouseup', mxUtils.bind(this, function() { - this.showTooltips = true; - })); - - // Enables tooltips after scroll - mxEvent.addListener(container, 'scroll', mxUtils.bind(this, function() { - this.showTooltips = true; - })); - - mxEvent.addListener(document, 'mousedown', mxUtils.bind(this, function() { - this.showTooltips = false; - this.hideTooltip(); - })); - - mxEvent.addListener(document, 'mousemove', mxUtils.bind(this, function(evt) { - var src = mxEvent.getSource(evt); - - while (src != null) { - if (src == this.currentElt) { - return; - } - - src = src.parentNode; - } - - this.hideTooltip(); - })); - - // Handles mouse leaving the window - mxEvent.addListener(document, 'mouseout', mxUtils.bind(this, function(evt) { - if (evt.toElement == null && evt.relatedTarget == null) { - this.hideTooltip(); - } - })); - } - - this.init(); - - // Pre-fetches tooltip image - new Image().src = IMAGE_PATH + '/tooltip.png'; -}; - -/** - * Adds all palettes to the sidebar. - */ -Sidebar.prototype.init = function() { - var dir = STENCIL_PATH; - console.log(dir); - - this.addImagePalette('entry', mxResources.get('entry'), dir + '/entry/', - '_128x128.png', ['start', 'finally', 'end'], [mxResources.get('start'), - mxResources.get('finally'), mxResources.get('end') - ]); - this.addImagePalette('call_management', mxResources.get('call_management'), - dir + '/call_management/', '_128x128.png', ['answer', 'hangup', 'dial', - 'ext_dial', 'queue', 'voicemail', 'callback' - ], [mxResources.get('answer'), mxResources.get('hangup'), mxResources.get( - 'dial'), mxResources.get('ext_dial'), mxResources.get('queue'), - mxResources.get('voicemail'), mxResources.get('callback') - ]); - this.addImagePalette('variable', mxResources.get('variable'), dir + - '/variable/', '_128x128.png', ['set', 'math'], [mxResources.get('set'), - mxResources.get('math') - ]); - this.addImagePalette('playback', mxResources.get('playback'), dir + - '/playback/', '_128x128.png', ['playback', 'menu', - 'saydigits', 'saynumber', 'sayphonetic', 'tts', 'ispeechtts', 'getdigits', 'getsecretdigits' - ], [mxResources.get('playback'), mxResources - .get('menu'), mxResources.get('saydigits'), mxResources.get('saynumber'), - mxResources.get('sayphonetic'), mxResources.get('tts'), mxResources.get( - 'ispeechtts'), mxResources.get('getdigits'), mxResources.get('getsecretdigits') - ]); - this.addImagePalette('recording', mxResources.get('recording'), dir + - '/recording/', '_128x128.png', ['record'], [mxResources.get('record')]); - this.addImagePalette('integrationServer', mxResources.get('integrationServer'), - dir + '/integration_server/', '_128x128.png', ['database', 'ispeechasr', - 'sendSMS', 'sendMail' - ], [ - mxResources.get('database'), mxResources.get('ispeechasr'), mxResources.get( - 'sendSMS'), mxResources.get( - 'sendMail') - ]); - this.addImagePalette('callflow', mxResources.get('callflow'), dir + - '/callflow/', '_128x128.png', ['gotoc', 'gotoif', 'gotoiftime', 'vswitch'], [ - mxResources.get('gotoc'), mxResources.get('gotoif'), mxResources.get( - 'gotoiftime'), mxResources.get('vswitch') - ]); - this.addImagePalette('stats', mxResources.get('stats'), dir + '/stats/', - '_128x128.png', [ - // 'queuelog', - 'goal' - ], [ - // mxResources.get('queuelog'), - mxResources.get('goal') - ]); - this.addImagePalette('general', mxResources.get('general'), dir + '/general/', - '_128x128.png', ['noop', 'system', 'agi', 'subproject', 'custom_app'], [ - mxResources.get( - 'noop'), mxResources.get('system'), mxResources.get('agi'), mxResources.get( - 'subproject'), mxResources.get( - 'custom_app') - ]); - -}; - -/** - * Specifies if tooltips should be visible. Default is true. - */ -Sidebar.prototype.enableTooltips = !mxClient.IS_TOUCH; - -/** - * Specifies the delay for the tooltip. Default is 16 px. - */ -Sidebar.prototype.tooltipBorder = 16; - -/** - * Specifies the delay for the tooltip. Default is 3 px. - */ -Sidebar.prototype.thumbBorder = 3; - -/** - * Specifies the delay for the tooltip. Default is 300 ms. - */ -Sidebar.prototype.tooltipDelay = 300; - -/** - * Specifies if edges should be used as templates if clicked. Default is true. - */ -Sidebar.prototype.installEdges = true; - -/** - * Specifies the URL of the gear image. - */ -Sidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png'; - -/** - * Specifies the width of the thumbnails. - */ -Sidebar.prototype.thumbWidth = 34; - -/** - * Specifies the height of the thumbnails. - */ -Sidebar.prototype.thumbHeight = 34; - -/** - * Specifies the padding for the thumbnails. Default is 3. - */ -Sidebar.prototype.thumbPadding = 2; - -/** - * Specifies the size of the sidebar titles. - */ -Sidebar.prototype.sidebarTitleSize = 9; - -/** - * Specifies if titles in the sidebar should be enabled. - */ -Sidebar.prototype.sidebarTitles = false; - -/** - * Specifies if titles in the tooltips should be enabled. - */ -Sidebar.prototype.tooltipTitles = false; - -/** - * Adds all palettes to the sidebar. - */ -Sidebar.prototype.showTooltip = function(elt, cells, title, showLabel) { - if (this.enableTooltips && this.showTooltips) { - if (this.currentElt != elt) { - if (this.thread != null) { - window.clearTimeout(this.thread); - this.thread = null; - } - - var show = mxUtils.bind(this, function() { - // Lazy creation of the DOM nodes and graph instance - if (this.tooltip == null) { - this.tooltip = document.createElement('div'); - this.tooltip.className = 'geSidebarTooltip'; - document.body.appendChild(this.tooltip); - - this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph - .getStylesheet()); - this.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder); - this.graph2.resetViewOnRootChange = false; - this.graph2.foldingEnabled = false; - this.graph2.autoScroll = false; - this.graph2.setTooltips(false); - this.graph2.setConnectable(false); - this.graph2.setEnabled(false); - - if (!mxClient.IS_SVG) { - this.graph2.view.canvas.style.position = 'relative'; - } - - this.tooltipImage = mxUtils.createImage(IMAGE_PATH + '/tooltip.png'); - this.tooltipImage.style.position = 'absolute'; - this.tooltipImage.style.width = '14px'; - this.tooltipImage.style.height = '27px'; - - document.body.appendChild(this.tooltipImage); - } - - this.tooltip.style.display = 'block'; - this.graph2.labelsVisible = (showLabel == null || showLabel); - this.graph2.model.clear(); - this.graph2.addCells(cells); - - var bounds = this.graph2.getGraphBounds(); - var width = bounds.width + 2 * this.tooltipBorder; - var height = bounds.height + 2 * this.tooltipBorder; - - if (mxClient.IS_QUIRKS) { - width += 4; - height += 4; - this.tooltip.style.overflow = 'hidden'; - } else { - this.tooltip.style.overflow = 'visible'; - } - - this.tooltipImage.style.visibility = 'visible'; - this.tooltip.style.width = width + 'px'; - - // Adds title for entry - if (this.tooltipTitles && title != null && title.length > 0) { - if (this.tooltipTitle == null) { - this.tooltipTitle = document.createElement('div'); - this.tooltipTitle.style.borderTop = '1px solid gray'; - this.tooltipTitle.style.textAlign = 'center'; - this.tooltipTitle.style.width = '100%'; - - // Oversize titles are cut-off currently. Should make tooltip wider later. - this.tooltipTitle.style.overflow = 'hidden'; - - if (mxClient.IS_SVG) { - this.tooltipTitle.style.paddingTop = '2px'; - } else { - this.tooltipTitle.style.position = 'absolute'; - this.tooltipTitle.style.paddingTop = '6px'; - } - - this.tooltip.appendChild(this.tooltipTitle); - } else { - this.tooltipTitle.innerHTML = ''; - } - - this.tooltipTitle.style.display = ''; - mxUtils.write(this.tooltipTitle, title); - - var dy = this.tooltipTitle.offsetHeight + 10; - height += dy; - - if (mxClient.IS_SVG) { - this.tooltipTitle.style.marginTop = (-dy) + 'px'; - } else { - height -= 6; - this.tooltipTitle.style.top = (height - dy) + 'px'; - } - } else if (this.tooltipTitle != null && this.tooltipTitle.parentNode != - null) { - this.tooltipTitle.style.display = 'none'; - } - - this.tooltip.style.height = height + 'px'; - var x0 = -Math.min(0, bounds.x - this.tooltipBorder); - var y0 = -Math.min(0, bounds.y - this.tooltipBorder); - - var left = this.container.clientWidth + this.editorUi.splitSize + 3; - var top = Math.max(0, (this.container.offsetTop + elt.offsetTop - this.container - .scrollTop - height / 2 + 16)); - - if (mxClient.IS_SVG) { - this.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 + - ',' + y0 + ')'); - } else { - this.graph2.view.drawPane.style.left = x0 + 'px'; - this.graph2.view.drawPane.style.top = y0 + 'px'; - } - - // Workaround for ignored position CSS style in IE9 - // (changes to relative without the following line) - // Added width of the page-sidebar - left += document.getElementById('page-sidebar').offsetWidth; - // Added static height of the page-navbar - top += 90; - - this.tooltip.style.position = 'absolute'; - this.tooltip.style.left = left + 'px'; - this.tooltip.style.top = top + 'px'; - this.tooltipImage.style.left = (left - 13) + 'px'; - this.tooltipImage.style.top = (top + height / 2 - 13) + 'px'; - }); - - if (this.tooltip != null && this.tooltip.style.display != 'none') { - show(); - } else { - this.thread = window.setTimeout(show, this.tooltipDelay); - } - - this.currentElt = elt; - } - } -}; - -/** - * Hides the current tooltip. - */ -Sidebar.prototype.hideTooltip = function() { - if (this.thread != null) { - window.clearTimeout(this.thread); - this.thread = null; - } - - if (this.tooltip != null) { - this.tooltip.style.display = 'none'; - this.tooltipImage.style.visibility = 'hidden'; - this.currentElt = null; - } -}; - -/** - * Creates and returns the given title element. - */ -Sidebar.prototype.createTitle = function(label) { - var elt = document.createElement('a'); - elt.setAttribute('href', 'javascript:void(0);'); - elt.className = 'geTitle'; - mxUtils.write(elt, label); - - return elt; -}; - -/** - * Creates a thumbnail for the given cells. - */ -Sidebar.prototype.createThumb = function(cells, width, height, parent, title, - showLabel) { - this.graph.labelsVisible = (showLabel == null || showLabel); - this.graph.view.scaleAndTranslate(1, 0, 0); - this.graph.addCells(cells); - var bounds = this.graph.getGraphBounds(); - var corr = this.thumbBorder; - var s = Math.min((width - 2) / (bounds.width - bounds.x + corr), (height - 2) / - (bounds.height - bounds.y + corr)); - var x0 = -Math.min(bounds.x, 0); - var y0 = -Math.min(bounds.y, 0); - this.graph.view.scaleAndTranslate(s, x0, y0); - - bounds = this.graph.getGraphBounds(); - var dx = Math.max(0, Math.floor((width - bounds.width - bounds.x) / 2)); - var dy = Math.max(0, Math.floor((height - bounds.height - bounds.y) / 2)); - - var node = null; - - // For supporting HTML labels in IE9 standards mode the container is cloned instead - if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO) { - node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true); - } - // LATER: Check if deep clone can be used for quirks if container in DOM - else { - node = this.graph.container.cloneNode(false); - node.innerHTML = this.graph.container.innerHTML; - } - - this.graph.getModel().clear(); - - // Catch-all event handling - if (mxClient.IS_IE6) { - parent.style.backgroundImage = 'url(' + this.editorUi.editor.transparentImage + - ')'; - } - - var dd = 3; - node.style.position = 'relative'; - node.style.overflow = 'hidden'; - node.style.cursor = 'pointer'; - node.style.left = (dx + dd) + 'px'; - node.style.top = (dy + dd) + 'px'; - node.style.width = width + 'px'; - node.style.height = height + 'px'; - node.style.visibility = ''; - node.style.minWidth = ''; - node.style.minHeight = ''; - - parent.appendChild(node); - - // Adds title for sidebar entries - if (this.sidebarTitles && title != null) { - var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2 : 0; - parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) + - 'px'; - - var div = document.createElement('div'); - div.style.fontSize = this.sidebarTitleSize + 'px'; - div.style.textAlign = 'center'; - div.style.whiteSpace = 'nowrap'; - - if (mxClient.IS_IE) { - div.style.height = (this.sidebarTitleSize + 12) + 'px'; - } - - div.style.paddingTop = '4px'; - mxUtils.write(div, title); - parent.appendChild(div); - } -}; - -/** - * Creates and returns a new palette item for the given image. - */ -Sidebar.prototype.createItem = function(cells, title, showLabel) { - var elt = document.createElement('a'); - elt.setAttribute('href', 'javascript:void(0);'); - elt.className = 'geItem'; - elt.style.overflow = 'hidden'; - var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 6; - elt.style.width = (this.thumbWidth + border) + 'px'; - elt.style.height = (this.thumbHeight + border) + 'px'; - elt.style.padding = this.thumbPadding + 'px'; - - // Blocks default click action - mxEvent.addListener(elt, 'click', function(evt) { - mxEvent.consume(evt); - }); - - this.createThumb(cells, this.thumbWidth, this.thumbHeight, elt, title, - showLabel); - - return elt; -}; - -/** - * Creates a drop handler for inserting the given cells. - */ -Sidebar.prototype.createDropHandler = function(cells, allowSplit) { - return function(graph, evt, target, x, y) { - if (graph.isEnabled()) { - cells = graph.getImportableCells(cells); - - if (cells.length > 0) { - var validDropTarget = (target != null) ? - graph.isValidDropTarget(target, cells, evt) : false; - var select = null; - - if (target != null && !validDropTarget) { - target = null; - } - - // Splits the target edge or inserts into target group - if (allowSplit && graph.isSplitEnabled() && graph.isSplitTarget(target, - cells, evt)) { - graph.splitEdge(target, cells, null, x, y); - select = cells; - } else if (cells.length > 0) { - select = graph.importCells(cells, x, y, target); - } - - if (select != null && select.length > 0) { - graph.scrollCellToVisible(select[0]); - graph.setSelectionCells(select); - } - } - } - }; -}; - -/** - * Creates and returns a preview element for the given width and height. - */ -Sidebar.prototype.createDragPreview = function(width, height) { - var elt = document.createElement('div'); - elt.style.border = '1px dashed black'; - elt.style.width = width + 'px'; - elt.style.height = height + 'px'; - - return elt; -}; - -/** - * Creates a drag source for the given element. - */ -Sidebar.prototype.createDragSource = function(elt, dropHandler, preview) { - var dragSource = mxUtils.makeDraggable(elt, this.editorUi.editor.graph, - dropHandler, - preview, 0, 0, this.editorUi.editor.graph.autoscroll, true, true); - - // Allows drop into cell only if target is a valid root - dragSource.getDropTarget = function(graph, x, y) { - var target = mxDragSource.prototype.getDropTarget.apply(this, arguments); - - if (!graph.isValidRoot(target)) { - target = null; - } - - return target; - }; - - return dragSource; -}; - -/** - * Adds a handler for inserting the cell with a single click. - */ -Sidebar.prototype.addClickHandler = function(elt, ds) { - var graph = this.editorUi.editor.graph; - var first = null; - - mxEvent.addGestureListeners(elt, function(evt) { - first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt)); - }); - - var oldMouseUp = ds.mouseUp; - ds.mouseUp = function(evt) { - if (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null && first != - null) { - var tol = graph.tolerance; - - if (Math.abs(first.x - mxEvent.getClientX(evt)) <= tol && - Math.abs(first.y - mxEvent.getClientY(evt)) <= tol) { - var gs = graph.getGridSize(); - ds.drop(graph, evt, null, gs, gs); - } - } - - oldMouseUp.apply(this, arguments); - first = null; - }; -}; - -/** - * Giuseppe Careri - * Create xml document vertex - */ -Sidebar.prototype.createXmlDocument = function(element, label, variables, - values) { - var doc = mxUtils.createXmlDocument(); - var node = doc.createElement(element) - node.setAttribute('label', label); - - variables.forEach(function(variable, index) { - node.setAttribute(variable, values[index] ? values[index] : ''); - }); - - return node; -} - -/** - * Giuseppe Careri - * Creates a drop handler for inserting the given cells. - */ -Sidebar.prototype.createVertexTemplate = function(style, width, height, value, - title, showLabel) { - var variables = []; - var values = []; - - switch (value) { - case 'answer': - break; - case 'start': - variables = ['answer']; - values = ['yes']; - break; - case 'ispeechasr': - variables = ['key', 'model', 'ispeech_asr_language', 'timeout', 'intKey', - 'beep' - ]; - values = ['', 0, 'it-IT', 1, '#', true]; - break; - case 'playback': - variables = ['file_id', 'opts']; - values = ['0']; - break; - case 'background': - variables = ['file_id', 'response', 'digit']; - values = ['0', '5', '1']; - break; - case 'menu': - variables = ['file_id', 'response', 'digit', 'retry', 'variable_id']; - values = ['0', '5', '1', '1', '0']; - break; - case 'getdigits': - variables = ['file_id', 'response', 'mindigit', 'maxdigit', 'retry', - 'variable_id' - ]; - values = ['0', '5', '1', '10', '1', '0']; - break; - case 'getsecretdigits': - variables = ['file_id', 'response', 'mindigit', 'maxdigit', 'retry', 'hiddendigitsnum', 'hiddendigitspos', - 'variable_id' - ]; - values = ['0', '5', '1', '10', '1', '0', 'first', '0']; - break; - case 'custom_app': - variables = ['application', 'options']; - values = ['', '']; - break; - case 'set': - variables = ['variable_id', 'variable_value']; - values = ['0', '']; - break; - case 'database': - variables = ['odbc_id', 'query', 'variable_id']; - values = ['0', '', '0']; - break; - case 'noop': - variables = ['output']; - values = []; - break; - case 'gotoc': - variables = ['context', 'extension']; - values = []; - break; - case 'system': - variables = ['variable_id', 'command']; - values = []; - break; - case 'agi': - variables = ['args', 'command']; - values = []; - break; - case 'gotoif': - variables = ['condition']; - values = []; - break; - case 'gotoiftime': - variables = ['interval_id']; - values = ['0']; - break; - case 'gotoifmultitime': - variables = ['interval_id']; - values = ['0']; - break; - case 'vswitch': - variables = ['variable_id']; - values = ['0']; - break; - case 'saydigits': - variables = ['digits', 'escape_digits']; - values = ['', '#']; - break; - case 'saynumber': - variables = ['number', 'escape_digits']; - values = ['', '#']; - break; - case 'sayphonetic': - variables = ['text', 'escape_digits']; - values = ['', '#']; - break; - case 'record': - variables = ['file', 'recordingFormat', 'timeout', 'escape_digits']; - values = ['', 'wav', '-1', '#']; - break; - case 'dial': - variables = ['sip_id', 'timeout', 'custom_app', 'url']; - values = ['0', '60']; - break; - case 'ext_dial': - variables = ['phone', 'trunk_name', 'timeout', 'opts', 'url']; - values = ['', '-1', '60']; - break; - case 'tts': - variables = ['text', 'google_tts_language']; - values = ['', 'it']; - break; - case 'ispeechtts': - variables = ['text', 'key', 'ispeech_tts_language', 'speed', 'intKey']; - values = ['', '', 'euritalianfemale', '0', '#']; - break; - case 'queue': - variables = ['queue_id', 'opts', 'url', 'file_id', 'timeout', 'agi', - 'macro', 'gosub', 'position' - ]; - values = ['-1', '', '', '0', '300']; - break; - case 'voicemail': - variables = ['mailbox', 'options']; - values = ['', '']; - break; - case 'subproject': - variables = ['project_id']; - values = ['0']; - break; - case 'math': - variables = ['operation', 'variable_id']; - values = ['', '0']; - break; - case 'queuelog': - variables = ['queuename', 'agent', 'queue_event', 'data1', 'data2', 'data3', - 'data4', 'data5' - ]; - values = []; - break; - case 'goal': - variables = ['goalname']; - values = []; - break; - case 'callback': - variables = ['name', 'phone', 'list_id', 'delay']; - values = ['', '{CALLERID(num)}', '0', '5']; - break; - case 'sendSMS': - variables = ['account_id', 'to', 'sms_text']; - values = ['0']; - break; - case 'sendMail': - variables = ['account_id', 'template_id', 'to', 'cc', 'subject', 'text']; - values = ['0']; - break; - - default: - variables = []; - values = []; - break; - } - - var node = this.createXmlDocument(value, title, variables, values); - - //var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)]; - var cells = [new mxCell(node, new mxGeometry(0, 0, width, height), style)]; - cells[0].vertex = true; - - return this.createVertexTemplateFromCells(cells, width, height, title, - showLabel); -}; - -/** - * Creates a drop handler for inserting the given cells. - */ -Sidebar.prototype.createVertexTemplateFromCells = function(cells, width, height, - title, showLabel) { - var elt = this.createItem(cells, title, showLabel); - var ds = this.createDragSource(elt, this.createDropHandler(cells, true), this - .createDragPreview(width, height)); - this.addClickHandler(elt, ds); - - // Uses guides for vertices only if enabled in graph - ds.isGuidesEnabled = mxUtils.bind(this, function() { - return this.editorUi.editor.graph.graphHandler.guidesEnabled; - }); - - // Shows a tooltip with the rendered cell - if (!touchStyle) { - mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) { - this.showTooltip(elt, cells, title, showLabel); - })); - } - - return elt; -}; - -/** - * Creates a drop handler for inserting the given cells. - */ -Sidebar.prototype.createEdgeTemplate = function(style, width, height, value, - title, showLabel) { - var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, - width, height), style)]; - cells[0].geometry.setTerminalPoint(new mxPoint(0, height), true); - cells[0].geometry.setTerminalPoint(new mxPoint(width, 0), false); - cells[0].geometry.relative = true; - cells[0].edge = true; - - return this.createEdgeTemplateFromCells(cells, width, height, title, - showLabel); -}; - -/** - * Creates a drop handler for inserting the given cells. - */ -Sidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height, - title, showLabel) { - var elt = this.createItem(cells, title, showLabel); - this.createDragSource(elt, this.createDropHandler(cells, false), this.createDragPreview( - width, height)); - - // Installs the default edge - var graph = this.editorUi.editor.graph; - mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt) { - if (this.installEdges) { - graph.setDefaultEdge(cells[0]); - } - - // Highlights the entry for 200ms - elt.style.backgroundColor = '#ffffff'; - - window.setTimeout(function() { - elt.style.backgroundColor = ''; - }, 300); - - mxEvent.consume(evt); - })); - - // Shows a tooltip with the rendered cell - if (!touchStyle) { - mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt) { - this.showTooltip(elt, cells, title, showLabel); - })); - } - - return elt; -}; - -/** - * Adds the given palette. - */ -Sidebar.prototype.addPalette = function(id, title, expanded, onInit) { - var elt = this.createTitle(title); - this.container.appendChild(elt); - - var div = document.createElement('div'); - div.className = 'geSidebar'; - - if (expanded) { - onInit(div); - onInit = null; - } else { - div.style.display = 'none'; - } - - this.addFoldingHandler(elt, div, onInit); - - var outer = document.createElement('div'); - outer.appendChild(div); - this.container.appendChild(outer); - - // Keeps references to the DOM nodes - if (id != null) { - this.palettes[id] = [elt, outer]; - } -}; - -/** - * Create the given title element. - */ -Sidebar.prototype.addFoldingHandler = function(title, content, funct) { - var initialized = false; - - title.style.backgroundImage = (content.style.display == 'none') ? - 'url(' + IMAGE_PATH + '/collapsed.gif)' : 'url(' + IMAGE_PATH + - '/expanded.gif)'; - title.style.backgroundRepeat = 'no-repeat'; - title.style.backgroundPosition = '100% 50%'; - - mxEvent.addListener(title, 'click', function(evt) { - if (content.style.display == 'none') { - if (!initialized) { - initialized = true; - - if (funct != null) { - title.style.cursor = 'wait'; - window.setTimeout(function() { - funct(content); - title.style.cursor = ''; - }, 0); - } - } - - title.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)'; - content.style.display = 'block'; - } else { - title.style.backgroundImage = 'url(' + IMAGE_PATH + '/collapsed.gif)'; - content.style.display = 'none'; - } - - mxEvent.consume(evt); - }); -}; - -/** - * Removes the palette for the given ID. - */ -Sidebar.prototype.removePalette = function(id) { - var elts = this.palettes[id]; - - if (elts != null) { - this.palettes[id] = null; - - for (var i = 0; i < elts.length; i++) { - this.container.removeChild(elts[i]); - } - - return true; - } - - return false; -}; - -/** - * Adds the given image palette. - */ -Sidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items, - titles) { - // Giuseppe Careri - // Expanded Sidebar only entry - this.addPalette(id, title, (id === 'entry'), mxUtils.bind(this, function( - content) { - var showTitles = titles != null; - - for (var i = 0; i < items.length; i++) { - var icon = prefix + items[i] + postfix; - content.appendChild(this.createVertexTemplate('image;image=' + icon, 80, - 80, items[i], (showTitles) ? titles[i] : null, showTitles)); - } - })); -}; +var _0x147c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x70\x61\x6C\x65\x74\x74\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x67\x72\x61\x70\x68","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x53\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x65\x64\x69\x74\x6F\x72","\x72\x65\x73\x65\x74\x56\x69\x65\x77\x4F\x6E\x52\x6F\x6F\x74\x43\x68\x61\x6E\x67\x65","\x66\x6F\x6C\x64\x69\x6E\x67\x45\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x43\x6F\x6E\x6E\x65\x63\x74\x61\x62\x6C\x65","\x61\x75\x74\x6F\x53\x63\x72\x6F\x6C\x6C","\x73\x65\x74\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x76\x69\x73\x69\x62\x69\x6C\x69\x74\x79","\x73\x74\x79\x6C\x65","\x68\x69\x64\x64\x65\x6E","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x62\x73\x6F\x6C\x75\x74\x65","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x62\x6F\x64\x79","\x49\x53\x5F\x54\x4F\x55\x43\x48","\x6D\x6F\x75\x73\x65\x75\x70","\x62\x69\x6E\x64","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x73\x63\x72\x6F\x6C\x6C","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x68\x69\x64\x65\x54\x6F\x6F\x6C\x74\x69\x70","\x6D\x6F\x75\x73\x65\x6D\x6F\x76\x65","\x67\x65\x74\x53\x6F\x75\x72\x63\x65","\x63\x75\x72\x72\x65\x6E\x74\x45\x6C\x74","\x70\x61\x72\x65\x6E\x74\x4E\x6F\x64\x65","\x6D\x6F\x75\x73\x65\x6F\x75\x74","\x74\x6F\x45\x6C\x65\x6D\x65\x6E\x74","\x72\x65\x6C\x61\x74\x65\x64\x54\x61\x72\x67\x65\x74","\x69\x6E\x69\x74","\x73\x72\x63","\x2F\x74\x6F\x6F\x6C\x74\x69\x70\x2E\x70\x6E\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x6F\x67","\x65\x6E\x74\x72\x79","\x67\x65\x74","\x2F\x65\x6E\x74\x72\x79\x2F","\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x73\x74\x61\x72\x74","\x66\x69\x6E\x61\x6C\x6C\x79","\x65\x6E\x64","\x61\x64\x64\x49\x6D\x61\x67\x65\x50\x61\x6C\x65\x74\x74\x65","\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74","\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F","\x61\x6E\x73\x77\x65\x72","\x68\x61\x6E\x67\x75\x70","\x64\x69\x61\x6C","\x65\x78\x74\x5F\x64\x69\x61\x6C","\x71\x75\x65\x75\x65","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x76\x61\x72\x69\x61\x62\x6C\x65","\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2F","\x73\x65\x74","\x6D\x61\x74\x68","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F","\x6D\x65\x6E\x75","\x73\x61\x79\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x6E\x75\x6D\x62\x65\x72","\x73\x61\x79\x70\x68\x6F\x6E\x65\x74\x69\x63","\x74\x74\x73","\x69\x73\x70\x65\x65\x63\x68\x74\x74\x73","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x67\x65\x74\x73\x65\x63\x72\x65\x74\x64\x69\x67\x69\x74\x73","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F","\x72\x65\x63\x6F\x72\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x53\x65\x72\x76\x65\x72","\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x73\x65\x72\x76\x65\x72\x2F","\x64\x61\x74\x61\x62\x61\x73\x65","\x69\x73\x70\x65\x65\x63\x68\x61\x73\x72","\x73\x65\x6E\x64\x53\x4D\x53","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x63\x61\x6C\x6C\x66\x6C\x6F\x77","\x2F\x63\x61\x6C\x6C\x66\x6C\x6F\x77\x2F","\x67\x6F\x74\x6F\x63","\x67\x6F\x74\x6F\x69\x66","\x67\x6F\x74\x6F\x69\x66\x74\x69\x6D\x65","\x76\x73\x77\x69\x74\x63\x68","\x73\x74\x61\x74\x73","\x2F\x73\x74\x61\x74\x73\x2F","\x67\x6F\x61\x6C","\x67\x65\x6E\x65\x72\x61\x6C","\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2F","\x6E\x6F\x6F\x70","\x73\x79\x73\x74\x65\x6D","\x61\x67\x69","\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74","\x63\x75\x73\x74\x6F\x6D\x5F\x61\x70\x70","\x65\x6E\x61\x62\x6C\x65\x54\x6F\x6F\x6C\x74\x69\x70\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x42\x6F\x72\x64\x65\x72","\x74\x68\x75\x6D\x62\x42\x6F\x72\x64\x65\x72","\x74\x6F\x6F\x6C\x74\x69\x70\x44\x65\x6C\x61\x79","\x69\x6E\x73\x74\x61\x6C\x6C\x45\x64\x67\x65\x73","\x67\x65\x61\x72\x49\x6D\x61\x67\x65","\x2F\x63\x6C\x69\x70\x61\x72\x74\x2F\x47\x65\x61\x72\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67","\x74\x68\x75\x6D\x62\x57\x69\x64\x74\x68","\x74\x68\x75\x6D\x62\x48\x65\x69\x67\x68\x74","\x74\x68\x75\x6D\x62\x50\x61\x64\x64\x69\x6E\x67","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x53\x69\x7A\x65","\x73\x69\x64\x65\x62\x61\x72\x54\x69\x74\x6C\x65\x73","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65\x73","\x73\x68\x6F\x77\x54\x6F\x6F\x6C\x74\x69\x70","\x74\x68\x72\x65\x61\x64","\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x6F\x75\x74","\x74\x6F\x6F\x6C\x74\x69\x70","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72\x54\x6F\x6F\x6C\x74\x69\x70","\x67\x72\x61\x70\x68\x32","\x73\x65\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x76\x69\x65\x77","\x49\x53\x5F\x53\x56\x47","\x63\x61\x6E\x76\x61\x73","\x72\x65\x6C\x61\x74\x69\x76\x65","\x74\x6F\x6F\x6C\x74\x69\x70\x49\x6D\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x49\x6D\x61\x67\x65","\x77\x69\x64\x74\x68","\x31\x34\x70\x78","\x68\x65\x69\x67\x68\x74","\x32\x37\x70\x78","\x64\x69\x73\x70\x6C\x61\x79","\x62\x6C\x6F\x63\x6B","\x6C\x61\x62\x65\x6C\x73\x56\x69\x73\x69\x62\x6C\x65","\x63\x6C\x65\x61\x72","\x6D\x6F\x64\x65\x6C","\x61\x64\x64\x43\x65\x6C\x6C\x73","\x67\x65\x74\x47\x72\x61\x70\x68\x42\x6F\x75\x6E\x64\x73","\x49\x53\x5F\x51\x55\x49\x52\x4B\x53","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x76\x69\x73\x69\x62\x6C\x65","\x70\x78","\x6C\x65\x6E\x67\x74\x68","\x74\x6F\x6F\x6C\x74\x69\x70\x54\x69\x74\x6C\x65","\x62\x6F\x72\x64\x65\x72\x54\x6F\x70","\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x67\x72\x61\x79","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x65\x6E\x74\x65\x72","\x31\x30\x30\x25","\x70\x61\x64\x64\x69\x6E\x67\x54\x6F\x70","\x32\x70\x78","\x36\x70\x78","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","","\x77\x72\x69\x74\x65","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x6D\x61\x72\x67\x69\x6E\x54\x6F\x70","\x74\x6F\x70","\x6E\x6F\x6E\x65","\x78","\x6D\x69\x6E","\x79","\x63\x6C\x69\x65\x6E\x74\x57\x69\x64\x74\x68","\x73\x70\x6C\x69\x74\x53\x69\x7A\x65","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70","\x6D\x61\x78","\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x28","\x2C","\x29","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x6C\x65\x66\x74","\x64\x72\x61\x77\x50\x61\x6E\x65","\x6F\x66\x66\x73\x65\x74\x57\x69\x64\x74\x68","\x70\x61\x67\x65\x2D\x73\x69\x64\x65\x62\x61\x72","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x63\x72\x65\x61\x74\x65\x54\x69\x74\x6C\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x54\x69\x74\x6C\x65","\x63\x72\x65\x61\x74\x65\x54\x68\x75\x6D\x62","\x73\x63\x61\x6C\x65\x41\x6E\x64\x54\x72\x61\x6E\x73\x6C\x61\x74\x65","\x66\x6C\x6F\x6F\x72","\x64\x69\x61\x6C\x65\x63\x74","\x44\x49\x41\x4C\x45\x43\x54\x5F\x53\x56\x47","\x4E\x4F\x5F\x46\x4F","\x63\x6C\x6F\x6E\x65\x4E\x6F\x64\x65","\x6F\x77\x6E\x65\x72\x53\x56\x47\x45\x6C\x65\x6D\x65\x6E\x74","\x67\x65\x74\x43\x61\x6E\x76\x61\x73","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x49\x53\x5F\x49\x45\x36","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x49\x6D\x61\x67\x65","\x75\x72\x6C\x28","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x49\x6D\x61\x67\x65","\x63\x75\x72\x73\x6F\x72","\x70\x6F\x69\x6E\x74\x65\x72","\x6D\x69\x6E\x57\x69\x64\x74\x68","\x6D\x69\x6E\x48\x65\x69\x67\x68\x74","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x6E\x6F\x77\x72\x61\x70","\x49\x53\x5F\x49\x45","\x34\x70\x78","\x63\x72\x65\x61\x74\x65\x49\x74\x65\x6D","\x67\x65\x49\x74\x65\x6D","\x70\x61\x64\x64\x69\x6E\x67","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x63\x72\x65\x61\x74\x65\x44\x72\x6F\x70\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x65\x74\x49\x6D\x70\x6F\x72\x74\x61\x62\x6C\x65\x43\x65\x6C\x6C\x73","\x69\x73\x56\x61\x6C\x69\x64\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x69\x73\x53\x70\x6C\x69\x74\x45\x6E\x61\x62\x6C\x65\x64","\x69\x73\x53\x70\x6C\x69\x74\x54\x61\x72\x67\x65\x74","\x73\x70\x6C\x69\x74\x45\x64\x67\x65","\x69\x6D\x70\x6F\x72\x74\x43\x65\x6C\x6C\x73","\x73\x63\x72\x6F\x6C\x6C\x43\x65\x6C\x6C\x54\x6F\x56\x69\x73\x69\x62\x6C\x65","\x73\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x50\x72\x65\x76\x69\x65\x77","\x62\x6F\x72\x64\x65\x72","\x31\x70\x78\x20\x64\x61\x73\x68\x65\x64\x20\x62\x6C\x61\x63\x6B","\x63\x72\x65\x61\x74\x65\x44\x72\x61\x67\x53\x6F\x75\x72\x63\x65","\x61\x75\x74\x6F\x73\x63\x72\x6F\x6C\x6C","\x6D\x61\x6B\x65\x44\x72\x61\x67\x67\x61\x62\x6C\x65","\x67\x65\x74\x44\x72\x6F\x70\x54\x61\x72\x67\x65\x74","\x61\x70\x70\x6C\x79","\x69\x73\x56\x61\x6C\x69\x64\x52\x6F\x6F\x74","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x58","\x67\x65\x74\x43\x6C\x69\x65\x6E\x74\x59","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x6D\x6F\x75\x73\x65\x55\x70","\x69\x73\x50\x6F\x70\x75\x70\x54\x72\x69\x67\x67\x65\x72","\x63\x75\x72\x72\x65\x6E\x74\x47\x72\x61\x70\x68","\x74\x6F\x6C\x65\x72\x61\x6E\x63\x65","\x61\x62\x73","\x67\x65\x74\x47\x72\x69\x64\x53\x69\x7A\x65","\x64\x72\x6F\x70","\x63\x72\x65\x61\x74\x65\x58\x6D\x6C\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x6C\x61\x62\x65\x6C","\x66\x6F\x72\x45\x61\x63\x68","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65","\x79\x65\x73","\x6B\x65\x79","\x69\x73\x70\x65\x65\x63\x68\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x4B\x65\x79","\x62\x65\x65\x70","\x69\x74\x2D\x49\x54","\x23","\x66\x69\x6C\x65\x5F\x69\x64","\x6F\x70\x74\x73","\x30","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x64\x69\x67\x69\x74","\x35","\x31","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x72\x65\x74\x72\x79","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x6D\x61\x78\x64\x69\x67\x69\x74","\x31\x30","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x6E\x75\x6D","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x70\x6F\x73","\x66\x69\x72\x73\x74","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6F\x70\x74\x69\x6F\x6E\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x76\x61\x6C\x75\x65","\x6F\x64\x62\x63\x5F\x69\x64","\x71\x75\x65\x72\x79","\x6F\x75\x74\x70\x75\x74","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x63\x6F\x6D\x6D\x61\x6E\x64","\x61\x72\x67\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x67\x6F\x74\x6F\x69\x66\x6D\x75\x6C\x74\x69\x74\x69\x6D\x65","\x64\x69\x67\x69\x74\x73","\x65\x73\x63\x61\x70\x65\x5F\x64\x69\x67\x69\x74\x73","\x6E\x75\x6D\x62\x65\x72","\x74\x65\x78\x74","\x66\x69\x6C\x65","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x2D\x31","\x73\x69\x70\x5F\x69\x64","\x75\x72\x6C","\x36\x30","\x70\x68\x6F\x6E\x65","\x74\x72\x75\x6E\x6B\x5F\x6E\x61\x6D\x65","\x67\x6F\x6F\x67\x6C\x65\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x69\x74","\x69\x73\x70\x65\x65\x63\x68\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x73\x70\x65\x65\x64","\x65\x75\x72\x69\x74\x61\x6C\x69\x61\x6E\x66\x65\x6D\x61\x6C\x65","\x71\x75\x65\x75\x65\x5F\x69\x64","\x6D\x61\x63\x72\x6F","\x67\x6F\x73\x75\x62","\x33\x30\x30","\x6D\x61\x69\x6C\x62\x6F\x78","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x61\x67\x65\x6E\x74","\x71\x75\x65\x75\x65\x5F\x65\x76\x65\x6E\x74","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x64\x61\x74\x61\x35","\x71\x75\x65\x75\x65\x6C\x6F\x67","\x67\x6F\x61\x6C\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x6C\x69\x73\x74\x5F\x69\x64","\x64\x65\x6C\x61\x79","\x7B\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x6E\x75\x6D\x29\x7D","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x74\x6F","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x74\x65\x6D\x70\x6C\x61\x74\x65\x5F\x69\x64","\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x76\x65\x72\x74\x65\x78","\x63\x72\x65\x61\x74\x65\x56\x65\x72\x74\x65\x78\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x69\x73\x47\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x75\x69\x64\x65\x73\x45\x6E\x61\x62\x6C\x65\x64","\x67\x72\x61\x70\x68\x48\x61\x6E\x64\x6C\x65\x72","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x73\x65\x74\x54\x65\x72\x6D\x69\x6E\x61\x6C\x50\x6F\x69\x6E\x74","\x67\x65\x6F\x6D\x65\x74\x72\x79","\x65\x64\x67\x65","\x63\x72\x65\x61\x74\x65\x45\x64\x67\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x46\x72\x6F\x6D\x43\x65\x6C\x6C\x73","\x73\x65\x74\x44\x65\x66\x61\x75\x6C\x74\x45\x64\x67\x65","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x43\x6F\x6C\x6F\x72","\x23\x66\x66\x66\x66\x66\x66","\x61\x64\x64\x50\x61\x6C\x65\x74\x74\x65","\x67\x65\x53\x69\x64\x65\x62\x61\x72","\x61\x64\x64\x46\x6F\x6C\x64\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x2F\x63\x6F\x6C\x6C\x61\x70\x73\x65\x64\x2E\x67\x69\x66\x29","\x2F\x65\x78\x70\x61\x6E\x64\x65\x64\x2E\x67\x69\x66\x29","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x52\x65\x70\x65\x61\x74","\x6E\x6F\x2D\x72\x65\x70\x65\x61\x74","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x31\x30\x30\x25\x20\x35\x30\x25","\x77\x61\x69\x74","\x72\x65\x6D\x6F\x76\x65\x50\x61\x6C\x65\x74\x74\x65","\x72\x65\x6D\x6F\x76\x65\x43\x68\x69\x6C\x64","\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D"];_0x147c[0];function Sidebar(_0xd366x2,_0xd366x3){this[_0x147c[1]]= _0xd366x2;this[_0x147c[2]]= _0xd366x3;this[_0x147c[3]]= new Object();this[_0x147c[4]]= true;this[_0x147c[5]]= new Graph(document[_0x147c[7]](_0x147c[6]),null,null,this[_0x147c[1]][_0x147c[9]][_0x147c[5]][_0x147c[8]]());this[_0x147c[5]][_0x147c[10]]= false;this[_0x147c[5]][_0x147c[11]]= false;this[_0x147c[5]][_0x147c[12]](false);this[_0x147c[5]][_0x147c[13]]= false;this[_0x147c[5]][_0x147c[14]](false);this[_0x147c[5]][_0x147c[15]](false);this[_0x147c[5]][_0x147c[2]][_0x147c[17]][_0x147c[16]]= _0x147c[18];this[_0x147c[5]][_0x147c[2]][_0x147c[17]][_0x147c[19]]= _0x147c[20];document[_0x147c[22]][_0x147c[21]](this[_0x147c[5]][_0x147c[2]]);if(!mxClient[_0x147c[23]]){mxEvent[_0x147c[26]](document,_0x147c[24],mxUtils[_0x147c[25]](this,function(){this[_0x147c[4]]= true}));mxEvent[_0x147c[26]](_0xd366x3,_0x147c[27],mxUtils[_0x147c[25]](this,function(){this[_0x147c[4]]= true}));mxEvent[_0x147c[26]](document,_0x147c[28],mxUtils[_0x147c[25]](this,function(){this[_0x147c[4]]= false;this[_0x147c[29]]()}));mxEvent[_0x147c[26]](document,_0x147c[30],mxUtils[_0x147c[25]](this,function(_0xd366x4){var _0xd366x5=mxEvent[_0x147c[31]](_0xd366x4);while(_0xd366x5!= null){if(_0xd366x5== this[_0x147c[32]]){return};_0xd366x5= _0xd366x5[_0x147c[33]]};this[_0x147c[29]]()}));mxEvent[_0x147c[26]](document,_0x147c[34],mxUtils[_0x147c[25]](this,function(_0xd366x4){if(_0xd366x4[_0x147c[35]]== null&& _0xd366x4[_0x147c[36]]== null){this[_0x147c[29]]()}}))};this[_0x147c[37]](); new Image()[_0x147c[38]]= IMAGE_PATH+ _0x147c[39]}Sidebar[_0x147c[40]][_0x147c[37]]= function(){var _0xd366x6=STENCIL_PATH;console[_0x147c[41]](_0xd366x6);this[_0x147c[49]](_0x147c[42],mxResources[_0x147c[43]](_0x147c[42]),_0xd366x6+ _0x147c[44],_0x147c[45],[_0x147c[46],_0x147c[47],_0x147c[48]],[mxResources[_0x147c[43]](_0x147c[46]),mxResources[_0x147c[43]](_0x147c[47]),mxResources[_0x147c[43]](_0x147c[48])]);this[_0x147c[49]](_0x147c[50],mxResources[_0x147c[43]](_0x147c[50]),_0xd366x6+ _0x147c[51],_0x147c[45],[_0x147c[52],_0x147c[53],_0x147c[54],_0x147c[55],_0x147c[56],_0x147c[57],_0x147c[58]],[mxResources[_0x147c[43]](_0x147c[52]),mxResources[_0x147c[43]](_0x147c[53]),mxResources[_0x147c[43]](_0x147c[54]),mxResources[_0x147c[43]](_0x147c[55]),mxResources[_0x147c[43]](_0x147c[56]),mxResources[_0x147c[43]](_0x147c[57]),mxResources[_0x147c[43]](_0x147c[58])]);this[_0x147c[49]](_0x147c[59],mxResources[_0x147c[43]](_0x147c[59]),_0xd366x6+ _0x147c[60],_0x147c[45],[_0x147c[61],_0x147c[62]],[mxResources[_0x147c[43]](_0x147c[61]),mxResources[_0x147c[43]](_0x147c[62])]);this[_0x147c[49]](_0x147c[63],mxResources[_0x147c[43]](_0x147c[63]),_0xd366x6+ _0x147c[64],_0x147c[45],[_0x147c[63],_0x147c[65],_0x147c[66],_0x147c[67],_0x147c[68],_0x147c[69],_0x147c[70],_0x147c[71],_0x147c[72]],[mxResources[_0x147c[43]](_0x147c[63]),mxResources[_0x147c[43]](_0x147c[65]),mxResources[_0x147c[43]](_0x147c[66]),mxResources[_0x147c[43]](_0x147c[67]),mxResources[_0x147c[43]](_0x147c[68]),mxResources[_0x147c[43]](_0x147c[69]),mxResources[_0x147c[43]](_0x147c[70]),mxResources[_0x147c[43]](_0x147c[71]),mxResources[_0x147c[43]](_0x147c[72])]);this[_0x147c[49]](_0x147c[73],mxResources[_0x147c[43]](_0x147c[73]),_0xd366x6+ _0x147c[74],_0x147c[45],[_0x147c[75]],[mxResources[_0x147c[43]](_0x147c[75])]);this[_0x147c[49]](_0x147c[76],mxResources[_0x147c[43]](_0x147c[76]),_0xd366x6+ _0x147c[77],_0x147c[45],[_0x147c[78],_0x147c[79],_0x147c[80],_0x147c[81]],[mxResources[_0x147c[43]](_0x147c[78]),mxResources[_0x147c[43]](_0x147c[79]),mxResources[_0x147c[43]](_0x147c[80]),mxResources[_0x147c[43]](_0x147c[81])]);this[_0x147c[49]](_0x147c[82],mxResources[_0x147c[43]](_0x147c[82]),_0xd366x6+ _0x147c[83],_0x147c[45],[_0x147c[84],_0x147c[85],_0x147c[86],_0x147c[87]],[mxResources[_0x147c[43]](_0x147c[84]),mxResources[_0x147c[43]](_0x147c[85]),mxResources[_0x147c[43]](_0x147c[86]),mxResources[_0x147c[43]](_0x147c[87])]);this[_0x147c[49]](_0x147c[88],mxResources[_0x147c[43]](_0x147c[88]),_0xd366x6+ _0x147c[89],_0x147c[45],[_0x147c[90]],[mxResources[_0x147c[43]](_0x147c[90])]);this[_0x147c[49]](_0x147c[91],mxResources[_0x147c[43]](_0x147c[91]),_0xd366x6+ _0x147c[92],_0x147c[45],[_0x147c[93],_0x147c[94],_0x147c[95],_0x147c[96],_0x147c[97]],[mxResources[_0x147c[43]](_0x147c[93]),mxResources[_0x147c[43]](_0x147c[94]),mxResources[_0x147c[43]](_0x147c[95]),mxResources[_0x147c[43]](_0x147c[96]),mxResources[_0x147c[43]](_0x147c[97])])};Sidebar[_0x147c[40]][_0x147c[98]]= !mxClient[_0x147c[23]];Sidebar[_0x147c[40]][_0x147c[99]]= 16;Sidebar[_0x147c[40]][_0x147c[100]]= 3;Sidebar[_0x147c[40]][_0x147c[101]]= 300;Sidebar[_0x147c[40]][_0x147c[102]]= true;Sidebar[_0x147c[40]][_0x147c[103]]= STENCIL_PATH+ _0x147c[104];Sidebar[_0x147c[40]][_0x147c[105]]= 34;Sidebar[_0x147c[40]][_0x147c[106]]= 34;Sidebar[_0x147c[40]][_0x147c[107]]= 2;Sidebar[_0x147c[40]][_0x147c[108]]= 9;Sidebar[_0x147c[40]][_0x147c[109]]= false;Sidebar[_0x147c[40]][_0x147c[110]]= false;Sidebar[_0x147c[40]][_0x147c[111]]= function(_0xd366x7,_0xd366x8,_0xd366x9,_0xd366xa){if(this[_0x147c[98]]&& this[_0x147c[4]]){if(this[_0x147c[32]]!= _0xd366x7){if(this[_0x147c[112]]!= null){window[_0x147c[113]](this[_0x147c[112]]);this[_0x147c[112]]= null};var _0xd366xb=mxUtils[_0x147c[25]](this,function(){if(this[_0x147c[114]]== null){this[_0x147c[114]]= document[_0x147c[7]](_0x147c[6]);this[_0x147c[114]][_0x147c[115]]= _0x147c[116];document[_0x147c[22]][_0x147c[21]](this[_0x147c[114]]);this[_0x147c[117]]= new Graph(this[_0x147c[114]],null,null,this[_0x147c[1]][_0x147c[9]][_0x147c[5]][_0x147c[8]]());this[_0x147c[117]][_0x147c[119]][_0x147c[118]](this[_0x147c[99]],this[_0x147c[99]]);this[_0x147c[117]][_0x147c[10]]= false;this[_0x147c[117]][_0x147c[11]]= false;this[_0x147c[117]][_0x147c[13]]= false;this[_0x147c[117]][_0x147c[14]](false);this[_0x147c[117]][_0x147c[12]](false);this[_0x147c[117]][_0x147c[15]](false);if(!mxClient[_0x147c[120]]){this[_0x147c[117]][_0x147c[119]][_0x147c[121]][_0x147c[17]][_0x147c[19]]= _0x147c[122]};this[_0x147c[123]]= mxUtils[_0x147c[124]](IMAGE_PATH+ _0x147c[39]);this[_0x147c[123]][_0x147c[17]][_0x147c[19]]= _0x147c[20];this[_0x147c[123]][_0x147c[17]][_0x147c[125]]= _0x147c[126];this[_0x147c[123]][_0x147c[17]][_0x147c[127]]= _0x147c[128];document[_0x147c[22]][_0x147c[21]](this[_0x147c[123]])};this[_0x147c[114]][_0x147c[17]][_0x147c[129]]= _0x147c[130];this[_0x147c[117]][_0x147c[131]]= (_0xd366xa== null|| _0xd366xa);this[_0x147c[117]][_0x147c[133]][_0x147c[132]]();this[_0x147c[117]][_0x147c[134]](_0xd366x8);var _0xd366xc=this[_0x147c[117]][_0x147c[135]]();var _0xd366xd=_0xd366xc[_0x147c[125]]+ 2* this[_0x147c[99]];var _0xd366xe=_0xd366xc[_0x147c[127]]+ 2* this[_0x147c[99]];if(mxClient[_0x147c[136]]){_0xd366xd+= 4;_0xd366xe+= 4;this[_0x147c[114]][_0x147c[17]][_0x147c[137]]= _0x147c[18]}else {this[_0x147c[114]][_0x147c[17]][_0x147c[137]]= _0x147c[138]};this[_0x147c[123]][_0x147c[17]][_0x147c[16]]= _0x147c[138];this[_0x147c[114]][_0x147c[17]][_0x147c[125]]= _0xd366xd+ _0x147c[139];if(this[_0x147c[110]]&& _0xd366x9!= null&& _0xd366x9[_0x147c[140]]> 0){if(this[_0x147c[141]]== null){this[_0x147c[141]]= document[_0x147c[7]](_0x147c[6]);this[_0x147c[141]][_0x147c[17]][_0x147c[142]]= _0x147c[143];this[_0x147c[141]][_0x147c[17]][_0x147c[144]]= _0x147c[145];this[_0x147c[141]][_0x147c[17]][_0x147c[125]]= _0x147c[146];this[_0x147c[141]][_0x147c[17]][_0x147c[137]]= _0x147c[18];if(mxClient[_0x147c[120]]){this[_0x147c[141]][_0x147c[17]][_0x147c[147]]= _0x147c[148]}else {this[_0x147c[141]][_0x147c[17]][_0x147c[19]]= _0x147c[20];this[_0x147c[141]][_0x147c[17]][_0x147c[147]]= _0x147c[149]};this[_0x147c[114]][_0x147c[21]](this[_0x147c[141]])}else {this[_0x147c[141]][_0x147c[150]]= _0x147c[151]};this[_0x147c[141]][_0x147c[17]][_0x147c[129]]= _0x147c[151];mxUtils[_0x147c[152]](this[_0x147c[141]],_0xd366x9);var _0xd366xf=this[_0x147c[141]][_0x147c[153]]+ 10;_0xd366xe+= _0xd366xf;if(mxClient[_0x147c[120]]){this[_0x147c[141]][_0x147c[17]][_0x147c[154]]= (-_0xd366xf) + _0x147c[139]}else {_0xd366xe-= 6;this[_0x147c[141]][_0x147c[17]][_0x147c[155]]= (_0xd366xe- _0xd366xf)+ _0x147c[139]}}else {if(this[_0x147c[141]]!= null&& this[_0x147c[141]][_0x147c[33]]!= null){this[_0x147c[141]][_0x147c[17]][_0x147c[129]]= _0x147c[156]}};this[_0x147c[114]][_0x147c[17]][_0x147c[127]]= _0xd366xe+ _0x147c[139];var _0xd366x10=-Math[_0x147c[158]](0,_0xd366xc[_0x147c[157]]- this[_0x147c[99]]);var _0xd366x11=-Math[_0x147c[158]](0,_0xd366xc[_0x147c[159]]- this[_0x147c[99]]);var _0xd366x12=this[_0x147c[2]][_0x147c[160]]+ this[_0x147c[1]][_0x147c[161]]+ 3;var _0xd366x13=Math[_0x147c[164]](0,(this[_0x147c[2]][_0x147c[162]]+ _0xd366x7[_0x147c[162]]- this[_0x147c[2]][_0x147c[163]]- _0xd366xe/ 2+ 16));if(mxClient[_0x147c[120]]){this[_0x147c[117]][_0x147c[119]][_0x147c[121]][_0x147c[169]](_0x147c[165],_0x147c[166]+ _0xd366x10+ _0x147c[167]+ _0xd366x11+ _0x147c[168])}else {this[_0x147c[117]][_0x147c[119]][_0x147c[171]][_0x147c[17]][_0x147c[170]]= _0xd366x10+ _0x147c[139];this[_0x147c[117]][_0x147c[119]][_0x147c[171]][_0x147c[17]][_0x147c[155]]= _0xd366x11+ _0x147c[139]};_0xd366x12+= document[_0x147c[174]](_0x147c[173])[_0x147c[172]];_0xd366x13+= 90;this[_0x147c[114]][_0x147c[17]][_0x147c[19]]= _0x147c[20];this[_0x147c[114]][_0x147c[17]][_0x147c[170]]= _0xd366x12+ _0x147c[139];this[_0x147c[114]][_0x147c[17]][_0x147c[155]]= _0xd366x13+ _0x147c[139];this[_0x147c[123]][_0x147c[17]][_0x147c[170]]= (_0xd366x12- 13)+ _0x147c[139];this[_0x147c[123]][_0x147c[17]][_0x147c[155]]= (_0xd366x13+ _0xd366xe/ 2- 13)+ _0x147c[139]});if(this[_0x147c[114]]!= null&& this[_0x147c[114]][_0x147c[17]][_0x147c[129]]!= _0x147c[156]){_0xd366xb()}else {this[_0x147c[112]]= window[_0x147c[175]](_0xd366xb,this[_0x147c[101]])};this[_0x147c[32]]= _0xd366x7}}};Sidebar[_0x147c[40]][_0x147c[29]]= function(){if(this[_0x147c[112]]!= null){window[_0x147c[113]](this[_0x147c[112]]);this[_0x147c[112]]= null};if(this[_0x147c[114]]!= null){this[_0x147c[114]][_0x147c[17]][_0x147c[129]]= _0x147c[156];this[_0x147c[123]][_0x147c[17]][_0x147c[16]]= _0x147c[18];this[_0x147c[32]]= null}};Sidebar[_0x147c[40]][_0x147c[176]]= function(_0xd366x14){var _0xd366x7=document[_0x147c[7]](_0x147c[177]);_0xd366x7[_0x147c[169]](_0x147c[178],_0x147c[179]);_0xd366x7[_0x147c[115]]= _0x147c[180];mxUtils[_0x147c[152]](_0xd366x7,_0xd366x14);return _0xd366x7};Sidebar[_0x147c[40]][_0x147c[181]]= function(_0xd366x8,_0xd366xd,_0xd366xe,_0xd366x15,_0xd366x9,_0xd366xa){this[_0x147c[5]][_0x147c[131]]= (_0xd366xa== null|| _0xd366xa);this[_0x147c[5]][_0x147c[119]][_0x147c[182]](1,0,0);this[_0x147c[5]][_0x147c[134]](_0xd366x8);var _0xd366xc=this[_0x147c[5]][_0x147c[135]]();var _0xd366x16=this[_0x147c[100]];var _0xd366x17=Math[_0x147c[158]]((_0xd366xd- 2)/ (_0xd366xc[_0x147c[125]]- _0xd366xc[_0x147c[157]]+ _0xd366x16),(_0xd366xe- 2)/ (_0xd366xc[_0x147c[127]]- _0xd366xc[_0x147c[159]]+ _0xd366x16));var _0xd366x10=-Math[_0x147c[158]](_0xd366xc[_0x147c[157]],0);var _0xd366x11=-Math[_0x147c[158]](_0xd366xc[_0x147c[159]],0);this[_0x147c[5]][_0x147c[119]][_0x147c[182]](_0xd366x17,_0xd366x10,_0xd366x11);_0xd366xc= this[_0x147c[5]][_0x147c[135]]();var _0xd366x18=Math[_0x147c[164]](0,Math[_0x147c[183]]((_0xd366xd- _0xd366xc[_0x147c[125]]- _0xd366xc[_0x147c[157]])/ 2));var _0xd366xf=Math[_0x147c[164]](0,Math[_0x147c[183]]((_0xd366xe- _0xd366xc[_0x147c[127]]- _0xd366xc[_0x147c[159]])/ 2));var _0xd366x19=null;if(this[_0x147c[5]][_0x147c[184]]== mxConstants[_0x147c[185]]&& !mxClient[_0x147c[186]]){_0xd366x19= this[_0x147c[5]][_0x147c[119]][_0x147c[189]]()[_0x147c[188]][_0x147c[187]](true)}else {_0xd366x19= this[_0x147c[5]][_0x147c[2]][_0x147c[187]](false);_0xd366x19[_0x147c[150]]= this[_0x147c[5]][_0x147c[2]][_0x147c[150]]};this[_0x147c[5]][_0x147c[190]]()[_0x147c[132]]();if(mxClient[_0x147c[191]]){_0xd366x15[_0x147c[17]][_0x147c[192]]= _0x147c[193]+ this[_0x147c[1]][_0x147c[9]][_0x147c[194]]+ _0x147c[168]};var _0xd366x1a=3;_0xd366x19[_0x147c[17]][_0x147c[19]]= _0x147c[122];_0xd366x19[_0x147c[17]][_0x147c[137]]= _0x147c[18];_0xd366x19[_0x147c[17]][_0x147c[195]]= _0x147c[196];_0xd366x19[_0x147c[17]][_0x147c[170]]= (_0xd366x18+ _0xd366x1a)+ _0x147c[139];_0xd366x19[_0x147c[17]][_0x147c[155]]= (_0xd366xf+ _0xd366x1a)+ _0x147c[139];_0xd366x19[_0x147c[17]][_0x147c[125]]= _0xd366xd+ _0x147c[139];_0xd366x19[_0x147c[17]][_0x147c[127]]= _0xd366xe+ _0x147c[139];_0xd366x19[_0x147c[17]][_0x147c[16]]= _0x147c[151];_0xd366x19[_0x147c[17]][_0x147c[197]]= _0x147c[151];_0xd366x19[_0x147c[17]][_0x147c[198]]= _0x147c[151];_0xd366x15[_0x147c[21]](_0xd366x19);if(this[_0x147c[109]]&& _0xd366x9!= null){var _0xd366x1b=(mxClient[_0x147c[136]])?2* this[_0x147c[107]]+ 2:0;_0xd366x15[_0x147c[17]][_0x147c[127]]= (this[_0x147c[106]]+ _0xd366x1b+ this[_0x147c[108]]+ 8)+ _0x147c[139];var _0xd366x1c=document[_0x147c[7]](_0x147c[6]);_0xd366x1c[_0x147c[17]][_0x147c[199]]= this[_0x147c[108]]+ _0x147c[139];_0xd366x1c[_0x147c[17]][_0x147c[144]]= _0x147c[145];_0xd366x1c[_0x147c[17]][_0x147c[200]]= _0x147c[201];if(mxClient[_0x147c[202]]){_0xd366x1c[_0x147c[17]][_0x147c[127]]= (this[_0x147c[108]]+ 12)+ _0x147c[139]};_0xd366x1c[_0x147c[17]][_0x147c[147]]= _0x147c[203];mxUtils[_0x147c[152]](_0xd366x1c,_0xd366x9);_0xd366x15[_0x147c[21]](_0xd366x1c)}};Sidebar[_0x147c[40]][_0x147c[204]]= function(_0xd366x8,_0xd366x9,_0xd366xa){var _0xd366x7=document[_0x147c[7]](_0x147c[177]);_0xd366x7[_0x147c[169]](_0x147c[178],_0x147c[179]);_0xd366x7[_0x147c[115]]= _0x147c[205];_0xd366x7[_0x147c[17]][_0x147c[137]]= _0x147c[18];var _0xd366x1b=(mxClient[_0x147c[136]])?8+ 2* this[_0x147c[107]]:6;_0xd366x7[_0x147c[17]][_0x147c[125]]= (this[_0x147c[105]]+ _0xd366x1b)+ _0x147c[139];_0xd366x7[_0x147c[17]][_0x147c[127]]= (this[_0x147c[106]]+ _0xd366x1b)+ _0x147c[139];_0xd366x7[_0x147c[17]][_0x147c[206]]= this[_0x147c[107]]+ _0x147c[139];mxEvent[_0x147c[26]](_0xd366x7,_0x147c[207],function(_0xd366x4){mxEvent[_0x147c[208]](_0xd366x4)});this[_0x147c[181]](_0xd366x8,this[_0x147c[105]],this[_0x147c[106]],_0xd366x7,_0xd366x9,_0xd366xa);return _0xd366x7};Sidebar[_0x147c[40]][_0x147c[209]]= function(_0xd366x8,_0xd366x1d){return function(_0xd366x1e,_0xd366x4,_0xd366x1f,_0xd366x20,_0xd366x21){if(_0xd366x1e[_0x147c[210]]()){_0xd366x8= _0xd366x1e[_0x147c[211]](_0xd366x8);if(_0xd366x8[_0x147c[140]]> 0){var _0xd366x22=(_0xd366x1f!= null)?_0xd366x1e[_0x147c[212]](_0xd366x1f,_0xd366x8,_0xd366x4):false;var _0xd366x23=null;if(_0xd366x1f!= null&& !_0xd366x22){_0xd366x1f= null};if(_0xd366x1d&& _0xd366x1e[_0x147c[213]]()&& _0xd366x1e[_0x147c[214]](_0xd366x1f,_0xd366x8,_0xd366x4)){_0xd366x1e[_0x147c[215]](_0xd366x1f,_0xd366x8,null,_0xd366x20,_0xd366x21);_0xd366x23= _0xd366x8}else {if(_0xd366x8[_0x147c[140]]> 0){_0xd366x23= _0xd366x1e[_0x147c[216]](_0xd366x8,_0xd366x20,_0xd366x21,_0xd366x1f)}};if(_0xd366x23!= null&& _0xd366x23[_0x147c[140]]> 0){_0xd366x1e[_0x147c[217]](_0xd366x23[0]);_0xd366x1e[_0x147c[218]](_0xd366x23)}}}}};Sidebar[_0x147c[40]][_0x147c[219]]= function(_0xd366xd,_0xd366xe){var _0xd366x7=document[_0x147c[7]](_0x147c[6]);_0xd366x7[_0x147c[17]][_0x147c[220]]= _0x147c[221];_0xd366x7[_0x147c[17]][_0x147c[125]]= _0xd366xd+ _0x147c[139];_0xd366x7[_0x147c[17]][_0x147c[127]]= _0xd366xe+ _0x147c[139];return _0xd366x7};Sidebar[_0x147c[40]][_0x147c[222]]= function(_0xd366x7,_0xd366x24,_0xd366x25){var _0xd366x26=mxUtils[_0x147c[224]](_0xd366x7,this[_0x147c[1]][_0x147c[9]][_0x147c[5]],_0xd366x24,_0xd366x25,0,0,this[_0x147c[1]][_0x147c[9]][_0x147c[5]][_0x147c[223]],true,true);_0xd366x26[_0x147c[225]]= function(_0xd366x1e,_0xd366x20,_0xd366x21){var _0xd366x1f=mxDragSource[_0x147c[40]][_0x147c[225]][_0x147c[226]](this,arguments);if(!_0xd366x1e[_0x147c[227]](_0xd366x1f)){_0xd366x1f= null};return _0xd366x1f};return _0xd366x26};Sidebar[_0x147c[40]][_0x147c[228]]= function(_0xd366x7,_0xd366x27){var _0xd366x1e=this[_0x147c[1]][_0x147c[9]][_0x147c[5]];var _0xd366x28=null;mxEvent[_0x147c[231]](_0xd366x7,function(_0xd366x4){_0xd366x28= new mxPoint(mxEvent[_0x147c[229]](_0xd366x4),mxEvent[_0x147c[230]](_0xd366x4))});var _0xd366x29=_0xd366x27[_0x147c[232]];_0xd366x27[_0x147c[232]]= function(_0xd366x4){if(!mxEvent[_0x147c[233]](_0xd366x4)&& this[_0x147c[234]]== null&& _0xd366x28!= null){var _0xd366x2a=_0xd366x1e[_0x147c[235]];if(Math[_0x147c[236]](_0xd366x28[_0x147c[157]]- mxEvent[_0x147c[229]](_0xd366x4))<= _0xd366x2a&& Math[_0x147c[236]](_0xd366x28[_0x147c[159]]- mxEvent[_0x147c[230]](_0xd366x4))<= _0xd366x2a){var _0xd366x2b=_0xd366x1e[_0x147c[237]]();_0xd366x27[_0x147c[238]](_0xd366x1e,_0xd366x4,null,_0xd366x2b,_0xd366x2b)}};_0xd366x29[_0x147c[226]](this,arguments);_0xd366x28= null}};Sidebar[_0x147c[40]][_0x147c[239]]= function(_0xd366x2c,_0xd366x14,_0xd366x2d,_0xd366x2e){var _0xd366x2f=mxUtils[_0x147c[239]]();var _0xd366x19=_0xd366x2f[_0x147c[7]](_0xd366x2c);_0xd366x19[_0x147c[169]](_0x147c[240],_0xd366x14);_0xd366x2d[_0x147c[241]](function(_0xd366x30,_0xd366x31){_0xd366x19[_0x147c[169]](_0xd366x30,_0xd366x2e[_0xd366x31]?_0xd366x2e[_0xd366x31]:_0x147c[151])});return _0xd366x19};Sidebar[_0x147c[40]][_0x147c[242]]= function(_0xd366x32,_0xd366xd,_0xd366xe,_0xd366x33,_0xd366x9,_0xd366xa){var _0xd366x2d=[];var _0xd366x2e=[];switch(_0xd366x33){case _0x147c[52]:break;case _0x147c[46]:_0xd366x2d= [_0x147c[52]];_0xd366x2e= [_0x147c[243]];break;case _0x147c[79]:_0xd366x2d= [_0x147c[244],_0x147c[133],_0x147c[245],_0x147c[246],_0x147c[247],_0x147c[248]];_0xd366x2e= [_0x147c[151],0,_0x147c[249],1,_0x147c[250],true];break;case _0x147c[63]:_0xd366x2d= [_0x147c[251],_0x147c[252]];_0xd366x2e= [_0x147c[253]];break;case _0x147c[258]:_0xd366x2d= [_0x147c[251],_0x147c[254],_0x147c[255]];_0xd366x2e= [_0x147c[253],_0x147c[256],_0x147c[257]];break;case _0x147c[65]:_0xd366x2d= [_0x147c[251],_0x147c[254],_0x147c[255],_0x147c[259],_0x147c[260]];_0xd366x2e= [_0x147c[253],_0x147c[256],_0x147c[257],_0x147c[257],_0x147c[253]];break;case _0x147c[71]:_0xd366x2d= [_0x147c[251],_0x147c[254],_0x147c[261],_0x147c[262],_0x147c[259],_0x147c[260]];_0xd366x2e= [_0x147c[253],_0x147c[256],_0x147c[257],_0x147c[263],_0x147c[257],_0x147c[253]];break;case _0x147c[72]:_0xd366x2d= [_0x147c[251],_0x147c[254],_0x147c[261],_0x147c[262],_0x147c[259],_0x147c[264],_0x147c[265],_0x147c[260]];_0xd366x2e= [_0x147c[253],_0x147c[256],_0x147c[257],_0x147c[263],_0x147c[257],_0x147c[253],_0x147c[266],_0x147c[253]];break;case _0x147c[97]:_0xd366x2d= [_0x147c[267],_0x147c[268]];_0xd366x2e= [_0x147c[151],_0x147c[151]];break;case _0x147c[61]:_0xd366x2d= [_0x147c[260],_0x147c[269]];_0xd366x2e= [_0x147c[253],_0x147c[151]];break;case _0x147c[78]:_0xd366x2d= [_0x147c[270],_0x147c[271],_0x147c[260]];_0xd366x2e= [_0x147c[253],_0x147c[151],_0x147c[253]];break;case _0x147c[93]:_0xd366x2d= [_0x147c[272]];_0xd366x2e= [];break;case _0x147c[84]:_0xd366x2d= [_0x147c[273],_0x147c[274]];_0xd366x2e= [];break;case _0x147c[94]:_0xd366x2d= [_0x147c[260],_0x147c[275]];_0xd366x2e= [];break;case _0x147c[95]:_0xd366x2d= [_0x147c[276],_0x147c[275]];_0xd366x2e= [];break;case _0x147c[85]:_0xd366x2d= [_0x147c[277]];_0xd366x2e= [];break;case _0x147c[86]:_0xd366x2d= [_0x147c[278]];_0xd366x2e= [_0x147c[253]];break;case _0x147c[279]:_0xd366x2d= [_0x147c[278]];_0xd366x2e= [_0x147c[253]];break;case _0x147c[87]:_0xd366x2d= [_0x147c[260]];_0xd366x2e= [_0x147c[253]];break;case _0x147c[66]:_0xd366x2d= [_0x147c[280],_0x147c[281]];_0xd366x2e= [_0x147c[151],_0x147c[250]];break;case _0x147c[67]:_0xd366x2d= [_0x147c[282],_0x147c[281]];_0xd366x2e= [_0x147c[151],_0x147c[250]];break;case _0x147c[68]:_0xd366x2d= [_0x147c[283],_0x147c[281]];_0xd366x2e= [_0x147c[151],_0x147c[250]];break;case _0x147c[75]:_0xd366x2d= [_0x147c[284],_0x147c[285],_0x147c[246],_0x147c[281]];_0xd366x2e= [_0x147c[151],_0x147c[286],_0x147c[287],_0x147c[250]];break;case _0x147c[54]:_0xd366x2d= [_0x147c[288],_0x147c[246],_0x147c[97],_0x147c[289]];_0xd366x2e= [_0x147c[253],_0x147c[290]];break;case _0x147c[55]:_0xd366x2d= [_0x147c[291],_0x147c[292],_0x147c[246],_0x147c[252],_0x147c[289]];_0xd366x2e= [_0x147c[151],_0x147c[287],_0x147c[290]];break;case _0x147c[69]:_0xd366x2d= [_0x147c[283],_0x147c[293]];_0xd366x2e= [_0x147c[151],_0x147c[294]];break;case _0x147c[70]:_0xd366x2d= [_0x147c[283],_0x147c[244],_0x147c[295],_0x147c[296],_0x147c[247]];_0xd366x2e= [_0x147c[151],_0x147c[151],_0x147c[297],_0x147c[253],_0x147c[250]];break;case _0x147c[56]:_0xd366x2d= [_0x147c[298],_0x147c[252],_0x147c[289],_0x147c[251],_0x147c[246],_0x147c[95],_0x147c[299],_0x147c[300],_0x147c[19]];_0xd366x2e= [_0x147c[287],_0x147c[151],_0x147c[151],_0x147c[253],_0x147c[301]];break;case _0x147c[57]:_0xd366x2d= [_0x147c[302],_0x147c[268]];_0xd366x2e= [_0x147c[151],_0x147c[151]];break;case _0x147c[96]:_0xd366x2d= [_0x147c[303]];_0xd366x2e= [_0x147c[253]];break;case _0x147c[62]:_0xd366x2d= [_0x147c[304],_0x147c[260]];_0xd366x2e= [_0x147c[151],_0x147c[253]];break;case _0x147c[313]:_0xd366x2d= [_0x147c[305],_0x147c[306],_0x147c[307],_0x147c[308],_0x147c[309],_0x147c[310],_0x147c[311],_0x147c[312]];_0xd366x2e= [];break;case _0x147c[90]:_0xd366x2d= [_0x147c[314]];_0xd366x2e= [];break;case _0x147c[58]:_0xd366x2d= [_0x147c[315],_0x147c[291],_0x147c[316],_0x147c[317]];_0xd366x2e= [_0x147c[151],_0x147c[318],_0x147c[253],_0x147c[256]];break;case _0x147c[80]:_0xd366x2d= [_0x147c[319],_0x147c[320],_0x147c[321]];_0xd366x2e= [_0x147c[253]];break;case _0x147c[81]:_0xd366x2d= [_0x147c[319],_0x147c[322],_0x147c[320],_0x147c[323],_0x147c[324],_0x147c[283]];_0xd366x2e= [_0x147c[253]];break;default:_0xd366x2d= [];_0xd366x2e= [];break};var _0xd366x19=this[_0x147c[239]](_0xd366x33,_0xd366x9,_0xd366x2d,_0xd366x2e);var _0xd366x8=[ new mxCell(_0xd366x19, new mxGeometry(0,0,_0xd366xd,_0xd366xe),_0xd366x32)];_0xd366x8[0][_0x147c[325]]= true;return this[_0x147c[326]](_0xd366x8,_0xd366xd,_0xd366xe,_0xd366x9,_0xd366xa)};Sidebar[_0x147c[40]][_0x147c[326]]= function(_0xd366x8,_0xd366xd,_0xd366xe,_0xd366x9,_0xd366xa){var _0xd366x7=this[_0x147c[204]](_0xd366x8,_0xd366x9,_0xd366xa);var _0xd366x27=this[_0x147c[222]](_0xd366x7,this[_0x147c[209]](_0xd366x8,true),this[_0x147c[219]](_0xd366xd,_0xd366xe));this[_0x147c[228]](_0xd366x7,_0xd366x27);_0xd366x27[_0x147c[327]]= mxUtils[_0x147c[25]](this,function(){return this[_0x147c[1]][_0x147c[9]][_0x147c[5]][_0x147c[329]][_0x147c[328]]});if(!touchStyle){mxEvent[_0x147c[26]](_0xd366x7,_0x147c[30],mxUtils[_0x147c[25]](this,function(_0xd366x4){this[_0x147c[111]](_0xd366x7,_0xd366x8,_0xd366x9,_0xd366xa)}))};return _0xd366x7};Sidebar[_0x147c[40]][_0x147c[330]]= function(_0xd366x32,_0xd366xd,_0xd366xe,_0xd366x33,_0xd366x9,_0xd366xa){var _0xd366x8=[ new mxCell((_0xd366x33!= null)?_0xd366x33:_0x147c[151], new mxGeometry(0,0,_0xd366xd,_0xd366xe),_0xd366x32)];_0xd366x8[0][_0x147c[332]][_0x147c[331]]( new mxPoint(0,_0xd366xe),true);_0xd366x8[0][_0x147c[332]][_0x147c[331]]( new mxPoint(_0xd366xd,0),false);_0xd366x8[0][_0x147c[332]][_0x147c[122]]= true;_0xd366x8[0][_0x147c[333]]= true;return this[_0x147c[334]](_0xd366x8,_0xd366xd,_0xd366xe,_0xd366x9,_0xd366xa)};Sidebar[_0x147c[40]][_0x147c[334]]= function(_0xd366x8,_0xd366xd,_0xd366xe,_0xd366x9,_0xd366xa){var _0xd366x7=this[_0x147c[204]](_0xd366x8,_0xd366x9,_0xd366xa);this[_0x147c[222]](_0xd366x7,this[_0x147c[209]](_0xd366x8,false),this[_0x147c[219]](_0xd366xd,_0xd366xe));var _0xd366x1e=this[_0x147c[1]][_0x147c[9]][_0x147c[5]];mxEvent[_0x147c[26]](_0xd366x7,_0x147c[207],mxUtils[_0x147c[25]](this,function(_0xd366x4){if(this[_0x147c[102]]){_0xd366x1e[_0x147c[335]](_0xd366x8[0])};_0xd366x7[_0x147c[17]][_0x147c[336]]= _0x147c[337];window[_0x147c[175]](function(){_0xd366x7[_0x147c[17]][_0x147c[336]]= _0x147c[151]},300);mxEvent[_0x147c[208]](_0xd366x4)}));if(!touchStyle){mxEvent[_0x147c[26]](_0xd366x7,_0x147c[30],mxUtils[_0x147c[25]](this,function(_0xd366x4){this[_0x147c[111]](_0xd366x7,_0xd366x8,_0xd366x9,_0xd366xa)}))};return _0xd366x7};Sidebar[_0x147c[40]][_0x147c[338]]= function(_0xd366x34,_0xd366x9,_0xd366x35,_0xd366x36){var _0xd366x7=this[_0x147c[176]](_0xd366x9);this[_0x147c[2]][_0x147c[21]](_0xd366x7);var _0xd366x1c=document[_0x147c[7]](_0x147c[6]);_0xd366x1c[_0x147c[115]]= _0x147c[339];if(_0xd366x35){_0xd366x36(_0xd366x1c);_0xd366x36= null}else {_0xd366x1c[_0x147c[17]][_0x147c[129]]= _0x147c[156]};this[_0x147c[340]](_0xd366x7,_0xd366x1c,_0xd366x36);var _0xd366x37=document[_0x147c[7]](_0x147c[6]);_0xd366x37[_0x147c[21]](_0xd366x1c);this[_0x147c[2]][_0x147c[21]](_0xd366x37);if(_0xd366x34!= null){this[_0x147c[3]][_0xd366x34]= [_0xd366x7,_0xd366x37]}};Sidebar[_0x147c[40]][_0x147c[340]]= function(_0xd366x9,_0xd366x38,_0xd366x39){var _0xd366x3a=false;_0xd366x9[_0x147c[17]][_0x147c[192]]= (_0xd366x38[_0x147c[17]][_0x147c[129]]== _0x147c[156])?_0x147c[193]+ IMAGE_PATH+ _0x147c[341]:_0x147c[193]+ IMAGE_PATH+ _0x147c[342];_0xd366x9[_0x147c[17]][_0x147c[343]]= _0x147c[344];_0xd366x9[_0x147c[17]][_0x147c[345]]= _0x147c[346];mxEvent[_0x147c[26]](_0xd366x9,_0x147c[207],function(_0xd366x4){if(_0xd366x38[_0x147c[17]][_0x147c[129]]== _0x147c[156]){if(!_0xd366x3a){_0xd366x3a= true;if(_0xd366x39!= null){_0xd366x9[_0x147c[17]][_0x147c[195]]= _0x147c[347];window[_0x147c[175]](function(){_0xd366x39(_0xd366x38);_0xd366x9[_0x147c[17]][_0x147c[195]]= _0x147c[151]},0)}};_0xd366x9[_0x147c[17]][_0x147c[192]]= _0x147c[193]+ IMAGE_PATH+ _0x147c[342];_0xd366x38[_0x147c[17]][_0x147c[129]]= _0x147c[130]}else {_0xd366x9[_0x147c[17]][_0x147c[192]]= _0x147c[193]+ IMAGE_PATH+ _0x147c[341];_0xd366x38[_0x147c[17]][_0x147c[129]]= _0x147c[156]};mxEvent[_0x147c[208]](_0xd366x4)})};Sidebar[_0x147c[40]][_0x147c[348]]= function(_0xd366x34){var _0xd366x3b=this[_0x147c[3]][_0xd366x34];if(_0xd366x3b!= null){this[_0x147c[3]][_0xd366x34]= null;for(var _0xd366x3c=0;_0xd366x3c< _0xd366x3b[_0x147c[140]];_0xd366x3c++){this[_0x147c[2]][_0x147c[349]](_0xd366x3b[_0xd366x3c])};return true};return false};Sidebar[_0x147c[40]][_0x147c[49]]= function(_0xd366x34,_0xd366x9,_0xd366x3d,_0xd366x3e,_0xd366x3f,_0xd366x40){this[_0x147c[338]](_0xd366x34,_0xd366x9,(_0xd366x34=== _0x147c[42]),mxUtils[_0x147c[25]](this,function(_0xd366x38){var _0xd366x41=_0xd366x40!= null;for(var _0xd366x3c=0;_0xd366x3c< _0xd366x3f[_0x147c[140]];_0xd366x3c++){var _0xd366x42=_0xd366x3d+ _0xd366x3f[_0xd366x3c]+ _0xd366x3e;_0xd366x38[_0x147c[21]](this[_0x147c[242]](_0x147c[350]+ _0xd366x42,80,80,_0xd366x3f[_0xd366x3c],(_0xd366x41)?_0xd366x40[_0xd366x3c]:null,_0xd366x41))}}))} \ No newline at end of file diff --git a/public/assets/plugins/square/js/Toolbar.js b/public/assets/plugins/square/js/Toolbar.js index 7eab562..0eb2c0e 100644 --- a/public/assets/plugins/square/js/Toolbar.js +++ b/public/assets/plugins/square/js/Toolbar.js @@ -1,407 +1 @@ -/** - * $Id: Toolbar.js,v 1.3 2013-02-20 16:21:29 gaudenz Exp $ - * Copyright (c) 2006-2012, JGraph Ltd - */ -/** - * Construcs a new toolbar for the given editor. - */ -function Toolbar(editorUi, container) -{ - this.editorUi = editorUi; - this.container = container; - this.init(); - - // Global handler to hide the current menu - mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt) - { - this.hideMenu(); - })); -}; - -/** - * Adds the toolbar elements. - */ -Toolbar.prototype.init = function() -{ - this.addItems(['save', 'publish', '-', 'print', 'undo', 'redo', '-', 'copy', 'cut', 'paste', 'delete', '-', 'duplicate', '-', 'actualSize', 'zoomIn', 'zoomOut', '-']); - var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily'); - fontElt.style.whiteSpace = 'nowrap'; - fontElt.style.overflow = 'hidden'; - fontElt.style.width = '70px'; - this.addSeparator(); - var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize'); - sizeElt.style.whiteSpace = 'nowrap'; - sizeElt.style.overflow = 'hidden'; - sizeElt.style.width = '30px'; - - this.addItems(['-', 'bold', 'italic', 'underline']); - // Giuseppe Careri - // var align = this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu) - // { - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null).setAttribute('title', mxResources.get('left')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null).setAttribute('title', mxResources.get('center')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null).setAttribute('title', mxResources.get('right')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], 'geIcon geSprite geSprite-top', null).setAttribute('title', mxResources.get('top')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], 'geIcon geSprite geSprite-middle', null).setAttribute('title', mxResources.get('middle')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], 'geIcon geSprite geSprite-bottom', null).setAttribute('title', mxResources.get('bottom')); - // })); - // this.addItems(['fontColor', '-']); - // var line = this.addMenuFunction('geSprite-straight', mxResources.get('line'), false, mxUtils.bind(this, function(menu) - // { - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], [null], 'geIcon geSprite geSprite-straight', null).setAttribute('title', mxResources.get('straight')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], 'geIcon geSprite geSprite-entity', null).setAttribute('title', mxResources.get('entityRelation')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], 'geIcon geSprite geSprite-helbow', null).setAttribute('title', mxResources.get('horizontal')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], 'geIcon geSprite geSprite-velbow', null).setAttribute('title', mxResources.get('vertical')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], 'geIcon geSprite geSprite-segment', null).setAttribute('title', mxResources.get('manual')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], 'geIcon geSprite geSprite-orthogonal', null).setAttribute('title', mxResources.get('automatic')); - // })); - // var linestart = this.addMenuFunction('geSprite-startclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu) - // { - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null).setAttribute('title', mxResources.get('classic')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-startopen', null).setAttribute('title', mxResources.get('openArrow')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null).setAttribute('title', mxResources.get('block')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null).setAttribute('title', mxResources.get('oval')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null).setAttribute('title', mxResources.get('diamond')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null).setAttribute('title', mxResources.get('diamondThin')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null).setAttribute('title', mxResources.get('classic')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null).setAttribute('title', mxResources.get('block')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null).setAttribute('title', mxResources.get('oval')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null).setAttribute('title', mxResources.get('diamond')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin')); - // })); - // var lineend = this.addMenuFunction('geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu) - // { - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null).setAttribute('title', mxResources.get('classic')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-endopen', null).setAttribute('title', mxResources.get('openArrow')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null).setAttribute('title', mxResources.get('block')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null).setAttribute('title', mxResources.get('oval')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null).setAttribute('title', mxResources.get('diamond')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null).setAttribute('title', mxResources.get('diamondThin')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null).setAttribute('title', mxResources.get('classic')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null).setAttribute('title', mxResources.get('block')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null).setAttribute('title', mxResources.get('oval')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null).setAttribute('title', mxResources.get('diamond')); - // this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin')); - // })); - // this.addItems(['-', 'strokeColor', 'image', 'fillColor']); - // this.addItem('geSprite-gradientcolor', 'gradientColor').setAttribute('title', mxResources.get('gradient')); - // this.addItems(['shadow']); - - var graph = this.editorUi.editor.graph; - - // Update font size and font family labels - var update = mxUtils.bind(this, function() - { - var ff = 'Helvetica'; - var fs = '12'; - var state = graph.getView().getState(graph.getSelectionCell()); - - if (state != null) - { - ff = state.style[mxConstants.STYLE_FONTFAMILY] || ff; - fs = state.style[mxConstants.STYLE_FONTSIZE] || fs; - - if (ff.length > 10) - { - ff = ff.substring(0, 8) + '...'; - } - - fontElt.innerHTML = ff; - sizeElt.innerHTML = fs; - } - }); - - graph.getSelectionModel().addListener(mxEvent.CHANGE, update); - graph.getModel().addListener(mxEvent.CHANGE, update); - - // Giuseppe Careri - // Updates button states - //this.addEdgeSelectionHandler([line, linestart, lineend]); - //this.addSelectionHandler([align]); -}; - -/** - * Hides the current menu. - */ -Toolbar.prototype.hideMenu = function() -{ - if (this.currentMenu != null) - { - this.currentMenu.hideMenu(); - this.currentMenu.destroy(); - this.currentMenu = null; - } -}; - -/** - * Adds a label to the toolbar. - */ -Toolbar.prototype.addMenu = function(label, tooltip, showLabels, name) -{ - var menu = this.editorUi.menus.get(name); - var elt = this.addMenuFunction(label, tooltip, showLabels, menu.funct); - - menu.addListener('stateChanged', function() - { - elt.setEnabled(menu.enabled); - }); - - return elt; -}; - -/** - * Adds a label to the toolbar. - */ -Toolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct) -{ - var elt = (showLabels) ? this.createLabel(label) : this.createButton(label); - this.initElement(elt, tooltip); - this.addMenuHandler(elt, showLabels, funct); - this.container.appendChild(elt); - - return elt; -}; - -/** - * Adds a separator to the separator. - */ -Toolbar.prototype.addSeparator = function() -{ - var elt = document.createElement('div'); - elt.className = 'geSeparator'; - this.container.appendChild(elt); - - return elt; -}; - -/** - * Adds given action item - */ -Toolbar.prototype.addItems = function(keys) -{ - for (var i = 0; i < keys.length; i++) - { - var key = keys[i]; - - if (key == '-') - { - this.addSeparator(); - } - else - { - this.addItem('geSprite-' + key.toLowerCase(), key); - } - } -}; - -/** - * Adds given action item - */ -Toolbar.prototype.addItem = function(sprite, key) -{ - var action = this.editorUi.actions.get(key); - var elt = null; - - if (action != null) - { - elt = this.addButton(sprite, action.label, action.funct); - elt.setEnabled(action.enabled); - - action.addListener('stateChanged', function() - { - elt.setEnabled(action.enabled); - }); - } - - return elt; -}; - -/** - * Adds a button to the toolbar. - */ -Toolbar.prototype.addButton = function(classname, tooltip, funct) -{ - var elt = this.createButton(classname); - - this.initElement(elt, tooltip); - this.addClickHandler(elt, funct); - this.container.appendChild(elt); - - return elt; -}; - -/** - * Updates the states of the given toolbar items based on the selection. - */ -Toolbar.prototype.addSelectionHandler = function(items) -{ - var graph = this.editorUi.editor.graph; - - var selectionListener = function() - { - var selected = !graph.isSelectionEmpty(); - - for (var i = 0; i < items.length; i++) - { - items[i].setEnabled(selected); - } - }; - - graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener); - selectionListener(); -}; - -/** - * Updates the states of the given toolbar items based on the selection. - */ -Toolbar.prototype.addEdgeSelectionHandler = function(items) -{ - var graph = this.editorUi.editor.graph; - - var selectionListener = function() - { - var edgeSelected = false; - - if (!graph.isSelectionEmpty()) - { - var cells = graph.getSelectionCells(); - - for (var i = 0; i < cells.length; i++) - { - if (graph.getModel().isEdge(cells[i])) - { - edgeSelected = true; - break; - } - } - } - - for (var i = 0; i < items.length; i++) - { - items[i].setEnabled(edgeSelected); - } - }; - - graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener); - selectionListener(); -}; - -/** - * Initializes the given toolbar element. - */ -Toolbar.prototype.initElement = function(elt, tooltip) -{ - elt.setAttribute('tabindex', '0'); - - // Adds tooltip - if (tooltip != null) - { - elt.setAttribute('title', tooltip); - } - - this.addEnabledState(elt); -}; - -/** - * Adds enabled state with setter to DOM node (avoids JS wrapper). - */ -Toolbar.prototype.addEnabledState = function(elt) -{ - var classname = elt.className; - - elt.setEnabled = function(value) - { - elt.enabled = value; - - if (value) - { - elt.className = classname; - } - else - { - elt.className = classname + ' geDisabled'; - } - }; - - elt.setEnabled(true); -}; - -/** - * Adds enabled state with setter to DOM node (avoids JS wrapper). - */ -Toolbar.prototype.addClickHandler = function(elt, funct) -{ - if (funct != null) - { - mxEvent.addListener(elt, 'click', function(evt) - { - if (elt.enabled) - { - funct(evt); - } - - mxEvent.consume(evt); - }); - } -}; - -/** - * Creates and returns a new button. - */ -Toolbar.prototype.createButton = function(classname) -{ - var elt = document.createElement('a'); - elt.setAttribute('href', 'javascript:void(0);'); - elt.className = 'geButton'; - - var inner = document.createElement('div'); - inner.className = 'geSprite ' + classname; - elt.appendChild(inner); - - return elt; -}; - -/** - * Creates and returns a new button. - */ -Toolbar.prototype.createLabel = function(label, tooltip) -{ - var elt = document.createElement('a'); - elt.setAttribute('href', 'javascript:void(0);'); - elt.className = 'geLabel'; - mxUtils.write(elt, label); - - return elt; -}; - -/** - * Adds a handler for showing a menu in the given element. - */ -Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll) -{ - if (funct != null) - { - var graph = this.editorUi.editor.graph; - var menu = null; - - mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt) - { - if (elt.enabled == null || elt.enabled) - { - graph.panningHandler.hideMenu(); - menu = new mxPopupMenu(funct); - menu.div.className += ' geToolbarMenu'; - menu.showDisabled = showAll; - menu.labels = showLabels; - menu.autoExpand = true; - - menu.popup(elt.offsetLeft, elt.offsetTop + elt.offsetHeight + 34, null, evt); - this.currentMenu = menu; - } - - mxEvent.consume(evt); - })); - } -}; +var _0xcef9=["\x65\x64\x69\x74\x6F\x72\x55\x69","\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x69\x6E\x69\x74","\x68\x69\x64\x65\x4D\x65\x6E\x75","\x62\x69\x6E\x64","\x61\x64\x64\x47\x65\x73\x74\x75\x72\x65\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x61\x76\x65","\x70\x75\x62\x6C\x69\x73\x68","\x2D","\x70\x72\x69\x6E\x74","\x75\x6E\x64\x6F","\x72\x65\x64\x6F","\x63\x6F\x70\x79","\x63\x75\x74","\x70\x61\x73\x74\x65","\x64\x65\x6C\x65\x74\x65","\x64\x75\x70\x6C\x69\x63\x61\x74\x65","\x61\x63\x74\x75\x61\x6C\x53\x69\x7A\x65","\x7A\x6F\x6F\x6D\x49\x6E","\x7A\x6F\x6F\x6D\x4F\x75\x74","\x61\x64\x64\x49\x74\x65\x6D\x73","\x48\x65\x6C\x76\x65\x74\x69\x63\x61","\x66\x6F\x6E\x74\x46\x61\x6D\x69\x6C\x79","\x67\x65\x74","\x61\x64\x64\x4D\x65\x6E\x75","\x77\x68\x69\x74\x65\x53\x70\x61\x63\x65","\x73\x74\x79\x6C\x65","\x6E\x6F\x77\x72\x61\x70","\x6F\x76\x65\x72\x66\x6C\x6F\x77","\x68\x69\x64\x64\x65\x6E","\x77\x69\x64\x74\x68","\x37\x30\x70\x78","\x61\x64\x64\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x31\x32","\x66\x6F\x6E\x74\x53\x69\x7A\x65","\x33\x30\x70\x78","\x62\x6F\x6C\x64","\x69\x74\x61\x6C\x69\x63","\x75\x6E\x64\x65\x72\x6C\x69\x6E\x65","\x67\x72\x61\x70\x68","\x65\x64\x69\x74\x6F\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C","\x67\x65\x74\x53\x74\x61\x74\x65","\x67\x65\x74\x56\x69\x65\x77","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x46\x41\x4D\x49\x4C\x59","\x53\x54\x59\x4C\x45\x5F\x46\x4F\x4E\x54\x53\x49\x5A\x45","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2E\x2E\x2E","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x61\x64\x64\x4C\x69\x73\x74\x65\x6E\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x4D\x6F\x64\x65\x6C","\x67\x65\x74\x4D\x6F\x64\x65\x6C","\x63\x75\x72\x72\x65\x6E\x74\x4D\x65\x6E\x75","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x6E\x75\x73","\x66\x75\x6E\x63\x74","\x61\x64\x64\x4D\x65\x6E\x75\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x73\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65\x64","\x65\x6E\x61\x62\x6C\x65\x64","\x73\x65\x74\x45\x6E\x61\x62\x6C\x65\x64","\x63\x72\x65\x61\x74\x65\x4C\x61\x62\x65\x6C","\x63\x72\x65\x61\x74\x65\x42\x75\x74\x74\x6F\x6E","\x69\x6E\x69\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x61\x64\x64\x4D\x65\x6E\x75\x48\x61\x6E\x64\x6C\x65\x72","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x64\x69\x76","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x67\x65\x53\x65\x70\x61\x72\x61\x74\x6F\x72","\x67\x65\x53\x70\x72\x69\x74\x65\x2D","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x61\x64\x64\x49\x74\x65\x6D","\x61\x63\x74\x69\x6F\x6E\x73","\x6C\x61\x62\x65\x6C","\x61\x64\x64\x42\x75\x74\x74\x6F\x6E","\x61\x64\x64\x43\x6C\x69\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72","\x61\x64\x64\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x69\x73\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x45\x6D\x70\x74\x79","\x61\x64\x64\x45\x64\x67\x65\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x48\x61\x6E\x64\x6C\x65\x72","\x67\x65\x74\x53\x65\x6C\x65\x63\x74\x69\x6F\x6E\x43\x65\x6C\x6C\x73","\x69\x73\x45\x64\x67\x65","\x74\x61\x62\x69\x6E\x64\x65\x78","\x30","\x73\x65\x74\x41\x74\x74\x72\x69\x62\x75\x74\x65","\x74\x69\x74\x6C\x65","\x61\x64\x64\x45\x6E\x61\x62\x6C\x65\x64\x53\x74\x61\x74\x65","\x20\x67\x65\x44\x69\x73\x61\x62\x6C\x65\x64","\x63\x6C\x69\x63\x6B","\x63\x6F\x6E\x73\x75\x6D\x65","\x61","\x68\x72\x65\x66","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B","\x67\x65\x42\x75\x74\x74\x6F\x6E","\x67\x65\x53\x70\x72\x69\x74\x65\x20","\x67\x65\x4C\x61\x62\x65\x6C","\x77\x72\x69\x74\x65","\x70\x61\x6E\x6E\x69\x6E\x67\x48\x61\x6E\x64\x6C\x65\x72","\x20\x67\x65\x54\x6F\x6F\x6C\x62\x61\x72\x4D\x65\x6E\x75","\x73\x68\x6F\x77\x44\x69\x73\x61\x62\x6C\x65\x64","\x6C\x61\x62\x65\x6C\x73","\x61\x75\x74\x6F\x45\x78\x70\x61\x6E\x64","\x6F\x66\x66\x73\x65\x74\x4C\x65\x66\x74","\x6F\x66\x66\x73\x65\x74\x54\x6F\x70","\x6F\x66\x66\x73\x65\x74\x48\x65\x69\x67\x68\x74","\x70\x6F\x70\x75\x70"];function Toolbar(_0x9386x2,_0x9386x3){this[_0xcef9[0]]= _0x9386x2;this[_0xcef9[1]]= _0x9386x3;this[_0xcef9[2]]();mxEvent[_0xcef9[5]](document,mxUtils[_0xcef9[4]](this,function(_0x9386x4){this[_0xcef9[3]]()}))}Toolbar[_0xcef9[6]][_0xcef9[2]]= function(){this[_0xcef9[21]]([_0xcef9[7],_0xcef9[8],_0xcef9[9],_0xcef9[10],_0xcef9[11],_0xcef9[12],_0xcef9[9],_0xcef9[13],_0xcef9[14],_0xcef9[15],_0xcef9[16],_0xcef9[9],_0xcef9[17],_0xcef9[9],_0xcef9[18],_0xcef9[19],_0xcef9[20],_0xcef9[9]]);var _0x9386x5=this[_0xcef9[25]](_0xcef9[22],mxResources[_0xcef9[24]](_0xcef9[23]),true,_0xcef9[23]);_0x9386x5[_0xcef9[27]][_0xcef9[26]]= _0xcef9[28];_0x9386x5[_0xcef9[27]][_0xcef9[29]]= _0xcef9[30];_0x9386x5[_0xcef9[27]][_0xcef9[31]]= _0xcef9[32];this[_0xcef9[33]]();var _0x9386x6=this[_0xcef9[25]](_0xcef9[34],mxResources[_0xcef9[24]](_0xcef9[35]),true,_0xcef9[35]);_0x9386x6[_0xcef9[27]][_0xcef9[26]]= _0xcef9[28];_0x9386x6[_0xcef9[27]][_0xcef9[29]]= _0xcef9[30];_0x9386x6[_0xcef9[27]][_0xcef9[31]]= _0xcef9[36];this[_0xcef9[21]]([_0xcef9[9],_0xcef9[37],_0xcef9[38],_0xcef9[39]]);var _0x9386x7=this[_0xcef9[0]][_0xcef9[41]][_0xcef9[40]];var _0x9386x8=mxUtils[_0xcef9[4]](this,function(){var _0x9386x9=_0xcef9[22];var _0x9386xa=_0xcef9[34];var _0x9386xb=_0x9386x7[_0xcef9[44]]()[_0xcef9[43]](_0x9386x7[_0xcef9[42]]());if(_0x9386xb!= null){_0x9386x9= _0x9386xb[_0xcef9[27]][mxConstants[_0xcef9[45]]]|| _0x9386x9;_0x9386xa= _0x9386xb[_0xcef9[27]][mxConstants[_0xcef9[46]]]|| _0x9386xa;if(_0x9386x9[_0xcef9[47]]> 10){_0x9386x9= _0x9386x9[_0xcef9[48]](0,8)+ _0xcef9[49]};_0x9386x5[_0xcef9[50]]= _0x9386x9;_0x9386x6[_0xcef9[50]]= _0x9386xa}});_0x9386x7[_0xcef9[52]]()[_0xcef9[51]](mxEvent.CHANGE,_0x9386x8);_0x9386x7[_0xcef9[53]]()[_0xcef9[51]](mxEvent.CHANGE,_0x9386x8)};Toolbar[_0xcef9[6]][_0xcef9[3]]= function(){if(this[_0xcef9[54]]!= null){this[_0xcef9[54]][_0xcef9[3]]();this[_0xcef9[54]][_0xcef9[55]]();this[_0xcef9[54]]= null}};Toolbar[_0xcef9[6]][_0xcef9[25]]= function(_0x9386xc,_0x9386xd,_0x9386xe,_0x9386xf){var _0x9386x10=this[_0xcef9[0]][_0xcef9[56]][_0xcef9[24]](_0x9386xf);var _0x9386x11=this[_0xcef9[58]](_0x9386xc,_0x9386xd,_0x9386xe,_0x9386x10[_0xcef9[57]]);_0x9386x10[_0xcef9[51]](_0xcef9[59],function(){_0x9386x11[_0xcef9[61]](_0x9386x10[_0xcef9[60]])});return _0x9386x11};Toolbar[_0xcef9[6]][_0xcef9[58]]= function(_0x9386xc,_0x9386xd,_0x9386xe,_0x9386x12){var _0x9386x11=(_0x9386xe)?this[_0xcef9[62]](_0x9386xc):this[_0xcef9[63]](_0x9386xc);this[_0xcef9[64]](_0x9386x11,_0x9386xd);this[_0xcef9[65]](_0x9386x11,_0x9386xe,_0x9386x12);this[_0xcef9[1]][_0xcef9[66]](_0x9386x11);return _0x9386x11};Toolbar[_0xcef9[6]][_0xcef9[33]]= function(){var _0x9386x11=document[_0xcef9[68]](_0xcef9[67]);_0x9386x11[_0xcef9[69]]= _0xcef9[70];this[_0xcef9[1]][_0xcef9[66]](_0x9386x11);return _0x9386x11};Toolbar[_0xcef9[6]][_0xcef9[21]]= function(_0x9386x13){for(var _0x9386x14=0;_0x9386x14< _0x9386x13[_0xcef9[47]];_0x9386x14++){var _0x9386x15=_0x9386x13[_0x9386x14];if(_0x9386x15== _0xcef9[9]){this[_0xcef9[33]]()}else {this[_0xcef9[73]](_0xcef9[71]+ _0x9386x15[_0xcef9[72]](),_0x9386x15)}}};Toolbar[_0xcef9[6]][_0xcef9[73]]= function(_0x9386x16,_0x9386x15){var _0x9386x17=this[_0xcef9[0]][_0xcef9[74]][_0xcef9[24]](_0x9386x15);var _0x9386x11=null;if(_0x9386x17!= null){_0x9386x11= this[_0xcef9[76]](_0x9386x16,_0x9386x17[_0xcef9[75]],_0x9386x17[_0xcef9[57]]);_0x9386x11[_0xcef9[61]](_0x9386x17[_0xcef9[60]]);_0x9386x17[_0xcef9[51]](_0xcef9[59],function(){_0x9386x11[_0xcef9[61]](_0x9386x17[_0xcef9[60]])})};return _0x9386x11};Toolbar[_0xcef9[6]][_0xcef9[76]]= function(_0x9386x18,_0x9386xd,_0x9386x12){var _0x9386x11=this[_0xcef9[63]](_0x9386x18);this[_0xcef9[64]](_0x9386x11,_0x9386xd);this[_0xcef9[77]](_0x9386x11,_0x9386x12);this[_0xcef9[1]][_0xcef9[66]](_0x9386x11);return _0x9386x11};Toolbar[_0xcef9[6]][_0xcef9[78]]= function(_0x9386x19){var _0x9386x7=this[_0xcef9[0]][_0xcef9[41]][_0xcef9[40]];var _0x9386x1a=function(){var _0x9386x1b=!_0x9386x7[_0xcef9[79]]();for(var _0x9386x14=0;_0x9386x14< _0x9386x19[_0xcef9[47]];_0x9386x14++){_0x9386x19[_0x9386x14][_0xcef9[61]](_0x9386x1b)}};_0x9386x7[_0xcef9[52]]()[_0xcef9[51]](mxEvent.CHANGE,_0x9386x1a);_0x9386x1a()};Toolbar[_0xcef9[6]][_0xcef9[80]]= function(_0x9386x19){var _0x9386x7=this[_0xcef9[0]][_0xcef9[41]][_0xcef9[40]];var _0x9386x1a=function(){var _0x9386x1c=false;if(!_0x9386x7[_0xcef9[79]]()){var _0x9386x1d=_0x9386x7[_0xcef9[81]]();for(var _0x9386x14=0;_0x9386x14< _0x9386x1d[_0xcef9[47]];_0x9386x14++){if(_0x9386x7[_0xcef9[53]]()[_0xcef9[82]](_0x9386x1d[_0x9386x14])){_0x9386x1c= true;break}}};for(var _0x9386x14=0;_0x9386x14< _0x9386x19[_0xcef9[47]];_0x9386x14++){_0x9386x19[_0x9386x14][_0xcef9[61]](_0x9386x1c)}};_0x9386x7[_0xcef9[52]]()[_0xcef9[51]](mxEvent.CHANGE,_0x9386x1a);_0x9386x1a()};Toolbar[_0xcef9[6]][_0xcef9[64]]= function(_0x9386x11,_0x9386xd){_0x9386x11[_0xcef9[85]](_0xcef9[83],_0xcef9[84]);if(_0x9386xd!= null){_0x9386x11[_0xcef9[85]](_0xcef9[86],_0x9386xd)};this[_0xcef9[87]](_0x9386x11)};Toolbar[_0xcef9[6]][_0xcef9[87]]= function(_0x9386x11){var _0x9386x18=_0x9386x11[_0xcef9[69]];_0x9386x11[_0xcef9[61]]= function(_0x9386x1e){_0x9386x11[_0xcef9[60]]= _0x9386x1e;if(_0x9386x1e){_0x9386x11[_0xcef9[69]]= _0x9386x18}else {_0x9386x11[_0xcef9[69]]= _0x9386x18+ _0xcef9[88]}};_0x9386x11[_0xcef9[61]](true)};Toolbar[_0xcef9[6]][_0xcef9[77]]= function(_0x9386x11,_0x9386x12){if(_0x9386x12!= null){mxEvent[_0xcef9[51]](_0x9386x11,_0xcef9[89],function(_0x9386x4){if(_0x9386x11[_0xcef9[60]]){_0x9386x12(_0x9386x4)};mxEvent[_0xcef9[90]](_0x9386x4)})}};Toolbar[_0xcef9[6]][_0xcef9[63]]= function(_0x9386x18){var _0x9386x11=document[_0xcef9[68]](_0xcef9[91]);_0x9386x11[_0xcef9[85]](_0xcef9[92],_0xcef9[93]);_0x9386x11[_0xcef9[69]]= _0xcef9[94];var _0x9386x1f=document[_0xcef9[68]](_0xcef9[67]);_0x9386x1f[_0xcef9[69]]= _0xcef9[95]+ _0x9386x18;_0x9386x11[_0xcef9[66]](_0x9386x1f);return _0x9386x11};Toolbar[_0xcef9[6]][_0xcef9[62]]= function(_0x9386xc,_0x9386xd){var _0x9386x11=document[_0xcef9[68]](_0xcef9[91]);_0x9386x11[_0xcef9[85]](_0xcef9[92],_0xcef9[93]);_0x9386x11[_0xcef9[69]]= _0xcef9[96];mxUtils[_0xcef9[97]](_0x9386x11,_0x9386xc);return _0x9386x11};Toolbar[_0xcef9[6]][_0xcef9[65]]= function(_0x9386x11,_0x9386xe,_0x9386x12,_0x9386x20){if(_0x9386x12!= null){var _0x9386x7=this[_0xcef9[0]][_0xcef9[41]][_0xcef9[40]];var _0x9386x10=null;mxEvent[_0xcef9[51]](_0x9386x11,_0xcef9[89],mxUtils[_0xcef9[4]](this,function(_0x9386x4){if(_0x9386x11[_0xcef9[60]]== null|| _0x9386x11[_0xcef9[60]]){_0x9386x7[_0xcef9[98]][_0xcef9[3]]();_0x9386x10= new mxPopupMenu(_0x9386x12);_0x9386x10[_0xcef9[67]][_0xcef9[69]]+= _0xcef9[99];_0x9386x10[_0xcef9[100]]= _0x9386x20;_0x9386x10[_0xcef9[101]]= _0x9386xe;_0x9386x10[_0xcef9[102]]= true;_0x9386x10[_0xcef9[106]](_0x9386x11[_0xcef9[103]],_0x9386x11[_0xcef9[104]]+ _0x9386x11[_0xcef9[105]]+ 34,null,_0x9386x4);this[_0xcef9[54]]= _0x9386x10};mxEvent[_0xcef9[90]](_0x9386x4)}))}} \ No newline at end of file diff --git a/public/assets/plugins/square/js/custom.js b/public/assets/plugins/square/js/custom.js index 761d95c..cb41812 100644 --- a/public/assets/plugins/square/js/custom.js +++ b/public/assets/plugins/square/js/custom.js @@ -1,307 +1 @@ -var urlParams = (function(url) { - var result = new Object(); - var idx = url.lastIndexOf('?'); - - if (idx > 0) { - var params = url.substring(idx + 1).split('&'); - - for (var i = 0; i < params.length; i++) { - idx = params[i].indexOf('='); - - if (idx > 0) { - result[params[i].substring(0, idx)] = params[i].substring(idx + 1); - } - } - } - - return result; -})(window.location.href); - -var t0 = new Date(); - -// Public global variables -var MAX_REQUEST_SIZE = 10485760; -var MAX_WIDTH = 12000; -var MAX_HEIGHT = 12000; - -// CUSTOM_PARAMETERS - URLs for save and export -var EXPORT_URL = 'http://exp.draw.io/ImageExport2/export'; -var SHARE_HOST = 'http://localhost:3000'; - -var SAVE_URL = 'api/square/projects/'; -var VARIABLE_URL = '/api/variables'; - -// Paths and files -var STENCIL_PATH = '/assets/plugins/square/stencils'; -var SHAPES_PATH = '/assets/plugins/square/shapes'; -var IMAGE_PATH = '/assets/plugins/mxgraph/images'; -// Path for images inside the diagram -//var GRAPH_IMAGE_PATH = 'assets/plugins/mxgraph/img'; -//var ICONFINDER_PATH = 'iconfinder'; -var STYLE_PATH = '/assets/plugins/mxgraph/styles'; -var CSS_PATH = '/assets/plugins/mxgraph/styles'; -var OPEN_FORM = 'api/square/projects/open'; -var TEMPLATE_PATH = '/assets/plugins/square/templates'; - -// Directory for i18 files and basename for main i18n file -var RESOURCES_PATH = '/assets/plugins/square/resources'; -var RESOURCE_BASE = RESOURCES_PATH + '/dia'; - -// Specifies connection mode for touch devices (at least one should be true) -var tapAndHoldStartsConnection = true; -var showConnectorImg = true; - -var mxLoadResources = false; -var mxLanguage = 'en'; -console.log('custom', localStorage.getItem('NG_TRANSLATE_LANG_KEY')); -switch (localStorage.getItem('NG_TRANSLATE_LANG_KEY')) { - case 'en_EN': - mxLanguage = 'en'; - break; - case 'it': - mxLanguage = 'it'; - break; - default: - mxLanguage = 'en'; -} -console.log('mxLanguage', mxLanguage); - -var mxLanguages = ['ar', 'bs', 'cs', 'da', 'de', 'el', 'es', 'es-ar', 'fr', - 'hu', 'id', 'it', 'ja', 'ko', 'nl', 'no', 'pl', 'pt-br', 'pt', 'ro', 'ru', - 'sr', 'sv', 'th', 'tr', 'uk', 'zh' -]; -var mxBasePath = 'assets/plugins/mxgraph'; -var geBasePath = 'assets/plugins/mxgraph/js'; - -var ISPEECHLANG = { - usenglishfemale: 'US English Female', - usenglishmale: 'US English Male', - ukenglishfemale: 'UK English Female', - ukenglishmale: 'UK English Male', - auenglishfemale: 'Australian English', - usspanishfemale: 'US Spanish Female', - usspanishmale: 'US Spanish Male', - chchinesefemale: 'Chinese Female', - chchinesemale: 'Chinese Male', - hkchinesefemale: 'Hong Kong Cantonese Female', - twchinesefemale: 'Taiwan Chinese Female', - jpjapanesefemale: 'Japanese Female', - jpjapanesemale: 'Japanese Male', - krkoreanfemale: 'Korean Female', - krkoreanmale: 'Korean Male', - caenglishfemale: 'Canadian English Female', - huhungarianfemale: 'Hungarian Female', - brportuguesefemale: 'Brazilian Portuguese Female', - eurportuguesefemale: 'European Portuguese Female', - eurportuguesemale: 'European Portuguese Male', - eurspanishfemale: 'European Spanish Female', - eurspanishmale: 'European Spanish Male', - eurcatalanfemale: 'European Catalan Female', - eurczechfemale: 'European Czech Female', - eurdanishfemale: 'European Danish Female', - eurfinnishfemale: 'European Finnish Female', - eurfrenchfemale: 'European French Female', - eurfrenchmale: 'European French Male', - eurnorwegianfemale: 'European Norwegian Female', - eurdutchfemale: 'European Dutch Female', - eurpolishfemale: 'European Polish Female', - euritalianfemale: 'European Italian Female', - eurturkishfemale: 'European Turkish Female ', - eurturkishmale: 'European Turkish Male', - eurgermanfemale: 'European German Female', - eurgermanmale: 'European German Male', - rurussianfemale: 'Russian Female', - rurussianmale: 'Russian Male', - swswedishfemale: 'Swedish Female', - cafrenchfemale: 'Canadian French Female', - cafrenchmale: 'Canadian French Male' -}; -var BOOLSELECT = { - 'yes': 'Yes', - 'no': 'No' -}; - -var ISPEECHASRLANG = { - 'en-US': 'English (US)', - 'en-CA': 'English (Canada)', - 'en-GB': 'English (UK)', - 'en-AU': 'English (Australia)', - 'es-ES': 'Spanish (Spain)', - 'es-MX': 'Spanish (Mexico)', - 'it-IT': 'Italian (Italy) / Finnish (Finland)', - 'fr-FR': 'French (France)', - 'fr-CA': 'French (Canada)', - 'pl-PL': 'Polish (Poland)', - 'pt-PT': 'Portuguese (Portugal)', - 'ca-ES': 'Catalan (Catalan)', - 'zh-TW': 'Chinese (Taiwan)', - 'da-DK': 'Danish (Denmark)', - 'fr-FR': 'German (Germany)', - 'ja-JP': 'Japanese (Japan)', - 'ko-KR': 'Korean (Korea)', - 'nl-NL': 'Dutch (Netherlands)', - 'nb-NO': 'Norwegian (Norway)', - 'pt-BR': 'Portuguese (Brazil)', - 'ru-RU': 'Russian (Russia)', - 'sv-SE': 'Swedish (Sweden)', - 'zh-CN': 'Chinese (China)', - 'zh-HK': 'Chinese (Hong Kong)' -}; - -var ISPEECHASRMODEL = { - 0: 'Default', - date: 'Date', - usmoney: 'US Money', - numbersto9: 'Numbers to 9', - numbersto99: 'Numbers to 99', - numbersto999: 'Numbers to 999', - time: 'Time', - phonenumber: 'Phone number', - streets: 'Streets', - citystate: 'US City/States' -}; - -var ISPEECHBEEP = { - 'BEEP': 'Yes', - 'NOBEEP': 'No' -}; - -var RECORDINGFORMAT = { - 'wav': 'wav', - 'gsm': 'gsm' -}; - -var SECRETDIGITSPOS = { - 'first': 'First', - 'last': 'Last' -}; - -var ASRINTKEYS = { - '#': '#', - '*': '*' -}; - -var GOOGLETTSLANG = { - 'af': 'Afrikaans', - 'sq': 'Albanian', - 'am': 'Amharic', - 'ar': 'Arabic', - 'hy': 'Armenian', - 'az': 'Azerbaijani', - 'eu': 'Basque', - 'be': 'Belarusian', - 'bn': 'Bengali', - 'bh': 'Bihari', - 'bs': 'Bosnian', - 'br': 'Breton', - 'bg': 'Bulgarian', - 'km': 'Cambodian', - 'ca': 'Catalan', - 'zh-CN': 'Chinese (Simplified)', - 'zh-TW': 'Chinese (Traditional)', - 'co': 'Corsican', - 'hr': 'Croatian', - 'cs': 'Czech', - 'da': 'Danish', - 'nl': 'Dutch', - 'en': 'English', - 'eo': 'Esperanto', - 'et': 'Estonian', - 'fo': 'Faroese', - 'tl': 'Filipino', - 'fi': 'Finnish', - 'fr': 'French', - 'fy': 'Frisian', - 'gl': 'Galician', - 'ka': 'Georgian', - 'de': 'German', - 'el': 'Greek', - 'gn': 'Guarani', - 'gu': 'Gujarati', - 'xx-hacker': 'Hacker', - 'ha': 'Hausa', - 'iw': 'Hebrew', - 'hi': 'Hindi', - 'hu': 'Hungarian', - 'is': 'Icelandic', - 'id': 'Indonesian', - 'ia': 'Interlingua', - 'ga': 'Irish', - 'it': 'Italian', - 'jw': 'Javanese', - 'ja': 'Japanese', - 'kn': 'Kannada', - 'kk': 'Kazakh', - 'rw': 'Kinyarwanda', - 'rn': 'Kirundi', - 'xx-klingon': 'Klingon', - 'ku': 'Kurdish', - 'ko': 'Korean', - 'ky': 'Kyrgyz', - 'lo': 'Laothian', - 'la': 'Latin', - 'lv': 'Latvian', - 'ln': 'Lingala', - 'lt': 'Lithuanian', - 'mk': 'Macedonian', - 'mg': 'Malagasy', - 'ms': 'Malay', - 'ml': 'Malayalam', - 'mt': 'Maltese', - 'mi': 'Maori', - 'mr': 'Marathi', - 'mo': 'Moldavian', - 'mn': 'Mongolian', - 'sr-ME': 'Montenegrin', - 'ne': 'Nepali', - 'no': 'Norwegian', - 'nn': 'Norwegian (Nynorsk)', - 'oc': 'Occitan', - 'or': 'Oriya', - 'om': 'Oromo', - 'ps': 'Pashto', - 'fa': 'Persian', - 'xx-pirate': 'Pirate', - 'pl': 'Polish', - 'pt-BR': 'Portuguese (Brazil)', - 'pt-PT': 'Portuguese (Portugal)', - 'pa': 'Punjabi', - 'qu': 'Quechua', - 'ro': 'Romanian', - 'rm': 'Romansh', - 'ru': 'Russian', - 'gd': 'Scots Gaelic', - 'sr': 'Serbian', - 'sh': 'Serbo-Croatian', - 'st': 'Sesotho', - 'sn': 'Shona', - 'sd': 'Sindhi', - 'si': 'Sinhalese', - 'sk': 'Slovak', - 'sl': 'Slovenian', - 'so': 'Somali', - 'es': 'Spanish', - 'su': 'Sundanese', - 'sw': 'Swahili', - 'sv': 'Swedish', - 'tg': 'Tajik', - 'ta': 'Tamil', - 'tt': 'Tatar', - 'te': 'Telugu', - 'th': 'Thai', - 'ti': 'Tigrinya', - 'to': 'Tonga', - 'tr': 'Turkish', - 'tk': 'Turkmen', - 'tw': 'Twi', - 'ug': 'Uighur', - 'uk': 'Ukrainian', - 'ur': 'Urdu', - 'uz': 'Uzbek', - 'vi': 'Vietnamese', - 'cy': 'Welsh', - 'xh': 'Xhosa', - 'yi': 'Yiddish', - 'yo': 'Yoruba', - 'zu': 'Zulu' -}; +var _0x1de3=["\x68\x72\x65\x66","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x3F","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x26","\x73\x70\x6C\x69\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x3D","\x69\x6E\x64\x65\x78\x4F\x66","\x68\x74\x74\x70\x3A\x2F\x2F\x65\x78\x70\x2E\x64\x72\x61\x77\x2E\x69\x6F\x2F\x49\x6D\x61\x67\x65\x45\x78\x70\x6F\x72\x74\x32\x2F\x65\x78\x70\x6F\x72\x74","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x33\x30\x30\x30","\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F","\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x68\x61\x70\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x69\x6D\x61\x67\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x73\x74\x79\x6C\x65\x73","\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6F\x70\x65\x6E","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x72\x65\x73\x6F\x75\x72\x63\x65\x73","\x2F\x64\x69\x61","\x65\x6E","\x63\x75\x73\x74\x6F\x6D","\x4E\x47\x5F\x54\x52\x41\x4E\x53\x4C\x41\x54\x45\x5F\x4C\x41\x4E\x47\x5F\x4B\x45\x59","\x67\x65\x74\x49\x74\x65\x6D","\x6C\x6F\x67","\x65\x6E\x5F\x45\x4E","\x69\x74","\x6D\x78\x4C\x61\x6E\x67\x75\x61\x67\x65","\x61\x72","\x62\x73","\x63\x73","\x64\x61","\x64\x65","\x65\x6C","\x65\x73","\x65\x73\x2D\x61\x72","\x66\x72","\x68\x75","\x69\x64","\x6A\x61","\x6B\x6F","\x6E\x6C","\x6E\x6F","\x70\x6C","\x70\x74\x2D\x62\x72","\x70\x74","\x72\x6F","\x72\x75","\x73\x72","\x73\x76","\x74\x68","\x74\x72","\x75\x6B","\x7A\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68","\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x6D\x78\x67\x72\x61\x70\x68\x2F\x6A\x73","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x4B\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x4D\x61\x6C\x65","\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x55\x53\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x43\x68\x69\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x20\x43\x61\x6E\x74\x6F\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x54\x61\x69\x77\x61\x6E\x20\x43\x68\x69\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x4D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x4B\x6F\x72\x65\x61\x6E\x20\x4D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x45\x6E\x67\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x42\x72\x61\x7A\x69\x6C\x69\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x53\x70\x61\x6E\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x61\x74\x61\x6C\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x43\x7A\x65\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x61\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x44\x75\x74\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x50\x6F\x6C\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x49\x74\x61\x6C\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65\x09","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x54\x75\x72\x6B\x69\x73\x68\x20\x4D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x45\x75\x72\x6F\x70\x65\x61\x6E\x20\x47\x65\x72\x6D\x61\x6E\x20\x4D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x46\x65\x6D\x61\x6C\x65","\x52\x75\x73\x73\x69\x61\x6E\x20\x4D\x61\x6C\x65","\x53\x77\x65\x64\x69\x73\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x46\x65\x6D\x61\x6C\x65","\x43\x61\x6E\x61\x64\x69\x61\x6E\x20\x46\x72\x65\x6E\x63\x68\x20\x4D\x61\x6C\x65","\x59\x65\x73","\x4E\x6F","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x53\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x55\x4B\x29","\x45\x6E\x67\x6C\x69\x73\x68\x20\x28\x41\x75\x73\x74\x72\x61\x6C\x69\x61\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x53\x70\x61\x69\x6E\x29","\x53\x70\x61\x6E\x69\x73\x68\x20\x28\x4D\x65\x78\x69\x63\x6F\x29","\x49\x74\x61\x6C\x69\x61\x6E\x20\x28\x49\x74\x61\x6C\x79\x29\x20\x2F\x20\x46\x69\x6E\x6E\x69\x73\x68\x20\x28\x46\x69\x6E\x6C\x61\x6E\x64\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x46\x72\x61\x6E\x63\x65\x29","\x46\x72\x65\x6E\x63\x68\x20\x28\x43\x61\x6E\x61\x64\x61\x29","\x50\x6F\x6C\x69\x73\x68\x20\x28\x50\x6F\x6C\x61\x6E\x64\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x50\x6F\x72\x74\x75\x67\x61\x6C\x29","\x43\x61\x74\x61\x6C\x61\x6E\x20\x28\x43\x61\x74\x61\x6C\x61\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x61\x69\x77\x61\x6E\x29","\x44\x61\x6E\x69\x73\x68\x20\x28\x44\x65\x6E\x6D\x61\x72\x6B\x29","\x47\x65\x72\x6D\x61\x6E\x20\x28\x47\x65\x72\x6D\x61\x6E\x79\x29","\x4A\x61\x70\x61\x6E\x65\x73\x65\x20\x28\x4A\x61\x70\x61\x6E\x29","\x4B\x6F\x72\x65\x61\x6E\x20\x28\x4B\x6F\x72\x65\x61\x29","\x44\x75\x74\x63\x68\x20\x28\x4E\x65\x74\x68\x65\x72\x6C\x61\x6E\x64\x73\x29","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x6F\x72\x77\x61\x79\x29","\x50\x6F\x72\x74\x75\x67\x75\x65\x73\x65\x20\x28\x42\x72\x61\x7A\x69\x6C\x29","\x52\x75\x73\x73\x69\x61\x6E\x20\x28\x52\x75\x73\x73\x69\x61\x29","\x53\x77\x65\x64\x69\x73\x68\x20\x28\x53\x77\x65\x64\x65\x6E\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x43\x68\x69\x6E\x61\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x48\x6F\x6E\x67\x20\x4B\x6F\x6E\x67\x29","\x44\x65\x66\x61\x75\x6C\x74","\x44\x61\x74\x65","\x55\x53\x20\x4D\x6F\x6E\x65\x79","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39","\x4E\x75\x6D\x62\x65\x72\x73\x20\x74\x6F\x20\x39\x39\x39","\x54\x69\x6D\x65","\x50\x68\x6F\x6E\x65\x20\x6E\x75\x6D\x62\x65\x72","\x53\x74\x72\x65\x65\x74\x73","\x55\x53\x20\x43\x69\x74\x79\x2F\x53\x74\x61\x74\x65\x73","\x77\x61\x76","\x67\x73\x6D","\x46\x69\x72\x73\x74","\x4C\x61\x73\x74","\x23","\x2A","\x41\x66\x72\x69\x6B\x61\x61\x6E\x73","\x41\x6C\x62\x61\x6E\x69\x61\x6E","\x41\x6D\x68\x61\x72\x69\x63","\x41\x72\x61\x62\x69\x63","\x41\x72\x6D\x65\x6E\x69\x61\x6E","\x41\x7A\x65\x72\x62\x61\x69\x6A\x61\x6E\x69","\x42\x61\x73\x71\x75\x65","\x42\x65\x6C\x61\x72\x75\x73\x69\x61\x6E","\x42\x65\x6E\x67\x61\x6C\x69","\x42\x69\x68\x61\x72\x69","\x42\x6F\x73\x6E\x69\x61\x6E","\x42\x72\x65\x74\x6F\x6E","\x42\x75\x6C\x67\x61\x72\x69\x61\x6E","\x43\x61\x6D\x62\x6F\x64\x69\x61\x6E","\x43\x61\x74\x61\x6C\x61\x6E","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x53\x69\x6D\x70\x6C\x69\x66\x69\x65\x64\x29","\x43\x68\x69\x6E\x65\x73\x65\x20\x28\x54\x72\x61\x64\x69\x74\x69\x6F\x6E\x61\x6C\x29","\x43\x6F\x72\x73\x69\x63\x61\x6E","\x43\x72\x6F\x61\x74\x69\x61\x6E","\x43\x7A\x65\x63\x68","\x44\x61\x6E\x69\x73\x68","\x44\x75\x74\x63\x68","\x45\x6E\x67\x6C\x69\x73\x68","\x45\x73\x70\x65\x72\x61\x6E\x74\x6F","\x45\x73\x74\x6F\x6E\x69\x61\x6E","\x46\x61\x72\x6F\x65\x73\x65","\x46\x69\x6C\x69\x70\x69\x6E\x6F","\x46\x69\x6E\x6E\x69\x73\x68","\x46\x72\x65\x6E\x63\x68","\x46\x72\x69\x73\x69\x61\x6E","\x47\x61\x6C\x69\x63\x69\x61\x6E","\x47\x65\x6F\x72\x67\x69\x61\x6E","\x47\x65\x72\x6D\x61\x6E","\x47\x72\x65\x65\x6B","\x47\x75\x61\x72\x61\x6E\x69","\x47\x75\x6A\x61\x72\x61\x74\x69","\x48\x61\x63\x6B\x65\x72","\x48\x61\x75\x73\x61","\x48\x65\x62\x72\x65\x77","\x48\x69\x6E\x64\x69","\x48\x75\x6E\x67\x61\x72\x69\x61\x6E","\x49\x63\x65\x6C\x61\x6E\x64\x69\x63","\x49\x6E\x64\x6F\x6E\x65\x73\x69\x61\x6E","\x49\x6E\x74\x65\x72\x6C\x69\x6E\x67\x75\x61","\x49\x72\x69\x73\x68","\x49\x74\x61\x6C\x69\x61\x6E","\x4A\x61\x76\x61\x6E\x65\x73\x65","\x4A\x61\x70\x61\x6E\x65\x73\x65","\x4B\x61\x6E\x6E\x61\x64\x61","\x4B\x61\x7A\x61\x6B\x68","\x4B\x69\x6E\x79\x61\x72\x77\x61\x6E\x64\x61","\x4B\x69\x72\x75\x6E\x64\x69","\x4B\x6C\x69\x6E\x67\x6F\x6E","\x4B\x75\x72\x64\x69\x73\x68","\x4B\x6F\x72\x65\x61\x6E","\x4B\x79\x72\x67\x79\x7A","\x4C\x61\x6F\x74\x68\x69\x61\x6E","\x4C\x61\x74\x69\x6E","\x4C\x61\x74\x76\x69\x61\x6E","\x4C\x69\x6E\x67\x61\x6C\x61","\x4C\x69\x74\x68\x75\x61\x6E\x69\x61\x6E","\x4D\x61\x63\x65\x64\x6F\x6E\x69\x61\x6E","\x4D\x61\x6C\x61\x67\x61\x73\x79","\x4D\x61\x6C\x61\x79","\x4D\x61\x6C\x61\x79\x61\x6C\x61\x6D","\x4D\x61\x6C\x74\x65\x73\x65","\x4D\x61\x6F\x72\x69","\x4D\x61\x72\x61\x74\x68\x69","\x4D\x6F\x6C\x64\x61\x76\x69\x61\x6E","\x4D\x6F\x6E\x67\x6F\x6C\x69\x61\x6E","\x4D\x6F\x6E\x74\x65\x6E\x65\x67\x72\x69\x6E","\x4E\x65\x70\x61\x6C\x69","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E","\x4E\x6F\x72\x77\x65\x67\x69\x61\x6E\x20\x28\x4E\x79\x6E\x6F\x72\x73\x6B\x29","\x4F\x63\x63\x69\x74\x61\x6E","\x4F\x72\x69\x79\x61","\x4F\x72\x6F\x6D\x6F","\x50\x61\x73\x68\x74\x6F","\x50\x65\x72\x73\x69\x61\x6E","\x50\x69\x72\x61\x74\x65","\x50\x6F\x6C\x69\x73\x68","\x50\x75\x6E\x6A\x61\x62\x69","\x51\x75\x65\x63\x68\x75\x61","\x52\x6F\x6D\x61\x6E\x69\x61\x6E","\x52\x6F\x6D\x61\x6E\x73\x68","\x52\x75\x73\x73\x69\x61\x6E","\x53\x63\x6F\x74\x73\x20\x47\x61\x65\x6C\x69\x63","\x53\x65\x72\x62\x69\x61\x6E","\x53\x65\x72\x62\x6F\x2D\x43\x72\x6F\x61\x74\x69\x61\x6E","\x53\x65\x73\x6F\x74\x68\x6F","\x53\x68\x6F\x6E\x61","\x53\x69\x6E\x64\x68\x69","\x53\x69\x6E\x68\x61\x6C\x65\x73\x65","\x53\x6C\x6F\x76\x61\x6B","\x53\x6C\x6F\x76\x65\x6E\x69\x61\x6E","\x53\x6F\x6D\x61\x6C\x69","\x53\x70\x61\x6E\x69\x73\x68","\x53\x75\x6E\x64\x61\x6E\x65\x73\x65","\x53\x77\x61\x68\x69\x6C\x69","\x53\x77\x65\x64\x69\x73\x68","\x54\x61\x6A\x69\x6B","\x54\x61\x6D\x69\x6C","\x54\x61\x74\x61\x72","\x54\x65\x6C\x75\x67\x75","\x54\x68\x61\x69","\x54\x69\x67\x72\x69\x6E\x79\x61","\x54\x6F\x6E\x67\x61","\x54\x75\x72\x6B\x69\x73\x68","\x54\x75\x72\x6B\x6D\x65\x6E","\x54\x77\x69","\x55\x69\x67\x68\x75\x72","\x55\x6B\x72\x61\x69\x6E\x69\x61\x6E","\x55\x72\x64\x75","\x55\x7A\x62\x65\x6B","\x56\x69\x65\x74\x6E\x61\x6D\x65\x73\x65","\x57\x65\x6C\x73\x68","\x58\x68\x6F\x73\x61","\x59\x69\x64\x64\x69\x73\x68","\x59\x6F\x72\x75\x62\x61","\x5A\x75\x6C\x75"];var urlParams=(function(_0xfc3cx2){var _0xfc3cx3= new Object();var _0xfc3cx4=_0xfc3cx2[_0x1de3[3]](_0x1de3[2]);if(_0xfc3cx4> 0){var _0xfc3cx5=_0xfc3cx2[_0x1de3[6]](_0xfc3cx4+ 1)[_0x1de3[5]](_0x1de3[4]);for(var _0xfc3cx6=0;_0xfc3cx6< _0xfc3cx5[_0x1de3[7]];_0xfc3cx6++){_0xfc3cx4= _0xfc3cx5[_0xfc3cx6][_0x1de3[9]](_0x1de3[8]);if(_0xfc3cx4> 0){_0xfc3cx3[_0xfc3cx5[_0xfc3cx6][_0x1de3[6]](0,_0xfc3cx4)]= _0xfc3cx5[_0xfc3cx6][_0x1de3[6]](_0xfc3cx4+ 1)}}};return _0xfc3cx3})(window[_0x1de3[1]][_0x1de3[0]]);var t0= new Date();var MAX_REQUEST_SIZE=10485760;var MAX_WIDTH=12000;var MAX_HEIGHT=12000;var EXPORT_URL=_0x1de3[10];var SHARE_HOST=_0x1de3[11];var SAVE_URL=_0x1de3[12];var VARIABLE_URL=_0x1de3[13];var STENCIL_PATH=_0x1de3[14];var SHAPES_PATH=_0x1de3[15];var IMAGE_PATH=_0x1de3[16];var STYLE_PATH=_0x1de3[17];var CSS_PATH=_0x1de3[17];var OPEN_FORM=_0x1de3[18];var TEMPLATE_PATH=_0x1de3[19];var RESOURCES_PATH=_0x1de3[20];var RESOURCE_BASE=RESOURCES_PATH+ _0x1de3[21];var tapAndHoldStartsConnection=true;var showConnectorImg=true;var mxLoadResources=false;var mxLanguage=_0x1de3[22];console[_0x1de3[26]](_0x1de3[23],localStorage[_0x1de3[25]](_0x1de3[24]));switch(localStorage[_0x1de3[25]](_0x1de3[24])){case _0x1de3[27]:mxLanguage= _0x1de3[22];break;case _0x1de3[28]:mxLanguage= _0x1de3[28];break;default:mxLanguage= _0x1de3[22]};console[_0x1de3[26]](_0x1de3[29],mxLanguage);var mxLanguages=[_0x1de3[30],_0x1de3[31],_0x1de3[32],_0x1de3[33],_0x1de3[34],_0x1de3[35],_0x1de3[36],_0x1de3[37],_0x1de3[38],_0x1de3[39],_0x1de3[40],_0x1de3[28],_0x1de3[41],_0x1de3[42],_0x1de3[43],_0x1de3[44],_0x1de3[45],_0x1de3[46],_0x1de3[47],_0x1de3[48],_0x1de3[49],_0x1de3[50],_0x1de3[51],_0x1de3[52],_0x1de3[53],_0x1de3[54],_0x1de3[55]];var mxBasePath=_0x1de3[56];var geBasePath=_0x1de3[57];var ISPEECHLANG={usenglishfemale:_0x1de3[58],usenglishmale:_0x1de3[59],ukenglishfemale:_0x1de3[60],ukenglishmale:_0x1de3[61],auenglishfemale:_0x1de3[62],usspanishfemale:_0x1de3[63],usspanishmale:_0x1de3[64],chchinesefemale:_0x1de3[65],chchinesemale:_0x1de3[66],hkchinesefemale:_0x1de3[67],twchinesefemale:_0x1de3[68],jpjapanesefemale:_0x1de3[69],jpjapanesemale:_0x1de3[70],krkoreanfemale:_0x1de3[71],krkoreanmale:_0x1de3[72],caenglishfemale:_0x1de3[73],huhungarianfemale:_0x1de3[74],brportuguesefemale:_0x1de3[75],eurportuguesefemale:_0x1de3[76],eurportuguesemale:_0x1de3[77],eurspanishfemale:_0x1de3[78],eurspanishmale:_0x1de3[79],eurcatalanfemale:_0x1de3[80],eurczechfemale:_0x1de3[81],eurdanishfemale:_0x1de3[82],eurfinnishfemale:_0x1de3[83],eurfrenchfemale:_0x1de3[84],eurfrenchmale:_0x1de3[85],eurnorwegianfemale:_0x1de3[86],eurdutchfemale:_0x1de3[87],eurpolishfemale:_0x1de3[88],euritalianfemale:_0x1de3[89],eurturkishfemale:_0x1de3[90],eurturkishmale:_0x1de3[91],eurgermanfemale:_0x1de3[92],eurgermanmale:_0x1de3[93],rurussianfemale:_0x1de3[94],rurussianmale:_0x1de3[95],swswedishfemale:_0x1de3[96],cafrenchfemale:_0x1de3[97],cafrenchmale:_0x1de3[98]};var BOOLSELECT={"\x79\x65\x73":_0x1de3[99],"\x6E\x6F":_0x1de3[100]};var ISPEECHASRLANG={"\x65\x6E\x2D\x55\x53":_0x1de3[101],"\x65\x6E\x2D\x43\x41":_0x1de3[102],"\x65\x6E\x2D\x47\x42":_0x1de3[103],"\x65\x6E\x2D\x41\x55":_0x1de3[104],"\x65\x73\x2D\x45\x53":_0x1de3[105],"\x65\x73\x2D\x4D\x58":_0x1de3[106],"\x69\x74\x2D\x49\x54":_0x1de3[107],"\x66\x72\x2D\x46\x52":_0x1de3[108],"\x66\x72\x2D\x43\x41":_0x1de3[109],"\x70\x6C\x2D\x50\x4C":_0x1de3[110],"\x70\x74\x2D\x50\x54":_0x1de3[111],"\x63\x61\x2D\x45\x53":_0x1de3[112],"\x7A\x68\x2D\x54\x57":_0x1de3[113],"\x64\x61\x2D\x44\x4B":_0x1de3[114],"\x66\x72\x2D\x46\x52":_0x1de3[115],"\x6A\x61\x2D\x4A\x50":_0x1de3[116],"\x6B\x6F\x2D\x4B\x52":_0x1de3[117],"\x6E\x6C\x2D\x4E\x4C":_0x1de3[118],"\x6E\x62\x2D\x4E\x4F":_0x1de3[119],"\x70\x74\x2D\x42\x52":_0x1de3[120],"\x72\x75\x2D\x52\x55":_0x1de3[121],"\x73\x76\x2D\x53\x45":_0x1de3[122],"\x7A\x68\x2D\x43\x4E":_0x1de3[123],"\x7A\x68\x2D\x48\x4B":_0x1de3[124]};var ISPEECHASRMODEL={0:_0x1de3[125],date:_0x1de3[126],usmoney:_0x1de3[127],numbersto9:_0x1de3[128],numbersto99:_0x1de3[129],numbersto999:_0x1de3[130],time:_0x1de3[131],phonenumber:_0x1de3[132],streets:_0x1de3[133],citystate:_0x1de3[134]};var ISPEECHBEEP={"\x42\x45\x45\x50":_0x1de3[99],"\x4E\x4F\x42\x45\x45\x50":_0x1de3[100]};var RECORDINGFORMAT={"\x77\x61\x76":_0x1de3[135],"\x67\x73\x6D":_0x1de3[136]};var SECRETDIGITSPOS={"\x66\x69\x72\x73\x74":_0x1de3[137],"\x6C\x61\x73\x74":_0x1de3[138]};var ASRINTKEYS={"\x23":_0x1de3[139],"\x2A":_0x1de3[140]};var GOOGLETTSLANG={"\x61\x66":_0x1de3[141],"\x73\x71":_0x1de3[142],"\x61\x6D":_0x1de3[143],"\x61\x72":_0x1de3[144],"\x68\x79":_0x1de3[145],"\x61\x7A":_0x1de3[146],"\x65\x75":_0x1de3[147],"\x62\x65":_0x1de3[148],"\x62\x6E":_0x1de3[149],"\x62\x68":_0x1de3[150],"\x62\x73":_0x1de3[151],"\x62\x72":_0x1de3[152],"\x62\x67":_0x1de3[153],"\x6B\x6D":_0x1de3[154],"\x63\x61":_0x1de3[155],"\x7A\x68\x2D\x43\x4E":_0x1de3[156],"\x7A\x68\x2D\x54\x57":_0x1de3[157],"\x63\x6F":_0x1de3[158],"\x68\x72":_0x1de3[159],"\x63\x73":_0x1de3[160],"\x64\x61":_0x1de3[161],"\x6E\x6C":_0x1de3[162],"\x65\x6E":_0x1de3[163],"\x65\x6F":_0x1de3[164],"\x65\x74":_0x1de3[165],"\x66\x6F":_0x1de3[166],"\x74\x6C":_0x1de3[167],"\x66\x69":_0x1de3[168],"\x66\x72":_0x1de3[169],"\x66\x79":_0x1de3[170],"\x67\x6C":_0x1de3[171],"\x6B\x61":_0x1de3[172],"\x64\x65":_0x1de3[173],"\x65\x6C":_0x1de3[174],"\x67\x6E":_0x1de3[175],"\x67\x75":_0x1de3[176],"\x78\x78\x2D\x68\x61\x63\x6B\x65\x72":_0x1de3[177],"\x68\x61":_0x1de3[178],"\x69\x77":_0x1de3[179],"\x68\x69":_0x1de3[180],"\x68\x75":_0x1de3[181],"\x69\x73":_0x1de3[182],"\x69\x64":_0x1de3[183],"\x69\x61":_0x1de3[184],"\x67\x61":_0x1de3[185],"\x69\x74":_0x1de3[186],"\x6A\x77":_0x1de3[187],"\x6A\x61":_0x1de3[188],"\x6B\x6E":_0x1de3[189],"\x6B\x6B":_0x1de3[190],"\x72\x77":_0x1de3[191],"\x72\x6E":_0x1de3[192],"\x78\x78\x2D\x6B\x6C\x69\x6E\x67\x6F\x6E":_0x1de3[193],"\x6B\x75":_0x1de3[194],"\x6B\x6F":_0x1de3[195],"\x6B\x79":_0x1de3[196],"\x6C\x6F":_0x1de3[197],"\x6C\x61":_0x1de3[198],"\x6C\x76":_0x1de3[199],"\x6C\x6E":_0x1de3[200],"\x6C\x74":_0x1de3[201],"\x6D\x6B":_0x1de3[202],"\x6D\x67":_0x1de3[203],"\x6D\x73":_0x1de3[204],"\x6D\x6C":_0x1de3[205],"\x6D\x74":_0x1de3[206],"\x6D\x69":_0x1de3[207],"\x6D\x72":_0x1de3[208],"\x6D\x6F":_0x1de3[209],"\x6D\x6E":_0x1de3[210],"\x73\x72\x2D\x4D\x45":_0x1de3[211],"\x6E\x65":_0x1de3[212],"\x6E\x6F":_0x1de3[213],"\x6E\x6E":_0x1de3[214],"\x6F\x63":_0x1de3[215],"\x6F\x72":_0x1de3[216],"\x6F\x6D":_0x1de3[217],"\x70\x73":_0x1de3[218],"\x66\x61":_0x1de3[219],"\x78\x78\x2D\x70\x69\x72\x61\x74\x65":_0x1de3[220],"\x70\x6C":_0x1de3[221],"\x70\x74\x2D\x42\x52":_0x1de3[120],"\x70\x74\x2D\x50\x54":_0x1de3[111],"\x70\x61":_0x1de3[222],"\x71\x75":_0x1de3[223],"\x72\x6F":_0x1de3[224],"\x72\x6D":_0x1de3[225],"\x72\x75":_0x1de3[226],"\x67\x64":_0x1de3[227],"\x73\x72":_0x1de3[228],"\x73\x68":_0x1de3[229],"\x73\x74":_0x1de3[230],"\x73\x6E":_0x1de3[231],"\x73\x64":_0x1de3[232],"\x73\x69":_0x1de3[233],"\x73\x6B":_0x1de3[234],"\x73\x6C":_0x1de3[235],"\x73\x6F":_0x1de3[236],"\x65\x73":_0x1de3[237],"\x73\x75":_0x1de3[238],"\x73\x77":_0x1de3[239],"\x73\x76":_0x1de3[240],"\x74\x67":_0x1de3[241],"\x74\x61":_0x1de3[242],"\x74\x74":_0x1de3[243],"\x74\x65":_0x1de3[244],"\x74\x68":_0x1de3[245],"\x74\x69":_0x1de3[246],"\x74\x6F":_0x1de3[247],"\x74\x72":_0x1de3[248],"\x74\x6B":_0x1de3[249],"\x74\x77":_0x1de3[250],"\x75\x67":_0x1de3[251],"\x75\x6B":_0x1de3[252],"\x75\x72":_0x1de3[253],"\x75\x7A":_0x1de3[254],"\x76\x69":_0x1de3[255],"\x63\x79":_0x1de3[256],"\x78\x68":_0x1de3[257],"\x79\x69":_0x1de3[258],"\x79\x6F":_0x1de3[259],"\x7A\x75":_0x1de3[260]} \ No newline at end of file diff --git a/release-notes/changelog_0.0.141.txt b/release-notes/changelog_0.0.141.txt index 0705d04..1148c62 100644 --- a/release-notes/changelog_0.0.141.txt +++ b/release-notes/changelog_0.0.141.txt @@ -1,5 +1,8 @@ # xCALLY MOTION Changelog +- * 611e8c8 - 2016-09-14: Fixed trunk update from td registry +- * 805104c - 2016-09-14: update fax +- * a1011f2 - 2016-09-14: Gruntfile.js - * 4500188 - 2016-09-14: server config action update - * e5a579d - 2016-09-14: Fixed triggers - * 6436f3a - 2016-09-14: server side config ami update @@ -120,9 +123,4 @@ - * 4a54072 - 2016-09-08: rename interval and time column with time interval (all channels) - * 10b591b - 2016-09-08: Added NOT LIKE operator in reports conditions; Added quotes for report fields in case of simple table field( not custom or metric) - * 1d4ed16 - 2016-09-08: fixed function name -- * ccd545d - 2016-09-07: Added error message for maximum limit of agents reached -- * 8d81d02 - 2016-09-07: Index js fix -- * a8c5748 - 2016-09-07: server side config ami index.js update -- * dbb9185 - 2016-09-07: package.json -- * baeb38d - 2016-09-07: Added custom variables check for urlforward trigger action; Moved all http functions under urlforward. diff --git a/server/api/_apidoc.js b/server/api/_apidoc.js index 836e5a5..e06a537 100644 --- a/server/api/_apidoc.js +++ b/server/api/_apidoc.js @@ -1,21 +1 @@ -/** - * @api {post} /api/auth/local/ Basic authentication - * - * @apiVersion 0.0.140 - * @apiName BasicAuth - * @apiGroup Authentication - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiSuccess {String} role User/Agent role. - * @apiSuccess {String} token User/Agent token. - * @apiSuccess {Number} userId User/Agent ID. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "role": "admin", - * "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI6MTQsImlhdCI6MTQ3MjQ1ODIyMiwiZXhwIjoxNDcyNTQ0NjIyfQ" - * "userId": 5 - * } - */ +var _0xe638=[] \ No newline at end of file diff --git a/server/api/action/action.controller.js b/server/api/action/action.controller.js index a5d8d27..af11315 100644 --- a/server/api/action/action.controller.js +++ b/server/api/action/action.controller.js @@ -1,88 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/actions -> index - * POST /api/actions -> create - * GET /api/actions/:id -> show - * PUT /api/actions/:id -> update - * DELETE /api/actions/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var Action = require('../../models').Action; -var sequelize = require('../../models').sequelize; - -function handleError(res, err) { - return res.status(500).send(err); -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of Actions -exports.index = function(req, res) { - return Action.findAll() - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new Action in the DB -exports.create = function(req, res, next) { - req.body.UserId = req.user.id; - return sequelize.transaction(function(t) { - return Action - .create(_.merge(req.body, req.params), { - transaction: t, - body: req.body - }); - }) - .then(function(action) { - return res.status(201).send(action); - }).catch(function(err) { - console.log(err); - if (err.message === 'Interface not found') { - err.message = 'No queues associated for the user'; - err.translatedMessage = 'MESSAGE_NO_USER_QUEUES'; - } - return handleError(res, err); - }); -} +var _0x2707=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x69\x64","\x75\x73\x65\x72","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x49\x6E\x74\x65\x72\x66\x61\x63\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x4E\x6F\x20\x71\x75\x65\x75\x65\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x4E\x4F\x5F\x55\x53\x45\x52\x5F\x51\x55\x45\x55\x45\x53","\x70\x61\x72\x61\x6D\x73","\x6D\x65\x72\x67\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E"];_0x2707[0];var _=require(_0x2707[1]);var Action=require(_0x2707[3])[_0x2707[2]];var sequelize=require(_0x2707[3])[_0x2707[4]];function handleError(_0x137fx5,_0x137fx6){return _0x137fx5[_0x2707[6]](500)[_0x2707[5]](_0x137fx6)}function responseWithResult(_0x137fx5,_0x137fx8){_0x137fx8= _0x137fx8|| 200;return function(_0x137fx9){if(_0x137fx9){_0x137fx5[_0x2707[6]](_0x137fx8)[_0x2707[7]](_0x137fx9)}}}function handleEntityNotFound(_0x137fx5){return function(_0x137fx9){if(!_0x137fx9){_0x137fx5[_0x2707[6]](404)[_0x2707[8]]();return null};return _0x137fx9}}function saveUpdates(_0x137fxc){return function(_0x137fx9){return _0x137fx9[_0x2707[10]](_0x137fxc)[_0x2707[9]](function(_0x137fxd){return _0x137fxd})}}function removeEntity(_0x137fx5){return function(_0x137fx9){if(_0x137fx9){return _0x137fx9[_0x2707[11]]()[_0x2707[9]](function(){_0x137fx5[_0x2707[6]](204)[_0x2707[8]]()})}}}exports[_0x2707[12]]= function(_0x137fxf,_0x137fx5){return Action[_0x2707[14]]()[_0x2707[9]](responseWithResult(_0x137fx5))[_0x2707[13]](handleError(_0x137fx5))};exports[_0x2707[15]]= function(_0x137fxf,_0x137fx5,_0x137fx10){_0x137fxf[_0x2707[17]][_0x2707[16]]= _0x137fxf[_0x2707[19]][_0x2707[18]];return sequelize[_0x2707[28]](function(_0x137fx12){return Action[_0x2707[15]](_[_0x2707[27]](_0x137fxf[_0x2707[17]],_0x137fxf[_0x2707[26]]),{transaction:_0x137fx12,body:_0x137fxf[_0x2707[17]]})})[_0x2707[9]](function(_0x137fx11){return _0x137fx5[_0x2707[6]](201)[_0x2707[5]](_0x137fx11)})[_0x2707[13]](function(_0x137fx6){console[_0x2707[20]](_0x137fx6);if(_0x137fx6[_0x2707[21]]=== _0x2707[22]){_0x137fx6[_0x2707[21]]= _0x2707[23];_0x137fx6[_0x2707[24]]= _0x2707[25]};return handleError(_0x137fx5,_0x137fx6)})} \ No newline at end of file diff --git a/server/api/action/action.events.js b/server/api/action/action.events.js index 597aed4..aaed01b 100644 --- a/server/api/action/action.events.js +++ b/server/api/action/action.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Action = require('../../models').Action; - -var ActionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ActionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Action.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ActionEvents.emit(event + ':' + doc._id, doc); - ActionEvents.emit(event, doc); - done(null); - } -} - -module.exports = ActionEvents; +var _0xde47=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xde47[0];const EventEmitter=require(_0xde47[1]);const Action=require(_0xde47[3])[_0xde47[2]];var ActionEvents= new EventEmitter();ActionEvents[_0xde47[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xde47[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xde47[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xde47[6]};for(var e in events){var event=events[e];Action[_0xde47[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xfb28x8,_0xfb28x9,_0xfb28xa){ActionEvents[_0xde47[10]](event+ _0xde47[8]+ _0xfb28x8[_0xde47[9]],_0xfb28x8);ActionEvents[_0xde47[10]](event,_0xfb28x8);_0xfb28xa(null)}}module[_0xde47[11]]= ActionEvents \ No newline at end of file diff --git a/server/api/action/action.socket.js b/server/api/action/action.socket.js index 26d4dbd..4a11669 100644 --- a/server/api/action/action.socket.js +++ b/server/api/action/action.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ActionEvents = require('./action.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('action:' + event, socket); - - ActionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ActionEvents.removeListener(event, listener); - }; -} +var _0x1e18=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x1e18[0];const ActionEvents=require(_0x1e18[1]);var events=[_0x1e18[2],_0x1e18[3]];exports[_0x1e18[4]]= function(_0x48adx3){for(var _0x48adx4=0,_0x48adx5=events[_0x1e18[5]];_0x48adx4< _0x48adx5;_0x48adx4++){var _0x48adx6=events[_0x48adx4];var _0x48adx7=createListener(_0x1e18[6]+ _0x48adx6,_0x48adx3);ActionEvents[_0x1e18[7]](_0x48adx6,_0x48adx7);_0x48adx3[_0x1e18[7]](_0x1e18[8],removeListener(_0x48adx6,_0x48adx7))}};function createListener(_0x48adx6,_0x48adx3){return function(_0x48adx9){_0x48adx3[_0x1e18[9]](_0x48adx6,_0x48adx9)}}function removeListener(_0x48adx6,_0x48adx7){return function(){ActionEvents[_0x1e18[10]](_0x48adx6,_0x48adx7)}} \ No newline at end of file diff --git a/server/api/action/index.js b/server/api/action/index.js index 1882fa5..b0d5830 100644 --- a/server/api/action/index.js +++ b/server/api/action/index.js @@ -1,13 +1 @@ -'use strict'; - -var express = require('express'); - -var auth = require('../../auth/auth.service'); -var controller = require('./action.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); -router.post('/:name', auth.isAuthenticated(), controller.create); - -module.exports = router; +var _0xe325=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe325[0];var express=require(_0xe325[1]);var auth=require(_0xe325[2]);var controller=require(_0xe325[3]);var router=express.Router();router[_0xe325[7]](_0xe325[4],auth[_0xe325[5]](),controller[_0xe325[6]]);router[_0xe325[10]](_0xe325[8],auth[_0xe325[5]](),controller[_0xe325[9]]);module[_0xe325[11]]= router \ No newline at end of file diff --git a/server/api/agent/agent.controller.js b/server/api/agent/agent.controller.js index 0e63059..532251f 100644 --- a/server/api/agent/agent.controller.js +++ b/server/api/agent/agent.controller.js @@ -1,1144 +1 @@ -'use strict'; - -var _ = require('lodash'); -var sequelize = require('../../models').sequelize; - -var util = require('util'); -var Util = require('../../config/util'); - -var OpenchannelQueue = require('../../models').OpenchannelQueue; -var VoiceQueue = require('../../models').VoiceQueue; -var ChatQueue = require('../../models').ChatQueue; -var MailQueue = require('../../models').MailQueue; -var FaxQueue = require('../../models').FaxQueue; -var SmsQueue = require('../../models').SmsQueue; -var MailRoom = require('../../models').MailRoom; -var Setting = require('../../models').Setting; -var Agent = require('../../models').User; -var User = require('../../models').User; -var Team = require('../../models').Team; -var List = require('../../models').List; - -// Get list of agents -exports.index = function(req, res, next) { - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getAgentsIdByUser(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); - - default: - return Agent - .scope('agent') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -exports.addQueues = function(req, res, next) { - return Agent - .findById(req.params.id, { - attributes: ['id', 'name'] - }) - .then(function(agent) { - if (!agent) { - return res.sendStatus(401); - } - - switch (req.params.channel) { - case 'voice': - return agent - .addVoiceQueues(req.body, { - interface: util.format('SIP/%s', agent.name), - stateinterface: util.format('SIP/%s', agent.name), - membername: agent.name, - UserId: agent.id, - }); - case 'chat': - return agent - .addChatQueues(req.body); - case 'mail': - return agent - .addMailQueues(req.body); - case 'fax': - return agent - .addFaxQueues(req.body); - case 'sms': - return agent - .addSmsQueues(req.body); - case 'openchannel': - return agent - .addOpenchannelQueues(req.body); - default: - return null; - } - }) - .then(function(queues) { - return res.sendStatus(queues ? 200 : 401); - }) - .catch(function(err) { - console.error(err); - }); -}; - -exports.removeQueues = function(req, res, next) { - return Agent - .findById(req.params.id, { - attributes: ['id'] - }) - .then(function(agent) { - if (!agent) { - return res.sendStatus(401); - } - - switch (req.params.channel) { - case 'voice': - return agent - .removeVoiceQueues(req.query.ids); - case 'chat': - return agent - .removeChatQueues(req.query.ids); - case 'mail': - return agent - .removeMailQueues(req.query.ids); - case 'sms': - return agent - .removeSmsQueues(req.query.ids); - case 'fax': - return agent - .removeFaxQueues(req.query.ids); - case 'openchannel': - return agent - .removeOpenchannelQueues(req.query.ids); - default: - return null; - } - }) - .then(function(queues) { - return res.sendStatus(queues ? 200 : 401); - }) - .catch(function(err) { - console.error(err); - }); -}; - - -// Get list of agents -exports.realtimeIndex = function(req, res, next) { - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getAgentsIdByUser(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - default: - return Agent - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }, 'queues') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } -}; - -exports.realtimeVoiceIndex = function(req, res, next) { - switch (req.user.role) { - case 'user': - var agents = []; - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getVoiceQueuesIdByUser({}, { - attributes: ['name'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var voiceQueues = _.map(queues.rows, 'name'); - queues.rows.forEach(function(queue) { - agents = _.union(agents, _.map(queue.Users, 'id')); - }); - return User - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }) - .findAndCountAll(_.merge(Util.getQuery(req.query, { - id: { - $in: agents - } - }), { - include: [{ - model: VoiceQueue, - where: { - name: { - $in: voiceQueues - } - }, - required: false - }] - })); - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - default: - return Agent - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }, 'queues') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } -}; - -exports.realtimeChatIndex = function(req, res, next) { - switch (req.user.role) { - case 'user': - var agents = []; - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getChatQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var chatQueues = _.map(queues.rows, 'id'); - queues.rows.forEach(function(queue) { - agents = _.union(agents, _.map(queue.Users, 'id')); - }); - return User - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }) - .findAndCountAll(_.merge(Util.getQuery(req.query, { - id: { - $in: agents - } - }), { - include: [{ - model: ChatQueue, - where: { - id: { - $in: chatQueues - } - }, - required: false - }] - })); - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - default: - return Agent - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }, 'queues') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } -}; - -exports.realtimeMailIndex = function(req, res, next) { - switch (req.user.role) { - case 'user': - var agents = []; - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getMailQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var mailQueues = _.map(queues.rows, 'id'); - queues.rows.forEach(function(queue) { - agents = _.union(agents, _.map(queue.Users, 'id')); - }); - return User - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }) - .findAndCountAll(_.merge(Util.getQuery(req.query, { - id: { - $in: agents - } - }), { - include: [{ - model: MailQueue, - where: { - id: { - $in: mailQueues - } - }, - required: false - }] - })); - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - default: - return Agent - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }, 'queues') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } -}; - -exports.realtimeFaxIndex = function(req, res, next) { - switch (req.user.role) { - case 'user': - var agents = []; - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getFaxQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var faxQueues = _.map(queues.rows, 'id'); - queues.rows.forEach(function(queue) { - agents = _.union(agents, _.map(queue.Users, 'id')); - }); - return User - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }) - .findAndCountAll(_.merge(Util.getQuery(req.query, { - id: { - $in: agents - } - }), { - include: [{ - model: FaxQueue, - where: { - id: { - $in: faxQueues - } - }, - required: false - }] - })); - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - default: - return Agent - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }, 'queues') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } -}; -exports.realtimeSmsIndex = function(req, res, next) { - switch (req.user.role) { - case 'user': - var agents = []; - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getSmsQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var smsQueues = _.map(queues.rows, 'id'); - queues.rows.forEach(function(queue) { - agents = _.union(agents, _.map(queue.Users, 'id')); - }); - return User - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }) - .findAndCountAll(_.merge(Util.getQuery(req.query, { - id: { - $in: agents - } - }), { - include: [{ - model: SmsQueue, - where: { - id: { - $in: smsQueues - } - }, - required: false - }] - })); - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - default: - return Agent - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }, 'queues') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } -}; - -exports.realtimeOpenchannelIndex = function(req, res, next) { - switch (req.user.role) { - case 'user': - var agents = []; - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getOpenchannelQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var openchannelQueues = _.map(queues.rows, 'id'); - queues.rows.forEach(function(queue) { - agents = _.union(agents, _.map(queue.Users, 'id')); - }); - return User - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }) - .findAndCountAll(_.merge(Util.getQuery(req.query, { - id: { - $in: agents - } - }), { - include: [{ - model: OpenchannelQueue, - where: { - id: { - $in: openchannelQueues - } - }, - required: false - }] - })); - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - default: - return Agent - .scope('agent', { - method: ['checkPauseStatus', req.query] - }, { - method: ['checkQueueStatus', req.query] - }, { - method: ['checkOnlineStatus', req.query] - }, { - method: ['checkSipStatus', req.query] - }, 'queues') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } -}; -// Get a single agent -exports.show = function(req, res) { - return Agent - .scope('agent') - .findById(req.params.id) - .then(function(agent) { - if (!agent) { - return res.sendStatus(404); - } - return res.send(agent); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single agent -exports.showVoiceQueues = function(req, res) { - return Agent - .scope('agent') - .findById(req.params.id) - .then(function(agent) { - if (!agent) { - return res.sendStatus(404); - } - - return agent - .getVoiceQueues({ - attributes: ['name'] - }); - }) - .then(function(voiceQueues) { - return res.send({ - count: voiceQueues.length, - rows: voiceQueues - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showChatQueues = function(req, res) { - return Agent - .scope('agent') - .findById(req.params.id) - .then(function(agent) { - if (!agent) { - return res.sendStatus(404); - } - - return agent - .getChatQueues({ - attributes: ['id'] - }); - }) - .then(function(chatQueues) { - return res.send({ - count: chatQueues.length, - rows: chatQueues - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showMailQueues = function(req, res) { - return Agent - .scope('agent') - .findById(req.params.id) - .then(function(agent) { - if (!agent) { - return res.sendStatus(404); - } - - return agent - .getMailQueues({ - attributes: ['id'] - }); - }) - .then(function(mailQueues) { - return res.send({ - count: mailQueues.length, - rows: mailQueues - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showFaxQueues = function(req, res) { - return Agent - .scope('agent') - .findById(req.params.id) - .then(function(agent) { - if (!agent) { - return res.sendStatus(404); - } - - return agent - .getFaxQueues({ - attributes: ['id'] - }); - }) - .then(function(faxQueues) { - return res.send({ - count: faxQueues.length, - rows: faxQueues - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showSmsQueues = function(req, res) { - return Agent - .scope('agent') - .findById(req.params.id) - .then(function(agent) { - if (!agent) { - return res.sendStatus(404); - } - - return agent - .getSmsQueues({ - attributes: ['id'] - }); - }) - .then(function(smsQueues) { - return res.send({ - count: smsQueues.length, - rows: smsQueues - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showOpenchannelQueues = function(req, res) { - return Agent - .scope('agent') - .findById(req.params.id) - .then(function(agent) { - if (!agent) { - return res.sendStatus(404); - } - - return agent - .getOpenchannelQueues({ - attributes: ['id'] - }); - }) - .then(function(Queues) { - return res.send({ - count: Queues.length, - rows: Queues - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a new agent in the DB. -exports.create = function(req, res) { - var _agent; - - // Set default role - req.body.role = 'agent'; - - return sequelize.transaction(function(t) { - return Agent - .scope('agent') - .create(req.body, { - transaction: t - }) - .then(function(agent) { - _agent = agent; - - return Team - .findOne({ - where: { - defaultEntry: true - } - }); - }) - .then(function(team) { - return team - .addUser(_agent.id, { - transaction: t - }); - }) - .then(function() { - return List - .findOne({ - where: { - defaultEntry: true - } - }); - }) - .then(function(list) { - return list - .addUser(_agent.id, { - transaction: t - }); - }) - .then(function() { - if (req.body.channels && req.body.channels.voice && req.body.channels.voice.queues) { - return _agent - .addVoiceQueues(req.body.channels.voice.queues, { - interface: util.format('SIP/%s', _agent.name), - stateinterface: util.format('SIP/%s', _agent.name), - membername: _agent.name, - UserId: _agent.id, - transaction: t - }); - } - }) - .then(function() { - if (req.body.channels && req.body.channels.chat && req.body.channels.chat.queues) { - return _agent - .addChatQueues(req.body.channels.chat.queues, { - transaction: t - }); - } - }) - .then(function() { - if (req.body.channels && req.body.channels.mail && req.body.channels.mail.queues) { - return _agent - .addMailQueues(req.body.channels.mail.queues, { - transaction: t - }); - } - }) - .then(function() { - if (req.body.channels && req.body.channels.sms && req.body.channels.sms.queues) { - return _agent - .addSmsQueues(req.body.channels.sms.queues, { - transaction: t - }); - } - }) - .then(function() { - if (req.body.channels && req.body.channels.fax && req.body.channels.fax.queues) { - return _agent - .addFaxQueues(req.body.channels.fax.queues, { - transaction: t - }); - } - }) - .then(function() { - if (req.body.channels && req.body.channels.openchannel && req.body.channels.openchannel.queues) { - return _agent - .addOpenchannelQueues(req.body.channels.openchannel.queues, { - transaction: t - }); - } - }); - }) - .then(function() { - return res.status(201).send(_agent); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - console.log(err); - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Creates a new agent in the DB. -exports.bulkCreate = function(req, res) { - var _agents; - var _setting; - - var items = []; - var password = String(req.body.password); - - return sequelize.transaction(function(t) { - - return Setting - .findById(1) - .then(function(setting) { - _setting = setting; - - var regEx = _setting.securePassword ? /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/ : /^[a-zA-Z0-9]{6,}$/; - - if (!regEx.test(password)) { - throw new Error('Invalid password pattern'); - } - - var startIndex = 0; - if (req.body.hasOwnProperty('startIndex') && _.isNumber(req.body.startIndex) && req.body.startIndex >= 0) { - startIndex = req.body.startIndex; - delete req.body.startIndex; - } - var internalIndex = req.body.minInternal; - delete req.body.minInternal; - - if (req.body.amount) { - req.body.role = 'agent'; - for (var i = startIndex; i < req.body.amount + startIndex; i++, internalIndex++) { - var item = _.clone(req.body); - item.internal = internalIndex; - item.name = item.name + i; - item.fullname = item.fullname + i; - item.email = item.email.split('@')[0] + i + '@' + item.email.split('@')[1]; - items.push(item); - } - } else { - throw new Error('No agents amount specified!'); - } - return Agent - .bulkCreate(items, { - transaction: t, - individualHooks: true - }); - }) - .then(function(agents) { - _agents = agents; - - return Team - .findOne({ - where: { - defaultEntry: true - } - }); - }) - .then(function(team) { - return team - .addUsers(_.map(_agents, 'id'), { - transaction: t - }); - }) - }) - .then(function() { - return res.sendStatus(201); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - console.log(err); - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Updates an existing agent in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - delete req.body.role; - delete req.body.name; - delete req.body.password; - - return sequelize.transaction(function(t) { - return Agent - .findById(req.params.id) - .then(function(agent) { - if (!agent) { - return res.sendStatus(404); - } - var updated = _.merge(agent, req.body); - return updated - .save({ - transaction: t - }); - }) - .then(function(agent) { - return res.status(200).send(agent); - }) - }) - .catch(sequelize.UniqueConstraintError, function(err) { - console.log(err); - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Deletes a agent from the DB. -exports.destroy = function(req, res) { - var _agent; - - return Agent - .findById(req.params.id) - .then(function(agent) { - _agent = agent; - if (!agent) { - return res.sendStatus(404); - } - return agent - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(sequelize.ForeignKeyConstraintError, function(err) { - return Util.errorManager.handleForeignKeyConstraintError(res, 'agent', _agent.name, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return Agent - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -/** - * Change a user password //DEPRECATED - */ -exports.changePassword = function(req, res, next) { - var _setting; - - var userId = req.user.id; - var oldPass = String(req.body.oldPassword); - var newPass = String(req.body.newPassword); - - return Setting - .findById(1) - .then(function(setting) { - _setting = setting; - - return Agent - .findById(userId); - }) - .then(function(user) { - var regEx = _setting.securePassword ? /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/ : /^[a-zA-Z0-9]{6,}$/; - - if (!regEx.test(newPass)) { - throw new Error('Invalid password pattern'); - } - - if (user.authenticate(oldPass)) { - user.password = newPass; - - return user - .save(); - } else { - return res.sendStatus(403); - } - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -/** - * Change a user password by admin //DEPRECATED - */ -exports.resetPassword = function(req, res, next) { - var _setting; - - var userId = req.params.id; - var newPass = String(req.body.newPassword); - - return Setting - .findById(1) - .then(function(setting) { - _setting = setting; - - return Agent - .findById(userId); - }) - .then(function(user) { - var regEx = _setting.securePassword ? /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/ : /^[a-zA-Z0-9]{6,}$/; - - if (!regEx.test(newPass)) { - throw new Error('Invalid password pattern'); - } - - user.password = newPass; - return user - .save(); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xa73d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x53\x65\x74\x74\x69\x6E\x67","\x55\x73\x65\x72","\x54\x65\x61\x6D","\x4C\x69\x73\x74","\x69\x6E\x64\x65\x78","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x62\x6F\x64\x79","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x61\x64\x64\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74","\x61\x64\x64\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C","\x61\x64\x64\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x66\x61\x78","\x61\x64\x64\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x6D\x73","\x61\x64\x64\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x72\x61\x6D\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x69\x64\x73","\x72\x65\x6D\x6F\x76\x65\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x49\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x56\x6F\x69\x63\x65\x49\x6E\x64\x65\x78","\x72\x6F\x77\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x43\x68\x61\x74\x49\x6E\x64\x65\x78","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4D\x61\x69\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x46\x61\x78\x49\x6E\x64\x65\x78","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x53\x6D\x73\x49\x6E\x64\x65\x78","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x64\x65\x78","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x61\x64\x64\x55\x73\x65\x72\x73","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x70\x61\x74\x74\x65\x72\x6E","\x73\x74\x61\x72\x74\x49\x6E\x64\x65\x78","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x69\x73\x4E\x75\x6D\x62\x65\x72","\x6D\x69\x6E\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x61\x6D\x6F\x75\x6E\x74","\x63\x6C\x6F\x6E\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x40","\x73\x70\x6C\x69\x74","\x70\x75\x73\x68","\x4E\x6F\x20\x61\x67\x65\x6E\x74\x73\x20\x61\x6D\x6F\x75\x6E\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x21","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x6F\x6C\x64\x50\x61\x73\x73\x77\x6F\x72\x64","\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64"];_0xa73d[0];var _=require(_0xa73d[1]);var sequelize=require(_0xa73d[3])[_0xa73d[2]];var util=require(_0xa73d[4]);var Util=require(_0xa73d[5]);var OpenchannelQueue=require(_0xa73d[3])[_0xa73d[6]];var VoiceQueue=require(_0xa73d[3])[_0xa73d[7]];var ChatQueue=require(_0xa73d[3])[_0xa73d[8]];var MailQueue=require(_0xa73d[3])[_0xa73d[9]];var FaxQueue=require(_0xa73d[3])[_0xa73d[10]];var SmsQueue=require(_0xa73d[3])[_0xa73d[11]];var MailRoom=require(_0xa73d[3])[_0xa73d[12]];var Setting=require(_0xa73d[3])[_0xa73d[13]];var Agent=require(_0xa73d[3])[_0xa73d[14]];var User=require(_0xa73d[3])[_0xa73d[14]];var Team=require(_0xa73d[3])[_0xa73d[15]];var List=require(_0xa73d[3])[_0xa73d[16]];exports[_0xa73d[17]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){switch(_0xbff4x11[_0xa73d[26]][_0xa73d[32]]){case _0xa73d[26]:return User[_0xa73d[27]](_0xbff4x11[_0xa73d[26]][_0xa73d[25]],{attributes:[_0xa73d[25]]})[_0xa73d[22]](Util[_0xa73d[24]](_0xbff4x11[_0xa73d[23]]))[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[18]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)});default:return Agent[_0xa73d[31]](_0xa73d[30])[_0xa73d[29]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]]))[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})}};exports[_0xa73d[33]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){return Agent[_0xa73d[27]](_0xbff4x11[_0xa73d[52]][_0xa73d[25]],{attributes:[_0xa73d[25],_0xa73d[37]]})[_0xa73d[22]](function(_0xbff4x17){if(!_0xbff4x17){return _0xbff4x12[_0xa73d[34]](401)};switch(_0xbff4x11[_0xa73d[52]][_0xa73d[51]]){case _0xa73d[40]:return _0xbff4x17[_0xa73d[39]](_0xbff4x11[_0xa73d[35]],{interface:util[_0xa73d[38]](_0xa73d[36],_0xbff4x17[_0xa73d[37]]),stateinterface:util[_0xa73d[38]](_0xa73d[36],_0xbff4x17[_0xa73d[37]]),membername:_0xbff4x17[_0xa73d[37]],UserId:_0xbff4x17[_0xa73d[25]]});case _0xa73d[42]:return _0xbff4x17[_0xa73d[41]](_0xbff4x11[_0xa73d[35]]);case _0xa73d[44]:return _0xbff4x17[_0xa73d[43]](_0xbff4x11[_0xa73d[35]]);case _0xa73d[46]:return _0xbff4x17[_0xa73d[45]](_0xbff4x11[_0xa73d[35]]);case _0xa73d[48]:return _0xbff4x17[_0xa73d[47]](_0xbff4x11[_0xa73d[35]]);case _0xa73d[50]:return _0xbff4x17[_0xa73d[49]](_0xbff4x11[_0xa73d[35]]);default:return null}})[_0xa73d[22]](function(_0xbff4x16){return _0xbff4x12[_0xa73d[34]](_0xbff4x16?200:401)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[18]](_0xbff4x14)})};exports[_0xa73d[53]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){return Agent[_0xa73d[27]](_0xbff4x11[_0xa73d[52]][_0xa73d[25]],{attributes:[_0xa73d[25]]})[_0xa73d[22]](function(_0xbff4x17){if(!_0xbff4x17){return _0xbff4x12[_0xa73d[34]](401)};switch(_0xbff4x11[_0xa73d[52]][_0xa73d[51]]){case _0xa73d[40]:return _0xbff4x17[_0xa73d[55]](_0xbff4x11[_0xa73d[23]][_0xa73d[54]]);case _0xa73d[42]:return _0xbff4x17[_0xa73d[56]](_0xbff4x11[_0xa73d[23]][_0xa73d[54]]);case _0xa73d[44]:return _0xbff4x17[_0xa73d[57]](_0xbff4x11[_0xa73d[23]][_0xa73d[54]]);case _0xa73d[48]:return _0xbff4x17[_0xa73d[58]](_0xbff4x11[_0xa73d[23]][_0xa73d[54]]);case _0xa73d[46]:return _0xbff4x17[_0xa73d[59]](_0xbff4x11[_0xa73d[23]][_0xa73d[54]]);case _0xa73d[50]:return _0xbff4x17[_0xa73d[60]](_0xbff4x11[_0xa73d[23]][_0xa73d[54]]);default:return null}})[_0xa73d[22]](function(_0xbff4x16){return _0xbff4x12[_0xa73d[34]](_0xbff4x16?200:401)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[18]](_0xbff4x14)})};exports[_0xa73d[61]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){switch(_0xbff4x11[_0xa73d[26]][_0xa73d[32]]){case _0xa73d[26]:return User[_0xa73d[27]](_0xbff4x11[_0xa73d[26]][_0xa73d[25]],{attributes:[_0xa73d[25]]})[_0xa73d[22]](Util[_0xa73d[24]](_0xbff4x11[_0xa73d[23]]))[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)});default:return Agent[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]},_0xa73d[67])[_0xa73d[29]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]]))[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)})}};exports[_0xa73d[68]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){switch(_0xbff4x11[_0xa73d[26]][_0xa73d[32]]){case _0xa73d[26]:var _0xbff4x18=[];return User[_0xa73d[27]](_0xbff4x11[_0xa73d[26]][_0xa73d[25]],{attributes:[_0xa73d[25]]})[_0xa73d[22]](Util[_0xa73d[74]]({},{attributes:[_0xa73d[37]],include:[{raw:true,model:User,attributes:[_0xa73d[25]]}]}))[_0xa73d[22]](function(_0xbff4x16){var _0xbff4x19=_[_0xa73d[70]](_0xbff4x16[_0xa73d[69]],_0xa73d[37]);_0xbff4x16[_0xa73d[69]][_0xa73d[72]](function(_0xbff4x1a){_0xbff4x18= _[_0xa73d[71]](_0xbff4x18,_[_0xa73d[70]](_0xbff4x1a.Users,_0xa73d[25]))});return User[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]})[_0xa73d[29]](_[_0xa73d[73]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]],{id:{$in:_0xbff4x18}}),{include:[{model:VoiceQueue,where:{name:{$in:_0xbff4x19}},required:false}]}))})[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)});default:return Agent[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]},_0xa73d[67])[_0xa73d[29]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]]))[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)})}};exports[_0xa73d[75]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){switch(_0xbff4x11[_0xa73d[26]][_0xa73d[32]]){case _0xa73d[26]:var _0xbff4x18=[];return User[_0xa73d[27]](_0xbff4x11[_0xa73d[26]][_0xa73d[25]],{attributes:[_0xa73d[25]]})[_0xa73d[22]](Util[_0xa73d[76]]({},{attributes:[_0xa73d[25]],include:[{raw:true,model:User,attributes:[_0xa73d[25]]}]}))[_0xa73d[22]](function(_0xbff4x16){var _0xbff4x1b=_[_0xa73d[70]](_0xbff4x16[_0xa73d[69]],_0xa73d[25]);_0xbff4x16[_0xa73d[69]][_0xa73d[72]](function(_0xbff4x1a){_0xbff4x18= _[_0xa73d[71]](_0xbff4x18,_[_0xa73d[70]](_0xbff4x1a.Users,_0xa73d[25]))});return User[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]})[_0xa73d[29]](_[_0xa73d[73]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]],{id:{$in:_0xbff4x18}}),{include:[{model:ChatQueue,where:{id:{$in:_0xbff4x1b}},required:false}]}))})[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)});default:return Agent[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]},_0xa73d[67])[_0xa73d[29]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]]))[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)})}};exports[_0xa73d[77]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){switch(_0xbff4x11[_0xa73d[26]][_0xa73d[32]]){case _0xa73d[26]:var _0xbff4x18=[];return User[_0xa73d[27]](_0xbff4x11[_0xa73d[26]][_0xa73d[25]],{attributes:[_0xa73d[25]]})[_0xa73d[22]](Util[_0xa73d[78]]({},{attributes:[_0xa73d[25]],include:[{raw:true,model:User,attributes:[_0xa73d[25]]}]}))[_0xa73d[22]](function(_0xbff4x16){var _0xbff4x1c=_[_0xa73d[70]](_0xbff4x16[_0xa73d[69]],_0xa73d[25]);_0xbff4x16[_0xa73d[69]][_0xa73d[72]](function(_0xbff4x1a){_0xbff4x18= _[_0xa73d[71]](_0xbff4x18,_[_0xa73d[70]](_0xbff4x1a.Users,_0xa73d[25]))});return User[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]})[_0xa73d[29]](_[_0xa73d[73]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]],{id:{$in:_0xbff4x18}}),{include:[{model:MailQueue,where:{id:{$in:_0xbff4x1c}},required:false}]}))})[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)});default:return Agent[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]},_0xa73d[67])[_0xa73d[29]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]]))[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)})}};exports[_0xa73d[79]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){switch(_0xbff4x11[_0xa73d[26]][_0xa73d[32]]){case _0xa73d[26]:var _0xbff4x18=[];return User[_0xa73d[27]](_0xbff4x11[_0xa73d[26]][_0xa73d[25]],{attributes:[_0xa73d[25]]})[_0xa73d[22]](Util[_0xa73d[80]]({},{attributes:[_0xa73d[25]],include:[{raw:true,model:User,attributes:[_0xa73d[25]]}]}))[_0xa73d[22]](function(_0xbff4x16){var _0xbff4x1d=_[_0xa73d[70]](_0xbff4x16[_0xa73d[69]],_0xa73d[25]);_0xbff4x16[_0xa73d[69]][_0xa73d[72]](function(_0xbff4x1a){_0xbff4x18= _[_0xa73d[71]](_0xbff4x18,_[_0xa73d[70]](_0xbff4x1a.Users,_0xa73d[25]))});return User[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]})[_0xa73d[29]](_[_0xa73d[73]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]],{id:{$in:_0xbff4x18}}),{include:[{model:FaxQueue,where:{id:{$in:_0xbff4x1d}},required:false}]}))})[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)});default:return Agent[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]},_0xa73d[67])[_0xa73d[29]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]]))[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)})}};exports[_0xa73d[81]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){switch(_0xbff4x11[_0xa73d[26]][_0xa73d[32]]){case _0xa73d[26]:var _0xbff4x18=[];return User[_0xa73d[27]](_0xbff4x11[_0xa73d[26]][_0xa73d[25]],{attributes:[_0xa73d[25]]})[_0xa73d[22]](Util[_0xa73d[82]]({},{attributes:[_0xa73d[25]],include:[{raw:true,model:User,attributes:[_0xa73d[25]]}]}))[_0xa73d[22]](function(_0xbff4x16){var _0xbff4x1e=_[_0xa73d[70]](_0xbff4x16[_0xa73d[69]],_0xa73d[25]);_0xbff4x16[_0xa73d[69]][_0xa73d[72]](function(_0xbff4x1a){_0xbff4x18= _[_0xa73d[71]](_0xbff4x18,_[_0xa73d[70]](_0xbff4x1a.Users,_0xa73d[25]))});return User[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]})[_0xa73d[29]](_[_0xa73d[73]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]],{id:{$in:_0xbff4x18}}),{include:[{model:SmsQueue,where:{id:{$in:_0xbff4x1e}},required:false}]}))})[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)});default:return Agent[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]},_0xa73d[67])[_0xa73d[29]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]]))[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)})}};exports[_0xa73d[83]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){switch(_0xbff4x11[_0xa73d[26]][_0xa73d[32]]){case _0xa73d[26]:var _0xbff4x18=[];return User[_0xa73d[27]](_0xbff4x11[_0xa73d[26]][_0xa73d[25]],{attributes:[_0xa73d[25]]})[_0xa73d[22]](Util[_0xa73d[84]]({},{attributes:[_0xa73d[25]],include:[{raw:true,model:User,attributes:[_0xa73d[25]]}]}))[_0xa73d[22]](function(_0xbff4x16){var _0xbff4x1f=_[_0xa73d[70]](_0xbff4x16[_0xa73d[69]],_0xa73d[25]);_0xbff4x16[_0xa73d[69]][_0xa73d[72]](function(_0xbff4x1a){_0xbff4x18= _[_0xa73d[71]](_0xbff4x18,_[_0xa73d[70]](_0xbff4x1a.Users,_0xa73d[25]))});return User[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]})[_0xa73d[29]](_[_0xa73d[73]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]],{id:{$in:_0xbff4x18}}),{include:[{model:OpenchannelQueue,where:{id:{$in:_0xbff4x1f}},required:false}]}))})[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)});default:return Agent[_0xa73d[31]](_0xa73d[30],{method:[_0xa73d[63],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[64],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[65],_0xbff4x11[_0xa73d[23]]]},{method:[_0xa73d[66],_0xbff4x11[_0xa73d[23]]]},_0xa73d[67])[_0xa73d[29]](Util[_0xa73d[28]](_0xbff4x11[_0xa73d[23]]))[_0xa73d[22]](function(_0xbff4x15){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x15)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)})}};exports[_0xa73d[85]]= function(_0xbff4x11,_0xbff4x12){return Agent[_0xa73d[31]](_0xa73d[30])[_0xa73d[27]](_0xbff4x11[_0xa73d[52]][_0xa73d[25]])[_0xa73d[22]](function(_0xbff4x17){if(!_0xbff4x17){return _0xbff4x12[_0xa73d[34]](404)};return _0xbff4x12[_0xa73d[20]](_0xbff4x17)})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[86]]= function(_0xbff4x11,_0xbff4x12){return Agent[_0xa73d[31]](_0xa73d[30])[_0xa73d[27]](_0xbff4x11[_0xa73d[52]][_0xa73d[25]])[_0xa73d[22]](function(_0xbff4x17){if(!_0xbff4x17){return _0xbff4x12[_0xa73d[34]](404)};return _0xbff4x17[_0xa73d[88]]({attributes:[_0xa73d[37]]})})[_0xa73d[22]](function(_0xbff4x19){return _0xbff4x12[_0xa73d[20]]({count:_0xbff4x19[_0xa73d[87]],rows:_0xbff4x19})})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[89]]= function(_0xbff4x11,_0xbff4x12){return Agent[_0xa73d[31]](_0xa73d[30])[_0xa73d[27]](_0xbff4x11[_0xa73d[52]][_0xa73d[25]])[_0xa73d[22]](function(_0xbff4x17){if(!_0xbff4x17){return _0xbff4x12[_0xa73d[34]](404)};return _0xbff4x17[_0xa73d[90]]({attributes:[_0xa73d[25]]})})[_0xa73d[22]](function(_0xbff4x1b){return _0xbff4x12[_0xa73d[20]]({count:_0xbff4x1b[_0xa73d[87]],rows:_0xbff4x1b})})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[91]]= function(_0xbff4x11,_0xbff4x12){return Agent[_0xa73d[31]](_0xa73d[30])[_0xa73d[27]](_0xbff4x11[_0xa73d[52]][_0xa73d[25]])[_0xa73d[22]](function(_0xbff4x17){if(!_0xbff4x17){return _0xbff4x12[_0xa73d[34]](404)};return _0xbff4x17[_0xa73d[92]]({attributes:[_0xa73d[25]]})})[_0xa73d[22]](function(_0xbff4x1c){return _0xbff4x12[_0xa73d[20]]({count:_0xbff4x1c[_0xa73d[87]],rows:_0xbff4x1c})})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[93]]= function(_0xbff4x11,_0xbff4x12){return Agent[_0xa73d[31]](_0xa73d[30])[_0xa73d[27]](_0xbff4x11[_0xa73d[52]][_0xa73d[25]])[_0xa73d[22]](function(_0xbff4x17){if(!_0xbff4x17){return _0xbff4x12[_0xa73d[34]](404)};return _0xbff4x17[_0xa73d[94]]({attributes:[_0xa73d[25]]})})[_0xa73d[22]](function(_0xbff4x1d){return _0xbff4x12[_0xa73d[20]]({count:_0xbff4x1d[_0xa73d[87]],rows:_0xbff4x1d})})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[95]]= function(_0xbff4x11,_0xbff4x12){return Agent[_0xa73d[31]](_0xa73d[30])[_0xa73d[27]](_0xbff4x11[_0xa73d[52]][_0xa73d[25]])[_0xa73d[22]](function(_0xbff4x17){if(!_0xbff4x17){return _0xbff4x12[_0xa73d[34]](404)};return _0xbff4x17[_0xa73d[96]]({attributes:[_0xa73d[25]]})})[_0xa73d[22]](function(_0xbff4x1e){return _0xbff4x12[_0xa73d[20]]({count:_0xbff4x1e[_0xa73d[87]],rows:_0xbff4x1e})})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[97]]= function(_0xbff4x11,_0xbff4x12){return Agent[_0xa73d[31]](_0xa73d[30])[_0xa73d[27]](_0xbff4x11[_0xa73d[52]][_0xa73d[25]])[_0xa73d[22]](function(_0xbff4x17){if(!_0xbff4x17){return _0xbff4x12[_0xa73d[34]](404)};return _0xbff4x17[_0xa73d[98]]({attributes:[_0xa73d[25]]})})[_0xa73d[22]](function(_0xbff4x20){return _0xbff4x12[_0xa73d[20]]({count:_0xbff4x20[_0xa73d[87]],rows:_0xbff4x20})})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[99]]= function(_0xbff4x11,_0xbff4x12){var _0xbff4x21;_0xbff4x11[_0xa73d[35]][_0xa73d[32]]= _0xa73d[30];return sequelize[_0xa73d[105]](function(_0xbff4x22){return Agent[_0xa73d[31]](_0xa73d[30])[_0xa73d[99]](_0xbff4x11[_0xa73d[35]],{transaction:_0xbff4x22})[_0xa73d[22]](function(_0xbff4x17){_0xbff4x21= _0xbff4x17;return Team[_0xa73d[104]]({where:{defaultEntry:true}})})[_0xa73d[22]](function(_0xbff4x24){return _0xbff4x24[_0xa73d[103]](_0xbff4x21[_0xa73d[25]],{transaction:_0xbff4x22})})[_0xa73d[22]](function(){return List[_0xa73d[104]]({where:{defaultEntry:true}})})[_0xa73d[22]](function(_0xbff4x23){return _0xbff4x23[_0xa73d[103]](_0xbff4x21[_0xa73d[25]],{transaction:_0xbff4x22})})[_0xa73d[22]](function(){if(_0xbff4x11[_0xa73d[35]][_0xa73d[102]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[40]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[40]][_0xa73d[67]]){return _0xbff4x21[_0xa73d[39]](_0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[40]][_0xa73d[67]],{interface:util[_0xa73d[38]](_0xa73d[36],_0xbff4x21[_0xa73d[37]]),stateinterface:util[_0xa73d[38]](_0xa73d[36],_0xbff4x21[_0xa73d[37]]),membername:_0xbff4x21[_0xa73d[37]],UserId:_0xbff4x21[_0xa73d[25]],transaction:_0xbff4x22})}})[_0xa73d[22]](function(){if(_0xbff4x11[_0xa73d[35]][_0xa73d[102]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[42]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[42]][_0xa73d[67]]){return _0xbff4x21[_0xa73d[41]](_0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[42]][_0xa73d[67]],{transaction:_0xbff4x22})}})[_0xa73d[22]](function(){if(_0xbff4x11[_0xa73d[35]][_0xa73d[102]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[44]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[44]][_0xa73d[67]]){return _0xbff4x21[_0xa73d[43]](_0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[44]][_0xa73d[67]],{transaction:_0xbff4x22})}})[_0xa73d[22]](function(){if(_0xbff4x11[_0xa73d[35]][_0xa73d[102]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[48]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[48]][_0xa73d[67]]){return _0xbff4x21[_0xa73d[47]](_0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[48]][_0xa73d[67]],{transaction:_0xbff4x22})}})[_0xa73d[22]](function(){if(_0xbff4x11[_0xa73d[35]][_0xa73d[102]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[46]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[46]][_0xa73d[67]]){return _0xbff4x21[_0xa73d[45]](_0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[46]][_0xa73d[67]],{transaction:_0xbff4x22})}})[_0xa73d[22]](function(){if(_0xbff4x11[_0xa73d[35]][_0xa73d[102]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[50]]&& _0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[50]][_0xa73d[67]]){return _0xbff4x21[_0xa73d[49]](_0xbff4x11[_0xa73d[35]][_0xa73d[102]][_0xa73d[50]][_0xa73d[67]],{transaction:_0xbff4x22})}})})[_0xa73d[22]](function(){return _0xbff4x12[_0xa73d[21]](201)[_0xa73d[20]](_0xbff4x21)})[_0xa73d[19]](sequelize.UniqueConstraintError,function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return Util[_0xa73d[101]][_0xa73d[100]](_0xbff4x12,_0xbff4x14)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[106]]= function(_0xbff4x11,_0xbff4x12){var _0xbff4x25;var _0xbff4x26;var _0xbff4x27=[];var _0xbff4x28=String(_0xbff4x11[_0xa73d[35]][_0xa73d[107]]);return sequelize[_0xa73d[105]](function(_0xbff4x22){return Setting[_0xa73d[27]](1)[_0xa73d[22]](function(_0xbff4x29){_0xbff4x26= _0xbff4x29;var _0xbff4x2a=_0xbff4x26[_0xa73d[109]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0xbff4x2a[_0xa73d[110]](_0xbff4x28)){throw new Error(_0xa73d[111])};var _0xbff4x2b=0;if(_0xbff4x11[_0xa73d[35]][_0xa73d[113]](_0xa73d[112])&& _[_0xa73d[114]](_0xbff4x11[_0xa73d[35]][_0xa73d[112]])&& _0xbff4x11[_0xa73d[35]][_0xa73d[112]]>= 0){_0xbff4x2b= _0xbff4x11[_0xa73d[35]][_0xa73d[112]];delete _0xbff4x11[_0xa73d[35]][_0xa73d[112]]};var _0xbff4x2c=_0xbff4x11[_0xa73d[35]][_0xa73d[115]];delete _0xbff4x11[_0xa73d[35]][_0xa73d[115]];if(_0xbff4x11[_0xa73d[35]][_0xa73d[116]]){_0xbff4x11[_0xa73d[35]][_0xa73d[32]]= _0xa73d[30];for(var _0xbff4x2d=_0xbff4x2b;_0xbff4x2d< _0xbff4x11[_0xa73d[35]][_0xa73d[116]]+ _0xbff4x2b;_0xbff4x2d++,_0xbff4x2c++){var _0xbff4x2e=_[_0xa73d[117]](_0xbff4x11[_0xa73d[35]]);_0xbff4x2e[_0xa73d[118]]= _0xbff4x2c;_0xbff4x2e[_0xa73d[37]]= _0xbff4x2e[_0xa73d[37]]+ _0xbff4x2d;_0xbff4x2e[_0xa73d[119]]= _0xbff4x2e[_0xa73d[119]]+ _0xbff4x2d;_0xbff4x2e[_0xa73d[120]]= _0xbff4x2e[_0xa73d[120]][_0xa73d[122]](_0xa73d[121])[0]+ _0xbff4x2d+ _0xa73d[121]+ _0xbff4x2e[_0xa73d[120]][_0xa73d[122]](_0xa73d[121])[1];_0xbff4x27[_0xa73d[123]](_0xbff4x2e)}}else {throw new Error(_0xa73d[124])};return Agent[_0xa73d[106]](_0xbff4x27,{transaction:_0xbff4x22,individualHooks:true})})[_0xa73d[22]](function(_0xbff4x18){_0xbff4x25= _0xbff4x18;return Team[_0xa73d[104]]({where:{defaultEntry:true}})})[_0xa73d[22]](function(_0xbff4x24){return _0xbff4x24[_0xa73d[108]](_[_0xa73d[70]](_0xbff4x25,_0xa73d[25]),{transaction:_0xbff4x22})})})[_0xa73d[22]](function(){return _0xbff4x12[_0xa73d[34]](201)})[_0xa73d[19]](sequelize.UniqueConstraintError,function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return Util[_0xa73d[101]][_0xa73d[100]](_0xbff4x12,_0xbff4x14)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[125]]= function(_0xbff4x11,_0xbff4x12){if(_0xbff4x11[_0xa73d[35]][_0xa73d[25]]){delete _0xbff4x11[_0xa73d[35]][_0xa73d[25]]};delete _0xbff4x11[_0xa73d[35]][_0xa73d[32]];delete _0xbff4x11[_0xa73d[35]][_0xa73d[37]];delete _0xbff4x11[_0xa73d[35]][_0xa73d[107]];return sequelize[_0xa73d[105]](function(_0xbff4x22){return Agent[_0xa73d[27]](_0xbff4x11[_0xa73d[52]][_0xa73d[25]])[_0xa73d[22]](function(_0xbff4x17){if(!_0xbff4x17){return _0xbff4x12[_0xa73d[34]](404)};var _0xbff4x2f=_[_0xa73d[73]](_0xbff4x17,_0xbff4x11[_0xa73d[35]]);return _0xbff4x2f[_0xa73d[126]]({transaction:_0xbff4x22})})[_0xa73d[22]](function(_0xbff4x17){return _0xbff4x12[_0xa73d[21]](200)[_0xa73d[20]](_0xbff4x17)})})[_0xa73d[19]](sequelize.UniqueConstraintError,function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return Util[_0xa73d[101]][_0xa73d[100]](_0xbff4x12,_0xbff4x14)})[_0xa73d[19]](function(_0xbff4x14){console[_0xa73d[62]](_0xbff4x14);return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[127]]= function(_0xbff4x11,_0xbff4x12){var _0xbff4x21;return Agent[_0xa73d[27]](_0xbff4x11[_0xa73d[52]][_0xa73d[25]])[_0xa73d[22]](function(_0xbff4x17){_0xbff4x21= _0xbff4x17;if(!_0xbff4x17){return _0xbff4x12[_0xa73d[34]](404)};return _0xbff4x17[_0xa73d[127]]()})[_0xa73d[22]](function(){return _0xbff4x12[_0xa73d[34]](204)})[_0xa73d[19]](sequelize.ForeignKeyConstraintError,function(_0xbff4x14){return Util[_0xa73d[101]][_0xa73d[128]](_0xbff4x12,_0xa73d[30],_0xbff4x21[_0xa73d[37]],_0xbff4x14)})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[129]]= function(_0xbff4x11,_0xbff4x12){return Agent[_0xa73d[127]]({where:{id:_0xbff4x11[_0xa73d[23]][_0xa73d[54]]},individualHooks:true})[_0xa73d[22]](function(){return _0xbff4x12[_0xa73d[34]](204)})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[130]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){var _0xbff4x26;var _0xbff4x30=_0xbff4x11[_0xa73d[26]][_0xa73d[25]];var _0xbff4x31=String(_0xbff4x11[_0xa73d[35]][_0xa73d[131]]);var _0xbff4x32=String(_0xbff4x11[_0xa73d[35]][_0xa73d[132]]);return Setting[_0xa73d[27]](1)[_0xa73d[22]](function(_0xbff4x29){_0xbff4x26= _0xbff4x29;return Agent[_0xa73d[27]](_0xbff4x30)})[_0xa73d[22]](function(_0xbff4x33){var _0xbff4x2a=_0xbff4x26[_0xa73d[109]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0xbff4x2a[_0xa73d[110]](_0xbff4x32)){throw new Error(_0xa73d[111])};if(_0xbff4x33[_0xa73d[133]](_0xbff4x31)){_0xbff4x33[_0xa73d[107]]= _0xbff4x32;return _0xbff4x33[_0xa73d[126]]()}else {return _0xbff4x12[_0xa73d[34]](403)}})[_0xa73d[22]](function(){return _0xbff4x12[_0xa73d[34]](200)})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})};exports[_0xa73d[134]]= function(_0xbff4x11,_0xbff4x12,_0xbff4x13){var _0xbff4x26;var _0xbff4x30=_0xbff4x11[_0xa73d[52]][_0xa73d[25]];var _0xbff4x32=String(_0xbff4x11[_0xa73d[35]][_0xa73d[132]]);return Setting[_0xa73d[27]](1)[_0xa73d[22]](function(_0xbff4x29){_0xbff4x26= _0xbff4x29;return Agent[_0xa73d[27]](_0xbff4x30)})[_0xa73d[22]](function(_0xbff4x33){var _0xbff4x2a=_0xbff4x26[_0xa73d[109]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(!_0xbff4x2a[_0xa73d[110]](_0xbff4x32)){throw new Error(_0xa73d[111])};_0xbff4x33[_0xa73d[107]]= _0xbff4x32;return _0xbff4x33[_0xa73d[126]]()})[_0xa73d[22]](function(){return _0xbff4x12[_0xa73d[34]](200)})[_0xa73d[19]](function(_0xbff4x14){return handleError(_0xbff4x12,_0xbff4x14)})};function handleError(_0xbff4x12,_0xbff4x14){return _0xbff4x12[_0xa73d[21]](500)[_0xa73d[20]](_0xbff4x14)} \ No newline at end of file diff --git a/server/api/agent/agent.events.js b/server/api/agent/agent.events.js index 24661dc..27cced1 100644 --- a/server/api/agent/agent.events.js +++ b/server/api/agent/agent.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Agent = require('../../models').User; - -var AgentEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -AgentEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Agent.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - AgentEvents.emit(event + ':' + doc._id, doc); - AgentEvents.emit(event, doc); - done(null); - } -} - -module.exports = AgentEvents; +var _0xe4af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe4af[0];const EventEmitter=require(_0xe4af[1]);const Agent=require(_0xe4af[3])[_0xe4af[2]];var AgentEvents= new EventEmitter();AgentEvents[_0xe4af[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe4af[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe4af[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe4af[6]};for(var e in events){var event=events[e];Agent[_0xe4af[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x33bdx8,_0x33bdx9,_0x33bdxa){AgentEvents[_0xe4af[10]](event+ _0xe4af[8]+ _0x33bdx8[_0xe4af[9]],_0x33bdx8);AgentEvents[_0xe4af[10]](event,_0x33bdx8);_0x33bdxa(null)}}module[_0xe4af[11]]= AgentEvents \ No newline at end of file diff --git a/server/api/agent/agent.socket.js b/server/api/agent/agent.socket.js index 7f5cb13..b68a2aa 100644 --- a/server/api/agent/agent.socket.js +++ b/server/api/agent/agent.socket.js @@ -1,51 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const AgentEvents = require('./agent.events'); -const _ = require('lodash'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('agent:' + event, socket); - - AgentEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'agent:save': - if (doc.role === 'agent' && (socket.role !== 'agent' || socket.userId == doc.id || doc.changed('online'))) { - var myDoc = _.clone(doc.dataValues); - if (doc._changed.hasOwnProperty('status')) { - myDoc.queueStatus = undefined; - } else if (doc._changed.hasOwnProperty('queueStatus')) { - myDoc.status = undefined; - } - socket.emit(event, myDoc); - } - break; - case 'agent:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - AgentEvents.removeListener(event, listener); - }; -} +var _0x5c7f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x61\x67\x65\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x6C\x6F\x64\x61\x73\x68","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x75\x73\x65\x72\x49\x64","\x69\x64","\x6F\x6E\x6C\x69\x6E\x65","\x63\x68\x61\x6E\x67\x65\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x63\x6C\x6F\x6E\x65","\x73\x74\x61\x74\x75\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x5F\x63\x68\x61\x6E\x67\x65\x64","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x65\x6D\x69\x74","\x61\x67\x65\x6E\x74\x3A\x73\x61\x76\x65","\x61\x67\x65\x6E\x74\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x5c7f[0];const AgentEvents=require(_0x5c7f[1]);const _=require(_0x5c7f[2]);var events=[_0x5c7f[3],_0x5c7f[4]];exports[_0x5c7f[5]]= function(_0x4dcbx4){for(var _0x4dcbx5=0,_0x4dcbx6=events[_0x5c7f[6]];_0x4dcbx5< _0x4dcbx6;_0x4dcbx5++){var _0x4dcbx7=events[_0x4dcbx5];var _0x4dcbx8=createListener(_0x5c7f[7]+ _0x4dcbx7,_0x4dcbx4);AgentEvents[_0x5c7f[8]](_0x4dcbx7,_0x4dcbx8);_0x4dcbx4[_0x5c7f[8]](_0x5c7f[9],removeListener(_0x4dcbx7,_0x4dcbx8))}};function createListener(_0x4dcbx7,_0x4dcbx4){return function(_0x4dcbxa){switch(_0x4dcbx7){case _0x5c7f[23]:if(_0x4dcbxa[_0x5c7f[10]]=== _0x5c7f[11]&& (_0x4dcbx4[_0x5c7f[10]]!== _0x5c7f[11]|| _0x4dcbx4[_0x5c7f[12]]== _0x4dcbxa[_0x5c7f[13]]|| _0x4dcbxa[_0x5c7f[15]](_0x5c7f[14]))){var _0x4dcbxb=_[_0x5c7f[17]](_0x4dcbxa[_0x5c7f[16]]);if(_0x4dcbxa[_0x5c7f[20]][_0x5c7f[19]](_0x5c7f[18])){_0x4dcbxb[_0x5c7f[21]]= undefined}else {if(_0x4dcbxa[_0x5c7f[20]][_0x5c7f[19]](_0x5c7f[21])){_0x4dcbxb[_0x5c7f[18]]= undefined}};_0x4dcbx4[_0x5c7f[22]](_0x4dcbx7,_0x4dcbxb)};break;case _0x5c7f[24]:_0x4dcbx4[_0x5c7f[22]](_0x4dcbx7,_0x4dcbxa);break;default:}}}function removeListener(_0x4dcbx7,_0x4dcbx8){return function(){AgentEvents[_0x5c7f[25]](_0x4dcbx7,_0x4dcbx8)}} \ No newline at end of file diff --git a/server/api/agent/index.js b/server/api/agent/index.js index 49fcc15..0edb947 100644 --- a/server/api/agent/index.js +++ b/server/api/agent/index.js @@ -1,312 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./agent.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); -/** - * @api {get} /api/agents/ Get agents' profile. - * - * @apiParam (Query) {Number} [offset] Pagination offset. - * @apiParam (Query) {Number} limit Pagination limit. - * - * @apiVersion 0.0.140 - * @apiName GetAgents - * @apiGroup Agents - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of agents. - * @apiSuccess {Object[]} rows Get agents' profile list. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 1, - * "rows": [{ - * "id": 1 - * "name": "john.doe", - * "email": "john.doe@xcally.com", - * "internal": 1001, - * "fullname": "John Doe", - * "chatCapacity": 0, - * "mailCapacity": 0, - * "faxCapacity": 0, - * "online": false, - * "voicePause": false, - * "mailPause": false, - * "faxPause": false, - * "chatPause": false, - * "pauseType": "Default Pause", - * ... - * }] - * } - */ -router.get('/', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.index); -router.get('/realtime', auth.isAuthenticated(), auth.hasModule([12], ['admin']), controller.realtimeIndex); -router.get('/realtime/voice', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.realtimeVoiceIndex); -router.get('/realtime/mail', auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.realtimeMailIndex); -router.get('/realtime/chat', auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.realtimeChatIndex); -router.get('/realtime/fax', auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.realtimeFaxIndex); -router.get('/realtime/sms', auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.realtimeSmsIndex); -router.get('/realtime/openchannel', auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.realtimeOpenchannelIndex); - -/** - * @api {get} /api/agents/:id Get agent's profile. - * @apiParam {Number} id Agent's unique ID. - * @apiVersion 0.0.140 - * @apiName GetAgent - * @apiGroup Agents - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Object} Agent's profile. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "john.doe" - * "email": "john.doe@xcally.com", - * "internal": 1001, - * "fullname": "John Doe" - * "chatCapacity": 0, - * "mailCapacity": 0, - * "faxCapacity": 0, - * "online": false, - * "voicePause": false, - * "mailPause": false, - * "faxPause": false, - * "chatPause": false, - * "pauseType": "Default Pause", - * ... - * } - */ -router.get('/:id', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'user', 'agent']), controller.show); - -/** - * @api {post} /api/agents/ Create agent's profile. - * @apiParam (Body) {String} name Agent's username. - * @apiParam (Body) {String} fullname Agent's fullname. - * @apiParam (Body) {String} email Agent's email. - * @apiParam (Body) {String} context="from-sip" Agent's SIP context. - * @apiParam (Body) {String} password Agent's password. - * @apiParam (Body) {Number} internal Agent's internal number. - * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp" Agent's SIP transport. - * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" Agent's SIP codecs. - * @apiParam (Body) {Number} internal Agent's internal number. - * @apiParam (Body) {String} [phone] Agent's phone. - * @apiParam (Body) {String} [mobile] Agent's mobile phone. - * @apiParam (Body) {String} [address] Agent's address. - * @apiParam (Body) {String} [zipcode] Agent's zipcode. - * @apiParam (Body) {String} [city] Agent's city. - * @apiParam (Body) {String} [country] Agent's country. - * - * @apiVersion 0.0.140 - * @apiName CreateAgent - * @apiGroup Agents - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - * { - * "id": 1 - * "name": "john.doe", - * "email": "john.doe@xcally.com", - * "internal": 1001, - * "fullname": "John Doe", - * ... - * } - */ -router.post('/', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.create); - -/** - * @api {post} /api/agents/bulk Bulk Create agent's profile. - * @apiParam (Body) {String} name Agent's prefix username. It's followed by index - * @apiParam (Body) {String} fullname Agent's prefix fullname. It's followed by index - * @apiParam (Body) {String} email Agent's email. The local part is followed by the index - * @apiParam (Body) {String} password Agent's password. It's the same for all agents - * @apiParam (Body) {Number} internal Agent's starting internal number. - * @apiParam (Body) {String} context="from-sip" Agent's SIP context. It's the same for all agents - * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp" Agent's SIP transport. It's the same for all agents - * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" Agent's SIP codecs. It's the same for all agents - * @apiParam (Body) {Number} amount=2 Number of new agents. - * @apiParam (Body) {Number} startIndex=0 Start index. - * - * @apiVersion 0.0.140 - * @apiName BulkCreateAgent - * @apiGroup Agents - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - */ -router.post('/bulk', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.bulkCreate); - -/** - * @api {update} /api/agents/:id Update agent's profile. - * - * @apiParam (Params) {Number} id Agent's unique ID. - * @apiParam (Body) {String} fullname Agent's fullname. - * @apiParam (Body) {String} email Agent's email. - * @apiParam (Body) {String} context="from-sip" Agent's SIP context. - * @apiParam (Body) {String} password Agent's password. - * @apiParam (Body) {Number} internal Agent's internal number. - * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp" Agent's SIP transport. - * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" Agent's SIP codecs. - * @apiParam (Body) {Number} internal Agent's internal number. - * @apiParam (Body) {String} [phone] Agent's phone. - * @apiParam (Body) {String} [mobile] Agent's mobile phone. - * @apiParam (Body) {String} [address] Agent's address. - * @apiParam (Body) {String} [zipcode] Agent's zipcode. - * @apiParam (Body) {String} [city] Agent's city. - * @apiParam (Body) {String} [country] Agent's country. - * - * @apiVersion 0.0.140 - * @apiName UpdateAgent - * @apiGroup Agents - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "john.doe", - * "email": "john.doe@xcally.com", - * "internal": 1001, - * "fullname": "John Doe", - * ... - * } - */ -router.put('/:id', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.update); - -/** - * @api {delete} /api/agents/ Bulk Delete agents' profile. - * - * @apiParam (Query) {Number[]} ids Agents' unique ID array. - * - * @apiVersion 0.0.140 - * @apiName BulkDeleteAgents - * @apiGroup Agents - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.bulkDestroy); - -/** - * @api {delete} /api/agents/:id Delete agent's profile. - * - * @apiParam {Number} id Agent's unique ID. - * - * @apiVersion 0.0.140 - * @apiName DeleteAgent - * @apiGroup Agents - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.destroy); - -/** - * @api {put} /api/agents/password Update agent's password. - * - * @apiParam (Body) {String} oldPassword Old agent's password. - * @apiParam (Body) {String} newPassword New agent's password. - * - * @apiVersion 0.0.140 - * @apiName UpdateAgentPassword - * @apiGroup Agents - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - */ -// router.put('/password', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.changePassword); - -/** - * @api {put} /api/agents/:id/password Reset agent's password. - * - * @apiParam (Params) {Number} id Agent's unique ID. - * @apiParam (Body) {String} newPassword New agent's password. - * - * @apiPermission admin - * - * @apiVersion 0.0.140 - * @apiName ResetAgentPassword - * @apiGroup Agents - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - */ -// router.put('/:id/password', auth.isAuthenticated(), auth.hasModule([4], ['admin']), controller.resetPassword); - -router.get('/:id/voice/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showVoiceQueues); -router.get('/:id/chat/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showChatQueues); -router.get('/:id/mail/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showMailQueues); -router.get('/:id/fax/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showFaxQueues); -router.get('/:id/sms/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showSmsQueues); -router.get('/:id/openchannel/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.showOpenchannelQueues); -router.post('/:id/:channel/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.addQueues); -router.delete('/:id/:channel/queues', auth.isAuthenticated(), auth.hasModule([4], ['admin', 'agent']), controller.removeQueues); - - -module.exports = router; +var _0x6e75=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x61\x67\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x6F\x69\x63\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65\x56\x6F\x69\x63\x65\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x6D\x61\x69\x6C","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4D\x61\x69\x6C\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x63\x68\x61\x74","\x72\x65\x61\x6C\x74\x69\x6D\x65\x43\x68\x61\x74\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x66\x61\x78","\x72\x65\x61\x6C\x74\x69\x6D\x65\x46\x61\x78\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x73\x6D\x73","\x72\x65\x61\x6C\x74\x69\x6D\x65\x53\x6D\x73\x49\x6E\x64\x65\x78","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x72\x65\x61\x6C\x74\x69\x6D\x65\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E\x64\x65\x78","\x2F\x3A\x69\x64","\x75\x73\x65\x72","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x62\x75\x6C\x6B","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x2F\x3A\x69\x64\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x73\x68\x6F\x77\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x3A\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x61\x64\x64\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x51\x75\x65\x75\x65\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x6e75[0];var express=require(_0x6e75[1]);var controller=require(_0x6e75[2]);var auth=require(_0x6e75[3]);var license=require(_0x6e75[4]);var router=express.Router();router[_0x6e75[11]](_0x6e75[5],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7],_0x6e75[8]]),controller[_0x6e75[10]]);router[_0x6e75[11]](_0x6e75[12],auth[_0x6e75[6]](),auth[_0x6e75[9]]([12],[_0x6e75[7]]),controller[_0x6e75[13]]);router[_0x6e75[11]](_0x6e75[14],auth[_0x6e75[6]](),auth[_0x6e75[9]]([7],[_0x6e75[7]]),controller[_0x6e75[15]]);router[_0x6e75[11]](_0x6e75[16],auth[_0x6e75[6]](),auth[_0x6e75[9]]([9],[_0x6e75[7]]),controller[_0x6e75[17]]);router[_0x6e75[11]](_0x6e75[18],auth[_0x6e75[6]](),auth[_0x6e75[9]]([8],[_0x6e75[7]]),controller[_0x6e75[19]]);router[_0x6e75[11]](_0x6e75[20],auth[_0x6e75[6]](),auth[_0x6e75[9]]([10],[_0x6e75[7]]),controller[_0x6e75[21]]);router[_0x6e75[11]](_0x6e75[22],auth[_0x6e75[6]](),auth[_0x6e75[9]]([11],[_0x6e75[7]]),controller[_0x6e75[23]]);router[_0x6e75[11]](_0x6e75[24],auth[_0x6e75[6]](),auth[_0x6e75[9]]([20],[_0x6e75[7]]),controller[_0x6e75[25]]);router[_0x6e75[11]](_0x6e75[26],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7],_0x6e75[27],_0x6e75[8]]),controller[_0x6e75[28]]);router[_0x6e75[30]](_0x6e75[5],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7]]),controller[_0x6e75[29]]);router[_0x6e75[30]](_0x6e75[31],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7]]),controller[_0x6e75[32]]);router[_0x6e75[34]](_0x6e75[26],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7]]),controller[_0x6e75[33]]);router[_0x6e75[36]](_0x6e75[5],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7]]),controller[_0x6e75[35]]);router[_0x6e75[36]](_0x6e75[26],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7]]),controller[_0x6e75[37]]);router[_0x6e75[11]](_0x6e75[38],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7],_0x6e75[8]]),controller[_0x6e75[39]]);router[_0x6e75[11]](_0x6e75[40],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7],_0x6e75[8]]),controller[_0x6e75[41]]);router[_0x6e75[11]](_0x6e75[42],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7],_0x6e75[8]]),controller[_0x6e75[43]]);router[_0x6e75[11]](_0x6e75[44],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7],_0x6e75[8]]),controller[_0x6e75[45]]);router[_0x6e75[11]](_0x6e75[46],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7],_0x6e75[8]]),controller[_0x6e75[47]]);router[_0x6e75[11]](_0x6e75[48],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7],_0x6e75[8]]),controller[_0x6e75[49]]);router[_0x6e75[30]](_0x6e75[50],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7],_0x6e75[8]]),controller[_0x6e75[51]]);router[_0x6e75[36]](_0x6e75[50],auth[_0x6e75[6]](),auth[_0x6e75[9]]([4],[_0x6e75[7],_0x6e75[8]]),controller[_0x6e75[52]]);module[_0x6e75[53]]= router \ No newline at end of file diff --git a/server/api/ami/ami.ami.js b/server/api/ami/ami.ami.js index 1282301..f95ad96 100644 --- a/server/api/ami/ami.ami.js +++ b/server/api/ami/ami.ami.js @@ -1,36 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var Ami = require('../../models').Ami; -var _ = require('lodash'); - -var ami = null; - -exports.register = function(ami) { - this.ami = ami; -} - -exports.action = function(action, cb) { - if (this.ami && this.ami.isConnected()) { - this.ami.action(action, function(err, res) { - if (err) { - cb(err); - } - var data = _.merge(res, action); - Ami - .create(data) - .then(function(ami) { - cb(null, ami) - }) - .catch(function(err) { - return cb(err); - }); - - }); - } else { - cb(new Error('Asterisk Manager disconnected..')); - } -} +var _0x25ac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x41\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x6D\x69","\x61\x63\x74\x69\x6F\x6E","\x69\x73\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x6D\x65\x72\x67\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x41\x73\x74\x65\x72\x69\x73\x6B\x20\x4D\x61\x6E\x61\x67\x65\x72\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x2E\x2E"];_0x25ac[0];var Ami=require(_0x25ac[2])[_0x25ac[1]];var _=require(_0x25ac[3]);var ami=null;exports[_0x25ac[4]]= function(ami){this[_0x25ac[5]]= ami};exports[_0x25ac[6]]= function(_0x23abx4,_0x23abx5){if(this[_0x25ac[5]]&& this[_0x25ac[5]][_0x25ac[7]]()){this[_0x25ac[5]][_0x25ac[6]](_0x23abx4,function(_0x23abx6,_0x23abx7){if(_0x23abx6){_0x23abx5(_0x23abx6)};var _0x23abx8=_[_0x25ac[8]](_0x23abx7,_0x23abx4);Ami[_0x25ac[11]](_0x23abx8)[_0x25ac[10]](function(ami){_0x23abx5(null,ami)})[_0x25ac[9]](function(_0x23abx6){return _0x23abx5(_0x23abx6)})})}else {_0x23abx5( new Error(_0x25ac[12]))}} \ No newline at end of file diff --git a/server/api/ami/ami.controller.js b/server/api/ami/ami.controller.js index 9b00f54..c4391c8 100644 --- a/server/api/ami/ami.controller.js +++ b/server/api/ami/ami.controller.js @@ -1,37 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Ami = require('../../models').Ami; -var Util = require('../../config/util'); - -// Get list of amis -exports.index = function(req, res, next) { - return Ami - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new ami in the DB. -exports.create = function(req, res) { - - req.body.data = JSON.stringify(req.body); - req.body.UserId = req.user.id; - - require('./ami.ami').action(req.body, function(err, result) { - if (err) { - handleError(res, err); - } else { - return res.status(201).send(result); - } - }); - -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x7349=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x41\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x64\x61\x74\x61","\x62\x6F\x64\x79","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x55\x73\x65\x72\x49\x64","\x69\x64","\x75\x73\x65\x72","\x61\x63\x74\x69\x6F\x6E","\x2E\x2F\x61\x6D\x69\x2E\x61\x6D\x69"];_0x7349[0];var _=require(_0x7349[1]);var Ami=require(_0x7349[3])[_0x7349[2]];var Util=require(_0x7349[4]);exports[_0x7349[5]]= function(_0x5ae8x4,_0x5ae8x5,_0x5ae8x6){return Ami[_0x7349[12]](Util[_0x7349[11]](_0x5ae8x4[_0x7349[10]]))[_0x7349[9]](function(_0x5ae8x8){return _0x5ae8x5[_0x7349[8]](200)[_0x7349[7]](_0x5ae8x8)})[_0x7349[6]](function(_0x5ae8x7){return handleError(_0x5ae8x5,_0x5ae8x7)})};exports[_0x7349[13]]= function(_0x5ae8x4,_0x5ae8x5){_0x5ae8x4[_0x7349[15]][_0x7349[14]]= JSON[_0x7349[16]](_0x5ae8x4[_0x7349[15]]);_0x5ae8x4[_0x7349[15]][_0x7349[17]]= _0x5ae8x4[_0x7349[19]][_0x7349[18]];require(_0x7349[21])[_0x7349[20]](_0x5ae8x4[_0x7349[15]],function(_0x5ae8x7,_0x5ae8x8){if(_0x5ae8x7){handleError(_0x5ae8x5,_0x5ae8x7)}else {return _0x5ae8x5[_0x7349[8]](201)[_0x7349[7]](_0x5ae8x8)}})};function handleError(_0x5ae8x5,_0x5ae8x7){return _0x5ae8x5[_0x7349[8]](500)[_0x7349[7]](_0x5ae8x7)} \ No newline at end of file diff --git a/server/api/ami/ami.events.js b/server/api/ami/ami.events.js index 69ed024..1b68785 100644 --- a/server/api/ami/ami.events.js +++ b/server/api/ami/ami.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Ami = require('../../models').Ami; - -var AmiEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -AmiEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Ami.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - AmiEvents.emit(event + ':' + doc._id, doc); - AmiEvents.emit(event, doc); - done(null); - } -} - -module.exports = AmiEvents; +var _0x6a59=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x41\x6D\x69","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6a59[0];const EventEmitter=require(_0x6a59[1]);const Ami=require(_0x6a59[3])[_0x6a59[2]];var AmiEvents= new EventEmitter();AmiEvents[_0x6a59[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6a59[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6a59[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6a59[6]};for(var e in events){var event=events[e];Ami[_0x6a59[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb7fcx8,_0xb7fcx9,_0xb7fcxa){AmiEvents[_0x6a59[10]](event+ _0x6a59[8]+ _0xb7fcx8[_0x6a59[9]],_0xb7fcx8);AmiEvents[_0x6a59[10]](event,_0xb7fcx8);_0xb7fcxa(null)}}module[_0x6a59[11]]= AmiEvents \ No newline at end of file diff --git a/server/api/ami/ami.socket.js b/server/api/ami/ami.socket.js index b1ba530..4c2389f 100644 --- a/server/api/ami/ami.socket.js +++ b/server/api/ami/ami.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const AmiEvents = require('./ami.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('ami:' + event, socket); - - AmiEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - AmiEvents.removeListener(event, listener); - }; -} +var _0xd653=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x61\x6D\x69\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x61\x6D\x69\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xd653[0];const AmiEvents=require(_0xd653[1]);var events=[_0xd653[2],_0xd653[3]];exports[_0xd653[4]]= function(_0x9d70x3){for(var _0x9d70x4=0,_0x9d70x5=events[_0xd653[5]];_0x9d70x4< _0x9d70x5;_0x9d70x4++){var _0x9d70x6=events[_0x9d70x4];var _0x9d70x7=createListener(_0xd653[6]+ _0x9d70x6,_0x9d70x3);AmiEvents[_0xd653[7]](_0x9d70x6,_0x9d70x7);_0x9d70x3[_0xd653[7]](_0xd653[8],removeListener(_0x9d70x6,_0x9d70x7))}};function createListener(_0x9d70x6,_0x9d70x3){return function(_0x9d70x9){_0x9d70x3[_0xd653[9]](_0x9d70x6,_0x9d70x9)}}function removeListener(_0x9d70x6,_0x9d70x7){return function(){AmiEvents[_0xd653[10]](_0x9d70x6,_0x9d70x7)}} \ No newline at end of file diff --git a/server/api/ami/index.js b/server/api/ami/index.js index ae0b77c..6f0b8d2 100644 --- a/server/api/ami/index.js +++ b/server/api/ami/index.js @@ -1,12 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./ami.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); -router.post('/', auth.isAuthenticated(), controller.create); - -module.exports = router; +var _0xc98d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x61\x6D\x69\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc98d[0];var express=require(_0xc98d[1]);var controller=require(_0xc98d[2]);var auth=require(_0xc98d[3]);var router=express.Router();router[_0xc98d[7]](_0xc98d[4],auth[_0xc98d[5]](),controller[_0xc98d[6]]);router[_0xc98d[9]](_0xc98d[4],auth[_0xc98d[5]](),controller[_0xc98d[8]]);module[_0xc98d[10]]= router \ No newline at end of file diff --git a/server/api/automation/automation.controller.js b/server/api/automation/automation.controller.js index 169fca5..8015083 100644 --- a/server/api/automation/automation.controller.js +++ b/server/api/automation/automation.controller.js @@ -1,205 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var Util = require('../../config/util'); -var sequelize = require('../../models').sequelize; - -var Automation = require('../../models').Automation; -var ToolsCondition = require('../../models').ToolsCondition; -var ToolsAction = require('../../models').ToolsAction; - -// Get list of agents -exports.index = function(req, res, next) { - return Automation - .scope('all') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single Automation -exports.show = function(req, res) { - return Automation - .scope('all') - .findById(req.params.id) - .then(function(Automation) { - if (!Automation) { - return res.sendStatus(404); - } - return res.send(Automation); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new Automation in the DB. -exports.create = function(req, res, next) { - return Automation - .create(req.body, { - include: [{ - model: ToolsCondition, - as: 'All' - }, { - model: ToolsCondition, - as: 'Any' - }, { - model: ToolsAction, - as: 'Actions' - }] - }) - .then(function() { - return res.sendStatus(201); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing Automation in the DB. -exports.update = function(req, res, next) { - var _automation; - if (req.body.id) { - delete req.body.id; - } - return sequelize.transaction(function(t) { - return Automation - .findById(req.params.id) - .then(function(automation) { - if (!automation) { - return res.sendStatus(404); - } - _automation = automation; - if (req.body.Any) { - return ToolsCondition - .destroy({ - where: { - AutomationAnyId: req.params.id - }, - transaction: t - }); - } - }) - .then(function() { - if (req.body.Any && Array.isArray(req.body.Any) && req.body.Any.length) { - _.forEach(req.body.Any, function(elem) { - elem.AutomationAnyId = req.params.id; - }); - return ToolsCondition - .bulkCreate(req.body.Any, { - transaction: t - }); - } - return; - }) - .then(function() { - if (req.body.All) { - return ToolsCondition - .destroy({ - where: { - AutomationAllId: req.params.id - }, - transaction: t - }); - } - }) - .then(function() { - if (req.body.All && Array.isArray(req.body.All) && req.body.All.length) { - _.forEach(req.body.All, function(elem) { - elem.AutomationAllId = req.params.id; - }); - return ToolsCondition - .bulkCreate(req.body.All, { - transaction: t - }); - } - return; - }) - .then(function() { - if (req.body.Actions) { - return ToolsAction - .destroy({ - where: { - AutomationId: req.params.id - }, - transaction: t - }); - } - }) - .then(function() { - if (req.body.Actions && Array.isArray(req.body.Actions) && req.body.Actions.length) { - _.forEach(req.body.Actions, function(elem) { - elem.AutomationId = req.params.id; - }); - return ToolsAction - .bulkCreate(req.body.Actions, { - transaction: t - }); - } - return; - }) - .then(function() { - var updated = _.merge(_automation, req.body); - return updated - .save({ - transaction: t - }); - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - - -// Deletes a Automation from the DB. -exports.destroy = function(req, res) { - return Automation - .findById(req.params.id) - .then(function(Automation) { - if (!Automation) { - return res.sendStatus(404); - } - Automation.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.bulkDestroy = function(req, res) { - return Automation - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x4e67=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x41\x6C\x6C","\x41\x6E\x79","\x41\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x67","\x73\x61\x76\x65","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x49\x64","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6C\x6C\x49\x64","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x41\x6E\x79\x49\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x4e67[0];var _=require(_0x4e67[1]);var util=require(_0x4e67[2]);var Util=require(_0x4e67[3]);var sequelize=require(_0x4e67[5])[_0x4e67[4]];var Automation=require(_0x4e67[5])[_0x4e67[6]];var ToolsCondition=require(_0x4e67[5])[_0x4e67[7]];var ToolsAction=require(_0x4e67[5])[_0x4e67[8]];exports[_0x4e67[9]]= function(_0xffefx8,_0xffefx9,_0xffefxa){return Automation[_0x4e67[19]](_0x4e67[18])[_0x4e67[17]](_[_0x4e67[16]](Util[_0x4e67[15]](_0xffefx8[_0x4e67[14]]),{distinct:true}))[_0x4e67[13]](function(_0xffefxc){_0xffefx9[_0x4e67[12]](200)[_0x4e67[11]](_0xffefxc)})[_0x4e67[10]](function(_0xffefxb){return handleError(_0xffefx9,_0xffefxb)})};exports[_0x4e67[20]]= function(_0xffefx8,_0xffefx9){return Automation[_0x4e67[19]](_0x4e67[18])[_0x4e67[24]](_0xffefx8[_0x4e67[23]][_0x4e67[22]])[_0x4e67[13]](function(Automation){if(!Automation){return _0xffefx9[_0x4e67[21]](404)};return _0xffefx9[_0x4e67[11]](Automation)})[_0x4e67[10]](function(_0xffefxb){return handleError(_0xffefx9,_0xffefxb)})};exports[_0x4e67[25]]= function(_0xffefx8,_0xffefx9,_0xffefxa){return Automation[_0x4e67[25]](_0xffefx8[_0x4e67[26]],{include:[{model:ToolsCondition,as:_0x4e67[27]},{model:ToolsCondition,as:_0x4e67[28]},{model:ToolsAction,as:_0x4e67[29]}]})[_0x4e67[13]](function(){return _0xffefx9[_0x4e67[21]](201)})[_0x4e67[10]](function(_0xffefxb){return handleError(_0xffefx9,_0xffefxb)})};exports[_0x4e67[30]]= function(_0xffefx8,_0xffefx9,_0xffefxa){var _0xffefxd;if(_0xffefx8[_0x4e67[26]][_0x4e67[22]]){delete _0xffefx8[_0x4e67[26]][_0x4e67[22]]};return sequelize[_0x4e67[41]](function(_0xffefxe){return Automation[_0x4e67[24]](_0xffefx8[_0x4e67[23]][_0x4e67[22]])[_0x4e67[13]](function(_0xffefx11){if(!_0xffefx11){return _0xffefx9[_0x4e67[21]](404)};_0xffefxd= _0xffefx11;if(_0xffefx8[_0x4e67[26]][_0x4e67[28]]){return ToolsCondition[_0x4e67[38]]({where:{AutomationAnyId:_0xffefx8[_0x4e67[23]][_0x4e67[22]]},transaction:_0xffefxe})}})[_0x4e67[13]](function(){if(_0xffefx8[_0x4e67[26]][_0x4e67[28]]&& Array[_0x4e67[33]](_0xffefx8[_0x4e67[26]].Any)&& _0xffefx8[_0x4e67[26]][_0x4e67[28]][_0x4e67[34]]){_[_0x4e67[36]](_0xffefx8[_0x4e67[26]].Any,function(_0xffefx10){_0xffefx10[_0x4e67[40]]= _0xffefx8[_0x4e67[23]][_0x4e67[22]]});return ToolsCondition[_0x4e67[37]](_0xffefx8[_0x4e67[26]].Any,{transaction:_0xffefxe})};return})[_0x4e67[13]](function(){if(_0xffefx8[_0x4e67[26]][_0x4e67[27]]){return ToolsCondition[_0x4e67[38]]({where:{AutomationAllId:_0xffefx8[_0x4e67[23]][_0x4e67[22]]},transaction:_0xffefxe})}})[_0x4e67[13]](function(){if(_0xffefx8[_0x4e67[26]][_0x4e67[27]]&& Array[_0x4e67[33]](_0xffefx8[_0x4e67[26]].All)&& _0xffefx8[_0x4e67[26]][_0x4e67[27]][_0x4e67[34]]){_[_0x4e67[36]](_0xffefx8[_0x4e67[26]].All,function(_0xffefx10){_0xffefx10[_0x4e67[39]]= _0xffefx8[_0x4e67[23]][_0x4e67[22]]});return ToolsCondition[_0x4e67[37]](_0xffefx8[_0x4e67[26]].All,{transaction:_0xffefxe})};return})[_0x4e67[13]](function(){if(_0xffefx8[_0x4e67[26]][_0x4e67[29]]){return ToolsAction[_0x4e67[38]]({where:{AutomationId:_0xffefx8[_0x4e67[23]][_0x4e67[22]]},transaction:_0xffefxe})}})[_0x4e67[13]](function(){if(_0xffefx8[_0x4e67[26]][_0x4e67[29]]&& Array[_0x4e67[33]](_0xffefx8[_0x4e67[26]].Actions)&& _0xffefx8[_0x4e67[26]][_0x4e67[29]][_0x4e67[34]]){_[_0x4e67[36]](_0xffefx8[_0x4e67[26]].Actions,function(_0xffefx10){_0xffefx10[_0x4e67[35]]= _0xffefx8[_0x4e67[23]][_0x4e67[22]]});return ToolsAction[_0x4e67[37]](_0xffefx8[_0x4e67[26]].Actions,{transaction:_0xffefxe})};return})[_0x4e67[13]](function(){var _0xffefxf=_[_0x4e67[16]](_0xffefxd,_0xffefx8[_0x4e67[26]]);return _0xffefxf[_0x4e67[32]]({transaction:_0xffefxe})})})[_0x4e67[13]](function(){return _0xffefx9[_0x4e67[21]](200)})[_0x4e67[10]](function(_0xffefxb){console[_0x4e67[31]](_0xffefxb);return handleError(_0xffefx9,_0xffefxb)})};exports[_0x4e67[38]]= function(_0xffefx8,_0xffefx9){return Automation[_0x4e67[24]](_0xffefx8[_0x4e67[23]][_0x4e67[22]])[_0x4e67[13]](function(Automation){if(!Automation){return _0xffefx9[_0x4e67[21]](404)};Automation[_0x4e67[38]]()[_0x4e67[13]](function(){return _0xffefx9[_0x4e67[21]](204)})[_0x4e67[10]](function(_0xffefxb){return handleError(_0xffefx9,_0xffefxb)})})[_0x4e67[10]](function(_0xffefxb){return handleError(_0xffefx9,_0xffefxb)})};exports[_0x4e67[42]]= function(_0xffefx8,_0xffefx9){return Automation[_0x4e67[38]]({where:{id:_0xffefx8[_0x4e67[14]][_0x4e67[43]]},individualHooks:true})[_0x4e67[13]](function(){return _0xffefx9[_0x4e67[21]](204)})[_0x4e67[10]](function(_0xffefxb){return handleError(_0xffefx9,_0xffefxb)})};function handleError(_0xffefx9,_0xffefxb){return _0xffefx9[_0x4e67[12]](500)[_0x4e67[11]](_0xffefxb)} \ No newline at end of file diff --git a/server/api/automation/automation.events.js b/server/api/automation/automation.events.js index c0aaffc..600d424 100644 --- a/server/api/automation/automation.events.js +++ b/server/api/automation/automation.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Automation = require('../../models').Automation; - -var AutomationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -AutomationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Automation.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - AutomationEvents.emit(event + ':' + doc._id, doc); - AutomationEvents.emit(event, doc); - done(null); - } -} - -module.exports = AutomationEvents; +var _0xa8f4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa8f4[0];const EventEmitter=require(_0xa8f4[1]);const Automation=require(_0xa8f4[3])[_0xa8f4[2]];var AutomationEvents= new EventEmitter();AutomationEvents[_0xa8f4[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa8f4[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa8f4[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa8f4[6]};for(var e in events){var event=events[e];Automation[_0xa8f4[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe5dcx8,_0xe5dcx9,_0xe5dcxa){AutomationEvents[_0xa8f4[10]](event+ _0xa8f4[8]+ _0xe5dcx8[_0xa8f4[9]],_0xe5dcx8);AutomationEvents[_0xa8f4[10]](event,_0xe5dcx8);_0xe5dcxa(null)}}module[_0xa8f4[11]]= AutomationEvents \ No newline at end of file diff --git a/server/api/automation/automation.socket.js b/server/api/automation/automation.socket.js index c767335..fb41120 100644 --- a/server/api/automation/automation.socket.js +++ b/server/api/automation/automation.socket.js @@ -1,28 +1 @@ -'use strict'; - -const AutomationEvents = require('./automation.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('automation:' + event, socket); - - AutomationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - AutomationEvents.removeListener(event, listener); - }; -} +var _0x3399=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3399[0];const AutomationEvents=require(_0x3399[1]);var events=[_0x3399[2],_0x3399[3]];exports[_0x3399[4]]= function(_0xcf4dx3){for(var _0xcf4dx4=0,_0xcf4dx5=events[_0x3399[5]];_0xcf4dx4< _0xcf4dx5;_0xcf4dx4++){var _0xcf4dx6=events[_0xcf4dx4];var _0xcf4dx7=createListener(_0x3399[6]+ _0xcf4dx6,_0xcf4dx3);AutomationEvents[_0x3399[7]](_0xcf4dx6,_0xcf4dx7);_0xcf4dx3[_0x3399[7]](_0x3399[8],removeListener(_0xcf4dx6,_0xcf4dx7))}};function createListener(_0xcf4dx6,_0xcf4dx3){return function(_0xcf4dx9){_0xcf4dx3[_0x3399[9]](_0xcf4dx6,_0xcf4dx9)}}function removeListener(_0xcf4dx6,_0xcf4dx7){return function(){AutomationEvents[_0x3399[10]](_0xcf4dx6,_0xcf4dx7)}} \ No newline at end of file diff --git a/server/api/automation/index.js b/server/api/automation/index.js index 654a7c9..b5aba0e 100644 --- a/server/api/automation/index.js +++ b/server/api/automation/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./automation.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy); -router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy); - -module.exports = router; +var _0x5df8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x5df8[0];var express=require(_0x5df8[1]);var controller=require(_0x5df8[2]);var auth=require(_0x5df8[3]);var router=express.Router();router[_0x5df8[9]](_0x5df8[4],auth[_0x5df8[5]](),auth[_0x5df8[7]]([13],[_0x5df8[6]]),controller[_0x5df8[8]]);router[_0x5df8[9]](_0x5df8[10],auth[_0x5df8[5]](),auth[_0x5df8[7]]([13],[_0x5df8[6]]),controller[_0x5df8[11]]);router[_0x5df8[13]](_0x5df8[4],auth[_0x5df8[5]](),auth[_0x5df8[7]]([13],[_0x5df8[6]]),controller[_0x5df8[12]]);router[_0x5df8[15]](_0x5df8[10],auth[_0x5df8[5]](),auth[_0x5df8[7]]([13],[_0x5df8[6]]),controller[_0x5df8[14]]);router[_0x5df8[17]](_0x5df8[10],auth[_0x5df8[5]](),auth[_0x5df8[7]]([13],[_0x5df8[6]]),controller[_0x5df8[16]]);router[_0x5df8[17]](_0x5df8[4],auth[_0x5df8[5]](),auth[_0x5df8[7]]([13],[_0x5df8[6]]),controller[_0x5df8[18]]);module[_0x5df8[19]]= router \ No newline at end of file diff --git a/server/api/canned_answer/canned_answer.controller.js b/server/api/canned_answer/canned_answer.controller.js index dfda955..f6ed62b 100644 --- a/server/api/canned_answer/canned_answer.controller.js +++ b/server/api/canned_answer/canned_answer.controller.js @@ -1,131 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/answers -> index - * POST /api/answers -> create - * GET /api/answers/:id -> show - * PUT /api/answers/:id -> update - * DELETE /api/answers/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var CannedAnswer = require('../../models').CannedAnswer; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Get list of agents -exports.index = function(req, res, next) { - return CannedAnswer - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Gets a single CannedAnswer from the DB -exports.show = function(req, res) { - return CannedAnswer - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new CannedAnswer in the DB -exports.create = function(req, res) { - CannedAnswer.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing CannedAnswer in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return CannedAnswer - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a CannedAnswer from the DB -exports.destroy = function(req, res) { - return CannedAnswer - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return CannedAnswer - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; +var _0x19dd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64\x73"];_0x19dd[0];var _=require(_0x19dd[1]);var Util=require(_0x19dd[2]);var CannedAnswer=require(_0x19dd[4])[_0x19dd[3]];function handleError(_0x321fx5,_0x321fx6){_0x321fx6= _0x321fx6|| 500;return function(_0x321fx7){_0x321fx5[_0x19dd[6]](_0x321fx6)[_0x19dd[5]](_0x321fx7)}}function responseWithResult(_0x321fx5,_0x321fx6){_0x321fx6= _0x321fx6|| 200;return function(_0x321fx9){if(_0x321fx9){_0x321fx5[_0x19dd[6]](_0x321fx6)[_0x19dd[7]](_0x321fx9)}}}function handleEntityNotFound(_0x321fx5){return function(_0x321fx9){if(!_0x321fx9){_0x321fx5[_0x19dd[6]](404)[_0x19dd[8]]();return null};return _0x321fx9}}function saveUpdates(_0x321fxc){return function(_0x321fx9){return _0x321fx9[_0x19dd[10]](_0x321fxc)[_0x19dd[9]](function(_0x321fxd){return _0x321fxd})}}function removeEntity(_0x321fx5){return function(_0x321fx9){if(_0x321fx9){return _0x321fx9[_0x19dd[11]]()[_0x19dd[9]](function(){_0x321fx5[_0x19dd[6]](204)[_0x19dd[8]]()})}}}exports[_0x19dd[12]]= function(_0x321fxf,_0x321fx5,_0x321fx10){return CannedAnswer[_0x19dd[17]](Util[_0x19dd[16]](_0x321fxf[_0x19dd[15]]))[_0x19dd[9]](function(_0x321fx11){_0x321fx5[_0x19dd[6]](200)[_0x19dd[5]](_0x321fx11)})[_0x19dd[14]](function(_0x321fx7){console[_0x19dd[13]](_0x321fx7);return handleError(_0x321fx5,_0x321fx7)})};exports[_0x19dd[18]]= function(_0x321fxf,_0x321fx5){return CannedAnswer[_0x19dd[21]](_0x321fxf[_0x19dd[20]][_0x19dd[19]])[_0x19dd[9]](handleEntityNotFound(_0x321fx5))[_0x19dd[9]](responseWithResult(_0x321fx5))[_0x19dd[14]](handleError(_0x321fx5))};exports[_0x19dd[22]]= function(_0x321fxf,_0x321fx5){CannedAnswer[_0x19dd[22]](_0x321fxf[_0x19dd[23]])[_0x19dd[9]](responseWithResult(_0x321fx5,201))[_0x19dd[14]](handleError(_0x321fx5))};exports[_0x19dd[24]]= function(_0x321fxf,_0x321fx5){if(_0x321fxf[_0x19dd[23]][_0x19dd[19]]){delete _0x321fxf[_0x19dd[23]][_0x19dd[19]]};return CannedAnswer[_0x19dd[21]](_0x321fxf[_0x19dd[20]][_0x19dd[19]])[_0x19dd[9]](handleEntityNotFound(_0x321fx5))[_0x19dd[9]](saveUpdates(_0x321fxf[_0x19dd[23]]))[_0x19dd[9]](responseWithResult(_0x321fx5))[_0x19dd[14]](handleError(_0x321fx5))};exports[_0x19dd[11]]= function(_0x321fxf,_0x321fx5){return CannedAnswer[_0x19dd[21]](_0x321fxf[_0x19dd[20]][_0x19dd[19]])[_0x19dd[9]](handleEntityNotFound(_0x321fx5))[_0x19dd[9]](removeEntity(_0x321fx5))[_0x19dd[14]](handleError(_0x321fx5))};exports[_0x19dd[25]]= function(_0x321fxf,_0x321fx5){return CannedAnswer[_0x19dd[11]]({where:{id:_0x321fxf[_0x19dd[15]][_0x19dd[27]]},individualHooks:true})[_0x19dd[9]](function(){return _0x321fx5[_0x19dd[26]](204)})[_0x19dd[14]](function(_0x321fx7){return handleError(_0x321fx5,_0x321fx7)})} \ No newline at end of file diff --git a/server/api/canned_answer/canned_answer.events.js b/server/api/canned_answer/canned_answer.events.js index cc2c85e..c1f7e74 100644 --- a/server/api/canned_answer/canned_answer.events.js +++ b/server/api/canned_answer/canned_answer.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const CannedAnswer = require('../../models').CannedAnswer; - -var CannedAnswerEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -CannedAnswerEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - CannedAnswer.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - CannedAnswerEvents.emit(event + ':' + doc._id, doc); - CannedAnswerEvents.emit(event, doc); - done(null); - } -} - -module.exports = CannedAnswerEvents; +var _0x773f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x61\x6E\x6E\x65\x64\x41\x6E\x73\x77\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x773f[0];const EventEmitter=require(_0x773f[1]);const CannedAnswer=require(_0x773f[3])[_0x773f[2]];var CannedAnswerEvents= new EventEmitter();CannedAnswerEvents[_0x773f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x773f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x773f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x773f[6]};for(var e in events){var event=events[e];CannedAnswer[_0x773f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xf773x8,_0xf773x9,_0xf773xa){CannedAnswerEvents[_0x773f[10]](event+ _0x773f[8]+ _0xf773x8[_0x773f[9]],_0xf773x8);CannedAnswerEvents[_0x773f[10]](event,_0xf773x8);_0xf773xa(null)}}module[_0x773f[11]]= CannedAnswerEvents \ No newline at end of file diff --git a/server/api/canned_answer/canned_answer.socket.js b/server/api/canned_answer/canned_answer.socket.js index ce308fc..31a3de5 100644 --- a/server/api/canned_answer/canned_answer.socket.js +++ b/server/api/canned_answer/canned_answer.socket.js @@ -1,28 +1 @@ -'use strict'; - -const CannedAnswerEvents = require('./canned_answer.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('canned_answer:' + event, socket); - - CannedAnswerEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - CannedAnswerEvents.removeListener(event, listener); - }; -} +var _0x627e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x627e[0];const CannedAnswerEvents=require(_0x627e[1]);var events=[_0x627e[2],_0x627e[3]];exports[_0x627e[4]]= function(_0xb7f8x3){for(var _0xb7f8x4=0,_0xb7f8x5=events[_0x627e[5]];_0xb7f8x4< _0xb7f8x5;_0xb7f8x4++){var _0xb7f8x6=events[_0xb7f8x4];var _0xb7f8x7=createListener(_0x627e[6]+ _0xb7f8x6,_0xb7f8x3);CannedAnswerEvents[_0x627e[7]](_0xb7f8x6,_0xb7f8x7);_0xb7f8x3[_0x627e[7]](_0x627e[8],removeListener(_0xb7f8x6,_0xb7f8x7))}};function createListener(_0xb7f8x6,_0xb7f8x3){return function(_0xb7f8x9){_0xb7f8x3[_0x627e[9]](_0xb7f8x6,_0xb7f8x9)}}function removeListener(_0xb7f8x6,_0xb7f8x7){return function(){CannedAnswerEvents[_0x627e[10]](_0xb7f8x6,_0xb7f8x7)}} \ No newline at end of file diff --git a/server/api/canned_answer/index.js b/server/api/canned_answer/index.js index e01ee26..0bb40c4 100644 --- a/server/api/canned_answer/index.js +++ b/server/api/canned_answer/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./canned_answer.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([13], ['admin', 'agent']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy); - -module.exports = router; +var _0x3725=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x3725[0];var express=require(_0x3725[1]);var auth=require(_0x3725[2]);var controller=require(_0x3725[3]);var router=express.Router();router[_0x3725[10]](_0x3725[4],auth[_0x3725[5]](),auth[_0x3725[8]]([13],[_0x3725[6],_0x3725[7]]),controller[_0x3725[9]]);router[_0x3725[10]](_0x3725[11],auth[_0x3725[5]](),auth[_0x3725[8]]([13],[_0x3725[6]]),controller[_0x3725[12]]);router[_0x3725[14]](_0x3725[4],auth[_0x3725[5]](),auth[_0x3725[8]]([13],[_0x3725[6]]),controller[_0x3725[13]]);router[_0x3725[16]](_0x3725[11],auth[_0x3725[5]](),auth[_0x3725[8]]([13],[_0x3725[6]]),controller[_0x3725[15]]);router[_0x3725[18]](_0x3725[4],auth[_0x3725[5]](),auth[_0x3725[8]]([13],[_0x3725[6]]),controller[_0x3725[17]]);router[_0x3725[18]](_0x3725[11],auth[_0x3725[5]](),auth[_0x3725[8]]([13],[_0x3725[6]]),controller[_0x3725[19]]);module[_0x3725[20]]= router \ No newline at end of file diff --git a/server/api/chanspy/chanspy.controller.js b/server/api/chanspy/chanspy.controller.js index e3dafb3..2adf63d 100644 --- a/server/api/chanspy/chanspy.controller.js +++ b/server/api/chanspy/chanspy.controller.js @@ -1,107 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ChanSpy = require('../../models').ChanSpy; -var Util = require('../../config/util'); - -// Get list of chanspy -exports.index = function(req, res, next) { - return ChanSpy - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get a single chanspy -exports.show = function(req, res) { - return ChanSpy - .findById(req.params.id) - .then(function(chanspy) { - if (!chanspy) { - return res.sendStatus(404); - } - return res.send(chanspy); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new chanspy in the DB. -exports.create = function(req, res) { - return ChanSpy - .create(req.body) - .then(function(chanspy) { - return res.status(201).send(chanspy); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing chanspy in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return ChanSpy - .findById(req.params.id) - .then(function(chanspy) { - if (!chanspy) { - return res.sendStatus(404); - } - var updated = _.merge(chanspy, req.body); - return updated - .save(); - }) - .then(function(chanspy) { - return res.status(200).send(chanspy); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a chanspy from the DB. -exports.destroy = function(req, res) { - return ChanSpy - .findById(req.params.id) - .then(function(chanspy) { - if (!chanspy) { - return res.sendStatus(404); - } - return chanspy.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroy = function(req, res) { - return ChanSpy - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x4289=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x4289[0];var _=require(_0x4289[1]);var ChanSpy=require(_0x4289[3])[_0x4289[2]];var Util=require(_0x4289[4]);exports[_0x4289[5]]= function(_0xed76x4,_0xed76x5,_0xed76x6){return ChanSpy[_0x4289[13]](Util[_0x4289[12]](_0xed76x4[_0x4289[11]]))[_0x4289[10]](function(_0xed76x8){_0xed76x5[_0x4289[9]](200)[_0x4289[8]](_0xed76x8)})[_0x4289[7]](function(_0xed76x7){console[_0x4289[6]](_0xed76x7);return handleError(_0xed76x5,_0xed76x7)})};exports[_0x4289[14]]= function(_0xed76x4,_0xed76x5){return ChanSpy[_0x4289[18]](_0xed76x4[_0x4289[17]][_0x4289[16]])[_0x4289[10]](function(_0xed76x9){if(!_0xed76x9){return _0xed76x5[_0x4289[15]](404)};return _0xed76x5[_0x4289[8]](_0xed76x9)})[_0x4289[7]](function(_0xed76x7){return handleError(_0xed76x5,_0xed76x7)})};exports[_0x4289[19]]= function(_0xed76x4,_0xed76x5){return ChanSpy[_0x4289[19]](_0xed76x4[_0x4289[20]])[_0x4289[10]](function(_0xed76x9){return _0xed76x5[_0x4289[9]](201)[_0x4289[8]](_0xed76x9)})[_0x4289[7]](function(_0xed76x7){return handleError(_0xed76x5,_0xed76x7)})};exports[_0x4289[21]]= function(_0xed76x4,_0xed76x5){if(_0xed76x4[_0x4289[20]][_0x4289[16]]){delete _0xed76x4[_0x4289[20]][_0x4289[16]]};return ChanSpy[_0x4289[18]](_0xed76x4[_0x4289[17]][_0x4289[16]])[_0x4289[10]](function(_0xed76x9){if(!_0xed76x9){return _0xed76x5[_0x4289[15]](404)};var _0xed76xa=_[_0x4289[22]](_0xed76x9,_0xed76x4[_0x4289[20]]);return _0xed76xa[_0x4289[23]]()})[_0x4289[10]](function(_0xed76x9){return _0xed76x5[_0x4289[9]](200)[_0x4289[8]](_0xed76x9)})[_0x4289[7]](function(_0xed76x7){return handleError(_0xed76x5,_0xed76x7)})};exports[_0x4289[24]]= function(_0xed76x4,_0xed76x5){return ChanSpy[_0x4289[18]](_0xed76x4[_0x4289[17]][_0x4289[16]])[_0x4289[10]](function(_0xed76x9){if(!_0xed76x9){return _0xed76x5[_0x4289[15]](404)};return _0xed76x9[_0x4289[24]]()})[_0x4289[10]](function(){return _0xed76x5[_0x4289[15]](204)})[_0x4289[7]](function(_0xed76x7){return handleError(_0xed76x5,_0xed76x7)})};exports[_0x4289[25]]= function(_0xed76x4,_0xed76x5){return ChanSpy[_0x4289[24]]({where:{id:_0xed76x4[_0x4289[11]][_0x4289[26]]},individualHooks:true})[_0x4289[10]](function(){return _0xed76x5[_0x4289[15]](204)})[_0x4289[7]](function(_0xed76x7){return handleError(_0xed76x5,_0xed76x7)})};function handleError(_0xed76x5,_0xed76x7){return _0xed76x5[_0x4289[9]](500)[_0x4289[8]](_0xed76x7)} \ No newline at end of file diff --git a/server/api/chanspy/chanspy.events.js b/server/api/chanspy/chanspy.events.js index 6310918..25351c4 100644 --- a/server/api/chanspy/chanspy.events.js +++ b/server/api/chanspy/chanspy.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ChanSpy = require('../../models').ChanSpy; - -var ChanSpyEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ChanSpyEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ChanSpy.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ChanSpyEvents.emit(event + ':' + doc._id, doc); - ChanSpyEvents.emit(event, doc); - done(null); - } -} - -module.exports = ChanSpyEvents; +var _0xdbab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdbab[0];const EventEmitter=require(_0xdbab[1]);const ChanSpy=require(_0xdbab[3])[_0xdbab[2]];var ChanSpyEvents= new EventEmitter();ChanSpyEvents[_0xdbab[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdbab[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdbab[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdbab[6]};for(var e in events){var event=events[e];ChanSpy[_0xdbab[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x45b8x8,_0x45b8x9,_0x45b8xa){ChanSpyEvents[_0xdbab[10]](event+ _0xdbab[8]+ _0x45b8x8[_0xdbab[9]],_0x45b8x8);ChanSpyEvents[_0xdbab[10]](event,_0x45b8x8);_0x45b8xa(null)}}module[_0xdbab[11]]= ChanSpyEvents \ No newline at end of file diff --git a/server/api/chanspy/chanspy.socket.js b/server/api/chanspy/chanspy.socket.js index c0e03c0..4292070 100644 --- a/server/api/chanspy/chanspy.socket.js +++ b/server/api/chanspy/chanspy.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ChanSpyEvents = require('./chanspy.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('chanspy:' + event, socket); - - ChanSpyEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ChanSpyEvents.removeListener(event, listener); - }; -} +var _0xde65=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x6E\x73\x70\x79\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x6E\x73\x70\x79\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xde65[0];const ChanSpyEvents=require(_0xde65[1]);var events=[_0xde65[2],_0xde65[3]];exports[_0xde65[4]]= function(_0x8f0dx3){for(var _0x8f0dx4=0,_0x8f0dx5=events[_0xde65[5]];_0x8f0dx4< _0x8f0dx5;_0x8f0dx4++){var _0x8f0dx6=events[_0x8f0dx4];var _0x8f0dx7=createListener(_0xde65[6]+ _0x8f0dx6,_0x8f0dx3);ChanSpyEvents[_0xde65[7]](_0x8f0dx6,_0x8f0dx7);_0x8f0dx3[_0xde65[7]](_0xde65[8],removeListener(_0x8f0dx6,_0x8f0dx7))}};function createListener(_0x8f0dx6,_0x8f0dx3){return function(_0x8f0dx9){_0x8f0dx3[_0xde65[9]](_0x8f0dx6,_0x8f0dx9)}}function removeListener(_0x8f0dx6,_0x8f0dx7){return function(){ChanSpyEvents[_0xde65[10]](_0x8f0dx6,_0x8f0dx7)}} \ No newline at end of file diff --git a/server/api/chanspy/index.js b/server/api/chanspy/index.js index 597a004..5dd1f6f 100644 --- a/server/api/chanspy/index.js +++ b/server/api/chanspy/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./chanspy.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy); - -module.exports = router; +var _0x1cf4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x6E\x73\x70\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x1cf4[0];var express=require(_0x1cf4[1]);var controller=require(_0x1cf4[2]);var auth=require(_0x1cf4[3]);var router=express.Router();router[_0x1cf4[9]](_0x1cf4[4],auth[_0x1cf4[5]](),auth[_0x1cf4[7]]([7],[_0x1cf4[6]]),controller[_0x1cf4[8]]);router[_0x1cf4[9]](_0x1cf4[10],auth[_0x1cf4[5]](),auth[_0x1cf4[7]]([7],[_0x1cf4[6]]),controller[_0x1cf4[11]]);router[_0x1cf4[13]](_0x1cf4[4],auth[_0x1cf4[5]](),auth[_0x1cf4[7]]([7],[_0x1cf4[6]]),controller[_0x1cf4[12]]);router[_0x1cf4[15]](_0x1cf4[10],auth[_0x1cf4[5]](),auth[_0x1cf4[7]]([7],[_0x1cf4[6]]),controller[_0x1cf4[14]]);router[_0x1cf4[17]](_0x1cf4[4],auth[_0x1cf4[5]](),auth[_0x1cf4[7]]([7],[_0x1cf4[6]]),controller[_0x1cf4[16]]);router[_0x1cf4[17]](_0x1cf4[10],auth[_0x1cf4[5]](),auth[_0x1cf4[7]]([7],[_0x1cf4[6]]),controller[_0x1cf4[18]]);module[_0x1cf4[19]]= router \ No newline at end of file diff --git a/server/api/chat_application/chat_application.controller.js b/server/api/chat_application/chat_application.controller.js index cc166a1..82bf0f1 100644 --- a/server/api/chat_application/chat_application.controller.js +++ b/server/api/chat_application/chat_application.controller.js @@ -1,97 +1 @@ -'use strict'; -var _ = require('lodash'); -var ChatApplication = require('../../models').ChatApplication; -// Get list of chat_applications -exports.index = function(req, res) { - return ChatApplication - .findAll({ - where: req.query, - order: 'priority', - include: [{ - all: true - }] - }) - .then(function(chat_applications) { - return res.status(200).send(chat_applications); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Get a single chat_application -exports.show = function(req, res) { - return ChatApplication - .findById(req.params.id) - .then(function(chat_application) { - if (!chat_application) { - return res.sendStatus(404); - } - return res.send(chat_application); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a new chat_application in the DB. -exports.create = function(req, res, next) { - return ChatApplication.max('priority', { - where: { - ChatWebsiteId: req.body.ChatWebsiteId - } - }).then(function(max) { - // SET PRIORITY - req.body.priority = max ? ++max : 1; - return ChatApplication - .create(req.body); - }) - .then(function(mailApplication) { - return res.status(201).send(mailApplication); - }) - .catch(function(err) { - next(err); - }); -}; -// Updates an existing chat_application in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ChatApplication - .findById(req.params.id) - .then(function(chat_application) { - if (!chat_application) { - return res.sendStatus(404); - } - var updated = _.merge(chat_application, req.body); - return updated - .save(); - }) - .then(function(chat_application) { - return res.status(200).send(chat_application); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Deletes a chat_application from the DB. -exports.destroy = function(req, res) { - return ChatApplication - .findById(req.params.id) - .then(function(chat_application) { - if (!chat_application) { - return res.sendStatus(404); - } - return chat_application - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xd8d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xd8d8[0];var _=require(_0xd8d8[1]);var ChatApplication=require(_0xd8d8[3])[_0xd8d8[2]];exports[_0xd8d8[4]]= function(_0x1396x3,_0x1396x4){return ChatApplication[_0xd8d8[11]]({where:_0x1396x3[_0xd8d8[9]],order:_0xd8d8[10],include:[{all:true}]})[_0xd8d8[8]](function(_0x1396x6){return _0x1396x4[_0xd8d8[7]](200)[_0xd8d8[6]](_0x1396x6)})[_0xd8d8[5]](function(_0x1396x5){return handleError(_0x1396x4,_0x1396x5)})};exports[_0xd8d8[12]]= function(_0x1396x3,_0x1396x4){return ChatApplication[_0xd8d8[16]](_0x1396x3[_0xd8d8[15]][_0xd8d8[14]])[_0xd8d8[8]](function(_0x1396x7){if(!_0x1396x7){return _0x1396x4[_0xd8d8[13]](404)};return _0x1396x4[_0xd8d8[6]](_0x1396x7)})[_0xd8d8[5]](function(_0x1396x5){return handleError(_0x1396x4,_0x1396x5)})};exports[_0xd8d8[17]]= function(_0x1396x3,_0x1396x4,_0x1396x8){return ChatApplication[_0xd8d8[20]](_0xd8d8[10],{where:{ChatWebsiteId:_0x1396x3[_0xd8d8[18]][_0xd8d8[19]]}})[_0xd8d8[8]](function(_0x1396xa){_0x1396x3[_0xd8d8[18]][_0xd8d8[10]]= _0x1396xa?++_0x1396xa:1;return ChatApplication[_0xd8d8[17]](_0x1396x3[_0xd8d8[18]])})[_0xd8d8[8]](function(_0x1396x9){return _0x1396x4[_0xd8d8[7]](201)[_0xd8d8[6]](_0x1396x9)})[_0xd8d8[5]](function(_0x1396x5){_0x1396x8(_0x1396x5)})};exports[_0xd8d8[21]]= function(_0x1396x3,_0x1396x4){if(_0x1396x3[_0xd8d8[18]][_0xd8d8[14]]){delete _0x1396x3[_0xd8d8[18]][_0xd8d8[14]]};return ChatApplication[_0xd8d8[16]](_0x1396x3[_0xd8d8[15]][_0xd8d8[14]])[_0xd8d8[8]](function(_0x1396x7){if(!_0x1396x7){return _0x1396x4[_0xd8d8[13]](404)};var _0x1396xb=_[_0xd8d8[22]](_0x1396x7,_0x1396x3[_0xd8d8[18]]);return _0x1396xb[_0xd8d8[23]]()})[_0xd8d8[8]](function(_0x1396x7){return _0x1396x4[_0xd8d8[7]](200)[_0xd8d8[6]](_0x1396x7)})[_0xd8d8[5]](function(_0x1396x5){return handleError(_0x1396x4,_0x1396x5)})};exports[_0xd8d8[24]]= function(_0x1396x3,_0x1396x4){return ChatApplication[_0xd8d8[16]](_0x1396x3[_0xd8d8[15]][_0xd8d8[14]])[_0xd8d8[8]](function(_0x1396x7){if(!_0x1396x7){return _0x1396x4[_0xd8d8[13]](404)};return _0x1396x7[_0xd8d8[24]]()})[_0xd8d8[8]](function(){return _0x1396x4[_0xd8d8[13]](204)})[_0xd8d8[5]](function(_0x1396x5){return handleError(_0x1396x4,_0x1396x5)})};function handleError(_0x1396x4,_0x1396x5){return _0x1396x4[_0xd8d8[7]](500)[_0xd8d8[6]](_0x1396x5)} \ No newline at end of file diff --git a/server/api/chat_application/chat_application.events.js b/server/api/chat_application/chat_application.events.js index 25f766a..2aeddd8 100644 --- a/server/api/chat_application/chat_application.events.js +++ b/server/api/chat_application/chat_application.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ChatApplication = require('../../models').ChatApplication; - -var ChatApplicationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ChatApplicationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ChatApplication.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ChatApplicationEvents.emit(event + ':' + doc._id, doc); - ChatApplicationEvents.emit(event, doc); - done(null); - } -} - -module.exports = ChatApplicationEvents; +var _0x7b4a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7b4a[0];const EventEmitter=require(_0x7b4a[1]);const ChatApplication=require(_0x7b4a[3])[_0x7b4a[2]];var ChatApplicationEvents= new EventEmitter();ChatApplicationEvents[_0x7b4a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7b4a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7b4a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7b4a[6]};for(var e in events){var event=events[e];ChatApplication[_0x7b4a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xcfb0x8,_0xcfb0x9,_0xcfb0xa){ChatApplicationEvents[_0x7b4a[10]](event+ _0x7b4a[8]+ _0xcfb0x8[_0x7b4a[9]],_0xcfb0x8);ChatApplicationEvents[_0x7b4a[10]](event,_0xcfb0x8);_0xcfb0xa(null)}}module[_0x7b4a[11]]= ChatApplicationEvents \ No newline at end of file diff --git a/server/api/chat_application/chat_application.socket.js b/server/api/chat_application/chat_application.socket.js index 1e82b2e..c32583d 100644 --- a/server/api/chat_application/chat_application.socket.js +++ b/server/api/chat_application/chat_application.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ChatApplicationEvents = require('./chat_application.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('chat_application:' + event, socket); - - ChatApplicationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ChatApplicationEvents.removeListener(event, listener); - }; -} +var _0x501b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x501b[0];const ChatApplicationEvents=require(_0x501b[1]);var events=[_0x501b[2],_0x501b[3]];exports[_0x501b[4]]= function(_0x4803x3){for(var _0x4803x4=0,_0x4803x5=events[_0x501b[5]];_0x4803x4< _0x4803x5;_0x4803x4++){var _0x4803x6=events[_0x4803x4];var _0x4803x7=createListener(_0x501b[6]+ _0x4803x6,_0x4803x3);ChatApplicationEvents[_0x501b[7]](_0x4803x6,_0x4803x7);_0x4803x3[_0x501b[7]](_0x501b[8],removeListener(_0x4803x6,_0x4803x7))}};function createListener(_0x4803x6,_0x4803x3){return function(_0x4803x9){_0x4803x3[_0x501b[9]](_0x4803x6,_0x4803x9)}}function removeListener(_0x4803x6,_0x4803x7){return function(){ChatApplicationEvents[_0x501b[10]](_0x4803x6,_0x4803x7)}} \ No newline at end of file diff --git a/server/api/chat_application/index.js b/server/api/chat_application/index.js index d72780d..1f43845 100644 --- a/server/api/chat_application/index.js +++ b/server/api/chat_application/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./chat_application.controller'); -var license = require('../../config/license/license.service'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show); -router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create); -router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy); - -module.exports = router; +var _0x99b6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x99b6[0];var express=require(_0x99b6[1]);var controller=require(_0x99b6[2]);var license=require(_0x99b6[3]);var auth=require(_0x99b6[4]);var router=express.Router();router[_0x99b6[12]](_0x99b6[5],license[_0x99b6[6]](),license[_0x99b6[7]](),auth[_0x99b6[8]](),auth[_0x99b6[10]]([8],[_0x99b6[9]]),controller[_0x99b6[11]]);router[_0x99b6[12]](_0x99b6[13],license[_0x99b6[6]](),license[_0x99b6[7]](),auth[_0x99b6[8]](),auth[_0x99b6[10]]([8],[_0x99b6[9]]),controller[_0x99b6[14]]);router[_0x99b6[16]](_0x99b6[5],license[_0x99b6[6]](),license[_0x99b6[7]](),auth[_0x99b6[8]](),auth[_0x99b6[10]]([8],[_0x99b6[9]]),controller[_0x99b6[15]]);router[_0x99b6[18]](_0x99b6[13],license[_0x99b6[6]](),license[_0x99b6[7]](),auth[_0x99b6[8]](),auth[_0x99b6[10]]([8],[_0x99b6[9]]),controller[_0x99b6[17]]);router[_0x99b6[19]](_0x99b6[13],license[_0x99b6[6]](),license[_0x99b6[7]](),auth[_0x99b6[8]](),auth[_0x99b6[10]]([8],[_0x99b6[9]]),controller[_0x99b6[17]]);router[_0x99b6[21]](_0x99b6[13],license[_0x99b6[6]](),license[_0x99b6[7]](),auth[_0x99b6[8]](),auth[_0x99b6[10]]([8],[_0x99b6[9]]),controller[_0x99b6[20]]);module[_0x99b6[22]]= router \ No newline at end of file diff --git a/server/api/chat_disposition/chat_disposition.controller.js b/server/api/chat_disposition/chat_disposition.controller.js index 4902da1..09968e7 100644 --- a/server/api/chat_disposition/chat_disposition.controller.js +++ b/server/api/chat_disposition/chat_disposition.controller.js @@ -1,111 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/chat/dispositions -> index - * POST /api/chat/dispositions -> create - * GET /api/chat/dispositions/:id -> show - * PUT /api/chat/dispositions/:id -> update - * DELETE /api/chat/dispositions/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var ChatDisposition = require('../../models').ChatDisposition; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 200; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of ChatDispositions -exports.index = function(req, res) { - ChatDisposition.findAndCountAll() - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single ChatDisposition from the DB -exports.show = function(req, res) { - ChatDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new ChatDisposition in the DB -exports.create = function(req, res) { - ChatDisposition.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing ChatDisposition in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - ChatDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a ChatDisposition from the DB -exports.destroy = function(req, res) { - ChatDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0xe369=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xe369[0];var _=require(_0xe369[1]);var ChatDisposition=require(_0xe369[3])[_0xe369[2]];function handleError(_0xdb62x4,_0xdb62x5){_0xdb62x5= _0xdb62x5|| 500;return function(_0xdb62x6){_0xdb62x4[_0xe369[5]](_0xdb62x5)[_0xe369[4]](_0xdb62x6)}}function responseWithResult(_0xdb62x4,_0xdb62x5){_0xdb62x5= _0xdb62x5|| 200;return function(_0xdb62x8){if(_0xdb62x8){_0xdb62x4[_0xe369[5]](_0xdb62x5)[_0xe369[6]](_0xdb62x8)}}}function responseWithoutResult(_0xdb62x4,_0xdb62x5){_0xdb62x5= _0xdb62x5|| 200;return function(){_0xdb62x4[_0xe369[7]](_0xdb62x5)}}function handleEntityNotFound(_0xdb62x4){return function(_0xdb62x8){if(!_0xdb62x8){_0xdb62x4[_0xe369[5]](404)[_0xe369[8]]();return null};return _0xdb62x8}}function saveUpdates(_0xdb62xc){return function(_0xdb62x8){return _0xdb62x8[_0xe369[10]](_0xdb62xc)[_0xe369[9]](function(_0xdb62xd){return _0xdb62xd})}}function removeEntity(_0xdb62x4){return function(_0xdb62x8){if(_0xdb62x8){return _0xdb62x8[_0xe369[11]]()[_0xe369[9]](function(){_0xdb62x4[_0xe369[5]](204)[_0xe369[8]]()})}}}exports[_0xe369[12]]= function(_0xdb62xf,_0xdb62x4){ChatDisposition[_0xe369[14]]()[_0xe369[9]](responseWithResult(_0xdb62x4))[_0xe369[13]](handleError(_0xdb62x4))};exports[_0xe369[15]]= function(_0xdb62xf,_0xdb62x4){ChatDisposition[_0xe369[18]](_0xdb62xf[_0xe369[17]][_0xe369[16]])[_0xe369[9]](handleEntityNotFound(_0xdb62x4))[_0xe369[9]](responseWithResult(_0xdb62x4))[_0xe369[13]](handleError(_0xdb62x4))};exports[_0xe369[19]]= function(_0xdb62xf,_0xdb62x4){ChatDisposition[_0xe369[19]](_0xdb62xf[_0xe369[20]])[_0xe369[9]](responseWithResult(_0xdb62x4,201))[_0xe369[13]](handleError(_0xdb62x4))};exports[_0xe369[21]]= function(_0xdb62xf,_0xdb62x4){if(_0xdb62xf[_0xe369[20]][_0xe369[16]]){delete _0xdb62xf[_0xe369[20]][_0xe369[16]]};ChatDisposition[_0xe369[18]](_0xdb62xf[_0xe369[17]][_0xe369[16]])[_0xe369[9]](handleEntityNotFound(_0xdb62x4))[_0xe369[9]](saveUpdates(_0xdb62xf[_0xe369[20]]))[_0xe369[9]](responseWithResult(_0xdb62x4))[_0xe369[13]](handleError(_0xdb62x4))};exports[_0xe369[11]]= function(_0xdb62xf,_0xdb62x4){ChatDisposition[_0xe369[18]](_0xdb62xf[_0xe369[17]][_0xe369[16]])[_0xe369[9]](handleEntityNotFound(_0xdb62x4))[_0xe369[9]](removeEntity(_0xdb62x4))[_0xe369[13]](handleError(_0xdb62x4))} \ No newline at end of file diff --git a/server/api/chat_disposition/chat_disposition.events.js b/server/api/chat_disposition/chat_disposition.events.js index ec5fd9d..855b3a3 100644 --- a/server/api/chat_disposition/chat_disposition.events.js +++ b/server/api/chat_disposition/chat_disposition.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ChatDisposition = require('../../models').ChatDisposition; - -var ChatDispositionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ChatDispositionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ChatDisposition.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ChatDispositionEvents.emit(event + ':' + doc._id, doc); - ChatDispositionEvents.emit(event, doc); - done(null); - } -} - -module.exports = ChatDispositionEvents; +var _0x5454=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5454[0];const EventEmitter=require(_0x5454[1]);const ChatDisposition=require(_0x5454[3])[_0x5454[2]];var ChatDispositionEvents= new EventEmitter();ChatDispositionEvents[_0x5454[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5454[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5454[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5454[6]};for(var e in events){var event=events[e];ChatDisposition[_0x5454[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x8dc8x8,_0x8dc8x9,_0x8dc8xa){ChatDispositionEvents[_0x5454[10]](event+ _0x5454[8]+ _0x8dc8x8[_0x5454[9]],_0x8dc8x8);ChatDispositionEvents[_0x5454[10]](event,_0x8dc8x8);_0x8dc8xa(null)}}module[_0x5454[11]]= ChatDispositionEvents \ No newline at end of file diff --git a/server/api/chat_disposition/chat_disposition.socket.js b/server/api/chat_disposition/chat_disposition.socket.js index 8788c23..0d7f715 100644 --- a/server/api/chat_disposition/chat_disposition.socket.js +++ b/server/api/chat_disposition/chat_disposition.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ChatDispositionEvents = require('./chat_disposition.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('chat_disposition:' + event, socket); - - ChatDispositionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ChatDispositionEvents.removeListener(event, listener); - }; -} +var _0x2e7a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x2e7a[0];const ChatDispositionEvents=require(_0x2e7a[1]);var events=[_0x2e7a[2],_0x2e7a[3]];exports[_0x2e7a[4]]= function(_0xe97ex3){for(var _0xe97ex4=0,_0xe97ex5=events[_0x2e7a[5]];_0xe97ex4< _0xe97ex5;_0xe97ex4++){var _0xe97ex6=events[_0xe97ex4];var _0xe97ex7=createListener(_0x2e7a[6]+ _0xe97ex6,_0xe97ex3);ChatDispositionEvents[_0x2e7a[7]](_0xe97ex6,_0xe97ex7);_0xe97ex3[_0x2e7a[7]](_0x2e7a[8],removeListener(_0xe97ex6,_0xe97ex7))}};function createListener(_0xe97ex6,_0xe97ex3){return function(_0xe97ex9){_0xe97ex3[_0x2e7a[9]](_0xe97ex6,_0xe97ex9)}}function removeListener(_0xe97ex6,_0xe97ex7){return function(){ChatDispositionEvents[_0x2e7a[10]](_0xe97ex6,_0xe97ex7)}} \ No newline at end of file diff --git a/server/api/chat_disposition/index.js b/server/api/chat_disposition/index.js index aec3275..cc5035b 100644 --- a/server/api/chat_disposition/index.js +++ b/server/api/chat_disposition/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./chat_disposition.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.index); -router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.show); -router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.create); -router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.update); -router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.update); -router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), controller.destroy); - - -module.exports = router; +var _0xdd62=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xdd62[0];var express=require(_0xdd62[1]);var auth=require(_0xdd62[2]);var controller=require(_0xdd62[3]);var license=require(_0xdd62[4]);var router=express.Router();router[_0xdd62[10]](_0xdd62[5],license[_0xdd62[6]](),license[_0xdd62[7]](),auth[_0xdd62[8]](),controller[_0xdd62[9]]);router[_0xdd62[10]](_0xdd62[11],license[_0xdd62[6]](),license[_0xdd62[7]](),auth[_0xdd62[8]](),controller[_0xdd62[12]]);router[_0xdd62[14]](_0xdd62[5],license[_0xdd62[6]](),license[_0xdd62[7]](),auth[_0xdd62[8]](),controller[_0xdd62[13]]);router[_0xdd62[16]](_0xdd62[11],license[_0xdd62[6]](),license[_0xdd62[7]](),auth[_0xdd62[8]](),controller[_0xdd62[15]]);router[_0xdd62[17]](_0xdd62[11],license[_0xdd62[6]](),license[_0xdd62[7]](),auth[_0xdd62[8]](),controller[_0xdd62[15]]);router[_0xdd62[19]](_0xdd62[11],license[_0xdd62[6]](),license[_0xdd62[7]](),auth[_0xdd62[8]](),controller[_0xdd62[18]]);module[_0xdd62[20]]= router \ No newline at end of file diff --git a/server/api/chat_enquiry/enquiry.controller.js b/server/api/chat_enquiry/enquiry.controller.js index 0adc0f6..c4e4d9b 100644 --- a/server/api/chat_enquiry/enquiry.controller.js +++ b/server/api/chat_enquiry/enquiry.controller.js @@ -1,123 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var ChatEnquiry = require('../../models').ChatEnquiry; -var ChatVisitor = require('../../models').ChatVisitor; -var ChatWebsite = require('../../models').ChatWebsite; -var List = require('../../models').List; - -// Get list of agents -exports.index = function(req, res, next) { - return ChatEnquiry - .findAndCountAll(_.merge(Util.getQuery(req.query), { - include: [{ - model: ChatWebsite, - attributes: ['id', 'name'] - }] - })) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single enquiry -exports.show = function(req, res) { - return ChatEnquiry - .findById(req.params.id, { - include: [{ - model: ChatWebsite, - attributes: ['id', 'name', 'ListId'], - }, { - model: ChatVisitor - }] - }) - .then(function(enquiry) { - if (!enquiry) { - return res.sendStatus(404); - } - return res.send(enquiry); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; - -// Creates a new enquiry in the DB. -exports.create = function(req, res) { - return ChatEnquiry - .create(req.body) - .then(function(enquiry) { - return res.status(201).send(enquiry); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing enquiry in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ChatEnquiry - .findById(req.params.id) - .then(function(enquiry) { - if (!enquiry) { - return res.sendStatus(404); - } - var updated = _.merge(enquiry, req.body); - return updated - .save(); - }) - .then(function(enquiry) { - return res.status(200).send(enquiry); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a enquiry from the DB. -exports.destroy = function(req, res) { - return ChatEnquiry - .findById(req.params.id) - .then(function(enquiry) { - if (!enquiry) { - return res.sendStatus(404); - } - return enquiry - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroy = function(req, res) { - return ChatEnquiry - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xcfaf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x4C\x69\x73\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x69\x64","\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x4C\x69\x73\x74\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xcfaf[0];var _=require(_0xcfaf[1]);var Util=require(_0xcfaf[2]);var ChatEnquiry=require(_0xcfaf[4])[_0xcfaf[3]];var ChatVisitor=require(_0xcfaf[4])[_0xcfaf[5]];var ChatWebsite=require(_0xcfaf[4])[_0xcfaf[6]];var List=require(_0xcfaf[4])[_0xcfaf[7]];exports[_0xcfaf[8]]= function(_0xc2e4x7,_0xc2e4x8,_0xc2e4x9){return ChatEnquiry[_0xcfaf[18]](_[_0xcfaf[17]](Util[_0xcfaf[14]](_0xc2e4x7[_0xcfaf[13]]),{include:[{model:ChatWebsite,attributes:[_0xcfaf[15],_0xcfaf[16]]}]}))[_0xcfaf[12]](function(_0xc2e4xb){return _0xc2e4x8[_0xcfaf[11]](200)[_0xcfaf[10]](_0xc2e4xb)})[_0xcfaf[9]](function(_0xc2e4xa){return handleError(_0xc2e4x8,_0xc2e4xa)})};exports[_0xcfaf[19]]= function(_0xc2e4x7,_0xc2e4x8){return ChatEnquiry[_0xcfaf[24]](_0xc2e4x7[_0xcfaf[22]][_0xcfaf[15]],{include:[{model:ChatWebsite,attributes:[_0xcfaf[15],_0xcfaf[16],_0xcfaf[23]]},{model:ChatVisitor}]})[_0xcfaf[12]](function(_0xc2e4xc){if(!_0xc2e4xc){return _0xc2e4x8[_0xcfaf[21]](404)};return _0xc2e4x8[_0xcfaf[10]](_0xc2e4xc)})[_0xcfaf[9]](function(_0xc2e4xa){console[_0xcfaf[20]](_0xc2e4xa);return handleError(_0xc2e4x8,_0xc2e4xa)})};exports[_0xcfaf[25]]= function(_0xc2e4x7,_0xc2e4x8){return ChatEnquiry[_0xcfaf[25]](_0xc2e4x7[_0xcfaf[26]])[_0xcfaf[12]](function(_0xc2e4xc){return _0xc2e4x8[_0xcfaf[11]](201)[_0xcfaf[10]](_0xc2e4xc)})[_0xcfaf[9]](function(_0xc2e4xa){return handleError(_0xc2e4x8,_0xc2e4xa)})};exports[_0xcfaf[27]]= function(_0xc2e4x7,_0xc2e4x8){if(_0xc2e4x7[_0xcfaf[26]][_0xcfaf[15]]){delete _0xc2e4x7[_0xcfaf[26]][_0xcfaf[15]]};return ChatEnquiry[_0xcfaf[24]](_0xc2e4x7[_0xcfaf[22]][_0xcfaf[15]])[_0xcfaf[12]](function(_0xc2e4xc){if(!_0xc2e4xc){return _0xc2e4x8[_0xcfaf[21]](404)};var _0xc2e4xd=_[_0xcfaf[17]](_0xc2e4xc,_0xc2e4x7[_0xcfaf[26]]);return _0xc2e4xd[_0xcfaf[28]]()})[_0xcfaf[12]](function(_0xc2e4xc){return _0xc2e4x8[_0xcfaf[11]](200)[_0xcfaf[10]](_0xc2e4xc)})[_0xcfaf[9]](function(_0xc2e4xa){return handleError(_0xc2e4x8,_0xc2e4xa)})};exports[_0xcfaf[29]]= function(_0xc2e4x7,_0xc2e4x8){return ChatEnquiry[_0xcfaf[24]](_0xc2e4x7[_0xcfaf[22]][_0xcfaf[15]])[_0xcfaf[12]](function(_0xc2e4xc){if(!_0xc2e4xc){return _0xc2e4x8[_0xcfaf[21]](404)};return _0xc2e4xc[_0xcfaf[29]]()})[_0xcfaf[12]](function(){return _0xc2e4x8[_0xcfaf[21]](204)})[_0xcfaf[9]](function(_0xc2e4xa){return handleError(_0xc2e4x8,_0xc2e4xa)})};exports[_0xcfaf[30]]= function(_0xc2e4x7,_0xc2e4x8){return ChatEnquiry[_0xcfaf[29]]({where:{id:_0xc2e4x7[_0xcfaf[13]][_0xcfaf[31]]},individualHooks:true})[_0xcfaf[12]](function(){return _0xc2e4x8[_0xcfaf[21]](204)})[_0xcfaf[9]](function(_0xc2e4xa){return handleError(_0xc2e4x8,_0xc2e4xa)})};function handleError(_0xc2e4x8,_0xc2e4xa){return _0xc2e4x8[_0xcfaf[11]](500)[_0xcfaf[10]](_0xc2e4xa)} \ No newline at end of file diff --git a/server/api/chat_enquiry/enquiry.events.js b/server/api/chat_enquiry/enquiry.events.js index e818a2a..d15b231 100644 --- a/server/api/chat_enquiry/enquiry.events.js +++ b/server/api/chat_enquiry/enquiry.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Enquiry = require('../../models').ChatEnquiry; - -var EnquiryEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -EnquiryEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Enquiry.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - EnquiryEvents.emit(event + ':' + doc._id, doc); - EnquiryEvents.emit(event, doc); - done(null); - } -} - -module.exports = EnquiryEvents; +var _0x65a4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x65a4[0];const EventEmitter=require(_0x65a4[1]);const Enquiry=require(_0x65a4[3])[_0x65a4[2]];var EnquiryEvents= new EventEmitter();EnquiryEvents[_0x65a4[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x65a4[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x65a4[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x65a4[6]};for(var e in events){var event=events[e];Enquiry[_0x65a4[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6132x8,_0x6132x9,_0x6132xa){EnquiryEvents[_0x65a4[10]](event+ _0x65a4[8]+ _0x6132x8[_0x65a4[9]],_0x6132x8);EnquiryEvents[_0x65a4[10]](event,_0x6132x8);_0x6132xa(null)}}module[_0x65a4[11]]= EnquiryEvents \ No newline at end of file diff --git a/server/api/chat_enquiry/enquiry.socket.js b/server/api/chat_enquiry/enquiry.socket.js index 686f9a1..68b3695 100644 --- a/server/api/chat_enquiry/enquiry.socket.js +++ b/server/api/chat_enquiry/enquiry.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ChatEnquiryEvents = require('./enquiry.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('enquiry:' + event, socket); - - ChatEnquiryEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ChatEnquiryEvents.removeListener(event, listener); - }; -} +var _0xee17=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x65\x6E\x71\x75\x69\x72\x79\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x65\x6E\x71\x75\x69\x72\x79\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xee17[0];const ChatEnquiryEvents=require(_0xee17[1]);var events=[_0xee17[2],_0xee17[3]];exports[_0xee17[4]]= function(_0x68dbx3){for(var _0x68dbx4=0,_0x68dbx5=events[_0xee17[5]];_0x68dbx4< _0x68dbx5;_0x68dbx4++){var _0x68dbx6=events[_0x68dbx4];var _0x68dbx7=createListener(_0xee17[6]+ _0x68dbx6,_0x68dbx3);ChatEnquiryEvents[_0xee17[7]](_0x68dbx6,_0x68dbx7);_0x68dbx3[_0xee17[7]](_0xee17[8],removeListener(_0x68dbx6,_0x68dbx7))}};function createListener(_0x68dbx6,_0x68dbx3){return function(_0x68dbx9){_0x68dbx3[_0xee17[9]](_0x68dbx6,_0x68dbx9)}}function removeListener(_0x68dbx6,_0x68dbx7){return function(){ChatEnquiryEvents[_0xee17[10]](_0x68dbx6,_0x68dbx7)}} \ No newline at end of file diff --git a/server/api/chat_enquiry/index.js b/server/api/chat_enquiry/index.js index 0add885..3dcaacd 100644 --- a/server/api/chat_enquiry/index.js +++ b/server/api/chat_enquiry/index.js @@ -1,19 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./enquiry.controller'); -var license = require('../../config/license/license.service'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show); -router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create); -router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.delete('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.bulkDestroy); -router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy); - -module.exports = router; +var _0xb98d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x65\x6E\x71\x75\x69\x72\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xb98d[0];var express=require(_0xb98d[1]);var controller=require(_0xb98d[2]);var license=require(_0xb98d[3]);var auth=require(_0xb98d[4]);var router=express.Router();router[_0xb98d[12]](_0xb98d[5],license[_0xb98d[6]](),license[_0xb98d[7]](),auth[_0xb98d[8]](),auth[_0xb98d[10]]([8],[_0xb98d[9]]),controller[_0xb98d[11]]);router[_0xb98d[12]](_0xb98d[13],license[_0xb98d[6]](),license[_0xb98d[7]](),auth[_0xb98d[8]](),auth[_0xb98d[10]]([8],[_0xb98d[9]]),controller[_0xb98d[14]]);router[_0xb98d[16]](_0xb98d[5],license[_0xb98d[6]](),license[_0xb98d[7]](),auth[_0xb98d[8]](),auth[_0xb98d[10]]([8],[_0xb98d[9]]),controller[_0xb98d[15]]);router[_0xb98d[18]](_0xb98d[13],license[_0xb98d[6]](),license[_0xb98d[7]](),auth[_0xb98d[8]](),auth[_0xb98d[10]]([8],[_0xb98d[9]]),controller[_0xb98d[17]]);router[_0xb98d[19]](_0xb98d[13],license[_0xb98d[6]](),license[_0xb98d[7]](),auth[_0xb98d[8]](),auth[_0xb98d[10]]([8],[_0xb98d[9]]),controller[_0xb98d[17]]);router[_0xb98d[21]](_0xb98d[5],license[_0xb98d[6]](),license[_0xb98d[7]](),auth[_0xb98d[8]](),auth[_0xb98d[10]]([8],[_0xb98d[9]]),controller[_0xb98d[20]]);router[_0xb98d[21]](_0xb98d[13],license[_0xb98d[6]](),license[_0xb98d[7]](),auth[_0xb98d[8]](),auth[_0xb98d[10]]([8],[_0xb98d[9]]),controller[_0xb98d[22]]);module[_0xb98d[23]]= router \ No newline at end of file diff --git a/server/api/chat_message/chat_message.controller.js b/server/api/chat_message/chat_message.controller.js index ac89444..600bdc5 100644 --- a/server/api/chat_message/chat_message.controller.js +++ b/server/api/chat_message/chat_message.controller.js @@ -1,106 +1 @@ -'use strict'; - -var _ = require('lodash'); -var md5 = require('md5'); - -var User = require('../../models').User; -var ChatRoom = require('../../models').ChatRoom; -var ChatMessage = require('../../models').ChatMessage; -var ChatVisitor = require('../../models').ChatVisitor; - -// Get list of chat_messages -exports.index = function(req, res) { - return ChatMessage - .findAll() - .then(function(chat_messages) { - return res.status(200).send(chat_messages); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.describe = function(req, res) { - return ChatMessage - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single chatMessage -exports.show = function(req, res) { - return ChatMessage - .findById(req.params.id) - .then(function(chatMessage) { - if (!chatMessage) { - return res.sendStatus(404); - } - return res.send(chatMessage); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new chatMessage in the DB. -exports.create = function(req, res, next) { - return ChatMessage - .create(_.merge(req.body, { - UserId: req.user.id - })) - .then(function(chatMessage) { - return res.status(201).send(chatMessage); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing chatMessage in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return ChatMessage - .findById(req.params.id) - .then(function(chatMessage) { - if (!chatMessage) { - return res.sendStatus(404); - } - var updated = _.merge(chatMessage, req.body); - return updated.save(); - }) - .then(function(chatMessage) { - return res.status(200).send(chatMessage); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a chatMessage from the DB. -exports.destroy = function(req, res) { - return ChatMessage - .findById(req.params.id) - .then(function(chatMessage) { - if (!chatMessage) { - return res.sendStatus(404); - } - return chatMessage.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xb379=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x64\x35","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x73\x65\x72","\x6D\x65\x72\x67\x65","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xb379[0];var _=require(_0xb379[1]);var md5=require(_0xb379[2]);var User=require(_0xb379[4])[_0xb379[3]];var ChatRoom=require(_0xb379[4])[_0xb379[5]];var ChatMessage=require(_0xb379[4])[_0xb379[6]];var ChatVisitor=require(_0xb379[4])[_0xb379[7]];exports[_0xb379[8]]= function(_0x4862x7,_0x4862x8){return ChatMessage[_0xb379[13]]()[_0xb379[12]](function(_0x4862xa){return _0x4862x8[_0xb379[11]](200)[_0xb379[10]](_0x4862xa)})[_0xb379[9]](function(_0x4862x9){return handleError(_0x4862x8,_0x4862x9)})};exports[_0xb379[14]]= function(_0x4862x7,_0x4862x8){return ChatMessage[_0xb379[14]]()[_0xb379[12]](function(_0x4862xb){return _0x4862x8[_0xb379[11]](200)[_0xb379[10]](_0x4862xb)})[_0xb379[9]](function(_0x4862x9){return handleError(_0x4862x8,_0x4862x9)})};exports[_0xb379[15]]= function(_0x4862x7,_0x4862x8){return ChatMessage[_0xb379[19]](_0x4862x7[_0xb379[18]][_0xb379[17]])[_0xb379[12]](function(_0x4862xc){if(!_0x4862xc){return _0x4862x8[_0xb379[16]](404)};return _0x4862x8[_0xb379[10]](_0x4862xc)})[_0xb379[9]](function(_0x4862x9){return handleError(_0x4862x8,_0x4862x9)})};exports[_0xb379[20]]= function(_0x4862x7,_0x4862x8,_0x4862xd){return ChatMessage[_0xb379[20]](_[_0xb379[23]](_0x4862x7[_0xb379[21]],{UserId:_0x4862x7[_0xb379[22]][_0xb379[17]]}))[_0xb379[12]](function(_0x4862xc){return _0x4862x8[_0xb379[11]](201)[_0xb379[10]](_0x4862xc)})[_0xb379[9]](function(_0x4862x9){return handleError(_0x4862x8,_0x4862x9)})};exports[_0xb379[24]]= function(_0x4862x7,_0x4862x8){if(_0x4862x7[_0xb379[21]][_0xb379[17]]){delete _0x4862x7[_0xb379[21]][_0xb379[17]]};return ChatMessage[_0xb379[19]](_0x4862x7[_0xb379[18]][_0xb379[17]])[_0xb379[12]](function(_0x4862xc){if(!_0x4862xc){return _0x4862x8[_0xb379[16]](404)};var _0x4862xe=_[_0xb379[23]](_0x4862xc,_0x4862x7[_0xb379[21]]);return _0x4862xe[_0xb379[25]]()})[_0xb379[12]](function(_0x4862xc){return _0x4862x8[_0xb379[11]](200)[_0xb379[10]](_0x4862xc)})[_0xb379[9]](function(_0x4862x9){return handleError(_0x4862x8,_0x4862x9)})};exports[_0xb379[26]]= function(_0x4862x7,_0x4862x8){return ChatMessage[_0xb379[19]](_0x4862x7[_0xb379[18]][_0xb379[17]])[_0xb379[12]](function(_0x4862xc){if(!_0x4862xc){return _0x4862x8[_0xb379[16]](404)};return _0x4862xc[_0xb379[26]]()})[_0xb379[12]](function(){return _0x4862x8[_0xb379[16]](204)})[_0xb379[9]](function(_0x4862x9){return handleError(_0x4862x8,_0x4862x9)})};function handleError(_0x4862x8,_0x4862x9){return _0x4862x8[_0xb379[11]](500)[_0xb379[10]](_0x4862x9)} \ No newline at end of file diff --git a/server/api/chat_message/chat_message.events.js b/server/api/chat_message/chat_message.events.js index 64d8887..a3def29 100644 --- a/server/api/chat_message/chat_message.events.js +++ b/server/api/chat_message/chat_message.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ChatMessage = require('../../models').ChatMessage; - -var ChatMessageEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ChatMessageEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ChatMessage.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ChatMessageEvents.emit(event + ':' + doc._id, doc); - ChatMessageEvents.emit(event, doc); - done(null); - } -} - -module.exports = ChatMessageEvents; +var _0x690e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x690e[0];const EventEmitter=require(_0x690e[1]);const ChatMessage=require(_0x690e[3])[_0x690e[2]];var ChatMessageEvents= new EventEmitter();ChatMessageEvents[_0x690e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x690e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x690e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x690e[6]};for(var e in events){var event=events[e];ChatMessage[_0x690e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7542x8,_0x7542x9,_0x7542xa){ChatMessageEvents[_0x690e[10]](event+ _0x690e[8]+ _0x7542x8[_0x690e[9]],_0x7542x8);ChatMessageEvents[_0x690e[10]](event,_0x7542x8);_0x7542xa(null)}}module[_0x690e[11]]= ChatMessageEvents \ No newline at end of file diff --git a/server/api/chat_message/chat_message.socket.js b/server/api/chat_message/chat_message.socket.js index df90ddc..110f9a7 100644 --- a/server/api/chat_message/chat_message.socket.js +++ b/server/api/chat_message/chat_message.socket.js @@ -1,62 +1 @@ -'use strict'; - -const _ = require('lodash'); - -const ChatMessage = require('../../models').ChatMessage; -const ChatMessageEvents = require('./chat_message.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('chat_message:' + event, socket); - - ChatMessageEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - return doc - .getChatRoom() - .then(function(chatRoom) { - return [chatRoom - .getUsers({ - attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal', 'userpic'], - raw: true - }), chatRoom - .getChatVisitor({ - attributes: ['id', 'fullname', 'email'], - raw: true - }) - ]; - }) - .spread(function(users, visitor) { - var sender = _.find(users, { - id: doc.UserId - }); - - users.forEach(function(user) { - // SOCKET FILTER - if (socket.userId == user.id && (sender || visitor)) { - socket.emit(event, _.merge(doc.dataValues, { - User: sender, // TODO modify to sender - ChatVisitor: sender ? null : visitor // TODO modify to visitor - })); - } - }); - }) - .catch(function(err) { - console.error(err); - }); - }; -} - -function removeListener(event, listener) { - return function() { - ChatMessageEvents.removeListener(event, listener); - }; -} +var _0x66cf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x55\x73\x65\x72\x49\x64","\x66\x69\x6E\x64","\x75\x73\x65\x72\x49\x64","\x69\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x65\x72\x67\x65","\x65\x6D\x69\x74","\x66\x6F\x72\x45\x61\x63\x68","\x73\x70\x72\x65\x61\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x72\x6F\x6C\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x75\x73\x65\x72\x70\x69\x63","\x67\x65\x74\x55\x73\x65\x72\x73","\x67\x65\x74\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x74\x68\x65\x6E","\x67\x65\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x66cf[0];const _=require(_0x66cf[1]);const ChatMessage=require(_0x66cf[3])[_0x66cf[2]];const ChatMessageEvents=require(_0x66cf[4]);var events=[_0x66cf[5],_0x66cf[6]];exports[_0x66cf[7]]= function(_0x10fex5){for(var _0x10fex6=0,_0x10fex7=events[_0x66cf[8]];_0x10fex6< _0x10fex7;_0x10fex6++){var _0x10fex8=events[_0x10fex6];var _0x10fex9=createListener(_0x66cf[9]+ _0x10fex8,_0x10fex5);ChatMessageEvents[_0x66cf[10]](_0x10fex8,_0x10fex9);_0x10fex5[_0x66cf[10]](_0x66cf[11],removeListener(_0x10fex8,_0x10fex9))}};function createListener(_0x10fex8,_0x10fex5){return function(_0x10fexb){return _0x10fexb[_0x66cf[32]]()[_0x66cf[31]](function(_0x10fex11){return [_0x10fex11[_0x66cf[29]]({attributes:[_0x66cf[17],_0x66cf[23],_0x66cf[24],_0x66cf[25],_0x66cf[26],_0x66cf[27],_0x66cf[28]],raw:true}),_0x10fex11[_0x66cf[30]]({attributes:[_0x66cf[17],_0x66cf[24],_0x66cf[25]],raw:true})]})[_0x66cf[22]](function(_0x10fexd,_0x10fexe){var _0x10fexf=_[_0x66cf[15]](_0x10fexd,{id:_0x10fexb[_0x66cf[14]]});_0x10fexd[_0x66cf[21]](function(_0x10fex10){if(_0x10fex5[_0x66cf[16]]== _0x10fex10[_0x66cf[17]]&& (_0x10fexf|| _0x10fexe)){_0x10fex5[_0x66cf[20]](_0x10fex8,_[_0x66cf[19]](_0x10fexb[_0x66cf[18]],{User:_0x10fexf,ChatVisitor:_0x10fexf?null:_0x10fexe}))}})})[_0x66cf[13]](function(_0x10fexc){console[_0x66cf[12]](_0x10fexc)})}}function removeListener(_0x10fex8,_0x10fex9){return function(){ChatMessageEvents[_0x66cf[33]](_0x10fex8,_0x10fex9)}} \ No newline at end of file diff --git a/server/api/chat_message/index.js b/server/api/chat_message/index.js index 947b5a8..f8a6994 100644 --- a/server/api/chat_message/index.js +++ b/server/api/chat_message/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./chat_message.controller'); -var license = require('../../config/license/license.service'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.index); -router.get('/describe', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.describe); -router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.show); -router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.create); -router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy); - -module.exports = router; +var _0x861e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x861e[0];var express=require(_0x861e[1]);var controller=require(_0x861e[2]);var license=require(_0x861e[3]);var auth=require(_0x861e[4]);var router=express.Router();router[_0x861e[13]](_0x861e[5],license[_0x861e[6]](),license[_0x861e[7]](),auth[_0x861e[8]](),auth[_0x861e[11]]([8],[_0x861e[9],_0x861e[10]]),controller[_0x861e[12]]);router[_0x861e[13]](_0x861e[14],license[_0x861e[6]](),license[_0x861e[7]](),auth[_0x861e[8]](),auth[_0x861e[11]]([8],[_0x861e[9]]),controller[_0x861e[15]]);router[_0x861e[13]](_0x861e[16],license[_0x861e[6]](),license[_0x861e[7]](),auth[_0x861e[8]](),auth[_0x861e[11]]([8],[_0x861e[9],_0x861e[10]]),controller[_0x861e[17]]);router[_0x861e[19]](_0x861e[5],license[_0x861e[6]](),license[_0x861e[7]](),auth[_0x861e[8]](),auth[_0x861e[11]]([8],[_0x861e[9],_0x861e[10]]),controller[_0x861e[18]]);router[_0x861e[21]](_0x861e[16],license[_0x861e[6]](),license[_0x861e[7]](),auth[_0x861e[8]](),auth[_0x861e[11]]([8],[_0x861e[9]]),controller[_0x861e[20]]);router[_0x861e[23]](_0x861e[16],license[_0x861e[6]](),license[_0x861e[7]](),auth[_0x861e[8]](),auth[_0x861e[11]]([8],[_0x861e[9]]),controller[_0x861e[22]]);module[_0x861e[24]]= router \ No newline at end of file diff --git a/server/api/chat_proactive_action/chat_proactive_action.controller.js b/server/api/chat_proactive_action/chat_proactive_action.controller.js index 8e3b8ba..fc74bc8 100644 --- a/server/api/chat_proactive_action/chat_proactive_action.controller.js +++ b/server/api/chat_proactive_action/chat_proactive_action.controller.js @@ -1,112 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/chat/proactives -> index - * POST /api/chat/proactives -> create - * GET /api/chat/proactives/:id -> show - * PUT /api/chat/proactives/:id -> update - * DELETE /api/chat/proactives/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var ChatProactiveAction = require('../../models').ChatProactiveAction; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 204; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of ChatProactiveActions -exports.index = function(req, res) { - return ChatProactiveAction.findAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single ChatProactiveAction from the DB -exports.show = function(req, res) { - return ChatProactiveAction.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new ChatProactiveAction in the DB -exports.create = function(req, res) { - return ChatProactiveAction.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing ChatProactiveAction in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ChatProactiveAction.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a ChatProactiveAction from the DB -exports.destroy = function(req, res) { - return ChatProactiveAction.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0xff28=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xff28[0];var _=require(_0xff28[1]);var Util=require(_0xff28[2]);var ChatProactiveAction=require(_0xff28[4])[_0xff28[3]];function handleError(_0x8950x5,_0x8950x6){_0x8950x6= _0x8950x6|| 500;return function(_0x8950x7){_0x8950x5[_0xff28[6]](_0x8950x6)[_0xff28[5]](_0x8950x7)}}function responseWithResult(_0x8950x5,_0x8950x6){_0x8950x6= _0x8950x6|| 200;return function(_0x8950x9){if(_0x8950x9){_0x8950x5[_0xff28[6]](_0x8950x6)[_0xff28[7]](_0x8950x9)}}}function responseWithoutResult(_0x8950x5,_0x8950x6){_0x8950x6= _0x8950x6|| 204;return function(){_0x8950x5[_0xff28[8]](_0x8950x6)}}function handleEntityNotFound(_0x8950x5){return function(_0x8950x9){if(!_0x8950x9){_0x8950x5[_0xff28[6]](404)[_0xff28[9]]();return null};return _0x8950x9}}function saveUpdates(_0x8950xd){return function(_0x8950x9){return _0x8950x9[_0xff28[11]](_0x8950xd)[_0xff28[10]](function(_0x8950xe){return _0x8950xe})}}function removeEntity(_0x8950x5){return function(_0x8950x9){if(_0x8950x9){return _0x8950x9[_0xff28[12]]()[_0xff28[10]](function(){_0x8950x5[_0xff28[6]](204)[_0xff28[9]]()})}}}exports[_0xff28[13]]= function(_0x8950x10,_0x8950x5){return ChatProactiveAction[_0xff28[17]](Util[_0xff28[16]](_0x8950x10[_0xff28[15]]))[_0xff28[10]](responseWithResult(_0x8950x5))[_0xff28[14]](handleError(_0x8950x5))};exports[_0xff28[18]]= function(_0x8950x10,_0x8950x5){return ChatProactiveAction[_0xff28[21]](_0x8950x10[_0xff28[20]][_0xff28[19]])[_0xff28[10]](handleEntityNotFound(_0x8950x5))[_0xff28[10]](responseWithResult(_0x8950x5))[_0xff28[14]](handleError(_0x8950x5))};exports[_0xff28[22]]= function(_0x8950x10,_0x8950x5){return ChatProactiveAction[_0xff28[22]](_0x8950x10[_0xff28[23]])[_0xff28[10]](responseWithResult(_0x8950x5,201))[_0xff28[14]](handleError(_0x8950x5))};exports[_0xff28[24]]= function(_0x8950x10,_0x8950x5){if(_0x8950x10[_0xff28[23]][_0xff28[19]]){delete _0x8950x10[_0xff28[23]][_0xff28[19]]};return ChatProactiveAction[_0xff28[21]](_0x8950x10[_0xff28[20]][_0xff28[19]])[_0xff28[10]](handleEntityNotFound(_0x8950x5))[_0xff28[10]](saveUpdates(_0x8950x10[_0xff28[23]]))[_0xff28[10]](responseWithResult(_0x8950x5))[_0xff28[14]](handleError(_0x8950x5))};exports[_0xff28[12]]= function(_0x8950x10,_0x8950x5){return ChatProactiveAction[_0xff28[21]](_0x8950x10[_0xff28[20]][_0xff28[19]])[_0xff28[10]](handleEntityNotFound(_0x8950x5))[_0xff28[10]](removeEntity(_0x8950x5))[_0xff28[14]](handleError(_0x8950x5))} \ No newline at end of file diff --git a/server/api/chat_proactive_action/chat_proactive_action.events.js b/server/api/chat_proactive_action/chat_proactive_action.events.js index 63b128a..29a6732 100644 --- a/server/api/chat_proactive_action/chat_proactive_action.events.js +++ b/server/api/chat_proactive_action/chat_proactive_action.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ChatProactiveAction = require('../../models').ChatProactiveAction; - -var ChatProactiveActionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ChatProactiveActionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ChatProactiveAction.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ChatProactiveActionEvents.emit(event + ':' + doc._id, doc); - ChatProactiveActionEvents.emit(event, doc); - done(null); - } -} - -module.exports = ChatProactiveActionEvents; +var _0x259c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x259c[0];const EventEmitter=require(_0x259c[1]);const ChatProactiveAction=require(_0x259c[3])[_0x259c[2]];var ChatProactiveActionEvents= new EventEmitter();ChatProactiveActionEvents[_0x259c[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x259c[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x259c[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x259c[6]};for(var e in events){var event=events[e];ChatProactiveAction[_0x259c[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd1f7x8,_0xd1f7x9,_0xd1f7xa){ChatProactiveActionEvents[_0x259c[10]](event+ _0x259c[8]+ _0xd1f7x8[_0x259c[9]],_0xd1f7x8);ChatProactiveActionEvents[_0x259c[10]](event,_0xd1f7x8);_0xd1f7xa(null)}}module[_0x259c[11]]= ChatProactiveActionEvents \ No newline at end of file diff --git a/server/api/chat_proactive_action/chat_proactive_action.socket.js b/server/api/chat_proactive_action/chat_proactive_action.socket.js index 2e9d2a7..8580e0a 100644 --- a/server/api/chat_proactive_action/chat_proactive_action.socket.js +++ b/server/api/chat_proactive_action/chat_proactive_action.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ChatProactiveActionEvents = require('./chat_proactive_action.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('chat_proactive_action:' + event, socket); - - ChatProactiveActionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ChatProactiveActionEvents.removeListener(event, listener); - }; -} +var _0x4b9d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x4b9d[0];const ChatProactiveActionEvents=require(_0x4b9d[1]);var events=[_0x4b9d[2],_0x4b9d[3]];exports[_0x4b9d[4]]= function(_0x3da0x3){for(var _0x3da0x4=0,_0x3da0x5=events[_0x4b9d[5]];_0x3da0x4< _0x3da0x5;_0x3da0x4++){var _0x3da0x6=events[_0x3da0x4];var _0x3da0x7=createListener(_0x4b9d[6]+ _0x3da0x6,_0x3da0x3);ChatProactiveActionEvents[_0x4b9d[7]](_0x3da0x6,_0x3da0x7);_0x3da0x3[_0x4b9d[7]](_0x4b9d[8],removeListener(_0x3da0x6,_0x3da0x7))}};function createListener(_0x3da0x6,_0x3da0x3){return function(_0x3da0x9){_0x3da0x3[_0x4b9d[9]](_0x3da0x6,_0x3da0x9)}}function removeListener(_0x3da0x6,_0x3da0x7){return function(){ChatProactiveActionEvents[_0x4b9d[10]](_0x3da0x6,_0x3da0x7)}} \ No newline at end of file diff --git a/server/api/chat_proactive_action/index.js b/server/api/chat_proactive_action/index.js index e8e0ecf..ef3141b 100644 --- a/server/api/chat_proactive_action/index.js +++ b/server/api/chat_proactive_action/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./chat_proactive_action.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show); -router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create); -router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy); - -module.exports = router; +var _0x720b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x720b[0];var express=require(_0x720b[1]);var auth=require(_0x720b[2]);var controller=require(_0x720b[3]);var license=require(_0x720b[4]);var router=express.Router();router[_0x720b[12]](_0x720b[5],license[_0x720b[6]](),license[_0x720b[7]](),auth[_0x720b[8]](),auth[_0x720b[10]]([8],[_0x720b[9]]),controller[_0x720b[11]]);router[_0x720b[12]](_0x720b[13],license[_0x720b[6]](),license[_0x720b[7]](),auth[_0x720b[8]](),auth[_0x720b[10]]([8],[_0x720b[9]]),controller[_0x720b[14]]);router[_0x720b[16]](_0x720b[5],license[_0x720b[6]](),license[_0x720b[7]](),auth[_0x720b[8]](),auth[_0x720b[10]]([8],[_0x720b[9]]),controller[_0x720b[15]]);router[_0x720b[18]](_0x720b[13],license[_0x720b[6]](),license[_0x720b[7]](),auth[_0x720b[8]](),auth[_0x720b[10]]([8],[_0x720b[9]]),controller[_0x720b[17]]);router[_0x720b[19]](_0x720b[13],license[_0x720b[6]](),license[_0x720b[7]](),auth[_0x720b[8]](),auth[_0x720b[10]]([8],[_0x720b[9]]),controller[_0x720b[17]]);router[_0x720b[21]](_0x720b[13],license[_0x720b[6]](),license[_0x720b[7]](),auth[_0x720b[8]](),auth[_0x720b[10]]([8],[_0x720b[9]]),controller[_0x720b[20]]);module[_0x720b[22]]= router \ No newline at end of file diff --git a/server/api/chat_queue/chat_queue.controller.js b/server/api/chat_queue/chat_queue.controller.js index fa34821..6e590f3 100644 --- a/server/api/chat_queue/chat_queue.controller.js +++ b/server/api/chat_queue/chat_queue.controller.js @@ -1,237 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var ChatQueue = require('../../models').ChatQueue; -var User = require('../../models').User; -var UserHasChatQueue = require('../../models').UserHasChatQueue; - -// Get list of mailQueues -exports.index = function(req, res) { - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getChatQueuesIdByUser(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - - default: - return ChatQueue - .scope('default') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(function(result) { - return res.status(200).send({ - rows: result.rows, - count: result.rows.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -// Get list of my chat_rooms -exports.me = function(req, res, next) { - return UserHasChatQueue - .findAll({ - where: { - UserId: req.user.id - } - }) - .then(function(userHasChatQueues) { - return res.status(200).send(userHasChatQueues); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single chat_queue -exports.show = function(req, res) { - return ChatQueue - .findById(req.params.id) - .then(function(chat_queue) { - if (!chat_queue) { - return res.sendStatus(404); - } - return res.send(chat_queue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single queue -exports.showAgents = function(req, res) { - return ChatQueue - .findById(req.params.id) - .then(function(queue) { - if (!queue) { - return res.sendStatus(404); - } - return queue - .getUsers({ - where: { - role: 'agent' - }, - attributes: ['id', 'name', 'fullname', 'email'] - }); - }) - .then(function(agents) { - return res.status(200).send({ - rows: agents, - count: agents.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new chat_queue in the DB. -exports.create = function(req, res) { - var _chatQueue; - - return ChatQueue - .create(req.body) - .then(function(chatQueue) { - _chatQueue = chatQueue; - - if (req.body.agents) { - return _chatQueue - .addUsers(req.body.agents, { - penalty: req.body.penalty || 0, - queue: _chatQueue.name - }); - } - }) - .then(function() { - return res.status(201).send(_chatQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing chat_queue in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ChatQueue - .findById(req.params.id) - .then(function(chat_queue) { - if (!chat_queue) { - return res.sendStatus(404); - } - var updated = _.merge(chat_queue, req.body); - return updated.save(); - }) - .then(function(chat_queue) { - return res.status(200).send(chat_queue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Add agents to chat queues -exports.addAgents = function(req, res, next) { - - return ChatQueue - .findById(req.params.id) - .then(function(chatQueue) { - if (!chatQueue) { - return res.sendStatus(404); - } - var userHasChatQueues = _.map(req.body.agents, function(agent) { - return { - UserId: agent, - penalty: req.body.penalty, - ChatQueueId: chatQueue.id, - queue: chatQueue.name - }; - }); - - return UserHasChatQueue - .bulkCreate(userHasChatQueues, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.removeAgents = function(req, res, next) { - return ChatQueue - .findById(req.params.id) - .then(function(chatQueue) { - if (!chatQueue) { - return res.sendStatus(404); - } - return chatQueue - .removeUsers(req.query.agents, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a chat_queue from the DB. -exports.destroy = function(req, res) { - return ChatQueue - .findById(req.params.id) - .then(function(chat_queue) { - if (!chat_queue) { - return res.sendStatus(404); - } - return chat_queue.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return ChatQueue - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x344e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x6F\x77\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x344e[0];var _=require(_0x344e[1]);var Util=require(_0x344e[2]);var ChatQueue=require(_0x344e[4])[_0x344e[3]];var User=require(_0x344e[4])[_0x344e[5]];var UserHasChatQueue=require(_0x344e[4])[_0x344e[6]];exports[_0x344e[7]]= function(_0x9eeax6,_0x9eeax7){switch(_0x9eeax6[_0x344e[15]][_0x344e[24]]){case _0x344e[15]:return User[_0x344e[16]](_0x9eeax6[_0x344e[15]][_0x344e[14]],{attributes:[_0x344e[14]]})[_0x344e[11]](Util[_0x344e[13]](_0x9eeax6[_0x344e[12]]))[_0x344e[11]](function(_0x9eeax9){_0x9eeax7[_0x344e[10]](200)[_0x344e[9]](_0x9eeax9)})[_0x344e[8]](function(_0x9eeax8){return handleError(_0x9eeax7,_0x9eeax8)});default:return ChatQueue[_0x344e[23]](_0x344e[22])[_0x344e[21]](_[_0x344e[20]](Util[_0x344e[19]](_0x9eeax6[_0x344e[12]]),{distinct:true}))[_0x344e[11]](function(_0x9eeax9){return _0x9eeax7[_0x344e[10]](200)[_0x344e[9]]({rows:_0x9eeax9[_0x344e[17]],count:_0x9eeax9[_0x344e[17]][_0x344e[18]]})})[_0x344e[8]](function(_0x9eeax8){return handleError(_0x9eeax7,_0x9eeax8)})}};exports[_0x344e[25]]= function(_0x9eeax6,_0x9eeax7,_0x9eeaxa){return UserHasChatQueue[_0x344e[26]]({where:{UserId:_0x9eeax6[_0x344e[15]][_0x344e[14]]}})[_0x344e[11]](function(_0x9eeaxb){return _0x9eeax7[_0x344e[10]](200)[_0x344e[9]](_0x9eeaxb)})[_0x344e[8]](function(_0x9eeax8){return handleError(_0x9eeax7,_0x9eeax8)})};exports[_0x344e[27]]= function(_0x9eeax6,_0x9eeax7){return ChatQueue[_0x344e[16]](_0x9eeax6[_0x344e[29]][_0x344e[14]])[_0x344e[11]](function(_0x9eeaxc){if(!_0x9eeaxc){return _0x9eeax7[_0x344e[28]](404)};return _0x9eeax7[_0x344e[9]](_0x9eeaxc)})[_0x344e[8]](function(_0x9eeax8){return handleError(_0x9eeax7,_0x9eeax8)})};exports[_0x344e[30]]= function(_0x9eeax6,_0x9eeax7){return ChatQueue[_0x344e[16]](_0x9eeax6[_0x344e[29]][_0x344e[14]])[_0x344e[11]](function(_0x9eeaxe){if(!_0x9eeaxe){return _0x9eeax7[_0x344e[28]](404)};return _0x9eeaxe[_0x344e[35]]({where:{role:_0x344e[31]},attributes:[_0x344e[14],_0x344e[32],_0x344e[33],_0x344e[34]]})})[_0x344e[11]](function(_0x9eeaxd){return _0x9eeax7[_0x344e[10]](200)[_0x344e[9]]({rows:_0x9eeaxd,count:_0x9eeaxd[_0x344e[18]]})})[_0x344e[8]](function(_0x9eeax8){return handleError(_0x9eeax7,_0x9eeax8)})};exports[_0x344e[36]]= function(_0x9eeax6,_0x9eeax7){var _0x9eeaxf;return ChatQueue[_0x344e[36]](_0x9eeax6[_0x344e[38]])[_0x344e[11]](function(_0x9eeax10){_0x9eeaxf= _0x9eeax10;if(_0x9eeax6[_0x344e[38]][_0x344e[37]]){return _0x9eeaxf[_0x344e[40]](_0x9eeax6[_0x344e[38]][_0x344e[37]],{penalty:_0x9eeax6[_0x344e[38]][_0x344e[39]]|| 0,queue:_0x9eeaxf[_0x344e[32]]})}})[_0x344e[11]](function(){return _0x9eeax7[_0x344e[10]](201)[_0x344e[9]](_0x9eeaxf)})[_0x344e[8]](function(_0x9eeax8){return handleError(_0x9eeax7,_0x9eeax8)})};exports[_0x344e[41]]= function(_0x9eeax6,_0x9eeax7){if(_0x9eeax6[_0x344e[38]][_0x344e[14]]){delete _0x9eeax6[_0x344e[38]][_0x344e[14]]};return ChatQueue[_0x344e[16]](_0x9eeax6[_0x344e[29]][_0x344e[14]])[_0x344e[11]](function(_0x9eeaxc){if(!_0x9eeaxc){return _0x9eeax7[_0x344e[28]](404)};var _0x9eeax11=_[_0x344e[20]](_0x9eeaxc,_0x9eeax6[_0x344e[38]]);return _0x9eeax11[_0x344e[42]]()})[_0x344e[11]](function(_0x9eeaxc){return _0x9eeax7[_0x344e[10]](200)[_0x344e[9]](_0x9eeaxc)})[_0x344e[8]](function(_0x9eeax8){return handleError(_0x9eeax7,_0x9eeax8)})};exports[_0x344e[43]]= function(_0x9eeax6,_0x9eeax7,_0x9eeaxa){return ChatQueue[_0x344e[16]](_0x9eeax6[_0x344e[29]][_0x344e[14]])[_0x344e[11]](function(_0x9eeax10){if(!_0x9eeax10){return _0x9eeax7[_0x344e[28]](404)};var _0x9eeaxb=_[_0x344e[44]](_0x9eeax6[_0x344e[38]][_0x344e[37]],function(_0x9eeax12){return {UserId:_0x9eeax12,penalty:_0x9eeax6[_0x344e[38]][_0x344e[39]],ChatQueueId:_0x9eeax10[_0x344e[14]],queue:_0x9eeax10[_0x344e[32]]}});return UserHasChatQueue[_0x344e[45]](_0x9eeaxb,{individualHooks:true})})[_0x344e[11]](function(){return _0x9eeax7[_0x344e[28]](200)})[_0x344e[8]](function(_0x9eeax8){return handleError(_0x9eeax7,_0x9eeax8)})};exports[_0x344e[46]]= function(_0x9eeax6,_0x9eeax7,_0x9eeaxa){return ChatQueue[_0x344e[16]](_0x9eeax6[_0x344e[29]][_0x344e[14]])[_0x344e[11]](function(_0x9eeax10){if(!_0x9eeax10){return _0x9eeax7[_0x344e[28]](404)};return _0x9eeax10[_0x344e[47]](_0x9eeax6[_0x344e[12]][_0x344e[37]],{individualHooks:true})})[_0x344e[11]](function(){return _0x9eeax7[_0x344e[28]](200)})[_0x344e[8]](function(_0x9eeax8){return handleError(_0x9eeax7,_0x9eeax8)})};exports[_0x344e[48]]= function(_0x9eeax6,_0x9eeax7){return ChatQueue[_0x344e[16]](_0x9eeax6[_0x344e[29]][_0x344e[14]])[_0x344e[11]](function(_0x9eeaxc){if(!_0x9eeaxc){return _0x9eeax7[_0x344e[28]](404)};return _0x9eeaxc[_0x344e[48]]()})[_0x344e[11]](function(){return _0x9eeax7[_0x344e[28]](204)})[_0x344e[8]](function(_0x9eeax8){return handleError(_0x9eeax7,_0x9eeax8)})};exports[_0x344e[49]]= function(_0x9eeax6,_0x9eeax7){return ChatQueue[_0x344e[48]]({where:{id:_0x9eeax6[_0x344e[12]][_0x344e[50]]},individualHooks:true})[_0x344e[11]](function(){return _0x9eeax7[_0x344e[28]](204)})[_0x344e[8]](function(_0x9eeax8){return handleError(_0x9eeax7,_0x9eeax8)})};function handleError(_0x9eeax7,_0x9eeax8){return _0x9eeax7[_0x344e[10]](500)[_0x344e[9]](_0x9eeax8)} \ No newline at end of file diff --git a/server/api/chat_queue/chat_queue.events.js b/server/api/chat_queue/chat_queue.events.js index 7fe734e..99cd65f 100644 --- a/server/api/chat_queue/chat_queue.events.js +++ b/server/api/chat_queue/chat_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ChatQueue = require('../../models').ChatQueue; - -var ChatQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ChatQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ChatQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ChatQueueEvents.emit(event + ':' + doc._id, doc); - ChatQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = ChatQueueEvents; +var _0x3065=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3065[0];const EventEmitter=require(_0x3065[1]);const ChatQueue=require(_0x3065[3])[_0x3065[2]];var ChatQueueEvents= new EventEmitter();ChatQueueEvents[_0x3065[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3065[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3065[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3065[6]};for(var e in events){var event=events[e];ChatQueue[_0x3065[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb2acx8,_0xb2acx9,_0xb2acxa){ChatQueueEvents[_0x3065[10]](event+ _0x3065[8]+ _0xb2acx8[_0x3065[9]],_0xb2acx8);ChatQueueEvents[_0x3065[10]](event,_0xb2acx8);_0xb2acxa(null)}}module[_0x3065[11]]= ChatQueueEvents \ No newline at end of file diff --git a/server/api/chat_queue/chat_queue.socket.js b/server/api/chat_queue/chat_queue.socket.js index cee7104..0647802 100644 --- a/server/api/chat_queue/chat_queue.socket.js +++ b/server/api/chat_queue/chat_queue.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ChatQueueEvents = require('./chat_queue.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('chat_queue:' + event, socket); - - ChatQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ChatQueueEvents.removeListener(event, listener); - }; -} +var _0xa985=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xa985[0];const ChatQueueEvents=require(_0xa985[1]);var events=[_0xa985[2],_0xa985[3]];exports[_0xa985[4]]= function(_0x8eaex3){for(var _0x8eaex4=0,_0x8eaex5=events[_0xa985[5]];_0x8eaex4< _0x8eaex5;_0x8eaex4++){var _0x8eaex6=events[_0x8eaex4];var _0x8eaex7=createListener(_0xa985[6]+ _0x8eaex6,_0x8eaex3);ChatQueueEvents[_0xa985[7]](_0x8eaex6,_0x8eaex7);_0x8eaex3[_0xa985[7]](_0xa985[8],removeListener(_0x8eaex6,_0x8eaex7))}};function createListener(_0x8eaex6,_0x8eaex3){return function(_0x8eaex9){_0x8eaex3[_0xa985[9]](_0x8eaex6,_0x8eaex9)}}function removeListener(_0x8eaex6,_0x8eaex7){return function(){ChatQueueEvents[_0xa985[10]](_0x8eaex6,_0x8eaex7)}} \ No newline at end of file diff --git a/server/api/chat_queue/index.js b/server/api/chat_queue/index.js index 48b9b5b..776eeb1 100644 --- a/server/api/chat_queue/index.js +++ b/server/api/chat_queue/index.js @@ -1,23 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./chat_queue.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index); -router.get('/me', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.me); -router.get('/:id/agents', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.showAgents); -router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show); -router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.create); -router.post('/:id/agents', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.addAgents); -router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.update); -router.delete('/:id/agents', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.removeAgents); -router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.update); -router.delete('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy); -router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy); - -module.exports = router; +var _0x987c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x6D\x65","\x6D\x65","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x68\x61\x73\x52\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x6C\x65\x74\x65","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x987c[0];var express=require(_0x987c[1]);var controller=require(_0x987c[2]);var auth=require(_0x987c[3]);var license=require(_0x987c[4]);var router=express.Router();router[_0x987c[12]](_0x987c[5],license[_0x987c[6]](),license[_0x987c[7]](),auth[_0x987c[8]](),auth[_0x987c[10]]([8],[_0x987c[9]]),controller[_0x987c[11]]);router[_0x987c[12]](_0x987c[13],license[_0x987c[6]](),license[_0x987c[7]](),auth[_0x987c[8]](),auth[_0x987c[10]]([8],[_0x987c[9]]),controller[_0x987c[14]]);router[_0x987c[12]](_0x987c[15],license[_0x987c[6]](),license[_0x987c[7]](),auth[_0x987c[8]](),auth[_0x987c[10]]([8],[_0x987c[9]]),controller[_0x987c[16]]);router[_0x987c[12]](_0x987c[17],license[_0x987c[6]](),license[_0x987c[7]](),auth[_0x987c[8]](),auth[_0x987c[10]]([8],[_0x987c[9]]),controller[_0x987c[18]]);router[_0x987c[21]](_0x987c[5],license[_0x987c[6]](),license[_0x987c[7]](),auth[_0x987c[8]](),auth[_0x987c[19]](_0x987c[9]),controller[_0x987c[20]]);router[_0x987c[21]](_0x987c[15],license[_0x987c[6]](),license[_0x987c[7]](),auth[_0x987c[8]](),auth[_0x987c[19]](_0x987c[9]),controller[_0x987c[22]]);router[_0x987c[24]](_0x987c[17],license[_0x987c[6]](),license[_0x987c[7]](),auth[_0x987c[8]](),auth[_0x987c[19]](_0x987c[9]),controller[_0x987c[23]]);router[_0x987c[26]](_0x987c[15],license[_0x987c[6]](),license[_0x987c[7]](),auth[_0x987c[8]](),auth[_0x987c[19]](_0x987c[9]),controller[_0x987c[25]]);router[_0x987c[27]](_0x987c[17],license[_0x987c[6]](),license[_0x987c[7]](),auth[_0x987c[8]](),auth[_0x987c[19]](_0x987c[9]),controller[_0x987c[23]]);router[_0x987c[26]](_0x987c[5],license[_0x987c[6]](),license[_0x987c[7]](),auth[_0x987c[8]](),auth[_0x987c[19]](_0x987c[9]),controller[_0x987c[28]]);router[_0x987c[26]](_0x987c[17],license[_0x987c[6]](),license[_0x987c[7]](),auth[_0x987c[8]](),auth[_0x987c[19]](_0x987c[9]),controller[_0x987c[29]]);module[_0x987c[30]]= router \ No newline at end of file diff --git a/server/api/chat_room/chat_room.controller.js b/server/api/chat_room/chat_room.controller.js index 47b4932..3f45e43 100644 --- a/server/api/chat_room/chat_room.controller.js +++ b/server/api/chat_room/chat_room.controller.js @@ -1,655 +1 @@ -'use strict'; - -var _ = require('lodash'); -var md5 = require('md5'); -var moment = require('moment'); -var csv = require('to-csv'); -var util = require('util'); - -var Util = require('../../config/util'); - -var User = require('../../models').User; -var Agent = require('../../models').User; -var ChatRoom = require('../../models').ChatRoom; -var ChatMessage = require('../../models').ChatMessage; -var ChatWebsite = require('../../models').ChatWebsite; -var ChatApplication = require('../../models').ChatApplication; -var ChatQueue = require('../../models').ChatQueue; -var ChatVisitor = require('../../models').ChatVisitor; -var List = require('../../models').List; -var UserHasChatRoom = require('../../models').UserHasChatRoom; - -// Get list of chat_rooms -exports.index = function(req, res, next) { - return ChatRoom - .findAndCountAll(_.merge(Util.getQuery(req.query), { - include: [{ - model: User, - attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal'] - }, { - model: ChatMessage - }, { - model: ChatVisitor - }] - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get list of fields -exports.describe = function(req, res) { - return ChatRoom - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getChatQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getChatQueuesIdByUser({}, { - attributes: ['id'] - })) - .then(function(userQueues) { - return { - include: { - model: ChatWebsite, - include: { - model: ChatApplication, - include: { - model: ChatQueue, - where: { - id: _.map(userQueues, 'id') - } - } - } - } - }; - }); - default: - return {}; - } - } -} - -exports.unmanaged = function(req, res) { - return Promise - .all([]) - .then(getChatQueues(req.user)) - .then(function(condition) { - return ChatRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'UNMANAGED', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.updatePatch = function(req, res, next) { - var _values = { - tags: req.body.tags - }; - var _options = { - where: { - id: req.params.id.split(',') - } - }; - - return ChatRoom - .update(_values, _options) - .then(function(chatRooms) { - if (!chatRooms) { - return res.sendStatus(404); - } - return chatRooms - }) - .then(function(chatRooms) { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function checkTags(query) { - if (query) { - if (query.tags) { - query.$and = []; - if (_.isArray(query.tags)) { - for (var i = 0; i < query.tags.length; i++) { - query.$and.push({ - tags: { - $like: '%' + query.tags[i] + ';%' - } - }); - } - } else { - query.$and.push({ - tags: { - $like: '%' + query.tags + ';%' - } - }); - } - - delete query.tags; - } - } -} - -exports.getAgents = function(req, res, next) { - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id, { - attributes: ['id'], - where: { - id: { - $ne: req.user.id - }, - online: true - } - }) - .then(Util.getAgentsIdByUser(_.merge(req.query, { - id: { - $ne: req.user.id - } - }))) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - - default: - return User - .scope('all') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - where: { - id: { - $ne: req.user.id - }, - online: true - } - })) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -exports.getGroups = function(req, res, next) { - checkTags(req.query); - var _query = { - where: _.merge({ - type: 'group' - }, req.query) - }; - - switch (req.user.role) { - case 'agent': - _.merge(_query, { - include: [{ - model: User, - attributes: ['id'], - where: { - id: req.user.id - } - }] - }) - break; - - default: - } - - return ChatRoom - .findAll(_query) - .then(function(chatRooms) { - return ChatRoom - .findAll({ - where: { - id: { - $in: _.map(chatRooms, 'id') - } - }, - include: [{ - model: User, - attributes: ['id', 'name', 'fullname', 'role', 'userpic'] - }, { - model: ChatVisitor - }] - }); - }) - .then(function(chatRooms) { - return res.status(200).send({ - rows: chatRooms, - count: chatRooms.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getExternals = function(req, res, next) { - checkTags(req.query); - var _query = { - where: _.merge({ - type: 'external' - }, req.query), - include: [{ - model: ChatVisitor, - attributes: ['id', 'fullname'] - }] - }; - - switch (req.user.role) { - case 'agent': - _query.include.push({ - model: User, - attributes: ['id'], - where: { - id: req.user.id - } - }); - - break; - default: - } - - return ChatRoom - .findAll(_query) - .then(function(chatRooms) { - return res.status(200).send({ - rows: chatRooms, - count: chatRooms.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getAgent = function(req, res, next) { - return User - .scope('all') - .findById(req.params.id) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getOnlineRoom = function(req, res, next) { - return ChatRoom - .scope('online') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - include: [{ - model: User, - attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal'] - }, { - model: ChatMessage - }, { - model: ChatVisitor - }] - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get list of my chat_rooms -exports.me = function(req, res) { - return User - .findById(req.user.id) - .then(function(user) { - return user - .getChatRooms({ - include: [{ - model: ChatVisitor, - attributes: ['id', 'fullname', 'email'] - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal'] - }] - }); - }) - .then(function(chatRooms) { - if (!chatRooms) { - return res.sendStatus(404); - } - return res.send(chatRooms); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; - -// Get a single chatRoom -exports.show = function(req, res) { - return ChatRoom - .findById(req.params.id, { - include: [{ - model: ChatMessage, - include: [{ - model: ChatVisitor, - attributes: ['id', 'email', 'fullname'] - }, { - model: User, - attributes: ['id', 'email', 'name', 'fullname', 'userpic', 'role', 'internal'] - }] - }, { - model: User, - attributes: ['id', 'email', 'name', 'fullname', 'userpic', 'role', 'internal'] - }, { - model: ChatVisitor - }, { - model: ChatWebsite, - attributes: ['id', 'name', 'address'], - include: [List] - }] - }) - .then(function(chatRoom) { - if (!chatRoom) { - return res.sendStatus(404); - } - return res.send(chatRoom); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single chatRoom by users -exports.getRoomByUsers = function(req, res, next) { - - var _chatRoom; - - return ChatRoom - .findOrCreate({ - where: { - token: md5(JSON.stringify(req.query.users.sort())).toString('base64') - }, - defaults: { - type: 'internal', - token: md5(JSON.stringify(req.query.users.sort())).toString('base64'), - status: 'OPEN' - }, - include: [{ - model: ChatMessage, - include: [{ - model: ChatVisitor, - attributes: ['id', 'email', 'fullname'] - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal'] - }] - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal'] - }] - }) - .spread(function(chatRoom, created) { - _chatRoom = chatRoom; - if (created) { - return _chatRoom - .setUsers(req.query.users); - } - }) - .then(function() { - return _chatRoom - .getUsers(); - }) - .then(function(users) { - return res.status(200).send(_.merge(_chatRoom.dataValues, { - Users: users - })); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.createMessage = function(req, res, next) { - var _chatRoom; - - return ChatRoom - .findById(req.params.id) - .then(function(chatRoom) { - _chatRoom = chatRoom; - - if (!_chatRoom) { - return res.sendStatus(404); - } - }) - .then(function() { - return ChatMessage - .create(_.merge(req.body, { - type: _chatRoom.type, - ChatRoomId: req.params.id, - UserId: req.user.id - })); - }) - .then(function(chatMessage) { - return res.status(200).send(chatMessage); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.export = function(req, res, next) { - return ChatRoom - .findById(req.params.id, { - include: [{ - model: ChatMessage, - include: [{ - model: ChatVisitor, - attributes: ['id', 'fullname'] - }, { - model: User, - attributes: ['id', 'fullname'] - }] - }] - }) - .then(function(chatRoom) { - var chatMessageForCSV = []; - chatRoom.ChatMessages.forEach(function(chatMessage) { - chatMessageForCSV.push({ - name: chatMessage.User ? chatMessage.User.fullname : chatMessage.ChatVisitor.fullname, - text: chatMessage.body.replace(/(\r\n|\n|\r)/gm, " "), - date: chatMessage.createdAt - }); - }); - return res.type('text/csv') - .status(200).send(csv(chatMessageForCSV)); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single chatRoom -exports.getRoomByType = function(req, res) { - return User - .findById(req.user.id) - .then(function(user) { - return user - .getChatRooms({ - where: { - type: req.params.type - }, - include: [{ - model: ChatVisitor, - attributes: ['id', 'fullname', 'email'] - }] - }); - }) - .then(function(chatRooms) { - if (!chatRooms) { - return res.sendStatus(404); - } - return res.send(chatRooms); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single chatRoom -exports.getRoomGroups = function(req, res) { - return User - .findById(req.user.id) - .then(function(user) { - return user - .getChatRooms({ - include: [{ - model: ChatVisitor, - attributes: ['id', 'fullname', 'email'] - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal'] - }] - }); - }) - .then(function(chatRooms) { - if (!chatRooms) { - return res.sendStatus(404); - } - return res.send(chatRooms); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new chatRoom in the DB. -exports.create = function(req, res) {}; - -// Updates an existing chatRoom in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return ChatRoom - .findById(req.params.id) - .then(function(chatRoom) { - if (!chatRoom) { - return res.sendStatus(404); - } - return chatRoom - .update(req.body); - }) - .then(function(chatRoom) { - return res.status(200).send(chatRoom); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing chatRoom in the DB. -exports.updateUsers = function(req, res) { - var _chatRoom; - - if (req.body.id) { - delete req.body.id; - } - - return ChatRoom - .findById(req.params.id) - .then(function(chatRoom) { - if (!chatRoom || !req.body.users) { - return res.sendStatus(404); - } - return chatRoom; - }) - .then(function(chatRoom) { - return chatRoom - .update({ - type: 'group', - token: md5(JSON.stringify(req.body.users.sort())).toString('base64') - }); - }) - .then(function(chatRoom) { - _chatRoom = chatRoom; - return chatRoom - .setUsers(req.body.users.sort(), { - individualHooks: true - }); - }) - .then(function() { - return _chatRoom - .getUsers(); - }) - .then(function(users) { - _.merge(_chatRoom.dataValues, { - Users: users - }); - - return res.status(200).send(_chatRoom); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a chatRoom from the DB. -exports.destroy = function(req, res) { - return ChatRoom - .findById(req.params.id) - .then(function(chatRoom) { - if (!chatRoom) { - return res.sendStatus(404); - } - return chatRoom - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - console.log(err); - return res.status(500).send(err); -} +var _0xb71e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x64\x35","\x6D\x6F\x6D\x65\x6E\x74","\x74\x6F\x2D\x63\x73\x76","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x4C\x69\x73\x74","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x69\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x72\x6F\x6C\x65","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x6D\x61\x70","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x74\x61\x67\x73","\x62\x6F\x64\x79","\x2C","\x73\x70\x6C\x69\x74","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x24\x61\x6E\x64","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x25","\x3B\x25","\x70\x75\x73\x68","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x73\x63\x6F\x70\x65","\x67\x65\x74\x47\x72\x6F\x75\x70\x73","\x67\x72\x6F\x75\x70","\x61\x67\x65\x6E\x74","\x75\x73\x65\x72\x70\x69\x63","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x45\x78\x74\x65\x72\x6E\x61\x6C\x73","\x65\x78\x74\x65\x72\x6E\x61\x6C","\x69\x6E\x63\x6C\x75\x64\x65","\x67\x65\x74\x41\x67\x65\x6E\x74","\x67\x65\x74\x4F\x6E\x6C\x69\x6E\x65\x52\x6F\x6F\x6D","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x65","\x65\x72\x72\x6F\x72","\x67\x65\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D\x73","\x73\x68\x6F\x77","\x61\x64\x64\x72\x65\x73\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x55\x73\x65\x72\x73","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x67\x65\x74\x55\x73\x65\x72\x73","\x75\x73\x65\x72\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x73\x70\x72\x65\x61\x64","\x62\x61\x73\x65\x36\x34","\x73\x6F\x72\x74","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x4F\x50\x45\x4E","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x74\x79\x70\x65","\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74","\x20","\x72\x65\x70\x6C\x61\x63\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x66\x6F\x72\x45\x61\x63\x68","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x74\x65\x78\x74\x2F\x63\x73\x76","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x54\x79\x70\x65","\x67\x65\x74\x52\x6F\x6F\x6D\x47\x72\x6F\x75\x70\x73","\x75\x70\x64\x61\x74\x65\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79"];_0xb71e[0];var _=require(_0xb71e[1]);var md5=require(_0xb71e[2]);var moment=require(_0xb71e[3]);var csv=require(_0xb71e[4]);var util=require(_0xb71e[5]);var Util=require(_0xb71e[6]);var User=require(_0xb71e[8])[_0xb71e[7]];var Agent=require(_0xb71e[8])[_0xb71e[7]];var ChatRoom=require(_0xb71e[8])[_0xb71e[9]];var ChatMessage=require(_0xb71e[8])[_0xb71e[10]];var ChatWebsite=require(_0xb71e[8])[_0xb71e[11]];var ChatApplication=require(_0xb71e[8])[_0xb71e[12]];var ChatQueue=require(_0xb71e[8])[_0xb71e[13]];var ChatVisitor=require(_0xb71e[8])[_0xb71e[14]];var List=require(_0xb71e[8])[_0xb71e[15]];var UserHasChatRoom=require(_0xb71e[8])[_0xb71e[16]];exports[_0xb71e[17]]= function(_0x594bx11,_0x594bx12,_0x594bx13){return ChatRoom[_0xb71e[32]](_[_0xb71e[31]](Util[_0xb71e[24]](_0x594bx11[_0xb71e[23]]),{include:[{model:User,attributes:[_0xb71e[25],_0xb71e[26],_0xb71e[27],_0xb71e[28],_0xb71e[29],_0xb71e[30]]},{model:ChatMessage},{model:ChatVisitor}]}))[_0xb71e[22]](function(_0x594bx15){_0x594bx12[_0xb71e[21]](200)[_0xb71e[20]](_0x594bx15)})[_0xb71e[19]](function(_0x594bx14){console[_0xb71e[18]](_0x594bx14);return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[33]]= function(_0x594bx11,_0x594bx12){return ChatRoom[_0xb71e[33]]()[_0xb71e[22]](function(_0x594bx16){return _0x594bx12[_0xb71e[21]](200)[_0xb71e[20]](_0x594bx16)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};function getChatQueues(_0x594bx18){return function(){switch(_0x594bx18[_0xb71e[29]]){case _0xb71e[37]:return User[_0xb71e[36]](_0x594bx18[_0xb71e[25]],{attributes:[_0xb71e[25]]})[_0xb71e[22]](Util[_0xb71e[35]]({},{attributes:[_0xb71e[25]]}))[_0xb71e[22]](function(_0x594bx19){return {include:{model:ChatWebsite,include:{model:ChatApplication,include:{model:ChatQueue,where:{id:_[_0xb71e[34]](_0x594bx19,_0xb71e[25])}}}}}});default:return {}}}}exports[_0xb71e[38]]= function(_0x594bx11,_0x594bx12){return Promise[_0xb71e[43]]([])[_0xb71e[22]](getChatQueues(_0x594bx11[_0xb71e[37]]))[_0xb71e[22]](function(_0x594bx1b){return ChatRoom[_0xb71e[42]](_[_0xb71e[31]](Util[_0xb71e[24]](_0x594bx11[_0xb71e[23]],{status:_0xb71e[39],updatedAt:{$gte:moment()[_0xb71e[41]](_0xb71e[40])}}),_0x594bx1b))})[_0xb71e[22]](function(_0x594bx1a){return _0x594bx12[_0xb71e[21]](200)[_0xb71e[20]]({value:_0x594bx1a})})[_0xb71e[19]](function(_0x594bx14){console[_0xb71e[18]](_0x594bx14);return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[44]]= function(_0x594bx11,_0x594bx12,_0x594bx13){var _0x594bx1c={tags:_0x594bx11[_0xb71e[46]][_0xb71e[45]]};var _0x594bx1d={where:{id:_0x594bx11[_0xb71e[49]][_0xb71e[25]][_0xb71e[48]](_0xb71e[47])}};return ChatRoom[_0xb71e[51]](_0x594bx1c,_0x594bx1d)[_0xb71e[22]](function(_0x594bx1e){if(!_0x594bx1e){return _0x594bx12[_0xb71e[50]](404)};return _0x594bx1e})[_0xb71e[22]](function(_0x594bx1e){return _0x594bx12[_0xb71e[50]](200)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};function checkTags(_0x594bx20){if(_0x594bx20){if(_0x594bx20[_0xb71e[45]]){_0x594bx20[_0xb71e[52]]= [];if(_[_0xb71e[53]](_0x594bx20[_0xb71e[45]])){for(var _0x594bx21=0;_0x594bx21< _0x594bx20[_0xb71e[45]][_0xb71e[54]];_0x594bx21++){_0x594bx20[_0xb71e[52]][_0xb71e[57]]({tags:{$like:_0xb71e[55]+ _0x594bx20[_0xb71e[45]][_0x594bx21]+ _0xb71e[56]}})}}else {_0x594bx20[_0xb71e[52]][_0xb71e[57]]({tags:{$like:_0xb71e[55]+ _0x594bx20[_0xb71e[45]]+ _0xb71e[56]}})};delete _0x594bx20[_0xb71e[45]]}}}exports[_0xb71e[58]]= function(_0x594bx11,_0x594bx12,_0x594bx13){switch(_0x594bx11[_0xb71e[37]][_0xb71e[29]]){case _0xb71e[37]:return User[_0xb71e[36]](_0x594bx11[_0xb71e[37]][_0xb71e[25]],{attributes:[_0xb71e[25]],where:{id:{$ne:_0x594bx11[_0xb71e[37]][_0xb71e[25]]},online:true}})[_0xb71e[22]](Util[_0xb71e[59]](_[_0xb71e[31]](_0x594bx11[_0xb71e[23]],{id:{$ne:_0x594bx11[_0xb71e[37]][_0xb71e[25]]}})))[_0xb71e[22]](function(_0x594bx15){return _0x594bx12[_0xb71e[21]](200)[_0xb71e[20]](_0x594bx15)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)});default:return User[_0xb71e[60]](_0xb71e[43])[_0xb71e[32]](_[_0xb71e[31]](Util[_0xb71e[24]](_0x594bx11[_0xb71e[23]]),{where:{id:{$ne:_0x594bx11[_0xb71e[37]][_0xb71e[25]]},online:true}}))[_0xb71e[22]](function(_0x594bx15){return _0x594bx12[_0xb71e[21]](200)[_0xb71e[20]](_0x594bx15)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})}};exports[_0xb71e[61]]= function(_0x594bx11,_0x594bx12,_0x594bx13){checkTags(_0x594bx11[_0xb71e[23]]);var _0x594bx22={where:_[_0xb71e[31]]({type:_0xb71e[62]},_0x594bx11[_0xb71e[23]])};switch(_0x594bx11[_0xb71e[37]][_0xb71e[29]]){case _0xb71e[63]:_[_0xb71e[31]](_0x594bx22,{include:[{model:User,attributes:[_0xb71e[25]],where:{id:_0x594bx11[_0xb71e[37]][_0xb71e[25]]}}]});break;default:};return ChatRoom[_0xb71e[65]](_0x594bx22)[_0xb71e[22]](function(_0x594bx1e){return ChatRoom[_0xb71e[65]]({where:{id:{$in:_[_0xb71e[34]](_0x594bx1e,_0xb71e[25])}},include:[{model:User,attributes:[_0xb71e[25],_0xb71e[26],_0xb71e[27],_0xb71e[29],_0xb71e[64]]},{model:ChatVisitor}]})})[_0xb71e[22]](function(_0x594bx1e){return _0x594bx12[_0xb71e[21]](200)[_0xb71e[20]]({rows:_0x594bx1e,count:_0x594bx1e[_0xb71e[54]]})})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[66]]= function(_0x594bx11,_0x594bx12,_0x594bx13){checkTags(_0x594bx11[_0xb71e[23]]);var _0x594bx22={where:_[_0xb71e[31]]({type:_0xb71e[67]},_0x594bx11[_0xb71e[23]]),include:[{model:ChatVisitor,attributes:[_0xb71e[25],_0xb71e[27]]}]};switch(_0x594bx11[_0xb71e[37]][_0xb71e[29]]){case _0xb71e[63]:_0x594bx22[_0xb71e[68]][_0xb71e[57]]({model:User,attributes:[_0xb71e[25]],where:{id:_0x594bx11[_0xb71e[37]][_0xb71e[25]]}});break;default:};return ChatRoom[_0xb71e[65]](_0x594bx22)[_0xb71e[22]](function(_0x594bx1e){return _0x594bx12[_0xb71e[21]](200)[_0xb71e[20]]({rows:_0x594bx1e,count:_0x594bx1e[_0xb71e[54]]})})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[69]]= function(_0x594bx11,_0x594bx12,_0x594bx13){return User[_0xb71e[60]](_0xb71e[43])[_0xb71e[36]](_0x594bx11[_0xb71e[49]][_0xb71e[25]])[_0xb71e[22]](function(_0x594bx15){return _0x594bx12[_0xb71e[21]](200)[_0xb71e[20]](_0x594bx15)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[70]]= function(_0x594bx11,_0x594bx12,_0x594bx13){return ChatRoom[_0xb71e[60]](_0xb71e[71])[_0xb71e[32]](_[_0xb71e[31]](Util[_0xb71e[24]](_0x594bx11[_0xb71e[23]]),{include:[{model:User,attributes:[_0xb71e[25],_0xb71e[26],_0xb71e[27],_0xb71e[28],_0xb71e[29],_0xb71e[30]]},{model:ChatMessage},{model:ChatVisitor}]}))[_0xb71e[22]](function(_0x594bx15){_0x594bx12[_0xb71e[21]](200)[_0xb71e[20]](_0x594bx15)})[_0xb71e[19]](function(_0x594bx14){console[_0xb71e[18]](_0x594bx14);return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[72]]= function(_0x594bx11,_0x594bx12){return User[_0xb71e[36]](_0x594bx11[_0xb71e[37]][_0xb71e[25]])[_0xb71e[22]](function(_0x594bx18){return _0x594bx18[_0xb71e[74]]({include:[{model:ChatVisitor,attributes:[_0xb71e[25],_0xb71e[27],_0xb71e[28]]},{model:User,attributes:[_0xb71e[25],_0xb71e[26],_0xb71e[27],_0xb71e[28],_0xb71e[29],_0xb71e[30]]}]})})[_0xb71e[22]](function(_0x594bx1e){if(!_0x594bx1e){return _0x594bx12[_0xb71e[50]](404)};return _0x594bx12[_0xb71e[20]](_0x594bx1e)})[_0xb71e[19]](function(_0x594bx14){console[_0xb71e[73]](_0x594bx14);return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[75]]= function(_0x594bx11,_0x594bx12){return ChatRoom[_0xb71e[36]](_0x594bx11[_0xb71e[49]][_0xb71e[25]],{include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0xb71e[25],_0xb71e[28],_0xb71e[27]]},{model:User,attributes:[_0xb71e[25],_0xb71e[28],_0xb71e[26],_0xb71e[27],_0xb71e[64],_0xb71e[29],_0xb71e[30]]}]},{model:User,attributes:[_0xb71e[25],_0xb71e[28],_0xb71e[26],_0xb71e[27],_0xb71e[64],_0xb71e[29],_0xb71e[30]]},{model:ChatVisitor},{model:ChatWebsite,attributes:[_0xb71e[25],_0xb71e[26],_0xb71e[76]],include:[List]}]})[_0xb71e[22]](function(_0x594bx23){if(!_0x594bx23){return _0x594bx12[_0xb71e[50]](404)};return _0x594bx12[_0xb71e[20]](_0x594bx23)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[77]]= function(_0x594bx11,_0x594bx12,_0x594bx13){var _0x594bx24;return ChatRoom[_0xb71e[87]]({where:{token:md5(JSON[_0xb71e[85]](_0x594bx11[_0xb71e[23]][_0xb71e[80]][_0xb71e[84]]())).toString(_0xb71e[83])},defaults:{type:_0xb71e[30],token:md5(JSON[_0xb71e[85]](_0x594bx11[_0xb71e[23]][_0xb71e[80]][_0xb71e[84]]())).toString(_0xb71e[83]),status:_0xb71e[86]},include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0xb71e[25],_0xb71e[28],_0xb71e[27]]},{model:User,attributes:[_0xb71e[25],_0xb71e[26],_0xb71e[27],_0xb71e[28],_0xb71e[29],_0xb71e[30]]}]},{model:User,attributes:[_0xb71e[25],_0xb71e[26],_0xb71e[27],_0xb71e[28],_0xb71e[29],_0xb71e[30]]}]})[_0xb71e[82]](function(_0x594bx23,_0x594bx26){_0x594bx24= _0x594bx23;if(_0x594bx26){return _0x594bx24[_0xb71e[81]](_0x594bx11[_0xb71e[23]][_0xb71e[80]])}})[_0xb71e[22]](function(){return _0x594bx24[_0xb71e[79]]()})[_0xb71e[22]](function(_0x594bx25){return _0x594bx12[_0xb71e[21]](200)[_0xb71e[20]](_[_0xb71e[31]](_0x594bx24[_0xb71e[78]],{Users:_0x594bx25}))})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[88]]= function(_0x594bx11,_0x594bx12,_0x594bx13){var _0x594bx24;return ChatRoom[_0xb71e[36]](_0x594bx11[_0xb71e[49]][_0xb71e[25]])[_0xb71e[22]](function(_0x594bx23){_0x594bx24= _0x594bx23;if(!_0x594bx24){return _0x594bx12[_0xb71e[50]](404)}})[_0xb71e[22]](function(){return ChatMessage[_0xb71e[90]](_[_0xb71e[31]](_0x594bx11[_0xb71e[46]],{type:_0x594bx24[_0xb71e[89]],ChatRoomId:_0x594bx11[_0xb71e[49]][_0xb71e[25]],UserId:_0x594bx11[_0xb71e[37]][_0xb71e[25]]}))})[_0xb71e[22]](function(_0x594bx27){return _0x594bx12[_0xb71e[21]](200)[_0xb71e[20]](_0x594bx27)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[91]]= function(_0x594bx11,_0x594bx12,_0x594bx13){return ChatRoom[_0xb71e[36]](_0x594bx11[_0xb71e[49]][_0xb71e[25]],{include:[{model:ChatMessage,include:[{model:ChatVisitor,attributes:[_0xb71e[25],_0xb71e[27]]},{model:User,attributes:[_0xb71e[25],_0xb71e[27]]}]}]})[_0xb71e[22]](function(_0x594bx23){var _0x594bx28=[];_0x594bx23[_0xb71e[96]][_0xb71e[95]](function(_0x594bx27){_0x594bx28[_0xb71e[57]]({name:_0x594bx27[_0xb71e[7]]?_0x594bx27[_0xb71e[7]][_0xb71e[27]]:_0x594bx27[_0xb71e[14]][_0xb71e[27]],text:_0x594bx27[_0xb71e[46]][_0xb71e[93]](/(\r\n|\n|\r)/gm,_0xb71e[92]),date:_0x594bx27[_0xb71e[94]]})});return _0x594bx12[_0xb71e[89]](_0xb71e[97])[_0xb71e[21]](200)[_0xb71e[20]](csv(_0x594bx28))})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[98]]= function(_0x594bx11,_0x594bx12){return User[_0xb71e[36]](_0x594bx11[_0xb71e[37]][_0xb71e[25]])[_0xb71e[22]](function(_0x594bx18){return _0x594bx18[_0xb71e[74]]({where:{type:_0x594bx11[_0xb71e[49]][_0xb71e[89]]},include:[{model:ChatVisitor,attributes:[_0xb71e[25],_0xb71e[27],_0xb71e[28]]}]})})[_0xb71e[22]](function(_0x594bx1e){if(!_0x594bx1e){return _0x594bx12[_0xb71e[50]](404)};return _0x594bx12[_0xb71e[20]](_0x594bx1e)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[99]]= function(_0x594bx11,_0x594bx12){return User[_0xb71e[36]](_0x594bx11[_0xb71e[37]][_0xb71e[25]])[_0xb71e[22]](function(_0x594bx18){return _0x594bx18[_0xb71e[74]]({include:[{model:ChatVisitor,attributes:[_0xb71e[25],_0xb71e[27],_0xb71e[28]]},{model:User,attributes:[_0xb71e[25],_0xb71e[26],_0xb71e[27],_0xb71e[28],_0xb71e[29],_0xb71e[30]]}]})})[_0xb71e[22]](function(_0x594bx1e){if(!_0x594bx1e){return _0x594bx12[_0xb71e[50]](404)};return _0x594bx12[_0xb71e[20]](_0x594bx1e)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[90]]= function(_0x594bx11,_0x594bx12){};exports[_0xb71e[51]]= function(_0x594bx11,_0x594bx12){if(_0x594bx11[_0xb71e[46]][_0xb71e[25]]){delete _0x594bx11[_0xb71e[46]][_0xb71e[25]]};return ChatRoom[_0xb71e[36]](_0x594bx11[_0xb71e[49]][_0xb71e[25]])[_0xb71e[22]](function(_0x594bx23){if(!_0x594bx23){return _0x594bx12[_0xb71e[50]](404)};return _0x594bx23[_0xb71e[51]](_0x594bx11[_0xb71e[46]])})[_0xb71e[22]](function(_0x594bx23){return _0x594bx12[_0xb71e[21]](200)[_0xb71e[20]](_0x594bx23)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[100]]= function(_0x594bx11,_0x594bx12){var _0x594bx24;if(_0x594bx11[_0xb71e[46]][_0xb71e[25]]){delete _0x594bx11[_0xb71e[46]][_0xb71e[25]]};return ChatRoom[_0xb71e[36]](_0x594bx11[_0xb71e[49]][_0xb71e[25]])[_0xb71e[22]](function(_0x594bx23){if(!_0x594bx23|| !_0x594bx11[_0xb71e[46]][_0xb71e[80]]){return _0x594bx12[_0xb71e[50]](404)};return _0x594bx23})[_0xb71e[22]](function(_0x594bx23){return _0x594bx23[_0xb71e[51]]({type:_0xb71e[62],token:md5(JSON[_0xb71e[85]](_0x594bx11[_0xb71e[46]][_0xb71e[80]][_0xb71e[84]]())).toString(_0xb71e[83])})})[_0xb71e[22]](function(_0x594bx23){_0x594bx24= _0x594bx23;return _0x594bx23[_0xb71e[81]](_0x594bx11[_0xb71e[46]][_0xb71e[80]][_0xb71e[84]](),{individualHooks:true})})[_0xb71e[22]](function(){return _0x594bx24[_0xb71e[79]]()})[_0xb71e[22]](function(_0x594bx25){_[_0xb71e[31]](_0x594bx24[_0xb71e[78]],{Users:_0x594bx25});return _0x594bx12[_0xb71e[21]](200)[_0xb71e[20]](_0x594bx24)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};exports[_0xb71e[101]]= function(_0x594bx11,_0x594bx12){return ChatRoom[_0xb71e[36]](_0x594bx11[_0xb71e[49]][_0xb71e[25]])[_0xb71e[22]](function(_0x594bx23){if(!_0x594bx23){return _0x594bx12[_0xb71e[50]](404)};return _0x594bx23[_0xb71e[101]]()})[_0xb71e[22]](function(){return _0x594bx12[_0xb71e[50]](204)})[_0xb71e[19]](function(_0x594bx14){return handleError(_0x594bx12,_0x594bx14)})};function handleError(_0x594bx12,_0x594bx14){console[_0xb71e[18]](_0x594bx14);return _0x594bx12[_0xb71e[21]](500)[_0xb71e[20]](_0x594bx14)} \ No newline at end of file diff --git a/server/api/chat_room/chat_room.events.js b/server/api/chat_room/chat_room.events.js index b842a41..86c4199 100644 --- a/server/api/chat_room/chat_room.events.js +++ b/server/api/chat_room/chat_room.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ChatRoom = require('../../models').ChatRoom; - -var ChatRoomEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ChatRoomEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ChatRoom.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ChatRoomEvents.emit(event + ':' + doc._id, doc); - ChatRoomEvents.emit(event, doc); - done(null); - } -} - -module.exports = ChatRoomEvents; +var _0x37bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x37bc[0];const EventEmitter=require(_0x37bc[1]);const ChatRoom=require(_0x37bc[3])[_0x37bc[2]];var ChatRoomEvents= new EventEmitter();ChatRoomEvents[_0x37bc[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x37bc[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x37bc[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x37bc[6]};for(var e in events){var event=events[e];ChatRoom[_0x37bc[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb780x8,_0xb780x9,_0xb780xa){ChatRoomEvents[_0x37bc[10]](event+ _0x37bc[8]+ _0xb780x8[_0x37bc[9]],_0xb780x8);ChatRoomEvents[_0x37bc[10]](event,_0xb780x8);_0xb780xa(null)}}module[_0x37bc[11]]= ChatRoomEvents \ No newline at end of file diff --git a/server/api/chat_room/chat_room.socket.js b/server/api/chat_room/chat_room.socket.js index 0f60e68..dfe942a 100644 --- a/server/api/chat_room/chat_room.socket.js +++ b/server/api/chat_room/chat_room.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ChatRoomEvents = require('./chat_room.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('chat_room:' + event, socket); - - ChatRoomEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ChatRoomEvents.removeListener(event, listener); - }; -} +var _0xecd1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xecd1[0];const ChatRoomEvents=require(_0xecd1[1]);var events=[_0xecd1[2],_0xecd1[3]];exports[_0xecd1[4]]= function(_0xa2eex3){for(var _0xa2eex4=0,_0xa2eex5=events[_0xecd1[5]];_0xa2eex4< _0xa2eex5;_0xa2eex4++){var _0xa2eex6=events[_0xa2eex4];var _0xa2eex7=createListener(_0xecd1[6]+ _0xa2eex6,_0xa2eex3);ChatRoomEvents[_0xecd1[7]](_0xa2eex6,_0xa2eex7);_0xa2eex3[_0xecd1[7]](_0xecd1[8],removeListener(_0xa2eex6,_0xa2eex7))}};function createListener(_0xa2eex6,_0xa2eex3){return function(_0xa2eex9){_0xa2eex3[_0xecd1[9]](_0xa2eex6,_0xa2eex9)}}function removeListener(_0xa2eex6,_0xa2eex7){return function(){ChatRoomEvents[_0xecd1[10]](_0xa2eex6,_0xa2eex7)}} \ No newline at end of file diff --git a/server/api/chat_room/index.js b/server/api/chat_room/index.js index 43f0a87..9940e99 100644 --- a/server/api/chat_room/index.js +++ b/server/api/chat_room/index.js @@ -1,32 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./chat_room.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.index); -router.get('/online', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getOnlineRoom); -router.get('/describe', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.describe); -router.get('/unmanaged', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.unmanaged); -router.get('/me', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'user', 'agent']), controller.me); -router.get('/groups', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getGroups); -router.get('/externals', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getExternals); -router.get('/agents', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getAgents); -router.get('/agents/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getAgent); -router.get('/users', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getRoomByUsers); -// router.get('/groups', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getRoomGroups); -router.get('/type/:type', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getRoomByType); -router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.show); -router.get('/:id/export', license.isValidDate(), license.hasChat(), controller.export); -router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.create); -router.post('/:id/messages', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.createMessage); -router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.updatePatch); -router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.update); -router.put('/:id/users', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.updateUsers); -router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.destroy); - -module.exports = router; +var _0x9697=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x6F\x6E\x6C\x69\x6E\x65","\x67\x65\x74\x4F\x6E\x6C\x69\x6E\x65\x52\x6F\x6F\x6D","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x2F\x6D\x65","\x75\x73\x65\x72","\x6D\x65","\x2F\x67\x72\x6F\x75\x70\x73","\x67\x65\x74\x47\x72\x6F\x75\x70\x73","\x2F\x65\x78\x74\x65\x72\x6E\x61\x6C\x73","\x67\x65\x74\x45\x78\x74\x65\x72\x6E\x61\x6C\x73","\x2F\x61\x67\x65\x6E\x74\x73","\x67\x65\x74\x41\x67\x65\x6E\x74\x73","\x2F\x61\x67\x65\x6E\x74\x73\x2F\x3A\x69\x64","\x67\x65\x74\x41\x67\x65\x6E\x74","\x2F\x75\x73\x65\x72\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x55\x73\x65\x72\x73","\x2F\x74\x79\x70\x65\x2F\x3A\x74\x79\x70\x65","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x54\x79\x70\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x65\x78\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x70\x61\x74\x63\x68","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x75\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9697[0];var express=require(_0x9697[1]);var controller=require(_0x9697[2]);var auth=require(_0x9697[3]);var license=require(_0x9697[4]);var router=express.Router();router[_0x9697[13]](_0x9697[5],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[12]]);router[_0x9697[13]](_0x9697[14],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[15]]);router[_0x9697[13]](_0x9697[16],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9]]),controller[_0x9697[17]]);router[_0x9697[13]](_0x9697[18],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9]]),controller[_0x9697[19]]);router[_0x9697[13]](_0x9697[20],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[21],_0x9697[10]]),controller[_0x9697[22]]);router[_0x9697[13]](_0x9697[23],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[24]]);router[_0x9697[13]](_0x9697[25],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[26]]);router[_0x9697[13]](_0x9697[27],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[28]]);router[_0x9697[13]](_0x9697[29],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[30]]);router[_0x9697[13]](_0x9697[31],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[32]]);router[_0x9697[13]](_0x9697[33],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[34]]);router[_0x9697[13]](_0x9697[35],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[36]]);router[_0x9697[13]](_0x9697[37],license[_0x9697[6]](),license[_0x9697[7]](),controller[_0x9697[38]]);router[_0x9697[40]](_0x9697[5],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[39]]);router[_0x9697[40]](_0x9697[41],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[42]]);router[_0x9697[44]](_0x9697[35],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[43]]);router[_0x9697[46]](_0x9697[35],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[45]]);router[_0x9697[46]](_0x9697[47],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[48]]);router[_0x9697[50]](_0x9697[35],license[_0x9697[6]](),license[_0x9697[7]](),auth[_0x9697[8]](),auth[_0x9697[11]]([8],[_0x9697[9],_0x9697[10]]),controller[_0x9697[49]]);module[_0x9697[51]]= router \ No newline at end of file diff --git a/server/api/chat_visitor/chat_visitor.controller.js b/server/api/chat_visitor/chat_visitor.controller.js index 38e5d14..57445b7 100644 --- a/server/api/chat_visitor/chat_visitor.controller.js +++ b/server/api/chat_visitor/chat_visitor.controller.js @@ -1,104 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var ChatVisitor = require('../../models').ChatVisitor; -var ChatEnquiry = require('../../models').ChatEnquiry; -var ChatWebsite = require('../../models').ChatWebsite; - -// Get list of agents -exports.index = function(req, res, next) { - return ChatVisitor - .findAndCountAll(_.merge(Util.getQuery(req.query), { - include: [{ - model: ChatWebsite - }] - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; - -// Get a single chatVisitor -exports.show = function(req, res) { - return ChatVisitor - .findById(req.params.id, { - include: [{ - model: ChatEnquiry - }, { - model: ChatWebsite - }] - }) - .then(function(chatVisitor) { - if (!chatVisitor) { - return res.sendStatus(404); - } - return res.send(chatVisitor); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new chatVisitor in the DB. -exports.create = function(req, res) { - return ChatVisitor - .create(req.body) - .then(function(chatVisitor) { - return res.status(201).send(chatVisitor); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing chatVisitor in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ChatVisitor - .findById(req.params.id) - .then(function(chatVisitor) { - if (!chatVisitor) { - return res.sendStatus(404); - } - var updated = _.merge(chatVisitor, req.body); - return updated - .save(); - }) - .then(function(chatVisitor) { - return res.status(200).send(chatVisitor); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a chatVisitor from the DB. -exports.destroy = function(req, res) { - return ChatVisitor - .findById(req.params.id) - .then(function(chatVisitor) { - if (!chatVisitor) { - return res.sendStatus(404); - } - return chatVisitor - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x4950=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x69\x6E\x64\x65\x78","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x4950[0];var _=require(_0x4950[1]);var Util=require(_0x4950[2]);var ChatVisitor=require(_0x4950[4])[_0x4950[3]];var ChatEnquiry=require(_0x4950[4])[_0x4950[5]];var ChatWebsite=require(_0x4950[4])[_0x4950[6]];exports[_0x4950[7]]= function(_0x99b0x6,_0x99b0x7,_0x99b0x8){return ChatVisitor[_0x4950[16]](_[_0x4950[15]](Util[_0x4950[14]](_0x99b0x6[_0x4950[13]]),{include:[{model:ChatWebsite}]}))[_0x4950[12]](function(_0x99b0xa){_0x99b0x7[_0x4950[11]](200)[_0x4950[10]](_0x99b0xa)})[_0x4950[9]](function(_0x99b0x9){console[_0x4950[8]](_0x99b0x9);return handleError(_0x99b0x7,_0x99b0x9)})};exports[_0x4950[17]]= function(_0x99b0x6,_0x99b0x7){return ChatVisitor[_0x4950[21]](_0x99b0x6[_0x4950[20]][_0x4950[19]],{include:[{model:ChatEnquiry},{model:ChatWebsite}]})[_0x4950[12]](function(_0x99b0xb){if(!_0x99b0xb){return _0x99b0x7[_0x4950[18]](404)};return _0x99b0x7[_0x4950[10]](_0x99b0xb)})[_0x4950[9]](function(_0x99b0x9){return handleError(_0x99b0x7,_0x99b0x9)})};exports[_0x4950[22]]= function(_0x99b0x6,_0x99b0x7){return ChatVisitor[_0x4950[22]](_0x99b0x6[_0x4950[23]])[_0x4950[12]](function(_0x99b0xb){return _0x99b0x7[_0x4950[11]](201)[_0x4950[10]](_0x99b0xb)})[_0x4950[9]](function(_0x99b0x9){return handleError(_0x99b0x7,_0x99b0x9)})};exports[_0x4950[24]]= function(_0x99b0x6,_0x99b0x7){if(_0x99b0x6[_0x4950[23]][_0x4950[19]]){delete _0x99b0x6[_0x4950[23]][_0x4950[19]]};return ChatVisitor[_0x4950[21]](_0x99b0x6[_0x4950[20]][_0x4950[19]])[_0x4950[12]](function(_0x99b0xb){if(!_0x99b0xb){return _0x99b0x7[_0x4950[18]](404)};var _0x99b0xc=_[_0x4950[15]](_0x99b0xb,_0x99b0x6[_0x4950[23]]);return _0x99b0xc[_0x4950[25]]()})[_0x4950[12]](function(_0x99b0xb){return _0x99b0x7[_0x4950[11]](200)[_0x4950[10]](_0x99b0xb)})[_0x4950[9]](function(_0x99b0x9){return handleError(_0x99b0x7,_0x99b0x9)})};exports[_0x4950[26]]= function(_0x99b0x6,_0x99b0x7){return ChatVisitor[_0x4950[21]](_0x99b0x6[_0x4950[20]][_0x4950[19]])[_0x4950[12]](function(_0x99b0xb){if(!_0x99b0xb){return _0x99b0x7[_0x4950[18]](404)};return _0x99b0xb[_0x4950[26]]()})[_0x4950[12]](function(){return _0x99b0x7[_0x4950[18]](204)})[_0x4950[9]](function(_0x99b0x9){return handleError(_0x99b0x7,_0x99b0x9)})};function handleError(_0x99b0x7,_0x99b0x9){return _0x99b0x7[_0x4950[11]](500)[_0x4950[10]](_0x99b0x9)} \ No newline at end of file diff --git a/server/api/chat_visitor/chat_visitor.events.js b/server/api/chat_visitor/chat_visitor.events.js index d4c36db..d3a8ba0 100644 --- a/server/api/chat_visitor/chat_visitor.events.js +++ b/server/api/chat_visitor/chat_visitor.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ChatVisitor = require('../../models').ChatVisitor; - -var ChatVisitorEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ChatVisitorEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ChatVisitor.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ChatVisitorEvents.emit(event + ':' + doc._id, doc); - ChatVisitorEvents.emit(event, doc); - done(null); - } -} - -module.exports = ChatVisitorEvents; +var _0x7dd5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7dd5[0];const EventEmitter=require(_0x7dd5[1]);const ChatVisitor=require(_0x7dd5[3])[_0x7dd5[2]];var ChatVisitorEvents= new EventEmitter();ChatVisitorEvents[_0x7dd5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7dd5[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7dd5[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7dd5[6]};for(var e in events){var event=events[e];ChatVisitor[_0x7dd5[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x580dx8,_0x580dx9,_0x580dxa){ChatVisitorEvents[_0x7dd5[10]](event+ _0x7dd5[8]+ _0x580dx8[_0x7dd5[9]],_0x580dx8);ChatVisitorEvents[_0x7dd5[10]](event,_0x580dx8);_0x580dxa(null)}}module[_0x7dd5[11]]= ChatVisitorEvents \ No newline at end of file diff --git a/server/api/chat_visitor/chat_visitor.socket.js b/server/api/chat_visitor/chat_visitor.socket.js index 3a627b1..1366a65 100644 --- a/server/api/chat_visitor/chat_visitor.socket.js +++ b/server/api/chat_visitor/chat_visitor.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ChatVisitorEvents = require('./chat_visitor.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('chat_visitor:' + event, socket); - - ChatVisitorEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ChatVisitorEvents.removeListener(event, listener); - }; -} +var _0x75db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x75db[0];const ChatVisitorEvents=require(_0x75db[1]);var events=[_0x75db[2],_0x75db[3]];exports[_0x75db[4]]= function(_0x207dx3){for(var _0x207dx4=0,_0x207dx5=events[_0x75db[5]];_0x207dx4< _0x207dx5;_0x207dx4++){var _0x207dx6=events[_0x207dx4];var _0x207dx7=createListener(_0x75db[6]+ _0x207dx6,_0x207dx3);ChatVisitorEvents[_0x75db[7]](_0x207dx6,_0x207dx7);_0x207dx3[_0x75db[7]](_0x75db[8],removeListener(_0x207dx6,_0x207dx7))}};function createListener(_0x207dx6,_0x207dx3){return function(_0x207dx9){_0x207dx3[_0x75db[9]](_0x207dx6,_0x207dx9)}}function removeListener(_0x207dx6,_0x207dx7){return function(){ChatVisitorEvents[_0x75db[10]](_0x207dx6,_0x207dx7)}} \ No newline at end of file diff --git a/server/api/chat_visitor/index.js b/server/api/chat_visitor/index.js index 829db71..2d3f544 100644 --- a/server/api/chat_visitor/index.js +++ b/server/api/chat_visitor/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./chat_visitor.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show); -router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create); -router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy); - -module.exports = router; +var _0x8b21=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8b21[0];var express=require(_0x8b21[1]);var controller=require(_0x8b21[2]);var auth=require(_0x8b21[3]);var license=require(_0x8b21[4]);var router=express.Router();router[_0x8b21[12]](_0x8b21[5],license[_0x8b21[6]](),license[_0x8b21[7]](),auth[_0x8b21[8]](),auth[_0x8b21[10]]([8],[_0x8b21[9]]),controller[_0x8b21[11]]);router[_0x8b21[12]](_0x8b21[13],license[_0x8b21[6]](),license[_0x8b21[7]](),auth[_0x8b21[8]](),auth[_0x8b21[10]]([8],[_0x8b21[9]]),controller[_0x8b21[14]]);router[_0x8b21[16]](_0x8b21[5],license[_0x8b21[6]](),license[_0x8b21[7]](),auth[_0x8b21[8]](),auth[_0x8b21[10]]([8],[_0x8b21[9]]),controller[_0x8b21[15]]);router[_0x8b21[18]](_0x8b21[13],license[_0x8b21[6]](),license[_0x8b21[7]](),auth[_0x8b21[8]](),auth[_0x8b21[10]]([8],[_0x8b21[9]]),controller[_0x8b21[17]]);router[_0x8b21[20]](_0x8b21[13],license[_0x8b21[6]](),license[_0x8b21[7]](),auth[_0x8b21[8]](),auth[_0x8b21[10]]([8],[_0x8b21[9]]),controller[_0x8b21[19]]);module[_0x8b21[21]]= router \ No newline at end of file diff --git a/server/api/chat_website/chat_website.controller.js b/server/api/chat_website/chat_website.controller.js index 2543fd9..cb644d8 100644 --- a/server/api/chat_website/chat_website.controller.js +++ b/server/api/chat_website/chat_website.controller.js @@ -1,579 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var Mustache = require('mustache'); -var Util = require('../../config/util'); - -var sequelize = require('../../models').sequelize; -var ChatWebsite = require('../../models').ChatWebsite; -var ChatQueue = require('../../models').ChatQueue; -var User = require('../../models').User; -var Interval = require('../../models').Interval; -var ChatApplication = require('../../models').ChatApplication; -var ChatWebsitesField = require('../../models').ChatWebsitesField; -var ChatProactiveAction = require('../../models').ChatProactiveAction; -var ChatDisposition = require('../../models').ChatDisposition; -var snippet = require('../../components/xchatty').snippet; -var UploadFile = require('upload-file'); -var path = require('path'); -var sr = require('simple-random'); -var config = require('../../config/environment'); - - -// Get list of agents -exports.index = function(req, res, next) { - return ChatWebsite - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Get a single chat_website -exports.show = function(req, res) { - return ChatWebsite - .findById(req.params.id) - .then(function(chat_website) { - if (!chat_website) { - return res.sendStatus(404); - } - return res.send(chat_website); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -exports.changeLogo = function(req, res) { - - var upload = new UploadFile({ - dest: path.join(config.root, 'server', 'files', 'images'), - maxNumberOfFiles: 1, - minNumberOfFiles: 0, - acceptFileTypes: /(\.|\/)(jpeg|png)$/i, - rename: function(name, file) { - return sr() + path.extname(file.filename); - }, - messages: { - maxNumberOfFiles: "Max number of files upload exceeded", - acceptFileTypes: "Only jpeg and png format accepted", - invalidRequest: "Invalid request" - } - }); - - upload.on('end', function(fields, files) { - if (!files.file.filename) { - return res.status(500).send(upload); - } - return sequelize.transaction(function(t) { - return ChatWebsite - .findById(req.params.id) - .then(function(website) { - if (!website) { - return res.sendStatus(404); - } - var body = {}; - body.logo = files.file.filename; - return website - .update(body, { - transaction: t - }); - }) - .then(function(user) { - return res.status(200).send(user); - }) - }) - .catch(function(err) { - return handleError(res, err); - }); - }); - - upload.on('error', function(err) { - console.log('********** Upload error :', err) - return handleError(res, err); - }); - - upload.parse(req); -} - -exports.getDispositions = function(req, res, next) { - return ChatWebsite - .findById(req.params.id) - .then(function(chat_website) { - if (!chat_website) { - return res.sendStatus(404); - } - - return chat_website - .getChatDispositions(); - }) - .then(function(chatDispositions) { - return res.status(200).send({ - rows: chatDispositions, - count: chatDispositions.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.createDisposition = function(req, res, next) { - req.body.ChatWebsiteId = req.params.id; - - return ChatDisposition - .create(req.body) - .then(function(chatDisposition) { - return res.status(201).send(chatDisposition); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.updateDisposition = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return ChatDisposition - .findById(req.params.dispId) - .then(function(chatDisposition) { - if (!chatDisposition) { - return res.sendStatus(404); - } - var updated = _.merge(chatDisposition, req.body); - return updated - .save(); - }) - .then(function(chat_website) { - return res.status(200).send(chat_website); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.destroyDisposition = function(req, res, next) { - return ChatDisposition - .findById(req.params.dispId) - .then(function(chatDiposition) { - if (!chatDiposition) { - return res.sendStatus(404); - } - - return chatDiposition - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showApplications = function(req, res, next) { - return ChatWebsite - // .scope('default') - .findById(req.params.id) - .then(function(chatWebsite) { - if (!chatWebsite) { - return res.sendStatus(404); - } - return chatWebsite - .getChatApplications(_.merge(Util.getQuery(req.query), { - include: [{ - model: ChatQueue, - attributes: ['id', 'name'] - }, { - model: User, - attributes: ['id', 'name'] - }, { - model: Interval, - attributes: ['id', 'name'] - }] - })); - }) - .then(function(chatApplications) { - return res.send({ - count: chatApplications.length, - rows: chatApplications - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.showProactiveActions = function(req, res, next) { - return ChatWebsite - .findById(req.params.id) - .then(function(chatWebsite) { - if (!chatWebsite) { - return res.sendStatus(404); - } - return chatWebsite - .getChatProactiveActions(Util.getQuery(req.query)); - }) - .then(function(chatProactiveActions) { - return res.send({ - count: chatProactiveActions.length, - rows: chatProactiveActions - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a snippet for chat_website -exports.getSnippetCode = function(req, res) { - return ChatWebsite - .findById(req.params.id) - .then(function(chat_website) { - var configSnippet = { - remote: chat_website.remote, - websiteId: req.params.id - }; - var html = Mustache.render(snippet, configSnippet); - return res.status(200).send({ - html: html - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new chat_website in the DB. -exports.create = function(req, res) { - return ChatWebsite - .create(req.body) - .then(function(chat_website) { - return res.status(201).send(chat_website); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Updates an existing chat_website in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return ChatWebsite - .findById(req.params.id) - .then(function(chat_website) { - if (!chat_website) { - return res.sendStatus(404); - } - - return chat_website - .update(req.body); - }) - .then(function(chat_website) { - return res.status(200).send(chat_website); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.updateApplications = function(req, res) { - - var priority = 0; - var apps = req.body; - - apps.forEach(function(app) { - delete app.id; - delete app.createdAt; - delete app.updatedAt; - - app.priority = ++priority; - }); - - return sequelize.transaction(function(t) { - return ChatApplication - .destroy({ - where: { - ChatWebsiteId: req.params.id - }, - individualHooks: true, - transaction: t - }).then(function() { - return ChatApplication - .bulkCreate(apps, { - individualHooks: true, - transaction: t - }); - }); - }).then(function(chatApplications) { - return res.status(200).send({ - count: chatApplications.length, - rows: chatApplications - }); - }).catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a chat_website from the DB. -exports.destroy = function(req, res) { - return ChatWebsite - .findById(req.params.id) - .then(function(chat_website) { - if (!chat_website) { - return res.sendStatus(404); - } - return chat_website - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return ChatWebsite - .destroy({ - where: { - id: req.query.websites - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a agent from the DB. -exports.bulkDestroyApplications = function(req, res) { - return ChatApplication - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a mailAccount from the DB. -exports.destroyApplication = function(req, res, next) { - return ChatApplication - .findById(req.params.appId) - .then(function(chatApplication) { - if (!chatApplication) { - return res.sendStatus(404); - } - - return chatApplication - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getForms = function(req, res) { - return ChatWebsitesField - .scope({ - method: [req.params.type, req.params.id] - }) - .findAll() - .then(function(data) { - return res.status(200).json(data); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.updateForms = function(req, res, next) { - return ChatWebsitesField - .destroy({ - where: req.params.type === 'online' ? { - OnlineId: req.params.id - } : { - OfflineId: req.params.id - } - }) - .then(function() { - _.forEach(req.body, function(value) { - if (req.params.type === 'online') { - value.OnlineId = req.params.id; - } else if (req.params.type === 'offline') { - value.OfflineId = req.params.id; - } - }); - return ChatWebsitesField.bulkCreate(req.body); - }) - .then(function(fields) { - res.status(201).json(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.bulkDestroyProactiveActions = function(req, res) { - return ChatProactiveAction - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.destroyProactiveAction = function(req, res, next) { - return ChatProactiveAction - .findById(req.params.pactionId) - .then(function(chatProactiveAction) { - if (!chatProactiveAction) { - return res.sendStatus(404); - } - return chatProactiveAction.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.createProactiveAction = function(req, res, next) { - return ChatWebsite - .findById(req.params.id) - .then(function(chatWebsite) { - if (!chatWebsite) { - return res.sendStatus(404); - } - req.body.ChatWebsiteId = chatWebsite.id; - return ChatProactiveAction.create(req.body); - }) - .then(function(chatProactiveAction) { - return res.status(201).send(chatProactiveAction); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.updateProactiveAction = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return ChatProactiveAction - .findById(req.params.pactionId) - .then(function(chatProactiveAction) { - if (!chatProactiveAction) { - return res.sendStatus(404); - } - - return chatProactiveAction - .update(req.body); - }) - .then(function(chatProactiveAction) { - return res.status(200).send(chatProactiveAction); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} - -exports.createApplication = function(req, res, next) { - return ChatApplication - .max('priority', { - where: { - ChatWebsiteId: req.params.id - } - }).then(function(max) { - // SET PRIORITY - req.body.priority = max ? ++max : 1; - req.body.ChatWebsiteId = req.params.id; - return ChatApplication - .create(req.body); - }) - .then(function(chatApplication) { - return res.status(201).send(chatApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.updateApplication = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ChatApplication.findById(req.params.appId) - .then(function(chatApplication) { - if (!chatApplication) { - return res.sendStatus(404); - } - - return chatApplication - .update(req.body); - }) - .then(function(chatApplication) { - return res.status(200).send(chatApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.showApplication = function(req, res) { - return ChatApplication - .findById(req.params.appId, { - include: [{ - all: true - }] - }) - .then(function(chatApplication) { - if (!chatApplication) { - return res.sendStatus(404); - } - return res.send(chatApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); -} +var _0xda52=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x75\x73\x74\x61\x63\x68\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x55\x73\x65\x72","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x73\x6E\x69\x70\x70\x65\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x78\x63\x68\x61\x74\x74\x79","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x70\x61\x74\x68","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x6A\x70\x65\x67\x20\x61\x6E\x64\x20\x70\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x6C\x6F\x67\x6F","\x75\x70\x64\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x6F\x6E","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x6C\x6F\x67","\x70\x61\x72\x73\x65","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x43\x68\x61\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x69\x73\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6E\x61\x6D\x65","\x67\x65\x74\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x67\x65\x74\x53\x6E\x69\x70\x70\x65\x74\x43\x6F\x64\x65","\x72\x65\x6D\x6F\x74\x65","\x72\x65\x6E\x64\x65\x72","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x77\x65\x62\x73\x69\x74\x65\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x64\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x67\x65\x74\x46\x6F\x72\x6D\x73","\x6A\x73\x6F\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x74\x79\x70\x65","\x73\x63\x6F\x70\x65","\x75\x70\x64\x61\x74\x65\x46\x6F\x72\x6D\x73","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x6E\x6C\x69\x6E\x65\x49\x64","\x6F\x66\x66\x6C\x69\x6E\x65","\x4F\x66\x66\x6C\x69\x6E\x65\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x70\x61\x63\x74\x69\x6F\x6E\x49\x64","\x63\x72\x65\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E"];_0xda52[0];var _=require(_0xda52[1]);var util=require(_0xda52[2]);var Mustache=require(_0xda52[3]);var Util=require(_0xda52[4]);var sequelize=require(_0xda52[6])[_0xda52[5]];var ChatWebsite=require(_0xda52[6])[_0xda52[7]];var ChatQueue=require(_0xda52[6])[_0xda52[8]];var User=require(_0xda52[6])[_0xda52[9]];var Interval=require(_0xda52[6])[_0xda52[10]];var ChatApplication=require(_0xda52[6])[_0xda52[11]];var ChatWebsitesField=require(_0xda52[6])[_0xda52[12]];var ChatProactiveAction=require(_0xda52[6])[_0xda52[13]];var ChatDisposition=require(_0xda52[6])[_0xda52[14]];var snippet=require(_0xda52[16])[_0xda52[15]];var UploadFile=require(_0xda52[17]);var path=require(_0xda52[18]);var sr=require(_0xda52[19]);var config=require(_0xda52[20]);exports[_0xda52[21]]= function(_0x2c25x13,_0x2c25x14,_0x2c25x15){return ChatWebsite[_0xda52[28]](Util[_0xda52[27]](_0x2c25x13[_0xda52[26]]))[_0xda52[25]](function(_0x2c25x17){_0x2c25x14[_0xda52[24]](200)[_0xda52[23]](_0x2c25x17)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[29]]= function(_0x2c25x13,_0x2c25x14){return ChatWebsite[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[31]])[_0xda52[25]](function(_0x2c25x18){if(!_0x2c25x18){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x14[_0xda52[23]](_0x2c25x18)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[34]]= function(_0x2c25x13,_0x2c25x14){var _0x2c25x19= new UploadFile({dest:path[_0xda52[39]](config[_0xda52[35]],_0xda52[36],_0xda52[37],_0xda52[38]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0x2c25x1a,_0x2c25x1b){return sr()+ path[_0xda52[41]](_0x2c25x1b[_0xda52[40]])},messages:{maxNumberOfFiles:_0xda52[42],acceptFileTypes:_0xda52[43],invalidRequest:_0xda52[44]}});_0x2c25x19[_0xda52[50]](_0xda52[45],function(_0x2c25x1c,_0x2c25x1d){if(!_0x2c25x1d[_0xda52[46]][_0xda52[40]]){return _0x2c25x14[_0xda52[24]](500)[_0xda52[23]](_0x2c25x19)};return sequelize[_0xda52[49]](function(_0x2c25x1e){return ChatWebsite[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[31]])[_0xda52[25]](function(_0x2c25x20){if(!_0x2c25x20){return _0x2c25x14[_0xda52[30]](404)};var _0x2c25x21={};_0x2c25x21[_0xda52[47]]= _0x2c25x1d[_0xda52[46]][_0xda52[40]];return _0x2c25x20[_0xda52[48]](_0x2c25x21,{transaction:_0x2c25x1e})})[_0xda52[25]](function(_0x2c25x1f){return _0x2c25x14[_0xda52[24]](200)[_0xda52[23]](_0x2c25x1f)})})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})});_0x2c25x19[_0xda52[50]](_0xda52[51],function(_0x2c25x16){console[_0xda52[53]](_0xda52[52],_0x2c25x16);return handleError(_0x2c25x14,_0x2c25x16)});_0x2c25x19[_0xda52[54]](_0x2c25x13)};exports[_0xda52[55]]= function(_0x2c25x13,_0x2c25x14,_0x2c25x15){return ChatWebsite[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[31]])[_0xda52[25]](function(_0x2c25x18){if(!_0x2c25x18){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x18[_0xda52[57]]()})[_0xda52[25]](function(_0x2c25x22){return _0x2c25x14[_0xda52[24]](200)[_0xda52[23]]({rows:_0x2c25x22,count:_0x2c25x22[_0xda52[56]]})})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[58]]= function(_0x2c25x13,_0x2c25x14,_0x2c25x15){_0x2c25x13[_0xda52[60]][_0xda52[59]]= _0x2c25x13[_0xda52[32]][_0xda52[31]];return ChatDisposition[_0xda52[61]](_0x2c25x13[_0xda52[60]])[_0xda52[25]](function(_0x2c25x23){return _0x2c25x14[_0xda52[24]](201)[_0xda52[23]](_0x2c25x23)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[62]]= function(_0x2c25x13,_0x2c25x14){if(_0x2c25x13[_0xda52[60]][_0xda52[31]]){delete _0x2c25x13[_0xda52[60]][_0xda52[31]]};return ChatDisposition[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[65]])[_0xda52[25]](function(_0x2c25x23){if(!_0x2c25x23){return _0x2c25x14[_0xda52[30]](404)};var _0x2c25x24=_[_0xda52[63]](_0x2c25x23,_0x2c25x13[_0xda52[60]]);return _0x2c25x24[_0xda52[64]]()})[_0xda52[25]](function(_0x2c25x18){return _0x2c25x14[_0xda52[24]](200)[_0xda52[23]](_0x2c25x18)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[66]]= function(_0x2c25x13,_0x2c25x14,_0x2c25x15){return ChatDisposition[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[65]])[_0xda52[25]](function(_0x2c25x25){if(!_0x2c25x25){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x25[_0xda52[67]]()})[_0xda52[25]](function(){return _0x2c25x14[_0xda52[30]](204)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[68]]= function(_0x2c25x13,_0x2c25x14,_0x2c25x15){return ChatWebsite[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[31]])[_0xda52[25]](function(_0x2c25x27){if(!_0x2c25x27){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x27[_0xda52[70]](_[_0xda52[63]](Util[_0xda52[27]](_0x2c25x13[_0xda52[26]]),{include:[{model:ChatQueue,attributes:[_0xda52[31],_0xda52[69]]},{model:User,attributes:[_0xda52[31],_0xda52[69]]},{model:Interval,attributes:[_0xda52[31],_0xda52[69]]}]}))})[_0xda52[25]](function(_0x2c25x26){return _0x2c25x14[_0xda52[23]]({count:_0x2c25x26[_0xda52[56]],rows:_0x2c25x26})})[_0xda52[22]](function(_0x2c25x16){console[_0xda52[53]](_0x2c25x16);return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[71]]= function(_0x2c25x13,_0x2c25x14,_0x2c25x15){return ChatWebsite[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[31]])[_0xda52[25]](function(_0x2c25x27){if(!_0x2c25x27){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x27[_0xda52[72]](Util[_0xda52[27]](_0x2c25x13[_0xda52[26]]))})[_0xda52[25]](function(_0x2c25x28){return _0x2c25x14[_0xda52[23]]({count:_0x2c25x28[_0xda52[56]],rows:_0x2c25x28})})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[73]]= function(_0x2c25x13,_0x2c25x14){return ChatWebsite[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[31]])[_0xda52[25]](function(_0x2c25x18){var _0x2c25x29={remote:_0x2c25x18[_0xda52[74]],websiteId:_0x2c25x13[_0xda52[32]][_0xda52[31]]};var _0x2c25x2a=Mustache[_0xda52[75]](snippet,_0x2c25x29);return _0x2c25x14[_0xda52[24]](200)[_0xda52[23]]({html:_0x2c25x2a})})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[61]]= function(_0x2c25x13,_0x2c25x14){return ChatWebsite[_0xda52[61]](_0x2c25x13[_0xda52[60]])[_0xda52[25]](function(_0x2c25x18){return _0x2c25x14[_0xda52[24]](201)[_0xda52[23]](_0x2c25x18)})[_0xda52[22]](function(_0x2c25x16){console[_0xda52[53]](_0x2c25x16);return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[48]]= function(_0x2c25x13,_0x2c25x14){if(_0x2c25x13[_0xda52[60]][_0xda52[31]]){delete _0x2c25x13[_0xda52[60]][_0xda52[31]]};return ChatWebsite[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[31]])[_0xda52[25]](function(_0x2c25x18){if(!_0x2c25x18){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x18[_0xda52[48]](_0x2c25x13[_0xda52[60]])})[_0xda52[25]](function(_0x2c25x18){return _0x2c25x14[_0xda52[24]](200)[_0xda52[23]](_0x2c25x18)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[76]]= function(_0x2c25x13,_0x2c25x14){var _0x2c25x2b=0;var _0x2c25x2c=_0x2c25x13[_0xda52[60]];_0x2c25x2c[_0xda52[80]](function(_0x2c25x2d){delete _0x2c25x2d[_0xda52[31]];delete _0x2c25x2d[_0xda52[77]];delete _0x2c25x2d[_0xda52[78]];_0x2c25x2d[_0xda52[79]]= ++_0x2c25x2b});return sequelize[_0xda52[49]](function(_0x2c25x1e){return ChatApplication[_0xda52[67]]({where:{ChatWebsiteId:_0x2c25x13[_0xda52[32]][_0xda52[31]]},individualHooks:true,transaction:_0x2c25x1e})[_0xda52[25]](function(){return ChatApplication[_0xda52[81]](_0x2c25x2c,{individualHooks:true,transaction:_0x2c25x1e})})})[_0xda52[25]](function(_0x2c25x26){return _0x2c25x14[_0xda52[24]](200)[_0xda52[23]]({count:_0x2c25x26[_0xda52[56]],rows:_0x2c25x26})})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[67]]= function(_0x2c25x13,_0x2c25x14){return ChatWebsite[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[31]])[_0xda52[25]](function(_0x2c25x18){if(!_0x2c25x18){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x18[_0xda52[67]]()})[_0xda52[25]](function(){return _0x2c25x14[_0xda52[30]](204)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[82]]= function(_0x2c25x13,_0x2c25x14){return ChatWebsite[_0xda52[67]]({where:{id:_0x2c25x13[_0xda52[26]][_0xda52[83]]},individualHooks:true})[_0xda52[25]](function(){return _0x2c25x14[_0xda52[30]](204)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[84]]= function(_0x2c25x13,_0x2c25x14){return ChatApplication[_0xda52[67]]({where:{id:_0x2c25x13[_0xda52[26]][_0xda52[85]]},individualHooks:true})[_0xda52[25]](function(){return _0x2c25x14[_0xda52[30]](204)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[86]]= function(_0x2c25x13,_0x2c25x14,_0x2c25x15){return ChatApplication[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[87]])[_0xda52[25]](function(_0x2c25x2e){if(!_0x2c25x2e){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x2e[_0xda52[67]]()})[_0xda52[25]](function(){return _0x2c25x14[_0xda52[30]](204)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[88]]= function(_0x2c25x13,_0x2c25x14){return ChatWebsitesField[_0xda52[92]]({method:[_0x2c25x13[_0xda52[32]][_0xda52[91]],_0x2c25x13[_0xda52[32]][_0xda52[31]]]})[_0xda52[90]]()[_0xda52[25]](function(_0x2c25x2f){return _0x2c25x14[_0xda52[24]](200)[_0xda52[89]](_0x2c25x2f)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[93]]= function(_0x2c25x13,_0x2c25x14,_0x2c25x15){return ChatWebsitesField[_0xda52[67]]({where:_0x2c25x13[_0xda52[32]][_0xda52[91]]=== _0xda52[94]?{OnlineId:_0x2c25x13[_0xda52[32]][_0xda52[31]]}:{OfflineId:_0x2c25x13[_0xda52[32]][_0xda52[31]]}})[_0xda52[25]](function(){_[_0xda52[80]](_0x2c25x13[_0xda52[60]],function(_0x2c25x30){if(_0x2c25x13[_0xda52[32]][_0xda52[91]]=== _0xda52[94]){_0x2c25x30[_0xda52[95]]= _0x2c25x13[_0xda52[32]][_0xda52[31]]}else {if(_0x2c25x13[_0xda52[32]][_0xda52[91]]=== _0xda52[96]){_0x2c25x30[_0xda52[97]]= _0x2c25x13[_0xda52[32]][_0xda52[31]]}}});return ChatWebsitesField[_0xda52[81]](_0x2c25x13[_0xda52[60]])})[_0xda52[25]](function(_0x2c25x1c){_0x2c25x14[_0xda52[24]](201)[_0xda52[89]](_0x2c25x1c)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[98]]= function(_0x2c25x13,_0x2c25x14){return ChatProactiveAction[_0xda52[67]]({where:{id:_0x2c25x13[_0xda52[26]][_0xda52[85]]},individualHooks:true})[_0xda52[25]](function(){return _0x2c25x14[_0xda52[30]](204)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[99]]= function(_0x2c25x13,_0x2c25x14,_0x2c25x15){return ChatProactiveAction[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[100]])[_0xda52[25]](function(_0x2c25x31){if(!_0x2c25x31){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x31[_0xda52[67]]()})[_0xda52[25]](function(){return _0x2c25x14[_0xda52[30]](204)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[101]]= function(_0x2c25x13,_0x2c25x14,_0x2c25x15){return ChatWebsite[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[31]])[_0xda52[25]](function(_0x2c25x27){if(!_0x2c25x27){return _0x2c25x14[_0xda52[30]](404)};_0x2c25x13[_0xda52[60]][_0xda52[59]]= _0x2c25x27[_0xda52[31]];return ChatProactiveAction[_0xda52[61]](_0x2c25x13[_0xda52[60]])})[_0xda52[25]](function(_0x2c25x31){return _0x2c25x14[_0xda52[24]](201)[_0xda52[23]](_0x2c25x31)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[102]]= function(_0x2c25x13,_0x2c25x14){if(_0x2c25x13[_0xda52[60]][_0xda52[31]]){delete _0x2c25x13[_0xda52[60]][_0xda52[31]]};return ChatProactiveAction[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[100]])[_0xda52[25]](function(_0x2c25x31){if(!_0x2c25x31){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x31[_0xda52[48]](_0x2c25x13[_0xda52[60]])})[_0xda52[25]](function(_0x2c25x31){return _0x2c25x14[_0xda52[24]](200)[_0xda52[23]](_0x2c25x31)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};function handleError(_0x2c25x14,_0x2c25x16){return _0x2c25x14[_0xda52[24]](500)[_0xda52[23]](_0x2c25x16)}exports[_0xda52[103]]= function(_0x2c25x13,_0x2c25x14,_0x2c25x15){return ChatApplication[_0xda52[104]](_0xda52[79],{where:{ChatWebsiteId:_0x2c25x13[_0xda52[32]][_0xda52[31]]}})[_0xda52[25]](function(_0x2c25x33){_0x2c25x13[_0xda52[60]][_0xda52[79]]= _0x2c25x33?++_0x2c25x33:1;_0x2c25x13[_0xda52[60]][_0xda52[59]]= _0x2c25x13[_0xda52[32]][_0xda52[31]];return ChatApplication[_0xda52[61]](_0x2c25x13[_0xda52[60]])})[_0xda52[25]](function(_0x2c25x2e){return _0x2c25x14[_0xda52[24]](201)[_0xda52[23]](_0x2c25x2e)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[105]]= function(_0x2c25x13,_0x2c25x14){if(_0x2c25x13[_0xda52[60]][_0xda52[31]]){delete _0x2c25x13[_0xda52[60]][_0xda52[31]]};return ChatApplication[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[87]])[_0xda52[25]](function(_0x2c25x2e){if(!_0x2c25x2e){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x2e[_0xda52[48]](_0x2c25x13[_0xda52[60]])})[_0xda52[25]](function(_0x2c25x2e){return _0x2c25x14[_0xda52[24]](200)[_0xda52[23]](_0x2c25x2e)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})};exports[_0xda52[106]]= function(_0x2c25x13,_0x2c25x14){return ChatApplication[_0xda52[33]](_0x2c25x13[_0xda52[32]][_0xda52[87]],{include:[{all:true}]})[_0xda52[25]](function(_0x2c25x2e){if(!_0x2c25x2e){return _0x2c25x14[_0xda52[30]](404)};return _0x2c25x14[_0xda52[23]](_0x2c25x2e)})[_0xda52[22]](function(_0x2c25x16){return handleError(_0x2c25x14,_0x2c25x16)})} \ No newline at end of file diff --git a/server/api/chat_website/chat_website.events.js b/server/api/chat_website/chat_website.events.js index f910de1..8ed58ad 100644 --- a/server/api/chat_website/chat_website.events.js +++ b/server/api/chat_website/chat_website.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ChatWebsite = require('../../models').ChatWebsite; - -var ChatWebsiteEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ChatWebsiteEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ChatWebsite.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ChatWebsiteEvents.emit(event + ':' + doc._id, doc); - ChatWebsiteEvents.emit(event, doc); - done(null); - } -} - -module.exports = ChatWebsiteEvents; +var _0x8b09=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8b09[0];const EventEmitter=require(_0x8b09[1]);const ChatWebsite=require(_0x8b09[3])[_0x8b09[2]];var ChatWebsiteEvents= new EventEmitter();ChatWebsiteEvents[_0x8b09[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8b09[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8b09[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8b09[6]};for(var e in events){var event=events[e];ChatWebsite[_0x8b09[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x61c1x8,_0x61c1x9,_0x61c1xa){ChatWebsiteEvents[_0x8b09[10]](event+ _0x8b09[8]+ _0x61c1x8[_0x8b09[9]],_0x61c1x8);ChatWebsiteEvents[_0x8b09[10]](event,_0x61c1x8);_0x61c1xa(null)}}module[_0x8b09[11]]= ChatWebsiteEvents \ No newline at end of file diff --git a/server/api/chat_website/chat_website.socket.js b/server/api/chat_website/chat_website.socket.js index 5200183..1a739d1 100644 --- a/server/api/chat_website/chat_website.socket.js +++ b/server/api/chat_website/chat_website.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ChatWebsiteEvents = require('./chat_website.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('chat_website:' + event, socket); - - ChatWebsiteEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ChatWebsiteEvents.removeListener(event, listener); - }; -} +var _0xdd79=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xdd79[0];const ChatWebsiteEvents=require(_0xdd79[1]);var events=[_0xdd79[2],_0xdd79[3]];exports[_0xdd79[4]]= function(_0xff66x3){for(var _0xff66x4=0,_0xff66x5=events[_0xdd79[5]];_0xff66x4< _0xff66x5;_0xff66x4++){var _0xff66x6=events[_0xff66x4];var _0xff66x7=createListener(_0xdd79[6]+ _0xff66x6,_0xff66x3);ChatWebsiteEvents[_0xdd79[7]](_0xff66x6,_0xff66x7);_0xff66x3[_0xdd79[7]](_0xdd79[8],removeListener(_0xff66x6,_0xff66x7))}};function createListener(_0xff66x6,_0xff66x3){return function(_0xff66x9){_0xff66x3[_0xdd79[9]](_0xff66x6,_0xff66x9)}}function removeListener(_0xff66x6,_0xff66x7){return function(){ChatWebsiteEvents[_0xdd79[10]](_0xff66x6,_0xff66x7)}} \ No newline at end of file diff --git a/server/api/chat_website/index.js b/server/api/chat_website/index.js index a197f8f..f83a5a5 100644 --- a/server/api/chat_website/index.js +++ b/server/api/chat_website/index.js @@ -1,40 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./chat_website.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.show); -router.get('/:id/applications', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.showApplications); -router.get('/:id/applications/:appId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.showApplication); -router.get('/:id/dispositions', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin', 'agent']), controller.getDispositions); -router.get('/:id/proactive', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.showProactiveActions); -router.get('/:id/fields/:type', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.getForms); -router.get('/:id/snippet', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.getSnippetCode); -router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create); -router.post('/:id/applications', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.createApplication); -router.post('/:id/dispositions', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.createDisposition); -router.post('/:id/proactive', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.createProactiveAction); -router.post('/:id/logo', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.changeLogo); -router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.put('/:id/applications', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.updateApplications); -router.put('/:id/applications/:appId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.updateApplication); -router.put('/:id/dispositions/:dispId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.updateDisposition); -router.put('/:id/proactive/:pactionId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.updateProactiveAction); -router.put('/:id/fields/:type', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.updateForms); -router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.delete('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.bulkDestroy); -router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy); -router.delete('/:id/applications', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.bulkDestroyApplications); -router.delete('/:id/proactive', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.bulkDestroyProactiveActions); -router.delete('/:id/applications/:appId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroyApplication); -router.delete('/:id/proactive/:pactionId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroyProactiveAction); -router.delete('/:id/dispositions/:dispId', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroyDisposition); - - -module.exports = router; +var _0xcc46=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65","\x73\x68\x6F\x77\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x74\x79\x70\x65","\x67\x65\x74\x46\x6F\x72\x6D\x73","\x2F\x3A\x69\x64\x2F\x73\x6E\x69\x70\x70\x65\x74","\x67\x65\x74\x53\x6E\x69\x70\x70\x65\x74\x43\x6F\x64\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67\x6F","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x6F","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x3A\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x2F\x3A\x70\x61\x63\x74\x69\x6F\x6E\x49\x64","\x75\x70\x64\x61\x74\x65\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x46\x6F\x72\x6D\x73","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0xcc46[0];var express=require(_0xcc46[1]);var controller=require(_0xcc46[2]);var auth=require(_0xcc46[3]);var license=require(_0xcc46[4]);var router=express.Router();router[_0xcc46[12]](_0xcc46[5],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[11]]);router[_0xcc46[12]](_0xcc46[13],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9],_0xcc46[14]]),controller[_0xcc46[15]]);router[_0xcc46[12]](_0xcc46[16],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[17]]);router[_0xcc46[12]](_0xcc46[18],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[19]]);router[_0xcc46[12]](_0xcc46[20],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9],_0xcc46[14]]),controller[_0xcc46[21]]);router[_0xcc46[12]](_0xcc46[22],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[23]]);router[_0xcc46[12]](_0xcc46[24],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[25]]);router[_0xcc46[12]](_0xcc46[26],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[27]]);router[_0xcc46[29]](_0xcc46[5],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[28]]);router[_0xcc46[29]](_0xcc46[16],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[30]]);router[_0xcc46[29]](_0xcc46[20],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[31]]);router[_0xcc46[29]](_0xcc46[22],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[32]]);router[_0xcc46[29]](_0xcc46[33],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[34]]);router[_0xcc46[36]](_0xcc46[13],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[35]]);router[_0xcc46[36]](_0xcc46[16],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[37]]);router[_0xcc46[36]](_0xcc46[18],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[38]]);router[_0xcc46[36]](_0xcc46[39],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[40]]);router[_0xcc46[36]](_0xcc46[41],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[42]]);router[_0xcc46[36]](_0xcc46[24],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[43]]);router[_0xcc46[44]](_0xcc46[13],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[35]]);router[_0xcc46[46]](_0xcc46[5],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[45]]);router[_0xcc46[46]](_0xcc46[13],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[47]]);router[_0xcc46[46]](_0xcc46[16],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[48]]);router[_0xcc46[46]](_0xcc46[22],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[49]]);router[_0xcc46[46]](_0xcc46[18],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[50]]);router[_0xcc46[46]](_0xcc46[41],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[51]]);router[_0xcc46[46]](_0xcc46[39],license[_0xcc46[6]](),license[_0xcc46[7]](),auth[_0xcc46[8]](),auth[_0xcc46[10]]([8],[_0xcc46[9]]),controller[_0xcc46[52]]);module[_0xcc46[53]]= router \ No newline at end of file diff --git a/server/api/chat_websites_field/chat_websites_field.controller.js b/server/api/chat_websites_field/chat_websites_field.controller.js index 78c9c47..65464c1 100644 --- a/server/api/chat_websites_field/chat_websites_field.controller.js +++ b/server/api/chat_websites_field/chat_websites_field.controller.js @@ -1,112 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/chat/websites/fields -> index - * POST /api/chat/websites/fields -> create - * GET /api/chat/websites/fields/:id -> show - * PUT /api/chat/websites/fields/:id -> update - * DELETE /api/chat/websites/fields/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var ChatWebsitesField = require('../../models').ChatWebsitesField; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 204; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of ChatWebsitesFields -exports.index = function(req, res) { - return ChatWebsitesField.findAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single ChatWebsitesField from the DB -exports.show = function(req, res) { - return ChatWebsitesField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new ChatWebsitesField in the DB -exports.create = function(req, res) { - return ChatWebsitesField.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing ChatWebsitesField in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ChatWebsitesField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a ChatWebsitesField from the DB -exports.destroy = function(req, res) { - return ChatWebsitesField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0x4aee=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x4aee[0];var _=require(_0x4aee[1]);var Util=require(_0x4aee[2]);var ChatWebsitesField=require(_0x4aee[4])[_0x4aee[3]];function handleError(_0xf68dx5,_0xf68dx6){_0xf68dx6= _0xf68dx6|| 500;return function(_0xf68dx7){_0xf68dx5[_0x4aee[6]](_0xf68dx6)[_0x4aee[5]](_0xf68dx7)}}function responseWithResult(_0xf68dx5,_0xf68dx6){_0xf68dx6= _0xf68dx6|| 200;return function(_0xf68dx9){if(_0xf68dx9){_0xf68dx5[_0x4aee[6]](_0xf68dx6)[_0x4aee[7]](_0xf68dx9)}}}function responseWithoutResult(_0xf68dx5,_0xf68dx6){_0xf68dx6= _0xf68dx6|| 204;return function(){_0xf68dx5[_0x4aee[8]](_0xf68dx6)}}function handleEntityNotFound(_0xf68dx5){return function(_0xf68dx9){if(!_0xf68dx9){_0xf68dx5[_0x4aee[6]](404)[_0x4aee[9]]();return null};return _0xf68dx9}}function saveUpdates(_0xf68dxd){return function(_0xf68dx9){return _0xf68dx9[_0x4aee[11]](_0xf68dxd)[_0x4aee[10]](function(_0xf68dxe){return _0xf68dxe})}}function removeEntity(_0xf68dx5){return function(_0xf68dx9){if(_0xf68dx9){return _0xf68dx9[_0x4aee[12]]()[_0x4aee[10]](function(){_0xf68dx5[_0x4aee[6]](204)[_0x4aee[9]]()})}}}exports[_0x4aee[13]]= function(_0xf68dx10,_0xf68dx5){return ChatWebsitesField[_0x4aee[17]](Util[_0x4aee[16]](_0xf68dx10[_0x4aee[15]]))[_0x4aee[10]](responseWithResult(_0xf68dx5))[_0x4aee[14]](handleError(_0xf68dx5))};exports[_0x4aee[18]]= function(_0xf68dx10,_0xf68dx5){return ChatWebsitesField[_0x4aee[21]](_0xf68dx10[_0x4aee[20]][_0x4aee[19]])[_0x4aee[10]](handleEntityNotFound(_0xf68dx5))[_0x4aee[10]](responseWithResult(_0xf68dx5))[_0x4aee[14]](handleError(_0xf68dx5))};exports[_0x4aee[22]]= function(_0xf68dx10,_0xf68dx5){return ChatWebsitesField[_0x4aee[22]](_0xf68dx10[_0x4aee[23]])[_0x4aee[10]](responseWithResult(_0xf68dx5,201))[_0x4aee[14]](handleError(_0xf68dx5))};exports[_0x4aee[24]]= function(_0xf68dx10,_0xf68dx5){if(_0xf68dx10[_0x4aee[23]][_0x4aee[19]]){delete _0xf68dx10[_0x4aee[23]][_0x4aee[19]]};return ChatWebsitesField[_0x4aee[21]](_0xf68dx10[_0x4aee[20]][_0x4aee[19]])[_0x4aee[10]](handleEntityNotFound(_0xf68dx5))[_0x4aee[10]](saveUpdates(_0xf68dx10[_0x4aee[23]]))[_0x4aee[10]](responseWithResult(_0xf68dx5))[_0x4aee[14]](handleError(_0xf68dx5))};exports[_0x4aee[12]]= function(_0xf68dx10,_0xf68dx5){return ChatWebsitesField[_0x4aee[21]](_0xf68dx10[_0x4aee[20]][_0x4aee[19]])[_0x4aee[10]](handleEntityNotFound(_0xf68dx5))[_0x4aee[10]](removeEntity(_0xf68dx5))[_0x4aee[14]](handleError(_0xf68dx5))} \ No newline at end of file diff --git a/server/api/chat_websites_field/chat_websites_field.events.js b/server/api/chat_websites_field/chat_websites_field.events.js index 44c852c..d9fde6a 100644 --- a/server/api/chat_websites_field/chat_websites_field.events.js +++ b/server/api/chat_websites_field/chat_websites_field.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ChatWebsitesField = require('../../models').ChatWebsitesField; - -var ChatWebsitesFieldEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ChatWebsitesFieldEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ChatWebsitesField.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ChatWebsitesFieldEvents.emit(event + ':' + doc._id, doc); - ChatWebsitesFieldEvents.emit(event, doc); - done(null); - } -} - -module.exports = ChatWebsitesFieldEvents; +var _0xdcbc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdcbc[0];const EventEmitter=require(_0xdcbc[1]);const ChatWebsitesField=require(_0xdcbc[3])[_0xdcbc[2]];var ChatWebsitesFieldEvents= new EventEmitter();ChatWebsitesFieldEvents[_0xdcbc[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdcbc[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdcbc[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdcbc[6]};for(var e in events){var event=events[e];ChatWebsitesField[_0xdcbc[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x2936x8,_0x2936x9,_0x2936xa){ChatWebsitesFieldEvents[_0xdcbc[10]](event+ _0xdcbc[8]+ _0x2936x8[_0xdcbc[9]],_0x2936x8);ChatWebsitesFieldEvents[_0xdcbc[10]](event,_0x2936x8);_0x2936xa(null)}}module[_0xdcbc[11]]= ChatWebsitesFieldEvents \ No newline at end of file diff --git a/server/api/chat_websites_field/chat_websites_field.socket.js b/server/api/chat_websites_field/chat_websites_field.socket.js index 8232b06..076ae36 100644 --- a/server/api/chat_websites_field/chat_websites_field.socket.js +++ b/server/api/chat_websites_field/chat_websites_field.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ChatWebsitesFieldEvents = require('./chat_websites_field.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('chat_websites_field:' + event, socket); - - ChatWebsitesFieldEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ChatWebsitesFieldEvents.removeListener(event, listener); - }; -} +var _0xfa0b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xfa0b[0];const ChatWebsitesFieldEvents=require(_0xfa0b[1]);var events=[_0xfa0b[2],_0xfa0b[3]];exports[_0xfa0b[4]]= function(_0x48a2x3){for(var _0x48a2x4=0,_0x48a2x5=events[_0xfa0b[5]];_0x48a2x4< _0x48a2x5;_0x48a2x4++){var _0x48a2x6=events[_0x48a2x4];var _0x48a2x7=createListener(_0xfa0b[6]+ _0x48a2x6,_0x48a2x3);ChatWebsitesFieldEvents[_0xfa0b[7]](_0x48a2x6,_0x48a2x7);_0x48a2x3[_0xfa0b[7]](_0xfa0b[8],removeListener(_0x48a2x6,_0x48a2x7))}};function createListener(_0x48a2x6,_0x48a2x3){return function(_0x48a2x9){_0x48a2x3[_0xfa0b[9]](_0x48a2x6,_0x48a2x9)}}function removeListener(_0x48a2x6,_0x48a2x7){return function(){ChatWebsitesFieldEvents[_0xfa0b[10]](_0x48a2x6,_0x48a2x7)}} \ No newline at end of file diff --git a/server/api/chat_websites_field/index.js b/server/api/chat_websites_field/index.js index c525bbb..bf0eddc 100644 --- a/server/api/chat_websites_field/index.js +++ b/server/api/chat_websites_field/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); - -var auth = require('../../auth/auth.service'); -var controller = require('./chat_websites_field.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.show); -router.post('/', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.create); -router.put('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.patch('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasChat(), auth.isAuthenticated(), auth.hasModule([8], ['admin']), controller.destroy); - -module.exports = router; +var _0xbdb9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbdb9[0];var express=require(_0xbdb9[1]);var auth=require(_0xbdb9[2]);var controller=require(_0xbdb9[3]);var license=require(_0xbdb9[4]);var router=express.Router();router[_0xbdb9[12]](_0xbdb9[5],license[_0xbdb9[6]](),license[_0xbdb9[7]](),auth[_0xbdb9[8]](),auth[_0xbdb9[10]]([8],[_0xbdb9[9]]),controller[_0xbdb9[11]]);router[_0xbdb9[12]](_0xbdb9[13],license[_0xbdb9[6]](),license[_0xbdb9[7]](),auth[_0xbdb9[8]](),auth[_0xbdb9[10]]([8],[_0xbdb9[9]]),controller[_0xbdb9[14]]);router[_0xbdb9[16]](_0xbdb9[5],license[_0xbdb9[6]](),license[_0xbdb9[7]](),auth[_0xbdb9[8]](),auth[_0xbdb9[10]]([8],[_0xbdb9[9]]),controller[_0xbdb9[15]]);router[_0xbdb9[18]](_0xbdb9[13],license[_0xbdb9[6]](),license[_0xbdb9[7]](),auth[_0xbdb9[8]](),auth[_0xbdb9[10]]([8],[_0xbdb9[9]]),controller[_0xbdb9[17]]);router[_0xbdb9[19]](_0xbdb9[13],license[_0xbdb9[6]](),license[_0xbdb9[7]](),auth[_0xbdb9[8]](),auth[_0xbdb9[10]]([8],[_0xbdb9[9]]),controller[_0xbdb9[17]]);router[_0xbdb9[21]](_0xbdb9[13],license[_0xbdb9[6]](),license[_0xbdb9[7]](),auth[_0xbdb9[8]](),auth[_0xbdb9[10]]([8],[_0xbdb9[9]]),controller[_0xbdb9[20]]);module[_0xbdb9[22]]= router \ No newline at end of file diff --git a/server/api/company/company.controller.js b/server/api/company/company.controller.js index a20f981..a07d848 100644 --- a/server/api/company/company.controller.js +++ b/server/api/company/company.controller.js @@ -1,146 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Company = require('../../models').Company; -var util = require('util'); -var Util = require('../../config/util'); - -// Get list of companies -exports.index = function(req, res, next) { - return Company - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.companyValidation = function(req, res) { - return Company - .findAll({ - where: { - name: req.body.name - } - }) - .then(function(companies) { - if (!companies) { - return res.sendStatus(404); - } - return res.send(companies); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single company -exports.show = function(req, res) { - return Company - .findById(req.params.id) - .then(function(company) { - if (!company) { - return res.sendStatus(404); - } - return res.send(company); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new company in the DB. -exports.create = function(req, res) { - return Company - .create(req.body) - .then(function(company) { - return res.status(201).send(company); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing company in the DB. -exports.update = function(req, res) { - return Company - .findAll({ - where: { - name: req.body.name, - id: { - $ne: req.body.id - } - } - }) - .then(function(companies) { - if (!companies) { - return res.sendStatus(404); - } - if (companies.length > 0) { - return res.status(500).send({ - message: 'MESSAGE_EXIST_COMPANY' - }) - } - if (req.body.id) { - delete req.body.id; - } - return Company - .find({ - where: { - id: req.params.id - } - }); - }) - .then(function(company) { - if (!company) { - return res.sendStatus(404); - } - var updated = _.merge(company, req.body); - return updated.save(); - }) - .then(function(company) { - return res.status(200).send(company); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a company from the DB. -exports.destroy = function(req, res) { - return Company - .findById(req.params.id) - .then(function(company) { - if (!company) { - return res.sendStatus(404); - } - return company.destroy() - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroy = function(req, res) { - return Company - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x4390=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x43\x6F\x6D\x70\x61\x6E\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x6F\x6D\x70\x61\x6E\x79\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6E\x61\x6D\x65","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6C\x65\x6E\x67\x74\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x43\x4F\x4D\x50\x41\x4E\x59","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x4390[0];var _=require(_0x4390[1]);var Company=require(_0x4390[3])[_0x4390[2]];var util=require(_0x4390[4]);var Util=require(_0x4390[5]);exports[_0x4390[6]]= function(_0xfd2fx5,_0xfd2fx6,_0xfd2fx7){return Company[_0x4390[13]](Util[_0x4390[12]](_0xfd2fx5[_0x4390[11]]))[_0x4390[10]](function(_0xfd2fx9){_0xfd2fx6[_0x4390[9]](200)[_0x4390[8]](_0xfd2fx9)})[_0x4390[7]](function(_0xfd2fx8){return handleError(_0xfd2fx6,_0xfd2fx8)})};exports[_0x4390[14]]= function(_0xfd2fx5,_0xfd2fx6){return Company[_0x4390[18]]({where:{name:_0xfd2fx5[_0x4390[17]][_0x4390[16]]}})[_0x4390[10]](function(_0xfd2fxa){if(!_0xfd2fxa){return _0xfd2fx6[_0x4390[15]](404)};return _0xfd2fx6[_0x4390[8]](_0xfd2fxa)})[_0x4390[7]](function(_0xfd2fx8){return handleError(_0xfd2fx6,_0xfd2fx8)})};exports[_0x4390[19]]= function(_0xfd2fx5,_0xfd2fx6){return Company[_0x4390[22]](_0xfd2fx5[_0x4390[21]][_0x4390[20]])[_0x4390[10]](function(_0xfd2fxb){if(!_0xfd2fxb){return _0xfd2fx6[_0x4390[15]](404)};return _0xfd2fx6[_0x4390[8]](_0xfd2fxb)})[_0x4390[7]](function(_0xfd2fx8){return handleError(_0xfd2fx6,_0xfd2fx8)})};exports[_0x4390[23]]= function(_0xfd2fx5,_0xfd2fx6){return Company[_0x4390[23]](_0xfd2fx5[_0x4390[17]])[_0x4390[10]](function(_0xfd2fxb){return _0xfd2fx6[_0x4390[9]](201)[_0x4390[8]](_0xfd2fxb)})[_0x4390[7]](function(_0xfd2fx8){return handleError(_0xfd2fx6,_0xfd2fx8)})};exports[_0x4390[24]]= function(_0xfd2fx5,_0xfd2fx6){return Company[_0x4390[18]]({where:{name:_0xfd2fx5[_0x4390[17]][_0x4390[16]],id:{$ne:_0xfd2fx5[_0x4390[17]][_0x4390[20]]}}})[_0x4390[10]](function(_0xfd2fxa){if(!_0xfd2fxa){return _0xfd2fx6[_0x4390[15]](404)};if(_0xfd2fxa[_0x4390[27]]> 0){return _0xfd2fx6[_0x4390[9]](500)[_0x4390[8]]({message:_0x4390[28]})};if(_0xfd2fx5[_0x4390[17]][_0x4390[20]]){delete _0xfd2fx5[_0x4390[17]][_0x4390[20]]};return Company[_0x4390[29]]({where:{id:_0xfd2fx5[_0x4390[21]][_0x4390[20]]}})})[_0x4390[10]](function(_0xfd2fxb){if(!_0xfd2fxb){return _0xfd2fx6[_0x4390[15]](404)};var _0xfd2fxc=_[_0x4390[25]](_0xfd2fxb,_0xfd2fx5[_0x4390[17]]);return _0xfd2fxc[_0x4390[26]]()})[_0x4390[10]](function(_0xfd2fxb){return _0xfd2fx6[_0x4390[9]](200)[_0x4390[8]](_0xfd2fxb)})[_0x4390[7]](function(_0xfd2fx8){return handleError(_0xfd2fx6,_0xfd2fx8)})};exports[_0x4390[30]]= function(_0xfd2fx5,_0xfd2fx6){return Company[_0x4390[22]](_0xfd2fx5[_0x4390[21]][_0x4390[20]])[_0x4390[10]](function(_0xfd2fxb){if(!_0xfd2fxb){return _0xfd2fx6[_0x4390[15]](404)};return _0xfd2fxb[_0x4390[30]]()})[_0x4390[10]](function(){return _0xfd2fx6[_0x4390[15]](204)})[_0x4390[7]](function(_0xfd2fx8){return handleError(_0xfd2fx6,_0xfd2fx8)})};exports[_0x4390[31]]= function(_0xfd2fx5,_0xfd2fx6){return Company[_0x4390[30]]({where:{id:_0xfd2fx5[_0x4390[11]][_0x4390[32]]},individualHooks:true})[_0x4390[10]](function(){return _0xfd2fx6[_0x4390[15]](204)})[_0x4390[7]](function(_0xfd2fx8){return handleError(_0xfd2fx6,_0xfd2fx8)})};function handleError(_0xfd2fx6,_0xfd2fx8){return _0xfd2fx6[_0x4390[9]](500)[_0x4390[8]](_0xfd2fx8)} \ No newline at end of file diff --git a/server/api/company/company.events.js b/server/api/company/company.events.js index b232d0d..31ba222 100644 --- a/server/api/company/company.events.js +++ b/server/api/company/company.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Company = require('../../models').Company; - -var CompanyEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -CompanyEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Company.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - CompanyEvents.emit(event + ':' + doc._id, doc); - CompanyEvents.emit(event, doc); - done(null); - } -} - -module.exports = CompanyEvents; +var _0x540c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x6F\x6D\x70\x61\x6E\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x540c[0];const EventEmitter=require(_0x540c[1]);const Company=require(_0x540c[3])[_0x540c[2]];var CompanyEvents= new EventEmitter();CompanyEvents[_0x540c[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x540c[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x540c[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x540c[6]};for(var e in events){var event=events[e];Company[_0x540c[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4a37x8,_0x4a37x9,_0x4a37xa){CompanyEvents[_0x540c[10]](event+ _0x540c[8]+ _0x4a37x8[_0x540c[9]],_0x4a37x8);CompanyEvents[_0x540c[10]](event,_0x4a37x8);_0x4a37xa(null)}}module[_0x540c[11]]= CompanyEvents \ No newline at end of file diff --git a/server/api/company/company.socket.js b/server/api/company/company.socket.js index 5fb7808..4afeffb 100644 --- a/server/api/company/company.socket.js +++ b/server/api/company/company.socket.js @@ -1,28 +1 @@ -'use strict'; - -const CompanyEvents = require('./company.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('company:' + event, socket); - - CompanyEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - CompanyEvents.removeListener(event, listener); - }; -} +var _0xeda6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x6F\x6D\x70\x61\x6E\x79\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xeda6[0];const CompanyEvents=require(_0xeda6[1]);var events=[_0xeda6[2],_0xeda6[3]];exports[_0xeda6[4]]= function(_0x7e14x3){for(var _0x7e14x4=0,_0x7e14x5=events[_0xeda6[5]];_0x7e14x4< _0x7e14x5;_0x7e14x4++){var _0x7e14x6=events[_0x7e14x4];var _0x7e14x7=createListener(_0xeda6[6]+ _0x7e14x6,_0x7e14x3);CompanyEvents[_0xeda6[7]](_0x7e14x6,_0x7e14x7);_0x7e14x3[_0xeda6[7]](_0xeda6[8],removeListener(_0x7e14x6,_0x7e14x7))}};function createListener(_0x7e14x6,_0x7e14x3){return function(_0x7e14x9){_0x7e14x3[_0xeda6[9]](_0x7e14x6,_0x7e14x9)}}function removeListener(_0x7e14x6,_0x7e14x7){return function(){CompanyEvents[_0xeda6[10]](_0x7e14x6,_0x7e14x7)}} \ No newline at end of file diff --git a/server/api/company/index.js b/server/api/company/index.js index af51e8c..c265930 100644 --- a/server/api/company/index.js +++ b/server/api/company/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./company.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.index); -router.get('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.show); -router.post('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.create); -router.post('/validate', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.companyValidation); -router.put('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.destroy); - -module.exports = router; +var _0x320a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x43\x6D","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x63\x6F\x6D\x70\x61\x6E\x79\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x320a[0];var express=require(_0x320a[1]);var controller=require(_0x320a[2]);var auth=require(_0x320a[3]);var license=require(_0x320a[4]);var router=express.Router();router[_0x320a[12]](_0x320a[5],auth[_0x320a[6]](),license[_0x320a[7]](),auth[_0x320a[10]]([5],[_0x320a[8],_0x320a[9]]),controller[_0x320a[11]]);router[_0x320a[12]](_0x320a[13],auth[_0x320a[6]](),license[_0x320a[7]](),auth[_0x320a[10]]([5],[_0x320a[8],_0x320a[9]]),controller[_0x320a[14]]);router[_0x320a[16]](_0x320a[5],auth[_0x320a[6]](),license[_0x320a[7]](),auth[_0x320a[10]]([5],[_0x320a[8]]),controller[_0x320a[15]]);router[_0x320a[16]](_0x320a[17],auth[_0x320a[6]](),license[_0x320a[7]](),auth[_0x320a[10]]([5],[_0x320a[8]]),controller[_0x320a[18]]);router[_0x320a[20]](_0x320a[13],auth[_0x320a[6]](),license[_0x320a[7]](),auth[_0x320a[10]]([5],[_0x320a[8]]),controller[_0x320a[19]]);router[_0x320a[22]](_0x320a[5],auth[_0x320a[6]](),license[_0x320a[7]](),auth[_0x320a[10]]([5],[_0x320a[8]]),controller[_0x320a[21]]);router[_0x320a[22]](_0x320a[13],auth[_0x320a[6]](),license[_0x320a[7]](),auth[_0x320a[10]]([5],[_0x320a[8]]),controller[_0x320a[23]]);module[_0x320a[24]]= router \ No newline at end of file diff --git a/server/api/contact_manager/contact_manager.controller.js b/server/api/contact_manager/contact_manager.controller.js index eea8c8a..3f637b7 100644 --- a/server/api/contact_manager/contact_manager.controller.js +++ b/server/api/contact_manager/contact_manager.controller.js @@ -1,708 +1 @@ -'use strict'; - -var _ = require('lodash'); -var moment = require('moment'); -var Contact = require('../../models').Contact; -var User = require('../../models').User; -var ContactPhone = require('../../models').ContactPhone; -var ContactEmail = require('../../models').ContactEmail; -var CustomField = require('../../models').CustomField; -var ReportCall = require('../../models').ReportCall; -var ReportQueue = require('../../models').ReportQueue; -var ReportQueueHistory = require('../../models').history.ReportQueueHistory; -var ReportChatRoom = require('../../models').ReportChatRoom; -var ReportChatRoomHistory = require('../../models').history.ReportChatRoomHistory; -var ChatRoom = require('../../models').ChatRoom; -var FaxRoom = require('../../models').FaxRoom; -var SmsRoom = require('../../models').SmsRoom; -var ReportIntegration = require('../../models').ReportIntegration; -var List = require('../../models').List; -var ReportCallHistory = require('../../models').history.ReportCallHistory; -var ReportMailSession = require('../../models').ReportMailSession; -var MailRoom = require('../../models').MailRoom; -var ReportMailSessionHistory = require('../../models').history.ReportMailSessionHistory; -var Tag = require('../../models').Tag; -var stream = require('stream'); -var sequelize = require('../../models').sequelize; -var util = require('util'); -var Util = require('../../config/util'); -var Async = require('async'); - -// Get list of contacts -exports.index = function(req, res, next) { - var results, _agentLists; - switch (req.user.role) { - case 'agent': - return User - .findById(req.user.id) - .then(function(agent) { - return agent.getLists(); - }) - .then(function(lists) { - _agentLists = _.map(lists, 'id'); - return List - .findAll({ - where: { - defaultEntry: true - }, - attributes: ['id'] - }); - }) - .then(function(defaultLists) { - var company_list_query = { - CompanyId: req.query.CompanyId || null, - ListId: req.query.ListId || null, - }; - delete req.query.CompanyId; - delete req.query.ListId; - return Contact - .scope('list', 'company', { - method: ['company_list_filter', company_list_query] - }) - .findAndCountAll(Util.getQuery(req.query, company_list_query.ListId ? {} : { - ListId: { - $in: _agentLists.concat(_.map(defaultLists, 'id')) - } - })); - }) - .then(function(contacts) { - results = { - rows: _.map(contacts.rows, 'dataValues'), - count: contacts.rows - }; - return Contact - .describe(); - }) - .then(function(fields) { - fields = _.filter(_.keys(fields), function(elem) { - return _.includes(elem, 'cf_'); - }); - return CustomField - .findAll({ - where: { - name: fields - } - }); - }) - .then(function(customFields) { - if (customFields.length) { - var cfs = _.map(customFields, 'name').join(','); - return sequelize.query(util.format('SELECT id,%s FROM cm_contacts WHERE id IN (\'' + _.map(results.rows, 'id').join("','") + '\')', cfs), { - type: sequelize.QueryTypes.SELECT - }); - } - }) - .then(function(contactsCf) { - _.merge(results.rows, contactsCf); - return results; - }) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - default: - var company_list_query = { - CompanyId: req.query.CompanyId || null, - ListId: req.query.ListId || null, - }; - delete req.query.CompanyId; - delete req.query.ListId; - return Contact - .scope('list', 'company', { - method: ['company_list_filter', company_list_query] - }) - .findAndCountAll(Util.getQuery(req.query)) - .then(function(contacts) { - results = { - rows: _.map(contacts.rows, 'dataValues'), - count: contacts.count - }; - return Contact - .describe(); - }) - .then(function(fields) { - fields = _.filter(_.keys(fields), function(elem) { - return _.includes(elem, 'cf_'); - }); - return CustomField - .findAll({ - where: { - name: fields - } - }); - }) - .then(function(customFields) { - if (results.rows.length && customFields.length) { - var cfs = _.map(customFields, 'name').join(','); - return sequelize.query(util.format('SELECT id,%s FROM cm_contacts WHERE id IN (\'' + _.map(results.rows, 'id').join("','") + '\')', cfs), { - type: sequelize.QueryTypes.SELECT - }); - } - }) - .then(function(contactsCf) { - if (contactsCf) { - _.merge(results.rows, contactsCf); - } - return results; - }) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } -}; - -// Get list of fields -exports.describe = function(req, res) { - return Contact - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getLog = function(req, res, next) { - req.query.detail = req.query.detail || 'general'; - req.query.show = req.query.show || 'phone'; - req.query.logType = req.query.logType || 'journal'; - req.query.type = req.query.type || 'inbound'; - var Api, where = {}; - return Contact - .findById(req.params.id) - .then(function(contact) { - if (!contact) { - return res.sendStatus(404); - } - switch (req.query.detail) { - case 'general': - switch (req.query.show) { - case 'phone': - Api = (req.query.logType === 'history') ? ReportCallHistory : ReportCall; - if (req.query.type === 'outbound') { - where.destination = [contact.phone, contact.mobile]; - } else { - where.source = [contact.phone, contact.mobile]; - } - break; - case 'email': - Api = MailRoom; - where.from = contact.email; - if (req.query.logType === 'history') { - where.createdAt = { - $lt: moment().startOf('day') - } - } else { - where.createdAt = { - $gte: moment().startOf('day') - } - } - break; - case 'chat': - Api = ChatRoom; - where.contact = contact.email; - if (req.query.logType === 'history') { - where.createdAt = { - $lt: moment().startOf('day') - } - } else { - where.createdAt = { - $gte: moment().startOf('day') - } - } - break; - case 'fax': - Api = FaxRoom; - where.contact = contact.fax; - if (req.query.logType === 'history') { - where.createdAt = { - $lt: moment().startOf('day') - } - } else { - where.createdAt = { - $gte: moment().startOf('day') - } - } - break; - case 'sms': - Api = SmsRoom; - where.contact = [contact.phone, contact.mobile]; - if (req.query.logType === 'history') { - where.createdAt = { - $lt: moment().startOf('day') - } - } else { - where.createdAt = { - $gte: moment().startOf('day') - } - } - break; - default: - Api = (req.query.logType === 'history') ? ReportCallHistory : ReportCall; - } - break; - case 'queue': - switch (req.query.show) { - case 'phone': - Api = (req.query.logType === 'history') ? ReportQueueHistory : ReportQueue; - where.calleridnum = [contact.phone, contact.mobile]; - break; - case 'email': - return res.sendStatus(404); - default: - Api = (req.query.logType === 'history') ? ReportQueueHistory : ReportQueue; - } - break; - default: - Api = ReportCall; - } - delete req.query.detail; - delete req.query.show; - delete req.query.logType; - delete req.query.type; - return Api - .findAndCountAll(Util.getQuery(req.query, where)); - }) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - -}; - -// Get a single managed_contact -exports.show = function(req, res) { - var _contact; - return Contact - .scope('list', 'user', 'company') - .findById(req.params.id) - .then(function(managed_contact) { - if (!managed_contact) { - return res.sendStatus(404); - } - _contact = managed_contact; - return CustomField - .findAll({ - where: { - ListId: _contact.ListId - } - }); - }) - .then(function(customFields) { - if (customFields.length) { - var cfs = _.map(customFields, 'name').join(','); - return sequelize.query(util.format('SELECT %s FROM cm_contacts WHERE id=%s', cfs, req.params.id), { - type: sequelize.QueryTypes.SELECT - }); - } - }) - .then(function(cfValues) { - if (cfValues) { - _.forEach(cfValues[0], function(value, key, array) { - if (value === 'null') { - array[key] = null; - } - }); - _.merge(_contact.dataValues, cfValues[0]); - } - }) - .then(function() { - return res.status(200).send(_contact); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.getEventContacts = function(req, res) { - return ReportIntegration - .findById(req.params.id) - .then(function(event) { - var where = {}; - switch (event.eventChannel) { - case 'voice': - where = { - $or: { - phone: event.calleridnum, - mobile: event.calleridnum - } - }; - break; - case 'mail': - where = { - email: event.from - }; - break; - default: - where = {}; - } - return Contact.findAndCountAll({ - where: where, - include: [{ - model: List, - where: { - $or: { - id: _.map(_.map(req.user.Lists, 'dataValues'), 'id'), - defaultEntry: true - } - } - }] - }); - }) - .then(function(contacts) { - return res.status(200).send(contacts); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - -}; - -// Creates a new managed_contact in the DB. -exports.create = function(req, res, next) { - var _contact; - return Tag - .findAll() - .then(function(tags) { - var newTags = []; - var tagList = _.map(_.map(tags, 'dataValues'), 'name'); - if (req.body.tags) { - req.body.tags.forEach(function(elem) { - if (!_.includes(tagList, elem)) { - newTags.push(Tag.create({ - name: elem - })); - } - }); - } - return newTags; - }) - .all() - .then(function() { - req.body.UserId = req.user.id; - return Contact.create(req.body); - }) - .then(function(contact) { - _contact = contact; - - return CustomField - .findAll({ - where: { - ListId: _contact.ListId - } - }); - }) - .then(function(customFields) { - if (customFields.length) { - var cfs = []; - customFields.forEach(function(elem) { - if (req.body.hasOwnProperty(elem.name)) { - cfs.push(util.format('%s=\'%s\'', elem.name, req.body[elem.name])); - } - }); - if (cfs.length) { - cfs = cfs.join(','); - return sequelize.query(util.format('UPDATE cm_contacts SET %s WHERE id=%s', cfs, _contact.id)); - } - } - }) - .then(function() { - return res.status(201).send(_contact); - }) - .catch(function(err) { - console.log(err); - return next(err); - }); -}; - -exports.copy = function(req, res, next) { - var _contact, _newContact; - return Contact - .findById(req.params.id) - .then(function(contact) { - _contact = contact.dataValues; - _newContact = _.clone(contact.dataValues); - delete _newContact.id; - _newContact.UserId = req.user.id; - _newContact.ListId = req.body.ListId; - _newContact.tags = _newContact.tags ? _newContact.tags.split(';') : []; - if (_newContact.tags.length > 1) { - _newContact.tags.pop(); - } - return Contact - .create(_newContact); - }) - .then(function(newContact) { - _newContact = newContact; - if (_contact.ListId === req.body.ListId) { - return CustomField - .findAll({ - where: { - ListId: _contact.ListId - } - }); - } - }) - .then(function(customFields) { - if (customFields && customFields.length) { - var cfs = _.map(customFields, 'name').join(','); - return sequelize.query(util.format('SELECT %s FROM cm_contacts WHERE id=%s', cfs, _contact.id), { - type: sequelize.QueryTypes.SELECT - }); - } - }) - .then(function(cfValues) { - if (cfValues) { - var cfs = []; - _.forOwn(cfValues[0], function(value, key) { - cfs.push(util.format('%s=\'%s\'', key, value)); - }); - if (cfs.length) { - cfs = cfs.join(','); - return sequelize.query(util.format('UPDATE cm_contacts SET %s WHERE id=%s', cfs, _newContact.id)); - } - } - }) - .then(function() { - return res.status(201).send(_newContact); - }) - .catch(function(err) { - console.log(err); - return next(err); - }); -} - -// Creates a new managed_contact in the DB. -exports.bulkCreate = function(req, res, next) { - var _contacts = []; - var _result = { - ok: 0, - ko: 0 - }; - return Tag - .findAll() - .then(function(tags) { - var newTags = [], - contactTags = []; - var tagList = _.map(_.map(tags, 'dataValues'), 'name'); - req.body.contacts.forEach(function(contact) { - if (contact.tags) { - contactTags = _.union(contactTags, contact.tags); - } - }); - contactTags.forEach(function(elem) { - if (!_.includes(tagList, elem)) { - newTags.push(Tag.create({ - name: elem - })); - } - }); - return newTags; - }) - .all() - .then(function() { - var bulkCreate = []; - Async.forEachOf(req.body.contacts, function(contact) { - contact.UserId = req.user.id; - - bulkCreate.push(Contact.create(contact) - .then(function(contact) { - _contacts.push(contact); - _result.ok++; - }) - .catch(function(err) { - _result.ko++; - })); - }) - return bulkCreate; - }) - .all() - .then(function() { - return CustomField - .findAll({ - where: { - ListId: { - $in: _.map(req.body.contacts, 'ListId') - } - } - }); - }) - .then(function(customFields) { - var bulkFields = []; - if (customFields.length) { - var cfs = []; - _contacts.forEach(function(contact) { - cfs = []; - customFields.forEach(function(elem) { - if (contact.hasOwnProperty(elem.name)) { - cfs.push(util.format('%s=\'%s\'', elem.name, req.body[elem.name])); - } - }); - if (cfs.length) { - cfs = cfs.join(','); - bulkFields.push(sequelize.query(util.format('UPDATE cm_contacts SET %s WHERE id=%s', cfs, contact.id))); - } - }); - } - return bulkFields; - }) - .all() - .then(function() { - return res.status(201).send(_result); - }) - .catch(function(err) { - console.log(err); - return next(err); - }); -}; - -// Updates an existing managed_contact in the DB. -exports.update = function(req, res, next) { - return Promise - .all([]) - .then(updateContact(req, res)) - .then(function(contact) { - return res.status(200).send(contact); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.merge = function(req, res, next) { - var _contact; - return Promise - .all([]) - .then(updateContact(req, res)) - .then(function(contact) { - _contact = contact; - if (req.body.oldContact) { - return Contact - .destroy({ - where: { - id: req.body.oldContact - }, - individualHooks: true - }); - } - }) - .then(function() { - return res.status(200).send(_contact); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -function updateContact(req, res) { - return function() { - var _contact; - return Tag - .findAll() - .then(function(tags) { - var newTags = []; - var tagList = _.map(_.map(tags, 'dataValues'), 'name'); - if (req.body.tags) { - req.body.tags.forEach(function(elem) { - if (!_.includes(tagList, elem)) { - newTags.push(Tag.create({ - name: elem - })); - } - }); - } - return newTags; - }) - .then(function() { - return Contact.findById(req.params.id); - }) - .then(function(contact) { - if (!contact) { - return res.sendStatus(404); - } - delete req.body.id; - return contact.updateAttributes(req.body) - }) - .then(function(contact) { - _contact = contact; - - return CustomField - .findAll({ - where: { - ListId: _contact.ListId - } - }); - }) - .then(function(customFields) { - if (customFields.length) { - var cfs = []; - customFields.forEach(function(elem) { - if (req.body.hasOwnProperty(elem.name)) { - cfs.push(util.format('%s=\'%s\'', elem.name, req.body[elem.name])); - } - }); - if (cfs.length) { - cfs = cfs.join(','); - return sequelize.query(util.format('UPDATE cm_contacts SET %s WHERE id=%s', cfs, _contact.id)); - } - } - }) - .then(function() { - return _contact; - }) - } -} - -// Deletes a managed_contact from the DB. -exports.destroy = function(req, res) { - return Contact - .findById(req.params.id) - .then(function(managed_contact) { - if (!managed_contact) { - return res.sendStatus(404); - } - return managed_contact.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a managed_contact from the DB. -exports.bulkDestroy = function(req, res) { - return Contact - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xc253=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74\x50\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D\x48\x69\x73\x74\x6F\x72\x79","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x46\x61\x78\x52\x6F\x6F\x6D","\x53\x6D\x73\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x4C\x69\x73\x74","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x54\x61\x67","\x73\x74\x72\x65\x61\x6D","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x72\x6F\x77\x73","\x6D\x65\x72\x67\x65","\x6C\x65\x6E\x67\x74\x68","\x2C","\x6A\x6F\x69\x6E","\x6E\x61\x6D\x65","\x6D\x61\x70","\x53\x45\x4C\x45\x43\x54\x20\x69\x64\x2C\x25\x73\x20\x46\x52\x4F\x4D\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x20\x49\x4E\x20\x28\x27","\x27\x2C\x27","\x69\x64","\x27\x29","\x66\x6F\x72\x6D\x61\x74","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x6B\x65\x79\x73","\x63\x66\x5F","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x66\x69\x6C\x74\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x43\x6F\x6D\x70\x61\x6E\x79\x49\x64","\x4C\x69\x73\x74\x49\x64","\x63\x6F\x6E\x63\x61\x74","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x6C\x69\x73\x74","\x63\x6F\x6D\x70\x61\x6E\x79","\x63\x6F\x6D\x70\x61\x6E\x79\x5F\x6C\x69\x73\x74\x5F\x66\x69\x6C\x74\x65\x72","\x73\x63\x6F\x70\x65","\x67\x65\x74\x4C\x69\x73\x74\x73","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x67\x65\x6E\x74","\x63\x6F\x75\x6E\x74","\x72\x6F\x6C\x65","\x67\x65\x74\x4C\x6F\x67","\x64\x65\x74\x61\x69\x6C","\x67\x65\x6E\x65\x72\x61\x6C","\x73\x68\x6F\x77","\x70\x68\x6F\x6E\x65","\x6C\x6F\x67\x54\x79\x70\x65","\x6A\x6F\x75\x72\x6E\x61\x6C","\x74\x79\x70\x65","\x69\x6E\x62\x6F\x75\x6E\x64","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x6D\x6F\x62\x69\x6C\x65","\x73\x6F\x75\x72\x63\x65","\x66\x72\x6F\x6D","\x65\x6D\x61\x69\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x63\x6F\x6E\x74\x61\x63\x74","\x63\x68\x61\x74","\x66\x61\x78","\x73\x6D\x73","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x71\x75\x65\x75\x65","\x70\x61\x72\x61\x6D\x73","\x6E\x75\x6C\x6C","\x66\x6F\x72\x45\x61\x63\x68","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3D\x25\x73","\x67\x65\x74\x45\x76\x65\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x76\x6F\x69\x63\x65","\x6D\x61\x69\x6C","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x63\x72\x65\x61\x74\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x62\x6F\x64\x79","\x25\x73\x3D\x27\x25\x73\x27","\x70\x75\x73\x68","\x55\x50\x44\x41\x54\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x53\x45\x54\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3D\x25\x73","\x55\x73\x65\x72\x49\x64","\x61\x6C\x6C","\x74\x61\x67\x73","\x63\x6F\x70\x79","\x66\x6F\x72\x4F\x77\x6E","\x63\x6C\x6F\x6E\x65","\x3B","\x73\x70\x6C\x69\x74","\x70\x6F\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x63\x6F\x6E\x74\x61\x63\x74\x73","\x6B\x6F","\x6F\x6B","\x66\x6F\x72\x45\x61\x63\x68\x4F\x66","\x75\x6E\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x6F\x6C\x64\x43\x6F\x6E\x74\x61\x63\x74","\x64\x65\x73\x74\x72\x6F\x79","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xc253[0];var _=require(_0xc253[1]);var moment=require(_0xc253[2]);var Contact=require(_0xc253[4])[_0xc253[3]];var User=require(_0xc253[4])[_0xc253[5]];var ContactPhone=require(_0xc253[4])[_0xc253[6]];var ContactEmail=require(_0xc253[4])[_0xc253[7]];var CustomField=require(_0xc253[4])[_0xc253[8]];var ReportCall=require(_0xc253[4])[_0xc253[9]];var ReportQueue=require(_0xc253[4])[_0xc253[10]];var ReportQueueHistory=require(_0xc253[4])[_0xc253[12]][_0xc253[11]];var ReportChatRoom=require(_0xc253[4])[_0xc253[13]];var ReportChatRoomHistory=require(_0xc253[4])[_0xc253[12]][_0xc253[14]];var ChatRoom=require(_0xc253[4])[_0xc253[15]];var FaxRoom=require(_0xc253[4])[_0xc253[16]];var SmsRoom=require(_0xc253[4])[_0xc253[17]];var ReportIntegration=require(_0xc253[4])[_0xc253[18]];var List=require(_0xc253[4])[_0xc253[19]];var ReportCallHistory=require(_0xc253[4])[_0xc253[12]][_0xc253[20]];var ReportMailSession=require(_0xc253[4])[_0xc253[21]];var MailRoom=require(_0xc253[4])[_0xc253[22]];var ReportMailSessionHistory=require(_0xc253[4])[_0xc253[12]][_0xc253[23]];var Tag=require(_0xc253[4])[_0xc253[24]];var stream=require(_0xc253[25]);var sequelize=require(_0xc253[4])[_0xc253[26]];var util=require(_0xc253[27]);var Util=require(_0xc253[28]);var Async=require(_0xc253[29]);exports[_0xc253[30]]= function(_0x7150x1c,_0x7150x1d,_0x7150x1e){var _0x7150x1f,_0x7150x20;switch(_0x7150x1c[_0xc253[68]][_0xc253[72]]){case _0xc253[70]:return User[_0xc253[69]](_0x7150x1c[_0xc253[68]][_0xc253[45]])[_0xc253[35]](function(_0x7150x2c){return _0x7150x2c[_0xc253[67]]()})[_0xc253[35]](function(_0x7150x2b){_0x7150x20= _[_0xc253[42]](_0x7150x2b,_0xc253[45]);return List[_0xc253[55]]({where:{defaultEntry:true},attributes:[_0xc253[45]]})})[_0xc253[35]](function(_0x7150x29){var _0x7150x2a={CompanyId:_0x7150x1c[_0xc253[50]][_0xc253[58]]|| null,ListId:_0x7150x1c[_0xc253[50]][_0xc253[59]]|| null};delete _0x7150x1c[_0xc253[50]][_0xc253[58]];delete _0x7150x1c[_0xc253[50]][_0xc253[59]];return Contact[_0xc253[66]](_0xc253[63],_0xc253[64],{method:[_0xc253[65],_0x7150x2a]})[_0xc253[62]](Util[_0xc253[61]](_0x7150x1c[_0xc253[50]],_0x7150x2a[_0xc253[59]]?{}:{ListId:{$in:_0x7150x20[_0xc253[60]](_[_0xc253[42]](_0x7150x29,_0xc253[45]))}}))})[_0xc253[35]](function(_0x7150x28){_0x7150x1f= {rows:_[_0xc253[42]](_0x7150x28[_0xc253[36]],_0xc253[56]),count:_0x7150x28[_0xc253[36]]};return Contact[_0xc253[57]]()})[_0xc253[35]](function(_0x7150x26){_0x7150x26= _[_0xc253[54]](_[_0xc253[51]](_0x7150x26),function(_0x7150x27){return _[_0xc253[53]](_0x7150x27,_0xc253[52])});return CustomField[_0xc253[55]]({where:{name:_0x7150x26}})})[_0xc253[35]](function(_0x7150x24){if(_0x7150x24[_0xc253[38]]){var _0x7150x25=_[_0xc253[42]](_0x7150x24,_0xc253[41])[_0xc253[40]](_0xc253[39]);return sequelize[_0xc253[50]](util[_0xc253[47]](_0xc253[43]+ _[_0xc253[42]](_0x7150x1f[_0xc253[36]],_0xc253[45])[_0xc253[40]](_0xc253[44])+ _0xc253[46],_0x7150x25),{type:sequelize[_0xc253[49]][_0xc253[48]]})}})[_0xc253[35]](function(_0x7150x23){_[_0xc253[37]](_0x7150x1f[_0xc253[36]],_0x7150x23);return _0x7150x1f})[_0xc253[35]](function(_0x7150x22){_0x7150x1d[_0xc253[34]](200)[_0xc253[33]](_0x7150x22)})[_0xc253[32]](function(_0x7150x21){console[_0xc253[31]](_0x7150x21);return handleError(_0x7150x1d,_0x7150x21)});default:var _0x7150x2a={CompanyId:_0x7150x1c[_0xc253[50]][_0xc253[58]]|| null,ListId:_0x7150x1c[_0xc253[50]][_0xc253[59]]|| null};delete _0x7150x1c[_0xc253[50]][_0xc253[58]];delete _0x7150x1c[_0xc253[50]][_0xc253[59]];return Contact[_0xc253[66]](_0xc253[63],_0xc253[64],{method:[_0xc253[65],_0x7150x2a]})[_0xc253[62]](Util[_0xc253[61]](_0x7150x1c[_0xc253[50]]))[_0xc253[35]](function(_0x7150x28){_0x7150x1f= {rows:_[_0xc253[42]](_0x7150x28[_0xc253[36]],_0xc253[56]),count:_0x7150x28[_0xc253[71]]};return Contact[_0xc253[57]]()})[_0xc253[35]](function(_0x7150x26){_0x7150x26= _[_0xc253[54]](_[_0xc253[51]](_0x7150x26),function(_0x7150x27){return _[_0xc253[53]](_0x7150x27,_0xc253[52])});return CustomField[_0xc253[55]]({where:{name:_0x7150x26}})})[_0xc253[35]](function(_0x7150x24){if(_0x7150x1f[_0xc253[36]][_0xc253[38]]&& _0x7150x24[_0xc253[38]]){var _0x7150x25=_[_0xc253[42]](_0x7150x24,_0xc253[41])[_0xc253[40]](_0xc253[39]);return sequelize[_0xc253[50]](util[_0xc253[47]](_0xc253[43]+ _[_0xc253[42]](_0x7150x1f[_0xc253[36]],_0xc253[45])[_0xc253[40]](_0xc253[44])+ _0xc253[46],_0x7150x25),{type:sequelize[_0xc253[49]][_0xc253[48]]})}})[_0xc253[35]](function(_0x7150x23){if(_0x7150x23){_[_0xc253[37]](_0x7150x1f[_0xc253[36]],_0x7150x23)};return _0x7150x1f})[_0xc253[35]](function(_0x7150x22){_0x7150x1d[_0xc253[34]](200)[_0xc253[33]](_0x7150x22)})[_0xc253[32]](function(_0x7150x21){console[_0xc253[31]](_0x7150x21);return handleError(_0x7150x1d,_0x7150x21)})}};exports[_0xc253[57]]= function(_0x7150x1c,_0x7150x1d){return Contact[_0xc253[57]]()[_0xc253[35]](function(_0x7150x26){return _0x7150x1d[_0xc253[34]](200)[_0xc253[33]](_0x7150x26)})[_0xc253[32]](function(_0x7150x21){return handleError(_0x7150x1d,_0x7150x21)})};exports[_0xc253[73]]= function(_0x7150x1c,_0x7150x1d,_0x7150x1e){_0x7150x1c[_0xc253[50]][_0xc253[74]]= _0x7150x1c[_0xc253[50]][_0xc253[74]]|| _0xc253[75];_0x7150x1c[_0xc253[50]][_0xc253[76]]= _0x7150x1c[_0xc253[50]][_0xc253[76]]|| _0xc253[77];_0x7150x1c[_0xc253[50]][_0xc253[78]]= _0x7150x1c[_0xc253[50]][_0xc253[78]]|| _0xc253[79];_0x7150x1c[_0xc253[50]][_0xc253[80]]= _0x7150x1c[_0xc253[50]][_0xc253[80]]|| _0xc253[81];var _0x7150x2d,_0x7150x2e={};return Contact[_0xc253[69]](_0x7150x1c[_0xc253[98]][_0xc253[45]])[_0xc253[35]](function(_0x7150x2f){if(!_0x7150x2f){return _0x7150x1d[_0xc253[82]](404)};switch(_0x7150x1c[_0xc253[50]][_0xc253[74]]){case _0xc253[75]:switch(_0x7150x1c[_0xc253[50]][_0xc253[76]]){case _0xc253[77]:_0x7150x2d= (_0x7150x1c[_0xc253[50]][_0xc253[78]]=== _0xc253[12])?ReportCallHistory:ReportCall;if(_0x7150x1c[_0xc253[50]][_0xc253[80]]=== _0xc253[83]){_0x7150x2e[_0xc253[84]]= [_0x7150x2f[_0xc253[77]],_0x7150x2f[_0xc253[85]]]}else {_0x7150x2e[_0xc253[86]]= [_0x7150x2f[_0xc253[77]],_0x7150x2f[_0xc253[85]]]};break;case _0xc253[88]:_0x7150x2d= MailRoom;_0x7150x2e[_0xc253[87]]= _0x7150x2f[_0xc253[88]];if(_0x7150x1c[_0xc253[50]][_0xc253[78]]=== _0xc253[12]){_0x7150x2e[_0xc253[89]]= {$lt:moment()[_0xc253[91]](_0xc253[90])}}else {_0x7150x2e[_0xc253[89]]= {$gte:moment()[_0xc253[91]](_0xc253[90])}};break;case _0xc253[93]:_0x7150x2d= ChatRoom;_0x7150x2e[_0xc253[92]]= _0x7150x2f[_0xc253[88]];if(_0x7150x1c[_0xc253[50]][_0xc253[78]]=== _0xc253[12]){_0x7150x2e[_0xc253[89]]= {$lt:moment()[_0xc253[91]](_0xc253[90])}}else {_0x7150x2e[_0xc253[89]]= {$gte:moment()[_0xc253[91]](_0xc253[90])}};break;case _0xc253[94]:_0x7150x2d= FaxRoom;_0x7150x2e[_0xc253[92]]= _0x7150x2f[_0xc253[94]];if(_0x7150x1c[_0xc253[50]][_0xc253[78]]=== _0xc253[12]){_0x7150x2e[_0xc253[89]]= {$lt:moment()[_0xc253[91]](_0xc253[90])}}else {_0x7150x2e[_0xc253[89]]= {$gte:moment()[_0xc253[91]](_0xc253[90])}};break;case _0xc253[95]:_0x7150x2d= SmsRoom;_0x7150x2e[_0xc253[92]]= [_0x7150x2f[_0xc253[77]],_0x7150x2f[_0xc253[85]]];if(_0x7150x1c[_0xc253[50]][_0xc253[78]]=== _0xc253[12]){_0x7150x2e[_0xc253[89]]= {$lt:moment()[_0xc253[91]](_0xc253[90])}}else {_0x7150x2e[_0xc253[89]]= {$gte:moment()[_0xc253[91]](_0xc253[90])}};break;default:_0x7150x2d= (_0x7150x1c[_0xc253[50]][_0xc253[78]]=== _0xc253[12])?ReportCallHistory:ReportCall};break;case _0xc253[97]:switch(_0x7150x1c[_0xc253[50]][_0xc253[76]]){case _0xc253[77]:_0x7150x2d= (_0x7150x1c[_0xc253[50]][_0xc253[78]]=== _0xc253[12])?ReportQueueHistory:ReportQueue;_0x7150x2e[_0xc253[96]]= [_0x7150x2f[_0xc253[77]],_0x7150x2f[_0xc253[85]]];break;case _0xc253[88]:return _0x7150x1d[_0xc253[82]](404);default:_0x7150x2d= (_0x7150x1c[_0xc253[50]][_0xc253[78]]=== _0xc253[12])?ReportQueueHistory:ReportQueue};break;default:_0x7150x2d= ReportCall};delete _0x7150x1c[_0xc253[50]][_0xc253[74]];delete _0x7150x1c[_0xc253[50]][_0xc253[76]];delete _0x7150x1c[_0xc253[50]][_0xc253[78]];delete _0x7150x1c[_0xc253[50]][_0xc253[80]];return _0x7150x2d[_0xc253[62]](Util[_0xc253[61]](_0x7150x1c[_0xc253[50]],_0x7150x2e))})[_0xc253[35]](function(_0x7150x22){_0x7150x1d[_0xc253[34]](200)[_0xc253[33]](_0x7150x22)})[_0xc253[32]](function(_0x7150x21){console[_0xc253[31]](_0x7150x21);return handleError(_0x7150x1d,_0x7150x21)})};exports[_0xc253[76]]= function(_0x7150x1c,_0x7150x1d){var _0x7150x30;return Contact[_0xc253[66]](_0xc253[63],_0xc253[68],_0xc253[64])[_0xc253[69]](_0x7150x1c[_0xc253[98]][_0xc253[45]])[_0xc253[35]](function(_0x7150x35){if(!_0x7150x35){return _0x7150x1d[_0xc253[82]](404)};_0x7150x30= _0x7150x35;return CustomField[_0xc253[55]]({where:{ListId:_0x7150x30[_0xc253[59]]}})})[_0xc253[35]](function(_0x7150x24){if(_0x7150x24[_0xc253[38]]){var _0x7150x25=_[_0xc253[42]](_0x7150x24,_0xc253[41])[_0xc253[40]](_0xc253[39]);return sequelize[_0xc253[50]](util[_0xc253[47]](_0xc253[101],_0x7150x25,_0x7150x1c[_0xc253[98]][_0xc253[45]]),{type:sequelize[_0xc253[49]][_0xc253[48]]})}})[_0xc253[35]](function(_0x7150x31){if(_0x7150x31){_[_0xc253[100]](_0x7150x31[0],function(_0x7150x32,_0x7150x33,_0x7150x34){if(_0x7150x32=== _0xc253[99]){_0x7150x34[_0x7150x33]= null}});_[_0xc253[37]](_0x7150x30[_0xc253[56]],_0x7150x31[0])}})[_0xc253[35]](function(){return _0x7150x1d[_0xc253[34]](200)[_0xc253[33]](_0x7150x30)})[_0xc253[32]](function(_0x7150x21){console[_0xc253[31]](_0x7150x21);return handleError(_0x7150x1d,_0x7150x21)})};exports[_0xc253[102]]= function(_0x7150x1c,_0x7150x1d){return ReportIntegration[_0xc253[69]](_0x7150x1c[_0xc253[98]][_0xc253[45]])[_0xc253[35]](function(_0x7150x36){var _0x7150x2e={};switch(_0x7150x36[_0xc253[105]]){case _0xc253[103]:_0x7150x2e= {$or:{phone:_0x7150x36[_0xc253[96]],mobile:_0x7150x36[_0xc253[96]]}};break;case _0xc253[104]:_0x7150x2e= {email:_0x7150x36[_0xc253[87]]};break;default:_0x7150x2e= {}};return Contact[_0xc253[62]]({where:_0x7150x2e,include:[{model:List,where:{$or:{id:_[_0xc253[42]](_[_0xc253[42]](_0x7150x1c[_0xc253[68]].Lists,_0xc253[56]),_0xc253[45]),defaultEntry:true}}}]})})[_0xc253[35]](function(_0x7150x28){return _0x7150x1d[_0xc253[34]](200)[_0xc253[33]](_0x7150x28)})[_0xc253[32]](function(_0x7150x21){console[_0xc253[31]](_0x7150x21);return handleError(_0x7150x1d,_0x7150x21)})};exports[_0xc253[106]]= function(_0x7150x1c,_0x7150x1d,_0x7150x1e){var _0x7150x30;return Tag[_0xc253[55]]()[_0xc253[35]](function(_0x7150x37){var _0x7150x38=[];var _0x7150x39=_[_0xc253[42]](_[_0xc253[42]](_0x7150x37,_0xc253[56]),_0xc253[41]);if(_0x7150x1c[_0xc253[108]][_0xc253[114]]){_0x7150x1c[_0xc253[108]][_0xc253[114]][_0xc253[100]](function(_0x7150x27){if(!_[_0xc253[53]](_0x7150x39,_0x7150x27)){_0x7150x38[_0xc253[110]](Tag[_0xc253[106]]({name:_0x7150x27}))}})};return _0x7150x38})[_0xc253[113]]()[_0xc253[35]](function(){_0x7150x1c[_0xc253[108]][_0xc253[112]]= _0x7150x1c[_0xc253[68]][_0xc253[45]];return Contact[_0xc253[106]](_0x7150x1c[_0xc253[108]])})[_0xc253[35]](function(_0x7150x2f){_0x7150x30= _0x7150x2f;return CustomField[_0xc253[55]]({where:{ListId:_0x7150x30[_0xc253[59]]}})})[_0xc253[35]](function(_0x7150x24){if(_0x7150x24[_0xc253[38]]){var _0x7150x25=[];_0x7150x24[_0xc253[100]](function(_0x7150x27){if(_0x7150x1c[_0xc253[108]][_0xc253[107]](_0x7150x27[_0xc253[41]])){_0x7150x25[_0xc253[110]](util[_0xc253[47]](_0xc253[109],_0x7150x27[_0xc253[41]],_0x7150x1c[_0xc253[108]][_0x7150x27[_0xc253[41]]]))}});if(_0x7150x25[_0xc253[38]]){_0x7150x25= _0x7150x25[_0xc253[40]](_0xc253[39]);return sequelize[_0xc253[50]](util[_0xc253[47]](_0xc253[111],_0x7150x25,_0x7150x30[_0xc253[45]]))}}})[_0xc253[35]](function(){return _0x7150x1d[_0xc253[34]](201)[_0xc253[33]](_0x7150x30)})[_0xc253[32]](function(_0x7150x21){console[_0xc253[31]](_0x7150x21);return _0x7150x1e(_0x7150x21)})};exports[_0xc253[115]]= function(_0x7150x1c,_0x7150x1d,_0x7150x1e){var _0x7150x30,_0x7150x3a;return Contact[_0xc253[69]](_0x7150x1c[_0xc253[98]][_0xc253[45]])[_0xc253[35]](function(_0x7150x2f){_0x7150x30= _0x7150x2f[_0xc253[56]];_0x7150x3a= _[_0xc253[117]](_0x7150x2f[_0xc253[56]]);delete _0x7150x3a[_0xc253[45]];_0x7150x3a[_0xc253[112]]= _0x7150x1c[_0xc253[68]][_0xc253[45]];_0x7150x3a[_0xc253[59]]= _0x7150x1c[_0xc253[108]][_0xc253[59]];_0x7150x3a[_0xc253[114]]= _0x7150x3a[_0xc253[114]]?_0x7150x3a[_0xc253[114]][_0xc253[119]](_0xc253[118]):[];if(_0x7150x3a[_0xc253[114]][_0xc253[38]]> 1){_0x7150x3a[_0xc253[114]][_0xc253[120]]()};return Contact[_0xc253[106]](_0x7150x3a)})[_0xc253[35]](function(_0x7150x3b){_0x7150x3a= _0x7150x3b;if(_0x7150x30[_0xc253[59]]=== _0x7150x1c[_0xc253[108]][_0xc253[59]]){return CustomField[_0xc253[55]]({where:{ListId:_0x7150x30[_0xc253[59]]}})}})[_0xc253[35]](function(_0x7150x24){if(_0x7150x24&& _0x7150x24[_0xc253[38]]){var _0x7150x25=_[_0xc253[42]](_0x7150x24,_0xc253[41])[_0xc253[40]](_0xc253[39]);return sequelize[_0xc253[50]](util[_0xc253[47]](_0xc253[101],_0x7150x25,_0x7150x30[_0xc253[45]]),{type:sequelize[_0xc253[49]][_0xc253[48]]})}})[_0xc253[35]](function(_0x7150x31){if(_0x7150x31){var _0x7150x25=[];_[_0xc253[116]](_0x7150x31[0],function(_0x7150x32,_0x7150x33){_0x7150x25[_0xc253[110]](util[_0xc253[47]](_0xc253[109],_0x7150x33,_0x7150x32))});if(_0x7150x25[_0xc253[38]]){_0x7150x25= _0x7150x25[_0xc253[40]](_0xc253[39]);return sequelize[_0xc253[50]](util[_0xc253[47]](_0xc253[111],_0x7150x25,_0x7150x3a[_0xc253[45]]))}}})[_0xc253[35]](function(){return _0x7150x1d[_0xc253[34]](201)[_0xc253[33]](_0x7150x3a)})[_0xc253[32]](function(_0x7150x21){console[_0xc253[31]](_0x7150x21);return _0x7150x1e(_0x7150x21)})};exports[_0xc253[121]]= function(_0x7150x1c,_0x7150x1d,_0x7150x1e){var _0x7150x3c=[];var _0x7150x3d={ok:0,ko:0};return Tag[_0xc253[55]]()[_0xc253[35]](function(_0x7150x37){var _0x7150x38=[],_0x7150x40=[];var _0x7150x39=_[_0xc253[42]](_[_0xc253[42]](_0x7150x37,_0xc253[56]),_0xc253[41]);_0x7150x1c[_0xc253[108]][_0xc253[122]][_0xc253[100]](function(_0x7150x2f){if(_0x7150x2f[_0xc253[114]]){_0x7150x40= _[_0xc253[126]](_0x7150x40,_0x7150x2f[_0xc253[114]])}});_0x7150x40[_0xc253[100]](function(_0x7150x27){if(!_[_0xc253[53]](_0x7150x39,_0x7150x27)){_0x7150x38[_0xc253[110]](Tag[_0xc253[106]]({name:_0x7150x27}))}});return _0x7150x38})[_0xc253[113]]()[_0xc253[35]](function(){var _0x7150x3f=[];Async[_0xc253[125]](_0x7150x1c[_0xc253[108]][_0xc253[122]],function(_0x7150x2f){_0x7150x2f[_0xc253[112]]= _0x7150x1c[_0xc253[68]][_0xc253[45]];_0x7150x3f[_0xc253[110]](Contact[_0xc253[106]](_0x7150x2f)[_0xc253[35]](function(_0x7150x2f){_0x7150x3c[_0xc253[110]](_0x7150x2f);_0x7150x3d[_0xc253[124]]++})[_0xc253[32]](function(_0x7150x21){_0x7150x3d[_0xc253[123]]++}))});return _0x7150x3f})[_0xc253[113]]()[_0xc253[35]](function(){return CustomField[_0xc253[55]]({where:{ListId:{$in:_[_0xc253[42]](_0x7150x1c[_0xc253[108]][_0xc253[122]],_0xc253[59])}}})})[_0xc253[35]](function(_0x7150x24){var _0x7150x3e=[];if(_0x7150x24[_0xc253[38]]){var _0x7150x25=[];_0x7150x3c[_0xc253[100]](function(_0x7150x2f){_0x7150x25= [];_0x7150x24[_0xc253[100]](function(_0x7150x27){if(_0x7150x2f[_0xc253[107]](_0x7150x27[_0xc253[41]])){_0x7150x25[_0xc253[110]](util[_0xc253[47]](_0xc253[109],_0x7150x27[_0xc253[41]],_0x7150x1c[_0xc253[108]][_0x7150x27[_0xc253[41]]]))}});if(_0x7150x25[_0xc253[38]]){_0x7150x25= _0x7150x25[_0xc253[40]](_0xc253[39]);_0x7150x3e[_0xc253[110]](sequelize[_0xc253[50]](util[_0xc253[47]](_0xc253[111],_0x7150x25,_0x7150x2f[_0xc253[45]])))}})};return _0x7150x3e})[_0xc253[113]]()[_0xc253[35]](function(){return _0x7150x1d[_0xc253[34]](201)[_0xc253[33]](_0x7150x3d)})[_0xc253[32]](function(_0x7150x21){console[_0xc253[31]](_0x7150x21);return _0x7150x1e(_0x7150x21)})};exports[_0xc253[127]]= function(_0x7150x1c,_0x7150x1d,_0x7150x1e){return Promise[_0xc253[113]]([])[_0xc253[35]](updateContact(_0x7150x1c,_0x7150x1d))[_0xc253[35]](function(_0x7150x2f){return _0x7150x1d[_0xc253[34]](200)[_0xc253[33]](_0x7150x2f)})[_0xc253[32]](function(_0x7150x21){console[_0xc253[31]](_0x7150x21);return handleError(_0x7150x1d,_0x7150x21)})};exports[_0xc253[37]]= function(_0x7150x1c,_0x7150x1d,_0x7150x1e){var _0x7150x30;return Promise[_0xc253[113]]([])[_0xc253[35]](updateContact(_0x7150x1c,_0x7150x1d))[_0xc253[35]](function(_0x7150x2f){_0x7150x30= _0x7150x2f;if(_0x7150x1c[_0xc253[108]][_0xc253[128]]){return Contact[_0xc253[129]]({where:{id:_0x7150x1c[_0xc253[108]][_0xc253[128]]},individualHooks:true})}})[_0xc253[35]](function(){return _0x7150x1d[_0xc253[34]](200)[_0xc253[33]](_0x7150x30)})[_0xc253[32]](function(_0x7150x21){console[_0xc253[31]](_0x7150x21);return handleError(_0x7150x1d,_0x7150x21)})};function updateContact(_0x7150x1c,_0x7150x1d){return function(){var _0x7150x30;return Tag[_0xc253[55]]()[_0xc253[35]](function(_0x7150x37){var _0x7150x38=[];var _0x7150x39=_[_0xc253[42]](_[_0xc253[42]](_0x7150x37,_0xc253[56]),_0xc253[41]);if(_0x7150x1c[_0xc253[108]][_0xc253[114]]){_0x7150x1c[_0xc253[108]][_0xc253[114]][_0xc253[100]](function(_0x7150x27){if(!_[_0xc253[53]](_0x7150x39,_0x7150x27)){_0x7150x38[_0xc253[110]](Tag[_0xc253[106]]({name:_0x7150x27}))}})};return _0x7150x38})[_0xc253[35]](function(){return Contact[_0xc253[69]](_0x7150x1c[_0xc253[98]][_0xc253[45]])})[_0xc253[35]](function(_0x7150x2f){if(!_0x7150x2f){return _0x7150x1d[_0xc253[82]](404)};delete _0x7150x1c[_0xc253[108]][_0xc253[45]];return _0x7150x2f[_0xc253[130]](_0x7150x1c[_0xc253[108]])})[_0xc253[35]](function(_0x7150x2f){_0x7150x30= _0x7150x2f;return CustomField[_0xc253[55]]({where:{ListId:_0x7150x30[_0xc253[59]]}})})[_0xc253[35]](function(_0x7150x24){if(_0x7150x24[_0xc253[38]]){var _0x7150x25=[];_0x7150x24[_0xc253[100]](function(_0x7150x27){if(_0x7150x1c[_0xc253[108]][_0xc253[107]](_0x7150x27[_0xc253[41]])){_0x7150x25[_0xc253[110]](util[_0xc253[47]](_0xc253[109],_0x7150x27[_0xc253[41]],_0x7150x1c[_0xc253[108]][_0x7150x27[_0xc253[41]]]))}});if(_0x7150x25[_0xc253[38]]){_0x7150x25= _0x7150x25[_0xc253[40]](_0xc253[39]);return sequelize[_0xc253[50]](util[_0xc253[47]](_0xc253[111],_0x7150x25,_0x7150x30[_0xc253[45]]))}}})[_0xc253[35]](function(){return _0x7150x30})}}exports[_0xc253[129]]= function(_0x7150x1c,_0x7150x1d){return Contact[_0xc253[69]](_0x7150x1c[_0xc253[98]][_0xc253[45]])[_0xc253[35]](function(_0x7150x35){if(!_0x7150x35){return _0x7150x1d[_0xc253[82]](404)};return _0x7150x35[_0xc253[129]]()})[_0xc253[35]](function(){return _0x7150x1d[_0xc253[82]](204)})[_0xc253[32]](function(_0x7150x21){return handleError(_0x7150x1d,_0x7150x21)})};exports[_0xc253[131]]= function(_0x7150x1c,_0x7150x1d){return Contact[_0xc253[129]]({where:{id:_0x7150x1c[_0xc253[50]][_0xc253[132]]},individualHooks:true})[_0xc253[35]](function(){return _0x7150x1d[_0xc253[82]](204)})[_0xc253[32]](function(_0x7150x21){return handleError(_0x7150x1d,_0x7150x21)})};function handleError(_0x7150x1d,_0x7150x21){return _0x7150x1d[_0xc253[34]](500)[_0xc253[33]](_0x7150x21)} \ No newline at end of file diff --git a/server/api/contact_manager/contact_manager.events.js b/server/api/contact_manager/contact_manager.events.js index dd5bf3e..d558ea3 100644 --- a/server/api/contact_manager/contact_manager.events.js +++ b/server/api/contact_manager/contact_manager.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Contact = require('../../models').Contact; - -var ContactEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ContactEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Contact.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ContactEvents.emit(event + ':' + doc._id, doc); - ContactEvents.emit(event, doc); - done(null); - } -} - -module.exports = ContactEvents; +var _0xd7ae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd7ae[0];const EventEmitter=require(_0xd7ae[1]);const Contact=require(_0xd7ae[3])[_0xd7ae[2]];var ContactEvents= new EventEmitter();ContactEvents[_0xd7ae[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd7ae[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd7ae[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd7ae[6]};for(var e in events){var event=events[e];Contact[_0xd7ae[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5ac9x8,_0x5ac9x9,_0x5ac9xa){ContactEvents[_0xd7ae[10]](event+ _0xd7ae[8]+ _0x5ac9x8[_0xd7ae[9]],_0x5ac9x8);ContactEvents[_0xd7ae[10]](event,_0x5ac9x8);_0x5ac9xa(null)}}module[_0xd7ae[11]]= ContactEvents \ No newline at end of file diff --git a/server/api/contact_manager/contact_manager.socket.js b/server/api/contact_manager/contact_manager.socket.js index 8432549..3105771 100644 --- a/server/api/contact_manager/contact_manager.socket.js +++ b/server/api/contact_manager/contact_manager.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ContactManagerEvents = require('./contact_manager.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('contact_manager:' + event, socket); - - ContactManagerEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ContactManagerEvents.removeListener(event, listener); - }; -} +var _0x4477=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x4477[0];const ContactManagerEvents=require(_0x4477[1]);var events=[_0x4477[2],_0x4477[3]];exports[_0x4477[4]]= function(_0xbfc1x3){for(var _0xbfc1x4=0,_0xbfc1x5=events[_0x4477[5]];_0xbfc1x4< _0xbfc1x5;_0xbfc1x4++){var _0xbfc1x6=events[_0xbfc1x4];var _0xbfc1x7=createListener(_0x4477[6]+ _0xbfc1x6,_0xbfc1x3);ContactManagerEvents[_0x4477[7]](_0xbfc1x6,_0xbfc1x7);_0xbfc1x3[_0x4477[7]](_0x4477[8],removeListener(_0xbfc1x6,_0xbfc1x7))}};function createListener(_0xbfc1x6,_0xbfc1x3){return function(_0xbfc1x9){_0xbfc1x3[_0x4477[9]](_0xbfc1x6,_0xbfc1x9)}}function removeListener(_0xbfc1x6,_0xbfc1x7){return function(){ContactManagerEvents[_0x4477[10]](_0xbfc1x6,_0xbfc1x7)}} \ No newline at end of file diff --git a/server/api/contact_manager/index.js b/server/api/contact_manager/index.js index a17e604..54718cc 100644 --- a/server/api/contact_manager/index.js +++ b/server/api/contact_manager/index.js @@ -1,23 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./contact_manager.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.index); -router.get('/describe', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.describe); -router.get('/:id/checkevent', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.getEventContacts); -router.get('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.show); -router.get('/:id/log', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.getLog); -router.post('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.create); -router.post('/:id/copy', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.copy); -router.post('/:id/merge', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.merge); -router.post('/bulk', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.bulkCreate); -router.put('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.update); -router.delete('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.destroy); - -module.exports = router; +var _0x2e74=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x43\x6D","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B\x65\x76\x65\x6E\x74","\x67\x65\x74\x45\x76\x65\x6E\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x6C\x6F\x67","\x67\x65\x74\x4C\x6F\x67","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x63\x6F\x70\x79","\x63\x6F\x70\x79","\x2F\x3A\x69\x64\x2F\x6D\x65\x72\x67\x65","\x6D\x65\x72\x67\x65","\x2F\x62\x75\x6C\x6B","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x2e74[0];var express=require(_0x2e74[1]);var controller=require(_0x2e74[2]);var auth=require(_0x2e74[3]);var license=require(_0x2e74[4]);var router=express.Router();router[_0x2e74[12]](_0x2e74[5],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8],_0x2e74[9]]),controller[_0x2e74[11]]);router[_0x2e74[12]](_0x2e74[13],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8]]),controller[_0x2e74[14]]);router[_0x2e74[12]](_0x2e74[15],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8],_0x2e74[9]]),controller[_0x2e74[16]]);router[_0x2e74[12]](_0x2e74[17],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8],_0x2e74[9]]),controller[_0x2e74[18]]);router[_0x2e74[12]](_0x2e74[19],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8],_0x2e74[9]]),controller[_0x2e74[20]]);router[_0x2e74[22]](_0x2e74[5],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8],_0x2e74[9]]),controller[_0x2e74[21]]);router[_0x2e74[22]](_0x2e74[23],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8],_0x2e74[9]]),controller[_0x2e74[24]]);router[_0x2e74[22]](_0x2e74[25],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8],_0x2e74[9]]),controller[_0x2e74[26]]);router[_0x2e74[22]](_0x2e74[27],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8]]),controller[_0x2e74[28]]);router[_0x2e74[30]](_0x2e74[17],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8],_0x2e74[9]]),controller[_0x2e74[29]]);router[_0x2e74[32]](_0x2e74[5],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8]]),controller[_0x2e74[31]]);router[_0x2e74[32]](_0x2e74[17],auth[_0x2e74[6]](),license[_0x2e74[7]](),auth[_0x2e74[10]]([5],[_0x2e74[8]]),controller[_0x2e74[33]]);module[_0x2e74[34]]= router \ No newline at end of file diff --git a/server/api/custom_report/custom_report.controller.js b/server/api/custom_report/custom_report.controller.js index b0ead9a..257ddf6 100644 --- a/server/api/custom_report/custom_report.controller.js +++ b/server/api/custom_report/custom_report.controller.js @@ -1,568 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var sequelize = require('../../models').sequelize; -var CustomReport = require('../../models').CustomReport; -var ReportField = require('../../models').ReportField; -var Metric = require('../../models').Metric; -var ExtractedReport = require('../../models').ExtractedReport; -var extractUtils = require('../../utils/report_extraction'); -var reportBuildUtils = require('../../utils/report_build'); -var Util = require('../../config/util'); -var sr = require('simple-random'); -var moment = require('moment'); -var cp = require('child_process'); -var ReportTree = require('../../models').ReportTree; - -// Get list of agents -exports.index = function(req, res, next) { - return CustomReport - .findAndCountAll(Util.getQuery(req.query, { - deletedAt: null - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getReportQuery = function(req, res) { - return Promise - .all([]) - .then(getQuery(req, res)) - .then(function(query) { - if (query) { - switch (query) { - case 'permission': - query = 'no sufficient queue permissions for the user'; - break; - default: - } - } - res.status(200).send({ - query: query - }); - }) - .catch(function(err) { - console.log('Error getting query from api:', err); - }); -} - -function getQuery(req, res) { - var _report; - return function() { - return CustomReport - .scope('fields') - .findById(req.params.id) - .then(function(report) { - console.log('found report'); - if (!report) { - return res.sendStatus(404); - } - if (req.query.daily && req.query.daily === 'true') { - req.query.startDate = moment().format('YYYY-MM-DD'); - req.query.endDate = moment().format('YYYY-MM-DD'); - report.dataValues.table = report.dataValues.table.replace( - '_history', ''); - } - delete req.query.daily; - _report = report.dataValues; - return _report.table; - }) - .then(reportBuildUtils.buildFilter(req.user)) - .then(function(filter) { - return [filter, _report]; - }) - .spread(reportBuildUtils.buildQuery(req.query)) - } -} - -exports.preview = function(req, res) { - var _countAll; - return Promise - .all([]) - .then(getQuery(req, res)) - .then(reportBuildUtils.checkQuery()) - .then(function(results) { - if (results && _.isArray(results)) { - _countAll = results.length; - if (req.query.limit) { - results = _(results).slice(req.query.offset || 0).take(req.query.limit).value(); - } - _.forEach(results, function(row) { - _.forOwn(row, function(property, key) { - if (property instanceof Date) { - row[key] = moment(property).format("YYYY-MM-DD HH:mm:ss").toString(); - } - }); - }); - res.status(200).send({ - rows: results, - count: _countAll - }); - } else { - return handleError(res, { - message: results || 'query error' - }); - } - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.extractPdf = function(req, res) { - // console.log('extractPdf api function'); - docExtract(req, res, 'PDF') -}; - -exports.extractCsv = function(req, res) { - // console.log('extractCsv api function'); - docExtract(req, res, 'CSV'); -}; - -exports.destroyNodeReports = function(req, res) { - return ReportTree - .findById(2) - .then(function(tree) { - tree = JSON.parse(tree.tree); - var node = _.find(tree, { - id: req.params.id - }); - if (!node) { - throw new Error('Node not found'); - } - var nodes = []; - findSubNodes(node, tree, nodes); - return CustomReport - .destroy({ - where: { - parent: nodes - }, - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -function findSubNodes(node, tree, _nodes) { //receive a node, the tree containing the node and an array where to insert all the sub nodes found recursively, including the starting node - _nodes.push(node.id); - var subNodes = _.filter(tree, { - parent: node.id - }); - if (!subNodes || !subNodes.length) { - return; - } - _.forEach(subNodes, function(subNode) { - findSubNodes(subNode, tree, _nodes); - }); -} - -function docExtract(req, res, typeFunction) { - var report; - // console.log('common docExtract api function'); - CustomReport //DO NOT ADD RETURN CAUSE THE EXTRACTING FUNCTION WILL KEEP EXTRACTING AFTER THE API HAS RETURNED - .scope('fields') - .findById(req.params.id) - .then(function(_report) { - if (!_report) { - return res.sendStatus(404); - } - report = _report; - return ReportTree - .findById(2); - }) - .then(function(tree) { - tree = JSON.parse(tree.tree); - var folder = _.find(tree, { - id: report.parent - }); - var path = getReportPath(folder, tree, report.name); - // console.log('found the report, creating the new DB row for extracted reports..'); - //CREATE A DB ROW IN A TABLE WITH THE REPORT INFO, QUERY DATES, AND THE STATUS 'ELABORATING' - if (req.query.daily && req.query.daily === 'true') { - req.query.startDate = moment().format('YYYY-MM-DD'); - req.query.endDate = moment().format('YYYY-MM-DD'); - report.dataValues.table = report.dataValues.table.replace('_history', - ''); - } - delete req.query.daily; - return [report, ExtractedReport.create({ - name: path, - startDate: req.query.startDate ? req.query.startDate + (req.query.startTime ? ' ' + req.query.startTime : '00:00') : null, - endDate: req.query.endDate ? req.query.endDate + (req.query.endTime ? ' ' + req.query.endTime : '23:59') : null, - output: typeFunction, - UserId: req.user.id - })] - }) - .spread(function(report, extractedReport) { - // console.log('created new extracted reports db entry, calling external extraction function: ' + typeFunction); - var child = cp.fork(__dirname + '/../../utils/report_extraction.js'); - child.on('message', function(data) { - console.log('child message', data); - child.kill(); - }).on('close', function() { - console.log('child close'); - }).on('error', function(err) { - console.log('child error', err); - }); - child.send({ - report: report, - query: req.query, - extractedId: extractedReport.id, - user: req.user, - type: typeFunction - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - return res.sendStatus(200); -} - -function getReportPath(folder, tree, path) { - path = folder.text + '/ ' + path; - if (folder.parent === '#') { - return path; - } else { - return getReportPath(_.find(tree, { - id: folder.parent - }), tree, path); - } -} - -// Get a single report -exports.show = function(req, res) { - return CustomReport - .scope('fields') - .findById(req.params.id) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - return res.send(report); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -// Get a single report -exports.export = function(req, res) { - return CustomReport - .scope({ - method: ['exportFields', { - CustomReportId: req.params.id - }] - }) //add where condition on customreport id - .findById(req.params.id, { - attributes: ['conditions', 'description', 'name', 'parent', 'table'] - }) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - return res.send(report); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Copy a custom report -exports.copy = function(req, res) { - var _fields; - return sequelize.transaction(function(t) { - return CustomReport - .scope('fields') - .findById(req.params.id) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - var newReport = report.dataValues; - delete newReport.id; - delete newReport.createdAt; - delete newReport.updatedAt; - newReport.parent = req.body.parent; - _fields = _.map(newReport.Fields, 'dataValues'); - return CustomReport - .create(newReport, { - transaction: t - }); - }) - .then(function(report) { - return [report, _fields]; - }) - .spread(createFields(t)); - }) - .then(function() { - return res.sendStatus(201); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Creates a new report in the DB. -exports.create = function(req, res) { - var _report; - return sequelize.transaction(function(t) { - return CustomReport - .create(req.body, { - transaction: t - }) - .then(function(report) { - _report = report; - return [_report, req.body.Fields]; - }) - .spread(createFields(t)); - }) - .then(function() { - return res.status(201).send(_report); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Import a report in the DB. -exports.import = function(req, res) { - var _report; - return sequelize.transaction(function(t) { - return CustomReport - .create(req.body, { - transaction: t - }) - .then(function(report) { - _report = report; - return [_report, req.body.Fields]; - }) - .spread(createImportFields(t)); - }) - .then(function() { - return res.status(201).send(_report); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.update = function(req, res, next) { - if (req.body.id) { - delete req.body.id; - } - var _report; - return sequelize.transaction(function(t) { - return CustomReport - .findById(req.params.id) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - var updated = _.merge(report, req.body); - return report - .save({ - transaction: t - }); - }) - .then(function(report) { - _report = report; - if (req.body.Fields) { - return ReportField.destroy({ - where: { - CustomReportId: req.params.id - }, - transaction: t - }); - } - }) - .then(function() { - return [_report, req.body.Fields]; - }) - .spread(createFields(t)); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -} - -function createFields(t) { - return function(report, fields) { - if (fields && Array.isArray(fields) && fields.length) { - var tableModel = reportBuildUtils.getTable(report.table); - if (tableModel) { - var _tableFields; - return tableModel - .describe() - .then(function(tableFields) { - _tableFields = _.keys(tableFields); - return Metric - .findAll(); - }) - .then(function(metrics) { - var bulkFields = []; - metrics = _.map(metrics, 'dataValues'); - fields.forEach(function(elem) { - elem.CustomReportId = report.id; - if (elem.MetricId) { - var metric = _.find(metrics, { - id: elem.MetricId - }); - if (metric) { - elem.field = metric.metric; - bulkFields.push(ReportField - .create(elem, { - transaction: t - })); - } else { - throw new sequelize.Error("The metric with id " + - elem.MetricId + " you specified does not exist"); - } - } else { - if (_.includes(_tableFields, elem.field) || elem.custom) { - bulkFields.push(ReportField - .create(elem, { - transaction: t - })); - } else { - throw new sequelize.Error("The field " + elem.field + - " you specified does not exist in the table"); - } - } - }); - return bulkFields; - }) - .all(); - } else { - throw new sequelize.Error( - "You have not specified the table or the table does not exist"); - } - } - } -} - -function createImportFields(t) { - return function(report, fields) { - if (fields && Array.isArray(fields) && fields.length) { - var tableModel = reportBuildUtils.getTable(report.table); - if (tableModel) { - var _tableFields; - return tableModel - .describe() - .then(function(tableFields) { - _tableFields = _.keys(tableFields); - var bulkFields = []; - var type; - if (_.every(fields, function(elem) { - return _.has(elem, 'DefaultMetricId'); - })) { - type = 'DefaultMetric' - } else if (_.every(fields, function(elem) { - return _.has(elem, 'MetricId'); - })) { - type = 'Metric' - } else { - throw new sequelize.Error("Unsupported Import format (Metric type in report fields is missing)"); - } - var groupedFields = _.groupBy(fields, type + 'Id'); - _.forOwn(groupedFields, function(value, key) { - if (key !== 'undefined' && key !== 'null') { - value[0][type].ReportFields.forEach(function(elem) { - elem.CustomReportId = report.id; - }); - value[0][type].name += '_' + sr({ - length: 5 - }); - bulkFields.push(Metric - .create(value[0][type], { - include: [{ - model: ReportField, - as: 'ReportFields' - }], - transaction: t - })); - } else { - value.forEach(function(elem) { - if (_.includes(_tableFields, elem.field) || elem.custom) { - elem.CustomReportId = report.id; - bulkFields.push(ReportField - .create(elem, { - transaction: t - })); - } else { - throw new sequelize.Error("The field " + elem.field + - " you specified does not exist in the table" - ); - } - }); - } - }); - return bulkFields; - }) - .all(); - } else { - throw new sequelize.Error( - "You have not specified the table or the table does not exist"); - } - } - } -} - - -// Deletes a report from the DB. -exports.destroy = function(req, res) { - return CustomReport - .findById(req.params.id) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - return report.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroy = function(req, res) { - return CustomReport - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x17d3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x6D\x6F\x6D\x65\x6E\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x67\x65\x74\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x72\x79","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x71\x75\x65\x72\x79\x20\x66\x72\x6F\x6D\x20\x61\x70\x69\x3A","\x6C\x6F\x67","\x6E\x6F\x20\x73\x75\x66\x66\x69\x63\x69\x65\x6E\x74\x20\x71\x75\x65\x75\x65\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E","\x61\x6C\x6C","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x75\x73\x65\x72","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x64\x61\x69\x6C\x79","\x74\x72\x75\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x66\x6F\x72\x6D\x61\x74","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x68\x69\x73\x74\x6F\x72\x79","","\x72\x65\x70\x6C\x61\x63\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x70\x72\x65\x76\x69\x65\x77","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x64\x65\x73\x74\x72\x6F\x79\x4E\x6F\x64\x65\x52\x65\x70\x6F\x72\x74\x73","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\x4E\x6F\x64\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x70\x75\x73\x68","\x66\x69\x6C\x74\x65\x72","\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6A\x73","\x66\x6F\x72\x6B","\x65\x72\x72\x6F\x72","\x63\x68\x69\x6C\x64\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x63\x68\x69\x6C\x64\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x69\x6C\x64\x20\x6D\x65\x73\x73\x61\x67\x65","\x6B\x69\x6C\x6C","\x70\x61\x72\x65\x6E\x74","\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x54\x69\x6D\x65","\x20","\x30\x30\x3A\x30\x30","\x65\x6E\x64\x54\x69\x6D\x65","\x32\x33\x3A\x35\x39","\x63\x72\x65\x61\x74\x65","\x74\x65\x78\x74","\x2F\x20","\x23","\x73\x68\x6F\x77","\x65\x78\x70\x6F\x72\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x73","\x69\x6D\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x67\x65\x74\x54\x61\x62\x6C\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x4D\x65\x74\x72\x69\x63\x49\x64","\x66\x69\x65\x6C\x64","\x6D\x65\x74\x72\x69\x63","\x54\x68\x65\x20\x6D\x65\x74\x72\x69\x63\x20\x77\x69\x74\x68\x20\x69\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x75\x73\x74\x6F\x6D","\x54\x68\x65\x20\x66\x69\x65\x6C\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x59\x6F\x75\x20\x68\x61\x76\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x6F\x72\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x68\x61\x73","\x65\x76\x65\x72\x79","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x55\x6E\x73\x75\x70\x70\x6F\x72\x74\x65\x64\x20\x49\x6D\x70\x6F\x72\x74\x20\x66\x6F\x72\x6D\x61\x74\x20\x28\x4D\x65\x74\x72\x69\x63\x20\x74\x79\x70\x65\x20\x69\x6E\x20\x72\x65\x70\x6F\x72\x74\x20\x66\x69\x65\x6C\x64\x73\x20\x69\x73\x20\x6D\x69\x73\x73\x69\x6E\x67\x29","\x49\x64","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x5F","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x17d3[0];var _=require(_0x17d3[1]);var util=require(_0x17d3[2]);var sequelize=require(_0x17d3[4])[_0x17d3[3]];var CustomReport=require(_0x17d3[4])[_0x17d3[5]];var ReportField=require(_0x17d3[4])[_0x17d3[6]];var Metric=require(_0x17d3[4])[_0x17d3[7]];var ExtractedReport=require(_0x17d3[4])[_0x17d3[8]];var extractUtils=require(_0x17d3[9]);var reportBuildUtils=require(_0x17d3[10]);var Util=require(_0x17d3[11]);var sr=require(_0x17d3[12]);var moment=require(_0x17d3[13]);var cp=require(_0x17d3[14]);var ReportTree=require(_0x17d3[4])[_0x17d3[15]];exports[_0x17d3[16]]= function(_0x1e29xf,_0x1e29x10,_0x1e29x11){return CustomReport[_0x17d3[23]](Util[_0x17d3[22]](_0x1e29xf[_0x17d3[21]],{deletedAt:null}))[_0x17d3[20]](function(_0x1e29x13){_0x1e29x10[_0x17d3[19]](200)[_0x17d3[18]](_0x1e29x13)})[_0x17d3[17]](function(_0x1e29x12){return handleError(_0x1e29x10,_0x1e29x12)})};exports[_0x17d3[24]]= function(_0x1e29xf,_0x1e29x10){return Promise[_0x17d3[29]]([])[_0x17d3[20]](getQuery(_0x1e29xf,_0x1e29x10))[_0x17d3[20]](function(_0x1e29x14){if(_0x1e29x14){switch(_0x1e29x14){case _0x17d3[28]:_0x1e29x14= _0x17d3[27];break;default:}};_0x1e29x10[_0x17d3[19]](200)[_0x17d3[18]]({query:_0x1e29x14})})[_0x17d3[17]](function(_0x1e29x12){console[_0x17d3[26]](_0x17d3[25],_0x1e29x12)})};function getQuery(_0x1e29xf,_0x1e29x10){var _0x1e29x16;return function(){return CustomReport[_0x17d3[51]](_0x17d3[50])[_0x17d3[49]](_0x1e29xf[_0x17d3[48]][_0x17d3[47]])[_0x17d3[20]](function(_0x1e29x18){console[_0x17d3[26]](_0x17d3[34]);if(!_0x1e29x18){return _0x1e29x10[_0x17d3[35]](404)};if(_0x1e29xf[_0x17d3[21]][_0x17d3[36]]&& _0x1e29xf[_0x17d3[21]][_0x17d3[36]]=== _0x17d3[37]){_0x1e29xf[_0x17d3[21]][_0x17d3[38]]= moment()[_0x17d3[40]](_0x17d3[39]);_0x1e29xf[_0x17d3[21]][_0x17d3[41]]= moment()[_0x17d3[40]](_0x17d3[39]);_0x1e29x18[_0x17d3[43]][_0x17d3[42]]= _0x1e29x18[_0x17d3[43]][_0x17d3[42]][_0x17d3[46]](_0x17d3[44],_0x17d3[45])};delete _0x1e29xf[_0x17d3[21]][_0x17d3[36]];_0x1e29x16= _0x1e29x18[_0x17d3[43]];return _0x1e29x16[_0x17d3[42]]})[_0x17d3[20]](reportBuildUtils[_0x17d3[33]](_0x1e29xf[_0x17d3[32]]))[_0x17d3[20]](function(_0x1e29x17){return [_0x1e29x17,_0x1e29x16]})[_0x17d3[31]](reportBuildUtils[_0x17d3[30]](_0x1e29xf[_0x17d3[21]]))}}exports[_0x17d3[52]]= function(_0x1e29xf,_0x1e29x10){var _0x1e29x19;return Promise[_0x17d3[29]]([])[_0x17d3[20]](getQuery(_0x1e29xf,_0x1e29x10))[_0x17d3[20]](reportBuildUtils[_0x17d3[64]]())[_0x17d3[20]](function(_0x1e29x1a){if(_0x1e29x1a&& _[_0x17d3[53]](_0x1e29x1a)){_0x1e29x19= _0x1e29x1a[_0x17d3[54]];if(_0x1e29xf[_0x17d3[21]][_0x17d3[55]]){_0x1e29x1a= _(_0x1e29x1a)[_0x17d3[59]](_0x1e29xf[_0x17d3[21]][_0x17d3[58]]|| 0)[_0x17d3[57]](_0x1e29xf[_0x17d3[21]][_0x17d3[55]])[_0x17d3[56]]()};_[_0x17d3[62]](_0x1e29x1a,function(_0x1e29x1b){_[_0x17d3[61]](_0x1e29x1b,function(_0x1e29x1c,_0x1e29x1d){if(_0x1e29x1c instanceof Date){_0x1e29x1b[_0x1e29x1d]= moment(_0x1e29x1c)[_0x17d3[40]](_0x17d3[60]).toString()}})});_0x1e29x10[_0x17d3[19]](200)[_0x17d3[18]]({rows:_0x1e29x1a,count:_0x1e29x19})}else {return handleError(_0x1e29x10,{message:_0x1e29x1a|| _0x17d3[63]})}})[_0x17d3[17]](function(_0x1e29x12){console[_0x17d3[26]](_0x1e29x12);return handleError(_0x1e29x10,_0x1e29x12)})};exports[_0x17d3[65]]= function(_0x1e29xf,_0x1e29x10){docExtract(_0x1e29xf,_0x1e29x10,_0x17d3[66])};exports[_0x17d3[67]]= function(_0x1e29xf,_0x1e29x10){docExtract(_0x1e29xf,_0x1e29x10,_0x17d3[68])};exports[_0x17d3[69]]= function(_0x1e29xf,_0x1e29x10){return ReportTree[_0x17d3[49]](2)[_0x17d3[20]](function(_0x1e29x1e){_0x1e29x1e= JSON[_0x17d3[71]](_0x1e29x1e[_0x17d3[70]]);var _0x1e29x1f=_[_0x17d3[72]](_0x1e29x1e,{id:_0x1e29xf[_0x17d3[48]][_0x17d3[47]]});if(!_0x1e29x1f){throw new Error(_0x17d3[73])};var _0x1e29x20=[];findSubNodes(_0x1e29x1f,_0x1e29x1e,_0x1e29x20);return CustomReport[_0x17d3[74]]({where:{parent:_0x1e29x20},individualHooks:true})})[_0x17d3[20]](function(){return _0x1e29x10[_0x17d3[35]](200)})[_0x17d3[17]](function(_0x1e29x12){console[_0x17d3[26]](_0x1e29x12);return handleError(_0x1e29x10,_0x1e29x12)})};function findSubNodes(_0x1e29x1f,_0x1e29x1e,_0x1e29x22){_0x1e29x22[_0x17d3[75]](_0x1e29x1f[_0x17d3[47]]);var _0x1e29x23=_[_0x17d3[76]](_0x1e29x1e,{parent:_0x1e29x1f[_0x17d3[47]]});if(!_0x1e29x23|| !_0x1e29x23[_0x17d3[54]]){return};_[_0x17d3[62]](_0x1e29x23,function(_0x1e29x24){findSubNodes(_0x1e29x24,_0x1e29x1e,_0x1e29x22)})}function docExtract(_0x1e29xf,_0x1e29x10,_0x1e29x26){var _0x1e29x18;CustomReport[_0x17d3[51]](_0x17d3[50])[_0x17d3[49]](_0x1e29xf[_0x17d3[48]][_0x17d3[47]])[_0x17d3[20]](function(_0x1e29x16){if(!_0x1e29x16){return _0x1e29x10[_0x17d3[35]](404)};_0x1e29x18= _0x1e29x16;return ReportTree[_0x17d3[49]](2)})[_0x17d3[20]](function(_0x1e29x1e){_0x1e29x1e= JSON[_0x17d3[71]](_0x1e29x1e[_0x17d3[70]]);var _0x1e29x2a=_[_0x17d3[72]](_0x1e29x1e,{id:_0x1e29x18[_0x17d3[87]]});var _0x1e29x2b=getReportPath(_0x1e29x2a,_0x1e29x1e,_0x1e29x18[_0x17d3[88]]);if(_0x1e29xf[_0x17d3[21]][_0x17d3[36]]&& _0x1e29xf[_0x17d3[21]][_0x17d3[36]]=== _0x17d3[37]){_0x1e29xf[_0x17d3[21]][_0x17d3[38]]= moment()[_0x17d3[40]](_0x17d3[39]);_0x1e29xf[_0x17d3[21]][_0x17d3[41]]= moment()[_0x17d3[40]](_0x17d3[39]);_0x1e29x18[_0x17d3[43]][_0x17d3[42]]= _0x1e29x18[_0x17d3[43]][_0x17d3[42]][_0x17d3[46]](_0x17d3[44],_0x17d3[45])};delete _0x1e29xf[_0x17d3[21]][_0x17d3[36]];return [_0x1e29x18,ExtractedReport[_0x17d3[94]]({name:_0x1e29x2b,startDate:_0x1e29xf[_0x17d3[21]][_0x17d3[38]]?_0x1e29xf[_0x17d3[21]][_0x17d3[38]]+ (_0x1e29xf[_0x17d3[21]][_0x17d3[89]]?_0x17d3[90]+ _0x1e29xf[_0x17d3[21]][_0x17d3[89]]:_0x17d3[91]):null,endDate:_0x1e29xf[_0x17d3[21]][_0x17d3[41]]?_0x1e29xf[_0x17d3[21]][_0x17d3[41]]+ (_0x1e29xf[_0x17d3[21]][_0x17d3[92]]?_0x17d3[90]+ _0x1e29xf[_0x17d3[21]][_0x17d3[92]]:_0x17d3[93]):null,output:_0x1e29x26,UserId:_0x1e29xf[_0x17d3[32]][_0x17d3[47]]})]})[_0x17d3[31]](function(_0x1e29x18,_0x1e29x27){var _0x1e29x28=cp[_0x17d3[78]](__dirname+ _0x17d3[77]);_0x1e29x28[_0x17d3[81]](_0x17d3[84],function(_0x1e29x29){console[_0x17d3[26]](_0x17d3[85],_0x1e29x29);_0x1e29x28[_0x17d3[86]]()})[_0x17d3[81]](_0x17d3[82],function(){console[_0x17d3[26]](_0x17d3[83])})[_0x17d3[81]](_0x17d3[79],function(_0x1e29x12){console[_0x17d3[26]](_0x17d3[80],_0x1e29x12)});_0x1e29x28[_0x17d3[18]]({report:_0x1e29x18,query:_0x1e29xf[_0x17d3[21]],extractedId:_0x1e29x27[_0x17d3[47]],user:_0x1e29xf[_0x17d3[32]],type:_0x1e29x26})})[_0x17d3[17]](function(_0x1e29x12){console[_0x17d3[26]](_0x1e29x12);return handleError(_0x1e29x10,_0x1e29x12)});return _0x1e29x10[_0x17d3[35]](200)}function getReportPath(_0x1e29x2a,_0x1e29x1e,_0x1e29x2b){_0x1e29x2b= _0x1e29x2a[_0x17d3[95]]+ _0x17d3[96]+ _0x1e29x2b;if(_0x1e29x2a[_0x17d3[87]]=== _0x17d3[97]){return _0x1e29x2b}else {return getReportPath(_[_0x17d3[72]](_0x1e29x1e,{id:_0x1e29x2a[_0x17d3[87]]}),_0x1e29x1e,_0x1e29x2b)}}exports[_0x17d3[98]]= function(_0x1e29xf,_0x1e29x10){return CustomReport[_0x17d3[51]](_0x17d3[50])[_0x17d3[49]](_0x1e29xf[_0x17d3[48]][_0x17d3[47]])[_0x17d3[20]](function(_0x1e29x18){if(!_0x1e29x18){return _0x1e29x10[_0x17d3[35]](404)};return _0x1e29x10[_0x17d3[18]](_0x1e29x18)})[_0x17d3[17]](function(_0x1e29x12){return handleError(_0x1e29x10,_0x1e29x12)})};exports[_0x17d3[99]]= function(_0x1e29xf,_0x1e29x10){return CustomReport[_0x17d3[51]]({method:[_0x17d3[102],{CustomReportId:_0x1e29xf[_0x17d3[48]][_0x17d3[47]]}]})[_0x17d3[49]](_0x1e29xf[_0x17d3[48]][_0x17d3[47]],{attributes:[_0x17d3[100],_0x17d3[101],_0x17d3[88],_0x17d3[87],_0x17d3[42]]})[_0x17d3[20]](function(_0x1e29x18){if(!_0x1e29x18){return _0x1e29x10[_0x17d3[35]](404)};return _0x1e29x10[_0x17d3[18]](_0x1e29x18)})[_0x17d3[17]](function(_0x1e29x12){return handleError(_0x1e29x10,_0x1e29x12)})};exports[_0x17d3[103]]= function(_0x1e29xf,_0x1e29x10){var _0x1e29x2d;return sequelize[_0x17d3[108]](function(_0x1e29x2e){return CustomReport[_0x17d3[51]](_0x17d3[50])[_0x17d3[49]](_0x1e29xf[_0x17d3[48]][_0x17d3[47]])[_0x17d3[20]](function(_0x1e29x18){if(!_0x1e29x18){return _0x1e29x10[_0x17d3[35]](404)};var _0x1e29x2f=_0x1e29x18[_0x17d3[43]];delete _0x1e29x2f[_0x17d3[47]];delete _0x1e29x2f[_0x17d3[104]];delete _0x1e29x2f[_0x17d3[105]];_0x1e29x2f[_0x17d3[87]]= _0x1e29xf[_0x17d3[106]][_0x17d3[87]];_0x1e29x2d= _[_0x17d3[107]](_0x1e29x2f.Fields,_0x17d3[43]);return CustomReport[_0x17d3[94]](_0x1e29x2f,{transaction:_0x1e29x2e})})[_0x17d3[20]](function(_0x1e29x18){return [_0x1e29x18,_0x1e29x2d]})[_0x17d3[31]](createFields(_0x1e29x2e))})[_0x17d3[20]](function(){return _0x1e29x10[_0x17d3[35]](201)})[_0x17d3[17]](function(_0x1e29x12){console[_0x17d3[26]](_0x1e29x12);return handleError(_0x1e29x10,_0x1e29x12)})};exports[_0x17d3[94]]= function(_0x1e29xf,_0x1e29x10){var _0x1e29x16;return sequelize[_0x17d3[108]](function(_0x1e29x2e){return CustomReport[_0x17d3[94]](_0x1e29xf[_0x17d3[106]],{transaction:_0x1e29x2e})[_0x17d3[20]](function(_0x1e29x18){_0x1e29x16= _0x1e29x18;return [_0x1e29x16,_0x1e29xf[_0x17d3[106]][_0x17d3[109]]]})[_0x17d3[31]](createFields(_0x1e29x2e))})[_0x17d3[20]](function(){return _0x1e29x10[_0x17d3[19]](201)[_0x17d3[18]](_0x1e29x16)})[_0x17d3[17]](function(_0x1e29x12){console[_0x17d3[26]](_0x1e29x12);return handleError(_0x1e29x10,_0x1e29x12)})};exports[_0x17d3[110]]= function(_0x1e29xf,_0x1e29x10){var _0x1e29x16;return sequelize[_0x17d3[108]](function(_0x1e29x2e){return CustomReport[_0x17d3[94]](_0x1e29xf[_0x17d3[106]],{transaction:_0x1e29x2e})[_0x17d3[20]](function(_0x1e29x18){_0x1e29x16= _0x1e29x18;return [_0x1e29x16,_0x1e29xf[_0x17d3[106]][_0x17d3[109]]]})[_0x17d3[31]](createImportFields(_0x1e29x2e))})[_0x17d3[20]](function(){return _0x1e29x10[_0x17d3[19]](201)[_0x17d3[18]](_0x1e29x16)})[_0x17d3[17]](function(_0x1e29x12){console[_0x17d3[26]](_0x1e29x12);return handleError(_0x1e29x10,_0x1e29x12)})};exports[_0x17d3[111]]= function(_0x1e29xf,_0x1e29x10,_0x1e29x11){if(_0x1e29xf[_0x17d3[106]][_0x17d3[47]]){delete _0x1e29xf[_0x17d3[106]][_0x17d3[47]]};var _0x1e29x16;return sequelize[_0x17d3[108]](function(_0x1e29x2e){return CustomReport[_0x17d3[49]](_0x1e29xf[_0x17d3[48]][_0x17d3[47]])[_0x17d3[20]](function(_0x1e29x18){if(!_0x1e29x18){return _0x1e29x10[_0x17d3[35]](404)};var _0x1e29x30=_[_0x17d3[112]](_0x1e29x18,_0x1e29xf[_0x17d3[106]]);return _0x1e29x18[_0x17d3[113]]({transaction:_0x1e29x2e})})[_0x17d3[20]](function(_0x1e29x18){_0x1e29x16= _0x1e29x18;if(_0x1e29xf[_0x17d3[106]][_0x17d3[109]]){return ReportField[_0x17d3[74]]({where:{CustomReportId:_0x1e29xf[_0x17d3[48]][_0x17d3[47]]},transaction:_0x1e29x2e})}})[_0x17d3[20]](function(){return [_0x1e29x16,_0x1e29xf[_0x17d3[106]][_0x17d3[109]]]})[_0x17d3[31]](createFields(_0x1e29x2e))})[_0x17d3[20]](function(){return _0x1e29x10[_0x17d3[35]](200)})[_0x17d3[17]](function(_0x1e29x12){console[_0x17d3[26]](_0x1e29x12);return handleError(_0x1e29x10,_0x1e29x12)})};function createFields(_0x1e29x2e){return function(_0x1e29x18,_0x1e29x32){if(_0x1e29x32&& Array[_0x17d3[53]](_0x1e29x32)&& _0x1e29x32[_0x17d3[54]]){var _0x1e29x33=reportBuildUtils[_0x17d3[114]](_0x1e29x18[_0x17d3[42]]);if(_0x1e29x33){var _0x1e29x34;return _0x1e29x33[_0x17d3[127]]()[_0x17d3[20]](function(_0x1e29x39){_0x1e29x34= _[_0x17d3[125]](_0x1e29x39);return Metric[_0x17d3[126]]()})[_0x17d3[20]](function(_0x1e29x35){var _0x1e29x36=[];_0x1e29x35= _[_0x17d3[107]](_0x1e29x35,_0x17d3[43]);_0x1e29x32[_0x17d3[62]](function(_0x1e29x37){_0x1e29x37[_0x17d3[115]]= _0x1e29x18[_0x17d3[47]];if(_0x1e29x37[_0x17d3[116]]){var _0x1e29x38=_[_0x17d3[72]](_0x1e29x35,{id:_0x1e29x37[_0x17d3[116]]});if(_0x1e29x38){_0x1e29x37[_0x17d3[117]]= _0x1e29x38[_0x17d3[118]];_0x1e29x36[_0x17d3[75]](ReportField[_0x17d3[94]](_0x1e29x37,{transaction:_0x1e29x2e}))}else {throw new sequelize.Error(_0x17d3[119]+ _0x1e29x37[_0x17d3[116]]+ _0x17d3[120])}}else {if(_[_0x17d3[121]](_0x1e29x34,_0x1e29x37[_0x17d3[117]])|| _0x1e29x37[_0x17d3[122]]){_0x1e29x36[_0x17d3[75]](ReportField[_0x17d3[94]](_0x1e29x37,{transaction:_0x1e29x2e}))}else {throw new sequelize.Error(_0x17d3[123]+ _0x1e29x37[_0x17d3[117]]+ _0x17d3[124])}}});return _0x1e29x36})[_0x17d3[29]]()}else {throw new sequelize.Error(_0x17d3[128])}}}}function createImportFields(_0x1e29x2e){return function(_0x1e29x18,_0x1e29x32){if(_0x1e29x32&& Array[_0x17d3[53]](_0x1e29x32)&& _0x1e29x32[_0x17d3[54]]){var _0x1e29x33=reportBuildUtils[_0x17d3[114]](_0x1e29x18[_0x17d3[42]]);if(_0x1e29x33){var _0x1e29x34;return _0x1e29x33[_0x17d3[127]]()[_0x17d3[20]](function(_0x1e29x39){_0x1e29x34= _[_0x17d3[125]](_0x1e29x39);var _0x1e29x36=[];var _0x1e29x3b;if(_[_0x17d3[131]](_0x1e29x32,function(_0x1e29x37){return _[_0x17d3[130]](_0x1e29x37,_0x17d3[129])})){_0x1e29x3b= _0x17d3[132]}else {if(_[_0x17d3[131]](_0x1e29x32,function(_0x1e29x37){return _[_0x17d3[130]](_0x1e29x37,_0x17d3[116])})){_0x1e29x3b= _0x17d3[7]}else {throw new sequelize.Error(_0x17d3[133])}};var _0x1e29x3c=_[_0x17d3[135]](_0x1e29x32,_0x1e29x3b+ _0x17d3[134]);_[_0x17d3[61]](_0x1e29x3c,function(_0x1e29x3d,_0x1e29x1d){if(_0x1e29x1d!== _0x17d3[136]&& _0x1e29x1d!== _0x17d3[137]){_0x1e29x3d[0][_0x1e29x3b][_0x17d3[138]][_0x17d3[62]](function(_0x1e29x37){_0x1e29x37[_0x17d3[115]]= _0x1e29x18[_0x17d3[47]]});_0x1e29x3d[0][_0x1e29x3b][_0x17d3[88]]+= _0x17d3[139]+ sr({length:5});_0x1e29x36[_0x17d3[75]](Metric[_0x17d3[94]](_0x1e29x3d[0][_0x1e29x3b],{include:[{model:ReportField,as:_0x17d3[138]}],transaction:_0x1e29x2e}))}else {_0x1e29x3d[_0x17d3[62]](function(_0x1e29x37){if(_[_0x17d3[121]](_0x1e29x34,_0x1e29x37[_0x17d3[117]])|| _0x1e29x37[_0x17d3[122]]){_0x1e29x37[_0x17d3[115]]= _0x1e29x18[_0x17d3[47]];_0x1e29x36[_0x17d3[75]](ReportField[_0x17d3[94]](_0x1e29x37,{transaction:_0x1e29x2e}))}else {throw new sequelize.Error(_0x17d3[123]+ _0x1e29x37[_0x17d3[117]]+ _0x17d3[124])}})}});return _0x1e29x36})[_0x17d3[29]]()}else {throw new sequelize.Error(_0x17d3[128])}}}}exports[_0x17d3[74]]= function(_0x1e29xf,_0x1e29x10){return CustomReport[_0x17d3[49]](_0x1e29xf[_0x17d3[48]][_0x17d3[47]])[_0x17d3[20]](function(_0x1e29x18){if(!_0x1e29x18){return _0x1e29x10[_0x17d3[35]](404)};return _0x1e29x18[_0x17d3[74]]()})[_0x17d3[20]](function(){return _0x1e29x10[_0x17d3[35]](204)})[_0x17d3[17]](function(_0x1e29x12){return handleError(_0x1e29x10,_0x1e29x12)})};exports[_0x17d3[140]]= function(_0x1e29xf,_0x1e29x10){return CustomReport[_0x17d3[74]]({where:{id:_0x1e29xf[_0x17d3[21]][_0x17d3[141]]},individualHooks:true})[_0x17d3[20]](function(){return _0x1e29x10[_0x17d3[35]](204)})[_0x17d3[17]](function(_0x1e29x12){return handleError(_0x1e29x10,_0x1e29x12)})};function handleError(_0x1e29x10,_0x1e29x12){return _0x1e29x10[_0x17d3[19]](500)[_0x17d3[18]](_0x1e29x12)} \ No newline at end of file diff --git a/server/api/custom_report/custom_report.events.js b/server/api/custom_report/custom_report.events.js index ac4b9d7..98a532e 100644 --- a/server/api/custom_report/custom_report.events.js +++ b/server/api/custom_report/custom_report.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const CustomReport = require('../../models').CustomReport; - -var CustomReportEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -CustomReportEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - CustomReport.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - CustomReportEvents.emit(event + ':' + doc._id, doc); - CustomReportEvents.emit(event, doc); - done(null); - } -} - -module.exports = CustomReportEvents; +var _0x876c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x876c[0];const EventEmitter=require(_0x876c[1]);const CustomReport=require(_0x876c[3])[_0x876c[2]];var CustomReportEvents= new EventEmitter();CustomReportEvents[_0x876c[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x876c[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x876c[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x876c[6]};for(var e in events){var event=events[e];CustomReport[_0x876c[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x15b9x8,_0x15b9x9,_0x15b9xa){CustomReportEvents[_0x876c[10]](event+ _0x876c[8]+ _0x15b9x8[_0x876c[9]],_0x15b9x8);CustomReportEvents[_0x876c[10]](event,_0x15b9x8);_0x15b9xa(null)}}module[_0x876c[11]]= CustomReportEvents \ No newline at end of file diff --git a/server/api/custom_report/custom_report.socket.js b/server/api/custom_report/custom_report.socket.js index ab9086c..26be116 100644 --- a/server/api/custom_report/custom_report.socket.js +++ b/server/api/custom_report/custom_report.socket.js @@ -1,28 +1 @@ -'use strict'; - -const CustomReportEvents = require('./custom_report.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('custom_report:' + event, socket); - - CustomReportEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - CustomReportEvents.removeListener(event, listener); - }; -} +var _0x6509=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x6509[0];const CustomReportEvents=require(_0x6509[1]);var events=[_0x6509[2],_0x6509[3]];exports[_0x6509[4]]= function(_0xb35bx3){for(var _0xb35bx4=0,_0xb35bx5=events[_0x6509[5]];_0xb35bx4< _0xb35bx5;_0xb35bx4++){var _0xb35bx6=events[_0xb35bx4];var _0xb35bx7=createListener(_0x6509[6]+ _0xb35bx6,_0xb35bx3);CustomReportEvents[_0x6509[7]](_0xb35bx6,_0xb35bx7);_0xb35bx3[_0x6509[7]](_0x6509[8],removeListener(_0xb35bx6,_0xb35bx7))}};function createListener(_0xb35bx6,_0xb35bx3){return function(_0xb35bx9){_0xb35bx3[_0x6509[9]](_0xb35bx6,_0xb35bx9)}}function removeListener(_0xb35bx6,_0xb35bx7){return function(){CustomReportEvents[_0x6509[10]](_0xb35bx6,_0xb35bx7)}} \ No newline at end of file diff --git a/server/api/custom_report/index.js b/server/api/custom_report/index.js index cf6aa62..478de3b 100644 --- a/server/api/custom_report/index.js +++ b/server/api/custom_report/index.js @@ -1,24 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./custom_report.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index); -router.get('/:id/preview', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.preview); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.show); -router.get('/:id/query', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.getReportQuery); -router.get('/:id/export', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.export); -router.post('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.create); -router.get('/:id/extract/pdf', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.extractPdf); -router.get('/:id/extract/csv', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.extractCsv); -router.post('/import', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.import); -router.post('/:id/copy', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.copy); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.bulkDestroy); -router.delete('/node/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.destroyNodeReports); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.destroy); - -module.exports = router; +var _0x6b96=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x70\x72\x65\x76\x69\x65\x77","\x70\x72\x65\x76\x69\x65\x77","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x72\x79","\x67\x65\x74\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x72\x79","\x2F\x3A\x69\x64\x2F\x65\x78\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x70\x64\x66","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x63\x73\x76","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x2F\x69\x6D\x70\x6F\x72\x74","\x69\x6D\x70\x6F\x72\x74","\x2F\x3A\x69\x64\x2F\x63\x6F\x70\x79","\x63\x6F\x70\x79","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x2F\x6E\x6F\x64\x65\x2F\x3A\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x4E\x6F\x64\x65\x52\x65\x70\x6F\x72\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x6b96[0];var express=require(_0x6b96[1]);var controller=require(_0x6b96[2]);var auth=require(_0x6b96[3]);var router=express.Router();router[_0x6b96[9]](_0x6b96[4],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[8]]);router[_0x6b96[9]](_0x6b96[10],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[11]]);router[_0x6b96[9]](_0x6b96[12],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[13]]);router[_0x6b96[9]](_0x6b96[14],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[15]]);router[_0x6b96[9]](_0x6b96[16],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[17]]);router[_0x6b96[19]](_0x6b96[4],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[18]]);router[_0x6b96[9]](_0x6b96[20],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[21]]);router[_0x6b96[9]](_0x6b96[22],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[23]]);router[_0x6b96[19]](_0x6b96[24],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[25]]);router[_0x6b96[19]](_0x6b96[26],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[27]]);router[_0x6b96[29]](_0x6b96[12],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[28]]);router[_0x6b96[31]](_0x6b96[4],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[30]]);router[_0x6b96[31]](_0x6b96[32],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[33]]);router[_0x6b96[31]](_0x6b96[12],auth[_0x6b96[5]](),auth[_0x6b96[7]]([17],[_0x6b96[6]]),controller[_0x6b96[34]]);module[_0x6b96[35]]= router \ No newline at end of file diff --git a/server/api/dashboard/dashboard.controller.js b/server/api/dashboard/dashboard.controller.js index 9a1998e..288b5f3 100644 --- a/server/api/dashboard/dashboard.controller.js +++ b/server/api/dashboard/dashboard.controller.js @@ -1,320 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var Util = require('../../config/util'); - -var Dashboard = require('../../models').Dashboard; -var VoiceQueue = require('../../models').VoiceQueue; -var sequelize = require('../../models').sequelize; - -// Get list of dashboards -exports.index = function(req, res, next) { - return Dashboard - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.init = function(req, res, next) { - - // QUEUE SET - var voice = { - queues: {}, - outbound: {} - }; - - return VoiceQueue - .findAll({ - attributes: ['name'], - raw: true - }) - .then(function(data) { - voice.queues = _.keyBy(data, 'name'); - - return sequelize - .query('SELECT queue, count(*) as waiting \ - FROM report_queue \ - WHERE queuecallerleaveAt IS NULL \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (voice.queues[elm.queue]) { - voice.queues[elm.queue].waiting = elm.waiting; - } - }); - - return sequelize - .query( - 'SELECT queue, count(*) as active \ - FROM report_queue \ - WHERE queuecallerexit = 0 \ - AND queuecallerabandon = 0 \ - AND queuecallercomplete = 0 \ - AND queuecallerleaveAt IS NOT NULL \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (voice.queues[elm.queue]) { - voice.queues[elm.queue].active = elm.active; - } - }); - - return sequelize - .query( - 'SELECT queue, count(*) as abandon \ - FROM report_queue \ - WHERE queuecallerabandon = 1 \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (voice.queues[elm.queue]) { - voice.queues[elm.queue].abandon = elm.abandon; - } - }); - - return sequelize - .query( - 'SELECT queue, count(*) as complete \ - FROM report_queue \ - WHERE queuecallercomplete = 1 \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (voice.queues[elm.queue]) { - voice.queues[elm.queue].complete = elm.complete; - } - }); - - return sequelize - .query('SELECT queue, count(*) as calls, SUM(holdtime) as holdtime \ - FROM report_agent \ - WHERE agentcomplete = 1 \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (voice.queues[elm.queue]) { - voice.queues[elm.queue].holdtime = elm.holdtime; - } - }); - - return sequelize - .query('SELECT queue, count(*) as calls, SUM(talktime) as talktime \ - FROM report_agent \ - WHERE agentcomplete = 1 \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (voice.queues[elm.queue]) { - voice.queues[elm.queue].talktime = elm.talktime; - } - }); - - return sequelize - .query('SELECT queue, count(*) as unmanaged \ - FROM report_queue \ - WHERE queuecallerexit = 1 \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (voice.queues[elm.queue]) { - voice.queues[elm.queue].unmanaged = elm.unmanaged; - } - }); - - return sequelize - .query('SELECT count(*) as answered \ - FROM report_call \ - WHERE disposition = \'ANSWERED\' \ - AND type = \'outbound\';', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - voice.outbound.answered = data[0].answered; - - return sequelize - .query('SELECT count(*) as manualOutbound \ - FROM report_call \ - WHERE type = \'outbound\';', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - voice.outbound.manualOutbound = data[0].manualOutbound; - - return sequelize - .query('SELECT SUM(duration) as globalDuration \ - FROM report_call \ - WHERE type = \'outbound\';', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - voice.outbound.globalDuration = data[0].globalDuration || 0; - - return sequelize - .query('SELECT AVG(duration) as avgDuration \ - FROM report_call \ - WHERE type=\"outbound\"', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - voice.outbound.avgDuration = data[0].avgDuration || 0; - voice.outbound.answerRate = voice.outbound.avgDuration ? ((voice.outbound.answered / voice.outbound.globalDuration) * 100) : 0; - - return res.status(200).send(voice); - }) - .catch(function(err) { - console.error(err); - }); -}; - -// Get a single dashboard -exports.all = function(req, res) { - return Dashboard - .findAll() - .then(function(dashboards) { - if (!dashboards) { - return res.sendStatus(404); - } - return res.status(200).send(dashboards); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single dashboard -exports.show = function(req, res) { - return Dashboard - .findById(req.params.id) - .then(function(dashboard) { - if (!dashboard) { - return res.sendStatus(404); - } - return res.send(dashboard); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new dashboard in the DB. -exports.create = function(req, res) { - return Dashboard - .create(req.body) - .then(function(dashboard) { - return res.status(201).send(dashboard); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Clone a dashboard in the DB. -exports.clone = function(req, res) { - return Dashboard - .findById(req.params.id) - .then(function(dashboard) { - var newDashboard = dashboard.dataValues; - delete newDashboard.id; - newDashboard.editable = true; - newDashboard.defaultEntry = false; - newDashboard.name = req.body.name || newDashboard.name; - return Dashboard - .create(newDashboard); - }) - .then(function(dashboard) { - return res.status(201).send(dashboard); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing dashboard in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return Dashboard - .findById(req.params.id) - .then(function(dashboard) { - if (!dashboard) { - return res.sendStatus(404); - } - var updated = _.merge(dashboard, req.body); - return updated.save(); - }) - .then(function(dashboard) { - return res.status(200).send(dashboard); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a dashboard from the DB. -exports.destroy = function(req, res) { - return Dashboard - .findById(req.params.id) - .then(function(dashboard) { - if (!dashboard) { - return res.sendStatus(404); - } - return dashboard.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroy = function(req, res) { - return Dashboard - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xb14e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x69\x6E\x69\x74","\x65\x72\x72\x6F\x72","\x61\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x61\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x61\x6E\x73\x77\x65\x72\x65\x64","\x67\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x53\x45\x4C\x45\x43\x54\x20\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x20\x61\x73\x20\x61\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x53\x45\x4C\x45\x43\x54\x20\x53\x55\x4D\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x20\x61\x73\x20\x67\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x53\x45\x4C\x45\x43\x54\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x73","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x66\x6F\x72\x45\x61\x63\x68","\x53\x45\x4C\x45\x43\x54\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x3D\x20\x27\x41\x4E\x53\x57\x45\x52\x45\x44\x27\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x61\x6C\x6C\x73\x2C\x20\x53\x55\x4D\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x20\x61\x73\x20\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x61\x6C\x6C\x73\x2C\x20\x53\x55\x4D\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x20\x61\x73\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x61\x62\x61\x6E\x64\x6F\x6E","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x61\x63\x74\x69\x76\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x62\x61\x6E\x64\x6F\x6E\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x77\x61\x69\x74\x69\x6E\x67","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x63\x74\x69\x76\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x6E\x61\x6D\x65","\x6B\x65\x79\x42\x79","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x77\x61\x69\x74\x69\x6E\x67\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x6C\x6F\x6E\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x65\x64\x69\x74\x61\x62\x6C\x65","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xb14e[0];var _=require(_0xb14e[1]);var util=require(_0xb14e[2]);var Util=require(_0xb14e[3]);var Dashboard=require(_0xb14e[5])[_0xb14e[4]];var VoiceQueue=require(_0xb14e[5])[_0xb14e[6]];var sequelize=require(_0xb14e[5])[_0xb14e[7]];exports[_0xb14e[8]]= function(_0x9a91x7,_0x9a91x8,_0x9a91x9){return Dashboard[_0xb14e[15]](Util[_0xb14e[14]](_0x9a91x7[_0xb14e[13]]))[_0xb14e[12]](function(_0x9a91xb){_0x9a91x8[_0xb14e[11]](200)[_0xb14e[10]](_0x9a91xb)})[_0xb14e[9]](function(_0x9a91xa){return handleError(_0x9a91x8,_0x9a91xa)})};exports[_0xb14e[16]]= function(_0x9a91x7,_0x9a91x8,_0x9a91x9){var _0x9a91xc={queues:{},outbound:{}};return VoiceQueue[_0xb14e[49]]({attributes:[_0xb14e[46]],raw:true})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xc[_0xb14e[30]]= _[_0xb14e[47]](_0x9a91xd,_0xb14e[46]);return sequelize[_0xb14e[13]](_0xb14e[48],{type:sequelize[_0xb14e[25]][_0xb14e[24]]})})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xd[_0xb14e[32]](function(_0x9a91xe){if(_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]]){_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]][_0xb14e[44]]= _0x9a91xe[_0xb14e[44]]}});return sequelize[_0xb14e[13]](_0xb14e[45],{type:sequelize[_0xb14e[25]][_0xb14e[24]]})})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xd[_0xb14e[32]](function(_0x9a91xe){if(_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]]){_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]][_0xb14e[42]]= _0x9a91xe[_0xb14e[42]]}});return sequelize[_0xb14e[13]](_0xb14e[43],{type:sequelize[_0xb14e[25]][_0xb14e[24]]})})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xd[_0xb14e[32]](function(_0x9a91xe){if(_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]]){_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]][_0xb14e[40]]= _0x9a91xe[_0xb14e[40]]}});return sequelize[_0xb14e[13]](_0xb14e[41],{type:sequelize[_0xb14e[25]][_0xb14e[24]]})})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xd[_0xb14e[32]](function(_0x9a91xe){if(_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]]){_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]][_0xb14e[38]]= _0x9a91xe[_0xb14e[38]]}});return sequelize[_0xb14e[13]](_0xb14e[39],{type:sequelize[_0xb14e[25]][_0xb14e[24]]})})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xd[_0xb14e[32]](function(_0x9a91xe){if(_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]]){_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]][_0xb14e[36]]= _0x9a91xe[_0xb14e[36]]}});return sequelize[_0xb14e[13]](_0xb14e[37],{type:sequelize[_0xb14e[25]][_0xb14e[24]]})})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xd[_0xb14e[32]](function(_0x9a91xe){if(_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]]){_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]][_0xb14e[34]]= _0x9a91xe[_0xb14e[34]]}});return sequelize[_0xb14e[13]](_0xb14e[35],{type:sequelize[_0xb14e[25]][_0xb14e[24]]})})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xd[_0xb14e[32]](function(_0x9a91xe){if(_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]]){_0x9a91xc[_0xb14e[30]][_0x9a91xe[_0xb14e[29]]][_0xb14e[31]]= _0x9a91xe[_0xb14e[31]]}});return sequelize[_0xb14e[13]](_0xb14e[33],{type:sequelize[_0xb14e[25]][_0xb14e[24]]})})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xc[_0xb14e[19]][_0xb14e[21]]= _0x9a91xd[0][_0xb14e[21]];return sequelize[_0xb14e[13]](_0xb14e[28],{type:sequelize[_0xb14e[25]][_0xb14e[24]]})})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xc[_0xb14e[19]][_0xb14e[26]]= _0x9a91xd[0][_0xb14e[26]];return sequelize[_0xb14e[13]](_0xb14e[27],{type:sequelize[_0xb14e[25]][_0xb14e[24]]})})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xc[_0xb14e[19]][_0xb14e[22]]= _0x9a91xd[0][_0xb14e[22]]|| 0;return sequelize[_0xb14e[13]](_0xb14e[23],{type:sequelize[_0xb14e[25]][_0xb14e[24]]})})[_0xb14e[12]](function(_0x9a91xd){_0x9a91xc[_0xb14e[19]][_0xb14e[18]]= _0x9a91xd[0][_0xb14e[18]]|| 0;_0x9a91xc[_0xb14e[19]][_0xb14e[20]]= _0x9a91xc[_0xb14e[19]][_0xb14e[18]]?((_0x9a91xc[_0xb14e[19]][_0xb14e[21]]/ _0x9a91xc[_0xb14e[19]][_0xb14e[22]])* 100):0;return _0x9a91x8[_0xb14e[11]](200)[_0xb14e[10]](_0x9a91xc)})[_0xb14e[9]](function(_0x9a91xa){console[_0xb14e[17]](_0x9a91xa)})};exports[_0xb14e[50]]= function(_0x9a91x7,_0x9a91x8){return Dashboard[_0xb14e[49]]()[_0xb14e[12]](function(_0x9a91xf){if(!_0x9a91xf){return _0x9a91x8[_0xb14e[51]](404)};return _0x9a91x8[_0xb14e[11]](200)[_0xb14e[10]](_0x9a91xf)})[_0xb14e[9]](function(_0x9a91xa){return handleError(_0x9a91x8,_0x9a91xa)})};exports[_0xb14e[52]]= function(_0x9a91x7,_0x9a91x8){return Dashboard[_0xb14e[55]](_0x9a91x7[_0xb14e[54]][_0xb14e[53]])[_0xb14e[12]](function(_0x9a91x10){if(!_0x9a91x10){return _0x9a91x8[_0xb14e[51]](404)};return _0x9a91x8[_0xb14e[10]](_0x9a91x10)})[_0xb14e[9]](function(_0x9a91xa){return handleError(_0x9a91x8,_0x9a91xa)})};exports[_0xb14e[56]]= function(_0x9a91x7,_0x9a91x8){return Dashboard[_0xb14e[56]](_0x9a91x7[_0xb14e[57]])[_0xb14e[12]](function(_0x9a91x10){return _0x9a91x8[_0xb14e[11]](201)[_0xb14e[10]](_0x9a91x10)})[_0xb14e[9]](function(_0x9a91xa){return handleError(_0x9a91x8,_0x9a91xa)})};exports[_0xb14e[58]]= function(_0x9a91x7,_0x9a91x8){return Dashboard[_0xb14e[55]](_0x9a91x7[_0xb14e[54]][_0xb14e[53]])[_0xb14e[12]](function(_0x9a91x10){var _0x9a91x11=_0x9a91x10[_0xb14e[59]];delete _0x9a91x11[_0xb14e[53]];_0x9a91x11[_0xb14e[60]]= true;_0x9a91x11[_0xb14e[61]]= false;_0x9a91x11[_0xb14e[46]]= _0x9a91x7[_0xb14e[57]][_0xb14e[46]]|| _0x9a91x11[_0xb14e[46]];return Dashboard[_0xb14e[56]](_0x9a91x11)})[_0xb14e[12]](function(_0x9a91x10){return _0x9a91x8[_0xb14e[11]](201)[_0xb14e[10]](_0x9a91x10)})[_0xb14e[9]](function(_0x9a91xa){return handleError(_0x9a91x8,_0x9a91xa)})};exports[_0xb14e[62]]= function(_0x9a91x7,_0x9a91x8){if(_0x9a91x7[_0xb14e[57]][_0xb14e[53]]){delete _0x9a91x7[_0xb14e[57]][_0xb14e[53]]};return Dashboard[_0xb14e[55]](_0x9a91x7[_0xb14e[54]][_0xb14e[53]])[_0xb14e[12]](function(_0x9a91x10){if(!_0x9a91x10){return _0x9a91x8[_0xb14e[51]](404)};var _0x9a91x12=_[_0xb14e[63]](_0x9a91x10,_0x9a91x7[_0xb14e[57]]);return _0x9a91x12[_0xb14e[64]]()})[_0xb14e[12]](function(_0x9a91x10){return _0x9a91x8[_0xb14e[11]](200)[_0xb14e[10]](_0x9a91x10)})[_0xb14e[9]](function(_0x9a91xa){return handleError(_0x9a91x8,_0x9a91xa)})};exports[_0xb14e[65]]= function(_0x9a91x7,_0x9a91x8){return Dashboard[_0xb14e[55]](_0x9a91x7[_0xb14e[54]][_0xb14e[53]])[_0xb14e[12]](function(_0x9a91x10){if(!_0x9a91x10){return _0x9a91x8[_0xb14e[51]](404)};return _0x9a91x10[_0xb14e[65]]()})[_0xb14e[12]](function(){return _0x9a91x8[_0xb14e[51]](204)})[_0xb14e[9]](function(_0x9a91xa){return handleError(_0x9a91x8,_0x9a91xa)})};exports[_0xb14e[66]]= function(_0x9a91x7,_0x9a91x8){return Dashboard[_0xb14e[65]]({where:{id:_0x9a91x7[_0xb14e[13]][_0xb14e[67]]},individualHooks:true})[_0xb14e[12]](function(){return _0x9a91x8[_0xb14e[51]](204)})[_0xb14e[9]](function(_0x9a91xa){return handleError(_0x9a91x8,_0x9a91xa)})};function handleError(_0x9a91x8,_0x9a91xa){return _0x9a91x8[_0xb14e[11]](500)[_0xb14e[10]](_0x9a91xa)} \ No newline at end of file diff --git a/server/api/dashboard/dashboard.events.js b/server/api/dashboard/dashboard.events.js index 2097ae7..019b165 100644 --- a/server/api/dashboard/dashboard.events.js +++ b/server/api/dashboard/dashboard.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Dashboard = require('../../models').Dashboard; - -var DashboardEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -DashboardEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Dashboard.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - DashboardEvents.emit(event + ':' + doc._id, doc); - DashboardEvents.emit(event, doc); - done(null); - } -} - -module.exports = DashboardEvents; +var _0xdaa7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdaa7[0];const EventEmitter=require(_0xdaa7[1]);const Dashboard=require(_0xdaa7[3])[_0xdaa7[2]];var DashboardEvents= new EventEmitter();DashboardEvents[_0xdaa7[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdaa7[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdaa7[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdaa7[6]};for(var e in events){var event=events[e];Dashboard[_0xdaa7[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd769x8,_0xd769x9,_0xd769xa){DashboardEvents[_0xdaa7[10]](event+ _0xdaa7[8]+ _0xd769x8[_0xdaa7[9]],_0xd769x8);DashboardEvents[_0xdaa7[10]](event,_0xd769x8);_0xd769xa(null)}}module[_0xdaa7[11]]= DashboardEvents \ No newline at end of file diff --git a/server/api/dashboard/dashboard.socket.js b/server/api/dashboard/dashboard.socket.js index f23e2a0..f2322ab 100644 --- a/server/api/dashboard/dashboard.socket.js +++ b/server/api/dashboard/dashboard.socket.js @@ -1,28 +1 @@ -'use strict'; - -const DashboardEvents = require('./dashboard.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('dashboard:' + event, socket); - - DashboardEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - DashboardEvents.removeListener(event, listener); - }; -} +var _0xfe1f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xfe1f[0];const DashboardEvents=require(_0xfe1f[1]);var events=[_0xfe1f[2],_0xfe1f[3]];exports[_0xfe1f[4]]= function(_0xe25cx3){for(var _0xe25cx4=0,_0xe25cx5=events[_0xfe1f[5]];_0xe25cx4< _0xe25cx5;_0xe25cx4++){var _0xe25cx6=events[_0xe25cx4];var _0xe25cx7=createListener(_0xfe1f[6]+ _0xe25cx6,_0xe25cx3);DashboardEvents[_0xfe1f[7]](_0xe25cx6,_0xe25cx7);_0xe25cx3[_0xfe1f[7]](_0xfe1f[8],removeListener(_0xe25cx6,_0xe25cx7))}};function createListener(_0xe25cx6,_0xe25cx3){return function(_0xe25cx9){_0xe25cx3[_0xfe1f[9]](_0xe25cx6,_0xe25cx9)}}function removeListener(_0xe25cx6,_0xe25cx7){return function(){DashboardEvents[_0xfe1f[10]](_0xe25cx6,_0xe25cx7)}} \ No newline at end of file diff --git a/server/api/dashboard/index.js b/server/api/dashboard/index.js index 495783a..17926f8 100644 --- a/server/api/dashboard/index.js +++ b/server/api/dashboard/index.js @@ -1,19 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./dashboard.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([2], ['admin', 'user', 'agent']), controller.index); -router.get('/all', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.all); -router.get('/voice/init', auth.isAuthenticated(), auth.hasModule([2], ['admin', 'user', 'agent']), controller.init); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.create); -router.post('/:id/clone', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.clone); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.destroy); - -module.exports = router; +var _0xe74a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x61\x6C\x6C","\x61\x6C\x6C","\x2F\x76\x6F\x69\x63\x65\x2F\x69\x6E\x69\x74","\x69\x6E\x69\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x63\x6C\x6F\x6E\x65","\x63\x6C\x6F\x6E\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xe74a[0];var express=require(_0xe74a[1]);var controller=require(_0xe74a[2]);var auth=require(_0xe74a[3]);var router=express.Router();router[_0xe74a[11]](_0xe74a[4],auth[_0xe74a[5]](),auth[_0xe74a[9]]([2],[_0xe74a[6],_0xe74a[7],_0xe74a[8]]),controller[_0xe74a[10]]);router[_0xe74a[11]](_0xe74a[12],auth[_0xe74a[5]](),auth[_0xe74a[9]]([2],[_0xe74a[6]]),controller[_0xe74a[13]]);router[_0xe74a[11]](_0xe74a[14],auth[_0xe74a[5]](),auth[_0xe74a[9]]([2],[_0xe74a[6],_0xe74a[7],_0xe74a[8]]),controller[_0xe74a[15]]);router[_0xe74a[11]](_0xe74a[16],auth[_0xe74a[5]](),auth[_0xe74a[9]]([2],[_0xe74a[6]]),controller[_0xe74a[17]]);router[_0xe74a[19]](_0xe74a[4],auth[_0xe74a[5]](),auth[_0xe74a[9]]([2],[_0xe74a[6]]),controller[_0xe74a[18]]);router[_0xe74a[19]](_0xe74a[20],auth[_0xe74a[5]](),auth[_0xe74a[9]]([2],[_0xe74a[6]]),controller[_0xe74a[21]]);router[_0xe74a[23]](_0xe74a[16],auth[_0xe74a[5]](),auth[_0xe74a[9]]([2],[_0xe74a[6]]),controller[_0xe74a[22]]);router[_0xe74a[25]](_0xe74a[4],auth[_0xe74a[5]](),auth[_0xe74a[9]]([2],[_0xe74a[6]]),controller[_0xe74a[24]]);router[_0xe74a[25]](_0xe74a[16],auth[_0xe74a[5]](),auth[_0xe74a[9]]([2],[_0xe74a[6]]),controller[_0xe74a[26]]);module[_0xe74a[27]]= router \ No newline at end of file diff --git a/server/api/default_metric/default_metric.controller.js b/server/api/default_metric/default_metric.controller.js index 321849c..b8fe8c1 100644 --- a/server/api/default_metric/default_metric.controller.js +++ b/server/api/default_metric/default_metric.controller.js @@ -1,158 +1 @@ -'use strict'; - -var _ = require('lodash'); -var DefaultMetric = require('../../models').DefaultMetric; -var Metric = require('../../models').Metric; -var util = require('util'); -var Util = require('../../config/util'); -var sequelize = require('../../models').sequelize; -var sr = require('simple-random'); - -// Get list of metrics -exports.index = function(req, res, next) { - return DefaultMetric - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getMetricsByTable = function(req, res) { - return DefaultMetric - .findAll({ - where: { - table: req.query.table - } - }) - .then(function(metrics) { - if (!metrics) { - return res.sendStatus(404); - } - return res.status(200).send({ - count: metrics.length, - rows: metrics - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.cloneMetric = function(req, res) { - return DefaultMetric - .findById(req.params.id) - .then(function(metric) { - if (!metric) { - return res.sendStatus(404); - } - delete metric.dataValues.id; - metric.dataValues.name += '_' + sr({ - length: 5 - }) - return Metric.create(metric.dataValues); - }) - .then(function() { - return res.sendStatus(201); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// // Get a single metric -// exports.show = function(req, res) { -// return Metric -// .findById(req.params.id) -// .then(function(metric) { -// if (!metric) { -// return res.sendStatus(404); -// } -// return res.send(metric); -// }) -// .catch(function(err) { -// return handleError(res, err); -// }); -// }; -// -// // Creates a new metric in the DB. -// exports.create = function(req, res) { -// return Metric -// .create(req.body) -// .then(function(metric) { -// return res.status(201).send(metric); -// }) -// .catch(sequelize.UniqueConstraintError, function(err) { -// err.translatedMessage = 'MESSAGE_EXIST_METRIC'; -// err.message = 'A Metric with that name already exists'; -// return res.status(500).send(err); -// }) -// .catch(function(err) { -// return handleError(res, err); -// }); -// }; -// -// // Updates an existing metric in the DB. -// exports.update = function(req, res) { -// return Metric -// .findById(req.params.id) -// .then(function(metric) { -// if (!metric) { -// return res.sendStatus(404); -// } -// var updated = _.merge(metric, req.body); -// return updated.save(); -// }) -// .then(function() { -// return res.sendStatus(200); -// }) -// .catch(sequelize.UniqueConstraintError, function(err) { -// err.translatedMessage = 'MESSAGE_EXIST_METRIC'; -// err.message = 'A Metric with that name already exists'; -// return res.status(500).send(err); -// }) -// .catch(function(err) { -// console.log(err); -// return handleError(res, err); -// }); -// }; -// -// // Deletes a metric from the DB. -// exports.destroy = function(req, res) { -// return Metric -// .findById(req.params.id) -// .then(function(metric) { -// if (!metric) { -// return res.sendStatus(404); -// } -// return metric.destroy(); -// }) -// .then(function() { -// return res.sendStatus(204); -// }) -// .catch(function(err) { -// return handleError(res, err); -// }); -// }; -// -// exports.bulkDestroy = function(req, res) { -// return Metric -// .destroy({ -// where: { -// id: req.query.ids -// }, -// individualHooks: true -// }) -// .then(function() { -// return res.sendStatus(204); -// }) -// .catch(function(err) { -// return handleError(res, err); -// }); -// }; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x980e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x65\x74\x72\x69\x63","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x6C\x6F\x6E\x65\x4D\x65\x74\x72\x69\x63","\x69\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6E\x61\x6D\x65","\x5F","\x63\x72\x65\x61\x74\x65","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0x980e[0];var _=require(_0x980e[1]);var DefaultMetric=require(_0x980e[3])[_0x980e[2]];var Metric=require(_0x980e[3])[_0x980e[4]];var util=require(_0x980e[5]);var Util=require(_0x980e[6]);var sequelize=require(_0x980e[3])[_0x980e[7]];var sr=require(_0x980e[8]);exports[_0x980e[9]]= function(_0x9f50x8,_0x9f50x9,_0x9f50xa){return DefaultMetric[_0x980e[16]](Util[_0x980e[15]](_0x9f50x8[_0x980e[14]]))[_0x980e[13]](function(_0x9f50xc){return _0x9f50x9[_0x980e[12]](200)[_0x980e[11]](_0x9f50xc)})[_0x980e[10]](function(_0x9f50xb){return handleError(_0x9f50x9,_0x9f50xb)})};exports[_0x980e[17]]= function(_0x9f50x8,_0x9f50x9){return DefaultMetric[_0x980e[21]]({where:{table:_0x9f50x8[_0x980e[14]][_0x980e[20]]}})[_0x980e[13]](function(_0x9f50xd){if(!_0x9f50xd){return _0x9f50x9[_0x980e[18]](404)};return _0x9f50x9[_0x980e[12]](200)[_0x980e[11]]({count:_0x9f50xd[_0x980e[19]],rows:_0x9f50xd})})[_0x980e[10]](function(_0x9f50xb){return handleError(_0x9f50x9,_0x9f50xb)})};exports[_0x980e[22]]= function(_0x9f50x8,_0x9f50x9){return DefaultMetric[_0x980e[29]](_0x9f50x8[_0x980e[28]][_0x980e[23]])[_0x980e[13]](function(_0x9f50xe){if(!_0x9f50xe){return _0x9f50x9[_0x980e[18]](404)};delete _0x9f50xe[_0x980e[24]][_0x980e[23]];_0x9f50xe[_0x980e[24]][_0x980e[25]]+= _0x980e[26]+ sr({length:5});return Metric[_0x980e[27]](_0x9f50xe[_0x980e[24]])})[_0x980e[13]](function(){return _0x9f50x9[_0x980e[18]](201)})[_0x980e[10]](function(_0x9f50xb){return handleError(_0x9f50x9,_0x9f50xb)})};function handleError(_0x9f50x9,_0x9f50xb){return _0x9f50x9[_0x980e[12]](500)[_0x980e[11]](_0x9f50xb)} \ No newline at end of file diff --git a/server/api/default_metric/index.js b/server/api/default_metric/index.js index 4608ee8..9dfab8b 100644 --- a/server/api/default_metric/index.js +++ b/server/api/default_metric/index.js @@ -1,19 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./default_metric.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index); -router.get('/table', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.getMetricsByTable); -router.get('/:id/clone', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.cloneMetric); -// router.get('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.show); -// router.post('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.create); -// router.put('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update); -// router.patch('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update); -// router.delete('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.bulkDestroy); -// router.delete('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.destroy); - -module.exports = router; +var _0x46eb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x6D\x65\x74\x72\x69\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x74\x61\x62\x6C\x65","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x2F\x3A\x69\x64\x2F\x63\x6C\x6F\x6E\x65","\x63\x6C\x6F\x6E\x65\x4D\x65\x74\x72\x69\x63","\x65\x78\x70\x6F\x72\x74\x73"];_0x46eb[0];var express=require(_0x46eb[1]);var controller=require(_0x46eb[2]);var auth=require(_0x46eb[3]);var router=express.Router();router[_0x46eb[9]](_0x46eb[4],auth[_0x46eb[5]](),auth[_0x46eb[7]]([17],[_0x46eb[6]]),controller[_0x46eb[8]]);router[_0x46eb[9]](_0x46eb[10],auth[_0x46eb[5]](),auth[_0x46eb[7]]([17],[_0x46eb[6]]),controller[_0x46eb[11]]);router[_0x46eb[9]](_0x46eb[12],auth[_0x46eb[5]](),auth[_0x46eb[7]]([17],[_0x46eb[6]]),controller[_0x46eb[13]]);module[_0x46eb[14]]= router \ No newline at end of file diff --git a/server/api/default_report/default_report.controller.js b/server/api/default_report/default_report.controller.js index ea51157..8b3d536 100644 --- a/server/api/default_report/default_report.controller.js +++ b/server/api/default_report/default_report.controller.js @@ -1,392 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var DefaultReport = require('../../models').DefaultReport; -var ReportField = require('../../models').ReportField; -var Metric = require('../../models').Metric; -var sequelize = require('../../models').sequelize; -var CustomReport = require('../../models').CustomReport; -var ExtractedReport = require('../../models').ExtractedReport; -var extractUtils = require('../../utils/report_extraction'); -var reportBuildUtils = require('../../utils/report_build'); -var Util = require('../../config/util'); -var moment = require('moment'); -var cp = require('child_process'); -var sr = require('simple-random'); -var ReportTree = require('../../models').ReportTree; - -// Get list of agents -exports.index = function(req, res, next) { - return DefaultReport - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single report -exports.export = function(req, res) { - return DefaultReport - .scope({ - method: ['exportFields', { - DefaultReportId: req.params.id - }] - }) //add where condition on customreport id - .findById(req.params.id, { - attributes: ['conditions', 'description', 'name', 'parent', 'table'] - }) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - return res.send(report); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -exports.getReportQuery = function(req, res) { - return Promise - .all([]) - .then(getQuery(req, res)) - .then(function(query) { - if (query) { - switch (query) { - case 'permission': - query = 'no sufficient queue permissions for the user'; - break; - default: - } - } - res.status(200).send({ - query: query - }); - }) - .catch(function(err) { - console.log('Error getting query from api:', err); - }); -} - -function getQuery(req, res) { - var _report; - return function() { - return DefaultReport - .scope('fields') - .findById(req.params.id) - .then(function(report) { - console.log('found report'); - if (!report) { - return res.sendStatus(404); - } - if (req.query.daily && req.query.daily === 'true') { - req.query.startDate = moment().format('YYYY-MM-DD'); - req.query.endDate = moment().format('YYYY-MM-DD'); - report.dataValues.table = report.dataValues.table.replace( - '_history', ''); - } - delete req.query.daily; - _report = report.dataValues; - return _report.table; - }) - .then(reportBuildUtils.buildFilter(req.user)) - .then(function(filter) { - return [filter, _report]; - }) - .spread(reportBuildUtils.buildQuery(req.query)) - } -} - -exports.preview = function(req, res) { - var _countAll; - return Promise - .all([]) - .then(getQuery(req, res)) - .then(reportBuildUtils.checkQuery()) - .then(function(results) { - if (results && _.isArray(results)) { - _countAll = results.length; - if (req.query.limit) { - results = _(results).slice(req.query.offset || 0).take(req.query.limit).value(); - } - _.forEach(results, function(row) { - _.forOwn(row, function(property, key) { - if (property instanceof Date) { - row[key] = moment(property).format("YYYY-MM-DD HH:mm:ss").toString(); - } - }); - }); - res.status(200).send({ - rows: results, - count: _countAll - }); - } else { - return handleError(res, { - message: results || 'query error' - }); - } - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.extractPdf = function(req, res) { - // console.log('extractPdf api function'); - docExtract(req, res, 'PDF') -}; - -exports.extractCsv = function(req, res) { - // console.log('extractCsv api function'); - docExtract(req, res, 'CSV'); -}; - -function docExtract(req, res, typeFunction) { - var report; - // console.log('common docExtract api function'); - DefaultReport //DO NOT ADD RETURN CAUSE THE EXTRACTING FUNCTION WILL KEEP EXTRACTING AFTER THE API HAS RETURNED - .scope('fields') - .findById(req.params.id) - .then(function(_report) { - if (!_report) { - return res.sendStatus(404); - } - report = _report; - return ReportTree - .findById(1); - }) - .then(function(tree) { - tree = JSON.parse(tree.tree); - var folder = _.find(tree, { - id: report.parent - }); - var path = getReportPath(folder, tree, report.name); - // console.log('found the report, creating the new DB row for extracted reports..'); - //CREATE A DB ROW IN A TABLE WITH THE REPORT INFO, QUERY DATES, AND THE STATUS 'ELABORATING' - if (req.query.daily && req.query.daily === 'true') { - req.query.startDate = moment().format('YYYY-MM-DD'); - req.query.endDate = moment().format('YYYY-MM-DD'); - report.dataValues.table = report.dataValues.table.replace('_history', ''); - } - delete req.query.daily; - return [report, ExtractedReport.create({ - name: path, - startDate: req.query.startDate ? req.query.startDate + (req.query.startTime ? ' ' + req.query.startTime : '00:00') : null, - endDate: req.query.endDate ? req.query.endDate + (req.query.endTime ? ' ' + req.query.endTime : '23:59') : null, - output: typeFunction, - UserId: req.user.id - })] - }) - .spread(function(report, extractedReport) { - // console.log('created new extracted reports db entry, calling external extraction function: ' + typeFunction); - var child = cp.fork(__dirname + '/../../utils/report_extraction.js'); - child.on('message', function(data) { - console.log('child message', data); - child.kill(); - }).on('close', function() { - console.log('child close'); - }).on('error', function(err) { - console.log('child error', err); - }); - child.send({ - report: report, - query: req.query, - extractedId: extractedReport.id, - user: req.user, - type: typeFunction - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - return res.sendStatus(200); -} - -function getReportPath(folder, tree, path) { - path = folder.text + '/ ' + path; - if (folder.parent === '#') { - return path; - } else { - return getReportPath(_.find(tree, { - id: folder.parent - }), tree, path); - } -} - -// Get a single report -exports.show = function(req, res) { - return DefaultReport - .findById(req.params.id, { - include: [{ - all: true - }] - }) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - return res.send(report); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Copy a default report -exports.copy = function(req, res) { - var _fields; - return sequelize.transaction(function(t) { - return DefaultReport - .scope({ - method: ['exportFields', { - DefaultReportId: req.params.id - }] - }) - .findById(req.params.id) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - var newReport = report.dataValues; - console.log(newReport); - delete newReport.id; - delete newReport.createdAt; - delete newReport.updatedAt; - newReport.parent = req.body.parent; - _fields = _.map(newReport.Fields, 'dataValues'); - return CustomReport.create(newReport, { - transaction: t - }) - }) - .then(function(report) { - return [report, _fields]; - }) - .spread(createCopyFields(t)); - }) - .then(function() { - return res.sendStatus(201); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -function createCopyFields(t) { - return function(report, fields) { - if (fields && Array.isArray(fields) && fields.length) { - var tableModel = reportBuildUtils.getTable(report.table); - if (tableModel) { - var _tableFields; - return tableModel - .describe() - .then(function(tableFields) { - _tableFields = _.keys(tableFields); - var bulkFields = []; - var groupedFields = _.groupBy(fields, 'DefaultMetricId'); - _.forOwn(groupedFields, function(value, key) { - if (key !== 'undefined' && key !== 'null') { - value[0].DefaultMetric.ReportFields.forEach(function(elem) { - elem.CustomReportId = report.id; - }); - value[0].DefaultMetric.name += '_' + sr({ - length: 5 - }); - bulkFields.push(Metric - .create(value[0].DefaultMetric.dataValues, { - include: [{ - model: ReportField, - as: 'ReportFields' - }], - transaction: t - })); - } else { - value.forEach(function(elem) { - if (_.includes(_tableFields, elem.field) || elem.custom) { - elem.CustomReportId = report.id; - bulkFields.push(ReportField - .create(elem, { - transaction: t - })); - } else { - throw new sequelize.Error("The field " + elem.field + - " you specified does not exist in the table" - ); - } - }); - } - }); - return bulkFields; - }) - .all(); - } else { - throw new sequelize.Error( - "You have not specified the table or the table does not exist"); - } - } - } -} - - -// Creates a new report in the DB. -exports.create = function(req, res) { - return DefaultReport - .create(req.body) - .then(function(report) { - return res.status(201).send(report); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing report in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return DefaultReport - .findById(req.params.id) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - var updated = _.merge(report, req.body); - return updated.save(); - }) - .then(function(report) { - return res.status(200).send(report); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a report from the DB. -exports.destroy = function(req, res) { - return DefaultReport - .findById(req.params.id) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - return report.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x6bfb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x4D\x65\x74\x72\x69\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x65\x78\x70\x6F\x72\x74","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x70\x61\x72\x65\x6E\x74","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x78\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x67\x65\x74\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x72\x79","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x71\x75\x65\x72\x79\x20\x66\x72\x6F\x6D\x20\x61\x70\x69\x3A","\x6C\x6F\x67","\x6E\x6F\x20\x73\x75\x66\x66\x69\x63\x69\x65\x6E\x74\x20\x71\x75\x65\x75\x65\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E","\x61\x6C\x6C","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x75\x73\x65\x72","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x66\x6F\x75\x6E\x64\x20\x72\x65\x70\x6F\x72\x74","\x64\x61\x69\x6C\x79","\x74\x72\x75\x65","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x66\x6F\x72\x6D\x61\x74","\x65\x6E\x64\x44\x61\x74\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x68\x69\x73\x74\x6F\x72\x79","","\x72\x65\x70\x6C\x61\x63\x65","\x66\x69\x65\x6C\x64\x73","\x70\x72\x65\x76\x69\x65\x77","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x6F\x66\x66\x73\x65\x74","\x73\x6C\x69\x63\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x50\x44\x46","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x43\x53\x56","\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6A\x73","\x66\x6F\x72\x6B","\x65\x72\x72\x6F\x72","\x63\x68\x69\x6C\x64\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x63\x68\x69\x6C\x64\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x69\x6C\x64\x20\x6D\x65\x73\x73\x61\x67\x65","\x6B\x69\x6C\x6C","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x66\x69\x6E\x64","\x73\x74\x61\x72\x74\x54\x69\x6D\x65","\x20","\x30\x30\x3A\x30\x30","\x65\x6E\x64\x54\x69\x6D\x65","\x32\x33\x3A\x35\x39","\x63\x72\x65\x61\x74\x65","\x74\x65\x78\x74","\x2F\x20","\x23","\x73\x68\x6F\x77","\x63\x6F\x70\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x62\x6F\x64\x79","\x6D\x61\x70","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x54\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64","\x67\x72\x6F\x75\x70\x42\x79","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6E\x75\x6C\x6C","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64\x73","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x5F","\x70\x75\x73\x68","\x66\x69\x65\x6C\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x75\x73\x74\x6F\x6D","\x54\x68\x65\x20\x66\x69\x65\x6C\x64\x20","\x20\x79\x6F\x75\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x69\x6E\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x59\x6F\x75\x20\x68\x61\x76\x65\x20\x6E\x6F\x74\x20\x73\x70\x65\x63\x69\x66\x69\x65\x64\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x6F\x72\x20\x74\x68\x65\x20\x74\x61\x62\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x6bfb[0];var _=require(_0x6bfb[1]);var util=require(_0x6bfb[2]);var DefaultReport=require(_0x6bfb[4])[_0x6bfb[3]];var ReportField=require(_0x6bfb[4])[_0x6bfb[5]];var Metric=require(_0x6bfb[4])[_0x6bfb[6]];var sequelize=require(_0x6bfb[4])[_0x6bfb[7]];var CustomReport=require(_0x6bfb[4])[_0x6bfb[8]];var ExtractedReport=require(_0x6bfb[4])[_0x6bfb[9]];var extractUtils=require(_0x6bfb[10]);var reportBuildUtils=require(_0x6bfb[11]);var Util=require(_0x6bfb[12]);var moment=require(_0x6bfb[13]);var cp=require(_0x6bfb[14]);var sr=require(_0x6bfb[15]);var ReportTree=require(_0x6bfb[4])[_0x6bfb[16]];exports[_0x6bfb[17]]= function(_0x3fcex10,_0x3fcex11,_0x3fcex12){return DefaultReport[_0x6bfb[24]](Util[_0x6bfb[23]](_0x3fcex10[_0x6bfb[22]]))[_0x6bfb[21]](function(_0x3fcex14){_0x3fcex11[_0x6bfb[20]](200)[_0x6bfb[19]](_0x3fcex14)})[_0x6bfb[18]](function(_0x3fcex13){return handleError(_0x3fcex11,_0x3fcex13)})};exports[_0x6bfb[25]]= function(_0x3fcex10,_0x3fcex11){return DefaultReport[_0x6bfb[36]]({method:[_0x6bfb[35],{DefaultReportId:_0x3fcex10[_0x6bfb[28]][_0x6bfb[27]]}]})[_0x6bfb[34]](_0x3fcex10[_0x6bfb[28]][_0x6bfb[27]],{attributes:[_0x6bfb[29],_0x6bfb[30],_0x6bfb[31],_0x6bfb[32],_0x6bfb[33]]})[_0x6bfb[21]](function(_0x3fcex15){if(!_0x3fcex15){return _0x3fcex11[_0x6bfb[26]](404)};return _0x3fcex11[_0x6bfb[19]](_0x3fcex15)})[_0x6bfb[18]](function(_0x3fcex13){return handleError(_0x3fcex11,_0x3fcex13)})};exports[_0x6bfb[37]]= function(_0x3fcex10,_0x3fcex11){return Promise[_0x6bfb[42]]([])[_0x6bfb[21]](getQuery(_0x3fcex10,_0x3fcex11))[_0x6bfb[21]](function(_0x3fcex16){if(_0x3fcex16){switch(_0x3fcex16){case _0x6bfb[41]:_0x3fcex16= _0x6bfb[40];break;default:}};_0x3fcex11[_0x6bfb[20]](200)[_0x6bfb[19]]({query:_0x3fcex16})})[_0x6bfb[18]](function(_0x3fcex13){console[_0x6bfb[39]](_0x6bfb[38],_0x3fcex13)})};function getQuery(_0x3fcex10,_0x3fcex11){var _0x3fcex18;return function(){return DefaultReport[_0x6bfb[36]](_0x6bfb[58])[_0x6bfb[34]](_0x3fcex10[_0x6bfb[28]][_0x6bfb[27]])[_0x6bfb[21]](function(_0x3fcex15){console[_0x6bfb[39]](_0x6bfb[47]);if(!_0x3fcex15){return _0x3fcex11[_0x6bfb[26]](404)};if(_0x3fcex10[_0x6bfb[22]][_0x6bfb[48]]&& _0x3fcex10[_0x6bfb[22]][_0x6bfb[48]]=== _0x6bfb[49]){_0x3fcex10[_0x6bfb[22]][_0x6bfb[50]]= moment()[_0x6bfb[52]](_0x6bfb[51]);_0x3fcex10[_0x6bfb[22]][_0x6bfb[53]]= moment()[_0x6bfb[52]](_0x6bfb[51]);_0x3fcex15[_0x6bfb[54]][_0x6bfb[33]]= _0x3fcex15[_0x6bfb[54]][_0x6bfb[33]][_0x6bfb[57]](_0x6bfb[55],_0x6bfb[56])};delete _0x3fcex10[_0x6bfb[22]][_0x6bfb[48]];_0x3fcex18= _0x3fcex15[_0x6bfb[54]];return _0x3fcex18[_0x6bfb[33]]})[_0x6bfb[21]](reportBuildUtils[_0x6bfb[46]](_0x3fcex10[_0x6bfb[45]]))[_0x6bfb[21]](function(_0x3fcex19){return [_0x3fcex19,_0x3fcex18]})[_0x6bfb[44]](reportBuildUtils[_0x6bfb[43]](_0x3fcex10[_0x6bfb[22]]))}}exports[_0x6bfb[59]]= function(_0x3fcex10,_0x3fcex11){var _0x3fcex1a;return Promise[_0x6bfb[42]]([])[_0x6bfb[21]](getQuery(_0x3fcex10,_0x3fcex11))[_0x6bfb[21]](reportBuildUtils[_0x6bfb[71]]())[_0x6bfb[21]](function(_0x3fcex1b){if(_0x3fcex1b&& _[_0x6bfb[60]](_0x3fcex1b)){_0x3fcex1a= _0x3fcex1b[_0x6bfb[61]];if(_0x3fcex10[_0x6bfb[22]][_0x6bfb[62]]){_0x3fcex1b= _(_0x3fcex1b)[_0x6bfb[66]](_0x3fcex10[_0x6bfb[22]][_0x6bfb[65]]|| 0)[_0x6bfb[64]](_0x3fcex10[_0x6bfb[22]][_0x6bfb[62]])[_0x6bfb[63]]()};_[_0x6bfb[69]](_0x3fcex1b,function(_0x3fcex1c){_[_0x6bfb[68]](_0x3fcex1c,function(_0x3fcex1d,_0x3fcex1e){if(_0x3fcex1d instanceof Date){_0x3fcex1c[_0x3fcex1e]= moment(_0x3fcex1d)[_0x6bfb[52]](_0x6bfb[67]).toString()}})});_0x3fcex11[_0x6bfb[20]](200)[_0x6bfb[19]]({rows:_0x3fcex1b,count:_0x3fcex1a})}else {return handleError(_0x3fcex11,{message:_0x3fcex1b|| _0x6bfb[70]})}})[_0x6bfb[18]](function(_0x3fcex13){console[_0x6bfb[39]](_0x3fcex13);return handleError(_0x3fcex11,_0x3fcex13)})};exports[_0x6bfb[72]]= function(_0x3fcex10,_0x3fcex11){docExtract(_0x3fcex10,_0x3fcex11,_0x6bfb[73])};exports[_0x6bfb[74]]= function(_0x3fcex10,_0x3fcex11){docExtract(_0x3fcex10,_0x3fcex11,_0x6bfb[75])};function docExtract(_0x3fcex10,_0x3fcex11,_0x3fcex20){var _0x3fcex15;DefaultReport[_0x6bfb[36]](_0x6bfb[58])[_0x6bfb[34]](_0x3fcex10[_0x6bfb[28]][_0x6bfb[27]])[_0x6bfb[21]](function(_0x3fcex18){if(!_0x3fcex18){return _0x3fcex11[_0x6bfb[26]](404)};_0x3fcex15= _0x3fcex18;return ReportTree[_0x6bfb[34]](1)})[_0x6bfb[21]](function(_0x3fcex24){_0x3fcex24= JSON[_0x6bfb[87]](_0x3fcex24[_0x6bfb[86]]);var _0x3fcex25=_[_0x6bfb[88]](_0x3fcex24,{id:_0x3fcex15[_0x6bfb[32]]});var _0x3fcex26=getReportPath(_0x3fcex25,_0x3fcex24,_0x3fcex15[_0x6bfb[31]]);if(_0x3fcex10[_0x6bfb[22]][_0x6bfb[48]]&& _0x3fcex10[_0x6bfb[22]][_0x6bfb[48]]=== _0x6bfb[49]){_0x3fcex10[_0x6bfb[22]][_0x6bfb[50]]= moment()[_0x6bfb[52]](_0x6bfb[51]);_0x3fcex10[_0x6bfb[22]][_0x6bfb[53]]= moment()[_0x6bfb[52]](_0x6bfb[51]);_0x3fcex15[_0x6bfb[54]][_0x6bfb[33]]= _0x3fcex15[_0x6bfb[54]][_0x6bfb[33]][_0x6bfb[57]](_0x6bfb[55],_0x6bfb[56])};delete _0x3fcex10[_0x6bfb[22]][_0x6bfb[48]];return [_0x3fcex15,ExtractedReport[_0x6bfb[94]]({name:_0x3fcex26,startDate:_0x3fcex10[_0x6bfb[22]][_0x6bfb[50]]?_0x3fcex10[_0x6bfb[22]][_0x6bfb[50]]+ (_0x3fcex10[_0x6bfb[22]][_0x6bfb[89]]?_0x6bfb[90]+ _0x3fcex10[_0x6bfb[22]][_0x6bfb[89]]:_0x6bfb[91]):null,endDate:_0x3fcex10[_0x6bfb[22]][_0x6bfb[53]]?_0x3fcex10[_0x6bfb[22]][_0x6bfb[53]]+ (_0x3fcex10[_0x6bfb[22]][_0x6bfb[92]]?_0x6bfb[90]+ _0x3fcex10[_0x6bfb[22]][_0x6bfb[92]]:_0x6bfb[93]):null,output:_0x3fcex20,UserId:_0x3fcex10[_0x6bfb[45]][_0x6bfb[27]]})]})[_0x6bfb[44]](function(_0x3fcex15,_0x3fcex21){var _0x3fcex22=cp[_0x6bfb[77]](__dirname+ _0x6bfb[76]);_0x3fcex22[_0x6bfb[80]](_0x6bfb[83],function(_0x3fcex23){console[_0x6bfb[39]](_0x6bfb[84],_0x3fcex23);_0x3fcex22[_0x6bfb[85]]()})[_0x6bfb[80]](_0x6bfb[81],function(){console[_0x6bfb[39]](_0x6bfb[82])})[_0x6bfb[80]](_0x6bfb[78],function(_0x3fcex13){console[_0x6bfb[39]](_0x6bfb[79],_0x3fcex13)});_0x3fcex22[_0x6bfb[19]]({report:_0x3fcex15,query:_0x3fcex10[_0x6bfb[22]],extractedId:_0x3fcex21[_0x6bfb[27]],user:_0x3fcex10[_0x6bfb[45]],type:_0x3fcex20})})[_0x6bfb[18]](function(_0x3fcex13){console[_0x6bfb[39]](_0x3fcex13);return handleError(_0x3fcex11,_0x3fcex13)});return _0x3fcex11[_0x6bfb[26]](200)}function getReportPath(_0x3fcex25,_0x3fcex24,_0x3fcex26){_0x3fcex26= _0x3fcex25[_0x6bfb[95]]+ _0x6bfb[96]+ _0x3fcex26;if(_0x3fcex25[_0x6bfb[32]]=== _0x6bfb[97]){return _0x3fcex26}else {return getReportPath(_[_0x6bfb[88]](_0x3fcex24,{id:_0x3fcex25[_0x6bfb[32]]}),_0x3fcex24,_0x3fcex26)}}exports[_0x6bfb[98]]= function(_0x3fcex10,_0x3fcex11){return DefaultReport[_0x6bfb[34]](_0x3fcex10[_0x6bfb[28]][_0x6bfb[27]],{include:[{all:true}]})[_0x6bfb[21]](function(_0x3fcex15){if(!_0x3fcex15){return _0x3fcex11[_0x6bfb[26]](404)};return _0x3fcex11[_0x6bfb[19]](_0x3fcex15)})[_0x6bfb[18]](function(_0x3fcex13){return handleError(_0x3fcex11,_0x3fcex13)})};exports[_0x6bfb[99]]= function(_0x3fcex10,_0x3fcex11){var _0x3fcex28;return sequelize[_0x6bfb[104]](function(_0x3fcex29){return DefaultReport[_0x6bfb[36]]({method:[_0x6bfb[35],{DefaultReportId:_0x3fcex10[_0x6bfb[28]][_0x6bfb[27]]}]})[_0x6bfb[34]](_0x3fcex10[_0x6bfb[28]][_0x6bfb[27]])[_0x6bfb[21]](function(_0x3fcex15){if(!_0x3fcex15){return _0x3fcex11[_0x6bfb[26]](404)};var _0x3fcex2a=_0x3fcex15[_0x6bfb[54]];console[_0x6bfb[39]](_0x3fcex2a);delete _0x3fcex2a[_0x6bfb[27]];delete _0x3fcex2a[_0x6bfb[100]];delete _0x3fcex2a[_0x6bfb[101]];_0x3fcex2a[_0x6bfb[32]]= _0x3fcex10[_0x6bfb[102]][_0x6bfb[32]];_0x3fcex28= _[_0x6bfb[103]](_0x3fcex2a.Fields,_0x6bfb[54]);return CustomReport[_0x6bfb[94]](_0x3fcex2a,{transaction:_0x3fcex29})})[_0x6bfb[21]](function(_0x3fcex15){return [_0x3fcex15,_0x3fcex28]})[_0x6bfb[44]](createCopyFields(_0x3fcex29))})[_0x6bfb[21]](function(){return _0x3fcex11[_0x6bfb[26]](201)})[_0x6bfb[18]](function(_0x3fcex13){console[_0x6bfb[39]](_0x3fcex13);return handleError(_0x3fcex11,_0x3fcex13)})};function createCopyFields(_0x3fcex29){return function(_0x3fcex15,_0x3fcex2c){if(_0x3fcex2c&& Array[_0x6bfb[60]](_0x3fcex2c)&& _0x3fcex2c[_0x6bfb[61]]){var _0x3fcex2d=reportBuildUtils[_0x6bfb[105]](_0x3fcex15[_0x6bfb[33]]);if(_0x3fcex2d){var _0x3fcex2e;return _0x3fcex2d[_0x6bfb[121]]()[_0x6bfb[21]](function(_0x3fcex2f){_0x3fcex2e= _[_0x6bfb[106]](_0x3fcex2f);var _0x3fcex30=[];var _0x3fcex31=_[_0x6bfb[108]](_0x3fcex2c,_0x6bfb[107]);_[_0x6bfb[68]](_0x3fcex31,function(_0x3fcex32,_0x3fcex1e){if(_0x3fcex1e!== _0x6bfb[109]&& _0x3fcex1e!== _0x6bfb[110]){_0x3fcex32[0][_0x6bfb[113]][_0x6bfb[112]][_0x6bfb[69]](function(_0x3fcex33){_0x3fcex33[_0x6bfb[111]]= _0x3fcex15[_0x6bfb[27]]});_0x3fcex32[0][_0x6bfb[113]][_0x6bfb[31]]+= _0x6bfb[114]+ sr({length:5});_0x3fcex30[_0x6bfb[115]](Metric[_0x6bfb[94]](_0x3fcex32[0][_0x6bfb[113]][_0x6bfb[54]],{include:[{model:ReportField,as:_0x6bfb[112]}],transaction:_0x3fcex29}))}else {_0x3fcex32[_0x6bfb[69]](function(_0x3fcex33){if(_[_0x6bfb[117]](_0x3fcex2e,_0x3fcex33[_0x6bfb[116]])|| _0x3fcex33[_0x6bfb[118]]){_0x3fcex33[_0x6bfb[111]]= _0x3fcex15[_0x6bfb[27]];_0x3fcex30[_0x6bfb[115]](ReportField[_0x6bfb[94]](_0x3fcex33,{transaction:_0x3fcex29}))}else {throw new sequelize.Error(_0x6bfb[119]+ _0x3fcex33[_0x6bfb[116]]+ _0x6bfb[120])}})}});return _0x3fcex30})[_0x6bfb[42]]()}else {throw new sequelize.Error(_0x6bfb[122])}}}}exports[_0x6bfb[94]]= function(_0x3fcex10,_0x3fcex11){return DefaultReport[_0x6bfb[94]](_0x3fcex10[_0x6bfb[102]])[_0x6bfb[21]](function(_0x3fcex15){return _0x3fcex11[_0x6bfb[20]](201)[_0x6bfb[19]](_0x3fcex15)})[_0x6bfb[18]](function(_0x3fcex13){return handleError(_0x3fcex11,_0x3fcex13)})};exports[_0x6bfb[123]]= function(_0x3fcex10,_0x3fcex11){if(_0x3fcex10[_0x6bfb[102]][_0x6bfb[27]]){delete _0x3fcex10[_0x6bfb[102]][_0x6bfb[27]]};return DefaultReport[_0x6bfb[34]](_0x3fcex10[_0x6bfb[28]][_0x6bfb[27]])[_0x6bfb[21]](function(_0x3fcex15){if(!_0x3fcex15){return _0x3fcex11[_0x6bfb[26]](404)};var _0x3fcex34=_[_0x6bfb[124]](_0x3fcex15,_0x3fcex10[_0x6bfb[102]]);return _0x3fcex34[_0x6bfb[125]]()})[_0x6bfb[21]](function(_0x3fcex15){return _0x3fcex11[_0x6bfb[20]](200)[_0x6bfb[19]](_0x3fcex15)})[_0x6bfb[18]](function(_0x3fcex13){return handleError(_0x3fcex11,_0x3fcex13)})};exports[_0x6bfb[126]]= function(_0x3fcex10,_0x3fcex11){return DefaultReport[_0x6bfb[34]](_0x3fcex10[_0x6bfb[28]][_0x6bfb[27]])[_0x6bfb[21]](function(_0x3fcex15){if(!_0x3fcex15){return _0x3fcex11[_0x6bfb[26]](404)};return _0x3fcex15[_0x6bfb[126]]()})[_0x6bfb[21]](function(){return _0x3fcex11[_0x6bfb[26]](204)})[_0x6bfb[18]](function(_0x3fcex13){return handleError(_0x3fcex11,_0x3fcex13)})};function handleError(_0x3fcex11,_0x3fcex13){return _0x3fcex11[_0x6bfb[20]](500)[_0x6bfb[19]](_0x3fcex13)} \ No newline at end of file diff --git a/server/api/default_report/default_report.events.js b/server/api/default_report/default_report.events.js index d10d898..9a3aa07 100644 --- a/server/api/default_report/default_report.events.js +++ b/server/api/default_report/default_report.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const DefaultReport = require('../../models').DefaultReport; - -var DefaultReportEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -DefaultReportEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - DefaultReport.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - DefaultReportEvents.emit(event + ':' + doc._id, doc); - DefaultReportEvents.emit(event, doc); - done(null); - } -} - -module.exports = DefaultReportEvents; +var _0xdd55=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdd55[0];const EventEmitter=require(_0xdd55[1]);const DefaultReport=require(_0xdd55[3])[_0xdd55[2]];var DefaultReportEvents= new EventEmitter();DefaultReportEvents[_0xdd55[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdd55[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdd55[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdd55[6]};for(var e in events){var event=events[e];DefaultReport[_0xdd55[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xbd3bx8,_0xbd3bx9,_0xbd3bxa){DefaultReportEvents[_0xdd55[10]](event+ _0xdd55[8]+ _0xbd3bx8[_0xdd55[9]],_0xbd3bx8);DefaultReportEvents[_0xdd55[10]](event,_0xbd3bx8);_0xbd3bxa(null)}}module[_0xdd55[11]]= DefaultReportEvents \ No newline at end of file diff --git a/server/api/default_report/default_report.socket.js b/server/api/default_report/default_report.socket.js index db50575..34686c6 100644 --- a/server/api/default_report/default_report.socket.js +++ b/server/api/default_report/default_report.socket.js @@ -1,28 +1 @@ -'use strict'; - -const DefaultReportEvents = require('./default_report.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('default_report:' + event, socket); - - DefaultReportEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - DefaultReportEvents.removeListener(event, listener); - }; -} +var _0x689b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x689b[0];const DefaultReportEvents=require(_0x689b[1]);var events=[_0x689b[2],_0x689b[3]];exports[_0x689b[4]]= function(_0x29cbx3){for(var _0x29cbx4=0,_0x29cbx5=events[_0x689b[5]];_0x29cbx4< _0x29cbx5;_0x29cbx4++){var _0x29cbx6=events[_0x29cbx4];var _0x29cbx7=createListener(_0x689b[6]+ _0x29cbx6,_0x29cbx3);DefaultReportEvents[_0x689b[7]](_0x29cbx6,_0x29cbx7);_0x29cbx3[_0x689b[7]](_0x689b[8],removeListener(_0x29cbx6,_0x29cbx7))}};function createListener(_0x29cbx6,_0x29cbx3){return function(_0x29cbx9){_0x29cbx3[_0x689b[9]](_0x29cbx6,_0x29cbx9)}}function removeListener(_0x29cbx6,_0x29cbx7){return function(){DefaultReportEvents[_0x689b[10]](_0x29cbx6,_0x29cbx7)}} \ No newline at end of file diff --git a/server/api/default_report/index.js b/server/api/default_report/index.js index 019d6fb..3761dfb 100644 --- a/server/api/default_report/index.js +++ b/server/api/default_report/index.js @@ -1,21 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./default_report.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index); -router.get('/:id/preview', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.preview); -router.get('/:id/query', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.getReportQuery); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.show); -router.get('/:id/export', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.export); -// router.post('/', controller.create); -router.get('/:id/extract/pdf', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.extractPdf); -router.get('/:id/extract/csv', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.extractCsv); -router.post('/:id/copy', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.copy); -// router.put('/:id', controller.update); -// router.delete('/:id', controller.destroy); - -module.exports = router; +var _0x625e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x70\x72\x65\x76\x69\x65\x77","\x70\x72\x65\x76\x69\x65\x77","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x72\x79","\x67\x65\x74\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x72\x79","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x65\x78\x70\x6F\x72\x74","\x65\x78\x70\x6F\x72\x74","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x70\x64\x66","\x65\x78\x74\x72\x61\x63\x74\x50\x64\x66","\x2F\x3A\x69\x64\x2F\x65\x78\x74\x72\x61\x63\x74\x2F\x63\x73\x76","\x65\x78\x74\x72\x61\x63\x74\x43\x73\x76","\x2F\x3A\x69\x64\x2F\x63\x6F\x70\x79","\x63\x6F\x70\x79","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x625e[0];var express=require(_0x625e[1]);var controller=require(_0x625e[2]);var auth=require(_0x625e[3]);var router=express.Router();router[_0x625e[9]](_0x625e[4],auth[_0x625e[5]](),auth[_0x625e[7]]([17],[_0x625e[6]]),controller[_0x625e[8]]);router[_0x625e[9]](_0x625e[10],auth[_0x625e[5]](),auth[_0x625e[7]]([17],[_0x625e[6]]),controller[_0x625e[11]]);router[_0x625e[9]](_0x625e[12],auth[_0x625e[5]](),auth[_0x625e[7]]([17],[_0x625e[6]]),controller[_0x625e[13]]);router[_0x625e[9]](_0x625e[14],auth[_0x625e[5]](),auth[_0x625e[7]]([17],[_0x625e[6]]),controller[_0x625e[15]]);router[_0x625e[9]](_0x625e[16],auth[_0x625e[5]](),auth[_0x625e[7]]([17],[_0x625e[6]]),controller[_0x625e[17]]);router[_0x625e[9]](_0x625e[18],auth[_0x625e[5]](),auth[_0x625e[7]]([17],[_0x625e[6]]),controller[_0x625e[19]]);router[_0x625e[9]](_0x625e[20],auth[_0x625e[5]](),auth[_0x625e[7]]([17],[_0x625e[6]]),controller[_0x625e[21]]);router[_0x625e[24]](_0x625e[22],auth[_0x625e[5]](),auth[_0x625e[7]]([17],[_0x625e[6]]),controller[_0x625e[23]]);module[_0x625e[25]]= router \ No newline at end of file diff --git a/server/api/desk_account/desk_account.controller.js b/server/api/desk_account/desk_account.controller.js index f65313b..8314fe1 100644 --- a/server/api/desk_account/desk_account.controller.js +++ b/server/api/desk_account/desk_account.controller.js @@ -1,255 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var desk = require('desk.js'); - -var DeskAccount = require('../../models').DeskAccount; - -// Get list of desk_accounts -exports.index = function(req, res) { - var attributes = ['description', 'name', 'username', 'remoteUri']; - var per_page = req.query.per_page ? parseInt(req.query.per_page, 10) : 100; - var page = req.query.page ? parseInt(req.query.page, 10) : 0; - - var query = { - where: {}, - limit: per_page, - offset: page * per_page - }; - - _.forIn(req.query, function(value, key) { - switch (key) { - case 'per_page': - case 'page': - break; - case 'sort_by': - query.order = util.format('%s %s', req.query.sort_by, req.query.sort_order || 'ASC') || null; - break; - case 'sort_order': - break; - case '$': - query.where.$or = []; - attributes.forEach(function(attribute) { - var tmp = {}; - tmp[attribute] = { - $like: '%' + value + '%' - }; - - query.where.$or.push(tmp); - }); - break; - default: - query.where[key] = { - $like: {} - }; - query.where[key].$like = '%' + value + '%'; - } - }); - - return DeskAccount - .findAndCountAll(query) - .then(function(result) { - - var total_pages = Math.ceil(result.count / per_page); - var next_page = total_pages > (query.offset + 1) ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page + 1) : null; - var previous_page = page > 0 ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page - 1) : null; - - return res.status(200).send({ - count: result.count, - rows: result.rows, - next_page: next_page, - previous_page: previous_page, - total_pages: total_pages - }); - }) - .catch(function(err) { - return res.status(500).send({ - error: 'Something blew up!' - }); - }); -}; - -// Get a single desk_account -exports.show = function(req, res) { - DeskAccount - .findById(req.params.id) - .then(function(desk_account) { - if (!desk_account) { - return res.sendStatus(404); - } - return res.send(desk_account); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new desk_account in the DB. -exports.create = function(req, res, next) { - DeskAccount - .create(req.body) - .then(function(desk_account) { - return res.status(201).send(desk_account); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing desk_account in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - DeskAccount - .findById(req.params.id) - .then(function(desk_account) { - if (!desk_account) { - return res.sendStatus(404); - } - var updated = _.merge(desk_account, req.body); - updated.save() - .then(function() { - return res.status(200).send(desk_account); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a desk_account from the DB. -exports.destroy = function(req, res) { - DeskAccount - .findById(req.params.id) - .then(function(desk_account) { - if (!desk_account) { - return res.sendStatus(404); - } - desk_account.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.checkAccount = function(req, res) { - DeskAccount - .findById(req.params.id) - .then(function(account) { - var desk_account = { - endpoint: stripTrailingSlash(account.remoteUri), - retry: false - }; - if (account.authType === 'basic') { - desk_account.username = account.username; - desk_account.password = account.password; - } else if (account.authType === 'oauth') { - desk_account.consumerKey = account.consumerKey; - desk_account.consumerSecret = account.consumerSecret; - desk_account.token = account.token; - desk_account.tokenSecret = account.tokenSecret; - } - var client = desk.createClient(desk_account); - client.get('/api/v2/users/me', function(err, body, response) { - if (err) { - return handleError(res, err); - } - return res.sendStatus(200); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.deskValidation = function(req, res) { - var where = {}; - where[req.params.field] = req.body.value; - DeskAccount - .findAndCountAll({ - where: where - }) - .then(function(result) { - if (result.count) { - return res.status(200).send({ - isValid: false, - value: req.body.value - }); - } - return res.status(200).send({ - isValid: true, - value: req.body.value - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getFields = function(req, res) { - DeskAccount - .findById(req.params.id) - .then(function(account) { - var desk_account = { - endpoint: stripTrailingSlash(account.remoteUri), - retry: false - }; - if (account.authType === 'basic') { - desk_account.username = account.username; - desk_account.password = account.password; - } else if (account.authType === 'oauth') { - desk_account.consumerKey = account.consumerKey; - desk_account.consumerSecret = account.consumerSecret; - desk_account.token = account.token; - desk_account.tokenSecret = account.tokenSecret; - } - var client = desk.createClient(desk_account); - client.get('/api/v2/custom_fields', function(err, body, response) { - if (err) { - return handleError(res, err); - } - return res.status(200).json(body._embedded.entries); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.bulkDestroy = function(req, res) { - DeskAccount - .destroy({ - where: { - id: req.query.id - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function stripTrailingSlash(str) { - if (str.substr(-1) === '/') { - return str.substr(0, str.length - 1); - } - return str; -} - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xaad4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x64\x65\x73\x6B\x2E\x6A\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x61\x75\x74\x68\x54\x79\x70\x65","\x62\x61\x73\x69\x63","\x70\x61\x73\x73\x77\x6F\x72\x64","\x6F\x61\x75\x74\x68","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x4B\x65\x79","\x63\x6F\x6E\x73\x75\x6D\x65\x72\x53\x65\x63\x72\x65\x74","\x74\x6F\x6B\x65\x6E","\x74\x6F\x6B\x65\x6E\x53\x65\x63\x72\x65\x74","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65","\x67\x65\x74","\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x61\x70\x69\x2F\x76\x32\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x66\x69\x65\x6C\x64\x73","\x65\x6E\x74\x72\x69\x65\x73","\x5F\x65\x6D\x62\x65\x64\x64\x65\x64","\x6A\x73\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x75\x62\x73\x74\x72","\x2F","\x6C\x65\x6E\x67\x74\x68"];_0xaad4[0];var _=require(_0xaad4[1]);var util=require(_0xaad4[2]);var desk=require(_0xaad4[3]);var DeskAccount=require(_0xaad4[5])[_0xaad4[4]];exports[_0xaad4[6]]= function(_0x5d38x5,_0x5d38x6){var _0x5d38x7=[_0xaad4[7],_0xaad4[8],_0xaad4[9],_0xaad4[10]];var _0x5d38x8=_0x5d38x5[_0xaad4[12]][_0xaad4[11]]?parseInt(_0x5d38x5[_0xaad4[12]][_0xaad4[11]],10):100;var _0x5d38x9=_0x5d38x5[_0xaad4[12]][_0xaad4[13]]?parseInt(_0x5d38x5[_0xaad4[12]][_0xaad4[13]],10):0;var _0x5d38xa={where:{},limit:_0x5d38x8,offset:_0x5d38x9* _0x5d38x8};_[_0xaad4[27]](_0x5d38x5[_0xaad4[12]],function(_0x5d38xb,_0x5d38xc){switch(_0x5d38xc){case _0xaad4[11]:;case _0xaad4[13]:break;case _0xaad4[16]:_0x5d38xa[_0xaad4[14]]= util[_0xaad4[19]](_0xaad4[15],_0x5d38x5[_0xaad4[12]][_0xaad4[16]],_0x5d38x5[_0xaad4[12]][_0xaad4[17]]|| _0xaad4[18])|| null;break;case _0xaad4[17]:break;case _0xaad4[25]:_0x5d38xa[_0xaad4[21]][_0xaad4[20]]= [];_0x5d38x7[_0xaad4[24]](function(_0x5d38xd){var _0x5d38xe={};_0x5d38xe[_0x5d38xd]= {$like:_0xaad4[22]+ _0x5d38xb+ _0xaad4[22]};_0x5d38xa[_0xaad4[21]][_0xaad4[20]][_0xaad4[23]](_0x5d38xe)});break;default:_0x5d38xa[_0xaad4[21]][_0x5d38xc]= {$like:{}};_0x5d38xa[_0xaad4[21]][_0x5d38xc][_0xaad4[26]]= _0xaad4[22]+ _0x5d38xb+ _0xaad4[22]}});return DeskAccount[_0xaad4[42]](_0x5d38xa)[_0xaad4[41]](function(_0x5d38x10){var _0x5d38x11=Math[_0xaad4[33]](_0x5d38x10[_0xaad4[32]]/ _0x5d38x8);var _0x5d38x12=_0x5d38x11> (_0x5d38xa[_0xaad4[34]]+ 1)?util[_0xaad4[19]](_0xaad4[35],_0x5d38x5[_0xaad4[36]],_0x5d38x5[_0xaad4[38]][_0xaad4[37]],_0x5d38x5[_0xaad4[39]],_0x5d38x9+ 1):null;var _0x5d38x13=_0x5d38x9> 0?util[_0xaad4[19]](_0xaad4[35],_0x5d38x5[_0xaad4[36]],_0x5d38x5[_0xaad4[38]][_0xaad4[37]],_0x5d38x5[_0xaad4[39]],_0x5d38x9- 1):null;return _0x5d38x6[_0xaad4[30]](200)[_0xaad4[29]]({count:_0x5d38x10[_0xaad4[32]],rows:_0x5d38x10[_0xaad4[40]],next_page:_0x5d38x12,previous_page:_0x5d38x13,total_pages:_0x5d38x11})})[_0xaad4[31]](function(_0x5d38xf){return _0x5d38x6[_0xaad4[30]](500)[_0xaad4[29]]({error:_0xaad4[28]})})};exports[_0xaad4[43]]= function(_0x5d38x5,_0x5d38x6){DeskAccount[_0xaad4[47]](_0x5d38x5[_0xaad4[46]][_0xaad4[45]])[_0xaad4[41]](function(_0x5d38x14){if(!_0x5d38x14){return _0x5d38x6[_0xaad4[44]](404)};return _0x5d38x6[_0xaad4[29]](_0x5d38x14)})[_0xaad4[31]](function(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)})};exports[_0xaad4[48]]= function(_0x5d38x5,_0x5d38x6,_0x5d38x15){DeskAccount[_0xaad4[48]](_0x5d38x5[_0xaad4[49]])[_0xaad4[41]](function(_0x5d38x14){return _0x5d38x6[_0xaad4[30]](201)[_0xaad4[29]](_0x5d38x14)})[_0xaad4[31]](function(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)})};exports[_0xaad4[50]]= function(_0x5d38x5,_0x5d38x6){if(_0x5d38x5[_0xaad4[49]][_0xaad4[45]]){delete _0x5d38x5[_0xaad4[49]][_0xaad4[45]]};DeskAccount[_0xaad4[47]](_0x5d38x5[_0xaad4[46]][_0xaad4[45]])[_0xaad4[41]](function(_0x5d38x14){if(!_0x5d38x14){return _0x5d38x6[_0xaad4[44]](404)};var _0x5d38x16=_[_0xaad4[51]](_0x5d38x14,_0x5d38x5[_0xaad4[49]]);_0x5d38x16[_0xaad4[52]]()[_0xaad4[41]](function(){return _0x5d38x6[_0xaad4[30]](200)[_0xaad4[29]](_0x5d38x14)})[_0xaad4[31]](function(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)})})[_0xaad4[31]](function(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)})};exports[_0xaad4[53]]= function(_0x5d38x5,_0x5d38x6){DeskAccount[_0xaad4[47]](_0x5d38x5[_0xaad4[46]][_0xaad4[45]])[_0xaad4[41]](function(_0x5d38x14){if(!_0x5d38x14){return _0x5d38x6[_0xaad4[44]](404)};_0x5d38x14[_0xaad4[53]]()[_0xaad4[41]](function(){return _0x5d38x6[_0xaad4[44]](204)})[_0xaad4[31]](function(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)})})[_0xaad4[31]](function(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)})};exports[_0xaad4[54]]= function(_0x5d38x5,_0x5d38x6){DeskAccount[_0xaad4[47]](_0x5d38x5[_0xaad4[46]][_0xaad4[45]])[_0xaad4[41]](function(_0x5d38x17){var _0x5d38x14={endpoint:stripTrailingSlash(_0x5d38x17[_0xaad4[10]]),retry:false};if(_0x5d38x17[_0xaad4[55]]=== _0xaad4[56]){_0x5d38x14[_0xaad4[9]]= _0x5d38x17[_0xaad4[9]];_0x5d38x14[_0xaad4[57]]= _0x5d38x17[_0xaad4[57]]}else {if(_0x5d38x17[_0xaad4[55]]=== _0xaad4[58]){_0x5d38x14[_0xaad4[59]]= _0x5d38x17[_0xaad4[59]];_0x5d38x14[_0xaad4[60]]= _0x5d38x17[_0xaad4[60]];_0x5d38x14[_0xaad4[61]]= _0x5d38x17[_0xaad4[61]];_0x5d38x14[_0xaad4[62]]= _0x5d38x17[_0xaad4[62]]}};var _0x5d38x18=desk[_0xaad4[63]](_0x5d38x14);_0x5d38x18[_0xaad4[65]](_0xaad4[64],function(_0x5d38xf,_0x5d38x19,_0x5d38x1a){if(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)};return _0x5d38x6[_0xaad4[44]](200)})})[_0xaad4[31]](function(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)})};exports[_0xaad4[66]]= function(_0x5d38x5,_0x5d38x6){var _0x5d38x1b={};_0x5d38x1b[_0x5d38x5[_0xaad4[46]][_0xaad4[67]]]= _0x5d38x5[_0xaad4[49]][_0xaad4[68]];DeskAccount[_0xaad4[42]]({where:_0x5d38x1b})[_0xaad4[41]](function(_0x5d38x10){if(_0x5d38x10[_0xaad4[32]]){return _0x5d38x6[_0xaad4[30]](200)[_0xaad4[29]]({isValid:false,value:_0x5d38x5[_0xaad4[49]][_0xaad4[68]]})};return _0x5d38x6[_0xaad4[30]](200)[_0xaad4[29]]({isValid:true,value:_0x5d38x5[_0xaad4[49]][_0xaad4[68]]})})[_0xaad4[31]](function(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)})};exports[_0xaad4[69]]= function(_0x5d38x5,_0x5d38x6){DeskAccount[_0xaad4[47]](_0x5d38x5[_0xaad4[46]][_0xaad4[45]])[_0xaad4[41]](function(_0x5d38x17){var _0x5d38x14={endpoint:stripTrailingSlash(_0x5d38x17[_0xaad4[10]]),retry:false};if(_0x5d38x17[_0xaad4[55]]=== _0xaad4[56]){_0x5d38x14[_0xaad4[9]]= _0x5d38x17[_0xaad4[9]];_0x5d38x14[_0xaad4[57]]= _0x5d38x17[_0xaad4[57]]}else {if(_0x5d38x17[_0xaad4[55]]=== _0xaad4[58]){_0x5d38x14[_0xaad4[59]]= _0x5d38x17[_0xaad4[59]];_0x5d38x14[_0xaad4[60]]= _0x5d38x17[_0xaad4[60]];_0x5d38x14[_0xaad4[61]]= _0x5d38x17[_0xaad4[61]];_0x5d38x14[_0xaad4[62]]= _0x5d38x17[_0xaad4[62]]}};var _0x5d38x18=desk[_0xaad4[63]](_0x5d38x14);_0x5d38x18[_0xaad4[65]](_0xaad4[70],function(_0x5d38xf,_0x5d38x19,_0x5d38x1a){if(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)};return _0x5d38x6[_0xaad4[30]](200)[_0xaad4[73]](_0x5d38x19[_0xaad4[72]][_0xaad4[71]])})})[_0xaad4[31]](function(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)})};exports[_0xaad4[74]]= function(_0x5d38x5,_0x5d38x6){DeskAccount[_0xaad4[53]]({where:{id:_0x5d38x5[_0xaad4[12]][_0xaad4[45]]},individualHooks:true})[_0xaad4[41]](function(){return _0x5d38x6[_0xaad4[44]](204)})[_0xaad4[31]](function(_0x5d38xf){return handleError(_0x5d38x6,_0x5d38xf)})};function stripTrailingSlash(_0x5d38x1d){if(_0x5d38x1d[_0xaad4[75]](-1) === _0xaad4[76]){return _0x5d38x1d[_0xaad4[75]](0,_0x5d38x1d[_0xaad4[77]]- 1)};return _0x5d38x1d}function handleError(_0x5d38x6,_0x5d38xf){return _0x5d38x6[_0xaad4[30]](500)[_0xaad4[29]](_0x5d38xf)} \ No newline at end of file diff --git a/server/api/desk_account/desk_account.events.js b/server/api/desk_account/desk_account.events.js index 3a0d697..7e9b2bf 100644 --- a/server/api/desk_account/desk_account.events.js +++ b/server/api/desk_account/desk_account.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const DeskAccount = require('../../models').DeskAccount; - -var DeskAccountEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -DeskAccountEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - DeskAccount.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - DeskAccountEvents.emit(event + ':' + doc._id, doc); - DeskAccountEvents.emit(event, doc); - done(null); - } -} - -module.exports = DeskAccountEvents; +var _0x67f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x67f8[0];const EventEmitter=require(_0x67f8[1]);const DeskAccount=require(_0x67f8[3])[_0x67f8[2]];var DeskAccountEvents= new EventEmitter();DeskAccountEvents[_0x67f8[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x67f8[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x67f8[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x67f8[6]};for(var e in events){var event=events[e];DeskAccount[_0x67f8[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9b92x8,_0x9b92x9,_0x9b92xa){DeskAccountEvents[_0x67f8[10]](event+ _0x67f8[8]+ _0x9b92x8[_0x67f8[9]],_0x9b92x8);DeskAccountEvents[_0x67f8[10]](event,_0x9b92x8);_0x9b92xa(null)}}module[_0x67f8[11]]= DeskAccountEvents \ No newline at end of file diff --git a/server/api/desk_account/desk_account.socket.js b/server/api/desk_account/desk_account.socket.js index 1d543a4..b549704 100644 --- a/server/api/desk_account/desk_account.socket.js +++ b/server/api/desk_account/desk_account.socket.js @@ -1,28 +1 @@ -'use strict'; - -const DeskAccountEvents = require('./desk_account.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('desk_account:' + event, socket); - - DeskAccountEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - DeskAccountEvents.removeListener(event, listener); - }; -} +var _0xb3e1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb3e1[0];const DeskAccountEvents=require(_0xb3e1[1]);var events=[_0xb3e1[2],_0xb3e1[3]];exports[_0xb3e1[4]]= function(_0x31c2x3){for(var _0x31c2x4=0,_0x31c2x5=events[_0xb3e1[5]];_0x31c2x4< _0x31c2x5;_0x31c2x4++){var _0x31c2x6=events[_0x31c2x4];var _0x31c2x7=createListener(_0xb3e1[6]+ _0x31c2x6,_0x31c2x3);DeskAccountEvents[_0xb3e1[7]](_0x31c2x6,_0x31c2x7);_0x31c2x3[_0xb3e1[7]](_0xb3e1[8],removeListener(_0x31c2x6,_0x31c2x7))}};function createListener(_0x31c2x6,_0x31c2x3){return function(_0x31c2x9){_0x31c2x3[_0xb3e1[9]](_0x31c2x6,_0x31c2x9)}}function removeListener(_0x31c2x6,_0x31c2x7){return function(){DeskAccountEvents[_0xb3e1[10]](_0x31c2x6,_0x31c2x7)}} \ No newline at end of file diff --git a/server/api/desk_account/index.js b/server/api/desk_account/index.js index 506e627..f64bb43 100644 --- a/server/api/desk_account/index.js +++ b/server/api/desk_account/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./desk_account.controller'); -var auth = require('../../auth/auth.service'); -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([19, 13], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.get('/:id/check', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.checkAccount); -router.get('/:id/fields', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getFields); -router.post('/validate/:field', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.deskValidation); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); - -module.exports = router; +var _0xa100=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xa100[0];var express=require(_0xa100[1]);var controller=require(_0xa100[2]);var auth=require(_0xa100[3]);var router=express.Router();router[_0xa100[9]](_0xa100[4],auth[_0xa100[5]](),auth[_0xa100[7]]([19,13],[_0xa100[6]]),controller[_0xa100[8]]);router[_0xa100[9]](_0xa100[10],auth[_0xa100[5]](),auth[_0xa100[7]]([19],[_0xa100[6]]),controller[_0xa100[11]]);router[_0xa100[9]](_0xa100[12],auth[_0xa100[5]](),auth[_0xa100[7]]([19],[_0xa100[6]]),controller[_0xa100[13]]);router[_0xa100[9]](_0xa100[14],auth[_0xa100[5]](),auth[_0xa100[7]]([19],[_0xa100[6]]),controller[_0xa100[15]]);router[_0xa100[18]](_0xa100[16],auth[_0xa100[5]](),auth[_0xa100[7]]([19],[_0xa100[6]]),controller[_0xa100[17]]);router[_0xa100[18]](_0xa100[4],auth[_0xa100[5]](),auth[_0xa100[7]]([19],[_0xa100[6]]),controller[_0xa100[19]]);router[_0xa100[21]](_0xa100[10],auth[_0xa100[5]](),auth[_0xa100[7]]([19],[_0xa100[6]]),controller[_0xa100[20]]);router[_0xa100[23]](_0xa100[4],auth[_0xa100[5]](),auth[_0xa100[7]]([19],[_0xa100[6]]),controller[_0xa100[22]]);router[_0xa100[23]](_0xa100[10],auth[_0xa100[5]](),auth[_0xa100[7]]([19],[_0xa100[6]]),controller[_0xa100[24]]);module[_0xa100[25]]= router \ No newline at end of file diff --git a/server/api/desk_configuration/desk_configuration.controller.js b/server/api/desk_configuration/desk_configuration.controller.js index 3824ca1..b9a7a24 100644 --- a/server/api/desk_configuration/desk_configuration.controller.js +++ b/server/api/desk_configuration/desk_configuration.controller.js @@ -1,145 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/desk/configurations -> index - * POST /api/desk/configurations -> create - * GET /api/desk/configurations/:id -> show - * PUT /api/desk/configurations/:id -> update - * DELETE /api/desk/configurations/:id -> destroy - */ - -'use strict'; - -var _ = require('lodash'); - -var DeskConfiguration = require('../../models').DeskConfiguration; -var DeskField = require('../../models').DeskField; - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of DeskConfigurations -exports.index = function(req, res) { - DeskConfiguration.findAll({ - where: req.query - }) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single DeskConfiguration from the DB -exports.show = function(req, res) { - DeskConfiguration.find({ - where: { - id: req.params.id - }, - include: [{ - model: DeskField, - as: 'Subject' - }, { - model: DeskField, - as: 'Description' - }, { - model: DeskField, - as: 'Field' - }] - }) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new DeskConfiguration in the DB -exports.create = function(req, res) { - DeskConfiguration.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing DeskConfiguration in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - DeskConfiguration.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a DeskConfiguration from the DB -exports.destroy = function(req, res) { - DeskConfiguration.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -exports.addConfigurationField = function(req, res, next) { - // console.log(req.params); - var deskConfiguration; - DeskConfiguration - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(desk_configuration) { - deskConfiguration = desk_configuration; - return DeskField.create(req.body) - }) - .then(function(deskField) { - switch (req.params.type) { - case 'subject': - return [deskConfiguration.addSubject(deskField), deskField]; - case 'description': - return [deskConfiguration.addDescription(deskField), deskField]; - case 'field': - return [deskConfiguration.addField(deskField), deskField]; - } - }) - .spread(function(data, deskField) { - return res.status(201).json(deskField); - }) - .catch(handleError(res)); -}; +var _0x38e2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0x38e2[0];var _=require(_0x38e2[1]);var DeskConfiguration=require(_0x38e2[3])[_0x38e2[2]];var DeskField=require(_0x38e2[3])[_0x38e2[4]];function handleError(_0x126ex5,_0x126ex6){_0x126ex6= _0x126ex6|| 500;return function(_0x126ex7){_0x126ex5[_0x38e2[6]](_0x126ex6)[_0x38e2[5]](_0x126ex7)}}function responseWithResult(_0x126ex5,_0x126ex6){_0x126ex6= _0x126ex6|| 200;return function(_0x126ex9){if(_0x126ex9){_0x126ex5[_0x38e2[6]](_0x126ex6)[_0x38e2[7]](_0x126ex9)}}}function handleEntityNotFound(_0x126ex5){return function(_0x126ex9){if(!_0x126ex9){_0x126ex5[_0x38e2[6]](404)[_0x38e2[8]]();return null};return _0x126ex9}}function saveUpdates(_0x126exc){return function(_0x126ex9){return _0x126ex9[_0x38e2[10]](_0x126exc)[_0x38e2[9]](function(_0x126exd){return _0x126exd})}}function removeEntity(_0x126ex5){return function(_0x126ex9){if(_0x126ex9){return _0x126ex9[_0x38e2[11]]()[_0x38e2[9]](function(){_0x126ex5[_0x38e2[6]](204)[_0x38e2[8]]()})}}}exports[_0x38e2[12]]= function(_0x126exf,_0x126ex5){DeskConfiguration[_0x38e2[15]]({where:_0x126exf[_0x38e2[14]]})[_0x38e2[9]](responseWithResult(_0x126ex5))[_0x38e2[13]](handleError(_0x126ex5))};exports[_0x38e2[16]]= function(_0x126exf,_0x126ex5){DeskConfiguration[_0x38e2[22]]({where:{id:_0x126exf[_0x38e2[18]][_0x38e2[17]]},include:[{model:DeskField,as:_0x38e2[19]},{model:DeskField,as:_0x38e2[20]},{model:DeskField,as:_0x38e2[21]}]})[_0x38e2[9]](handleEntityNotFound(_0x126ex5))[_0x38e2[9]](responseWithResult(_0x126ex5))[_0x38e2[13]](handleError(_0x126ex5))};exports[_0x38e2[23]]= function(_0x126exf,_0x126ex5){DeskConfiguration[_0x38e2[23]](_0x126exf[_0x38e2[24]])[_0x38e2[9]](responseWithResult(_0x126ex5,201))[_0x38e2[13]](handleError(_0x126ex5))};exports[_0x38e2[25]]= function(_0x126exf,_0x126ex5){if(_0x126exf[_0x38e2[24]][_0x38e2[17]]){delete _0x126exf[_0x38e2[24]][_0x38e2[17]]};DeskConfiguration[_0x38e2[26]](_0x126exf[_0x38e2[18]][_0x38e2[17]])[_0x38e2[9]](handleEntityNotFound(_0x126ex5))[_0x38e2[9]](saveUpdates(_0x126exf[_0x38e2[24]]))[_0x38e2[9]](responseWithResult(_0x126ex5))[_0x38e2[13]](handleError(_0x126ex5))};exports[_0x38e2[11]]= function(_0x126exf,_0x126ex5){DeskConfiguration[_0x38e2[26]](_0x126exf[_0x38e2[18]][_0x38e2[17]])[_0x38e2[9]](handleEntityNotFound(_0x126ex5))[_0x38e2[9]](removeEntity(_0x126ex5))[_0x38e2[13]](handleError(_0x126ex5))};exports[_0x38e2[27]]= function(_0x126exf,_0x126ex5,_0x126ex10){var _0x126ex11;DeskConfiguration[_0x38e2[26]](_0x126exf[_0x38e2[18]][_0x38e2[17]])[_0x38e2[9]](handleEntityNotFound(_0x126ex5))[_0x38e2[9]](function(_0x126ex14){_0x126ex11= _0x126ex14;return DeskField[_0x38e2[23]](_0x126exf[_0x38e2[24]])})[_0x38e2[9]](function(_0x126ex13){switch(_0x126exf[_0x38e2[18]][_0x38e2[35]]){case _0x38e2[30]:return [_0x126ex11[_0x38e2[29]](_0x126ex13),_0x126ex13];case _0x38e2[32]:return [_0x126ex11[_0x38e2[31]](_0x126ex13),_0x126ex13];case _0x38e2[34]:return [_0x126ex11[_0x38e2[33]](_0x126ex13),_0x126ex13]}})[_0x38e2[28]](function(_0x126ex12,_0x126ex13){return _0x126ex5[_0x38e2[6]](201)[_0x38e2[7]](_0x126ex13)})[_0x38e2[13]](handleError(_0x126ex5))} \ No newline at end of file diff --git a/server/api/desk_configuration/desk_configuration.events.js b/server/api/desk_configuration/desk_configuration.events.js index 12fbc47..8e14070 100644 --- a/server/api/desk_configuration/desk_configuration.events.js +++ b/server/api/desk_configuration/desk_configuration.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const DeskConfiguration = require('../../models').DeskConfiguration; - -var DeskConfigurationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -DeskConfigurationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - DeskConfiguration.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - DeskConfigurationEvents.emit(event + ':' + doc._id, doc); - DeskConfigurationEvents.emit(event, doc); - done(null); - } -} - -module.exports = DeskConfigurationEvents; +var _0xf117=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf117[0];const EventEmitter=require(_0xf117[1]);const DeskConfiguration=require(_0xf117[3])[_0xf117[2]];var DeskConfigurationEvents= new EventEmitter();DeskConfigurationEvents[_0xf117[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf117[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf117[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf117[6]};for(var e in events){var event=events[e];DeskConfiguration[_0xf117[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6f6fx8,_0x6f6fx9,_0x6f6fxa){DeskConfigurationEvents[_0xf117[10]](event+ _0xf117[8]+ _0x6f6fx8[_0xf117[9]],_0x6f6fx8);DeskConfigurationEvents[_0xf117[10]](event,_0x6f6fx8);_0x6f6fxa(null)}}module[_0xf117[11]]= DeskConfigurationEvents \ No newline at end of file diff --git a/server/api/desk_configuration/desk_configuration.socket.js b/server/api/desk_configuration/desk_configuration.socket.js index 5bc3ca6..4e86415 100644 --- a/server/api/desk_configuration/desk_configuration.socket.js +++ b/server/api/desk_configuration/desk_configuration.socket.js @@ -1,28 +1 @@ -'use strict'; - -const DeskConfigurationEvents = require('./desk_configuration.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('desk_configuration:' + event, socket); - - DeskConfigurationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - DeskConfigurationEvents.removeListener(event, listener); - }; -} +var _0xceb3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xceb3[0];const DeskConfigurationEvents=require(_0xceb3[1]);var events=[_0xceb3[2],_0xceb3[3]];exports[_0xceb3[4]]= function(_0x9705x3){for(var _0x9705x4=0,_0x9705x5=events[_0xceb3[5]];_0x9705x4< _0x9705x5;_0x9705x4++){var _0x9705x6=events[_0x9705x4];var _0x9705x7=createListener(_0xceb3[6]+ _0x9705x6,_0x9705x3);DeskConfigurationEvents[_0xceb3[7]](_0x9705x6,_0x9705x7);_0x9705x3[_0xceb3[7]](_0xceb3[8],removeListener(_0x9705x6,_0x9705x7))}};function createListener(_0x9705x6,_0x9705x3){return function(_0x9705x9){_0x9705x3[_0xceb3[9]](_0x9705x6,_0x9705x9)}}function removeListener(_0x9705x6,_0x9705x7){return function(){DeskConfigurationEvents[_0xceb3[10]](_0x9705x6,_0x9705x7)}} \ No newline at end of file diff --git a/server/api/desk_configuration/index.js b/server/api/desk_configuration/index.js index 23cf463..943d130 100644 --- a/server/api/desk_configuration/index.js +++ b/server/api/desk_configuration/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./desk_configuration.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); - -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.post('/:id/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationField); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); - - -module.exports = router; +var _0xd8dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd8dc[0];var express=require(_0xd8dc[1]);var auth=require(_0xd8dc[2]);var controller=require(_0xd8dc[3]);var router=express.Router();router[_0xd8dc[7]](_0xd8dc[4],auth[_0xd8dc[5]](),controller[_0xd8dc[6]]);router[_0xd8dc[7]](_0xd8dc[8],auth[_0xd8dc[5]](),auth[_0xd8dc[10]]([19],[_0xd8dc[9]]),controller[_0xd8dc[11]]);router[_0xd8dc[13]](_0xd8dc[4],auth[_0xd8dc[5]](),auth[_0xd8dc[10]]([19],[_0xd8dc[9]]),controller[_0xd8dc[12]]);router[_0xd8dc[15]](_0xd8dc[8],auth[_0xd8dc[5]](),auth[_0xd8dc[10]]([19],[_0xd8dc[9]]),controller[_0xd8dc[14]]);router[_0xd8dc[13]](_0xd8dc[16],auth[_0xd8dc[5]](),auth[_0xd8dc[10]]([19],[_0xd8dc[9]]),controller[_0xd8dc[17]]);router[_0xd8dc[19]](_0xd8dc[8],auth[_0xd8dc[5]](),auth[_0xd8dc[10]]([19],[_0xd8dc[9]]),controller[_0xd8dc[18]]);module[_0xd8dc[20]]= router \ No newline at end of file diff --git a/server/api/desk_field/desk_field.controller.js b/server/api/desk_field/desk_field.controller.js index 6b39f83..ff5d5b3 100644 --- a/server/api/desk_field/desk_field.controller.js +++ b/server/api/desk_field/desk_field.controller.js @@ -1,104 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/desk/fields -> index - * POST /api/desk/fields -> create - * GET /api/desk/fields/:id -> show - * PUT /api/desk/fields/:id -> update - * DELETE /api/desk/fields/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var DeskField = require('../../models').DeskField; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of DeskFields -exports.index = function(req, res) { - DeskField.findAll() - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single DeskField from the DB -exports.show = function(req, res) { - DeskField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new DeskField in the DB -exports.create = function(req, res) { - DeskField.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing DeskField in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - DeskField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a DeskField from the DB -exports.destroy = function(req, res) { - DeskField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0x8288=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x8288[0];var _=require(_0x8288[1]);var DeskField=require(_0x8288[3])[_0x8288[2]];function handleError(_0xce48x4,_0xce48x5){_0xce48x5= _0xce48x5|| 500;return function(_0xce48x6){_0xce48x4[_0x8288[5]](_0xce48x5)[_0x8288[4]](_0xce48x6)}}function responseWithResult(_0xce48x4,_0xce48x5){_0xce48x5= _0xce48x5|| 200;return function(_0xce48x8){if(_0xce48x8){_0xce48x4[_0x8288[5]](_0xce48x5)[_0x8288[6]](_0xce48x8)}}}function handleEntityNotFound(_0xce48x4){return function(_0xce48x8){if(!_0xce48x8){_0xce48x4[_0x8288[5]](404)[_0x8288[7]]();return null};return _0xce48x8}}function saveUpdates(_0xce48xb){return function(_0xce48x8){return _0xce48x8[_0x8288[9]](_0xce48xb)[_0x8288[8]](function(_0xce48xc){return _0xce48xc})}}function removeEntity(_0xce48x4){return function(_0xce48x8){if(_0xce48x8){return _0xce48x8[_0x8288[10]]()[_0x8288[8]](function(){_0xce48x4[_0x8288[5]](204)[_0x8288[7]]()})}}}exports[_0x8288[11]]= function(_0xce48xe,_0xce48x4){DeskField[_0x8288[13]]()[_0x8288[8]](responseWithResult(_0xce48x4))[_0x8288[12]](handleError(_0xce48x4))};exports[_0x8288[14]]= function(_0xce48xe,_0xce48x4){DeskField[_0x8288[17]](_0xce48xe[_0x8288[16]][_0x8288[15]])[_0x8288[8]](handleEntityNotFound(_0xce48x4))[_0x8288[8]](responseWithResult(_0xce48x4))[_0x8288[12]](handleError(_0xce48x4))};exports[_0x8288[18]]= function(_0xce48xe,_0xce48x4){DeskField[_0x8288[18]](_0xce48xe[_0x8288[19]])[_0x8288[8]](responseWithResult(_0xce48x4,201))[_0x8288[12]](handleError(_0xce48x4))};exports[_0x8288[20]]= function(_0xce48xe,_0xce48x4){if(_0xce48xe[_0x8288[19]][_0x8288[15]]){delete _0xce48xe[_0x8288[19]][_0x8288[15]]};DeskField[_0x8288[17]](_0xce48xe[_0x8288[16]][_0x8288[15]])[_0x8288[8]](handleEntityNotFound(_0xce48x4))[_0x8288[8]](saveUpdates(_0xce48xe[_0x8288[19]]))[_0x8288[8]](responseWithResult(_0xce48x4))[_0x8288[12]](handleError(_0xce48x4))};exports[_0x8288[10]]= function(_0xce48xe,_0xce48x4){DeskField[_0x8288[17]](_0xce48xe[_0x8288[16]][_0x8288[15]])[_0x8288[8]](handleEntityNotFound(_0xce48x4))[_0x8288[8]](removeEntity(_0xce48x4))[_0x8288[12]](handleError(_0xce48x4))} \ No newline at end of file diff --git a/server/api/desk_field/desk_field.events.js b/server/api/desk_field/desk_field.events.js index 90e8c70..105b427 100644 --- a/server/api/desk_field/desk_field.events.js +++ b/server/api/desk_field/desk_field.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const DeskField = require('../../models').DeskField; - -var DeskFieldEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -DeskFieldEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - DeskField.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - DeskFieldEvents.emit(event + ':' + doc._id, doc); - DeskFieldEvents.emit(event, doc); - done(null); - } -} - -module.exports = DeskFieldEvents; +var _0x7070=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7070[0];const EventEmitter=require(_0x7070[1]);const DeskField=require(_0x7070[3])[_0x7070[2]];var DeskFieldEvents= new EventEmitter();DeskFieldEvents[_0x7070[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7070[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7070[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7070[6]};for(var e in events){var event=events[e];DeskField[_0x7070[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xbc4ex8,_0xbc4ex9,_0xbc4exa){DeskFieldEvents[_0x7070[10]](event+ _0x7070[8]+ _0xbc4ex8[_0x7070[9]],_0xbc4ex8);DeskFieldEvents[_0x7070[10]](event,_0xbc4ex8);_0xbc4exa(null)}}module[_0x7070[11]]= DeskFieldEvents \ No newline at end of file diff --git a/server/api/desk_field/desk_field.socket.js b/server/api/desk_field/desk_field.socket.js index b8144e2..bbdbd55 100644 --- a/server/api/desk_field/desk_field.socket.js +++ b/server/api/desk_field/desk_field.socket.js @@ -1,28 +1 @@ -'use strict'; - -const DeskFieldEvents = require('./desk_field.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('desk_field:' + event, socket); - - DeskFieldEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - DeskFieldEvents.removeListener(event, listener); - }; -} +var _0xb46b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb46b[0];const DeskFieldEvents=require(_0xb46b[1]);var events=[_0xb46b[2],_0xb46b[3]];exports[_0xb46b[4]]= function(_0x5fc5x3){for(var _0x5fc5x4=0,_0x5fc5x5=events[_0xb46b[5]];_0x5fc5x4< _0x5fc5x5;_0x5fc5x4++){var _0x5fc5x6=events[_0x5fc5x4];var _0x5fc5x7=createListener(_0xb46b[6]+ _0x5fc5x6,_0x5fc5x3);DeskFieldEvents[_0xb46b[7]](_0x5fc5x6,_0x5fc5x7);_0x5fc5x3[_0xb46b[7]](_0xb46b[8],removeListener(_0x5fc5x6,_0x5fc5x7))}};function createListener(_0x5fc5x6,_0x5fc5x3){return function(_0x5fc5x9){_0x5fc5x3[_0xb46b[9]](_0x5fc5x6,_0x5fc5x9)}}function removeListener(_0x5fc5x6,_0x5fc5x7){return function(){DeskFieldEvents[_0xb46b[10]](_0x5fc5x6,_0x5fc5x7)}} \ No newline at end of file diff --git a/server/api/desk_field/index.js b/server/api/desk_field/index.js index 37342d1..d89f0e1 100644 --- a/server/api/desk_field/index.js +++ b/server/api/desk_field/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./desk_field.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); - - -module.exports = router; +var _0xc4bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc4bd[0];var express=require(_0xc4bd[1]);var auth=require(_0xc4bd[2]);var controller=require(_0xc4bd[3]);var router=express.Router();router[_0xc4bd[9]](_0xc4bd[4],auth[_0xc4bd[5]](),auth[_0xc4bd[7]]([19],[_0xc4bd[6]]),controller[_0xc4bd[8]]);router[_0xc4bd[9]](_0xc4bd[10],auth[_0xc4bd[5]](),auth[_0xc4bd[7]]([19],[_0xc4bd[6]]),controller[_0xc4bd[11]]);router[_0xc4bd[13]](_0xc4bd[4],auth[_0xc4bd[5]](),auth[_0xc4bd[7]]([19],[_0xc4bd[6]]),controller[_0xc4bd[12]]);router[_0xc4bd[15]](_0xc4bd[10],auth[_0xc4bd[5]](),auth[_0xc4bd[7]]([19],[_0xc4bd[6]]),controller[_0xc4bd[14]]);router[_0xc4bd[17]](_0xc4bd[10],auth[_0xc4bd[5]](),auth[_0xc4bd[7]]([19],[_0xc4bd[6]]),controller[_0xc4bd[16]]);module[_0xc4bd[18]]= router \ No newline at end of file diff --git a/server/api/extracted_report/extracted_report.controller.js b/server/api/extracted_report/extracted_report.controller.js index 454f170..cdb0f80 100644 --- a/server/api/extracted_report/extracted_report.controller.js +++ b/server/api/extracted_report/extracted_report.controller.js @@ -1,207 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ExtractedReport = require('../../models').ExtractedReport; -var util = require('util'); -var path = require('path'); -var moment = require('moment'); -var config = require('../../config/environment'); -var base64 = require('file-base64'); -var fs = require('fs'); -var Util = require('../../config/util'); - -// Get list of extracted_reports -exports.index = function(req, res, next) { - switch (req.user.role) { - case 'user': - return ExtractedReport - .findAndCountAll(Util.getQuery(req.query, { - UserId: req.user.id - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - default: - return ExtractedReport - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -// Get a single extracted_reports -exports.show = function(req, res) { - return ExtractedReport - .findById(req.params.id) - .then(function(extracted) { - if (!extracted) { - return res.sendStatus(404); - } - return res.send(extracted); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.download = function(req, res) { - return ExtractedReport - .findById(req.params.id) - .then(function(extract) { - if (!extract) { - return res.status(404).send(extract); - } - var filepath = path.join(config.root, 'server', 'files', 'reports', extract.savename); - base64.encode(filepath, function(err, base64String) { - if (err) { - return handleError(res, err); - } else { - return res.status(200).send({ - downloadString: base64String - }); - } - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new extracted_report in the DB. -exports.create = function(req, res) { - return ExtractedReport - .create(req.body) - .then(function(extracted) { - return res.status(201).send(extracted); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing extracted_report in the DB. -exports.update = function(req, res) { - return ExtractedReport - .findAll({ - where: { - name: req.body.name, - id: { - $ne: req.body.id - } - } - }) - .then(function(extracted_reports) { - if (!extracted_reports) { - return res.sendStatus(404); - } - if (req.body.id) { - delete req.body.id; - } - return ExtractedReport - .findById(req.params.id); - }) - .then(function(extracted) { - if (!extracted) { - return res.sendStatus(404); - } - var updated = _.merge(extracted, req.body); - return updated.save(); - }) - .then(function(extracted) { - return res.status(200).send(extracted); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes an extracted_report from the DB. -exports.destroy = function(req, res) { - var _extracted; - return ExtractedReport - .findById(req.params.id) - .then(function(extracted) { - _extracted = extracted; - if (!extracted) { - return res.sendStatus(404); - } - return extracted.destroy(); - }) - .then(function() { - if (_extracted.savename) { - var filepath = path.join(config.root, 'server', 'files', 'reports', _extracted.savename); - fs.access(filepath, fs.R_OK | fs.W_OK, function(err) { - if (err) { - console.error('File does not exist or operation not permitted'); - } else { - fs.unlink(filepath, function(err) { - if (err) { - console.error('error deleting file :', err); - } else { - console.log('file deleted'); - } - }) - } - }); - } - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroy = function(req, res) { - var _extracts; - return ExtractedReport - .findAll({ - where: { - id: req.query.ids - } - }) - .then(function(extracts) { - _extracts = extracts; - var bulkDelete = []; - extracts.forEach(function(extracted) { - bulkDelete.push(extracted.destroy()); - }); - return bulkDelete; - }) - .all() - .then(function() { - _extracts.forEach(function(extracted) { - if (extracted.savename) { - var filepath = path.join(config.root, 'server', 'files', 'reports', extracted.savename); - fs.access(filepath, fs.R_OK | fs.W_OK, function(err) { - if (err) { - console.error('File does not exist or operation not permitted'); - } else { - fs.unlink(filepath, function(err) { - if (err) { - console.error('error deleting file :', err); - } else { - console.log('file deleted'); - } - }) - } - }); - } - }); - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - console.log(err); - return res.status(500).send(err); -} +var _0x9cdd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x66\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x69\x64","\x75\x73\x65\x72","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x65\x6E\x63\x6F\x64\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x74\x72\x6F\x79","\x52\x5F\x4F\x4B","\x57\x5F\x4F\x4B","\x46\x69\x6C\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74\x20\x6F\x72\x20\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x70\x65\x72\x6D\x69\x74\x74\x65\x64","\x65\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x20\x64\x65\x6C\x65\x74\x69\x6E\x67\x20\x66\x69\x6C\x65\x20\x3A","\x66\x69\x6C\x65\x20\x64\x65\x6C\x65\x74\x65\x64","\x6C\x6F\x67","\x75\x6E\x6C\x69\x6E\x6B","\x61\x63\x63\x65\x73\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x70\x75\x73\x68","\x69\x64\x73"];_0x9cdd[0];var _=require(_0x9cdd[1]);var ExtractedReport=require(_0x9cdd[3])[_0x9cdd[2]];var util=require(_0x9cdd[4]);var path=require(_0x9cdd[5]);var moment=require(_0x9cdd[6]);var config=require(_0x9cdd[7]);var base64=require(_0x9cdd[8]);var fs=require(_0x9cdd[9]);var Util=require(_0x9cdd[10]);exports[_0x9cdd[11]]= function(_0x9e41xa,_0x9e41xb,_0x9e41xc){switch(_0x9e41xa[_0x9cdd[18]][_0x9cdd[21]]){case _0x9cdd[18]:return ExtractedReport[_0x9cdd[20]](Util[_0x9cdd[19]](_0x9e41xa[_0x9cdd[16]],{UserId:_0x9e41xa[_0x9cdd[18]][_0x9cdd[17]]}))[_0x9cdd[15]](function(_0x9e41xe){_0x9e41xb[_0x9cdd[14]](200)[_0x9cdd[13]](_0x9e41xe)})[_0x9cdd[12]](function(_0x9e41xd){return handleError(_0x9e41xb,_0x9e41xd)});default:return ExtractedReport[_0x9cdd[20]](Util[_0x9cdd[19]](_0x9e41xa[_0x9cdd[16]]))[_0x9cdd[15]](function(_0x9e41xe){_0x9e41xb[_0x9cdd[14]](200)[_0x9cdd[13]](_0x9e41xe)})[_0x9cdd[12]](function(_0x9e41xd){return handleError(_0x9e41xb,_0x9e41xd)})}};exports[_0x9cdd[22]]= function(_0x9e41xa,_0x9e41xb){return ExtractedReport[_0x9cdd[25]](_0x9e41xa[_0x9cdd[24]][_0x9cdd[17]])[_0x9cdd[15]](function(_0x9e41xf){if(!_0x9e41xf){return _0x9e41xb[_0x9cdd[23]](404)};return _0x9e41xb[_0x9cdd[13]](_0x9e41xf)})[_0x9cdd[12]](function(_0x9e41xd){return handleError(_0x9e41xb,_0x9e41xd)})};exports[_0x9cdd[26]]= function(_0x9e41xa,_0x9e41xb){return ExtractedReport[_0x9cdd[25]](_0x9e41xa[_0x9cdd[24]][_0x9cdd[17]])[_0x9cdd[15]](function(_0x9e41x10){if(!_0x9e41x10){return _0x9e41xb[_0x9cdd[14]](404)[_0x9cdd[13]](_0x9e41x10)};var _0x9e41x11=path[_0x9cdd[32]](config[_0x9cdd[27]],_0x9cdd[28],_0x9cdd[29],_0x9cdd[30],_0x9e41x10[_0x9cdd[31]]);base64[_0x9cdd[33]](_0x9e41x11,function(_0x9e41xd,_0x9e41x12){if(_0x9e41xd){return handleError(_0x9e41xb,_0x9e41xd)}else {return _0x9e41xb[_0x9cdd[14]](200)[_0x9cdd[13]]({downloadString:_0x9e41x12})}})})[_0x9cdd[12]](function(_0x9e41xd){return handleError(_0x9e41xb,_0x9e41xd)})};exports[_0x9cdd[34]]= function(_0x9e41xa,_0x9e41xb){return ExtractedReport[_0x9cdd[34]](_0x9e41xa[_0x9cdd[35]])[_0x9cdd[15]](function(_0x9e41xf){return _0x9e41xb[_0x9cdd[14]](201)[_0x9cdd[13]](_0x9e41xf)})[_0x9cdd[12]](function(_0x9e41xd){return handleError(_0x9e41xb,_0x9e41xd)})};exports[_0x9cdd[36]]= function(_0x9e41xa,_0x9e41xb){return ExtractedReport[_0x9cdd[40]]({where:{name:_0x9e41xa[_0x9cdd[35]][_0x9cdd[39]],id:{$ne:_0x9e41xa[_0x9cdd[35]][_0x9cdd[17]]}}})[_0x9cdd[15]](function(_0x9e41x14){if(!_0x9e41x14){return _0x9e41xb[_0x9cdd[23]](404)};if(_0x9e41xa[_0x9cdd[35]][_0x9cdd[17]]){delete _0x9e41xa[_0x9cdd[35]][_0x9cdd[17]]};return ExtractedReport[_0x9cdd[25]](_0x9e41xa[_0x9cdd[24]][_0x9cdd[17]])})[_0x9cdd[15]](function(_0x9e41xf){if(!_0x9e41xf){return _0x9e41xb[_0x9cdd[23]](404)};var _0x9e41x13=_[_0x9cdd[37]](_0x9e41xf,_0x9e41xa[_0x9cdd[35]]);return _0x9e41x13[_0x9cdd[38]]()})[_0x9cdd[15]](function(_0x9e41xf){return _0x9e41xb[_0x9cdd[14]](200)[_0x9cdd[13]](_0x9e41xf)})[_0x9cdd[12]](function(_0x9e41xd){return handleError(_0x9e41xb,_0x9e41xd)})};exports[_0x9cdd[41]]= function(_0x9e41xa,_0x9e41xb){var _0x9e41x15;return ExtractedReport[_0x9cdd[25]](_0x9e41xa[_0x9cdd[24]][_0x9cdd[17]])[_0x9cdd[15]](function(_0x9e41xf){_0x9e41x15= _0x9e41xf;if(!_0x9e41xf){return _0x9e41xb[_0x9cdd[23]](404)};return _0x9e41xf[_0x9cdd[41]]()})[_0x9cdd[15]](function(){if(_0x9e41x15[_0x9cdd[31]]){var _0x9e41x11=path[_0x9cdd[32]](config[_0x9cdd[27]],_0x9cdd[28],_0x9cdd[29],_0x9cdd[30],_0x9e41x15[_0x9cdd[31]]);fs[_0x9cdd[50]](_0x9e41x11,fs[_0x9cdd[42]]| fs[_0x9cdd[43]],function(_0x9e41xd){if(_0x9e41xd){console[_0x9cdd[45]](_0x9cdd[44])}else {fs[_0x9cdd[49]](_0x9e41x11,function(_0x9e41xd){if(_0x9e41xd){console[_0x9cdd[45]](_0x9cdd[46],_0x9e41xd)}else {console[_0x9cdd[48]](_0x9cdd[47])}})}})};return _0x9e41xb[_0x9cdd[23]](204)})[_0x9cdd[12]](function(_0x9e41xd){return handleError(_0x9e41xb,_0x9e41xd)})};exports[_0x9cdd[51]]= function(_0x9e41xa,_0x9e41xb){var _0x9e41x16;return ExtractedReport[_0x9cdd[40]]({where:{id:_0x9e41xa[_0x9cdd[16]][_0x9cdd[55]]}})[_0x9cdd[15]](function(_0x9e41x17){_0x9e41x16= _0x9e41x17;var _0x9e41x18=[];_0x9e41x17[_0x9cdd[52]](function(_0x9e41xf){_0x9e41x18[_0x9cdd[54]](_0x9e41xf[_0x9cdd[41]]())});return _0x9e41x18})[_0x9cdd[53]]()[_0x9cdd[15]](function(){_0x9e41x16[_0x9cdd[52]](function(_0x9e41xf){if(_0x9e41xf[_0x9cdd[31]]){var _0x9e41x11=path[_0x9cdd[32]](config[_0x9cdd[27]],_0x9cdd[28],_0x9cdd[29],_0x9cdd[30],_0x9e41xf[_0x9cdd[31]]);fs[_0x9cdd[50]](_0x9e41x11,fs[_0x9cdd[42]]| fs[_0x9cdd[43]],function(_0x9e41xd){if(_0x9e41xd){console[_0x9cdd[45]](_0x9cdd[44])}else {fs[_0x9cdd[49]](_0x9e41x11,function(_0x9e41xd){if(_0x9e41xd){console[_0x9cdd[45]](_0x9cdd[46],_0x9e41xd)}else {console[_0x9cdd[48]](_0x9cdd[47])}})}})}});return _0x9e41xb[_0x9cdd[23]](204)})[_0x9cdd[12]](function(_0x9e41xd){return handleError(_0x9e41xb,_0x9e41xd)})};function handleError(_0x9e41xb,_0x9e41xd){console[_0x9cdd[48]](_0x9e41xd);return _0x9e41xb[_0x9cdd[14]](500)[_0x9cdd[13]](_0x9e41xd)} \ No newline at end of file diff --git a/server/api/extracted_report/extracted_report.events.js b/server/api/extracted_report/extracted_report.events.js index 311b078..0fa4096 100644 --- a/server/api/extracted_report/extracted_report.events.js +++ b/server/api/extracted_report/extracted_report.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ExtractedReport = require('../../models').ExtractedReport; - -var ExtractedReportEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ExtractedReportEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ExtractedReport.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ExtractedReportEvents.emit(event + ':' + doc._id, doc); - ExtractedReportEvents.emit(event, doc); - done(null); - } -} - -module.exports = ExtractedReportEvents; +var _0xd326=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd326[0];const EventEmitter=require(_0xd326[1]);const ExtractedReport=require(_0xd326[3])[_0xd326[2]];var ExtractedReportEvents= new EventEmitter();ExtractedReportEvents[_0xd326[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd326[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd326[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd326[6]};for(var e in events){var event=events[e];ExtractedReport[_0xd326[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc5f3x8,_0xc5f3x9,_0xc5f3xa){ExtractedReportEvents[_0xd326[10]](event+ _0xd326[8]+ _0xc5f3x8[_0xd326[9]],_0xc5f3x8);ExtractedReportEvents[_0xd326[10]](event,_0xc5f3x8);_0xc5f3xa(null)}}module[_0xd326[11]]= ExtractedReportEvents \ No newline at end of file diff --git a/server/api/extracted_report/extracted_report.socket.js b/server/api/extracted_report/extracted_report.socket.js index 684fc40..acfd21b 100644 --- a/server/api/extracted_report/extracted_report.socket.js +++ b/server/api/extracted_report/extracted_report.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ExtractedReportEvents = require('./extracted_report.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('extracted_report:' + event, socket); - - ExtractedReportEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ExtractedReportEvents.removeListener(event, listener); - }; -} +var _0x76f1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x76f1[0];const ExtractedReportEvents=require(_0x76f1[1]);var events=[_0x76f1[2],_0x76f1[3]];exports[_0x76f1[4]]= function(_0xae55x3){for(var _0xae55x4=0,_0xae55x5=events[_0x76f1[5]];_0xae55x4< _0xae55x5;_0xae55x4++){var _0xae55x6=events[_0xae55x4];var _0xae55x7=createListener(_0x76f1[6]+ _0xae55x6,_0xae55x3);ExtractedReportEvents[_0x76f1[7]](_0xae55x6,_0xae55x7);_0xae55x3[_0x76f1[7]](_0x76f1[8],removeListener(_0xae55x6,_0xae55x7))}};function createListener(_0xae55x6,_0xae55x3){return function(_0xae55x9){_0xae55x3[_0x76f1[9]](_0xae55x6,_0xae55x9)}}function removeListener(_0xae55x6,_0xae55x7){return function(){ExtractedReportEvents[_0x76f1[10]](_0xae55x6,_0xae55x7)}} \ No newline at end of file diff --git a/server/api/extracted_report/index.js b/server/api/extracted_report/index.js index ab71e52..2e35bc8 100644 --- a/server/api/extracted_report/index.js +++ b/server/api/extracted_report/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./extracted_report.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index); -router.get('/:id/download', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.download); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.destroy); - -module.exports = router; +var _0x44b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x44b0[0];var express=require(_0x44b0[1]);var controller=require(_0x44b0[2]);var auth=require(_0x44b0[3]);var router=express.Router();router[_0x44b0[9]](_0x44b0[4],auth[_0x44b0[5]](),auth[_0x44b0[7]]([17],[_0x44b0[6]]),controller[_0x44b0[8]]);router[_0x44b0[9]](_0x44b0[10],auth[_0x44b0[5]](),auth[_0x44b0[7]]([17],[_0x44b0[6]]),controller[_0x44b0[11]]);router[_0x44b0[9]](_0x44b0[12],auth[_0x44b0[5]](),auth[_0x44b0[7]]([17],[_0x44b0[6]]),controller[_0x44b0[13]]);router[_0x44b0[15]](_0x44b0[4],auth[_0x44b0[5]](),auth[_0x44b0[7]]([17],[_0x44b0[6]]),controller[_0x44b0[14]]);router[_0x44b0[17]](_0x44b0[12],auth[_0x44b0[5]](),auth[_0x44b0[7]]([17],[_0x44b0[6]]),controller[_0x44b0[16]]);router[_0x44b0[19]](_0x44b0[4],auth[_0x44b0[5]](),auth[_0x44b0[7]]([17],[_0x44b0[6]]),controller[_0x44b0[18]]);router[_0x44b0[19]](_0x44b0[12],auth[_0x44b0[5]](),auth[_0x44b0[7]]([17],[_0x44b0[6]]),controller[_0x44b0[20]]);module[_0x44b0[21]]= router \ No newline at end of file diff --git a/server/api/fax_account/fax_account.controller.js b/server/api/fax_account/fax_account.controller.js index 92adae5..05b2981 100644 --- a/server/api/fax_account/fax_account.controller.js +++ b/server/api/fax_account/fax_account.controller.js @@ -1,474 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/fax/accounts -> index - * POST /api/fax/accounts -> create - * GET /api/fax/accounts/:id -> show - * PUT /api/fax/accounts/:id -> update - * DELETE /api/fax/accounts/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var sequelize = require('../../models').sequelize; - -var FaxAccount = require('../../models').FaxAccount; -var FaxRoom = require('../../models').FaxRoom; -var FaxApplication = require('../../models').FaxApplication; -var FaxQueue = require('../../models').FaxQueue; -var FaxDisposition = require('../../models').FaxDisposition; -var FaxMessage = require('../../models').FaxMessage; -var FaxAttachment = require('../../models').FaxAttachment; -var User = require('../../models').User; -var Interval = require('../../models').Interval; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 204; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of FaxAccounts -exports.index = function(req, res) { - return FaxAccount - .findAndCountAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single FaxAccount from the DB -exports.show = function(req, res) { - return FaxAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new FaxAccount in the DB -exports.create = function(req, res) { - return sequelize.transaction(function(t) { - return FaxAccount.create(req.body, { - transaction: t - }); - }) - .then(responseWithoutResult(res, 201)) - .catch(sequelize.ValidationError, function(err) { - err.message = 'Extension/context combination already exist'; - err.translatedMessage = 'MESSAGE_EXIST_ROUTE' - return res.status(500).send(err); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(handleError(res)); -} - -// Updates an existing FaxAccount in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return sequelize.transaction(function(t) { - return FaxAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(faxAccount) { - return faxAccount.updateAttributes(req.body, { - transaction: t - }) - }) - }) - .then(responseWithoutResult(res)) - .catch(sequelize.ValidationError, function(err) { - err.message = 'Extension/context combination already exist'; - err.translatedMessage = 'MESSAGE_EXIST_ROUTE' - return res.status(500).send(err); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(handleError(res)); -} - -// Deletes a FaxAccount from the DB -exports.destroy = function(req, res) { - return sequelize.transaction(function(t) { - return FaxAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(faxAccount) { - return faxAccount.destroy(); - }); - }) - .then(function() { - res.status(204).end(); - }) - .catch(handleError(res)); -} - -exports.bulkDestroy = function(req, res) { - return FaxAccount - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(responseWithoutResult(res)) - .catch(handleError(res)); -}; - -exports.showApplications = function(req, res, next) { - return FaxAccount - .scope('default') - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(faxAccount) { - return faxAccount - .getFaxApplications(_.merge(Util.getQuery(req.query), { - include: [{ - model: FaxQueue, - attributes: ['id', 'name'] - }, { - model: User, - attributes: ['id', 'name', 'online'] - }, { - model: Interval, - attributes: ['id', 'name'] - }] - })); - }) - .then(function(faxApplications) { - return res.send({ - count: faxApplications.length, - rows: faxApplications - }); - }) - .catch(handleError(res)); -}; - -exports.createApplication = function(req, res, next) { - return FaxApplication - .max('priority', { - where: { - FaxAccountId: req.params.id - } - }).then(function(max) { - // SET PRIORITY - req.body.priority = max ? ++max : 1; - req.body.FaxAccountId = req.params.id; - return FaxApplication - .create(req.body); - }) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -}; - -exports.bulkDestroyApplications = function(req, res) { - return FaxApplication - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(responseWithoutResult(res)) - .catch(handleError(res)); -}; - -exports.destroyApplication = function(req, res, next) { - return FaxApplication - .findById(req.params.appId) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -}; - -exports.updateApplications = function(req, res) { - - var priority = 0; - var apps = req.body; - - apps.forEach(function(app) { - delete app.id; - delete app.createdAt; - delete app.updatedAt; - - app.priority = ++priority; - }); - - return sequelize.transaction(function(t) { - return FaxApplication - .destroy({ - where: { - FaxAccountId: req.params.id - }, - individualHooks: true, - transaction: t - }) - .then(function(faxApplication) { - return FaxApplication - .bulkCreate(apps, { - individualHooks: true, - transaction: t - }); - }); - }) - .then(function(faxApplications) { - return res.status(200).send({ - count: faxApplications.length, - rows: faxApplications - }); - }) - .catch(handleError(res)); -}; - -exports.updateApplication = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return FaxApplication.findById(req.params.appId) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -exports.showApplication = function(req, res) { - return FaxApplication - .findById(req.params.appId, { - include: [{ - all: true - }] - }) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -exports.getFaxRooms = function(req, res, next) { - var _query = { - where: { - FaxAccountId: req.params.id, - $and: [] - }, - include: [], - attributes: ['id', 'contact', 'disposition', 'tags', 'lastEvent', 'updatedAt'] - }; - - // TO MOVE SOON INTO AN EXTENAL UTIL FILE - if (req.query) { - if (req.query.tags) { - if (_.isArray(req.query.tags)) { - for (var i = 0; i < req.query.tags.length; i++) { - _query.where.$and.push({ - tags: { - $like: '%' + req.query.tags[i] + '%' - } - }); - } - } else { - _query.where.$and.push({ - tags: { - $like: '%' + req.query.tags + '%' - } - }); - } - - delete req.query.tags; - } - - _.merge(_query.where, req.query); - } - - switch (req.user.role) { - case 'agent': - _query.include.push({ - model: User, - attributes: ['id'] - }); - - var _agents; - var _agentQueues; - var _accountQueues; - - return User - .findById(req.user.id) - .then(function(user) { - if (user) { - return user - .getFaxQueues(); - } else { - return []; - } - }) - .then(function(queues) { - _agentQueues = _.map(queues, 'id'); - return FaxAccount - .findById(req.params.id); - }) - .then(function(account) { - return account - .getFaxApplications({ - where: { - $or: [{ - app: 'queue' - }, { - app: 'agent' - }] - } - }); - }) - .then(function(apps) { - - _agents = _.map(_.find(apps, { - 'app': 'agent' - }), 'UserId'); - - _accountQueues = _.map(_.find(apps, { - 'app': 'queue' - }), 'FaxQueueId'); - - if (_.intersection(_agentQueues, _accountQueues).length || _.intersection(_agents, [req.user.id]).length) { - return FaxRoom - .findAll(_query) - .then(function(faxRooms) { - return res.status(200).send(faxRooms); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); - } else { - - return res.status(200).send([]); - } - }) - .catch(function(err) { - console.error(err); - }); - - default: - return FaxRoom - .findAll(_query) - .then(function(faxRooms) { - return res.status(200).send(faxRooms); - }) - .catch(handleError(res)); - } -}; - -exports.getDispositions = function(req, res, next) { - return FaxAccount - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(faxAccount) { - return faxAccount.getFaxDispositions(); - }) - .then(function(faxDispositions) { - return res.status(200).send({ - rows: faxDispositions, - count: faxDispositions.length - }); - }) - .catch(handleError(res)); -}; - -exports.createDisposition = function(req, res, next) { - req.body.FaxAccountId = req.params.id; - - return FaxDisposition - .create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -}; - -exports.updateDisposition = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return FaxDisposition - .findById(req.params.dispId) - .then(handleEntityNotFound(res)) - .then(function(faxDisposition) { - var updated = _.merge(faxDisposition, req.body); - return updated.save(); - }) - .then(responseWithResult(res, 200)) - .catch(handleError(res)); -}; - -exports.destroyDisposition = function(req, res, next) { - return FaxDisposition - .findById(req.params.dispId) - .then(handleEntityNotFound(res)) - .then(function(faxDiposition) { - return faxDiposition.destroy(); - }) - .then(responseWithoutResult(res, 204)) - .catch(handleError(res)); -}; - -exports.sendMessage = function(req, res, next) { - req.body.UserId = req.user.id; - - return FaxMessage - .create(req.body, { - include: [{ - model: FaxAttachment - }], - user: req.user - }) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -}; +var _0xa5da=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x62\x6F\x64\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x65\x72\x67\x65","\x67\x65\x74\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D\x73","\x63\x6F\x6E\x74\x61\x63\x74","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x74\x61\x67\x73","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x69\x73\x41\x72\x72\x61\x79","\x25","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x55\x73\x65\x72\x49\x64","\x6D\x61\x70","\x71\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65\x49\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x75\x73\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x6F\x6C\x65","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x73\x61\x76\x65","\x64\x69\x73\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65"];_0xa5da[0];var _=require(_0xa5da[1]);var Util=require(_0xa5da[2]);var sequelize=require(_0xa5da[4])[_0xa5da[3]];var FaxAccount=require(_0xa5da[4])[_0xa5da[5]];var FaxRoom=require(_0xa5da[4])[_0xa5da[6]];var FaxApplication=require(_0xa5da[4])[_0xa5da[7]];var FaxQueue=require(_0xa5da[4])[_0xa5da[8]];var FaxDisposition=require(_0xa5da[4])[_0xa5da[9]];var FaxMessage=require(_0xa5da[4])[_0xa5da[10]];var FaxAttachment=require(_0xa5da[4])[_0xa5da[11]];var User=require(_0xa5da[4])[_0xa5da[12]];var Interval=require(_0xa5da[4])[_0xa5da[13]];function handleError(_0xed51xe,_0xed51xf){_0xed51xf= _0xed51xf|| 500;return function(_0xed51x10){_0xed51xe[_0xa5da[15]](_0xed51xf)[_0xa5da[14]](_0xed51x10)}}function responseWithResult(_0xed51xe,_0xed51xf){_0xed51xf= _0xed51xf|| 200;return function(_0xed51x12){if(_0xed51x12){_0xed51xe[_0xa5da[15]](_0xed51xf)[_0xa5da[16]](_0xed51x12)}}}function responseWithoutResult(_0xed51xe,_0xed51xf){_0xed51xf= _0xed51xf|| 204;return function(){_0xed51xe[_0xa5da[17]](_0xed51xf)}}function handleEntityNotFound(_0xed51xe){return function(_0xed51x12){if(!_0xed51x12){_0xed51xe[_0xa5da[15]](404)[_0xa5da[18]]();return null};return _0xed51x12}}function saveUpdates(_0xed51x16){return function(_0xed51x12){return _0xed51x12[_0xa5da[20]](_0xed51x16)[_0xa5da[19]](function(_0xed51x17){return _0xed51x17})}}function removeEntity(_0xed51xe){return function(_0xed51x12){if(_0xed51x12){return _0xed51x12[_0xa5da[21]]()[_0xa5da[19]](function(){_0xed51xe[_0xa5da[15]](204)[_0xa5da[18]]()})}}}exports[_0xa5da[22]]= function(_0xed51x19,_0xed51xe){return FaxAccount[_0xa5da[26]](Util[_0xa5da[25]](_0xed51x19[_0xa5da[24]]))[_0xa5da[19]](responseWithResult(_0xed51xe))[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[27]]= function(_0xed51x19,_0xed51xe){return FaxAccount[_0xa5da[30]](_0xed51x19[_0xa5da[29]][_0xa5da[28]])[_0xa5da[19]](handleEntityNotFound(_0xed51xe))[_0xa5da[19]](responseWithResult(_0xed51xe))[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[31]]= function(_0xed51x19,_0xed51xe){return sequelize[_0xa5da[39]](function(_0xed51x1a){return FaxAccount[_0xa5da[31]](_0xed51x19[_0xa5da[38]],{transaction:_0xed51x1a})})[_0xa5da[19]](responseWithoutResult(_0xed51xe,201))[_0xa5da[23]](sequelize.ValidationError,function(_0xed51x10){_0xed51x10[_0xa5da[34]]= _0xa5da[35];_0xed51x10[_0xa5da[36]]= _0xa5da[37];return _0xed51xe[_0xa5da[15]](500)[_0xa5da[14]](_0xed51x10)})[_0xa5da[23]](sequelize.UniqueConstraintError,function(_0xed51x10){return Util[_0xa5da[33]][_0xa5da[32]](_0xed51xe,_0xed51x10)})[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[40]]= function(_0xed51x19,_0xed51xe){if(_0xed51x19[_0xa5da[38]][_0xa5da[28]]){delete _0xed51x19[_0xa5da[38]][_0xa5da[28]]};return sequelize[_0xa5da[39]](function(_0xed51x1a){return FaxAccount[_0xa5da[30]](_0xed51x19[_0xa5da[29]][_0xa5da[28]])[_0xa5da[19]](handleEntityNotFound(_0xed51xe))[_0xa5da[19]](function(_0xed51x1b){return _0xed51x1b[_0xa5da[20]](_0xed51x19[_0xa5da[38]],{transaction:_0xed51x1a})})})[_0xa5da[19]](responseWithoutResult(_0xed51xe))[_0xa5da[23]](sequelize.ValidationError,function(_0xed51x10){_0xed51x10[_0xa5da[34]]= _0xa5da[35];_0xed51x10[_0xa5da[36]]= _0xa5da[37];return _0xed51xe[_0xa5da[15]](500)[_0xa5da[14]](_0xed51x10)})[_0xa5da[23]](sequelize.UniqueConstraintError,function(_0xed51x10){return Util[_0xa5da[33]][_0xa5da[32]](_0xed51xe,_0xed51x10)})[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[21]]= function(_0xed51x19,_0xed51xe){return sequelize[_0xa5da[39]](function(_0xed51x1a){return FaxAccount[_0xa5da[30]](_0xed51x19[_0xa5da[29]][_0xa5da[28]])[_0xa5da[19]](handleEntityNotFound(_0xed51xe))[_0xa5da[19]](function(_0xed51x1b){return _0xed51x1b[_0xa5da[21]]()})})[_0xa5da[19]](function(){_0xed51xe[_0xa5da[15]](204)[_0xa5da[18]]()})[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[41]]= function(_0xed51x19,_0xed51xe){return FaxAccount[_0xa5da[21]]({where:{id:_0xed51x19[_0xa5da[24]][_0xa5da[42]]},individualHooks:true})[_0xa5da[19]](responseWithoutResult(_0xed51xe))[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[43]]= function(_0xed51x19,_0xed51xe,_0xed51x1c){return FaxAccount[_0xa5da[50]](_0xa5da[49])[_0xa5da[30]](_0xed51x19[_0xa5da[29]][_0xa5da[28]])[_0xa5da[19]](handleEntityNotFound(_0xed51xe))[_0xa5da[19]](function(_0xed51x1b){return _0xed51x1b[_0xa5da[48]](_[_0xa5da[47]](Util[_0xa5da[25]](_0xed51x19[_0xa5da[24]]),{include:[{model:FaxQueue,attributes:[_0xa5da[28],_0xa5da[45]]},{model:User,attributes:[_0xa5da[28],_0xa5da[45],_0xa5da[46]]},{model:Interval,attributes:[_0xa5da[28],_0xa5da[45]]}]}))})[_0xa5da[19]](function(_0xed51x1d){return _0xed51xe[_0xa5da[14]]({count:_0xed51x1d[_0xa5da[44]],rows:_0xed51x1d})})[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[51]]= function(_0xed51x19,_0xed51xe,_0xed51x1c){return FaxApplication[_0xa5da[54]](_0xa5da[52],{where:{FaxAccountId:_0xed51x19[_0xa5da[29]][_0xa5da[28]]}})[_0xa5da[19]](function(_0xed51x1e){_0xed51x19[_0xa5da[38]][_0xa5da[52]]= _0xed51x1e?++_0xed51x1e:1;_0xed51x19[_0xa5da[38]][_0xa5da[53]]= _0xed51x19[_0xa5da[29]][_0xa5da[28]];return FaxApplication[_0xa5da[31]](_0xed51x19[_0xa5da[38]])})[_0xa5da[19]](responseWithResult(_0xed51xe,201))[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[55]]= function(_0xed51x19,_0xed51xe){return FaxApplication[_0xa5da[21]]({where:{id:_0xed51x19[_0xa5da[24]][_0xa5da[42]]},individualHooks:true})[_0xa5da[19]](responseWithoutResult(_0xed51xe))[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[56]]= function(_0xed51x19,_0xed51xe,_0xed51x1c){return FaxApplication[_0xa5da[30]](_0xed51x19[_0xa5da[29]][_0xa5da[57]])[_0xa5da[19]](handleEntityNotFound(_0xed51xe))[_0xa5da[19]](removeEntity(_0xed51xe))[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[58]]= function(_0xed51x19,_0xed51xe){var _0xed51x1f=0;var _0xed51x20=_0xed51x19[_0xa5da[38]];_0xed51x20[_0xa5da[61]](function(_0xed51x21){delete _0xed51x21[_0xa5da[28]];delete _0xed51x21[_0xa5da[59]];delete _0xed51x21[_0xa5da[60]];_0xed51x21[_0xa5da[52]]= ++_0xed51x1f});return sequelize[_0xa5da[39]](function(_0xed51x1a){return FaxApplication[_0xa5da[21]]({where:{FaxAccountId:_0xed51x19[_0xa5da[29]][_0xa5da[28]]},individualHooks:true,transaction:_0xed51x1a})[_0xa5da[19]](function(_0xed51x22){return FaxApplication[_0xa5da[62]](_0xed51x20,{individualHooks:true,transaction:_0xed51x1a})})})[_0xa5da[19]](function(_0xed51x1d){return _0xed51xe[_0xa5da[15]](200)[_0xa5da[14]]({count:_0xed51x1d[_0xa5da[44]],rows:_0xed51x1d})})[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[63]]= function(_0xed51x19,_0xed51xe){if(_0xed51x19[_0xa5da[38]][_0xa5da[28]]){delete _0xed51x19[_0xa5da[38]][_0xa5da[28]]};return FaxApplication[_0xa5da[30]](_0xed51x19[_0xa5da[29]][_0xa5da[57]])[_0xa5da[19]](handleEntityNotFound(_0xed51xe))[_0xa5da[19]](saveUpdates(_0xed51x19[_0xa5da[38]]))[_0xa5da[19]](responseWithResult(_0xed51xe))[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[64]]= function(_0xed51x19,_0xed51xe){return FaxApplication[_0xa5da[30]](_0xed51x19[_0xa5da[29]][_0xa5da[57]],{include:[{all:true}]})[_0xa5da[19]](handleEntityNotFound(_0xed51xe))[_0xa5da[19]](responseWithResult(_0xed51xe))[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[65]]= function(_0xed51x19,_0xed51xe,_0xed51x1c){var _0xed51x23={where:{FaxAccountId:_0xed51x19[_0xa5da[29]][_0xa5da[28]],$and:[]},include:[],attributes:[_0xa5da[28],_0xa5da[66],_0xa5da[67],_0xa5da[68],_0xa5da[69],_0xa5da[60]]};if(_0xed51x19[_0xa5da[24]]){if(_0xed51x19[_0xa5da[24]][_0xa5da[68]]){if(_[_0xa5da[70]](_0xed51x19[_0xa5da[24]][_0xa5da[68]])){for(var _0xed51x24=0;_0xed51x24< _0xed51x19[_0xa5da[24]][_0xa5da[68]][_0xa5da[44]];_0xed51x24++){_0xed51x23[_0xa5da[74]][_0xa5da[73]][_0xa5da[72]]({tags:{$like:_0xa5da[71]+ _0xed51x19[_0xa5da[24]][_0xa5da[68]][_0xed51x24]+ _0xa5da[71]}})}}else {_0xed51x23[_0xa5da[74]][_0xa5da[73]][_0xa5da[72]]({tags:{$like:_0xa5da[71]+ _0xed51x19[_0xa5da[24]][_0xa5da[68]]+ _0xa5da[71]}})};delete _0xed51x19[_0xa5da[24]][_0xa5da[68]]};_[_0xa5da[47]](_0xed51x23[_0xa5da[74]],_0xed51x19[_0xa5da[24]])};switch(_0xed51x19[_0xa5da[84]][_0xa5da[87]]){case _0xa5da[77]:_0xed51x23[_0xa5da[75]][_0xa5da[72]]({model:User,attributes:[_0xa5da[28]]});var _0xed51x25;var _0xed51x26;var _0xed51x27;return User[_0xa5da[30]](_0xed51x19[_0xa5da[84]][_0xa5da[28]])[_0xa5da[19]](function(_0xed51x2b){if(_0xed51x2b){return _0xed51x2b[_0xa5da[86]]()}else {return []}})[_0xa5da[19]](function(_0xed51x2a){_0xed51x26= _[_0xa5da[80]](_0xed51x2a,_0xa5da[28]);return FaxAccount[_0xa5da[30]](_0xed51x19[_0xa5da[29]][_0xa5da[28]])})[_0xa5da[19]](function(_0xed51x29){return _0xed51x29[_0xa5da[48]]({where:{$or:[{app:_0xa5da[81]},{app:_0xa5da[77]}]}})})[_0xa5da[19]](function(_0xed51x20){_0xed51x25= _[_0xa5da[80]](_[_0xa5da[78]](_0xed51x20,{"\x61\x70\x70":_0xa5da[77]}),_0xa5da[79]);_0xed51x27= _[_0xa5da[80]](_[_0xa5da[78]](_0xed51x20,{"\x61\x70\x70":_0xa5da[81]}),_0xa5da[82]);if(_[_0xa5da[83]](_0xed51x26,_0xed51x27)[_0xa5da[44]]|| _[_0xa5da[83]](_0xed51x25,[_0xed51x19[_0xa5da[84]][_0xa5da[28]]])[_0xa5da[44]]){return FaxRoom[_0xa5da[85]](_0xed51x23)[_0xa5da[19]](function(_0xed51x28){return _0xed51xe[_0xa5da[15]](200)[_0xa5da[14]](_0xed51x28)})[_0xa5da[23]](function(_0xed51x10){console[_0xa5da[76]](_0xed51x10);return handleError(_0xed51xe,_0xed51x10)})}else {return _0xed51xe[_0xa5da[15]](200)[_0xa5da[14]]([])}})[_0xa5da[23]](function(_0xed51x10){console[_0xa5da[76]](_0xed51x10)});default:return FaxRoom[_0xa5da[85]](_0xed51x23)[_0xa5da[19]](function(_0xed51x28){return _0xed51xe[_0xa5da[15]](200)[_0xa5da[14]](_0xed51x28)})[_0xa5da[23]](handleError(_0xed51xe))}};exports[_0xa5da[88]]= function(_0xed51x19,_0xed51xe,_0xed51x1c){return FaxAccount[_0xa5da[30]](_0xed51x19[_0xa5da[29]][_0xa5da[28]])[_0xa5da[19]](handleEntityNotFound(_0xed51xe))[_0xa5da[19]](function(_0xed51x1b){return _0xed51x1b[_0xa5da[89]]()})[_0xa5da[19]](function(_0xed51x2c){return _0xed51xe[_0xa5da[15]](200)[_0xa5da[14]]({rows:_0xed51x2c,count:_0xed51x2c[_0xa5da[44]]})})[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[90]]= function(_0xed51x19,_0xed51xe,_0xed51x1c){_0xed51x19[_0xa5da[38]][_0xa5da[53]]= _0xed51x19[_0xa5da[29]][_0xa5da[28]];return FaxDisposition[_0xa5da[31]](_0xed51x19[_0xa5da[38]])[_0xa5da[19]](responseWithResult(_0xed51xe,201))[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[91]]= function(_0xed51x19,_0xed51xe){if(_0xed51x19[_0xa5da[38]][_0xa5da[28]]){delete _0xed51x19[_0xa5da[38]][_0xa5da[28]]};return FaxDisposition[_0xa5da[30]](_0xed51x19[_0xa5da[29]][_0xa5da[93]])[_0xa5da[19]](handleEntityNotFound(_0xed51xe))[_0xa5da[19]](function(_0xed51x2d){var _0xed51x17=_[_0xa5da[47]](_0xed51x2d,_0xed51x19[_0xa5da[38]]);return _0xed51x17[_0xa5da[92]]()})[_0xa5da[19]](responseWithResult(_0xed51xe,200))[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[94]]= function(_0xed51x19,_0xed51xe,_0xed51x1c){return FaxDisposition[_0xa5da[30]](_0xed51x19[_0xa5da[29]][_0xa5da[93]])[_0xa5da[19]](handleEntityNotFound(_0xed51xe))[_0xa5da[19]](function(_0xed51x2e){return _0xed51x2e[_0xa5da[21]]()})[_0xa5da[19]](responseWithoutResult(_0xed51xe,204))[_0xa5da[23]](handleError(_0xed51xe))};exports[_0xa5da[95]]= function(_0xed51x19,_0xed51xe,_0xed51x1c){_0xed51x19[_0xa5da[38]][_0xa5da[79]]= _0xed51x19[_0xa5da[84]][_0xa5da[28]];return FaxMessage[_0xa5da[31]](_0xed51x19[_0xa5da[38]],{include:[{model:FaxAttachment}],user:_0xed51x19[_0xa5da[84]]})[_0xa5da[19]](responseWithResult(_0xed51xe,201))[_0xa5da[23]](handleError(_0xed51xe))} \ No newline at end of file diff --git a/server/api/fax_account/fax_account.events.js b/server/api/fax_account/fax_account.events.js index 076c9bc..f2692bc 100644 --- a/server/api/fax_account/fax_account.events.js +++ b/server/api/fax_account/fax_account.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const FaxAccount = require('../../models').FaxAccount; - -var FaxAccountEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -FaxAccountEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - FaxAccount.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - FaxAccountEvents.emit(event + ':' + doc._id, doc); - FaxAccountEvents.emit(event, doc); - done(null); - } -} - -module.exports = FaxAccountEvents; +var _0xcf4d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xcf4d[0];const EventEmitter=require(_0xcf4d[1]);const FaxAccount=require(_0xcf4d[3])[_0xcf4d[2]];var FaxAccountEvents= new EventEmitter();FaxAccountEvents[_0xcf4d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xcf4d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xcf4d[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xcf4d[6]};for(var e in events){var event=events[e];FaxAccount[_0xcf4d[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa854x8,_0xa854x9,_0xa854xa){FaxAccountEvents[_0xcf4d[10]](event+ _0xcf4d[8]+ _0xa854x8[_0xcf4d[9]],_0xa854x8);FaxAccountEvents[_0xcf4d[10]](event,_0xa854x8);_0xa854xa(null)}}module[_0xcf4d[11]]= FaxAccountEvents \ No newline at end of file diff --git a/server/api/fax_account/fax_account.socket.js b/server/api/fax_account/fax_account.socket.js index 777c337..f2b83f8 100644 --- a/server/api/fax_account/fax_account.socket.js +++ b/server/api/fax_account/fax_account.socket.js @@ -1,28 +1 @@ -'use strict'; - -const FaxAccountEvents = require('./fax_account.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('fax_account:' + event, socket); - - FaxAccountEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - FaxAccountEvents.removeListener(event, listener); - }; -} +var _0xe616=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xe616[0];const FaxAccountEvents=require(_0xe616[1]);var events=[_0xe616[2],_0xe616[3]];exports[_0xe616[4]]= function(_0xf519x3){for(var _0xf519x4=0,_0xf519x5=events[_0xe616[5]];_0xf519x4< _0xf519x5;_0xf519x4++){var _0xf519x6=events[_0xf519x4];var _0xf519x7=createListener(_0xe616[6]+ _0xf519x6,_0xf519x3);FaxAccountEvents[_0xe616[7]](_0xf519x6,_0xf519x7);_0xf519x3[_0xe616[7]](_0xe616[8],removeListener(_0xf519x6,_0xf519x7))}};function createListener(_0xf519x6,_0xf519x3){return function(_0xf519x9){_0xf519x3[_0xe616[9]](_0xf519x6,_0xf519x9)}}function removeListener(_0xf519x6,_0xf519x7){return function(){FaxAccountEvents[_0xe616[10]](_0xf519x6,_0xf519x7)}} \ No newline at end of file diff --git a/server/api/fax_account/index.js b/server/api/fax_account/index.js index 52e34bf..55bfcd9 100644 --- a/server/api/fax_account/index.js +++ b/server/api/fax_account/index.js @@ -1,31 +1 @@ -'use strict'; - -var express = require('express'); - -var auth = require('../../auth/auth.service'); -var controller = require('./fax_account.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.index); -router.get('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.show); -router.get('/:id/applications', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.showApplications); -router.get('/:id/applications/:appId', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.showApplication); -router.get('/:id/rooms', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.getFaxRooms); -router.get('/:id/dispositions', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.getDispositions); -router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.create); -router.post('/:id/applications', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.createApplication); -router.post('/:id/dispositions', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.createDisposition); -router.post('/:id/send', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.sendMessage); -router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.update); -router.put('/:id/applications', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.updateApplications); -router.put('/:id/applications/:appId', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.updateApplication); -router.put('/:id/dispositions/:dispId', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.updateDisposition); -router.delete('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.bulkDestroy); -router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroy); -router.delete('/:id/applications', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.bulkDestroyApplications); -router.delete('/:id/applications/:appId', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroyApplication); -router.delete('/:id/dispositions/:dispId', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroyDisposition); - -module.exports = router; +var _0x5178=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x72\x6F\x6F\x6D\x73","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x3A\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x5178[0];var express=require(_0x5178[1]);var auth=require(_0x5178[2]);var controller=require(_0x5178[3]);var license=require(_0x5178[4]);var router=express.Router();router[_0x5178[13]](_0x5178[5],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9],_0x5178[10]]),controller[_0x5178[12]]);router[_0x5178[13]](_0x5178[14],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9],_0x5178[10]]),controller[_0x5178[15]]);router[_0x5178[13]](_0x5178[16],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[17]]);router[_0x5178[13]](_0x5178[18],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[19]]);router[_0x5178[13]](_0x5178[20],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9],_0x5178[10]]),controller[_0x5178[21]]);router[_0x5178[13]](_0x5178[22],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9],_0x5178[10]]),controller[_0x5178[23]]);router[_0x5178[25]](_0x5178[5],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[24]]);router[_0x5178[25]](_0x5178[16],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[26]]);router[_0x5178[25]](_0x5178[22],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[27]]);router[_0x5178[25]](_0x5178[28],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9],_0x5178[10]]),controller[_0x5178[29]]);router[_0x5178[31]](_0x5178[14],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[30]]);router[_0x5178[31]](_0x5178[16],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[32]]);router[_0x5178[31]](_0x5178[18],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[33]]);router[_0x5178[31]](_0x5178[34],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[35]]);router[_0x5178[37]](_0x5178[5],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[36]]);router[_0x5178[37]](_0x5178[14],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[38]]);router[_0x5178[37]](_0x5178[16],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[39]]);router[_0x5178[37]](_0x5178[18],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[40]]);router[_0x5178[37]](_0x5178[34],license[_0x5178[6]](),license[_0x5178[7]](),auth[_0x5178[8]](),auth[_0x5178[11]]([10],[_0x5178[9]]),controller[_0x5178[41]]);module[_0x5178[42]]= router \ No newline at end of file diff --git a/server/api/fax_application/fax_application.controller.js b/server/api/fax_application/fax_application.controller.js index 59b09cb..5c47b45 100644 --- a/server/api/fax_application/fax_application.controller.js +++ b/server/api/fax_application/fax_application.controller.js @@ -1,94 +1 @@ -'use strict'; -var _ = require('lodash'); -var FaxApplication = require('../../models').FaxApplication; -// Get list of fax_applications -exports.index = function(req, res) { - FaxApplication.findAll({ - where: req.query - }).then(function(fax_applications) { - return res.status(200).send(fax_applications); - }).catch(function(err) { - return handleError(res, err); - }); -}; -// Get a single fax_application -exports.show = function(req, res) { - FaxApplication.findById(req.params.id).then(function(fax_application) { - if (!fax_application) { - return res.sendStatus(404); - } - return res.send(fax_application); - }).catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a new fax_application in the DB. -exports.create = function(req, res, next) { - console.log(req.body); - FaxApplication.max('priority', { - where: { - FaxAccountId: req.body.FaxAccountId - } - }).then(function(max) { - // SET PRIORITY - req.body.priority = max ? ++max : 1; - FaxApplication.create(req.body).then(function(faxApplication) { - return res.status(201).send(faxApplication); - }).catch(function(err) { - return next(err); - }); - console.log(max); - }).catch(function(err) { - next(err); - }); - // FaxApplication - // .create(req.body) - // .then(function(fax_application) { - // return res.status(201).send(fax_application); - // }) - // .catch(function(err) { - // return handleError(res, err); - // }); -}; -// Updates an existing fax_application in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - FaxApplication.findById(req.params.id).then(function(fax_application) { - if (!fax_application) { - return res.sendStatus(404); - } - var updated = _.merge(fax_application, req.body); - updated.save().then(function() { - return res.status(200).send(fax_application); - }).catch(function(err) { - return handleError(res, err); - }); - }).catch(function(err) { - return handleError(res, err); - }); -}; -// Deletes a fax_application from the DB. -exports.destroy = function(req, res) { - FaxApplication.find({ - where: { - id: req.params.id - } - }).then(function(fax_application) { - if (!fax_application) { - return res.sendStatus(404); - } - fax_application.destroy().then(function() { - return res.sendStatus(204); - }).catch(function(err) { - return handleError(res, err); - }); - }).catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x6757=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x6C\x6F\x67","\x70\x72\x69\x6F\x72\x69\x74\x79","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64"];_0x6757[0];var _=require(_0x6757[1]);var FaxApplication=require(_0x6757[3])[_0x6757[2]];exports[_0x6757[4]]= function(_0x7fd8x3,_0x7fd8x4){FaxApplication[_0x6757[10]]({where:_0x7fd8x3[_0x6757[9]]})[_0x6757[8]](function(_0x7fd8x6){return _0x7fd8x4[_0x6757[7]](200)[_0x6757[6]](_0x7fd8x6)})[_0x6757[5]](function(_0x7fd8x5){return handleError(_0x7fd8x4,_0x7fd8x5)})};exports[_0x6757[11]]= function(_0x7fd8x3,_0x7fd8x4){FaxApplication[_0x6757[15]](_0x7fd8x3[_0x6757[14]][_0x6757[13]])[_0x6757[8]](function(_0x7fd8x7){if(!_0x7fd8x7){return _0x7fd8x4[_0x6757[12]](404)};return _0x7fd8x4[_0x6757[6]](_0x7fd8x7)})[_0x6757[5]](function(_0x7fd8x5){return handleError(_0x7fd8x4,_0x7fd8x5)})};exports[_0x6757[16]]= function(_0x7fd8x3,_0x7fd8x4,_0x7fd8x8){console[_0x6757[18]](_0x7fd8x3[_0x6757[17]]);FaxApplication[_0x6757[21]](_0x6757[19],{where:{FaxAccountId:_0x7fd8x3[_0x6757[17]][_0x6757[20]]}})[_0x6757[8]](function(_0x7fd8x9){_0x7fd8x3[_0x6757[17]][_0x6757[19]]= _0x7fd8x9?++_0x7fd8x9:1;FaxApplication[_0x6757[16]](_0x7fd8x3[_0x6757[17]])[_0x6757[8]](function(_0x7fd8xa){return _0x7fd8x4[_0x6757[7]](201)[_0x6757[6]](_0x7fd8xa)})[_0x6757[5]](function(_0x7fd8x5){return _0x7fd8x8(_0x7fd8x5)});console[_0x6757[18]](_0x7fd8x9)})[_0x6757[5]](function(_0x7fd8x5){_0x7fd8x8(_0x7fd8x5)})};exports[_0x6757[22]]= function(_0x7fd8x3,_0x7fd8x4){if(_0x7fd8x3[_0x6757[17]][_0x6757[13]]){delete _0x7fd8x3[_0x6757[17]][_0x6757[13]]};FaxApplication[_0x6757[15]](_0x7fd8x3[_0x6757[14]][_0x6757[13]])[_0x6757[8]](function(_0x7fd8x7){if(!_0x7fd8x7){return _0x7fd8x4[_0x6757[12]](404)};var _0x7fd8xb=_[_0x6757[23]](_0x7fd8x7,_0x7fd8x3[_0x6757[17]]);_0x7fd8xb[_0x6757[24]]()[_0x6757[8]](function(){return _0x7fd8x4[_0x6757[7]](200)[_0x6757[6]](_0x7fd8x7)})[_0x6757[5]](function(_0x7fd8x5){return handleError(_0x7fd8x4,_0x7fd8x5)})})[_0x6757[5]](function(_0x7fd8x5){return handleError(_0x7fd8x4,_0x7fd8x5)})};exports[_0x6757[25]]= function(_0x7fd8x3,_0x7fd8x4){FaxApplication[_0x6757[26]]({where:{id:_0x7fd8x3[_0x6757[14]][_0x6757[13]]}})[_0x6757[8]](function(_0x7fd8x7){if(!_0x7fd8x7){return _0x7fd8x4[_0x6757[12]](404)};_0x7fd8x7[_0x6757[25]]()[_0x6757[8]](function(){return _0x7fd8x4[_0x6757[12]](204)})[_0x6757[5]](function(_0x7fd8x5){return handleError(_0x7fd8x4,_0x7fd8x5)})})[_0x6757[5]](function(_0x7fd8x5){return handleError(_0x7fd8x4,_0x7fd8x5)})};function handleError(_0x7fd8x4,_0x7fd8x5){return _0x7fd8x4[_0x6757[7]](500)[_0x6757[6]](_0x7fd8x5)} \ No newline at end of file diff --git a/server/api/fax_application/fax_application.events.js b/server/api/fax_application/fax_application.events.js index 72f4dd0..7e9ebc3 100644 --- a/server/api/fax_application/fax_application.events.js +++ b/server/api/fax_application/fax_application.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const FaxApplication = require('../../models').FaxApplication; - -var FaxApplicationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -FaxApplicationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - FaxApplication.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - FaxApplicationEvents.emit(event + ':' + doc._id, doc); - FaxApplicationEvents.emit(event, doc); - done(null); - } -} - -module.exports = FaxApplicationEvents; +var _0x167f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x167f[0];const EventEmitter=require(_0x167f[1]);const FaxApplication=require(_0x167f[3])[_0x167f[2]];var FaxApplicationEvents= new EventEmitter();FaxApplicationEvents[_0x167f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x167f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x167f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x167f[6]};for(var e in events){var event=events[e];FaxApplication[_0x167f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4b96x8,_0x4b96x9,_0x4b96xa){FaxApplicationEvents[_0x167f[10]](event+ _0x167f[8]+ _0x4b96x8[_0x167f[9]],_0x4b96x8);FaxApplicationEvents[_0x167f[10]](event,_0x4b96x8);_0x4b96xa(null)}}module[_0x167f[11]]= FaxApplicationEvents \ No newline at end of file diff --git a/server/api/fax_application/fax_application.socket.js b/server/api/fax_application/fax_application.socket.js index ce03f3d..b88655a 100644 --- a/server/api/fax_application/fax_application.socket.js +++ b/server/api/fax_application/fax_application.socket.js @@ -1,28 +1 @@ -'use strict'; - -const FaxApplicationEvents = require('./fax_application.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('fax_application:' + event, socket); - - FaxApplicationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - FaxApplicationEvents.removeListener(event, listener); - }; -} +var _0xadf7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xadf7[0];const FaxApplicationEvents=require(_0xadf7[1]);var events=[_0xadf7[2],_0xadf7[3]];exports[_0xadf7[4]]= function(_0xc5e5x3){for(var _0xc5e5x4=0,_0xc5e5x5=events[_0xadf7[5]];_0xc5e5x4< _0xc5e5x5;_0xc5e5x4++){var _0xc5e5x6=events[_0xc5e5x4];var _0xc5e5x7=createListener(_0xadf7[6]+ _0xc5e5x6,_0xc5e5x3);FaxApplicationEvents[_0xadf7[7]](_0xc5e5x6,_0xc5e5x7);_0xc5e5x3[_0xadf7[7]](_0xadf7[8],removeListener(_0xc5e5x6,_0xc5e5x7))}};function createListener(_0xc5e5x6,_0xc5e5x3){return function(_0xc5e5x9){_0xc5e5x3[_0xadf7[9]](_0xc5e5x6,_0xc5e5x9)}}function removeListener(_0xc5e5x6,_0xc5e5x7){return function(){FaxApplicationEvents[_0xadf7[10]](_0xc5e5x6,_0xc5e5x7)}} \ No newline at end of file diff --git a/server/api/fax_application/index.js b/server/api/fax_application/index.js index 91aae9d..6afca0c 100644 --- a/server/api/fax_application/index.js +++ b/server/api/fax_application/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./fax_application.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.show); -router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.create); -router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroy); -module.exports = router; +var _0x217c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x217c[0];var express=require(_0x217c[1]);var controller=require(_0x217c[2]);var auth=require(_0x217c[3]);var license=require(_0x217c[4]);var router=express.Router();router[_0x217c[12]](_0x217c[5],license[_0x217c[6]](),license[_0x217c[7]](),auth[_0x217c[8]](),auth[_0x217c[10]]([10],[_0x217c[9]]),controller[_0x217c[11]]);router[_0x217c[12]](_0x217c[13],license[_0x217c[6]](),license[_0x217c[7]](),auth[_0x217c[8]](),auth[_0x217c[10]]([10],[_0x217c[9]]),controller[_0x217c[14]]);router[_0x217c[16]](_0x217c[5],license[_0x217c[6]](),license[_0x217c[7]](),auth[_0x217c[8]](),auth[_0x217c[10]]([10],[_0x217c[9]]),controller[_0x217c[15]]);router[_0x217c[18]](_0x217c[13],license[_0x217c[6]](),license[_0x217c[7]](),auth[_0x217c[8]](),auth[_0x217c[10]]([10],[_0x217c[9]]),controller[_0x217c[17]]);router[_0x217c[20]](_0x217c[13],license[_0x217c[6]](),license[_0x217c[7]](),auth[_0x217c[8]](),auth[_0x217c[10]]([10],[_0x217c[9]]),controller[_0x217c[19]]);module[_0x217c[21]]= router \ No newline at end of file diff --git a/server/api/fax_attachment/fax_attachment.controller.js b/server/api/fax_attachment/fax_attachment.controller.js index 39802ff..e6a03be 100644 --- a/server/api/fax_attachment/fax_attachment.controller.js +++ b/server/api/fax_attachment/fax_attachment.controller.js @@ -1,140 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/fax/attachments -> index - * POST /api/fax/attachments -> create - * GET /api/fax/attachments/:id -> show - * PUT /api/fax/attachments/:id -> update - * DELETE /api/fax/attachments/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var path = require('path'); -var Util = require('../../config/util'); -var formidable = require('formidable'); -var Promise = require('bluebird'); - -var config = require('../../config/environment'); -var FaxAttachment = require('../../models').FaxAttachment; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 204; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of FaxAttachments -exports.index = function(req, res) { - return FaxAttachment.findAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single FaxAttachment from the DB -exports.show = function(req, res) { - return FaxAttachment.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(faxAttachment) { - return res.sendFile(faxAttachment.path); - }) - .catch(handleError(res)); -} - -// Creates a new FaxAttachment in the DB -exports.create = function(req, res) { - - var form = new formidable.IncomingForm(); - form.uploadDir = path.join(config.root, 'server', 'files', 'fax', 'outbound', 'original'); - form.keepExtensions = true; - form.multiples = true; - form.hash = true; - - form.parse(req, function(err, form, wrap) { - if (err) { - return res.status(500).send(err); - } - return res.status(201).send({ - path: wrap.file.path, - name: wrap.file.name, - basename: path.basename(wrap.file.path), - type: wrap.file.type - }); - }); - -} - -// Updates an existing FaxAttachment in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return FaxAttachment.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a FaxAttachment from the DB -exports.destroy = function(req, res) { - var unlink = Promise.promisify(require("fs").unlink); - var _path = path.join(config.root, 'server', 'files', 'fax', 'outbound', 'original', req.params.id); - - return unlink(_path) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -} +var _0xd4ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x75\x70\x6C\x6F\x61\x64\x44\x69\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x6A\x6F\x69\x6E","\x6B\x65\x65\x70\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x6D\x75\x6C\x74\x69\x70\x6C\x65\x73","\x68\x61\x73\x68","\x66\x69\x6C\x65","\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x75\x6E\x6C\x69\x6E\x6B","\x66\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79"];_0xd4ff[0];var _=require(_0xd4ff[1]);var path=require(_0xd4ff[2]);var Util=require(_0xd4ff[3]);var formidable=require(_0xd4ff[4]);var Promise=require(_0xd4ff[5]);var config=require(_0xd4ff[6]);var FaxAttachment=require(_0xd4ff[8])[_0xd4ff[7]];function handleError(_0x95d7x9,_0x95d7xa){_0x95d7xa= _0x95d7xa|| 500;return function(_0x95d7xb){_0x95d7x9[_0xd4ff[10]](_0x95d7xa)[_0xd4ff[9]](_0x95d7xb)}}function responseWithResult(_0x95d7x9,_0x95d7xa){_0x95d7xa= _0x95d7xa|| 200;return function(_0x95d7xd){if(_0x95d7xd){_0x95d7x9[_0xd4ff[10]](_0x95d7xa)[_0xd4ff[11]](_0x95d7xd)}}}function responseWithoutResult(_0x95d7x9,_0x95d7xa){_0x95d7xa= _0x95d7xa|| 204;return function(){_0x95d7x9[_0xd4ff[12]](_0x95d7xa)}}function handleEntityNotFound(_0x95d7x9){return function(_0x95d7xd){if(!_0x95d7xd){_0x95d7x9[_0xd4ff[10]](404)[_0xd4ff[13]]();return null};return _0x95d7xd}}function saveUpdates(_0x95d7x11){return function(_0x95d7xd){return _0x95d7xd[_0xd4ff[15]](_0x95d7x11)[_0xd4ff[14]](function(_0x95d7x12){return _0x95d7x12})}}function removeEntity(_0x95d7x9){return function(_0x95d7xd){if(_0x95d7xd){return _0x95d7xd[_0xd4ff[16]]()[_0xd4ff[14]](function(){_0x95d7x9[_0xd4ff[10]](204)[_0xd4ff[13]]()})}}}exports[_0xd4ff[17]]= function(_0x95d7x14,_0x95d7x9){return FaxAttachment[_0xd4ff[21]](Util[_0xd4ff[20]](_0x95d7x14[_0xd4ff[19]]))[_0xd4ff[14]](responseWithResult(_0x95d7x9))[_0xd4ff[18]](handleError(_0x95d7x9))};exports[_0xd4ff[22]]= function(_0x95d7x14,_0x95d7x9){return FaxAttachment[_0xd4ff[26]](_0x95d7x14[_0xd4ff[25]][_0xd4ff[24]])[_0xd4ff[14]](handleEntityNotFound(_0x95d7x9))[_0xd4ff[14]](function(_0x95d7x15){return _0x95d7x9[_0xd4ff[23]](_0x95d7x15[_0xd4ff[2]])})[_0xd4ff[18]](handleError(_0x95d7x9))};exports[_0xd4ff[27]]= function(_0x95d7x14,_0x95d7x9){var _0x95d7x16= new formidable.IncomingForm();_0x95d7x16[_0xd4ff[28]]= path[_0xd4ff[35]](config[_0xd4ff[29]],_0xd4ff[30],_0xd4ff[31],_0xd4ff[32],_0xd4ff[33],_0xd4ff[34]);_0x95d7x16[_0xd4ff[36]]= true;_0x95d7x16[_0xd4ff[37]]= true;_0x95d7x16[_0xd4ff[38]]= true;_0x95d7x16[_0xd4ff[43]](_0x95d7x14,function(_0x95d7xb,_0x95d7x16,_0x95d7x17){if(_0x95d7xb){return _0x95d7x9[_0xd4ff[10]](500)[_0xd4ff[9]](_0x95d7xb)};return _0x95d7x9[_0xd4ff[10]](201)[_0xd4ff[9]]({path:_0x95d7x17[_0xd4ff[39]][_0xd4ff[2]],name:_0x95d7x17[_0xd4ff[39]][_0xd4ff[40]],basename:path[_0xd4ff[41]](_0x95d7x17[_0xd4ff[39]][_0xd4ff[2]]),type:_0x95d7x17[_0xd4ff[39]][_0xd4ff[42]]})})};exports[_0xd4ff[44]]= function(_0x95d7x14,_0x95d7x9){if(_0x95d7x14[_0xd4ff[45]][_0xd4ff[24]]){delete _0x95d7x14[_0xd4ff[45]][_0xd4ff[24]]};return FaxAttachment[_0xd4ff[26]](_0x95d7x14[_0xd4ff[25]][_0xd4ff[24]])[_0xd4ff[14]](handleEntityNotFound(_0x95d7x9))[_0xd4ff[14]](saveUpdates(_0x95d7x14[_0xd4ff[45]]))[_0xd4ff[14]](responseWithResult(_0x95d7x9))[_0xd4ff[18]](handleError(_0x95d7x9))};exports[_0xd4ff[16]]= function(_0x95d7x14,_0x95d7x9){var _0x95d7x18=Promise[_0xd4ff[48]](require(_0xd4ff[47])[_0xd4ff[46]]);var _0x95d7x19=path[_0xd4ff[35]](config[_0xd4ff[29]],_0xd4ff[30],_0xd4ff[31],_0xd4ff[32],_0xd4ff[33],_0xd4ff[34],_0x95d7x14[_0xd4ff[25]][_0xd4ff[24]]);return _0x95d7x18(_0x95d7x19)[_0xd4ff[14]](function(){return _0x95d7x9[_0xd4ff[12]](204)})[_0xd4ff[18]](function(_0x95d7xb){return handleError(_0x95d7x9,_0x95d7xb)})} \ No newline at end of file diff --git a/server/api/fax_attachment/fax_attachment.events.js b/server/api/fax_attachment/fax_attachment.events.js index 173e113..bb73c3e 100644 --- a/server/api/fax_attachment/fax_attachment.events.js +++ b/server/api/fax_attachment/fax_attachment.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const FaxAttachment = require('../../models').FaxAttachment; - -var FaxAttachmentEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -FaxAttachmentEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - FaxAttachment.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - FaxAttachmentEvents.emit(event + ':' + doc._id, doc); - FaxAttachmentEvents.emit(event, doc); - done(null); - } -} - -module.exports = FaxAttachmentEvents; +var _0xa154=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa154[0];const EventEmitter=require(_0xa154[1]);const FaxAttachment=require(_0xa154[3])[_0xa154[2]];var FaxAttachmentEvents= new EventEmitter();FaxAttachmentEvents[_0xa154[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa154[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa154[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa154[6]};for(var e in events){var event=events[e];FaxAttachment[_0xa154[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6899x8,_0x6899x9,_0x6899xa){FaxAttachmentEvents[_0xa154[10]](event+ _0xa154[8]+ _0x6899x8[_0xa154[9]],_0x6899x8);FaxAttachmentEvents[_0xa154[10]](event,_0x6899x8);_0x6899xa(null)}}module[_0xa154[11]]= FaxAttachmentEvents \ No newline at end of file diff --git a/server/api/fax_attachment/fax_attachment.socket.js b/server/api/fax_attachment/fax_attachment.socket.js index ab07da6..47c38b3 100644 --- a/server/api/fax_attachment/fax_attachment.socket.js +++ b/server/api/fax_attachment/fax_attachment.socket.js @@ -1,28 +1 @@ -'use strict'; - -const FaxAttachmentEvents = require('./fax_attachment.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('fax_attachment:' + event, socket); - - FaxAttachmentEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - FaxAttachmentEvents.removeListener(event, listener); - }; -} +var _0x659c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x659c[0];const FaxAttachmentEvents=require(_0x659c[1]);var events=[_0x659c[2],_0x659c[3]];exports[_0x659c[4]]= function(_0x9586x3){for(var _0x9586x4=0,_0x9586x5=events[_0x659c[5]];_0x9586x4< _0x9586x5;_0x9586x4++){var _0x9586x6=events[_0x9586x4];var _0x9586x7=createListener(_0x659c[6]+ _0x9586x6,_0x9586x3);FaxAttachmentEvents[_0x659c[7]](_0x9586x6,_0x9586x7);_0x9586x3[_0x659c[7]](_0x659c[8],removeListener(_0x9586x6,_0x9586x7))}};function createListener(_0x9586x6,_0x9586x3){return function(_0x9586x9){_0x9586x3[_0x659c[9]](_0x9586x6,_0x9586x9)}}function removeListener(_0x9586x6,_0x9586x7){return function(){FaxAttachmentEvents[_0x659c[10]](_0x9586x6,_0x9586x7)}} \ No newline at end of file diff --git a/server/api/fax_attachment/index.js b/server/api/fax_attachment/index.js index 9dd6190..4858ba0 100644 --- a/server/api/fax_attachment/index.js +++ b/server/api/fax_attachment/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); - -var auth = require('../../auth/auth.service'); -var controller = require('./fax_attachment.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.index); -router.get('/:id', license.isValidDate(), license.hasFax(), controller.show); -router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.create); -router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.destroy); -module.exports = router; +var _0x64de=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x64de[0];var express=require(_0x64de[1]);var auth=require(_0x64de[2]);var controller=require(_0x64de[3]);var license=require(_0x64de[4]);var router=express.Router();router[_0x64de[13]](_0x64de[5],license[_0x64de[6]](),license[_0x64de[7]](),auth[_0x64de[8]](),auth[_0x64de[11]]([10],[_0x64de[9],_0x64de[10]]),controller[_0x64de[12]]);router[_0x64de[13]](_0x64de[14],license[_0x64de[6]](),license[_0x64de[7]](),controller[_0x64de[15]]);router[_0x64de[17]](_0x64de[5],license[_0x64de[6]](),license[_0x64de[7]](),auth[_0x64de[8]](),auth[_0x64de[11]]([10],[_0x64de[9],_0x64de[10]]),controller[_0x64de[16]]);router[_0x64de[19]](_0x64de[14],license[_0x64de[6]](),license[_0x64de[7]](),auth[_0x64de[8]](),auth[_0x64de[11]]([10],[_0x64de[9],_0x64de[10]]),controller[_0x64de[18]]);router[_0x64de[21]](_0x64de[14],license[_0x64de[6]](),license[_0x64de[7]](),auth[_0x64de[8]](),auth[_0x64de[11]]([10],[_0x64de[9],_0x64de[10]]),controller[_0x64de[20]]);module[_0x64de[22]]= router \ No newline at end of file diff --git a/server/api/fax_disposition/fax_disposition.controller.js b/server/api/fax_disposition/fax_disposition.controller.js index c3dcbb7..ca59979 100644 --- a/server/api/fax_disposition/fax_disposition.controller.js +++ b/server/api/fax_disposition/fax_disposition.controller.js @@ -1,112 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/fax/dispositions -> index - * POST /api/fax/dispositions -> create - * GET /api/fax/dispositions/:id -> show - * PUT /api/fax/dispositions/:id -> update - * DELETE /api/fax/dispositions/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var FaxDisposition = require('../../models').FaxDisposition; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 204; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of FaxDispositions -exports.index = function(req, res) { - return FaxDisposition.findAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single FaxDisposition from the DB -exports.show = function(req, res) { - return FaxDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new FaxDisposition in the DB -exports.create = function(req, res) { - return FaxDisposition.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing FaxDisposition in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return FaxDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a FaxDisposition from the DB -exports.destroy = function(req, res) { - return FaxDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0x8ee4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x8ee4[0];var _=require(_0x8ee4[1]);var Util=require(_0x8ee4[2]);var FaxDisposition=require(_0x8ee4[4])[_0x8ee4[3]];function handleError(_0xaa73x5,_0xaa73x6){_0xaa73x6= _0xaa73x6|| 500;return function(_0xaa73x7){_0xaa73x5[_0x8ee4[6]](_0xaa73x6)[_0x8ee4[5]](_0xaa73x7)}}function responseWithResult(_0xaa73x5,_0xaa73x6){_0xaa73x6= _0xaa73x6|| 200;return function(_0xaa73x9){if(_0xaa73x9){_0xaa73x5[_0x8ee4[6]](_0xaa73x6)[_0x8ee4[7]](_0xaa73x9)}}}function responseWithoutResult(_0xaa73x5,_0xaa73x6){_0xaa73x6= _0xaa73x6|| 204;return function(){_0xaa73x5[_0x8ee4[8]](_0xaa73x6)}}function handleEntityNotFound(_0xaa73x5){return function(_0xaa73x9){if(!_0xaa73x9){_0xaa73x5[_0x8ee4[6]](404)[_0x8ee4[9]]();return null};return _0xaa73x9}}function saveUpdates(_0xaa73xd){return function(_0xaa73x9){return _0xaa73x9[_0x8ee4[11]](_0xaa73xd)[_0x8ee4[10]](function(_0xaa73xe){return _0xaa73xe})}}function removeEntity(_0xaa73x5){return function(_0xaa73x9){if(_0xaa73x9){return _0xaa73x9[_0x8ee4[12]]()[_0x8ee4[10]](function(){_0xaa73x5[_0x8ee4[6]](204)[_0x8ee4[9]]()})}}}exports[_0x8ee4[13]]= function(_0xaa73x10,_0xaa73x5){return FaxDisposition[_0x8ee4[17]](Util[_0x8ee4[16]](_0xaa73x10[_0x8ee4[15]]))[_0x8ee4[10]](responseWithResult(_0xaa73x5))[_0x8ee4[14]](handleError(_0xaa73x5))};exports[_0x8ee4[18]]= function(_0xaa73x10,_0xaa73x5){return FaxDisposition[_0x8ee4[21]](_0xaa73x10[_0x8ee4[20]][_0x8ee4[19]])[_0x8ee4[10]](handleEntityNotFound(_0xaa73x5))[_0x8ee4[10]](responseWithResult(_0xaa73x5))[_0x8ee4[14]](handleError(_0xaa73x5))};exports[_0x8ee4[22]]= function(_0xaa73x10,_0xaa73x5){return FaxDisposition[_0x8ee4[22]](_0xaa73x10[_0x8ee4[23]])[_0x8ee4[10]](responseWithResult(_0xaa73x5,201))[_0x8ee4[14]](handleError(_0xaa73x5))};exports[_0x8ee4[24]]= function(_0xaa73x10,_0xaa73x5){if(_0xaa73x10[_0x8ee4[23]][_0x8ee4[19]]){delete _0xaa73x10[_0x8ee4[23]][_0x8ee4[19]]};return FaxDisposition[_0x8ee4[21]](_0xaa73x10[_0x8ee4[20]][_0x8ee4[19]])[_0x8ee4[10]](handleEntityNotFound(_0xaa73x5))[_0x8ee4[10]](saveUpdates(_0xaa73x10[_0x8ee4[23]]))[_0x8ee4[10]](responseWithResult(_0xaa73x5))[_0x8ee4[14]](handleError(_0xaa73x5))};exports[_0x8ee4[12]]= function(_0xaa73x10,_0xaa73x5){return FaxDisposition[_0x8ee4[21]](_0xaa73x10[_0x8ee4[20]][_0x8ee4[19]])[_0x8ee4[10]](handleEntityNotFound(_0xaa73x5))[_0x8ee4[10]](removeEntity(_0xaa73x5))[_0x8ee4[14]](handleError(_0xaa73x5))} \ No newline at end of file diff --git a/server/api/fax_disposition/fax_disposition.events.js b/server/api/fax_disposition/fax_disposition.events.js index ea2756f..8aab282 100644 --- a/server/api/fax_disposition/fax_disposition.events.js +++ b/server/api/fax_disposition/fax_disposition.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const FaxDisposition = require('../../models').FaxDisposition; - -var FaxDispositionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -FaxDispositionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - FaxDisposition.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - FaxDispositionEvents.emit(event + ':' + doc._id, doc); - FaxDispositionEvents.emit(event, doc); - done(null); - } -} - -module.exports = FaxDispositionEvents; +var _0x76ac=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x76ac[0];const EventEmitter=require(_0x76ac[1]);const FaxDisposition=require(_0x76ac[3])[_0x76ac[2]];var FaxDispositionEvents= new EventEmitter();FaxDispositionEvents[_0x76ac[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x76ac[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x76ac[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x76ac[6]};for(var e in events){var event=events[e];FaxDisposition[_0x76ac[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xdb70x8,_0xdb70x9,_0xdb70xa){FaxDispositionEvents[_0x76ac[10]](event+ _0x76ac[8]+ _0xdb70x8[_0x76ac[9]],_0xdb70x8);FaxDispositionEvents[_0x76ac[10]](event,_0xdb70x8);_0xdb70xa(null)}}module[_0x76ac[11]]= FaxDispositionEvents \ No newline at end of file diff --git a/server/api/fax_disposition/fax_disposition.socket.js b/server/api/fax_disposition/fax_disposition.socket.js index 42f6297..8ab33d9 100644 --- a/server/api/fax_disposition/fax_disposition.socket.js +++ b/server/api/fax_disposition/fax_disposition.socket.js @@ -1,28 +1 @@ -'use strict'; - -const FaxDispositionEvents = require('./fax_disposition.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('fax_disposition:' + event, socket); - - FaxDispositionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - FaxDispositionEvents.removeListener(event, listener); - }; -} +var _0x3221=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3221[0];const FaxDispositionEvents=require(_0x3221[1]);var events=[_0x3221[2],_0x3221[3]];exports[_0x3221[4]]= function(_0xf6bfx3){for(var _0xf6bfx4=0,_0xf6bfx5=events[_0x3221[5]];_0xf6bfx4< _0xf6bfx5;_0xf6bfx4++){var _0xf6bfx6=events[_0xf6bfx4];var _0xf6bfx7=createListener(_0x3221[6]+ _0xf6bfx6,_0xf6bfx3);FaxDispositionEvents[_0x3221[7]](_0xf6bfx6,_0xf6bfx7);_0xf6bfx3[_0x3221[7]](_0x3221[8],removeListener(_0xf6bfx6,_0xf6bfx7))}};function createListener(_0xf6bfx6,_0xf6bfx3){return function(_0xf6bfx9){_0xf6bfx3[_0x3221[9]](_0xf6bfx6,_0xf6bfx9)}}function removeListener(_0xf6bfx6,_0xf6bfx7){return function(){FaxDispositionEvents[_0x3221[10]](_0xf6bfx6,_0xf6bfx7)}} \ No newline at end of file diff --git a/server/api/fax_disposition/index.js b/server/api/fax_disposition/index.js index 2e61ead..c954b47 100644 --- a/server/api/fax_disposition/index.js +++ b/server/api/fax_disposition/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./fax_disposition.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); -router.get('/:id', auth.isAuthenticated(), controller.show); -router.post('/', auth.isAuthenticated(), controller.create); -router.put('/:id', auth.isAuthenticated(), controller.update); -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - -module.exports = router; +var _0xc31f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc31f[0];var express=require(_0xc31f[1]);var auth=require(_0xc31f[2]);var controller=require(_0xc31f[3]);var router=express.Router();router[_0xc31f[7]](_0xc31f[4],auth[_0xc31f[5]](),controller[_0xc31f[6]]);router[_0xc31f[7]](_0xc31f[8],auth[_0xc31f[5]](),controller[_0xc31f[9]]);router[_0xc31f[11]](_0xc31f[4],auth[_0xc31f[5]](),controller[_0xc31f[10]]);router[_0xc31f[13]](_0xc31f[8],auth[_0xc31f[5]](),controller[_0xc31f[12]]);router[_0xc31f[14]](_0xc31f[8],auth[_0xc31f[5]](),controller[_0xc31f[12]]);router[_0xc31f[16]](_0xc31f[8],auth[_0xc31f[5]](),controller[_0xc31f[15]]);module[_0xc31f[17]]= router \ No newline at end of file diff --git a/server/api/fax_message/fax_message.ami.js b/server/api/fax_message/fax_message.ami.js index 8bb89b2..2137beb 100644 --- a/server/api/fax_message/fax_message.ami.js +++ b/server/api/fax_message/fax_message.ami.js @@ -1,64 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); - -var FaxMessage = require('../../models').FaxMessage; -var Trunk = require('../../models').User; - -exports.register = function(ami) { - - FaxMessage.afterCreate(function(doc) { - console.log('FaxMessage afterCreate'); - // onSave(ami, doc); - }); -}; - -function onSave(ami, doc, cb) { - if (doc.status === 'NOT SENT' && !doc.actionid) { - // I have to send the fax with the Originate - var faxBody = JSON.parse(doc.body); - console.log('faxBody', faxBody); - - Trunk - .findById(faxBody.trunk.id) - .then(function(trunk) { - var action = { - Action: 'originate', - CallerID: faxBody.from, - Channel: util.format('%s/%s@%s', faxBody.technology, faxBody.to, trunk.name), - Context: 'outbound-fax', - Exten: 's', - Priority: 1, - Async: 'true', - Variable: { - MAXRATE: faxBody.maxrate, - MINRATE: faxBody.minrate, - ECM: faxBody.ecm ? 'yes' : 'no', - LOCALID: faxBody.fax_localid, - FAXFILE: faxBody.fax_file, - // 'FAXFILE': 'test.tiff', // Scommentare se si fanno prove in locale! - FAXHEADER: faxBody.fax_header, - FAXUUID: faxBody.uuid - } - }; - - ami.action(action, function(err, res) { - if (err) { - doc.updateAttributes({ - status: 'FAILED' - }); - } else { - if (res.response && res.actionid) { - doc.updateAttributes({ - actionid: res.actionid - }); - } - } - }); - }) - .catch(function(err) { - console.error(err); - }); - } -} +var _0xc4f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x20\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x4E\x4F\x54\x20\x53\x45\x4E\x54","\x61\x63\x74\x69\x6F\x6E\x69\x64","\x62\x6F\x64\x79","\x70\x61\x72\x73\x65","\x66\x61\x78\x42\x6F\x64\x79","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x66\x72\x6F\x6D","\x25\x73\x2F\x25\x73\x40\x25\x73","\x74\x65\x63\x68\x6E\x6F\x6C\x6F\x67\x79","\x74\x6F","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x73","\x74\x72\x75\x65","\x6D\x61\x78\x72\x61\x74\x65","\x6D\x69\x6E\x72\x61\x74\x65","\x65\x63\x6D","\x79\x65\x73","\x6E\x6F","\x66\x61\x78\x5F\x6C\x6F\x63\x61\x6C\x69\x64","\x66\x61\x78\x5F\x66\x69\x6C\x65","\x66\x61\x78\x5F\x68\x65\x61\x64\x65\x72","\x75\x75\x69\x64","\x46\x41\x49\x4C\x45\x44","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x74\x68\x65\x6E","\x69\x64","\x74\x72\x75\x6E\x6B","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0xc4f5[0];var _=require(_0xc4f5[1]);var util=require(_0xc4f5[2]);var FaxMessage=require(_0xc4f5[4])[_0xc4f5[3]];var Trunk=require(_0xc4f5[4])[_0xc4f5[5]];exports[_0xc4f5[6]]= function(_0xd298x5){FaxMessage[_0xc4f5[9]](function(_0xd298x6){console[_0xc4f5[8]](_0xc4f5[7])})};function onSave(_0xd298x5,_0xd298x6,_0xd298x8){if(_0xd298x6[_0xc4f5[10]]=== _0xc4f5[11]&& !_0xd298x6[_0xc4f5[12]]){var _0xd298x9=JSON[_0xc4f5[14]](_0xd298x6[_0xc4f5[13]]);console[_0xc4f5[8]](_0xc4f5[15],_0xd298x9);Trunk[_0xc4f5[44]](_0xd298x9[_0xc4f5[43]][_0xc4f5[42]])[_0xc4f5[41]](function(_0xd298xb){var _0xd298xc={Action:_0xc4f5[18],CallerID:_0xd298x9[_0xc4f5[19]],Channel:util[_0xc4f5[24]](_0xc4f5[20],_0xd298x9[_0xc4f5[21]],_0xd298x9[_0xc4f5[22]],_0xd298xb[_0xc4f5[23]]),Context:_0xc4f5[25],Exten:_0xc4f5[26],Priority:1,Async:_0xc4f5[27],Variable:{MAXRATE:_0xd298x9[_0xc4f5[28]],MINRATE:_0xd298x9[_0xc4f5[29]],ECM:_0xd298x9[_0xc4f5[30]]?_0xc4f5[31]:_0xc4f5[32],LOCALID:_0xd298x9[_0xc4f5[33]],FAXFILE:_0xd298x9[_0xc4f5[34]],FAXHEADER:_0xd298x9[_0xc4f5[35]],FAXUUID:_0xd298x9[_0xc4f5[36]]}};_0xd298x5[_0xc4f5[40]](_0xd298xc,function(_0xd298xa,_0xd298xd){if(_0xd298xa){_0xd298x6[_0xc4f5[38]]({status:_0xc4f5[37]})}else {if(_0xd298xd[_0xc4f5[39]]&& _0xd298xd[_0xc4f5[12]]){_0xd298x6[_0xc4f5[38]]({actionid:_0xd298xd[_0xc4f5[12]]})}}})})[_0xc4f5[17]](function(_0xd298xa){console[_0xc4f5[16]](_0xd298xa)})}} \ No newline at end of file diff --git a/server/api/fax_message/fax_message.controller.js b/server/api/fax_message/fax_message.controller.js index 39fa261..864eae9 100644 --- a/server/api/fax_message/fax_message.controller.js +++ b/server/api/fax_message/fax_message.controller.js @@ -1,175 +1 @@ -'use strict'; - -var _ = require('lodash'); -var fs = require('fs'); -var path = require('path'); -var uploadFile = require('upload-file'); -var uuidLib = require('node-uuid'); -var pdf = require('html-pdf'); -// var spindrift = require('spindrift'); -var formidable = require('formidable'); -var exec = require('child_process').exec; -var config = require('../../config/environment'); - -var FaxMessage = require('../../models').FaxMessage; -var FaxAttachment = require('../../models').FaxAttachment; -var FaxRoom = require('../../models').FaxRoom; -var FaxAccount = require('../../models').FaxAccount; -var FaxAttachment = require('../../models').FaxAttachment; -var User = require('../../models').User; - -// Get list of fax_message -exports.index = function(req, res, next) { - var params = { - order: 'createdAt DESC', - include: [{ - all: true, - include: [{ - all: true - }] - }] - }; - - switch (req.user.role) { - case 'admin': - params.where = req.query; - break; - case 'agent': - break; - default: - } - - return FaxMessage - .findAll(params) - .then(function(fax_message) { - return res.status(200).send(fax_message); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -exports.describe = function(req, res) { - return FaxMessage - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single faxMessage -exports.show = function(req, res, next) { - return FaxMessage - .findById(req.params.id, { - include: [{ - model: FaxAttachment - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }) - .then(function(faxMessage) { - if (!faxMessage) { - return res.sendStatus(404); - } - return res.send(faxMessage); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -// Creates a new faxMessage in the DB. -exports.create = function(req, res, next) { - req.body.UserId = req.user.id; - req.body.text = req.body.text; - - return FaxMessage - .create(req.body, { - include: [{ - model: FaxAttachment - }] - }) - .then(function(faxMessage) { - return res.status(201).send(faxMessage); - }).catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing faxMessage in the DB. -exports.update = function(req, res, next) { - return FaxMessage - .findById(req.params.id, { - include: [{ - all: true - }] - }) - .then(function(faxMessage) { - if (!faxMessage) { - return res.sendStatus(404); - } - return faxMessage.updateAttributes(req.body, { - user: req.user - }); - }) - .then(function(updated) { - return res.status(200).send(updated); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -// Deletes a faxMessage from the DB. -exports.destroy = function(req, res, next) { - return FaxMessage - .findById(req.params.id) - .then(function(faxMessage) { - if (!faxMessage) { - return res.sendStatus(404); - } - return faxMessage - .destroy(); - }).then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -// Deletes a faxMessage from the DB. -exports.bulkDelete = function(req, res, next) { - return FaxMessage - .bulkUpdate({ - where: { - id: { - $in: req.body.id - } - }, - attributes: { - directory: 'TRASH' - } - }) - .then(function(faxMessage) { - if (!faxMessage) { - return res.sendStatus(404); - } - return faxMessage - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -function handleError(res, err, next) { - return res.status(500).send(err); -} +var _0x7b07=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x66\x73","\x70\x61\x74\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x68\x74\x6D\x6C\x2D\x70\x64\x66","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x74\x65\x78\x74","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0x7b07[0];var _=require(_0x7b07[1]);var fs=require(_0x7b07[2]);var path=require(_0x7b07[3]);var uploadFile=require(_0x7b07[4]);var uuidLib=require(_0x7b07[5]);var pdf=require(_0x7b07[6]);var formidable=require(_0x7b07[7]);var exec=require(_0x7b07[9])[_0x7b07[8]];var config=require(_0x7b07[10]);var FaxMessage=require(_0x7b07[12])[_0x7b07[11]];var FaxAttachment=require(_0x7b07[12])[_0x7b07[13]];var FaxRoom=require(_0x7b07[12])[_0x7b07[14]];var FaxAccount=require(_0x7b07[12])[_0x7b07[15]];var FaxAttachment=require(_0x7b07[12])[_0x7b07[13]];var User=require(_0x7b07[12])[_0x7b07[16]];exports[_0x7b07[17]]= function(_0xf749xf,_0xf749x10,_0xf749x11){var _0xf749x12={order:_0x7b07[18],include:[{all:true,include:[{all:true}]}]};switch(_0xf749xf[_0x7b07[24]][_0x7b07[23]]){case _0x7b07[21]:_0xf749x12[_0x7b07[19]]= _0xf749xf[_0x7b07[20]];break;case _0x7b07[22]:break;default:};return FaxMessage[_0x7b07[29]](_0xf749x12)[_0x7b07[28]](function(_0xf749x14){return _0xf749x10[_0x7b07[27]](200)[_0x7b07[26]](_0xf749x14)})[_0x7b07[25]](function(_0xf749x13){return handleError(_0xf749x10,_0xf749x13,_0xf749x11)})};exports[_0x7b07[30]]= function(_0xf749xf,_0xf749x10){return FaxMessage[_0x7b07[30]]()[_0x7b07[28]](function(_0xf749x15){return _0xf749x10[_0x7b07[27]](200)[_0x7b07[26]](_0xf749x15)})[_0x7b07[25]](function(_0xf749x13){return handleError(_0xf749x10,_0xf749x13)})};exports[_0x7b07[31]]= function(_0xf749xf,_0xf749x10,_0xf749x11){return FaxMessage[_0x7b07[38]](_0xf749xf[_0x7b07[34]][_0x7b07[33]],{include:[{model:FaxAttachment},{model:User,attributes:[_0x7b07[33],_0x7b07[35],_0x7b07[36],_0x7b07[37]]}]})[_0x7b07[28]](function(_0xf749x16){if(!_0xf749x16){return _0xf749x10[_0x7b07[32]](404)};return _0xf749x10[_0x7b07[26]](_0xf749x16)})[_0x7b07[25]](function(_0xf749x13){return handleError(_0xf749x10,_0xf749x13,_0xf749x11)})};exports[_0x7b07[39]]= function(_0xf749xf,_0xf749x10,_0xf749x11){_0xf749xf[_0x7b07[41]][_0x7b07[40]]= _0xf749xf[_0x7b07[24]][_0x7b07[33]];_0xf749xf[_0x7b07[41]][_0x7b07[42]]= _0xf749xf[_0x7b07[41]][_0x7b07[42]];return FaxMessage[_0x7b07[39]](_0xf749xf[_0x7b07[41]],{include:[{model:FaxAttachment}]})[_0x7b07[28]](function(_0xf749x16){return _0xf749x10[_0x7b07[27]](201)[_0x7b07[26]](_0xf749x16)})[_0x7b07[25]](function(_0xf749x13){return handleError(_0xf749x10,_0xf749x13)})};exports[_0x7b07[43]]= function(_0xf749xf,_0xf749x10,_0xf749x11){return FaxMessage[_0x7b07[38]](_0xf749xf[_0x7b07[34]][_0x7b07[33]],{include:[{all:true}]})[_0x7b07[28]](function(_0xf749x16){if(!_0xf749x16){return _0xf749x10[_0x7b07[32]](404)};return _0xf749x16[_0x7b07[44]](_0xf749xf[_0x7b07[41]],{user:_0xf749xf[_0x7b07[24]]})})[_0x7b07[28]](function(_0xf749x17){return _0xf749x10[_0x7b07[27]](200)[_0x7b07[26]](_0xf749x17)})[_0x7b07[25]](function(_0xf749x13){return handleError(_0xf749x10,_0xf749x13,_0xf749x11)})};exports[_0x7b07[45]]= function(_0xf749xf,_0xf749x10,_0xf749x11){return FaxMessage[_0x7b07[38]](_0xf749xf[_0x7b07[34]][_0x7b07[33]])[_0x7b07[28]](function(_0xf749x16){if(!_0xf749x16){return _0xf749x10[_0x7b07[32]](404)};return _0xf749x16[_0x7b07[45]]()})[_0x7b07[28]](function(){return _0xf749x10[_0x7b07[32]](204)})[_0x7b07[25]](function(_0xf749x13){return handleError(_0xf749x10,_0xf749x13,_0xf749x11)})};exports[_0x7b07[46]]= function(_0xf749xf,_0xf749x10,_0xf749x11){return FaxMessage[_0x7b07[48]]({where:{id:{$in:_0xf749xf[_0x7b07[41]][_0x7b07[33]]}},attributes:{directory:_0x7b07[47]}})[_0x7b07[28]](function(_0xf749x16){if(!_0xf749x16){return _0xf749x10[_0x7b07[32]](404)};return _0xf749x16[_0x7b07[45]]()})[_0x7b07[28]](function(){return _0xf749x10[_0x7b07[32]](204)})[_0x7b07[25]](function(_0xf749x13){return handleError(_0xf749x10,_0xf749x13,_0xf749x11)})};function handleError(_0xf749x10,_0xf749x13,_0xf749x11){return _0xf749x10[_0x7b07[27]](500)[_0x7b07[26]](_0xf749x13)} \ No newline at end of file diff --git a/server/api/fax_message/fax_message.events.js b/server/api/fax_message/fax_message.events.js index ca98ec2..7c74f1d 100644 --- a/server/api/fax_message/fax_message.events.js +++ b/server/api/fax_message/fax_message.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const FaxMessage = require('../../models').FaxMessage; - -var FaxMessageEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -FaxMessageEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - FaxMessage.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - FaxMessageEvents.emit(event + ':' + doc._id, doc); - FaxMessageEvents.emit(event, doc); - done(null); - } -} - -module.exports = FaxMessageEvents; +var _0xef76=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xef76[0];const EventEmitter=require(_0xef76[1]);const FaxMessage=require(_0xef76[3])[_0xef76[2]];var FaxMessageEvents= new EventEmitter();FaxMessageEvents[_0xef76[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xef76[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xef76[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xef76[6]};for(var e in events){var event=events[e];FaxMessage[_0xef76[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3a60x8,_0x3a60x9,_0x3a60xa){FaxMessageEvents[_0xef76[10]](event+ _0xef76[8]+ _0x3a60x8[_0xef76[9]],_0x3a60x8);FaxMessageEvents[_0xef76[10]](event,_0x3a60x8);_0x3a60xa(null)}}module[_0xef76[11]]= FaxMessageEvents \ No newline at end of file diff --git a/server/api/fax_message/fax_message.socket.js b/server/api/fax_message/fax_message.socket.js index fc70af3..e5378f1 100644 --- a/server/api/fax_message/fax_message.socket.js +++ b/server/api/fax_message/fax_message.socket.js @@ -1,28 +1 @@ -'use strict'; - -const FaxMessageEvents = require('./fax_message.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('fax_message:' + event, socket); - - FaxMessageEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - FaxMessageEvents.removeListener(event, listener); - }; -} +var _0xbb12=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xbb12[0];const FaxMessageEvents=require(_0xbb12[1]);var events=[_0xbb12[2],_0xbb12[3]];exports[_0xbb12[4]]= function(_0xfe6dx3){for(var _0xfe6dx4=0,_0xfe6dx5=events[_0xbb12[5]];_0xfe6dx4< _0xfe6dx5;_0xfe6dx4++){var _0xfe6dx6=events[_0xfe6dx4];var _0xfe6dx7=createListener(_0xbb12[6]+ _0xfe6dx6,_0xfe6dx3);FaxMessageEvents[_0xbb12[7]](_0xfe6dx6,_0xfe6dx7);_0xfe6dx3[_0xbb12[7]](_0xbb12[8],removeListener(_0xfe6dx6,_0xfe6dx7))}};function createListener(_0xfe6dx6,_0xfe6dx3){return function(_0xfe6dx9){_0xfe6dx3[_0xbb12[9]](_0xfe6dx6,_0xfe6dx9)}}function removeListener(_0xfe6dx6,_0xfe6dx7){return function(){FaxMessageEvents[_0xbb12[10]](_0xfe6dx6,_0xfe6dx7)}} \ No newline at end of file diff --git a/server/api/fax_message/index.js b/server/api/fax_message/index.js index 60e36a1..eee4d48 100644 --- a/server/api/fax_message/index.js +++ b/server/api/fax_message/index.js @@ -1,30 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./fax_message.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -// router.get('/', controller.index); -// router.get('/:id/content', controller.getContentFromMessage); -// router.get('/:id', controller.show); -// router.post('/', controller.create); -// router.put('/:id', controller.update); -// router.patch('/:id', controller.update); -// router.delete('/:id', controller.destroy); - -router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.index); -router.get('/describe', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.describe); -router.get('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.show); -router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.create); -router.put('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.update); -router.put('/delete/bulk', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.bulkDelete); -router.put('/delete/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.update); -router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroy); - - -module.exports = router; +var _0xfa9a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x64\x65\x6C\x65\x74\x65\x2F\x62\x75\x6C\x6B","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x2F\x64\x65\x6C\x65\x74\x65\x2F\x3A\x69\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xfa9a[0];var express=require(_0xfa9a[1]);var controller=require(_0xfa9a[2]);var auth=require(_0xfa9a[3]);var license=require(_0xfa9a[4]);var router=express.Router();router[_0xfa9a[13]](_0xfa9a[5],license[_0xfa9a[6]](),license[_0xfa9a[7]](),auth[_0xfa9a[8]](),auth[_0xfa9a[11]]([10],[_0xfa9a[9],_0xfa9a[10]]),controller[_0xfa9a[12]]);router[_0xfa9a[13]](_0xfa9a[14],license[_0xfa9a[6]](),license[_0xfa9a[7]](),auth[_0xfa9a[8]](),auth[_0xfa9a[11]]([10],[_0xfa9a[9]]),controller[_0xfa9a[15]]);router[_0xfa9a[13]](_0xfa9a[16],license[_0xfa9a[6]](),license[_0xfa9a[7]](),auth[_0xfa9a[8]](),auth[_0xfa9a[11]]([10],[_0xfa9a[9],_0xfa9a[10]]),controller[_0xfa9a[17]]);router[_0xfa9a[19]](_0xfa9a[5],license[_0xfa9a[6]](),license[_0xfa9a[7]](),auth[_0xfa9a[8]](),auth[_0xfa9a[11]]([10],[_0xfa9a[9],_0xfa9a[10]]),controller[_0xfa9a[18]]);router[_0xfa9a[21]](_0xfa9a[5],license[_0xfa9a[6]](),license[_0xfa9a[7]](),auth[_0xfa9a[8]](),auth[_0xfa9a[11]]([10],[_0xfa9a[9],_0xfa9a[10]]),controller[_0xfa9a[20]]);router[_0xfa9a[21]](_0xfa9a[22],license[_0xfa9a[6]](),license[_0xfa9a[7]](),auth[_0xfa9a[8]](),auth[_0xfa9a[11]]([10],[_0xfa9a[9]]),controller[_0xfa9a[23]]);router[_0xfa9a[21]](_0xfa9a[24],license[_0xfa9a[6]](),license[_0xfa9a[7]](),auth[_0xfa9a[8]](),auth[_0xfa9a[11]]([10],[_0xfa9a[9]]),controller[_0xfa9a[20]]);router[_0xfa9a[21]](_0xfa9a[16],license[_0xfa9a[6]](),license[_0xfa9a[7]](),auth[_0xfa9a[8]](),auth[_0xfa9a[11]]([10],[_0xfa9a[9],_0xfa9a[10]]),controller[_0xfa9a[20]]);router[_0xfa9a[26]](_0xfa9a[16],license[_0xfa9a[6]](),license[_0xfa9a[7]](),auth[_0xfa9a[8]](),auth[_0xfa9a[11]]([10],[_0xfa9a[9]]),controller[_0xfa9a[25]]);module[_0xfa9a[27]]= router \ No newline at end of file diff --git a/server/api/fax_queue/fax_queue.controller.js b/server/api/fax_queue/fax_queue.controller.js index 682bc1f..4462d90 100644 --- a/server/api/fax_queue/fax_queue.controller.js +++ b/server/api/fax_queue/fax_queue.controller.js @@ -1,213 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var User = require('../../models').User; -var FaxQueue = require('../../models').FaxQueue; -var UserHasFaxQueue = require('../../models').UserHasFaxQueue; - -// Get list of fax_queues -exports.index = function(req, res) { - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getFaxQueuesIdByUser(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - - default: - return FaxQueue - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -// Get a single fax_queue -exports.show = function(req, res) { - return FaxQueue - .findById(req.params.id) - .then(function(fax_queue) { - if (!fax_queue) { - return res.sendStatus(404); - } - return res.send(fax_queue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new fax_queue in the DB. -exports.create = function(req, res) { - var _faxQueue; - - return FaxQueue - .create(req.body) - .then(function(faxQueue) { - _faxQueue = faxQueue; - - if (req.body.agents) { - return _faxQueue - .addUsers(req.body.agents, { - penalty: req.body.penalty || 0, - queue: _faxQueue.name - }); - } - }) - .then(function() { - return res.status(201).send(_faxQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing fax_queue in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return FaxQueue - .findById(req.params.id) - .then(function(fax_queue) { - if (!fax_queue) { - return res.sendStatus(404); - } - var updated = _.merge(fax_queue, req.body); - return updated.save(); - }) - .then(function(fax_queue) { - return res.status(200).send(fax_queue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a fax_queue from the DB. -exports.destroy = function(req, res) { - return FaxQueue - .findById(req.params.id) - .then(function(fax_queue) { - if (!fax_queue) { - return res.sendStatus(404); - } - return fax_queue.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.addAgents = function(req, res, next) { - - return FaxQueue - .findById(req.params.id) - .then(function(faxQueue) { - if (!faxQueue) { - return res.sendStatus(404); - } - var userHasFaxQueues = _.map(req.body.agents, function(agent) { - return { - UserId: agent, - penalty: req.body.penalty, - FaxQueueId: faxQueue.id, - queue: faxQueue.name - }; - }); - - return UserHasFaxQueue - .bulkCreate(userHasFaxQueues, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showAgents = function(req, res) { - return FaxQueue - .findById(req.params.id) - .then(function(queue) { - if (!queue) { - return res.sendStatus(404); - } - return queue - .getUsers({ - where: { - role: 'agent' - }, - attributes: ['id', 'name', 'fullname', 'email'] - }); - }) - .then(function(agents) { - return res.status(200).send({ - rows: agents, - count: agents.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.removeAgents = function(req, res, next) { - return FaxQueue - .findById(req.params.id) - .then(function(queue) { - if (!queue) { - return res.sendStatus(404); - } - return queue - .removeUsers(req.query.agents, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(202); - }) - .catch(function(err) { - return next(err); - }); -}; - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return FaxQueue - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x9d68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x63\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x6E\x61\x6D\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x9d68[0];var _=require(_0x9d68[1]);var Util=require(_0x9d68[2]);var User=require(_0x9d68[4])[_0x9d68[3]];var FaxQueue=require(_0x9d68[4])[_0x9d68[5]];var UserHasFaxQueue=require(_0x9d68[4])[_0x9d68[6]];exports[_0x9d68[7]]= function(_0x85b1x6,_0x85b1x7){switch(_0x85b1x6[_0x9d68[15]][_0x9d68[19]]){case _0x9d68[15]:return User[_0x9d68[16]](_0x85b1x6[_0x9d68[15]][_0x9d68[14]],{attributes:[_0x9d68[14]]})[_0x9d68[11]](Util[_0x9d68[13]](_0x85b1x6[_0x9d68[12]]))[_0x9d68[11]](function(_0x85b1x9){_0x85b1x7[_0x9d68[10]](200)[_0x9d68[9]](_0x85b1x9)})[_0x9d68[8]](function(_0x85b1x8){return handleError(_0x85b1x7,_0x85b1x8)});default:return FaxQueue[_0x9d68[18]](Util[_0x9d68[17]](_0x85b1x6[_0x9d68[12]]))[_0x9d68[11]](function(_0x85b1x9){_0x85b1x7[_0x9d68[10]](200)[_0x9d68[9]](_0x85b1x9)})[_0x9d68[8]](function(_0x85b1x8){return handleError(_0x85b1x7,_0x85b1x8)})}};exports[_0x9d68[20]]= function(_0x85b1x6,_0x85b1x7){return FaxQueue[_0x9d68[16]](_0x85b1x6[_0x9d68[22]][_0x9d68[14]])[_0x9d68[11]](function(_0x85b1xa){if(!_0x85b1xa){return _0x85b1x7[_0x9d68[21]](404)};return _0x85b1x7[_0x9d68[9]](_0x85b1xa)})[_0x9d68[8]](function(_0x85b1x8){return handleError(_0x85b1x7,_0x85b1x8)})};exports[_0x9d68[23]]= function(_0x85b1x6,_0x85b1x7){var _0x85b1xb;return FaxQueue[_0x9d68[23]](_0x85b1x6[_0x9d68[25]])[_0x9d68[11]](function(_0x85b1xc){_0x85b1xb= _0x85b1xc;if(_0x85b1x6[_0x9d68[25]][_0x9d68[24]]){return _0x85b1xb[_0x9d68[28]](_0x85b1x6[_0x9d68[25]][_0x9d68[24]],{penalty:_0x85b1x6[_0x9d68[25]][_0x9d68[26]]|| 0,queue:_0x85b1xb[_0x9d68[27]]})}})[_0x9d68[11]](function(){return _0x85b1x7[_0x9d68[10]](201)[_0x9d68[9]](_0x85b1xb)})[_0x9d68[8]](function(_0x85b1x8){return handleError(_0x85b1x7,_0x85b1x8)})};exports[_0x9d68[29]]= function(_0x85b1x6,_0x85b1x7){if(_0x85b1x6[_0x9d68[25]][_0x9d68[14]]){delete _0x85b1x6[_0x9d68[25]][_0x9d68[14]]};return FaxQueue[_0x9d68[16]](_0x85b1x6[_0x9d68[22]][_0x9d68[14]])[_0x9d68[11]](function(_0x85b1xa){if(!_0x85b1xa){return _0x85b1x7[_0x9d68[21]](404)};var _0x85b1xd=_[_0x9d68[30]](_0x85b1xa,_0x85b1x6[_0x9d68[25]]);return _0x85b1xd[_0x9d68[31]]()})[_0x9d68[11]](function(_0x85b1xa){return _0x85b1x7[_0x9d68[10]](200)[_0x9d68[9]](_0x85b1xa)})[_0x9d68[8]](function(_0x85b1x8){return handleError(_0x85b1x7,_0x85b1x8)})};exports[_0x9d68[32]]= function(_0x85b1x6,_0x85b1x7){return FaxQueue[_0x9d68[16]](_0x85b1x6[_0x9d68[22]][_0x9d68[14]])[_0x9d68[11]](function(_0x85b1xa){if(!_0x85b1xa){return _0x85b1x7[_0x9d68[21]](404)};return _0x85b1xa[_0x9d68[32]]()})[_0x9d68[11]](function(){return _0x85b1x7[_0x9d68[21]](204)})[_0x9d68[8]](function(_0x85b1x8){return handleError(_0x85b1x7,_0x85b1x8)})};exports[_0x9d68[33]]= function(_0x85b1x6,_0x85b1x7,_0x85b1xe){return FaxQueue[_0x9d68[16]](_0x85b1x6[_0x9d68[22]][_0x9d68[14]])[_0x9d68[11]](function(_0x85b1xc){if(!_0x85b1xc){return _0x85b1x7[_0x9d68[21]](404)};var _0x85b1xf=_[_0x9d68[34]](_0x85b1x6[_0x9d68[25]][_0x9d68[24]],function(_0x85b1x10){return {UserId:_0x85b1x10,penalty:_0x85b1x6[_0x9d68[25]][_0x9d68[26]],FaxQueueId:_0x85b1xc[_0x9d68[14]],queue:_0x85b1xc[_0x9d68[27]]}});return UserHasFaxQueue[_0x9d68[35]](_0x85b1xf,{individualHooks:true})})[_0x9d68[11]](function(){return _0x85b1x7[_0x9d68[21]](200)})[_0x9d68[8]](function(_0x85b1x8){return handleError(_0x85b1x7,_0x85b1x8)})};exports[_0x9d68[36]]= function(_0x85b1x6,_0x85b1x7){return FaxQueue[_0x9d68[16]](_0x85b1x6[_0x9d68[22]][_0x9d68[14]])[_0x9d68[11]](function(_0x85b1x12){if(!_0x85b1x12){return _0x85b1x7[_0x9d68[21]](404)};return _0x85b1x12[_0x9d68[41]]({where:{role:_0x9d68[38]},attributes:[_0x9d68[14],_0x9d68[27],_0x9d68[39],_0x9d68[40]]})})[_0x9d68[11]](function(_0x85b1x11){return _0x85b1x7[_0x9d68[10]](200)[_0x9d68[9]]({rows:_0x85b1x11,count:_0x85b1x11[_0x9d68[37]]})})[_0x9d68[8]](function(_0x85b1x8){return handleError(_0x85b1x7,_0x85b1x8)})};exports[_0x9d68[42]]= function(_0x85b1x6,_0x85b1x7,_0x85b1xe){return FaxQueue[_0x9d68[16]](_0x85b1x6[_0x9d68[22]][_0x9d68[14]])[_0x9d68[11]](function(_0x85b1x12){if(!_0x85b1x12){return _0x85b1x7[_0x9d68[21]](404)};return _0x85b1x12[_0x9d68[43]](_0x85b1x6[_0x9d68[12]][_0x9d68[24]],{individualHooks:true})})[_0x9d68[11]](function(){return _0x85b1x7[_0x9d68[21]](202)})[_0x9d68[8]](function(_0x85b1x8){return _0x85b1xe(_0x85b1x8)})};exports[_0x9d68[44]]= function(_0x85b1x6,_0x85b1x7){return FaxQueue[_0x9d68[32]]({where:{id:_0x85b1x6[_0x9d68[12]][_0x9d68[45]]},individualHooks:true})[_0x9d68[11]](function(){return _0x85b1x7[_0x9d68[21]](204)})[_0x9d68[8]](function(_0x85b1x8){return handleError(_0x85b1x7,_0x85b1x8)})};function handleError(_0x85b1x7,_0x85b1x8){return _0x85b1x7[_0x9d68[10]](500)[_0x9d68[9]](_0x85b1x8)} \ No newline at end of file diff --git a/server/api/fax_queue/fax_queue.events.js b/server/api/fax_queue/fax_queue.events.js index a65c990..22479ef 100644 --- a/server/api/fax_queue/fax_queue.events.js +++ b/server/api/fax_queue/fax_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const FaxQueue = require('../../models').FaxQueue; - -var FaxQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -FaxQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - FaxQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - FaxQueueEvents.emit(event + ':' + doc._id, doc); - FaxQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = FaxQueueEvents; +var _0x6924=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6924[0];const EventEmitter=require(_0x6924[1]);const FaxQueue=require(_0x6924[3])[_0x6924[2]];var FaxQueueEvents= new EventEmitter();FaxQueueEvents[_0x6924[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6924[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6924[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6924[6]};for(var e in events){var event=events[e];FaxQueue[_0x6924[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc71ax8,_0xc71ax9,_0xc71axa){FaxQueueEvents[_0x6924[10]](event+ _0x6924[8]+ _0xc71ax8[_0x6924[9]],_0xc71ax8);FaxQueueEvents[_0x6924[10]](event,_0xc71ax8);_0xc71axa(null)}}module[_0x6924[11]]= FaxQueueEvents \ No newline at end of file diff --git a/server/api/fax_queue/fax_queue.socket.js b/server/api/fax_queue/fax_queue.socket.js index 8d589ab..7642ad1 100644 --- a/server/api/fax_queue/fax_queue.socket.js +++ b/server/api/fax_queue/fax_queue.socket.js @@ -1,28 +1 @@ -'use strict'; - -const FaxQueueEvents = require('./fax_queue.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('fax_queue:' + event, socket); - - FaxQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - FaxQueueEvents.removeListener(event, listener); - }; -} +var _0xc2c0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xc2c0[0];const FaxQueueEvents=require(_0xc2c0[1]);var events=[_0xc2c0[2],_0xc2c0[3]];exports[_0xc2c0[4]]= function(_0xd5a7x3){for(var _0xd5a7x4=0,_0xd5a7x5=events[_0xc2c0[5]];_0xd5a7x4< _0xd5a7x5;_0xd5a7x4++){var _0xd5a7x6=events[_0xd5a7x4];var _0xd5a7x7=createListener(_0xc2c0[6]+ _0xd5a7x6,_0xd5a7x3);FaxQueueEvents[_0xc2c0[7]](_0xd5a7x6,_0xd5a7x7);_0xd5a7x3[_0xc2c0[7]](_0xc2c0[8],removeListener(_0xd5a7x6,_0xd5a7x7))}};function createListener(_0xd5a7x6,_0xd5a7x3){return function(_0xd5a7x9){_0xd5a7x3[_0xc2c0[9]](_0xd5a7x6,_0xd5a7x9)}}function removeListener(_0xd5a7x6,_0xd5a7x7){return function(){FaxQueueEvents[_0xc2c0[10]](_0xd5a7x6,_0xd5a7x7)}} \ No newline at end of file diff --git a/server/api/fax_queue/index.js b/server/api/fax_queue/index.js index 0e5f100..1687232 100644 --- a/server/api/fax_queue/index.js +++ b/server/api/fax_queue/index.js @@ -1,21 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./fax_queue.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.show); -router.get('/:id/agents', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.showAgents); -router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.create); -router.post('/:id/agents', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.addAgents); -router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.update); -router.patch('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.update); -router.delete('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy); -router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy); -router.delete('/:id/agents', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasRole('admin'), controller.removeAgents); - -module.exports = router; +var _0x8da3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x68\x61\x73\x52\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x8da3[0];var express=require(_0x8da3[1]);var controller=require(_0x8da3[2]);var auth=require(_0x8da3[3]);var license=require(_0x8da3[4]);var router=express.Router();router[_0x8da3[12]](_0x8da3[5],license[_0x8da3[6]](),license[_0x8da3[7]](),auth[_0x8da3[8]](),auth[_0x8da3[10]]([10],[_0x8da3[9]]),controller[_0x8da3[11]]);router[_0x8da3[12]](_0x8da3[13],license[_0x8da3[6]](),license[_0x8da3[7]](),auth[_0x8da3[8]](),auth[_0x8da3[10]]([10],[_0x8da3[9]]),controller[_0x8da3[14]]);router[_0x8da3[12]](_0x8da3[15],license[_0x8da3[6]](),license[_0x8da3[7]](),auth[_0x8da3[8]](),auth[_0x8da3[10]]([10],[_0x8da3[9]]),controller[_0x8da3[16]]);router[_0x8da3[19]](_0x8da3[5],license[_0x8da3[6]](),license[_0x8da3[7]](),auth[_0x8da3[8]](),auth[_0x8da3[17]](_0x8da3[9]),controller[_0x8da3[18]]);router[_0x8da3[19]](_0x8da3[15],license[_0x8da3[6]](),license[_0x8da3[7]](),auth[_0x8da3[8]](),auth[_0x8da3[17]](_0x8da3[9]),controller[_0x8da3[20]]);router[_0x8da3[22]](_0x8da3[13],license[_0x8da3[6]](),license[_0x8da3[7]](),auth[_0x8da3[8]](),auth[_0x8da3[17]](_0x8da3[9]),controller[_0x8da3[21]]);router[_0x8da3[23]](_0x8da3[13],license[_0x8da3[6]](),license[_0x8da3[7]](),auth[_0x8da3[8]](),auth[_0x8da3[17]](_0x8da3[9]),controller[_0x8da3[21]]);router[_0x8da3[25]](_0x8da3[5],license[_0x8da3[6]](),license[_0x8da3[7]](),auth[_0x8da3[8]](),auth[_0x8da3[17]](_0x8da3[9]),controller[_0x8da3[24]]);router[_0x8da3[25]](_0x8da3[13],license[_0x8da3[6]](),license[_0x8da3[7]](),auth[_0x8da3[8]](),auth[_0x8da3[17]](_0x8da3[9]),controller[_0x8da3[26]]);router[_0x8da3[25]](_0x8da3[15],license[_0x8da3[6]](),license[_0x8da3[7]](),auth[_0x8da3[8]](),auth[_0x8da3[17]](_0x8da3[9]),controller[_0x8da3[27]]);module[_0x8da3[28]]= router \ No newline at end of file diff --git a/server/api/fax_room/fax_room.controller.js b/server/api/fax_room/fax_room.controller.js index ab316a3..57f0901 100644 --- a/server/api/fax_room/fax_room.controller.js +++ b/server/api/fax_room/fax_room.controller.js @@ -1,474 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); - -var Util = require('../../config/util'); -var moment = require('moment'); - -var sequelize = require('../../models').sequelize; -var User = require('../../models').User; -var Agent = require('../../models').User; -var Contact = require('../../models').Contact; -var FaxRoom = require('../../models').FaxRoom; -var FaxMessage = require('../../models').FaxMessage; -var FaxAccount = require('../../models').FaxAccount; -var FaxApplication = require('../../models').FaxApplication; -var FaxQueue = require('../../models').FaxQueue; -var FaxAttachment = require('../../models').FaxAttachment; - -// Get list of faxRooms -exports.index = function(req, res, next) { - return FaxRoom - .scope('default') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of fields -exports.describe = function(req, res) { - return FaxRoom - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getFaxQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getFaxQueuesIdByUser({}, { - attributes: ['id'] - })) - .then(function(userQueues) { - return { - include: { - model: FaxAccount, - include: { - model: FaxApplication, - include: { - model: FaxQueue, - where: { - id: _.map(userQueues, 'id') - } - } - } - } - }; - }); - default: - return {}; - } - } -} - -exports.pending = function(req, res) { - return Promise - .all([]) - .then(getFaxQueues(req.user)) - .then(function(condition) { - return FaxRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'PENDING', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.new = function(req, res) { - return Promise - .all([]) - .then(getFaxQueues(req.user)) - .then(function(condition) { - return FaxRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'NEW', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.open = function(req, res) { - return Promise - .all([]) - .then(getFaxQueues(req.user)) - .then(function(condition) { - return FaxRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'OPEN', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.closed = function(req, res) { - return Promise - .all([]) - .then(getFaxQueues(req.user)) - .then(function(condition) { - return FaxRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'CLOSED', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.inbox = function(req, res, next) { - switch (req.user.role) { - case 'agent': - - return sequelize.query( - 'SELECT `FaxRoom`.`id`, `FaxRoom`.`from`, `FaxRoom`.`account`, `FaxRoom`.`status`, `FaxRoom`.`lastEvent`, `FaxRoom`.`updatedAt` FROM `fax_rooms` AS `FaxRoom` LEFT OUTER JOIN (`user_has_fax_rooms` AS `Users.user_has_fax_rooms` INNER JOIN `users` AS `Users` ON `Users`.`id` = `Users.user_has_fax_rooms`.`UserId`) ON `FaxRoom`.`id` = `Users.user_has_fax_rooms`.`FaxRoomId` WHERE (`FaxRoom`.`deletedAt` IS NULL AND (`FaxRoom`.`status` = :status OR `Users`.`id` = :id))', { - replacements: { - status: 'UNMANAGED', - id: req.user.id - }, - type: sequelize.QueryTypes.SELECT - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); - - default: - - return sequelize.query( - 'SELECT `id`, `from`, `account`, `status`, `lastEvent` ,`updatedAt` FROM `fax_rooms` WHERE `fax_rooms`.`deletedAt` IS NULL', { - replacements: { - status: 'UNMANAGED', - id: req.user.id - }, - type: sequelize.QueryTypes.SELECT - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -// Get list of agent faxRooms -exports.agentIndex = function(req, res, next) { - return FaxRoom - .findAll({ - where: { - UserId: req.params.id - }, - include: [{ - all: true - }] - }) - .then(function(faxRooms) { - return res.status(200).send(faxRooms); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of agent faxRooms -exports.openRoom = function(req, res, next) { - var _faxRoom; - - if (req.user.role === 'agent') { - return FaxRoom - .findById(req.params.id) - .then(function(faxRoom) { - _faxRoom = faxRoom; - if (!_faxRoom) { - return res.sendStatus(404); - } - - return _faxRoom - .update({ - status: 'OPEN' - }, { - userId: req.user.id - }); - }) - .then(function() { - return _faxRoom - .addUser(req.user.id); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -// Get a single faxRoom -exports.show = function(req, res, next) { - return FaxRoom - .scope('default') - .findById(req.params.id) - .then(function(faxRoom) { - if (!faxRoom) { - return res.sendStatus(404); - } - return res.send(faxRoom); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; - -// Get a single faxRoom -exports.showAgents = function(req, res, next) { - return FaxRoom - .findById(req.params.id) - .then(function(faxRoom) { - if (!faxRoom) { - return res.sendStatus(404); - } - - return faxRoom - .getUsers({ - attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal'] - }); - }) - .then(function(users) { - return res.send(users); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new faxRoom in the DB. -exports.create = function(req, res, next) { - return FaxRoom - .create(req.body) - .then(function(faxRoom) { - return res.status(201).send(faxRoom); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new mailMessage in the DB. -exports.createMessage = function(req, res, next) { - req.body.UserId = req.user.id; - req.body.FaxRoomId = req.params.id; - req.body.text = req.body.text; - - return FaxMessage - .create(req.body, { - include: [{ - model: FaxAttachment - }], - user: req.user - }).then(function(faxMessage) { - return res.status(201).send(faxMessage); - }).catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing faxRoom in the DB. -exports.update = function(req, res, next) { - return FaxRoom - .findById(req.params.id) - .then(function(faxRoom) { - if (!faxRoom) { - return res.sendStatus(404); - } - // CHECK IF FAX IS ALREADY ASSIGNED - if (faxRoom.jobId) { - throw new Error('Fax already assigned'); - } - var updated = _.merge(faxRoom, req.body); - - return updated - .save(); - }) - .then(function(faxRoom) { - return res.status(200).send(faxRoom); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single faxRoom -exports.updateAgents = function(req, res, next) { - return FaxRoom - .findById(req.params.id) - .then(function(faxRoom) { - if (!faxRoom) { - return res.sendStatus(404); - } - - return faxRoom - .setUsers(req.body.agents, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a faxRoom from the DB. -exports.destroy = function(req, res, next) { - return FaxRoom - .findById(req.params.id) - .then(function(faxRoom) { - if (!faxRoom) { - return res.sendStatus(404); - } - return faxRoom.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return FaxRoom - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} - -exports.updatePatch = function(req, res, next) { - var _options = { - where: { - id: req.params.id.split(',') - }, - user: req.user, - individualHooks: true - }; - - return FaxRoom - .update(req.body, _options) - .then(function(mailRooms) { - if (!mailRooms) { - return res.sendStatus(404); - } - return mailRooms - }) - .then(function(mailRooms) { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getRoomByMessage = function(req, res, next) { - return FaxMessage - .findById(req.params.id) - .then(function(faxMessage) { - return faxMessage - .getFaxRoom({ - include: [{ - model: FaxAccount - }, { - model: FaxMessage, - include: [{ - model: FaxAttachment - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }); - }) - .then(function(faxRoom) { - return res.send(faxRoom); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; +var _0xfc1e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x70\x65\x6E\x64\x69\x6E\x67","\x6C\x6F\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x69\x6E\x62\x6F\x78","\x65\x72\x72\x6F\x72","\x53\x45\x4C\x45\x43\x54\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x20\x4C\x45\x46\x54\x20\x4F\x55\x54\x45\x52\x20\x4A\x4F\x49\x4E\x20\x28\x60\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x49\x4E\x4E\x45\x52\x20\x4A\x4F\x49\x4E\x20\x60\x75\x73\x65\x72\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x60\x20\x4F\x4E\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x41\x4E\x44\x20\x28\x60\x46\x61\x78\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x20\x3D\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x4F\x52\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x3A\x69\x64\x29\x29","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x61\x67\x65\x6E\x74","\x53\x45\x4C\x45\x43\x54\x20\x60\x69\x64\x60\x2C\x20\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x20\x2C\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x6F\x70\x65\x6E\x52\x6F\x6F\x6D","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x64\x64\x55\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x74\x65\x78\x74","\x6A\x6F\x62\x49\x64","\x46\x61\x78\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x61\x73\x73\x69\x67\x6E\x65\x64","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D"];_0xfc1e[0];var _=require(_0xfc1e[1]);var util=require(_0xfc1e[2]);var Util=require(_0xfc1e[3]);var moment=require(_0xfc1e[4]);var sequelize=require(_0xfc1e[6])[_0xfc1e[5]];var User=require(_0xfc1e[6])[_0xfc1e[7]];var Agent=require(_0xfc1e[6])[_0xfc1e[7]];var Contact=require(_0xfc1e[6])[_0xfc1e[8]];var FaxRoom=require(_0xfc1e[6])[_0xfc1e[9]];var FaxMessage=require(_0xfc1e[6])[_0xfc1e[10]];var FaxAccount=require(_0xfc1e[6])[_0xfc1e[11]];var FaxApplication=require(_0xfc1e[6])[_0xfc1e[12]];var FaxQueue=require(_0xfc1e[6])[_0xfc1e[13]];var FaxAttachment=require(_0xfc1e[6])[_0xfc1e[14]];exports[_0xfc1e[15]]= function(_0x4114xf,_0x4114x10,_0x4114x11){return FaxRoom[_0xfc1e[24]](_0xfc1e[23])[_0xfc1e[22]](Util[_0xfc1e[21]](_0x4114xf[_0xfc1e[20]]))[_0xfc1e[19]](function(_0x4114x13){return _0x4114x10[_0xfc1e[18]](200)[_0xfc1e[17]](_0x4114x13)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[25]]= function(_0x4114xf,_0x4114x10){return FaxRoom[_0xfc1e[25]]()[_0xfc1e[19]](function(_0x4114x14){return _0x4114x10[_0xfc1e[18]](200)[_0xfc1e[17]](_0x4114x14)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})};function getFaxQueues(_0x4114x16){return function(){switch(_0x4114x16[_0xfc1e[31]]){case _0xfc1e[30]:return User[_0xfc1e[29]](_0x4114x16[_0xfc1e[26]],{attributes:[_0xfc1e[26]]})[_0xfc1e[19]](Util[_0xfc1e[28]]({},{attributes:[_0xfc1e[26]]}))[_0xfc1e[19]](function(_0x4114x17){return {include:{model:FaxAccount,include:{model:FaxApplication,include:{model:FaxQueue,where:{id:_[_0xfc1e[27]](_0x4114x17,_0xfc1e[26])}}}}}});default:return {}}}}exports[_0xfc1e[32]]= function(_0x4114xf,_0x4114x10){return Promise[_0xfc1e[39]]([])[_0xfc1e[19]](getFaxQueues(_0x4114xf[_0xfc1e[30]]))[_0xfc1e[19]](function(_0x4114x19){return FaxRoom[_0xfc1e[38]](_[_0xfc1e[37]](Util[_0xfc1e[21]](_0x4114xf[_0xfc1e[20]],{status:_0xfc1e[34],updatedAt:{$gte:moment()[_0xfc1e[36]](_0xfc1e[35])}}),_0x4114x19))})[_0xfc1e[19]](function(_0x4114x18){return _0x4114x10[_0xfc1e[18]](200)[_0xfc1e[17]]({value:_0x4114x18})})[_0xfc1e[16]](function(_0x4114x12){console[_0xfc1e[33]](_0x4114x12);return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[40]]= function(_0x4114xf,_0x4114x10){return Promise[_0xfc1e[39]]([])[_0xfc1e[19]](getFaxQueues(_0x4114xf[_0xfc1e[30]]))[_0xfc1e[19]](function(_0x4114x19){return FaxRoom[_0xfc1e[38]](_[_0xfc1e[37]](Util[_0xfc1e[21]](_0x4114xf[_0xfc1e[20]],{status:_0xfc1e[41],updatedAt:{$gte:moment()[_0xfc1e[36]](_0xfc1e[35])}}),_0x4114x19))})[_0xfc1e[19]](function(_0x4114x18){return _0x4114x10[_0xfc1e[18]](200)[_0xfc1e[17]]({value:_0x4114x18})})[_0xfc1e[16]](function(_0x4114x12){console[_0xfc1e[33]](_0x4114x12);return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[42]]= function(_0x4114xf,_0x4114x10){return Promise[_0xfc1e[39]]([])[_0xfc1e[19]](getFaxQueues(_0x4114xf[_0xfc1e[30]]))[_0xfc1e[19]](function(_0x4114x19){return FaxRoom[_0xfc1e[38]](_[_0xfc1e[37]](Util[_0xfc1e[21]](_0x4114xf[_0xfc1e[20]],{status:_0xfc1e[43],updatedAt:{$gte:moment()[_0xfc1e[36]](_0xfc1e[35])}}),_0x4114x19))})[_0xfc1e[19]](function(_0x4114x18){return _0x4114x10[_0xfc1e[18]](200)[_0xfc1e[17]]({value:_0x4114x18})})[_0xfc1e[16]](function(_0x4114x12){console[_0xfc1e[33]](_0x4114x12);return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[44]]= function(_0x4114xf,_0x4114x10){return Promise[_0xfc1e[39]]([])[_0xfc1e[19]](getFaxQueues(_0x4114xf[_0xfc1e[30]]))[_0xfc1e[19]](function(_0x4114x19){return FaxRoom[_0xfc1e[38]](_[_0xfc1e[37]](Util[_0xfc1e[21]](_0x4114xf[_0xfc1e[20]],{status:_0xfc1e[45],updatedAt:{$gte:moment()[_0xfc1e[36]](_0xfc1e[35])}}),_0x4114x19))})[_0xfc1e[19]](function(_0x4114x18){return _0x4114x10[_0xfc1e[18]](200)[_0xfc1e[17]]({value:_0x4114x18})})[_0xfc1e[16]](function(_0x4114x12){console[_0xfc1e[33]](_0x4114x12);return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[46]]= function(_0x4114xf,_0x4114x10,_0x4114x11){switch(_0x4114xf[_0xfc1e[30]][_0xfc1e[31]]){case _0xfc1e[52]:return sequelize[_0xfc1e[20]](_0xfc1e[48],{replacements:{status:_0xfc1e[49],id:_0x4114xf[_0xfc1e[30]][_0xfc1e[26]]},type:sequelize[_0xfc1e[51]][_0xfc1e[50]]})[_0xfc1e[19]](function(_0x4114x13){return _0x4114x10[_0xfc1e[18]](200)[_0xfc1e[17]](_0x4114x13)})[_0xfc1e[16]](function(_0x4114x12){console[_0xfc1e[47]](_0x4114x12);return handleError(_0x4114x10,_0x4114x12)});default:return sequelize[_0xfc1e[20]](_0xfc1e[53],{replacements:{status:_0xfc1e[49],id:_0x4114xf[_0xfc1e[30]][_0xfc1e[26]]},type:sequelize[_0xfc1e[51]][_0xfc1e[50]]})[_0xfc1e[19]](function(_0x4114x13){return _0x4114x10[_0xfc1e[18]](200)[_0xfc1e[17]](_0x4114x13)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})}};exports[_0xfc1e[54]]= function(_0x4114xf,_0x4114x10,_0x4114x11){return FaxRoom[_0xfc1e[56]]({where:{UserId:_0x4114xf[_0xfc1e[55]][_0xfc1e[26]]},include:[{all:true}]})[_0xfc1e[19]](function(_0x4114x1a){return _0x4114x10[_0xfc1e[18]](200)[_0xfc1e[17]](_0x4114x1a)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[57]]= function(_0x4114xf,_0x4114x10,_0x4114x11){var _0x4114x1b;if(_0x4114xf[_0xfc1e[30]][_0xfc1e[31]]=== _0xfc1e[52]){return FaxRoom[_0xfc1e[29]](_0x4114xf[_0xfc1e[55]][_0xfc1e[26]])[_0xfc1e[19]](function(_0x4114x1c){_0x4114x1b= _0x4114x1c;if(!_0x4114x1b){return _0x4114x10[_0xfc1e[58]](404)};return _0x4114x1b[_0xfc1e[60]]({status:_0xfc1e[43]},{userId:_0x4114xf[_0xfc1e[30]][_0xfc1e[26]]})})[_0xfc1e[19]](function(){return _0x4114x1b[_0xfc1e[59]](_0x4114xf[_0xfc1e[30]][_0xfc1e[26]])})[_0xfc1e[19]](function(){return _0x4114x10[_0xfc1e[58]](200)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})}};exports[_0xfc1e[61]]= function(_0x4114xf,_0x4114x10,_0x4114x11){return FaxRoom[_0xfc1e[24]](_0xfc1e[23])[_0xfc1e[29]](_0x4114xf[_0xfc1e[55]][_0xfc1e[26]])[_0xfc1e[19]](function(_0x4114x1c){if(!_0x4114x1c){return _0x4114x10[_0xfc1e[58]](404)};return _0x4114x10[_0xfc1e[17]](_0x4114x1c)})[_0xfc1e[16]](function(_0x4114x12){console[_0xfc1e[47]](_0x4114x12);return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[62]]= function(_0x4114xf,_0x4114x10,_0x4114x11){return FaxRoom[_0xfc1e[29]](_0x4114xf[_0xfc1e[55]][_0xfc1e[26]])[_0xfc1e[19]](function(_0x4114x1c){if(!_0x4114x1c){return _0x4114x10[_0xfc1e[58]](404)};return _0x4114x1c[_0xfc1e[67]]({attributes:[_0xfc1e[26],_0xfc1e[63],_0xfc1e[64],_0xfc1e[65],_0xfc1e[31],_0xfc1e[66]]})})[_0xfc1e[19]](function(_0x4114x1d){return _0x4114x10[_0xfc1e[17]](_0x4114x1d)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[68]]= function(_0x4114xf,_0x4114x10,_0x4114x11){return FaxRoom[_0xfc1e[68]](_0x4114xf[_0xfc1e[69]])[_0xfc1e[19]](function(_0x4114x1c){return _0x4114x10[_0xfc1e[18]](201)[_0xfc1e[17]](_0x4114x1c)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[70]]= function(_0x4114xf,_0x4114x10,_0x4114x11){_0x4114xf[_0xfc1e[69]][_0xfc1e[71]]= _0x4114xf[_0xfc1e[30]][_0xfc1e[26]];_0x4114xf[_0xfc1e[69]][_0xfc1e[72]]= _0x4114xf[_0xfc1e[55]][_0xfc1e[26]];_0x4114xf[_0xfc1e[69]][_0xfc1e[73]]= _0x4114xf[_0xfc1e[69]][_0xfc1e[73]];return FaxMessage[_0xfc1e[68]](_0x4114xf[_0xfc1e[69]],{include:[{model:FaxAttachment}],user:_0x4114xf[_0xfc1e[30]]})[_0xfc1e[19]](function(_0x4114x1e){return _0x4114x10[_0xfc1e[18]](201)[_0xfc1e[17]](_0x4114x1e)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[60]]= function(_0x4114xf,_0x4114x10,_0x4114x11){return FaxRoom[_0xfc1e[29]](_0x4114xf[_0xfc1e[55]][_0xfc1e[26]])[_0xfc1e[19]](function(_0x4114x1c){if(!_0x4114x1c){return _0x4114x10[_0xfc1e[58]](404)};if(_0x4114x1c[_0xfc1e[74]]){throw new Error(_0xfc1e[75])};var _0x4114x1f=_[_0xfc1e[37]](_0x4114x1c,_0x4114xf[_0xfc1e[69]]);return _0x4114x1f[_0xfc1e[76]]()})[_0xfc1e[19]](function(_0x4114x1c){return _0x4114x10[_0xfc1e[18]](200)[_0xfc1e[17]](_0x4114x1c)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[77]]= function(_0x4114xf,_0x4114x10,_0x4114x11){return FaxRoom[_0xfc1e[29]](_0x4114xf[_0xfc1e[55]][_0xfc1e[26]])[_0xfc1e[19]](function(_0x4114x1c){if(!_0x4114x1c){return _0x4114x10[_0xfc1e[58]](404)};return _0x4114x1c[_0xfc1e[79]](_0x4114xf[_0xfc1e[69]][_0xfc1e[78]],{individualHooks:true})})[_0xfc1e[19]](function(){return _0x4114x10[_0xfc1e[58]](200)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[80]]= function(_0x4114xf,_0x4114x10,_0x4114x11){return FaxRoom[_0xfc1e[29]](_0x4114xf[_0xfc1e[55]][_0xfc1e[26]])[_0xfc1e[19]](function(_0x4114x1c){if(!_0x4114x1c){return _0x4114x10[_0xfc1e[58]](404)};return _0x4114x1c[_0xfc1e[80]]()})[_0xfc1e[19]](function(){return _0x4114x10[_0xfc1e[58]](204)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[81]]= function(_0x4114xf,_0x4114x10){return FaxRoom[_0xfc1e[80]]({where:{id:_0x4114xf[_0xfc1e[20]][_0xfc1e[82]]},individualHooks:true})[_0xfc1e[19]](function(){return _0x4114x10[_0xfc1e[58]](200)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})};function handleError(_0x4114x10,_0x4114x12){return _0x4114x10[_0xfc1e[18]](500)[_0xfc1e[17]](_0x4114x12)}exports[_0xfc1e[83]]= function(_0x4114xf,_0x4114x10,_0x4114x11){var _0x4114x21={where:{id:_0x4114xf[_0xfc1e[55]][_0xfc1e[26]][_0xfc1e[85]](_0xfc1e[84])},user:_0x4114xf[_0xfc1e[30]],individualHooks:true};return FaxRoom[_0xfc1e[60]](_0x4114xf[_0xfc1e[69]],_0x4114x21)[_0xfc1e[19]](function(_0x4114x22){if(!_0x4114x22){return _0x4114x10[_0xfc1e[58]](404)};return _0x4114x22})[_0xfc1e[19]](function(_0x4114x22){return _0x4114x10[_0xfc1e[58]](200)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})};exports[_0xfc1e[86]]= function(_0x4114xf,_0x4114x10,_0x4114x11){return FaxMessage[_0xfc1e[29]](_0x4114xf[_0xfc1e[55]][_0xfc1e[26]])[_0xfc1e[19]](function(_0x4114x1e){return _0x4114x1e[_0xfc1e[87]]({include:[{model:FaxAccount},{model:FaxMessage,include:[{model:FaxAttachment},{model:User,attributes:[_0xfc1e[26],_0xfc1e[63],_0xfc1e[64],_0xfc1e[65]]}]},{model:User,attributes:[_0xfc1e[26],_0xfc1e[63],_0xfc1e[64],_0xfc1e[65]]}]})})[_0xfc1e[19]](function(_0x4114x1c){return _0x4114x10[_0xfc1e[17]](_0x4114x1c)})[_0xfc1e[16]](function(_0x4114x12){return handleError(_0x4114x10,_0x4114x12)})} \ No newline at end of file diff --git a/server/api/fax_room/fax_room.events.js b/server/api/fax_room/fax_room.events.js index 0ed0d8a..27375b5 100644 --- a/server/api/fax_room/fax_room.events.js +++ b/server/api/fax_room/fax_room.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const FaxRoom = require('../../models').FaxRoom; - -var FaxRoomEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -FaxRoomEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - FaxRoom.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - FaxRoomEvents.emit(event + ':' + doc._id, doc); - FaxRoomEvents.emit(event, doc); - done(null); - } -} - -module.exports = FaxRoomEvents; +var _0x434a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x434a[0];const EventEmitter=require(_0x434a[1]);const FaxRoom=require(_0x434a[3])[_0x434a[2]];var FaxRoomEvents= new EventEmitter();FaxRoomEvents[_0x434a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x434a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x434a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x434a[6]};for(var e in events){var event=events[e];FaxRoom[_0x434a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4fc3x8,_0x4fc3x9,_0x4fc3xa){FaxRoomEvents[_0x434a[10]](event+ _0x434a[8]+ _0x4fc3x8[_0x434a[9]],_0x4fc3x8);FaxRoomEvents[_0x434a[10]](event,_0x4fc3x8);_0x4fc3xa(null)}}module[_0x434a[11]]= FaxRoomEvents \ No newline at end of file diff --git a/server/api/fax_room/fax_room.socket.js b/server/api/fax_room/fax_room.socket.js index 80b8f06..fa245ba 100644 --- a/server/api/fax_room/fax_room.socket.js +++ b/server/api/fax_room/fax_room.socket.js @@ -1,69 +1 @@ -// /** -// * Broadcast updates to client when the model changes -// */ -// -// 'use strict'; -// -// var FaxRoom = require('../../models').FaxRoom; -// -// exports.register = function(socket) { -// FaxRoom.afterCreate(function(doc, options) { -// if (socket.role !== 'agent') { -// // ADMIN OR USER -// onSave(socket, doc.dataValues); -// } else { -// // AGENT -// switch (doc.status) { -// case 'OPEN': -// if (socket.userId == options.userId) -// onSave(socket, doc.dataValues); -// break; -// -// default: -// } -// } -// }); -// FaxRoom.afterUpdate(function(doc, options) { -// onSave(socket, doc.dataValues); -// }); -// FaxRoom.afterDestroy(function(doc) { -// onRemove(socket, doc); -// }); -// } -// -// function onSave(socket, doc, cb) { -// socket.emit('fax_room:save', doc); -// } -// -// function onRemove(socket, doc, cb) { -// socket.emit('fax_room:remove', doc); -// } - -'use strict'; - -const FaxRoomEvents = require('./fax_room.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('fax_room:' + event, socket); - - FaxRoomEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc, options) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - FaxRoomEvents.removeListener(event, listener); - }; -} +var _0x1d6a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x1d6a[0];const FaxRoomEvents=require(_0x1d6a[1]);var events=[_0x1d6a[2],_0x1d6a[3]];exports[_0x1d6a[4]]= function(_0xcc45x3){for(var _0xcc45x4=0,_0xcc45x5=events[_0x1d6a[5]];_0xcc45x4< _0xcc45x5;_0xcc45x4++){var _0xcc45x6=events[_0xcc45x4];var _0xcc45x7=createListener(_0x1d6a[6]+ _0xcc45x6,_0xcc45x3);FaxRoomEvents[_0x1d6a[7]](_0xcc45x6,_0xcc45x7);_0xcc45x3[_0x1d6a[7]](_0x1d6a[8],removeListener(_0xcc45x6,_0xcc45x7))}};function createListener(_0xcc45x6,_0xcc45x3){return function(_0xcc45x9,_0xcc45xa){_0xcc45x3[_0x1d6a[9]](_0xcc45x6,_0xcc45x9)}}function removeListener(_0xcc45x6,_0xcc45x7){return function(){FaxRoomEvents[_0x1d6a[10]](_0xcc45x6,_0xcc45x7)}} \ No newline at end of file diff --git a/server/api/fax_room/index.js b/server/api/fax_room/index.js index e2652dd..9dbd1c6 100644 --- a/server/api/fax_room/index.js +++ b/server/api/fax_room/index.js @@ -1,31 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./fax_room.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.index); -router.get('/inbox', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.inbox); -router.get('/describe', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.describe); -router.get('/pending', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10, 17], ['admin']), controller.pending); -router.get('/new', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10, 17], ['admin']), controller.new); -router.get('/open', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10, 17], ['admin']), controller.open); -router.get('/closed', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10, 17], ['admin']), controller.closed); -router.get('/agent/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.agentIndex); -router.get('/messages/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.getRoomByMessage); -router.get('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'user', 'agent']), controller.show); -router.get('/:id/agents', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.showAgents); -router.post('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.create); -router.post('/:id/messages', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'user', 'agent']), controller.createMessage); -router.put('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.update); -router.patch('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.updatePatch); -router.put('/:id/agents', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin', 'agent']), controller.updateAgents); -router.put('/:id/open', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['agent']), controller.openRoom); -router.delete('/', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.bulkDestroy); -router.delete('/:id', license.isValidDate(), license.hasFax(), auth.isAuthenticated(), auth.hasModule([10], ['admin']), controller.destroy); - -module.exports = router; +var _0xfb5f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x46\x61\x78","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x69\x6E\x62\x6F\x78","\x61\x67\x65\x6E\x74","\x69\x6E\x62\x6F\x78","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x70\x65\x6E\x64\x69\x6E\x67","\x70\x65\x6E\x64\x69\x6E\x67","\x2F\x6E\x65\x77","\x6E\x65\x77","\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E","\x2F\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x2F\x61\x67\x65\x6E\x74\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64","\x75\x73\x65\x72","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x70\x61\x74\x63\x68","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x2F\x3A\x69\x64\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E\x52\x6F\x6F\x6D","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xfb5f[0];var express=require(_0xfb5f[1]);var controller=require(_0xfb5f[2]);var auth=require(_0xfb5f[3]);var license=require(_0xfb5f[4]);var router=express.Router();router[_0xfb5f[12]](_0xfb5f[5],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9]]),controller[_0xfb5f[11]]);router[_0xfb5f[12]](_0xfb5f[13],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9],_0xfb5f[14]]),controller[_0xfb5f[15]]);router[_0xfb5f[12]](_0xfb5f[16],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9]]),controller[_0xfb5f[17]]);router[_0xfb5f[12]](_0xfb5f[18],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10,17],[_0xfb5f[9]]),controller[_0xfb5f[19]]);router[_0xfb5f[12]](_0xfb5f[20],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10,17],[_0xfb5f[9]]),controller[_0xfb5f[21]]);router[_0xfb5f[12]](_0xfb5f[22],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10,17],[_0xfb5f[9]]),controller[_0xfb5f[23]]);router[_0xfb5f[12]](_0xfb5f[24],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10,17],[_0xfb5f[9]]),controller[_0xfb5f[25]]);router[_0xfb5f[12]](_0xfb5f[26],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9]]),controller[_0xfb5f[27]]);router[_0xfb5f[12]](_0xfb5f[28],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9],_0xfb5f[14]]),controller[_0xfb5f[29]]);router[_0xfb5f[12]](_0xfb5f[30],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9],_0xfb5f[31],_0xfb5f[14]]),controller[_0xfb5f[32]]);router[_0xfb5f[12]](_0xfb5f[33],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9],_0xfb5f[14]]),controller[_0xfb5f[34]]);router[_0xfb5f[36]](_0xfb5f[5],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9]]),controller[_0xfb5f[35]]);router[_0xfb5f[36]](_0xfb5f[37],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9],_0xfb5f[31],_0xfb5f[14]]),controller[_0xfb5f[38]]);router[_0xfb5f[40]](_0xfb5f[30],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9],_0xfb5f[14]]),controller[_0xfb5f[39]]);router[_0xfb5f[42]](_0xfb5f[30],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9],_0xfb5f[14]]),controller[_0xfb5f[41]]);router[_0xfb5f[40]](_0xfb5f[33],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9],_0xfb5f[14]]),controller[_0xfb5f[43]]);router[_0xfb5f[40]](_0xfb5f[44],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[14]]),controller[_0xfb5f[45]]);router[_0xfb5f[47]](_0xfb5f[5],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9]]),controller[_0xfb5f[46]]);router[_0xfb5f[47]](_0xfb5f[30],license[_0xfb5f[6]](),license[_0xfb5f[7]](),auth[_0xfb5f[8]](),auth[_0xfb5f[10]]([10],[_0xfb5f[9]]),controller[_0xfb5f[48]]);module[_0xfb5f[49]]= router \ No newline at end of file diff --git a/server/api/freshdesk_account/freshdesk_account.controller.js b/server/api/freshdesk_account/freshdesk_account.controller.js index ae9ab8a..9671a3d 100644 --- a/server/api/freshdesk_account/freshdesk_account.controller.js +++ b/server/api/freshdesk_account/freshdesk_account.controller.js @@ -1,239 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/freshdesk/accounts -> index - * POST /api/freshdesk/accounts -> create - * GET /api/freshdesk/accounts/:id -> show - * PUT /api/freshdesk/accounts/:id -> update - * DELETE /api/freshdesk/accounts/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var util = require('util'); -var _fd = require('freshdesk'); - -var FreshdeskAccount = require('../../models').FreshdeskAccount; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of FreshdeskAccounts -exports.index = function(req, res) { - var attributes = ['description', 'name', 'username', 'remoteUri']; - var per_page = req.query.per_page ? parseInt(req.query.per_page, 10) : 100; - var page = req.query.page ? parseInt(req.query.page, 10) : 0; - - var query = { - where: {}, - limit: per_page, - offset: page * per_page - }; - - _.forIn(req.query, function(value, key) { - switch (key) { - case 'per_page': - case 'page': - break; - case 'sort_by': - query.order = util.format('%s %s', req.query.sort_by, req.query.sort_order || 'ASC') || null; - break; - case 'sort_order': - break; - case '$': - query.where.$or = []; - attributes.forEach(function(attribute) { - var tmp = {}; - tmp[attribute] = { - $like: '%' + value + '%' - }; - - query.where.$or.push(tmp); - }); - break; - default: - query.where[key] = { - $like: {} - }; - query.where[key].$like = '%' + value + '%'; - } - }); - - FreshdeskAccount - .findAndCountAll(query) - .then(function(result) { - - var total_pages = Math.ceil(result.count / per_page); - var next_page = total_pages > (query.offset + 1) ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page + 1) : null; - var previous_page = page > 0 ? util.format('%s://%s%s?page=%d', req.protocol, req.headers.host, req.baseUrl, page - 1) : null; - - return res.status(200).send({ - count: result.count, - rows: result.rows, - next_page: next_page, - previous_page: previous_page, - total_pages: total_pages - }); - - }) - .catch(function(err) { - return res.status(500).send({ - error: 'Something blew up!' - }); - }); -} - -// Gets a single FreshdeskAccount from the DB -exports.show = function(req, res) { - FreshdeskAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new FreshdeskAccount in the DB -exports.create = function(req, res) { - FreshdeskAccount.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing FreshdeskAccount in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - FreshdeskAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a FreshdeskAccount from the DB -exports.destroy = function(req, res) { - FreshdeskAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -exports.bulkDestroy = function(req, res) { - FreshdeskAccount - .destroy({ - where: { - id: req.query.id - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.checkAccount = function(req, res) { - FreshdeskAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(account) { - var freshdesk = new _fd(account.remoteUri, account.apiKey); - freshdesk.listTickets(function(err, response, body) { - if (err) { - return res.sendStatus(400); - } - body = JSON.parse(body); - if (body.require_login) { - return res.sendStatus(400); - } - return res.sendStatus(200); - }) - }) - .catch(handleError(res)); -} - -exports.accountValidation = function(req, res) { - var where = {}; - where[req.params.field] = req.body.value; - FreshdeskAccount - .findAndCountAll({ - where: where - }) - .then(function(result) { - if (result.count) { - return res.status(200).send({ - isValid: false, - value: req.body.value - }); - } - return res.status(200).send({ - isValid: true, - value: req.body.value - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getFields = function(req, res, next) { - FreshdeskAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(account) { - var Freshdesk = new _fd(account.remoteUri, account.apiKey); - Freshdesk.get('/ticket_fields.json', function(err, response, body) { - if (err) { - return next(err); - } - body = JSON.parse(body); - return res.status(200).send(body); - }); - }) - .catch(handleError(res)); -}; +var _0x5a7d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x70\x65\x72\x5F\x70\x61\x67\x65","\x71\x75\x65\x72\x79","\x70\x61\x67\x65","\x6F\x72\x64\x65\x72","\x25\x73\x20\x25\x73","\x73\x6F\x72\x74\x5F\x62\x79","\x73\x6F\x72\x74\x5F\x6F\x72\x64\x65\x72","\x41\x53\x43","\x66\x6F\x72\x6D\x61\x74","\x24\x6F\x72","\x77\x68\x65\x72\x65","\x25","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x24","\x24\x6C\x69\x6B\x65","\x66\x6F\x72\x49\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x62\x6C\x65\x77\x20\x75\x70\x21","\x63\x61\x74\x63\x68","\x63\x6F\x75\x6E\x74","\x63\x65\x69\x6C","\x6F\x66\x66\x73\x65\x74","\x25\x73\x3A\x2F\x2F\x25\x73\x25\x73\x3F\x70\x61\x67\x65\x3D\x25\x64","\x70\x72\x6F\x74\x6F\x63\x6F\x6C","\x68\x6F\x73\x74","\x68\x65\x61\x64\x65\x72\x73","\x62\x61\x73\x65\x55\x72\x6C","\x72\x6F\x77\x73","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x61\x70\x69\x4B\x65\x79","\x70\x61\x72\x73\x65","\x72\x65\x71\x75\x69\x72\x65\x5F\x6C\x6F\x67\x69\x6E","\x6C\x69\x73\x74\x54\x69\x63\x6B\x65\x74\x73","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x74\x69\x63\x6B\x65\x74\x5F\x66\x69\x65\x6C\x64\x73\x2E\x6A\x73\x6F\x6E","\x67\x65\x74"];_0x5a7d[0];var _=require(_0x5a7d[1]);var util=require(_0x5a7d[2]);var _fd=require(_0x5a7d[3]);var FreshdeskAccount=require(_0x5a7d[5])[_0x5a7d[4]];function handleError(_0x22f3x6,_0x22f3x7){_0x22f3x7= _0x22f3x7|| 500;return function(_0x22f3x8){_0x22f3x6[_0x5a7d[7]](_0x22f3x7)[_0x5a7d[6]](_0x22f3x8)}}function responseWithResult(_0x22f3x6,_0x22f3x7){_0x22f3x7= _0x22f3x7|| 200;return function(_0x22f3xa){if(_0x22f3xa){_0x22f3x6[_0x5a7d[7]](_0x22f3x7)[_0x5a7d[8]](_0x22f3xa)}}}function handleEntityNotFound(_0x22f3x6){return function(_0x22f3xa){if(!_0x22f3xa){_0x22f3x6[_0x5a7d[7]](404)[_0x5a7d[9]]();return null};return _0x22f3xa}}function saveUpdates(_0x22f3xd){return function(_0x22f3xa){return _0x22f3xa[_0x5a7d[11]](_0x22f3xd)[_0x5a7d[10]](function(_0x22f3xe){return _0x22f3xe})}}function removeEntity(_0x22f3x6){return function(_0x22f3xa){if(_0x22f3xa){return _0x22f3xa[_0x5a7d[12]]()[_0x5a7d[10]](function(){_0x22f3x6[_0x5a7d[7]](204)[_0x5a7d[9]]()})}}}exports[_0x5a7d[13]]= function(_0x22f3x10,_0x22f3x6){var _0x22f3x11=[_0x5a7d[14],_0x5a7d[15],_0x5a7d[16],_0x5a7d[17]];var _0x22f3x12=_0x22f3x10[_0x5a7d[19]][_0x5a7d[18]]?parseInt(_0x22f3x10[_0x5a7d[19]][_0x5a7d[18]],10):100;var _0x22f3x13=_0x22f3x10[_0x5a7d[19]][_0x5a7d[20]]?parseInt(_0x22f3x10[_0x5a7d[19]][_0x5a7d[20]],10):0;var _0x22f3x14={where:{},limit:_0x22f3x12,offset:_0x22f3x13* _0x22f3x12};_[_0x5a7d[34]](_0x22f3x10[_0x5a7d[19]],function(_0x22f3x15,_0x22f3x16){switch(_0x22f3x16){case _0x5a7d[18]:;case _0x5a7d[20]:break;case _0x5a7d[23]:_0x22f3x14[_0x5a7d[21]]= util[_0x5a7d[26]](_0x5a7d[22],_0x22f3x10[_0x5a7d[19]][_0x5a7d[23]],_0x22f3x10[_0x5a7d[19]][_0x5a7d[24]]|| _0x5a7d[25])|| null;break;case _0x5a7d[24]:break;case _0x5a7d[32]:_0x22f3x14[_0x5a7d[28]][_0x5a7d[27]]= [];_0x22f3x11[_0x5a7d[31]](function(_0x22f3x17){var _0x22f3x18={};_0x22f3x18[_0x22f3x17]= {$like:_0x5a7d[29]+ _0x22f3x15+ _0x5a7d[29]};_0x22f3x14[_0x5a7d[28]][_0x5a7d[27]][_0x5a7d[30]](_0x22f3x18)});break;default:_0x22f3x14[_0x5a7d[28]][_0x22f3x16]= {$like:{}};_0x22f3x14[_0x5a7d[28]][_0x22f3x16][_0x5a7d[33]]= _0x5a7d[29]+ _0x22f3x15+ _0x5a7d[29]}});FreshdeskAccount[_0x5a7d[46]](_0x22f3x14)[_0x5a7d[10]](function(_0x22f3x19){var _0x22f3x1a=Math[_0x5a7d[38]](_0x22f3x19[_0x5a7d[37]]/ _0x22f3x12);var _0x22f3x1b=_0x22f3x1a> (_0x22f3x14[_0x5a7d[39]]+ 1)?util[_0x5a7d[26]](_0x5a7d[40],_0x22f3x10[_0x5a7d[41]],_0x22f3x10[_0x5a7d[43]][_0x5a7d[42]],_0x22f3x10[_0x5a7d[44]],_0x22f3x13+ 1):null;var _0x22f3x1c=_0x22f3x13> 0?util[_0x5a7d[26]](_0x5a7d[40],_0x22f3x10[_0x5a7d[41]],_0x22f3x10[_0x5a7d[43]][_0x5a7d[42]],_0x22f3x10[_0x5a7d[44]],_0x22f3x13- 1):null;return _0x22f3x6[_0x5a7d[7]](200)[_0x5a7d[6]]({count:_0x22f3x19[_0x5a7d[37]],rows:_0x22f3x19[_0x5a7d[45]],next_page:_0x22f3x1b,previous_page:_0x22f3x1c,total_pages:_0x22f3x1a})})[_0x5a7d[36]](function(_0x22f3x8){return _0x22f3x6[_0x5a7d[7]](500)[_0x5a7d[6]]({error:_0x5a7d[35]})})};exports[_0x5a7d[47]]= function(_0x22f3x10,_0x22f3x6){FreshdeskAccount[_0x5a7d[50]](_0x22f3x10[_0x5a7d[49]][_0x5a7d[48]])[_0x5a7d[10]](handleEntityNotFound(_0x22f3x6))[_0x5a7d[10]](responseWithResult(_0x22f3x6))[_0x5a7d[36]](handleError(_0x22f3x6))};exports[_0x5a7d[51]]= function(_0x22f3x10,_0x22f3x6){FreshdeskAccount[_0x5a7d[51]](_0x22f3x10[_0x5a7d[52]])[_0x5a7d[10]](responseWithResult(_0x22f3x6,201))[_0x5a7d[36]](handleError(_0x22f3x6))};exports[_0x5a7d[53]]= function(_0x22f3x10,_0x22f3x6){if(_0x22f3x10[_0x5a7d[52]][_0x5a7d[48]]){delete _0x22f3x10[_0x5a7d[52]][_0x5a7d[48]]};FreshdeskAccount[_0x5a7d[50]](_0x22f3x10[_0x5a7d[49]][_0x5a7d[48]])[_0x5a7d[10]](handleEntityNotFound(_0x22f3x6))[_0x5a7d[10]](saveUpdates(_0x22f3x10[_0x5a7d[52]]))[_0x5a7d[10]](responseWithResult(_0x22f3x6))[_0x5a7d[36]](handleError(_0x22f3x6))};exports[_0x5a7d[12]]= function(_0x22f3x10,_0x22f3x6){FreshdeskAccount[_0x5a7d[50]](_0x22f3x10[_0x5a7d[49]][_0x5a7d[48]])[_0x5a7d[10]](handleEntityNotFound(_0x22f3x6))[_0x5a7d[10]](removeEntity(_0x22f3x6))[_0x5a7d[36]](handleError(_0x22f3x6))};exports[_0x5a7d[54]]= function(_0x22f3x10,_0x22f3x6){FreshdeskAccount[_0x5a7d[12]]({where:{id:_0x22f3x10[_0x5a7d[19]][_0x5a7d[48]]},individualHooks:true})[_0x5a7d[10]](function(){return _0x22f3x6[_0x5a7d[55]](204)})[_0x5a7d[36]](function(_0x22f3x8){return handleError(_0x22f3x6,_0x22f3x8)})};exports[_0x5a7d[56]]= function(_0x22f3x10,_0x22f3x6){FreshdeskAccount[_0x5a7d[50]](_0x22f3x10[_0x5a7d[49]][_0x5a7d[48]])[_0x5a7d[10]](handleEntityNotFound(_0x22f3x6))[_0x5a7d[10]](function(_0x22f3x1d){var _0x22f3x1e= new _fd(_0x22f3x1d[_0x5a7d[17]],_0x22f3x1d[_0x5a7d[57]]);_0x22f3x1e[_0x5a7d[60]](function(_0x22f3x8,_0x22f3x1f,_0x22f3x20){if(_0x22f3x8){return _0x22f3x6[_0x5a7d[55]](400)};_0x22f3x20= JSON[_0x5a7d[58]](_0x22f3x20);if(_0x22f3x20[_0x5a7d[59]]){return _0x22f3x6[_0x5a7d[55]](400)};return _0x22f3x6[_0x5a7d[55]](200)})})[_0x5a7d[36]](handleError(_0x22f3x6))};exports[_0x5a7d[61]]= function(_0x22f3x10,_0x22f3x6){var _0x22f3x21={};_0x22f3x21[_0x22f3x10[_0x5a7d[49]][_0x5a7d[62]]]= _0x22f3x10[_0x5a7d[52]][_0x5a7d[63]];FreshdeskAccount[_0x5a7d[46]]({where:_0x22f3x21})[_0x5a7d[10]](function(_0x22f3x19){if(_0x22f3x19[_0x5a7d[37]]){return _0x22f3x6[_0x5a7d[7]](200)[_0x5a7d[6]]({isValid:false,value:_0x22f3x10[_0x5a7d[52]][_0x5a7d[63]]})};return _0x22f3x6[_0x5a7d[7]](200)[_0x5a7d[6]]({isValid:true,value:_0x22f3x10[_0x5a7d[52]][_0x5a7d[63]]})})[_0x5a7d[36]](function(_0x22f3x8){return handleError(_0x22f3x6,_0x22f3x8)})};exports[_0x5a7d[64]]= function(_0x22f3x10,_0x22f3x6,_0x22f3x22){FreshdeskAccount[_0x5a7d[50]](_0x22f3x10[_0x5a7d[49]][_0x5a7d[48]])[_0x5a7d[10]](handleEntityNotFound(_0x22f3x6))[_0x5a7d[10]](function(_0x22f3x1d){var _0x22f3x23= new _fd(_0x22f3x1d[_0x5a7d[17]],_0x22f3x1d[_0x5a7d[57]]);_0x22f3x23[_0x5a7d[66]](_0x5a7d[65],function(_0x22f3x8,_0x22f3x1f,_0x22f3x20){if(_0x22f3x8){return _0x22f3x22(_0x22f3x8)};_0x22f3x20= JSON[_0x5a7d[58]](_0x22f3x20);return _0x22f3x6[_0x5a7d[7]](200)[_0x5a7d[6]](_0x22f3x20)})})[_0x5a7d[36]](handleError(_0x22f3x6))} \ No newline at end of file diff --git a/server/api/freshdesk_account/freshdesk_account.events.js b/server/api/freshdesk_account/freshdesk_account.events.js index 0b71e73..4eefb0d 100644 --- a/server/api/freshdesk_account/freshdesk_account.events.js +++ b/server/api/freshdesk_account/freshdesk_account.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const FreshdeskAccount = require('../../models').FreshdeskAccount; - -var FreshdeskAccountEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -FreshdeskAccountEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - FreshdeskAccount.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - FreshdeskAccountEvents.emit(event + ':' + doc._id, doc); - FreshdeskAccountEvents.emit(event, doc); - done(null); - } -} - -module.exports = FreshdeskAccountEvents; +var _0xbf56=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xbf56[0];const EventEmitter=require(_0xbf56[1]);const FreshdeskAccount=require(_0xbf56[3])[_0xbf56[2]];var FreshdeskAccountEvents= new EventEmitter();FreshdeskAccountEvents[_0xbf56[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xbf56[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xbf56[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xbf56[6]};for(var e in events){var event=events[e];FreshdeskAccount[_0xbf56[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5d87x8,_0x5d87x9,_0x5d87xa){FreshdeskAccountEvents[_0xbf56[10]](event+ _0xbf56[8]+ _0x5d87x8[_0xbf56[9]],_0x5d87x8);FreshdeskAccountEvents[_0xbf56[10]](event,_0x5d87x8);_0x5d87xa(null)}}module[_0xbf56[11]]= FreshdeskAccountEvents \ No newline at end of file diff --git a/server/api/freshdesk_account/freshdesk_account.socket.js b/server/api/freshdesk_account/freshdesk_account.socket.js index c41142d..828fcd7 100644 --- a/server/api/freshdesk_account/freshdesk_account.socket.js +++ b/server/api/freshdesk_account/freshdesk_account.socket.js @@ -1,28 +1 @@ -'use strict'; - -const FreshdeskAccountEvents = require('./freshdesk_account.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('freshdesk_account:' + event, socket); - - FreshdeskAccountEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - FreshdeskAccountEvents.removeListener(event, listener); - }; -} +var _0x53b3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x53b3[0];const FreshdeskAccountEvents=require(_0x53b3[1]);var events=[_0x53b3[2],_0x53b3[3]];exports[_0x53b3[4]]= function(_0xd026x3){for(var _0xd026x4=0,_0xd026x5=events[_0x53b3[5]];_0xd026x4< _0xd026x5;_0xd026x4++){var _0xd026x6=events[_0xd026x4];var _0xd026x7=createListener(_0x53b3[6]+ _0xd026x6,_0xd026x3);FreshdeskAccountEvents[_0x53b3[7]](_0xd026x6,_0xd026x7);_0xd026x3[_0x53b3[7]](_0x53b3[8],removeListener(_0xd026x6,_0xd026x7))}};function createListener(_0xd026x6,_0xd026x3){return function(_0xd026x9){_0xd026x3[_0x53b3[9]](_0xd026x6,_0xd026x9)}}function removeListener(_0xd026x6,_0xd026x7){return function(){FreshdeskAccountEvents[_0x53b3[10]](_0xd026x6,_0xd026x7)}} \ No newline at end of file diff --git a/server/api/freshdesk_account/index.js b/server/api/freshdesk_account/index.js index a7385b7..3048b78 100644 --- a/server/api/freshdesk_account/index.js +++ b/server/api/freshdesk_account/index.js @@ -1,21 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./freshdesk_account.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); -router.get('/:id', auth.isAuthenticated(), controller.show); -router.get('/:id/fields', auth.isAuthenticated(), controller.getFields); -router.get('/:id/check', auth.isAuthenticated(), controller.checkAccount); -router.post('/validate/:field', auth.isAuthenticated(), controller.accountValidation); -router.post('/', auth.isAuthenticated(), controller.create); -router.put('/:id', auth.isAuthenticated(), controller.update); -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/', auth.isAuthenticated(), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - - -module.exports = router; +var _0xf0ca=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xf0ca[0];var express=require(_0xf0ca[1]);var auth=require(_0xf0ca[2]);var controller=require(_0xf0ca[3]);var router=express.Router();router[_0xf0ca[7]](_0xf0ca[4],auth[_0xf0ca[5]](),controller[_0xf0ca[6]]);router[_0xf0ca[7]](_0xf0ca[8],auth[_0xf0ca[5]](),controller[_0xf0ca[9]]);router[_0xf0ca[7]](_0xf0ca[10],auth[_0xf0ca[5]](),controller[_0xf0ca[11]]);router[_0xf0ca[7]](_0xf0ca[12],auth[_0xf0ca[5]](),controller[_0xf0ca[13]]);router[_0xf0ca[16]](_0xf0ca[14],auth[_0xf0ca[5]](),controller[_0xf0ca[15]]);router[_0xf0ca[16]](_0xf0ca[4],auth[_0xf0ca[5]](),controller[_0xf0ca[17]]);router[_0xf0ca[19]](_0xf0ca[8],auth[_0xf0ca[5]](),controller[_0xf0ca[18]]);router[_0xf0ca[20]](_0xf0ca[8],auth[_0xf0ca[5]](),controller[_0xf0ca[18]]);router[_0xf0ca[22]](_0xf0ca[4],auth[_0xf0ca[5]](),controller[_0xf0ca[21]]);router[_0xf0ca[22]](_0xf0ca[8],auth[_0xf0ca[5]](),controller[_0xf0ca[23]]);module[_0xf0ca[24]]= router \ No newline at end of file diff --git a/server/api/freshdesk_configuration/freshdesk_configuration.controller.js b/server/api/freshdesk_configuration/freshdesk_configuration.controller.js index 4c3d44d..dac6920 100644 --- a/server/api/freshdesk_configuration/freshdesk_configuration.controller.js +++ b/server/api/freshdesk_configuration/freshdesk_configuration.controller.js @@ -1,146 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/freshdesk/configurations -> index - * POST /api/freshdesk/configurations -> create - * GET /api/freshdesk/configurations/:id -> show - * PUT /api/freshdesk/configurations/:id -> update - * DELETE /api/freshdesk/configurations/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var FreshdeskConfiguration = require('../../models').FreshdeskConfiguration; -var FreshdeskField = require('../../models').FreshdeskField; - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of FreshdeskConfigurations -exports.index = function(req, res) { - FreshdeskConfiguration.findAll({ - where: req.query - }) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single FreshdeskConfiguration from the DB -exports.show = function(req, res) { - FreshdeskConfiguration.find({ - where: { - id: req.params.id - }, - include: [{ - model: FreshdeskField, - as: 'Subject' - }, { - model: FreshdeskField, - as: 'Description' - }, { - model: FreshdeskField, - as: 'Field' - }] - }) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new FreshdeskConfiguration in the DB -exports.create = function(req, res) { - FreshdeskConfiguration.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing FreshdeskConfiguration in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - FreshdeskConfiguration.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a FreshdeskConfiguration from the DB -exports.destroy = function(req, res) { - FreshdeskConfiguration.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -exports.addConfigurationField = function(req, res, next) { - // console.log(req.params); - var freshdeskConfiguration; - FreshdeskConfiguration - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(salesforce_configuration) { - freshdeskConfiguration = salesforce_configuration; - return FreshdeskField.create(req.body) - }) - .then(function(freshdeskField) { - switch (req.params.type) { - case 'subject': - return [freshdeskConfiguration.addSubject(freshdeskField), freshdeskField]; - case 'description': - return [freshdeskConfiguration.addDescription(freshdeskField), freshdeskField]; - case 'field': - return [freshdeskConfiguration.addField(freshdeskField), freshdeskField]; - } - }) - .spread(function(data, freshdeskField) { - return res.status(201).json(freshdeskField); - }) - .catch(handleError(res)); -}; +var _0x543d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0x543d[0];var _=require(_0x543d[1]);var FreshdeskConfiguration=require(_0x543d[3])[_0x543d[2]];var FreshdeskField=require(_0x543d[3])[_0x543d[4]];function handleError(_0xe272x5,_0xe272x6){_0xe272x6= _0xe272x6|| 500;return function(_0xe272x7){_0xe272x5[_0x543d[6]](_0xe272x6)[_0x543d[5]](_0xe272x7)}}function responseWithResult(_0xe272x5,_0xe272x6){_0xe272x6= _0xe272x6|| 200;return function(_0xe272x9){if(_0xe272x9){_0xe272x5[_0x543d[6]](_0xe272x6)[_0x543d[7]](_0xe272x9)}}}function handleEntityNotFound(_0xe272x5){return function(_0xe272x9){if(!_0xe272x9){_0xe272x5[_0x543d[6]](404)[_0x543d[8]]();return null};return _0xe272x9}}function saveUpdates(_0xe272xc){return function(_0xe272x9){return _0xe272x9[_0x543d[10]](_0xe272xc)[_0x543d[9]](function(_0xe272xd){return _0xe272xd})}}function removeEntity(_0xe272x5){return function(_0xe272x9){if(_0xe272x9){return _0xe272x9[_0x543d[11]]()[_0x543d[9]](function(){_0xe272x5[_0x543d[6]](204)[_0x543d[8]]()})}}}exports[_0x543d[12]]= function(_0xe272xf,_0xe272x5){FreshdeskConfiguration[_0x543d[15]]({where:_0xe272xf[_0x543d[14]]})[_0x543d[9]](responseWithResult(_0xe272x5))[_0x543d[13]](handleError(_0xe272x5))};exports[_0x543d[16]]= function(_0xe272xf,_0xe272x5){FreshdeskConfiguration[_0x543d[22]]({where:{id:_0xe272xf[_0x543d[18]][_0x543d[17]]},include:[{model:FreshdeskField,as:_0x543d[19]},{model:FreshdeskField,as:_0x543d[20]},{model:FreshdeskField,as:_0x543d[21]}]})[_0x543d[9]](handleEntityNotFound(_0xe272x5))[_0x543d[9]](responseWithResult(_0xe272x5))[_0x543d[13]](handleError(_0xe272x5))};exports[_0x543d[23]]= function(_0xe272xf,_0xe272x5){FreshdeskConfiguration[_0x543d[23]](_0xe272xf[_0x543d[24]])[_0x543d[9]](responseWithResult(_0xe272x5,201))[_0x543d[13]](handleError(_0xe272x5))};exports[_0x543d[25]]= function(_0xe272xf,_0xe272x5){if(_0xe272xf[_0x543d[24]][_0x543d[17]]){delete _0xe272xf[_0x543d[24]][_0x543d[17]]};FreshdeskConfiguration[_0x543d[26]](_0xe272xf[_0x543d[18]][_0x543d[17]])[_0x543d[9]](handleEntityNotFound(_0xe272x5))[_0x543d[9]](saveUpdates(_0xe272xf[_0x543d[24]]))[_0x543d[9]](responseWithResult(_0xe272x5))[_0x543d[13]](handleError(_0xe272x5))};exports[_0x543d[11]]= function(_0xe272xf,_0xe272x5){FreshdeskConfiguration[_0x543d[26]](_0xe272xf[_0x543d[18]][_0x543d[17]])[_0x543d[9]](handleEntityNotFound(_0xe272x5))[_0x543d[9]](removeEntity(_0xe272x5))[_0x543d[13]](handleError(_0xe272x5))};exports[_0x543d[27]]= function(_0xe272xf,_0xe272x5,_0xe272x10){var _0xe272x11;FreshdeskConfiguration[_0x543d[26]](_0xe272xf[_0x543d[18]][_0x543d[17]])[_0x543d[9]](handleEntityNotFound(_0xe272x5))[_0x543d[9]](function(_0xe272x14){_0xe272x11= _0xe272x14;return FreshdeskField[_0x543d[23]](_0xe272xf[_0x543d[24]])})[_0x543d[9]](function(_0xe272x13){switch(_0xe272xf[_0x543d[18]][_0x543d[35]]){case _0x543d[30]:return [_0xe272x11[_0x543d[29]](_0xe272x13),_0xe272x13];case _0x543d[32]:return [_0xe272x11[_0x543d[31]](_0xe272x13),_0xe272x13];case _0x543d[34]:return [_0xe272x11[_0x543d[33]](_0xe272x13),_0xe272x13]}})[_0x543d[28]](function(_0xe272x12,_0xe272x13){return _0xe272x5[_0x543d[6]](201)[_0x543d[7]](_0xe272x13)})[_0x543d[13]](handleError(_0xe272x5))} \ No newline at end of file diff --git a/server/api/freshdesk_configuration/freshdesk_configuration.events.js b/server/api/freshdesk_configuration/freshdesk_configuration.events.js index f36d5f5..516eed1 100644 --- a/server/api/freshdesk_configuration/freshdesk_configuration.events.js +++ b/server/api/freshdesk_configuration/freshdesk_configuration.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const FreshdeskConfiguration = require('../../models').FreshdeskConfiguration; - -var FreshdeskConfigurationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -FreshdeskConfigurationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - FreshdeskConfiguration.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - FreshdeskConfigurationEvents.emit(event + ':' + doc._id, doc); - FreshdeskConfigurationEvents.emit(event, doc); - done(null); - } -} - -module.exports = FreshdeskConfigurationEvents; +var _0x9cf3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9cf3[0];const EventEmitter=require(_0x9cf3[1]);const FreshdeskConfiguration=require(_0x9cf3[3])[_0x9cf3[2]];var FreshdeskConfigurationEvents= new EventEmitter();FreshdeskConfigurationEvents[_0x9cf3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9cf3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9cf3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9cf3[6]};for(var e in events){var event=events[e];FreshdeskConfiguration[_0x9cf3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xf081x8,_0xf081x9,_0xf081xa){FreshdeskConfigurationEvents[_0x9cf3[10]](event+ _0x9cf3[8]+ _0xf081x8[_0x9cf3[9]],_0xf081x8);FreshdeskConfigurationEvents[_0x9cf3[10]](event,_0xf081x8);_0xf081xa(null)}}module[_0x9cf3[11]]= FreshdeskConfigurationEvents \ No newline at end of file diff --git a/server/api/freshdesk_configuration/freshdesk_configuration.socket.js b/server/api/freshdesk_configuration/freshdesk_configuration.socket.js index 9c77498..179369a 100644 --- a/server/api/freshdesk_configuration/freshdesk_configuration.socket.js +++ b/server/api/freshdesk_configuration/freshdesk_configuration.socket.js @@ -1,28 +1 @@ -'use strict'; - -const FreshdeskConfigurationEvents = require('./freshdesk_configuration.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('freshdesk_configuration:' + event, socket); - - FreshdeskConfigurationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - FreshdeskConfigurationEvents.removeListener(event, listener); - }; -} +var _0x8b02=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x8b02[0];const FreshdeskConfigurationEvents=require(_0x8b02[1]);var events=[_0x8b02[2],_0x8b02[3]];exports[_0x8b02[4]]= function(_0xfe3fx3){for(var _0xfe3fx4=0,_0xfe3fx5=events[_0x8b02[5]];_0xfe3fx4< _0xfe3fx5;_0xfe3fx4++){var _0xfe3fx6=events[_0xfe3fx4];var _0xfe3fx7=createListener(_0x8b02[6]+ _0xfe3fx6,_0xfe3fx3);FreshdeskConfigurationEvents[_0x8b02[7]](_0xfe3fx6,_0xfe3fx7);_0xfe3fx3[_0x8b02[7]](_0x8b02[8],removeListener(_0xfe3fx6,_0xfe3fx7))}};function createListener(_0xfe3fx6,_0xfe3fx3){return function(_0xfe3fx9){_0xfe3fx3[_0x8b02[9]](_0xfe3fx6,_0xfe3fx9)}}function removeListener(_0xfe3fx6,_0xfe3fx7){return function(){FreshdeskConfigurationEvents[_0x8b02[10]](_0xfe3fx6,_0xfe3fx7)}} \ No newline at end of file diff --git a/server/api/freshdesk_configuration/index.js b/server/api/freshdesk_configuration/index.js index e08945f..6dd4423 100644 --- a/server/api/freshdesk_configuration/index.js +++ b/server/api/freshdesk_configuration/index.js @@ -1,19 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./freshdesk_configuration.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); - -router.get('/:id', auth.isAuthenticated(), controller.show); -router.post('/', auth.isAuthenticated(), controller.create); -router.put('/:id', auth.isAuthenticated(), controller.update); -router.post('/:id/:type', auth.isAuthenticated(), controller.addConfigurationField); -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - - -module.exports = router; +var _0x61d0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x61d0[0];var express=require(_0x61d0[1]);var auth=require(_0x61d0[2]);var controller=require(_0x61d0[3]);var router=express.Router();router[_0x61d0[7]](_0x61d0[4],auth[_0x61d0[5]](),controller[_0x61d0[6]]);router[_0x61d0[7]](_0x61d0[8],auth[_0x61d0[5]](),controller[_0x61d0[9]]);router[_0x61d0[11]](_0x61d0[4],auth[_0x61d0[5]](),controller[_0x61d0[10]]);router[_0x61d0[13]](_0x61d0[8],auth[_0x61d0[5]](),controller[_0x61d0[12]]);router[_0x61d0[11]](_0x61d0[14],auth[_0x61d0[5]](),controller[_0x61d0[15]]);router[_0x61d0[16]](_0x61d0[8],auth[_0x61d0[5]](),controller[_0x61d0[12]]);router[_0x61d0[18]](_0x61d0[8],auth[_0x61d0[5]](),controller[_0x61d0[17]]);module[_0x61d0[19]]= router \ No newline at end of file diff --git a/server/api/freshdesk_field/freshdesk_field.controller.js b/server/api/freshdesk_field/freshdesk_field.controller.js index 4a35db8..72e2249 100644 --- a/server/api/freshdesk_field/freshdesk_field.controller.js +++ b/server/api/freshdesk_field/freshdesk_field.controller.js @@ -1,104 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/freshdesk/fields -> index - * POST /api/freshdesk/fields -> create - * GET /api/freshdesk/fields/:id -> show - * PUT /api/freshdesk/fields/:id -> update - * DELETE /api/freshdesk/fields/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var FreshdeskField = require('../../models').FreshdeskField; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of FreshdeskFields -exports.index = function(req, res) { - FreshdeskField.findAll() - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single FreshdeskField from the DB -exports.show = function(req, res) { - FreshdeskField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new FreshdeskField in the DB -exports.create = function(req, res) { - FreshdeskField.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing FreshdeskField in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - FreshdeskField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a FreshdeskField from the DB -exports.destroy = function(req, res) { - FreshdeskField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0x9840=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x9840[0];var _=require(_0x9840[1]);var FreshdeskField=require(_0x9840[3])[_0x9840[2]];function handleError(_0x5d32x4,_0x5d32x5){_0x5d32x5= _0x5d32x5|| 500;return function(_0x5d32x6){_0x5d32x4[_0x9840[5]](_0x5d32x5)[_0x9840[4]](_0x5d32x6)}}function responseWithResult(_0x5d32x4,_0x5d32x5){_0x5d32x5= _0x5d32x5|| 200;return function(_0x5d32x8){if(_0x5d32x8){_0x5d32x4[_0x9840[5]](_0x5d32x5)[_0x9840[6]](_0x5d32x8)}}}function handleEntityNotFound(_0x5d32x4){return function(_0x5d32x8){if(!_0x5d32x8){_0x5d32x4[_0x9840[5]](404)[_0x9840[7]]();return null};return _0x5d32x8}}function saveUpdates(_0x5d32xb){return function(_0x5d32x8){return _0x5d32x8[_0x9840[9]](_0x5d32xb)[_0x9840[8]](function(_0x5d32xc){return _0x5d32xc})}}function removeEntity(_0x5d32x4){return function(_0x5d32x8){if(_0x5d32x8){return _0x5d32x8[_0x9840[10]]()[_0x9840[8]](function(){_0x5d32x4[_0x9840[5]](204)[_0x9840[7]]()})}}}exports[_0x9840[11]]= function(_0x5d32xe,_0x5d32x4){FreshdeskField[_0x9840[13]]()[_0x9840[8]](responseWithResult(_0x5d32x4))[_0x9840[12]](handleError(_0x5d32x4))};exports[_0x9840[14]]= function(_0x5d32xe,_0x5d32x4){FreshdeskField[_0x9840[17]](_0x5d32xe[_0x9840[16]][_0x9840[15]])[_0x9840[8]](handleEntityNotFound(_0x5d32x4))[_0x9840[8]](responseWithResult(_0x5d32x4))[_0x9840[12]](handleError(_0x5d32x4))};exports[_0x9840[18]]= function(_0x5d32xe,_0x5d32x4){FreshdeskField[_0x9840[18]](_0x5d32xe[_0x9840[19]])[_0x9840[8]](responseWithResult(_0x5d32x4,201))[_0x9840[12]](handleError(_0x5d32x4))};exports[_0x9840[20]]= function(_0x5d32xe,_0x5d32x4){if(_0x5d32xe[_0x9840[19]][_0x9840[15]]){delete _0x5d32xe[_0x9840[19]][_0x9840[15]]};FreshdeskField[_0x9840[17]](_0x5d32xe[_0x9840[16]][_0x9840[15]])[_0x9840[8]](handleEntityNotFound(_0x5d32x4))[_0x9840[8]](saveUpdates(_0x5d32xe[_0x9840[19]]))[_0x9840[8]](responseWithResult(_0x5d32x4))[_0x9840[12]](handleError(_0x5d32x4))};exports[_0x9840[10]]= function(_0x5d32xe,_0x5d32x4){FreshdeskField[_0x9840[17]](_0x5d32xe[_0x9840[16]][_0x9840[15]])[_0x9840[8]](handleEntityNotFound(_0x5d32x4))[_0x9840[8]](removeEntity(_0x5d32x4))[_0x9840[12]](handleError(_0x5d32x4))} \ No newline at end of file diff --git a/server/api/freshdesk_field/freshdesk_field.events.js b/server/api/freshdesk_field/freshdesk_field.events.js index dcadf5c..370b937 100644 --- a/server/api/freshdesk_field/freshdesk_field.events.js +++ b/server/api/freshdesk_field/freshdesk_field.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const FreshdeskField = require('../../models').FreshdeskField; - -var FreshdeskFieldEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -FreshdeskFieldEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - FreshdeskField.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - FreshdeskFieldEvents.emit(event + ':' + doc._id, doc); - FreshdeskFieldEvents.emit(event, doc); - done(null); - } -} - -module.exports = FreshdeskFieldEvents; +var _0xce3a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xce3a[0];const EventEmitter=require(_0xce3a[1]);const FreshdeskField=require(_0xce3a[3])[_0xce3a[2]];var FreshdeskFieldEvents= new EventEmitter();FreshdeskFieldEvents[_0xce3a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xce3a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xce3a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xce3a[6]};for(var e in events){var event=events[e];FreshdeskField[_0xce3a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe807x8,_0xe807x9,_0xe807xa){FreshdeskFieldEvents[_0xce3a[10]](event+ _0xce3a[8]+ _0xe807x8[_0xce3a[9]],_0xe807x8);FreshdeskFieldEvents[_0xce3a[10]](event,_0xe807x8);_0xe807xa(null)}}module[_0xce3a[11]]= FreshdeskFieldEvents \ No newline at end of file diff --git a/server/api/freshdesk_field/freshdesk_field.socket.js b/server/api/freshdesk_field/freshdesk_field.socket.js index 41eae7a..6abe3f3 100644 --- a/server/api/freshdesk_field/freshdesk_field.socket.js +++ b/server/api/freshdesk_field/freshdesk_field.socket.js @@ -1,28 +1 @@ -'use strict'; - -const FreshdeskFieldEvents = require('./freshdesk_field.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('freshdesk_field:' + event, socket); - - FreshdeskFieldEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - FreshdeskFieldEvents.removeListener(event, listener); - }; -} +var _0xce51=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xce51[0];const FreshdeskFieldEvents=require(_0xce51[1]);var events=[_0xce51[2],_0xce51[3]];exports[_0xce51[4]]= function(_0x9c22x3){for(var _0x9c22x4=0,_0x9c22x5=events[_0xce51[5]];_0x9c22x4< _0x9c22x5;_0x9c22x4++){var _0x9c22x6=events[_0x9c22x4];var _0x9c22x7=createListener(_0xce51[6]+ _0x9c22x6,_0x9c22x3);FreshdeskFieldEvents[_0xce51[7]](_0x9c22x6,_0x9c22x7);_0x9c22x3[_0xce51[7]](_0xce51[8],removeListener(_0x9c22x6,_0x9c22x7))}};function createListener(_0x9c22x6,_0x9c22x3){return function(_0x9c22x9){_0x9c22x3[_0xce51[9]](_0x9c22x6,_0x9c22x9)}}function removeListener(_0x9c22x6,_0x9c22x7){return function(){FreshdeskFieldEvents[_0xce51[10]](_0x9c22x6,_0x9c22x7)}} \ No newline at end of file diff --git a/server/api/freshdesk_field/index.js b/server/api/freshdesk_field/index.js index d17268f..e379af8 100644 --- a/server/api/freshdesk_field/index.js +++ b/server/api/freshdesk_field/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./freshdesk_field.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); - -router.get('/:id', auth.isAuthenticated(), controller.show); -router.post('/', auth.isAuthenticated(), controller.create); -router.put('/:id', auth.isAuthenticated(), controller.update); -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - - -module.exports = router; +var _0x2ab8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2ab8[0];var express=require(_0x2ab8[1]);var auth=require(_0x2ab8[2]);var controller=require(_0x2ab8[3]);var router=express.Router();router[_0x2ab8[7]](_0x2ab8[4],auth[_0x2ab8[5]](),controller[_0x2ab8[6]]);router[_0x2ab8[7]](_0x2ab8[8],auth[_0x2ab8[5]](),controller[_0x2ab8[9]]);router[_0x2ab8[11]](_0x2ab8[4],auth[_0x2ab8[5]](),controller[_0x2ab8[10]]);router[_0x2ab8[13]](_0x2ab8[8],auth[_0x2ab8[5]](),controller[_0x2ab8[12]]);router[_0x2ab8[14]](_0x2ab8[8],auth[_0x2ab8[5]](),controller[_0x2ab8[12]]);router[_0x2ab8[16]](_0x2ab8[8],auth[_0x2ab8[5]](),controller[_0x2ab8[15]]);module[_0x2ab8[17]]= router \ No newline at end of file diff --git a/server/api/integration/index.js b/server/api/integration/index.js index 74118a8..7d93bac 100644 --- a/server/api/integration/index.js +++ b/server/api/integration/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./integration.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([19], ['admin', 'agent']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update); -router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy); - -module.exports = router; +var _0xd596=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd596[0];var express=require(_0xd596[1]);var controller=require(_0xd596[2]);var auth=require(_0xd596[3]);var router=express.Router();router[_0xd596[10]](_0xd596[4],auth[_0xd596[5]](),auth[_0xd596[8]]([19],[_0xd596[6],_0xd596[7]]),controller[_0xd596[9]]);router[_0xd596[10]](_0xd596[11],auth[_0xd596[5]](),auth[_0xd596[12]](_0xd596[6]),controller[_0xd596[13]]);router[_0xd596[15]](_0xd596[4],auth[_0xd596[5]](),auth[_0xd596[12]](_0xd596[6]),controller[_0xd596[14]]);router[_0xd596[17]](_0xd596[11],auth[_0xd596[5]](),auth[_0xd596[12]](_0xd596[6]),controller[_0xd596[16]]);router[_0xd596[19]](_0xd596[11],auth[_0xd596[5]](),auth[_0xd596[12]](_0xd596[6]),controller[_0xd596[18]]);module[_0xd596[20]]= router \ No newline at end of file diff --git a/server/api/integration/integration.controller.js b/server/api/integration/integration.controller.js index d99521f..4987393 100644 --- a/server/api/integration/integration.controller.js +++ b/server/api/integration/integration.controller.js @@ -1,168 +1 @@ -'use strict'; - -var _ = require('lodash'); -var uploadFile = require('upload-file'); -var config = require('../../config/environment'); -var path = require('path'); -var sr = require('simple-random'); -var admZip = require('adm-zip'); -var str2json = require('string-to-json'); -var fs = require('fs'); -var Util = require('../../config/util'); - -var Integration = require('../../models').Integration; - -// Get list of Integration -exports.index = function(req, res, next) { - return Integration - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single integration -exports.show = function(req, res) { - return Integration - .findById(req.params.id) - .then(function(integration) { - if (!integration) { - return res.sendStatus(404); - } - return res.send(integration); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new integration in the DB. -exports.create = function(req, res) { - var upload = new uploadFile({ - dest: path.join(config.root, 'server/files/integrations'), - maxFileSize: 5 * 1000000, - maxNumberOfFiles: 1, - minNumberOfFiles: 1, - acceptFileTypes: /(\.|\/)(zip)$/i, - messages: { - maxNumberOfFiles: "Max number of files upload exceeded", - acceptFileTypes: "Only zip format accepted", - maxFileSize: "The maximum file size is 5 Mb", - invalidRequest: "Invalid request" - } - }); - - upload.on('end', function(fields, files) { - var zip = new admZip(files.file.path); - - var manifest = false; - var zipEntries = zip.getEntries(); - zipEntries.forEach(function(zipEntry) { - if (zipEntry.name === 'manifest.json') { - var str = zipEntry.getData().toString('utf8'); - console.log('uploadZip', str); - try { - manifest = JSON.parse(str); - console.log('uploadZip', manifest); - Integration - .create(_.merge(files.file, manifest)) - .then(function(integration) { - - // Extract All Zip and overwrite old directory - zip.extractAllTo(path.join(config.root, - 'server/files/integrations'), true); - - return res.status(201).send(integration); - }) - .catch(function(err) { - return handleError(res, err); - }); - } catch (e) { - console.log(e); - var err = { - errors: [{ - type: 'json', - message: e - }] - }; - return handleError(res, err); - } - } - }); - - fs.unlinkSync(files.file.path); - - if (!manifest) { - var err = { - errors: [{ - type: 'manifest', - message: 'manifest.json not found' - }] - }; - return handleError(res, err); - } - }); - - upload.on('error', function(e) { - var err = { - errors: [{ - type: 'upload', - message: e - }] - }; - return handleError(res, err); - }); - - upload.parse(req); -}; - -// Updates an existing integration in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return Integration - .findById(req.params.id) - .then(function(integration) { - if (!integration) { - return res.sendStatus(404); - } - var updated = _.merge(integration, req.body); - return updated.save(); - }) - .then(function(integration) { - return res.status(200).send(integration); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a integration from the DB. -exports.destroy = function(req, res) { - return Integration - .find({ - where: { - id: req.params.id - } - }) - .then(function(integration) { - if (!integration) { - return res.sendStatus(404); - } - return integration.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xb6d6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x61\x64\x6D\x2D\x7A\x69\x70","\x73\x74\x72\x69\x6E\x67\x2D\x74\x6F\x2D\x6A\x73\x6F\x6E","\x66\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x6A\x6F\x69\x6E","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x7A\x69\x70\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x67\x65\x74\x45\x6E\x74\x72\x69\x65\x73","\x6E\x61\x6D\x65","\x6D\x61\x6E\x69\x66\x65\x73\x74\x2E\x6A\x73\x6F\x6E","\x75\x74\x66\x38","\x67\x65\x74\x44\x61\x74\x61","\x75\x70\x6C\x6F\x61\x64\x5A\x69\x70","\x6C\x6F\x67","\x70\x61\x72\x73\x65","\x65\x78\x74\x72\x61\x63\x74\x41\x6C\x6C\x54\x6F","\x6D\x65\x72\x67\x65","\x6A\x73\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x75\x6E\x6C\x69\x6E\x6B\x53\x79\x6E\x63","\x6D\x61\x6E\x69\x66\x65\x73\x74","\x6D\x61\x6E\x69\x66\x65\x73\x74\x2E\x6A\x73\x6F\x6E\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x6F\x6E","\x65\x72\x72\x6F\x72","\x75\x70\x6C\x6F\x61\x64","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64"];_0xb6d6[0];var _=require(_0xb6d6[1]);var uploadFile=require(_0xb6d6[2]);var config=require(_0xb6d6[3]);var path=require(_0xb6d6[4]);var sr=require(_0xb6d6[5]);var admZip=require(_0xb6d6[6]);var str2json=require(_0xb6d6[7]);var fs=require(_0xb6d6[8]);var Util=require(_0xb6d6[9]);var Integration=require(_0xb6d6[11])[_0xb6d6[10]];exports[_0xb6d6[12]]= function(_0xe194xb,_0xe194xc,_0xe194xd){return Integration[_0xb6d6[19]](Util[_0xb6d6[18]](_0xe194xb[_0xb6d6[17]]))[_0xb6d6[16]](function(_0xe194xf){_0xe194xc[_0xb6d6[15]](200)[_0xb6d6[14]](_0xe194xf)})[_0xb6d6[13]](function(_0xe194xe){return handleError(_0xe194xc,_0xe194xe)})};exports[_0xb6d6[20]]= function(_0xe194xb,_0xe194xc){return Integration[_0xb6d6[24]](_0xe194xb[_0xb6d6[23]][_0xb6d6[22]])[_0xb6d6[16]](function(_0xe194x10){if(!_0xe194x10){return _0xe194xc[_0xb6d6[21]](404)};return _0xe194xc[_0xb6d6[14]](_0xe194x10)})[_0xb6d6[13]](function(_0xe194xe){return handleError(_0xe194xc,_0xe194xe)})};exports[_0xb6d6[25]]= function(_0xe194xb,_0xe194xc){var _0xe194x11= new uploadFile({dest:path[_0xb6d6[28]](config[_0xb6d6[26]],_0xb6d6[27]),maxFileSize:5* 1000000,maxNumberOfFiles:1,minNumberOfFiles:1,acceptFileTypes:/(\.|\/)(zip)$/i,messages:{maxNumberOfFiles:_0xb6d6[29],acceptFileTypes:_0xb6d6[30],maxFileSize:_0xb6d6[31],invalidRequest:_0xb6d6[32]}});_0xe194x11[_0xb6d6[50]](_0xb6d6[33],function(_0xe194x12,_0xe194x13){var _0xe194x14= new admZip(_0xe194x13[_0xb6d6[34]][_0xb6d6[4]]);var _0xe194x15=false;var _0xe194x16=_0xe194x14[_0xb6d6[35]]();_0xe194x16[_0xb6d6[46]](function(_0xe194x17){if(_0xe194x17[_0xb6d6[36]]=== _0xb6d6[37]){var _0xe194x18=_0xe194x17[_0xb6d6[39]]().toString(_0xb6d6[38]);console[_0xb6d6[41]](_0xb6d6[40],_0xe194x18);try{_0xe194x15= JSON[_0xb6d6[42]](_0xe194x18);console[_0xb6d6[41]](_0xb6d6[40],_0xe194x15);Integration[_0xb6d6[25]](_[_0xb6d6[44]](_0xe194x13[_0xb6d6[34]],_0xe194x15))[_0xb6d6[16]](function(_0xe194x10){_0xe194x14[_0xb6d6[43]](path[_0xb6d6[28]](config[_0xb6d6[26]],_0xb6d6[27]),true);return _0xe194xc[_0xb6d6[15]](201)[_0xb6d6[14]](_0xe194x10)})[_0xb6d6[13]](function(_0xe194xe){return handleError(_0xe194xc,_0xe194xe)})}catch(e){console[_0xb6d6[41]](e);var _0xe194xe={errors:[{type:_0xb6d6[45],message:e}]};return handleError(_0xe194xc,_0xe194xe)}}});fs[_0xb6d6[47]](_0xe194x13[_0xb6d6[34]][_0xb6d6[4]]);if(!_0xe194x15){var _0xe194xe={errors:[{type:_0xb6d6[48],message:_0xb6d6[49]}]};return handleError(_0xe194xc,_0xe194xe)}});_0xe194x11[_0xb6d6[50]](_0xb6d6[51],function(_0xe194x19){var _0xe194xe={errors:[{type:_0xb6d6[52],message:_0xe194x19}]};return handleError(_0xe194xc,_0xe194xe)});_0xe194x11[_0xb6d6[42]](_0xe194xb)};exports[_0xb6d6[53]]= function(_0xe194xb,_0xe194xc){if(_0xe194xb[_0xb6d6[54]][_0xb6d6[22]]){delete _0xe194xb[_0xb6d6[54]][_0xb6d6[22]]};return Integration[_0xb6d6[24]](_0xe194xb[_0xb6d6[23]][_0xb6d6[22]])[_0xb6d6[16]](function(_0xe194x10){if(!_0xe194x10){return _0xe194xc[_0xb6d6[21]](404)};var _0xe194x1a=_[_0xb6d6[44]](_0xe194x10,_0xe194xb[_0xb6d6[54]]);return _0xe194x1a[_0xb6d6[55]]()})[_0xb6d6[16]](function(_0xe194x10){return _0xe194xc[_0xb6d6[15]](200)[_0xb6d6[14]](_0xe194x10)})[_0xb6d6[13]](function(_0xe194xe){return handleError(_0xe194xc,_0xe194xe)})};exports[_0xb6d6[56]]= function(_0xe194xb,_0xe194xc){return Integration[_0xb6d6[57]]({where:{id:_0xe194xb[_0xb6d6[23]][_0xb6d6[22]]}})[_0xb6d6[16]](function(_0xe194x10){if(!_0xe194x10){return _0xe194xc[_0xb6d6[21]](404)};return _0xe194x10[_0xb6d6[56]]()})[_0xb6d6[16]](function(){return _0xe194xc[_0xb6d6[21]](204)})[_0xb6d6[13]](function(_0xe194xe){return handleError(_0xe194xc,_0xe194xe)})};function handleError(_0xe194xc,_0xe194xe){return _0xe194xc[_0xb6d6[15]](500)[_0xb6d6[14]](_0xe194xe)} \ No newline at end of file diff --git a/server/api/integration/integration.events.js b/server/api/integration/integration.events.js index 6c9a2bf..a2ab362 100644 --- a/server/api/integration/integration.events.js +++ b/server/api/integration/integration.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Integration = require('../../models').Integration; - -var IntegrationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -IntegrationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Integration.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - IntegrationEvents.emit(event + ':' + doc._id, doc); - IntegrationEvents.emit(event, doc); - done(null); - } -} - -module.exports = IntegrationEvents; +var _0x66f3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x66f3[0];const EventEmitter=require(_0x66f3[1]);const Integration=require(_0x66f3[3])[_0x66f3[2]];var IntegrationEvents= new EventEmitter();IntegrationEvents[_0x66f3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x66f3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x66f3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x66f3[6]};for(var e in events){var event=events[e];Integration[_0x66f3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5be2x8,_0x5be2x9,_0x5be2xa){IntegrationEvents[_0x66f3[10]](event+ _0x66f3[8]+ _0x5be2x8[_0x66f3[9]],_0x5be2x8);IntegrationEvents[_0x66f3[10]](event,_0x5be2x8);_0x5be2xa(null)}}module[_0x66f3[11]]= IntegrationEvents \ No newline at end of file diff --git a/server/api/integration/integration.socket.js b/server/api/integration/integration.socket.js index 849c2ef..7767983 100644 --- a/server/api/integration/integration.socket.js +++ b/server/api/integration/integration.socket.js @@ -1,28 +1 @@ -'use strict'; - -const IntegrationEvents = require('./integration.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('integration:' + event, socket); - - IntegrationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - IntegrationEvents.removeListener(event, listener); - }; -} +var _0x874e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x874e[0];const IntegrationEvents=require(_0x874e[1]);var events=[_0x874e[2],_0x874e[3]];exports[_0x874e[4]]= function(_0xf182x3){for(var _0xf182x4=0,_0xf182x5=events[_0x874e[5]];_0xf182x4< _0xf182x5;_0xf182x4++){var _0xf182x6=events[_0xf182x4];var _0xf182x7=createListener(_0x874e[6]+ _0xf182x6,_0xf182x3);IntegrationEvents[_0x874e[7]](_0xf182x6,_0xf182x7);_0xf182x3[_0x874e[7]](_0x874e[8],removeListener(_0xf182x6,_0xf182x7))}};function createListener(_0xf182x6,_0xf182x3){return function(_0xf182x9){_0xf182x3[_0x874e[9]](_0xf182x6,_0xf182x9)}}function removeListener(_0xf182x6,_0xf182x7){return function(){IntegrationEvents[_0x874e[10]](_0xf182x6,_0xf182x7)}} \ No newline at end of file diff --git a/server/api/interval/index.js b/server/api/interval/index.js index 2fb3ff5..3535149 100644 --- a/server/api/interval/index.js +++ b/server/api/interval/index.js @@ -1,201 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./interval.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -/** - * @api {get} /api/intervals/ Get intervals' list. - * - * @apiParam (Query) {Number} [offset] Pagination offset. - * @apiParam (Query) {Number} [limit] Pagination limit. - * - * @apiVersion 0.0.140 - * @apiName GetIntervals - * @apiGroup Intervals - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of intervals. - * @apiSuccess {Object[]} rows Get intervals' list. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 1, - * "rows": [{ - * "id": 1 - * "name": "I1", - * "description": "Interval mon-fri", - * "SubIntervals": [{ - * "name": "SI1" - * "interval": "9:00-17:00,mon-fri,*,*" - * }] - * }] - * } - */ -router.get('/', auth.isAuthenticated(), auth.hasModule([13, 7, 8, 9, 10, 11], ['admin']), controller.index); - -/** - * @api {get} /api/intervals/:id Get interval's details. - * @apiParam {Number} id Interval's unique ID. - * @apiVersion 0.0.140 - * @apiName GetInterval - * @apiGroup Intervals - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Object} Get interval's details. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "I1", - * "description": "Interval mon-fri", - * "SubIntervals": [{ - * "name": "SI1" - * "interval": "9:00-17:00,mon-fri,*,*" - * }] - * } - */ -router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show); - -/** - * @api {post} /api/intervals/ Create interval. - * - * @apiParamExample {json} Request-Example: - * { - * "name": "I1", - * "description": "Interval mon-fri", - * "SubIntervals": [{ - * "name": "SI1" - * "interval": "9:00-17:00,mon-fri,*,*" - * }] - * } - * - * @apiParam (Body) {String} name Interval's name. - * @apiParam (Body) {Object[]} [SubIntervals] SubIntervals' array. - * @apiParam (Body) {String} [description] Interval's description. - * - * @apiVersion 0.0.140 - * @apiName CreateInterval - * @apiGroup Intervals - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - * { - * "id": 1 - * "name": "john.doe", - * "email": "john.doe@xcally.com", - * "internal": 1001, - * "fullname": "John Doe", - * ... - * } - */ -router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create); - -/** - * @api {put} /api/intervals/:id Update interval. - * - * @apiParamExample {json} Request-Example: - * { - * "name": "I1", - * "description": "Interval mon-fri", - * "SubIntervals": [{ - * "name": "SI1" - * "interval": "9:00-17:00,mon-fri,*,*" - * }] - * } - * - * @apiParam (Params) {Number} id Interval's unique ID. - * @apiParam (Body) {String} name Interval's name. - * @apiParam (Body) {Object[]} [SubIntervals] SubIntervals' array. - * @apiParam (Body) {String} [description] Interval's description. - * - * @apiVersion 0.0.140 - * @apiName UpdateInterval - * @apiGroup Intervals - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "john.doe", - * "email": "john.doe@xcally.com", - * "internal": 1001, - * "fullname": "John Doe", - * ... - * } - */ -router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update); - -/** - * @api {delete} /api/intervals/ Bulk Delete intervals' details. - * - * @apiParam (Query) {Number[]} ids Intervals' unique ID array. - * - * @apiVersion 0.0.140 - * @apiName BulkDeleteIntervals - * @apiGroup Intervals - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy); - -/** - * @api {delete} /api/intervals/:id Delete interval's details. - * - * @apiParam {Number} id Interval's unique ID. - * - * @apiVersion 0.0.140 - * @apiName DeleteInterval - * @apiGroup Intervals - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy); - -module.exports = router; +var _0x8e71=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x8e71[0];var express=require(_0x8e71[1]);var controller=require(_0x8e71[2]);var auth=require(_0x8e71[3]);var router=express.Router();router[_0x8e71[9]](_0x8e71[4],auth[_0x8e71[5]](),auth[_0x8e71[7]]([13,7,8,9,10,11],[_0x8e71[6]]),controller[_0x8e71[8]]);router[_0x8e71[9]](_0x8e71[10],auth[_0x8e71[5]](),auth[_0x8e71[7]]([13],[_0x8e71[6]]),controller[_0x8e71[11]]);router[_0x8e71[13]](_0x8e71[4],auth[_0x8e71[5]](),auth[_0x8e71[7]]([13],[_0x8e71[6]]),controller[_0x8e71[12]]);router[_0x8e71[15]](_0x8e71[10],auth[_0x8e71[5]](),auth[_0x8e71[7]]([13],[_0x8e71[6]]),controller[_0x8e71[14]]);router[_0x8e71[17]](_0x8e71[4],auth[_0x8e71[5]](),auth[_0x8e71[7]]([13],[_0x8e71[6]]),controller[_0x8e71[16]]);router[_0x8e71[17]](_0x8e71[10],auth[_0x8e71[5]](),auth[_0x8e71[7]]([13],[_0x8e71[6]]),controller[_0x8e71[18]]);module[_0x8e71[19]]= router \ No newline at end of file diff --git a/server/api/interval/interval.controller.js b/server/api/interval/interval.controller.js index 8931ac2..6548fdf 100644 --- a/server/api/interval/interval.controller.js +++ b/server/api/interval/interval.controller.js @@ -1,195 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Interval = require('../../models').Interval; -var VoiceExtension = require('../../models').VoiceExtension; -var sequelize = require('../../models').sequelize; -var Promise = require('bluebird'); - -var Util = require('../../config/util'); - -// Get list of interval -exports.index = function(req, res, next) { - return Interval - .scope('intervals', 'subintervals') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single interval -exports.show = function(req, res) { - return Interval - .scope('subintervals') - .findById(req.params.id) - .then(function(interval) { - if (!interval) { - return res.sendStatus(404); - } - return res.send(interval); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new interval in the DB. -exports.create = function(req, res) { - return Interval - .scope('subintervals') - .create(req.body) - .then(function(interval) { - return res.status(201).send(interval); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Updates an existing interval in the DB. -exports.update = function(req, res) { - var _interval; - return sequelize.transaction(function(t) { - if (req.body.id) { - delete req.body.id; - } - return Interval - .scope('subintervals') - .findById(req.params.id) - .then(function(interval) { - if (!interval) { - return res.sendStatus(404); - } - _interval = _.clone(interval); - return interval - .updateAttributes(req.body, { - transaction: t - }); - }) - .then(function() { - if (req.body.SubIntervals && !req.body.SubIntervals.length) { //if I pass an empty subintervals object it means I want to delete all the sub-intervals - return Interval - .destroy({ - where: { - IntervalId: req.params.id - }, - transaction: t - }); - } else if (req.body.SubIntervals && req.body.SubIntervals.length) { //otherwise i update, add or delete sub-intervals depending on the object content - return bulkCreateSubIntervals(req.body.SubIntervals, _interval, t) - } - }) - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -function bulkCreateSubIntervals(subIntervals, _interval, t) { - return Promise - .all([]) - .then(function() { - var bulkSubInts = []; - var oldSubIntervals = _.map(_interval.SubIntervals, 'dataValues'); - var newInterval; - _.forEach(oldSubIntervals, function(element, index) { - newInterval = _.find(subIntervals, { - id: element.id - }); - if (newInterval) { - newInterval.IntervalId = _interval.id; - bulkSubInts.push(Interval.update(_.clone(newInterval), { - where: { - id: element.id - }, - transaction: t, - individualHooks: true - })); - _.remove(subIntervals, { - id: element.id - }); - } else { - bulkSubInts.push(Interval - .destroy({ - where: { - id: element.id - }, - transaction: t - })); - } - }); - _.forEach(subIntervals, function(element) { - element.IntervalId = _interval.id; - bulkSubInts.push(Interval.create(element, { - transaction: t - })); - }); - return bulkSubInts; - }) - .all(); -} - -// Deletes a interval from the DB. -exports.destroy = function(req, res) { - return sequelize.transaction(function(t) { - return Interval - .destroy({ - where: { - id: req.params.id - }, - individualHooks: true, - transaction: t - }); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(sequelize.ForeignKeyConstraintError, function(err) { - err.message = 'The Interval is associated with one or more routes, delete them first'; - err.translatedMessage = 'MESSAGE_INTERVAL_ROUTE_ASSOCIATED' - return handleError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes multiple intervals from the DB. -exports.bulkDestroy = function(req, res) { - return sequelize.transaction(function(t) { - return Interval - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true, - transaction: t - }); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(sequelize.ForeignKeyConstraintError, function(err) { - err.message = 'The Interval is associated with one or more routes, delete them first'; - err.translatedMessage = 'MESSAGE_INTERVAL_ROUTE_ASSOCIATED' - return handleError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xa26c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x75\x62\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6C\x6F\x67","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x74\x72\x6F\x79","\x63\x6C\x6F\x6E\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x61\x6C\x6C","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70","\x66\x69\x6E\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x70\x75\x73\x68","\x72\x65\x6D\x6F\x76\x65","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x6F\x6E\x65\x20\x6F\x72\x20\x6D\x6F\x72\x65\x20\x72\x6F\x75\x74\x65\x73\x2C\x20\x64\x65\x6C\x65\x74\x65\x20\x74\x68\x65\x6D\x20\x66\x69\x72\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x49\x4E\x54\x45\x52\x56\x41\x4C\x5F\x52\x4F\x55\x54\x45\x5F\x41\x53\x53\x4F\x43\x49\x41\x54\x45\x44","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xa26c[0];var _=require(_0xa26c[1]);var Interval=require(_0xa26c[3])[_0xa26c[2]];var VoiceExtension=require(_0xa26c[3])[_0xa26c[4]];var sequelize=require(_0xa26c[3])[_0xa26c[5]];var Promise=require(_0xa26c[6]);var Util=require(_0xa26c[7]);exports[_0xa26c[8]]= function(_0x2672x7,_0x2672x8,_0x2672x9){return Interval[_0xa26c[19]](_0xa26c[17],_0xa26c[18])[_0xa26c[16]](_[_0xa26c[15]](Util[_0xa26c[14]](_0x2672x7[_0xa26c[13]]),{distinct:true}))[_0xa26c[12]](function(_0x2672xb){_0x2672x8[_0xa26c[11]](200)[_0xa26c[10]](_0x2672xb)})[_0xa26c[9]](function(_0x2672xa){return handleError(_0x2672x8,_0x2672xa)})};exports[_0xa26c[20]]= function(_0x2672x7,_0x2672x8){return Interval[_0xa26c[19]](_0xa26c[18])[_0xa26c[24]](_0x2672x7[_0xa26c[23]][_0xa26c[22]])[_0xa26c[12]](function(_0x2672xc){if(!_0x2672xc){return _0x2672x8[_0xa26c[21]](404)};return _0x2672x8[_0xa26c[10]](_0x2672xc)})[_0xa26c[9]](function(_0x2672xa){return handleError(_0x2672x8,_0x2672xa)})};exports[_0xa26c[25]]= function(_0x2672x7,_0x2672x8){return Interval[_0xa26c[19]](_0xa26c[18])[_0xa26c[25]](_0x2672x7[_0xa26c[27]])[_0xa26c[12]](function(_0x2672xc){return _0x2672x8[_0xa26c[11]](201)[_0xa26c[10]](_0x2672xc)})[_0xa26c[9]](function(_0x2672xa){console[_0xa26c[26]](_0x2672xa);return handleError(_0x2672x8,_0x2672xa)})};exports[_0xa26c[28]]= function(_0x2672x7,_0x2672x8){var _0x2672xd;return sequelize[_0xa26c[34]](function(_0x2672xe){if(_0x2672x7[_0xa26c[27]][_0xa26c[22]]){delete _0x2672x7[_0xa26c[27]][_0xa26c[22]]};return Interval[_0xa26c[19]](_0xa26c[18])[_0xa26c[24]](_0x2672x7[_0xa26c[23]][_0xa26c[22]])[_0xa26c[12]](function(_0x2672xc){if(!_0x2672xc){return _0x2672x8[_0xa26c[21]](404)};_0x2672xd= _[_0xa26c[32]](_0x2672xc);return _0x2672xc[_0xa26c[33]](_0x2672x7[_0xa26c[27]],{transaction:_0x2672xe})})[_0xa26c[12]](function(){if(_0x2672x7[_0xa26c[27]][_0xa26c[29]]&& !_0x2672x7[_0xa26c[27]][_0xa26c[29]][_0xa26c[30]]){return Interval[_0xa26c[31]]({where:{IntervalId:_0x2672x7[_0xa26c[23]][_0xa26c[22]]},transaction:_0x2672xe})}else {if(_0x2672x7[_0xa26c[27]][_0xa26c[29]]&& _0x2672x7[_0xa26c[27]][_0xa26c[29]][_0xa26c[30]]){return bulkCreateSubIntervals(_0x2672x7[_0xa26c[27]].SubIntervals,_0x2672xd,_0x2672xe)}}})})[_0xa26c[12]](function(){return _0x2672x8[_0xa26c[21]](200)})[_0xa26c[9]](function(_0x2672xa){console[_0xa26c[26]](_0x2672xa);return handleError(_0x2672x8,_0x2672xa)})};function bulkCreateSubIntervals(_0x2672x10,_0x2672xd,_0x2672xe){return Promise[_0xa26c[35]]([])[_0xa26c[12]](function(){var _0x2672x11=[];var _0x2672x12=_[_0xa26c[37]](_0x2672xd.SubIntervals,_0xa26c[36]);var _0x2672x13;_[_0xa26c[42]](_0x2672x12,function(_0x2672x14,_0x2672x15){_0x2672x13= _[_0xa26c[38]](_0x2672x10,{id:_0x2672x14[_0xa26c[22]]});if(_0x2672x13){_0x2672x13[_0xa26c[39]]= _0x2672xd[_0xa26c[22]];_0x2672x11[_0xa26c[40]](Interval[_0xa26c[28]](_[_0xa26c[32]](_0x2672x13),{where:{id:_0x2672x14[_0xa26c[22]]},transaction:_0x2672xe,individualHooks:true}));_[_0xa26c[41]](_0x2672x10,{id:_0x2672x14[_0xa26c[22]]})}else {_0x2672x11[_0xa26c[40]](Interval[_0xa26c[31]]({where:{id:_0x2672x14[_0xa26c[22]]},transaction:_0x2672xe}))}});_[_0xa26c[42]](_0x2672x10,function(_0x2672x14){_0x2672x14[_0xa26c[39]]= _0x2672xd[_0xa26c[22]];_0x2672x11[_0xa26c[40]](Interval[_0xa26c[25]](_0x2672x14,{transaction:_0x2672xe}))});return _0x2672x11})[_0xa26c[35]]()}exports[_0xa26c[31]]= function(_0x2672x7,_0x2672x8){return sequelize[_0xa26c[34]](function(_0x2672xe){return Interval[_0xa26c[31]]({where:{id:_0x2672x7[_0xa26c[23]][_0xa26c[22]]},individualHooks:true,transaction:_0x2672xe})})[_0xa26c[12]](function(){return _0x2672x8[_0xa26c[21]](204)})[_0xa26c[9]](sequelize.ForeignKeyConstraintError,function(_0x2672xa){_0x2672xa[_0xa26c[43]]= _0xa26c[44];_0x2672xa[_0xa26c[45]]= _0xa26c[46];return handleError(_0x2672x8,_0x2672xa)})[_0xa26c[9]](function(_0x2672xa){return handleError(_0x2672x8,_0x2672xa)})};exports[_0xa26c[47]]= function(_0x2672x7,_0x2672x8){return sequelize[_0xa26c[34]](function(_0x2672xe){return Interval[_0xa26c[31]]({where:{id:_0x2672x7[_0xa26c[13]][_0xa26c[48]]},individualHooks:true,transaction:_0x2672xe})})[_0xa26c[12]](function(){return _0x2672x8[_0xa26c[21]](204)})[_0xa26c[9]](sequelize.ForeignKeyConstraintError,function(_0x2672xa){_0x2672xa[_0xa26c[43]]= _0xa26c[44];_0x2672xa[_0xa26c[45]]= _0xa26c[46];return handleError(_0x2672x8,_0x2672xa)})[_0xa26c[9]](function(_0x2672xa){return handleError(_0x2672x8,_0x2672xa)})};function handleError(_0x2672x8,_0x2672xa){return _0x2672x8[_0xa26c[11]](500)[_0xa26c[10]](_0x2672xa)} \ No newline at end of file diff --git a/server/api/interval/interval.events.js b/server/api/interval/interval.events.js index cd38713..62beb1f 100644 --- a/server/api/interval/interval.events.js +++ b/server/api/interval/interval.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Interval = require('../../models').Interval; - -var IntervalEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -IntervalEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Interval.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - IntervalEvents.emit(event + ':' + doc._id, doc); - IntervalEvents.emit(event, doc); - done(null); - } -} - -module.exports = IntervalEvents; +var _0x5f42=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5f42[0];const EventEmitter=require(_0x5f42[1]);const Interval=require(_0x5f42[3])[_0x5f42[2]];var IntervalEvents= new EventEmitter();IntervalEvents[_0x5f42[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5f42[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5f42[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5f42[6]};for(var e in events){var event=events[e];Interval[_0x5f42[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6582x8,_0x6582x9,_0x6582xa){IntervalEvents[_0x5f42[10]](event+ _0x5f42[8]+ _0x6582x8[_0x5f42[9]],_0x6582x8);IntervalEvents[_0x5f42[10]](event,_0x6582x8);_0x6582xa(null)}}module[_0x5f42[11]]= IntervalEvents \ No newline at end of file diff --git a/server/api/interval/interval.socket.js b/server/api/interval/interval.socket.js index 8d62dce..57d9d46 100644 --- a/server/api/interval/interval.socket.js +++ b/server/api/interval/interval.socket.js @@ -1,28 +1 @@ -'use strict'; - -const IntervalEvents = require('./interval.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('interval:' + event, socket); - - IntervalEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - IntervalEvents.removeListener(event, listener); - }; -} +var _0x6951=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x74\x65\x72\x76\x61\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x6951[0];const IntervalEvents=require(_0x6951[1]);var events=[_0x6951[2],_0x6951[3]];exports[_0x6951[4]]= function(_0x197ax3){for(var _0x197ax4=0,_0x197ax5=events[_0x6951[5]];_0x197ax4< _0x197ax5;_0x197ax4++){var _0x197ax6=events[_0x197ax4];var _0x197ax7=createListener(_0x6951[6]+ _0x197ax6,_0x197ax3);IntervalEvents[_0x6951[7]](_0x197ax6,_0x197ax7);_0x197ax3[_0x6951[7]](_0x6951[8],removeListener(_0x197ax6,_0x197ax7))}};function createListener(_0x197ax6,_0x197ax3){return function(_0x197ax9){_0x197ax3[_0x6951[9]](_0x197ax6,_0x197ax9)}}function removeListener(_0x197ax6,_0x197ax7){return function(){IntervalEvents[_0x6951[10]](_0x197ax6,_0x197ax7)}} \ No newline at end of file diff --git a/server/api/jscripty_project/index.js b/server/api/jscripty_project/index.js index dba0e5b..02ce9de 100644 --- a/server/api/jscripty_project/index.js +++ b/server/api/jscripty_project/index.js @@ -1,33 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./jscripty_project.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - - -router.get('/', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin', 'agent']), controller.index); -router.get('/:id', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.show); -router.get('/:id/download', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin', 'agent']), controller.download); -router.get('/:id/sessions', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showSessions); -router.get('/:id/sessions/:sessionId', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showSession); -router.get('/:id/questions/:questionId/detail', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showQuestionDetail); -router.get('/:id/questions', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showQuestions); -router.get('/:id/questions/summary', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showSummary); -router.get('/:id/inputs', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showInputs); -// router.get('/:id/questions/:questionId/otherOption', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showOther); -router.get('/:id/questions/detail', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.showDetail); -router.post('/', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.create); -router.post('/:id/sessions', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin', 'agent']), controller.createSession); -router.post('/:id/sessions/:sessionId/questions', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin', 'agent']), controller.createQuestions); -router.put('/:id', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.update); -router.put('/:id/sessions/:sessionId', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin', 'agent']), controller.updateSession); -router.delete('/:id/sessions/:sessionId', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.destroySession); -router.delete('/', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.bulkDestroy); -router.delete('/:id', license.isValidDate(), license.hasJscripty(), auth.isAuthenticated(), auth.hasModule([15], ['admin']), controller.destroy); - - - -module.exports = router; +var _0x9095=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4A\x73\x63\x72\x69\x70\x74\x79","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73\x2F\x3A\x73\x65\x73\x73\x69\x6F\x6E\x49\x64","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x2F\x3A\x71\x75\x65\x73\x74\x69\x6F\x6E\x49\x64\x2F\x64\x65\x74\x61\x69\x6C","\x73\x68\x6F\x77\x51\x75\x65\x73\x74\x69\x6F\x6E\x44\x65\x74\x61\x69\x6C","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x2F\x73\x75\x6D\x6D\x61\x72\x79","\x73\x68\x6F\x77\x53\x75\x6D\x6D\x61\x72\x79","\x2F\x3A\x69\x64\x2F\x69\x6E\x70\x75\x74\x73","\x73\x68\x6F\x77\x49\x6E\x70\x75\x74\x73","\x2F\x3A\x69\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73\x2F\x64\x65\x74\x61\x69\x6C","\x73\x68\x6F\x77\x44\x65\x74\x61\x69\x6C","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73\x2F\x3A\x73\x65\x73\x73\x69\x6F\x6E\x49\x64\x2F\x71\x75\x65\x73\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x53\x65\x73\x73\x69\x6F\x6E","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x9095[0];var express=require(_0x9095[1]);var auth=require(_0x9095[2]);var controller=require(_0x9095[3]);var license=require(_0x9095[4]);var router=express.Router();router[_0x9095[13]](_0x9095[5],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9],_0x9095[10]]),controller[_0x9095[12]]);router[_0x9095[13]](_0x9095[14],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[15]]);router[_0x9095[13]](_0x9095[16],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9],_0x9095[10]]),controller[_0x9095[17]]);router[_0x9095[13]](_0x9095[18],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[19]]);router[_0x9095[13]](_0x9095[20],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[21]]);router[_0x9095[13]](_0x9095[22],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[23]]);router[_0x9095[13]](_0x9095[24],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[25]]);router[_0x9095[13]](_0x9095[26],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[27]]);router[_0x9095[13]](_0x9095[28],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[29]]);router[_0x9095[13]](_0x9095[30],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[31]]);router[_0x9095[33]](_0x9095[5],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[32]]);router[_0x9095[33]](_0x9095[18],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9],_0x9095[10]]),controller[_0x9095[34]]);router[_0x9095[33]](_0x9095[35],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9],_0x9095[10]]),controller[_0x9095[36]]);router[_0x9095[38]](_0x9095[14],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[37]]);router[_0x9095[38]](_0x9095[20],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9],_0x9095[10]]),controller[_0x9095[39]]);router[_0x9095[41]](_0x9095[20],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[40]]);router[_0x9095[41]](_0x9095[5],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[42]]);router[_0x9095[41]](_0x9095[14],license[_0x9095[6]](),license[_0x9095[7]](),auth[_0x9095[8]](),auth[_0x9095[11]]([15],[_0x9095[9]]),controller[_0x9095[43]]);module[_0x9095[44]]= router \ No newline at end of file diff --git a/server/api/jscripty_project/jscripty_project.controller.js b/server/api/jscripty_project/jscripty_project.controller.js index 662f2f9..ad86190 100644 --- a/server/api/jscripty_project/jscripty_project.controller.js +++ b/server/api/jscripty_project/jscripty_project.controller.js @@ -1,1026 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/jscripty/projects -> index - * POST /api/jscripty/projects -> create - * GET /api/jscripty/projects/:id -> show - * PUT /api/jscripty/projects/:id -> update - * DELETE /api/jscripty/projects/:id -> destroy - */ - -'use strict'; -var xml = require('xml2js'); - -var _ = require('lodash'); - -var JscriptyProject = require('../../models').JscriptyProject; -var Util = require('../../config/util'); -var sequelize = require('../../models').sequelize; -var ReportJscriptySession = require('../../models').ReportJscriptySession; -var ReportJscriptyQuestion = require('../../models').ReportJscriptyQuestion; -var ReportJscriptyInput = require('../../models').ReportJscriptyInput; -var Promise = require('bluebird'); - -function handleError(res, err) { - return res.status(500).send(err); -} - - - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of JscriptyProjects - -exports.index = function(req, res, next) { - return JscriptyProject - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.show = function(req, res) { - return JscriptyProject - .findById(req.params.id) - .then(function(jscripty_project) { - if (!jscripty_project) { - return res.sendStatus(404); - } - return res.send(jscripty_project); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Gets a all ReportJscriptySession from the DB -exports.showSessions = function(req, res) { - return ReportJscriptySession - .scope({ - method: ['sessions', req.params.id] - }) - .findAndCountAll(Util.getQuery(req.query)) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } - // Gets a one ReportJscriptySession from the DB -exports.showSession = function(req, res) { - return ReportJscriptySession - .find({ - where: { - projectId: req.params.id, - session_id: req.params.sessionId - }, - include: [{ - model: ReportJscriptyQuestion, - include: [{ - model: ReportJscriptyInput - }] - }] - - }) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } - // exports.showOther = function(req, res) { - // return ReportJscriptyQuestion - // .scope({ - // method: ['otherOption', req.params.id, req.params.questionId] - // }) - // .findAndCountAll(Util.getQuery(req.query)) - // .then(handleEntityNotFound(res)) - // .then(responseWithResult(res)) - // .catch(function(err) { - // console.log(err); - // return handleError(res, err); - // }); - // } -exports.showInputs = function(req, res) { - var inputs = { - count: 0, - rows: [] - }; - return ReportJscriptySession - .scope({ - method: ['inputs', req.params.id] - }) - .findAndCountAll(Util.getQuery(req.query)) - .then(function(response) { - _.forEach(response.rows, function(session) { - var session_id = session.session_id; - _.forEach(session.ReportJscriptyQuestions, function(question) { - var question_id = question.question_id; - var question_type = question.question_type; - var question_label = question.question_label; - var question_text = question.question_text; - _.forEach(question.ReportJscriptyInputs, function(input) { - inputs.rows.push({ - session_id: session_id, - question_type: question_type, - question_id: question_id, - question_label: question_label, - question_text: question_text, - input_label: input.input_label, - input_value: input.input_value - }) - }) - }) - }) - inputs.count = inputs.rows.length; - return inputs; - }) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -} - -// Gets a all ReportJscriptyQuestion from the DB -exports.showQuestions = function(req, res) { - return ReportJscriptyQuestion - .findAll({ - where: { - projectId: req.params.id - }, - include: [{ - model: ReportJscriptyInput - }], - - }) - .then(function(jscripty_questions) { - if (!jscripty_questions) { - return res.sendStatus(404); - } - return res.status(200).send(jscripty_questions); - }) - .then(handleEntityNotFound(res)) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -} - - -// Gets summary of ReportJscriptyQuestion from the DB - -exports.showSummary = function(req, res) { - return ReportJscriptyQuestion - .scope({ - method: ['summary', req.params.id] - }) - .findAndCountAll(Util.getQuery(req.query)) - .then(handleEntityNotFound(res)) - .then(function(jscripty_summary) { - return res.status(200).send(jscripty_summary); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - -} - -exports.showQuestionDetail = function(req, res) { - var temp = {}; - var jscripty_questions; - var total = 0; - return ReportJscriptyQuestion - .find({ - where: { - projectId: req.params.id, - question_id: req.params.questionId - }, - attributes: ['question_type'] - }) - .then(function(jscripty_question) { - if (!jscripty_question) { - return res.sendStatus(404); - } - // jscripty_questions = jscripty_question; - if (jscripty_question.dataValues.question_type == 'input') { - return ReportJscriptyQuestion - .findAll({ - where: { - projectId: req.params.id, - question_id: req.params.questionId - }, - attributes: ['question_type', 'question_id', 'question_label', 'question_text'], - include: [{ - model: ReportJscriptyInput, - where: { - $or: [{ - input_type: 'checkbox', - input_value: '1' - }, { - input_type: { - $ne: 'checkbox' - }, - input_value: { - $ne: null - } - }] - }, - attributes: ['input_label', 'input_value', 'input_type', [sequelize.fn('count', sequelize.col('input_label')), - 'count' - ]] - }], - group: ['question_id', 'input_label'] - - }) - .then(function(jscripty_question) { - jscripty_questions = jscripty_question; - return ReportJscriptyQuestion - .findAll({ - where: { - projectId: req.params.id, - question_id: req.params.questionId, - question_type: 'input' - }, - attributes: ['question_id', [sequelize.fn('count', sequelize.col('question_id')), - 'count' - ]], - group: ['question_id'] - }) - }) - - .then(function(question_count) { - total = question_count[0].dataValues.count; - - if (jscripty_questions) { - var grouped = _.groupBy(jscripty_questions, 'question_id'); - _.forEach(grouped, function(value, id) { - var answers_count = []; - var graphData = []; - var graphLabels = []; - var graphType = 'bar'; - _.forEach(value, function(element) { - if (element.ReportJscriptyInputs) { - _.forEach(element.ReportJscriptyInputs, function(input) { - answers_count.push({ - checkbox: true, - value: input.input_label, - count: input.dataValues.count - }) - - }) - } - }); - var tempGraphdata = []; - for (var i = 0; i < answers_count.length; i++) { - tempGraphdata[i] = answers_count[i].count; - graphLabels[i] = answers_count[i].value; - answers_count[i].percentage = total ? (answers_count[i].count / total) * 100 : 0; - } - graphData[0] = tempGraphdata; - temp = { - total: total, - question_type: _.last(value).question_type, - question_id: _.last(value).question_id, - question_label: _.last(value).question_label, - question_text: _.last(value).question_text, - choices: answers_count, - graphData: graphData, - graphLabels: graphLabels, - graphType: graphType - }; - }); - } - - return ReportJscriptyQuestion - .findAll({ - where: { - projectId: req.params.id, - question_id: req.params.questionId, - question_type: 'input' - }, - attributes: ['question_type', 'question_id', 'question_label', 'question_text'], - include: [{ - model: ReportJscriptyInput, - attributes: ['input_label'] - }] - }) - - }) - .then(function(inputs) { - var input_labels = []; - if (inputs) { - var grouped = _.groupBy(inputs, 'question_id'); - _.forEach(grouped, function(question, id) { - var allLabels = []; - _.forEach(question, function(item) { - allLabels = _.union(allLabels, _.map(item.ReportJscriptyInputs, 'input_label')); - }); - input_labels.push({ - question_id: _.last(question).question_id, - labels: allLabels - }); - }) - _.forEach(input_labels, function(element) { - if (Object.keys(temp).length) { - _.forEach(element.labels, function(label) { - var input_label = _.find(temp.choices, { - value: label - }); - if (!input_label) { - temp.choices.push({ - value: label, - count: 0, - percentage: 0 - }) - temp.graphData[0].push(0); - temp.graphLabels.push(label); - } - }); - } else { - var answers_count = []; - var graphData = []; - var tempGraphdata = []; - var graphLabels = []; - _.forEach(element.labels, function(label) { - answers_count.push({ - value: label, - count: 0, - percentage: 0 - }) - tempGraphdata.push(0); - graphLabels.push(label); - - }); - graphData.push(tempGraphdata); - var input = inputs[0]; - temp = { - total: total, - question_type: input.question_type, - question_id: input.question_id, - question_label: input.question_label, - question_text: input.question_text, - choices: answers_count, - graphType: 'bar', - graphData: graphData, - graphLabels: graphLabels - - }; - } - }) - } - return res.status(201).send(temp); - - }) - - } else if (jscripty_question.dataValues.question_type == 'question') { - - return ReportJscriptyQuestion - .findAll({ - where: { - projectId: req.params.id, - question_id: req.params.questionId - }, - attributes: ['question_type', 'question_id', 'question_label', 'question_text', 'question_options', 'question_answer', [sequelize.fn('count', sequelize.col('question_answer')), - 'count' - ]], - group: ['question_id', 'question_answer'] - - }) - .then(function(jscripty_question) { - - jscripty_questions = jscripty_question; - return ReportJscriptyQuestion - .findAll({ - where: { - projectId: req.params.id, - question_id: req.params.questionId, - question_type: 'question', - question_other_answer: { - $ne: null - } - }, - attributes: ['question_type', 'question_id', 'question_label', 'question_options', 'question_text', 'question_other_answer', 'question_other_label', [sequelize.fn('count', - sequelize.col( - 'question_other_label')), - 'count' - ]], - group: ['question_id', 'question_other_label'] - - }) - }) - .then(function(response) { - if (response) { - _.forEach(response, function(element) { - jscripty_questions.push(element); - }) - } - - var grouped = _.groupBy(jscripty_questions, 'question_id'); - _.forEach(grouped, function(value, id) { - var answers_count = []; - var total = 0; - var graphData = []; - var graphLabels = []; - var graphType = 'pie'; - _.forEach(value, function(element) { - - if (element.question_answer) { - answers_count.push({ - value: element.question_answer, - count: element.dataValues.count - }) - total = total + element.dataValues.count; - - } - if (element.question_other_answer) { - answers_count.push({ - other_option: true, - value: element.question_other_label, - count: element.dataValues.count - }) - } - - }); - var question_options = _.last(value).question_options ? JSON.parse(_.last(value).question_options) : null; - if (question_options) { - _.forEach(question_options.options, function(option) { - var edge_label = _.find(answers_count, { - value: option - }); - - if (!edge_label) { - answers_count.push({ - value: option, - count: 0, - percentage: 0 - }); - - } - }); - } - var tempGraphdata = []; - var input_type = false - for (var i = 0; i < answers_count.length; i++) { - if (!answers_count[i].other_option) { - graphData[i] = answers_count[i].count; - graphLabels[i] = answers_count[i].value; - answers_count[i].percentage = total ? (answers_count[i].count / total) * 100 : 0; - } - } - - temp = { - total: total, - question_type: _.last(value).question_type, - question_id: _.last(value).question_id, - question_label: _.last(value).question_label, - question_text: _.last(value).question_text, - choices: answers_count, - graphData: graphData, - graphLabels: graphLabels, - graphType: graphType - }; - }); - return res.status(201).send(temp); - }) - } else { - console.log('question type not recognized'); - return res.sendStatus(404); - } - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -} - -// Gets detail of ReportJscriptyQuestion from the DB -exports.showDetail = function(req, res) { - var temp_questions; - var jscripty_questions; - var temp_inputs; - var question_count; - - return ReportJscriptyQuestion - .findAll({ - - where: { - projectId: req.params.id, - question_type: 'question' - }, - attributes: ['question_type', 'question_id', 'question_label', 'question_text', 'question_answer', 'question_options', 'question_other_label', [sequelize.fn('count', sequelize.col( - 'question_answer')), - 'count' - ]], - group: ['question_id', 'question_answer'] - - }) - .then(function(response) { - jscripty_questions = response; - return ReportJscriptyQuestion - .findAll({ - where: { - projectId: req.params.id, - question_type: 'question', - question_other_answer: { - $ne: null - } - }, - attributes: ['question_type', 'question_id', 'question_label', 'question_text', 'question_other_answer', 'question_other_label', 'question_options', [sequelize.fn('count', sequelize.col( - 'question_other_answer')), - 'count' - ]], - group: ['question_id', 'question_other_answer'] - - // attributes: ['question_type', 'question_id', 'question_label', 'question_text', 'question_other_answer', 'question_other_label', 'question_options', [sequelize.fn('count', sequelize.col( - // 'question_other_label')), - // 'count' - // ]], - // group: ['question_id', 'question_other_label'] - - }) - }) - .then(function(response) { - _.forEach(response, function(element) { - jscripty_questions.push(element); - }) - var temp = []; - var graphType = 'pie'; - - var grouped = _.groupBy(jscripty_questions, 'question_id'); - _.forEach(grouped, function(value, id) { - var total = 0; - var graphData = []; - var graphLabels = []; - var answers_count = []; - - _.forEach(value, function(element) { - if (element.question_answer) { - answers_count.push({ - value: element.question_answer, - count: element.dataValues.count - }) - total = total + element.dataValues.count; - } - if (element.question_other_answer) { - answers_count.push({ - other_option: true, - value: element.question_other_answer, - count: element.dataValues.count - }) - } - - }); - var question_options = JSON.parse(_.last(value).question_options); - if (question_options) { - _.forEach(question_options.options, function(option) { - var edge_label = _.find(answers_count, { - value: option - }); - if (!edge_label) { - answers_count.push({ - value: option, - count: 0, - percentage: 0 - }); - } - }); - } - for (var i = 0; i < answers_count.length; i++) { - - if (!answers_count[i].other_option && (total != 0)) { - answers_count[i].percentage = (answers_count[i].count / total) * 100; - graphData.push(answers_count[i].count); - graphLabels.push(answers_count[i].value); - } - - } - - temp.push({ - total: total, - question_type: _.last(value).question_type, - question_id: _.last(value).question_id, - question_label: _.last(value).question_label, - question_other_label: _.last(value).question_other_label, - question_text: _.last(value).question_text, - choices: answers_count, - graphData: graphData, - graphLabels: graphLabels, - graphType: graphType - }) - - }); - temp_questions = temp; - return ReportJscriptyQuestion - .findAll({ - where: { - projectId: req.params.id, - question_type: 'input' - }, - attributes: ['id', 'question_type', 'question_id', 'question_label', 'question_text', 'question_answer'], - include: [{ - model: ReportJscriptyInput, - where: { - $or: [{ - input_type: 'checkbox', - input_value: '1' - }, { - input_type: { - $ne: 'checkbox' - }, - input_value: { - $ne: null - } - }] - - }, - attributes: ['input_label', 'input_value', 'input_type', [sequelize.fn('count', sequelize.col('input_label')), - 'count' - ]] - }], - group: ['question_id', 'input_label'] - }) - - }) - .then(function(jscripty_question) { - jscripty_questions = jscripty_question; - return ReportJscriptyQuestion - .findAll({ - where: { - projectId: req.params.id, - question_type: 'input' - }, - attributes: ['question_id', [sequelize.fn('count', sequelize.col('question_id')), - 'count' - ]], - group: ['question_id'] - }) - }) - .then(function(question) { - question_count = question; - var temp = []; - var grouped = _.groupBy(jscripty_questions, 'question_id'); - _.forEach(grouped, function(value, id) { - var answers_count = []; - var total = 0; - total = _.find(question_count, function(question) { - return question.question_id == _.last(value).question_id; - }).dataValues.count; - var graphData = []; - var graphData2 = []; - var graphLabels = []; - var graphType = 'bar'; - _.forEach(value, function(element) { - var elemt = element; - _.forEach(elemt.ReportJscriptyInputs, function(input) { - answers_count.push({ - checkbox: true, - value: input.input_label, - count: input.dataValues.count - }) - }) - }); - var tempGraphdata = []; - for (var i = 0; i < answers_count.length; i++) { - tempGraphdata[i] = answers_count[i].count; - answers_count[i].percentage = (answers_count[i].count / total) * 100; - graphLabels[i] = answers_count[i].value; - } - graphData[0] = tempGraphdata; - temp_questions.push({ - total: total, - question_type: _.last(value).question_type, - question_id: _.last(value).question_id, - question_label: _.last(value).question_label, - question_text: _.last(value).question_text, - choices: answers_count, - graphData: graphData, - graphLabels: graphLabels, - graphType: graphType - }) - }); - return ReportJscriptyQuestion - .findAll({ - where: { - projectId: req.params.id, - question_type: 'input' - }, - attributes: ['id', 'question_id', 'question_label', 'question_text', 'question_type'], - include: [{ - model: ReportJscriptyInput, - attributes: ['input_label'] - }], - }) - }) - .then(function(inputs) { - var grouped = _.groupBy(inputs, 'question_id'); - var labels = []; - _.forEach(grouped, function(question, id) { - var allLabels = []; - _.forEach(question, function(item) { - allLabels = _.union(allLabels, _.map(item.ReportJscriptyInputs, 'input_label')); - }); - labels.push({ - question_text: _.last(question).question_text, - question_type: _.last(question).question_type, - question_label: _.last(question).question_label, - question_id: _.last(question).question_id, - labels: allLabels - }); - }) - - _.forEach(labels, function(element) { - var question = _.find(temp_questions, { - 'question_id': element.question_id - }); - if (question) { - _.forEach(element.labels, function(label) { - var input_label = _.find(question.choices, { - value: label - }); - if (!input_label) { - question.choices.push({ - value: label, - count: 0, - percentage: 0 - }); - question.graphData[0].push(0); - question.graphLabels.push(label); - } - }); - } else { - var answers_count = []; - var graphData = []; - var tempGraphdata = []; - var graphLabels = []; - _.forEach(element.labels, function(label) { - answers_count.push({ - value: label, - count: 0, - percentage: 0 - }) - // tempGraphdata.push(0); - // graphLabels.push(label); - }); - // graphData.push(tempGraphdata); - var total = _.find(question_count, function(question) { - return question.question_id == element.question_id; - }).dataValues.count; - temp_questions.push({ - total: total, - question_type: element.question_type, - question_id: element.question_id, - question_label: element.question_label, - question_text: element.question_text, - choices: answers_count, - graphType: 'bar', - graphData: graphData, - graphLabels: graphLabels - }) - } - }) - return res.status(201).send(temp_questions); - }) - - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - // }) - - } - // Creates a new JscriptyProject in the DB -exports.create = function(req, res) { - return JscriptyProject - .create(req.body) - .then(function(jscripty_project) { - return res.status(201).send(jscripty_project); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - if (err.fields.name) { - err.message = 'Project name already exists'; - err.translatedMessage = 'MESSAGE_EXIST_PROJECT' - } - return handleError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new ReportJscriptySession in the DB -exports.createSession = function(req, res) { - return ReportJscriptySession - .create(req.body) - .then(function(jscripty_session) { - return res.status(201).send(jscripty_session); - }) - .catch(function(err) { - return handleError(res, err); - }); - - } - // Creates a new ReportJscriptyQuestions in the DB -exports.createQuestions = function(req, res) { - return ReportJscriptyQuestion - .destroy({ - where: { - sessionId: req.params.sessionId - } - }) - .then(function() { - var _promises = []; - for (var i = 0; i < req.body.length; i++) { - _promises[i] = ReportJscriptyQuestion.create(req.body[i], { - include: [{ - model: ReportJscriptyInput - }] - }) - } - return Promise - .all(_promises); - }) - .then(function(jscripty_question) { - return res.sendStatus(201); - }) - .catch(function(err) { - return handleError(res, err); - }); - } - // Updates an existing JscriptyProject in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return JscriptyProject - .findById(req.params.id) - .then(function(jscripty_project) { - if (!jscripty_project) { - return res.sendStatus(404); - } - var updated = _.merge(jscripty_project, req.body); - return updated.save(); - }) - .then(function(jscripty_project) { - return res.status(200).send(jscripty_project); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Updates an existing ReportJscriptySession in the DB -exports.updateSession = function(req, res) { - return ReportJscriptySession - .findById(req.params.sessionId) - .then(function(session) { - if (!session) { - return res.sendStatus(404); - } - var updated = _.merge(session, req.body); - return updated.save(); - }) - .then(function(jscripty_session) { - return res.status(200).send(jscripty_session); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Deletes a JscriptyProject from the DB -exports.destroy = function(req, res) { - return JscriptyProject - .findById(req.params.id) - .then(function(jscripty_project) { - if (!jscripty_project) { - return res.sendStatus(404); - } - return jscripty_project.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -exports.destroySession = function(req, res) { - return ReportJscriptySession - .find({ - where: { - session_id: req.params.sessionId - } - }) - .then(function(session) { - if (!session) { - return res.sendStatus(404); - } - return session.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a jscripty_project from the DB. -exports.bulkDestroy = function(req, res) { - return JscriptyProject - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -exports.download = function(req, res, next) { - return JscriptyProject - .findById(req.params.id) - .then(function(jscripty_project) { - if (!jscripty_project) { - return res.sendStatus(404); - } - // console.log(req.query.filename); - res.set({ - "Content-Disposition": "attachment; filename=\"" + req.query.filename + - ".xml\"", - "Content-Type": "txt/xml" - }); - return res.send(jscripty_project.production); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// exports.projectJson = function(req, res, next) { -// JscriptyProject -// .findById(req.params.id) -// .then(function(jscripty_project) { -// if (!jscripty_project) { -// return res.sendStatus(404); -// } -// -// xml.parseString(jscripty_project.production, { -// normalizeTags: true, -// explicitArray: false -// }, function(err, result) { -// console.log(result); -// return res.status(200).send(result); -// -// }); -// }) -// .catch(function(err) { -// return handleError(res, err); -// }); -// }; +var _0x1d9f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x78\x6D\x6C\x32\x6A\x73","\x6C\x6F\x64\x61\x73\x68","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x51\x75\x65\x73\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x49\x6E\x70\x75\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E\x73","\x6C\x6F\x67","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77\x53\x65\x73\x73\x69\x6F\x6E","\x73\x65\x73\x73\x69\x6F\x6E\x49\x64","\x66\x69\x6E\x64","\x73\x68\x6F\x77\x49\x6E\x70\x75\x74\x73","\x72\x6F\x77\x73","\x73\x65\x73\x73\x69\x6F\x6E\x5F\x69\x64","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x69\x64","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x74\x79\x70\x65","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x6C\x61\x62\x65\x6C","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x74\x65\x78\x74","\x69\x6E\x70\x75\x74\x5F\x6C\x61\x62\x65\x6C","\x69\x6E\x70\x75\x74\x5F\x76\x61\x6C\x75\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x63\x6F\x75\x6E\x74","\x6C\x65\x6E\x67\x74\x68","\x69\x6E\x70\x75\x74\x73","\x73\x68\x6F\x77\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77\x53\x75\x6D\x6D\x61\x72\x79","\x73\x75\x6D\x6D\x61\x72\x79","\x73\x68\x6F\x77\x51\x75\x65\x73\x74\x69\x6F\x6E\x44\x65\x74\x61\x69\x6C","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x69\x6E\x70\x75\x74","\x67\x72\x6F\x75\x70\x42\x79","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x6C\x61\x73\x74","\x6B\x65\x79\x73","\x6C\x61\x62\x65\x6C\x73","\x63\x68\x6F\x69\x63\x65\x73","\x67\x72\x61\x70\x68\x44\x61\x74\x61","\x67\x72\x61\x70\x68\x4C\x61\x62\x65\x6C\x73","\x62\x61\x72","\x52\x65\x70\x6F\x72\x74\x4A\x73\x63\x72\x69\x70\x74\x79\x49\x6E\x70\x75\x74\x73","\x76\x61\x6C\x75\x65","\x70\x65\x72\x63\x65\x6E\x74\x61\x67\x65","\x71\x75\x65\x73\x74\x69\x6F\x6E\x49\x64","\x63\x6F\x6C","\x66\x6E","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x31","\x69\x6E\x70\x75\x74\x5F\x74\x79\x70\x65","\x71\x75\x65\x73\x74\x69\x6F\x6E","\x70\x69\x65","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x61\x6E\x73\x77\x65\x72","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x6F\x74\x68\x65\x72\x5F\x61\x6E\x73\x77\x65\x72","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x6F\x74\x68\x65\x72\x5F\x6C\x61\x62\x65\x6C","\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x6F\x70\x74\x69\x6F\x6E\x73","\x70\x61\x72\x73\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x6F\x74\x68\x65\x72\x5F\x6F\x70\x74\x69\x6F\x6E","\x71\x75\x65\x73\x74\x69\x6F\x6E\x20\x74\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x73\x68\x6F\x77\x44\x65\x74\x61\x69\x6C","\x63\x72\x65\x61\x74\x65","\x6E\x61\x6D\x65","\x66\x69\x65\x6C\x64\x73","\x6D\x65\x73\x73\x61\x67\x65","\x50\x72\x6F\x6A\x65\x63\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x50\x52\x4F\x4A\x45\x43\x54","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x51\x75\x65\x73\x74\x69\x6F\x6E\x73","\x61\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x53\x65\x73\x73\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x53\x65\x73\x73\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D\x22","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x2E\x78\x6D\x6C\x22","\x74\x78\x74\x2F\x78\x6D\x6C","\x73\x65\x74","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E"];_0x1d9f[0];var xml=require(_0x1d9f[1]);var _=require(_0x1d9f[2]);var JscriptyProject=require(_0x1d9f[4])[_0x1d9f[3]];var Util=require(_0x1d9f[5]);var sequelize=require(_0x1d9f[4])[_0x1d9f[6]];var ReportJscriptySession=require(_0x1d9f[4])[_0x1d9f[7]];var ReportJscriptyQuestion=require(_0x1d9f[4])[_0x1d9f[8]];var ReportJscriptyInput=require(_0x1d9f[4])[_0x1d9f[9]];var Promise=require(_0x1d9f[10]);function handleError(_0x4ccaxb,_0x4ccaxc){return _0x4ccaxb[_0x1d9f[12]](500)[_0x1d9f[11]](_0x4ccaxc)}function responseWithResult(_0x4ccaxb,_0x4ccaxe){_0x4ccaxe= _0x4ccaxe|| 200;return function(_0x4ccaxf){if(_0x4ccaxf){_0x4ccaxb[_0x1d9f[12]](_0x4ccaxe)[_0x1d9f[13]](_0x4ccaxf)}}}function handleEntityNotFound(_0x4ccaxb){return function(_0x4ccaxf){if(!_0x4ccaxf){_0x4ccaxb[_0x1d9f[12]](404)[_0x1d9f[14]]();return null};return _0x4ccaxf}}function saveUpdates(_0x4ccax12){return function(_0x4ccaxf){return _0x4ccaxf[_0x1d9f[16]](_0x4ccax12)[_0x1d9f[15]](function(_0x4ccax13){return _0x4ccax13})}}function removeEntity(_0x4ccaxb){return function(_0x4ccaxf){if(_0x4ccaxf){return _0x4ccaxf[_0x1d9f[17]]()[_0x1d9f[15]](function(){_0x4ccaxb[_0x1d9f[12]](204)[_0x1d9f[14]]()})}}}exports[_0x1d9f[18]]= function(_0x4ccax15,_0x4ccaxb,_0x4ccax16){return JscriptyProject[_0x1d9f[22]](Util[_0x1d9f[21]](_0x4ccax15[_0x1d9f[20]]))[_0x1d9f[15]](function(_0x4ccax17){_0x4ccaxb[_0x1d9f[12]](200)[_0x1d9f[11]](_0x4ccax17)})[_0x1d9f[19]](function(_0x4ccaxc){return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[23]]= function(_0x4ccax15,_0x4ccaxb){return JscriptyProject[_0x1d9f[27]](_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]])[_0x1d9f[15]](function(_0x4ccax18){if(!_0x4ccax18){return _0x4ccaxb[_0x1d9f[24]](404)};return _0x4ccaxb[_0x1d9f[11]](_0x4ccax18)})[_0x1d9f[19]](function(_0x4ccaxc){return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[28]]= function(_0x4ccax15,_0x4ccaxb){return ReportJscriptySession[_0x1d9f[31]]({method:[_0x1d9f[30],_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]]]})[_0x1d9f[22]](Util[_0x1d9f[21]](_0x4ccax15[_0x1d9f[20]]))[_0x1d9f[15]](handleEntityNotFound(_0x4ccaxb))[_0x1d9f[15]](responseWithResult(_0x4ccaxb))[_0x1d9f[19]](function(_0x4ccaxc){console[_0x1d9f[29]](_0x4ccaxc);return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[32]]= function(_0x4ccax15,_0x4ccaxb){return ReportJscriptySession[_0x1d9f[34]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],session_id:_0x4ccax15[_0x1d9f[26]][_0x1d9f[33]]},include:[{model:ReportJscriptyQuestion,include:[{model:ReportJscriptyInput}]}]})[_0x1d9f[15]](handleEntityNotFound(_0x4ccaxb))[_0x1d9f[15]](responseWithResult(_0x4ccaxb))[_0x1d9f[19]](function(_0x4ccaxc){console[_0x1d9f[29]](_0x4ccaxc);return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[35]]= function(_0x4ccax15,_0x4ccaxb){var _0x4ccax19={count:0,rows:[]};return ReportJscriptySession[_0x1d9f[31]]({method:[_0x1d9f[48],_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]]]})[_0x1d9f[22]](Util[_0x1d9f[21]](_0x4ccax15[_0x1d9f[20]]))[_0x1d9f[15]](function(_0x4ccax1a){_[_0x1d9f[45]](_0x4ccax1a[_0x1d9f[36]],function(_0x4ccax1b){var _0x4ccax1c=_0x4ccax1b[_0x1d9f[37]];_[_0x1d9f[45]](_0x4ccax1b.ReportJscriptyQuestions,function(_0x4ccax1d){var _0x4ccax1e=_0x4ccax1d[_0x1d9f[38]];var _0x4ccax1f=_0x4ccax1d[_0x1d9f[39]];var _0x4ccax20=_0x4ccax1d[_0x1d9f[40]];var _0x4ccax21=_0x4ccax1d[_0x1d9f[41]];_[_0x1d9f[45]](_0x4ccax1d.ReportJscriptyInputs,function(_0x4ccax22){_0x4ccax19[_0x1d9f[36]][_0x1d9f[44]]({session_id:_0x4ccax1c,question_type:_0x4ccax1f,question_id:_0x4ccax1e,question_label:_0x4ccax20,question_text:_0x4ccax21,input_label:_0x4ccax22[_0x1d9f[42]],input_value:_0x4ccax22[_0x1d9f[43]]})})})});_0x4ccax19[_0x1d9f[46]]= _0x4ccax19[_0x1d9f[36]][_0x1d9f[47]];return _0x4ccax19})[_0x1d9f[15]](handleEntityNotFound(_0x4ccaxb))[_0x1d9f[15]](responseWithResult(_0x4ccaxb))[_0x1d9f[19]](function(_0x4ccaxc){console[_0x1d9f[29]](_0x4ccaxc);return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[49]]= function(_0x4ccax15,_0x4ccaxb){return ReportJscriptyQuestion[_0x1d9f[50]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]]},include:[{model:ReportJscriptyInput}]})[_0x1d9f[15]](function(_0x4ccax23){if(!_0x4ccax23){return _0x4ccaxb[_0x1d9f[24]](404)};return _0x4ccaxb[_0x1d9f[12]](200)[_0x1d9f[11]](_0x4ccax23)})[_0x1d9f[15]](handleEntityNotFound(_0x4ccaxb))[_0x1d9f[19]](function(_0x4ccaxc){console[_0x1d9f[29]](_0x4ccaxc);return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[51]]= function(_0x4ccax15,_0x4ccaxb){return ReportJscriptyQuestion[_0x1d9f[31]]({method:[_0x1d9f[52],_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]]]})[_0x1d9f[22]](Util[_0x1d9f[21]](_0x4ccax15[_0x1d9f[20]]))[_0x1d9f[15]](handleEntityNotFound(_0x4ccaxb))[_0x1d9f[15]](function(_0x4ccax24){return _0x4ccaxb[_0x1d9f[12]](200)[_0x1d9f[11]](_0x4ccax24)})[_0x1d9f[19]](function(_0x4ccaxc){console[_0x1d9f[29]](_0x4ccaxc);return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[53]]= function(_0x4ccax15,_0x4ccaxb){var _0x4ccax25={};var _0x4ccax23;var _0x4ccax26=0;return ReportJscriptyQuestion[_0x1d9f[34]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],question_id:_0x4ccax15[_0x1d9f[26]][_0x1d9f[69]]},attributes:[_0x1d9f[39]]})[_0x1d9f[15]](function(_0x4ccax27){if(!_0x4ccax27){return _0x4ccaxb[_0x1d9f[24]](404)};if(_0x4ccax27[_0x1d9f[54]][_0x1d9f[39]]== _0x1d9f[55]){return ReportJscriptyQuestion[_0x1d9f[50]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],question_id:_0x4ccax15[_0x1d9f[26]][_0x1d9f[69]]},attributes:[_0x1d9f[39],_0x1d9f[38],_0x1d9f[40],_0x1d9f[41]],include:[{model:ReportJscriptyInput,where:{$or:[{input_type:_0x1d9f[72],input_value:_0x1d9f[73]},{input_type:{$ne:_0x1d9f[72]},input_value:{$ne:null}}]},attributes:[_0x1d9f[42],_0x1d9f[43],_0x1d9f[74],[sequelize[_0x1d9f[71]](_0x1d9f[46],sequelize[_0x1d9f[70]](_0x1d9f[42])),_0x1d9f[46]]]}],group:[_0x1d9f[38],_0x1d9f[42]]})[_0x1d9f[15]](function(_0x4ccax27){_0x4ccax23= _0x4ccax27;return ReportJscriptyQuestion[_0x1d9f[50]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],question_id:_0x4ccax15[_0x1d9f[26]][_0x1d9f[69]],question_type:_0x1d9f[55]},attributes:[_0x1d9f[38],[sequelize[_0x1d9f[71]](_0x1d9f[46],sequelize[_0x1d9f[70]](_0x1d9f[38])),_0x1d9f[46]]],group:[_0x1d9f[38]]})})[_0x1d9f[15]](function(_0x4ccax34){_0x4ccax26= _0x4ccax34[0][_0x1d9f[54]][_0x1d9f[46]];if(_0x4ccax23){var _0x4ccax29=_[_0x1d9f[56]](_0x4ccax23,_0x1d9f[38]);_[_0x1d9f[45]](_0x4ccax29,function(_0x4ccax35,_0x4ccax2a){var _0x4ccax30=[];var _0x4ccax31=[];var _0x4ccax33=[];var _0x4ccax36=_0x1d9f[65];_[_0x1d9f[45]](_0x4ccax35,function(_0x4ccax2d){if(_0x4ccax2d[_0x1d9f[66]]){_[_0x1d9f[45]](_0x4ccax2d.ReportJscriptyInputs,function(_0x4ccax22){_0x4ccax30[_0x1d9f[44]]({checkbox:true,value:_0x4ccax22[_0x1d9f[42]],count:_0x4ccax22[_0x1d9f[54]][_0x1d9f[46]]})})}});var _0x4ccax32=[];for(var _0x4ccax37=0;_0x4ccax37< _0x4ccax30[_0x1d9f[47]];_0x4ccax37++){_0x4ccax32[_0x4ccax37]= _0x4ccax30[_0x4ccax37][_0x1d9f[46]];_0x4ccax33[_0x4ccax37]= _0x4ccax30[_0x4ccax37][_0x1d9f[67]];_0x4ccax30[_0x4ccax37][_0x1d9f[68]]= _0x4ccax26?(_0x4ccax30[_0x4ccax37][_0x1d9f[46]]/ _0x4ccax26)* 100:0};_0x4ccax31[0]= _0x4ccax32;_0x4ccax25= {total:_0x4ccax26,question_type:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[39]],question_id:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[38]],question_label:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[40]],question_text:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[41]],choices:_0x4ccax30,graphData:_0x4ccax31,graphLabels:_0x4ccax33,graphType:_0x4ccax36}})};return ReportJscriptyQuestion[_0x1d9f[50]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],question_id:_0x4ccax15[_0x1d9f[26]][_0x1d9f[69]],question_type:_0x1d9f[55]},attributes:[_0x1d9f[39],_0x1d9f[38],_0x1d9f[40],_0x1d9f[41]],include:[{model:ReportJscriptyInput,attributes:[_0x1d9f[42]]}]})})[_0x1d9f[15]](function(_0x4ccax19){var _0x4ccax28=[];if(_0x4ccax19){var _0x4ccax29=_[_0x1d9f[56]](_0x4ccax19,_0x1d9f[38]);_[_0x1d9f[45]](_0x4ccax29,function(_0x4ccax1d,_0x4ccax2a){var _0x4ccax2b=[];_[_0x1d9f[45]](_0x4ccax1d,function(_0x4ccax2c){_0x4ccax2b= _[_0x1d9f[58]](_0x4ccax2b,_[_0x1d9f[57]](_0x4ccax2c.ReportJscriptyInputs,_0x1d9f[42]))});_0x4ccax28[_0x1d9f[44]]({question_id:_[_0x1d9f[59]](_0x4ccax1d)[_0x1d9f[38]],labels:_0x4ccax2b})});_[_0x1d9f[45]](_0x4ccax28,function(_0x4ccax2d){if(Object[_0x1d9f[60]](_0x4ccax25)[_0x1d9f[47]]){_[_0x1d9f[45]](_0x4ccax2d[_0x1d9f[61]],function(_0x4ccax2e){var _0x4ccax2f=_[_0x1d9f[34]](_0x4ccax25[_0x1d9f[62]],{value:_0x4ccax2e});if(!_0x4ccax2f){_0x4ccax25[_0x1d9f[62]][_0x1d9f[44]]({value:_0x4ccax2e,count:0,percentage:0});_0x4ccax25[_0x1d9f[63]][0][_0x1d9f[44]](0);_0x4ccax25[_0x1d9f[64]][_0x1d9f[44]](_0x4ccax2e)}})}else {var _0x4ccax30=[];var _0x4ccax31=[];var _0x4ccax32=[];var _0x4ccax33=[];_[_0x1d9f[45]](_0x4ccax2d[_0x1d9f[61]],function(_0x4ccax2e){_0x4ccax30[_0x1d9f[44]]({value:_0x4ccax2e,count:0,percentage:0});_0x4ccax32[_0x1d9f[44]](0);_0x4ccax33[_0x1d9f[44]](_0x4ccax2e)});_0x4ccax31[_0x1d9f[44]](_0x4ccax32);var _0x4ccax22=_0x4ccax19[0];_0x4ccax25= {total:_0x4ccax26,question_type:_0x4ccax22[_0x1d9f[39]],question_id:_0x4ccax22[_0x1d9f[38]],question_label:_0x4ccax22[_0x1d9f[40]],question_text:_0x4ccax22[_0x1d9f[41]],choices:_0x4ccax30,graphType:_0x1d9f[65],graphData:_0x4ccax31,graphLabels:_0x4ccax33}}})};return _0x4ccaxb[_0x1d9f[12]](201)[_0x1d9f[11]](_0x4ccax25)})}else {if(_0x4ccax27[_0x1d9f[54]][_0x1d9f[39]]== _0x1d9f[75]){return ReportJscriptyQuestion[_0x1d9f[50]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],question_id:_0x4ccax15[_0x1d9f[26]][_0x1d9f[69]]},attributes:[_0x1d9f[39],_0x1d9f[38],_0x1d9f[40],_0x1d9f[41],_0x1d9f[80],_0x1d9f[77],[sequelize[_0x1d9f[71]](_0x1d9f[46],sequelize[_0x1d9f[70]](_0x1d9f[77])),_0x1d9f[46]]],group:[_0x1d9f[38],_0x1d9f[77]]})[_0x1d9f[15]](function(_0x4ccax27){_0x4ccax23= _0x4ccax27;return ReportJscriptyQuestion[_0x1d9f[50]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],question_id:_0x4ccax15[_0x1d9f[26]][_0x1d9f[69]],question_type:_0x1d9f[75],question_other_answer:{$ne:null}},attributes:[_0x1d9f[39],_0x1d9f[38],_0x1d9f[40],_0x1d9f[80],_0x1d9f[41],_0x1d9f[78],_0x1d9f[79],[sequelize[_0x1d9f[71]](_0x1d9f[46],sequelize[_0x1d9f[70]](_0x1d9f[79])),_0x1d9f[46]]],group:[_0x1d9f[38],_0x1d9f[79]]})})[_0x1d9f[15]](function(_0x4ccax1a){if(_0x4ccax1a){_[_0x1d9f[45]](_0x4ccax1a,function(_0x4ccax2d){_0x4ccax23[_0x1d9f[44]](_0x4ccax2d)})};var _0x4ccax29=_[_0x1d9f[56]](_0x4ccax23,_0x1d9f[38]);_[_0x1d9f[45]](_0x4ccax29,function(_0x4ccax35,_0x4ccax2a){var _0x4ccax30=[];var _0x4ccax26=0;var _0x4ccax31=[];var _0x4ccax33=[];var _0x4ccax36=_0x1d9f[76];_[_0x1d9f[45]](_0x4ccax35,function(_0x4ccax2d){if(_0x4ccax2d[_0x1d9f[77]]){_0x4ccax30[_0x1d9f[44]]({value:_0x4ccax2d[_0x1d9f[77]],count:_0x4ccax2d[_0x1d9f[54]][_0x1d9f[46]]});_0x4ccax26= _0x4ccax26+ _0x4ccax2d[_0x1d9f[54]][_0x1d9f[46]]};if(_0x4ccax2d[_0x1d9f[78]]){_0x4ccax30[_0x1d9f[44]]({other_option:true,value:_0x4ccax2d[_0x1d9f[79]],count:_0x4ccax2d[_0x1d9f[54]][_0x1d9f[46]]})}});var _0x4ccax38=_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[80]]?JSON[_0x1d9f[81]](_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[80]]):null;if(_0x4ccax38){_[_0x1d9f[45]](_0x4ccax38[_0x1d9f[82]],function(_0x4ccax39){var _0x4ccax3a=_[_0x1d9f[34]](_0x4ccax30,{value:_0x4ccax39});if(!_0x4ccax3a){_0x4ccax30[_0x1d9f[44]]({value:_0x4ccax39,count:0,percentage:0})}})};var _0x4ccax32=[];var _0x4ccax3b=false;for(var _0x4ccax37=0;_0x4ccax37< _0x4ccax30[_0x1d9f[47]];_0x4ccax37++){if(!_0x4ccax30[_0x4ccax37][_0x1d9f[83]]){_0x4ccax31[_0x4ccax37]= _0x4ccax30[_0x4ccax37][_0x1d9f[46]];_0x4ccax33[_0x4ccax37]= _0x4ccax30[_0x4ccax37][_0x1d9f[67]];_0x4ccax30[_0x4ccax37][_0x1d9f[68]]= _0x4ccax26?(_0x4ccax30[_0x4ccax37][_0x1d9f[46]]/ _0x4ccax26)* 100:0}};_0x4ccax25= {total:_0x4ccax26,question_type:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[39]],question_id:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[38]],question_label:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[40]],question_text:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[41]],choices:_0x4ccax30,graphData:_0x4ccax31,graphLabels:_0x4ccax33,graphType:_0x4ccax36}});return _0x4ccaxb[_0x1d9f[12]](201)[_0x1d9f[11]](_0x4ccax25)})}else {console[_0x1d9f[29]](_0x1d9f[84]);return _0x4ccaxb[_0x1d9f[24]](404)}}})[_0x1d9f[19]](function(_0x4ccaxc){console[_0x1d9f[29]](_0x4ccaxc);return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[85]]= function(_0x4ccax15,_0x4ccaxb){var _0x4ccax3c;var _0x4ccax23;var _0x4ccax3d;var _0x4ccax34;return ReportJscriptyQuestion[_0x1d9f[50]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],question_type:_0x1d9f[75]},attributes:[_0x1d9f[39],_0x1d9f[38],_0x1d9f[40],_0x1d9f[41],_0x1d9f[77],_0x1d9f[80],_0x1d9f[79],[sequelize[_0x1d9f[71]](_0x1d9f[46],sequelize[_0x1d9f[70]](_0x1d9f[77])),_0x1d9f[46]]],group:[_0x1d9f[38],_0x1d9f[77]]})[_0x1d9f[15]](function(_0x4ccax1a){_0x4ccax23= _0x4ccax1a;return ReportJscriptyQuestion[_0x1d9f[50]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],question_type:_0x1d9f[75],question_other_answer:{$ne:null}},attributes:[_0x1d9f[39],_0x1d9f[38],_0x1d9f[40],_0x1d9f[41],_0x1d9f[78],_0x1d9f[79],_0x1d9f[80],[sequelize[_0x1d9f[71]](_0x1d9f[46],sequelize[_0x1d9f[70]](_0x1d9f[78])),_0x1d9f[46]]],group:[_0x1d9f[38],_0x1d9f[78]]})})[_0x1d9f[15]](function(_0x4ccax1a){_[_0x1d9f[45]](_0x4ccax1a,function(_0x4ccax2d){_0x4ccax23[_0x1d9f[44]](_0x4ccax2d)});var _0x4ccax25=[];var _0x4ccax36=_0x1d9f[76];var _0x4ccax29=_[_0x1d9f[56]](_0x4ccax23,_0x1d9f[38]);_[_0x1d9f[45]](_0x4ccax29,function(_0x4ccax35,_0x4ccax2a){var _0x4ccax26=0;var _0x4ccax31=[];var _0x4ccax33=[];var _0x4ccax30=[];_[_0x1d9f[45]](_0x4ccax35,function(_0x4ccax2d){if(_0x4ccax2d[_0x1d9f[77]]){_0x4ccax30[_0x1d9f[44]]({value:_0x4ccax2d[_0x1d9f[77]],count:_0x4ccax2d[_0x1d9f[54]][_0x1d9f[46]]});_0x4ccax26= _0x4ccax26+ _0x4ccax2d[_0x1d9f[54]][_0x1d9f[46]]};if(_0x4ccax2d[_0x1d9f[78]]){_0x4ccax30[_0x1d9f[44]]({other_option:true,value:_0x4ccax2d[_0x1d9f[78]],count:_0x4ccax2d[_0x1d9f[54]][_0x1d9f[46]]})}});var _0x4ccax38=JSON[_0x1d9f[81]](_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[80]]);if(_0x4ccax38){_[_0x1d9f[45]](_0x4ccax38[_0x1d9f[82]],function(_0x4ccax39){var _0x4ccax3a=_[_0x1d9f[34]](_0x4ccax30,{value:_0x4ccax39});if(!_0x4ccax3a){_0x4ccax30[_0x1d9f[44]]({value:_0x4ccax39,count:0,percentage:0})}})};for(var _0x4ccax37=0;_0x4ccax37< _0x4ccax30[_0x1d9f[47]];_0x4ccax37++){if(!_0x4ccax30[_0x4ccax37][_0x1d9f[83]]&& (_0x4ccax26!= 0)){_0x4ccax30[_0x4ccax37][_0x1d9f[68]]= (_0x4ccax30[_0x4ccax37][_0x1d9f[46]]/ _0x4ccax26)* 100;_0x4ccax31[_0x1d9f[44]](_0x4ccax30[_0x4ccax37][_0x1d9f[46]]);_0x4ccax33[_0x1d9f[44]](_0x4ccax30[_0x4ccax37][_0x1d9f[67]])}};_0x4ccax25[_0x1d9f[44]]({total:_0x4ccax26,question_type:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[39]],question_id:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[38]],question_label:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[40]],question_other_label:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[79]],question_text:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[41]],choices:_0x4ccax30,graphData:_0x4ccax31,graphLabels:_0x4ccax33,graphType:_0x4ccax36})});_0x4ccax3c= _0x4ccax25;return ReportJscriptyQuestion[_0x1d9f[50]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],question_type:_0x1d9f[55]},attributes:[_0x1d9f[25],_0x1d9f[39],_0x1d9f[38],_0x1d9f[40],_0x1d9f[41],_0x1d9f[77]],include:[{model:ReportJscriptyInput,where:{$or:[{input_type:_0x1d9f[72],input_value:_0x1d9f[73]},{input_type:{$ne:_0x1d9f[72]},input_value:{$ne:null}}]},attributes:[_0x1d9f[42],_0x1d9f[43],_0x1d9f[74],[sequelize[_0x1d9f[71]](_0x1d9f[46],sequelize[_0x1d9f[70]](_0x1d9f[42])),_0x1d9f[46]]]}],group:[_0x1d9f[38],_0x1d9f[42]]})})[_0x1d9f[15]](function(_0x4ccax27){_0x4ccax23= _0x4ccax27;return ReportJscriptyQuestion[_0x1d9f[50]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],question_type:_0x1d9f[55]},attributes:[_0x1d9f[38],[sequelize[_0x1d9f[71]](_0x1d9f[46],sequelize[_0x1d9f[70]](_0x1d9f[38])),_0x1d9f[46]]],group:[_0x1d9f[38]]})})[_0x1d9f[15]](function(_0x4ccax1d){_0x4ccax34= _0x4ccax1d;var _0x4ccax25=[];var _0x4ccax29=_[_0x1d9f[56]](_0x4ccax23,_0x1d9f[38]);_[_0x1d9f[45]](_0x4ccax29,function(_0x4ccax35,_0x4ccax2a){var _0x4ccax30=[];var _0x4ccax26=0;_0x4ccax26= _[_0x1d9f[34]](_0x4ccax34,function(_0x4ccax1d){return _0x4ccax1d[_0x1d9f[38]]== _[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[38]]})[_0x1d9f[54]][_0x1d9f[46]];var _0x4ccax31=[];var _0x4ccax3f=[];var _0x4ccax33=[];var _0x4ccax36=_0x1d9f[65];_[_0x1d9f[45]](_0x4ccax35,function(_0x4ccax2d){var _0x4ccax40=_0x4ccax2d;_[_0x1d9f[45]](_0x4ccax40.ReportJscriptyInputs,function(_0x4ccax22){_0x4ccax30[_0x1d9f[44]]({checkbox:true,value:_0x4ccax22[_0x1d9f[42]],count:_0x4ccax22[_0x1d9f[54]][_0x1d9f[46]]})})});var _0x4ccax32=[];for(var _0x4ccax37=0;_0x4ccax37< _0x4ccax30[_0x1d9f[47]];_0x4ccax37++){_0x4ccax32[_0x4ccax37]= _0x4ccax30[_0x4ccax37][_0x1d9f[46]];_0x4ccax30[_0x4ccax37][_0x1d9f[68]]= (_0x4ccax30[_0x4ccax37][_0x1d9f[46]]/ _0x4ccax26)* 100;_0x4ccax33[_0x4ccax37]= _0x4ccax30[_0x4ccax37][_0x1d9f[67]]};_0x4ccax31[0]= _0x4ccax32;_0x4ccax3c[_0x1d9f[44]]({total:_0x4ccax26,question_type:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[39]],question_id:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[38]],question_label:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[40]],question_text:_[_0x1d9f[59]](_0x4ccax35)[_0x1d9f[41]],choices:_0x4ccax30,graphData:_0x4ccax31,graphLabels:_0x4ccax33,graphType:_0x4ccax36})});return ReportJscriptyQuestion[_0x1d9f[50]]({where:{projectId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]],question_type:_0x1d9f[55]},attributes:[_0x1d9f[25],_0x1d9f[38],_0x1d9f[40],_0x1d9f[41],_0x1d9f[39]],include:[{model:ReportJscriptyInput,attributes:[_0x1d9f[42]]}]})})[_0x1d9f[15]](function(_0x4ccax19){var _0x4ccax29=_[_0x1d9f[56]](_0x4ccax19,_0x1d9f[38]);var _0x4ccax3e=[];_[_0x1d9f[45]](_0x4ccax29,function(_0x4ccax1d,_0x4ccax2a){var _0x4ccax2b=[];_[_0x1d9f[45]](_0x4ccax1d,function(_0x4ccax2c){_0x4ccax2b= _[_0x1d9f[58]](_0x4ccax2b,_[_0x1d9f[57]](_0x4ccax2c.ReportJscriptyInputs,_0x1d9f[42]))});_0x4ccax3e[_0x1d9f[44]]({question_text:_[_0x1d9f[59]](_0x4ccax1d)[_0x1d9f[41]],question_type:_[_0x1d9f[59]](_0x4ccax1d)[_0x1d9f[39]],question_label:_[_0x1d9f[59]](_0x4ccax1d)[_0x1d9f[40]],question_id:_[_0x1d9f[59]](_0x4ccax1d)[_0x1d9f[38]],labels:_0x4ccax2b})});_[_0x1d9f[45]](_0x4ccax3e,function(_0x4ccax2d){var _0x4ccax1d=_[_0x1d9f[34]](_0x4ccax3c,{"\x71\x75\x65\x73\x74\x69\x6F\x6E\x5F\x69\x64":_0x4ccax2d[_0x1d9f[38]]});if(_0x4ccax1d){_[_0x1d9f[45]](_0x4ccax2d[_0x1d9f[61]],function(_0x4ccax2e){var _0x4ccax2f=_[_0x1d9f[34]](_0x4ccax1d[_0x1d9f[62]],{value:_0x4ccax2e});if(!_0x4ccax2f){_0x4ccax1d[_0x1d9f[62]][_0x1d9f[44]]({value:_0x4ccax2e,count:0,percentage:0});_0x4ccax1d[_0x1d9f[63]][0][_0x1d9f[44]](0);_0x4ccax1d[_0x1d9f[64]][_0x1d9f[44]](_0x4ccax2e)}})}else {var _0x4ccax30=[];var _0x4ccax31=[];var _0x4ccax32=[];var _0x4ccax33=[];_[_0x1d9f[45]](_0x4ccax2d[_0x1d9f[61]],function(_0x4ccax2e){_0x4ccax30[_0x1d9f[44]]({value:_0x4ccax2e,count:0,percentage:0})});var _0x4ccax26=_[_0x1d9f[34]](_0x4ccax34,function(_0x4ccax1d){return _0x4ccax1d[_0x1d9f[38]]== _0x4ccax2d[_0x1d9f[38]]})[_0x1d9f[54]][_0x1d9f[46]];_0x4ccax3c[_0x1d9f[44]]({total:_0x4ccax26,question_type:_0x4ccax2d[_0x1d9f[39]],question_id:_0x4ccax2d[_0x1d9f[38]],question_label:_0x4ccax2d[_0x1d9f[40]],question_text:_0x4ccax2d[_0x1d9f[41]],choices:_0x4ccax30,graphType:_0x1d9f[65],graphData:_0x4ccax31,graphLabels:_0x4ccax33})}});return _0x4ccaxb[_0x1d9f[12]](201)[_0x1d9f[11]](_0x4ccax3c)})[_0x1d9f[19]](function(_0x4ccaxc){console[_0x1d9f[29]](_0x4ccaxc);return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[86]]= function(_0x4ccax15,_0x4ccaxb){return JscriptyProject[_0x1d9f[86]](_0x4ccax15[_0x1d9f[93]])[_0x1d9f[15]](function(_0x4ccax18){return _0x4ccaxb[_0x1d9f[12]](201)[_0x1d9f[11]](_0x4ccax18)})[_0x1d9f[19]](sequelize.UniqueConstraintError,function(_0x4ccaxc){if(_0x4ccaxc[_0x1d9f[88]][_0x1d9f[87]]){_0x4ccaxc[_0x1d9f[89]]= _0x1d9f[90];_0x4ccaxc[_0x1d9f[91]]= _0x1d9f[92]};return handleError(_0x4ccaxb,_0x4ccaxc)})[_0x1d9f[19]](function(_0x4ccaxc){return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[94]]= function(_0x4ccax15,_0x4ccaxb){return ReportJscriptySession[_0x1d9f[86]](_0x4ccax15[_0x1d9f[93]])[_0x1d9f[15]](function(_0x4ccax41){return _0x4ccaxb[_0x1d9f[12]](201)[_0x1d9f[11]](_0x4ccax41)})[_0x1d9f[19]](function(_0x4ccaxc){return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[95]]= function(_0x4ccax15,_0x4ccaxb){return ReportJscriptyQuestion[_0x1d9f[17]]({where:{sessionId:_0x4ccax15[_0x1d9f[26]][_0x1d9f[33]]}})[_0x1d9f[15]](function(){var _0x4ccax42=[];for(var _0x4ccax37=0;_0x4ccax37< _0x4ccax15[_0x1d9f[93]][_0x1d9f[47]];_0x4ccax37++){_0x4ccax42[_0x4ccax37]= ReportJscriptyQuestion[_0x1d9f[86]](_0x4ccax15[_0x1d9f[93]][_0x4ccax37],{include:[{model:ReportJscriptyInput}]})};return Promise[_0x1d9f[96]](_0x4ccax42)})[_0x1d9f[15]](function(_0x4ccax27){return _0x4ccaxb[_0x1d9f[24]](201)})[_0x1d9f[19]](function(_0x4ccaxc){return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[97]]= function(_0x4ccax15,_0x4ccaxb){if(_0x4ccax15[_0x1d9f[93]][_0x1d9f[25]]){delete _0x4ccax15[_0x1d9f[93]][_0x1d9f[25]]};return JscriptyProject[_0x1d9f[27]](_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]])[_0x1d9f[15]](function(_0x4ccax18){if(!_0x4ccax18){return _0x4ccaxb[_0x1d9f[24]](404)};var _0x4ccax13=_[_0x1d9f[98]](_0x4ccax18,_0x4ccax15[_0x1d9f[93]]);return _0x4ccax13[_0x1d9f[99]]()})[_0x1d9f[15]](function(_0x4ccax18){return _0x4ccaxb[_0x1d9f[12]](200)[_0x1d9f[11]](_0x4ccax18)})[_0x1d9f[19]](function(_0x4ccaxc){return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[100]]= function(_0x4ccax15,_0x4ccaxb){return ReportJscriptySession[_0x1d9f[27]](_0x4ccax15[_0x1d9f[26]][_0x1d9f[33]])[_0x1d9f[15]](function(_0x4ccax1b){if(!_0x4ccax1b){return _0x4ccaxb[_0x1d9f[24]](404)};var _0x4ccax13=_[_0x1d9f[98]](_0x4ccax1b,_0x4ccax15[_0x1d9f[93]]);return _0x4ccax13[_0x1d9f[99]]()})[_0x1d9f[15]](function(_0x4ccax41){return _0x4ccaxb[_0x1d9f[12]](200)[_0x1d9f[11]](_0x4ccax41)})[_0x1d9f[19]](function(_0x4ccaxc){return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[17]]= function(_0x4ccax15,_0x4ccaxb){return JscriptyProject[_0x1d9f[27]](_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]])[_0x1d9f[15]](function(_0x4ccax18){if(!_0x4ccax18){return _0x4ccaxb[_0x1d9f[24]](404)};return _0x4ccax18[_0x1d9f[17]]()})[_0x1d9f[15]](function(){return _0x4ccaxb[_0x1d9f[24]](204)})[_0x1d9f[19]](function(_0x4ccaxc){return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[101]]= function(_0x4ccax15,_0x4ccaxb){return ReportJscriptySession[_0x1d9f[34]]({where:{session_id:_0x4ccax15[_0x1d9f[26]][_0x1d9f[33]]}})[_0x1d9f[15]](function(_0x4ccax1b){if(!_0x4ccax1b){return _0x4ccaxb[_0x1d9f[24]](404)};return _0x4ccax1b[_0x1d9f[17]]()})[_0x1d9f[15]](function(){return _0x4ccaxb[_0x1d9f[24]](204)})[_0x1d9f[19]](function(_0x4ccaxc){return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[102]]= function(_0x4ccax15,_0x4ccaxb){return JscriptyProject[_0x1d9f[17]]({where:{id:_0x4ccax15[_0x1d9f[20]][_0x1d9f[103]]},individualHooks:true})[_0x1d9f[15]](function(){return _0x4ccaxb[_0x1d9f[24]](204)})[_0x1d9f[19]](function(_0x4ccaxc){return handleError(_0x4ccaxb,_0x4ccaxc)})};exports[_0x1d9f[104]]= function(_0x4ccax15,_0x4ccaxb,_0x4ccax16){return JscriptyProject[_0x1d9f[27]](_0x4ccax15[_0x1d9f[26]][_0x1d9f[25]])[_0x1d9f[15]](function(_0x4ccax18){if(!_0x4ccax18){return _0x4ccaxb[_0x1d9f[24]](404)};_0x4ccaxb[_0x1d9f[109]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0x1d9f[105]+ _0x4ccax15[_0x1d9f[20]][_0x1d9f[106]]+ _0x1d9f[107],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x1d9f[108]});return _0x4ccaxb[_0x1d9f[11]](_0x4ccax18[_0x1d9f[110]])})[_0x1d9f[19]](function(_0x4ccaxc){return handleError(_0x4ccaxb,_0x4ccaxc)})} \ No newline at end of file diff --git a/server/api/jscripty_project/jscripty_project.events.js b/server/api/jscripty_project/jscripty_project.events.js index fe91bd8..9942f66 100644 --- a/server/api/jscripty_project/jscripty_project.events.js +++ b/server/api/jscripty_project/jscripty_project.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const JscriptyProject = require('../../models').JscriptyProject; - -var JscriptyProjectEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -JscriptyProjectEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - JscriptyProject.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - JscriptyProjectEvents.emit(event + ':' + doc._id, doc); - JscriptyProjectEvents.emit(event, doc); - done(null); - } -} - -module.exports = JscriptyProjectEvents; +var _0xabf2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4A\x73\x63\x72\x69\x70\x74\x79\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xabf2[0];const EventEmitter=require(_0xabf2[1]);const JscriptyProject=require(_0xabf2[3])[_0xabf2[2]];var JscriptyProjectEvents= new EventEmitter();JscriptyProjectEvents[_0xabf2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xabf2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xabf2[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xabf2[6]};for(var e in events){var event=events[e];JscriptyProject[_0xabf2[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb506x8,_0xb506x9,_0xb506xa){JscriptyProjectEvents[_0xabf2[10]](event+ _0xabf2[8]+ _0xb506x8[_0xabf2[9]],_0xb506x8);JscriptyProjectEvents[_0xabf2[10]](event,_0xb506x8);_0xb506xa(null)}}module[_0xabf2[11]]= JscriptyProjectEvents \ No newline at end of file diff --git a/server/api/jscripty_project/jscripty_project.socket.js b/server/api/jscripty_project/jscripty_project.socket.js index 9911b1a..c86d706 100644 --- a/server/api/jscripty_project/jscripty_project.socket.js +++ b/server/api/jscripty_project/jscripty_project.socket.js @@ -1,28 +1 @@ -'use strict'; - -const JscriptyProjectEvents = require('./jscripty_project.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('jscripty_project:' + event, socket); - - JscriptyProjectEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - JscriptyProjectEvents.removeListener(event, listener); - }; -} +var _0x46ce=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x46ce[0];const JscriptyProjectEvents=require(_0x46ce[1]);var events=[_0x46ce[2],_0x46ce[3]];exports[_0x46ce[4]]= function(_0x2572x3){for(var _0x2572x4=0,_0x2572x5=events[_0x46ce[5]];_0x2572x4< _0x2572x5;_0x2572x4++){var _0x2572x6=events[_0x2572x4];var _0x2572x7=createListener(_0x46ce[6]+ _0x2572x6,_0x2572x3);JscriptyProjectEvents[_0x46ce[7]](_0x2572x6,_0x2572x7);_0x2572x3[_0x46ce[7]](_0x46ce[8],removeListener(_0x2572x6,_0x2572x7))}};function createListener(_0x2572x6,_0x2572x3){return function(_0x2572x9){_0x2572x3[_0x46ce[9]](_0x2572x6,_0x2572x9)}}function removeListener(_0x2572x6,_0x2572x7){return function(){JscriptyProjectEvents[_0x46ce[10]](_0x2572x6,_0x2572x7)}} \ No newline at end of file diff --git a/server/api/license/index.js b/server/api/license/index.js index f0a2983..fa2b044 100644 --- a/server/api/license/index.js +++ b/server/api/license/index.js @@ -1,12 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./license.controller'); - -var router = express.Router(); - -router.get('/', controller.index); -router.post('/request', auth.isAuthenticated(), controller.request); - -module.exports = router; +var _0xd55b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x72\x65\x71\x75\x65\x73\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x72\x65\x71\x75\x65\x73\x74","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd55b[0];var express=require(_0xd55b[1]);var auth=require(_0xd55b[2]);var controller=require(_0xd55b[3]);var router=express.Router();router[_0xd55b[6]](_0xd55b[4],controller[_0xd55b[5]]);router[_0xd55b[10]](_0xd55b[7],auth[_0xd55b[8]](),controller[_0xd55b[9]]);module[_0xd55b[11]]= router \ No newline at end of file diff --git a/server/api/license/license.controller.js b/server/api/license/license.controller.js index a5d47ec..e662725 100644 --- a/server/api/license/license.controller.js +++ b/server/api/license/license.controller.js @@ -1,135 +1 @@ -'use strict'; - -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/licenses -> index - * POST /api/licenses -> create - * GET /api/licenses/:id -> show - * PUT /api/licenses/:id -> update - * DELETE /api/licenses/:id -> destroy - */ - -var _ = require('lodash'); -var crypto = require('crypto'); -var moment = require('moment'); -var rp = require('request-promise'); - -var config = require('../../config/environment'); -var license = require('../../config/license/license.service'); -var License = require('../../models').License; -var Setting = require('../../models').Setting; - -const expirationTh = 7; - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - console.log(err); - res.status(statusCode).send(err); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - entity = { - dataValues: { - license: license.demoLicense - } - }; - - entity.dataValues.license.token = license.getUuid(); - res.status(201).json(entity); - return null; - } - - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity - .updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity - .destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of Licenses -exports.index = function(req, res, next) { - var _settings; - var _license; - - return Setting - .findById(1) - .then(function(settings) { - _settings = settings; - return License - .findById(1); - }) - .then(handleEntityNotFound(res)) - .then(function(_license) { - - if (!_license) { - _license = {}; - } - - try { - if (_license.license) { - _license.license = license.decrypt(_license.license, _license.data1); - _license.license = JSON.parse(_license.license); - } else { - _license.license = license.demoLicense; - } - } catch (err) { - console.log('decrypt error', err); - _license.license = license.demoLicense; - } - - if (_license.data2) { - var decipher = crypto.createDecipher('aes-256-ctr', config.session.secret); - var dec = decipher.update(_license.data2, 'base64', 'utf8') - dec += decipher.final('utf8'); - - _license.license.expirationTime = expirationTh - moment().diff(dec, 'days'); - } - - _license.license.token = _license.data1; - _license.license.token2 = license.getUuid(); - _.merge(_license.dataValues, _settings.dataValues); - - res.status(200).json(_license.dataValues); - }) - .catch(handleError(res)); -} - -// Creates a new License in the DB -exports.request = function(req, res) { - return rp({ - method: 'POST', - uri: config.provisioning + '/servers/' + license.getUuid() + '/request', - body: req.body, - json: true // Automatically stringifies the body to JSON - }) - .then(function(data) { - res.status(201).send(data); - }) - .catch(function(err) { - console.log(err); - return res.status(err.statusCode || 500).send(err); - }); -} +var _0xf999=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x65\x74\x74\x69\x6E\x67","\x6C\x6F\x67","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x64\x65\x6D\x6F\x4C\x69\x63\x65\x6E\x73\x65","\x74\x6F\x6B\x65\x6E","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x67\x65\x74\x55\x75\x69\x64","\x6A\x73\x6F\x6E","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x65\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x64\x61\x74\x61\x31","\x64\x65\x63\x72\x79\x70\x74","\x70\x61\x72\x73\x65","\x64\x65\x63\x72\x79\x70\x74\x20\x65\x72\x72\x6F\x72","\x64\x61\x74\x61\x32","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x73\x65\x63\x72\x65\x74","\x73\x65\x73\x73\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x74\x66\x38","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x65\x78\x70\x69\x72\x61\x74\x69\x6F\x6E\x54\x69\x6D\x65","\x64\x61\x79\x73","\x64\x69\x66\x66","\x74\x6F\x6B\x65\x6E\x32","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x65\x71\x75\x65\x73\x74","\x73\x74\x61\x74\x75\x73\x43\x6F\x64\x65","\x50\x4F\x53\x54","\x70\x72\x6F\x76\x69\x73\x69\x6F\x6E\x69\x6E\x67","\x2F\x73\x65\x72\x76\x65\x72\x73\x2F","\x2F\x72\x65\x71\x75\x65\x73\x74","\x62\x6F\x64\x79"];_0xf999[0];var _=require(_0xf999[1]);var crypto=require(_0xf999[2]);var moment=require(_0xf999[3]);var rp=require(_0xf999[4]);var config=require(_0xf999[5]);var license=require(_0xf999[6]);var License=require(_0xf999[8])[_0xf999[7]];var Setting=require(_0xf999[8])[_0xf999[9]];const expirationTh=7;function handleError(_0x9da9xb,_0x9da9xc){_0x9da9xc= _0x9da9xc|| 500;return function(_0x9da9xd){console[_0xf999[10]](_0x9da9xd);_0x9da9xb[_0xf999[12]](_0x9da9xc)[_0xf999[11]](_0x9da9xd)}}function handleEntityNotFound(_0x9da9xb){return function(_0x9da9xf){if(!_0x9da9xf){_0x9da9xf= {dataValues:{license:license[_0xf999[13]]}};_0x9da9xf[_0xf999[16]][_0xf999[15]][_0xf999[14]]= license[_0xf999[17]]();_0x9da9xb[_0xf999[12]](201)[_0xf999[18]](_0x9da9xf);return null};return _0x9da9xf}}function saveUpdates(_0x9da9x11){return function(_0x9da9xf){return _0x9da9xf[_0xf999[20]](_0x9da9x11)[_0xf999[19]](function(_0x9da9x12){return _0x9da9x12})}}function removeEntity(_0x9da9xb){return function(_0x9da9xf){if(_0x9da9xf){return _0x9da9xf[_0xf999[22]]()[_0xf999[19]](function(){_0x9da9xb[_0xf999[12]](204)[_0xf999[21]]()})}}}exports[_0xf999[23]]= function(_0x9da9x14,_0x9da9xb,_0x9da9x15){var _0x9da9x16;var _0x9da9x17;return Setting[_0xf999[43]](1)[_0xf999[19]](function(_0x9da9x1a){_0x9da9x16= _0x9da9x1a;return License[_0xf999[43]](1)})[_0xf999[19]](handleEntityNotFound(_0x9da9xb))[_0xf999[19]](function(_0x9da9x17){if(!_0x9da9x17){_0x9da9x17= {}};try{if(_0x9da9x17[_0xf999[15]]){_0x9da9x17[_0xf999[15]]= license[_0xf999[26]](_0x9da9x17[_0xf999[15]],_0x9da9x17[_0xf999[25]]);_0x9da9x17[_0xf999[15]]= JSON[_0xf999[27]](_0x9da9x17[_0xf999[15]])}else {_0x9da9x17[_0xf999[15]]= license[_0xf999[13]]}}catch(err){console[_0xf999[10]](_0xf999[28],err);_0x9da9x17[_0xf999[15]]= license[_0xf999[13]]};if(_0x9da9x17[_0xf999[29]]){var _0x9da9x18=crypto[_0xf999[33]](_0xf999[30],config[_0xf999[32]][_0xf999[31]]);var _0x9da9x19=_0x9da9x18[_0xf999[36]](_0x9da9x17[_0xf999[29]],_0xf999[34],_0xf999[35]);_0x9da9x19+= _0x9da9x18[_0xf999[37]](_0xf999[35]);_0x9da9x17[_0xf999[15]][_0xf999[38]]= expirationTh- moment()[_0xf999[40]](_0x9da9x19,_0xf999[39])};_0x9da9x17[_0xf999[15]][_0xf999[14]]= _0x9da9x17[_0xf999[25]];_0x9da9x17[_0xf999[15]][_0xf999[41]]= license[_0xf999[17]]();_[_0xf999[42]](_0x9da9x17[_0xf999[16]],_0x9da9x16[_0xf999[16]]);_0x9da9xb[_0xf999[12]](200)[_0xf999[18]](_0x9da9x17[_0xf999[16]])})[_0xf999[24]](handleError(_0x9da9xb))};exports[_0xf999[44]]= function(_0x9da9x14,_0x9da9xb){return rp({method:_0xf999[46],uri:config[_0xf999[47]]+ _0xf999[48]+ license[_0xf999[17]]()+ _0xf999[49],body:_0x9da9x14[_0xf999[50]],json:true})[_0xf999[19]](function(_0x9da9x1b){_0x9da9xb[_0xf999[12]](201)[_0xf999[11]](_0x9da9x1b)})[_0xf999[24]](function(_0x9da9xd){console[_0xf999[10]](_0x9da9xd);return _0x9da9xb[_0xf999[12]](_0x9da9xd[_0xf999[45]]|| 500)[_0xf999[11]](_0x9da9xd)})} \ No newline at end of file diff --git a/server/api/list/index.js b/server/api/list/index.js index 2336f13..4a4da82 100644 --- a/server/api/list/index.js +++ b/server/api/list/index.js @@ -1,28 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./list.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.index); -router.get('/:listId/customfields/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.showCustomField); -router.get('/:id/customfields', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.getCustomFields); -router.get('/:id/agents', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.showAgents); -router.get('/:id/contacts', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.getContacts); -router.get('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.show); -router.post('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.create); -router.post('/:id/agents', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.addAgents); -router.post('/:id/contacts', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin', 'agent']), controller.getContact); -router.post('/:id/customfields', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.createCustomField); -router.put('/:listId/customfields/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.updateCustomField); -router.put('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.update); -router.delete('/:id/agents', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.removeAgents); -router.delete('/', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.destroy); -router.delete('/:listId/customfields/:id', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.removeCustomField); -router.delete('/:listId/customfields', auth.isAuthenticated(), license.hasCm(), auth.hasModule([5], ['admin']), controller.removeAllCustomFields); - -module.exports = router; +var _0xc567=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6C\x69\x73\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x43\x6D","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x6C\x69\x73\x74\x49\x64\x2F\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64\x73\x2F\x3A\x69\x64","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x2F\x3A\x69\x64\x2F\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x75\x70\x64\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x70\x75\x74","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x2F\x3A\x6C\x69\x73\x74\x49\x64\x2F\x63\x75\x73\x74\x6F\x6D\x66\x69\x65\x6C\x64\x73","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xc567[0];var express=require(_0xc567[1]);var controller=require(_0xc567[2]);var auth=require(_0xc567[3]);var license=require(_0xc567[4]);var router=express.Router();router[_0xc567[12]](_0xc567[5],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8],_0xc567[9]]),controller[_0xc567[11]]);router[_0xc567[12]](_0xc567[13],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8],_0xc567[9]]),controller[_0xc567[14]]);router[_0xc567[12]](_0xc567[15],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8],_0xc567[9]]),controller[_0xc567[16]]);router[_0xc567[12]](_0xc567[17],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8],_0xc567[9]]),controller[_0xc567[18]]);router[_0xc567[12]](_0xc567[19],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8],_0xc567[9]]),controller[_0xc567[20]]);router[_0xc567[12]](_0xc567[21],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8],_0xc567[9]]),controller[_0xc567[22]]);router[_0xc567[24]](_0xc567[5],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8]]),controller[_0xc567[23]]);router[_0xc567[24]](_0xc567[17],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8]]),controller[_0xc567[25]]);router[_0xc567[24]](_0xc567[19],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8],_0xc567[9]]),controller[_0xc567[26]]);router[_0xc567[24]](_0xc567[15],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8]]),controller[_0xc567[27]]);router[_0xc567[29]](_0xc567[13],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8]]),controller[_0xc567[28]]);router[_0xc567[29]](_0xc567[21],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8]]),controller[_0xc567[30]]);router[_0xc567[32]](_0xc567[17],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8]]),controller[_0xc567[31]]);router[_0xc567[32]](_0xc567[5],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8]]),controller[_0xc567[33]]);router[_0xc567[32]](_0xc567[21],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8]]),controller[_0xc567[34]]);router[_0xc567[32]](_0xc567[13],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8]]),controller[_0xc567[35]]);router[_0xc567[32]](_0xc567[36],auth[_0xc567[6]](),license[_0xc567[7]](),auth[_0xc567[10]]([5],[_0xc567[8]]),controller[_0xc567[37]]);module[_0xc567[38]]= router \ No newline at end of file diff --git a/server/api/list/list.controller.js b/server/api/list/list.controller.js index 18caabc..14e38a2 100644 --- a/server/api/list/list.controller.js +++ b/server/api/list/list.controller.js @@ -1,463 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); - -var User = require('../../models').User; -var List = require('../../models').List; -var UserHasList = require('../../models').UserHasList; -var CustomField = require('../../models').CustomField; -var Contact = require('../../models').Contact; -var Util = require('../../config/util'); -var sequelize = require('../../models').sequelize; - -// Get list of lists -exports.index = function(req, res, next) { - switch (req.user.role) { - case 'agent': - return User - .findById(req.user.id) - .then(function(agent) { - return agent.getLists(); - }) - .then(function(lists) { - var agentLists = _.map(lists, 'id'); - return List - .scope('customFields') - .findAndCountAll(_.merge(Util.getQuery(req.query, { - $or: [{ - defaultEntry: true - }, { - id: agentLists - }] - }), { - distinct: true - })); - }) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - default: - return List - .scope('customFields') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } - -}; - -// Get all custom_fields -exports.getCustomFields = function(req, res) { - return CustomField - .findAndCountAll({ - where: { - ListId: req.params.id - } - }) - .then(function(customFields) { - return res.status(200).send(customFields); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get all custom_fields -exports.getContact = function(req, res) { - var where = _.merge(req.body, { - ListId: req.params.id - }); - - return Contact - .findOrCreate({ - where: where, - default: req.body - }) - .spread(function(contact) { - return res.status(200).send(contact); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getContacts = function(req, res) { - var _baseQuery = { - where: { - ListId: req.params.id, - }, - attributes: ['phone', 'mobile', 'fax', 'email'] - }; - - _.forIn(req.query, function(value, key) { - _baseQuery.where[key] = { - $like: '%' + value + '%' - }; - }); - - return Contact - .findAll(_baseQuery) - .then(function(contacts) { - return res.status(200).send({ - rows: contacts, - length: contacts.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showCustomField = function(req, res) { - return CustomField - .findById(req.params.id) - .then(function(customField) { - if (!customField) { - return res.sendStatus(404); - } - return res.status(200).send(customField); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.updateCustomField = function(req, res) { - return CustomField - .findById(req.params.id) - .then(function(customField) { - if (!customField) { - return res.sendStatus(404); - } - var updated = _.merge(customField, req.body); - return updated.save(); - }) - .then(function(customField) { - return res.status(200).send(customField); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.createCustomField = function(req, res) { - var _customField; - req.body.ListId = req.params.id; - return sequelize.transaction(function(t) { - return CustomField - .create(req.body) - .then(function(customField) { - _customField = customField; - customField.name = 'cf_' + customField.id; - return customField.save(); - }) - .then(function() { - return sequelize.query(util.format('ALTER TABLE cm_contacts ADD COLUMN %s VARCHAR(255)', _customField.name)); - }) - .then(function() { - return res.sendStatus(201); - }) - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single list -exports.show = function(req, res) { - return List - .findById(req.params.id) - .then(function(list) { - if (!list) { - return res.sendStatus(404); - } - return res.send(list); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new list in the DB. -exports.create = function(req, res) { - return sequelize.transaction(function(t) { - return List - .create(req.body) - .then(function(list) { - return res.status(201).send(list); - }) - }) - .catch(sequelize.UniqueConstraintError, function(err) { - err.translatedMessage = 'MESSAGE_EXIST_LIST'; - err.message = 'The list name already exists'; - return res.status(500).send(err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing list in the DB. -exports.update = function(req, res) { - return List - .findById(req.params.id) - .then(function(list) { - if (!list) { - return res.sendStatus(404); - } - if (req.body.id) { - delete req.body.id; - } - var updated = _.merge(list, req.body); - return updated.save(); - }) - .then(function(list) { - return res.status(200).send(list); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - err.translatedMessage = 'MESSAGE_EXIST_LIST'; - err.message = 'The list name already exists'; - return res.status(500).send(err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showAgents = function(req, res) { - return List - .findById(req.params.id) - .then(function(list) { - if (!list) { - return res.sendStatus(404); - } - return list - .getUsers({ - where: { - role: 'agent' - }, - attributes: ['id', 'name', 'fullname', 'email'] - }); - }) - .then(function(agents) { - return res.status(200).send({ - rows: agents, - count: agents.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing user_has_list in the DB. -exports.addAgents = function(req, res, next) { - return User - .findAll({ - where: { - id: req.body.agents - } - }) - .then(function(users) { - var userHasLists = _.map(users, function(user) { - return { - list: req.params.id, - membername: user.name, - UserId: user.id - }; - }); - - return UserHasList - .bulkCreate(userHasLists, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - console.log(err); - return next(err); - }); -}; - -exports.removeAgents = function(req, res, next) { - return UserHasList - .destroy({ - where: { - UserId: req.query.agents, - list: req.params.id - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(202); - }) - .catch(function(err) { - return next(err); - }); -}; - -// Deletes a list from the DB. -exports.destroy = function(req, res) { - return destroyList(req.params.id, res); -}; - -// Deletes multiple lists from the DB. -exports.bulkDestroy = function(req, res) { //add the check for associated contacts - return destroyList(req.query.id, res); -}; - -function destroyList(id, res) { - return delCf(id, res) - .all() - .then(function() { - return List.destroy({ - where: { - id: id - }, - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -} - -function delCf(id, res) { - var _cfs; - return CustomField.findAll({ - where: { - ListId: id - } - }) - .then(function(cfs) { - if (!cfs) { - return res.sendStatus(404); - } - _cfs = cfs; - return CustomField - .destroy({ - where: { - id: id - } - }); - }) - .then(function() { - return Contact - .describe(); - }) - .then(function(tableFields) { - return _.keys(tableFields); - }) - .then(function(fields) { - var bulkDel = []; - _.forEach(_cfs, function(elem) { - if (_.includes(fields, elem.name)) { - bulkDel.push(sequelize.query(util.format('ALTER TABLE cm_contacts DROP COLUMN %s', elem.name))); - } - }); - return bulkDel; - }) -} - -exports.removeCustomField = function(req, res) { - var _cf; - return CustomField - .findById(req.params.id) - .then(function(cf) { - if (!cf) { - return res.sendStatus(404); - } - _cf = cf; - return CustomField - .destroy({ - where: { - id: req.params.id - } - }); - }) - .then(function() { - return Contact - .describe(); - }) - .then(function(tableFields) { - return _.keys(tableFields); - }) - .then(function(fields) { - if (_.includes(fields, _cf.name)) { - return sequelize.query(util.format('ALTER TABLE cm_contacts DROP COLUMN %s', _cf.name)); - } - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.removeAllCustomFields = function(req, res) { - var _cfs; - return CustomField - .findAll({ - where: { - id: req.query.ids - } - }) - .then(function(cfs) { - if (!cfs) { - return res.sendStatus(404); - } - _cfs = cfs; - return CustomField - .destroy({ - where: { - id: req.query.ids - } - }); - }) - .then(function() { - return Contact - .describe(); - }) - .then(function(tableFields) { - return _.keys(tableFields); - }) - .then(function(fields) { - var bulkDel = []; - _cfs.forEach(function(elem) { - if (_.includes(fields, elem.name)) { - bulkDel.push(sequelize.query(util.format('ALTER TABLE cm_contacts DROP COLUMN %s', elem.name))); - } - }); - return bulkDel; - }) - .all() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xd288=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4C\x69\x73\x74","\x55\x73\x65\x72\x48\x61\x73\x4C\x69\x73\x74","\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x69\x64","\x6D\x61\x70","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x67\x65\x74\x4C\x69\x73\x74\x73","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x67\x65\x74\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x6C\x6F\x67","\x70\x61\x72\x61\x6D\x73","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74","\x62\x6F\x64\x79","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73","\x70\x68\x6F\x6E\x65","\x6D\x6F\x62\x69\x6C\x65","\x66\x61\x78","\x65\x6D\x61\x69\x6C","\x77\x68\x65\x72\x65","\x25","\x66\x6F\x72\x49\x6E","\x6C\x65\x6E\x67\x74\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x73\x61\x76\x65","\x63\x72\x65\x61\x74\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x4C\x69\x73\x74\x49\x64","\x41\x4C\x54\x45\x52\x20\x54\x41\x42\x4C\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x41\x44\x44\x20\x43\x4F\x4C\x55\x4D\x4E\x20\x25\x73\x20\x56\x41\x52\x43\x48\x41\x52\x28\x32\x35\x35\x29","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x63\x66\x5F","\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x68\x6F\x77","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x4C\x49\x53\x54","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x6C\x69\x73\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x75\x70\x64\x61\x74\x65","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x67\x65\x74\x55\x73\x65\x72\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x41\x4C\x54\x45\x52\x20\x54\x41\x42\x4C\x45\x20\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73\x20\x44\x52\x4F\x50\x20\x43\x4F\x4C\x55\x4D\x4E\x20\x25\x73","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x72\x65\x6D\x6F\x76\x65\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x43\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64\x73","\x69\x64\x73"];_0xd288[0];var _=require(_0xd288[1]);var util=require(_0xd288[2]);var User=require(_0xd288[4])[_0xd288[3]];var List=require(_0xd288[4])[_0xd288[5]];var UserHasList=require(_0xd288[4])[_0xd288[6]];var CustomField=require(_0xd288[4])[_0xd288[7]];var Contact=require(_0xd288[4])[_0xd288[8]];var Util=require(_0xd288[9]);var sequelize=require(_0xd288[4])[_0xd288[10]];exports[_0xd288[11]]= function(_0x6e1cxa,_0x6e1cxb,_0x6e1cxc){switch(_0x6e1cxa[_0xd288[25]][_0xd288[28]]){case _0xd288[27]:return User[_0xd288[26]](_0x6e1cxa[_0xd288[25]][_0xd288[16]])[_0xd288[15]](function(_0x6e1cx11){return _0x6e1cx11[_0xd288[24]]()})[_0xd288[15]](function(_0x6e1cxf){var _0x6e1cx10=_[_0xd288[17]](_0x6e1cxf,_0xd288[16]);return List[_0xd288[23]](_0xd288[22])[_0xd288[21]](_[_0xd288[20]](Util[_0xd288[19]](_0x6e1cxa[_0xd288[18]],{$or:[{defaultEntry:true},{id:_0x6e1cx10}]}),{distinct:true}))})[_0xd288[15]](function(_0x6e1cxe){_0x6e1cxb[_0xd288[14]](200)[_0xd288[13]](_0x6e1cxe)})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)});default:return List[_0xd288[23]](_0xd288[22])[_0xd288[21]](_[_0xd288[20]](Util[_0xd288[19]](_0x6e1cxa[_0xd288[18]]),{distinct:true}))[_0xd288[15]](function(_0x6e1cxe){_0x6e1cxb[_0xd288[14]](200)[_0xd288[13]](_0x6e1cxe)})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})}};exports[_0xd288[29]]= function(_0x6e1cxa,_0x6e1cxb){return CustomField[_0xd288[21]]({where:{ListId:_0x6e1cxa[_0xd288[31]][_0xd288[16]]}})[_0xd288[15]](function(_0x6e1cx12){return _0x6e1cxb[_0xd288[14]](200)[_0xd288[13]](_0x6e1cx12)})[_0xd288[12]](function(_0x6e1cxd){console[_0xd288[30]](_0x6e1cxd);return handleError(_0x6e1cxb,_0x6e1cxd)})};exports[_0xd288[32]]= function(_0x6e1cxa,_0x6e1cxb){var _0x6e1cx13=_[_0xd288[20]](_0x6e1cxa[_0xd288[33]],{ListId:_0x6e1cxa[_0xd288[31]][_0xd288[16]]});return Contact[_0xd288[35]]({where:_0x6e1cx13,default:_0x6e1cxa[_0xd288[33]]})[_0xd288[34]](function(_0x6e1cx14){return _0x6e1cxb[_0xd288[14]](200)[_0xd288[13]](_0x6e1cx14)})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})};exports[_0xd288[36]]= function(_0x6e1cxa,_0x6e1cxb){var _0x6e1cx15={where:{ListId:_0x6e1cxa[_0xd288[31]][_0xd288[16]]},attributes:[_0xd288[37],_0xd288[38],_0xd288[39],_0xd288[40]]};_[_0xd288[43]](_0x6e1cxa[_0xd288[18]],function(_0x6e1cx16,_0x6e1cx17){_0x6e1cx15[_0xd288[41]][_0x6e1cx17]= {$like:_0xd288[42]+ _0x6e1cx16+ _0xd288[42]}});return Contact[_0xd288[45]](_0x6e1cx15)[_0xd288[15]](function(_0x6e1cx18){return _0x6e1cxb[_0xd288[14]](200)[_0xd288[13]]({rows:_0x6e1cx18,length:_0x6e1cx18[_0xd288[44]]})})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})};exports[_0xd288[46]]= function(_0x6e1cxa,_0x6e1cxb){return CustomField[_0xd288[26]](_0x6e1cxa[_0xd288[31]][_0xd288[16]])[_0xd288[15]](function(_0x6e1cx19){if(!_0x6e1cx19){return _0x6e1cxb[_0xd288[47]](404)};return _0x6e1cxb[_0xd288[14]](200)[_0xd288[13]](_0x6e1cx19)})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})};exports[_0xd288[48]]= function(_0x6e1cxa,_0x6e1cxb){return CustomField[_0xd288[26]](_0x6e1cxa[_0xd288[31]][_0xd288[16]])[_0xd288[15]](function(_0x6e1cx19){if(!_0x6e1cx19){return _0x6e1cxb[_0xd288[47]](404)};var _0x6e1cx1a=_[_0xd288[20]](_0x6e1cx19,_0x6e1cxa[_0xd288[33]]);return _0x6e1cx1a[_0xd288[49]]()})[_0xd288[15]](function(_0x6e1cx19){return _0x6e1cxb[_0xd288[14]](200)[_0xd288[13]](_0x6e1cx19)})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})};exports[_0xd288[50]]= function(_0x6e1cxa,_0x6e1cxb){var _0x6e1cx1b;_0x6e1cxa[_0xd288[33]][_0xd288[51]]= _0x6e1cxa[_0xd288[31]][_0xd288[16]];return sequelize[_0xd288[57]](function(_0x6e1cx1c){return CustomField[_0xd288[56]](_0x6e1cxa[_0xd288[33]])[_0xd288[15]](function(_0x6e1cx19){_0x6e1cx1b= _0x6e1cx19;_0x6e1cx19[_0xd288[53]]= _0xd288[55]+ _0x6e1cx19[_0xd288[16]];return _0x6e1cx19[_0xd288[49]]()})[_0xd288[15]](function(){return sequelize[_0xd288[18]](util[_0xd288[54]](_0xd288[52],_0x6e1cx1b[_0xd288[53]]))})[_0xd288[15]](function(){return _0x6e1cxb[_0xd288[47]](201)})})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})};exports[_0xd288[58]]= function(_0x6e1cxa,_0x6e1cxb){return List[_0xd288[26]](_0x6e1cxa[_0xd288[31]][_0xd288[16]])[_0xd288[15]](function(_0x6e1cx1d){if(!_0x6e1cx1d){return _0x6e1cxb[_0xd288[47]](404)};return _0x6e1cxb[_0xd288[13]](_0x6e1cx1d)})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})};exports[_0xd288[56]]= function(_0x6e1cxa,_0x6e1cxb){return sequelize[_0xd288[57]](function(_0x6e1cx1c){return List[_0xd288[56]](_0x6e1cxa[_0xd288[33]])[_0xd288[15]](function(_0x6e1cx1d){return _0x6e1cxb[_0xd288[14]](201)[_0xd288[13]](_0x6e1cx1d)})})[_0xd288[12]](sequelize.UniqueConstraintError,function(_0x6e1cxd){_0x6e1cxd[_0xd288[59]]= _0xd288[60];_0x6e1cxd[_0xd288[61]]= _0xd288[62];return _0x6e1cxb[_0xd288[14]](500)[_0xd288[13]](_0x6e1cxd)})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})};exports[_0xd288[63]]= function(_0x6e1cxa,_0x6e1cxb){return List[_0xd288[26]](_0x6e1cxa[_0xd288[31]][_0xd288[16]])[_0xd288[15]](function(_0x6e1cx1d){if(!_0x6e1cx1d){return _0x6e1cxb[_0xd288[47]](404)};if(_0x6e1cxa[_0xd288[33]][_0xd288[16]]){delete _0x6e1cxa[_0xd288[33]][_0xd288[16]]};var _0x6e1cx1a=_[_0xd288[20]](_0x6e1cx1d,_0x6e1cxa[_0xd288[33]]);return _0x6e1cx1a[_0xd288[49]]()})[_0xd288[15]](function(_0x6e1cx1d){return _0x6e1cxb[_0xd288[14]](200)[_0xd288[13]](_0x6e1cx1d)})[_0xd288[12]](sequelize.UniqueConstraintError,function(_0x6e1cxd){_0x6e1cxd[_0xd288[59]]= _0xd288[60];_0x6e1cxd[_0xd288[61]]= _0xd288[62];return _0x6e1cxb[_0xd288[14]](500)[_0xd288[13]](_0x6e1cxd)})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})};exports[_0xd288[64]]= function(_0x6e1cxa,_0x6e1cxb){return List[_0xd288[26]](_0x6e1cxa[_0xd288[31]][_0xd288[16]])[_0xd288[15]](function(_0x6e1cx1d){if(!_0x6e1cx1d){return _0x6e1cxb[_0xd288[47]](404)};return _0x6e1cx1d[_0xd288[66]]({where:{role:_0xd288[27]},attributes:[_0xd288[16],_0xd288[53],_0xd288[65],_0xd288[40]]})})[_0xd288[15]](function(_0x6e1cx1e){return _0x6e1cxb[_0xd288[14]](200)[_0xd288[13]]({rows:_0x6e1cx1e,count:_0x6e1cx1e[_0xd288[44]]})})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})};exports[_0xd288[67]]= function(_0x6e1cxa,_0x6e1cxb,_0x6e1cxc){return User[_0xd288[45]]({where:{id:_0x6e1cxa[_0xd288[33]][_0xd288[69]]}})[_0xd288[15]](function(_0x6e1cx1f){var _0x6e1cx20=_[_0xd288[17]](_0x6e1cx1f,function(_0x6e1cx21){return {list:_0x6e1cxa[_0xd288[31]][_0xd288[16]],membername:_0x6e1cx21[_0xd288[53]],UserId:_0x6e1cx21[_0xd288[16]]}});return UserHasList[_0xd288[68]](_0x6e1cx20,{individualHooks:true})})[_0xd288[15]](function(){return _0x6e1cxb[_0xd288[47]](200)})[_0xd288[12]](function(_0x6e1cxd){console[_0xd288[30]](_0x6e1cxd);return _0x6e1cxc(_0x6e1cxd)})};exports[_0xd288[70]]= function(_0x6e1cxa,_0x6e1cxb,_0x6e1cxc){return UserHasList[_0xd288[71]]({where:{UserId:_0x6e1cxa[_0xd288[18]][_0xd288[69]],list:_0x6e1cxa[_0xd288[31]][_0xd288[16]]},individualHooks:true})[_0xd288[15]](function(){return _0x6e1cxb[_0xd288[47]](202)})[_0xd288[12]](function(_0x6e1cxd){return _0x6e1cxc(_0x6e1cxd)})};exports[_0xd288[71]]= function(_0x6e1cxa,_0x6e1cxb){return destroyList(_0x6e1cxa[_0xd288[31]][_0xd288[16]],_0x6e1cxb)};exports[_0xd288[72]]= function(_0x6e1cxa,_0x6e1cxb){return destroyList(_0x6e1cxa[_0xd288[18]][_0xd288[16]],_0x6e1cxb)};function destroyList(_0x6e1cx23,_0x6e1cxb){return delCf(_0x6e1cx23,_0x6e1cxb)[_0xd288[73]]()[_0xd288[15]](function(){return List[_0xd288[71]]({where:{id:_0x6e1cx23},individualHooks:true})})[_0xd288[15]](function(){return _0x6e1cxb[_0xd288[47]](204)})[_0xd288[12]](function(_0x6e1cxd){console[_0xd288[30]](_0x6e1cxd);return handleError(_0x6e1cxb,_0x6e1cxd)})}function delCf(_0x6e1cx23,_0x6e1cxb){var _0x6e1cx25;return CustomField[_0xd288[45]]({where:{ListId:_0x6e1cx23}})[_0xd288[15]](function(_0x6e1cx2a){if(!_0x6e1cx2a){return _0x6e1cxb[_0xd288[47]](404)};_0x6e1cx25= _0x6e1cx2a;return CustomField[_0xd288[71]]({where:{id:_0x6e1cx23}})})[_0xd288[15]](function(){return Contact[_0xd288[79]]()})[_0xd288[15]](function(_0x6e1cx29){return _[_0xd288[78]](_0x6e1cx29)})[_0xd288[15]](function(_0x6e1cx26){var _0x6e1cx27=[];_[_0xd288[77]](_0x6e1cx25,function(_0x6e1cx28){if(_[_0xd288[74]](_0x6e1cx26,_0x6e1cx28[_0xd288[53]])){_0x6e1cx27[_0xd288[76]](sequelize[_0xd288[18]](util[_0xd288[54]](_0xd288[75],_0x6e1cx28[_0xd288[53]])))}});return _0x6e1cx27})}exports[_0xd288[80]]= function(_0x6e1cxa,_0x6e1cxb){var _0x6e1cx2b;return CustomField[_0xd288[26]](_0x6e1cxa[_0xd288[31]][_0xd288[16]])[_0xd288[15]](function(_0x6e1cx2c){if(!_0x6e1cx2c){return _0x6e1cxb[_0xd288[47]](404)};_0x6e1cx2b= _0x6e1cx2c;return CustomField[_0xd288[71]]({where:{id:_0x6e1cxa[_0xd288[31]][_0xd288[16]]}})})[_0xd288[15]](function(){return Contact[_0xd288[79]]()})[_0xd288[15]](function(_0x6e1cx29){return _[_0xd288[78]](_0x6e1cx29)})[_0xd288[15]](function(_0x6e1cx26){if(_[_0xd288[74]](_0x6e1cx26,_0x6e1cx2b[_0xd288[53]])){return sequelize[_0xd288[18]](util[_0xd288[54]](_0xd288[75],_0x6e1cx2b[_0xd288[53]]))}})[_0xd288[15]](function(){return _0x6e1cxb[_0xd288[47]](204)})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})};exports[_0xd288[81]]= function(_0x6e1cxa,_0x6e1cxb){var _0x6e1cx25;return CustomField[_0xd288[45]]({where:{id:_0x6e1cxa[_0xd288[18]][_0xd288[82]]}})[_0xd288[15]](function(_0x6e1cx2a){if(!_0x6e1cx2a){return _0x6e1cxb[_0xd288[47]](404)};_0x6e1cx25= _0x6e1cx2a;return CustomField[_0xd288[71]]({where:{id:_0x6e1cxa[_0xd288[18]][_0xd288[82]]}})})[_0xd288[15]](function(){return Contact[_0xd288[79]]()})[_0xd288[15]](function(_0x6e1cx29){return _[_0xd288[78]](_0x6e1cx29)})[_0xd288[15]](function(_0x6e1cx26){var _0x6e1cx27=[];_0x6e1cx25[_0xd288[77]](function(_0x6e1cx28){if(_[_0xd288[74]](_0x6e1cx26,_0x6e1cx28[_0xd288[53]])){_0x6e1cx27[_0xd288[76]](sequelize[_0xd288[18]](util[_0xd288[54]](_0xd288[75],_0x6e1cx28[_0xd288[53]])))}});return _0x6e1cx27})[_0xd288[73]]()[_0xd288[15]](function(){return _0x6e1cxb[_0xd288[47]](204)})[_0xd288[12]](function(_0x6e1cxd){return handleError(_0x6e1cxb,_0x6e1cxd)})};function handleError(_0x6e1cxb,_0x6e1cxd){return _0x6e1cxb[_0xd288[14]](500)[_0xd288[13]](_0x6e1cxd)} \ No newline at end of file diff --git a/server/api/list/list.events.js b/server/api/list/list.events.js index 0cb87f0..c09869a 100644 --- a/server/api/list/list.events.js +++ b/server/api/list/list.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const List = require('../../models').List; - -var ListEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ListEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - List.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ListEvents.emit(event + ':' + doc._id, doc); - ListEvents.emit(event, doc); - done(null); - } -} - -module.exports = ListEvents; +var _0xde27=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4C\x69\x73\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xde27[0];const EventEmitter=require(_0xde27[1]);const List=require(_0xde27[3])[_0xde27[2]];var ListEvents= new EventEmitter();ListEvents[_0xde27[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xde27[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xde27[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xde27[6]};for(var e in events){var event=events[e];List[_0xde27[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x590ax8,_0x590ax9,_0x590axa){ListEvents[_0xde27[10]](event+ _0xde27[8]+ _0x590ax8[_0xde27[9]],_0x590ax8);ListEvents[_0xde27[10]](event,_0x590ax8);_0x590axa(null)}}module[_0xde27[11]]= ListEvents \ No newline at end of file diff --git a/server/api/list/list.socket.js b/server/api/list/list.socket.js index c79e17b..bae7774 100644 --- a/server/api/list/list.socket.js +++ b/server/api/list/list.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ListEvents = require('./list.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('list:' + event, socket); - - ListEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ListEvents.removeListener(event, listener); - }; -} +var _0xc0a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6C\x69\x73\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6C\x69\x73\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xc0a3[0];const ListEvents=require(_0xc0a3[1]);var events=[_0xc0a3[2],_0xc0a3[3]];exports[_0xc0a3[4]]= function(_0xa068x3){for(var _0xa068x4=0,_0xa068x5=events[_0xc0a3[5]];_0xa068x4< _0xa068x5;_0xa068x4++){var _0xa068x6=events[_0xa068x4];var _0xa068x7=createListener(_0xc0a3[6]+ _0xa068x6,_0xa068x3);ListEvents[_0xc0a3[7]](_0xa068x6,_0xa068x7);_0xa068x3[_0xc0a3[7]](_0xc0a3[8],removeListener(_0xa068x6,_0xa068x7))}};function createListener(_0xa068x6,_0xa068x3){return function(_0xa068x9){_0xa068x3[_0xc0a3[9]](_0xa068x6,_0xa068x9)}}function removeListener(_0xa068x6,_0xa068x7){return function(){ListEvents[_0xc0a3[10]](_0xa068x6,_0xa068x7)}} \ No newline at end of file diff --git a/server/api/mail_account/index.js b/server/api/mail_account/index.js index c41e67f..4d45620 100644 --- a/server/api/mail_account/index.js +++ b/server/api/mail_account/index.js @@ -1,31 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./mail_account.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.index); -router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.show); -router.get('/account/:address', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.showFromAddress); -router.get('/:id/applications', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.showApplications); -router.get('/:id/applications/:appId', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.showApplication); -router.get('/:id/rooms', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.getMailRooms); -router.get('/:id/dispositions', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.getDispositions); -router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.create); -router.post('/:id/applications', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.createApplication); -router.post('/:id/dispositions', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.createDisposition); -router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.update); -router.put('/:id/applications', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.updateApplications); -router.put('/:id/applications/:appId', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.updateApplication); -router.put('/:id/dispositions/:dispId', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.updateDisposition); -router.delete('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.bulkDestroy); -router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroy); -router.delete('/:id/applications', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.bulkDestroyApplications); -router.delete('/:id/applications/:appId', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroyApplication); -router.delete('/:id/dispositions/:dispId', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroyDisposition); - -module.exports = router; +var _0x9744=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x3A\x61\x64\x64\x72\x65\x73\x73","\x73\x68\x6F\x77\x46\x72\x6F\x6D\x41\x64\x64\x72\x65\x73\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x72\x6F\x6F\x6D\x73","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x3A\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x9744[0];var express=require(_0x9744[1]);var controller=require(_0x9744[2]);var auth=require(_0x9744[3]);var license=require(_0x9744[4]);var router=express.Router();router[_0x9744[13]](_0x9744[5],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9],_0x9744[10]]),controller[_0x9744[12]]);router[_0x9744[13]](_0x9744[14],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9],_0x9744[10]]),controller[_0x9744[15]]);router[_0x9744[13]](_0x9744[16],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9],_0x9744[10]]),controller[_0x9744[17]]);router[_0x9744[13]](_0x9744[18],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[19]]);router[_0x9744[13]](_0x9744[20],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[21]]);router[_0x9744[13]](_0x9744[22],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9],_0x9744[10]]),controller[_0x9744[23]]);router[_0x9744[13]](_0x9744[24],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9],_0x9744[10]]),controller[_0x9744[25]]);router[_0x9744[27]](_0x9744[5],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[26]]);router[_0x9744[27]](_0x9744[18],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[28]]);router[_0x9744[27]](_0x9744[24],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[29]]);router[_0x9744[31]](_0x9744[14],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[30]]);router[_0x9744[31]](_0x9744[18],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[32]]);router[_0x9744[31]](_0x9744[20],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[33]]);router[_0x9744[31]](_0x9744[34],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[35]]);router[_0x9744[37]](_0x9744[5],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[36]]);router[_0x9744[37]](_0x9744[14],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[38]]);router[_0x9744[37]](_0x9744[18],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[39]]);router[_0x9744[37]](_0x9744[20],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[40]]);router[_0x9744[37]](_0x9744[34],license[_0x9744[6]](),license[_0x9744[7]](),auth[_0x9744[8]](),auth[_0x9744[11]]([9],[_0x9744[9]]),controller[_0x9744[41]]);module[_0x9744[42]]= router \ No newline at end of file diff --git a/server/api/mail_account/mail_account.controller.js b/server/api/mail_account/mail_account.controller.js index 31adb32..cbbf849 100644 --- a/server/api/mail_account/mail_account.controller.js +++ b/server/api/mail_account/mail_account.controller.js @@ -1,527 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var async = require('async'); - -var Util = require('../../config/util'); - -var sequelize = require('../../models').sequelize; -var User = require('../../models').User; -var MailAttachment = require('../../models').MailAttachment; -var MailQueue = require('../../models').MailQueue; -var MailRoom = require('../../models').MailRoom; -var MailAccount = require('../../models').MailAccount; -var MailServerIn = require('../../models').MailServerIn; -var MailServerOut = require('../../models').MailServerOut; -var MailApplication = require('../../models').MailApplication; -var MailDisposition = require('../../models').MailDisposition; -var Interval = require('../../models').Interval; - -// Get list of mailAccounts -exports.index = function(req, res) { - return MailAccount - .scope('default') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getMailRooms = function(req, res, next) { - var _query = { - include: [], - where: { - MailAccountId: req.params.id, - $and: [] - }, - attributes: ['id', 'subject', 'from', 'attachment', 'disposition', 'tags', 'waiting', 'lastEvent', 'updatedAt'] - }; - - // TO MOVE SOON INTO AN EXTENAL UTIL FILE - if (req.query) { - if (req.query.tags) { - if (_.isArray(req.query.tags)) { - for (var i = 0; i < req.query.tags.length; i++) { - _query.where.$and.push({ - tags: { - $like: '%' + req.query.tags[i] + ';%' - } - }); - } - } else { - _query.where.$and.push({ - tags: { - $like: '%' + req.query.tags + ';%' - } - }); - } - delete req.query.tags; - } - _.merge(_query.where, req.query); - } - - switch (req.user.role) { - case 'agent': - _query.include.push({ - model: User, - attributes: ['id'] - }); - - var _agents; - var _agentQueues; - var _accountQueues; - - return User - .findById(req.user.id) - .then(function(user) { - if (user) { - return user - .getMailQueues(); - } else { - return []; - } - }) - .then(function(queues) { - _agentQueues = _.map(queues, 'id'); - - return MailAccount - .findById(req.params.id); - }) - .then(function(account) { - return account - .getMailApplications({ - where: { - $or: [{ - app: 'queue' - }, { - app: 'agent' - }] - } - }); - }) - .then(function(apps) { - _agents = _.map(_.find(apps, { - 'app': 'agent' - }), 'UserId'); - - _accountQueues = _.map(_.find(apps, { - 'app': 'queue' - }), 'MailQueueId'); - - if (_.intersection(_agentQueues, _accountQueues).length || _.intersection(_agents, [req.user.id]).length) { - return MailRoom - .findAll(_query) - .then(function(mailRooms) { - return res.status(200).send(mailRooms); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); - } else { - - return res.status(200).send([]); - } - }) - .catch(function(err) { - console.error(err); - }); - - default: - - return MailRoom - .findAll(_query) - .then(function(mailRooms) { - return res.status(200).send(mailRooms); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); - } -}; - -exports.getDispositions = function(req, res, next) { - return MailAccount - .findById(req.params.id) - .then(function(mailAccount) { - if (!mailAccount) { - return res.sendStatus(404); - } - - return mailAccount - .getMailDispositions(); - }) - .then(function(mailDispositions) { - return res.status(200).send({ - rows: mailDispositions, - count: mailDispositions.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single mailAccount -exports.show = function(req, res, next) { - return MailAccount - .scope('default') - .findById(req.params.id) - .then(function(mailAccount) { - if (!mailAccount) { - return res.sendStatus(404); - } - return res.send(mailAccount); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showFromAddress = function(req, res, next) { - return MailAccount - .findOne({ - where: { - address: req.params.address - } - }) - .then(function(mailAccount) { - if (!mailAccount) { - return res.sendStatus(404); - } - return res.send(mailAccount); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single mailAccount -exports.showApplications = function(req, res, next) { - return MailAccount - .scope('default') - .findById(req.params.id) - .then(function(mailAccount) { - if (!mailAccount) { - return res.sendStatus(404); - } - return mailAccount - .getMailApplications(_.merge(Util.getQuery(req.query), { - include: [{ - model: MailQueue, - attributes: ['id', 'name'] - }, { - model: User, - attributes: ['id', 'name', 'online'] - }, { - model: Interval, - attributes: ['id', 'name'] - }] - })); - }) - .then(function(mailApplications) { - return res.send({ - count: mailApplications.length, - rows: mailApplications - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new mailAccount in the DB. -exports.create = function(req, res, next) { - return sequelize.transaction(function(t) { - return MailAccount - .create(req.body, { - include: [{ - model: MailServerIn - }, { - model: MailServerOut - }], - transaction: t - }); - }).then(function(mailAccount) { - return res.status(201).send(mailAccount); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new mailApplication in the DB. -exports.createApplication = function(req, res, next) { - - return MailApplication - .max('priority', { - where: { - MailAccountId: req.params.id - } - }).then(function(max) { - // SET PRIORITY - req.body.priority = max ? ++max : 1; - req.body.MailAccountId = req.params.id; - - return MailApplication - .create(req.body); - }) - .then(function(mailApplication) { - return res.status(201).send(mailApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new mailAccount in the DB. -exports.createDisposition = function(req, res, next) { - req.body.MailAccountId = req.params.id; - - return MailDisposition - .create(req.body) - .then(function(mailDiposition) { - return res.status(201).send(mailDiposition); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -// Updates an existing mailAccount in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return MailAccount - .findById(req.params.id) - .then(function(mailAccount) { - if (!mailAccount) { - return res.sendStatus(404); - } - var updated = _.merge(mailAccount, req.body); - return updated - .save(); - }) - .then(function(mailAccount) { - return res.status(200).send(mailAccount); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing mailAccount in the DB. -exports.updateDisposition = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return MailDisposition - .findById(req.params.dispId) - .then(function(mailDisposition) { - if (!mailDisposition) { - return res.sendStatus(404); - } - var updated = _.merge(mailDisposition, req.body); - return updated - .save(); - }) - .then(function(mailAccount) { - return res.status(200).send(mailAccount); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing mailAccount in the DB. -exports.updateApplications = function(req, res) { - - var priority = 0; - var apps = req.body; - - apps.forEach(function(app) { - delete app.id; - delete app.createdAt; - delete app.updatedAt; - - app.priority = ++priority; - }); - - return sequelize.transaction(function(t) { - return MailApplication - .destroy({ - where: { - MailAccountId: req.params.id - }, - individualHooks: true, - transaction: t - }).then(function(mailApplication) { - return MailApplication - .bulkCreate(apps, { - individualHooks: true, - transaction: t - }); - }); - }).then(function(mailAccounts) { - return res.status(200).send({ - count: mailAccounts.length, - rows: mailAccounts - }); - }).catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a mailAccount from the DB. -exports.destroy = function(req, res, next) { - return MailAccount - .findById(req.params.id) - .then(function(mailAccount) { - if (!mailAccount) { - return res.sendStatus(404); - } - - return mailAccount - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a mailAccount from the DB. -exports.destroyApplication = function(req, res, next) { - return MailApplication - .findById(req.params.appId) - .then(function(mailApplication) { - if (!mailApplication) { - return res.sendStatus(404); - } - - return mailApplication - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a mailAccount from the DB. -exports.destroyDisposition = function(req, res, next) { - return MailDisposition - .findById(req.params.dispId) - .then(function(mailDiposition) { - if (!mailDiposition) { - return res.sendStatus(404); - } - - return mailDiposition - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return MailAccount - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a agent from the DB. -exports.bulkDestroyApplications = function(req, res) { - return MailApplication - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showApplication = function(req, res) { - return MailApplication - .findById(req.params.appId, { - include: [{ - all: true - }] - }) - .then(function(mailApplication) { - if (!mailApplication) { - return res.sendStatus(404); - } - return res.send(mailApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.updateApplication = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return MailApplication - .findById(req.params.appId) - .then(function(mailApplication) { - if (!mailApplication) { - return res.sendStatus(404); - } - var updated = _.merge(mailApplication, req.body); - return updated - .save(); - }) - .then(function(mailApplication) { - return res.status(200).send(mailApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -function handleError(res, err) { - console.log(err); - return res.status(500).send(err); -} +var _0x2d7a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x75\x62\x6A\x65\x63\x74","\x66\x72\x6F\x6D","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x74\x61\x67\x73","\x77\x61\x69\x74\x69\x6E\x67","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x25","\x3B\x25","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x6D\x65\x72\x67\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x55\x73\x65\x72\x49\x64","\x6D\x61\x70","\x71\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x49\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x75\x73\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x6F\x6C\x65","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x67\x65\x74\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x46\x72\x6F\x6D\x41\x64\x64\x72\x65\x73\x73","\x61\x64\x64\x72\x65\x73\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6C\x6F\x67"];_0x2d7a[0];var _=require(_0x2d7a[1]);var util=require(_0x2d7a[2]);var async=require(_0x2d7a[3]);var Util=require(_0x2d7a[4]);var sequelize=require(_0x2d7a[6])[_0x2d7a[5]];var User=require(_0x2d7a[6])[_0x2d7a[7]];var MailAttachment=require(_0x2d7a[6])[_0x2d7a[8]];var MailQueue=require(_0x2d7a[6])[_0x2d7a[9]];var MailRoom=require(_0x2d7a[6])[_0x2d7a[10]];var MailAccount=require(_0x2d7a[6])[_0x2d7a[11]];var MailServerIn=require(_0x2d7a[6])[_0x2d7a[12]];var MailServerOut=require(_0x2d7a[6])[_0x2d7a[13]];var MailApplication=require(_0x2d7a[6])[_0x2d7a[14]];var MailDisposition=require(_0x2d7a[6])[_0x2d7a[15]];var Interval=require(_0x2d7a[6])[_0x2d7a[16]];exports[_0x2d7a[17]]= function(_0x1710x10,_0x1710x11){return MailAccount[_0x2d7a[26]](_0x2d7a[25])[_0x2d7a[24]](Util[_0x2d7a[23]](_0x1710x10[_0x2d7a[22]]))[_0x2d7a[21]](function(_0x1710x13){_0x1710x11[_0x2d7a[20]](200)[_0x2d7a[19]](_0x1710x13)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[27]]= function(_0x1710x10,_0x1710x11,_0x1710x14){var _0x1710x15={include:[],where:{MailAccountId:_0x1710x10[_0x2d7a[29]][_0x2d7a[28]],$and:[]},attributes:[_0x2d7a[28],_0x2d7a[30],_0x2d7a[31],_0x2d7a[32],_0x2d7a[33],_0x2d7a[34],_0x2d7a[35],_0x2d7a[36],_0x2d7a[37]]};if(_0x1710x10[_0x2d7a[22]]){if(_0x1710x10[_0x2d7a[22]][_0x2d7a[34]]){if(_[_0x2d7a[38]](_0x1710x10[_0x2d7a[22]][_0x2d7a[34]])){for(var _0x1710x16=0;_0x1710x16< _0x1710x10[_0x2d7a[22]][_0x2d7a[34]][_0x2d7a[39]];_0x1710x16++){_0x1710x15[_0x2d7a[44]][_0x2d7a[43]][_0x2d7a[42]]({tags:{$like:_0x2d7a[40]+ _0x1710x10[_0x2d7a[22]][_0x2d7a[34]][_0x1710x16]+ _0x2d7a[41]}})}}else {_0x1710x15[_0x2d7a[44]][_0x2d7a[43]][_0x2d7a[42]]({tags:{$like:_0x2d7a[40]+ _0x1710x10[_0x2d7a[22]][_0x2d7a[34]]+ _0x2d7a[41]}})};delete _0x1710x10[_0x2d7a[22]][_0x2d7a[34]]};_[_0x2d7a[45]](_0x1710x15[_0x2d7a[44]],_0x1710x10[_0x2d7a[22]])};switch(_0x1710x10[_0x2d7a[55]][_0x2d7a[60]]){case _0x2d7a[48]:_0x1710x15[_0x2d7a[46]][_0x2d7a[42]]({model:User,attributes:[_0x2d7a[28]]});var _0x1710x17;var _0x1710x18;var _0x1710x19;return User[_0x2d7a[58]](_0x1710x10[_0x2d7a[55]][_0x2d7a[28]])[_0x2d7a[21]](function(_0x1710x1e){if(_0x1710x1e){return _0x1710x1e[_0x2d7a[59]]()}else {return []}})[_0x2d7a[21]](function(_0x1710x1d){_0x1710x18= _[_0x2d7a[51]](_0x1710x1d,_0x2d7a[28]);return MailAccount[_0x2d7a[58]](_0x1710x10[_0x2d7a[29]][_0x2d7a[28]])})[_0x2d7a[21]](function(_0x1710x1c){return _0x1710x1c[_0x2d7a[57]]({where:{$or:[{app:_0x2d7a[52]},{app:_0x2d7a[48]}]}})})[_0x2d7a[21]](function(_0x1710x1a){_0x1710x17= _[_0x2d7a[51]](_[_0x2d7a[49]](_0x1710x1a,{"\x61\x70\x70":_0x2d7a[48]}),_0x2d7a[50]);_0x1710x19= _[_0x2d7a[51]](_[_0x2d7a[49]](_0x1710x1a,{"\x61\x70\x70":_0x2d7a[52]}),_0x2d7a[53]);if(_[_0x2d7a[54]](_0x1710x18,_0x1710x19)[_0x2d7a[39]]|| _[_0x2d7a[54]](_0x1710x17,[_0x1710x10[_0x2d7a[55]][_0x2d7a[28]]])[_0x2d7a[39]]){return MailRoom[_0x2d7a[56]](_0x1710x15)[_0x2d7a[21]](function(_0x1710x1b){return _0x1710x11[_0x2d7a[20]](200)[_0x2d7a[19]](_0x1710x1b)})[_0x2d7a[18]](function(_0x1710x12){console[_0x2d7a[47]](_0x1710x12);return handleError(_0x1710x11,_0x1710x12)})}else {return _0x1710x11[_0x2d7a[20]](200)[_0x2d7a[19]]([])}})[_0x2d7a[18]](function(_0x1710x12){console[_0x2d7a[47]](_0x1710x12)});default:return MailRoom[_0x2d7a[56]](_0x1710x15)[_0x2d7a[21]](function(_0x1710x1b){return _0x1710x11[_0x2d7a[20]](200)[_0x2d7a[19]](_0x1710x1b)})[_0x2d7a[18]](function(_0x1710x12){console[_0x2d7a[47]](_0x1710x12);return handleError(_0x1710x11,_0x1710x12)})}};exports[_0x2d7a[61]]= function(_0x1710x10,_0x1710x11,_0x1710x14){return MailAccount[_0x2d7a[58]](_0x1710x10[_0x2d7a[29]][_0x2d7a[28]])[_0x2d7a[21]](function(_0x1710x20){if(!_0x1710x20){return _0x1710x11[_0x2d7a[62]](404)};return _0x1710x20[_0x2d7a[63]]()})[_0x2d7a[21]](function(_0x1710x1f){return _0x1710x11[_0x2d7a[20]](200)[_0x2d7a[19]]({rows:_0x1710x1f,count:_0x1710x1f[_0x2d7a[39]]})})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[64]]= function(_0x1710x10,_0x1710x11,_0x1710x14){return MailAccount[_0x2d7a[26]](_0x2d7a[25])[_0x2d7a[58]](_0x1710x10[_0x2d7a[29]][_0x2d7a[28]])[_0x2d7a[21]](function(_0x1710x20){if(!_0x1710x20){return _0x1710x11[_0x2d7a[62]](404)};return _0x1710x11[_0x2d7a[19]](_0x1710x20)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[65]]= function(_0x1710x10,_0x1710x11,_0x1710x14){return MailAccount[_0x2d7a[67]]({where:{address:_0x1710x10[_0x2d7a[29]][_0x2d7a[66]]}})[_0x2d7a[21]](function(_0x1710x20){if(!_0x1710x20){return _0x1710x11[_0x2d7a[62]](404)};return _0x1710x11[_0x2d7a[19]](_0x1710x20)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[68]]= function(_0x1710x10,_0x1710x11,_0x1710x14){return MailAccount[_0x2d7a[26]](_0x2d7a[25])[_0x2d7a[58]](_0x1710x10[_0x2d7a[29]][_0x2d7a[28]])[_0x2d7a[21]](function(_0x1710x20){if(!_0x1710x20){return _0x1710x11[_0x2d7a[62]](404)};return _0x1710x20[_0x2d7a[57]](_[_0x2d7a[45]](Util[_0x2d7a[23]](_0x1710x10[_0x2d7a[22]]),{include:[{model:MailQueue,attributes:[_0x2d7a[28],_0x2d7a[69]]},{model:User,attributes:[_0x2d7a[28],_0x2d7a[69],_0x2d7a[70]]},{model:Interval,attributes:[_0x2d7a[28],_0x2d7a[69]]}]}))})[_0x2d7a[21]](function(_0x1710x21){return _0x1710x11[_0x2d7a[19]]({count:_0x1710x21[_0x2d7a[39]],rows:_0x1710x21})})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[71]]= function(_0x1710x10,_0x1710x11,_0x1710x14){return sequelize[_0x2d7a[75]](function(_0x1710x22){return MailAccount[_0x2d7a[71]](_0x1710x10[_0x2d7a[74]],{include:[{model:MailServerIn},{model:MailServerOut}],transaction:_0x1710x22})})[_0x2d7a[21]](function(_0x1710x20){return _0x1710x11[_0x2d7a[20]](201)[_0x2d7a[19]](_0x1710x20)})[_0x2d7a[18]](sequelize.UniqueConstraintError,function(_0x1710x12){return Util[_0x2d7a[73]][_0x2d7a[72]](_0x1710x11,_0x1710x12)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[76]]= function(_0x1710x10,_0x1710x11,_0x1710x14){return MailApplication[_0x2d7a[79]](_0x2d7a[77],{where:{MailAccountId:_0x1710x10[_0x2d7a[29]][_0x2d7a[28]]}})[_0x2d7a[21]](function(_0x1710x24){_0x1710x10[_0x2d7a[74]][_0x2d7a[77]]= _0x1710x24?++_0x1710x24:1;_0x1710x10[_0x2d7a[74]][_0x2d7a[78]]= _0x1710x10[_0x2d7a[29]][_0x2d7a[28]];return MailApplication[_0x2d7a[71]](_0x1710x10[_0x2d7a[74]])})[_0x2d7a[21]](function(_0x1710x23){return _0x1710x11[_0x2d7a[20]](201)[_0x2d7a[19]](_0x1710x23)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[80]]= function(_0x1710x10,_0x1710x11,_0x1710x14){_0x1710x10[_0x2d7a[74]][_0x2d7a[78]]= _0x1710x10[_0x2d7a[29]][_0x2d7a[28]];return MailDisposition[_0x2d7a[71]](_0x1710x10[_0x2d7a[74]])[_0x2d7a[21]](function(_0x1710x25){return _0x1710x11[_0x2d7a[20]](201)[_0x2d7a[19]](_0x1710x25)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[81]]= function(_0x1710x10,_0x1710x11){if(_0x1710x10[_0x2d7a[74]][_0x2d7a[28]]){delete _0x1710x10[_0x2d7a[74]][_0x2d7a[28]]};return MailAccount[_0x2d7a[58]](_0x1710x10[_0x2d7a[29]][_0x2d7a[28]])[_0x2d7a[21]](function(_0x1710x20){if(!_0x1710x20){return _0x1710x11[_0x2d7a[62]](404)};var _0x1710x26=_[_0x2d7a[45]](_0x1710x20,_0x1710x10[_0x2d7a[74]]);return _0x1710x26[_0x2d7a[82]]()})[_0x2d7a[21]](function(_0x1710x20){return _0x1710x11[_0x2d7a[20]](200)[_0x2d7a[19]](_0x1710x20)})[_0x2d7a[18]](sequelize.UniqueConstraintError,function(_0x1710x12){return Util[_0x2d7a[73]][_0x2d7a[72]](_0x1710x11,_0x1710x12)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[83]]= function(_0x1710x10,_0x1710x11){if(_0x1710x10[_0x2d7a[74]][_0x2d7a[28]]){delete _0x1710x10[_0x2d7a[74]][_0x2d7a[28]]};return MailDisposition[_0x2d7a[58]](_0x1710x10[_0x2d7a[29]][_0x2d7a[84]])[_0x2d7a[21]](function(_0x1710x27){if(!_0x1710x27){return _0x1710x11[_0x2d7a[62]](404)};var _0x1710x26=_[_0x2d7a[45]](_0x1710x27,_0x1710x10[_0x2d7a[74]]);return _0x1710x26[_0x2d7a[82]]()})[_0x2d7a[21]](function(_0x1710x20){return _0x1710x11[_0x2d7a[20]](200)[_0x2d7a[19]](_0x1710x20)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[85]]= function(_0x1710x10,_0x1710x11){var _0x1710x28=0;var _0x1710x1a=_0x1710x10[_0x2d7a[74]];_0x1710x1a[_0x2d7a[87]](function(_0x1710x29){delete _0x1710x29[_0x2d7a[28]];delete _0x1710x29[_0x2d7a[86]];delete _0x1710x29[_0x2d7a[37]];_0x1710x29[_0x2d7a[77]]= ++_0x1710x28});return sequelize[_0x2d7a[75]](function(_0x1710x22){return MailApplication[_0x2d7a[89]]({where:{MailAccountId:_0x1710x10[_0x2d7a[29]][_0x2d7a[28]]},individualHooks:true,transaction:_0x1710x22})[_0x2d7a[21]](function(_0x1710x23){return MailApplication[_0x2d7a[88]](_0x1710x1a,{individualHooks:true,transaction:_0x1710x22})})})[_0x2d7a[21]](function(_0x1710x2a){return _0x1710x11[_0x2d7a[20]](200)[_0x2d7a[19]]({count:_0x1710x2a[_0x2d7a[39]],rows:_0x1710x2a})})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[89]]= function(_0x1710x10,_0x1710x11,_0x1710x14){return MailAccount[_0x2d7a[58]](_0x1710x10[_0x2d7a[29]][_0x2d7a[28]])[_0x2d7a[21]](function(_0x1710x20){if(!_0x1710x20){return _0x1710x11[_0x2d7a[62]](404)};return _0x1710x20[_0x2d7a[89]]()})[_0x2d7a[21]](function(){return _0x1710x11[_0x2d7a[62]](204)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[90]]= function(_0x1710x10,_0x1710x11,_0x1710x14){return MailApplication[_0x2d7a[58]](_0x1710x10[_0x2d7a[29]][_0x2d7a[91]])[_0x2d7a[21]](function(_0x1710x23){if(!_0x1710x23){return _0x1710x11[_0x2d7a[62]](404)};return _0x1710x23[_0x2d7a[89]]()})[_0x2d7a[21]](function(){return _0x1710x11[_0x2d7a[62]](204)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[92]]= function(_0x1710x10,_0x1710x11,_0x1710x14){return MailDisposition[_0x2d7a[58]](_0x1710x10[_0x2d7a[29]][_0x2d7a[84]])[_0x2d7a[21]](function(_0x1710x25){if(!_0x1710x25){return _0x1710x11[_0x2d7a[62]](404)};return _0x1710x25[_0x2d7a[89]]()})[_0x2d7a[21]](function(){return _0x1710x11[_0x2d7a[62]](204)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[93]]= function(_0x1710x10,_0x1710x11){return MailAccount[_0x2d7a[89]]({where:{id:_0x1710x10[_0x2d7a[22]][_0x2d7a[94]]},individualHooks:true})[_0x2d7a[21]](function(){return _0x1710x11[_0x2d7a[62]](204)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[95]]= function(_0x1710x10,_0x1710x11){return MailApplication[_0x2d7a[89]]({where:{id:_0x1710x10[_0x2d7a[22]][_0x2d7a[94]]},individualHooks:true})[_0x2d7a[21]](function(){return _0x1710x11[_0x2d7a[62]](204)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[96]]= function(_0x1710x10,_0x1710x11){return MailApplication[_0x2d7a[58]](_0x1710x10[_0x2d7a[29]][_0x2d7a[91]],{include:[{all:true}]})[_0x2d7a[21]](function(_0x1710x23){if(!_0x1710x23){return _0x1710x11[_0x2d7a[62]](404)};return _0x1710x11[_0x2d7a[19]](_0x1710x23)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};exports[_0x2d7a[97]]= function(_0x1710x10,_0x1710x11){if(_0x1710x10[_0x2d7a[74]][_0x2d7a[28]]){delete _0x1710x10[_0x2d7a[74]][_0x2d7a[28]]};return MailApplication[_0x2d7a[58]](_0x1710x10[_0x2d7a[29]][_0x2d7a[91]])[_0x2d7a[21]](function(_0x1710x23){if(!_0x1710x23){return _0x1710x11[_0x2d7a[62]](404)};var _0x1710x26=_[_0x2d7a[45]](_0x1710x23,_0x1710x10[_0x2d7a[74]]);return _0x1710x26[_0x2d7a[82]]()})[_0x2d7a[21]](function(_0x1710x23){return _0x1710x11[_0x2d7a[20]](200)[_0x2d7a[19]](_0x1710x23)})[_0x2d7a[18]](function(_0x1710x12){return handleError(_0x1710x11,_0x1710x12)})};function handleError(_0x1710x11,_0x1710x12){console[_0x2d7a[98]](_0x1710x12);return _0x1710x11[_0x2d7a[20]](500)[_0x2d7a[19]](_0x1710x12)} \ No newline at end of file diff --git a/server/api/mail_account/mail_account.events.js b/server/api/mail_account/mail_account.events.js index b5d3ffa..2301752 100644 --- a/server/api/mail_account/mail_account.events.js +++ b/server/api/mail_account/mail_account.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const MailAccount = require('../../models').MailAccount; - -var MailAccountEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -MailAccountEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - MailAccount.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - MailAccountEvents.emit(event + ':' + doc._id, doc); - MailAccountEvents.emit(event, doc); - done(null); - } -} - -module.exports = MailAccountEvents; +var _0xd4e2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd4e2[0];const EventEmitter=require(_0xd4e2[1]);const MailAccount=require(_0xd4e2[3])[_0xd4e2[2]];var MailAccountEvents= new EventEmitter();MailAccountEvents[_0xd4e2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd4e2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd4e2[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd4e2[6]};for(var e in events){var event=events[e];MailAccount[_0xd4e2[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xd269x8,_0xd269x9,_0xd269xa){MailAccountEvents[_0xd4e2[10]](event+ _0xd4e2[8]+ _0xd269x8[_0xd4e2[9]],_0xd269x8);MailAccountEvents[_0xd4e2[10]](event,_0xd269x8);_0xd269xa(null)}}module[_0xd4e2[11]]= MailAccountEvents \ No newline at end of file diff --git a/server/api/mail_account/mail_account.socket.js b/server/api/mail_account/mail_account.socket.js index 64b2c78..5cca3ed 100644 --- a/server/api/mail_account/mail_account.socket.js +++ b/server/api/mail_account/mail_account.socket.js @@ -1,28 +1 @@ -'use strict'; - -const MailAccountEvents = require('./mail_account.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('mail_account:' + event, socket); - - MailAccountEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - MailAccountEvents.removeListener(event, listener); - }; -} +var _0xb704=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb704[0];const MailAccountEvents=require(_0xb704[1]);var events=[_0xb704[2],_0xb704[3]];exports[_0xb704[4]]= function(_0x1425x3){for(var _0x1425x4=0,_0x1425x5=events[_0xb704[5]];_0x1425x4< _0x1425x5;_0x1425x4++){var _0x1425x6=events[_0x1425x4];var _0x1425x7=createListener(_0xb704[6]+ _0x1425x6,_0x1425x3);MailAccountEvents[_0xb704[7]](_0x1425x6,_0x1425x7);_0x1425x3[_0xb704[7]](_0xb704[8],removeListener(_0x1425x6,_0x1425x7))}};function createListener(_0x1425x6,_0x1425x3){return function(_0x1425x9){_0x1425x3[_0xb704[9]](_0x1425x6,_0x1425x9)}}function removeListener(_0x1425x6,_0x1425x7){return function(){MailAccountEvents[_0xb704[10]](_0x1425x6,_0x1425x7)}} \ No newline at end of file diff --git a/server/api/mail_application/index.js b/server/api/mail_application/index.js index 7f53439..314a60f 100644 --- a/server/api/mail_application/index.js +++ b/server/api/mail_application/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./mail_application.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.show); -router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.create); -router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroy); - -module.exports = router; +var _0xc97e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc97e[0];var express=require(_0xc97e[1]);var controller=require(_0xc97e[2]);var auth=require(_0xc97e[3]);var license=require(_0xc97e[4]);var router=express.Router();router[_0xc97e[12]](_0xc97e[5],license[_0xc97e[6]](),license[_0xc97e[7]](),auth[_0xc97e[8]](),auth[_0xc97e[10]]([9],[_0xc97e[9]]),controller[_0xc97e[11]]);router[_0xc97e[12]](_0xc97e[13],license[_0xc97e[6]](),license[_0xc97e[7]](),auth[_0xc97e[8]](),auth[_0xc97e[10]]([9],[_0xc97e[9]]),controller[_0xc97e[14]]);router[_0xc97e[16]](_0xc97e[5],license[_0xc97e[6]](),license[_0xc97e[7]](),auth[_0xc97e[8]](),auth[_0xc97e[10]]([9],[_0xc97e[9]]),controller[_0xc97e[15]]);router[_0xc97e[18]](_0xc97e[13],license[_0xc97e[6]](),license[_0xc97e[7]](),auth[_0xc97e[8]](),auth[_0xc97e[10]]([9],[_0xc97e[9]]),controller[_0xc97e[17]]);router[_0xc97e[20]](_0xc97e[13],license[_0xc97e[6]](),license[_0xc97e[7]](),auth[_0xc97e[8]](),auth[_0xc97e[10]]([9],[_0xc97e[9]]),controller[_0xc97e[19]]);module[_0xc97e[21]]= router \ No newline at end of file diff --git a/server/api/mail_application/mail_application.controller.js b/server/api/mail_application/mail_application.controller.js index 0a75c15..02ebde5 100644 --- a/server/api/mail_application/mail_application.controller.js +++ b/server/api/mail_application/mail_application.controller.js @@ -1,102 +1 @@ -'use strict'; -var _ = require('lodash'); -var MailApplication = require('../../models').MailApplication; -// Get list of mailApplications -exports.index = function(req, res, next) { - return MailApplication - .findAll({ - where: req.query, - order: 'priority', - include: [{ - all: true - }] - }) - .then(function(mailApplications) { - return res.status(200).send(mailApplications); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Get a single mailApplication -exports.show = function(req, res, next) { - return MailApplication - .findById(req.params.id, { - include: [{ - all: true - }] - }) - .then(function(mailApplication) { - if (!mailApplication) { - return res.sendStatus(404); - } - return res.send(mailApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a new mailApplication in the DB. -exports.create = function(req, res, next) { - return MailApplication - .max('priority', { - where: { - MailAccountId: req.body.MailAccountId - } - }).then(function(max) { - // SET PRIORITY - req.body.priority = max ? ++max : 1; - return MailApplication - .create(req.body); - }) - .then(function(mailApplication) { - return res.status(201).send(mailApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Updates an existing mailApplication in the DB. -exports.update = function(req, res, next) { - if (req.body.id) { - delete req.body.id; - } - return MailApplication - .findById(req.params.id) - .then(function(mailApplication) { - if (!mailApplication) { - return res.sendStatus(404); - } - var updated = _.merge(mailApplication, req.body); - return updated - .save(); - }) - .then(function(mailApplication) { - return res.status(200).send(mailApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Deletes a mailApplication from the DB. -exports.destroy = function(req, res, next) { - return MailApplication - .findById(req.params.id) - .then(function(mailApplication) { - if (!mailApplication) { - return res.sendStatus(404); - } - return mailApplication - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xe5e5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xe5e5[0];var _=require(_0xe5e5[1]);var MailApplication=require(_0xe5e5[3])[_0xe5e5[2]];exports[_0xe5e5[4]]= function(_0x1d31x3,_0x1d31x4,_0x1d31x5){return MailApplication[_0xe5e5[11]]({where:_0x1d31x3[_0xe5e5[9]],order:_0xe5e5[10],include:[{all:true}]})[_0xe5e5[8]](function(_0x1d31x7){return _0x1d31x4[_0xe5e5[7]](200)[_0xe5e5[6]](_0x1d31x7)})[_0xe5e5[5]](function(_0x1d31x6){return handleError(_0x1d31x4,_0x1d31x6)})};exports[_0xe5e5[12]]= function(_0x1d31x3,_0x1d31x4,_0x1d31x5){return MailApplication[_0xe5e5[16]](_0x1d31x3[_0xe5e5[15]][_0xe5e5[14]],{include:[{all:true}]})[_0xe5e5[8]](function(_0x1d31x8){if(!_0x1d31x8){return _0x1d31x4[_0xe5e5[13]](404)};return _0x1d31x4[_0xe5e5[6]](_0x1d31x8)})[_0xe5e5[5]](function(_0x1d31x6){return handleError(_0x1d31x4,_0x1d31x6)})};exports[_0xe5e5[17]]= function(_0x1d31x3,_0x1d31x4,_0x1d31x5){return MailApplication[_0xe5e5[20]](_0xe5e5[10],{where:{MailAccountId:_0x1d31x3[_0xe5e5[18]][_0xe5e5[19]]}})[_0xe5e5[8]](function(_0x1d31x9){_0x1d31x3[_0xe5e5[18]][_0xe5e5[10]]= _0x1d31x9?++_0x1d31x9:1;return MailApplication[_0xe5e5[17]](_0x1d31x3[_0xe5e5[18]])})[_0xe5e5[8]](function(_0x1d31x8){return _0x1d31x4[_0xe5e5[7]](201)[_0xe5e5[6]](_0x1d31x8)})[_0xe5e5[5]](function(_0x1d31x6){return handleError(_0x1d31x4,_0x1d31x6)})};exports[_0xe5e5[21]]= function(_0x1d31x3,_0x1d31x4,_0x1d31x5){if(_0x1d31x3[_0xe5e5[18]][_0xe5e5[14]]){delete _0x1d31x3[_0xe5e5[18]][_0xe5e5[14]]};return MailApplication[_0xe5e5[16]](_0x1d31x3[_0xe5e5[15]][_0xe5e5[14]])[_0xe5e5[8]](function(_0x1d31x8){if(!_0x1d31x8){return _0x1d31x4[_0xe5e5[13]](404)};var _0x1d31xa=_[_0xe5e5[22]](_0x1d31x8,_0x1d31x3[_0xe5e5[18]]);return _0x1d31xa[_0xe5e5[23]]()})[_0xe5e5[8]](function(_0x1d31x8){return _0x1d31x4[_0xe5e5[7]](200)[_0xe5e5[6]](_0x1d31x8)})[_0xe5e5[5]](function(_0x1d31x6){return handleError(_0x1d31x4,_0x1d31x6)})};exports[_0xe5e5[24]]= function(_0x1d31x3,_0x1d31x4,_0x1d31x5){return MailApplication[_0xe5e5[16]](_0x1d31x3[_0xe5e5[15]][_0xe5e5[14]])[_0xe5e5[8]](function(_0x1d31x8){if(!_0x1d31x8){return _0x1d31x4[_0xe5e5[13]](404)};return _0x1d31x8[_0xe5e5[24]]()})[_0xe5e5[8]](function(){return _0x1d31x4[_0xe5e5[13]](204)})[_0xe5e5[5]](function(_0x1d31x6){return handleError(_0x1d31x4,_0x1d31x6)})};function handleError(_0x1d31x4,_0x1d31x6){return _0x1d31x4[_0xe5e5[7]](500)[_0xe5e5[6]](_0x1d31x6)} \ No newline at end of file diff --git a/server/api/mail_application/mail_application.events.js b/server/api/mail_application/mail_application.events.js index 99d6421..63b8de1 100644 --- a/server/api/mail_application/mail_application.events.js +++ b/server/api/mail_application/mail_application.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const MailApplication = require('../../models').MailApplication; - -var MailApplicationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -MailApplicationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - MailApplication.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - MailApplicationEvents.emit(event + ':' + doc._id, doc); - MailApplicationEvents.emit(event, doc); - done(null); - } -} - -module.exports = MailApplicationEvents; +var _0x7c11=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7c11[0];const EventEmitter=require(_0x7c11[1]);const MailApplication=require(_0x7c11[3])[_0x7c11[2]];var MailApplicationEvents= new EventEmitter();MailApplicationEvents[_0x7c11[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7c11[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7c11[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7c11[6]};for(var e in events){var event=events[e];MailApplication[_0x7c11[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x8aeax8,_0x8aeax9,_0x8aeaxa){MailApplicationEvents[_0x7c11[10]](event+ _0x7c11[8]+ _0x8aeax8[_0x7c11[9]],_0x8aeax8);MailApplicationEvents[_0x7c11[10]](event,_0x8aeax8);_0x8aeaxa(null)}}module[_0x7c11[11]]= MailApplicationEvents \ No newline at end of file diff --git a/server/api/mail_application/mail_application.socket.js b/server/api/mail_application/mail_application.socket.js index 4243448..cb799b4 100644 --- a/server/api/mail_application/mail_application.socket.js +++ b/server/api/mail_application/mail_application.socket.js @@ -1,28 +1 @@ -'use strict'; - -const MailApplicationEvents = require('./mail_application.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('mail_application:' + event, socket); - - MailApplicationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - MailApplicationEvents.removeListener(event, listener); - }; -} +var _0xe142=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xe142[0];const MailApplicationEvents=require(_0xe142[1]);var events=[_0xe142[2],_0xe142[3]];exports[_0xe142[4]]= function(_0xe9edx3){for(var _0xe9edx4=0,_0xe9edx5=events[_0xe142[5]];_0xe9edx4< _0xe9edx5;_0xe9edx4++){var _0xe9edx6=events[_0xe9edx4];var _0xe9edx7=createListener(_0xe142[6]+ _0xe9edx6,_0xe9edx3);MailApplicationEvents[_0xe142[7]](_0xe9edx6,_0xe9edx7);_0xe9edx3[_0xe142[7]](_0xe142[8],removeListener(_0xe9edx6,_0xe9edx7))}};function createListener(_0xe9edx6,_0xe9edx3){return function(_0xe9edx9){_0xe9edx3[_0xe142[9]](_0xe9edx6,_0xe9edx9)}}function removeListener(_0xe9edx6,_0xe9edx7){return function(){MailApplicationEvents[_0xe142[10]](_0xe9edx6,_0xe9edx7)}} \ No newline at end of file diff --git a/server/api/mail_attachment/index.js b/server/api/mail_attachment/index.js index 8118efb..302317f 100644 --- a/server/api/mail_attachment/index.js +++ b/server/api/mail_attachment/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./mail_attachment.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.index); -router.get('/:id', license.isValidDate(), license.hasMail(), controller.show); -router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.create); -router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.destroy); - -module.exports = router; +var _0x640e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x640e[0];var express=require(_0x640e[1]);var controller=require(_0x640e[2]);var auth=require(_0x640e[3]);var license=require(_0x640e[4]);var router=express.Router();router[_0x640e[13]](_0x640e[5],license[_0x640e[6]](),license[_0x640e[7]](),auth[_0x640e[8]](),auth[_0x640e[11]]([9],[_0x640e[9],_0x640e[10]]),controller[_0x640e[12]]);router[_0x640e[13]](_0x640e[14],license[_0x640e[6]](),license[_0x640e[7]](),controller[_0x640e[15]]);router[_0x640e[17]](_0x640e[5],license[_0x640e[6]](),license[_0x640e[7]](),auth[_0x640e[8]](),auth[_0x640e[11]]([9],[_0x640e[9],_0x640e[10]]),controller[_0x640e[16]]);router[_0x640e[19]](_0x640e[14],license[_0x640e[6]](),license[_0x640e[7]](),auth[_0x640e[8]](),auth[_0x640e[11]]([9],[_0x640e[9],_0x640e[10]]),controller[_0x640e[18]]);router[_0x640e[21]](_0x640e[14],license[_0x640e[6]](),license[_0x640e[7]](),auth[_0x640e[8]](),auth[_0x640e[11]]([9],[_0x640e[9],_0x640e[10]]),controller[_0x640e[20]]);module[_0x640e[22]]= router \ No newline at end of file diff --git a/server/api/mail_attachment/mail_attachment.controller.js b/server/api/mail_attachment/mail_attachment.controller.js index 2d24f24..8d20c76 100644 --- a/server/api/mail_attachment/mail_attachment.controller.js +++ b/server/api/mail_attachment/mail_attachment.controller.js @@ -1,97 +1 @@ -'use strict'; - -var _ = require('lodash'); -var path = require('path'); -var fs = require('fs'); -var formidable = require('formidable'); -var Promise = require('bluebird'); - -var config = require('../../config/environment'); -var MailAttachment = require('../../models').MailAttachment; - -// Get list of mailAttachments -exports.index = function(req, res, next) { - return MailAttachment - .findAll() - .then(function(mailAttachments) { - return res.status(200).send(mailAttachments); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single mailAttachment -exports.show = function(req, res, next) { - return MailAttachment - .findById(req.params.id) - .then(function(mailAttachment) { - return res.sendFile(mailAttachment.path); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new mailAttachment in the DB. -exports.create = function(req, res, next) { - console.log(req); - var form = new formidable.IncomingForm(); - form.uploadDir = path.join(config.root, 'server', 'files', 'attachments'); - form.keepExtensions = true; - form.multiples = true; - form.hash = true; - - form.parse(req, function(err, form, wrap) { - if (err) { - return res.status(500).send(err); - } - return res.status(201).send({ - size: wrap.file.size, - path: wrap.file.path, - name: wrap.file.name, - type: wrap.file.type, - basename: path.basename(wrap.file.path) - }); - }); -}; - -// Updates an existing mailAttachment in the DB. -exports.update = function(req, res, next) { - if (req.body.id) { - delete req.body.id; - } - return MailAttachment - .findById(req.params.id) - .then(function(mailAttachment) { - if (!mailAttachment) { - return res.sendStatus(404); - } - var updated = _.merge(mailAttachment, req.body); - return updated.save(); - }) - .then(function(mailAttachment) { - return res.status(200).send(mailAttachment); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a mailAttachment from the DB. -exports.destroy = function(req, res, next) { - var unlink = Promise.promisify(require("fs").unlink); - var _path = path.join(config.root, 'server', 'files', 'attachments', req.params.id); - - return unlink(_path) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x5354=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x66\x73","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6C\x6F\x67","\x75\x70\x6C\x6F\x61\x64\x44\x69\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6A\x6F\x69\x6E","\x6B\x65\x65\x70\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x6D\x75\x6C\x74\x69\x70\x6C\x65\x73","\x68\x61\x73\x68","\x73\x69\x7A\x65","\x66\x69\x6C\x65","\x6E\x61\x6D\x65","\x74\x79\x70\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x75\x6E\x6C\x69\x6E\x6B","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79"];_0x5354[0];var _=require(_0x5354[1]);var path=require(_0x5354[2]);var fs=require(_0x5354[3]);var formidable=require(_0x5354[4]);var Promise=require(_0x5354[5]);var config=require(_0x5354[6]);var MailAttachment=require(_0x5354[8])[_0x5354[7]];exports[_0x5354[9]]= function(_0xa73bx8,_0xa73bx9,_0xa73bxa){return MailAttachment[_0x5354[14]]()[_0x5354[13]](function(_0xa73bxc){return _0xa73bx9[_0x5354[12]](200)[_0x5354[11]](_0xa73bxc)})[_0x5354[10]](function(_0xa73bxb){return handleError(_0xa73bx9,_0xa73bxb)})};exports[_0x5354[15]]= function(_0xa73bx8,_0xa73bx9,_0xa73bxa){return MailAttachment[_0x5354[19]](_0xa73bx8[_0x5354[18]][_0x5354[17]])[_0x5354[13]](function(_0xa73bxd){return _0xa73bx9[_0x5354[16]](_0xa73bxd[_0x5354[2]])})[_0x5354[10]](function(_0xa73bxb){return handleError(_0xa73bx9,_0xa73bxb)})};exports[_0x5354[20]]= function(_0xa73bx8,_0xa73bx9,_0xa73bxa){console[_0x5354[21]](_0xa73bx8);var _0xa73bxe= new formidable.IncomingForm();_0xa73bxe[_0x5354[22]]= path[_0x5354[27]](config[_0x5354[23]],_0x5354[24],_0x5354[25],_0x5354[26]);_0xa73bxe[_0x5354[28]]= true;_0xa73bxe[_0x5354[29]]= true;_0xa73bxe[_0x5354[30]]= true;_0xa73bxe[_0x5354[36]](_0xa73bx8,function(_0xa73bxb,_0xa73bxe,_0xa73bxf){if(_0xa73bxb){return _0xa73bx9[_0x5354[12]](500)[_0x5354[11]](_0xa73bxb)};return _0xa73bx9[_0x5354[12]](201)[_0x5354[11]]({size:_0xa73bxf[_0x5354[32]][_0x5354[31]],path:_0xa73bxf[_0x5354[32]][_0x5354[2]],name:_0xa73bxf[_0x5354[32]][_0x5354[33]],type:_0xa73bxf[_0x5354[32]][_0x5354[34]],basename:path[_0x5354[35]](_0xa73bxf[_0x5354[32]][_0x5354[2]])})})};exports[_0x5354[37]]= function(_0xa73bx8,_0xa73bx9,_0xa73bxa){if(_0xa73bx8[_0x5354[38]][_0x5354[17]]){delete _0xa73bx8[_0x5354[38]][_0x5354[17]]};return MailAttachment[_0x5354[19]](_0xa73bx8[_0x5354[18]][_0x5354[17]])[_0x5354[13]](function(_0xa73bxd){if(!_0xa73bxd){return _0xa73bx9[_0x5354[39]](404)};var _0xa73bx10=_[_0x5354[40]](_0xa73bxd,_0xa73bx8[_0x5354[38]]);return _0xa73bx10[_0x5354[41]]()})[_0x5354[13]](function(_0xa73bxd){return _0xa73bx9[_0x5354[12]](200)[_0x5354[11]](_0xa73bxd)})[_0x5354[10]](function(_0xa73bxb){return handleError(_0xa73bx9,_0xa73bxb)})};exports[_0x5354[42]]= function(_0xa73bx8,_0xa73bx9,_0xa73bxa){var _0xa73bx11=Promise[_0x5354[44]](require(_0x5354[3])[_0x5354[43]]);var _0xa73bx12=path[_0x5354[27]](config[_0x5354[23]],_0x5354[24],_0x5354[25],_0x5354[26],_0xa73bx8[_0x5354[18]][_0x5354[17]]);return _0xa73bx11(_0xa73bx12)[_0x5354[13]](function(){return _0xa73bx9[_0x5354[39]](204)})[_0x5354[10]](function(_0xa73bxb){return handleError(_0xa73bx9,_0xa73bxb)})};function handleError(_0xa73bx9,_0xa73bxb){return _0xa73bx9[_0x5354[12]](500)[_0x5354[11]](_0xa73bxb)} \ No newline at end of file diff --git a/server/api/mail_attachment/mail_attachment.events.js b/server/api/mail_attachment/mail_attachment.events.js index 72cbdbb..5d9d6ed 100644 --- a/server/api/mail_attachment/mail_attachment.events.js +++ b/server/api/mail_attachment/mail_attachment.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const MailAttachment = require('../../models').MailAttachment; - -var MailAttachmentEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -MailAttachmentEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - MailAttachment.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - MailAttachmentEvents.emit(event + ':' + doc._id, doc); - MailAttachmentEvents.emit(event, doc); - done(null); - } -} - -module.exports = MailAttachmentEvents; +var _0xf724=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf724[0];const EventEmitter=require(_0xf724[1]);const MailAttachment=require(_0xf724[3])[_0xf724[2]];var MailAttachmentEvents= new EventEmitter();MailAttachmentEvents[_0xf724[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf724[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf724[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf724[6]};for(var e in events){var event=events[e];MailAttachment[_0xf724[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9756x8,_0x9756x9,_0x9756xa){MailAttachmentEvents[_0xf724[10]](event+ _0xf724[8]+ _0x9756x8[_0xf724[9]],_0x9756x8);MailAttachmentEvents[_0xf724[10]](event,_0x9756x8);_0x9756xa(null)}}module[_0xf724[11]]= MailAttachmentEvents \ No newline at end of file diff --git a/server/api/mail_attachment/mail_attachment.socket.js b/server/api/mail_attachment/mail_attachment.socket.js index 4120d58..d70fa75 100644 --- a/server/api/mail_attachment/mail_attachment.socket.js +++ b/server/api/mail_attachment/mail_attachment.socket.js @@ -1,28 +1 @@ -'use strict'; - -const MailAttachmentEvents = require('./mail_attachment.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('mail_attachment:' + event, socket); - - MailAttachmentEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - MailAttachmentEvents.removeListener(event, listener); - }; -} +var _0x19e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x19e8[0];const MailAttachmentEvents=require(_0x19e8[1]);var events=[_0x19e8[2],_0x19e8[3]];exports[_0x19e8[4]]= function(_0xb788x3){for(var _0xb788x4=0,_0xb788x5=events[_0x19e8[5]];_0xb788x4< _0xb788x5;_0xb788x4++){var _0xb788x6=events[_0xb788x4];var _0xb788x7=createListener(_0x19e8[6]+ _0xb788x6,_0xb788x3);MailAttachmentEvents[_0x19e8[7]](_0xb788x6,_0xb788x7);_0xb788x3[_0x19e8[7]](_0x19e8[8],removeListener(_0xb788x6,_0xb788x7))}};function createListener(_0xb788x6,_0xb788x3){return function(_0xb788x9){_0xb788x3[_0x19e8[9]](_0xb788x6,_0xb788x9)}}function removeListener(_0xb788x6,_0xb788x7){return function(){MailAttachmentEvents[_0x19e8[10]](_0xb788x6,_0xb788x7)}} \ No newline at end of file diff --git a/server/api/mail_disposition/index.js b/server/api/mail_disposition/index.js index ef8de1a..94e2d23 100644 --- a/server/api/mail_disposition/index.js +++ b/server/api/mail_disposition/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./mail_disposition.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); - -router.get('/:id', auth.isAuthenticated(), controller.show); -router.post('/', auth.isAuthenticated(), controller.create); -router.put('/:id', auth.isAuthenticated(), controller.update); -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - - -module.exports = router; +var _0x789c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x789c[0];var express=require(_0x789c[1]);var auth=require(_0x789c[2]);var controller=require(_0x789c[3]);var router=express.Router();router[_0x789c[7]](_0x789c[4],auth[_0x789c[5]](),controller[_0x789c[6]]);router[_0x789c[7]](_0x789c[8],auth[_0x789c[5]](),controller[_0x789c[9]]);router[_0x789c[11]](_0x789c[4],auth[_0x789c[5]](),controller[_0x789c[10]]);router[_0x789c[13]](_0x789c[8],auth[_0x789c[5]](),controller[_0x789c[12]]);router[_0x789c[14]](_0x789c[8],auth[_0x789c[5]](),controller[_0x789c[12]]);router[_0x789c[16]](_0x789c[8],auth[_0x789c[5]](),controller[_0x789c[15]]);module[_0x789c[17]]= router \ No newline at end of file diff --git a/server/api/mail_disposition/mail_disposition.controller.js b/server/api/mail_disposition/mail_disposition.controller.js index 193b6af..3a6ee46 100644 --- a/server/api/mail_disposition/mail_disposition.controller.js +++ b/server/api/mail_disposition/mail_disposition.controller.js @@ -1,111 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/mail/dispositions -> index - * POST /api/mail/dispositions -> create - * GET /api/mail/dispositions/:id -> show - * PUT /api/mail/dispositions/:id -> update - * DELETE /api/mail/dispositions/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var MailDisposition = require('../../models').MailDisposition; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 200; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of MailDispositions -exports.index = function(req, res) { - MailDisposition.findAndCountAll() - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single MailDisposition from the DB -exports.show = function(req, res) { - MailDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new MailDisposition in the DB -exports.create = function(req, res) { - MailDisposition.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing MailDisposition in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - MailDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a MailDisposition from the DB -exports.destroy = function(req, res) { - MailDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0xf189=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xf189[0];var _=require(_0xf189[1]);var MailDisposition=require(_0xf189[3])[_0xf189[2]];function handleError(_0xaca4x4,_0xaca4x5){_0xaca4x5= _0xaca4x5|| 500;return function(_0xaca4x6){_0xaca4x4[_0xf189[5]](_0xaca4x5)[_0xf189[4]](_0xaca4x6)}}function responseWithResult(_0xaca4x4,_0xaca4x5){_0xaca4x5= _0xaca4x5|| 200;return function(_0xaca4x8){if(_0xaca4x8){_0xaca4x4[_0xf189[5]](_0xaca4x5)[_0xf189[6]](_0xaca4x8)}}}function responseWithoutResult(_0xaca4x4,_0xaca4x5){_0xaca4x5= _0xaca4x5|| 200;return function(){_0xaca4x4[_0xf189[7]](_0xaca4x5)}}function handleEntityNotFound(_0xaca4x4){return function(_0xaca4x8){if(!_0xaca4x8){_0xaca4x4[_0xf189[5]](404)[_0xf189[8]]();return null};return _0xaca4x8}}function saveUpdates(_0xaca4xc){return function(_0xaca4x8){return _0xaca4x8[_0xf189[10]](_0xaca4xc)[_0xf189[9]](function(_0xaca4xd){return _0xaca4xd})}}function removeEntity(_0xaca4x4){return function(_0xaca4x8){if(_0xaca4x8){return _0xaca4x8[_0xf189[11]]()[_0xf189[9]](function(){_0xaca4x4[_0xf189[5]](204)[_0xf189[8]]()})}}}exports[_0xf189[12]]= function(_0xaca4xf,_0xaca4x4){MailDisposition[_0xf189[14]]()[_0xf189[9]](responseWithResult(_0xaca4x4))[_0xf189[13]](handleError(_0xaca4x4))};exports[_0xf189[15]]= function(_0xaca4xf,_0xaca4x4){MailDisposition[_0xf189[18]](_0xaca4xf[_0xf189[17]][_0xf189[16]])[_0xf189[9]](handleEntityNotFound(_0xaca4x4))[_0xf189[9]](responseWithResult(_0xaca4x4))[_0xf189[13]](handleError(_0xaca4x4))};exports[_0xf189[19]]= function(_0xaca4xf,_0xaca4x4){MailDisposition[_0xf189[19]](_0xaca4xf[_0xf189[20]])[_0xf189[9]](responseWithResult(_0xaca4x4,201))[_0xf189[13]](handleError(_0xaca4x4))};exports[_0xf189[21]]= function(_0xaca4xf,_0xaca4x4){if(_0xaca4xf[_0xf189[20]][_0xf189[16]]){delete _0xaca4xf[_0xf189[20]][_0xf189[16]]};MailDisposition[_0xf189[18]](_0xaca4xf[_0xf189[17]][_0xf189[16]])[_0xf189[9]](handleEntityNotFound(_0xaca4x4))[_0xf189[9]](saveUpdates(_0xaca4xf[_0xf189[20]]))[_0xf189[9]](responseWithResult(_0xaca4x4))[_0xf189[13]](handleError(_0xaca4x4))};exports[_0xf189[11]]= function(_0xaca4xf,_0xaca4x4){MailDisposition[_0xf189[18]](_0xaca4xf[_0xf189[17]][_0xf189[16]])[_0xf189[9]](handleEntityNotFound(_0xaca4x4))[_0xf189[9]](removeEntity(_0xaca4x4))[_0xf189[13]](handleError(_0xaca4x4))} \ No newline at end of file diff --git a/server/api/mail_disposition/mail_disposition.events.js b/server/api/mail_disposition/mail_disposition.events.js index ece78a2..89dc349 100644 --- a/server/api/mail_disposition/mail_disposition.events.js +++ b/server/api/mail_disposition/mail_disposition.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const MailDisposition = require('../../models').MailDisposition; - -var MailDispositionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -MailDispositionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - MailDisposition.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - MailDispositionEvents.emit(event + ':' + doc._id, doc); - MailDispositionEvents.emit(event, doc); - done(null); - } -} - -module.exports = MailDispositionEvents; +var _0x8d9a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8d9a[0];const EventEmitter=require(_0x8d9a[1]);const MailDisposition=require(_0x8d9a[3])[_0x8d9a[2]];var MailDispositionEvents= new EventEmitter();MailDispositionEvents[_0x8d9a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8d9a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8d9a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8d9a[6]};for(var e in events){var event=events[e];MailDisposition[_0x8d9a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa352x8,_0xa352x9,_0xa352xa){MailDispositionEvents[_0x8d9a[10]](event+ _0x8d9a[8]+ _0xa352x8[_0x8d9a[9]],_0xa352x8);MailDispositionEvents[_0x8d9a[10]](event,_0xa352x8);_0xa352xa(null)}}module[_0x8d9a[11]]= MailDispositionEvents \ No newline at end of file diff --git a/server/api/mail_disposition/mail_disposition.socket.js b/server/api/mail_disposition/mail_disposition.socket.js index 49ccf9a..d4dfce0 100644 --- a/server/api/mail_disposition/mail_disposition.socket.js +++ b/server/api/mail_disposition/mail_disposition.socket.js @@ -1,28 +1 @@ -'use strict'; - -const MailDispositionEvents = require('./mail_disposition.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('mail_disposition:' + event, socket); - - MailDispositionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - MailDispositionEvents.removeListener(event, listener); - }; -} +var _0x6239=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x6239[0];const MailDispositionEvents=require(_0x6239[1]);var events=[_0x6239[2],_0x6239[3]];exports[_0x6239[4]]= function(_0xa649x3){for(var _0xa649x4=0,_0xa649x5=events[_0x6239[5]];_0xa649x4< _0xa649x5;_0xa649x4++){var _0xa649x6=events[_0xa649x4];var _0xa649x7=createListener(_0x6239[6]+ _0xa649x6,_0xa649x3);MailDispositionEvents[_0x6239[7]](_0xa649x6,_0xa649x7);_0xa649x3[_0x6239[7]](_0x6239[8],removeListener(_0xa649x6,_0xa649x7))}};function createListener(_0xa649x6,_0xa649x3){return function(_0xa649x9){_0xa649x3[_0x6239[9]](_0xa649x6,_0xa649x9)}}function removeListener(_0xa649x6,_0xa649x7){return function(){MailDispositionEvents[_0x6239[10]](_0xa649x6,_0xa649x7)}} \ No newline at end of file diff --git a/server/api/mail_message/index.js b/server/api/mail_message/index.js index 9f3d288..3c30488 100644 --- a/server/api/mail_message/index.js +++ b/server/api/mail_message/index.js @@ -1,21 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./mail_message.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.index); -router.get('/describe', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.describe); -router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.show); -router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.create); -router.put('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.update); -router.put('/delete/bulk', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.bulkDelete); -router.put('/delete/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.update); -router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.destroy); - -module.exports = router; +var _0x3c60=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x64\x65\x6C\x65\x74\x65\x2F\x62\x75\x6C\x6B","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x2F\x64\x65\x6C\x65\x74\x65\x2F\x3A\x69\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x3c60[0];var express=require(_0x3c60[1]);var controller=require(_0x3c60[2]);var auth=require(_0x3c60[3]);var license=require(_0x3c60[4]);var router=express.Router();router[_0x3c60[13]](_0x3c60[5],license[_0x3c60[6]](),license[_0x3c60[7]](),auth[_0x3c60[8]](),auth[_0x3c60[11]]([9],[_0x3c60[9],_0x3c60[10]]),controller[_0x3c60[12]]);router[_0x3c60[13]](_0x3c60[14],license[_0x3c60[6]](),license[_0x3c60[7]](),auth[_0x3c60[8]](),auth[_0x3c60[11]]([9],[_0x3c60[9]]),controller[_0x3c60[15]]);router[_0x3c60[13]](_0x3c60[16],license[_0x3c60[6]](),license[_0x3c60[7]](),auth[_0x3c60[8]](),auth[_0x3c60[11]]([9],[_0x3c60[9],_0x3c60[10]]),controller[_0x3c60[17]]);router[_0x3c60[19]](_0x3c60[5],license[_0x3c60[6]](),license[_0x3c60[7]](),auth[_0x3c60[8]](),auth[_0x3c60[11]]([9],[_0x3c60[9],_0x3c60[10]]),controller[_0x3c60[18]]);router[_0x3c60[21]](_0x3c60[5],license[_0x3c60[6]](),license[_0x3c60[7]](),auth[_0x3c60[8]](),auth[_0x3c60[11]]([9],[_0x3c60[9],_0x3c60[10]]),controller[_0x3c60[20]]);router[_0x3c60[21]](_0x3c60[22],license[_0x3c60[6]](),license[_0x3c60[7]](),auth[_0x3c60[8]](),auth[_0x3c60[11]]([9],[_0x3c60[9]]),controller[_0x3c60[23]]);router[_0x3c60[21]](_0x3c60[24],license[_0x3c60[6]](),license[_0x3c60[7]](),auth[_0x3c60[8]](),auth[_0x3c60[11]]([9],[_0x3c60[9]]),controller[_0x3c60[20]]);router[_0x3c60[21]](_0x3c60[16],license[_0x3c60[6]](),license[_0x3c60[7]](),auth[_0x3c60[8]](),auth[_0x3c60[11]]([9],[_0x3c60[9],_0x3c60[10]]),controller[_0x3c60[20]]);router[_0x3c60[26]](_0x3c60[16],license[_0x3c60[6]](),license[_0x3c60[7]](),auth[_0x3c60[8]](),auth[_0x3c60[11]]([9],[_0x3c60[9],_0x3c60[10]]),controller[_0x3c60[25]]);module[_0x3c60[27]]= router \ No newline at end of file diff --git a/server/api/mail_message/mail_message.controller.js b/server/api/mail_message/mail_message.controller.js index 4a701cd..bb3f33d 100644 --- a/server/api/mail_message/mail_message.controller.js +++ b/server/api/mail_message/mail_message.controller.js @@ -1,207 +1 @@ -'use strict'; - -var _ = require('lodash'); -var async = require('async'); - -var htmlToText = require('html-to-text'); -var formidable = require('formidable'); -var moment = require('moment'); -var path = require('path'); - -var config = require('../../config/environment'); -var sequelize = require('../../models').sequelize; -var MailMessage = require('../../models').MailMessage; -var MailAttachment = require('../../models').MailAttachment; -var MailRoom = require('../../models').MailRoom; -var MailAccount = require('../../models').MailAccount; -var ContactEmail = require('../../models').ContactEmail; -var Contact = require('../../models').Contact; -var User = require('../../models').User; - -// Get list of mail_messages -exports.index = function(req, res, next) { - var params = { - order: 'createdAt DESC', - include: [{ - all: true, - include: [{ - all: true - }] - }] - }; - - switch (req.user.role) { - case 'admin': - params.where = req.query; - break; - case 'agent': - break; - default: - } - - return MailMessage - .findAll(params) - .then(function(mail_messages) { - return res.status(200).send(mail_messages); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -exports.describe = function(req, res) { - return MailMessage - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single mailMessage -exports.show = function(req, res, next) { - return MailMessage - .findById(req.params.id, { - include: [{ - model: MailAttachment - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }) - .then(function(mailMessage) { - if (!mailMessage) { - return res.sendStatus(404); - } - return res.send(mailMessage); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -// Creates a new mailMessage in the DB. -exports.create = function(req, res, next) { - req.body.UserId = req.user.id; - req.body.userName = req.user.name; - req.body.userFullname = req.user.fullname; - req.body.text = req.body.text || htmlToText.fromString(req.body.html, { - wordwrap: false - }); - - return MailAccount - .findOne({ - where: { - address: req.body.from[0] - } - }) - .then(function(account) { - req.body.accountId = account.id; - req.body.accountName = account.name; - - return MailRoom - .create({ - from: req.body.from[0], - subject: req.body.subject, - account: account.name, - mailIn: 0, - mailOut: 1, - status: 'PENDING', - openReason: 'agent', - lastEvent: 'SENDING', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'), - MailAccountId: account.id, - MailMessages: [req.body] - }, { - include: [{ - model: MailMessage, - include: [{ - model: MailAttachment - }] - }] - }); - }) - .then(function(mailRoom) { - return res.status(201).send(mailRoom); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; - -// Updates an existing mailMessage in the DB. -exports.update = function(req, res, next) { - return MailMessage - .findById(req.params.id, { - include: [{ - all: true - }] - }) - .then(function(mailMessage) { - if (!mailMessage) { - return res.sendStatus(404); - } - var updated = _.merge(mailMessage, req.body); - return updated - .save(); - }) - .then(function(updated) { - return res.status(200).send(updated); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -// Deletes a mailMessage from the DB. -exports.destroy = function(req, res, next) { - return MailMessage - .findById(req.params.id) - .then(function(mailMessage) { - if (!mailMessage) { - return res.sendStatus(404); - } - return mailMessage - .destroy(); - }).then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -// Deletes a mailMessage from the DB. -exports.bulkDelete = function(req, res, next) { - return MailMessage - .bulkUpdate({ - where: { - id: { - $in: req.body.id - } - }, - attributes: { - directory: 'TRASH' - } - }) - .then(function(mailMessage) { - if (!mailMessage) { - return res.sendStatus(404); - } - return mailMessage - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err, next); - }); -}; - -function handleError(res, err, next) { - return res.status(500).send(err); -} +var _0xb3a1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x73\x79\x6E\x63","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x66\x6F\x72\x6D\x69\x64\x61\x62\x6C\x65","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x43\x6F\x6E\x74\x61\x63\x74","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x75\x73\x65\x72\x4E\x61\x6D\x65","\x75\x73\x65\x72\x46\x75\x6C\x6C\x6E\x61\x6D\x65","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x65\x72\x72\x6F\x72","\x61\x63\x63\x6F\x75\x6E\x74\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74\x4E\x61\x6D\x65","\x66\x72\x6F\x6D","\x73\x75\x62\x6A\x65\x63\x74","\x50\x45\x4E\x44\x49\x4E\x47","\x53\x45\x4E\x44\x49\x4E\x47","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0xb3a1[0];var _=require(_0xb3a1[1]);var async=require(_0xb3a1[2]);var htmlToText=require(_0xb3a1[3]);var formidable=require(_0xb3a1[4]);var moment=require(_0xb3a1[5]);var path=require(_0xb3a1[6]);var config=require(_0xb3a1[7]);var sequelize=require(_0xb3a1[9])[_0xb3a1[8]];var MailMessage=require(_0xb3a1[9])[_0xb3a1[10]];var MailAttachment=require(_0xb3a1[9])[_0xb3a1[11]];var MailRoom=require(_0xb3a1[9])[_0xb3a1[12]];var MailAccount=require(_0xb3a1[9])[_0xb3a1[13]];var ContactEmail=require(_0xb3a1[9])[_0xb3a1[14]];var Contact=require(_0xb3a1[9])[_0xb3a1[15]];var User=require(_0xb3a1[9])[_0xb3a1[16]];exports[_0xb3a1[17]]= function(_0x8d2fx10,_0x8d2fx11,_0x8d2fx12){var _0x8d2fx13={order:_0xb3a1[18],include:[{all:true,include:[{all:true}]}]};switch(_0x8d2fx10[_0xb3a1[24]][_0xb3a1[23]]){case _0xb3a1[21]:_0x8d2fx13[_0xb3a1[19]]= _0x8d2fx10[_0xb3a1[20]];break;case _0xb3a1[22]:break;default:};return MailMessage[_0xb3a1[29]](_0x8d2fx13)[_0xb3a1[28]](function(_0x8d2fx15){return _0x8d2fx11[_0xb3a1[27]](200)[_0xb3a1[26]](_0x8d2fx15)})[_0xb3a1[25]](function(_0x8d2fx14){return handleError(_0x8d2fx11,_0x8d2fx14,_0x8d2fx12)})};exports[_0xb3a1[30]]= function(_0x8d2fx10,_0x8d2fx11){return MailMessage[_0xb3a1[30]]()[_0xb3a1[28]](function(_0x8d2fx16){return _0x8d2fx11[_0xb3a1[27]](200)[_0xb3a1[26]](_0x8d2fx16)})[_0xb3a1[25]](function(_0x8d2fx14){return handleError(_0x8d2fx11,_0x8d2fx14)})};exports[_0xb3a1[31]]= function(_0x8d2fx10,_0x8d2fx11,_0x8d2fx12){return MailMessage[_0xb3a1[38]](_0x8d2fx10[_0xb3a1[34]][_0xb3a1[33]],{include:[{model:MailAttachment},{model:User,attributes:[_0xb3a1[33],_0xb3a1[35],_0xb3a1[36],_0xb3a1[37]]}]})[_0xb3a1[28]](function(_0x8d2fx17){if(!_0x8d2fx17){return _0x8d2fx11[_0xb3a1[32]](404)};return _0x8d2fx11[_0xb3a1[26]](_0x8d2fx17)})[_0xb3a1[25]](function(_0x8d2fx14){return handleError(_0x8d2fx11,_0x8d2fx14,_0x8d2fx12)})};exports[_0xb3a1[39]]= function(_0x8d2fx10,_0x8d2fx11,_0x8d2fx12){_0x8d2fx10[_0xb3a1[41]][_0xb3a1[40]]= _0x8d2fx10[_0xb3a1[24]][_0xb3a1[33]];_0x8d2fx10[_0xb3a1[41]][_0xb3a1[42]]= _0x8d2fx10[_0xb3a1[24]][_0xb3a1[35]];_0x8d2fx10[_0xb3a1[41]][_0xb3a1[43]]= _0x8d2fx10[_0xb3a1[24]][_0xb3a1[36]];_0x8d2fx10[_0xb3a1[41]][_0xb3a1[44]]= _0x8d2fx10[_0xb3a1[41]][_0xb3a1[44]]|| htmlToText[_0xb3a1[46]](_0x8d2fx10[_0xb3a1[41]][_0xb3a1[45]],{wordwrap:false});return MailAccount[_0xb3a1[56]]({where:{address:_0x8d2fx10[_0xb3a1[41]][_0xb3a1[50]][0]}})[_0xb3a1[28]](function(_0x8d2fx19){_0x8d2fx10[_0xb3a1[41]][_0xb3a1[48]]= _0x8d2fx19[_0xb3a1[33]];_0x8d2fx10[_0xb3a1[41]][_0xb3a1[49]]= _0x8d2fx19[_0xb3a1[35]];return MailRoom[_0xb3a1[39]]({from:_0x8d2fx10[_0xb3a1[41]][_0xb3a1[50]][0],subject:_0x8d2fx10[_0xb3a1[41]][_0xb3a1[51]],account:_0x8d2fx19[_0xb3a1[35]],mailIn:0,mailOut:1,status:_0xb3a1[52],openReason:_0xb3a1[22],lastEvent:_0xb3a1[53],lastEventAt:moment()[_0xb3a1[55]](_0xb3a1[54]),MailAccountId:_0x8d2fx19[_0xb3a1[33]],MailMessages:[_0x8d2fx10[_0xb3a1[41]]]},{include:[{model:MailMessage,include:[{model:MailAttachment}]}]})})[_0xb3a1[28]](function(_0x8d2fx18){return _0x8d2fx11[_0xb3a1[27]](201)[_0xb3a1[26]](_0x8d2fx18)})[_0xb3a1[25]](function(_0x8d2fx14){console[_0xb3a1[47]](_0x8d2fx14);return handleError(_0x8d2fx11,_0x8d2fx14)})};exports[_0xb3a1[57]]= function(_0x8d2fx10,_0x8d2fx11,_0x8d2fx12){return MailMessage[_0xb3a1[38]](_0x8d2fx10[_0xb3a1[34]][_0xb3a1[33]],{include:[{all:true}]})[_0xb3a1[28]](function(_0x8d2fx17){if(!_0x8d2fx17){return _0x8d2fx11[_0xb3a1[32]](404)};var _0x8d2fx1a=_[_0xb3a1[58]](_0x8d2fx17,_0x8d2fx10[_0xb3a1[41]]);return _0x8d2fx1a[_0xb3a1[59]]()})[_0xb3a1[28]](function(_0x8d2fx1a){return _0x8d2fx11[_0xb3a1[27]](200)[_0xb3a1[26]](_0x8d2fx1a)})[_0xb3a1[25]](function(_0x8d2fx14){return handleError(_0x8d2fx11,_0x8d2fx14,_0x8d2fx12)})};exports[_0xb3a1[60]]= function(_0x8d2fx10,_0x8d2fx11,_0x8d2fx12){return MailMessage[_0xb3a1[38]](_0x8d2fx10[_0xb3a1[34]][_0xb3a1[33]])[_0xb3a1[28]](function(_0x8d2fx17){if(!_0x8d2fx17){return _0x8d2fx11[_0xb3a1[32]](404)};return _0x8d2fx17[_0xb3a1[60]]()})[_0xb3a1[28]](function(){return _0x8d2fx11[_0xb3a1[32]](204)})[_0xb3a1[25]](function(_0x8d2fx14){return handleError(_0x8d2fx11,_0x8d2fx14,_0x8d2fx12)})};exports[_0xb3a1[61]]= function(_0x8d2fx10,_0x8d2fx11,_0x8d2fx12){return MailMessage[_0xb3a1[63]]({where:{id:{$in:_0x8d2fx10[_0xb3a1[41]][_0xb3a1[33]]}},attributes:{directory:_0xb3a1[62]}})[_0xb3a1[28]](function(_0x8d2fx17){if(!_0x8d2fx17){return _0x8d2fx11[_0xb3a1[32]](404)};return _0x8d2fx17[_0xb3a1[60]]()})[_0xb3a1[28]](function(){return _0x8d2fx11[_0xb3a1[32]](204)})[_0xb3a1[25]](function(_0x8d2fx14){return handleError(_0x8d2fx11,_0x8d2fx14,_0x8d2fx12)})};function handleError(_0x8d2fx11,_0x8d2fx14,_0x8d2fx12){return _0x8d2fx11[_0xb3a1[27]](500)[_0xb3a1[26]](_0x8d2fx14)} \ No newline at end of file diff --git a/server/api/mail_message/mail_message.events.js b/server/api/mail_message/mail_message.events.js index c7fe99a..a091246 100644 --- a/server/api/mail_message/mail_message.events.js +++ b/server/api/mail_message/mail_message.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const MailMessage = require('../../models').MailMessage; - -var MailMessageEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -MailMessageEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - MailMessage.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - MailMessageEvents.emit(event + ':' + doc._id, doc); - MailMessageEvents.emit(event, doc); - done(null); - } -} - -module.exports = MailMessageEvents; +var _0x28a7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x28a7[0];const EventEmitter=require(_0x28a7[1]);const MailMessage=require(_0x28a7[3])[_0x28a7[2]];var MailMessageEvents= new EventEmitter();MailMessageEvents[_0x28a7[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x28a7[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x28a7[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x28a7[6]};for(var e in events){var event=events[e];MailMessage[_0x28a7[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa2d6x8,_0xa2d6x9,_0xa2d6xa){MailMessageEvents[_0x28a7[10]](event+ _0x28a7[8]+ _0xa2d6x8[_0x28a7[9]],_0xa2d6x8);MailMessageEvents[_0x28a7[10]](event,_0xa2d6x8);_0xa2d6xa(null)}}module[_0x28a7[11]]= MailMessageEvents \ No newline at end of file diff --git a/server/api/mail_message/mail_message.socket.js b/server/api/mail_message/mail_message.socket.js index bfe4369..3f6280a 100644 --- a/server/api/mail_message/mail_message.socket.js +++ b/server/api/mail_message/mail_message.socket.js @@ -1,28 +1 @@ -'use strict'; - -const MailMessageEvents = require('./mail_message.events'); - -// Model events to emit -var events = ['save', 'save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('mail_message:' + event, socket); - - MailMessageEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - MailMessageEvents.removeListener(event, listener); - }; -} +var _0xa84e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xa84e[0];const MailMessageEvents=require(_0xa84e[1]);var events=[_0xa84e[2],_0xa84e[2],_0xa84e[3]];exports[_0xa84e[4]]= function(_0x365ex3){for(var _0x365ex4=0,_0x365ex5=events[_0xa84e[5]];_0x365ex4< _0x365ex5;_0x365ex4++){var _0x365ex6=events[_0x365ex4];var _0x365ex7=createListener(_0xa84e[6]+ _0x365ex6,_0x365ex3);MailMessageEvents[_0xa84e[7]](_0x365ex6,_0x365ex7);_0x365ex3[_0xa84e[7]](_0xa84e[8],removeListener(_0x365ex6,_0x365ex7))}};function createListener(_0x365ex6,_0x365ex3){return function(_0x365ex9){_0x365ex3[_0xa84e[9]](_0x365ex6,_0x365ex9)}}function removeListener(_0x365ex6,_0x365ex7){return function(){MailMessageEvents[_0xa84e[10]](_0x365ex6,_0x365ex7)}} \ No newline at end of file diff --git a/server/api/mail_queue/index.js b/server/api/mail_queue/index.js index 16acbca..2c63a59 100644 --- a/server/api/mail_queue/index.js +++ b/server/api/mail_queue/index.js @@ -1,21 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./mail_queue.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.show); -router.get('/:id/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.showAgents); -router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.create); -router.post('/:id/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.addAgents); -router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.update); -router.delete('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy); -router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy); -router.delete('/:id/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasRole('admin'), controller.removeAgents); - -module.exports = router; +var _0xf4e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x68\x61\x73\x52\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xf4e8[0];var express=require(_0xf4e8[1]);var controller=require(_0xf4e8[2]);var auth=require(_0xf4e8[3]);var license=require(_0xf4e8[4]);var router=express.Router();router[_0xf4e8[12]](_0xf4e8[5],license[_0xf4e8[6]](),license[_0xf4e8[7]](),auth[_0xf4e8[8]](),auth[_0xf4e8[10]]([9],[_0xf4e8[9]]),controller[_0xf4e8[11]]);router[_0xf4e8[12]](_0xf4e8[13],license[_0xf4e8[6]](),license[_0xf4e8[7]](),auth[_0xf4e8[8]](),auth[_0xf4e8[10]]([9],[_0xf4e8[9]]),controller[_0xf4e8[14]]);router[_0xf4e8[12]](_0xf4e8[15],license[_0xf4e8[6]](),license[_0xf4e8[7]](),auth[_0xf4e8[8]](),auth[_0xf4e8[10]]([9],[_0xf4e8[9]]),controller[_0xf4e8[16]]);router[_0xf4e8[19]](_0xf4e8[5],license[_0xf4e8[6]](),license[_0xf4e8[7]](),auth[_0xf4e8[8]](),auth[_0xf4e8[17]](_0xf4e8[9]),controller[_0xf4e8[18]]);router[_0xf4e8[19]](_0xf4e8[15],license[_0xf4e8[6]](),license[_0xf4e8[7]](),auth[_0xf4e8[8]](),auth[_0xf4e8[17]](_0xf4e8[9]),controller[_0xf4e8[20]]);router[_0xf4e8[22]](_0xf4e8[13],license[_0xf4e8[6]](),license[_0xf4e8[7]](),auth[_0xf4e8[8]](),auth[_0xf4e8[17]](_0xf4e8[9]),controller[_0xf4e8[21]]);router[_0xf4e8[24]](_0xf4e8[5],license[_0xf4e8[6]](),license[_0xf4e8[7]](),auth[_0xf4e8[8]](),auth[_0xf4e8[17]](_0xf4e8[9]),controller[_0xf4e8[23]]);router[_0xf4e8[24]](_0xf4e8[13],license[_0xf4e8[6]](),license[_0xf4e8[7]](),auth[_0xf4e8[8]](),auth[_0xf4e8[17]](_0xf4e8[9]),controller[_0xf4e8[25]]);router[_0xf4e8[24]](_0xf4e8[15],license[_0xf4e8[6]](),license[_0xf4e8[7]](),auth[_0xf4e8[8]](),auth[_0xf4e8[17]](_0xf4e8[9]),controller[_0xf4e8[26]]);module[_0xf4e8[27]]= router \ No newline at end of file diff --git a/server/api/mail_queue/mail_queue.controller.js b/server/api/mail_queue/mail_queue.controller.js index 8824524..86b870b 100644 --- a/server/api/mail_queue/mail_queue.controller.js +++ b/server/api/mail_queue/mail_queue.controller.js @@ -1,235 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var Util = require('../../config/util'); - -var sequelize = require('../../models').sequelize; - -var MailQueue = require('../../models').MailQueue; -var User = require('../../models').User; -var UserHasMailQueue = require('../../models').UserHasMailQueue; - -// Get list of mailQueues -exports.index = function(req, res) { - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getMailQueuesIdByUser(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - - default: - return MailQueue - .scope('default') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -// Get a single mailQueue -exports.show = function(req, res) { - return MailQueue - .scope('default') - .findById(req.params.id) - .then(function(mailQueue) { - if (!mailQueue) { - return res.sendStatus(404); - } - return res.send(mailQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new mailQueue in the DB. -exports.create = function(req, res) { - var _mailQueue; - - return MailQueue - .create(req.body) - .then(function(mailQueue) { - _mailQueue = mailQueue; - - if (req.body.agents) { - return _mailQueue - .addUsers(req.body.agents, { - penalty: req.body.penalty || 0, - queue: _mailQueue.name - }); - } - }) - .then(function() { - return res.status(201).send(_mailQueue); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing mailQueue in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return MailQueue - .findById(req.params.id) - .then(function(mailQueue) { - if (!mailQueue) { - return res.sendStatus(404); - } - var updated = _.merge(mailQueue, req.body); - return updated - .save(); - }) - .then(function(mailQueue) { - return res.status(200).send(mailQueue); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing user_has_mailQueue in the DB. -exports.addAgents = function(req, res, next) { - return MailQueue - .findById(req.params.id) - .then(function(mailQueue) { - if (!mailQueue) { - return res.sendStatus(404); - } - var userHasMailQueues = _.map(req.body.agents, function(agent) { - return { - UserId: agent, - penalty: req.body.penalty, - MailQueueId: mailQueue.id, - queue: mailQueue.name - }; - }); - - return UserHasMailQueue - .bulkCreate(userHasMailQueues, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.removeAgents = function(req, res) { - return MailQueue - .findById(req.params.id) - .then(function(queue) { - if (!queue) { - return res.sendStatus(404); - } - return queue - .removeUsers(req.query.agents, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a mailQueue from the DB. -exports.destroy = function(req, res) { - var _mailQueue; - - return MailQueue - .findById(req.params.id) - .then(function(mailQueue) { - _mailQueue = mailQueue; - if (!mailQueue) { - return res.sendStatus(404); - } - return mailQueue - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(sequelize.ForeignKeyConstraintError, function(err) { - return Util.errorManager.handleForeignKeyConstraintError(res, 'queue', _mailQueue.name, err); - }) - .catch(function(err) { - console.error('err', err); - return handleError(res, err); - }); -}; - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return MailQueue - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showAgents = function(req, res) { - return MailQueue - .findById(req.params.id) - .then(function(queue) { - if (!queue) { - return res.sendStatus(404); - } - return queue - .getUsers({ - where: { - role: 'agent' - }, - attributes: ['id', 'name', 'fullname', 'email'] - }); - }) - .then(function(agents) { - return res.status(200).send({ - rows: agents, - count: agents.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xd731=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x55\x73\x65\x72","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x6E\x61\x6D\x65","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x71\x75\x65\x75\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73"];_0xd731[0];var _=require(_0xd731[1]);var util=require(_0xd731[2]);var Util=require(_0xd731[3]);var sequelize=require(_0xd731[5])[_0xd731[4]];var MailQueue=require(_0xd731[5])[_0xd731[6]];var User=require(_0xd731[5])[_0xd731[7]];var UserHasMailQueue=require(_0xd731[5])[_0xd731[8]];exports[_0xd731[9]]= function(_0x28bdx8,_0x28bdx9){switch(_0x28bdx8[_0xd731[17]][_0xd731[24]]){case _0xd731[17]:return User[_0xd731[18]](_0x28bdx8[_0xd731[17]][_0xd731[16]],{attributes:[_0xd731[16]]})[_0xd731[13]](Util[_0xd731[15]](_0x28bdx8[_0xd731[14]]))[_0xd731[13]](function(_0x28bdxb){_0x28bdx9[_0xd731[12]](200)[_0xd731[11]](_0x28bdxb)})[_0xd731[10]](function(_0x28bdxa){return handleError(_0x28bdx9,_0x28bdxa)});default:return MailQueue[_0xd731[23]](_0xd731[22])[_0xd731[21]](_[_0xd731[20]](Util[_0xd731[19]](_0x28bdx8[_0xd731[14]]),{distinct:true}))[_0xd731[13]](function(_0x28bdxb){_0x28bdx9[_0xd731[12]](200)[_0xd731[11]](_0x28bdxb)})[_0xd731[10]](function(_0x28bdxa){return handleError(_0x28bdx9,_0x28bdxa)})}};exports[_0xd731[25]]= function(_0x28bdx8,_0x28bdx9){return MailQueue[_0xd731[23]](_0xd731[22])[_0xd731[18]](_0x28bdx8[_0xd731[27]][_0xd731[16]])[_0xd731[13]](function(_0x28bdxc){if(!_0x28bdxc){return _0x28bdx9[_0xd731[26]](404)};return _0x28bdx9[_0xd731[11]](_0x28bdxc)})[_0xd731[10]](function(_0x28bdxa){return handleError(_0x28bdx9,_0x28bdxa)})};exports[_0xd731[28]]= function(_0x28bdx8,_0x28bdx9){var _0x28bdxd;return MailQueue[_0xd731[28]](_0x28bdx8[_0xd731[32]])[_0xd731[13]](function(_0x28bdxc){_0x28bdxd= _0x28bdxc;if(_0x28bdx8[_0xd731[32]][_0xd731[31]]){return _0x28bdxd[_0xd731[35]](_0x28bdx8[_0xd731[32]][_0xd731[31]],{penalty:_0x28bdx8[_0xd731[32]][_0xd731[33]]|| 0,queue:_0x28bdxd[_0xd731[34]]})}})[_0xd731[13]](function(){return _0x28bdx9[_0xd731[12]](201)[_0xd731[11]](_0x28bdxd)})[_0xd731[10]](sequelize.UniqueConstraintError,function(_0x28bdxa){return Util[_0xd731[30]][_0xd731[29]](_0x28bdx9,_0x28bdxa)})[_0xd731[10]](function(_0x28bdxa){return handleError(_0x28bdx9,_0x28bdxa)})};exports[_0xd731[36]]= function(_0x28bdx8,_0x28bdx9){if(_0x28bdx8[_0xd731[32]][_0xd731[16]]){delete _0x28bdx8[_0xd731[32]][_0xd731[16]]};return MailQueue[_0xd731[18]](_0x28bdx8[_0xd731[27]][_0xd731[16]])[_0xd731[13]](function(_0x28bdxc){if(!_0x28bdxc){return _0x28bdx9[_0xd731[26]](404)};var _0x28bdxe=_[_0xd731[20]](_0x28bdxc,_0x28bdx8[_0xd731[32]]);return _0x28bdxe[_0xd731[37]]()})[_0xd731[13]](function(_0x28bdxc){return _0x28bdx9[_0xd731[12]](200)[_0xd731[11]](_0x28bdxc)})[_0xd731[10]](sequelize.UniqueConstraintError,function(_0x28bdxa){return Util[_0xd731[30]][_0xd731[29]](_0x28bdx9,_0x28bdxa)})[_0xd731[10]](function(_0x28bdxa){return handleError(_0x28bdx9,_0x28bdxa)})};exports[_0xd731[38]]= function(_0x28bdx8,_0x28bdx9,_0x28bdxf){return MailQueue[_0xd731[18]](_0x28bdx8[_0xd731[27]][_0xd731[16]])[_0xd731[13]](function(_0x28bdxc){if(!_0x28bdxc){return _0x28bdx9[_0xd731[26]](404)};var _0x28bdx10=_[_0xd731[39]](_0x28bdx8[_0xd731[32]][_0xd731[31]],function(_0x28bdx11){return {UserId:_0x28bdx11,penalty:_0x28bdx8[_0xd731[32]][_0xd731[33]],MailQueueId:_0x28bdxc[_0xd731[16]],queue:_0x28bdxc[_0xd731[34]]}});return UserHasMailQueue[_0xd731[40]](_0x28bdx10,{individualHooks:true})})[_0xd731[13]](function(){return _0x28bdx9[_0xd731[26]](200)})[_0xd731[10]](function(_0x28bdxa){return handleError(_0x28bdx9,_0x28bdxa)})};exports[_0xd731[41]]= function(_0x28bdx8,_0x28bdx9){return MailQueue[_0xd731[18]](_0x28bdx8[_0xd731[27]][_0xd731[16]])[_0xd731[13]](function(_0x28bdx12){if(!_0x28bdx12){return _0x28bdx9[_0xd731[26]](404)};return _0x28bdx12[_0xd731[42]](_0x28bdx8[_0xd731[14]][_0xd731[31]],{individualHooks:true})})[_0xd731[13]](function(){return _0x28bdx9[_0xd731[26]](200)})[_0xd731[10]](function(_0x28bdxa){return handleError(_0x28bdx9,_0x28bdxa)})};exports[_0xd731[43]]= function(_0x28bdx8,_0x28bdx9){var _0x28bdxd;return MailQueue[_0xd731[18]](_0x28bdx8[_0xd731[27]][_0xd731[16]])[_0xd731[13]](function(_0x28bdxc){_0x28bdxd= _0x28bdxc;if(!_0x28bdxc){return _0x28bdx9[_0xd731[26]](404)};return _0x28bdxc[_0xd731[43]]()})[_0xd731[13]](function(){return _0x28bdx9[_0xd731[26]](204)})[_0xd731[10]](sequelize.ForeignKeyConstraintError,function(_0x28bdxa){return Util[_0xd731[30]][_0xd731[47]](_0x28bdx9,_0xd731[46],_0x28bdxd[_0xd731[34]],_0x28bdxa)})[_0xd731[10]](function(_0x28bdxa){console[_0xd731[45]](_0xd731[44],_0x28bdxa);return handleError(_0x28bdx9,_0x28bdxa)})};exports[_0xd731[48]]= function(_0x28bdx8,_0x28bdx9){return MailQueue[_0xd731[43]]({where:{id:_0x28bdx8[_0xd731[14]][_0xd731[49]]},individualHooks:true})[_0xd731[13]](function(){return _0x28bdx9[_0xd731[26]](204)})[_0xd731[10]](function(_0x28bdxa){return handleError(_0x28bdx9,_0x28bdxa)})};exports[_0xd731[50]]= function(_0x28bdx8,_0x28bdx9){return MailQueue[_0xd731[18]](_0x28bdx8[_0xd731[27]][_0xd731[16]])[_0xd731[13]](function(_0x28bdx12){if(!_0x28bdx12){return _0x28bdx9[_0xd731[26]](404)};return _0x28bdx12[_0xd731[55]]({where:{role:_0xd731[52]},attributes:[_0xd731[16],_0xd731[34],_0xd731[53],_0xd731[54]]})})[_0xd731[13]](function(_0x28bdx13){return _0x28bdx9[_0xd731[12]](200)[_0xd731[11]]({rows:_0x28bdx13,count:_0x28bdx13[_0xd731[51]]})})[_0xd731[10]](function(_0x28bdxa){return handleError(_0x28bdx9,_0x28bdxa)})};function handleError(_0x28bdx9,_0x28bdxa){return _0x28bdx9[_0xd731[12]](500)[_0xd731[11]](_0x28bdxa)} \ No newline at end of file diff --git a/server/api/mail_queue/mail_queue.events.js b/server/api/mail_queue/mail_queue.events.js index 7f926cc..eaec886 100644 --- a/server/api/mail_queue/mail_queue.events.js +++ b/server/api/mail_queue/mail_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const MailQueue = require('../../models').MailQueue; - -var MailQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -MailQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - MailQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - MailQueueEvents.emit(event + ':' + doc._id, doc); - MailQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = MailQueueEvents; +var _0xb5d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb5d2[0];const EventEmitter=require(_0xb5d2[1]);const MailQueue=require(_0xb5d2[3])[_0xb5d2[2]];var MailQueueEvents= new EventEmitter();MailQueueEvents[_0xb5d2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb5d2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb5d2[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb5d2[6]};for(var e in events){var event=events[e];MailQueue[_0xb5d2[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x28b9x8,_0x28b9x9,_0x28b9xa){MailQueueEvents[_0xb5d2[10]](event+ _0xb5d2[8]+ _0x28b9x8[_0xb5d2[9]],_0x28b9x8);MailQueueEvents[_0xb5d2[10]](event,_0x28b9x8);_0x28b9xa(null)}}module[_0xb5d2[11]]= MailQueueEvents \ No newline at end of file diff --git a/server/api/mail_queue/mail_queue.socket.js b/server/api/mail_queue/mail_queue.socket.js index dca86ad..6239a04 100644 --- a/server/api/mail_queue/mail_queue.socket.js +++ b/server/api/mail_queue/mail_queue.socket.js @@ -1,28 +1 @@ -'use strict'; - -const MailQueueEvents = require('./mail_queue.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('mail_queue:' + event, socket); - - MailQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - MailQueueEvents.removeListener(event, listener); - }; -} +var _0xfd87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xfd87[0];const MailQueueEvents=require(_0xfd87[1]);var events=[_0xfd87[2],_0xfd87[3]];exports[_0xfd87[4]]= function(_0x8dfbx3){for(var _0x8dfbx4=0,_0x8dfbx5=events[_0xfd87[5]];_0x8dfbx4< _0x8dfbx5;_0x8dfbx4++){var _0x8dfbx6=events[_0x8dfbx4];var _0x8dfbx7=createListener(_0xfd87[6]+ _0x8dfbx6,_0x8dfbx3);MailQueueEvents[_0xfd87[7]](_0x8dfbx6,_0x8dfbx7);_0x8dfbx3[_0xfd87[7]](_0xfd87[8],removeListener(_0x8dfbx6,_0x8dfbx7))}};function createListener(_0x8dfbx6,_0x8dfbx3){return function(_0x8dfbx9){_0x8dfbx3[_0xfd87[9]](_0x8dfbx6,_0x8dfbx9)}}function removeListener(_0x8dfbx6,_0x8dfbx7){return function(){MailQueueEvents[_0xfd87[10]](_0x8dfbx6,_0x8dfbx7)}} \ No newline at end of file diff --git a/server/api/mail_room/index.js b/server/api/mail_room/index.js index 376f392..534e764 100644 --- a/server/api/mail_room/index.js +++ b/server/api/mail_room/index.js @@ -1,32 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./mail_room.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -// TODO endpoint to filter just NEW/OPEN -router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.index); -router.get('/inbox', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.inbox); -router.get('/describe', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.describe); -router.get('/pending', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9, 17], ['admin']), controller.pending); -router.get('/new', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9, 17], ['admin']), controller.new); -router.get('/open', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9, 17], ['admin']), controller.open); -router.get('/closed', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9, 17], ['admin']), controller.closed); -router.get('/agent/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.agentIndex); -router.get('/messages/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.getRoomByMessage); -router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'user', 'agent']), controller.show); -router.get('/:id/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.showAgents); -router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.create); -router.post('/:id/messages/send', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.sendMessage); -// router.post('/:id/messages/receive', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.receiveMessage); -router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.update); -router.patch('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.updatePatch); -router.put('/:id/agents', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.updateAgents); -router.delete('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.bulkDestroy); -router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroy); - -module.exports = router; +var _0xf028=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x69\x6E\x62\x6F\x78","\x61\x67\x65\x6E\x74","\x69\x6E\x62\x6F\x78","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x70\x65\x6E\x64\x69\x6E\x67","\x70\x65\x6E\x64\x69\x6E\x67","\x2F\x6E\x65\x77","\x6E\x65\x77","\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E","\x2F\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x2F\x61\x67\x65\x6E\x74\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64","\x75\x73\x65\x72","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x70\x61\x74\x63\x68","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xf028[0];var express=require(_0xf028[1]);var controller=require(_0xf028[2]);var auth=require(_0xf028[3]);var license=require(_0xf028[4]);var router=express.Router();router[_0xf028[12]](_0xf028[5],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9]]),controller[_0xf028[11]]);router[_0xf028[12]](_0xf028[13],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9],_0xf028[14]]),controller[_0xf028[15]]);router[_0xf028[12]](_0xf028[16],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9]]),controller[_0xf028[17]]);router[_0xf028[12]](_0xf028[18],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9,17],[_0xf028[9]]),controller[_0xf028[19]]);router[_0xf028[12]](_0xf028[20],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9,17],[_0xf028[9]]),controller[_0xf028[21]]);router[_0xf028[12]](_0xf028[22],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9,17],[_0xf028[9]]),controller[_0xf028[23]]);router[_0xf028[12]](_0xf028[24],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9,17],[_0xf028[9]]),controller[_0xf028[25]]);router[_0xf028[12]](_0xf028[26],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9]]),controller[_0xf028[27]]);router[_0xf028[12]](_0xf028[28],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9],_0xf028[14]]),controller[_0xf028[29]]);router[_0xf028[12]](_0xf028[30],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9],_0xf028[31],_0xf028[14]]),controller[_0xf028[32]]);router[_0xf028[12]](_0xf028[33],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9],_0xf028[14]]),controller[_0xf028[34]]);router[_0xf028[36]](_0xf028[5],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9]]),controller[_0xf028[35]]);router[_0xf028[36]](_0xf028[37],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9],_0xf028[14]]),controller[_0xf028[38]]);router[_0xf028[40]](_0xf028[30],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9],_0xf028[14]]),controller[_0xf028[39]]);router[_0xf028[42]](_0xf028[30],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9],_0xf028[14]]),controller[_0xf028[41]]);router[_0xf028[40]](_0xf028[33],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9],_0xf028[14]]),controller[_0xf028[43]]);router[_0xf028[45]](_0xf028[5],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9]]),controller[_0xf028[44]]);router[_0xf028[45]](_0xf028[30],license[_0xf028[6]](),license[_0xf028[7]](),auth[_0xf028[8]](),auth[_0xf028[10]]([9],[_0xf028[9]]),controller[_0xf028[46]]);module[_0xf028[47]]= router \ No newline at end of file diff --git a/server/api/mail_room/mail_room.controller.js b/server/api/mail_room/mail_room.controller.js index 4d07489..2b813f7 100644 --- a/server/api/mail_room/mail_room.controller.js +++ b/server/api/mail_room/mail_room.controller.js @@ -1,479 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var htmlToText = require('html-to-text'); - -var Util = require('../../config/util'); -var moment = require('moment'); - -var sequelize = require('../../models').sequelize; -var User = require('../../models').User; -var Agent = require('../../models').User; -var Contact = require('../../models').Contact; -var Status = require('../../models').MailRoomStatus; -var MailRoom = require('../../models').MailRoom; -var MailMessage = require('../../models').MailMessage; -var MailAccount = require('../../models').MailAccount; -var MailApplication = require('../../models').MailApplication; -var MailQueue = require('../../models').MailQueue; -var MailAttachment = require('../../models').MailAttachment; - -// Get list of mailRooms -exports.index = function(req, res, next) { - return MailRoom - .scope('default') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of fields -exports.describe = function(req, res) { - return MailRoom - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getMailQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getMailQueuesIdByUser({}, { - attributes: ['id'] - })) - .then(function(userQueues) { - return { - include: { - model: MailAccount, - include: { - model: MailApplication, - include: { - model: MailQueue, - where: { - id: _.map(userQueues, 'id') - } - } - } - } - }; - }); - default: - return {}; - } - } -} - -exports.pending = function(req, res) { - return Promise - .all([]) - .then(getMailQueues(req.user)) - .then(function(condition) { - return MailRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'PENDING', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.new = function(req, res) { - return Promise - .all([]) - .then(getMailQueues(req.user)) - .then(function(condition) { - return MailRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'NEW', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.open = function(req, res) { - return Promise - .all([]) - .then(getMailQueues(req.user)) - .then(function(condition) { - return MailRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'OPEN', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.closed = function(req, res) { - return Promise - .all([]) - .then(getMailQueues(req.user)) - .then(function(condition) { - return MailRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'CLOSED', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.inbox = function(req, res, next) { - switch (req.user.role) { - case 'agent': - - return sequelize.query( - 'SELECT `MailRoom`.`id`, `MailRoom`.`subject`, `MailRoom`.`from`, `MailRoom`.`account`, `MailRoom`.`status`, `MailRoom`.`lastEvent`, `MailRoom`.`updatedAt` FROM `mail_rooms` AS `MailRoom` LEFT OUTER JOIN (`user_has_mail_rooms` AS `Users.user_has_mail_rooms` INNER JOIN `users` AS `Users` ON `Users`.`id` = `Users.user_has_mail_rooms`.`UserId`) ON `MailRoom`.`id` = `Users.user_has_mail_rooms`.`MailRoomId` WHERE (`MailRoom`.`deletedAt` IS NULL AND (`MailRoom`.`status` = :status OR `Users`.`id` = :id))', { - replacements: { - status: 'UNMANAGED', - id: req.user.id - }, - type: sequelize.QueryTypes.SELECT - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); - - default: - - return sequelize.query( - 'SELECT `id`, `subject`, `from`, `account`, `status`, `lastEvent` ,`updatedAt` FROM `mail_rooms` WHERE `mail_rooms`.`deletedAt` IS NULL', { - replacements: { - status: 'UNMANAGED', - id: req.user.id - }, - type: sequelize.QueryTypes.SELECT - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -// Get list of agent mailRooms -exports.agentIndex = function(req, res, next) { - return MailRoom - .findAll({ - where: { - UserId: req.params.id - }, - include: [{ - all: true - }] - }) - .then(function(mailRooms) { - return res.status(200).send(mailRooms); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of agent mailRooms -exports.updateRoomStatus = function(req, res, next) { - var _mailRoom; - var _promises = []; - - console.log(req.body); - console.log(req.params); - - return MailRoom - .update(req.body, { - where: { - id: req.params.id.split(',') - }, - individualHooks: true - }) - .then(function() { - return Status - .bulkCreate(_.map(req.params.id.split(','), function(id) { - return { - status: req.body.status, - data1: req.user.name, - data2: req.user.fullname, - MailRoomId: id, - UserId: req.user.id - } - })); - }) - .then(function(mailRooms) { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getRoomByMessage = function(req, res, next) { - return MailMessage - .findById(req.params.id) - .then(function(mailMessage) { - return mailMessage - .getMailRoom({ - include: [{ - model: MailAccount - }, { - model: MailMessage, - include: [{ - model: MailAttachment - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }); - }) - .then(function(mailRoom) { - return res.send(mailRoom); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single mailRoom -exports.show = function(req, res, next) { - return MailRoom - .scope('default') - .findById(req.params.id) - .then(function(mailRoom) { - if (!mailRoom) { - return res.sendStatus(404); - } - return res.send(mailRoom); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; - -// Get a single mailRoom -exports.showAgents = function(req, res, next) { - return MailRoom - .findById(req.params.id) - .then(function(mailRoom) { - if (!mailRoom) { - return res.sendStatus(404); - } - - return mailRoom - .getUsers({ - attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal'] - }); - }) - .then(function(users) { - return res.send(users); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new mailRoom in the DB. -exports.create = function(req, res, next) { - return MailRoom - .create(req.body) - .then(function(mailRoom) { - return res.status(201).send(mailRoom); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new mailMessage in the DB. -exports.sendMessage = function(req, res, next) { - req.body.UserId = req.user.id; - req.body.MailRoomId = req.params.id; - req.body.attachment = (req.body.MailAttachments && req.body.MailAttachments.length) ? true : false; - req.body.text = req.body.text || htmlToText.fromString(req.body.html, { - wordwrap: false - }); - return MailMessage - .create(req.body, { - include: [{ - model: MailAttachment - }], - user: req.user - }) - .then(function(mailMessage) { - return res.status(201).send(mailMessage); - - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing mailRoom in the DB. -exports.update = function(req, res, next) { - return MailRoom - .findById(req.params.id) - .then(function(mailRoom) { - if (!mailRoom) { - return res.sendStatus(404); - } - - return mailRoom - .update(req.body); - }) - .then(function(mailRoom) { - return res.status(200).send(mailRoom); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing mailRoom in the DB. -exports.updatePatch = function(req, res, next) { - var _options = { - where: { - id: req.params.id.split(',') - }, - user: req.user, - individualHooks: true - }; - - return MailRoom - .update(req.body, _options) - .then(function(mailRooms) { - if (!mailRooms) { - return res.sendStatus(404); - } - return mailRooms - }) - .then(function(mailRooms) { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single mailRoom -exports.updateAgents = function(req, res, next) { - return MailRoom - .findById(req.params.id) - .then(function(mailRoom) { - if (!mailRoom) { - return res.sendStatus(404); - } - - return mailRoom - .setUsers(req.body.agents, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a mailRoom from the DB. -exports.destroy = function(req, res, next) { - return MailRoom - .findById(req.params.id) - .then(function(mailRoom) { - if (!mailRoom) { - return res.sendStatus(404); - } - return mailRoom.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return MailRoom - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x32bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x70\x65\x6E\x64\x69\x6E\x67","\x6C\x6F\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x69\x6E\x62\x6F\x78","\x65\x72\x72\x6F\x72","\x53\x45\x4C\x45\x43\x54\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x75\x62\x6A\x65\x63\x74\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x2C\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x20\x4C\x45\x46\x54\x20\x4F\x55\x54\x45\x52\x20\x4A\x4F\x49\x4E\x20\x28\x60\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x49\x4E\x4E\x45\x52\x20\x4A\x4F\x49\x4E\x20\x60\x75\x73\x65\x72\x73\x60\x20\x41\x53\x20\x60\x55\x73\x65\x72\x73\x60\x20\x4F\x4E\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x55\x73\x65\x72\x49\x64\x60\x29\x20\x4F\x4E\x20\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x60\x55\x73\x65\x72\x73\x2E\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64\x60\x20\x57\x48\x45\x52\x45\x20\x28\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x41\x4E\x44\x20\x28\x60\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x60\x2E\x60\x73\x74\x61\x74\x75\x73\x60\x20\x3D\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x4F\x52\x20\x60\x55\x73\x65\x72\x73\x60\x2E\x60\x69\x64\x60\x20\x3D\x20\x3A\x69\x64\x29\x29","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x61\x67\x65\x6E\x74","\x53\x45\x4C\x45\x43\x54\x20\x60\x69\x64\x60\x2C\x20\x60\x73\x75\x62\x6A\x65\x63\x74\x60\x2C\x20\x60\x66\x72\x6F\x6D\x60\x2C\x20\x60\x61\x63\x63\x6F\x75\x6E\x74\x60\x2C\x20\x60\x73\x74\x61\x74\x75\x73\x60\x2C\x20\x60\x6C\x61\x73\x74\x45\x76\x65\x6E\x74\x60\x20\x2C\x60\x75\x70\x64\x61\x74\x65\x64\x41\x74\x60\x20\x46\x52\x4F\x4D\x20\x60\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x20\x57\x48\x45\x52\x45\x20\x60\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73\x60\x2E\x60\x64\x65\x6C\x65\x74\x65\x64\x41\x74\x60\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x61\x67\x65\x6E\x74\x49\x6E\x64\x65\x78","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x62\x6F\x64\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x2C","\x73\x70\x6C\x69\x74","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x73\x68\x6F\x77","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x32bd[0];var _=require(_0x32bd[1]);var util=require(_0x32bd[2]);var htmlToText=require(_0x32bd[3]);var Util=require(_0x32bd[4]);var moment=require(_0x32bd[5]);var sequelize=require(_0x32bd[7])[_0x32bd[6]];var User=require(_0x32bd[7])[_0x32bd[8]];var Agent=require(_0x32bd[7])[_0x32bd[8]];var Contact=require(_0x32bd[7])[_0x32bd[9]];var Status=require(_0x32bd[7])[_0x32bd[10]];var MailRoom=require(_0x32bd[7])[_0x32bd[11]];var MailMessage=require(_0x32bd[7])[_0x32bd[12]];var MailAccount=require(_0x32bd[7])[_0x32bd[13]];var MailApplication=require(_0x32bd[7])[_0x32bd[14]];var MailQueue=require(_0x32bd[7])[_0x32bd[15]];var MailAttachment=require(_0x32bd[7])[_0x32bd[16]];exports[_0x32bd[17]]= function(_0xc826x11,_0xc826x12,_0xc826x13){return MailRoom[_0x32bd[26]](_0x32bd[25])[_0x32bd[24]](Util[_0x32bd[23]](_0xc826x11[_0x32bd[22]]))[_0x32bd[21]](function(_0xc826x15){return _0xc826x12[_0x32bd[20]](200)[_0x32bd[19]](_0xc826x15)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[27]]= function(_0xc826x11,_0xc826x12){return MailRoom[_0x32bd[27]]()[_0x32bd[21]](function(_0xc826x16){return _0xc826x12[_0x32bd[20]](200)[_0x32bd[19]](_0xc826x16)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};function getMailQueues(_0xc826x18){return function(){switch(_0xc826x18[_0x32bd[33]]){case _0x32bd[32]:return User[_0x32bd[31]](_0xc826x18[_0x32bd[28]],{attributes:[_0x32bd[28]]})[_0x32bd[21]](Util[_0x32bd[30]]({},{attributes:[_0x32bd[28]]}))[_0x32bd[21]](function(_0xc826x19){return {include:{model:MailAccount,include:{model:MailApplication,include:{model:MailQueue,where:{id:_[_0x32bd[29]](_0xc826x19,_0x32bd[28])}}}}}});default:return {}}}}exports[_0x32bd[34]]= function(_0xc826x11,_0xc826x12){return Promise[_0x32bd[41]]([])[_0x32bd[21]](getMailQueues(_0xc826x11[_0x32bd[32]]))[_0x32bd[21]](function(_0xc826x1b){return MailRoom[_0x32bd[40]](_[_0x32bd[39]](Util[_0x32bd[23]](_0xc826x11[_0x32bd[22]],{status:_0x32bd[36],updatedAt:{$gte:moment()[_0x32bd[38]](_0x32bd[37])}}),_0xc826x1b))})[_0x32bd[21]](function(_0xc826x1a){return _0xc826x12[_0x32bd[20]](200)[_0x32bd[19]]({value:_0xc826x1a})})[_0x32bd[18]](function(_0xc826x14){console[_0x32bd[35]](_0xc826x14);return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[42]]= function(_0xc826x11,_0xc826x12){return Promise[_0x32bd[41]]([])[_0x32bd[21]](getMailQueues(_0xc826x11[_0x32bd[32]]))[_0x32bd[21]](function(_0xc826x1b){return MailRoom[_0x32bd[40]](_[_0x32bd[39]](Util[_0x32bd[23]](_0xc826x11[_0x32bd[22]],{status:_0x32bd[43],updatedAt:{$gte:moment()[_0x32bd[38]](_0x32bd[37])}}),_0xc826x1b))})[_0x32bd[21]](function(_0xc826x1a){return _0xc826x12[_0x32bd[20]](200)[_0x32bd[19]]({value:_0xc826x1a})})[_0x32bd[18]](function(_0xc826x14){console[_0x32bd[35]](_0xc826x14);return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[44]]= function(_0xc826x11,_0xc826x12){return Promise[_0x32bd[41]]([])[_0x32bd[21]](getMailQueues(_0xc826x11[_0x32bd[32]]))[_0x32bd[21]](function(_0xc826x1b){return MailRoom[_0x32bd[40]](_[_0x32bd[39]](Util[_0x32bd[23]](_0xc826x11[_0x32bd[22]],{status:_0x32bd[45],updatedAt:{$gte:moment()[_0x32bd[38]](_0x32bd[37])}}),_0xc826x1b))})[_0x32bd[21]](function(_0xc826x1a){return _0xc826x12[_0x32bd[20]](200)[_0x32bd[19]]({value:_0xc826x1a})})[_0x32bd[18]](function(_0xc826x14){console[_0x32bd[35]](_0xc826x14);return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[46]]= function(_0xc826x11,_0xc826x12){return Promise[_0x32bd[41]]([])[_0x32bd[21]](getMailQueues(_0xc826x11[_0x32bd[32]]))[_0x32bd[21]](function(_0xc826x1b){return MailRoom[_0x32bd[40]](_[_0x32bd[39]](Util[_0x32bd[23]](_0xc826x11[_0x32bd[22]],{status:_0x32bd[47],updatedAt:{$gte:moment()[_0x32bd[38]](_0x32bd[37])}}),_0xc826x1b))})[_0x32bd[21]](function(_0xc826x1a){return _0xc826x12[_0x32bd[20]](200)[_0x32bd[19]]({value:_0xc826x1a})})[_0x32bd[18]](function(_0xc826x14){console[_0x32bd[35]](_0xc826x14);return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[48]]= function(_0xc826x11,_0xc826x12,_0xc826x13){switch(_0xc826x11[_0x32bd[32]][_0x32bd[33]]){case _0x32bd[54]:return sequelize[_0x32bd[22]](_0x32bd[50],{replacements:{status:_0x32bd[51],id:_0xc826x11[_0x32bd[32]][_0x32bd[28]]},type:sequelize[_0x32bd[53]][_0x32bd[52]]})[_0x32bd[21]](function(_0xc826x15){return _0xc826x12[_0x32bd[20]](200)[_0x32bd[19]](_0xc826x15)})[_0x32bd[18]](function(_0xc826x14){console[_0x32bd[49]](_0xc826x14);return handleError(_0xc826x12,_0xc826x14)});default:return sequelize[_0x32bd[22]](_0x32bd[55],{replacements:{status:_0x32bd[51],id:_0xc826x11[_0x32bd[32]][_0x32bd[28]]},type:sequelize[_0x32bd[53]][_0x32bd[52]]})[_0x32bd[21]](function(_0xc826x15){return _0xc826x12[_0x32bd[20]](200)[_0x32bd[19]](_0xc826x15)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})}};exports[_0x32bd[56]]= function(_0xc826x11,_0xc826x12,_0xc826x13){return MailRoom[_0x32bd[58]]({where:{UserId:_0xc826x11[_0x32bd[57]][_0x32bd[28]]},include:[{all:true}]})[_0x32bd[21]](function(_0xc826x1c){return _0xc826x12[_0x32bd[20]](200)[_0x32bd[19]](_0xc826x1c)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[59]]= function(_0xc826x11,_0xc826x12,_0xc826x13){var _0xc826x1d;var _0xc826x1e=[];console[_0x32bd[35]](_0xc826x11[_0x32bd[60]]);console[_0x32bd[35]](_0xc826x11[_0x32bd[57]]);return MailRoom[_0x32bd[67]](_0xc826x11[_0x32bd[60]],{where:{id:_0xc826x11[_0x32bd[57]][_0x32bd[28]][_0x32bd[63]](_0x32bd[62])},individualHooks:true})[_0x32bd[21]](function(){return Status[_0x32bd[66]](_[_0x32bd[29]](_0xc826x11[_0x32bd[57]][_0x32bd[28]][_0x32bd[63]](_0x32bd[62]),function(_0xc826x1f){return {status:_0xc826x11[_0x32bd[60]][_0x32bd[20]],data1:_0xc826x11[_0x32bd[32]][_0x32bd[64]],data2:_0xc826x11[_0x32bd[32]][_0x32bd[65]],MailRoomId:_0xc826x1f,UserId:_0xc826x11[_0x32bd[32]][_0x32bd[28]]}}))})[_0x32bd[21]](function(_0xc826x1c){return _0xc826x12[_0x32bd[61]](200)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[68]]= function(_0xc826x11,_0xc826x12,_0xc826x13){return MailMessage[_0x32bd[31]](_0xc826x11[_0x32bd[57]][_0x32bd[28]])[_0x32bd[21]](function(_0xc826x21){return _0xc826x21[_0x32bd[70]]({include:[{model:MailAccount},{model:MailMessage,include:[{model:MailAttachment},{model:User,attributes:[_0x32bd[28],_0x32bd[64],_0x32bd[65],_0x32bd[69]]}]},{model:User,attributes:[_0x32bd[28],_0x32bd[64],_0x32bd[65],_0x32bd[69]]}]})})[_0x32bd[21]](function(_0xc826x20){return _0xc826x12[_0x32bd[19]](_0xc826x20)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[71]]= function(_0xc826x11,_0xc826x12,_0xc826x13){return MailRoom[_0x32bd[26]](_0x32bd[25])[_0x32bd[31]](_0xc826x11[_0x32bd[57]][_0x32bd[28]])[_0x32bd[21]](function(_0xc826x20){if(!_0xc826x20){return _0xc826x12[_0x32bd[61]](404)};return _0xc826x12[_0x32bd[19]](_0xc826x20)})[_0x32bd[18]](function(_0xc826x14){console[_0x32bd[49]](_0xc826x14);return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[72]]= function(_0xc826x11,_0xc826x12,_0xc826x13){return MailRoom[_0x32bd[31]](_0xc826x11[_0x32bd[57]][_0x32bd[28]])[_0x32bd[21]](function(_0xc826x20){if(!_0xc826x20){return _0xc826x12[_0x32bd[61]](404)};return _0xc826x20[_0x32bd[74]]({attributes:[_0x32bd[28],_0x32bd[64],_0x32bd[65],_0x32bd[69],_0x32bd[33],_0x32bd[73]]})})[_0x32bd[21]](function(_0xc826x22){return _0xc826x12[_0x32bd[19]](_0xc826x22)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[75]]= function(_0xc826x11,_0xc826x12,_0xc826x13){return MailRoom[_0x32bd[75]](_0xc826x11[_0x32bd[60]])[_0x32bd[21]](function(_0xc826x20){return _0xc826x12[_0x32bd[20]](201)[_0x32bd[19]](_0xc826x20)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[76]]= function(_0xc826x11,_0xc826x12,_0xc826x13){_0xc826x11[_0x32bd[60]][_0x32bd[77]]= _0xc826x11[_0x32bd[32]][_0x32bd[28]];_0xc826x11[_0x32bd[60]][_0x32bd[78]]= _0xc826x11[_0x32bd[57]][_0x32bd[28]];_0xc826x11[_0x32bd[60]][_0x32bd[79]]= (_0xc826x11[_0x32bd[60]][_0x32bd[80]]&& _0xc826x11[_0x32bd[60]][_0x32bd[80]][_0x32bd[81]])?true:false;_0xc826x11[_0x32bd[60]][_0x32bd[82]]= _0xc826x11[_0x32bd[60]][_0x32bd[82]]|| htmlToText[_0x32bd[84]](_0xc826x11[_0x32bd[60]][_0x32bd[83]],{wordwrap:false});return MailMessage[_0x32bd[75]](_0xc826x11[_0x32bd[60]],{include:[{model:MailAttachment}],user:_0xc826x11[_0x32bd[32]]})[_0x32bd[21]](function(_0xc826x21){return _0xc826x12[_0x32bd[20]](201)[_0x32bd[19]](_0xc826x21)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[67]]= function(_0xc826x11,_0xc826x12,_0xc826x13){return MailRoom[_0x32bd[31]](_0xc826x11[_0x32bd[57]][_0x32bd[28]])[_0x32bd[21]](function(_0xc826x20){if(!_0xc826x20){return _0xc826x12[_0x32bd[61]](404)};return _0xc826x20[_0x32bd[67]](_0xc826x11[_0x32bd[60]])})[_0x32bd[21]](function(_0xc826x20){return _0xc826x12[_0x32bd[20]](200)[_0x32bd[19]](_0xc826x20)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[85]]= function(_0xc826x11,_0xc826x12,_0xc826x13){var _0xc826x23={where:{id:_0xc826x11[_0x32bd[57]][_0x32bd[28]][_0x32bd[63]](_0x32bd[62])},user:_0xc826x11[_0x32bd[32]],individualHooks:true};return MailRoom[_0x32bd[67]](_0xc826x11[_0x32bd[60]],_0xc826x23)[_0x32bd[21]](function(_0xc826x1c){if(!_0xc826x1c){return _0xc826x12[_0x32bd[61]](404)};return _0xc826x1c})[_0x32bd[21]](function(_0xc826x1c){return _0xc826x12[_0x32bd[61]](200)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[86]]= function(_0xc826x11,_0xc826x12,_0xc826x13){return MailRoom[_0x32bd[31]](_0xc826x11[_0x32bd[57]][_0x32bd[28]])[_0x32bd[21]](function(_0xc826x20){if(!_0xc826x20){return _0xc826x12[_0x32bd[61]](404)};return _0xc826x20[_0x32bd[88]](_0xc826x11[_0x32bd[60]][_0x32bd[87]],{individualHooks:true})})[_0x32bd[21]](function(){return _0xc826x12[_0x32bd[61]](200)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[89]]= function(_0xc826x11,_0xc826x12,_0xc826x13){return MailRoom[_0x32bd[31]](_0xc826x11[_0x32bd[57]][_0x32bd[28]])[_0x32bd[21]](function(_0xc826x20){if(!_0xc826x20){return _0xc826x12[_0x32bd[61]](404)};return _0xc826x20[_0x32bd[89]]()})[_0x32bd[21]](function(){return _0xc826x12[_0x32bd[61]](204)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};exports[_0x32bd[90]]= function(_0xc826x11,_0xc826x12){return MailRoom[_0x32bd[89]]({where:{id:_0xc826x11[_0x32bd[22]][_0x32bd[91]]},individualHooks:true})[_0x32bd[21]](function(){return _0xc826x12[_0x32bd[61]](200)})[_0x32bd[18]](function(_0xc826x14){return handleError(_0xc826x12,_0xc826x14)})};function handleError(_0xc826x12,_0xc826x14){return _0xc826x12[_0x32bd[20]](500)[_0x32bd[19]](_0xc826x14)} \ No newline at end of file diff --git a/server/api/mail_room/mail_room.events.js b/server/api/mail_room/mail_room.events.js index b0fc25b..92dfe08 100644 --- a/server/api/mail_room/mail_room.events.js +++ b/server/api/mail_room/mail_room.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const MailRoom = require('../../models').MailRoom; - -var MailRoomEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -MailRoomEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - MailRoom.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - MailRoomEvents.emit(event + ':' + doc._id, doc); - MailRoomEvents.emit(event, doc); - done(null); - } -} - -module.exports = MailRoomEvents; +var _0x2760=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2760[0];const EventEmitter=require(_0x2760[1]);const MailRoom=require(_0x2760[3])[_0x2760[2]];var MailRoomEvents= new EventEmitter();MailRoomEvents[_0x2760[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2760[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2760[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2760[6]};for(var e in events){var event=events[e];MailRoom[_0x2760[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x34cbx8,_0x34cbx9,_0x34cbxa){MailRoomEvents[_0x2760[10]](event+ _0x2760[8]+ _0x34cbx8[_0x2760[9]],_0x34cbx8);MailRoomEvents[_0x2760[10]](event,_0x34cbx8);_0x34cbxa(null)}}module[_0x2760[11]]= MailRoomEvents \ No newline at end of file diff --git a/server/api/mail_room/mail_room.socket.js b/server/api/mail_room/mail_room.socket.js index 9d2aefc..9b374ba 100644 --- a/server/api/mail_room/mail_room.socket.js +++ b/server/api/mail_room/mail_room.socket.js @@ -1,28 +1 @@ -'use strict'; - -const MailRoomEvents = require('./mail_room.events'); - -// Model events to emit -var events = ['save', 'save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('mail_room:' + event, socket); - - MailRoomEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - MailRoomEvents.removeListener(event, listener); - }; -} +var _0xe544=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xe544[0];const MailRoomEvents=require(_0xe544[1]);var events=[_0xe544[2],_0xe544[2],_0xe544[3]];exports[_0xe544[4]]= function(_0xa312x3){for(var _0xa312x4=0,_0xa312x5=events[_0xe544[5]];_0xa312x4< _0xa312x5;_0xa312x4++){var _0xa312x6=events[_0xa312x4];var _0xa312x7=createListener(_0xe544[6]+ _0xa312x6,_0xa312x3);MailRoomEvents[_0xe544[7]](_0xa312x6,_0xa312x7);_0xa312x3[_0xe544[7]](_0xe544[8],removeListener(_0xa312x6,_0xa312x7))}};function createListener(_0xa312x6,_0xa312x3){return function(_0xa312x9){_0xa312x3[_0xe544[9]](_0xa312x6,_0xa312x9)}}function removeListener(_0xa312x6,_0xa312x7){return function(){MailRoomEvents[_0xe544[10]](_0xa312x6,_0xa312x7)}} \ No newline at end of file diff --git a/server/api/mail_server_in/index.js b/server/api/mail_server_in/index.js index 58902a3..f25819e 100644 --- a/server/api/mail_server_in/index.js +++ b/server/api/mail_server_in/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./mail_server_in.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.show); -router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.create); -router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroy); - -module.exports = router; +var _0x5577=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5577[0];var express=require(_0x5577[1]);var controller=require(_0x5577[2]);var auth=require(_0x5577[3]);var license=require(_0x5577[4]);var router=express.Router();router[_0x5577[12]](_0x5577[5],license[_0x5577[6]](),license[_0x5577[7]](),auth[_0x5577[8]](),auth[_0x5577[10]]([9],[_0x5577[9]]),controller[_0x5577[11]]);router[_0x5577[12]](_0x5577[13],license[_0x5577[6]](),license[_0x5577[7]](),auth[_0x5577[8]](),auth[_0x5577[10]]([9],[_0x5577[9]]),controller[_0x5577[14]]);router[_0x5577[16]](_0x5577[5],license[_0x5577[6]](),license[_0x5577[7]](),auth[_0x5577[8]](),auth[_0x5577[10]]([9],[_0x5577[9]]),controller[_0x5577[15]]);router[_0x5577[18]](_0x5577[13],license[_0x5577[6]](),license[_0x5577[7]](),auth[_0x5577[8]](),auth[_0x5577[10]]([9],[_0x5577[9]]),controller[_0x5577[17]]);router[_0x5577[20]](_0x5577[13],license[_0x5577[6]](),license[_0x5577[7]](),auth[_0x5577[8]](),auth[_0x5577[10]]([9],[_0x5577[9]]),controller[_0x5577[19]]);module[_0x5577[21]]= router \ No newline at end of file diff --git a/server/api/mail_server_in/mail_server_in.controller.js b/server/api/mail_server_in/mail_server_in.controller.js index 27fda21..e1b1e79 100644 --- a/server/api/mail_server_in/mail_server_in.controller.js +++ b/server/api/mail_server_in/mail_server_in.controller.js @@ -1,96 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var sequelize = require('../../models').sequelize; -var MailServerIn = require('../../models').MailServerIn; - -// Get list of mail_server_ins -exports.index = function(req, res) { - return MailServerIn - .findAll() - .then(function(mail_server_ins) { - return res.status(200).send(mail_server_ins); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single mailServerIn -exports.show = function(req, res) { - return MailServerIn - .findById(req.params.id) - .then(function(mailServerIn) { - if (!mailServerIn) { - return res.sendStatus(404); - } - return res.send(mailServerIn); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new mailServerIn in the DB. -exports.create = function(req, res) { - return MailServerIn - .create(req.body) - .then(function(mailServerIn) { - return res.status(201).send(mailServerIn); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing mailServerIn in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return MailServerIn - .findById(req.params.id) - .then(function(mailServerIn) { - if (!mailServerIn) { - return res.sendStatus(404); - } - var updated = _.merge(mailServerIn, req.body); - return updated - .save(); - }) - .then(function(mailServerIn) { - return res.status(200).send(mailServerIn); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a mailServerIn from the DB. -exports.destroy = function(req, res) { - return MailServerIn - .findById(req.params.id) - .then(function(mailServerIn) { - if (!mailServerIn) { - return res.sendStatus(404); - } - return mailServerIn - .destroy(); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x8ddb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x8ddb[0];var _=require(_0x8ddb[1]);var Util=require(_0x8ddb[2]);var sequelize=require(_0x8ddb[4])[_0x8ddb[3]];var MailServerIn=require(_0x8ddb[4])[_0x8ddb[5]];exports[_0x8ddb[6]]= function(_0x7e16x5,_0x7e16x6){return MailServerIn[_0x8ddb[11]]()[_0x8ddb[10]](function(_0x7e16x8){return _0x7e16x6[_0x8ddb[9]](200)[_0x8ddb[8]](_0x7e16x8)})[_0x8ddb[7]](function(_0x7e16x7){return handleError(_0x7e16x6,_0x7e16x7)})};exports[_0x8ddb[12]]= function(_0x7e16x5,_0x7e16x6){return MailServerIn[_0x8ddb[16]](_0x7e16x5[_0x8ddb[15]][_0x8ddb[14]])[_0x8ddb[10]](function(_0x7e16x9){if(!_0x7e16x9){return _0x7e16x6[_0x8ddb[13]](404)};return _0x7e16x6[_0x8ddb[8]](_0x7e16x9)})[_0x8ddb[7]](function(_0x7e16x7){return handleError(_0x7e16x6,_0x7e16x7)})};exports[_0x8ddb[17]]= function(_0x7e16x5,_0x7e16x6){return MailServerIn[_0x8ddb[17]](_0x7e16x5[_0x8ddb[20]])[_0x8ddb[10]](function(_0x7e16x9){return _0x7e16x6[_0x8ddb[9]](201)[_0x8ddb[8]](_0x7e16x9)})[_0x8ddb[7]](sequelize.UniqueConstraintError,function(_0x7e16x7){return Util[_0x8ddb[19]][_0x8ddb[18]](_0x7e16x6,_0x7e16x7)})[_0x8ddb[7]](function(_0x7e16x7){return handleError(_0x7e16x6,_0x7e16x7)})};exports[_0x8ddb[21]]= function(_0x7e16x5,_0x7e16x6){if(_0x7e16x5[_0x8ddb[20]][_0x8ddb[14]]){delete _0x7e16x5[_0x8ddb[20]][_0x8ddb[14]]};return MailServerIn[_0x8ddb[16]](_0x7e16x5[_0x8ddb[15]][_0x8ddb[14]])[_0x8ddb[10]](function(_0x7e16x9){if(!_0x7e16x9){return _0x7e16x6[_0x8ddb[13]](404)};var _0x7e16xa=_[_0x8ddb[22]](_0x7e16x9,_0x7e16x5[_0x8ddb[20]]);return _0x7e16xa[_0x8ddb[23]]()})[_0x8ddb[10]](function(_0x7e16x9){return _0x7e16x6[_0x8ddb[9]](200)[_0x8ddb[8]](_0x7e16x9)})[_0x8ddb[7]](sequelize.UniqueConstraintError,function(_0x7e16x7){return Util[_0x8ddb[19]][_0x8ddb[18]](_0x7e16x6,_0x7e16x7)})[_0x8ddb[7]](function(_0x7e16x7){return handleError(_0x7e16x6,_0x7e16x7)})};exports[_0x8ddb[24]]= function(_0x7e16x5,_0x7e16x6){return MailServerIn[_0x8ddb[16]](_0x7e16x5[_0x8ddb[15]][_0x8ddb[14]])[_0x8ddb[10]](function(_0x7e16x9){if(!_0x7e16x9){return _0x7e16x6[_0x8ddb[13]](404)};return _0x7e16x9[_0x8ddb[24]]()})[_0x8ddb[7]](function(_0x7e16x7){return handleError(_0x7e16x6,_0x7e16x7)})};function handleError(_0x7e16x6,_0x7e16x7){return _0x7e16x6[_0x8ddb[9]](500)[_0x8ddb[8]](_0x7e16x7)} \ No newline at end of file diff --git a/server/api/mail_server_in/mail_server_in.events.js b/server/api/mail_server_in/mail_server_in.events.js index 540e207..ed34696 100644 --- a/server/api/mail_server_in/mail_server_in.events.js +++ b/server/api/mail_server_in/mail_server_in.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const MailServerIn = require('../../models').MailServerIn; - -var MailServerInEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -MailServerInEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - MailServerIn.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - MailServerInEvents.emit(event + ':' + doc._id, doc); - MailServerInEvents.emit(event, doc); - done(null); - } -} - -module.exports = MailServerInEvents; +var _0xfc87=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xfc87[0];const EventEmitter=require(_0xfc87[1]);const MailServerIn=require(_0xfc87[3])[_0xfc87[2]];var MailServerInEvents= new EventEmitter();MailServerInEvents[_0xfc87[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xfc87[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xfc87[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xfc87[6]};for(var e in events){var event=events[e];MailServerIn[_0xfc87[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4d4fx8,_0x4d4fx9,_0x4d4fxa){MailServerInEvents[_0xfc87[10]](event+ _0xfc87[8]+ _0x4d4fx8[_0xfc87[9]],_0x4d4fx8);MailServerInEvents[_0xfc87[10]](event,_0x4d4fx8);_0x4d4fxa(null)}}module[_0xfc87[11]]= MailServerInEvents \ No newline at end of file diff --git a/server/api/mail_server_in/mail_server_in.socket.js b/server/api/mail_server_in/mail_server_in.socket.js index b6bcc34..409f16f 100644 --- a/server/api/mail_server_in/mail_server_in.socket.js +++ b/server/api/mail_server_in/mail_server_in.socket.js @@ -1,42 +1 @@ -'use strict'; - -const MailServerInEvents = require('./mail_server_in.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('mail_server_in:' + event, socket); - - MailServerInEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'mail_server_in:save': - if (doc.changed('state')) { - socket.emit('mail_server_in:state', doc); - } else { - socket.emit('mail_server_in:save', doc); - } - break; - - case 'mail_server_in:remove': - socket.emit(event, doc); - break; - - default: - } - }; -} - -function removeListener(event, listener) { - return function() { - MailServerInEvents.removeListener(event, listener); - }; -} +var _0xbdd0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x3A\x73\x74\x61\x74\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x3A\x73\x61\x76\x65","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xbdd0[0];const MailServerInEvents=require(_0xbdd0[1]);var events=[_0xbdd0[2],_0xbdd0[3]];exports[_0xbdd0[4]]= function(_0xb0e7x3){for(var _0xb0e7x4=0,_0xb0e7x5=events[_0xbdd0[5]];_0xb0e7x4< _0xb0e7x5;_0xb0e7x4++){var _0xb0e7x6=events[_0xb0e7x4];var _0xb0e7x7=createListener(_0xbdd0[6]+ _0xb0e7x6,_0xb0e7x3);MailServerInEvents[_0xbdd0[7]](_0xb0e7x6,_0xb0e7x7);_0xb0e7x3[_0xbdd0[7]](_0xbdd0[8],removeListener(_0xb0e7x6,_0xb0e7x7))}};function createListener(_0xb0e7x6,_0xb0e7x3){return function(_0xb0e7x9){switch(_0xb0e7x6){case _0xbdd0[13]:if(_0xb0e7x9[_0xbdd0[10]](_0xbdd0[9])){_0xb0e7x3[_0xbdd0[12]](_0xbdd0[11],_0xb0e7x9)}else {_0xb0e7x3[_0xbdd0[12]](_0xbdd0[13],_0xb0e7x9)};break;case _0xbdd0[14]:_0xb0e7x3[_0xbdd0[12]](_0xb0e7x6,_0xb0e7x9);break;default:}}}function removeListener(_0xb0e7x6,_0xb0e7x7){return function(){MailServerInEvents[_0xbdd0[15]](_0xb0e7x6,_0xb0e7x7)}} \ No newline at end of file diff --git a/server/api/mail_server_out/index.js b/server/api/mail_server_out/index.js index 323abb4..5edbd31 100644 --- a/server/api/mail_server_out/index.js +++ b/server/api/mail_server_out/index.js @@ -1,19 +1 @@ -'use strict'; - -var express = require('express'); - -var controller = require('./mail_server_out.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.index); -router.get('/service', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.indexService); -router.get('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.show); -router.get('/:id/test', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.test); -router.post('/', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.create); -router.put('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.update); -router.delete('/:id', license.isValidDate(), license.hasMail(), auth.isAuthenticated(), auth.hasModule([9], ['admin']), controller.destroy); - -module.exports = router; +var _0xc2c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4D\x61\x69\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x73\x65\x72\x76\x69\x63\x65","\x69\x6E\x64\x65\x78\x53\x65\x72\x76\x69\x63\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x74\x65\x73\x74","\x74\x65\x73\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xc2c3[0];var express=require(_0xc2c3[1]);var controller=require(_0xc2c3[2]);var auth=require(_0xc2c3[3]);var license=require(_0xc2c3[4]);var router=express.Router();router[_0xc2c3[12]](_0xc2c3[5],license[_0xc2c3[6]](),license[_0xc2c3[7]](),auth[_0xc2c3[8]](),auth[_0xc2c3[10]]([9],[_0xc2c3[9]]),controller[_0xc2c3[11]]);router[_0xc2c3[12]](_0xc2c3[13],license[_0xc2c3[6]](),license[_0xc2c3[7]](),auth[_0xc2c3[8]](),auth[_0xc2c3[10]]([9],[_0xc2c3[9]]),controller[_0xc2c3[14]]);router[_0xc2c3[12]](_0xc2c3[15],license[_0xc2c3[6]](),license[_0xc2c3[7]](),auth[_0xc2c3[8]](),auth[_0xc2c3[10]]([9],[_0xc2c3[9]]),controller[_0xc2c3[16]]);router[_0xc2c3[12]](_0xc2c3[17],license[_0xc2c3[6]](),license[_0xc2c3[7]](),auth[_0xc2c3[8]](),auth[_0xc2c3[10]]([9],[_0xc2c3[9]]),controller[_0xc2c3[18]]);router[_0xc2c3[20]](_0xc2c3[5],license[_0xc2c3[6]](),license[_0xc2c3[7]](),auth[_0xc2c3[8]](),auth[_0xc2c3[10]]([9],[_0xc2c3[9]]),controller[_0xc2c3[19]]);router[_0xc2c3[22]](_0xc2c3[15],license[_0xc2c3[6]](),license[_0xc2c3[7]](),auth[_0xc2c3[8]](),auth[_0xc2c3[10]]([9],[_0xc2c3[9]]),controller[_0xc2c3[21]]);router[_0xc2c3[24]](_0xc2c3[15],license[_0xc2c3[6]](),license[_0xc2c3[7]](),auth[_0xc2c3[8]](),auth[_0xc2c3[10]]([9],[_0xc2c3[9]]),controller[_0xc2c3[23]]);module[_0xc2c3[25]]= router \ No newline at end of file diff --git a/server/api/mail_server_out/mail_server_out.controller.js b/server/api/mail_server_out/mail_server_out.controller.js index 00117cf..8ab1d4f 100644 --- a/server/api/mail_server_out/mail_server_out.controller.js +++ b/server/api/mail_server_out/mail_server_out.controller.js @@ -1,157 +1 @@ -'use strict'; - -var _ = require('lodash'); -var MailServerOut = require('../../models').MailServerOut; -var MailMessage = require('../../models').MailMessage; -var MailAccount = require('../../models').MailAccount; -var sequelize = require('../../models').sequelize; -var Util = require('../../config/util'); - -// Get list of mailServerOuts -exports.index = function(req, res, next) { - return MailServerOut - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.indexService = function(req, res) { - return MailServerOut - .findOne({ - where: { - service: true - } - }) - .then(function(mailServerOut) { - if (!mailServerOut) { - throw new Error("Mail service account not found."); - } - - return res.status(200).send(mailServerOut); - }) - .catch(function(err) { - return handleError(res, { - message: err.message - }); - }); -}; - -// Get a single mailServerOut -exports.show = function(req, res) { - return MailServerOut - .findById(req.params.id) - .then(function(mailServerOut) { - if (!mailServerOut) { - return res.sendStatus(404); - } - return res.send(mailServerOut); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single mailAccount -exports.showCustom = function(req, res, next) { - return MailAccount - .findOne({ - where: { - custom: true - } - }) - .then(function(mailAccount) { - if (!mailAccount) { - return res.sendStatus(404); - } - return res.send(mailAccount); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new mailServerOut in the DB. -exports.create = function(req, res) { - return MailServerOut - .create(req.body) - .then(function(mailServerOut) { - return res.status(201).send(mailServerOut); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing mailServerOut in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - req.body.state = 'CONNECTING'; - - return MailServerOut - .findById(req.params.id) - .then(function(mailServerOut) { - if (!mailServerOut) { - return res.sendStatus(404); - } - var updated = _.merge(mailServerOut, req.body); - return updated - .save(); - }) - .then(function(mailServerOut) { - return res.status(200).send(mailServerOut); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a mailServerOut from the DB. -exports.destroy = function(req, res) { - return MailServerOut - .findById(req.params.id) - .then(function(mailServerOut) { - if (!mailServerOut) { - return res.sendStatus(404); - } - - return mailServerOut - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.test = function(req, res) { - var _mailServerOut; - var _mailMessage; - - return MailServerOut - .findById(req.params.id) - .then(function(mailServerOut) { - if (!mailServerOut) { - return res.sendStatus(404); - } - return mailServerOut - .update({ - state: 'CONNECTING', - }); - }) - .then(function() { - return res.status(201).send(_mailMessage); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x39d5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x69\x6E\x64\x65\x78\x53\x65\x72\x76\x69\x63\x65","\x6D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x20\x73\x65\x72\x76\x69\x63\x65\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E","\x66\x69\x6E\x64\x4F\x6E\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x65","\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4E\x47","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x65\x73\x74"];_0x39d5[0];var _=require(_0x39d5[1]);var MailServerOut=require(_0x39d5[3])[_0x39d5[2]];var MailMessage=require(_0x39d5[3])[_0x39d5[4]];var MailAccount=require(_0x39d5[3])[_0x39d5[5]];var sequelize=require(_0x39d5[3])[_0x39d5[6]];var Util=require(_0x39d5[7]);exports[_0x39d5[8]]= function(_0xda58x7,_0xda58x8,_0xda58x9){return MailServerOut[_0x39d5[15]](Util[_0x39d5[14]](_0xda58x7[_0x39d5[13]]))[_0x39d5[12]](function(_0xda58xb){return _0xda58x8[_0x39d5[11]](200)[_0x39d5[10]](_0xda58xb)})[_0x39d5[9]](function(_0xda58xa){return handleError(_0xda58x8,_0xda58xa)})};exports[_0x39d5[16]]= function(_0xda58x7,_0xda58x8){return MailServerOut[_0x39d5[19]]({where:{service:true}})[_0x39d5[12]](function(_0xda58xc){if(!_0xda58xc){throw new Error(_0x39d5[18])};return _0xda58x8[_0x39d5[11]](200)[_0x39d5[10]](_0xda58xc)})[_0x39d5[9]](function(_0xda58xa){return handleError(_0xda58x8,{message:_0xda58xa[_0x39d5[17]]})})};exports[_0x39d5[20]]= function(_0xda58x7,_0xda58x8){return MailServerOut[_0x39d5[24]](_0xda58x7[_0x39d5[23]][_0x39d5[22]])[_0x39d5[12]](function(_0xda58xc){if(!_0xda58xc){return _0xda58x8[_0x39d5[21]](404)};return _0xda58x8[_0x39d5[10]](_0xda58xc)})[_0x39d5[9]](function(_0xda58xa){return handleError(_0xda58x8,_0xda58xa)})};exports[_0x39d5[25]]= function(_0xda58x7,_0xda58x8,_0xda58x9){return MailAccount[_0x39d5[19]]({where:{custom:true}})[_0x39d5[12]](function(_0xda58xd){if(!_0xda58xd){return _0xda58x8[_0x39d5[21]](404)};return _0xda58x8[_0x39d5[10]](_0xda58xd)})[_0x39d5[9]](function(_0xda58xa){return handleError(_0xda58x8,_0xda58xa)})};exports[_0x39d5[26]]= function(_0xda58x7,_0xda58x8){return MailServerOut[_0x39d5[26]](_0xda58x7[_0x39d5[27]])[_0x39d5[12]](function(_0xda58xc){return _0xda58x8[_0x39d5[11]](201)[_0x39d5[10]](_0xda58xc)})[_0x39d5[9]](function(_0xda58xa){return handleError(_0xda58x8,_0xda58xa)})};exports[_0x39d5[28]]= function(_0xda58x7,_0xda58x8){if(_0xda58x7[_0x39d5[27]][_0x39d5[22]]){delete _0xda58x7[_0x39d5[27]][_0x39d5[22]]};_0xda58x7[_0x39d5[27]][_0x39d5[29]]= _0x39d5[30];return MailServerOut[_0x39d5[24]](_0xda58x7[_0x39d5[23]][_0x39d5[22]])[_0x39d5[12]](function(_0xda58xc){if(!_0xda58xc){return _0xda58x8[_0x39d5[21]](404)};var _0xda58xe=_[_0x39d5[31]](_0xda58xc,_0xda58x7[_0x39d5[27]]);return _0xda58xe[_0x39d5[32]]()})[_0x39d5[12]](function(_0xda58xc){return _0xda58x8[_0x39d5[11]](200)[_0x39d5[10]](_0xda58xc)})[_0x39d5[9]](function(_0xda58xa){return handleError(_0xda58x8,_0xda58xa)})};exports[_0x39d5[33]]= function(_0xda58x7,_0xda58x8){return MailServerOut[_0x39d5[24]](_0xda58x7[_0x39d5[23]][_0x39d5[22]])[_0x39d5[12]](function(_0xda58xc){if(!_0xda58xc){return _0xda58x8[_0x39d5[21]](404)};return _0xda58xc[_0x39d5[33]]()})[_0x39d5[12]](function(){return _0xda58x8[_0x39d5[21]](204)})[_0x39d5[9]](function(_0xda58xa){return handleError(_0xda58x8,_0xda58xa)})};exports[_0x39d5[34]]= function(_0xda58x7,_0xda58x8){var _0xda58xf;var _0xda58x10;return MailServerOut[_0x39d5[24]](_0xda58x7[_0x39d5[23]][_0x39d5[22]])[_0x39d5[12]](function(_0xda58xc){if(!_0xda58xc){return _0xda58x8[_0x39d5[21]](404)};return _0xda58xc[_0x39d5[28]]({state:_0x39d5[30]})})[_0x39d5[12]](function(){return _0xda58x8[_0x39d5[11]](201)[_0x39d5[10]](_0xda58x10)})};function handleError(_0xda58x8,_0xda58xa){return _0xda58x8[_0x39d5[11]](500)[_0x39d5[10]](_0xda58xa)} \ No newline at end of file diff --git a/server/api/mail_server_out/mail_server_out.events.js b/server/api/mail_server_out/mail_server_out.events.js index 997dd0f..c24cdd3 100644 --- a/server/api/mail_server_out/mail_server_out.events.js +++ b/server/api/mail_server_out/mail_server_out.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const MailServerOut = require('../../models').MailServerOut; - -var MailServerOutEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -MailServerOutEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - MailServerOut.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - MailServerOutEvents.emit(event + ':' + doc._id, doc); - MailServerOutEvents.emit(event, doc); - done(null); - } -} - -module.exports = MailServerOutEvents; +var _0xe2a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe2a3[0];const EventEmitter=require(_0xe2a3[1]);const MailServerOut=require(_0xe2a3[3])[_0xe2a3[2]];var MailServerOutEvents= new EventEmitter();MailServerOutEvents[_0xe2a3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe2a3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe2a3[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe2a3[6]};for(var e in events){var event=events[e];MailServerOut[_0xe2a3[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x68a7x8,_0x68a7x9,_0x68a7xa){MailServerOutEvents[_0xe2a3[10]](event+ _0xe2a3[8]+ _0x68a7x8[_0xe2a3[9]],_0x68a7x8);MailServerOutEvents[_0xe2a3[10]](event,_0x68a7x8);_0x68a7xa(null)}}module[_0xe2a3[11]]= MailServerOutEvents \ No newline at end of file diff --git a/server/api/mail_server_out/mail_server_out.socket.js b/server/api/mail_server_out/mail_server_out.socket.js index 4b7bf76..d2650ff 100644 --- a/server/api/mail_server_out/mail_server_out.socket.js +++ b/server/api/mail_server_out/mail_server_out.socket.js @@ -1,42 +1 @@ -'use strict'; - -const MailServerOutEvents = require('./mail_server_out.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('mail_server_out:' + event, socket); - - MailServerOutEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'mail_server_out:save': - if (doc.changed('state')) { - socket.emit('mail_server_out:state', doc); - } else { - socket.emit('mail_server_out:save', doc); - } - break; - - case 'mail_server_out:remove': - socket.emit(event, doc); - break; - - default: - } - }; -} - -function removeListener(event, listener) { - return function() { - MailServerOutEvents.removeListener(event, listener); - }; -} +var _0x9d1a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x3A\x73\x74\x61\x74\x65","\x65\x6D\x69\x74","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x3A\x73\x61\x76\x65","\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x9d1a[0];const MailServerOutEvents=require(_0x9d1a[1]);var events=[_0x9d1a[2],_0x9d1a[3]];exports[_0x9d1a[4]]= function(_0xa784x3){for(var _0xa784x4=0,_0xa784x5=events[_0x9d1a[5]];_0xa784x4< _0xa784x5;_0xa784x4++){var _0xa784x6=events[_0xa784x4];var _0xa784x7=createListener(_0x9d1a[6]+ _0xa784x6,_0xa784x3);MailServerOutEvents[_0x9d1a[7]](_0xa784x6,_0xa784x7);_0xa784x3[_0x9d1a[7]](_0x9d1a[8],removeListener(_0xa784x6,_0xa784x7))}};function createListener(_0xa784x6,_0xa784x3){return function(_0xa784x9){switch(_0xa784x6){case _0x9d1a[13]:if(_0xa784x9[_0x9d1a[10]](_0x9d1a[9])){_0xa784x3[_0x9d1a[12]](_0x9d1a[11],_0xa784x9)}else {_0xa784x3[_0x9d1a[12]](_0x9d1a[13],_0xa784x9)};break;case _0x9d1a[14]:_0xa784x3[_0x9d1a[12]](_0xa784x6,_0xa784x9);break;default:}}}function removeListener(_0xa784x6,_0xa784x7){return function(){MailServerOutEvents[_0x9d1a[15]](_0xa784x6,_0xa784x7)}} \ No newline at end of file diff --git a/server/api/metric/index.js b/server/api/metric/index.js index b802bb1..2d45f5b 100644 --- a/server/api/metric/index.js +++ b/server/api/metric/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./metric.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index); -router.get('/table', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.getMetricsByTable); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update); -router.patch('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.destroy); - -module.exports = router; +var _0xb41a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x65\x74\x72\x69\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x74\x61\x62\x6C\x65","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xb41a[0];var express=require(_0xb41a[1]);var controller=require(_0xb41a[2]);var auth=require(_0xb41a[3]);var router=express.Router();router[_0xb41a[9]](_0xb41a[4],auth[_0xb41a[5]](),auth[_0xb41a[7]]([17],[_0xb41a[6]]),controller[_0xb41a[8]]);router[_0xb41a[9]](_0xb41a[10],auth[_0xb41a[5]](),auth[_0xb41a[7]]([17],[_0xb41a[6]]),controller[_0xb41a[11]]);router[_0xb41a[9]](_0xb41a[12],auth[_0xb41a[5]](),auth[_0xb41a[7]]([17],[_0xb41a[6]]),controller[_0xb41a[13]]);router[_0xb41a[15]](_0xb41a[4],auth[_0xb41a[5]](),auth[_0xb41a[7]]([17],[_0xb41a[6]]),controller[_0xb41a[14]]);router[_0xb41a[17]](_0xb41a[12],auth[_0xb41a[5]](),auth[_0xb41a[7]]([17],[_0xb41a[6]]),controller[_0xb41a[16]]);router[_0xb41a[18]](_0xb41a[12],auth[_0xb41a[5]](),auth[_0xb41a[7]]([17],[_0xb41a[6]]),controller[_0xb41a[16]]);router[_0xb41a[20]](_0xb41a[4],auth[_0xb41a[5]](),auth[_0xb41a[7]]([17],[_0xb41a[6]]),controller[_0xb41a[19]]);router[_0xb41a[20]](_0xb41a[12],auth[_0xb41a[5]](),auth[_0xb41a[7]]([17],[_0xb41a[6]]),controller[_0xb41a[21]]);module[_0xb41a[22]]= router \ No newline at end of file diff --git a/server/api/metric/metric.controller.js b/server/api/metric/metric.controller.js index 0b82a6a..adc44dc 100644 --- a/server/api/metric/metric.controller.js +++ b/server/api/metric/metric.controller.js @@ -1,135 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Metric = require('../../models').Metric; -var util = require('util'); -var Util = require('../../config/util'); -var sequelize = require('../../models').sequelize; - -// Get list of metrics -exports.index = function(req, res, next) { - return Metric - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getMetricsByTable = function(req, res) { - return Metric - .findAll({ - where: { - table: req.query.table - } - }) - .then(function(metrics) { - if (!metrics) { - return res.sendStatus(404); - } - return res.status(200).send({ - count: metrics.length, - rows: metrics - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single metric -exports.show = function(req, res) { - return Metric - .findById(req.params.id) - .then(function(metric) { - if (!metric) { - return res.sendStatus(404); - } - return res.send(metric); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new metric in the DB. -exports.create = function(req, res) { - return Metric - .create(req.body) - .then(function(metric) { - return res.status(201).send(metric); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - err.translatedMessage = 'MESSAGE_EXIST_METRIC'; - err.message = 'A Metric with that name already exists'; - return res.status(500).send(err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing metric in the DB. -exports.update = function(req, res) { - return Metric - .findById(req.params.id) - .then(function(metric) { - if (!metric) { - return res.sendStatus(404); - } - var updated = _.merge(metric, req.body); - return updated.save(); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - err.translatedMessage = 'MESSAGE_EXIST_METRIC'; - err.message = 'A Metric with that name already exists'; - return res.status(500).send(err); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Deletes a metric from the DB. -exports.destroy = function(req, res) { - return Metric - .findById(req.params.id) - .then(function(metric) { - if (!metric) { - return res.sendStatus(404); - } - return metric.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroy = function(req, res) { - return Metric - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xb314=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x67\x65\x74\x4D\x65\x74\x72\x69\x63\x73\x42\x79\x54\x61\x62\x6C\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6C\x65\x6E\x67\x74\x68","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x4D\x45\x54\x52\x49\x43","\x6D\x65\x73\x73\x61\x67\x65","\x41\x20\x4D\x65\x74\x72\x69\x63\x20\x77\x69\x74\x68\x20\x74\x68\x61\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xb314[0];var _=require(_0xb314[1]);var Metric=require(_0xb314[3])[_0xb314[2]];var util=require(_0xb314[4]);var Util=require(_0xb314[5]);var sequelize=require(_0xb314[3])[_0xb314[6]];exports[_0xb314[7]]= function(_0x955ax6,_0x955ax7,_0x955ax8){return Metric[_0xb314[14]](Util[_0xb314[13]](_0x955ax6[_0xb314[12]]))[_0xb314[11]](function(_0x955axa){return _0x955ax7[_0xb314[10]](200)[_0xb314[9]](_0x955axa)})[_0xb314[8]](function(_0x955ax9){return handleError(_0x955ax7,_0x955ax9)})};exports[_0xb314[15]]= function(_0x955ax6,_0x955ax7){return Metric[_0xb314[19]]({where:{table:_0x955ax6[_0xb314[12]][_0xb314[18]]}})[_0xb314[11]](function(_0x955axb){if(!_0x955axb){return _0x955ax7[_0xb314[16]](404)};return _0x955ax7[_0xb314[10]](200)[_0xb314[9]]({count:_0x955axb[_0xb314[17]],rows:_0x955axb})})[_0xb314[8]](function(_0x955ax9){return handleError(_0x955ax7,_0x955ax9)})};exports[_0xb314[20]]= function(_0x955ax6,_0x955ax7){return Metric[_0xb314[23]](_0x955ax6[_0xb314[22]][_0xb314[21]])[_0xb314[11]](function(_0x955axc){if(!_0x955axc){return _0x955ax7[_0xb314[16]](404)};return _0x955ax7[_0xb314[9]](_0x955axc)})[_0xb314[8]](function(_0x955ax9){return handleError(_0x955ax7,_0x955ax9)})};exports[_0xb314[24]]= function(_0x955ax6,_0x955ax7){return Metric[_0xb314[24]](_0x955ax6[_0xb314[29]])[_0xb314[11]](function(_0x955axc){return _0x955ax7[_0xb314[10]](201)[_0xb314[9]](_0x955axc)})[_0xb314[8]](sequelize.UniqueConstraintError,function(_0x955ax9){_0x955ax9[_0xb314[25]]= _0xb314[26];_0x955ax9[_0xb314[27]]= _0xb314[28];return _0x955ax7[_0xb314[10]](500)[_0xb314[9]](_0x955ax9)})[_0xb314[8]](function(_0x955ax9){return handleError(_0x955ax7,_0x955ax9)})};exports[_0xb314[30]]= function(_0x955ax6,_0x955ax7){return Metric[_0xb314[23]](_0x955ax6[_0xb314[22]][_0xb314[21]])[_0xb314[11]](function(_0x955axc){if(!_0x955axc){return _0x955ax7[_0xb314[16]](404)};var _0x955axd=_[_0xb314[32]](_0x955axc,_0x955ax6[_0xb314[29]]);return _0x955axd[_0xb314[33]]()})[_0xb314[11]](function(){return _0x955ax7[_0xb314[16]](200)})[_0xb314[8]](sequelize.UniqueConstraintError,function(_0x955ax9){_0x955ax9[_0xb314[25]]= _0xb314[26];_0x955ax9[_0xb314[27]]= _0xb314[28];return _0x955ax7[_0xb314[10]](500)[_0xb314[9]](_0x955ax9)})[_0xb314[8]](function(_0x955ax9){console[_0xb314[31]](_0x955ax9);return handleError(_0x955ax7,_0x955ax9)})};exports[_0xb314[34]]= function(_0x955ax6,_0x955ax7){return Metric[_0xb314[23]](_0x955ax6[_0xb314[22]][_0xb314[21]])[_0xb314[11]](function(_0x955axc){if(!_0x955axc){return _0x955ax7[_0xb314[16]](404)};return _0x955axc[_0xb314[34]]()})[_0xb314[11]](function(){return _0x955ax7[_0xb314[16]](204)})[_0xb314[8]](function(_0x955ax9){return handleError(_0x955ax7,_0x955ax9)})};exports[_0xb314[35]]= function(_0x955ax6,_0x955ax7){return Metric[_0xb314[34]]({where:{id:_0x955ax6[_0xb314[12]][_0xb314[36]]},individualHooks:true})[_0xb314[11]](function(){return _0x955ax7[_0xb314[16]](204)})[_0xb314[8]](function(_0x955ax9){return handleError(_0x955ax7,_0x955ax9)})};function handleError(_0x955ax7,_0x955ax9){return _0x955ax7[_0xb314[10]](500)[_0xb314[9]](_0x955ax9)} \ No newline at end of file diff --git a/server/api/metric/metric.events.js b/server/api/metric/metric.events.js index 6aa5669..c9978f3 100644 --- a/server/api/metric/metric.events.js +++ b/server/api/metric/metric.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Metric = require('../../models').Metric; - -var MetricEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -MetricEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Metric.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - MetricEvents.emit(event + ':' + doc._id, doc); - MetricEvents.emit(event, doc); - done(null); - } -} - -module.exports = MetricEvents; +var _0xf1b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x65\x74\x72\x69\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf1b0[0];const EventEmitter=require(_0xf1b0[1]);const Metric=require(_0xf1b0[3])[_0xf1b0[2]];var MetricEvents= new EventEmitter();MetricEvents[_0xf1b0[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf1b0[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf1b0[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf1b0[7]};for(var e in events){var event=events[e];Metric[_0xf1b0[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x8535x8,_0x8535x9,_0x8535xa){MetricEvents[_0xf1b0[11]](event+ _0xf1b0[9]+ _0x8535x8[_0xf1b0[10]],_0x8535x8);MetricEvents[_0xf1b0[11]](event,_0x8535x8);_0x8535xa(null)}}module[_0xf1b0[12]]= MetricEvents \ No newline at end of file diff --git a/server/api/metric/metric.socket.js b/server/api/metric/metric.socket.js index 80e152f..83e046a 100644 --- a/server/api/metric/metric.socket.js +++ b/server/api/metric/metric.socket.js @@ -1,54 +1 @@ -'use strict'; - -const MetricEvents = require('./metric.events'); -const ReportField = require('../../models').ReportField; - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('metric:' + event, socket); - - MetricEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'metric:save': - socket.emit(event, doc); - break; - case 'metric:update': - updateFields(doc); - break; - case 'metric:remove': - socket.emit(event, doc); - break; - - default: - } - }; -} - -function removeListener(event, listener) { - return function() { - MetricEvents.removeListener(event, listener); - }; -} - -function updateFields(doc) { - return ReportField.update({ - field: doc.metric - }, { - where: { - MetricId: doc.id - } - }) - .catch(function(err) { - console.log(err); - }); -} +var _0x8969=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x65\x74\x72\x69\x63\x2E\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x65\x74\x72\x69\x63\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x6D\x65\x74\x72\x69\x63\x3A\x73\x61\x76\x65","\x6D\x65\x74\x72\x69\x63\x3A\x75\x70\x64\x61\x74\x65","\x6D\x65\x74\x72\x69\x63\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6D\x65\x74\x72\x69\x63","\x69\x64","\x75\x70\x64\x61\x74\x65"];_0x8969[0];const MetricEvents=require(_0x8969[1]);const ReportField=require(_0x8969[3])[_0x8969[2]];var events=[_0x8969[4],_0x8969[5]];exports[_0x8969[6]]= function(_0xaeaax4){for(var _0xaeaax5=0,_0xaeaax6=events[_0x8969[7]];_0xaeaax5< _0xaeaax6;_0xaeaax5++){var _0xaeaax7=events[_0xaeaax5];var _0xaeaax8=createListener(_0x8969[8]+ _0xaeaax7,_0xaeaax4);MetricEvents[_0x8969[9]](_0xaeaax7,_0xaeaax8);_0xaeaax4[_0x8969[9]](_0x8969[10],removeListener(_0xaeaax7,_0xaeaax8))}};function createListener(_0xaeaax7,_0xaeaax4){return function(_0xaeaaxa){switch(_0xaeaax7){case _0x8969[12]:_0xaeaax4[_0x8969[11]](_0xaeaax7,_0xaeaaxa);break;case _0x8969[13]:updateFields(_0xaeaaxa);break;case _0x8969[14]:_0xaeaax4[_0x8969[11]](_0xaeaax7,_0xaeaaxa);break;default:}}}function removeListener(_0xaeaax7,_0xaeaax8){return function(){MetricEvents[_0x8969[15]](_0xaeaax7,_0xaeaax8)}}function updateFields(_0xaeaaxa){return ReportField[_0x8969[20]]({field:_0xaeaaxa[_0x8969[18]]},{where:{MetricId:_0xaeaaxa[_0x8969[19]]}})[_0x8969[17]](function(_0xaeaaxd){console[_0x8969[16]](_0xaeaaxd)})} \ No newline at end of file diff --git a/server/api/module/index.js b/server/api/module/index.js index b57548b..5cb3fa1 100644 --- a/server/api/module/index.js +++ b/server/api/module/index.js @@ -1,11 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./module.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index); - -module.exports = router; +var _0x5279=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x6F\x64\x75\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5279[0];var express=require(_0x5279[1]);var controller=require(_0x5279[2]);var auth=require(_0x5279[3]);var router=express.Router();router[_0x5279[9]](_0x5279[4],auth[_0x5279[5]](),auth[_0x5279[7]](_0x5279[6]),controller[_0x5279[8]]);module[_0x5279[10]]= router \ No newline at end of file diff --git a/server/api/module/module.controller.js b/server/api/module/module.controller.js index 5ccc934..18b2b14 100644 --- a/server/api/module/module.controller.js +++ b/server/api/module/module.controller.js @@ -1,28 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Module = require('../../models').Module; -var util = require('util'); -var Util = require('../../config/util'); -var sequelize = require('../../models').sequelize; - -// Get list of modules -exports.index = function(req, res, next) { - return Module - // .findAndCountAll(Util.getQuery(req.query)) - .findAndCountAll({ - include: [{ - all: true - }] - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x71c8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x6F\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C"];_0x71c8[0];var _=require(_0x71c8[1]);var Module=require(_0x71c8[3])[_0x71c8[2]];var util=require(_0x71c8[4]);var Util=require(_0x71c8[5]);var sequelize=require(_0x71c8[3])[_0x71c8[6]];exports[_0x71c8[7]]= function(_0xe85dx6,_0xe85dx7,_0xe85dx8){return Module[_0x71c8[12]]({include:[{all:true}]})[_0x71c8[11]](function(_0xe85dxa){return _0xe85dx7[_0x71c8[10]](200)[_0x71c8[9]](_0xe85dxa)})[_0x71c8[8]](function(_0xe85dx9){return handleError(_0xe85dx7,_0xe85dx9)})};function handleError(_0xe85dx7,_0xe85dx9){return _0xe85dx7[_0x71c8[10]](500)[_0x71c8[9]](_0xe85dx9)} \ No newline at end of file diff --git a/server/api/module/module.events.js b/server/api/module/module.events.js index 2dbb456..6364d81 100644 --- a/server/api/module/module.events.js +++ b/server/api/module/module.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Module = require('../../models').Module; - -var ModuleEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ModuleEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Module.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ModuleEvents.emit(event + ':' + doc._id, doc); - ModuleEvents.emit(event, doc); - done(null); - } -} - -module.exports = ModuleEvents; +var _0xe709=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x6F\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe709[0];const EventEmitter=require(_0xe709[1]);const Module=require(_0xe709[3])[_0xe709[2]];var ModuleEvents= new EventEmitter();ModuleEvents[_0xe709[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe709[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe709[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe709[6]};for(var e in events){var event=events[e];Module[_0xe709[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xfb79x8,_0xfb79x9,_0xfb79xa){ModuleEvents[_0xe709[10]](event+ _0xe709[8]+ _0xfb79x8[_0xe709[9]],_0xfb79x8);ModuleEvents[_0xe709[10]](event,_0xfb79x8);_0xfb79xa(null)}}module[_0xe709[11]]= ModuleEvents \ No newline at end of file diff --git a/server/api/module/module.socket.js b/server/api/module/module.socket.js index ebccd0c..aee7176 100644 --- a/server/api/module/module.socket.js +++ b/server/api/module/module.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ModuleEvents = require('./module.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('module:' + event, socket); - - ModuleEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ModuleEvents.removeListener(event, listener); - }; -} +var _0xf884=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x6F\x64\x75\x6C\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x6F\x64\x75\x6C\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xf884[0];const ModuleEvents=require(_0xf884[1]);var events=[_0xf884[2],_0xf884[3]];exports[_0xf884[4]]= function(_0x9f1ax3){for(var _0x9f1ax4=0,_0x9f1ax5=events[_0xf884[5]];_0x9f1ax4< _0x9f1ax5;_0x9f1ax4++){var _0x9f1ax6=events[_0x9f1ax4];var _0x9f1ax7=createListener(_0xf884[6]+ _0x9f1ax6,_0x9f1ax3);ModuleEvents[_0xf884[7]](_0x9f1ax6,_0x9f1ax7);_0x9f1ax3[_0xf884[7]](_0xf884[8],removeListener(_0x9f1ax6,_0x9f1ax7))}};function createListener(_0x9f1ax6,_0x9f1ax3){return function(_0x9f1ax9){_0x9f1ax3[_0xf884[9]](_0x9f1ax6,_0x9f1ax9)}}function removeListener(_0x9f1ax6,_0x9f1ax7){return function(){ModuleEvents[_0xf884[10]](_0x9f1ax6,_0x9f1ax7)}} \ No newline at end of file diff --git a/server/api/motionbar/index.js b/server/api/motionbar/index.js index fd9d420..6dcc0e7 100644 --- a/server/api/motionbar/index.js +++ b/server/api/motionbar/index.js @@ -1,11 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./motionbar.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/:action/:state', auth.isAuthenticated(), controller.action); - -module.exports = router; +var _0xf0af=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x3A\x61\x63\x74\x69\x6F\x6E\x2F\x3A\x73\x74\x61\x74\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf0af[0];var express=require(_0xf0af[1]);var controller=require(_0xf0af[2]);var auth=require(_0xf0af[3]);var router=express.Router();router[_0xf0af[7]](_0xf0af[4],auth[_0xf0af[5]](),controller[_0xf0af[6]]);module[_0xf0af[8]]= router \ No newline at end of file diff --git a/server/api/motionbar/motionbar.controller.js b/server/api/motionbar/motionbar.controller.js index 275d338..b842400 100644 --- a/server/api/motionbar/motionbar.controller.js +++ b/server/api/motionbar/motionbar.controller.js @@ -1,32 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Motionbar = require('../../models').Motionbar; - -// Get list of motionbars -exports.action = function(req, res) { - - if (!req.query.userId) { - return handleError(res, { - message: 'Use userId' - }); - } - - req.body.UserId = parseInt(req.query.userId, 10); - req.body.action = req.params.action; - req.body.state = req.params.state; - req.body.AdminId = req.user.id; - - return Motionbar - .create(req.body) - .then(function(action) { - return res.status(201).send(action); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xca05=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x63\x74\x69\x6F\x6E","\x75\x73\x65\x72\x49\x64","\x71\x75\x65\x72\x79","\x55\x73\x65\x20\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x70\x61\x72\x61\x6D\x73","\x73\x74\x61\x74\x65","\x41\x64\x6D\x69\x6E\x49\x64","\x69\x64","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65"];_0xca05[0];var _=require(_0xca05[1]);var Motionbar=require(_0xca05[3])[_0xca05[2]];exports[_0xca05[4]]= function(_0x23c6x3,_0x23c6x4){if(!_0x23c6x3[_0xca05[6]][_0xca05[5]]){return handleError(_0x23c6x4,{message:_0xca05[7]})};_0x23c6x3[_0xca05[9]][_0xca05[8]]= parseInt(_0x23c6x3[_0xca05[6]][_0xca05[5]],10);_0x23c6x3[_0xca05[9]][_0xca05[4]]= _0x23c6x3[_0xca05[10]][_0xca05[4]];_0x23c6x3[_0xca05[9]][_0xca05[11]]= _0x23c6x3[_0xca05[10]][_0xca05[11]];_0x23c6x3[_0xca05[9]][_0xca05[12]]= _0x23c6x3[_0xca05[14]][_0xca05[13]];return Motionbar[_0xca05[19]](_0x23c6x3[_0xca05[9]])[_0xca05[18]](function(_0x23c6x6){return _0x23c6x4[_0xca05[17]](201)[_0xca05[16]](_0x23c6x6)})[_0xca05[15]](function(_0x23c6x5){return handleError(_0x23c6x4,_0x23c6x5)})};function handleError(_0x23c6x4,_0x23c6x5){return _0x23c6x4[_0xca05[17]](500)[_0xca05[16]](_0x23c6x5)} \ No newline at end of file diff --git a/server/api/motionbar/motionbar.events.js b/server/api/motionbar/motionbar.events.js index f84fb17..7e69a70 100644 --- a/server/api/motionbar/motionbar.events.js +++ b/server/api/motionbar/motionbar.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Motionbar = require('../../models').Motionbar; - -var MotionbarEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -MotionbarEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Motionbar.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - MotionbarEvents.emit(event + ':' + doc._id, doc); - MotionbarEvents.emit(event, doc); - done(null); - } -} - -module.exports = MotionbarEvents; +var _0x6a06=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6a06[0];const EventEmitter=require(_0x6a06[1]);const Motionbar=require(_0x6a06[3])[_0x6a06[2]];var MotionbarEvents= new EventEmitter();MotionbarEvents[_0x6a06[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6a06[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6a06[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6a06[6]};for(var e in events){var event=events[e];Motionbar[_0x6a06[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x65a7x8,_0x65a7x9,_0x65a7xa){MotionbarEvents[_0x6a06[10]](event+ _0x6a06[8]+ _0x65a7x8[_0x6a06[9]],_0x65a7x8);MotionbarEvents[_0x6a06[10]](event,_0x65a7x8);_0x65a7xa(null)}}module[_0x6a06[11]]= MotionbarEvents \ No newline at end of file diff --git a/server/api/motionbar/motionbar.socket.js b/server/api/motionbar/motionbar.socket.js index cf3aa56..34b04bb 100644 --- a/server/api/motionbar/motionbar.socket.js +++ b/server/api/motionbar/motionbar.socket.js @@ -1,30 +1 @@ -'use strict'; - -const MotionbarEvents = require('./motionbar.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('motionbar:' + event, socket); - - MotionbarEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - if (socket.userId == doc.UserId) { - socket.emit(event, doc); - } - }; -} - -function removeListener(event, listener) { - return function() { - MotionbarEvents.removeListener(event, listener); - }; -} +var _0x893e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x49\x64","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x893e[0];const MotionbarEvents=require(_0x893e[1]);var events=[_0x893e[2],_0x893e[3]];exports[_0x893e[4]]= function(_0xa7d2x3){for(var _0xa7d2x4=0,_0xa7d2x5=events[_0x893e[5]];_0xa7d2x4< _0xa7d2x5;_0xa7d2x4++){var _0xa7d2x6=events[_0xa7d2x4];var _0xa7d2x7=createListener(_0x893e[6]+ _0xa7d2x6,_0xa7d2x3);MotionbarEvents[_0x893e[7]](_0xa7d2x6,_0xa7d2x7);_0xa7d2x3[_0x893e[7]](_0x893e[8],removeListener(_0xa7d2x6,_0xa7d2x7))}};function createListener(_0xa7d2x6,_0xa7d2x3){return function(_0xa7d2x9){if(_0xa7d2x3[_0x893e[9]]== _0xa7d2x9[_0x893e[10]]){_0xa7d2x3[_0x893e[11]](_0xa7d2x6,_0xa7d2x9)}}}function removeListener(_0xa7d2x6,_0xa7d2x7){return function(){MotionbarEvents[_0x893e[12]](_0xa7d2x6,_0xa7d2x7)}} \ No newline at end of file diff --git a/server/api/network_externip/index.js b/server/api/network_externip/index.js index c9daa97..6911654 100644 --- a/server/api/network_externip/index.js +++ b/server/api/network_externip/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./network_externip.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy); - -module.exports = router; +var _0x63d8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x63d8[0];var express=require(_0x63d8[1]);var auth=require(_0x63d8[2]);var controller=require(_0x63d8[3]);var router=express.Router();router[_0x63d8[9]](_0x63d8[4],auth[_0x63d8[5]](),auth[_0x63d8[7]](_0x63d8[6]),controller[_0x63d8[8]]);router[_0x63d8[9]](_0x63d8[10],auth[_0x63d8[5]](),auth[_0x63d8[7]](_0x63d8[6]),controller[_0x63d8[11]]);router[_0x63d8[13]](_0x63d8[4],auth[_0x63d8[5]](),auth[_0x63d8[7]](_0x63d8[6]),controller[_0x63d8[12]]);router[_0x63d8[15]](_0x63d8[10],auth[_0x63d8[5]](),auth[_0x63d8[7]](_0x63d8[6]),controller[_0x63d8[14]]);router[_0x63d8[17]](_0x63d8[4],auth[_0x63d8[5]](),auth[_0x63d8[7]](_0x63d8[6]),controller[_0x63d8[16]]);router[_0x63d8[17]](_0x63d8[10],auth[_0x63d8[5]](),auth[_0x63d8[7]](_0x63d8[6]),controller[_0x63d8[18]]);module[_0x63d8[19]]= router \ No newline at end of file diff --git a/server/api/network_externip/network_externip.controller.js b/server/api/network_externip/network_externip.controller.js index ecde7da..0bf69c7 100644 --- a/server/api/network_externip/network_externip.controller.js +++ b/server/api/network_externip/network_externip.controller.js @@ -1,131 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/network/externips -> index - * POST /api/network/externips -> create - * GET /api/network/externips/:id -> show - * PUT /api/network/externips/:id -> update - * DELETE /api/network/externips/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var NetworkExternip = require('../../models').Network; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 204; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of NetworkExternips -exports.index = function(req, res) { - return NetworkExternip - .scope('externip') - .findAndCountAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single NetworkExternip from the DB -exports.show = function(req, res) { - return NetworkExternip - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new NetworkExternip in the DB -exports.create = function(req, res) { - req.body.type = 'externip'; - return NetworkExternip - .create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing NetworkExternip in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return NetworkExternip - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a NetworkExternip from the DB -exports.destroy = function(req, res) { - return NetworkExternip - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -exports.bulkDestroy = function(req, res) { - return NetworkExternip - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(responseWithoutResult(res)) - .catch(handleError(res)); -}; +var _0x9358=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x65\x78\x74\x65\x72\x6E\x69\x70","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x9358[0];var _=require(_0x9358[1]);var Util=require(_0x9358[2]);var NetworkExternip=require(_0x9358[4])[_0x9358[3]];function handleError(_0x5b83x5,_0x5b83x6){_0x5b83x6= _0x5b83x6|| 500;return function(_0x5b83x7){_0x5b83x5[_0x9358[6]](_0x5b83x6)[_0x9358[5]](_0x5b83x7)}}function responseWithResult(_0x5b83x5,_0x5b83x6){_0x5b83x6= _0x5b83x6|| 200;return function(_0x5b83x9){if(_0x5b83x9){_0x5b83x5[_0x9358[6]](_0x5b83x6)[_0x9358[7]](_0x5b83x9)}}}function responseWithoutResult(_0x5b83x5,_0x5b83x6){_0x5b83x6= _0x5b83x6|| 204;return function(){_0x5b83x5[_0x9358[8]](_0x5b83x6)}}function handleEntityNotFound(_0x5b83x5){return function(_0x5b83x9){if(!_0x5b83x9){_0x5b83x5[_0x9358[6]](404)[_0x9358[9]]();return null};return _0x5b83x9}}function saveUpdates(_0x5b83xd){return function(_0x5b83x9){return _0x5b83x9[_0x9358[11]](_0x5b83xd)[_0x9358[10]](function(_0x5b83xe){return _0x5b83xe})}}function removeEntity(_0x5b83x5){return function(_0x5b83x9){if(_0x5b83x9){return _0x5b83x9[_0x9358[12]]()[_0x9358[10]](function(){_0x5b83x5[_0x9358[6]](204)[_0x9358[9]]()})}}}exports[_0x9358[13]]= function(_0x5b83x10,_0x5b83x5){return NetworkExternip[_0x9358[19]](_0x9358[18])[_0x9358[17]](Util[_0x9358[16]](_0x5b83x10[_0x9358[15]]))[_0x9358[10]](responseWithResult(_0x5b83x5))[_0x9358[14]](handleError(_0x5b83x5))};exports[_0x9358[20]]= function(_0x5b83x10,_0x5b83x5){return NetworkExternip[_0x9358[23]](_0x5b83x10[_0x9358[22]][_0x9358[21]])[_0x9358[10]](handleEntityNotFound(_0x5b83x5))[_0x9358[10]](responseWithResult(_0x5b83x5))[_0x9358[14]](handleError(_0x5b83x5))};exports[_0x9358[24]]= function(_0x5b83x10,_0x5b83x5){_0x5b83x10[_0x9358[26]][_0x9358[25]]= _0x9358[18];return NetworkExternip[_0x9358[24]](_0x5b83x10[_0x9358[26]])[_0x9358[10]](responseWithResult(_0x5b83x5,201))[_0x9358[14]](handleError(_0x5b83x5))};exports[_0x9358[27]]= function(_0x5b83x10,_0x5b83x5){if(_0x5b83x10[_0x9358[26]][_0x9358[21]]){delete _0x5b83x10[_0x9358[26]][_0x9358[21]]};return NetworkExternip[_0x9358[23]](_0x5b83x10[_0x9358[22]][_0x9358[21]])[_0x9358[10]](handleEntityNotFound(_0x5b83x5))[_0x9358[10]](saveUpdates(_0x5b83x10[_0x9358[26]]))[_0x9358[10]](responseWithResult(_0x5b83x5))[_0x9358[14]](handleError(_0x5b83x5))};exports[_0x9358[12]]= function(_0x5b83x10,_0x5b83x5){return NetworkExternip[_0x9358[23]](_0x5b83x10[_0x9358[22]][_0x9358[21]])[_0x9358[10]](handleEntityNotFound(_0x5b83x5))[_0x9358[10]](removeEntity(_0x5b83x5))[_0x9358[14]](handleError(_0x5b83x5))};exports[_0x9358[28]]= function(_0x5b83x10,_0x5b83x5){return NetworkExternip[_0x9358[12]]({where:{id:_0x5b83x10[_0x9358[15]][_0x9358[29]]},individualHooks:true})[_0x9358[10]](responseWithoutResult(_0x5b83x5))[_0x9358[14]](handleError(_0x5b83x5))} \ No newline at end of file diff --git a/server/api/network_externip/network_externip.events.js b/server/api/network_externip/network_externip.events.js index c5f5cbe..b816c39 100644 --- a/server/api/network_externip/network_externip.events.js +++ b/server/api/network_externip/network_externip.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Network = require('../../models').Network; - -var NetworkEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -NetworkEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Network.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - NetworkEvents.emit(event + ':' + doc._id, doc); - NetworkEvents.emit(event, doc); - done(null); - } -} - -module.exports = NetworkEvents; +var _0x7fb4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7fb4[0];const EventEmitter=require(_0x7fb4[1]);const Network=require(_0x7fb4[3])[_0x7fb4[2]];var NetworkEvents= new EventEmitter();NetworkEvents[_0x7fb4[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7fb4[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7fb4[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7fb4[6]};for(var e in events){var event=events[e];Network[_0x7fb4[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4120x8,_0x4120x9,_0x4120xa){NetworkEvents[_0x7fb4[10]](event+ _0x7fb4[8]+ _0x4120x8[_0x7fb4[9]],_0x4120x8);NetworkEvents[_0x7fb4[10]](event,_0x4120x8);_0x4120xa(null)}}module[_0x7fb4[11]]= NetworkEvents \ No newline at end of file diff --git a/server/api/network_externip/network_externip.socket.js b/server/api/network_externip/network_externip.socket.js index 9903ad0..c2d6b65 100644 --- a/server/api/network_externip/network_externip.socket.js +++ b/server/api/network_externip/network_externip.socket.js @@ -1,28 +1 @@ -'use strict'; - -const NetworkExternipEvents = require('./network_externip.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('network_externip:' + event, socket); - - NetworkExternipEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - NetworkExternipEvents.removeListener(event, listener); - }; -} +var _0xfd2c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xfd2c[0];const NetworkExternipEvents=require(_0xfd2c[1]);var events=[_0xfd2c[2],_0xfd2c[3]];exports[_0xfd2c[4]]= function(_0xfc13x3){for(var _0xfc13x4=0,_0xfc13x5=events[_0xfd2c[5]];_0xfc13x4< _0xfc13x5;_0xfc13x4++){var _0xfc13x6=events[_0xfc13x4];var _0xfc13x7=createListener(_0xfd2c[6]+ _0xfc13x6,_0xfc13x3);NetworkExternipEvents[_0xfd2c[7]](_0xfc13x6,_0xfc13x7);_0xfc13x3[_0xfd2c[7]](_0xfd2c[8],removeListener(_0xfc13x6,_0xfc13x7))}};function createListener(_0xfc13x6,_0xfc13x3){return function(_0xfc13x9){_0xfc13x3[_0xfd2c[9]](_0xfc13x6,_0xfc13x9)}}function removeListener(_0xfc13x6,_0xfc13x7){return function(){NetworkExternipEvents[_0xfd2c[10]](_0xfc13x6,_0xfc13x7)}} \ No newline at end of file diff --git a/server/api/network_localnet/index.js b/server/api/network_localnet/index.js index d372448..6a221e0 100644 --- a/server/api/network_localnet/index.js +++ b/server/api/network_localnet/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./network_localnet.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy); - -module.exports = router; +var _0x660f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x660f[0];var express=require(_0x660f[1]);var auth=require(_0x660f[2]);var controller=require(_0x660f[3]);var router=express.Router();router[_0x660f[9]](_0x660f[4],auth[_0x660f[5]](),auth[_0x660f[7]](_0x660f[6]),controller[_0x660f[8]]);router[_0x660f[9]](_0x660f[10],auth[_0x660f[5]](),auth[_0x660f[7]](_0x660f[6]),controller[_0x660f[11]]);router[_0x660f[13]](_0x660f[4],auth[_0x660f[5]](),auth[_0x660f[7]](_0x660f[6]),controller[_0x660f[12]]);router[_0x660f[15]](_0x660f[10],auth[_0x660f[5]](),auth[_0x660f[7]](_0x660f[6]),controller[_0x660f[14]]);router[_0x660f[17]](_0x660f[4],auth[_0x660f[5]](),auth[_0x660f[7]](_0x660f[6]),controller[_0x660f[16]]);router[_0x660f[17]](_0x660f[10],auth[_0x660f[5]](),auth[_0x660f[7]](_0x660f[6]),controller[_0x660f[18]]);module[_0x660f[19]]= router \ No newline at end of file diff --git a/server/api/network_localnet/network_localnet.controller.js b/server/api/network_localnet/network_localnet.controller.js index 85e3150..6931d47 100644 --- a/server/api/network_localnet/network_localnet.controller.js +++ b/server/api/network_localnet/network_localnet.controller.js @@ -1,128 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/network/localnets -> index - * POST /api/network/localnets -> create - * GET /api/network/localnets/:id -> show - * PUT /api/network/localnets/:id -> update - * DELETE /api/network/localnets/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var NetworkLocalnet = require('../../models').Network; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 204; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of NetworkLocalnets -exports.index = function(req, res) { - return NetworkLocalnet - .scope('localnet') - .findAndCountAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single NetworkLocalnet from the DB -exports.show = function(req, res) { - return NetworkLocalnet.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new NetworkLocalnet in the DB -exports.create = function(req, res) { - req.body.type = 'localnet'; - return NetworkLocalnet.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing NetworkLocalnet in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return NetworkLocalnet.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a NetworkLocalnet from the DB -exports.destroy = function(req, res) { - return NetworkLocalnet - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -exports.bulkDestroy = function(req, res) { - return NetworkLocalnet - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(responseWithoutResult(res)) - .catch(handleError(res)); -}; +var _0x830c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x6C\x6F\x63\x61\x6C\x6E\x65\x74","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x74\x79\x70\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x830c[0];var _=require(_0x830c[1]);var Util=require(_0x830c[2]);var NetworkLocalnet=require(_0x830c[4])[_0x830c[3]];function handleError(_0x19d6x5,_0x19d6x6){_0x19d6x6= _0x19d6x6|| 500;return function(_0x19d6x7){_0x19d6x5[_0x830c[6]](_0x19d6x6)[_0x830c[5]](_0x19d6x7)}}function responseWithResult(_0x19d6x5,_0x19d6x6){_0x19d6x6= _0x19d6x6|| 200;return function(_0x19d6x9){if(_0x19d6x9){_0x19d6x5[_0x830c[6]](_0x19d6x6)[_0x830c[7]](_0x19d6x9)}}}function responseWithoutResult(_0x19d6x5,_0x19d6x6){_0x19d6x6= _0x19d6x6|| 204;return function(){_0x19d6x5[_0x830c[8]](_0x19d6x6)}}function handleEntityNotFound(_0x19d6x5){return function(_0x19d6x9){if(!_0x19d6x9){_0x19d6x5[_0x830c[6]](404)[_0x830c[9]]();return null};return _0x19d6x9}}function saveUpdates(_0x19d6xd){return function(_0x19d6x9){return _0x19d6x9[_0x830c[11]](_0x19d6xd)[_0x830c[10]](function(_0x19d6xe){return _0x19d6xe})}}function removeEntity(_0x19d6x5){return function(_0x19d6x9){if(_0x19d6x9){return _0x19d6x9[_0x830c[12]]()[_0x830c[10]](function(){_0x19d6x5[_0x830c[6]](204)[_0x830c[9]]()})}}}exports[_0x830c[13]]= function(_0x19d6x10,_0x19d6x5){return NetworkLocalnet[_0x830c[19]](_0x830c[18])[_0x830c[17]](Util[_0x830c[16]](_0x19d6x10[_0x830c[15]]))[_0x830c[10]](responseWithResult(_0x19d6x5))[_0x830c[14]](handleError(_0x19d6x5))};exports[_0x830c[20]]= function(_0x19d6x10,_0x19d6x5){return NetworkLocalnet[_0x830c[23]](_0x19d6x10[_0x830c[22]][_0x830c[21]])[_0x830c[10]](handleEntityNotFound(_0x19d6x5))[_0x830c[10]](responseWithResult(_0x19d6x5))[_0x830c[14]](handleError(_0x19d6x5))};exports[_0x830c[24]]= function(_0x19d6x10,_0x19d6x5){_0x19d6x10[_0x830c[26]][_0x830c[25]]= _0x830c[18];return NetworkLocalnet[_0x830c[24]](_0x19d6x10[_0x830c[26]])[_0x830c[10]](responseWithResult(_0x19d6x5,201))[_0x830c[14]](handleError(_0x19d6x5))};exports[_0x830c[27]]= function(_0x19d6x10,_0x19d6x5){if(_0x19d6x10[_0x830c[26]][_0x830c[21]]){delete _0x19d6x10[_0x830c[26]][_0x830c[21]]};return NetworkLocalnet[_0x830c[23]](_0x19d6x10[_0x830c[22]][_0x830c[21]])[_0x830c[10]](handleEntityNotFound(_0x19d6x5))[_0x830c[10]](saveUpdates(_0x19d6x10[_0x830c[26]]))[_0x830c[10]](responseWithResult(_0x19d6x5))[_0x830c[14]](handleError(_0x19d6x5))};exports[_0x830c[12]]= function(_0x19d6x10,_0x19d6x5){return NetworkLocalnet[_0x830c[23]](_0x19d6x10[_0x830c[22]][_0x830c[21]])[_0x830c[10]](handleEntityNotFound(_0x19d6x5))[_0x830c[10]](removeEntity(_0x19d6x5))[_0x830c[14]](handleError(_0x19d6x5))};exports[_0x830c[28]]= function(_0x19d6x10,_0x19d6x5){return NetworkLocalnet[_0x830c[12]]({where:{id:_0x19d6x10[_0x830c[15]][_0x830c[29]]},individualHooks:true})[_0x830c[10]](responseWithoutResult(_0x19d6x5))[_0x830c[14]](handleError(_0x19d6x5))} \ No newline at end of file diff --git a/server/api/network_localnet/network_localnet.events.js b/server/api/network_localnet/network_localnet.events.js index c5f5cbe..3c27716 100644 --- a/server/api/network_localnet/network_localnet.events.js +++ b/server/api/network_localnet/network_localnet.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Network = require('../../models').Network; - -var NetworkEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -NetworkEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Network.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - NetworkEvents.emit(event + ':' + doc._id, doc); - NetworkEvents.emit(event, doc); - done(null); - } -} - -module.exports = NetworkEvents; +var _0xb3d1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb3d1[0];const EventEmitter=require(_0xb3d1[1]);const Network=require(_0xb3d1[3])[_0xb3d1[2]];var NetworkEvents= new EventEmitter();NetworkEvents[_0xb3d1[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb3d1[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb3d1[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb3d1[6]};for(var e in events){var event=events[e];Network[_0xb3d1[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe735x8,_0xe735x9,_0xe735xa){NetworkEvents[_0xb3d1[10]](event+ _0xb3d1[8]+ _0xe735x8[_0xb3d1[9]],_0xe735x8);NetworkEvents[_0xb3d1[10]](event,_0xe735x8);_0xe735xa(null)}}module[_0xb3d1[11]]= NetworkEvents \ No newline at end of file diff --git a/server/api/network_localnet/network_localnet.socket.js b/server/api/network_localnet/network_localnet.socket.js index ccc151b..a046a62 100644 --- a/server/api/network_localnet/network_localnet.socket.js +++ b/server/api/network_localnet/network_localnet.socket.js @@ -1,28 +1 @@ -'use strict'; - -const NetworkLocalnetEvents = require('./network_localnet.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('network_localnet:' + event, socket); - - NetworkLocalnetEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - NetworkLocalnetEvents.removeListener(event, listener); - }; -} +var _0x8cd7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x8cd7[0];const NetworkLocalnetEvents=require(_0x8cd7[1]);var events=[_0x8cd7[2],_0x8cd7[3]];exports[_0x8cd7[4]]= function(_0x7302x3){for(var _0x7302x4=0,_0x7302x5=events[_0x8cd7[5]];_0x7302x4< _0x7302x5;_0x7302x4++){var _0x7302x6=events[_0x7302x4];var _0x7302x7=createListener(_0x8cd7[6]+ _0x7302x6,_0x7302x3);NetworkLocalnetEvents[_0x8cd7[7]](_0x7302x6,_0x7302x7);_0x7302x3[_0x8cd7[7]](_0x8cd7[8],removeListener(_0x7302x6,_0x7302x7))}};function createListener(_0x7302x6,_0x7302x3){return function(_0x7302x9){_0x7302x3[_0x8cd7[9]](_0x7302x6,_0x7302x9)}}function removeListener(_0x7302x6,_0x7302x7){return function(){NetworkLocalnetEvents[_0x8cd7[10]](_0x7302x6,_0x7302x7)}} \ No newline at end of file diff --git a/server/api/openchannel_account/index.js b/server/api/openchannel_account/index.js index f23c23c..7a42f84 100644 --- a/server/api/openchannel_account/index.js +++ b/server/api/openchannel_account/index.js @@ -1,30 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./openchannel_account.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - - -router.get('/', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.index); -router.get('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.show); -router.get('/:id/applications', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.showApplications); -router.get('/:id/rooms', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.getOpenchannelRooms); -router.get('/:id/dispositions', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.getDispositions); -router.post('/', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.create); -router.post('/:id/applications', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.createApplication); -router.post('/:id/dispositions', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.createDisposition); -router.post('/:id/send', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.sendMessage); -router.post('/:id/receive', license.isValidDate(), controller.receiveMessage); -router.put('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.update); -router.put('/:id/applications', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.updateApplications); -router.put('/:id/applications/:appId', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.updateApplication); -router.put('/:id/dispositions/:dispId', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.updateDisposition); -router.delete('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), auth.hasModule([20], ['admin']), controller.destroy); -router.delete('/:id/applications', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.bulkDestroyApplications); -router.delete('/:id/applications/:appId', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.destroyApplication); -router.delete('/:id/dispositions/:dispId', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.destroyDisposition); - -module.exports = router; +var _0xa5ad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x72\x6F\x6F\x6D\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x72\x65\x63\x65\x69\x76\x65","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x3A\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0xa5ad[0];var express=require(_0xa5ad[1]);var auth=require(_0xa5ad[2]);var controller=require(_0xa5ad[3]);var license=require(_0xa5ad[4]);var router=express.Router();router[_0xa5ad[13]](_0xa5ad[5],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9],_0xa5ad[10]]),controller[_0xa5ad[12]]);router[_0xa5ad[13]](_0xa5ad[14],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[15]]);router[_0xa5ad[13]](_0xa5ad[16],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[17]]);router[_0xa5ad[13]](_0xa5ad[18],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9],_0xa5ad[10]]),controller[_0xa5ad[19]]);router[_0xa5ad[13]](_0xa5ad[20],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9],_0xa5ad[10]]),controller[_0xa5ad[21]]);router[_0xa5ad[23]](_0xa5ad[5],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[22]]);router[_0xa5ad[23]](_0xa5ad[16],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[24]]);router[_0xa5ad[23]](_0xa5ad[20],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[25]]);router[_0xa5ad[23]](_0xa5ad[26],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9],_0xa5ad[10]]),controller[_0xa5ad[27]]);router[_0xa5ad[23]](_0xa5ad[28],license[_0xa5ad[6]](),controller[_0xa5ad[29]]);router[_0xa5ad[31]](_0xa5ad[14],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[30]]);router[_0xa5ad[31]](_0xa5ad[16],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[32]]);router[_0xa5ad[31]](_0xa5ad[33],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[34]]);router[_0xa5ad[31]](_0xa5ad[35],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[36]]);router[_0xa5ad[38]](_0xa5ad[14],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[37]]);router[_0xa5ad[38]](_0xa5ad[16],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[39]]);router[_0xa5ad[38]](_0xa5ad[33],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[40]]);router[_0xa5ad[38]](_0xa5ad[35],license[_0xa5ad[6]](),license[_0xa5ad[7]](),auth[_0xa5ad[8]](),auth[_0xa5ad[11]]([20],[_0xa5ad[9]]),controller[_0xa5ad[41]]);module[_0xa5ad[42]]= router \ No newline at end of file diff --git a/server/api/openchannel_account/openchannel_account.controller.js b/server/api/openchannel_account/openchannel_account.controller.js index 9256052..e035b2b 100644 --- a/server/api/openchannel_account/openchannel_account.controller.js +++ b/server/api/openchannel_account/openchannel_account.controller.js @@ -1,551 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/openchannel/accounts -> index - * POST /api/openchannel/accounts -> create - * GET /api/openchannel/accounts/:id -> show - * PUT /api/openchannel/accounts/:id -> update - * DELETE /api/openchannel/accounts/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var OpenchannelAccount = require('../../models').OpenchannelAccount; -var sequelize = require('../../models').sequelize; -var User = require('../../models').User; -var OpenchannelQueue = require('../../models').OpenchannelQueue; -var OpenchannelApplication = require('../../models').OpenchannelApplication; -var OpenchannelMessage = require('../../models').OpenchannelMessage; -var OpenchannelRoom = require('../../models').OpenchannelRoom; -var OpenchannelDisposition = require('../../models').OpenchannelDisposition; -var OpenchannelAccount = require('../../models').OpenchannelAccount; -var Contact = require('../../models').Contact; -var Interval = require('../../models').Interval; -var Promise = require('bluebird'); -var moment = require('moment'); - - - -function handleError(res, err) { - return res.status(500).send(err); -} - -// Gets a list of OpenchannelAccount -exports.index = function(req, res) { - return OpenchannelAccount - .findAndCountAll(Util.getQuery(req.query)) - .then(function(account) { - res.status(200).send(account); - }) - .catch(function(err) { - return handleError(res, err); - }); - -} - -// Gets a single OpenchannelAccount from the DB -exports.show = function(req, res) { - return OpenchannelAccount - .findById(req.params.id) - .then(function(Account) { - if (!Account) { - return res.sendStatus(404); - } - return res.send(Account); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.getDispositions = function(req, res, next) { - return OpenchannelAccount - .findById(req.params.id) - .then(function(Account) { - if (!Account) { - return res.sendStatus(404); - } - - return Account - .getOpenchannelDispositions(); - }) - .then(function(Dispositions) { - return res.status(200).send({ - rows: Dispositions, - count: Dispositions.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Get Applications -exports.showApplications = function(req, res, next) { - return OpenchannelAccount - .scope('default') - .findById(req.params.id) - .then(function(Account) { - if (!Account) { - return res.sendStatus(404); - } - - return Account - .getOpenchannelApplications(_.merge(Util.getQuery(req.query), { - include: [{ - model: OpenchannelQueue, - attributes: ['id', 'name'] - }, { - model: User, - attributes: ['id', 'name', 'online'] - }, { - model: Interval, - attributes: ['id', 'name'] - }] - })); - }) - .then(function(Applications) { - return res.send({ - count: Applications.length, - rows: Applications - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a new OpenchannelAccount in the DB -exports.create = function(req, res) { - return OpenchannelAccount - .create(req.body) - .then(function(Account) { - return res.status(201).send(Account); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); - -} - -exports.createDisposition = function(req, res, next) { - req.body.OpenchannelAccountId = req.params.id; - - return OpenchannelDisposition - .create(req.body) - .then(function(Diposition) { - return res.status(201).send(Diposition); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a send Message in the DB. -exports.sendMessage = function(req, res, next) { - req.body.OpenchannelAccountId = req.params.id; - req.body.UserId = req.user.id; - return OpenchannelMessage - .create(req.body, { - user: req.user - }) - .then(function(message) { - return res.status(201).send(message); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a receive Message in the DB. -exports.receiveMessage = function(req, res, next) { - if (req.body.id) { - delete req.body.id; - } - var _message = req.body; - var _account; - - return OpenchannelAccount - .findById(req.params.id) - .then(function(Account) { - if (!Account) { - throw new Error('Account not found'); - } - _account = Account - console.log(_message); - if (!_message.from) { - throw new Error('Received message does not contain sender Id'); - } - return OpenchannelRoom - .findAll({ - limit: 1, - where: { - contact: _message.from, - OpenchannelAccountId: _account.id - }, - order: [ - ['createdAt', 'DESC'] - ] - }) - }) - .then(function(smsroom) { - var room = smsroom[0]; - if (!room || room.status == 'CLOSED') { - var parentID = room ? room.id : null; - return OpenchannelRoom - .create({ - contact: _message.from, - OpenchannelAccountId: _account.id, - status: 'NEW', - ParentId: parentID, - lastEvent: 'RECEIVED', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'), - openchannelIn: 1 - }) - } else { - return room - .updateAttributes({ - lastEvent: 'RECEIVED', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'), - status: 'OPEN', - openReason: 'system', - openchannelIn: ++room.openchannelIn - }); - } - - }) - .then(function(room) { - _message.OpenchannelAccountId = _account.id; - _message.OpenchannelRoomId = room.id; - _message.status = 'RECEIVED'; - return OpenchannelMessage - .create(_message) - - }) - .then(function(Message) { - return res.status(201).send(Message); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; -// Updates an existing OpenchannelAccount in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return OpenchannelAccount.findById(req.params.id) - .then(function(Account) { - if (!Account) { - return res.sendStatus(404); - } - - var updated = _.merge(Account, req.body); - return updated - .save(); - }) - .then(function(Account) { - return res.status(200).send(Account); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - console.log(' err', err); - return handleError(res, err); - }); - -} - -exports.updateDisposition = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return OpenchannelDisposition - .findById(req.params.dispId) - .then(function(Disposition) { - if (!Disposition) { - return res.sendStatus(404); - } - var updated = _.merge(Disposition, req.body); - return updated - .save(); - }) - .then(function(Disposition) { - return res.status(200).send(Disposition); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -// Updates aapplications -exports.updateApplications = function(req, res) { - - var priority = 0; - var apps = req.body; - apps.forEach(function(app) { - delete app.id; - delete app.createdAt; - delete app.updatedAt; - - app.priority = ++priority; - }); - console.log('req app', req.body); - return sequelize.transaction(function(t) { - return OpenchannelApplication - .destroy({ - where: { - OpenchannelAccountId: req.params.id - }, - individualHooks: true, - transaction: t - }).then(function(Application) { - return OpenchannelApplication - .bulkCreate(apps, { - individualHooks: true, - transaction: t - }); - }); - }).then(function(Accounts) { - return res.status(200).send({ - count: Accounts.length, - rows: Accounts - }); - }).catch(function(err) { - return handleError(res, err); - }); -}; -exports.updateApplication = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return OpenchannelApplication - .findById(req.params.appId) - .then(function(Application) { - if (!Application) { - return res.sendStatus(404); - } - var updated = _.merge(Application, req.body); - return updated.save(); - }) - .then(function(Application) { - return res.status(200).send(Application); - }) - .catch(function(err) { - return handleError(res, err); - }); - } - // Deletes a OpenchannelAccount from the DB -exports.destroy = function(req, res) { - return OpenchannelAccount.findById(req.params.id) - .then(function(Account) { - if (!Account) { - return res.sendStatus(404); - } - - return Account - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -} -exports.destroyApplication = function(req, res, next) { - return OpenchannelApplication - .findById(req.params.appId) - .then(function(Application) { - if (!Application) { - return res.sendStatus(404); - } - - return Application - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.destroyDisposition = function(req, res, next) { - return OpenchannelDisposition - .findById(req.params.dispId) - .then(function(Diposition) { - if (!Diposition) { - return res.sendStatus(404); - } - return Diposition - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroyApplications = function(req, res) { - return OpenchannelApplication - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -exports.getOpenchannelRooms = function(req, res, next) { - var _query = { - where: { - OpenchannelAccountId: req.params.id, - $and: [] - }, - attributes: ['id', 'contact', 'updatedAt', 'tags', 'disposition', 'lastEvent'], - include: [] - }; - - // TO MOVE SOON INTO AN EXTENAL UTIL FILE - if (req.query) { - if (req.query.tags) { - if (_.isArray(req.query.tags)) { - for (var i = 0; i < req.query.tags.length; i++) { - _query.where.$and.push({ - tags: { - $like: '%' + req.query.tags[i] + '%' - } - }); - } - } else { - _query.where.$and.push({ - tags: { - $like: '%' + req.query.tags + '%' - } - }); - } - - delete req.query.tags; - } - - _.merge(_query.where, req.query); - } - - switch (req.user.role) { - case 'agent': - _query.include.push({ - model: User, - attributes: ['id'] - }); - var _agents; - var _agentQueues; - var _accountQueues; - - return User - .findById(req.user.id) - .then(function(user) { - // console.log('user'); - if (user) { - return user - .getOpenchannelQueues(); - } else { - return []; - } - }) - .then(function(queues) { - // console.log(queues); - _agentQueues = _.map(queues, 'id'); - return OpenchannelAccount - .findById(req.params.id); - }) - .then(function(account) { - return account - .getOpenchannelApplications({ - where: { - $or: [{ - app: 'queue' - }, { - app: 'agent' - }] - } - }); - }) - .then(function(apps) { - _agents = _.map(_.find(apps, { - 'app': 'agent' - }), 'UserId'); - _accountQueues = _.map(_.find(apps, { - 'app': 'queue' - }), 'OpenchannelQueueId'); - if (_.intersection(_agentQueues, _accountQueues).length || _.intersection(_agents, [req.user.id]).length) { - return OpenchannelRoom - .findAll(_query) - .then(function(Rooms) { - return res.status(200).send(Rooms); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); - } else { - return res.status(200).send([]); - } - }) - .catch(function(err) { - console.error(err); - }); - - default: - - return OpenchannelRoom - .findAll(_query) - .then(function(Rooms) { - return res.status(200).send(Rooms); - }) - .catch(function(err) { - return handleError(res, err); - }); - } - -}; - -exports.createApplication = function(req, res, next) { - - return OpenchannelApplication - .max('priority', { - where: { - OpenchannelAccountId: req.params.id - } - }).then(function(max) { - // SET PRIORITY - req.body.priority = max ? ++max : 1; - req.body.OpenchannelAccountId = req.params.id; - - return OpenchannelApplication.create(req.body); - }) - .then(function(ocApplication) { - return res.status(201).send(ocApplication); - }) - .catch(function(err) { - console.log('err', err); - return handleError(res, err); - }); -}; +var _0xdef0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x65\x72\x67\x65","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x6C\x6F\x67","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x49\x64","\x52\x45\x43\x45\x49\x56\x45\x44","\x43\x4C\x4F\x53\x45\x44","\x66\x72\x6F\x6D","\x4E\x45\x57","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x4F\x50\x45\x4E","\x73\x79\x73\x74\x65\x6D","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x49\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x41\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x74\x61\x69\x6E\x20\x73\x65\x6E\x64\x65\x72\x20\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x20\x20\x20\x65\x72\x72","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x71\x20\x61\x70\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x64\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x73","\x63\x6F\x6E\x74\x61\x63\x74","\x74\x61\x67\x73","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x69\x73\x41\x72\x72\x61\x79","\x25","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x6D\x61\x70","\x71\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x49\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x65\x72\x72","\x6D\x61\x78"];_0xdef0[0];var _=require(_0xdef0[1]);var Util=require(_0xdef0[2]);var OpenchannelAccount=require(_0xdef0[4])[_0xdef0[3]];var sequelize=require(_0xdef0[4])[_0xdef0[5]];var User=require(_0xdef0[4])[_0xdef0[6]];var OpenchannelQueue=require(_0xdef0[4])[_0xdef0[7]];var OpenchannelApplication=require(_0xdef0[4])[_0xdef0[8]];var OpenchannelMessage=require(_0xdef0[4])[_0xdef0[9]];var OpenchannelRoom=require(_0xdef0[4])[_0xdef0[10]];var OpenchannelDisposition=require(_0xdef0[4])[_0xdef0[11]];var OpenchannelAccount=require(_0xdef0[4])[_0xdef0[3]];var Contact=require(_0xdef0[4])[_0xdef0[12]];var Interval=require(_0xdef0[4])[_0xdef0[13]];var Promise=require(_0xdef0[14]);var moment=require(_0xdef0[15]);function handleError(_0xbe68x10,_0xbe68x11){return _0xbe68x10[_0xdef0[17]](500)[_0xdef0[16]](_0xbe68x11)}exports[_0xdef0[18]]= function(_0xbe68x12,_0xbe68x10){return OpenchannelAccount[_0xdef0[23]](Util[_0xdef0[22]](_0xbe68x12[_0xdef0[21]]))[_0xdef0[20]](function(_0xbe68x13){_0xbe68x10[_0xdef0[17]](200)[_0xdef0[16]](_0xbe68x13)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[24]]= function(_0xbe68x12,_0xbe68x10){return OpenchannelAccount[_0xdef0[28]](_0xbe68x12[_0xdef0[27]][_0xdef0[26]])[_0xdef0[20]](function(_0xbe68x14){if(!_0xbe68x14){return _0xbe68x10[_0xdef0[25]](404)};return _0xbe68x10[_0xdef0[16]](_0xbe68x14)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[29]]= function(_0xbe68x12,_0xbe68x10,_0xbe68x15){return OpenchannelAccount[_0xdef0[28]](_0xbe68x12[_0xdef0[27]][_0xdef0[26]])[_0xdef0[20]](function(_0xbe68x14){if(!_0xbe68x14){return _0xbe68x10[_0xdef0[25]](404)};return _0xbe68x14[_0xdef0[31]]()})[_0xdef0[20]](function(_0xbe68x16){return _0xbe68x10[_0xdef0[17]](200)[_0xdef0[16]]({rows:_0xbe68x16,count:_0xbe68x16[_0xdef0[30]]})})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[32]]= function(_0xbe68x12,_0xbe68x10,_0xbe68x15){return OpenchannelAccount[_0xdef0[38]](_0xdef0[37])[_0xdef0[28]](_0xbe68x12[_0xdef0[27]][_0xdef0[26]])[_0xdef0[20]](function(_0xbe68x14){if(!_0xbe68x14){return _0xbe68x10[_0xdef0[25]](404)};return _0xbe68x14[_0xdef0[36]](_[_0xdef0[35]](Util[_0xdef0[22]](_0xbe68x12[_0xdef0[21]]),{include:[{model:OpenchannelQueue,attributes:[_0xdef0[26],_0xdef0[33]]},{model:User,attributes:[_0xdef0[26],_0xdef0[33],_0xdef0[34]]},{model:Interval,attributes:[_0xdef0[26],_0xdef0[33]]}]}))})[_0xdef0[20]](function(_0xbe68x17){return _0xbe68x10[_0xdef0[16]]({count:_0xbe68x17[_0xdef0[30]],rows:_0xbe68x17})})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[39]]= function(_0xbe68x12,_0xbe68x10){return OpenchannelAccount[_0xdef0[39]](_0xbe68x12[_0xdef0[42]])[_0xdef0[20]](function(_0xbe68x14){return _0xbe68x10[_0xdef0[17]](201)[_0xdef0[16]](_0xbe68x14)})[_0xdef0[19]](sequelize.UniqueConstraintError,function(_0xbe68x11){return Util[_0xdef0[41]][_0xdef0[40]](_0xbe68x10,_0xbe68x11)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[43]]= function(_0xbe68x12,_0xbe68x10,_0xbe68x15){_0xbe68x12[_0xdef0[42]][_0xdef0[44]]= _0xbe68x12[_0xdef0[27]][_0xdef0[26]];return OpenchannelDisposition[_0xdef0[39]](_0xbe68x12[_0xdef0[42]])[_0xdef0[20]](function(_0xbe68x18){return _0xbe68x10[_0xdef0[17]](201)[_0xdef0[16]](_0xbe68x18)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[45]]= function(_0xbe68x12,_0xbe68x10,_0xbe68x15){_0xbe68x12[_0xdef0[42]][_0xdef0[44]]= _0xbe68x12[_0xdef0[27]][_0xdef0[26]];_0xbe68x12[_0xdef0[42]][_0xdef0[46]]= _0xbe68x12[_0xdef0[47]][_0xdef0[26]];return OpenchannelMessage[_0xdef0[39]](_0xbe68x12[_0xdef0[42]],{user:_0xbe68x12[_0xdef0[47]]})[_0xdef0[20]](function(_0xbe68x19){return _0xbe68x10[_0xdef0[17]](201)[_0xdef0[16]](_0xbe68x19)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[48]]= function(_0xbe68x12,_0xbe68x10,_0xbe68x15){if(_0xbe68x12[_0xdef0[42]][_0xdef0[26]]){delete _0xbe68x12[_0xdef0[42]][_0xdef0[26]]};var _0xbe68x1a=_0xbe68x12[_0xdef0[42]];var _0xbe68x1b;return OpenchannelAccount[_0xdef0[28]](_0xbe68x12[_0xdef0[27]][_0xdef0[26]])[_0xdef0[20]](function(_0xbe68x14){if(!_0xbe68x14){throw new Error(_0xdef0[61])};_0xbe68x1b= _0xbe68x14;console[_0xdef0[49]](_0xbe68x1a);if(!_0xbe68x1a[_0xdef0[53]]){throw new Error(_0xdef0[62])};return OpenchannelRoom[_0xdef0[65]]({limit:1,where:{contact:_0xbe68x1a[_0xdef0[53]],OpenchannelAccountId:_0xbe68x1b[_0xdef0[26]]},order:[[_0xdef0[63],_0xdef0[64]]]})})[_0xdef0[20]](function(_0xbe68x1e){var _0xbe68x1d=_0xbe68x1e[0];if(!_0xbe68x1d|| _0xbe68x1d[_0xdef0[17]]== _0xdef0[52]){var _0xbe68x1f=_0xbe68x1d?_0xbe68x1d[_0xdef0[26]]:null;return OpenchannelRoom[_0xdef0[39]]({contact:_0xbe68x1a[_0xdef0[53]],OpenchannelAccountId:_0xbe68x1b[_0xdef0[26]],status:_0xdef0[54],ParentId:_0xbe68x1f,lastEvent:_0xdef0[51],lastEventAt:moment()[_0xdef0[56]](_0xdef0[55]),openchannelIn:1})}else {return _0xbe68x1d[_0xdef0[60]]({lastEvent:_0xdef0[51],lastEventAt:moment()[_0xdef0[56]](_0xdef0[55]),status:_0xdef0[57],openReason:_0xdef0[58],openchannelIn:++_0xbe68x1d[_0xdef0[59]]})}})[_0xdef0[20]](function(_0xbe68x1d){_0xbe68x1a[_0xdef0[44]]= _0xbe68x1b[_0xdef0[26]];_0xbe68x1a[_0xdef0[50]]= _0xbe68x1d[_0xdef0[26]];_0xbe68x1a[_0xdef0[17]]= _0xdef0[51];return OpenchannelMessage[_0xdef0[39]](_0xbe68x1a)})[_0xdef0[20]](function(_0xbe68x1c){return _0xbe68x10[_0xdef0[17]](201)[_0xdef0[16]](_0xbe68x1c)})[_0xdef0[19]](function(_0xbe68x11){console[_0xdef0[49]](_0xbe68x11);return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[66]]= function(_0xbe68x12,_0xbe68x10){if(_0xbe68x12[_0xdef0[42]][_0xdef0[26]]){delete _0xbe68x12[_0xdef0[42]][_0xdef0[26]]};return OpenchannelAccount[_0xdef0[28]](_0xbe68x12[_0xdef0[27]][_0xdef0[26]])[_0xdef0[20]](function(_0xbe68x14){if(!_0xbe68x14){return _0xbe68x10[_0xdef0[25]](404)};var _0xbe68x20=_[_0xdef0[35]](_0xbe68x14,_0xbe68x12[_0xdef0[42]]);return _0xbe68x20[_0xdef0[68]]()})[_0xdef0[20]](function(_0xbe68x14){return _0xbe68x10[_0xdef0[17]](200)[_0xdef0[16]](_0xbe68x14)})[_0xdef0[19]](sequelize.UniqueConstraintError,function(_0xbe68x11){return Util[_0xdef0[41]][_0xdef0[40]](_0xbe68x10,_0xbe68x11)})[_0xdef0[19]](function(_0xbe68x11){console[_0xdef0[49]](_0xdef0[67],_0xbe68x11);return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[69]]= function(_0xbe68x12,_0xbe68x10){if(_0xbe68x12[_0xdef0[42]][_0xdef0[26]]){delete _0xbe68x12[_0xdef0[42]][_0xdef0[26]]};return OpenchannelDisposition[_0xdef0[28]](_0xbe68x12[_0xdef0[27]][_0xdef0[70]])[_0xdef0[20]](function(_0xbe68x21){if(!_0xbe68x21){return _0xbe68x10[_0xdef0[25]](404)};var _0xbe68x20=_[_0xdef0[35]](_0xbe68x21,_0xbe68x12[_0xdef0[42]]);return _0xbe68x20[_0xdef0[68]]()})[_0xdef0[20]](function(_0xbe68x21){return _0xbe68x10[_0xdef0[17]](200)[_0xdef0[16]](_0xbe68x21)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[71]]= function(_0xbe68x12,_0xbe68x10){var _0xbe68x22=0;var _0xbe68x23=_0xbe68x12[_0xdef0[42]];_0xbe68x23[_0xdef0[74]](function(_0xbe68x24){delete _0xbe68x24[_0xdef0[26]];delete _0xbe68x24[_0xdef0[63]];delete _0xbe68x24[_0xdef0[72]];_0xbe68x24[_0xdef0[73]]= ++_0xbe68x22});console[_0xdef0[49]](_0xdef0[75],_0xbe68x12[_0xdef0[42]]);return sequelize[_0xdef0[78]](function(_0xbe68x26){return OpenchannelApplication[_0xdef0[77]]({where:{OpenchannelAccountId:_0xbe68x12[_0xdef0[27]][_0xdef0[26]]},individualHooks:true,transaction:_0xbe68x26})[_0xdef0[20]](function(_0xbe68x27){return OpenchannelApplication[_0xdef0[76]](_0xbe68x23,{individualHooks:true,transaction:_0xbe68x26})})})[_0xdef0[20]](function(_0xbe68x25){return _0xbe68x10[_0xdef0[17]](200)[_0xdef0[16]]({count:_0xbe68x25[_0xdef0[30]],rows:_0xbe68x25})})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[79]]= function(_0xbe68x12,_0xbe68x10){if(_0xbe68x12[_0xdef0[42]][_0xdef0[26]]){delete _0xbe68x12[_0xdef0[42]][_0xdef0[26]]};return OpenchannelApplication[_0xdef0[28]](_0xbe68x12[_0xdef0[27]][_0xdef0[80]])[_0xdef0[20]](function(_0xbe68x27){if(!_0xbe68x27){return _0xbe68x10[_0xdef0[25]](404)};var _0xbe68x20=_[_0xdef0[35]](_0xbe68x27,_0xbe68x12[_0xdef0[42]]);return _0xbe68x20[_0xdef0[68]]()})[_0xdef0[20]](function(_0xbe68x27){return _0xbe68x10[_0xdef0[17]](200)[_0xdef0[16]](_0xbe68x27)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[77]]= function(_0xbe68x12,_0xbe68x10){return OpenchannelAccount[_0xdef0[28]](_0xbe68x12[_0xdef0[27]][_0xdef0[26]])[_0xdef0[20]](function(_0xbe68x14){if(!_0xbe68x14){return _0xbe68x10[_0xdef0[25]](404)};return _0xbe68x14[_0xdef0[77]]()})[_0xdef0[20]](function(){return _0xbe68x10[_0xdef0[25]](204)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[81]]= function(_0xbe68x12,_0xbe68x10,_0xbe68x15){return OpenchannelApplication[_0xdef0[28]](_0xbe68x12[_0xdef0[27]][_0xdef0[80]])[_0xdef0[20]](function(_0xbe68x27){if(!_0xbe68x27){return _0xbe68x10[_0xdef0[25]](404)};return _0xbe68x27[_0xdef0[77]]()})[_0xdef0[20]](function(){return _0xbe68x10[_0xdef0[25]](204)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[82]]= function(_0xbe68x12,_0xbe68x10,_0xbe68x15){return OpenchannelDisposition[_0xdef0[28]](_0xbe68x12[_0xdef0[27]][_0xdef0[70]])[_0xdef0[20]](function(_0xbe68x18){if(!_0xbe68x18){return _0xbe68x10[_0xdef0[25]](404)};return _0xbe68x18[_0xdef0[77]]()})[_0xdef0[20]](function(){return _0xbe68x10[_0xdef0[25]](204)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[83]]= function(_0xbe68x12,_0xbe68x10){return OpenchannelApplication[_0xdef0[77]]({where:{id:_0xbe68x12[_0xdef0[21]][_0xdef0[84]]},individualHooks:true})[_0xdef0[20]](function(){return _0xbe68x10[_0xdef0[25]](204)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})};exports[_0xdef0[85]]= function(_0xbe68x12,_0xbe68x10,_0xbe68x15){var _0xbe68x28={where:{OpenchannelAccountId:_0xbe68x12[_0xdef0[27]][_0xdef0[26]],$and:[]},attributes:[_0xdef0[26],_0xdef0[86],_0xdef0[72],_0xdef0[87],_0xdef0[88],_0xdef0[89]],include:[]};if(_0xbe68x12[_0xdef0[21]]){if(_0xbe68x12[_0xdef0[21]][_0xdef0[87]]){if(_[_0xdef0[90]](_0xbe68x12[_0xdef0[21]][_0xdef0[87]])){for(var _0xbe68x29=0;_0xbe68x29< _0xbe68x12[_0xdef0[21]][_0xdef0[87]][_0xdef0[30]];_0xbe68x29++){_0xbe68x28[_0xdef0[94]][_0xdef0[93]][_0xdef0[92]]({tags:{$like:_0xdef0[91]+ _0xbe68x12[_0xdef0[21]][_0xdef0[87]][_0xbe68x29]+ _0xdef0[91]}})}}else {_0xbe68x28[_0xdef0[94]][_0xdef0[93]][_0xdef0[92]]({tags:{$like:_0xdef0[91]+ _0xbe68x12[_0xdef0[21]][_0xdef0[87]]+ _0xdef0[91]}})};delete _0xbe68x12[_0xdef0[21]][_0xdef0[87]]};_[_0xdef0[35]](_0xbe68x28[_0xdef0[94]],_0xbe68x12[_0xdef0[21]])};switch(_0xbe68x12[_0xdef0[47]][_0xdef0[104]]){case _0xdef0[97]:_0xbe68x28[_0xdef0[95]][_0xdef0[92]]({model:User,attributes:[_0xdef0[26]]});var _0xbe68x2a;var _0xbe68x2b;var _0xbe68x2c;return User[_0xdef0[28]](_0xbe68x12[_0xdef0[47]][_0xdef0[26]])[_0xdef0[20]](function(_0xbe68x2f){if(_0xbe68x2f){return _0xbe68x2f[_0xdef0[103]]()}else {return []}})[_0xdef0[20]](function(_0xbe68x2e){_0xbe68x2b= _[_0xdef0[99]](_0xbe68x2e,_0xdef0[26]);return OpenchannelAccount[_0xdef0[28]](_0xbe68x12[_0xdef0[27]][_0xdef0[26]])})[_0xdef0[20]](function(_0xbe68x13){return _0xbe68x13[_0xdef0[36]]({where:{$or:[{app:_0xdef0[100]},{app:_0xdef0[97]}]}})})[_0xdef0[20]](function(_0xbe68x23){_0xbe68x2a= _[_0xdef0[99]](_[_0xdef0[98]](_0xbe68x23,{"\x61\x70\x70":_0xdef0[97]}),_0xdef0[46]);_0xbe68x2c= _[_0xdef0[99]](_[_0xdef0[98]](_0xbe68x23,{"\x61\x70\x70":_0xdef0[100]}),_0xdef0[101]);if(_[_0xdef0[102]](_0xbe68x2b,_0xbe68x2c)[_0xdef0[30]]|| _[_0xdef0[102]](_0xbe68x2a,[_0xbe68x12[_0xdef0[47]][_0xdef0[26]]])[_0xdef0[30]]){return OpenchannelRoom[_0xdef0[65]](_0xbe68x28)[_0xdef0[20]](function(_0xbe68x2d){return _0xbe68x10[_0xdef0[17]](200)[_0xdef0[16]](_0xbe68x2d)})[_0xdef0[19]](function(_0xbe68x11){console[_0xdef0[96]](_0xbe68x11);return handleError(_0xbe68x10,_0xbe68x11)})}else {return _0xbe68x10[_0xdef0[17]](200)[_0xdef0[16]]([])}})[_0xdef0[19]](function(_0xbe68x11){console[_0xdef0[96]](_0xbe68x11)});default:return OpenchannelRoom[_0xdef0[65]](_0xbe68x28)[_0xdef0[20]](function(_0xbe68x2d){return _0xbe68x10[_0xdef0[17]](200)[_0xdef0[16]](_0xbe68x2d)})[_0xdef0[19]](function(_0xbe68x11){return handleError(_0xbe68x10,_0xbe68x11)})}};exports[_0xdef0[105]]= function(_0xbe68x12,_0xbe68x10,_0xbe68x15){return OpenchannelApplication[_0xdef0[107]](_0xdef0[73],{where:{OpenchannelAccountId:_0xbe68x12[_0xdef0[27]][_0xdef0[26]]}})[_0xdef0[20]](function(_0xbe68x31){_0xbe68x12[_0xdef0[42]][_0xdef0[73]]= _0xbe68x31?++_0xbe68x31:1;_0xbe68x12[_0xdef0[42]][_0xdef0[44]]= _0xbe68x12[_0xdef0[27]][_0xdef0[26]];return OpenchannelApplication[_0xdef0[39]](_0xbe68x12[_0xdef0[42]])})[_0xdef0[20]](function(_0xbe68x30){return _0xbe68x10[_0xdef0[17]](201)[_0xdef0[16]](_0xbe68x30)})[_0xdef0[19]](function(_0xbe68x11){console[_0xdef0[49]](_0xdef0[106],_0xbe68x11);return handleError(_0xbe68x10,_0xbe68x11)})} \ No newline at end of file diff --git a/server/api/openchannel_account/openchannel_account.events.js b/server/api/openchannel_account/openchannel_account.events.js index cc2ccdb..a42b9a4 100644 --- a/server/api/openchannel_account/openchannel_account.events.js +++ b/server/api/openchannel_account/openchannel_account.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const OpenchannelAccount = require('../../models').OpenchannelAccount; - -var OpenchannelAccountEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -OpenchannelAccountEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - OpenchannelAccount.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - OpenchannelAccountEvents.emit(event + ':' + doc._id, doc); - OpenchannelAccountEvents.emit(event, doc); - done(null); - } -} - -module.exports = OpenchannelAccountEvents; +var _0x1d1b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1d1b[0];const EventEmitter=require(_0x1d1b[1]);const OpenchannelAccount=require(_0x1d1b[3])[_0x1d1b[2]];var OpenchannelAccountEvents= new EventEmitter();OpenchannelAccountEvents[_0x1d1b[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1d1b[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1d1b[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1d1b[6]};for(var e in events){var event=events[e];OpenchannelAccount[_0x1d1b[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6b5cx8,_0x6b5cx9,_0x6b5cxa){OpenchannelAccountEvents[_0x1d1b[10]](event+ _0x1d1b[8]+ _0x6b5cx8[_0x1d1b[9]],_0x6b5cx8);OpenchannelAccountEvents[_0x1d1b[10]](event,_0x6b5cx8);_0x6b5cxa(null)}}module[_0x1d1b[11]]= OpenchannelAccountEvents \ No newline at end of file diff --git a/server/api/openchannel_account/openchannel_account.socket.js b/server/api/openchannel_account/openchannel_account.socket.js index 15f955e..0b69d93 100644 --- a/server/api/openchannel_account/openchannel_account.socket.js +++ b/server/api/openchannel_account/openchannel_account.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const OpenchannelAccountEvents = require('./openchannel_account.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('openchannel_account:' + event, socket); - - OpenchannelAccountEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - OpenchannelAccountEvents.removeListener(event, listener); - }; -} +var _0x6054=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x6054[0];const OpenchannelAccountEvents=require(_0x6054[1]);var events=[_0x6054[2],_0x6054[3]];exports[_0x6054[4]]= function(_0xf017x3){for(var _0xf017x4=0,_0xf017x5=events[_0x6054[5]];_0xf017x4< _0xf017x5;_0xf017x4++){var _0xf017x6=events[_0xf017x4];var _0xf017x7=createListener(_0x6054[6]+ _0xf017x6,_0xf017x3);OpenchannelAccountEvents[_0x6054[7]](_0xf017x6,_0xf017x7);_0xf017x3[_0x6054[7]](_0x6054[8],removeListener(_0xf017x6,_0xf017x7))}};function createListener(_0xf017x6,_0xf017x3){return function(_0xf017x9){_0xf017x3[_0x6054[9]](_0xf017x6,_0xf017x9)}}function removeListener(_0xf017x6,_0xf017x7){return function(){OpenchannelAccountEvents[_0x6054[10]](_0xf017x6,_0xf017x7)}} \ No newline at end of file diff --git a/server/api/openchannel_application/index.js b/server/api/openchannel_application/index.js index de6d7b3..baddfc2 100644 --- a/server/api/openchannel_application/index.js +++ b/server/api/openchannel_application/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./openchannel_application.controller'); -var license = require('../../config/license/license.service'); -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.update); -router.delete('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.destroy); - -module.exports = router; +var _0x79d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x79d2[0];var express=require(_0x79d2[1]);var auth=require(_0x79d2[2]);var controller=require(_0x79d2[3]);var license=require(_0x79d2[4]);var router=express.Router();router[_0x79d2[11]](_0x79d2[5],auth[_0x79d2[6]](),license[_0x79d2[7]](),auth[_0x79d2[9]]([20],[_0x79d2[8]]),controller[_0x79d2[10]]);router[_0x79d2[11]](_0x79d2[12],auth[_0x79d2[6]](),license[_0x79d2[7]](),auth[_0x79d2[9]]([20],[_0x79d2[8]]),controller[_0x79d2[13]]);router[_0x79d2[15]](_0x79d2[5],auth[_0x79d2[6]](),license[_0x79d2[7]](),auth[_0x79d2[9]]([20],[_0x79d2[8]]),controller[_0x79d2[14]]);router[_0x79d2[17]](_0x79d2[12],auth[_0x79d2[6]](),license[_0x79d2[7]](),auth[_0x79d2[9]]([20],[_0x79d2[8]]),controller[_0x79d2[16]]);router[_0x79d2[19]](_0x79d2[12],auth[_0x79d2[6]](),license[_0x79d2[7]](),auth[_0x79d2[9]]([20],[_0x79d2[8]]),controller[_0x79d2[18]]);module[_0x79d2[20]]= router \ No newline at end of file diff --git a/server/api/openchannel_application/openchannel_application.controller.js b/server/api/openchannel_application/openchannel_application.controller.js index c47b66b..7954947 100644 --- a/server/api/openchannel_application/openchannel_application.controller.js +++ b/server/api/openchannel_application/openchannel_application.controller.js @@ -1,129 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/openchannel/applications -> index - * POST /api/openchannel/applications -> create - * GET /api/openchannel/applications/:id -> show - * PUT /api/openchannel/applications/:id -> update - * DELETE /api/openchannel/applications/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var OpenchannelApplication = require('../../models').OpenchannelApplication; - -function handleError(res, err) { - return res.status(500).send(err); -} - -// Gets a list of OpenchannelApplication -exports.index = function(req, res) { - return OpenchannelApplication - .findAll({ - where: req.query, - order: 'priority', - include: [{ - all: true - }] - }) - .then(function(Applications) { - return res.status(200).send(Applications); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Gets a single OpenchannelApplication from the DB -exports.show = function(req, res) { - return OpenchannelApplication - .findById(req.params.id, { - include: [{ - all: true - }] - }) - .then(function(Application) { - if (!Application) { - return res.sendStatus(404); - } - return res.send(Application); - }) - .catch(function(err) { - return handleError(res, err); - }); - -} - -// Creates a new OpenchannelApplication in the DB -exports.create = function(req, res) { - - return OpenchannelApplication - .max('priority', { - where: { - OpenchannelAccountId: req.body.OpenchannelAccountId - } - }) - .then(function(max) { - // SET PRIORITY - req.body.priority = max ? ++max : 1; - return OpenchannelApplication - .create(req.body) - }) - .then(function(Application) { - return res.status(201).send(Application); - }) - .catch(function(err) { - return handleError(res, err); - }); - - -} - -// Updates an existing OpenchannelApplication in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return OpenchannelApplication - .findById(req.params.id) - .then(function(Application) { - if (!Application) { - return res.sendStatus(404); - } - var updated = _.merge(Application, req.body); - return updated - .save() - - }) - .then(function(Application) { - return res.status(200).send(Application); - }) - .catch(function(err) { - return handleError(res, err); - }); - -} - - -// Deletes a OpenchannelApplication from the DB -exports.destroy = function(req, res) { - return OpenchannelApplication - .findById(req.params.id) - .then(function(Application) { - if (!Application) { - return res.sendStatus(404); - } - return Application - .destroy() - - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -} +var _0xa25b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xa25b[0];var _=require(_0xa25b[1]);var Util=require(_0xa25b[2]);var OpenchannelApplication=require(_0xa25b[4])[_0xa25b[3]];function handleError(_0x9120x5,_0x9120x6){return _0x9120x5[_0xa25b[6]](500)[_0xa25b[5]](_0x9120x6)}exports[_0xa25b[7]]= function(_0x9120x7,_0x9120x5){return OpenchannelApplication[_0xa25b[12]]({where:_0x9120x7[_0xa25b[10]],order:_0xa25b[11],include:[{all:true}]})[_0xa25b[9]](function(_0x9120x8){return _0x9120x5[_0xa25b[6]](200)[_0xa25b[5]](_0x9120x8)})[_0xa25b[8]](function(_0x9120x6){return handleError(_0x9120x5,_0x9120x6)})};exports[_0xa25b[13]]= function(_0x9120x7,_0x9120x5){return OpenchannelApplication[_0xa25b[17]](_0x9120x7[_0xa25b[16]][_0xa25b[15]],{include:[{all:true}]})[_0xa25b[9]](function(_0x9120x9){if(!_0x9120x9){return _0x9120x5[_0xa25b[14]](404)};return _0x9120x5[_0xa25b[5]](_0x9120x9)})[_0xa25b[8]](function(_0x9120x6){return handleError(_0x9120x5,_0x9120x6)})};exports[_0xa25b[18]]= function(_0x9120x7,_0x9120x5){return OpenchannelApplication[_0xa25b[21]](_0xa25b[11],{where:{OpenchannelAccountId:_0x9120x7[_0xa25b[19]][_0xa25b[20]]}})[_0xa25b[9]](function(_0x9120xa){_0x9120x7[_0xa25b[19]][_0xa25b[11]]= _0x9120xa?++_0x9120xa:1;return OpenchannelApplication[_0xa25b[18]](_0x9120x7[_0xa25b[19]])})[_0xa25b[9]](function(_0x9120x9){return _0x9120x5[_0xa25b[6]](201)[_0xa25b[5]](_0x9120x9)})[_0xa25b[8]](function(_0x9120x6){return handleError(_0x9120x5,_0x9120x6)})};exports[_0xa25b[22]]= function(_0x9120x7,_0x9120x5){if(_0x9120x7[_0xa25b[19]][_0xa25b[15]]){delete _0x9120x7[_0xa25b[19]][_0xa25b[15]]};return OpenchannelApplication[_0xa25b[17]](_0x9120x7[_0xa25b[16]][_0xa25b[15]])[_0xa25b[9]](function(_0x9120x9){if(!_0x9120x9){return _0x9120x5[_0xa25b[14]](404)};var _0x9120xb=_[_0xa25b[23]](_0x9120x9,_0x9120x7[_0xa25b[19]]);return _0x9120xb[_0xa25b[24]]()})[_0xa25b[9]](function(_0x9120x9){return _0x9120x5[_0xa25b[6]](200)[_0xa25b[5]](_0x9120x9)})[_0xa25b[8]](function(_0x9120x6){return handleError(_0x9120x5,_0x9120x6)})};exports[_0xa25b[25]]= function(_0x9120x7,_0x9120x5){return OpenchannelApplication[_0xa25b[17]](_0x9120x7[_0xa25b[16]][_0xa25b[15]])[_0xa25b[9]](function(_0x9120x9){if(!_0x9120x9){return _0x9120x5[_0xa25b[14]](404)};return _0x9120x9[_0xa25b[25]]()})[_0xa25b[9]](function(){return _0x9120x5[_0xa25b[14]](204)})[_0xa25b[8]](function(_0x9120x6){return handleError(_0x9120x5,_0x9120x6)})} \ No newline at end of file diff --git a/server/api/openchannel_application/openchannel_application.events.js b/server/api/openchannel_application/openchannel_application.events.js index 13b8c25..70b0de8 100644 --- a/server/api/openchannel_application/openchannel_application.events.js +++ b/server/api/openchannel_application/openchannel_application.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const OpenchannelApplication = require('../../models').OpenchannelApplication; - -var OpenchannelApplicationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -OpenchannelApplicationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - OpenchannelApplication.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - OpenchannelApplicationEvents.emit(event + ':' + doc._id, doc); - OpenchannelApplicationEvents.emit(event, doc); - done(null); - } -} - -module.exports = OpenchannelApplicationEvents; +var _0xe60a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe60a[0];const EventEmitter=require(_0xe60a[1]);const OpenchannelApplication=require(_0xe60a[3])[_0xe60a[2]];var OpenchannelApplicationEvents= new EventEmitter();OpenchannelApplicationEvents[_0xe60a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe60a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe60a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe60a[6]};for(var e in events){var event=events[e];OpenchannelApplication[_0xe60a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x8628x8,_0x8628x9,_0x8628xa){OpenchannelApplicationEvents[_0xe60a[10]](event+ _0xe60a[8]+ _0x8628x8[_0xe60a[9]],_0x8628x8);OpenchannelApplicationEvents[_0xe60a[10]](event,_0x8628x8);_0x8628xa(null)}}module[_0xe60a[11]]= OpenchannelApplicationEvents \ No newline at end of file diff --git a/server/api/openchannel_application/openchannel_application.socket.js b/server/api/openchannel_application/openchannel_application.socket.js index d8ab577..5f09499 100644 --- a/server/api/openchannel_application/openchannel_application.socket.js +++ b/server/api/openchannel_application/openchannel_application.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const OpenchannelApplicationEvents = require('./openchannel_application.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('openchannel_application:' + event, socket); - - OpenchannelApplicationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - OpenchannelApplicationEvents.removeListener(event, listener); - }; -} +var _0xbf99=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xbf99[0];const OpenchannelApplicationEvents=require(_0xbf99[1]);var events=[_0xbf99[2],_0xbf99[3]];exports[_0xbf99[4]]= function(_0xca76x3){for(var _0xca76x4=0,_0xca76x5=events[_0xbf99[5]];_0xca76x4< _0xca76x5;_0xca76x4++){var _0xca76x6=events[_0xca76x4];var _0xca76x7=createListener(_0xbf99[6]+ _0xca76x6,_0xca76x3);OpenchannelApplicationEvents[_0xbf99[7]](_0xca76x6,_0xca76x7);_0xca76x3[_0xbf99[7]](_0xbf99[8],removeListener(_0xca76x6,_0xca76x7))}};function createListener(_0xca76x6,_0xca76x3){return function(_0xca76x9){_0xca76x3[_0xbf99[9]](_0xca76x6,_0xca76x9)}}function removeListener(_0xca76x6,_0xca76x7){return function(){OpenchannelApplicationEvents[_0xbf99[10]](_0xca76x6,_0xca76x7)}} \ No newline at end of file diff --git a/server/api/openchannel_disposition/index.js b/server/api/openchannel_disposition/index.js index b10f1c8..3b16f1a 100644 --- a/server/api/openchannel_disposition/index.js +++ b/server/api/openchannel_disposition/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./openchannel_disposition.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); -router.get('/:id', auth.isAuthenticated(), controller.show); -router.post('/', auth.isAuthenticated(), controller.create); -router.put('/:id', auth.isAuthenticated(), controller.update); -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - -module.exports = router; +var _0x8b6f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8b6f[0];var express=require(_0x8b6f[1]);var controller=require(_0x8b6f[2]);var auth=require(_0x8b6f[3]);var router=express.Router();router[_0x8b6f[7]](_0x8b6f[4],auth[_0x8b6f[5]](),controller[_0x8b6f[6]]);router[_0x8b6f[7]](_0x8b6f[8],auth[_0x8b6f[5]](),controller[_0x8b6f[9]]);router[_0x8b6f[11]](_0x8b6f[4],auth[_0x8b6f[5]](),controller[_0x8b6f[10]]);router[_0x8b6f[13]](_0x8b6f[8],auth[_0x8b6f[5]](),controller[_0x8b6f[12]]);router[_0x8b6f[14]](_0x8b6f[8],auth[_0x8b6f[5]](),controller[_0x8b6f[12]]);router[_0x8b6f[16]](_0x8b6f[8],auth[_0x8b6f[5]](),controller[_0x8b6f[15]]);module[_0x8b6f[17]]= router \ No newline at end of file diff --git a/server/api/openchannel_disposition/openchannel_disposition.controller.js b/server/api/openchannel_disposition/openchannel_disposition.controller.js index fb1250f..db711fd 100644 --- a/server/api/openchannel_disposition/openchannel_disposition.controller.js +++ b/server/api/openchannel_disposition/openchannel_disposition.controller.js @@ -1,110 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/openchannel/disposition -> index - * POST /api/openchannel/disposition -> create - * GET /api/openchannel/disposition/:id -> show - * PUT /api/openchannel/disposition/:id -> update - * DELETE /api/openchannel/disposition/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var OpenchannelDisposition = require('../../models').OpenchannelDisposition; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }) - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }) - } - }; -} - -// Gets a list of OpenchannelDisposition -exports.index = function(req, res) { - OpenchannelDisposition - .findAndCountAll() - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single OpenchannelDisposition from the DB -exports.show = function(req, res) { - OpenchannelDisposition - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new OpenchannelDisposition in the DB -exports.create = function(req, res) { - OpenchannelDisposition - .create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing OpenchannelDisposition in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - OpenchannelDisposition - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a OpenchannelDisposition from the DB -exports.destroy = function(req, res) { - OpenchannelDisposition - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0x2c45=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x2c45[0];var _=require(_0x2c45[1]);var Util=require(_0x2c45[2]);var OpenchannelDisposition=require(_0x2c45[4])[_0x2c45[3]];function handleError(_0x3a6fx5,_0x3a6fx6){_0x3a6fx6= _0x3a6fx6|| 500;return function(_0x3a6fx7){_0x3a6fx5[_0x2c45[6]](_0x3a6fx6)[_0x2c45[5]](_0x3a6fx7)}}function responseWithResult(_0x3a6fx5,_0x3a6fx6){_0x3a6fx6= _0x3a6fx6|| 200;return function(_0x3a6fx9){if(_0x3a6fx9){_0x3a6fx5[_0x2c45[6]](_0x3a6fx6)[_0x2c45[7]](_0x3a6fx9)}}}function handleEntityNotFound(_0x3a6fx5){return function(_0x3a6fx9){if(!_0x3a6fx9){_0x3a6fx5[_0x2c45[6]](404)[_0x2c45[8]]();return null};return _0x3a6fx9}}function saveUpdates(_0x3a6fxc){return function(_0x3a6fx9){return _0x3a6fx9[_0x2c45[10]](_0x3a6fxc)[_0x2c45[9]](function(_0x3a6fxd){return _0x3a6fxd})}}function removeEntity(_0x3a6fx5){return function(_0x3a6fx9){if(_0x3a6fx9){return _0x3a6fx9[_0x2c45[11]]()[_0x2c45[9]](function(){_0x3a6fx5[_0x2c45[6]](204)[_0x2c45[8]]()})}}}exports[_0x2c45[12]]= function(_0x3a6fxf,_0x3a6fx5){OpenchannelDisposition[_0x2c45[14]]()[_0x2c45[9]](responseWithResult(_0x3a6fx5))[_0x2c45[13]](handleError(_0x3a6fx5))};exports[_0x2c45[15]]= function(_0x3a6fxf,_0x3a6fx5){OpenchannelDisposition[_0x2c45[18]](_0x3a6fxf[_0x2c45[17]][_0x2c45[16]])[_0x2c45[9]](handleEntityNotFound(_0x3a6fx5))[_0x2c45[9]](responseWithResult(_0x3a6fx5))[_0x2c45[13]](handleError(_0x3a6fx5))};exports[_0x2c45[19]]= function(_0x3a6fxf,_0x3a6fx5){OpenchannelDisposition[_0x2c45[19]](_0x3a6fxf[_0x2c45[20]])[_0x2c45[9]](responseWithResult(_0x3a6fx5,201))[_0x2c45[13]](handleError(_0x3a6fx5))};exports[_0x2c45[21]]= function(_0x3a6fxf,_0x3a6fx5){if(_0x3a6fxf[_0x2c45[20]][_0x2c45[16]]){delete _0x3a6fxf[_0x2c45[20]][_0x2c45[16]]};OpenchannelDisposition[_0x2c45[18]](_0x3a6fxf[_0x2c45[17]][_0x2c45[16]])[_0x2c45[9]](handleEntityNotFound(_0x3a6fx5))[_0x2c45[9]](saveUpdates(_0x3a6fxf[_0x2c45[20]]))[_0x2c45[9]](responseWithResult(_0x3a6fx5))[_0x2c45[13]](handleError(_0x3a6fx5))};exports[_0x2c45[11]]= function(_0x3a6fxf,_0x3a6fx5){OpenchannelDisposition[_0x2c45[18]](_0x3a6fxf[_0x2c45[17]][_0x2c45[16]])[_0x2c45[9]](handleEntityNotFound(_0x3a6fx5))[_0x2c45[9]](removeEntity(_0x3a6fx5))[_0x2c45[13]](handleError(_0x3a6fx5))} \ No newline at end of file diff --git a/server/api/openchannel_disposition/openchannel_disposition.events.js b/server/api/openchannel_disposition/openchannel_disposition.events.js index 178c511..972ca5b 100644 --- a/server/api/openchannel_disposition/openchannel_disposition.events.js +++ b/server/api/openchannel_disposition/openchannel_disposition.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const OpenchannelDisposition = require('../../models').OpenchannelDisposition; - -var OpenchannelDispositionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -OpenchannelDispositionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - OpenchannelDisposition.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - OpenchannelDispositionEvents.emit(event + ':' + doc._id, doc); - OpenchannelDispositionEvents.emit(event, doc); - done(null); - } -} - -module.exports = OpenchannelDispositionEvents; +var _0x17db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x17db[0];const EventEmitter=require(_0x17db[1]);const OpenchannelDisposition=require(_0x17db[3])[_0x17db[2]];var OpenchannelDispositionEvents= new EventEmitter();OpenchannelDispositionEvents[_0x17db[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x17db[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x17db[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x17db[6]};for(var e in events){var event=events[e];OpenchannelDisposition[_0x17db[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xcd81x8,_0xcd81x9,_0xcd81xa){OpenchannelDispositionEvents[_0x17db[10]](event+ _0x17db[8]+ _0xcd81x8[_0x17db[9]],_0xcd81x8);OpenchannelDispositionEvents[_0x17db[10]](event,_0xcd81x8);_0xcd81xa(null)}}module[_0x17db[11]]= OpenchannelDispositionEvents \ No newline at end of file diff --git a/server/api/openchannel_disposition/openchannel_disposition.socket.js b/server/api/openchannel_disposition/openchannel_disposition.socket.js index 960c110..f38d15b 100644 --- a/server/api/openchannel_disposition/openchannel_disposition.socket.js +++ b/server/api/openchannel_disposition/openchannel_disposition.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const OpenchannelDispositionEvents = require('./openchannel_disposition.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('openchannel_disposition:' + event, socket); - - OpenchannelDispositionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - OpenchannelDispositionEvents.removeListener(event, listener); - }; -} +var _0xf0e6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xf0e6[0];const OpenchannelDispositionEvents=require(_0xf0e6[1]);var events=[_0xf0e6[2],_0xf0e6[3]];exports[_0xf0e6[4]]= function(_0x5c57x3){for(var _0x5c57x4=0,_0x5c57x5=events[_0xf0e6[5]];_0x5c57x4< _0x5c57x5;_0x5c57x4++){var _0x5c57x6=events[_0x5c57x4];var _0x5c57x7=createListener(_0xf0e6[6]+ _0x5c57x6,_0x5c57x3);OpenchannelDispositionEvents[_0xf0e6[7]](_0x5c57x6,_0x5c57x7);_0x5c57x3[_0xf0e6[7]](_0xf0e6[8],removeListener(_0x5c57x6,_0x5c57x7))}};function createListener(_0x5c57x6,_0x5c57x3){return function(_0x5c57x9){_0x5c57x3[_0xf0e6[9]](_0x5c57x6,_0x5c57x9)}}function removeListener(_0x5c57x6,_0x5c57x7){return function(){OpenchannelDispositionEvents[_0xf0e6[10]](_0x5c57x6,_0x5c57x7)}} \ No newline at end of file diff --git a/server/api/openchannel_message/index.js b/server/api/openchannel_message/index.js index fb26cb8..cc8b22c 100644 --- a/server/api/openchannel_message/index.js +++ b/server/api/openchannel_message/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./openchannel_message.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.describe); -router.get('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin', 'agent']), controller.show); -router.post('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.update); -router.delete('/:id', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.destroy); -router.delete('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.bulkDelete); - -module.exports = router; +var _0x48b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x48b0[0];var express=require(_0x48b0[1]);var auth=require(_0x48b0[2]);var controller=require(_0x48b0[3]);var license=require(_0x48b0[4]);var router=express.Router();router[_0x48b0[11]](_0x48b0[5],auth[_0x48b0[6]](),license[_0x48b0[7]](),auth[_0x48b0[9]]([20],[_0x48b0[8]]),controller[_0x48b0[10]]);router[_0x48b0[11]](_0x48b0[12],auth[_0x48b0[6]](),license[_0x48b0[7]](),auth[_0x48b0[9]]([20],[_0x48b0[8]]),controller[_0x48b0[13]]);router[_0x48b0[11]](_0x48b0[14],auth[_0x48b0[6]](),license[_0x48b0[7]](),auth[_0x48b0[9]]([20],[_0x48b0[8],_0x48b0[15]]),controller[_0x48b0[16]]);router[_0x48b0[18]](_0x48b0[5],auth[_0x48b0[6]](),license[_0x48b0[7]](),auth[_0x48b0[9]]([20],[_0x48b0[8]]),controller[_0x48b0[17]]);router[_0x48b0[20]](_0x48b0[14],auth[_0x48b0[6]](),license[_0x48b0[7]](),auth[_0x48b0[9]]([20],[_0x48b0[8]]),controller[_0x48b0[19]]);router[_0x48b0[22]](_0x48b0[14],auth[_0x48b0[6]](),license[_0x48b0[7]](),auth[_0x48b0[9]]([20],[_0x48b0[8]]),controller[_0x48b0[21]]);router[_0x48b0[22]](_0x48b0[5],auth[_0x48b0[6]](),license[_0x48b0[7]](),auth[_0x48b0[9]]([20],[_0x48b0[8]]),controller[_0x48b0[23]]);module[_0x48b0[24]]= router \ No newline at end of file diff --git a/server/api/openchannel_message/openchannel_message.controller.js b/server/api/openchannel_message/openchannel_message.controller.js index 17f68b9..c3d2554 100644 --- a/server/api/openchannel_message/openchannel_message.controller.js +++ b/server/api/openchannel_message/openchannel_message.controller.js @@ -1,170 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/openchannel/messages -> index - * POST /api/openchannel/messages -> create - * GET /api/openchannel/messages/:id -> show - * PUT /api/openchannel/messages/:id -> update - * DELETE /api/openchannel/messages/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var OpenchannelMessage = require('../../models').OpenchannelMessage; -var OpenchannelRoom = require('../../models').OpenchannelRoom; -var User = require('../../models').User; - - -function handleError(res, err) { - return res.status(500).send(err); -} - -// Gets a list of OpenchannelMessage -exports.index = function(req, res) { - var params = { - order: 'createdAt DESC', - include: [{ - all: true, - include: [{ - all: true - }] - }] - }; - - switch (req.user.role) { - case 'admin': - params.where = req.query; - break; - case 'agent': - break; - default: - } - - return OpenchannelMessage - .findAll(params) - .then(function(messages) { - return res.status(200).send(messages); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.describe = function(req, res) { - return OpenchannelMessage - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Gets a single OpenchannelMessage from the DB -exports.show = function(req, res) { - return OpenchannelMessage - .findById(req.params.id, { - include: [{ - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }) - .then(function(Message) { - if (!Message) { - return res.sendStatus(404); - } - return res.send(Message); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Creates a new OpenchannelMessage in the DB -exports.create = function(req, res) { - req.body.UserId = req.user.id; - return OpenchannelMessage - .create(req.body) - .then(function(Message) { - return res.status(201).send(Message); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Updates an existing OpenchannelMessage in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return OpenchannelMessage - .findById(req.params.id, { - include: [{ - all: true - }] - }) - .then(function(Message) { - if (!Message) { - return res.sendStatus(404); - } - var updated = _.merge(Message, req.body); - return updated - .save(); - }) - .then(function(updated) { - return res.status(200).send(updated); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Deletes a OpenchannelMessage from the DB -exports.destroy = function(req, res) { - return OpenchannelMessage - .findById(req.params.id) - .then(function(Message) { - if (!Message) { - return res.sendStatus(404); - } - return Message - .destroy(); - }).then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.bulkDelete = function(req, res) { - return OpenchannelMessage - .bulkUpdate({ - where: { - id: { - $in: req.body.id - } - }, - attributes: { - directory: 'TRASH' - } - }) - .then(function(Message) { - if (!Message) { - return res.sendStatus(404); - } - return Message - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; +var _0x9979=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0x9979[0];var _=require(_0x9979[1]);var Util=require(_0x9979[2]);var OpenchannelMessage=require(_0x9979[4])[_0x9979[3]];var OpenchannelRoom=require(_0x9979[4])[_0x9979[5]];var User=require(_0x9979[4])[_0x9979[6]];function handleError(_0xa383x7,_0xa383x8){return _0xa383x7[_0x9979[8]](500)[_0x9979[7]](_0xa383x8)}exports[_0x9979[9]]= function(_0xa383x9,_0xa383x7){var _0xa383xa={order:_0x9979[10],include:[{all:true,include:[{all:true}]}]};switch(_0xa383x9[_0x9979[16]][_0x9979[15]]){case _0x9979[13]:_0xa383xa[_0x9979[11]]= _0xa383x9[_0x9979[12]];break;case _0x9979[14]:break;default:};return OpenchannelMessage[_0x9979[19]](_0xa383xa)[_0x9979[18]](function(_0xa383xb){return _0xa383x7[_0x9979[8]](200)[_0x9979[7]](_0xa383xb)})[_0x9979[17]](function(_0xa383x8){return handleError(_0xa383x7,_0xa383x8)})};exports[_0x9979[20]]= function(_0xa383x9,_0xa383x7){return OpenchannelMessage[_0x9979[20]]()[_0x9979[18]](function(_0xa383xc){return _0xa383x7[_0x9979[8]](200)[_0x9979[7]](_0xa383xc)})[_0x9979[17]](function(_0xa383x8){return handleError(_0xa383x7,_0xa383x8)})};exports[_0x9979[21]]= function(_0xa383x9,_0xa383x7){return OpenchannelMessage[_0x9979[28]](_0xa383x9[_0x9979[24]][_0x9979[23]],{include:[{model:User,attributes:[_0x9979[23],_0x9979[25],_0x9979[26],_0x9979[27]]}]})[_0x9979[18]](function(_0xa383xd){if(!_0xa383xd){return _0xa383x7[_0x9979[22]](404)};return _0xa383x7[_0x9979[7]](_0xa383xd)})[_0x9979[17]](function(_0xa383x8){return handleError(_0xa383x7,_0xa383x8)})};exports[_0x9979[29]]= function(_0xa383x9,_0xa383x7){_0xa383x9[_0x9979[31]][_0x9979[30]]= _0xa383x9[_0x9979[16]][_0x9979[23]];return OpenchannelMessage[_0x9979[29]](_0xa383x9[_0x9979[31]])[_0x9979[18]](function(_0xa383xd){return _0xa383x7[_0x9979[8]](201)[_0x9979[7]](_0xa383xd)})[_0x9979[17]](function(_0xa383x8){return handleError(_0xa383x7,_0xa383x8)})};exports[_0x9979[32]]= function(_0xa383x9,_0xa383x7){if(_0xa383x9[_0x9979[31]][_0x9979[23]]){delete _0xa383x9[_0x9979[31]][_0x9979[23]]};return OpenchannelMessage[_0x9979[28]](_0xa383x9[_0x9979[24]][_0x9979[23]],{include:[{all:true}]})[_0x9979[18]](function(_0xa383xd){if(!_0xa383xd){return _0xa383x7[_0x9979[22]](404)};var _0xa383xe=_[_0x9979[33]](_0xa383xd,_0xa383x9[_0x9979[31]]);return _0xa383xe[_0x9979[34]]()})[_0x9979[18]](function(_0xa383xe){return _0xa383x7[_0x9979[8]](200)[_0x9979[7]](_0xa383xe)})[_0x9979[17]](function(_0xa383x8){return handleError(_0xa383x7,_0xa383x8)})};exports[_0x9979[35]]= function(_0xa383x9,_0xa383x7){return OpenchannelMessage[_0x9979[28]](_0xa383x9[_0x9979[24]][_0x9979[23]])[_0x9979[18]](function(_0xa383xd){if(!_0xa383xd){return _0xa383x7[_0x9979[22]](404)};return _0xa383xd[_0x9979[35]]()})[_0x9979[18]](function(){return _0xa383x7[_0x9979[22]](204)})[_0x9979[17]](function(_0xa383x8){return handleError(_0xa383x7,_0xa383x8)})};exports[_0x9979[36]]= function(_0xa383x9,_0xa383x7){return OpenchannelMessage[_0x9979[38]]({where:{id:{$in:_0xa383x9[_0x9979[31]][_0x9979[23]]}},attributes:{directory:_0x9979[37]}})[_0x9979[18]](function(_0xa383xd){if(!_0xa383xd){return _0xa383x7[_0x9979[22]](404)};return _0xa383xd[_0x9979[35]]()})[_0x9979[18]](function(){return _0xa383x7[_0x9979[22]](204)})[_0x9979[17]](function(_0xa383x8){return handleError(_0xa383x7,_0xa383x8)})} \ No newline at end of file diff --git a/server/api/openchannel_message/openchannel_message.events.js b/server/api/openchannel_message/openchannel_message.events.js index 5095912..9fa9587 100644 --- a/server/api/openchannel_message/openchannel_message.events.js +++ b/server/api/openchannel_message/openchannel_message.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const OpenchannelMessage = require('../../models').OpenchannelMessage; - -var OpenchannelMessageEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -OpenchannelMessageEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - OpenchannelMessage.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - OpenchannelMessageEvents.emit(event + ':' + doc._id, doc); - OpenchannelMessageEvents.emit(event, doc); - done(null); - } -} - -module.exports = OpenchannelMessageEvents; +var _0xbcef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xbcef[0];const EventEmitter=require(_0xbcef[1]);const OpenchannelMessage=require(_0xbcef[3])[_0xbcef[2]];var OpenchannelMessageEvents= new EventEmitter();OpenchannelMessageEvents[_0xbcef[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xbcef[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xbcef[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xbcef[7]};for(var e in events){var event=events[e];OpenchannelMessage[_0xbcef[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xe857x8,_0xe857x9,_0xe857xa){OpenchannelMessageEvents[_0xbcef[11]](event+ _0xbcef[9]+ _0xe857x8[_0xbcef[10]],_0xe857x8);OpenchannelMessageEvents[_0xbcef[11]](event,_0xe857x8);_0xe857xa(null)}}module[_0xbcef[12]]= OpenchannelMessageEvents \ No newline at end of file diff --git a/server/api/openchannel_message/openchannel_message.socket.js b/server/api/openchannel_message/openchannel_message.socket.js index 0f942a5..9900da3 100644 --- a/server/api/openchannel_message/openchannel_message.socket.js +++ b/server/api/openchannel_message/openchannel_message.socket.js @@ -1,47 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const OpenchannelMessageEvents = require('./openchannel_message.events'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('openchannel_message:' + event, socket); - - OpenchannelMessageEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'openchannel_message:save': - socket.emit(event, doc); - break; - case 'openchannel_message:update': - if (doc.changed('status')) { - socket.emit(event, doc); - } - break; - case 'openchannel_message:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - OpenchannelMessageEvents.removeListener(event, listener); - }; -} +var _0xbe35=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x61\x76\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x75\x70\x64\x61\x74\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xbe35[0];const OpenchannelMessageEvents=require(_0xbe35[1]);var events=[_0xbe35[2],_0xbe35[3],_0xbe35[4]];exports[_0xbe35[5]]= function(_0x7e75x3){for(var _0x7e75x4=0,_0x7e75x5=events[_0xbe35[6]];_0x7e75x4< _0x7e75x5;_0x7e75x4++){var _0x7e75x6=events[_0x7e75x4];var _0x7e75x7=createListener(_0xbe35[7]+ _0x7e75x6,_0x7e75x3);OpenchannelMessageEvents[_0xbe35[8]](_0x7e75x6,_0x7e75x7);_0x7e75x3[_0xbe35[8]](_0xbe35[9],removeListener(_0x7e75x6,_0x7e75x7))}};function createListener(_0x7e75x6,_0x7e75x3){return function(_0x7e75x9){switch(_0x7e75x6){case _0xbe35[11]:_0x7e75x3[_0xbe35[10]](_0x7e75x6,_0x7e75x9);break;case _0xbe35[14]:if(_0x7e75x9[_0xbe35[13]](_0xbe35[12])){_0x7e75x3[_0xbe35[10]](_0x7e75x6,_0x7e75x9)};break;case _0xbe35[15]:_0x7e75x3[_0xbe35[10]](_0x7e75x6,_0x7e75x9);break;default:}}}function removeListener(_0x7e75x6,_0x7e75x7){return function(){OpenchannelMessageEvents[_0xbe35[16]](_0x7e75x6,_0x7e75x7)}} \ No newline at end of file diff --git a/server/api/openchannel_queue/index.js b/server/api/openchannel_queue/index.js index a85e598..f79ee95 100644 --- a/server/api/openchannel_queue/index.js +++ b/server/api/openchannel_queue/index.js @@ -1,22 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./openchannel_queue.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -// router.get('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.index); -router.get('/', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.show); -router.get('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.showAgents); -router.post('/', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.create); -router.post('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.addAgents); -router.put('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.update); -router.patch('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.update); -router.delete('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.destroy); -router.delete('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.removeAgents); -router.delete('/', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('admin'), controller.bulkDestroy); - -module.exports = router; +var _0x3f16=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x68\x61\x73\x52\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x3f16[0];var express=require(_0x3f16[1]);var auth=require(_0x3f16[2]);var controller=require(_0x3f16[3]);var license=require(_0x3f16[4]);var router=express.Router();router[_0x3f16[12]](_0x3f16[5],license[_0x3f16[6]](),auth[_0x3f16[7]](),license[_0x3f16[8]](),auth[_0x3f16[10]]([20],[_0x3f16[9]]),controller[_0x3f16[11]]);router[_0x3f16[12]](_0x3f16[13],license[_0x3f16[6]](),auth[_0x3f16[7]](),license[_0x3f16[8]](),auth[_0x3f16[10]]([20],[_0x3f16[9]]),controller[_0x3f16[14]]);router[_0x3f16[12]](_0x3f16[15],license[_0x3f16[6]](),auth[_0x3f16[7]](),license[_0x3f16[8]](),auth[_0x3f16[10]]([20],[_0x3f16[9]]),controller[_0x3f16[16]]);router[_0x3f16[19]](_0x3f16[5],license[_0x3f16[6]](),auth[_0x3f16[7]](),license[_0x3f16[8]](),auth[_0x3f16[17]](_0x3f16[9]),controller[_0x3f16[18]]);router[_0x3f16[19]](_0x3f16[15],license[_0x3f16[6]](),auth[_0x3f16[7]](),license[_0x3f16[8]](),auth[_0x3f16[17]](_0x3f16[9]),controller[_0x3f16[20]]);router[_0x3f16[22]](_0x3f16[13],license[_0x3f16[6]](),auth[_0x3f16[7]](),license[_0x3f16[8]](),auth[_0x3f16[17]](_0x3f16[9]),controller[_0x3f16[21]]);router[_0x3f16[23]](_0x3f16[13],license[_0x3f16[6]](),auth[_0x3f16[7]](),license[_0x3f16[8]](),auth[_0x3f16[17]](_0x3f16[9]),controller[_0x3f16[21]]);router[_0x3f16[25]](_0x3f16[13],license[_0x3f16[6]](),auth[_0x3f16[7]](),license[_0x3f16[8]](),auth[_0x3f16[17]](_0x3f16[9]),controller[_0x3f16[24]]);router[_0x3f16[25]](_0x3f16[15],license[_0x3f16[6]](),auth[_0x3f16[7]](),license[_0x3f16[8]](),auth[_0x3f16[17]](_0x3f16[9]),controller[_0x3f16[26]]);router[_0x3f16[25]](_0x3f16[5],license[_0x3f16[6]](),auth[_0x3f16[7]](),license[_0x3f16[8]](),auth[_0x3f16[17]](_0x3f16[9]),controller[_0x3f16[27]]);module[_0x3f16[28]]= router \ No newline at end of file diff --git a/server/api/openchannel_queue/openchannel_queue.controller.js b/server/api/openchannel_queue/openchannel_queue.controller.js index dde6c2b..78d4e54 100644 --- a/server/api/openchannel_queue/openchannel_queue.controller.js +++ b/server/api/openchannel_queue/openchannel_queue.controller.js @@ -1,246 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/openchannel/queues -> index - * POST /api/openchannel/queues -> create - * GET /api/openchannel/queues/:id -> show - * PUT /api/openchannel/queues/:id -> update - * DELETE /api/openchannel/queues/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var OpenchannelQueue = require('../../models').OpenchannelQueue; -var User = require('../../models').User; -var sequelize = require('../../models').sequelize; -var UserHasOpenchannelQueue = require('../../models').UserHasOpenchannelQueue; - -function handleError(res, err) { - return res.status(500).send(err); -} - - -// Gets a list of openchannelQueues -exports.index = function(req, res) { - - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getOpenchannelQueuesIdByUser(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - - default: - return OpenchannelQueue - .scope('default') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } - - - -} - -// Gets a single OpenchannelQueue from the DB -exports.show = function(req, res) { - return OpenchannelQueue - .scope('default') - .findById(req.params.id) - .then(function(Queue) { - if (!Queue) { - return res.sendStatus(404); - } - return res.send(Queue); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.showAgents = function(req, res) { - return OpenchannelQueue - .findById(req.params.id) - .then(function(queue) { - if (!queue) { - return res.sendStatus(404); - } - return queue - .getUsers({ - where: { - role: 'agent' - }, - attributes: ['id', 'name', 'fullname', 'email'] - }); - }) - .then(function(agents) { - // console.log(agents); - return res.status(200).send({ - rows: agents, - count: agents.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a new OpenchannelQueue in the DB -exports.create = function(req, res) { - var _openchannelQueue; - - return OpenchannelQueue - .create(req.body) - .then(function(openchannelQueue) { - _openchannelQueue = openchannelQueue; - - if (req.body.agents) { - return _openchannelQueue - .addUsers(req.body.agents, { - penalty: req.body.penalty || 0, - queue: _openchannelQueue.name - }); - } - }) - .then(function() { - return res.status(201).send(_openchannelQueue); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Updates an existing OpenchannelQueue in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return OpenchannelQueue - .findById(req.params.id) - .then(function(Queue) { - if (!Queue) { - return res.sendStatus(404); - } - var updated = _.merge(Queue, req.body); - return updated - .save(); - }) - .then(function(Queue) { - return res.status(200).send(Queue); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); - } - // Updates an existing OpenchannelQueue in the DB. -exports.addAgents = function(req, res, next) { - return OpenchannelQueue - .findById(req.params.id) - .then(function(Queue) { - if (!Queue) { - return res.sendStatus(404); - } - var userHasOpenchannelQueues = _.map(req.body.agents, function(agent) { - return { - UserId: agent, - penalty: req.body.penalty, - OpenchannelQueueId: Queue.id, - queue: Queue.name - }; - }); - - return UserHasOpenchannelQueue - .bulkCreate(userHasOpenchannelQueues, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.removeAgents = function(req, res) { - return OpenchannelQueue - .findById(req.params.id) - .then(function(Queue) { - if (Queue) { - return Queue - .removeUsers(req.query.agents, { - individualHooks: true - }); - } else { - throw new Error('Openchannel Queue not found'); - } - }) - .then(function() { - return res.sendStatus(202); - }) - .catch(function(err) { - return handleError(res, err); - }); - -}; - -// Deletes a OpenchannelQueue from the DB -exports.destroy = function(req, res) { - var _OpenchannelQueue; - return OpenchannelQueue - .findById(req.params.id) - .then(function(Queue) { - _OpenchannelQueue = Queue; - if (!Queue) { - return res.sendStatus(404); - } - return Queue - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(sequelize.ForeignKeyConstraintError, function(err) { - return Util.errorManager.handleForeignKeyConstraintError(res, 'queue', _OpenchannelQueue.name, err); - }) - .catch(function(err) { - console.error('err', err); - return handleError(res, err); - }); -} -exports.bulkDestroy = function(req, res) { - return OpenchannelQueue - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; +var _0x77aa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x71\x75\x65\x75\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x77aa[0];var _=require(_0x77aa[1]);var Util=require(_0x77aa[2]);var OpenchannelQueue=require(_0x77aa[4])[_0x77aa[3]];var User=require(_0x77aa[4])[_0x77aa[5]];var sequelize=require(_0x77aa[4])[_0x77aa[6]];var UserHasOpenchannelQueue=require(_0x77aa[4])[_0x77aa[7]];function handleError(_0x7053x8,_0x7053x9){return _0x7053x8[_0x77aa[9]](500)[_0x77aa[8]](_0x7053x9)}exports[_0x77aa[10]]= function(_0x7053xa,_0x7053x8){switch(_0x7053xa[_0x77aa[16]][_0x77aa[23]]){case _0x77aa[16]:return User[_0x77aa[17]](_0x7053xa[_0x77aa[16]][_0x77aa[15]],{attributes:[_0x77aa[15]]})[_0x77aa[12]](Util[_0x77aa[14]](_0x7053xa[_0x77aa[13]]))[_0x77aa[12]](function(_0x7053xb){_0x7053x8[_0x77aa[9]](200)[_0x77aa[8]](_0x7053xb)})[_0x77aa[11]](function(_0x7053x9){return handleError(_0x7053x8,_0x7053x9)});default:return OpenchannelQueue[_0x77aa[22]](_0x77aa[21])[_0x77aa[20]](_[_0x77aa[19]](Util[_0x77aa[18]](_0x7053xa[_0x77aa[13]]),{distinct:true}))[_0x77aa[12]](function(_0x7053xb){_0x7053x8[_0x77aa[9]](200)[_0x77aa[8]](_0x7053xb)})[_0x77aa[11]](function(_0x7053x9){return handleError(_0x7053x8,_0x7053x9)})}};exports[_0x77aa[24]]= function(_0x7053xa,_0x7053x8){return OpenchannelQueue[_0x77aa[22]](_0x77aa[21])[_0x77aa[17]](_0x7053xa[_0x77aa[26]][_0x77aa[15]])[_0x77aa[12]](function(_0x7053xc){if(!_0x7053xc){return _0x7053x8[_0x77aa[25]](404)};return _0x7053x8[_0x77aa[8]](_0x7053xc)})[_0x77aa[11]](function(_0x7053x9){return handleError(_0x7053x8,_0x7053x9)})};exports[_0x77aa[27]]= function(_0x7053xa,_0x7053x8){return OpenchannelQueue[_0x77aa[17]](_0x7053xa[_0x77aa[26]][_0x77aa[15]])[_0x77aa[12]](function(_0x7053xe){if(!_0x7053xe){return _0x7053x8[_0x77aa[25]](404)};return _0x7053xe[_0x77aa[33]]({where:{role:_0x77aa[29]},attributes:[_0x77aa[15],_0x77aa[30],_0x77aa[31],_0x77aa[32]]})})[_0x77aa[12]](function(_0x7053xd){return _0x7053x8[_0x77aa[9]](200)[_0x77aa[8]]({rows:_0x7053xd,count:_0x7053xd[_0x77aa[28]]})})[_0x77aa[11]](function(_0x7053x9){return handleError(_0x7053x8,_0x7053x9)})};exports[_0x77aa[34]]= function(_0x7053xa,_0x7053x8){var _0x7053xf;return OpenchannelQueue[_0x77aa[34]](_0x7053xa[_0x77aa[38]])[_0x77aa[12]](function(_0x7053x10){_0x7053xf= _0x7053x10;if(_0x7053xa[_0x77aa[38]][_0x77aa[37]]){return _0x7053xf[_0x77aa[40]](_0x7053xa[_0x77aa[38]][_0x77aa[37]],{penalty:_0x7053xa[_0x77aa[38]][_0x77aa[39]]|| 0,queue:_0x7053xf[_0x77aa[30]]})}})[_0x77aa[12]](function(){return _0x7053x8[_0x77aa[9]](201)[_0x77aa[8]](_0x7053xf)})[_0x77aa[11]](sequelize.UniqueConstraintError,function(_0x7053x9){return Util[_0x77aa[36]][_0x77aa[35]](_0x7053x8,_0x7053x9)})[_0x77aa[11]](function(_0x7053x9){return handleError(_0x7053x8,_0x7053x9)})};exports[_0x77aa[41]]= function(_0x7053xa,_0x7053x8){if(_0x7053xa[_0x77aa[38]][_0x77aa[15]]){delete _0x7053xa[_0x77aa[38]][_0x77aa[15]]};return OpenchannelQueue[_0x77aa[17]](_0x7053xa[_0x77aa[26]][_0x77aa[15]])[_0x77aa[12]](function(_0x7053xc){if(!_0x7053xc){return _0x7053x8[_0x77aa[25]](404)};var _0x7053x11=_[_0x77aa[19]](_0x7053xc,_0x7053xa[_0x77aa[38]]);return _0x7053x11[_0x77aa[42]]()})[_0x77aa[12]](function(_0x7053xc){return _0x7053x8[_0x77aa[9]](200)[_0x77aa[8]](_0x7053xc)})[_0x77aa[11]](sequelize.UniqueConstraintError,function(_0x7053x9){return Util[_0x77aa[36]][_0x77aa[35]](_0x7053x8,_0x7053x9)})[_0x77aa[11]](function(_0x7053x9){return handleError(_0x7053x8,_0x7053x9)})};exports[_0x77aa[43]]= function(_0x7053xa,_0x7053x8,_0x7053x12){return OpenchannelQueue[_0x77aa[17]](_0x7053xa[_0x77aa[26]][_0x77aa[15]])[_0x77aa[12]](function(_0x7053xc){if(!_0x7053xc){return _0x7053x8[_0x77aa[25]](404)};var _0x7053x13=_[_0x77aa[44]](_0x7053xa[_0x77aa[38]][_0x77aa[37]],function(_0x7053x14){return {UserId:_0x7053x14,penalty:_0x7053xa[_0x77aa[38]][_0x77aa[39]],OpenchannelQueueId:_0x7053xc[_0x77aa[15]],queue:_0x7053xc[_0x77aa[30]]}});return UserHasOpenchannelQueue[_0x77aa[45]](_0x7053x13,{individualHooks:true})})[_0x77aa[12]](function(){return _0x7053x8[_0x77aa[25]](200)})[_0x77aa[11]](function(_0x7053x9){return handleError(_0x7053x8,_0x7053x9)})};exports[_0x77aa[46]]= function(_0x7053xa,_0x7053x8){return OpenchannelQueue[_0x77aa[17]](_0x7053xa[_0x77aa[26]][_0x77aa[15]])[_0x77aa[12]](function(_0x7053xc){if(_0x7053xc){return _0x7053xc[_0x77aa[47]](_0x7053xa[_0x77aa[13]][_0x77aa[37]],{individualHooks:true})}else {throw new Error(_0x77aa[48])}})[_0x77aa[12]](function(){return _0x7053x8[_0x77aa[25]](202)})[_0x77aa[11]](function(_0x7053x9){return handleError(_0x7053x8,_0x7053x9)})};exports[_0x77aa[49]]= function(_0x7053xa,_0x7053x8){var _0x7053x15;return OpenchannelQueue[_0x77aa[17]](_0x7053xa[_0x77aa[26]][_0x77aa[15]])[_0x77aa[12]](function(_0x7053xc){_0x7053x15= _0x7053xc;if(!_0x7053xc){return _0x7053x8[_0x77aa[25]](404)};return _0x7053xc[_0x77aa[49]]()})[_0x77aa[12]](function(){return _0x7053x8[_0x77aa[25]](204)})[_0x77aa[11]](sequelize.ForeignKeyConstraintError,function(_0x7053x9){return Util[_0x77aa[36]][_0x77aa[53]](_0x7053x8,_0x77aa[52],_0x7053x15[_0x77aa[30]],_0x7053x9)})[_0x77aa[11]](function(_0x7053x9){console[_0x77aa[51]](_0x77aa[50],_0x7053x9);return handleError(_0x7053x8,_0x7053x9)})};exports[_0x77aa[54]]= function(_0x7053xa,_0x7053x8){return OpenchannelQueue[_0x77aa[49]]({where:{id:_0x7053xa[_0x77aa[13]][_0x77aa[55]]},individualHooks:true})[_0x77aa[12]](function(){return _0x7053x8[_0x77aa[25]](204)})[_0x77aa[11]](function(_0x7053x9){return handleError(_0x7053x8,_0x7053x9)})} \ No newline at end of file diff --git a/server/api/openchannel_queue/openchannel_queue.events.js b/server/api/openchannel_queue/openchannel_queue.events.js index a1ca116..5bda1da 100644 --- a/server/api/openchannel_queue/openchannel_queue.events.js +++ b/server/api/openchannel_queue/openchannel_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const OpenchannelQueue = require('../../models').OpenchannelQueue; - -var OpenchannelQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -OpenchannelQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - OpenchannelQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - OpenchannelQueueEvents.emit(event + ':' + doc._id, doc); - OpenchannelQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = OpenchannelQueueEvents; +var _0x9a2a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9a2a[0];const EventEmitter=require(_0x9a2a[1]);const OpenchannelQueue=require(_0x9a2a[3])[_0x9a2a[2]];var OpenchannelQueueEvents= new EventEmitter();OpenchannelQueueEvents[_0x9a2a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9a2a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9a2a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9a2a[6]};for(var e in events){var event=events[e];OpenchannelQueue[_0x9a2a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc0dfx8,_0xc0dfx9,_0xc0dfxa){OpenchannelQueueEvents[_0x9a2a[10]](event+ _0x9a2a[8]+ _0xc0dfx8[_0x9a2a[9]],_0xc0dfx8);OpenchannelQueueEvents[_0x9a2a[10]](event,_0xc0dfx8);_0xc0dfxa(null)}}module[_0x9a2a[11]]= OpenchannelQueueEvents \ No newline at end of file diff --git a/server/api/openchannel_queue/openchannel_queue.socket.js b/server/api/openchannel_queue/openchannel_queue.socket.js index 2ef4161..a9cfbbf 100644 --- a/server/api/openchannel_queue/openchannel_queue.socket.js +++ b/server/api/openchannel_queue/openchannel_queue.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const OpenchannelQueueEvents = require('./openchannel_queue.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('openchannel_queue:' + event, socket); - - OpenchannelQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - OpenchannelQueueEvents.removeListener(event, listener); - }; -} +var _0xab2f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xab2f[0];const OpenchannelQueueEvents=require(_0xab2f[1]);var events=[_0xab2f[2],_0xab2f[3]];exports[_0xab2f[4]]= function(_0x49c5x3){for(var _0x49c5x4=0,_0x49c5x5=events[_0xab2f[5]];_0x49c5x4< _0x49c5x5;_0x49c5x4++){var _0x49c5x6=events[_0x49c5x4];var _0x49c5x7=createListener(_0xab2f[6]+ _0x49c5x6,_0x49c5x3);OpenchannelQueueEvents[_0xab2f[7]](_0x49c5x6,_0x49c5x7);_0x49c5x3[_0xab2f[7]](_0xab2f[8],removeListener(_0x49c5x6,_0x49c5x7))}};function createListener(_0x49c5x6,_0x49c5x3){return function(_0x49c5x9){_0x49c5x3[_0xab2f[9]](_0x49c5x6,_0x49c5x9)}}function removeListener(_0x49c5x6,_0x49c5x7){return function(){OpenchannelQueueEvents[_0xab2f[10]](_0x49c5x6,_0x49c5x7)}} \ No newline at end of file diff --git a/server/api/openchannel_room/index.js b/server/api/openchannel_room/index.js index 3466839..9485e52 100644 --- a/server/api/openchannel_room/index.js +++ b/server/api/openchannel_room/index.js @@ -1,25 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./openchannel_room.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); -router.get('/', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.index); -router.get('/pending', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([20, 17], ['admin']), controller.pending); -router.get('/new', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([20, 17], ['admin']), controller.new); -router.get('/open', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([20, 17], ['admin']), controller.open); -router.get('/closed', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([20, 17], ['admin']), controller.closed); -router.get('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.show); -router.get('/describe', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.describe); -router.get('/:id/agents', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.showAgents); -router.get('/messages/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.getRoomByMessage); -router.post('/', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.create); -router.post('/:id/messages', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.createMessage); -router.put('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.update); -router.put('/:id/agents', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.updateAgents); -router.patch('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin', 'agent']), controller.updatePatch); -router.delete('/:id', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.destroy); -router.delete('/', license.isValidDate(), license.hasOpenchannel(), auth.isAuthenticated(), auth.hasModule([20], ['admin']), controller.bulkDestroy); -module.exports = router; +var _0xc82e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x70\x65\x6E\x64\x69\x6E\x67","\x68\x61\x73\x53\x6D\x73","\x70\x65\x6E\x64\x69\x6E\x67","\x2F\x6E\x65\x77","\x6E\x65\x77","\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E","\x2F\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xc82e[0];var express=require(_0xc82e[1]);var auth=require(_0xc82e[2]);var controller=require(_0xc82e[3]);var license=require(_0xc82e[4]);var router=express.Router();router[_0xc82e[13]](_0xc82e[5],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9],_0xc82e[10]]),controller[_0xc82e[12]]);router[_0xc82e[13]](_0xc82e[14],auth[_0xc82e[8]](),license[_0xc82e[6]](),license[_0xc82e[15]](),auth[_0xc82e[11]]([20,17],[_0xc82e[9]]),controller[_0xc82e[16]]);router[_0xc82e[13]](_0xc82e[17],auth[_0xc82e[8]](),license[_0xc82e[6]](),license[_0xc82e[15]](),auth[_0xc82e[11]]([20,17],[_0xc82e[9]]),controller[_0xc82e[18]]);router[_0xc82e[13]](_0xc82e[19],auth[_0xc82e[8]](),license[_0xc82e[6]](),license[_0xc82e[15]](),auth[_0xc82e[11]]([20,17],[_0xc82e[9]]),controller[_0xc82e[20]]);router[_0xc82e[13]](_0xc82e[21],auth[_0xc82e[8]](),license[_0xc82e[6]](),license[_0xc82e[15]](),auth[_0xc82e[11]]([20,17],[_0xc82e[9]]),controller[_0xc82e[22]]);router[_0xc82e[13]](_0xc82e[23],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9],_0xc82e[10]]),controller[_0xc82e[24]]);router[_0xc82e[13]](_0xc82e[25],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9]]),controller[_0xc82e[26]]);router[_0xc82e[13]](_0xc82e[27],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9],_0xc82e[10]]),controller[_0xc82e[28]]);router[_0xc82e[13]](_0xc82e[29],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9],_0xc82e[10]]),controller[_0xc82e[30]]);router[_0xc82e[32]](_0xc82e[5],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9]]),controller[_0xc82e[31]]);router[_0xc82e[32]](_0xc82e[33],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9]]),controller[_0xc82e[34]]);router[_0xc82e[36]](_0xc82e[23],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9],_0xc82e[10]]),controller[_0xc82e[35]]);router[_0xc82e[36]](_0xc82e[27],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9],_0xc82e[10]]),controller[_0xc82e[37]]);router[_0xc82e[39]](_0xc82e[23],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9],_0xc82e[10]]),controller[_0xc82e[38]]);router[_0xc82e[41]](_0xc82e[23],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9]]),controller[_0xc82e[40]]);router[_0xc82e[41]](_0xc82e[5],license[_0xc82e[6]](),license[_0xc82e[7]](),auth[_0xc82e[8]](),auth[_0xc82e[11]]([20],[_0xc82e[9]]),controller[_0xc82e[42]]);module[_0xc82e[43]]= router \ No newline at end of file diff --git a/server/api/openchannel_room/openchannel_room.controller.js b/server/api/openchannel_room/openchannel_room.controller.js index 05ee965..18345da 100644 --- a/server/api/openchannel_room/openchannel_room.controller.js +++ b/server/api/openchannel_room/openchannel_room.controller.js @@ -1,399 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/openchannel/rooms -> index - * POST /api/openchannel/rooms -> create - * GET /api/openchannel/rooms/:id -> show - * PUT /api/openchannel/rooms/:id -> update - * DELETE /api/openchannel/rooms/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); -var moment = require('moment'); - -var OpenchannelRoom = require('../../models').OpenchannelRoom; -var OpenchannelMessage = require('../../models').OpenchannelMessage; -var OpenchannelAccount = require('../../models').OpenchannelAccount; -var OpenchannelQueue = require('../../models').OpenchannelQueue; -var OpenchannelApplication = require('../../models').OpenchannelApplication; -var User = require('../../models').User; - - -function handleError(res, err) { - return res.status(500).send(err); -} - - - -// Gets a list of OpenchannelRooms -exports.index = function(req, res) { - switch (req.user.role) { - case 'agent': - return OpenchannelRoom - .scope('default', { - method: ['agent', req.user.id] - }) - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - - default: - return OpenchannelRoom - .scope('default') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } - -} - -// Get list of fields -exports.describe = function(req, res) { - return OpenchannelRoom - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getOpenchannelQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getOpenchannelQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - return { - include: { - model: OpenchannelAccount, - include: { - model: OpenchannelApplication, - include: { - model: OpenchannelQueue, - where: { - id: _.map(userQueues, 'id') - } - } - } - } - }; - }); - default: - return {}; - } - } -} - -exports.pending = function(req, res) { - return Promise - .all([]) - .then(getOpenchannelQueues(req.user)) - .then(function(condition) { - return OpenchannelRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'PENDING', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.new = function(req, res) { - return Promise - .all([]) - .then(getOpenchannelQueues(req.user)) - .then(function(condition) { - return OpenchannelRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'NEW', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.open = function(req, res) { - return Promise - .all([]) - .then(getOpenchannelQueues(req.user)) - .then(function(condition) { - return OpenchannelRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'OPEN', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.closed = function(req, res) { - return Promise - .all([]) - .then(getOpenchannelQueues(req.user)) - .then(function(condition) { - return OpenchannelRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'CLOSED', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - - - -// Gets a single OpenchannelRoom from the DB -exports.show = function(req, res) { - return OpenchannelRoom - .scope('default') - .findById(req.params.id) - .then(function(Room) { - if (!Room) { - return res.sendStatus(404); - } - return res.send(Room); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -exports.showAgents = function(req, res, next) { - return OpenchannelRoom - .findById(req.params.id) - .then(function(Room) { - if (!Room) { - return res.sendStatus(404); - } - return Room - .getUsers({ - attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal'] - }); - }) - .then(function(users) { - return res.send(users); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getRoomByMessage = function(req, res, next) { - return OpenchannelMessage - .findById(req.params.id) - .then(function(Message) { - return Message - .getOpenchannelRoom({ - include: [{ - model: OpenchannelAccount - }, { - model: OpenchannelMessage, - include: [{ - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }); - }) - .then(function(Room) { - return res.send(Room); - }) - .catch(function(err) { - console.log('err', err); - return handleError(res, err); - }); -}; -// Creates a new OpenchannelRoom in the DB -exports.create = function(req, res) { - - return OpenchannelRoom - .create(req.body) - .then(function(Message) { - return res.status(201).send(Message); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - - -// Creates a new Message in the DB. -exports.createMessage = function(req, res, next) { - req.body.UserId = req.user.id; - req.body.OpenchannelRoomId = req.params.id; - return OpenchannelMessage - .create(req.body) - .then(function(Message) { - return res.status(201).send(Message); - }).catch(function(err) { - return handleError(res, err); - }); -}; -// Updates an existing OpenchannelRoom in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return OpenchannelRoom - .findById(req.params.id) - .then(function(Room) { - if (!Room) { - return res.sendStatus(404); - } - - var updated = _.merge(Room, req.body); - - return updated - .save(); - }) - .then(function(Room) { - return res.status(200).send(Room); - }) - .catch(function(err) { - return handleError(res, err); - }); -} -exports.updateAgents = function(req, res, next) { - return OpenchannelRoom - .findById(req.params.id) - .then(function(Room) { - if (!Room) { - return res.sendStatus(404); - } - - return Room - .setUsers(req.body.agents, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a OpenchannelRoom from the DB -exports.destroy = function(req, res) { - return OpenchannelRoom - .findById(req.params.id) - .then(function(Room) { - if (!Room) { - return res.sendStatus(404); - } - return Room.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.bulkDestroy = function(req, res) { - return OpenchannelRoom - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -exports.updatePatch = function(req, res, next) { - - var _options = { - where: { - id: req.params.id.split(',') - }, - user: req.user, - individualHooks: true - }; - return OpenchannelRoom - .update(req.body, _options) - .then(function(Rooms) { - if (!Rooms) { - return res.sendStatus(404); - } - return Rooms - }) - .then(function(Rooms) { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; +var _0x3f64=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x61\x67\x65\x6E\x74","\x69\x64","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x6D\x61\x70","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x70\x65\x6E\x64\x69\x6E\x67","\x6C\x6F\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x65\x72\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74"];_0x3f64[0];var _=require(_0x3f64[1]);var Util=require(_0x3f64[2]);var moment=require(_0x3f64[3]);var OpenchannelRoom=require(_0x3f64[5])[_0x3f64[4]];var OpenchannelMessage=require(_0x3f64[5])[_0x3f64[6]];var OpenchannelAccount=require(_0x3f64[5])[_0x3f64[7]];var OpenchannelQueue=require(_0x3f64[5])[_0x3f64[8]];var OpenchannelApplication=require(_0x3f64[5])[_0x3f64[9]];var User=require(_0x3f64[5])[_0x3f64[10]];function handleError(_0x862bxb,_0x862bxc){return _0x862bxb[_0x3f64[12]](500)[_0x3f64[11]](_0x862bxc)}exports[_0x3f64[13]]= function(_0x862bxd,_0x862bxb){switch(_0x862bxd[_0x3f64[22]][_0x3f64[24]]){case _0x3f64[20]:return OpenchannelRoom[_0x3f64[23]](_0x3f64[19],{method:[_0x3f64[20],_0x862bxd[_0x3f64[22]][_0x3f64[21]]]})[_0x3f64[18]](Util[_0x3f64[17]](_0x862bxd[_0x3f64[16]]))[_0x3f64[15]](function(_0x862bxe){return _0x862bxb[_0x3f64[12]](200)[_0x3f64[11]](_0x862bxe)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)});default:return OpenchannelRoom[_0x3f64[23]](_0x3f64[19])[_0x3f64[18]](Util[_0x3f64[17]](_0x862bxd[_0x3f64[16]]))[_0x3f64[15]](function(_0x862bxe){return _0x862bxb[_0x3f64[12]](200)[_0x3f64[11]](_0x862bxe)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)})}};exports[_0x3f64[25]]= function(_0x862bxd,_0x862bxb){return OpenchannelRoom[_0x3f64[25]]()[_0x3f64[15]](function(_0x862bxf){return _0x862bxb[_0x3f64[12]](200)[_0x3f64[11]](_0x862bxf)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)})};function getOpenchannelQueues(_0x862bx11){return function(){switch(_0x862bx11[_0x3f64[24]]){case _0x3f64[22]:return User[_0x3f64[28]](_0x862bx11[_0x3f64[21]],{attributes:[_0x3f64[21]]})[_0x3f64[15]](Util[_0x3f64[27]]({},{attributes:[_0x3f64[21]],include:[{raw:true,model:User,attributes:[_0x3f64[21]]}]}))[_0x3f64[15]](function(_0x862bx12){return {include:{model:OpenchannelAccount,include:{model:OpenchannelApplication,include:{model:OpenchannelQueue,where:{id:_[_0x3f64[26]](_0x862bx12,_0x3f64[21])}}}}}});default:return {}}}}exports[_0x3f64[29]]= function(_0x862bxd,_0x862bxb){return Promise[_0x3f64[36]]([])[_0x3f64[15]](getOpenchannelQueues(_0x862bxd[_0x3f64[22]]))[_0x3f64[15]](function(_0x862bx14){return OpenchannelRoom[_0x3f64[35]](_[_0x3f64[34]](Util[_0x3f64[17]](_0x862bxd[_0x3f64[16]],{status:_0x3f64[31],updatedAt:{$gte:moment()[_0x3f64[33]](_0x3f64[32])}}),_0x862bx14))})[_0x3f64[15]](function(_0x862bx13){return _0x862bxb[_0x3f64[12]](200)[_0x3f64[11]]({value:_0x862bx13})})[_0x3f64[14]](function(_0x862bxc){console[_0x3f64[30]](_0x862bxc);return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[37]]= function(_0x862bxd,_0x862bxb){return Promise[_0x3f64[36]]([])[_0x3f64[15]](getOpenchannelQueues(_0x862bxd[_0x3f64[22]]))[_0x3f64[15]](function(_0x862bx14){return OpenchannelRoom[_0x3f64[35]](_[_0x3f64[34]](Util[_0x3f64[17]](_0x862bxd[_0x3f64[16]],{status:_0x3f64[38],updatedAt:{$gte:moment()[_0x3f64[33]](_0x3f64[32])}}),_0x862bx14))})[_0x3f64[15]](function(_0x862bx13){return _0x862bxb[_0x3f64[12]](200)[_0x3f64[11]]({value:_0x862bx13})})[_0x3f64[14]](function(_0x862bxc){console[_0x3f64[30]](_0x862bxc);return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[39]]= function(_0x862bxd,_0x862bxb){return Promise[_0x3f64[36]]([])[_0x3f64[15]](getOpenchannelQueues(_0x862bxd[_0x3f64[22]]))[_0x3f64[15]](function(_0x862bx14){return OpenchannelRoom[_0x3f64[35]](_[_0x3f64[34]](Util[_0x3f64[17]](_0x862bxd[_0x3f64[16]],{status:_0x3f64[40],updatedAt:{$gte:moment()[_0x3f64[33]](_0x3f64[32])}}),_0x862bx14))})[_0x3f64[15]](function(_0x862bx13){return _0x862bxb[_0x3f64[12]](200)[_0x3f64[11]]({value:_0x862bx13})})[_0x3f64[14]](function(_0x862bxc){console[_0x3f64[30]](_0x862bxc);return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[41]]= function(_0x862bxd,_0x862bxb){return Promise[_0x3f64[36]]([])[_0x3f64[15]](getOpenchannelQueues(_0x862bxd[_0x3f64[22]]))[_0x3f64[15]](function(_0x862bx14){return OpenchannelRoom[_0x3f64[35]](_[_0x3f64[34]](Util[_0x3f64[17]](_0x862bxd[_0x3f64[16]],{status:_0x3f64[42],updatedAt:{$gte:moment()[_0x3f64[33]](_0x3f64[32])}}),_0x862bx14))})[_0x3f64[15]](function(_0x862bx13){return _0x862bxb[_0x3f64[12]](200)[_0x3f64[11]]({value:_0x862bx13})})[_0x3f64[14]](function(_0x862bxc){console[_0x3f64[30]](_0x862bxc);return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[43]]= function(_0x862bxd,_0x862bxb){return OpenchannelRoom[_0x3f64[23]](_0x3f64[19])[_0x3f64[28]](_0x862bxd[_0x3f64[45]][_0x3f64[21]])[_0x3f64[15]](function(_0x862bx15){if(!_0x862bx15){return _0x862bxb[_0x3f64[44]](404)};return _0x862bxb[_0x3f64[11]](_0x862bx15)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[46]]= function(_0x862bxd,_0x862bxb,_0x862bx16){return OpenchannelRoom[_0x3f64[28]](_0x862bxd[_0x3f64[45]][_0x3f64[21]])[_0x3f64[15]](function(_0x862bx15){if(!_0x862bx15){return _0x862bxb[_0x3f64[44]](404)};return _0x862bx15[_0x3f64[51]]({attributes:[_0x3f64[21],_0x3f64[47],_0x3f64[48],_0x3f64[49],_0x3f64[24],_0x3f64[50]]})})[_0x3f64[15]](function(_0x862bx17){return _0x862bxb[_0x3f64[11]](_0x862bx17)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[52]]= function(_0x862bxd,_0x862bxb,_0x862bx16){return OpenchannelMessage[_0x3f64[28]](_0x862bxd[_0x3f64[45]][_0x3f64[21]])[_0x3f64[15]](function(_0x862bx18){return _0x862bx18[_0x3f64[54]]({include:[{model:OpenchannelAccount},{model:OpenchannelMessage,include:[{model:User,attributes:[_0x3f64[21],_0x3f64[47],_0x3f64[48],_0x3f64[49]]}]},{model:User,attributes:[_0x3f64[21],_0x3f64[47],_0x3f64[48],_0x3f64[49]]}]})})[_0x3f64[15]](function(_0x862bx15){return _0x862bxb[_0x3f64[11]](_0x862bx15)})[_0x3f64[14]](function(_0x862bxc){console[_0x3f64[30]](_0x3f64[53],_0x862bxc);return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[55]]= function(_0x862bxd,_0x862bxb){return OpenchannelRoom[_0x3f64[55]](_0x862bxd[_0x3f64[56]])[_0x3f64[15]](function(_0x862bx18){return _0x862bxb[_0x3f64[12]](201)[_0x3f64[11]](_0x862bx18)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[57]]= function(_0x862bxd,_0x862bxb,_0x862bx16){_0x862bxd[_0x3f64[56]][_0x3f64[58]]= _0x862bxd[_0x3f64[22]][_0x3f64[21]];_0x862bxd[_0x3f64[56]][_0x3f64[59]]= _0x862bxd[_0x3f64[45]][_0x3f64[21]];return OpenchannelMessage[_0x3f64[55]](_0x862bxd[_0x3f64[56]])[_0x3f64[15]](function(_0x862bx18){return _0x862bxb[_0x3f64[12]](201)[_0x3f64[11]](_0x862bx18)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[60]]= function(_0x862bxd,_0x862bxb){if(_0x862bxd[_0x3f64[56]][_0x3f64[21]]){delete _0x862bxd[_0x3f64[56]][_0x3f64[21]]};return OpenchannelRoom[_0x3f64[28]](_0x862bxd[_0x3f64[45]][_0x3f64[21]])[_0x3f64[15]](function(_0x862bx15){if(!_0x862bx15){return _0x862bxb[_0x3f64[44]](404)};var _0x862bx19=_[_0x3f64[34]](_0x862bx15,_0x862bxd[_0x3f64[56]]);return _0x862bx19[_0x3f64[61]]()})[_0x3f64[15]](function(_0x862bx15){return _0x862bxb[_0x3f64[12]](200)[_0x3f64[11]](_0x862bx15)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[62]]= function(_0x862bxd,_0x862bxb,_0x862bx16){return OpenchannelRoom[_0x3f64[28]](_0x862bxd[_0x3f64[45]][_0x3f64[21]])[_0x3f64[15]](function(_0x862bx15){if(!_0x862bx15){return _0x862bxb[_0x3f64[44]](404)};return _0x862bx15[_0x3f64[64]](_0x862bxd[_0x3f64[56]][_0x3f64[63]],{individualHooks:true})})[_0x3f64[15]](function(){return _0x862bxb[_0x3f64[44]](200)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[65]]= function(_0x862bxd,_0x862bxb){return OpenchannelRoom[_0x3f64[28]](_0x862bxd[_0x3f64[45]][_0x3f64[21]])[_0x3f64[15]](function(_0x862bx15){if(!_0x862bx15){return _0x862bxb[_0x3f64[44]](404)};return _0x862bx15[_0x3f64[65]]()})[_0x3f64[15]](function(){return _0x862bxb[_0x3f64[44]](204)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[66]]= function(_0x862bxd,_0x862bxb){return OpenchannelRoom[_0x3f64[65]]({where:{id:_0x862bxd[_0x3f64[16]][_0x3f64[67]]},individualHooks:true})[_0x3f64[15]](function(){return _0x862bxb[_0x3f64[44]](200)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)})};exports[_0x3f64[68]]= function(_0x862bxd,_0x862bxb,_0x862bx16){var _0x862bx1a={where:{id:_0x862bxd[_0x3f64[45]][_0x3f64[21]][_0x3f64[70]](_0x3f64[69])},user:_0x862bxd[_0x3f64[22]],individualHooks:true};return OpenchannelRoom[_0x3f64[60]](_0x862bxd[_0x3f64[56]],_0x862bx1a)[_0x3f64[15]](function(_0x862bx1b){if(!_0x862bx1b){return _0x862bxb[_0x3f64[44]](404)};return _0x862bx1b})[_0x3f64[15]](function(_0x862bx1b){return _0x862bxb[_0x3f64[44]](200)})[_0x3f64[14]](function(_0x862bxc){return handleError(_0x862bxb,_0x862bxc)})} \ No newline at end of file diff --git a/server/api/openchannel_room/openchannel_room.events.js b/server/api/openchannel_room/openchannel_room.events.js index 1bea005..bd1a033 100644 --- a/server/api/openchannel_room/openchannel_room.events.js +++ b/server/api/openchannel_room/openchannel_room.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const OpenchannelRoom = require('../../models').OpenchannelRoom; - -var OpenchannelRoomEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -OpenchannelRoomEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - OpenchannelRoom.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - OpenchannelRoomEvents.emit(event + ':' + doc._id, doc); - OpenchannelRoomEvents.emit(event, doc); - done(null); - } -} - -module.exports = OpenchannelRoomEvents; +var _0x2ff7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2ff7[0];const EventEmitter=require(_0x2ff7[1]);const OpenchannelRoom=require(_0x2ff7[3])[_0x2ff7[2]];var OpenchannelRoomEvents= new EventEmitter();OpenchannelRoomEvents[_0x2ff7[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2ff7[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2ff7[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2ff7[6]};for(var e in events){var event=events[e];OpenchannelRoom[_0x2ff7[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xbffax8,_0xbffax9,_0xbffaxa){OpenchannelRoomEvents[_0x2ff7[10]](event+ _0x2ff7[8]+ _0xbffax8[_0x2ff7[9]],_0xbffax8);OpenchannelRoomEvents[_0x2ff7[10]](event,_0xbffax8);_0xbffaxa(null)}}module[_0x2ff7[11]]= OpenchannelRoomEvents \ No newline at end of file diff --git a/server/api/openchannel_room/openchannel_room.socket.js b/server/api/openchannel_room/openchannel_room.socket.js index 0868959..8fa4fd6 100644 --- a/server/api/openchannel_room/openchannel_room.socket.js +++ b/server/api/openchannel_room/openchannel_room.socket.js @@ -1,33 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const OpenchannelRoomEvents = require('./openchannel_room.events'); - -// Model events to emit -var events = ['save', 'save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('openchannel_room:' + event, socket); - - OpenchannelRoomEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - - -function removeListener(event, listener) { - return function() { - OpenchannelRoomEvents.removeListener(event, listener); - }; -} +var _0xebaa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xebaa[0];const OpenchannelRoomEvents=require(_0xebaa[1]);var events=[_0xebaa[2],_0xebaa[2],_0xebaa[3]];exports[_0xebaa[4]]= function(_0x4af9x3){for(var _0x4af9x4=0,_0x4af9x5=events[_0xebaa[5]];_0x4af9x4< _0x4af9x5;_0x4af9x4++){var _0x4af9x6=events[_0x4af9x4];var _0x4af9x7=createListener(_0xebaa[6]+ _0x4af9x6,_0x4af9x3);OpenchannelRoomEvents[_0xebaa[7]](_0x4af9x6,_0x4af9x7);_0x4af9x3[_0xebaa[7]](_0xebaa[8],removeListener(_0x4af9x6,_0x4af9x7))}};function createListener(_0x4af9x6,_0x4af9x3){return function(_0x4af9x9){_0x4af9x3[_0xebaa[9]](_0x4af9x6,_0x4af9x9)}}function removeListener(_0x4af9x6,_0x4af9x7){return function(){OpenchannelRoomEvents[_0xebaa[10]](_0x4af9x6,_0x4af9x7)}} \ No newline at end of file diff --git a/server/api/pause/index.js b/server/api/pause/index.js index e7ac19a..2160e70 100644 --- a/server/api/pause/index.js +++ b/server/api/pause/index.js @@ -1,162 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./pause.controller'); - -var router = express.Router(); - -/** - * @api {get} /api/pauses/ Get pauses list. - * - * @apiParam (Query) {Number} [offset] Pagination offset. - * @apiParam (Query) {Number} [limit] Pagination limit. - * - * @apiVersion 0.0.140 - * @apiName GetPauses - * @apiGroup Pauses - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of pauses. - * @apiSuccess {Object[]} rows Pauses list. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 1, - * "rows": [{ - * "id": 1 - * "name": "BACKOFFICE" - * "description": "BACKOFFICE Pause" - * }] - * } - */ -router.get('/', auth.isAuthenticated(), auth.hasModule([6, 13], ['admin', 'agent']), controller.index); - -/** - * @api {get} /api/pauses/:id Get pause. - * @apiParam {Number} id Pause unique ID. - * @apiVersion 0.0.140 - * @apiName GetPause - * @apiGroup Pauses - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "BACKOFFICE" - * "description": "BACKOFFICE Pause" - * } - */ -router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show); - -/** - * @api {post} /api/users/ Create pause. - * @apiParam (Body) {String} name Pause name. - * @apiParam (Body) {String} [description] Pause description. - * - * @apiVersion 0.0.140 - * @apiName CreatePause - * @apiGroup Pauses - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - * { - * "id": 1 - * "name": "BACKOFFICE" - * "description": "BACKOFFICE Pause" - * } - */ -router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create); - -/** - * @api {delete} /api/users/:id Update pause details. - * - * @apiParam (Params) {Number} id Pause unique ID. - * @apiParam (Body) {String} name Pause name. - * @apiParam (Body) {String} [description] Pause description. - * - * @apiVersion 0.0.140 - * @apiName UpdatePause - * @apiGroup Pauses - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "BACKOFFICE" - * "description": "BACKOFFICE Pause" - * } - */ -router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update); - -/** - * @api {delete} /api/pauses/ Bulk Delete pauses. - * - * @apiParam (Query) {Number[]} ids Pauses unique ID array. - * - * @apiVersion 0.0.140 - * @apiName BulkDeletePauses - * @apiGroup Pauses - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy); - -/** - * @api {delete} /api/telephones/:id Delete pause. - * - * @apiParam {Number} id Pause unique ID. - * - * @apiVersion 0.0.140 - * @apiName DeletePause - * @apiGroup Pauses - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy); - -module.exports = router; +var _0x9d5f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x70\x61\x75\x73\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x9d5f[0];var express=require(_0x9d5f[1]);var auth=require(_0x9d5f[2]);var controller=require(_0x9d5f[3]);var router=express.Router();router[_0x9d5f[10]](_0x9d5f[4],auth[_0x9d5f[5]](),auth[_0x9d5f[8]]([6,13],[_0x9d5f[6],_0x9d5f[7]]),controller[_0x9d5f[9]]);router[_0x9d5f[10]](_0x9d5f[11],auth[_0x9d5f[5]](),auth[_0x9d5f[8]]([13],[_0x9d5f[6]]),controller[_0x9d5f[12]]);router[_0x9d5f[14]](_0x9d5f[4],auth[_0x9d5f[5]](),auth[_0x9d5f[8]]([13],[_0x9d5f[6]]),controller[_0x9d5f[13]]);router[_0x9d5f[16]](_0x9d5f[11],auth[_0x9d5f[5]](),auth[_0x9d5f[8]]([13],[_0x9d5f[6]]),controller[_0x9d5f[15]]);router[_0x9d5f[18]](_0x9d5f[4],auth[_0x9d5f[5]](),auth[_0x9d5f[8]]([13],[_0x9d5f[6]]),controller[_0x9d5f[17]]);router[_0x9d5f[18]](_0x9d5f[11],auth[_0x9d5f[5]](),auth[_0x9d5f[8]]([13],[_0x9d5f[6]]),controller[_0x9d5f[19]]);module[_0x9d5f[20]]= router \ No newline at end of file diff --git a/server/api/pause/pause.controller.js b/server/api/pause/pause.controller.js index d33093a..eaf072a 100644 --- a/server/api/pause/pause.controller.js +++ b/server/api/pause/pause.controller.js @@ -1,150 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/pauses -> index - * POST /api/pauses -> create - * GET /api/pauses/:id -> show - * PUT /api/pauses/:id -> update - * DELETE /api/pauses/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var Pause = require('../../models').Pause; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of Pauses -exports.index = function(req, res) { - return Pause - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Gets a single Pause from the DB -exports.show = function(req, res) { - return Pause.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new Pause in the DB -exports.create = function(req, res) { - return Pause.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing Pause in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return Pause.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a Pause from the DB -exports.destroy = function(req, res) { - return Pause.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - - return Pause - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getQuery(query) { - var _query = { - where: {} - }; - - _.forEach(query, function(value, key) { - switch (key) { - case 'limit': - case 'offset': - case 'order': - _query[key] = value; - break; - default: - _query.where[key] = { - $like: '%' + value + '%' - }; - } - }); - - return _query; -} +var _0xfeef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x50\x61\x75\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64\x73","\x6C\x69\x6D\x69\x74","\x6F\x66\x66\x73\x65\x74","\x6F\x72\x64\x65\x72","\x77\x68\x65\x72\x65","\x25","\x66\x6F\x72\x45\x61\x63\x68"];_0xfeef[0];var _=require(_0xfeef[1]);var Util=require(_0xfeef[2]);var Pause=require(_0xfeef[4])[_0xfeef[3]];function handleError(_0x2d21x5,_0x2d21x6){_0x2d21x6= _0x2d21x6|| 500;return function(_0x2d21x7){_0x2d21x5[_0xfeef[6]](_0x2d21x6)[_0xfeef[5]](_0x2d21x7)}}function responseWithResult(_0x2d21x5,_0x2d21x6){_0x2d21x6= _0x2d21x6|| 200;return function(_0x2d21x9){if(_0x2d21x9){_0x2d21x5[_0xfeef[6]](_0x2d21x6)[_0xfeef[7]](_0x2d21x9)}}}function handleEntityNotFound(_0x2d21x5){return function(_0x2d21x9){if(!_0x2d21x9){_0x2d21x5[_0xfeef[6]](404)[_0xfeef[8]]();return null};return _0x2d21x9}}function saveUpdates(_0x2d21xc){return function(_0x2d21x9){return _0x2d21x9[_0xfeef[10]](_0x2d21xc)[_0xfeef[9]](function(_0x2d21xd){return _0x2d21xd})}}function removeEntity(_0x2d21x5){return function(_0x2d21x9){if(_0x2d21x9){return _0x2d21x9[_0xfeef[11]]()[_0xfeef[9]](function(){_0x2d21x5[_0xfeef[6]](204)[_0xfeef[8]]()})}}}exports[_0xfeef[12]]= function(_0x2d21xf,_0x2d21x5){return Pause[_0xfeef[16]](Util[_0xfeef[15]](_0x2d21xf[_0xfeef[14]]))[_0xfeef[9]](function(_0x2d21x10){_0x2d21x5[_0xfeef[6]](200)[_0xfeef[5]](_0x2d21x10)})[_0xfeef[13]](function(_0x2d21x7){return handleError(_0x2d21x5,_0x2d21x7)})};exports[_0xfeef[17]]= function(_0x2d21xf,_0x2d21x5){return Pause[_0xfeef[20]](_0x2d21xf[_0xfeef[19]][_0xfeef[18]])[_0xfeef[9]](handleEntityNotFound(_0x2d21x5))[_0xfeef[9]](responseWithResult(_0x2d21x5))[_0xfeef[13]](handleError(_0x2d21x5))};exports[_0xfeef[21]]= function(_0x2d21xf,_0x2d21x5){return Pause[_0xfeef[21]](_0x2d21xf[_0xfeef[22]])[_0xfeef[9]](responseWithResult(_0x2d21x5,201))[_0xfeef[13]](handleError(_0x2d21x5))};exports[_0xfeef[23]]= function(_0x2d21xf,_0x2d21x5){if(_0x2d21xf[_0xfeef[22]][_0xfeef[18]]){delete _0x2d21xf[_0xfeef[22]][_0xfeef[18]]};return Pause[_0xfeef[20]](_0x2d21xf[_0xfeef[19]][_0xfeef[18]])[_0xfeef[9]](handleEntityNotFound(_0x2d21x5))[_0xfeef[9]](saveUpdates(_0x2d21xf[_0xfeef[22]]))[_0xfeef[9]](responseWithResult(_0x2d21x5))[_0xfeef[13]](handleError(_0x2d21x5))};exports[_0xfeef[11]]= function(_0x2d21xf,_0x2d21x5){return Pause[_0xfeef[20]](_0x2d21xf[_0xfeef[19]][_0xfeef[18]])[_0xfeef[9]](handleEntityNotFound(_0x2d21x5))[_0xfeef[9]](removeEntity(_0x2d21x5))[_0xfeef[13]](handleError(_0x2d21x5))};exports[_0xfeef[24]]= function(_0x2d21xf,_0x2d21x5){return Pause[_0xfeef[11]]({where:{id:_0x2d21xf[_0xfeef[14]][_0xfeef[26]]},individualHooks:true})[_0xfeef[9]](function(){return _0x2d21x5[_0xfeef[25]](204)})[_0xfeef[13]](function(_0x2d21x7){return handleError(_0x2d21x5,_0x2d21x7)})};function getQuery(_0x2d21x12){var _0x2d21x13={where:{}};_[_0xfeef[32]](_0x2d21x12,function(_0x2d21x14,_0x2d21x15){switch(_0x2d21x15){case _0xfeef[27]:;case _0xfeef[28]:;case _0xfeef[29]:_0x2d21x13[_0x2d21x15]= _0x2d21x14;break;default:_0x2d21x13[_0xfeef[30]][_0x2d21x15]= {$like:_0xfeef[31]+ _0x2d21x14+ _0xfeef[31]}}});return _0x2d21x13} \ No newline at end of file diff --git a/server/api/pause/pause.events.js b/server/api/pause/pause.events.js index 034b226..4ff5900 100644 --- a/server/api/pause/pause.events.js +++ b/server/api/pause/pause.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Pause = require('../../models').Pause; - -var PauseEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -PauseEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Pause.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - PauseEvents.emit(event + ':' + doc._id, doc); - PauseEvents.emit(event, doc); - done(null); - } -} - -module.exports = PauseEvents; +var _0xbbfa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x50\x61\x75\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xbbfa[0];const EventEmitter=require(_0xbbfa[1]);const Pause=require(_0xbbfa[3])[_0xbbfa[2]];var PauseEvents= new EventEmitter();PauseEvents[_0xbbfa[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xbbfa[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xbbfa[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xbbfa[6]};for(var e in events){var event=events[e];Pause[_0xbbfa[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x2be1x8,_0x2be1x9,_0x2be1xa){PauseEvents[_0xbbfa[10]](event+ _0xbbfa[8]+ _0x2be1x8[_0xbbfa[9]],_0x2be1x8);PauseEvents[_0xbbfa[10]](event,_0x2be1x8);_0x2be1xa(null)}}module[_0xbbfa[11]]= PauseEvents \ No newline at end of file diff --git a/server/api/pause/pause.socket.js b/server/api/pause/pause.socket.js index c01be0c..2154c64 100644 --- a/server/api/pause/pause.socket.js +++ b/server/api/pause/pause.socket.js @@ -1,28 +1 @@ -'use strict'; - -const PauseEvents = require('./pause.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('pause:' + event, socket); - - PauseEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - PauseEvents.removeListener(event, listener); - }; -} +var _0x792e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x70\x61\x75\x73\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x70\x61\x75\x73\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x792e[0];const PauseEvents=require(_0x792e[1]);var events=[_0x792e[2],_0x792e[3]];exports[_0x792e[4]]= function(_0x8b98x3){for(var _0x8b98x4=0,_0x8b98x5=events[_0x792e[5]];_0x8b98x4< _0x8b98x5;_0x8b98x4++){var _0x8b98x6=events[_0x8b98x4];var _0x8b98x7=createListener(_0x792e[6]+ _0x8b98x6,_0x8b98x3);PauseEvents[_0x792e[7]](_0x8b98x6,_0x8b98x7);_0x8b98x3[_0x792e[7]](_0x792e[8],removeListener(_0x8b98x6,_0x8b98x7))}};function createListener(_0x8b98x6,_0x8b98x3){return function(_0x8b98x9){_0x8b98x3[_0x792e[9]](_0x8b98x6,_0x8b98x9)}}function removeListener(_0x8b98x6,_0x8b98x7){return function(){PauseEvents[_0x792e[10]](_0x8b98x6,_0x8b98x7)}} \ No newline at end of file diff --git a/server/api/report_agent/index.js b/server/api/report_agent/index.js index c0ded72..1ee62df 100644 --- a/server/api/report_agent/index.js +++ b/server/api/report_agent/index.js @@ -1,13 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_agent.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin', 'agent']), controller.index); -router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe); -router.get('/active/calls', auth.isAuthenticated(), auth.hasModule([17], ['admin', 'agent']), controller.activeCalls); - -module.exports = router; +var _0x9d94=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x61\x63\x74\x69\x76\x65\x2F\x63\x61\x6C\x6C\x73","\x61\x63\x74\x69\x76\x65\x43\x61\x6C\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x9d94[0];var express=require(_0x9d94[1]);var controller=require(_0x9d94[2]);var auth=require(_0x9d94[3]);var router=express.Router();router[_0x9d94[10]](_0x9d94[4],auth[_0x9d94[5]](),auth[_0x9d94[8]]([17],[_0x9d94[6],_0x9d94[7]]),controller[_0x9d94[9]]);router[_0x9d94[10]](_0x9d94[11],auth[_0x9d94[5]](),auth[_0x9d94[8]]([17],[_0x9d94[6]]),controller[_0x9d94[12]]);router[_0x9d94[10]](_0x9d94[13],auth[_0x9d94[5]](),auth[_0x9d94[8]]([17],[_0x9d94[6],_0x9d94[7]]),controller[_0x9d94[14]]);module[_0x9d94[15]]= router \ No newline at end of file diff --git a/server/api/report_agent/report_agent.controller.js b/server/api/report_agent/report_agent.controller.js index 4f27797..8266661 100644 --- a/server/api/report_agent/report_agent.controller.js +++ b/server/api/report_agent/report_agent.controller.js @@ -1,107 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ReportAgent = require('../../models').ReportAgent; -var User = require('../../models').User; -var VoiceQueue = require('../../models').VoiceQueue; -var ReportAgentHistory = require('../../models').history.ReportAgentHistory; -var Util = require('../../config/util'); - -// Get list of report_agents -exports.index = function(req, res, next) { - var where = {}; - if (req.user.role === 'agent') { - where.membername = req.user.name; - } - return ReportAgent - .findAndCountAll(Util.getQuery(req.query, where)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getVoiceQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getVoiceQueuesIdByUser()) - .then(function(userQueues) { - return _.map(userQueues.rows, 'name'); - }); - case 'agent': - return User - .findById(user.id) - .then(function(agent) { - return agent - .getVoiceQueues({ - attributes: ['name'] - }); - }) - .then(function(userQueues) { - return _.map(userQueues, 'name'); - }); - default: - return VoiceQueue - .findAll() - .then(function(queues) { - return { - rows: queues - }; - }) - .then(function(userQueues) { - return _.map(userQueues.rows, 'name'); - }); - } - } -} - -// Get active Calls -exports.activeCalls = function(req, res) { - var where = {}; - if (req.user.role === 'agent') { - where.membername = req.user.fullname; - } - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return ReportAgent - .findAll(Util.getQuery(req.query, _.merge(where, { - agentcomplete: false, - agentringnoanswer: false, - agentdump: false - }))); - }) - .then(function(data) { - return res.status(200).send({ - rows: data, - count: data.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of fields -exports.describe = function(req, res) { - return ReportAgentHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xc825=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x77\x73","\x6D\x61\x70","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x63\x74\x69\x76\x65\x43\x61\x6C\x6C\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6C\x65\x6E\x67\x74\x68","\x6D\x65\x72\x67\x65","\x61\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0xc825[0];var _=require(_0xc825[1]);var ReportAgent=require(_0xc825[3])[_0xc825[2]];var User=require(_0xc825[3])[_0xc825[4]];var VoiceQueue=require(_0xc825[3])[_0xc825[5]];var ReportAgentHistory=require(_0xc825[3])[_0xc825[7]][_0xc825[6]];var Util=require(_0xc825[8]);exports[_0xc825[9]]= function(_0x37c8x7,_0x37c8x8,_0x37c8x9){var _0x37c8xa={};if(_0x37c8x7[_0xc825[11]][_0xc825[10]]=== _0xc825[12]){_0x37c8xa[_0xc825[13]]= _0x37c8x7[_0xc825[11]][_0xc825[14]]};return ReportAgent[_0xc825[21]](Util[_0xc825[20]](_0x37c8x7[_0xc825[19]],_0x37c8xa))[_0xc825[18]](function(_0x37c8xc){return _0x37c8x8[_0xc825[17]](200)[_0xc825[16]](_0x37c8xc)})[_0xc825[15]](function(_0x37c8xb){return handleError(_0x37c8x8,_0x37c8xb)})};function getVoiceQueues(_0x37c8xe){return function(){switch(_0x37c8xe[_0xc825[10]]){case _0xc825[11]:return User[_0xc825[26]](_0x37c8xe[_0xc825[25]],{attributes:[_0xc825[25]]})[_0xc825[18]](Util[_0xc825[24]]())[_0xc825[18]](function(_0x37c8xf){return _[_0xc825[23]](_0x37c8xf[_0xc825[22]],_0xc825[14])});case _0xc825[12]:return User[_0xc825[26]](_0x37c8xe[_0xc825[25]])[_0xc825[18]](function(_0x37c8x10){return _0x37c8x10[_0xc825[27]]({attributes:[_0xc825[14]]})})[_0xc825[18]](function(_0x37c8xf){return _[_0xc825[23]](_0x37c8xf,_0xc825[14])});default:return VoiceQueue[_0xc825[28]]()[_0xc825[18]](function(_0x37c8x11){return {rows:_0x37c8x11}})[_0xc825[18]](function(_0x37c8xf){return _[_0xc825[23]](_0x37c8xf[_0xc825[22]],_0xc825[14])})}}}exports[_0xc825[29]]= function(_0x37c8x7,_0x37c8x8){var _0x37c8xa={};if(_0x37c8x7[_0xc825[11]][_0xc825[10]]=== _0xc825[12]){_0x37c8xa[_0xc825[13]]= _0x37c8x7[_0xc825[11]][_0xc825[30]]};return Promise[_0xc825[33]]([])[_0xc825[18]](getVoiceQueues(_0x37c8x7[_0xc825[11]]))[_0xc825[18]](function(_0x37c8xf){return ReportAgent[_0xc825[28]](Util[_0xc825[20]](_0x37c8x7[_0xc825[19]],_[_0xc825[32]](_0x37c8xa,{agentcomplete:false,agentringnoanswer:false,agentdump:false})))})[_0xc825[18]](function(_0x37c8x12){return _0x37c8x8[_0xc825[17]](200)[_0xc825[16]]({rows:_0x37c8x12,count:_0x37c8x12[_0xc825[31]]})})[_0xc825[15]](function(_0x37c8xb){return handleError(_0x37c8x8,_0x37c8xb)})};exports[_0xc825[34]]= function(_0x37c8x7,_0x37c8x8){return ReportAgentHistory[_0xc825[34]]()[_0xc825[18]](function(_0x37c8x13){return _0x37c8x8[_0xc825[17]](200)[_0xc825[16]](_0x37c8x13)})[_0xc825[15]](function(_0x37c8xb){return handleError(_0x37c8x8,_0x37c8xb)})};function handleError(_0x37c8x8,_0x37c8xb){return _0x37c8x8[_0xc825[17]](500)[_0xc825[16]](_0x37c8xb)} \ No newline at end of file diff --git a/server/api/report_agent/report_agent.events.js b/server/api/report_agent/report_agent.events.js index 4a38996..5cb04c3 100644 --- a/server/api/report_agent/report_agent.events.js +++ b/server/api/report_agent/report_agent.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportAgent = require('../../models').ReportAgent; - -var ReportAgentEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportAgentEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportAgent.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportAgentEvents.emit(event + ':' + doc._id, doc); - ReportAgentEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportAgentEvents; +var _0xa618=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa618[0];const EventEmitter=require(_0xa618[1]);const ReportAgent=require(_0xa618[3])[_0xa618[2]];var ReportAgentEvents= new EventEmitter();ReportAgentEvents[_0xa618[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa618[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa618[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa618[7]};for(var e in events){var event=events[e];ReportAgent[_0xa618[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x1324x8,_0x1324x9,_0x1324xa){ReportAgentEvents[_0xa618[11]](event+ _0xa618[9]+ _0x1324x8[_0xa618[10]],_0x1324x8);ReportAgentEvents[_0xa618[11]](event,_0x1324x8);_0x1324xa(null)}}module[_0xa618[12]]= ReportAgentEvents \ No newline at end of file diff --git a/server/api/report_agent/report_agent.socket.js b/server/api/report_agent/report_agent.socket.js index 27b95f5..bb22976 100644 --- a/server/api/report_agent/report_agent.socket.js +++ b/server/api/report_agent/report_agent.socket.js @@ -1,30 +1 @@ -'use strict'; - -const ReportAgentEvents = require('./report_agent.events'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_agent:' + event, socket); - - ReportAgentEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - if (socket.name === doc.membername || socket.role === 'admin') { - socket.emit(event, doc); - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportAgentEvents.removeListener(event, listener); - }; -} +var _0xd794=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xd794[0];const ReportAgentEvents=require(_0xd794[1]);var events=[_0xd794[2],_0xd794[3],_0xd794[4]];exports[_0xd794[5]]= function(_0xf58ax3){for(var _0xf58ax4=0,_0xf58ax5=events[_0xd794[6]];_0xf58ax4< _0xf58ax5;_0xf58ax4++){var _0xf58ax6=events[_0xf58ax4];var _0xf58ax7=createListener(_0xd794[7]+ _0xf58ax6,_0xf58ax3);ReportAgentEvents[_0xd794[8]](_0xf58ax6,_0xf58ax7);_0xf58ax3[_0xd794[8]](_0xd794[9],removeListener(_0xf58ax6,_0xf58ax7))}};function createListener(_0xf58ax6,_0xf58ax3){return function(_0xf58ax9){if(_0xf58ax3[_0xd794[10]]=== _0xf58ax9[_0xd794[11]]|| _0xf58ax3[_0xd794[12]]=== _0xd794[13]){_0xf58ax3[_0xd794[14]](_0xf58ax6,_0xf58ax9)}}}function removeListener(_0xf58ax6,_0xf58ax7){return function(){ReportAgentEvents[_0xd794[15]](_0xf58ax6,_0xf58ax7)}} \ No newline at end of file diff --git a/server/api/report_call/index.js b/server/api/report_call/index.js index 65350f2..d62b142 100644 --- a/server/api/report_call/index.js +++ b/server/api/report_call/index.js @@ -1,19 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./report_call.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe); -router.get('/manualoutbound', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.manualOutbound); -router.get('/manualoutboundglobalduration', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.manualOutboundGlobalDuration); -router.get('/manualoutboundavgduration', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.manualOutboundAvgDuration); -router.get('/manualoutboundanswered', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.manualOutboundAnswered); -router.get('/manualoutboundanswerrate', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.manualOutboundAnswerRate); -router.put('/:uniqueid', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.update); - - -module.exports = router; +var _0x9c50=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x61\x67\x65\x6E\x74","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x67\x6C\x6F\x62\x61\x6C\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x47\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x76\x67\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x6E\x73\x77\x65\x72\x65\x64","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x65\x64","\x2F\x6D\x61\x6E\x75\x61\x6C\x6F\x75\x74\x62\x6F\x75\x6E\x64\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9c50[0];var express=require(_0x9c50[1]);var auth=require(_0x9c50[2]);var controller=require(_0x9c50[3]);var router=express.Router();router[_0x9c50[9]](_0x9c50[4],auth[_0x9c50[5]](),auth[_0x9c50[7]]([17],[_0x9c50[6]]),controller[_0x9c50[8]]);router[_0x9c50[9]](_0x9c50[10],auth[_0x9c50[5]](),auth[_0x9c50[7]]([17],[_0x9c50[6]]),controller[_0x9c50[11]]);router[_0x9c50[9]](_0x9c50[12],auth[_0x9c50[5]](),auth[_0x9c50[7]]([1],[_0x9c50[6],_0x9c50[13]]),controller[_0x9c50[14]]);router[_0x9c50[9]](_0x9c50[15],auth[_0x9c50[5]](),auth[_0x9c50[7]]([1],[_0x9c50[6],_0x9c50[13]]),controller[_0x9c50[16]]);router[_0x9c50[9]](_0x9c50[17],auth[_0x9c50[5]](),auth[_0x9c50[7]]([1],[_0x9c50[6],_0x9c50[13]]),controller[_0x9c50[18]]);router[_0x9c50[9]](_0x9c50[19],auth[_0x9c50[5]](),auth[_0x9c50[7]]([1],[_0x9c50[6],_0x9c50[13]]),controller[_0x9c50[20]]);router[_0x9c50[9]](_0x9c50[21],auth[_0x9c50[5]](),auth[_0x9c50[7]]([1],[_0x9c50[6],_0x9c50[13]]),controller[_0x9c50[22]]);router[_0x9c50[25]](_0x9c50[23],auth[_0x9c50[5]](),auth[_0x9c50[7]]([1],[_0x9c50[6],_0x9c50[13]]),controller[_0x9c50[24]]);module[_0x9c50[26]]= router \ No newline at end of file diff --git a/server/api/report_call/report_call.controller.js b/server/api/report_call/report_call.controller.js index 9ba5632..b6d0443 100644 --- a/server/api/report_call/report_call.controller.js +++ b/server/api/report_call/report_call.controller.js @@ -1,176 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/report/calls -> index - * POST /api/report/calls -> create - * GET /api/report/calls/:id -> show - * PUT /api/report/calls/:id -> update - * DELETE /api/report/calls/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var sequelize = require('../../models').sequelize; -var ReportCall = require('../../models').ReportCall; -var ReportCallHistory = require('../../models').history.ReportCallHistory; -var Util = require('../../config/util'); - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - console.log(err); - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity - .destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of ReportCalls -exports.index = function(req, res, next) { - return ReportCall - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(handleError(res)); -}; - -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ReportCall.findOne({ - where: { - uniqueid: req.params.uniqueid - } - }) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Get Answered Calls -exports.manualOutbound = function(req, res) { - return ReportCall - .count({ - where: { - type: 'outbound' - } - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(handleError(res)); -}; - -// Get Answered Calls -exports.manualOutboundGlobalDuration = function(req, res) { - return sequelize - .query('SELECT SEC_TO_TIME(SUM(duration)) as value FROM report_call WHERE type=\"outbound\"', { - type: sequelize.QueryTypes.SELECT - }) - .then(function(data) { - return res.status(200).send({ - value: data[0].value - }); - }) - .catch(handleError(res)); -}; - -// Get Answered Calls -exports.manualOutboundAvgDuration = function(req, res) { - return sequelize - .query('SELECT SEC_TO_TIME(ROUND(AVG(duration), 0)) as value FROM report_call WHERE type=\"outbound\"', { - type: sequelize.QueryTypes.SELECT - }) - .then(function(data) { - return res.status(200).send({ - value: data[0].value - }); - }) - .catch(handleError(res)); -}; - -// Get Answered Calls -exports.manualOutboundAnswered = function(req, res) { - return ReportCall - .count({ - where: { - disposition: 'ANSWERED', - type: 'outbound' - } - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(handleError(res)); -}; - -// Get Answered Calls -exports.manualOutboundAnswerRate = function(req, res) { - return sequelize - .query('SELECT ROUND(SUM(IF(disposition=\"ANSWERED\", 1, 0)) / COUNT(*) * 100, 1) as value FROM report_call WHERE type=\"outbound\"', { - type: sequelize.QueryTypes.SELECT - }) - .then(function(data) { - return res.status(200).send({ - value: data[0].value - }); - }) - .catch(handleError(res)); -}; - -// Get list of fields -exports.describe = function(req, res) { - return ReportCallHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(handleError(res)); -}; +var _0x58f6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x67","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x69\x64","\x62\x6F\x64\x79","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x63\x6F\x75\x6E\x74","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x47\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x76\x61\x6C\x75\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x53\x55\x4D\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x65\x64","\x41\x4E\x53\x57\x45\x52\x45\x44","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x41\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x41\x4E\x53\x57\x45\x52\x45\x44\x22\x2C\x20\x31\x2C\x20\x30\x29\x29\x20\x2F\x20\x43\x4F\x55\x4E\x54\x28\x2A\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x58f6[0];var _=require(_0x58f6[1]);var sequelize=require(_0x58f6[3])[_0x58f6[2]];var ReportCall=require(_0x58f6[3])[_0x58f6[4]];var ReportCallHistory=require(_0x58f6[3])[_0x58f6[6]][_0x58f6[5]];var Util=require(_0x58f6[7]);function handleError(_0x20aax7,_0x20aax8){_0x20aax8= _0x20aax8|| 500;return function(_0x20aax9){console[_0x58f6[8]](_0x20aax9);_0x20aax7[_0x58f6[10]](_0x20aax8)[_0x58f6[9]](_0x20aax9)}}function responseWithResult(_0x20aax7,_0x20aax8){_0x20aax8= _0x20aax8|| 200;return function(_0x20aaxb){if(_0x20aaxb){_0x20aax7[_0x58f6[10]](_0x20aax8)[_0x58f6[11]](_0x20aaxb)}}}function handleEntityNotFound(_0x20aax7){return function(_0x20aaxb){if(!_0x20aaxb){_0x20aax7[_0x58f6[10]](404)[_0x58f6[12]]();return null};return _0x20aaxb}}function saveUpdates(_0x20aaxe){return function(_0x20aaxb){return _0x20aaxb[_0x58f6[14]](_0x20aaxe)[_0x58f6[13]](function(_0x20aaxf){return _0x20aaxf})}}function removeEntity(_0x20aax7){return function(_0x20aaxb){if(_0x20aaxb){return _0x20aaxb[_0x58f6[15]]()[_0x58f6[13]](function(){_0x20aax7[_0x58f6[10]](204)[_0x58f6[12]]()})}}}exports[_0x58f6[16]]= function(_0x20aax11,_0x20aax7,_0x20aax12){return ReportCall[_0x58f6[20]](Util[_0x58f6[19]](_0x20aax11[_0x58f6[18]]))[_0x58f6[13]](function(_0x20aax13){return _0x20aax7[_0x58f6[10]](200)[_0x58f6[9]](_0x20aax13)})[_0x58f6[17]](handleError(_0x20aax7))};exports[_0x58f6[21]]= function(_0x20aax11,_0x20aax7){if(_0x20aax11[_0x58f6[23]][_0x58f6[22]]){delete _0x20aax11[_0x58f6[23]][_0x58f6[22]]};return ReportCall[_0x58f6[26]]({where:{uniqueid:_0x20aax11[_0x58f6[25]][_0x58f6[24]]}})[_0x58f6[13]](handleEntityNotFound(_0x20aax7))[_0x58f6[13]](saveUpdates(_0x20aax11[_0x58f6[23]]))[_0x58f6[13]](responseWithResult(_0x20aax7))[_0x58f6[17]](handleError(_0x20aax7))};exports[_0x58f6[27]]= function(_0x20aax11,_0x20aax7){return ReportCall[_0x58f6[29]]({where:{type:_0x58f6[28]}})[_0x58f6[13]](function(_0x20aax14){return _0x20aax7[_0x58f6[10]](200)[_0x58f6[9]]({value:_0x20aax14})})[_0x58f6[17]](handleError(_0x20aax7))};exports[_0x58f6[30]]= function(_0x20aax11,_0x20aax7){return sequelize[_0x58f6[18]](_0x58f6[32],{type:sequelize[_0x58f6[34]][_0x58f6[33]]})[_0x58f6[13]](function(_0x20aax14){return _0x20aax7[_0x58f6[10]](200)[_0x58f6[9]]({value:_0x20aax14[0][_0x58f6[31]]})})[_0x58f6[17]](handleError(_0x20aax7))};exports[_0x58f6[35]]= function(_0x20aax11,_0x20aax7){return sequelize[_0x58f6[18]](_0x58f6[36],{type:sequelize[_0x58f6[34]][_0x58f6[33]]})[_0x58f6[13]](function(_0x20aax14){return _0x20aax7[_0x58f6[10]](200)[_0x58f6[9]]({value:_0x20aax14[0][_0x58f6[31]]})})[_0x58f6[17]](handleError(_0x20aax7))};exports[_0x58f6[37]]= function(_0x20aax11,_0x20aax7){return ReportCall[_0x58f6[29]]({where:{disposition:_0x58f6[38],type:_0x58f6[28]}})[_0x58f6[13]](function(_0x20aax14){return _0x20aax7[_0x58f6[10]](200)[_0x58f6[9]]({value:_0x20aax14})})[_0x58f6[17]](handleError(_0x20aax7))};exports[_0x58f6[39]]= function(_0x20aax11,_0x20aax7){return sequelize[_0x58f6[18]](_0x58f6[40],{type:sequelize[_0x58f6[34]][_0x58f6[33]]})[_0x58f6[13]](function(_0x20aax14){return _0x20aax7[_0x58f6[10]](200)[_0x58f6[9]]({value:_0x20aax14[0][_0x58f6[31]]})})[_0x58f6[17]](handleError(_0x20aax7))};exports[_0x58f6[41]]= function(_0x20aax11,_0x20aax7){return ReportCallHistory[_0x58f6[41]]()[_0x58f6[13]](function(_0x20aax15){return _0x20aax7[_0x58f6[10]](200)[_0x58f6[9]](_0x20aax15)})[_0x58f6[17]](handleError(_0x20aax7))} \ No newline at end of file diff --git a/server/api/report_call/report_call.events.js b/server/api/report_call/report_call.events.js index 6ee64f5..4c41d82 100644 --- a/server/api/report_call/report_call.events.js +++ b/server/api/report_call/report_call.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportCall = require('../../models').ReportCall; - -var ReportCallEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportCallEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportCall.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportCallEvents.emit(event + ':' + doc._id, doc); - ReportCallEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportCallEvents; +var _0x22ea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x22ea[0];const EventEmitter=require(_0x22ea[1]);const ReportCall=require(_0x22ea[3])[_0x22ea[2]];var ReportCallEvents= new EventEmitter();ReportCallEvents[_0x22ea[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x22ea[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x22ea[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x22ea[6]};for(var e in events){var event=events[e];ReportCall[_0x22ea[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4947x8,_0x4947x9,_0x4947xa){ReportCallEvents[_0x22ea[10]](event+ _0x22ea[8]+ _0x4947x8[_0x22ea[9]],_0x4947x8);ReportCallEvents[_0x22ea[10]](event,_0x4947x8);_0x4947xa(null)}}module[_0x22ea[11]]= ReportCallEvents \ No newline at end of file diff --git a/server/api/report_call/report_call.socket.js b/server/api/report_call/report_call.socket.js index b76cd89..dfb9562 100644 --- a/server/api/report_call/report_call.socket.js +++ b/server/api/report_call/report_call.socket.js @@ -1,28 +1 @@ -'use strict'; - -const ReportCallEvents = require('./report_call.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_call:' + event, socket); - - ReportCallEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ReportCallEvents.removeListener(event, listener); - }; -} +var _0x1e82=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x1e82[0];const ReportCallEvents=require(_0x1e82[1]);var events=[_0x1e82[2],_0x1e82[3]];exports[_0x1e82[4]]= function(_0xd0abx3){for(var _0xd0abx4=0,_0xd0abx5=events[_0x1e82[5]];_0xd0abx4< _0xd0abx5;_0xd0abx4++){var _0xd0abx6=events[_0xd0abx4];var _0xd0abx7=createListener(_0x1e82[6]+ _0xd0abx6,_0xd0abx3);ReportCallEvents[_0x1e82[7]](_0xd0abx6,_0xd0abx7);_0xd0abx3[_0x1e82[7]](_0x1e82[8],removeListener(_0xd0abx6,_0xd0abx7))}};function createListener(_0xd0abx6,_0xd0abx3){return function(_0xd0abx9){_0xd0abx3[_0x1e82[9]](_0xd0abx6,_0xd0abx9)}}function removeListener(_0xd0abx6,_0xd0abx7){return function(){ReportCallEvents[_0x1e82[10]](_0xd0abx6,_0xd0abx7)}} \ No newline at end of file diff --git a/server/api/report_chat/index.js b/server/api/report_chat/index.js index b49820f..b45e20c 100644 --- a/server/api/report_chat/index.js +++ b/server/api/report_chat/index.js @@ -1,14 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_chat.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin', 'agent']), controller.index); -router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), license.hasChat(), auth.hasRole('agent'), controller.accept); -router.get('/:id/reject', auth.isAuthenticated(), license.hasChat(), auth.hasRole('agent'), controller.reject); - -module.exports = router; +var _0xf221=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x43\x68\x61\x74","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf221[0];var express=require(_0xf221[1]);var controller=require(_0xf221[2]);var auth=require(_0xf221[3]);var license=require(_0xf221[4]);var router=express.Router();router[_0xf221[12]](_0xf221[5],auth[_0xf221[6]](),license[_0xf221[7]](),auth[_0xf221[10]]([17],[_0xf221[8],_0xf221[9]]),controller[_0xf221[11]]);router[_0xf221[12]](_0xf221[13],auth[_0xf221[6]](),license[_0xf221[7]](),auth[_0xf221[14]](_0xf221[9]),controller[_0xf221[15]]);router[_0xf221[12]](_0xf221[16],auth[_0xf221[6]](),license[_0xf221[7]](),auth[_0xf221[14]](_0xf221[9]),controller[_0xf221[17]]);module[_0xf221[18]]= router \ No newline at end of file diff --git a/server/api/report_chat/report_chat.controller.js b/server/api/report_chat/report_chat.controller.js index f45b278..c7aa60b 100644 --- a/server/api/report_chat/report_chat.controller.js +++ b/server/api/report_chat/report_chat.controller.js @@ -1,163 +1 @@ -'use strict'; - -var _ = require('lodash'); -var md5 = require('md5'); -var moment = require('moment'); - -var ReportChat = require('../../models').ReportChat; -var ChatRoom = require('../../models').ChatRoom; -var ChatVisitor = require('../../models').ChatVisitor; -var Agent = require('../../models').User; -var sequelize = require('../../models').sequelize; - -var Util = require('../../config/util'); - -// Get list of agents -exports.index = function(req, res, next) { - return ReportChat - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single reportMail -exports.accept = function(req, res) { - var _roomid = req.params.uniqueid.split('.')[1]; - var _chatRoom; - - return ReportChat - .findById(req.params.id) - .then(function(reportChat) { - if (!reportChat) { - return res.sendStatus(404); - } - var updated = _.merge(reportChat, { - connectid: req.params.uniqueid - }); - return updated.save(); - }) - .then(function() { - return ChatRoom - .findById(_roomid); - }) - .then(function(chatRoom) { - _chatRoom = chatRoom; - return _chatRoom - .addUser(req.user.id, { - individualHooks: true - }); - }) - .then(function() { - return _chatRoom - .update({ - token: md5(JSON.stringify([req.user.id])).toString('base64'), - status: 'OPEN' - }) - }) - .then(function() { - return ChatVisitor.findById(_chatRoom.ChatVisitorId); - }) - .then(function(chatVisitor) { - if (!chatVisitor) { - return res.sendStatus(404); - } - var updated = _.merge(chatVisitor, { - status: 'accepted' - }); - return updated.save(); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return res.sendStatus(504); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new reportChat in the DB. -exports.create = function(req, res) { - return ReportChat - .create(req.body) - .then(function(reportChat) { - return res.status(201).send(reportChat); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing reportChat in the DB. -exports.update = function(req, res, next) { - if (req.body.id) { - delete req.body.id; - } - - return ReportChat - .findById(req.params.id) - .then(function(reportChat) { - if (!reportChat) { - return res.sendStatus(404); - } - var updated = _.merge(reportChat, req.body); - return updated - .save(); - }) - .then(function(reportChat) { - return res.status(200).send(reportChat); - }) - .catch(sequelize.ValidationError, function(err) { - return handleError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a reportChat from the DB. -exports.destroy = function(req, res) { - return ReportChat - .findById(req.params.id) - .then(function(reportChat) { - if (!reportChat) { - return res.sendStatus(404); - } - return reportChat.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.reject = function(req, res) { - return ReportChat - .findById(req.params.id) - .then(function(reportChat) { - if (!reportChat) { - return res.sendStatus(404); - } - var updated = _.merge(reportChat, { - rejectedAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - return updated.save(); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x5507=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x64\x35","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x55\x73\x65\x72","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x61\x63\x63\x65\x70\x74\x65\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x62\x61\x73\x65\x36\x34","\x69\x64","\x75\x73\x65\x72","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x4F\x50\x45\x4E","\x75\x70\x64\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6A\x65\x63\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0x5507[0];var _=require(_0x5507[1]);var md5=require(_0x5507[2]);var moment=require(_0x5507[3]);var ReportChat=require(_0x5507[5])[_0x5507[4]];var ChatRoom=require(_0x5507[5])[_0x5507[6]];var ChatVisitor=require(_0x5507[5])[_0x5507[7]];var Agent=require(_0x5507[5])[_0x5507[8]];var sequelize=require(_0x5507[5])[_0x5507[9]];var Util=require(_0x5507[10]);exports[_0x5507[11]]= function(_0x3d1fxa,_0x3d1fxb,_0x3d1fxc){return ReportChat[_0x5507[18]](Util[_0x5507[17]](_0x3d1fxa[_0x5507[16]]))[_0x5507[15]](function(_0x3d1fxe){_0x3d1fxb[_0x5507[14]](200)[_0x5507[13]](_0x3d1fxe)})[_0x5507[12]](function(_0x3d1fxd){return handleError(_0x3d1fxb,_0x3d1fxd)})};exports[_0x5507[19]]= function(_0x3d1fxa,_0x3d1fxb){var _0x3d1fxf=_0x3d1fxa[_0x5507[23]][_0x5507[22]][_0x5507[21]](_0x5507[20])[1];var _0x3d1fx10;return ReportChat[_0x5507[28]](_0x3d1fxa[_0x5507[23]][_0x5507[30]])[_0x5507[15]](function(_0x3d1fx14){if(!_0x3d1fx14){return _0x3d1fxb[_0x5507[24]](404)};var _0x3d1fx12=_[_0x5507[26]](_0x3d1fx14,{connectid:_0x3d1fxa[_0x5507[23]][_0x5507[22]]});return _0x3d1fx12[_0x5507[27]]()})[_0x5507[15]](function(){return ChatRoom[_0x5507[28]](_0x3d1fxf)})[_0x5507[15]](function(_0x3d1fx13){_0x3d1fx10= _0x3d1fx13;return _0x3d1fx10[_0x5507[35]](_0x3d1fxa[_0x5507[31]][_0x5507[30]],{individualHooks:true})})[_0x5507[15]](function(){return _0x3d1fx10[_0x5507[34]]({token:md5(JSON[_0x5507[32]]([_0x3d1fxa[_0x5507[31]][_0x5507[30]]])).toString(_0x5507[29]),status:_0x5507[33]})})[_0x5507[15]](function(){return ChatVisitor[_0x5507[28]](_0x3d1fx10.ChatVisitorId)})[_0x5507[15]](function(_0x3d1fx11){if(!_0x3d1fx11){return _0x3d1fxb[_0x5507[24]](404)};var _0x3d1fx12=_[_0x5507[26]](_0x3d1fx11,{status:_0x5507[25]});return _0x3d1fx12[_0x5507[27]]()})[_0x5507[15]](function(){return _0x3d1fxb[_0x5507[24]](200)})[_0x5507[12]](sequelize.UniqueConstraintError,function(_0x3d1fxd){return _0x3d1fxb[_0x5507[24]](504)})[_0x5507[12]](function(_0x3d1fxd){return handleError(_0x3d1fxb,_0x3d1fxd)})};exports[_0x5507[36]]= function(_0x3d1fxa,_0x3d1fxb){return ReportChat[_0x5507[36]](_0x3d1fxa[_0x5507[37]])[_0x5507[15]](function(_0x3d1fx14){return _0x3d1fxb[_0x5507[14]](201)[_0x5507[13]](_0x3d1fx14)})[_0x5507[12]](function(_0x3d1fxd){return handleError(_0x3d1fxb,_0x3d1fxd)})};exports[_0x5507[34]]= function(_0x3d1fxa,_0x3d1fxb,_0x3d1fxc){if(_0x3d1fxa[_0x5507[37]][_0x5507[30]]){delete _0x3d1fxa[_0x5507[37]][_0x5507[30]]};return ReportChat[_0x5507[28]](_0x3d1fxa[_0x5507[23]][_0x5507[30]])[_0x5507[15]](function(_0x3d1fx14){if(!_0x3d1fx14){return _0x3d1fxb[_0x5507[24]](404)};var _0x3d1fx12=_[_0x5507[26]](_0x3d1fx14,_0x3d1fxa[_0x5507[37]]);return _0x3d1fx12[_0x5507[27]]()})[_0x5507[15]](function(_0x3d1fx14){return _0x3d1fxb[_0x5507[14]](200)[_0x5507[13]](_0x3d1fx14)})[_0x5507[12]](sequelize.ValidationError,function(_0x3d1fxd){return handleError(_0x3d1fxb,_0x3d1fxd)})[_0x5507[12]](function(_0x3d1fxd){return handleError(_0x3d1fxb,_0x3d1fxd)})};exports[_0x5507[38]]= function(_0x3d1fxa,_0x3d1fxb){return ReportChat[_0x5507[28]](_0x3d1fxa[_0x5507[23]][_0x5507[30]])[_0x5507[15]](function(_0x3d1fx14){if(!_0x3d1fx14){return _0x3d1fxb[_0x5507[24]](404)};return _0x3d1fx14[_0x5507[38]]()})[_0x5507[15]](function(){return _0x3d1fxb[_0x5507[24]](204)})[_0x5507[12]](function(_0x3d1fxd){return handleError(_0x3d1fxb,_0x3d1fxd)})};exports[_0x5507[39]]= function(_0x3d1fxa,_0x3d1fxb){return ReportChat[_0x5507[28]](_0x3d1fxa[_0x5507[23]][_0x5507[30]])[_0x5507[15]](function(_0x3d1fx14){if(!_0x3d1fx14){return _0x3d1fxb[_0x5507[24]](404)};var _0x3d1fx12=_[_0x5507[26]](_0x3d1fx14,{rejectedAt:moment()[_0x5507[41]](_0x5507[40])});return _0x3d1fx12[_0x5507[27]]()})[_0x5507[15]](function(){return _0x3d1fxb[_0x5507[24]](200)})[_0x5507[12]](function(_0x3d1fxd){return handleError(_0x3d1fxb,_0x3d1fxd)})};function handleError(_0x3d1fxb,_0x3d1fxd){return _0x3d1fxb[_0x5507[14]](500)[_0x5507[13]](_0x3d1fxd)} \ No newline at end of file diff --git a/server/api/report_chat/report_chat.events.js b/server/api/report_chat/report_chat.events.js index dd23889..fa766d2 100644 --- a/server/api/report_chat/report_chat.events.js +++ b/server/api/report_chat/report_chat.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportChat = require('../../models').ReportChat; - -var ReportChatEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportChatEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportChat.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportChatEvents.emit(event + ':' + doc._id, doc); - ReportChatEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportChatEvents; +var _0x46f2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x46f2[0];const EventEmitter=require(_0x46f2[1]);const ReportChat=require(_0x46f2[3])[_0x46f2[2]];var ReportChatEvents= new EventEmitter();ReportChatEvents[_0x46f2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x46f2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x46f2[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x46f2[7]};for(var e in events){var event=events[e];ReportChat[_0x46f2[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xe230x8,_0xe230x9,_0xe230xa){ReportChatEvents[_0x46f2[11]](event+ _0x46f2[9]+ _0xe230x8[_0x46f2[10]],_0xe230x8);ReportChatEvents[_0x46f2[11]](event,_0xe230x8);_0xe230xa(null)}}module[_0x46f2[12]]= ReportChatEvents \ No newline at end of file diff --git a/server/api/report_chat/report_chat.socket.js b/server/api/report_chat/report_chat.socket.js index 092868e..d0e05d6 100644 --- a/server/api/report_chat/report_chat.socket.js +++ b/server/api/report_chat/report_chat.socket.js @@ -1,42 +1 @@ -'use strict'; - -const ReportChatEvents = require('./report_chat.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_chat:' + event, socket); - - ReportChatEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_chat:save': - case 'report_chat:update': - if (socket.name === doc.membername || socket.role === 'admin') { - socket.emit(event, doc); - } - break; - - case 'report_chat:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportChatEvents.removeListener(event, listener); - }; -} +var _0x854b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x854b[0];const ReportChatEvents=require(_0x854b[1]);var events=[_0x854b[2],_0x854b[3]];exports[_0x854b[4]]= function(_0x6197x3){for(var _0x6197x4=0,_0x6197x5=events[_0x854b[5]];_0x6197x4< _0x6197x5;_0x6197x4++){var _0x6197x6=events[_0x6197x4];var _0x6197x7=createListener(_0x854b[6]+ _0x6197x6,_0x6197x3);ReportChatEvents[_0x854b[7]](_0x6197x6,_0x6197x7);_0x6197x3[_0x854b[7]](_0x854b[8],removeListener(_0x6197x6,_0x6197x7))}};function createListener(_0x6197x6,_0x6197x3){return function(_0x6197x9){switch(_0x6197x6){case _0x854b[9]:;case _0x854b[15]:if(_0x6197x3[_0x854b[10]]=== _0x6197x9[_0x854b[11]]|| _0x6197x3[_0x854b[12]]=== _0x854b[13]){_0x6197x3[_0x854b[14]](_0x6197x6,_0x6197x9)};break;case _0x854b[16]:_0x6197x3[_0x854b[14]](_0x6197x6,_0x6197x9);break;default:}}}function removeListener(_0x6197x6,_0x6197x7){return function(){ReportChatEvents[_0x854b[17]](_0x6197x6,_0x6197x7)}} \ No newline at end of file diff --git a/server/api/report_chat_session/index.js b/server/api/report_chat_session/index.js index a90e04c..df289b8 100644 --- a/server/api/report_chat_session/index.js +++ b/server/api/report_chat_session/index.js @@ -1,19 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_chat_session.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.index); -router.get('/describe', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.describe); -router.get('/open', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.open); -router.get('/closed', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.closed); -router.get('/timeout', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.timeout); -router.get('/waiting', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.waiting); -router.get('/abandoned', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([17], ['admin']), controller.abandoned); -router.get('/waiting/applications', license.isValidDate(), auth.isAuthenticated(), license.hasChat(), auth.hasModule([8], ['admin', 'agent']), controller.waitingApplications); - -module.exports = router; +var _0x5abd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x43\x68\x61\x74","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E","\x2F\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x2F\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x67\x65\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x5abd[0];var express=require(_0x5abd[1]);var controller=require(_0x5abd[2]);var auth=require(_0x5abd[3]);var license=require(_0x5abd[4]);var router=express.Router();router[_0x5abd[12]](_0x5abd[5],license[_0x5abd[6]](),auth[_0x5abd[7]](),license[_0x5abd[8]](),auth[_0x5abd[10]]([17],[_0x5abd[9]]),controller[_0x5abd[11]]);router[_0x5abd[12]](_0x5abd[13],license[_0x5abd[6]](),auth[_0x5abd[7]](),license[_0x5abd[8]](),auth[_0x5abd[10]]([17],[_0x5abd[9]]),controller[_0x5abd[14]]);router[_0x5abd[12]](_0x5abd[15],license[_0x5abd[6]](),auth[_0x5abd[7]](),license[_0x5abd[8]](),auth[_0x5abd[10]]([17],[_0x5abd[9]]),controller[_0x5abd[16]]);router[_0x5abd[12]](_0x5abd[17],license[_0x5abd[6]](),auth[_0x5abd[7]](),license[_0x5abd[8]](),auth[_0x5abd[10]]([17],[_0x5abd[9]]),controller[_0x5abd[18]]);router[_0x5abd[12]](_0x5abd[19],license[_0x5abd[6]](),auth[_0x5abd[7]](),license[_0x5abd[8]](),auth[_0x5abd[10]]([17],[_0x5abd[9]]),controller[_0x5abd[20]]);router[_0x5abd[12]](_0x5abd[21],license[_0x5abd[6]](),auth[_0x5abd[7]](),license[_0x5abd[8]](),auth[_0x5abd[10]]([17],[_0x5abd[9]]),controller[_0x5abd[22]]);router[_0x5abd[12]](_0x5abd[23],license[_0x5abd[6]](),auth[_0x5abd[7]](),license[_0x5abd[8]](),auth[_0x5abd[10]]([17],[_0x5abd[9]]),controller[_0x5abd[24]]);router[_0x5abd[12]](_0x5abd[25],license[_0x5abd[6]](),auth[_0x5abd[7]](),license[_0x5abd[8]](),auth[_0x5abd[10]]([8],[_0x5abd[9],_0x5abd[26]]),controller[_0x5abd[27]]);module[_0x5abd[28]]= router \ No newline at end of file diff --git a/server/api/report_chat_session/report_chat_session.controller.js b/server/api/report_chat_session/report_chat_session.controller.js index 74b5dde..325dcbe 100644 --- a/server/api/report_chat_session/report_chat_session.controller.js +++ b/server/api/report_chat_session/report_chat_session.controller.js @@ -1,225 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ReportChatSession = require('../../models').ReportChatSession; -var User = require('../../models').User; -var ReportChatSessionHistory = require('../../models').history.ReportChatSessionHistory; -var Promise = require('bluebird'); - -var Util = require('../../config/util'); - -// Get list of agents -exports.index = function(req, res, next) { - return ReportChatSession - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Get list of fields -exports.describe = function(req, res) { - return ReportChatSessionHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getChatQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getChatQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - $or: { - queue: _.map(userQueues.rows, 'id'), - memberid: users - } - }; - }); - case 'agent': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getChatQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - $or: { - queue: _.map(userQueues, 'id'), - memberid: user.id - } - }; - }); - default: - return {}; - } - } -} - -// Get Waiting apps -exports.waitingApplications = function(req, res) { - return Promise - .all([]) - .then(getChatQueues(req.user)) - .then(function(condition) { - return ReportChatSession - .findAll(Util.getQuery(req.query, _.merge({ - leaveAt: null - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - rows: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get open apps -exports.open = function(req, res) { - return Promise - .all([]) - .then(getChatQueues(req.user)) - .then(function(condition) { - return ReportChatSession - .count(Util.getQuery(req.query, _.merge({ - leaveAt: { - $ne: null - }, - complete: null, - abandon: null, - timeout: null - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.waiting = function(req, res) { - return Promise - .all([]) - .then(getChatQueues(req.user)) - .then(function(condition) { - return ReportChatSession - .count(Util.getQuery(req.query, _.merge({ - leaveAt: null - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get closed apps -exports.closed = function(req, res) { - return Promise - .all([]) - .then(getChatQueues(req.user)) - .then(function(condition) { - return ReportChatSession - .count(Util.getQuery(req.query, _.merge({ - complete: true - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get timeout apps -exports.timeout = function(req, res) { - return Promise - .all([]) - .then(getChatQueues(req.user)) - .then(function(condition) { - return ReportChatSession - .count(Util.getQuery(req.query, _.merge({ - timeout: true - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get abandoned apps -exports.abandoned = function(req, res) { - return Promise - .all([]) - .then(getChatQueues(req.user)) - .then(function(condition) { - return ReportChatSession - .count(Util.getQuery(req.query, _.merge({ - abandon: true - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xec42=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x6F\x70\x65\x6E","\x63\x6F\x75\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67","\x63\x6C\x6F\x73\x65\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64"];_0xec42[0];var _=require(_0xec42[1]);var ReportChatSession=require(_0xec42[3])[_0xec42[2]];var User=require(_0xec42[3])[_0xec42[4]];var ReportChatSessionHistory=require(_0xec42[3])[_0xec42[6]][_0xec42[5]];var Promise=require(_0xec42[7]);var Util=require(_0xec42[8]);exports[_0xec42[9]]= function(_0x2769x7,_0x2769x8,_0x2769x9){return ReportChatSession[_0xec42[16]](Util[_0xec42[15]](_0x2769x7[_0xec42[14]]))[_0xec42[13]](function(_0x2769xb){_0x2769x8[_0xec42[12]](200)[_0xec42[11]](_0x2769xb)})[_0xec42[10]](function(_0x2769xa){return handleError(_0x2769x8,_0x2769xa)})};exports[_0xec42[17]]= function(_0x2769x7,_0x2769x8){return ReportChatSessionHistory[_0xec42[17]]()[_0xec42[13]](function(_0x2769xc){return _0x2769x8[_0xec42[12]](200)[_0xec42[11]](_0x2769xc)})[_0xec42[10]](function(_0x2769xa){return handleError(_0x2769x8,_0x2769xa)})};function getChatQueues(_0x2769xe){return function(){switch(_0x2769xe[_0xec42[28]]){case _0xec42[25]:return User[_0xec42[24]](_0x2769xe[_0xec42[18]],{attributes:[_0xec42[18]]})[_0xec42[13]](Util[_0xec42[23]]({},{attributes:[_0xec42[18]],include:[{raw:true,model:User,attributes:[_0xec42[18]]}]}))[_0xec42[13]](function(_0x2769xf){var _0x2769x10=[];_0x2769xf[_0xec42[22]][_0xec42[21]](function(_0x2769x11){_0x2769x10= _[_0xec42[20]](_0x2769x10,_[_0xec42[19]](_0x2769x11.Users,_0xec42[18]))});return {$or:{queue:_[_0xec42[19]](_0x2769xf[_0xec42[22]],_0xec42[18]),memberid:_0x2769x10}}});case _0xec42[27]:return User[_0xec42[24]](_0x2769xe[_0xec42[18]],{attributes:[_0xec42[18]]})[_0xec42[13]](function(_0x2769x12){return _0x2769x12[_0xec42[26]]({attributes:[_0xec42[18]]})})[_0xec42[13]](function(_0x2769xf){return {$or:{queue:_[_0xec42[19]](_0x2769xf,_0xec42[18]),memberid:_0x2769xe[_0xec42[18]]}}});default:return {}}}}exports[_0xec42[29]]= function(_0x2769x7,_0x2769x8){return Promise[_0xec42[33]]([])[_0xec42[13]](getChatQueues(_0x2769x7[_0xec42[25]]))[_0xec42[13]](function(_0x2769x14){return ReportChatSession[_0xec42[32]](Util[_0xec42[15]](_0x2769x7[_0xec42[14]],_[_0xec42[31]]({leaveAt:null},_0x2769x14)))})[_0xec42[13]](function(_0x2769x13){return _0x2769x8[_0xec42[12]](200)[_0xec42[11]]({rows:_0x2769x13})})[_0xec42[10]](function(_0x2769xa){console[_0xec42[30]](_0x2769xa);return handleError(_0x2769x8,_0x2769xa)})};exports[_0xec42[34]]= function(_0x2769x7,_0x2769x8){return Promise[_0xec42[33]]([])[_0xec42[13]](getChatQueues(_0x2769x7[_0xec42[25]]))[_0xec42[13]](function(_0x2769x14){return ReportChatSession[_0xec42[35]](Util[_0xec42[15]](_0x2769x7[_0xec42[14]],_[_0xec42[31]]({leaveAt:{$ne:null},complete:null,abandon:null,timeout:null},_0x2769x14)))})[_0xec42[13]](function(_0x2769x13){return _0x2769x8[_0xec42[12]](200)[_0xec42[11]]({value:_0x2769x13})})[_0xec42[10]](function(_0x2769xa){console[_0xec42[30]](_0x2769xa);return handleError(_0x2769x8,_0x2769xa)})};exports[_0xec42[36]]= function(_0x2769x7,_0x2769x8){return Promise[_0xec42[33]]([])[_0xec42[13]](getChatQueues(_0x2769x7[_0xec42[25]]))[_0xec42[13]](function(_0x2769x14){return ReportChatSession[_0xec42[35]](Util[_0xec42[15]](_0x2769x7[_0xec42[14]],_[_0xec42[31]]({leaveAt:null},_0x2769x14)))})[_0xec42[13]](function(_0x2769x13){return _0x2769x8[_0xec42[12]](200)[_0xec42[11]]({value:_0x2769x13})})[_0xec42[10]](function(_0x2769xa){console[_0xec42[30]](_0x2769xa);return handleError(_0x2769x8,_0x2769xa)})};exports[_0xec42[37]]= function(_0x2769x7,_0x2769x8){return Promise[_0xec42[33]]([])[_0xec42[13]](getChatQueues(_0x2769x7[_0xec42[25]]))[_0xec42[13]](function(_0x2769x14){return ReportChatSession[_0xec42[35]](Util[_0xec42[15]](_0x2769x7[_0xec42[14]],_[_0xec42[31]]({complete:true},_0x2769x14)))})[_0xec42[13]](function(_0x2769x13){return _0x2769x8[_0xec42[12]](200)[_0xec42[11]]({value:_0x2769x13})})[_0xec42[10]](function(_0x2769xa){console[_0xec42[30]](_0x2769xa);return handleError(_0x2769x8,_0x2769xa)})};exports[_0xec42[38]]= function(_0x2769x7,_0x2769x8){return Promise[_0xec42[33]]([])[_0xec42[13]](getChatQueues(_0x2769x7[_0xec42[25]]))[_0xec42[13]](function(_0x2769x14){return ReportChatSession[_0xec42[35]](Util[_0xec42[15]](_0x2769x7[_0xec42[14]],_[_0xec42[31]]({timeout:true},_0x2769x14)))})[_0xec42[13]](function(_0x2769x13){return _0x2769x8[_0xec42[12]](200)[_0xec42[11]]({value:_0x2769x13})})[_0xec42[10]](function(_0x2769xa){console[_0xec42[30]](_0x2769xa);return handleError(_0x2769x8,_0x2769xa)})};exports[_0xec42[39]]= function(_0x2769x7,_0x2769x8){return Promise[_0xec42[33]]([])[_0xec42[13]](getChatQueues(_0x2769x7[_0xec42[25]]))[_0xec42[13]](function(_0x2769x14){return ReportChatSession[_0xec42[35]](Util[_0xec42[15]](_0x2769x7[_0xec42[14]],_[_0xec42[31]]({abandon:true},_0x2769x14)))})[_0xec42[13]](function(_0x2769x13){return _0x2769x8[_0xec42[12]](200)[_0xec42[11]]({value:_0x2769x13})})[_0xec42[10]](function(_0x2769xa){console[_0xec42[30]](_0x2769xa);return handleError(_0x2769x8,_0x2769xa)})};function handleError(_0x2769x8,_0x2769xa){return _0x2769x8[_0xec42[12]](500)[_0xec42[11]](_0x2769xa)} \ No newline at end of file diff --git a/server/api/report_chat_session/report_chat_session.events.js b/server/api/report_chat_session/report_chat_session.events.js index 5ae9bac..8633279 100644 --- a/server/api/report_chat_session/report_chat_session.events.js +++ b/server/api/report_chat_session/report_chat_session.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportChatSession = require('../../models').ReportChatSession; - -var ReportChatSessionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportChatSessionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportChatSession.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportChatSessionEvents.emit(event + ':' + doc._id, doc); - ReportChatSessionEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportChatSessionEvents; +var _0xb852=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb852[0];const EventEmitter=require(_0xb852[1]);const ReportChatSession=require(_0xb852[3])[_0xb852[2]];var ReportChatSessionEvents= new EventEmitter();ReportChatSessionEvents[_0xb852[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb852[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb852[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb852[6]};for(var e in events){var event=events[e];ReportChatSession[_0xb852[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xdb2dx8,_0xdb2dx9,_0xdb2dxa){ReportChatSessionEvents[_0xb852[10]](event+ _0xb852[8]+ _0xdb2dx8[_0xb852[9]],_0xdb2dx8);ReportChatSessionEvents[_0xb852[10]](event,_0xdb2dx8);_0xdb2dxa(null)}}module[_0xb852[11]]= ReportChatSessionEvents \ No newline at end of file diff --git a/server/api/report_chat_session/report_chat_session.socket.js b/server/api/report_chat_session/report_chat_session.socket.js index f9b1796..ec51e24 100644 --- a/server/api/report_chat_session/report_chat_session.socket.js +++ b/server/api/report_chat_session/report_chat_session.socket.js @@ -1,102 +1 @@ -'use strict'; - -const ReportChatSessionEvents = require('./report_chat_session.events'); -const ReportChatSession = require('../../models').ReportChatSession; -const User = require('../../models').User; -const Util = require('../../config/util'); - -const _ = require('lodash'); -const Promise = require('bluebird'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_chat_session:' + event, socket); - - ReportChatSessionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - onSave(socket, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ReportChatSessionEvents.removeListener(event, listener); - }; -} - - -function getChatQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(Util.getChatQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - queue: _.map(userQueues.rows, 'id'), - memberid: users - }; - }); - case 'agent': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getChatQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - queue: _.map(userQueues, 'id'), - memberid: user.userId - }; - }); - default: - return {}; - } - } -} - -function onSave(socket, doc, cb) { - return Promise - .all([]) - .then(getChatQueues(socket)) - .then(function(condition) { - if (socket.role === 'admin' || _.includes(condition.memberid, doc.memberid) || _.includes(condition.queue, doc.queue)) { - socket.emit('report_chat_session:save', doc); - } - }) - .catch(function(err) { - console.log('Error filtering report chat sessions after save', err); - }); -} - -function onRemove(socket, doc, cb) { - socket.emit('report_chat_session:remove', doc); -} +var _0x83ce=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x63\x68\x61\x74\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x61\x66\x74\x65\x72\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x61\x64\x6D\x69\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x71\x75\x65\x75\x65","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0x83ce[0];const ReportChatSessionEvents=require(_0x83ce[1]);const ReportChatSession=require(_0x83ce[3])[_0x83ce[2]];const User=require(_0x83ce[3])[_0x83ce[4]];const Util=require(_0x83ce[5]);const _=require(_0x83ce[6]);const Promise=require(_0x83ce[7]);var events=[_0x83ce[8],_0x83ce[9]];exports[_0x83ce[10]]= function(_0xf9ffx8){for(var _0xf9ffx9=0,_0xf9ffxa=events[_0x83ce[11]];_0xf9ffx9< _0xf9ffxa;_0xf9ffx9++){var _0xf9ffxb=events[_0xf9ffx9];var _0xf9ffxc=createListener(_0x83ce[12]+ _0xf9ffxb,_0xf9ffx8);ReportChatSessionEvents[_0x83ce[13]](_0xf9ffxb,_0xf9ffxc);_0xf9ffx8[_0x83ce[13]](_0x83ce[14],removeListener(_0xf9ffxb,_0xf9ffxc))}};function createListener(_0xf9ffxb,_0xf9ffx8){return function(_0xf9ffxe){onSave(_0xf9ffx8,_0xf9ffxe)}}function removeListener(_0xf9ffxb,_0xf9ffxc){return function(){ReportChatSessionEvents[_0x83ce[15]](_0xf9ffxb,_0xf9ffxc)}}function getChatQueues(_0xf9ffx11){return function(){switch(_0xf9ffx11[_0x83ce[28]]){case _0x83ce[25]:return User[_0x83ce[24]](_0xf9ffx11[_0x83ce[23]],{attributes:[_0x83ce[16]]})[_0x83ce[21]](Util[_0x83ce[22]]({},{attributes:[_0x83ce[16]],include:[{raw:true,model:User,attributes:[_0x83ce[16]]}]}))[_0x83ce[21]](function(_0xf9ffx12){var _0xf9ffx13=[];_0xf9ffx12[_0x83ce[20]][_0x83ce[19]](function(_0xf9ffx14){_0xf9ffx13= _[_0x83ce[18]](_0xf9ffx13,_[_0x83ce[17]](_0xf9ffx14.Users,_0x83ce[16]))});return {queue:_[_0x83ce[17]](_0xf9ffx12[_0x83ce[20]],_0x83ce[16]),memberid:_0xf9ffx13}});case _0x83ce[27]:return User[_0x83ce[24]](_0xf9ffx11[_0x83ce[23]],{attributes:[_0x83ce[16]]})[_0x83ce[21]](function(_0xf9ffx15){return _0xf9ffx15[_0x83ce[26]]({attributes:[_0x83ce[16]]})})[_0x83ce[21]](function(_0xf9ffx12){return {queue:_[_0x83ce[17]](_0xf9ffx12,_0x83ce[16]),memberid:_0xf9ffx11[_0x83ce[23]]}});default:return {}}}}function onSave(_0xf9ffx8,_0xf9ffxe,_0xf9ffx17){return Promise[_0x83ce[38]]([])[_0x83ce[21]](getChatQueues(_0xf9ffx8))[_0x83ce[21]](function(_0xf9ffx19){if(_0xf9ffx8[_0x83ce[28]]=== _0x83ce[32]|| _[_0x83ce[34]](_0xf9ffx19[_0x83ce[33]],_0xf9ffxe[_0x83ce[33]])|| _[_0x83ce[34]](_0xf9ffx19[_0x83ce[35]],_0xf9ffxe[_0x83ce[35]])){_0xf9ffx8[_0x83ce[37]](_0x83ce[36],_0xf9ffxe)}})[_0x83ce[31]](function(_0xf9ffx18){console[_0x83ce[30]](_0x83ce[29],_0xf9ffx18)})}function onRemove(_0xf9ffx8,_0xf9ffxe,_0xf9ffx17){_0xf9ffx8[_0x83ce[37]](_0x83ce[39],_0xf9ffxe)} \ No newline at end of file diff --git a/server/api/report_dial/index.js b/server/api/report_dial/index.js index ea59483..25e3f47 100644 --- a/server/api/report_dial/index.js +++ b/server/api/report_dial/index.js @@ -1,14 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./report_dial.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin', 'agent']), controller.index); -router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe); -router.get('/active/calls', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'agent']), controller.activeCalls); - - -module.exports = router; +var _0x5faa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x61\x63\x74\x69\x76\x65\x2F\x63\x61\x6C\x6C\x73","\x61\x63\x74\x69\x76\x65\x43\x61\x6C\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x5faa[0];var express=require(_0x5faa[1]);var auth=require(_0x5faa[2]);var controller=require(_0x5faa[3]);var router=express.Router();router[_0x5faa[10]](_0x5faa[4],auth[_0x5faa[5]](),auth[_0x5faa[8]]([17],[_0x5faa[6],_0x5faa[7]]),controller[_0x5faa[9]]);router[_0x5faa[10]](_0x5faa[11],auth[_0x5faa[5]](),auth[_0x5faa[8]]([17],[_0x5faa[6]]),controller[_0x5faa[12]]);router[_0x5faa[10]](_0x5faa[13],auth[_0x5faa[5]](),auth[_0x5faa[8]]([7],[_0x5faa[6],_0x5faa[7]]),controller[_0x5faa[14]]);module[_0x5faa[15]]= router \ No newline at end of file diff --git a/server/api/report_dial/report_dial.controller.js b/server/api/report_dial/report_dial.controller.js index 5db39fb..392bdd0 100644 --- a/server/api/report_dial/report_dial.controller.js +++ b/server/api/report_dial/report_dial.controller.js @@ -1,116 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/report/dials -> index - * POST /api/report/dials -> create - * GET /api/report/dials/:id -> show - * PUT /api/report/dials/:id -> update - * DELETE /api/report/dials/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var sequelize = require('../../models').sequelize; -var ReportDial = require('../../models').ReportDial; -var ReportDialHistory = require('../../models').history.ReportDialHistory; -var Util = require('../../config/util'); - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - console.log(err); - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity - .destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of ReportDials -exports.index = function(req, res, next) { - return ReportDial - .findAndCountAll(Util.getQuery(req.query)) - .then(function(data) { - if (req.user.role === 'agent') { - var filteredData = []; - _.forEach(data.rows, function(elem) { - if (elem.channel && elem.channel.split(/\/|-/)[1] === req.user.name) { - filteredData.push(elem); - } - }); - return { - rows: filteredData, - count: filteredData.length - }; - } - return data; - }) - .then(function(data) { - return res.status(200).send(data); - }) - .catch(handleError(res)); -}; - -// Get Active Calls -exports.activeCalls = function(req, res) { - return ReportDial - .findAll(Util.getQuery(req.query, { - endtime: null - })) - .then(function(data) { - return res.status(200).send({ - rows: data, - count: data.length - }); - }) - .catch(handleError(res)); -}; - -// Get list of fields -exports.describe = function(req, res) { - return ReportDialHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(handleError(res)); -}; +var _0x54e4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x67","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x72\x6F\x77\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x70\x6C\x69\x74","\x6E\x61\x6D\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6C\x65\x6E\x67\x74\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x74\x69\x76\x65\x43\x61\x6C\x6C\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x54e4[0];var _=require(_0x54e4[1]);var sequelize=require(_0x54e4[3])[_0x54e4[2]];var ReportDial=require(_0x54e4[3])[_0x54e4[4]];var ReportDialHistory=require(_0x54e4[3])[_0x54e4[6]][_0x54e4[5]];var Util=require(_0x54e4[7]);function handleError(_0x1b0ex7,_0x1b0ex8){_0x1b0ex8= _0x1b0ex8|| 500;return function(_0x1b0ex9){console[_0x54e4[8]](_0x1b0ex9);_0x1b0ex7[_0x54e4[10]](_0x1b0ex8)[_0x54e4[9]](_0x1b0ex9)}}function responseWithResult(_0x1b0ex7,_0x1b0ex8){_0x1b0ex8= _0x1b0ex8|| 200;return function(_0x1b0exb){if(_0x1b0exb){_0x1b0ex7[_0x54e4[10]](_0x1b0ex8)[_0x54e4[11]](_0x1b0exb)}}}function handleEntityNotFound(_0x1b0ex7){return function(_0x1b0exb){if(!_0x1b0exb){_0x1b0ex7[_0x54e4[10]](404)[_0x54e4[12]]();return null};return _0x1b0exb}}function saveUpdates(_0x1b0exe){return function(_0x1b0exb){return _0x1b0exb[_0x54e4[14]](_0x1b0exe)[_0x54e4[13]](function(_0x1b0exf){return _0x1b0exf})}}function removeEntity(_0x1b0ex7){return function(_0x1b0exb){if(_0x1b0exb){return _0x1b0exb[_0x54e4[15]]()[_0x54e4[13]](function(){_0x1b0ex7[_0x54e4[10]](204)[_0x54e4[12]]()})}}}exports[_0x54e4[16]]= function(_0x1b0ex11,_0x1b0ex7,_0x1b0ex12){return ReportDial[_0x54e4[30]](Util[_0x54e4[29]](_0x1b0ex11[_0x54e4[28]]))[_0x54e4[13]](function(_0x1b0ex13){if(_0x1b0ex11[_0x54e4[19]][_0x54e4[18]]=== _0x54e4[20]){var _0x1b0ex14=[];_[_0x54e4[26]](_0x1b0ex13[_0x54e4[21]],function(_0x1b0ex15){if(_0x1b0ex15[_0x54e4[22]]&& _0x1b0ex15[_0x54e4[22]][_0x54e4[23]](/\/|-/)[1]=== _0x1b0ex11[_0x54e4[19]][_0x54e4[24]]){_0x1b0ex14[_0x54e4[25]](_0x1b0ex15)}});return {rows:_0x1b0ex14,count:_0x1b0ex14[_0x54e4[27]]}};return _0x1b0ex13})[_0x54e4[13]](function(_0x1b0ex13){return _0x1b0ex7[_0x54e4[10]](200)[_0x54e4[9]](_0x1b0ex13)})[_0x54e4[17]](handleError(_0x1b0ex7))};exports[_0x54e4[31]]= function(_0x1b0ex11,_0x1b0ex7){return ReportDial[_0x54e4[32]](Util[_0x54e4[29]](_0x1b0ex11[_0x54e4[28]],{endtime:null}))[_0x54e4[13]](function(_0x1b0ex13){return _0x1b0ex7[_0x54e4[10]](200)[_0x54e4[9]]({rows:_0x1b0ex13,count:_0x1b0ex13[_0x54e4[27]]})})[_0x54e4[17]](handleError(_0x1b0ex7))};exports[_0x54e4[33]]= function(_0x1b0ex11,_0x1b0ex7){return ReportDialHistory[_0x54e4[33]]()[_0x54e4[13]](function(_0x1b0ex16){return _0x1b0ex7[_0x54e4[10]](200)[_0x54e4[9]](_0x1b0ex16)})[_0x54e4[17]](handleError(_0x1b0ex7))} \ No newline at end of file diff --git a/server/api/report_dial/report_dial.events.js b/server/api/report_dial/report_dial.events.js index 385b3cf..83faf36 100644 --- a/server/api/report_dial/report_dial.events.js +++ b/server/api/report_dial/report_dial.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportDial = require('../../models').ReportDial; - -var ReportDialEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportDialEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportDial.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportDialEvents.emit(event + ':' + doc._id, doc); - ReportDialEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportDialEvents; +var _0x8dd3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8dd3[0];const EventEmitter=require(_0x8dd3[1]);const ReportDial=require(_0x8dd3[3])[_0x8dd3[2]];var ReportDialEvents= new EventEmitter();ReportDialEvents[_0x8dd3[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x8dd3[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x8dd3[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x8dd3[7]};for(var e in events){var event=events[e];ReportDial[_0x8dd3[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x142ex8,_0x142ex9,_0x142exa){ReportDialEvents[_0x8dd3[11]](event+ _0x8dd3[9]+ _0x142ex8[_0x8dd3[10]],_0x142ex8);ReportDialEvents[_0x8dd3[11]](event,_0x142ex8);_0x142exa(null)}}module[_0x8dd3[12]]= ReportDialEvents \ No newline at end of file diff --git a/server/api/report_dial/report_dial.socket.js b/server/api/report_dial/report_dial.socket.js index 7d9498d..8f384cd 100644 --- a/server/api/report_dial/report_dial.socket.js +++ b/server/api/report_dial/report_dial.socket.js @@ -1,30 +1 @@ -'use strict'; - -const ReportDialEvents = require('./report_dial.events'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_dial:' + event, socket); - - ReportDialEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - if (socket.role === 'admin' || (doc.channel && doc.channel.split(/\/|-/)[1] === socket.name)) { - socket.emit(event, doc); - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportDialEvents.removeListener(event, listener); - }; -} +var _0xde35=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x63\x68\x61\x6E\x6E\x65\x6C","\x73\x70\x6C\x69\x74","\x6E\x61\x6D\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xde35[0];const ReportDialEvents=require(_0xde35[1]);var events=[_0xde35[2],_0xde35[3],_0xde35[4]];exports[_0xde35[5]]= function(_0xe25cx3){for(var _0xe25cx4=0,_0xe25cx5=events[_0xde35[6]];_0xe25cx4< _0xe25cx5;_0xe25cx4++){var _0xe25cx6=events[_0xe25cx4];var _0xe25cx7=createListener(_0xde35[7]+ _0xe25cx6,_0xe25cx3);ReportDialEvents[_0xde35[8]](_0xe25cx6,_0xe25cx7);_0xe25cx3[_0xde35[8]](_0xde35[9],removeListener(_0xe25cx6,_0xe25cx7))}};function createListener(_0xe25cx6,_0xe25cx3){return function(_0xe25cx9){if(_0xe25cx3[_0xde35[10]]=== _0xde35[11]|| (_0xe25cx9[_0xde35[12]]&& _0xe25cx9[_0xde35[12]][_0xde35[13]](/\/|-/)[1]=== _0xe25cx3[_0xde35[14]])){_0xe25cx3[_0xde35[15]](_0xe25cx6,_0xe25cx9)}}}function removeListener(_0xe25cx6,_0xe25cx7){return function(){ReportDialEvents[_0xde35[16]](_0xe25cx6,_0xe25cx7)}} \ No newline at end of file diff --git a/server/api/report_fax/index.js b/server/api/report_fax/index.js index e19c074..af3d5ef 100644 --- a/server/api/report_fax/index.js +++ b/server/api/report_fax/index.js @@ -1,13 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_fax.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasFax(), auth.hasModule([17], ['admin', 'agent']), controller.index); -router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), license.hasFax(), auth.hasRole('agent'), controller.accept); -router.get('/:id/reject', auth.isAuthenticated(), license.hasFax(), auth.hasRole('agent'), controller.reject); -module.exports = router; +var _0x58f2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x46\x61\x78","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x58f2[0];var express=require(_0x58f2[1]);var controller=require(_0x58f2[2]);var auth=require(_0x58f2[3]);var license=require(_0x58f2[4]);var router=express.Router();router[_0x58f2[12]](_0x58f2[5],auth[_0x58f2[6]](),license[_0x58f2[7]](),auth[_0x58f2[10]]([17],[_0x58f2[8],_0x58f2[9]]),controller[_0x58f2[11]]);router[_0x58f2[12]](_0x58f2[13],auth[_0x58f2[6]](),license[_0x58f2[7]](),auth[_0x58f2[14]](_0x58f2[9]),controller[_0x58f2[15]]);router[_0x58f2[12]](_0x58f2[16],auth[_0x58f2[6]](),license[_0x58f2[7]](),auth[_0x58f2[14]](_0x58f2[9]),controller[_0x58f2[17]]);module[_0x58f2[18]]= router \ No newline at end of file diff --git a/server/api/report_fax/report_fax.controller.js b/server/api/report_fax/report_fax.controller.js index 55d6694..4014778 100644 --- a/server/api/report_fax/report_fax.controller.js +++ b/server/api/report_fax/report_fax.controller.js @@ -1,127 +1 @@ -'use strict'; - -var _ = require('lodash'); -var moment = require('moment'); - -var FaxRoom = require('../../models').FaxRoom; -var FaxRoomStatus = require('../../models').FaxRoomStatus; -var ReportFax = require('../../models').ReportFax; -var sequelize = require('../../models').sequelize; -var Agent = require('../../models').User; - -var Util = require('../../config/util'); - -// Get list of agents -exports.index = function(req, res, next) { - return ReportFax - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single reportMail -exports.accept = function(req, res) { - var _agent; - var _roomid = req.params.uniqueid.split('.')[1]; - - return Agent - .findById(req.user.id, { - attributes: ['id', 'faxCapacity'] - }) - .then(function(agent) { - _agent = agent; - return agent - .getFaxRooms({ - where: { - status: { - $ne: 'CLOSED' - }, - id: { - $ne: _roomid - } - }, - attributes: ['id'] - }); - }) - .then(function(faxRooms) { - return ReportFax - .findById(req.params.id); - }) - .then(function(reportFax) { - if (!reportFax) { - return res.sendStatus(404); - } - - var updated = _.merge(reportFax, { - connectid: req.params.uniqueid - }); - - return updated - .save(); - }) - .then(function() { - return FaxRoom - .update({ - status: 'OPEN', - openReason: 'agent' - }, { - where: { - id: _roomid - }, - user: req.user, - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return res.sendStatus(504); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single reportMail -exports.reject = function(req, res) { - var _report; - - return ReportFax - .findById(req.params.id) - .then(function(reportFax) { - _report = reportFax; - if (!reportFax) { - return res.sendStatus(404); - } - var updated = _.merge(reportFax, { - rejectedAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - return updated - .save(); - }) - .then(function() { - return FaxRoomStatus - .create({ - status: 'REJECT', - data1: req.user.name, - data2: req.user.fullname, - UserId: req.user.id, - MailRoomId: _report.roomid - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x5e3a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x61\x67\x65\x6E\x74","\x75\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x43\x4C\x4F\x53\x45\x44","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D\x73","\x66\x61\x78\x43\x61\x70\x61\x63\x69\x74\x79","\x72\x65\x6A\x65\x63\x74","\x52\x45\x4A\x45\x43\x54","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x72\x6F\x6F\x6D\x69\x64","\x63\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0x5e3a[0];var _=require(_0x5e3a[1]);var moment=require(_0x5e3a[2]);var FaxRoom=require(_0x5e3a[4])[_0x5e3a[3]];var FaxRoomStatus=require(_0x5e3a[4])[_0x5e3a[5]];var ReportFax=require(_0x5e3a[4])[_0x5e3a[6]];var sequelize=require(_0x5e3a[4])[_0x5e3a[7]];var Agent=require(_0x5e3a[4])[_0x5e3a[8]];var Util=require(_0x5e3a[9]);exports[_0x5e3a[10]]= function(_0x3533x9,_0x3533xa,_0x3533xb){return ReportFax[_0x5e3a[17]](Util[_0x5e3a[16]](_0x3533x9[_0x5e3a[15]]))[_0x5e3a[14]](function(_0x3533xd){_0x3533xa[_0x5e3a[13]](200)[_0x5e3a[12]](_0x3533xd)})[_0x5e3a[11]](function(_0x3533xc){return handleError(_0x3533xa,_0x3533xc)})};exports[_0x5e3a[18]]= function(_0x3533x9,_0x3533xa){var _0x3533xe;var _0x3533xf=_0x3533x9[_0x5e3a[22]][_0x5e3a[21]][_0x5e3a[20]](_0x5e3a[19])[1];return Agent[_0x5e3a[31]](_0x3533x9[_0x5e3a[26]][_0x5e3a[30]],{attributes:[_0x5e3a[30],_0x5e3a[34]]})[_0x5e3a[14]](function(_0x3533x13){_0x3533xe= _0x3533x13;return _0x3533x13[_0x5e3a[33]]({where:{status:{$ne:_0x5e3a[32]},id:{$ne:_0x3533xf}},attributes:[_0x5e3a[30]]})})[_0x5e3a[14]](function(_0x3533x12){return ReportFax[_0x5e3a[31]](_0x3533x9[_0x5e3a[22]][_0x5e3a[30]])})[_0x5e3a[14]](function(_0x3533x10){if(!_0x3533x10){return _0x3533xa[_0x5e3a[23]](404)};var _0x3533x11=_[_0x5e3a[28]](_0x3533x10,{connectid:_0x3533x9[_0x5e3a[22]][_0x5e3a[21]]});return _0x3533x11[_0x5e3a[29]]()})[_0x5e3a[14]](function(){return FaxRoom[_0x5e3a[27]]({status:_0x5e3a[24],openReason:_0x5e3a[25]},{where:{id:_0x3533xf},user:_0x3533x9[_0x5e3a[26]],individualHooks:true})})[_0x5e3a[14]](function(){return _0x3533xa[_0x5e3a[23]](200)})[_0x5e3a[11]](sequelize.UniqueConstraintError,function(_0x3533xc){return _0x3533xa[_0x5e3a[23]](504)})[_0x5e3a[11]](function(_0x3533xc){return handleError(_0x3533xa,_0x3533xc)})};exports[_0x5e3a[35]]= function(_0x3533x9,_0x3533xa){var _0x3533x14;return ReportFax[_0x5e3a[31]](_0x3533x9[_0x5e3a[22]][_0x5e3a[30]])[_0x5e3a[14]](function(_0x3533x10){_0x3533x14= _0x3533x10;if(!_0x3533x10){return _0x3533xa[_0x5e3a[23]](404)};var _0x3533x11=_[_0x5e3a[28]](_0x3533x10,{rejectedAt:moment()[_0x5e3a[42]](_0x5e3a[41])});return _0x3533x11[_0x5e3a[29]]()})[_0x5e3a[14]](function(){return FaxRoomStatus[_0x5e3a[40]]({status:_0x5e3a[36],data1:_0x3533x9[_0x5e3a[26]][_0x5e3a[37]],data2:_0x3533x9[_0x5e3a[26]][_0x5e3a[38]],UserId:_0x3533x9[_0x5e3a[26]][_0x5e3a[30]],MailRoomId:_0x3533x14[_0x5e3a[39]]})})[_0x5e3a[14]](function(){return _0x3533xa[_0x5e3a[23]](200)})[_0x5e3a[11]](function(_0x3533xc){return handleError(_0x3533xa,_0x3533xc)})};function handleError(_0x3533xa,_0x3533xc){return _0x3533xa[_0x5e3a[13]](500)[_0x5e3a[12]](_0x3533xc)} \ No newline at end of file diff --git a/server/api/report_fax/report_fax.events.js b/server/api/report_fax/report_fax.events.js index f0e5f3e..9d3fd69 100644 --- a/server/api/report_fax/report_fax.events.js +++ b/server/api/report_fax/report_fax.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportFax = require('../../models').ReportFax; - -var ReportFaxEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportFaxEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportFax.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportFaxEvents.emit(event + ':' + doc._id, doc); - ReportFaxEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportFaxEvents; +var _0xf092=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf092[0];const EventEmitter=require(_0xf092[1]);const ReportFax=require(_0xf092[3])[_0xf092[2]];var ReportFaxEvents= new EventEmitter();ReportFaxEvents[_0xf092[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf092[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf092[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf092[7]};for(var e in events){var event=events[e];ReportFax[_0xf092[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x5c93x8,_0x5c93x9,_0x5c93xa){ReportFaxEvents[_0xf092[11]](event+ _0xf092[9]+ _0x5c93x8[_0xf092[10]],_0x5c93x8);ReportFaxEvents[_0xf092[11]](event,_0x5c93x8);_0x5c93xa(null)}}module[_0xf092[12]]= ReportFaxEvents \ No newline at end of file diff --git a/server/api/report_fax/report_fax.socket.js b/server/api/report_fax/report_fax.socket.js index 7d32de9..9357e75 100644 --- a/server/api/report_fax/report_fax.socket.js +++ b/server/api/report_fax/report_fax.socket.js @@ -1,44 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportFaxEvents = require('./report_fax.events'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_fax:' + event, socket); - - ReportFaxEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_fax:save': - case 'report_fax:update': - if (socket.name === doc.membername || socket.role === 'admin') { - socket.emit(event, doc); - } - break; - case 'report_fax:remove': - socket.emit(event, doc); - break; - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportFaxEvents.removeListener(event, listener); - }; -} +var _0x64e4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x64e4[0];const ReportFaxEvents=require(_0x64e4[1]);var events=[_0x64e4[2],_0x64e4[3],_0x64e4[4]];exports[_0x64e4[5]]= function(_0x1812x3){for(var _0x1812x4=0,_0x1812x5=events[_0x64e4[6]];_0x1812x4< _0x1812x5;_0x1812x4++){var _0x1812x6=events[_0x1812x4];var _0x1812x7=createListener(_0x64e4[7]+ _0x1812x6,_0x1812x3);ReportFaxEvents[_0x64e4[8]](_0x1812x6,_0x1812x7);_0x1812x3[_0x64e4[8]](_0x64e4[9],removeListener(_0x1812x6,_0x1812x7))}};function createListener(_0x1812x6,_0x1812x3){return function(_0x1812x9){switch(_0x1812x6){case _0x64e4[10]:;case _0x64e4[16]:if(_0x1812x3[_0x64e4[11]]=== _0x1812x9[_0x64e4[12]]|| _0x1812x3[_0x64e4[13]]=== _0x64e4[14]){_0x1812x3[_0x64e4[15]](_0x1812x6,_0x1812x9)};break;case _0x64e4[17]:_0x1812x3[_0x64e4[15]](_0x1812x6,_0x1812x9);break;default:}}}function removeListener(_0x1812x6,_0x1812x7){return function(){ReportFaxEvents[_0x64e4[18]](_0x1812x6,_0x1812x7)}} \ No newline at end of file diff --git a/server/api/report_fax_session/index.js b/server/api/report_fax_session/index.js index 14bf55c..0022ef0 100644 --- a/server/api/report_fax_session/index.js +++ b/server/api/report_fax_session/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./report_fax_session.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasFax(), auth.hasModule([17], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), license.hasFax(), auth.hasModule([17], ['admin']), controller.describe); -router.get('/timeout', license.isValidDate(), auth.isAuthenticated(), license.hasFax(), auth.hasModule([17], ['admin']), controller.timeout); -router.get('/waiting', license.isValidDate(), auth.isAuthenticated(), license.hasFax(), auth.hasModule([17], ['admin']), controller.waiting); -router.get('/waiting/applications', auth.isAuthenticated(), license.hasFax(), auth.hasModule([10], ['admin', 'agent']), controller.waitingApplications); -module.exports = router; +var _0xeb6b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x46\x61\x78","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x74\x69\x6D\x65\x6F\x75\x74","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x67\x65\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xeb6b[0];var express=require(_0xeb6b[1]);var auth=require(_0xeb6b[2]);var controller=require(_0xeb6b[3]);var license=require(_0xeb6b[4]);var router=express.Router();router[_0xeb6b[11]](_0xeb6b[5],auth[_0xeb6b[6]](),license[_0xeb6b[7]](),auth[_0xeb6b[9]]([17],[_0xeb6b[8]]),controller[_0xeb6b[10]]);router[_0xeb6b[11]](_0xeb6b[12],auth[_0xeb6b[6]](),license[_0xeb6b[7]](),auth[_0xeb6b[9]]([17],[_0xeb6b[8]]),controller[_0xeb6b[13]]);router[_0xeb6b[11]](_0xeb6b[14],license[_0xeb6b[15]](),auth[_0xeb6b[6]](),license[_0xeb6b[7]](),auth[_0xeb6b[9]]([17],[_0xeb6b[8]]),controller[_0xeb6b[16]]);router[_0xeb6b[11]](_0xeb6b[17],license[_0xeb6b[15]](),auth[_0xeb6b[6]](),license[_0xeb6b[7]](),auth[_0xeb6b[9]]([17],[_0xeb6b[8]]),controller[_0xeb6b[18]]);router[_0xeb6b[11]](_0xeb6b[19],auth[_0xeb6b[6]](),license[_0xeb6b[7]](),auth[_0xeb6b[9]]([10],[_0xeb6b[8],_0xeb6b[20]]),controller[_0xeb6b[21]]);module[_0xeb6b[22]]= router \ No newline at end of file diff --git a/server/api/report_fax_session/report_fax_session.controller.js b/server/api/report_fax_session/report_fax_session.controller.js index 29bf8ba..3fc1380 100644 --- a/server/api/report_fax_session/report_fax_session.controller.js +++ b/server/api/report_fax_session/report_fax_session.controller.js @@ -1,238 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/report/fax/sessions -> index - * POST /api/report/fax/sessions -> create - * GET /api/report/fax/sessions/:id -> show - * PUT /api/report/fax/sessions/:id -> update - * DELETE /api/report/fax/sessions/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var ReportFaxSession = require('../../models').ReportFaxSession; -var ReportFaxSessionHistory = require('../../models').history.ReportFaxSessionHistory; -var User = require('../../models').User; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 204; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of ReportFaxSessions -exports.index = function(req, res) { - return ReportFaxSession.findAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single ReportFaxSession from the DB -exports.show = function(req, res) { - return ReportFaxSession.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new ReportFaxSession in the DB -exports.create = function(req, res) { - return ReportFaxSession.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing ReportFaxSession in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ReportFaxSession.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a ReportFaxSession from the DB -exports.destroy = function(req, res) { - return ReportFaxSession.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -exports.describe = function(req, res) { - return ReportFaxSessionHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(handleError(res)); -}; - -// Get timeout apps -exports.timeout = function(req, res) { - return Promise - .all([]) - .then(getFaxQueues(req.user)) - .then(function(condition) { - return ReportFaxSession - .count(Util.getQuery(req.query, _.merge({ - timeout: true - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get waiting apps -exports.waiting = function(req, res) { - return Promise - .all([]) - .then(getFaxQueues(req.user)) - .then(function(condition) { - return ReportFaxSession - .count(Util.getQuery(req.query, _.merge({ - leaveAt: null - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.waitingApplications = function(req, res) { - return Promise - .all([]) - .then(getFaxQueues(req.user)) - .then(function(condition) { - return ReportFaxSession - .findAll(Util.getQuery(req.query, _.merge({ - leaveAt: null - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - rows: data - }); - }) - .catch(handleError(res)); -}; - -function getFaxQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getFaxQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - $or: { - queue: _.map(userQueues.rows, 'id'), - memberid: users - } - }; - }); - case 'agent': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getFaxQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - $or: { - queue: _.map(userQueues, 'id'), - memberid: user.id - } - }; - }); - default: - return {}; - } - } -} +var _0x9376=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x75\x73\x65\x72","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65"];_0x9376[0];var _=require(_0x9376[1]);var Util=require(_0x9376[2]);var ReportFaxSession=require(_0x9376[4])[_0x9376[3]];var ReportFaxSessionHistory=require(_0x9376[4])[_0x9376[6]][_0x9376[5]];var User=require(_0x9376[4])[_0x9376[7]];function handleError(_0x2828x7,_0x2828x8){_0x2828x8= _0x2828x8|| 500;return function(_0x2828x9){_0x2828x7[_0x9376[9]](_0x2828x8)[_0x9376[8]](_0x2828x9)}}function responseWithResult(_0x2828x7,_0x2828x8){_0x2828x8= _0x2828x8|| 200;return function(_0x2828xb){if(_0x2828xb){_0x2828x7[_0x9376[9]](_0x2828x8)[_0x9376[10]](_0x2828xb)}}}function responseWithoutResult(_0x2828x7,_0x2828x8){_0x2828x8= _0x2828x8|| 204;return function(){_0x2828x7[_0x9376[11]](_0x2828x8)}}function handleEntityNotFound(_0x2828x7){return function(_0x2828xb){if(!_0x2828xb){_0x2828x7[_0x9376[9]](404)[_0x9376[12]]();return null};return _0x2828xb}}function saveUpdates(_0x2828xf){return function(_0x2828xb){return _0x2828xb[_0x9376[14]](_0x2828xf)[_0x9376[13]](function(_0x2828x10){return _0x2828x10})}}function removeEntity(_0x2828x7){return function(_0x2828xb){if(_0x2828xb){return _0x2828xb[_0x9376[15]]()[_0x9376[13]](function(){_0x2828x7[_0x9376[9]](204)[_0x9376[12]]()})}}}exports[_0x9376[16]]= function(_0x2828x12,_0x2828x7){return ReportFaxSession[_0x9376[20]](Util[_0x9376[19]](_0x2828x12[_0x9376[18]]))[_0x9376[13]](responseWithResult(_0x2828x7))[_0x9376[17]](handleError(_0x2828x7))};exports[_0x9376[21]]= function(_0x2828x12,_0x2828x7){return ReportFaxSession[_0x9376[24]](_0x2828x12[_0x9376[23]][_0x9376[22]])[_0x9376[13]](handleEntityNotFound(_0x2828x7))[_0x9376[13]](responseWithResult(_0x2828x7))[_0x9376[17]](handleError(_0x2828x7))};exports[_0x9376[25]]= function(_0x2828x12,_0x2828x7){return ReportFaxSession[_0x9376[25]](_0x2828x12[_0x9376[26]])[_0x9376[13]](responseWithResult(_0x2828x7,201))[_0x9376[17]](handleError(_0x2828x7))};exports[_0x9376[27]]= function(_0x2828x12,_0x2828x7){if(_0x2828x12[_0x9376[26]][_0x9376[22]]){delete _0x2828x12[_0x9376[26]][_0x9376[22]]};return ReportFaxSession[_0x9376[24]](_0x2828x12[_0x9376[23]][_0x9376[22]])[_0x9376[13]](handleEntityNotFound(_0x2828x7))[_0x9376[13]](saveUpdates(_0x2828x12[_0x9376[26]]))[_0x9376[13]](responseWithResult(_0x2828x7))[_0x9376[17]](handleError(_0x2828x7))};exports[_0x9376[15]]= function(_0x2828x12,_0x2828x7){return ReportFaxSession[_0x9376[24]](_0x2828x12[_0x9376[23]][_0x9376[22]])[_0x9376[13]](handleEntityNotFound(_0x2828x7))[_0x9376[13]](removeEntity(_0x2828x7))[_0x9376[17]](handleError(_0x2828x7))};exports[_0x9376[28]]= function(_0x2828x12,_0x2828x7){return ReportFaxSessionHistory[_0x9376[28]]()[_0x9376[13]](function(_0x2828x13){return _0x2828x7[_0x9376[9]](200)[_0x9376[8]](_0x2828x13)})[_0x9376[17]](handleError(_0x2828x7))};exports[_0x9376[29]]= function(_0x2828x12,_0x2828x7){return Promise[_0x9376[34]]([])[_0x9376[13]](getFaxQueues(_0x2828x12[_0x9376[33]]))[_0x9376[13]](function(_0x2828x15){return ReportFaxSession[_0x9376[32]](Util[_0x9376[19]](_0x2828x12[_0x9376[18]],_[_0x9376[31]]({timeout:true},_0x2828x15)))})[_0x9376[13]](function(_0x2828x14){return _0x2828x7[_0x9376[9]](200)[_0x9376[8]]({value:_0x2828x14})})[_0x9376[17]](function(_0x2828x9){console[_0x9376[30]](_0x2828x9);return handleError(_0x2828x7,_0x2828x9)})};exports[_0x9376[35]]= function(_0x2828x12,_0x2828x7){return Promise[_0x9376[34]]([])[_0x9376[13]](getFaxQueues(_0x2828x12[_0x9376[33]]))[_0x9376[13]](function(_0x2828x15){return ReportFaxSession[_0x9376[32]](Util[_0x9376[19]](_0x2828x12[_0x9376[18]],_[_0x9376[31]]({leaveAt:null},_0x2828x15)))})[_0x9376[13]](function(_0x2828x14){return _0x2828x7[_0x9376[9]](200)[_0x9376[8]]({value:_0x2828x14})})[_0x9376[17]](function(_0x2828x9){console[_0x9376[30]](_0x2828x9);return handleError(_0x2828x7,_0x2828x9)})};exports[_0x9376[36]]= function(_0x2828x12,_0x2828x7){return Promise[_0x9376[34]]([])[_0x9376[13]](getFaxQueues(_0x2828x12[_0x9376[33]]))[_0x9376[13]](function(_0x2828x15){return ReportFaxSession[_0x9376[20]](Util[_0x9376[19]](_0x2828x12[_0x9376[18]],_[_0x9376[31]]({leaveAt:null},_0x2828x15)))})[_0x9376[13]](function(_0x2828x14){return _0x2828x7[_0x9376[9]](200)[_0x9376[8]]({rows:_0x2828x14})})[_0x9376[17]](handleError(_0x2828x7))};function getFaxQueues(_0x2828x17){return function(){switch(_0x2828x17[_0x9376[44]]){case _0x9376[33]:return User[_0x9376[24]](_0x2828x17[_0x9376[22]],{attributes:[_0x9376[22]]})[_0x9376[13]](Util[_0x9376[41]]({},{attributes:[_0x9376[22]],include:[{raw:true,model:User,attributes:[_0x9376[22]]}]}))[_0x9376[13]](function(_0x2828x18){var _0x2828x19=[];_0x2828x18[_0x9376[40]][_0x9376[39]](function(_0x2828x1a){_0x2828x19= _[_0x9376[38]](_0x2828x19,_[_0x9376[37]](_0x2828x1a.Users,_0x9376[22]))});return {$or:{queue:_[_0x9376[37]](_0x2828x18[_0x9376[40]],_0x9376[22]),memberid:_0x2828x19}}});case _0x9376[43]:return User[_0x9376[24]](_0x2828x17[_0x9376[22]],{attributes:[_0x9376[22]]})[_0x9376[13]](function(_0x2828x1b){return _0x2828x1b[_0x9376[42]]({attributes:[_0x9376[22]]})})[_0x9376[13]](function(_0x2828x18){return {$or:{queue:_[_0x9376[37]](_0x2828x18,_0x9376[22]),memberid:_0x2828x17[_0x9376[22]]}}});default:return {}}}} \ No newline at end of file diff --git a/server/api/report_fax_session/report_fax_session.events.js b/server/api/report_fax_session/report_fax_session.events.js index 6d9b5cc..f913963 100644 --- a/server/api/report_fax_session/report_fax_session.events.js +++ b/server/api/report_fax_session/report_fax_session.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportFaxSession = require('../../models').ReportFaxSession; - -var ReportFaxSessionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportFaxSessionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportFaxSession.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportFaxSessionEvents.emit(event + ':' + doc._id, doc); - ReportFaxSessionEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportFaxSessionEvents; +var _0x2302=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2302[0];const EventEmitter=require(_0x2302[1]);const ReportFaxSession=require(_0x2302[3])[_0x2302[2]];var ReportFaxSessionEvents= new EventEmitter();ReportFaxSessionEvents[_0x2302[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2302[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2302[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2302[6]};for(var e in events){var event=events[e];ReportFaxSession[_0x2302[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xede3x8,_0xede3x9,_0xede3xa){ReportFaxSessionEvents[_0x2302[10]](event+ _0x2302[8]+ _0xede3x8[_0x2302[9]],_0xede3x8);ReportFaxSessionEvents[_0x2302[10]](event,_0xede3x8);_0xede3xa(null)}}module[_0x2302[11]]= ReportFaxSessionEvents \ No newline at end of file diff --git a/server/api/report_fax_session/report_fax_session.socket.js b/server/api/report_fax_session/report_fax_session.socket.js index 53585b9..805be77 100644 --- a/server/api/report_fax_session/report_fax_session.socket.js +++ b/server/api/report_fax_session/report_fax_session.socket.js @@ -1,104 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportFaxSession = require('./report_fax_session.events'); -const User = require('../../models').User; -const Util = require('../../config/util'); -const _ = require('lodash'); -const Promise = require('bluebird'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_fax_session:' + event, socket); - - ReportFaxSession.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_fax_session:save': - return Promise - .all([]) - .then(getFaxQueues(socket)) - .then(function(condition) { - if (socket.role === 'admin' || _.includes(condition.memberid, doc.memberid) || _.includes(condition.queue, doc.queue)) { - socket.emit(event, doc); - } - }) - .catch(function(err) { - console.log('Error filtering report fax sessions after save', err); - }); - case 'report_fax_session:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportFaxSession.removeListener(event, listener); - }; -} - -function getFaxQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(Util.getFaxQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - queue: _.map(userQueues.rows, 'id'), - memberid: users - }; - }); - case 'agent': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getFaxQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - queue: _.map(userQueues, 'id'), - memberid: user.userId - }; - }); - default: - return {}; - } - } -} +var _0xd00b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x66\x61\x78\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x61\x66\x74\x65\x72\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x71\x75\x65\x75\x65","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74"];_0xd00b[0];const ReportFaxSession=require(_0xd00b[1]);const User=require(_0xd00b[3])[_0xd00b[2]];const Util=require(_0xd00b[4]);const _=require(_0xd00b[5]);const Promise=require(_0xd00b[6]);var events=[_0xd00b[7],_0xd00b[8]];exports[_0xd00b[9]]= function(_0x5854x7){for(var _0x5854x8=0,_0x5854x9=events[_0xd00b[10]];_0x5854x8< _0x5854x9;_0x5854x8++){var _0x5854xa=events[_0x5854x8];var _0x5854xb=createListener(_0xd00b[11]+ _0x5854xa,_0x5854x7);ReportFaxSession[_0xd00b[12]](_0x5854xa,_0x5854xb);_0x5854x7[_0xd00b[12]](_0xd00b[13],removeListener(_0x5854xa,_0x5854xb))}};function createListener(_0x5854xa,_0x5854x7){return function(_0x5854xd){switch(_0x5854xa){case _0xd00b[25]:return Promise[_0xd00b[24]]([])[_0xd00b[23]](getFaxQueues(_0x5854x7))[_0xd00b[23]](function(_0x5854xf){if(_0x5854x7[_0xd00b[17]]=== _0xd00b[18]|| _[_0xd00b[20]](_0x5854xf[_0xd00b[19]],_0x5854xd[_0xd00b[19]])|| _[_0xd00b[20]](_0x5854xf[_0xd00b[21]],_0x5854xd[_0xd00b[21]])){_0x5854x7[_0xd00b[22]](_0x5854xa,_0x5854xd)}})[_0xd00b[16]](function(_0x5854xe){console[_0xd00b[15]](_0xd00b[14],_0x5854xe)});case _0xd00b[26]:_0x5854x7[_0xd00b[22]](_0x5854xa,_0x5854xd);break;default:}}}function removeListener(_0x5854xa,_0x5854xb){return function(){ReportFaxSession[_0xd00b[27]](_0x5854xa,_0x5854xb)}}function getFaxQueues(_0x5854x12){return function(){switch(_0x5854x12[_0xd00b[17]]){case _0xd00b[36]:return User[_0xd00b[35]](_0x5854x12[_0xd00b[34]],{attributes:[_0xd00b[28]]})[_0xd00b[23]](Util[_0xd00b[33]]({},{attributes:[_0xd00b[28]],include:[{raw:true,model:User,attributes:[_0xd00b[28]]}]}))[_0xd00b[23]](function(_0x5854x13){var _0x5854x14=[];_0x5854x13[_0xd00b[32]][_0xd00b[31]](function(_0x5854x15){_0x5854x14= _[_0xd00b[30]](_0x5854x14,_[_0xd00b[29]](_0x5854x15.Users,_0xd00b[28]))});return {queue:_[_0xd00b[29]](_0x5854x13[_0xd00b[32]],_0xd00b[28]),memberid:_0x5854x14}});case _0xd00b[38]:return User[_0xd00b[35]](_0x5854x12[_0xd00b[34]],{attributes:[_0xd00b[28]]})[_0xd00b[23]](function(_0x5854x16){return _0x5854x16[_0xd00b[37]]({attributes:[_0xd00b[28]]})})[_0xd00b[23]](function(_0x5854x13){return {queue:_[_0xd00b[29]](_0x5854x13,_0xd00b[28]),memberid:_0x5854x12[_0xd00b[34]]}});default:return {}}}} \ No newline at end of file diff --git a/server/api/report_integration/index.js b/server/api/report_integration/index.js index 80f013c..5a20e84 100644 --- a/server/api/report_integration/index.js +++ b/server/api/report_integration/index.js @@ -1,13 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_integration.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe); -router.post('/', auth.isAuthenticated(), controller.create); - -module.exports = router; +var _0xc0e0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc0e0[0];var express=require(_0xc0e0[1]);var controller=require(_0xc0e0[2]);var auth=require(_0xc0e0[3]);var router=express.Router();router[_0xc0e0[9]](_0xc0e0[4],auth[_0xc0e0[5]](),auth[_0xc0e0[7]]([17],[_0xc0e0[6]]),controller[_0xc0e0[8]]);router[_0xc0e0[9]](_0xc0e0[10],auth[_0xc0e0[5]](),auth[_0xc0e0[7]]([17],[_0xc0e0[6]]),controller[_0xc0e0[11]]);router[_0xc0e0[13]](_0xc0e0[4],auth[_0xc0e0[5]](),controller[_0xc0e0[12]]);module[_0xc0e0[14]]= router \ No newline at end of file diff --git a/server/api/report_integration/report_integration.controller.js b/server/api/report_integration/report_integration.controller.js index ebc479d..783c47c 100644 --- a/server/api/report_integration/report_integration.controller.js +++ b/server/api/report_integration/report_integration.controller.js @@ -1,46 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ReportIntegration = require('../../models').ReportIntegration; -var ReportIntegrationHistory = require('../../models').history.ReportIntegrationHistory; -var Util = require('../../config/util'); - -// Get list of report_integrations -exports.index = function(req, res, next) { - return ReportIntegration - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of fields -exports.describe = function(req, res) { - return ReportIntegrationHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new report_integration in the DB. -exports.create = function(req, res) { - return ReportIntegration - .create(req.body) - .then(function(report_integration) { - return res.status(201).send(report_integration); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x7b62=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79"];_0x7b62[0];var _=require(_0x7b62[1]);var ReportIntegration=require(_0x7b62[3])[_0x7b62[2]];var ReportIntegrationHistory=require(_0x7b62[3])[_0x7b62[5]][_0x7b62[4]];var Util=require(_0x7b62[6]);exports[_0x7b62[7]]= function(_0x2dc9x5,_0x2dc9x6,_0x2dc9x7){return ReportIntegration[_0x7b62[14]](Util[_0x7b62[13]](_0x2dc9x5[_0x7b62[12]]))[_0x7b62[11]](function(_0x2dc9x9){return _0x2dc9x6[_0x7b62[10]](200)[_0x7b62[9]](_0x2dc9x9)})[_0x7b62[8]](function(_0x2dc9x8){return handleError(_0x2dc9x6,_0x2dc9x8)})};exports[_0x7b62[15]]= function(_0x2dc9x5,_0x2dc9x6){return ReportIntegrationHistory[_0x7b62[15]]()[_0x7b62[11]](function(_0x2dc9xa){return _0x2dc9x6[_0x7b62[10]](200)[_0x7b62[9]](_0x2dc9xa)})[_0x7b62[8]](function(_0x2dc9x8){return handleError(_0x2dc9x6,_0x2dc9x8)})};exports[_0x7b62[16]]= function(_0x2dc9x5,_0x2dc9x6){return ReportIntegration[_0x7b62[16]](_0x2dc9x5[_0x7b62[17]])[_0x7b62[11]](function(_0x2dc9xb){return _0x2dc9x6[_0x7b62[10]](201)[_0x7b62[9]](_0x2dc9xb)})[_0x7b62[8]](function(_0x2dc9x8){return handleError(_0x2dc9x6,_0x2dc9x8)})};function handleError(_0x2dc9x6,_0x2dc9x8){return _0x2dc9x6[_0x7b62[10]](500)[_0x7b62[9]](_0x2dc9x8)} \ No newline at end of file diff --git a/server/api/report_integration/report_integration.events.js b/server/api/report_integration/report_integration.events.js index ea294b9..a2bff6b 100644 --- a/server/api/report_integration/report_integration.events.js +++ b/server/api/report_integration/report_integration.events.js @@ -1,34 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportIntegration = require('../../models').ReportIntegration; - -var ReportIntegrationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportIntegrationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportIntegration.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportIntegrationEvents.emit(event + ':' + doc._id, doc); - ReportIntegrationEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportIntegrationEvents; +var _0xc3d7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc3d7[0];const EventEmitter=require(_0xc3d7[1]);const ReportIntegration=require(_0xc3d7[3])[_0xc3d7[2]];var ReportIntegrationEvents= new EventEmitter();ReportIntegrationEvents[_0xc3d7[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc3d7[5]};for(var e in events){var event=events[e];ReportIntegration[_0xc3d7[6]](e,emitEvent(event))};function emitEvent(event){return function(_0x9b85x8,_0x9b85x9,_0x9b85xa){ReportIntegrationEvents[_0xc3d7[9]](event+ _0xc3d7[7]+ _0x9b85x8[_0xc3d7[8]],_0x9b85x8);ReportIntegrationEvents[_0xc3d7[9]](event,_0x9b85x8);_0x9b85xa(null)}}module[_0xc3d7[10]]= ReportIntegrationEvents \ No newline at end of file diff --git a/server/api/report_integration/report_integration.socket.js b/server/api/report_integration/report_integration.socket.js index 78f2dea..11e25eb 100644 --- a/server/api/report_integration/report_integration.socket.js +++ b/server/api/report_integration/report_integration.socket.js @@ -1,41 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportIntegrationEvents = require('./report_integration.events'); -const util = require('util'); - -// Model events to emit -var events = ['save']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_integration:' + event, socket); - - ReportIntegrationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_integration:save': - if (socket.name === doc.membername) { - socket.emit(util.format('report_integration:%s', doc.integration), doc); - } - break; - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportIntegrationEvents.removeListener(event, listener); - }; -} +var _0x2acd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x75\x74\x69\x6C","\x73\x61\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x25\x73","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x61\x74","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x2acd[0];const ReportIntegrationEvents=require(_0x2acd[1]);const util=require(_0x2acd[2]);var events=[_0x2acd[3]];exports[_0x2acd[4]]= function(_0xb0a8x4){for(var _0xb0a8x5=0,_0xb0a8x6=events[_0x2acd[5]];_0xb0a8x5< _0xb0a8x6;_0xb0a8x5++){var _0xb0a8x7=events[_0xb0a8x5];var _0xb0a8x8=createListener(_0x2acd[6]+ _0xb0a8x7,_0xb0a8x4);ReportIntegrationEvents[_0x2acd[7]](_0xb0a8x7,_0xb0a8x8);_0xb0a8x4[_0x2acd[7]](_0x2acd[8],removeListener(_0xb0a8x7,_0xb0a8x8))}};function createListener(_0xb0a8x7,_0xb0a8x4){return function(_0xb0a8xa){switch(_0xb0a8x7){case _0x2acd[15]:if(_0xb0a8x4[_0x2acd[9]]=== _0xb0a8xa[_0x2acd[10]]){_0xb0a8x4[_0x2acd[14]](util[_0x2acd[13]](_0x2acd[11],_0xb0a8xa[_0x2acd[12]]),_0xb0a8xa)};break;default:}}}function removeListener(_0xb0a8x7,_0xb0a8x8){return function(){ReportIntegrationEvents[_0x2acd[16]](_0xb0a8x7,_0xb0a8x8)}} \ No newline at end of file diff --git a/server/api/report_mail/index.js b/server/api/report_mail/index.js index 9256f76..7dfb5ce 100644 --- a/server/api/report_mail/index.js +++ b/server/api/report_mail/index.js @@ -1,14 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_mail.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasMail(), auth.hasModule([17], ['admin', 'agent']), controller.index); -router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), license.hasMail(), auth.hasRole('agent'), controller.accept); -router.get('/:id/reject', auth.isAuthenticated(), license.hasMail(), auth.hasRole('agent'), controller.reject); - -module.exports = router; +var _0xd2ad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4D\x61\x69\x6C","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd2ad[0];var express=require(_0xd2ad[1]);var controller=require(_0xd2ad[2]);var auth=require(_0xd2ad[3]);var license=require(_0xd2ad[4]);var router=express.Router();router[_0xd2ad[12]](_0xd2ad[5],auth[_0xd2ad[6]](),license[_0xd2ad[7]](),auth[_0xd2ad[10]]([17],[_0xd2ad[8],_0xd2ad[9]]),controller[_0xd2ad[11]]);router[_0xd2ad[12]](_0xd2ad[13],auth[_0xd2ad[6]](),license[_0xd2ad[7]](),auth[_0xd2ad[14]](_0xd2ad[9]),controller[_0xd2ad[15]]);router[_0xd2ad[12]](_0xd2ad[16],auth[_0xd2ad[6]](),license[_0xd2ad[7]](),auth[_0xd2ad[14]](_0xd2ad[9]),controller[_0xd2ad[17]]);module[_0xd2ad[18]]= router \ No newline at end of file diff --git a/server/api/report_mail/report_mail.controller.js b/server/api/report_mail/report_mail.controller.js index c0a5cde..8006e5c 100644 --- a/server/api/report_mail/report_mail.controller.js +++ b/server/api/report_mail/report_mail.controller.js @@ -1,113 +1 @@ -'use strict'; - -var _ = require('lodash'); -var moment = require('moment'); - -var Report = require('../../models').ReportMail; -var Room = require('../../models').MailRoom; -var Status = require('../../models').MailRoomStatus; - -var sequelize = require('../../models').sequelize; - -var Util = require('../../config/util'); - -// Get list of agents -exports.index = function(req, res, next) { - var where = {}; - if (req.user.role === 'agent') { - where.membername = req.user.name; - } - return Report - .findAndCountAll(Util.getQuery(req.query, where)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single reportMail -exports.accept = function(req, res) { - var _roomid = req.params.uniqueid.split('.')[1]; - - return Report - .findById(req.params.id) - .then(function(reportMail) { - if (!reportMail) { - return res.sendStatus(404); - } - - var updated = _.merge(reportMail, { - connectid: req.params.uniqueid - }); - - return updated - .save(); - }) - .then(function() { - return Room - .update({ - status: 'OPEN', - openReason: 'agent' - }, { - where: { - id: _roomid - }, - user: req.user, - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return res.sendStatus(504); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single reportMail -exports.reject = function(req, res) { - var _report; - - return Report - .findById(req.params.id) - .then(function(report) { - _report = report; - - if (!_report) { - return res.sendStatus(404); - } - - var updated = _.merge(report, { - rejectedAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - - return updated - .save(); - }) - .then(function() { - return Status - .create({ - status: 'REJECT', - data1: req.user.name, - data2: req.user.fullname, - UserId: req.user.id, - MailRoomId: _report.roomid - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - console.log(err); - return res.status(500).send(err); -} +var _0x1030=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x6E\x61\x6D\x65","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x65\x6A\x65\x63\x74","\x52\x45\x4A\x45\x43\x54","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x72\x6F\x6F\x6D\x69\x64","\x63\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67"];_0x1030[0];var _=require(_0x1030[1]);var moment=require(_0x1030[2]);var Report=require(_0x1030[4])[_0x1030[3]];var Room=require(_0x1030[4])[_0x1030[5]];var Status=require(_0x1030[4])[_0x1030[6]];var sequelize=require(_0x1030[4])[_0x1030[7]];var Util=require(_0x1030[8]);exports[_0x1030[9]]= function(_0x8cdax8,_0x8cdax9,_0x8cdaxa){var _0x8cdaxb={};if(_0x8cdax8[_0x1030[11]][_0x1030[10]]=== _0x1030[12]){_0x8cdaxb[_0x1030[13]]= _0x8cdax8[_0x1030[11]][_0x1030[14]]};return Report[_0x1030[21]](Util[_0x1030[20]](_0x8cdax8[_0x1030[19]],_0x8cdaxb))[_0x1030[18]](function(_0x8cdaxd){_0x8cdax9[_0x1030[17]](200)[_0x1030[16]](_0x8cdaxd)})[_0x1030[15]](function(_0x8cdaxc){return handleError(_0x8cdax9,_0x8cdaxc)})};exports[_0x1030[22]]= function(_0x8cdax8,_0x8cdax9){var _0x8cdaxe=_0x8cdax8[_0x1030[26]][_0x1030[25]][_0x1030[24]](_0x1030[23])[1];return Report[_0x1030[33]](_0x8cdax8[_0x1030[26]][_0x1030[32]])[_0x1030[18]](function(_0x8cdaxf){if(!_0x8cdaxf){return _0x8cdax9[_0x1030[27]](404)};var _0x8cdax10=_[_0x1030[30]](_0x8cdaxf,{connectid:_0x8cdax8[_0x1030[26]][_0x1030[25]]});return _0x8cdax10[_0x1030[31]]()})[_0x1030[18]](function(){return Room[_0x1030[29]]({status:_0x1030[28],openReason:_0x1030[12]},{where:{id:_0x8cdaxe},user:_0x8cdax8[_0x1030[11]],individualHooks:true})})[_0x1030[18]](function(){return _0x8cdax9[_0x1030[27]](200)})[_0x1030[15]](sequelize.UniqueConstraintError,function(_0x8cdaxc){return _0x8cdax9[_0x1030[27]](504)})[_0x1030[15]](function(_0x8cdaxc){return handleError(_0x8cdax9,_0x8cdaxc)})};exports[_0x1030[34]]= function(_0x8cdax8,_0x8cdax9){var _0x8cdax11;return Report[_0x1030[33]](_0x8cdax8[_0x1030[26]][_0x1030[32]])[_0x1030[18]](function(_0x8cdax12){_0x8cdax11= _0x8cdax12;if(!_0x8cdax11){return _0x8cdax9[_0x1030[27]](404)};var _0x8cdax10=_[_0x1030[30]](_0x8cdax12,{rejectedAt:moment()[_0x1030[40]](_0x1030[39])});return _0x8cdax10[_0x1030[31]]()})[_0x1030[18]](function(){return Status[_0x1030[38]]({status:_0x1030[35],data1:_0x8cdax8[_0x1030[11]][_0x1030[14]],data2:_0x8cdax8[_0x1030[11]][_0x1030[36]],UserId:_0x8cdax8[_0x1030[11]][_0x1030[32]],MailRoomId:_0x8cdax11[_0x1030[37]]})})[_0x1030[18]](function(){return _0x8cdax9[_0x1030[27]](200)})[_0x1030[15]](function(_0x8cdaxc){return handleError(_0x8cdax9,_0x8cdaxc)})};function handleError(_0x8cdax9,_0x8cdaxc){console[_0x1030[41]](_0x8cdaxc);return _0x8cdax9[_0x1030[17]](500)[_0x1030[16]](_0x8cdaxc)} \ No newline at end of file diff --git a/server/api/report_mail/report_mail.events.js b/server/api/report_mail/report_mail.events.js index 4a48caa..86aee02 100644 --- a/server/api/report_mail/report_mail.events.js +++ b/server/api/report_mail/report_mail.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportMail = require('../../models').ReportMail; - -var ReportMailEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportMailEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportMail.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportMailEvents.emit(event + ':' + doc._id, doc); - ReportMailEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportMailEvents; +var _0x60a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x60a6[0];const EventEmitter=require(_0x60a6[1]);const ReportMail=require(_0x60a6[3])[_0x60a6[2]];var ReportMailEvents= new EventEmitter();ReportMailEvents[_0x60a6[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x60a6[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x60a6[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x60a6[7]};for(var e in events){var event=events[e];ReportMail[_0x60a6[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x6be8x8,_0x6be8x9,_0x6be8xa){ReportMailEvents[_0x60a6[11]](event+ _0x60a6[9]+ _0x6be8x8[_0x60a6[10]],_0x6be8x8);ReportMailEvents[_0x60a6[11]](event,_0x6be8x8);_0x6be8xa(null)}}module[_0x60a6[12]]= ReportMailEvents \ No newline at end of file diff --git a/server/api/report_mail/report_mail.socket.js b/server/api/report_mail/report_mail.socket.js index 0b9cab3..c905ed3 100644 --- a/server/api/report_mail/report_mail.socket.js +++ b/server/api/report_mail/report_mail.socket.js @@ -1,46 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportMailEvents = require('./report_mail.events'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_mail:' + event, socket); - - ReportMailEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_mail:save': - case 'report_mail:update': - if (socket.name === doc.membername || socket.role === 'admin') { - socket.emit(event, doc); - } - break; - - case 'report_mail:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportMailEvents.removeListener(event, listener); - }; -} +var _0xb67f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb67f[0];const ReportMailEvents=require(_0xb67f[1]);var events=[_0xb67f[2],_0xb67f[3],_0xb67f[4]];exports[_0xb67f[5]]= function(_0x2cdcx3){for(var _0x2cdcx4=0,_0x2cdcx5=events[_0xb67f[6]];_0x2cdcx4< _0x2cdcx5;_0x2cdcx4++){var _0x2cdcx6=events[_0x2cdcx4];var _0x2cdcx7=createListener(_0xb67f[7]+ _0x2cdcx6,_0x2cdcx3);ReportMailEvents[_0xb67f[8]](_0x2cdcx6,_0x2cdcx7);_0x2cdcx3[_0xb67f[8]](_0xb67f[9],removeListener(_0x2cdcx6,_0x2cdcx7))}};function createListener(_0x2cdcx6,_0x2cdcx3){return function(_0x2cdcx9){switch(_0x2cdcx6){case _0xb67f[10]:;case _0xb67f[16]:if(_0x2cdcx3[_0xb67f[11]]=== _0x2cdcx9[_0xb67f[12]]|| _0x2cdcx3[_0xb67f[13]]=== _0xb67f[14]){_0x2cdcx3[_0xb67f[15]](_0x2cdcx6,_0x2cdcx9)};break;case _0xb67f[17]:_0x2cdcx3[_0xb67f[15]](_0x2cdcx6,_0x2cdcx9);break;default:}}}function removeListener(_0x2cdcx6,_0x2cdcx7){return function(){ReportMailEvents[_0xb67f[18]](_0x2cdcx6,_0x2cdcx7)}} \ No newline at end of file diff --git a/server/api/report_mail_session/index.js b/server/api/report_mail_session/index.js index 3e04193..93fa531 100644 --- a/server/api/report_mail_session/index.js +++ b/server/api/report_mail_session/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_mail_session.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasMail(), auth.hasModule([17], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), license.hasMail(), auth.hasModule([17], ['admin']), controller.describe); -router.get('/timeout', license.isValidDate(), auth.isAuthenticated(), license.hasMail(), auth.hasModule([17], ['admin']), controller.timeout); -router.get('/waiting', license.isValidDate(), auth.isAuthenticated(), license.hasMail(), auth.hasModule([17], ['admin']), controller.waiting); -router.get('/waiting/applications', auth.isAuthenticated(), license.hasMail(), auth.hasModule([9], ['admin', 'agent']), controller.waitingApplications); - -module.exports = router; +var _0xf3f5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4D\x61\x69\x6C","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x74\x69\x6D\x65\x6F\x75\x74","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x67\x65\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xf3f5[0];var express=require(_0xf3f5[1]);var controller=require(_0xf3f5[2]);var auth=require(_0xf3f5[3]);var license=require(_0xf3f5[4]);var router=express.Router();router[_0xf3f5[11]](_0xf3f5[5],auth[_0xf3f5[6]](),license[_0xf3f5[7]](),auth[_0xf3f5[9]]([17],[_0xf3f5[8]]),controller[_0xf3f5[10]]);router[_0xf3f5[11]](_0xf3f5[12],auth[_0xf3f5[6]](),license[_0xf3f5[7]](),auth[_0xf3f5[9]]([17],[_0xf3f5[8]]),controller[_0xf3f5[13]]);router[_0xf3f5[11]](_0xf3f5[14],license[_0xf3f5[15]](),auth[_0xf3f5[6]](),license[_0xf3f5[7]](),auth[_0xf3f5[9]]([17],[_0xf3f5[8]]),controller[_0xf3f5[16]]);router[_0xf3f5[11]](_0xf3f5[17],license[_0xf3f5[15]](),auth[_0xf3f5[6]](),license[_0xf3f5[7]](),auth[_0xf3f5[9]]([17],[_0xf3f5[8]]),controller[_0xf3f5[18]]);router[_0xf3f5[11]](_0xf3f5[19],auth[_0xf3f5[6]](),license[_0xf3f5[7]](),auth[_0xf3f5[9]]([9],[_0xf3f5[8],_0xf3f5[20]]),controller[_0xf3f5[21]]);module[_0xf3f5[22]]= router \ No newline at end of file diff --git a/server/api/report_mail_session/report_mail_session.controller.js b/server/api/report_mail_session/report_mail_session.controller.js index 1764001..9726418 100644 --- a/server/api/report_mail_session/report_mail_session.controller.js +++ b/server/api/report_mail_session/report_mail_session.controller.js @@ -1,155 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ReportMailSession = require('../../models').ReportMailSession; -var ReportMailSessionHistory = require('../../models').history.ReportMailSessionHistory; - -var Util = require('../../config/util'); -var User = require('../../models').User; -var Promise = require('bluebird'); - -// Get list of agents -exports.index = function(req, res, next) { - return ReportMailSession - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of fields -exports.describe = function(req, res) { - return ReportMailSession - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getMailQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getMailQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - $or: { - queue: _.map(userQueues.rows, 'id'), - memberid: users - } - }; - }); - case 'agent': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getMailQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - $or: { - queue: _.map(userQueues, 'id'), - memberid: user.id - } - }; - }); - default: - return {}; - } - } -} - -// Get timeout apps -exports.timeout = function(req, res) { - return Promise - .all([]) - .then(getMailQueues(req.user)) - .then(function(condition) { - return ReportMailSession - .count(Util.getQuery(req.query, _.merge({ - timeout: true - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get waiting apps -exports.waiting = function(req, res) { - return Promise - .all([]) - .then(getMailQueues(req.user)) - .then(function(condition) { - return ReportMailSession - .count(Util.getQuery(req.query, _.merge({ - leaveAt: null - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.waitingApplications = function(req, res) { - return Promise - .all([]) - .then(getMailQueues(req.user)) - .then(function(condition) { - return ReportMailSession - .findAll(Util.getQuery(req.query, _.merge({ - leaveAt: null - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - rows: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x40b9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x40b9[0];var _=require(_0x40b9[1]);var ReportMailSession=require(_0x40b9[3])[_0x40b9[2]];var ReportMailSessionHistory=require(_0x40b9[3])[_0x40b9[5]][_0x40b9[4]];var Util=require(_0x40b9[6]);var User=require(_0x40b9[3])[_0x40b9[7]];var Promise=require(_0x40b9[8]);exports[_0x40b9[9]]= function(_0x4c74x7,_0x4c74x8,_0x4c74x9){return ReportMailSession[_0x40b9[16]](Util[_0x40b9[15]](_0x4c74x7[_0x40b9[14]]))[_0x40b9[13]](function(_0x4c74xb){_0x4c74x8[_0x40b9[12]](200)[_0x40b9[11]](_0x4c74xb)})[_0x40b9[10]](function(_0x4c74xa){return handleError(_0x4c74x8,_0x4c74xa)})};exports[_0x40b9[17]]= function(_0x4c74x7,_0x4c74x8){return ReportMailSession[_0x40b9[17]]()[_0x40b9[13]](function(_0x4c74xc){return _0x4c74x8[_0x40b9[12]](200)[_0x40b9[11]](_0x4c74xc)})[_0x40b9[10]](function(_0x4c74xa){return handleError(_0x4c74x8,_0x4c74xa)})};function getMailQueues(_0x4c74xe){return function(){switch(_0x4c74xe[_0x40b9[28]]){case _0x40b9[25]:return User[_0x40b9[24]](_0x4c74xe[_0x40b9[18]],{attributes:[_0x40b9[18]]})[_0x40b9[13]](Util[_0x40b9[23]]({},{attributes:[_0x40b9[18]],include:[{raw:true,model:User,attributes:[_0x40b9[18]]}]}))[_0x40b9[13]](function(_0x4c74xf){var _0x4c74x10=[];_0x4c74xf[_0x40b9[22]][_0x40b9[21]](function(_0x4c74x11){_0x4c74x10= _[_0x40b9[20]](_0x4c74x10,_[_0x40b9[19]](_0x4c74x11.Users,_0x40b9[18]))});return {$or:{queue:_[_0x40b9[19]](_0x4c74xf[_0x40b9[22]],_0x40b9[18]),memberid:_0x4c74x10}}});case _0x40b9[27]:return User[_0x40b9[24]](_0x4c74xe[_0x40b9[18]],{attributes:[_0x40b9[18]]})[_0x40b9[13]](function(_0x4c74x12){return _0x4c74x12[_0x40b9[26]]({attributes:[_0x40b9[18]]})})[_0x40b9[13]](function(_0x4c74xf){return {$or:{queue:_[_0x40b9[19]](_0x4c74xf,_0x40b9[18]),memberid:_0x4c74xe[_0x40b9[18]]}}});default:return {}}}}exports[_0x40b9[29]]= function(_0x4c74x7,_0x4c74x8){return Promise[_0x40b9[33]]([])[_0x40b9[13]](getMailQueues(_0x4c74x7[_0x40b9[25]]))[_0x40b9[13]](function(_0x4c74x14){return ReportMailSession[_0x40b9[32]](Util[_0x40b9[15]](_0x4c74x7[_0x40b9[14]],_[_0x40b9[31]]({timeout:true},_0x4c74x14)))})[_0x40b9[13]](function(_0x4c74x13){return _0x4c74x8[_0x40b9[12]](200)[_0x40b9[11]]({value:_0x4c74x13})})[_0x40b9[10]](function(_0x4c74xa){console[_0x40b9[30]](_0x4c74xa);return handleError(_0x4c74x8,_0x4c74xa)})};exports[_0x40b9[34]]= function(_0x4c74x7,_0x4c74x8){return Promise[_0x40b9[33]]([])[_0x40b9[13]](getMailQueues(_0x4c74x7[_0x40b9[25]]))[_0x40b9[13]](function(_0x4c74x14){return ReportMailSession[_0x40b9[32]](Util[_0x40b9[15]](_0x4c74x7[_0x40b9[14]],_[_0x40b9[31]]({leaveAt:null},_0x4c74x14)))})[_0x40b9[13]](function(_0x4c74x13){return _0x4c74x8[_0x40b9[12]](200)[_0x40b9[11]]({value:_0x4c74x13})})[_0x40b9[10]](function(_0x4c74xa){console[_0x40b9[30]](_0x4c74xa);return handleError(_0x4c74x8,_0x4c74xa)})};exports[_0x40b9[35]]= function(_0x4c74x7,_0x4c74x8){return Promise[_0x40b9[33]]([])[_0x40b9[13]](getMailQueues(_0x4c74x7[_0x40b9[25]]))[_0x40b9[13]](function(_0x4c74x14){return ReportMailSession[_0x40b9[36]](Util[_0x40b9[15]](_0x4c74x7[_0x40b9[14]],_[_0x40b9[31]]({leaveAt:null},_0x4c74x14)))})[_0x40b9[13]](function(_0x4c74x13){return _0x4c74x8[_0x40b9[12]](200)[_0x40b9[11]]({rows:_0x4c74x13})})[_0x40b9[10]](function(_0x4c74xa){console[_0x40b9[30]](_0x4c74xa);return handleError(_0x4c74x8,_0x4c74xa)})};function handleError(_0x4c74x8,_0x4c74xa){return _0x4c74x8[_0x40b9[12]](500)[_0x40b9[11]](_0x4c74xa)} \ No newline at end of file diff --git a/server/api/report_mail_session/report_mail_session.events.js b/server/api/report_mail_session/report_mail_session.events.js index 95c4a4e..373ec8f 100644 --- a/server/api/report_mail_session/report_mail_session.events.js +++ b/server/api/report_mail_session/report_mail_session.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportMailSession = require('../../models').ReportMailSession; - -var ReportMailSessionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportMailSessionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportMailSession.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportMailSessionEvents.emit(event + ':' + doc._id, doc); - ReportMailSessionEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportMailSessionEvents; +var _0xb6e4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb6e4[0];const EventEmitter=require(_0xb6e4[1]);const ReportMailSession=require(_0xb6e4[3])[_0xb6e4[2]];var ReportMailSessionEvents= new EventEmitter();ReportMailSessionEvents[_0xb6e4[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb6e4[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb6e4[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb6e4[6]};for(var e in events){var event=events[e];ReportMailSession[_0xb6e4[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x17c5x8,_0x17c5x9,_0x17c5xa){ReportMailSessionEvents[_0xb6e4[10]](event+ _0xb6e4[8]+ _0x17c5x8[_0xb6e4[9]],_0x17c5x8);ReportMailSessionEvents[_0xb6e4[10]](event,_0x17c5x8);_0x17c5xa(null)}}module[_0xb6e4[11]]= ReportMailSessionEvents \ No newline at end of file diff --git a/server/api/report_mail_session/report_mail_session.socket.js b/server/api/report_mail_session/report_mail_session.socket.js index 5014a50..d6f02a9 100644 --- a/server/api/report_mail_session/report_mail_session.socket.js +++ b/server/api/report_mail_session/report_mail_session.socket.js @@ -1,104 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportMailSessionEvents = require('./report_mail_session.events'); -const User = require('../../models').User; -const Util = require('../../config/util'); -const _ = require('lodash'); -const Promise = require('bluebird'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_mail_session:' + event, socket); - - ReportMailSessionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_mail_session:save': - return Promise - .all([]) - .then(getMailQueues(socket)) - .then(function(condition) { - if (socket.role === 'admin' || _.includes(condition.memberid, doc.memberid) || _.includes(condition.queue, doc.queue)) { - socket.emit(event, doc); - } - }) - .catch(function(err) { - console.log('Error filtering report mail sessions after save', err); - }); - case 'report_mail_session:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportMailSessionEvents.removeListener(event, listener); - }; -} - -function getMailQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(Util.getMailQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - queue: _.map(userQueues.rows, 'id'), - memberid: users - }; - }); - case 'agent': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getMailQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - queue: _.map(userQueues, 'id'), - memberid: user.userId - }; - }); - default: - return {}; - } - } -} +var _0x561a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x6D\x61\x69\x6C\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x61\x66\x74\x65\x72\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x71\x75\x65\x75\x65","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74"];_0x561a[0];const ReportMailSessionEvents=require(_0x561a[1]);const User=require(_0x561a[3])[_0x561a[2]];const Util=require(_0x561a[4]);const _=require(_0x561a[5]);const Promise=require(_0x561a[6]);var events=[_0x561a[7],_0x561a[8]];exports[_0x561a[9]]= function(_0xc7dex7){for(var _0xc7dex8=0,_0xc7dex9=events[_0x561a[10]];_0xc7dex8< _0xc7dex9;_0xc7dex8++){var _0xc7dexa=events[_0xc7dex8];var _0xc7dexb=createListener(_0x561a[11]+ _0xc7dexa,_0xc7dex7);ReportMailSessionEvents[_0x561a[12]](_0xc7dexa,_0xc7dexb);_0xc7dex7[_0x561a[12]](_0x561a[13],removeListener(_0xc7dexa,_0xc7dexb))}};function createListener(_0xc7dexa,_0xc7dex7){return function(_0xc7dexd){switch(_0xc7dexa){case _0x561a[25]:return Promise[_0x561a[24]]([])[_0x561a[23]](getMailQueues(_0xc7dex7))[_0x561a[23]](function(_0xc7dexf){if(_0xc7dex7[_0x561a[17]]=== _0x561a[18]|| _[_0x561a[20]](_0xc7dexf[_0x561a[19]],_0xc7dexd[_0x561a[19]])|| _[_0x561a[20]](_0xc7dexf[_0x561a[21]],_0xc7dexd[_0x561a[21]])){_0xc7dex7[_0x561a[22]](_0xc7dexa,_0xc7dexd)}})[_0x561a[16]](function(_0xc7dexe){console[_0x561a[15]](_0x561a[14],_0xc7dexe)});case _0x561a[26]:_0xc7dex7[_0x561a[22]](_0xc7dexa,_0xc7dexd);break;default:}}}function removeListener(_0xc7dexa,_0xc7dexb){return function(){ReportMailSessionEvents[_0x561a[27]](_0xc7dexa,_0xc7dexb)}}function getMailQueues(_0xc7dex12){return function(){switch(_0xc7dex12[_0x561a[17]]){case _0x561a[36]:return User[_0x561a[35]](_0xc7dex12[_0x561a[34]],{attributes:[_0x561a[28]]})[_0x561a[23]](Util[_0x561a[33]]({},{attributes:[_0x561a[28]],include:[{raw:true,model:User,attributes:[_0x561a[28]]}]}))[_0x561a[23]](function(_0xc7dex13){var _0xc7dex14=[];_0xc7dex13[_0x561a[32]][_0x561a[31]](function(_0xc7dex15){_0xc7dex14= _[_0x561a[30]](_0xc7dex14,_[_0x561a[29]](_0xc7dex15.Users,_0x561a[28]))});return {queue:_[_0x561a[29]](_0xc7dex13[_0x561a[32]],_0x561a[28]),memberid:_0xc7dex14}});case _0x561a[38]:return User[_0x561a[35]](_0xc7dex12[_0x561a[34]],{attributes:[_0x561a[28]]})[_0x561a[23]](function(_0xc7dex16){return _0xc7dex16[_0x561a[37]]({attributes:[_0x561a[28]]})})[_0x561a[23]](function(_0xc7dex13){return {queue:_[_0x561a[29]](_0xc7dex13,_0x561a[28]),memberid:_0xc7dex12[_0x561a[34]]}});default:return {}}}} \ No newline at end of file diff --git a/server/api/report_member/index.js b/server/api/report_member/index.js index 0afbd74..659d400 100644 --- a/server/api/report_member/index.js +++ b/server/api/report_member/index.js @@ -1,12 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_member.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe); - -module.exports = router; +var _0x6e81=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6e81[0];var express=require(_0x6e81[1]);var controller=require(_0x6e81[2]);var auth=require(_0x6e81[3]);var router=express.Router();router[_0x6e81[9]](_0x6e81[4],auth[_0x6e81[5]](),auth[_0x6e81[7]]([17],[_0x6e81[6]]),controller[_0x6e81[8]]);router[_0x6e81[9]](_0x6e81[10],auth[_0x6e81[5]](),auth[_0x6e81[7]]([17],[_0x6e81[6]]),controller[_0x6e81[11]]);module[_0x6e81[12]]= router \ No newline at end of file diff --git a/server/api/report_member/report_member.controller.js b/server/api/report_member/report_member.controller.js index 6864b80..794ef92 100644 --- a/server/api/report_member/report_member.controller.js +++ b/server/api/report_member/report_member.controller.js @@ -1,34 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ReportMember = require('../../models').ReportMember; -var ReportMemberHistory = require('../../models').history.ReportMemberHistory; -var Util = require('../../config/util'); - -// Get list of report_members -exports.index = function(req, res, next) { - return ReportMember - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of fields -exports.describe = function(req, res) { - return ReportMemberHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x53fa=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x53fa[0];var _=require(_0x53fa[1]);var ReportMember=require(_0x53fa[3])[_0x53fa[2]];var ReportMemberHistory=require(_0x53fa[3])[_0x53fa[5]][_0x53fa[4]];var Util=require(_0x53fa[6]);exports[_0x53fa[7]]= function(_0x8718x5,_0x8718x6,_0x8718x7){return ReportMember[_0x53fa[14]](Util[_0x53fa[13]](_0x8718x5[_0x53fa[12]]))[_0x53fa[11]](function(_0x8718x9){return _0x8718x6[_0x53fa[10]](200)[_0x53fa[9]](_0x8718x9)})[_0x53fa[8]](function(_0x8718x8){return handleError(_0x8718x6,_0x8718x8)})};exports[_0x53fa[15]]= function(_0x8718x5,_0x8718x6){return ReportMemberHistory[_0x53fa[15]]()[_0x53fa[11]](function(_0x8718xa){return _0x8718x6[_0x53fa[10]](200)[_0x53fa[9]](_0x8718xa)})[_0x53fa[8]](function(_0x8718x8){return handleError(_0x8718x6,_0x8718x8)})};function handleError(_0x8718x6,_0x8718x8){return _0x8718x6[_0x53fa[10]](500)[_0x53fa[9]](_0x8718x8)} \ No newline at end of file diff --git a/server/api/report_member/report_member.events.js b/server/api/report_member/report_member.events.js index d42092f..42f494e 100644 --- a/server/api/report_member/report_member.events.js +++ b/server/api/report_member/report_member.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportMember = require('../../models').ReportMember; - -var ReportMemberEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportMemberEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportMember.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportMemberEvents.emit(event + ':' + doc._id, doc); - ReportMemberEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportMemberEvents; +var _0x5f43=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5f43[0];const EventEmitter=require(_0x5f43[1]);const ReportMember=require(_0x5f43[3])[_0x5f43[2]];var ReportMemberEvents= new EventEmitter();ReportMemberEvents[_0x5f43[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5f43[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5f43[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5f43[6]};for(var e in events){var event=events[e];ReportMember[_0x5f43[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xb8e3x8,_0xb8e3x9,_0xb8e3xa){ReportMemberEvents[_0x5f43[10]](event+ _0x5f43[8]+ _0xb8e3x8[_0x5f43[9]],_0xb8e3x8);ReportMemberEvents[_0x5f43[10]](event,_0xb8e3x8);_0xb8e3xa(null)}}module[_0x5f43[11]]= ReportMemberEvents \ No newline at end of file diff --git a/server/api/report_member/report_member.socket.js b/server/api/report_member/report_member.socket.js index d0b7de2..8c76bc1 100644 --- a/server/api/report_member/report_member.socket.js +++ b/server/api/report_member/report_member.socket.js @@ -1,45 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportMemberEvents = require('./report_member.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_member:' + event, socket); - - ReportMemberEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_member:save': - if (socket.name === doc.membername || socket.role === 'admin') { - socket.emit(event, doc); - } - break; - - case 'report_member:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportMemberEvents.removeListener(event, listener); - }; -} +var _0xbd97=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xbd97[0];const ReportMemberEvents=require(_0xbd97[1]);var events=[_0xbd97[2],_0xbd97[3]];exports[_0xbd97[4]]= function(_0x1b8ax3){for(var _0x1b8ax4=0,_0x1b8ax5=events[_0xbd97[5]];_0x1b8ax4< _0x1b8ax5;_0x1b8ax4++){var _0x1b8ax6=events[_0x1b8ax4];var _0x1b8ax7=createListener(_0xbd97[6]+ _0x1b8ax6,_0x1b8ax3);ReportMemberEvents[_0xbd97[7]](_0x1b8ax6,_0x1b8ax7);_0x1b8ax3[_0xbd97[7]](_0xbd97[8],removeListener(_0x1b8ax6,_0x1b8ax7))}};function createListener(_0x1b8ax6,_0x1b8ax3){return function(_0x1b8ax9){switch(_0x1b8ax6){case _0xbd97[14]:if(_0x1b8ax3[_0xbd97[9]]=== _0x1b8ax9[_0xbd97[10]]|| _0x1b8ax3[_0xbd97[11]]=== _0xbd97[12]){_0x1b8ax3[_0xbd97[13]](_0x1b8ax6,_0x1b8ax9)};break;case _0xbd97[15]:_0x1b8ax3[_0xbd97[13]](_0x1b8ax6,_0x1b8ax9);break;default:}}}function removeListener(_0x1b8ax6,_0x1b8ax7){return function(){ReportMemberEvents[_0xbd97[16]](_0x1b8ax6,_0x1b8ax7)}} \ No newline at end of file diff --git a/server/api/report_openchannel/index.js b/server/api/report_openchannel/index.js index 3703020..ba4b8b3 100644 --- a/server/api/report_openchannel/index.js +++ b/server/api/report_openchannel/index.js @@ -1,14 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_openchannel.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([17], ['admin', 'agent']), controller.index); -router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('agent'), controller.accept); -router.get('/:id/reject', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasRole('agent'), controller.reject); - -module.exports = router; +var _0xdd82=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdd82[0];var express=require(_0xdd82[1]);var controller=require(_0xdd82[2]);var auth=require(_0xdd82[3]);var license=require(_0xdd82[4]);var router=express.Router();router[_0xdd82[12]](_0xdd82[5],auth[_0xdd82[6]](),license[_0xdd82[7]](),auth[_0xdd82[10]]([17],[_0xdd82[8],_0xdd82[9]]),controller[_0xdd82[11]]);router[_0xdd82[12]](_0xdd82[13],auth[_0xdd82[6]](),license[_0xdd82[7]](),auth[_0xdd82[14]](_0xdd82[9]),controller[_0xdd82[15]]);router[_0xdd82[12]](_0xdd82[16],auth[_0xdd82[6]](),license[_0xdd82[7]](),auth[_0xdd82[14]](_0xdd82[9]),controller[_0xdd82[17]]);module[_0xdd82[18]]= router \ No newline at end of file diff --git a/server/api/report_openchannel/report_openchannel.controller.js b/server/api/report_openchannel/report_openchannel.controller.js index 8dd23a3..788652f 100644 --- a/server/api/report_openchannel/report_openchannel.controller.js +++ b/server/api/report_openchannel/report_openchannel.controller.js @@ -1,117 +1 @@ -'use strict'; -var _ = require('lodash'); -var ReportOpenchannel = require('../../models').ReportOpenchannel; -var OpenchannelRoom = require('../../models').OpenchannelRoom; -var sequelize = require('../../models').sequelize; -var Agent = require('../../models').User; -var Util = require('../../config/util'); -var moment = require('moment'); - - - -function handleError(res, err) { - return res.status(500).send(err); -} - -// Gets a list of Report - - - -exports.index = function(req, res) { - return ReportOpenchannel - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -// Get a single report -exports.accept = function(req, res) { - var _agent; - var _roomid = req.params.uniqueid.split('.')[1]; - - return Agent - .findById(req.user.id, { - attributes: ['id', 'openchannelCapacity'] - }) - .then(function(agent) { - _agent = agent; - return agent - .getOpenchannelRooms({ - where: { - status: { - $ne: 'CLOSED' - }, - id: { - $ne: _roomid - } - }, - attributes: ['id'] - }); - }) - .then(function(Rooms) { - return ReportOpenchannel - .findById(req.params.id); - }) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - - var updated = _.merge(report, { - connectid: req.params.uniqueid - }); - - return updated - .save(); - }) - .then(function() { - return OpenchannelRoom - .update({ - status: 'OPEN', - openReason: 'agent' - }, { - where: { - id: _roomid - }, - user: req.user, - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return res.sendStatus(504); - }) - .catch(function(err) { - return handleError(res, err); - }); - -}; - -// Get a single report -exports.reject = function(req, res) { - return ReportOpenchannel - .findById(req.params.id) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - var updated = _.merge(report, { - rejectedAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - return updated - .save(); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; +var _0xe8f8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x61\x67\x65\x6E\x74","\x75\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x43\x4C\x4F\x53\x45\x44","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x72\x65\x6A\x65\x63\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0xe8f8[0];var _=require(_0xe8f8[1]);var ReportOpenchannel=require(_0xe8f8[3])[_0xe8f8[2]];var OpenchannelRoom=require(_0xe8f8[3])[_0xe8f8[4]];var sequelize=require(_0xe8f8[3])[_0xe8f8[5]];var Agent=require(_0xe8f8[3])[_0xe8f8[6]];var Util=require(_0xe8f8[7]);var moment=require(_0xe8f8[8]);function handleError(_0x72b2x9,_0x72b2xa){return _0x72b2x9[_0xe8f8[10]](500)[_0xe8f8[9]](_0x72b2xa)}exports[_0xe8f8[11]]= function(_0x72b2xb,_0x72b2x9){return ReportOpenchannel[_0xe8f8[16]](Util[_0xe8f8[15]](_0x72b2xb[_0xe8f8[14]]))[_0xe8f8[13]](function(_0x72b2xc){_0x72b2x9[_0xe8f8[10]](200)[_0xe8f8[9]](_0x72b2xc)})[_0xe8f8[12]](function(_0x72b2xa){return handleError(_0x72b2x9,_0x72b2xa)})};exports[_0xe8f8[17]]= function(_0x72b2xb,_0x72b2x9){var _0x72b2xd;var _0x72b2xe=_0x72b2xb[_0xe8f8[21]][_0xe8f8[20]][_0xe8f8[19]](_0xe8f8[18])[1];return Agent[_0xe8f8[30]](_0x72b2xb[_0xe8f8[25]][_0xe8f8[29]],{attributes:[_0xe8f8[29],_0xe8f8[33]]})[_0xe8f8[13]](function(_0x72b2x12){_0x72b2xd= _0x72b2x12;return _0x72b2x12[_0xe8f8[32]]({where:{status:{$ne:_0xe8f8[31]},id:{$ne:_0x72b2xe}},attributes:[_0xe8f8[29]]})})[_0xe8f8[13]](function(_0x72b2x11){return ReportOpenchannel[_0xe8f8[30]](_0x72b2xb[_0xe8f8[21]][_0xe8f8[29]])})[_0xe8f8[13]](function(_0x72b2xf){if(!_0x72b2xf){return _0x72b2x9[_0xe8f8[22]](404)};var _0x72b2x10=_[_0xe8f8[27]](_0x72b2xf,{connectid:_0x72b2xb[_0xe8f8[21]][_0xe8f8[20]]});return _0x72b2x10[_0xe8f8[28]]()})[_0xe8f8[13]](function(){return OpenchannelRoom[_0xe8f8[26]]({status:_0xe8f8[23],openReason:_0xe8f8[24]},{where:{id:_0x72b2xe},user:_0x72b2xb[_0xe8f8[25]],individualHooks:true})})[_0xe8f8[13]](function(){return _0x72b2x9[_0xe8f8[22]](200)})[_0xe8f8[12]](sequelize.UniqueConstraintError,function(_0x72b2xa){return _0x72b2x9[_0xe8f8[22]](504)})[_0xe8f8[12]](function(_0x72b2xa){return handleError(_0x72b2x9,_0x72b2xa)})};exports[_0xe8f8[34]]= function(_0x72b2xb,_0x72b2x9){return ReportOpenchannel[_0xe8f8[30]](_0x72b2xb[_0xe8f8[21]][_0xe8f8[29]])[_0xe8f8[13]](function(_0x72b2xf){if(!_0x72b2xf){return _0x72b2x9[_0xe8f8[22]](404)};var _0x72b2x10=_[_0xe8f8[27]](_0x72b2xf,{rejectedAt:moment()[_0xe8f8[36]](_0xe8f8[35])});return _0x72b2x10[_0xe8f8[28]]()})[_0xe8f8[13]](function(){return _0x72b2x9[_0xe8f8[22]](200)})[_0xe8f8[12]](function(_0x72b2xa){return handleError(_0x72b2x9,_0x72b2xa)})} \ No newline at end of file diff --git a/server/api/report_openchannel/report_openchannel.events.js b/server/api/report_openchannel/report_openchannel.events.js index e0277fc..1dd69a2 100644 --- a/server/api/report_openchannel/report_openchannel.events.js +++ b/server/api/report_openchannel/report_openchannel.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportOpenchannel = require('../../models').ReportOpenchannel; - -var ReportOpenchannelEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportOpenchannelEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportOpenchannel.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportOpenchannelEvents.emit(event + ':' + doc._id, doc); - ReportOpenchannelEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportOpenchannelEvents; +var _0xaace=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xaace[0];const EventEmitter=require(_0xaace[1]);const ReportOpenchannel=require(_0xaace[3])[_0xaace[2]];var ReportOpenchannelEvents= new EventEmitter();ReportOpenchannelEvents[_0xaace[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xaace[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xaace[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xaace[7]};for(var e in events){var event=events[e];ReportOpenchannel[_0xaace[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x39f6x8,_0x39f6x9,_0x39f6xa){ReportOpenchannelEvents[_0xaace[11]](event+ _0xaace[9]+ _0x39f6x8[_0xaace[10]],_0x39f6x8);ReportOpenchannelEvents[_0xaace[11]](event,_0x39f6x8);_0x39f6xa(null)}}module[_0xaace[12]]= ReportOpenchannelEvents \ No newline at end of file diff --git a/server/api/report_openchannel/report_openchannel.socket.js b/server/api/report_openchannel/report_openchannel.socket.js index 994bcd8..55c810d 100644 --- a/server/api/report_openchannel/report_openchannel.socket.js +++ b/server/api/report_openchannel/report_openchannel.socket.js @@ -1,45 +1 @@ -/** - * Broadcast updates to client when the model changes - */ -// -'use strict'; -// -const ReportOpenchannelEvents = require('./report_openchannel.events'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_openchannel:' + event, socket); - - ReportOpenchannelEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_openchannel:save': - case 'report_openchannel:update': - if (socket.name === doc.membername || socket.role === 'admin') { - socket.emit(event, doc); - } - break; - case 'report_openchannel:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportOpenchannelEvents.removeListener(event, listener); - }; -} +var _0x9a55=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x9a55[0];const ReportOpenchannelEvents=require(_0x9a55[1]);var events=[_0x9a55[2],_0x9a55[3],_0x9a55[4]];exports[_0x9a55[5]]= function(_0x4156x3){for(var _0x4156x4=0,_0x4156x5=events[_0x9a55[6]];_0x4156x4< _0x4156x5;_0x4156x4++){var _0x4156x6=events[_0x4156x4];var _0x4156x7=createListener(_0x9a55[7]+ _0x4156x6,_0x4156x3);ReportOpenchannelEvents[_0x9a55[8]](_0x4156x6,_0x4156x7);_0x4156x3[_0x9a55[8]](_0x9a55[9],removeListener(_0x4156x6,_0x4156x7))}};function createListener(_0x4156x6,_0x4156x3){return function(_0x4156x9){switch(_0x4156x6){case _0x9a55[10]:;case _0x9a55[16]:if(_0x4156x3[_0x9a55[11]]=== _0x4156x9[_0x9a55[12]]|| _0x4156x3[_0x9a55[13]]=== _0x9a55[14]){_0x4156x3[_0x9a55[15]](_0x4156x6,_0x4156x9)};break;case _0x9a55[17]:_0x4156x3[_0x9a55[15]](_0x4156x6,_0x4156x9);break;default:}}}function removeListener(_0x4156x6,_0x4156x7){return function(){ReportOpenchannelEvents[_0x9a55[18]](_0x4156x6,_0x4156x7)}} \ No newline at end of file diff --git a/server/api/report_openchannel_session/index.js b/server/api/report_openchannel_session/index.js index 832ba1c..0059100 100644 --- a/server/api/report_openchannel_session/index.js +++ b/server/api/report_openchannel_session/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_openchannel_session.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.describe); -router.get('/timeout', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.timeout); -router.get('/waiting', license.isValidDate(), auth.isAuthenticated(), license.hasOpenchannel(), auth.hasModule([20], ['admin']), controller.waiting); -router.get('/waiting/applications', auth.isAuthenticated(), license.hasOpenchannel(), controller.waitingApplications); -// , auth.hasModule([11], ['admin', 'agent']) -module.exports = router; +var _0xf7d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x74\x69\x6D\x65\x6F\x75\x74","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xf7d2[0];var express=require(_0xf7d2[1]);var controller=require(_0xf7d2[2]);var auth=require(_0xf7d2[3]);var license=require(_0xf7d2[4]);var router=express.Router();router[_0xf7d2[11]](_0xf7d2[5],auth[_0xf7d2[6]](),license[_0xf7d2[7]](),auth[_0xf7d2[9]]([20],[_0xf7d2[8]]),controller[_0xf7d2[10]]);router[_0xf7d2[11]](_0xf7d2[12],auth[_0xf7d2[6]](),license[_0xf7d2[7]](),auth[_0xf7d2[9]]([20],[_0xf7d2[8]]),controller[_0xf7d2[13]]);router[_0xf7d2[11]](_0xf7d2[14],license[_0xf7d2[15]](),auth[_0xf7d2[6]](),license[_0xf7d2[7]](),auth[_0xf7d2[9]]([20],[_0xf7d2[8]]),controller[_0xf7d2[16]]);router[_0xf7d2[11]](_0xf7d2[17],license[_0xf7d2[15]](),auth[_0xf7d2[6]](),license[_0xf7d2[7]](),auth[_0xf7d2[9]]([20],[_0xf7d2[8]]),controller[_0xf7d2[18]]);router[_0xf7d2[11]](_0xf7d2[19],auth[_0xf7d2[6]](),license[_0xf7d2[7]](),controller[_0xf7d2[20]]);module[_0xf7d2[21]]= router \ No newline at end of file diff --git a/server/api/report_openchannel_session/report_openchannel_session.controller.js b/server/api/report_openchannel_session/report_openchannel_session.controller.js index e6a814a..9807cd6 100644 --- a/server/api/report_openchannel_session/report_openchannel_session.controller.js +++ b/server/api/report_openchannel_session/report_openchannel_session.controller.js @@ -1,155 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ReportOpenchannelSession = require('../../models').ReportOpenchannelSession; -var ReportOpenchannelSessionHistory = require('../../models').history.ReportOpenchannelSessionHistory; - -var Util = require('../../config/util'); -var User = require('../../models').User; -var Promise = require('bluebird'); - -// Get list of agents -exports.index = function(req, res, next) { - return ReportOpenchannelSession - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of fields -exports.describe = function(req, res) { - return ReportOpenchannelSessionHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getOpenchannelQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getOpenchannelQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - $or: { - queue: _.map(userQueues.rows, 'id'), - memberid: users - } - }; - }); - case 'agent': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getOpenchannelQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - $or: { - queue: _.map(userQueues, 'id'), - memberid: user.id - } - }; - }); - default: - return {}; - } - } -} - -// Get timeout apps -exports.timeout = function(req, res) { - return Promise - .all([]) - .then(getOpenchannelQueues(req.user)) - .then(function(condition) { - return ReportOpenchannelSession - .count(Util.getQuery(req.query, _.merge({ - timeout: true - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get waiting apps -exports.waiting = function(req, res) { - return Promise - .all([]) - .then(getOpenchannelQueues(req.user)) - .then(function(condition) { - return ReportOpenchannelSession - .count(Util.getQuery(req.query, _.merge({ - leaveAt: null - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.waitingApplications = function(req, res) { - return Promise - .all([]) - .then(getOpenchannelQueues(req.user)) - .then(function(condition) { - return ReportOpenchannelSession - .findAll(Util.getQuery(req.query, _.merge({ - leaveAt: null - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - rows: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x56b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x56b0[0];var _=require(_0x56b0[1]);var ReportOpenchannelSession=require(_0x56b0[3])[_0x56b0[2]];var ReportOpenchannelSessionHistory=require(_0x56b0[3])[_0x56b0[5]][_0x56b0[4]];var Util=require(_0x56b0[6]);var User=require(_0x56b0[3])[_0x56b0[7]];var Promise=require(_0x56b0[8]);exports[_0x56b0[9]]= function(_0x257ax7,_0x257ax8,_0x257ax9){return ReportOpenchannelSession[_0x56b0[16]](Util[_0x56b0[15]](_0x257ax7[_0x56b0[14]]))[_0x56b0[13]](function(_0x257axb){_0x257ax8[_0x56b0[12]](200)[_0x56b0[11]](_0x257axb)})[_0x56b0[10]](function(_0x257axa){return handleError(_0x257ax8,_0x257axa)})};exports[_0x56b0[17]]= function(_0x257ax7,_0x257ax8){return ReportOpenchannelSessionHistory[_0x56b0[17]]()[_0x56b0[13]](function(_0x257axc){return _0x257ax8[_0x56b0[12]](200)[_0x56b0[11]](_0x257axc)})[_0x56b0[10]](function(_0x257axa){return handleError(_0x257ax8,_0x257axa)})};function getOpenchannelQueues(_0x257axe){return function(){switch(_0x257axe[_0x56b0[28]]){case _0x56b0[25]:return User[_0x56b0[24]](_0x257axe[_0x56b0[18]],{attributes:[_0x56b0[18]]})[_0x56b0[13]](Util[_0x56b0[23]]({},{attributes:[_0x56b0[18]],include:[{raw:true,model:User,attributes:[_0x56b0[18]]}]}))[_0x56b0[13]](function(_0x257axf){var _0x257ax10=[];_0x257axf[_0x56b0[22]][_0x56b0[21]](function(_0x257ax11){_0x257ax10= _[_0x56b0[20]](_0x257ax10,_[_0x56b0[19]](_0x257ax11.Users,_0x56b0[18]))});return {$or:{queue:_[_0x56b0[19]](_0x257axf[_0x56b0[22]],_0x56b0[18]),memberid:_0x257ax10}}});case _0x56b0[27]:return User[_0x56b0[24]](_0x257axe[_0x56b0[18]],{attributes:[_0x56b0[18]]})[_0x56b0[13]](function(_0x257ax12){return _0x257ax12[_0x56b0[26]]({attributes:[_0x56b0[18]]})})[_0x56b0[13]](function(_0x257axf){return {$or:{queue:_[_0x56b0[19]](_0x257axf,_0x56b0[18]),memberid:_0x257axe[_0x56b0[18]]}}});default:return {}}}}exports[_0x56b0[29]]= function(_0x257ax7,_0x257ax8){return Promise[_0x56b0[33]]([])[_0x56b0[13]](getOpenchannelQueues(_0x257ax7[_0x56b0[25]]))[_0x56b0[13]](function(_0x257ax14){return ReportOpenchannelSession[_0x56b0[32]](Util[_0x56b0[15]](_0x257ax7[_0x56b0[14]],_[_0x56b0[31]]({timeout:true},_0x257ax14)))})[_0x56b0[13]](function(_0x257ax13){return _0x257ax8[_0x56b0[12]](200)[_0x56b0[11]]({value:_0x257ax13})})[_0x56b0[10]](function(_0x257axa){console[_0x56b0[30]](_0x257axa);return handleError(_0x257ax8,_0x257axa)})};exports[_0x56b0[34]]= function(_0x257ax7,_0x257ax8){return Promise[_0x56b0[33]]([])[_0x56b0[13]](getOpenchannelQueues(_0x257ax7[_0x56b0[25]]))[_0x56b0[13]](function(_0x257ax14){return ReportOpenchannelSession[_0x56b0[32]](Util[_0x56b0[15]](_0x257ax7[_0x56b0[14]],_[_0x56b0[31]]({leaveAt:null},_0x257ax14)))})[_0x56b0[13]](function(_0x257ax13){return _0x257ax8[_0x56b0[12]](200)[_0x56b0[11]]({value:_0x257ax13})})[_0x56b0[10]](function(_0x257axa){console[_0x56b0[30]](_0x257axa);return handleError(_0x257ax8,_0x257axa)})};exports[_0x56b0[35]]= function(_0x257ax7,_0x257ax8){return Promise[_0x56b0[33]]([])[_0x56b0[13]](getOpenchannelQueues(_0x257ax7[_0x56b0[25]]))[_0x56b0[13]](function(_0x257ax14){return ReportOpenchannelSession[_0x56b0[36]](Util[_0x56b0[15]](_0x257ax7[_0x56b0[14]],_[_0x56b0[31]]({leaveAt:null},_0x257ax14)))})[_0x56b0[13]](function(_0x257ax13){return _0x257ax8[_0x56b0[12]](200)[_0x56b0[11]]({rows:_0x257ax13})})[_0x56b0[10]](function(_0x257axa){console[_0x56b0[30]](_0x257axa);return handleError(_0x257ax8,_0x257axa)})};function handleError(_0x257ax8,_0x257axa){return _0x257ax8[_0x56b0[12]](500)[_0x56b0[11]](_0x257axa)} \ No newline at end of file diff --git a/server/api/report_openchannel_session/report_openchannel_session.events.js b/server/api/report_openchannel_session/report_openchannel_session.events.js index 0c9e3ff..832fdf5 100644 --- a/server/api/report_openchannel_session/report_openchannel_session.events.js +++ b/server/api/report_openchannel_session/report_openchannel_session.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportOpenchannelSession = require('../../models').ReportOpenchannelSession; - -var ReportOpenchannelSessionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportOpenchannelSessionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportOpenchannelSession.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportOpenchannelSessionEvents.emit(event + ':' + doc._id, doc); - ReportOpenchannelSessionEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportOpenchannelSessionEvents; +var _0x45b2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x45b2[0];const EventEmitter=require(_0x45b2[1]);const ReportOpenchannelSession=require(_0x45b2[3])[_0x45b2[2]];var ReportOpenchannelSessionEvents= new EventEmitter();ReportOpenchannelSessionEvents[_0x45b2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x45b2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x45b2[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x45b2[6]};for(var e in events){var event=events[e];ReportOpenchannelSession[_0x45b2[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7eadx8,_0x7eadx9,_0x7eadxa){ReportOpenchannelSessionEvents[_0x45b2[10]](event+ _0x45b2[8]+ _0x7eadx8[_0x45b2[9]],_0x7eadx8);ReportOpenchannelSessionEvents[_0x45b2[10]](event,_0x7eadx8);_0x7eadxa(null)}}module[_0x45b2[11]]= ReportOpenchannelSessionEvents \ No newline at end of file diff --git a/server/api/report_openchannel_session/report_openchannel_session.socket.js b/server/api/report_openchannel_session/report_openchannel_session.socket.js index 36ca924..cf722df 100644 --- a/server/api/report_openchannel_session/report_openchannel_session.socket.js +++ b/server/api/report_openchannel_session/report_openchannel_session.socket.js @@ -1,90 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var ReportOpenchannelSession = require('../../models').ReportOpenchannelSession; -var User = require('../../models').User; -var Util = require('../../config/util'); -var _ = require('lodash'); -var Promise = require('bluebird'); - -exports.register = function(socket) { - ReportOpenchannelSession.afterCreate(function(doc) { - onSave(socket, doc); - }); - ReportOpenchannelSession.afterUpdate(function(doc) { - onSave(socket, doc); - }); - ReportOpenchannelSession.afterDestroy(function(doc) { - onRemove(socket, doc); - }); -} - -function getOpenchannelQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(Util.getOpenchannelQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - queue: _.map(userQueues.rows, 'id'), - memberid: users - }; - }); - case 'agent': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getOpenchannelQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - queue: _.map(userQueues, 'id'), - memberid: user.userId - }; - }); - default: - return {}; - } - } -} - -function onSave(socket, doc, cb) { - return Promise - .all([]) - .then(getOpenchannelQueues(socket)) - .then(function(condition) { - if (socket.role === 'admin' || _.includes(condition.memberid, doc.memberid) || _.includes(condition.queue, doc.queue)) { - socket.emit('report_openchannel_session:save', doc); - } - }) - .catch(function(err) { - console.log('Error filtering report Openchannel sessions after save', err); - }); -} - -function onRemove(socket, doc, cb) { - socket.emit('report_openchannel_session:remove', doc); -} +var _0x788f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x61\x66\x74\x65\x72\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x61\x64\x6D\x69\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x71\x75\x65\x75\x65","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65"];_0x788f[0];var ReportOpenchannelSession=require(_0x788f[2])[_0x788f[1]];var User=require(_0x788f[2])[_0x788f[3]];var Util=require(_0x788f[4]);var _=require(_0x788f[5]);var Promise=require(_0x788f[6]);exports[_0x788f[7]]= function(_0x6815x6){ReportOpenchannelSession[_0x788f[8]](function(_0x6815x7){onSave(_0x6815x6,_0x6815x7)});ReportOpenchannelSession[_0x788f[9]](function(_0x6815x7){onSave(_0x6815x6,_0x6815x7)});ReportOpenchannelSession[_0x788f[10]](function(_0x6815x7){onRemove(_0x6815x6,_0x6815x7)})};function getOpenchannelQueues(_0x6815x9){return function(){switch(_0x6815x9[_0x788f[23]]){case _0x788f[20]:return User[_0x788f[19]](_0x6815x9[_0x788f[18]],{attributes:[_0x788f[11]]})[_0x788f[16]](Util[_0x788f[17]]({},{attributes:[_0x788f[11]],include:[{raw:true,model:User,attributes:[_0x788f[11]]}]}))[_0x788f[16]](function(_0x6815xa){var _0x6815xb=[];_0x6815xa[_0x788f[15]][_0x788f[14]](function(_0x6815xc){_0x6815xb= _[_0x788f[13]](_0x6815xb,_[_0x788f[12]](_0x6815xc.Users,_0x788f[11]))});return {queue:_[_0x788f[12]](_0x6815xa[_0x788f[15]],_0x788f[11]),memberid:_0x6815xb}});case _0x788f[22]:return User[_0x788f[19]](_0x6815x9[_0x788f[18]],{attributes:[_0x788f[11]]})[_0x788f[16]](function(_0x6815xd){return _0x6815xd[_0x788f[21]]({attributes:[_0x788f[11]]})})[_0x788f[16]](function(_0x6815xa){return {queue:_[_0x788f[12]](_0x6815xa,_0x788f[11]),memberid:_0x6815x9[_0x788f[18]]}});default:return {}}}}function onSave(_0x6815x6,_0x6815x7,_0x6815xf){return Promise[_0x788f[33]]([])[_0x788f[16]](getOpenchannelQueues(_0x6815x6))[_0x788f[16]](function(_0x6815x11){if(_0x6815x6[_0x788f[23]]=== _0x788f[27]|| _[_0x788f[29]](_0x6815x11[_0x788f[28]],_0x6815x7[_0x788f[28]])|| _[_0x788f[29]](_0x6815x11[_0x788f[30]],_0x6815x7[_0x788f[30]])){_0x6815x6[_0x788f[32]](_0x788f[31],_0x6815x7)}})[_0x788f[26]](function(_0x6815x10){console[_0x788f[25]](_0x788f[24],_0x6815x10)})}function onRemove(_0x6815x6,_0x6815x7,_0x6815xf){_0x6815x6[_0x788f[32]](_0x788f[34],_0x6815x7)} \ No newline at end of file diff --git a/server/api/report_queue/index.js b/server/api/report_queue/index.js index 2a28045..3becb38 100644 --- a/server/api/report_queue/index.js +++ b/server/api/report_queue/index.js @@ -1,27 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_queue.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe); -router.get('/waiting', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.waiting); -router.get('/parameters', auth.isAuthenticated(), auth.hasModule([1], ['admin']), controller.queueParameters); -router.get('/waiting/calls', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'agent']), controller.waitingCalls); -router.get('/active', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.active); -router.get('/answered', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.answered); -router.get('/abandoned', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.abandoned); -router.get('/abandoned/all', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'agent']), controller.abandonedAll); -router.get('/avganswertime', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.avganswertime); -router.get('/avgtalktime', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.avgtalktime); -router.get('/answerrate', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.answerrate); -router.get('/abandonrate', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.abandonrate); -router.get('/totaloffered', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.totaloffered); -router.get('/unmanaged', auth.isAuthenticated(), auth.hasModule([1], ['admin', 'agent']), controller.unmanaged); -router.get('/:queue', auth.isAuthenticated(), controller.show); -router.put('/:id', auth.isAuthenticated(), controller.update); - -module.exports = router; +var _0x393b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x61\x67\x65\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73","\x71\x75\x65\x75\x65\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x73","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x63\x61\x6C\x6C\x73","\x77\x61\x69\x74\x69\x6E\x67\x43\x61\x6C\x6C\x73","\x2F\x61\x63\x74\x69\x76\x65","\x61\x63\x74\x69\x76\x65","\x2F\x61\x6E\x73\x77\x65\x72\x65\x64","\x61\x6E\x73\x77\x65\x72\x65\x64","\x2F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x2F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x2F\x61\x6C\x6C","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x41\x6C\x6C","\x2F\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x2F\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x2F\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x2F\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x2F\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x2F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x2F\x3A\x71\x75\x65\x75\x65","\x73\x68\x6F\x77","\x2F\x3A\x69\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x393b[0];var express=require(_0x393b[1]);var controller=require(_0x393b[2]);var auth=require(_0x393b[3]);var router=express.Router();router[_0x393b[9]](_0x393b[4],auth[_0x393b[5]](),auth[_0x393b[7]]([17],[_0x393b[6]]),controller[_0x393b[8]]);router[_0x393b[9]](_0x393b[10],auth[_0x393b[5]](),auth[_0x393b[7]]([17],[_0x393b[6]]),controller[_0x393b[11]]);router[_0x393b[9]](_0x393b[12],auth[_0x393b[5]](),auth[_0x393b[7]]([1],[_0x393b[6],_0x393b[13]]),controller[_0x393b[14]]);router[_0x393b[9]](_0x393b[15],auth[_0x393b[5]](),auth[_0x393b[7]]([1],[_0x393b[6]]),controller[_0x393b[16]]);router[_0x393b[9]](_0x393b[17],auth[_0x393b[5]](),auth[_0x393b[7]]([7],[_0x393b[6],_0x393b[13]]),controller[_0x393b[18]]);router[_0x393b[9]](_0x393b[19],auth[_0x393b[5]](),auth[_0x393b[7]]([1],[_0x393b[6],_0x393b[13]]),controller[_0x393b[20]]);router[_0x393b[9]](_0x393b[21],auth[_0x393b[5]](),auth[_0x393b[7]]([1],[_0x393b[6],_0x393b[13]]),controller[_0x393b[22]]);router[_0x393b[9]](_0x393b[23],auth[_0x393b[5]](),auth[_0x393b[7]]([1],[_0x393b[6],_0x393b[13]]),controller[_0x393b[24]]);router[_0x393b[9]](_0x393b[25],auth[_0x393b[5]](),auth[_0x393b[7]]([7],[_0x393b[6],_0x393b[13]]),controller[_0x393b[26]]);router[_0x393b[9]](_0x393b[27],auth[_0x393b[5]](),auth[_0x393b[7]]([1],[_0x393b[6],_0x393b[13]]),controller[_0x393b[28]]);router[_0x393b[9]](_0x393b[29],auth[_0x393b[5]](),auth[_0x393b[7]]([1],[_0x393b[6],_0x393b[13]]),controller[_0x393b[30]]);router[_0x393b[9]](_0x393b[31],auth[_0x393b[5]](),auth[_0x393b[7]]([1],[_0x393b[6],_0x393b[13]]),controller[_0x393b[32]]);router[_0x393b[9]](_0x393b[33],auth[_0x393b[5]](),auth[_0x393b[7]]([1],[_0x393b[6],_0x393b[13]]),controller[_0x393b[34]]);router[_0x393b[9]](_0x393b[35],auth[_0x393b[5]](),auth[_0x393b[7]]([1],[_0x393b[6],_0x393b[13]]),controller[_0x393b[36]]);router[_0x393b[9]](_0x393b[37],auth[_0x393b[5]](),auth[_0x393b[7]]([1],[_0x393b[6],_0x393b[13]]),controller[_0x393b[38]]);router[_0x393b[9]](_0x393b[39],auth[_0x393b[5]](),controller[_0x393b[40]]);router[_0x393b[43]](_0x393b[41],auth[_0x393b[5]](),controller[_0x393b[42]]);module[_0x393b[44]]= router \ No newline at end of file diff --git a/server/api/report_queue/report_queue.controller.js b/server/api/report_queue/report_queue.controller.js index a2757ef..f45b36c 100644 --- a/server/api/report_queue/report_queue.controller.js +++ b/server/api/report_queue/report_queue.controller.js @@ -1,626 +1 @@ -'use strict'; - -var _ = require('lodash'); -var sequelize = require('../../models').sequelize; -var Agent = require('../../models').User; -var ReportQueue = require('../../models').ReportQueue; -var VoiceQueue = require('../../models').VoiceQueue; -var ReportQueueHistory = require('../../models').history.ReportQueueHistory; -var Util = require('../../config/util'); -var Promise = require('bluebird'); - -// Get list of reportQueues -exports.index = function(req, res, next) { - return ReportQueue - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.update = function(req, res) { - return ReportQueue - .findById(req.params.id) - .then(function(queue) { - if (!queue) { - return res.sendStatus(404); - } - var updated = _.merge(queue, req.body); - return updated.save(); - }) - .then(function(queue) { - return res.status(200).send(queue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of fields -exports.describe = function(req, res) { - return ReportQueueHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get Waiting Calls -exports.waiting = function(req, res) { - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return ReportQueue - .count({ - where: { - queuecallerleaveAt: null, - queue: userQueues - } - }); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getVoiceQueues(user) { - return function() { - switch (user.role) { - case 'user': - return Agent //also User model - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getVoiceQueuesIdByUser()) - .then(function(userQueues) { - return _.map(userQueues.rows, 'name'); - }); - case 'agent': - return Agent - .findById(user.id) - .then(function(agent) { - return agent - .getVoiceQueues({ - attributes: ['name'] - }); - }) - .then(function(userQueues) { - return _.map(userQueues, 'name'); - }); - default: - return VoiceQueue - .findAll() - .then(function(queues) { - return { - rows: queues - }; - }) - .then(function(userQueues) { - return _.map(userQueues.rows, 'name'); - }); - } - } -} - -exports.queueParameters = function(req, res) { - var query = { - _limit: req.query.limit ? req.query.limit : null, - _offset: req.query.offset ? req.query.offset : 0, - _name: req.query.name || undefined, - _answeredFrom: req.query.answered_uiFrom || req.query.answered_uiFrom === 0 ? req.query.answered_uiFrom : undefined, - _answeredTo: req.query.answered_uiTo || req.query.answered_uiTo === 0 ? req.query.answered_uiTo : undefined, - _abandonedFrom: req.query.abandoned_uiFrom || req.query.abandoned_uiFrom === 0 ? req.query.abandoned_uiFrom : undefined, - _abandonedTo: req.query.abandoned_uiTo || req.query.abandoned_uiTo === 0 ? req.query.abandoned_uiTo : undefined, - _unmanagedFrom: req.query.unmanaged_uiFrom || req.query.unmanaged_uiFrom === 0 ? req.query.unmanaged_uiFrom : undefined, - _unmanagedTo: req.query.unmanaged_uiTo || req.query.unmanaged_uiTo === 0 ? req.query.unmanaged_uiTo : undefined, - } - console.log(query); - var _parameters, _userQueues, _limit, _offset; - delete req.query.limit; - delete req.query.offset; - delete req.query.answered_uiFrom; - delete req.query.answered_uiTo; - delete req.query.abandoned_uiFrom; - delete req.query.abandoned_uiTo; - delete req.query.unmanaged_uiFrom; - delete req.query.unmanaged_uiTo; - - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - _userQueues = userQueues; - _parameters = _.map(userQueues, function(element) { - return { - name: element - }; - }); - //waiting - return ReportQueue - .findAll({ - where: { - queuecallerleaveAt: null, - queue: _userQueues - }, - group: 'queue', - attributes: [ - ['queue', 'name'], - [sequelize.fn('COUNT', sequelize.col('id')), 'waiting'] - ] - }); - }) - .then(function(waiting) { - waiting = _.map(waiting, 'dataValues'); - _parameters.forEach(function(element, key) { - var value = _.find(waiting, { - name: element.name - }); - element.waiting = value ? value.waiting : 0; - }); - // console.log('WAITING', _parameters); - //active - return ReportQueue - .findAll({ - where: { - queuecallerexit: false, - queuecallerabandon: false, - queuecallercomplete: false, - queuecallerleaveAt: { - $ne: null - }, - queue: _userQueues - }, - group: 'queue', - attributes: [ - ['queue', 'name'], - [sequelize.fn('COUNT', sequelize.col('id')), 'active'] - ] - }); - }) - .then(function(active) { - active = _.map(active, 'dataValues'); - _parameters.forEach(function(element) { - var value = _.find(active, { - name: element.name - }); - element.active = value ? value.active : 0; - }); - // console.log('ACTIVE', _parameters); - //answered - return ReportQueue - .findAll({ - where: { - queuecallercomplete: true, - queue: _userQueues - }, - group: 'queue', - attributes: [ - ['queue', 'name'], - [sequelize.fn('COUNT', sequelize.col('id')), 'answered'] - ] - }); - }) - .then(function(answered) { - answered = _.map(answered, 'dataValues'); - // console.log('beforeAnswered', _.map(answered, 'dataValues')); - _parameters.forEach(function(element) { - var value = _.find(answered, { - name: element.name - }); - element.answered = value ? value.answered : 0; - }); - // console.log('ANSWERED', _parameters); - //abandoned - return ReportQueue - .findAll({ - where: { - queuecallerabandon: true, - queue: _userQueues - }, - group: 'queue', - attributes: [ - ['queue', 'name'], - [sequelize.fn('COUNT', sequelize.col('id')), 'abandoned'] - ] - }); - }) - .then(function(abandoned) { - abandoned = _.map(abandoned, 'dataValues'); - _parameters.forEach(function(element) { - var value = _.find(abandoned, { - name: element.name - }); - element.abandoned = value ? value.abandoned : 0; - }); - // console.log('ABANDONED', _parameters); - //unmanaged - return ReportQueue - .findAll({ - where: { - queuecallerexit: true, - queue: _userQueues - }, - group: 'queue', - attributes: [ - ['queue', 'name'], - [sequelize.fn('COUNT', sequelize.col('id')), 'unmanaged'] - ] - }); - }) - .then(function(unmanaged) { - unmanaged = _.map(unmanaged, 'dataValues'); - _parameters.forEach(function(element) { - var value = _.find(unmanaged, { - name: element.name - }); - element.unmanaged = value ? value.unmanaged : 0; - }); - // console.log('UNMANAGED', _parameters); - //holdtime - return sequelize - .query('SELECT queue AS \'name\',SEC_TO_TIME(ROUND(AVG(holdtime), 0)) as holdtime FROM report_agent WHERE agentcomplete = 1 AND queue IN (\'' + _userQueues.join("','") + - '\') GROUP BY queue', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(holdtime) { - _parameters.forEach(function(element) { - var value = _.find(holdtime, { - name: element.name - }); - element.holdtime = value ? value.holdtime : '00:00:00'; - }); - // console.log('HOLDTIME', _parameters); - //talktime - return sequelize - .query('SELECT queue AS \'name\',SEC_TO_TIME(ROUND(AVG(talktime), 0)) as talktime FROM report_agent WHERE agentcomplete = 1 AND queue IN (\'' + _userQueues.join("','") + - '\') GROUP BY queue', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(talktime) { - _parameters.forEach(function(element) { - var value = _.find(talktime, { - name: element.name - }); - element.talktime = value ? value.talktime : '00:00:00'; - }); - // console.log('TALKTIME', _parameters); - //totalcalls - return sequelize - .query('SELECT queue AS \'name\',COUNT(distinct uniqueid) as totalcalls FROM report_queue WHERE queue IN (\'' + _userQueues.join("','") + '\') GROUP BY queue', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(totalcalls) { - _parameters.forEach(function(element) { - var value = _.find(totalcalls, { - name: element.name - }); - element.totalcalls = value ? value.totalcalls : 0; - }); - // console.log('TOTALCALLS', _parameters); - var results = _(_.filter(_parameters, function(element) { - var answeredFrom = query._answeredFrom ? (element.answered >= Number(query._answeredFrom)) : true; - var answeredTo = query._answeredTo ? (element.answered <= Number(query._answeredTo)) : true; - var abandonedFrom = query._abandonedFrom ? (element.abandoned >= Number(query._abandonedFrom)) : true; - var abandonedto = query._abandonedTo ? (element.abandoned <= Number(query._abandonedTo)) : true; - var unmanagedFrom = query._unmanagedFrom ? (element.unmanaged >= Number(query._unmanagedFrom)) : true; - var unmanagedTo = query._unmanagedTo ? (element.unmanaged <= Number(query._unmanagedTo)) : true; - var name = query._name ? _.includes(element.name, query._name) : true; - return _.reduce([answeredFrom, answeredTo, abandonedFrom, abandonedto, unmanagedFrom, unmanagedTo, name], function(total, n) { - return total && n; - }); - })); - if (query._limit) { - results = results.slice(query._offset).take(query._limit).value(); - } - return [_parameters.length, results]; - }) - .spread(function(count, rows) { - // console.log('RETURN', rows); - return res.status(200).send({ - rows: rows, - count: count - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get Waiting Calls -exports.waitingCalls = function(req, res) { - var where = {}; - if (req.user.role === 'agent') { - where.connectedlinename = req.user.fullname; - } - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return ReportQueue - .scope('waiting', { - method: ['queueFilter', userQueues] - }) - .findAll(Util.getQuery(req.query, where)); - }) - .then(function(data) { - return res.status(200).send({ - rows: data, - count: data.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get Waiting Calls -exports.active = function(req, res) { - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return ReportQueue - .count({ - where: { - queuecallerexit: false, - queuecallerabandon: false, - queuecallercomplete: false, - queuecallerleaveAt: { - $ne: null - }, - queue: userQueues - } - }); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get Answered Calls -exports.answered = function(req, res) { - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return ReportQueue - .count({ - where: { - queuecallercomplete: true, - queue: userQueues - } - }); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get Abandoned Calls -exports.abandoned = function(req, res) { - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return ReportQueue - .count({ - where: { - queuecallerabandon: true, - queue: userQueues - } - }); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get Answered Calls -exports.avganswertime = function(req, res) { - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return sequelize - .query('SELECT SEC_TO_TIME(ROUND(AVG(holdtime), 0)) as value FROM report_agent WHERE agentcomplete = 1 AND queue IN (\'' + userQueues.join("','") + '\')', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - return res.status(200).send({ - value: data[0].value - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get Answered Calls -exports.avgtalktime = function(req, res) { - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return sequelize - .query('SELECT SEC_TO_TIME(ROUND(AVG(talktime), 0)) as value FROM report_agent WHERE agentcomplete = 1 AND queue IN (\'' + userQueues.join("','") + '\')', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - return res.status(200).send({ - value: data[0].value - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get Answered Calls -exports.answerrate = function(req, res) { - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return sequelize - .query('SELECT ROUND(SUM(queuecallercomplete) / (SUM(queuecallercomplete) + SUM(queuecallerabandon)) * 100, 1) as value FROM report_queue WHERE queue IN (\'' + userQueues.join("','") + - '\')', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - return res.status(200).send({ - value: data[0].value - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get Answered Calls -exports.abandonrate = function(req, res) { - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return sequelize - .query('SELECT ROUND(SUM(queuecallerabandon) / (SUM(queuecallercomplete) + SUM(queuecallerabandon)) * 100, 1) as value FROM report_queue WHERE queue IN (\'' + userQueues.join("','") + - '\')', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - return res.status(200).send({ - value: data[0].value - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get Answered Calls -exports.totaloffered = function(req, res) { - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return sequelize - .query('SELECT COUNT(distinct uniqueid) as value FROM report_queue WHERE queue IN (\'' + userQueues.join("','") + '\')', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - return res.status(200).send({ - value: data[0].value - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get Unmanaged Calls -exports.unmanaged = function(req, res) { - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return ReportQueue - .count({ - where: { - queuecallerexit: true, - queue: userQueues - } - }); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get Unmanaged Calls -exports.abandonedAll = function(req, res) { - return Promise - .all([]) - .then(getVoiceQueues(req.user)) - .then(function(userQueues) { - return ReportQueue - .findAndCountAll({ - where: { - queuecallerabandon: true, - queue: userQueues - } - }); - }) - .then(function(data) { - return res.status(200).send(data); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single reportQueue -exports.show = function(req, res) { - return ReportQueue - .findAll({ - where: { - queue: req.params.queue - } - }) - .then(function(reportQueue) { - if (!reportQueue) { - return res.sendStatus(404); - } - return res.send({ - count: reportQueue.length, - rows: reportQueue - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xae3b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x65\x73\x63\x72\x69\x62\x65","\x77\x61\x69\x74\x69\x6E\x67","\x63\x6F\x75\x6E\x74","\x75\x73\x65\x72","\x61\x6C\x6C","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x6F\x6C\x65","\x71\x75\x65\x75\x65\x50\x61\x72\x61\x6D\x65\x74\x65\x72\x73","\x6C\x69\x6D\x69\x74","\x6F\x66\x66\x73\x65\x74","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x75\x69\x54\x6F","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x5F\x75\x69\x54\x6F","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x5F\x75\x69\x46\x72\x6F\x6D","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x5F\x75\x69\x54\x6F","\x6C\x6F\x67","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64","\x74\x6F\x74\x61\x6C\x63\x61\x6C\x6C\x73","\x66\x6F\x72\x45\x61\x63\x68","\x5F\x61\x6E\x73\x77\x65\x72\x65\x64\x46\x72\x6F\x6D","\x61\x6E\x73\x77\x65\x72\x65\x64","\x5F\x61\x6E\x73\x77\x65\x72\x65\x64\x54\x6F","\x5F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x46\x72\x6F\x6D","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5F\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x54\x6F","\x5F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x46\x72\x6F\x6D","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x5F\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x54\x6F","\x5F\x6E\x61\x6D\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x72\x65\x64\x75\x63\x65","\x66\x69\x6C\x74\x65\x72","\x5F\x6C\x69\x6D\x69\x74","\x76\x61\x6C\x75\x65","\x74\x61\x6B\x65","\x73\x6C\x69\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x30\x30\x3A\x30\x30\x3A\x30\x30","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x74\x6F\x74\x61\x6C\x63\x61\x6C\x6C\x73\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x27\x2C\x27","\x6A\x6F\x69\x6E","\x27\x29\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x71\x75\x65\x75\x65","\x43\x4F\x55\x4E\x54","\x63\x6F\x6C","\x66\x6E","\x61\x63\x74\x69\x76\x65","\x77\x61\x69\x74\x69\x6E\x67\x43\x61\x6C\x6C\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x71\x75\x65\x75\x65\x46\x69\x6C\x74\x65\x72","\x73\x63\x6F\x70\x65","\x61\x76\x67\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x27\x29","\x61\x76\x67\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x61\x6E\x73\x77\x65\x72\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x61\x62\x61\x6E\x64\x6F\x6E\x72\x61\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x20\x31\x30\x30\x2C\x20\x31\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x74\x6F\x74\x61\x6C\x6F\x66\x66\x65\x72\x65\x64","\x53\x45\x4C\x45\x43\x54\x20\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x76\x61\x6C\x75\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x41\x6C\x6C","\x73\x68\x6F\x77"];_0xae3b[0];var _=require(_0xae3b[1]);var sequelize=require(_0xae3b[3])[_0xae3b[2]];var Agent=require(_0xae3b[3])[_0xae3b[4]];var ReportQueue=require(_0xae3b[3])[_0xae3b[5]];var VoiceQueue=require(_0xae3b[3])[_0xae3b[6]];var ReportQueueHistory=require(_0xae3b[3])[_0xae3b[8]][_0xae3b[7]];var Util=require(_0xae3b[9]);var Promise=require(_0xae3b[10]);exports[_0xae3b[11]]= function(_0x62dbx9,_0x62dbxa,_0x62dbxb){return ReportQueue[_0xae3b[18]](Util[_0xae3b[17]](_0x62dbx9[_0xae3b[16]]))[_0xae3b[15]](function(_0x62dbxd){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]](_0x62dbxd)})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[19]]= function(_0x62dbx9,_0x62dbxa){return ReportQueue[_0xae3b[26]](_0x62dbx9[_0xae3b[25]][_0xae3b[24]])[_0xae3b[15]](function(_0x62dbxe){if(!_0x62dbxe){return _0x62dbxa[_0xae3b[20]](404)};var _0x62dbxf=_[_0xae3b[22]](_0x62dbxe,_0x62dbx9[_0xae3b[21]]);return _0x62dbxf[_0xae3b[23]]()})[_0xae3b[15]](function(_0x62dbxe){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]](_0x62dbxe)})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[27]]= function(_0x62dbx9,_0x62dbxa){return ReportQueueHistory[_0xae3b[27]]()[_0xae3b[15]](function(_0x62dbx10){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]](_0x62dbx10)})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[28]]= function(_0x62dbx9,_0x62dbxa){return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return ReportQueue[_0xae3b[29]]({where:{queuecallerleaveAt:null,queue:_0x62dbx12}})})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({value:_0x62dbx11})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};function getVoiceQueues(_0x62dbx14){return function(){switch(_0x62dbx14[_0xae3b[39]]){case _0xae3b[30]:return Agent[_0xae3b[26]](_0x62dbx14[_0xae3b[24]],{attributes:[_0xae3b[24]]})[_0xae3b[15]](Util[_0xae3b[35]]())[_0xae3b[15]](function(_0x62dbx12){return _[_0xae3b[34]](_0x62dbx12[_0xae3b[32]],_0xae3b[33])});case _0xae3b[37]:return Agent[_0xae3b[26]](_0x62dbx14[_0xae3b[24]])[_0xae3b[15]](function(_0x62dbx15){return _0x62dbx15[_0xae3b[36]]({attributes:[_0xae3b[33]]})})[_0xae3b[15]](function(_0x62dbx12){return _[_0xae3b[34]](_0x62dbx12,_0xae3b[33])});default:return VoiceQueue[_0xae3b[38]]()[_0xae3b[15]](function(_0x62dbx16){return {rows:_0x62dbx16}})[_0xae3b[15]](function(_0x62dbx12){return _[_0xae3b[34]](_0x62dbx12[_0xae3b[32]],_0xae3b[33])})}}}exports[_0xae3b[40]]= function(_0x62dbx9,_0x62dbxa){var _0x62dbx17={_limit:_0x62dbx9[_0xae3b[16]][_0xae3b[41]]?_0x62dbx9[_0xae3b[16]][_0xae3b[41]]:null,_offset:_0x62dbx9[_0xae3b[16]][_0xae3b[42]]?_0x62dbx9[_0xae3b[16]][_0xae3b[42]]:0,_name:_0x62dbx9[_0xae3b[16]][_0xae3b[33]]|| undefined,_answeredFrom:_0x62dbx9[_0xae3b[16]][_0xae3b[43]]|| _0x62dbx9[_0xae3b[16]][_0xae3b[43]]=== 0?_0x62dbx9[_0xae3b[16]][_0xae3b[43]]:undefined,_answeredTo:_0x62dbx9[_0xae3b[16]][_0xae3b[44]]|| _0x62dbx9[_0xae3b[16]][_0xae3b[44]]=== 0?_0x62dbx9[_0xae3b[16]][_0xae3b[44]]:undefined,_abandonedFrom:_0x62dbx9[_0xae3b[16]][_0xae3b[45]]|| _0x62dbx9[_0xae3b[16]][_0xae3b[45]]=== 0?_0x62dbx9[_0xae3b[16]][_0xae3b[45]]:undefined,_abandonedTo:_0x62dbx9[_0xae3b[16]][_0xae3b[46]]|| _0x62dbx9[_0xae3b[16]][_0xae3b[46]]=== 0?_0x62dbx9[_0xae3b[16]][_0xae3b[46]]:undefined,_unmanagedFrom:_0x62dbx9[_0xae3b[16]][_0xae3b[47]]|| _0x62dbx9[_0xae3b[16]][_0xae3b[47]]=== 0?_0x62dbx9[_0xae3b[16]][_0xae3b[47]]:undefined,_unmanagedTo:_0x62dbx9[_0xae3b[16]][_0xae3b[48]]|| _0x62dbx9[_0xae3b[16]][_0xae3b[48]]=== 0?_0x62dbx9[_0xae3b[16]][_0xae3b[48]]:undefined};console[_0xae3b[49]](_0x62dbx17);var _0x62dbx18,_0x62dbx19,_0x62dbx1a,_0x62dbx1b;delete _0x62dbx9[_0xae3b[16]][_0xae3b[41]];delete _0x62dbx9[_0xae3b[16]][_0xae3b[42]];delete _0x62dbx9[_0xae3b[16]][_0xae3b[43]];delete _0x62dbx9[_0xae3b[16]][_0xae3b[44]];delete _0x62dbx9[_0xae3b[16]][_0xae3b[45]];delete _0x62dbx9[_0xae3b[16]][_0xae3b[46]];delete _0x62dbx9[_0xae3b[16]][_0xae3b[47]];delete _0x62dbx9[_0xae3b[16]][_0xae3b[48]];return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){_0x62dbx19= _0x62dbx12;_0x62dbx18= _[_0xae3b[34]](_0x62dbx12,function(_0x62dbx1f){return {name:_0x62dbx1f}});return ReportQueue[_0xae3b[38]]({where:{queuecallerleaveAt:null,queue:_0x62dbx19},group:_0xae3b[84],attributes:[[_0xae3b[84],_0xae3b[33]],[sequelize[_0xae3b[87]](_0xae3b[85],sequelize[_0xae3b[86]](_0xae3b[24])),_0xae3b[28]]]})})[_0xae3b[15]](function(_0x62dbx31){_0x62dbx31= _[_0xae3b[34]](_0x62dbx31,_0xae3b[82]);_0x62dbx18[_0xae3b[53]](function(_0x62dbx1f,_0x62dbx32){var _0x62dbx20=_[_0xae3b[51]](_0x62dbx31,{name:_0x62dbx1f[_0xae3b[33]]});_0x62dbx1f[_0xae3b[28]]= _0x62dbx20?_0x62dbx20[_0xae3b[28]]:0});return ReportQueue[_0xae3b[38]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x62dbx19},group:_0xae3b[84],attributes:[[_0xae3b[84],_0xae3b[33]],[sequelize[_0xae3b[87]](_0xae3b[85],sequelize[_0xae3b[86]](_0xae3b[24])),_0xae3b[88]]]})})[_0xae3b[15]](function(_0x62dbx30){_0x62dbx30= _[_0xae3b[34]](_0x62dbx30,_0xae3b[82]);_0x62dbx18[_0xae3b[53]](function(_0x62dbx1f){var _0x62dbx20=_[_0xae3b[51]](_0x62dbx30,{name:_0x62dbx1f[_0xae3b[33]]});_0x62dbx1f[_0xae3b[88]]= _0x62dbx20?_0x62dbx20[_0xae3b[88]]:0});return ReportQueue[_0xae3b[38]]({where:{queuecallercomplete:true,queue:_0x62dbx19},group:_0xae3b[84],attributes:[[_0xae3b[84],_0xae3b[33]],[sequelize[_0xae3b[87]](_0xae3b[85],sequelize[_0xae3b[86]](_0xae3b[24])),_0xae3b[55]]]})})[_0xae3b[15]](function(_0x62dbx2f){_0x62dbx2f= _[_0xae3b[34]](_0x62dbx2f,_0xae3b[82]);_0x62dbx18[_0xae3b[53]](function(_0x62dbx1f){var _0x62dbx20=_[_0xae3b[51]](_0x62dbx2f,{name:_0x62dbx1f[_0xae3b[33]]});_0x62dbx1f[_0xae3b[55]]= _0x62dbx20?_0x62dbx20[_0xae3b[55]]:0});return ReportQueue[_0xae3b[38]]({where:{queuecallerabandon:true,queue:_0x62dbx19},group:_0xae3b[84],attributes:[[_0xae3b[84],_0xae3b[33]],[sequelize[_0xae3b[87]](_0xae3b[85],sequelize[_0xae3b[86]](_0xae3b[24])),_0xae3b[58]]]})})[_0xae3b[15]](function(_0x62dbx2e){_0x62dbx2e= _[_0xae3b[34]](_0x62dbx2e,_0xae3b[82]);_0x62dbx18[_0xae3b[53]](function(_0x62dbx1f){var _0x62dbx20=_[_0xae3b[51]](_0x62dbx2e,{name:_0x62dbx1f[_0xae3b[33]]});_0x62dbx1f[_0xae3b[58]]= _0x62dbx20?_0x62dbx20[_0xae3b[58]]:0});return ReportQueue[_0xae3b[38]]({where:{queuecallerexit:true,queue:_0x62dbx19},group:_0xae3b[84],attributes:[[_0xae3b[84],_0xae3b[33]],[sequelize[_0xae3b[87]](_0xae3b[85],sequelize[_0xae3b[86]](_0xae3b[24])),_0xae3b[61]]]})})[_0xae3b[15]](function(_0x62dbx2d){_0x62dbx2d= _[_0xae3b[34]](_0x62dbx2d,_0xae3b[82]);_0x62dbx18[_0xae3b[53]](function(_0x62dbx1f){var _0x62dbx20=_[_0xae3b[51]](_0x62dbx2d,{name:_0x62dbx1f[_0xae3b[33]]});_0x62dbx1f[_0xae3b[61]]= _0x62dbx20?_0x62dbx20[_0xae3b[61]]:0});return sequelize[_0xae3b[16]](_0xae3b[83]+ _0x62dbx19[_0xae3b[76]](_0xae3b[75])+ _0xae3b[77],{type:sequelize[_0xae3b[79]][_0xae3b[78]]})})[_0xae3b[15]](function(_0x62dbx2c){_0x62dbx18[_0xae3b[53]](function(_0x62dbx1f){var _0x62dbx20=_[_0xae3b[51]](_0x62dbx2c,{name:_0x62dbx1f[_0xae3b[33]]});_0x62dbx1f[_0xae3b[80]]= _0x62dbx20?_0x62dbx20[_0xae3b[80]]:_0xae3b[73]});return sequelize[_0xae3b[16]](_0xae3b[81]+ _0x62dbx19[_0xae3b[76]](_0xae3b[75])+ _0xae3b[77],{type:sequelize[_0xae3b[79]][_0xae3b[78]]})})[_0xae3b[15]](function(_0x62dbx2b){_0x62dbx18[_0xae3b[53]](function(_0x62dbx1f){var _0x62dbx20=_[_0xae3b[51]](_0x62dbx2b,{name:_0x62dbx1f[_0xae3b[33]]});_0x62dbx1f[_0xae3b[72]]= _0x62dbx20?_0x62dbx20[_0xae3b[72]]:_0xae3b[73]});return sequelize[_0xae3b[16]](_0xae3b[74]+ _0x62dbx19[_0xae3b[76]](_0xae3b[75])+ _0xae3b[77],{type:sequelize[_0xae3b[79]][_0xae3b[78]]})})[_0xae3b[15]](function(_0x62dbx1e){_0x62dbx18[_0xae3b[53]](function(_0x62dbx1f){var _0x62dbx20=_[_0xae3b[51]](_0x62dbx1e,{name:_0x62dbx1f[_0xae3b[33]]});_0x62dbx1f[_0xae3b[52]]= _0x62dbx20?_0x62dbx20[_0xae3b[52]]:0});var _0x62dbx21=_(_[_0xae3b[66]](_0x62dbx18,function(_0x62dbx1f){var _0x62dbx22=_0x62dbx17[_0xae3b[54]]?(_0x62dbx1f[_0xae3b[55]]>= Number(_0x62dbx17._answeredFrom)):true;var _0x62dbx23=_0x62dbx17[_0xae3b[56]]?(_0x62dbx1f[_0xae3b[55]]<= Number(_0x62dbx17._answeredTo)):true;var _0x62dbx24=_0x62dbx17[_0xae3b[57]]?(_0x62dbx1f[_0xae3b[58]]>= Number(_0x62dbx17._abandonedFrom)):true;var _0x62dbx25=_0x62dbx17[_0xae3b[59]]?(_0x62dbx1f[_0xae3b[58]]<= Number(_0x62dbx17._abandonedTo)):true;var _0x62dbx26=_0x62dbx17[_0xae3b[60]]?(_0x62dbx1f[_0xae3b[61]]>= Number(_0x62dbx17._unmanagedFrom)):true;var _0x62dbx27=_0x62dbx17[_0xae3b[62]]?(_0x62dbx1f[_0xae3b[61]]<= Number(_0x62dbx17._unmanagedTo)):true;var _0x62dbx28=_0x62dbx17[_0xae3b[63]]?_[_0xae3b[64]](_0x62dbx1f[_0xae3b[33]],_0x62dbx17._name):true;return _[_0xae3b[65]]([_0x62dbx22,_0x62dbx23,_0x62dbx24,_0x62dbx25,_0x62dbx26,_0x62dbx27,_0x62dbx28],function(_0x62dbx29,_0x62dbx2a){return _0x62dbx29&& _0x62dbx2a})}));if(_0x62dbx17[_0xae3b[67]]){_0x62dbx21= _0x62dbx21[_0xae3b[70]](_0x62dbx17._offset)[_0xae3b[69]](_0x62dbx17._limit)[_0xae3b[68]]()};return [_0x62dbx18[_0xae3b[71]],_0x62dbx21]})[_0xae3b[50]](function(_0x62dbx1c,_0x62dbx1d){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({rows:_0x62dbx1d,count:_0x62dbx1c})})[_0xae3b[12]](function(_0x62dbxc){console[_0xae3b[49]](_0x62dbxc);return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[89]]= function(_0x62dbx9,_0x62dbxa){var _0x62dbx33={};if(_0x62dbx9[_0xae3b[30]][_0xae3b[39]]=== _0xae3b[37]){_0x62dbx33[_0xae3b[90]]= _0x62dbx9[_0xae3b[30]][_0xae3b[91]]};return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return ReportQueue[_0xae3b[93]](_0xae3b[28],{method:[_0xae3b[92],_0x62dbx12]})[_0xae3b[38]](Util[_0xae3b[17]](_0x62dbx9[_0xae3b[16]],_0x62dbx33))})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({rows:_0x62dbx11,count:_0x62dbx11[_0xae3b[71]]})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[88]]= function(_0x62dbx9,_0x62dbxa){return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return ReportQueue[_0xae3b[29]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_0x62dbx12}})})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({value:_0x62dbx11})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[55]]= function(_0x62dbx9,_0x62dbxa){return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return ReportQueue[_0xae3b[29]]({where:{queuecallercomplete:true,queue:_0x62dbx12}})})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({value:_0x62dbx11})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[58]]= function(_0x62dbx9,_0x62dbxa){return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return ReportQueue[_0xae3b[29]]({where:{queuecallerabandon:true,queue:_0x62dbx12}})})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({value:_0x62dbx11})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[94]]= function(_0x62dbx9,_0x62dbxa){return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return sequelize[_0xae3b[16]](_0xae3b[95]+ _0x62dbx12[_0xae3b[76]](_0xae3b[75])+ _0xae3b[96],{type:sequelize[_0xae3b[79]][_0xae3b[78]]})})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({value:_0x62dbx11[0][_0xae3b[68]]})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[97]]= function(_0x62dbx9,_0x62dbxa){return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return sequelize[_0xae3b[16]](_0xae3b[98]+ _0x62dbx12[_0xae3b[76]](_0xae3b[75])+ _0xae3b[96],{type:sequelize[_0xae3b[79]][_0xae3b[78]]})})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({value:_0x62dbx11[0][_0xae3b[68]]})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[99]]= function(_0x62dbx9,_0x62dbxa){return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return sequelize[_0xae3b[16]](_0xae3b[100]+ _0x62dbx12[_0xae3b[76]](_0xae3b[75])+ _0xae3b[96],{type:sequelize[_0xae3b[79]][_0xae3b[78]]})})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({value:_0x62dbx11[0][_0xae3b[68]]})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[101]]= function(_0x62dbx9,_0x62dbxa){return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return sequelize[_0xae3b[16]](_0xae3b[102]+ _0x62dbx12[_0xae3b[76]](_0xae3b[75])+ _0xae3b[96],{type:sequelize[_0xae3b[79]][_0xae3b[78]]})})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({value:_0x62dbx11[0][_0xae3b[68]]})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[103]]= function(_0x62dbx9,_0x62dbxa){return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return sequelize[_0xae3b[16]](_0xae3b[104]+ _0x62dbx12[_0xae3b[76]](_0xae3b[75])+ _0xae3b[96],{type:sequelize[_0xae3b[79]][_0xae3b[78]]})})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({value:_0x62dbx11[0][_0xae3b[68]]})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[61]]= function(_0x62dbx9,_0x62dbxa){return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return ReportQueue[_0xae3b[29]]({where:{queuecallerexit:true,queue:_0x62dbx12}})})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]]({value:_0x62dbx11})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[105]]= function(_0x62dbx9,_0x62dbxa){return Promise[_0xae3b[31]]([])[_0xae3b[15]](getVoiceQueues(_0x62dbx9[_0xae3b[30]]))[_0xae3b[15]](function(_0x62dbx12){return ReportQueue[_0xae3b[18]]({where:{queuecallerabandon:true,queue:_0x62dbx12}})})[_0xae3b[15]](function(_0x62dbx11){return _0x62dbxa[_0xae3b[14]](200)[_0xae3b[13]](_0x62dbx11)})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};exports[_0xae3b[106]]= function(_0x62dbx9,_0x62dbxa){return ReportQueue[_0xae3b[38]]({where:{queue:_0x62dbx9[_0xae3b[25]][_0xae3b[84]]}})[_0xae3b[15]](function(_0x62dbx34){if(!_0x62dbx34){return _0x62dbxa[_0xae3b[20]](404)};return _0x62dbxa[_0xae3b[13]]({count:_0x62dbx34[_0xae3b[71]],rows:_0x62dbx34})})[_0xae3b[12]](function(_0x62dbxc){return handleError(_0x62dbxa,_0x62dbxc)})};function handleError(_0x62dbxa,_0x62dbxc){return _0x62dbxa[_0xae3b[14]](500)[_0xae3b[13]](_0x62dbxc)} \ No newline at end of file diff --git a/server/api/report_queue/report_queue.events.js b/server/api/report_queue/report_queue.events.js index 29eace5..23ef8d8 100644 --- a/server/api/report_queue/report_queue.events.js +++ b/server/api/report_queue/report_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportQueue = require('../../models').ReportQueue; - -var ReportQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportQueueEvents.emit(event + ':' + doc._id, doc); - ReportQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportQueueEvents; +var _0xa59e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa59e[0];const EventEmitter=require(_0xa59e[1]);const ReportQueue=require(_0xa59e[3])[_0xa59e[2]];var ReportQueueEvents= new EventEmitter();ReportQueueEvents[_0xa59e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa59e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa59e[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa59e[7]};for(var e in events){var event=events[e];ReportQueue[_0xa59e[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xca58x8,_0xca58x9,_0xca58xa){ReportQueueEvents[_0xa59e[11]](event+ _0xa59e[9]+ _0xca58x8[_0xa59e[10]],_0xca58x8);ReportQueueEvents[_0xa59e[11]](event,_0xca58x8);_0xca58xa(null)}}module[_0xa59e[12]]= ReportQueueEvents \ No newline at end of file diff --git a/server/api/report_queue/report_queue.socket.js b/server/api/report_queue/report_queue.socket.js index 3c27c94..a1716e3 100644 --- a/server/api/report_queue/report_queue.socket.js +++ b/server/api/report_queue/report_queue.socket.js @@ -1,93 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportQueueEvents = require('./report_queue.events'); -const VoiceQueue = require('../../models').VoiceQueue; -const User = require('../../models').User; -const Util = require('../../config/util'); -const _ = require('lodash'); -const Promise = require('bluebird'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_queue:' + event, socket); - - ReportQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_queue:save': - case 'report_queue:update': - return Promise - .all([]) - .then(getVoiceQueues(socket)) - .then(function(userQueues) { - if (_.includes(userQueues, doc.queue)) { - socket.emit(event, doc); - } - }) - .catch(function(err) { - console.log('Error filtering queues after queue save', err); - }) - - case 'report_queue:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportQueueEvents.removeListener(event, listener); - }; -} - -function getVoiceQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(Util.getVoiceQueuesIdByUser()) - .then(function(userQueues) { - return _.map(userQueues.rows, 'name'); - }); - case 'agent': - return User - .scope('agent') - .findById(user.userId) - .then(function(agent) { - return agent - .getVoiceQueues({ - attributes: ['name'] - }); - }) - .then(function(agentQueues) { - return _.map(agentQueues, 'name'); - }); - default: - return VoiceQueue //the queue has to exist in my motion queues, otherwise is not manageable from the interface (prbably an error didn' t delete the queue from asterisk) - .findAll() - .then(function(userQueues) { - return _.map(userQueues, 'name'); - }); - } - } -} +var _0xc810=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x71\x75\x65\x75\x65\x73\x20\x61\x66\x74\x65\x72\x20\x71\x75\x65\x75\x65\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x71\x75\x65\x75\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x6F\x6C\x65"];_0xc810[0];const ReportQueueEvents=require(_0xc810[1]);const VoiceQueue=require(_0xc810[3])[_0xc810[2]];const User=require(_0xc810[3])[_0xc810[4]];const Util=require(_0xc810[5]);const _=require(_0xc810[6]);const Promise=require(_0xc810[7]);var events=[_0xc810[8],_0xc810[9],_0xc810[10]];exports[_0xc810[11]]= function(_0xfc04x8){for(var _0xfc04x9=0,_0xfc04xa=events[_0xc810[12]];_0xfc04x9< _0xfc04xa;_0xfc04x9++){var _0xfc04xb=events[_0xfc04x9];var _0xfc04xc=createListener(_0xc810[13]+ _0xfc04xb,_0xfc04x8);ReportQueueEvents[_0xc810[14]](_0xfc04xb,_0xfc04xc);_0xfc04x8[_0xc810[14]](_0xc810[15],removeListener(_0xfc04xb,_0xfc04xc))}};function createListener(_0xfc04xb,_0xfc04x8){return function(_0xfc04xe){switch(_0xfc04xb){case _0xc810[16]:;case _0xc810[25]:return Promise[_0xc810[24]]([])[_0xc810[23]](getVoiceQueues(_0xfc04x8))[_0xc810[23]](function(_0xfc04x10){if(_[_0xc810[21]](_0xfc04x10,_0xfc04xe[_0xc810[20]])){_0xfc04x8[_0xc810[22]](_0xfc04xb,_0xfc04xe)}})[_0xc810[19]](function(_0xfc04xf){console[_0xc810[18]](_0xc810[17],_0xfc04xf)});case _0xc810[26]:_0xfc04x8[_0xc810[22]](_0xfc04xb,_0xfc04xe);break;default:}}}function removeListener(_0xfc04xb,_0xfc04xc){return function(){ReportQueueEvents[_0xc810[27]](_0xfc04xb,_0xfc04xc)}}function getVoiceQueues(_0xfc04x13){return function(){switch(_0xfc04x13[_0xc810[40]]){case _0xc810[35]:return User[_0xc810[34]](_0xfc04x13[_0xc810[32]],{attributes:[_0xc810[33]]})[_0xc810[23]](Util[_0xc810[31]]())[_0xc810[23]](function(_0xfc04x10){return _[_0xc810[30]](_0xfc04x10[_0xc810[28]],_0xc810[29])});case _0xc810[37]:return User[_0xc810[38]](_0xc810[37])[_0xc810[34]](_0xfc04x13[_0xc810[32]])[_0xc810[23]](function(_0xfc04x15){return _0xfc04x15[_0xc810[36]]({attributes:[_0xc810[29]]})})[_0xc810[23]](function(_0xfc04x14){return _[_0xc810[30]](_0xfc04x14,_0xc810[29])});default:return VoiceQueue[_0xc810[39]]()[_0xc810[23]](function(_0xfc04x10){return _[_0xc810[30]](_0xfc04x10,_0xc810[29])})}}} \ No newline at end of file diff --git a/server/api/report_sms/index.js b/server/api/report_sms/index.js index 93dc165..f946784 100644 --- a/server/api/report_sms/index.js +++ b/server/api/report_sms/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_sms.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([17], ['admin', 'agent']), controller.index); -router.get('/:id/accept/:uniqueid', auth.isAuthenticated(), license.hasSms(), auth.hasRole('agent'), controller.accept); -router.get('/:id/reject', auth.isAuthenticated(), license.hasSms(), auth.hasRole('agent'), controller.reject); - - - -module.exports = router; +var _0x3e5b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x53\x6D\x73","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x61\x63\x63\x65\x70\x74\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x61\x63\x63\x65\x70\x74","\x2F\x3A\x69\x64\x2F\x72\x65\x6A\x65\x63\x74","\x72\x65\x6A\x65\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3e5b[0];var express=require(_0x3e5b[1]);var controller=require(_0x3e5b[2]);var auth=require(_0x3e5b[3]);var license=require(_0x3e5b[4]);var router=express.Router();router[_0x3e5b[12]](_0x3e5b[5],auth[_0x3e5b[6]](),license[_0x3e5b[7]](),auth[_0x3e5b[10]]([17],[_0x3e5b[8],_0x3e5b[9]]),controller[_0x3e5b[11]]);router[_0x3e5b[12]](_0x3e5b[13],auth[_0x3e5b[6]](),license[_0x3e5b[7]](),auth[_0x3e5b[14]](_0x3e5b[9]),controller[_0x3e5b[15]]);router[_0x3e5b[12]](_0x3e5b[16],auth[_0x3e5b[6]](),license[_0x3e5b[7]](),auth[_0x3e5b[14]](_0x3e5b[9]),controller[_0x3e5b[17]]);module[_0x3e5b[18]]= router \ No newline at end of file diff --git a/server/api/report_sms/report_sms.controller.js b/server/api/report_sms/report_sms.controller.js index 20e4240..89f671c 100644 --- a/server/api/report_sms/report_sms.controller.js +++ b/server/api/report_sms/report_sms.controller.js @@ -1,179 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/report/sms -> index - * POST /api/report/sms -> create - * GET /api/report/sms/:id -> show - * PUT /api/report/sms/:id -> update - * DELETE /api/report/sms/:id -> destroy - */ - -'use strict'; -var _ = require('lodash'); -var ReportSms = require('../../models').ReportSms; -var SmsRoom = require('../../models').SmsRoom; -var sequelize = require('../../models').sequelize; -var Agent = require('../../models').User; -var Util = require('../../config/util'); -var moment = require('moment'); - - - -function handleError(res, err) { - return res.status(500).send(err); -} - -// Gets a list of ReportSmss - - - -exports.index = function(req, res) { - return ReportSms - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -// Get a single reportSMS -exports.accept = function(req, res) { - var _agent; - var _roomid = req.params.uniqueid.split('.')[1]; - - return Agent - .findById(req.user.id, { - attributes: ['id', 'smsCapacity'] - }) - .then(function(agent) { - _agent = agent; - return agent - .getSmsRooms({ - where: { - status: { - $ne: 'CLOSED' - }, - id: { - $ne: _roomid - } - }, - attributes: ['id'] - }); - }) - .then(function(smsRooms) { - return ReportSms - .findById(req.params.id); - }) - .then(function(reportSms) { - if (!reportSms) { - return res.sendStatus(404); - } - - var updated = _.merge(reportSms, { - connectid: req.params.uniqueid - }); - - return updated - .save(); - }) - .then(function() { - return SmsRoom - .update({ - status: 'OPEN', - openReason: 'agent' - }, { - where: { - id: _roomid - }, - user: req.user, - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return res.sendStatus(504); - }) - .catch(function(err) { - return handleError(res, err); - }); - -}; - -// Get a single reportMail -exports.reject = function(req, res) { - return ReportSms - .findById(req.params.id) - .then(function(reportSms) { - if (!reportSms) { - return res.sendStatus(404); - } - var updated = _.merge(reportSms, { - rejectedAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - return updated - .save(); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a new ReportSms in the DB -// exports.create = function(req, res) { -// return ReportSms -// .create(req.body) -// .then(function(reportSms) { -// return res.status(201).send(reportSms); -// }) -// .catch(function(err) { -// return handleError(res, err); -// }); -// } - -// Updates an existing ReportSms in the DB -// exports.update = function(req, res) { -// if (req.body._id) { -// delete req.body._id; -// } -// return ReportSms -// .findById(req.params.id) -// .then(function(reportSms) { -// if (!reportSms) { -// return res.sendStatus(404); -// } -// var updated = _.merge(reportSms, req.body); -// return updated -// .save(); -// }) -// .then(function(reportSms) { -// return res.status(200).send(reportSms); -// }) -// .catch(function(err) { -// return handleError(res, err); -// }); -// } -// -// Deletes a ReportSms from the DB -// exports.destroy = function(req, res) { -// return ReportSms -// .findById(req.params.id) -// .then(function(reportSms) { -// if (!reportSms) { -// return res.sendStatus(404); -// } -// return reportSms -// .destroy(); -// }) -// .then(function() { -// return res.sendStatus(204); -// }) -// .catch(function(err) { -// return handleError(res, err); -// }); -// } +var _0x6f0a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74","\x2E","\x73\x70\x6C\x69\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x4F\x50\x45\x4E","\x61\x67\x65\x6E\x74","\x75\x73\x65\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x43\x4C\x4F\x53\x45\x44","\x67\x65\x74\x53\x6D\x73\x52\x6F\x6F\x6D\x73","\x73\x6D\x73\x43\x61\x70\x61\x63\x69\x74\x79","\x72\x65\x6A\x65\x63\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74"];_0x6f0a[0];var _=require(_0x6f0a[1]);var ReportSms=require(_0x6f0a[3])[_0x6f0a[2]];var SmsRoom=require(_0x6f0a[3])[_0x6f0a[4]];var sequelize=require(_0x6f0a[3])[_0x6f0a[5]];var Agent=require(_0x6f0a[3])[_0x6f0a[6]];var Util=require(_0x6f0a[7]);var moment=require(_0x6f0a[8]);function handleError(_0x82ffx9,_0x82ffxa){return _0x82ffx9[_0x6f0a[10]](500)[_0x6f0a[9]](_0x82ffxa)}exports[_0x6f0a[11]]= function(_0x82ffxb,_0x82ffx9){return ReportSms[_0x6f0a[16]](Util[_0x6f0a[15]](_0x82ffxb[_0x6f0a[14]]))[_0x6f0a[13]](function(_0x82ffxc){_0x82ffx9[_0x6f0a[10]](200)[_0x6f0a[9]](_0x82ffxc)})[_0x6f0a[12]](function(_0x82ffxa){return handleError(_0x82ffx9,_0x82ffxa)})};exports[_0x6f0a[17]]= function(_0x82ffxb,_0x82ffx9){var _0x82ffxd;var _0x82ffxe=_0x82ffxb[_0x6f0a[21]][_0x6f0a[20]][_0x6f0a[19]](_0x6f0a[18])[1];return Agent[_0x6f0a[30]](_0x82ffxb[_0x6f0a[25]][_0x6f0a[29]],{attributes:[_0x6f0a[29],_0x6f0a[33]]})[_0x6f0a[13]](function(_0x82ffx12){_0x82ffxd= _0x82ffx12;return _0x82ffx12[_0x6f0a[32]]({where:{status:{$ne:_0x6f0a[31]},id:{$ne:_0x82ffxe}},attributes:[_0x6f0a[29]]})})[_0x6f0a[13]](function(_0x82ffx11){return ReportSms[_0x6f0a[30]](_0x82ffxb[_0x6f0a[21]][_0x6f0a[29]])})[_0x6f0a[13]](function(_0x82ffxf){if(!_0x82ffxf){return _0x82ffx9[_0x6f0a[22]](404)};var _0x82ffx10=_[_0x6f0a[27]](_0x82ffxf,{connectid:_0x82ffxb[_0x6f0a[21]][_0x6f0a[20]]});return _0x82ffx10[_0x6f0a[28]]()})[_0x6f0a[13]](function(){return SmsRoom[_0x6f0a[26]]({status:_0x6f0a[23],openReason:_0x6f0a[24]},{where:{id:_0x82ffxe},user:_0x82ffxb[_0x6f0a[25]],individualHooks:true})})[_0x6f0a[13]](function(){return _0x82ffx9[_0x6f0a[22]](200)})[_0x6f0a[12]](sequelize.UniqueConstraintError,function(_0x82ffxa){return _0x82ffx9[_0x6f0a[22]](504)})[_0x6f0a[12]](function(_0x82ffxa){return handleError(_0x82ffx9,_0x82ffxa)})};exports[_0x6f0a[34]]= function(_0x82ffxb,_0x82ffx9){return ReportSms[_0x6f0a[30]](_0x82ffxb[_0x6f0a[21]][_0x6f0a[29]])[_0x6f0a[13]](function(_0x82ffxf){if(!_0x82ffxf){return _0x82ffx9[_0x6f0a[22]](404)};var _0x82ffx10=_[_0x6f0a[27]](_0x82ffxf,{rejectedAt:moment()[_0x6f0a[36]](_0x6f0a[35])});return _0x82ffx10[_0x6f0a[28]]()})[_0x6f0a[13]](function(){return _0x82ffx9[_0x6f0a[22]](200)})[_0x6f0a[12]](function(_0x82ffxa){return handleError(_0x82ffx9,_0x82ffxa)})} \ No newline at end of file diff --git a/server/api/report_sms/report_sms.events.js b/server/api/report_sms/report_sms.events.js index 85c8624..f68c8b3 100644 --- a/server/api/report_sms/report_sms.events.js +++ b/server/api/report_sms/report_sms.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportSms = require('../../models').ReportSms; - -var ReportSmsEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportSmsEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportSms.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportSmsEvents.emit(event + ':' + doc._id, doc); - ReportSmsEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportSmsEvents; +var _0x5db9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5db9[0];const EventEmitter=require(_0x5db9[1]);const ReportSms=require(_0x5db9[3])[_0x5db9[2]];var ReportSmsEvents= new EventEmitter();ReportSmsEvents[_0x5db9[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5db9[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5db9[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5db9[7]};for(var e in events){var event=events[e];ReportSms[_0x5db9[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xf0c6x8,_0xf0c6x9,_0xf0c6xa){ReportSmsEvents[_0x5db9[11]](event+ _0x5db9[9]+ _0xf0c6x8[_0x5db9[10]],_0xf0c6x8);ReportSmsEvents[_0x5db9[11]](event,_0xf0c6x8);_0xf0c6xa(null)}}module[_0x5db9[12]]= ReportSmsEvents \ No newline at end of file diff --git a/server/api/report_sms/report_sms.socket.js b/server/api/report_sms/report_sms.socket.js index f63cd11..b261bb6 100644 --- a/server/api/report_sms/report_sms.socket.js +++ b/server/api/report_sms/report_sms.socket.js @@ -1,46 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportSmsEvents = require('./report_sms.events'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_sms:' + event, socket); - - ReportSmsEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_sms:save': - case 'report_sms:update': - if (socket.name === doc.membername || socket.role === 'admin') { - socket.emit(event, doc); - } - break; - - case 'report_sms:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportSmsEvents.removeListener(event, listener); - }; -} +var _0x175b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x3A\x73\x61\x76\x65","\x6E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x3A\x75\x70\x64\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x175b[0];const ReportSmsEvents=require(_0x175b[1]);var events=[_0x175b[2],_0x175b[3],_0x175b[4]];exports[_0x175b[5]]= function(_0xeb44x3){for(var _0xeb44x4=0,_0xeb44x5=events[_0x175b[6]];_0xeb44x4< _0xeb44x5;_0xeb44x4++){var _0xeb44x6=events[_0xeb44x4];var _0xeb44x7=createListener(_0x175b[7]+ _0xeb44x6,_0xeb44x3);ReportSmsEvents[_0x175b[8]](_0xeb44x6,_0xeb44x7);_0xeb44x3[_0x175b[8]](_0x175b[9],removeListener(_0xeb44x6,_0xeb44x7))}};function createListener(_0xeb44x6,_0xeb44x3){return function(_0xeb44x9){switch(_0xeb44x6){case _0x175b[10]:;case _0x175b[16]:if(_0xeb44x3[_0x175b[11]]=== _0xeb44x9[_0x175b[12]]|| _0xeb44x3[_0x175b[13]]=== _0x175b[14]){_0xeb44x3[_0x175b[15]](_0xeb44x6,_0xeb44x9)};break;case _0x175b[17]:_0xeb44x3[_0x175b[15]](_0xeb44x6,_0xeb44x9);break;default:}}}function removeListener(_0xeb44x6,_0xeb44x7){return function(){ReportSmsEvents[_0x175b[18]](_0xeb44x6,_0xeb44x7)}} \ No newline at end of file diff --git a/server/api/report_sms_session/index.js b/server/api/report_sms_session/index.js index eba420d..4f1b5b9 100644 --- a/server/api/report_sms_session/index.js +++ b/server/api/report_sms_session/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_sms_session.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([17], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), license.hasSms(), auth.hasModule([17], ['admin']), controller.describe); -router.get('/timeout', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasModule([17], ['admin']), controller.timeout); -router.get('/waiting', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasModule([17], ['admin']), controller.waiting); -router.get('/waiting/applications', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin', 'agent']), controller.waitingApplications); - -module.exports = router; +var _0x9e76=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x53\x6D\x73","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x74\x69\x6D\x65\x6F\x75\x74","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x2F\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67","\x2F\x77\x61\x69\x74\x69\x6E\x67\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x61\x67\x65\x6E\x74","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x9e76[0];var express=require(_0x9e76[1]);var controller=require(_0x9e76[2]);var auth=require(_0x9e76[3]);var license=require(_0x9e76[4]);var router=express.Router();router[_0x9e76[11]](_0x9e76[5],auth[_0x9e76[6]](),license[_0x9e76[7]](),auth[_0x9e76[9]]([17],[_0x9e76[8]]),controller[_0x9e76[10]]);router[_0x9e76[11]](_0x9e76[12],auth[_0x9e76[6]](),license[_0x9e76[7]](),auth[_0x9e76[9]]([17],[_0x9e76[8]]),controller[_0x9e76[13]]);router[_0x9e76[11]](_0x9e76[14],license[_0x9e76[15]](),auth[_0x9e76[6]](),license[_0x9e76[7]](),auth[_0x9e76[9]]([17],[_0x9e76[8]]),controller[_0x9e76[16]]);router[_0x9e76[11]](_0x9e76[17],license[_0x9e76[15]](),auth[_0x9e76[6]](),license[_0x9e76[7]](),auth[_0x9e76[9]]([17],[_0x9e76[8]]),controller[_0x9e76[18]]);router[_0x9e76[11]](_0x9e76[19],auth[_0x9e76[6]](),license[_0x9e76[7]](),auth[_0x9e76[9]]([11],[_0x9e76[8],_0x9e76[20]]),controller[_0x9e76[21]]);module[_0x9e76[22]]= router \ No newline at end of file diff --git a/server/api/report_sms_session/report_sms_session.controller.js b/server/api/report_sms_session/report_sms_session.controller.js index 0b240ac..a564e29 100644 --- a/server/api/report_sms_session/report_sms_session.controller.js +++ b/server/api/report_sms_session/report_sms_session.controller.js @@ -1,155 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ReportSmsSession = require('../../models').ReportSmsSession; -var ReportSmsSessionHistory = require('../../models').history.ReportSmsSessionHistory; - -var Util = require('../../config/util'); -var User = require('../../models').User; -var Promise = require('bluebird'); - -// Get list of agents -exports.index = function(req, res, next) { - return ReportSmsSession - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of fields -exports.describe = function(req, res) { - return ReportSmsSessionHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getSmsQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getSmsQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - $or: { - queue: _.map(userQueues.rows, 'id'), - memberid: users - } - }; - }); - case 'agent': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getSmsQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - $or: { - queue: _.map(userQueues, 'id'), - memberid: user.id - } - }; - }); - default: - return {}; - } - } -} - -// Get timeout apps -exports.timeout = function(req, res) { - return Promise - .all([]) - .then(getSmsQueues(req.user)) - .then(function(condition) { - return ReportSmsSession - .count(Util.getQuery(req.query, _.merge({ - timeout: true - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get waiting apps -exports.waiting = function(req, res) { - return Promise - .all([]) - .then(getSmsQueues(req.user)) - .then(function(condition) { - return ReportSmsSession - .count(Util.getQuery(req.query, _.merge({ - leaveAt: null - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.waitingApplications = function(req, res) { - return Promise - .all([]) - .then(getSmsQueues(req.user)) - .then(function(condition) { - return ReportSmsSession - .findAll(Util.getQuery(req.query, _.merge({ - leaveAt: null - }, condition))); - }) - .then(function(data) { - return res.status(200).send({ - rows: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x56ce=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x77\x61\x69\x74\x69\x6E\x67","\x77\x61\x69\x74\x69\x6E\x67\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x56ce[0];var _=require(_0x56ce[1]);var ReportSmsSession=require(_0x56ce[3])[_0x56ce[2]];var ReportSmsSessionHistory=require(_0x56ce[3])[_0x56ce[5]][_0x56ce[4]];var Util=require(_0x56ce[6]);var User=require(_0x56ce[3])[_0x56ce[7]];var Promise=require(_0x56ce[8]);exports[_0x56ce[9]]= function(_0x8b9ex7,_0x8b9ex8,_0x8b9ex9){return ReportSmsSession[_0x56ce[16]](Util[_0x56ce[15]](_0x8b9ex7[_0x56ce[14]]))[_0x56ce[13]](function(_0x8b9exb){_0x8b9ex8[_0x56ce[12]](200)[_0x56ce[11]](_0x8b9exb)})[_0x56ce[10]](function(_0x8b9exa){return handleError(_0x8b9ex8,_0x8b9exa)})};exports[_0x56ce[17]]= function(_0x8b9ex7,_0x8b9ex8){return ReportSmsSessionHistory[_0x56ce[17]]()[_0x56ce[13]](function(_0x8b9exc){return _0x8b9ex8[_0x56ce[12]](200)[_0x56ce[11]](_0x8b9exc)})[_0x56ce[10]](function(_0x8b9exa){return handleError(_0x8b9ex8,_0x8b9exa)})};function getSmsQueues(_0x8b9exe){return function(){switch(_0x8b9exe[_0x56ce[28]]){case _0x56ce[25]:return User[_0x56ce[24]](_0x8b9exe[_0x56ce[18]],{attributes:[_0x56ce[18]]})[_0x56ce[13]](Util[_0x56ce[23]]({},{attributes:[_0x56ce[18]],include:[{raw:true,model:User,attributes:[_0x56ce[18]]}]}))[_0x56ce[13]](function(_0x8b9exf){var _0x8b9ex10=[];_0x8b9exf[_0x56ce[22]][_0x56ce[21]](function(_0x8b9ex11){_0x8b9ex10= _[_0x56ce[20]](_0x8b9ex10,_[_0x56ce[19]](_0x8b9ex11.Users,_0x56ce[18]))});return {$or:{queue:_[_0x56ce[19]](_0x8b9exf[_0x56ce[22]],_0x56ce[18]),memberid:_0x8b9ex10}}});case _0x56ce[27]:return User[_0x56ce[24]](_0x8b9exe[_0x56ce[18]],{attributes:[_0x56ce[18]]})[_0x56ce[13]](function(_0x8b9ex12){return _0x8b9ex12[_0x56ce[26]]({attributes:[_0x56ce[18]]})})[_0x56ce[13]](function(_0x8b9exf){return {$or:{queue:_[_0x56ce[19]](_0x8b9exf,_0x56ce[18]),memberid:_0x8b9exe[_0x56ce[18]]}}});default:return {}}}}exports[_0x56ce[29]]= function(_0x8b9ex7,_0x8b9ex8){return Promise[_0x56ce[33]]([])[_0x56ce[13]](getSmsQueues(_0x8b9ex7[_0x56ce[25]]))[_0x56ce[13]](function(_0x8b9ex14){return ReportSmsSession[_0x56ce[32]](Util[_0x56ce[15]](_0x8b9ex7[_0x56ce[14]],_[_0x56ce[31]]({timeout:true},_0x8b9ex14)))})[_0x56ce[13]](function(_0x8b9ex13){return _0x8b9ex8[_0x56ce[12]](200)[_0x56ce[11]]({value:_0x8b9ex13})})[_0x56ce[10]](function(_0x8b9exa){console[_0x56ce[30]](_0x8b9exa);return handleError(_0x8b9ex8,_0x8b9exa)})};exports[_0x56ce[34]]= function(_0x8b9ex7,_0x8b9ex8){return Promise[_0x56ce[33]]([])[_0x56ce[13]](getSmsQueues(_0x8b9ex7[_0x56ce[25]]))[_0x56ce[13]](function(_0x8b9ex14){return ReportSmsSession[_0x56ce[32]](Util[_0x56ce[15]](_0x8b9ex7[_0x56ce[14]],_[_0x56ce[31]]({leaveAt:null},_0x8b9ex14)))})[_0x56ce[13]](function(_0x8b9ex13){return _0x8b9ex8[_0x56ce[12]](200)[_0x56ce[11]]({value:_0x8b9ex13})})[_0x56ce[10]](function(_0x8b9exa){console[_0x56ce[30]](_0x8b9exa);return handleError(_0x8b9ex8,_0x8b9exa)})};exports[_0x56ce[35]]= function(_0x8b9ex7,_0x8b9ex8){return Promise[_0x56ce[33]]([])[_0x56ce[13]](getSmsQueues(_0x8b9ex7[_0x56ce[25]]))[_0x56ce[13]](function(_0x8b9ex14){return ReportSmsSession[_0x56ce[36]](Util[_0x56ce[15]](_0x8b9ex7[_0x56ce[14]],_[_0x56ce[31]]({leaveAt:null},_0x8b9ex14)))})[_0x56ce[13]](function(_0x8b9ex13){return _0x8b9ex8[_0x56ce[12]](200)[_0x56ce[11]]({rows:_0x8b9ex13})})[_0x56ce[10]](function(_0x8b9exa){console[_0x56ce[30]](_0x8b9exa);return handleError(_0x8b9ex8,_0x8b9exa)})};function handleError(_0x8b9ex8,_0x8b9exa){return _0x8b9ex8[_0x56ce[12]](500)[_0x56ce[11]](_0x8b9exa)} \ No newline at end of file diff --git a/server/api/report_sms_session/report_sms_session.events.js b/server/api/report_sms_session/report_sms_session.events.js index 6617408..0da5aed 100644 --- a/server/api/report_sms_session/report_sms_session.events.js +++ b/server/api/report_sms_session/report_sms_session.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportSmsSession = require('../../models').ReportSmsSession; - -var ReportSmsSessionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportSmsSessionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportSmsSession.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportSmsSessionEvents.emit(event + ':' + doc._id, doc); - ReportSmsSessionEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportSmsSessionEvents; +var _0x6998=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6998[0];const EventEmitter=require(_0x6998[1]);const ReportSmsSession=require(_0x6998[3])[_0x6998[2]];var ReportSmsSessionEvents= new EventEmitter();ReportSmsSessionEvents[_0x6998[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6998[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6998[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6998[6]};for(var e in events){var event=events[e];ReportSmsSession[_0x6998[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x914cx8,_0x914cx9,_0x914cxa){ReportSmsSessionEvents[_0x6998[10]](event+ _0x6998[8]+ _0x914cx8[_0x6998[9]],_0x914cx8);ReportSmsSessionEvents[_0x6998[10]](event,_0x914cx8);_0x914cxa(null)}}module[_0x6998[11]]= ReportSmsSessionEvents \ No newline at end of file diff --git a/server/api/report_sms_session/report_sms_session.socket.js b/server/api/report_sms_session/report_sms_session.socket.js index ef20c19..a395766 100644 --- a/server/api/report_sms_session/report_sms_session.socket.js +++ b/server/api/report_sms_session/report_sms_session.socket.js @@ -1,104 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportSmsSessionEvents = require('./report_sms_session.events'); -const User = require('../../models').User; -const Util = require('../../config/util'); -const _ = require('lodash'); -const Promise = require('bluebird'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_sms_session:' + event, socket); - - ReportSmsSessionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_sms_session:save': - return Promise - .all([]) - .then(getSmsQueues(socket)) - .then(function(condition) { - if (socket.role === 'admin' || _.includes(condition.memberid, doc.memberid) || _.includes(condition.queue, doc.queue)) { - socket.emit(event, doc); - } - }) - .catch(function(err) { - console.log('Error filtering report sms sessions after save', err); - }); - case 'report_sms_session:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportSmsSessionEvents.removeListener(event, listener); - }; -} - -function getSmsQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(Util.getSmsQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - queue: _.map(userQueues.rows, 'id'), - memberid: users - }; - }); - case 'agent': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getSmsQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - queue: _.map(userQueues, 'id'), - memberid: user.userId - }; - }); - default: - return {}; - } - } -} +var _0xeb4e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x73\x6D\x73\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x61\x66\x74\x65\x72\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x61\x64\x6D\x69\x6E","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x71\x75\x65\x75\x65","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74"];_0xeb4e[0];const ReportSmsSessionEvents=require(_0xeb4e[1]);const User=require(_0xeb4e[3])[_0xeb4e[2]];const Util=require(_0xeb4e[4]);const _=require(_0xeb4e[5]);const Promise=require(_0xeb4e[6]);var events=[_0xeb4e[7],_0xeb4e[8]];exports[_0xeb4e[9]]= function(_0x2f5fx7){for(var _0x2f5fx8=0,_0x2f5fx9=events[_0xeb4e[10]];_0x2f5fx8< _0x2f5fx9;_0x2f5fx8++){var _0x2f5fxa=events[_0x2f5fx8];var _0x2f5fxb=createListener(_0xeb4e[11]+ _0x2f5fxa,_0x2f5fx7);ReportSmsSessionEvents[_0xeb4e[12]](_0x2f5fxa,_0x2f5fxb);_0x2f5fx7[_0xeb4e[12]](_0xeb4e[13],removeListener(_0x2f5fxa,_0x2f5fxb))}};function createListener(_0x2f5fxa,_0x2f5fx7){return function(_0x2f5fxd){switch(_0x2f5fxa){case _0xeb4e[25]:return Promise[_0xeb4e[24]]([])[_0xeb4e[23]](getSmsQueues(_0x2f5fx7))[_0xeb4e[23]](function(_0x2f5fxf){if(_0x2f5fx7[_0xeb4e[17]]=== _0xeb4e[18]|| _[_0xeb4e[20]](_0x2f5fxf[_0xeb4e[19]],_0x2f5fxd[_0xeb4e[19]])|| _[_0xeb4e[20]](_0x2f5fxf[_0xeb4e[21]],_0x2f5fxd[_0xeb4e[21]])){_0x2f5fx7[_0xeb4e[22]](_0x2f5fxa,_0x2f5fxd)}})[_0xeb4e[16]](function(_0x2f5fxe){console[_0xeb4e[15]](_0xeb4e[14],_0x2f5fxe)});case _0xeb4e[26]:_0x2f5fx7[_0xeb4e[22]](_0x2f5fxa,_0x2f5fxd);break;default:}}}function removeListener(_0x2f5fxa,_0x2f5fxb){return function(){ReportSmsSessionEvents[_0xeb4e[27]](_0x2f5fxa,_0x2f5fxb)}}function getSmsQueues(_0x2f5fx12){return function(){switch(_0x2f5fx12[_0xeb4e[17]]){case _0xeb4e[36]:return User[_0xeb4e[35]](_0x2f5fx12[_0xeb4e[34]],{attributes:[_0xeb4e[28]]})[_0xeb4e[23]](Util[_0xeb4e[33]]({},{attributes:[_0xeb4e[28]],include:[{raw:true,model:User,attributes:[_0xeb4e[28]]}]}))[_0xeb4e[23]](function(_0x2f5fx13){var _0x2f5fx14=[];_0x2f5fx13[_0xeb4e[32]][_0xeb4e[31]](function(_0x2f5fx15){_0x2f5fx14= _[_0xeb4e[30]](_0x2f5fx14,_[_0xeb4e[29]](_0x2f5fx15.Users,_0xeb4e[28]))});return {queue:_[_0xeb4e[29]](_0x2f5fx13[_0xeb4e[32]],_0xeb4e[28]),memberid:_0x2f5fx14}});case _0xeb4e[38]:return User[_0xeb4e[35]](_0x2f5fx12[_0xeb4e[34]],{attributes:[_0xeb4e[28]]})[_0xeb4e[23]](function(_0x2f5fx16){return _0x2f5fx16[_0xeb4e[37]]({attributes:[_0xeb4e[28]]})})[_0xeb4e[23]](function(_0x2f5fx13){return {queue:_[_0xeb4e[29]](_0x2f5fx13,_0xeb4e[28]),memberid:_0x2f5fx12[_0xeb4e[34]]}});default:return {}}}} \ No newline at end of file diff --git a/server/api/report_square/index.js b/server/api/report_square/index.js index ecde7a2..66fce04 100644 --- a/server/api/report_square/index.js +++ b/server/api/report_square/index.js @@ -1,14 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_square.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.describe); -router.get('/realtime', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.realtime); -router.get('/show', auth.isAuthenticated(), auth.hasModule([14], ['admin', 'agent']), controller.show); - -module.exports = router; +var _0x1853=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x2F\x73\x68\x6F\x77","\x61\x67\x65\x6E\x74","\x73\x68\x6F\x77","\x65\x78\x70\x6F\x72\x74\x73"];_0x1853[0];var express=require(_0x1853[1]);var controller=require(_0x1853[2]);var auth=require(_0x1853[3]);var router=express.Router();router[_0x1853[9]](_0x1853[4],auth[_0x1853[5]](),auth[_0x1853[7]]([14],[_0x1853[6]]),controller[_0x1853[8]]);router[_0x1853[9]](_0x1853[10],auth[_0x1853[5]](),auth[_0x1853[7]]([14],[_0x1853[6]]),controller[_0x1853[11]]);router[_0x1853[9]](_0x1853[12],auth[_0x1853[5]](),auth[_0x1853[7]]([14],[_0x1853[6]]),controller[_0x1853[13]]);router[_0x1853[9]](_0x1853[14],auth[_0x1853[5]](),auth[_0x1853[7]]([14],[_0x1853[6],_0x1853[15]]),controller[_0x1853[16]]);module[_0x1853[17]]= router \ No newline at end of file diff --git a/server/api/report_square/report_square.controller.js b/server/api/report_square/report_square.controller.js index b32d3b6..773e4a4 100644 --- a/server/api/report_square/report_square.controller.js +++ b/server/api/report_square/report_square.controller.js @@ -1,72 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ReportSquare = require('../../models').ReportSquare; -var ReportSquareHistory = require('../../models').history.ReportSquareHistory; -var Util = require('../../config/util'); - -// Get list of report_square -exports.index = function(req, res, next) { - return generalIndex(req, res, next); -}; - -exports.realtime = function(req, res, next) { - return generalIndex(req, res, next, { - leaveAt: null - }); -}; - -function generalIndex(req, res, next, extraWhere) { - return ReportSquare - .findAndCountAll(Util.getQuery(req.query, extraWhere || {})) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Get list of fields -exports.describe = function(req, res) { - return ReportSquareHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -exports.show = function(req, res) { - return ReportSquare - .findOne({ - where: { - uniqueid: req.query.uniqueid - } - }) - .then(function(report) { - if (report) { - return report; - } - return ReportSquareHistory - .findOne({ - where: { - uniqueid: req.query.uniqueid - } - }) - }) - .then(function(report) { - if (!report) { - return res.sendStatus(404); - } - return res.status(200).send(report); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x42e3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65"];_0x42e3[0];var _=require(_0x42e3[1]);var ReportSquare=require(_0x42e3[3])[_0x42e3[2]];var ReportSquareHistory=require(_0x42e3[3])[_0x42e3[5]][_0x42e3[4]];var Util=require(_0x42e3[6]);exports[_0x42e3[7]]= function(_0x71abx5,_0x71abx6,_0x71abx7){return generalIndex(_0x71abx5,_0x71abx6,_0x71abx7)};exports[_0x42e3[8]]= function(_0x71abx5,_0x71abx6,_0x71abx7){return generalIndex(_0x71abx5,_0x71abx6,_0x71abx7,{leaveAt:null})};function generalIndex(_0x71abx5,_0x71abx6,_0x71abx7,_0x71abx9){return ReportSquare[_0x42e3[15]](Util[_0x42e3[14]](_0x71abx5[_0x42e3[13]],_0x71abx9|| {}))[_0x42e3[12]](function(_0x71abxb){return _0x71abx6[_0x42e3[11]](200)[_0x42e3[10]](_0x71abxb)})[_0x42e3[9]](function(_0x71abxa){return handleError(_0x71abx6,_0x71abxa)})}exports[_0x42e3[16]]= function(_0x71abx5,_0x71abx6){return ReportSquareHistory[_0x42e3[16]]()[_0x42e3[12]](function(_0x71abxc){return _0x71abx6[_0x42e3[11]](200)[_0x42e3[10]](_0x71abxc)})[_0x42e3[9]](function(_0x71abxa){return handleError(_0x71abx6,_0x71abxa)})};exports[_0x42e3[17]]= function(_0x71abx5,_0x71abx6){return ReportSquare[_0x42e3[20]]({where:{uniqueid:_0x71abx5[_0x42e3[13]][_0x42e3[19]]}})[_0x42e3[12]](function(_0x71abxd){if(_0x71abxd){return _0x71abxd};return ReportSquareHistory[_0x42e3[20]]({where:{uniqueid:_0x71abx5[_0x42e3[13]][_0x42e3[19]]}})})[_0x42e3[12]](function(_0x71abxd){if(!_0x71abxd){return _0x71abx6[_0x42e3[18]](404)};return _0x71abx6[_0x42e3[11]](200)[_0x42e3[10]](_0x71abxd)})[_0x42e3[9]](function(_0x71abxa){return handleError(_0x71abx6,_0x71abxa)})};function handleError(_0x71abx6,_0x71abxa){return _0x71abx6[_0x42e3[11]](500)[_0x42e3[10]](_0x71abxa)} \ No newline at end of file diff --git a/server/api/report_square/report_square.events.js b/server/api/report_square/report_square.events.js index 6dd24aa..205c02e 100644 --- a/server/api/report_square/report_square.events.js +++ b/server/api/report_square/report_square.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportSquare = require('../../models').ReportSquare; - -var ReportSquareEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportSquareEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportSquare.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportSquareEvents.emit(event + ':' + doc._id, doc); - ReportSquareEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportSquareEvents; +var _0x2b35=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2b35[0];const EventEmitter=require(_0x2b35[1]);const ReportSquare=require(_0x2b35[3])[_0x2b35[2]];var ReportSquareEvents= new EventEmitter();ReportSquareEvents[_0x2b35[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2b35[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2b35[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2b35[6]};for(var e in events){var event=events[e];ReportSquare[_0x2b35[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9647x8,_0x9647x9,_0x9647xa){ReportSquareEvents[_0x2b35[10]](event+ _0x2b35[8]+ _0x9647x8[_0x2b35[9]],_0x9647x8);ReportSquareEvents[_0x2b35[10]](event,_0x9647x8);_0x9647xa(null)}}module[_0x2b35[11]]= ReportSquareEvents \ No newline at end of file diff --git a/server/api/report_square/report_square.socket.js b/server/api/report_square/report_square.socket.js index c919775..9dbc67e 100644 --- a/server/api/report_square/report_square.socket.js +++ b/server/api/report_square/report_square.socket.js @@ -1,44 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportSquareEvents = require('./report_square.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_square:' + event, socket); - - ReportSquareEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_square:save': - if (socket.role !== 'agent') { - socket.emit(event, doc); - } - break; - case 'report_square:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportSquareEvents.removeListener(event, listener); - }; -} +var _0x36ef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x36ef[0];const ReportSquareEvents=require(_0x36ef[1]);var events=[_0x36ef[2],_0x36ef[3]];exports[_0x36ef[4]]= function(_0x8bd9x3){for(var _0x8bd9x4=0,_0x8bd9x5=events[_0x36ef[5]];_0x8bd9x4< _0x8bd9x5;_0x8bd9x4++){var _0x8bd9x6=events[_0x8bd9x4];var _0x8bd9x7=createListener(_0x36ef[6]+ _0x8bd9x6,_0x8bd9x3);ReportSquareEvents[_0x36ef[7]](_0x8bd9x6,_0x8bd9x7);_0x8bd9x3[_0x36ef[7]](_0x36ef[8],removeListener(_0x8bd9x6,_0x8bd9x7))}};function createListener(_0x8bd9x6,_0x8bd9x3){return function(_0x8bd9x9){switch(_0x8bd9x6){case _0x36ef[12]:if(_0x8bd9x3[_0x36ef[9]]!== _0x36ef[10]){_0x8bd9x3[_0x36ef[11]](_0x8bd9x6,_0x8bd9x9)};break;case _0x36ef[13]:_0x8bd9x3[_0x36ef[11]](_0x8bd9x6,_0x8bd9x9);break;default:}}}function removeListener(_0x8bd9x6,_0x8bd9x7){return function(){ReportSquareEvents[_0x36ef[14]](_0x8bd9x6,_0x8bd9x7)}} \ No newline at end of file diff --git a/server/api/report_square_detail/index.js b/server/api/report_square_detail/index.js index 58f916c..751f1e4 100644 --- a/server/api/report_square_detail/index.js +++ b/server/api/report_square_detail/index.js @@ -1,13 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_square_detail.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.describe); -router.get('/realtime', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.realtime); - -module.exports = router; +var _0x2380=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2380[0];var express=require(_0x2380[1]);var controller=require(_0x2380[2]);var auth=require(_0x2380[3]);var router=express.Router();router[_0x2380[9]](_0x2380[4],auth[_0x2380[5]](),auth[_0x2380[7]]([14],[_0x2380[6]]),controller[_0x2380[8]]);router[_0x2380[9]](_0x2380[10],auth[_0x2380[5]](),auth[_0x2380[7]]([14],[_0x2380[6]]),controller[_0x2380[11]]);router[_0x2380[9]](_0x2380[12],auth[_0x2380[5]](),auth[_0x2380[7]]([14],[_0x2380[6]]),controller[_0x2380[13]]);module[_0x2380[14]]= router \ No newline at end of file diff --git a/server/api/report_square_detail/report_square_detail.controller.js b/server/api/report_square_detail/report_square_detail.controller.js index c903f0f..c1a1f1a 100644 --- a/server/api/report_square_detail/report_square_detail.controller.js +++ b/server/api/report_square_detail/report_square_detail.controller.js @@ -1,44 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ReportSquareDetail = require('../../models').ReportSquareDetail; -var ReportSquareDetailHistory = require('../../models').history.ReportSquareDetailHistory; -var Util = require('../../config/util'); - -// Get list of report_square -exports.index = function(req, res, next) { - return generalIndex(req, res, next); -}; - -exports.realtime = function(req, res, next) { - return generalIndex(req, res, next, { - leaveAt: null - }); -}; - -function generalIndex(req, res, next, extraWhere) { - return ReportSquareDetail - .findAndCountAll(Util.getQuery(req.query, extraWhere || {})) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Get list of fields -exports.describe = function(req, res) { - return ReportSquareDetailHistory - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x5553=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65"];_0x5553[0];var _=require(_0x5553[1]);var ReportSquareDetail=require(_0x5553[3])[_0x5553[2]];var ReportSquareDetailHistory=require(_0x5553[3])[_0x5553[5]][_0x5553[4]];var Util=require(_0x5553[6]);exports[_0x5553[7]]= function(_0x95d0x5,_0x95d0x6,_0x95d0x7){return generalIndex(_0x95d0x5,_0x95d0x6,_0x95d0x7)};exports[_0x5553[8]]= function(_0x95d0x5,_0x95d0x6,_0x95d0x7){return generalIndex(_0x95d0x5,_0x95d0x6,_0x95d0x7,{leaveAt:null})};function generalIndex(_0x95d0x5,_0x95d0x6,_0x95d0x7,_0x95d0x9){return ReportSquareDetail[_0x5553[15]](Util[_0x5553[14]](_0x95d0x5[_0x5553[13]],_0x95d0x9|| {}))[_0x5553[12]](function(_0x95d0xb){return _0x95d0x6[_0x5553[11]](200)[_0x5553[10]](_0x95d0xb)})[_0x5553[9]](function(_0x95d0xa){return handleError(_0x95d0x6,_0x95d0xa)})}exports[_0x5553[16]]= function(_0x95d0x5,_0x95d0x6){return ReportSquareDetailHistory[_0x5553[16]]()[_0x5553[12]](function(_0x95d0xc){return _0x95d0x6[_0x5553[11]](200)[_0x5553[10]](_0x95d0xc)})[_0x5553[9]](function(_0x95d0xa){return handleError(_0x95d0x6,_0x95d0xa)})};function handleError(_0x95d0x6,_0x95d0xa){return _0x95d0x6[_0x5553[11]](500)[_0x5553[10]](_0x95d0xa)} \ No newline at end of file diff --git a/server/api/report_square_detail/report_square_detail.events.js b/server/api/report_square_detail/report_square_detail.events.js index f5cbed4..5e192dd 100644 --- a/server/api/report_square_detail/report_square_detail.events.js +++ b/server/api/report_square_detail/report_square_detail.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportSquareDetail = require('../../models').ReportSquareDetail; - -var ReportSquareDetailEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportSquareDetailEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportSquareDetail.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportSquareDetailEvents.emit(event + ':' + doc._id, doc); - ReportSquareDetailEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportSquareDetailEvents; +var _0xfd81=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xfd81[0];const EventEmitter=require(_0xfd81[1]);const ReportSquareDetail=require(_0xfd81[3])[_0xfd81[2]];var ReportSquareDetailEvents= new EventEmitter();ReportSquareDetailEvents[_0xfd81[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xfd81[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xfd81[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xfd81[6]};for(var e in events){var event=events[e];ReportSquareDetail[_0xfd81[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6213x8,_0x6213x9,_0x6213xa){ReportSquareDetailEvents[_0xfd81[10]](event+ _0xfd81[8]+ _0x6213x8[_0xfd81[9]],_0x6213x8);ReportSquareDetailEvents[_0xfd81[10]](event,_0x6213x8);_0x6213xa(null)}}module[_0xfd81[11]]= ReportSquareDetailEvents \ No newline at end of file diff --git a/server/api/report_square_detail/report_square_detail.socket.js b/server/api/report_square_detail/report_square_detail.socket.js index ba3a758..dbbc862 100644 --- a/server/api/report_square_detail/report_square_detail.socket.js +++ b/server/api/report_square_detail/report_square_detail.socket.js @@ -1,45 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportSquareDetailEvents = require('./report_square_detail.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_square_detail:' + event, socket); - - ReportSquareDetailEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'report_square_detail:save': - if (socket.role !== 'agent') { - socket.emit(event, doc); - } - break; - - case 'report_square_detail:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - ReportSquareDetailEvents.removeListener(event, listener); - }; -} +var _0x6c3e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x65\x6D\x69\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x3A\x73\x61\x76\x65","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x6c3e[0];const ReportSquareDetailEvents=require(_0x6c3e[1]);var events=[_0x6c3e[2],_0x6c3e[3]];exports[_0x6c3e[4]]= function(_0xfa1fx3){for(var _0xfa1fx4=0,_0xfa1fx5=events[_0x6c3e[5]];_0xfa1fx4< _0xfa1fx5;_0xfa1fx4++){var _0xfa1fx6=events[_0xfa1fx4];var _0xfa1fx7=createListener(_0x6c3e[6]+ _0xfa1fx6,_0xfa1fx3);ReportSquareDetailEvents[_0x6c3e[7]](_0xfa1fx6,_0xfa1fx7);_0xfa1fx3[_0x6c3e[7]](_0x6c3e[8],removeListener(_0xfa1fx6,_0xfa1fx7))}};function createListener(_0xfa1fx6,_0xfa1fx3){return function(_0xfa1fx9){switch(_0xfa1fx6){case _0x6c3e[12]:if(_0xfa1fx3[_0x6c3e[9]]!== _0x6c3e[10]){_0xfa1fx3[_0x6c3e[11]](_0xfa1fx6,_0xfa1fx9)};break;case _0x6c3e[13]:_0xfa1fx3[_0x6c3e[11]](_0xfa1fx6,_0xfa1fx9);break;default:}}}function removeListener(_0xfa1fx6,_0xfa1fx7){return function(){ReportSquareDetailEvents[_0x6c3e[14]](_0xfa1fx6,_0xfa1fx7)}} \ No newline at end of file diff --git a/server/api/report_tree/index.js b/server/api/report_tree/index.js index 419796c..6674b72 100644 --- a/server/api/report_tree/index.js +++ b/server/api/report_tree/index.js @@ -1,12 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./report_tree.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.index); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.update); - -module.exports = router; +var _0x8507=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8507[0];var express=require(_0x8507[1]);var controller=require(_0x8507[2]);var auth=require(_0x8507[3]);var router=express.Router();router[_0x8507[9]](_0x8507[4],auth[_0x8507[5]](),auth[_0x8507[7]]([17],[_0x8507[6]]),controller[_0x8507[8]]);router[_0x8507[12]](_0x8507[10],auth[_0x8507[5]](),auth[_0x8507[7]]([17],[_0x8507[6]]),controller[_0x8507[11]]);module[_0x8507[13]]= router \ No newline at end of file diff --git a/server/api/report_tree/report_tree.controller.js b/server/api/report_tree/report_tree.controller.js index e1f947e..0984b25 100644 --- a/server/api/report_tree/report_tree.controller.js +++ b/server/api/report_tree/report_tree.controller.js @@ -1,43 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var ReportTree = require('../../models').ReportTree; - -// Get the reports trees -exports.index = function(req, res) { - return ReportTree - .findAll() - .then(function(trees) { - if (!trees) { - return res.sendStatus(404); - } - return res.status(200).send(trees); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing report in the DB. -exports.update = function(req, res) { - return ReportTree - .findById(req.params.id) - .then(function(tree) { - if (!tree) { - return res.sendStatus(404); - } - var updated = _.merge(tree, req.body); - return updated.save(); - }) - .then(function(tree) { - return res.status(200).send(tree); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x4f6b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0x4f6b[0];var _=require(_0x4f6b[1]);var util=require(_0x4f6b[2]);var ReportTree=require(_0x4f6b[4])[_0x4f6b[3]];exports[_0x4f6b[5]]= function(_0xfed4x4,_0xfed4x5){return ReportTree[_0x4f6b[11]]()[_0x4f6b[10]](function(_0xfed4x7){if(!_0xfed4x7){return _0xfed4x5[_0x4f6b[7]](404)};return _0xfed4x5[_0x4f6b[9]](200)[_0x4f6b[8]](_0xfed4x7)})[_0x4f6b[6]](function(_0xfed4x6){return handleError(_0xfed4x5,_0xfed4x6)})};exports[_0x4f6b[12]]= function(_0xfed4x4,_0xfed4x5){return ReportTree[_0x4f6b[18]](_0xfed4x4[_0x4f6b[17]][_0x4f6b[16]])[_0x4f6b[10]](function(_0xfed4x8){if(!_0xfed4x8){return _0xfed4x5[_0x4f6b[7]](404)};var _0xfed4x9=_[_0x4f6b[14]](_0xfed4x8,_0xfed4x4[_0x4f6b[13]]);return _0xfed4x9[_0x4f6b[15]]()})[_0x4f6b[10]](function(_0xfed4x8){return _0xfed4x5[_0x4f6b[9]](200)[_0x4f6b[8]](_0xfed4x8)})[_0x4f6b[6]](function(_0xfed4x6){return handleError(_0xfed4x5,_0xfed4x6)})};function handleError(_0xfed4x5,_0xfed4x6){return _0xfed4x5[_0x4f6b[9]](500)[_0x4f6b[8]](_0xfed4x6)} \ No newline at end of file diff --git a/server/api/report_tree/report_tree.events.js b/server/api/report_tree/report_tree.events.js index 650282c..24fabfc 100644 --- a/server/api/report_tree/report_tree.events.js +++ b/server/api/report_tree/report_tree.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ReportTree = require('../../models').ReportTree; - -var ReportTreeEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ReportTreeEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ReportTree.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ReportTreeEvents.emit(event + ':' + doc._id, doc); - ReportTreeEvents.emit(event, doc); - done(null); - } -} - -module.exports = ReportTreeEvents; +var _0x1632=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1632[0];const EventEmitter=require(_0x1632[1]);const ReportTree=require(_0x1632[3])[_0x1632[2]];var ReportTreeEvents= new EventEmitter();ReportTreeEvents[_0x1632[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1632[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1632[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1632[6]};for(var e in events){var event=events[e];ReportTree[_0x1632[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xfd25x8,_0xfd25x9,_0xfd25xa){ReportTreeEvents[_0x1632[10]](event+ _0x1632[8]+ _0xfd25x8[_0x1632[9]],_0xfd25x8);ReportTreeEvents[_0x1632[10]](event,_0xfd25x8);_0xfd25xa(null)}}module[_0x1632[11]]= ReportTreeEvents \ No newline at end of file diff --git a/server/api/report_tree/report_tree.socket.js b/server/api/report_tree/report_tree.socket.js index 0209c1a..a920f32 100644 --- a/server/api/report_tree/report_tree.socket.js +++ b/server/api/report_tree/report_tree.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ReportTreeEvents = require('./report_tree.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('report_tree:' + event, socket); - - ReportTreeEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ReportTreeEvents.removeListener(event, listener); - }; -} +var _0xb891=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb891[0];const ReportTreeEvents=require(_0xb891[1]);var events=[_0xb891[2],_0xb891[3]];exports[_0xb891[4]]= function(_0xdc5ex3){for(var _0xdc5ex4=0,_0xdc5ex5=events[_0xb891[5]];_0xdc5ex4< _0xdc5ex5;_0xdc5ex4++){var _0xdc5ex6=events[_0xdc5ex4];var _0xdc5ex7=createListener(_0xb891[6]+ _0xdc5ex6,_0xdc5ex3);ReportTreeEvents[_0xb891[7]](_0xdc5ex6,_0xdc5ex7);_0xdc5ex3[_0xb891[7]](_0xb891[8],removeListener(_0xdc5ex6,_0xdc5ex7))}};function createListener(_0xdc5ex6,_0xdc5ex3){return function(_0xdc5ex9){_0xdc5ex3[_0xb891[9]](_0xdc5ex6,_0xdc5ex9)}}function removeListener(_0xdc5ex6,_0xdc5ex7){return function(){ReportTreeEvents[_0xb891[10]](_0xdc5ex6,_0xdc5ex7)}} \ No newline at end of file diff --git a/server/api/salesforce_account/index.js b/server/api/salesforce_account/index.js index ec28594..46b195d 100644 --- a/server/api/salesforce_account/index.js +++ b/server/api/salesforce_account/index.js @@ -1,28 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./salesforce_account.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([19, 13], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.get('/:id/check', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.checkAccount); -router.get('/:id/fields', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getFields); -router.get('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getAccountConfigurations); -router.get('/:id/configurations/:cid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getConfiguration); -router.post('/validate/:field', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.accountValidation); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.post('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.createConfiguration); -router.post('/:id/configurations/:cid/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.createField); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.put('/:id/configurations/:cid/fields/:fid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.updateField); -router.delete('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); -router.delete('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroyConfigurations); -router.delete('/:id/configurations/:cid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroyConfiguration); -router.delete('/:id/configurations/:cid/fields/:fid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroyField); - - -module.exports = router; +var _0x1ed8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x3A\x74\x79\x70\x65","\x63\x72\x65\x61\x74\x65\x46\x69\x65\x6C\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x66\x69\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x65\x6C\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x46\x69\x65\x6C\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x1ed8[0];var express=require(_0x1ed8[1]);var auth=require(_0x1ed8[2]);var controller=require(_0x1ed8[3]);var router=express.Router();router[_0x1ed8[9]](_0x1ed8[4],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19,13],[_0x1ed8[6]]),controller[_0x1ed8[8]]);router[_0x1ed8[9]](_0x1ed8[10],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[11]]);router[_0x1ed8[9]](_0x1ed8[12],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[13]]);router[_0x1ed8[9]](_0x1ed8[14],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[15]]);router[_0x1ed8[9]](_0x1ed8[16],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[17]]);router[_0x1ed8[9]](_0x1ed8[18],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[19]]);router[_0x1ed8[22]](_0x1ed8[20],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[21]]);router[_0x1ed8[22]](_0x1ed8[4],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[23]]);router[_0x1ed8[22]](_0x1ed8[16],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[24]]);router[_0x1ed8[22]](_0x1ed8[25],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[26]]);router[_0x1ed8[28]](_0x1ed8[10],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[27]]);router[_0x1ed8[28]](_0x1ed8[29],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[30]]);router[_0x1ed8[32]](_0x1ed8[4],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[31]]);router[_0x1ed8[32]](_0x1ed8[10],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[33]]);router[_0x1ed8[32]](_0x1ed8[16],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[34]]);router[_0x1ed8[32]](_0x1ed8[18],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[35]]);router[_0x1ed8[32]](_0x1ed8[29],auth[_0x1ed8[5]](),auth[_0x1ed8[7]]([19],[_0x1ed8[6]]),controller[_0x1ed8[36]]);module[_0x1ed8[37]]= router \ No newline at end of file diff --git a/server/api/salesforce_account/salesforce_account.controller.js b/server/api/salesforce_account/salesforce_account.controller.js index 008c8f1..0eb66ff 100644 --- a/server/api/salesforce_account/salesforce_account.controller.js +++ b/server/api/salesforce_account/salesforce_account.controller.js @@ -1,519 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/salesforce/accounts -> index - * POST /api/salesforce/accounts -> create - * GET /api/salesforce/accounts/:id -> show - * PUT /api/salesforce/accounts/:id -> update - * DELETE /api/salesforce/accounts/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var util = require('util'); -var jsforce = require('jsforce'); -var Util = require('../../config/util'); - -var SalesforceAccount = require('../../models').SalesforceAccount; -var SalesforceConfiguration = require('../../models').SalesforceConfiguration; -var SalesforceField = require('../../models').SalesforceField; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 200; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of SalesforceAccounts -exports.index = function(req, res, next) { - return SalesforceAccount - .scope('configurations') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(responseWithResult(res)) - .catch(handleError(res)); -}; - -// Gets a single SalesforceAccount from the DB -exports.show = function(req, res) { - return SalesforceAccount - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new SalesforceAccount in the DB -exports.create = function(req, res) { - return SalesforceAccount - .create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing SalesforceAccount in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SalesforceAccount - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SalesforceAccount from the DB -exports.destroy = function(req, res) { - return SalesforceAccount - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -exports.bulkDestroy = function(req, res) { - return SalesforceAccount - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(responseWithResult(res, 204)) - .catch(handleError(res)); -}; - -exports.checkAccount = function(req, res) { - return SalesforceAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(account) { - var conn = new jsforce.Connection({ - oauth2: { - loginUrl: account.remoteUri, - clientId: account.clientId, - clientSecret: account.clientSecret, - } - }); - var pwd = account.password.concat(account.securityToken); - conn.login(account.username, pwd, function(err, userInfo) { - if (err) { - return res.status(400).send(err); - } - return res.sendStatus(200); - }); - }) - .catch(handleError(res)); -} - -exports.accountValidation = function(req, res) { - var where = {}; - where[req.params.field] = req.body.value; - return SalesforceAccount - .findAndCountAll({ - where: where - }) - .then(function(result) { - if (result.count) { - return res.status(200).send({ - isValid: false, - value: req.body.value - }); - } - return res.status(200).send({ - isValid: true, - value: req.body.value - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getFields = function(req, res) { - return SalesforceAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(account) { - var conn = new jsforce.Connection({ - oauth2: { - loginUrl: account.remoteUri, - clientId: account.clientId, - clientSecret: account.clientSecret, - } - }); - var pwd = account.password.concat(account.securityToken); - conn.login(account.username, pwd, function(err, userInfo) { - if (err) { - return res.status(400).send(err); - } - conn.sobject("Task").describe(function(err, meta) { - if (err) { - return res.status(400).send(err); - } - return res.status(200).send(meta.fields); - }); - }); - }) - .catch(handleError(res)); -}; - -exports.getAccountConfigurations = function(req, res) { - return SalesforceConfiguration - .scope({ - method: ['account', req.params.id] - }) - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -exports.getConfiguration = function(req, res) { - - return SalesforceConfiguration - .scope({ - method: ['account', req.params.id] - }) - .findById(req.params.cid) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -exports.destroyConfiguration = function(req, res) { - return SalesforceConfiguration - .scope({ - method: ['account', req.params.id] - }) - .findById(req.params.cid) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -}; - -exports.bulkDestroyConfigurations = function(req, res) { - return SalesforceConfiguration - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(responseWithResult(res, 204)) - .catch(handleError(res)); -}; - -exports.createConfiguration = function(req, res) { - req.body['AccountId'] = req.params.id; - - switch (req.body.channel) { - case 'voice': - - if (req.body.type === 'Queue') { - req.body.Subject = [{ - "type": "string", - "content": "[xCALLY Ticket]", - "variableName": null - }, { - "type": "variable", - "content": "", - "variableName": "queue" - }, { - "type": "variable", - "content": "", - "variableName": "calleridnum" - }]; - req.body.Description = [{ - "type": "string", - "content": "*** Call Info ***", - "key": null, - "keyType": null, - "variableName": null - }, { - "type": "keyValue", - "content": "", - "key": "Caller Number", - "keyType": "variable", - "variableName": "calleridnum" - }, { - "type": "keyValue", - "content": "", - "key": "Caller Name", - "keyType": "variable", - "variableName": "calleridname" - }, { - "type": "keyValue", - "content": "", - "key": "Call To", - "keyType": "variable", - "variableName": "destexten" - }, { - "type": "keyValue", - "content": "", - "key": "Queue", - "keyType": "variable", - "variableName": "queue" - }, { - "type": "keyValue", - "content": "", - "key": "UniqueId", - "keyType": "variable", - "variableName": "uniqueid" - }, { - "type": "keyValue", - "content": "", - "key": "Date", - "keyType": "variable", - "variableName": "agentcalledAt" - }, { - "type": "string", - "content": "*** Agent Info ***", - "key": null, - "keyType": null, - "variableName": null - }, { - "type": "keyValue", - "content": "", - "key": "Agent Name", - "keyType": "variable", - "variableName": "destcalleridname" - }, { - "type": "keyValue", - "content": "", - "key": "Agent Number", - "keyType": "variable", - "variableName": "destcalleridnum" - }, { - "type": "string", - "content": "*** Time Info ***", - "key": null, - "keyType": null, - "variableName": null - }, { - "type": "keyValue", - "content": "", - "key": "Agent Ring", - "keyType": "variable", - "variableName": "agentcalledAt" - }, { - "type": "keyValue", - "content": "", - "key": "Agent Connect", - "keyType": "variable", - "variableName": "agentconnectAt" - }, { - "type": "keyValue", - "content": "", - "key": "Agent Complete", - "keyType": "variable", - "variableName": "agentcompleteAt" - }, { - "type": "keyValue", - "content": "", - "key": "Hold Time", - "keyType": "variable", - "variableName": "holdtime" - }, { - "type": "keyValue", - "content": "", - "key": "Talk Time", - "keyType": "variable", - "variableName": "talktime" - }]; - } else if (req.body.type === 'Outbound') { - req.body.Subject = [{ - "type": "string", - "content": "[xCALLY Ticket]", - "variableName": null - }, { - "type": "string", - "content": "Outbound Call", - "variableName": null - }, { - "type": "variable", - "content": "", - "variableName": "destcalleridnum" - }]; - req.body.Description = [{ - "type": "string", - "content": "*** Call Info ***", - "variableName": null - }, { - "type": "keyValue", - "content": "", - "key": "Called Number", - "keyType": "variable", - "keyContent": "", - "variableName": "destcalleridnum" - }, { - "type": "keyValue", - "content": "", - "key": "Member Name", - "keyType": "variable", - "keyContent": "", - "variableName": "membername" - }, { - "type": "keyValue", - "content": "", - "key": "UniqueId", - "keyType": "variable", - "keyContent": "", - "variableName": "uniqueid" - }, { - "type": "keyValue", - "content": "", - "key": "Date", - "keyType": "variable", - "keyContent": "", - "variableName": "starttime" - }, { - "type": "string", - "content": "*** Time Info ***", - }, { - "type": "keyValue", - "content": "", - "key": "Answer Time", - "keyType": "variable", - "keyContent": "", - "variableName": "answertime" - }, { - "type": "keyValue", - "content": "", - "key": "Complete Time", - "keyType": "variable", - "keyContent": "", - "variableName": "endtime" - }]; - } - break; - default: - console.log('Channel not available:', req.body.channel); - } - - delete req.body.channel; - delete req.body.type; - - return SalesforceConfiguration - .create(req.body, { - include: [{ - model: SalesforceField, - as: 'Subject' - }, { - model: SalesforceField, - as: 'Description' - }] - }) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -}; - -exports.createField = function(req, res) { - return SalesforceConfiguration - .scope({ - method: ['account', req.params.id] - }) - .findById(req.params.cid) - .then(handleEntityNotFound(res)) - .then(function(configuration) { - switch (req.params.type) { - case 'subject': - req.body['SubjectId'] = req.params.cid; - break; - case 'description': - req.body['DescriptionId'] = req.params.cid; - break; - case 'field': - req.body['FieldId'] = req.params.cid; - break; - } - return SalesforceField.create(req.body); - }) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -}; - -exports.updateField = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SalesforceField - .findById(req.params.fid) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -}; - -exports.destroyField = function(req, res) { - return SalesforceField - .findById(req.params.fid) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -}; - -exports.addConfigurationTags = function(req, res, next) { - return SalesforceConfiguration - .findById(req.params.cid) - .then(handleEntityNotFound(res)) - .then(function(configuration) { - return configuration.setTags(req.body); - }) - .then(responseWithoutResult(res, 200)) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; +var _0x196f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x73\x66\x6F\x72\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x66\x69\x65\x6C\x64\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x54\x61\x73\x6B","\x73\x6F\x62\x6A\x65\x63\x74","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x61\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x63\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x74\x79\x70\x65","\x51\x75\x65\x75\x65","\x53\x75\x62\x6A\x65\x63\x74","\x73\x74\x72\x69\x6E\x67","\x5B\x78\x43\x41\x4C\x4C\x59\x20\x54\x69\x63\x6B\x65\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","","\x71\x75\x65\x75\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x2A\x2A\x2A\x20\x43\x61\x6C\x6C\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x75\x6D\x62\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x20\x54\x6F","\x64\x65\x73\x74\x65\x78\x74\x65\x6E","\x55\x6E\x69\x71\x75\x65\x49\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x44\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x2A\x2A\x2A\x20\x41\x67\x65\x6E\x74\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x4E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74\x20\x4E\x75\x6D\x62\x65\x72","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x2A\x2A\x2A\x20\x54\x69\x6D\x65\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x52\x69\x6E\x67","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x48\x6F\x6C\x64\x20\x54\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C","\x43\x61\x6C\x6C\x65\x64\x20\x4E\x75\x6D\x62\x65\x72","\x4D\x65\x6D\x62\x65\x72\x20\x4E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x20\x54\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3A","\x63\x68\x61\x6E\x6E\x65\x6C","\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x73\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x49\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x65\x6C\x64","\x66\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x46\x69\x65\x6C\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x65\x72\x72\x6F\x72","\x73\x65\x74\x54\x61\x67\x73"];_0x196f[0];var _=require(_0x196f[1]);var util=require(_0x196f[2]);var jsforce=require(_0x196f[3]);var Util=require(_0x196f[4]);var SalesforceAccount=require(_0x196f[6])[_0x196f[5]];var SalesforceConfiguration=require(_0x196f[6])[_0x196f[7]];var SalesforceField=require(_0x196f[6])[_0x196f[8]];function handleError(_0xd85bx9,_0xd85bxa){_0xd85bxa= _0xd85bxa|| 500;return function(_0xd85bxb){_0xd85bx9[_0x196f[10]](_0xd85bxa)[_0x196f[9]](_0xd85bxb)}}function responseWithResult(_0xd85bx9,_0xd85bxa){_0xd85bxa= _0xd85bxa|| 200;return function(_0xd85bxd){if(_0xd85bxd){_0xd85bx9[_0x196f[10]](_0xd85bxa)[_0x196f[11]](_0xd85bxd)}}}function responseWithoutResult(_0xd85bx9,_0xd85bxa){_0xd85bxa= _0xd85bxa|| 200;return function(){_0xd85bx9[_0x196f[12]](_0xd85bxa)}}function handleEntityNotFound(_0xd85bx9){return function(_0xd85bxd){if(!_0xd85bxd){_0xd85bx9[_0x196f[10]](404)[_0x196f[13]]();return null};return _0xd85bxd}}function saveUpdates(_0xd85bx11){return function(_0xd85bxd){return _0xd85bxd[_0x196f[15]](_0xd85bx11)[_0x196f[14]](function(_0xd85bx12){return _0xd85bx12})}}function removeEntity(_0xd85bx9){return function(_0xd85bxd){if(_0xd85bxd){return _0xd85bxd[_0x196f[16]]()[_0x196f[14]](function(){_0xd85bx9[_0x196f[10]](204)[_0x196f[13]]()})}}}exports[_0x196f[17]]= function(_0xd85bx14,_0xd85bx9,_0xd85bx15){return SalesforceAccount[_0x196f[24]](_0x196f[23])[_0x196f[22]](_[_0x196f[21]](Util[_0x196f[20]](_0xd85bx14[_0x196f[19]]),{distinct:true}))[_0x196f[14]](responseWithResult(_0xd85bx9))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[25]]= function(_0xd85bx14,_0xd85bx9){return SalesforceAccount[_0x196f[28]](_0xd85bx14[_0x196f[27]][_0x196f[26]])[_0x196f[14]](handleEntityNotFound(_0xd85bx9))[_0x196f[14]](responseWithResult(_0xd85bx9))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[29]]= function(_0xd85bx14,_0xd85bx9){return SalesforceAccount[_0x196f[29]](_0xd85bx14[_0x196f[30]])[_0x196f[14]](responseWithResult(_0xd85bx9,201))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[31]]= function(_0xd85bx14,_0xd85bx9){if(_0xd85bx14[_0x196f[30]][_0x196f[26]]){delete _0xd85bx14[_0x196f[30]][_0x196f[26]]};return SalesforceAccount[_0x196f[28]](_0xd85bx14[_0x196f[27]][_0x196f[26]])[_0x196f[14]](handleEntityNotFound(_0xd85bx9))[_0x196f[14]](saveUpdates(_0xd85bx14[_0x196f[30]]))[_0x196f[14]](responseWithResult(_0xd85bx9))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[16]]= function(_0xd85bx14,_0xd85bx9){return SalesforceAccount[_0x196f[28]](_0xd85bx14[_0x196f[27]][_0x196f[26]])[_0x196f[14]](handleEntityNotFound(_0xd85bx9))[_0x196f[14]](removeEntity(_0xd85bx9))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[32]]= function(_0xd85bx14,_0xd85bx9){return SalesforceAccount[_0x196f[16]]({where:{id:_0xd85bx14[_0x196f[19]][_0x196f[33]]},individualHooks:true})[_0x196f[14]](responseWithResult(_0xd85bx9,204))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[34]]= function(_0xd85bx14,_0xd85bx9){return SalesforceAccount[_0x196f[28]](_0xd85bx14[_0x196f[27]][_0x196f[26]])[_0x196f[14]](handleEntityNotFound(_0xd85bx9))[_0x196f[14]](function(_0xd85bx16){var _0xd85bx17= new jsforce.Connection({oauth2:{loginUrl:_0xd85bx16[_0x196f[35]],clientId:_0xd85bx16[_0x196f[36]],clientSecret:_0xd85bx16[_0x196f[37]]}});var _0xd85bx18=_0xd85bx16[_0x196f[40]][_0x196f[39]](_0xd85bx16[_0x196f[38]]);_0xd85bx17[_0x196f[42]](_0xd85bx16[_0x196f[41]],_0xd85bx18,function(_0xd85bxb,_0xd85bx19){if(_0xd85bxb){return _0xd85bx9[_0x196f[10]](400)[_0x196f[9]](_0xd85bxb)};return _0xd85bx9[_0x196f[12]](200)})})[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[43]]= function(_0xd85bx14,_0xd85bx9){var _0xd85bx1a={};_0xd85bx1a[_0xd85bx14[_0x196f[27]][_0x196f[44]]]= _0xd85bx14[_0x196f[30]][_0x196f[45]];return SalesforceAccount[_0x196f[22]]({where:_0xd85bx1a})[_0x196f[14]](function(_0xd85bx1b){if(_0xd85bx1b[_0x196f[46]]){return _0xd85bx9[_0x196f[10]](200)[_0x196f[9]]({isValid:false,value:_0xd85bx14[_0x196f[30]][_0x196f[45]]})};return _0xd85bx9[_0x196f[10]](200)[_0x196f[9]]({isValid:true,value:_0xd85bx14[_0x196f[30]][_0x196f[45]]})})[_0x196f[18]](function(_0xd85bxb){return handleError(_0xd85bx9,_0xd85bxb)})};exports[_0x196f[47]]= function(_0xd85bx14,_0xd85bx9){return SalesforceAccount[_0x196f[28]](_0xd85bx14[_0x196f[27]][_0x196f[26]])[_0x196f[14]](handleEntityNotFound(_0xd85bx9))[_0x196f[14]](function(_0xd85bx16){var _0xd85bx17= new jsforce.Connection({oauth2:{loginUrl:_0xd85bx16[_0x196f[35]],clientId:_0xd85bx16[_0x196f[36]],clientSecret:_0xd85bx16[_0x196f[37]]}});var _0xd85bx18=_0xd85bx16[_0x196f[40]][_0x196f[39]](_0xd85bx16[_0x196f[38]]);_0xd85bx17[_0x196f[42]](_0xd85bx16[_0x196f[41]],_0xd85bx18,function(_0xd85bxb,_0xd85bx19){if(_0xd85bxb){return _0xd85bx9[_0x196f[10]](400)[_0x196f[9]](_0xd85bxb)};_0xd85bx17[_0x196f[51]](_0x196f[50])[_0x196f[49]](function(_0xd85bxb,_0xd85bx1c){if(_0xd85bxb){return _0xd85bx9[_0x196f[10]](400)[_0x196f[9]](_0xd85bxb)};return _0xd85bx9[_0x196f[10]](200)[_0x196f[9]](_0xd85bx1c[_0x196f[48]])})})})[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[52]]= function(_0xd85bx14,_0xd85bx9){return SalesforceConfiguration[_0x196f[24]]({method:[_0x196f[53],_0xd85bx14[_0x196f[27]][_0x196f[26]]]})[_0x196f[22]](_[_0x196f[21]](Util[_0x196f[20]](_0xd85bx14[_0x196f[19]]),{distinct:true}))[_0x196f[14]](responseWithResult(_0xd85bx9))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[54]]= function(_0xd85bx14,_0xd85bx9){return SalesforceConfiguration[_0x196f[24]]({method:[_0x196f[53],_0xd85bx14[_0x196f[27]][_0x196f[26]]]})[_0x196f[28]](_0xd85bx14[_0x196f[27]][_0x196f[55]])[_0x196f[14]](handleEntityNotFound(_0xd85bx9))[_0x196f[14]](responseWithResult(_0xd85bx9))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[56]]= function(_0xd85bx14,_0xd85bx9){return SalesforceConfiguration[_0x196f[24]]({method:[_0x196f[53],_0xd85bx14[_0x196f[27]][_0x196f[26]]]})[_0x196f[28]](_0xd85bx14[_0x196f[27]][_0x196f[55]])[_0x196f[14]](handleEntityNotFound(_0xd85bx9))[_0x196f[14]](removeEntity(_0xd85bx9))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[57]]= function(_0xd85bx14,_0xd85bx9){return SalesforceConfiguration[_0x196f[16]]({where:{id:_0xd85bx14[_0x196f[19]][_0x196f[33]]},individualHooks:true})[_0x196f[14]](responseWithResult(_0xd85bx9,204))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[58]]= function(_0xd85bx14,_0xd85bx9){_0xd85bx14[_0x196f[30]][_0x196f[59]]= _0xd85bx14[_0x196f[27]][_0x196f[26]];switch(_0xd85bx14[_0x196f[30]][_0x196f[108]]){case _0x196f[106]:if(_0xd85bx14[_0x196f[30]][_0x196f[60]]=== _0x196f[61]){_0xd85bx14[_0x196f[30]][_0x196f[62]]= [{"\x74\x79\x70\x65":_0x196f[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x196f[65],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[67]},{"\x74\x79\x70\x65":_0x196f[65],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[68]}];_0xd85bx14[_0x196f[30]][_0x196f[69]]= [{"\x74\x79\x70\x65":_0x196f[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[70],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[72],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[68]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[73],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[74]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[75],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[76]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[61],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[67]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[77],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[78]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[79],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[80]},{"\x74\x79\x70\x65":_0x196f[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[81],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[82],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[83]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[84],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[85]},{"\x74\x79\x70\x65":_0x196f[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[86],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[87],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[80]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[88],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[89]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[90],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[91]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[92],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[93]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[94],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[95]}]}else {if(_0xd85bx14[_0x196f[30]][_0x196f[60]]=== _0x196f[96]){_0xd85bx14[_0x196f[30]][_0x196f[62]]= [{"\x74\x79\x70\x65":_0x196f[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x196f[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[97],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x196f[65],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[85]}];_0xd85bx14[_0x196f[30]][_0x196f[69]]= [{"\x74\x79\x70\x65":_0x196f[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[70],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[98],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[85]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[99],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[100]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[77],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[78]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[79],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[101]},{"\x74\x79\x70\x65":_0x196f[63],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[86]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[102],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[103]},{"\x74\x79\x70\x65":_0x196f[71],"\x63\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x6B\x65\x79":_0x196f[104],"\x6B\x65\x79\x54\x79\x70\x65":_0x196f[65],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0x196f[66],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0x196f[105]}]}};break;default:console[_0x196f[109]](_0x196f[107],_0xd85bx14[_0x196f[30]][_0x196f[108]])};delete _0xd85bx14[_0x196f[30]][_0x196f[108]];delete _0xd85bx14[_0x196f[30]][_0x196f[60]];return SalesforceConfiguration[_0x196f[29]](_0xd85bx14[_0x196f[30]],{include:[{model:SalesforceField,as:_0x196f[62]},{model:SalesforceField,as:_0x196f[69]}]})[_0x196f[14]](responseWithResult(_0xd85bx9,201))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[110]]= function(_0xd85bx14,_0xd85bx9){return SalesforceConfiguration[_0x196f[24]]({method:[_0x196f[53],_0xd85bx14[_0x196f[27]][_0x196f[26]]]})[_0x196f[28]](_0xd85bx14[_0x196f[27]][_0x196f[55]])[_0x196f[14]](handleEntityNotFound(_0xd85bx9))[_0x196f[14]](function(_0xd85bx1d){switch(_0xd85bx14[_0x196f[27]][_0x196f[60]]){case _0x196f[112]:_0xd85bx14[_0x196f[30]][_0x196f[111]]= _0xd85bx14[_0x196f[27]][_0x196f[55]];break;case _0x196f[114]:_0xd85bx14[_0x196f[30]][_0x196f[113]]= _0xd85bx14[_0x196f[27]][_0x196f[55]];break;case _0x196f[44]:_0xd85bx14[_0x196f[30]][_0x196f[115]]= _0xd85bx14[_0x196f[27]][_0x196f[55]];break};return SalesforceField[_0x196f[29]](_0xd85bx14[_0x196f[30]])})[_0x196f[14]](responseWithResult(_0xd85bx9,201))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[116]]= function(_0xd85bx14,_0xd85bx9){if(_0xd85bx14[_0x196f[30]][_0x196f[26]]){delete _0xd85bx14[_0x196f[30]][_0x196f[26]]};return SalesforceField[_0x196f[28]](_0xd85bx14[_0x196f[27]][_0x196f[117]])[_0x196f[14]](handleEntityNotFound(_0xd85bx9))[_0x196f[14]](saveUpdates(_0xd85bx14[_0x196f[30]]))[_0x196f[14]](responseWithResult(_0xd85bx9))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[118]]= function(_0xd85bx14,_0xd85bx9){return SalesforceField[_0x196f[28]](_0xd85bx14[_0x196f[27]][_0x196f[117]])[_0x196f[14]](handleEntityNotFound(_0xd85bx9))[_0x196f[14]](removeEntity(_0xd85bx9))[_0x196f[18]](handleError(_0xd85bx9))};exports[_0x196f[119]]= function(_0xd85bx14,_0xd85bx9,_0xd85bx15){return SalesforceConfiguration[_0x196f[28]](_0xd85bx14[_0x196f[27]][_0x196f[55]])[_0x196f[14]](handleEntityNotFound(_0xd85bx9))[_0x196f[14]](function(_0xd85bx1d){return _0xd85bx1d[_0x196f[121]](_0xd85bx14[_0x196f[30]])})[_0x196f[14]](responseWithoutResult(_0xd85bx9,200))[_0x196f[18]](function(_0xd85bxb){console[_0x196f[120]](_0xd85bxb);return handleError(_0xd85bx9,_0xd85bxb)})} \ No newline at end of file diff --git a/server/api/salesforce_account/salesforce_account.events.js b/server/api/salesforce_account/salesforce_account.events.js index 13ee57f..25bc318 100644 --- a/server/api/salesforce_account/salesforce_account.events.js +++ b/server/api/salesforce_account/salesforce_account.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SalesforceAccount = require('../../models').SalesforceAccount; - -var SalesforceAccountEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SalesforceAccountEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SalesforceAccount.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SalesforceAccountEvents.emit(event + ':' + doc._id, doc); - SalesforceAccountEvents.emit(event, doc); - done(null); - } -} - -module.exports = SalesforceAccountEvents; +var _0x9118=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9118[0];const EventEmitter=require(_0x9118[1]);const SalesforceAccount=require(_0x9118[3])[_0x9118[2]];var SalesforceAccountEvents= new EventEmitter();SalesforceAccountEvents[_0x9118[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9118[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9118[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9118[6]};for(var e in events){var event=events[e];SalesforceAccount[_0x9118[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc870x8,_0xc870x9,_0xc870xa){SalesforceAccountEvents[_0x9118[10]](event+ _0x9118[8]+ _0xc870x8[_0x9118[9]],_0xc870x8);SalesforceAccountEvents[_0x9118[10]](event,_0xc870x8);_0xc870xa(null)}}module[_0x9118[11]]= SalesforceAccountEvents \ No newline at end of file diff --git a/server/api/salesforce_account/salesforce_account.socket.js b/server/api/salesforce_account/salesforce_account.socket.js index 3ee49f7..2967149 100644 --- a/server/api/salesforce_account/salesforce_account.socket.js +++ b/server/api/salesforce_account/salesforce_account.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SalesforceAccountEvents = require('./salesforce_account.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('salesforce_account:' + event, socket); - - SalesforceAccountEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SalesforceAccountEvents.removeListener(event, listener); - }; -} +var _0xee58=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xee58[0];const SalesforceAccountEvents=require(_0xee58[1]);var events=[_0xee58[2],_0xee58[3]];exports[_0xee58[4]]= function(_0xd09dx3){for(var _0xd09dx4=0,_0xd09dx5=events[_0xee58[5]];_0xd09dx4< _0xd09dx5;_0xd09dx4++){var _0xd09dx6=events[_0xd09dx4];var _0xd09dx7=createListener(_0xee58[6]+ _0xd09dx6,_0xd09dx3);SalesforceAccountEvents[_0xee58[7]](_0xd09dx6,_0xd09dx7);_0xd09dx3[_0xee58[7]](_0xee58[8],removeListener(_0xd09dx6,_0xd09dx7))}};function createListener(_0xd09dx6,_0xd09dx3){return function(_0xd09dx9){_0xd09dx3[_0xee58[9]](_0xd09dx6,_0xd09dx9)}}function removeListener(_0xd09dx6,_0xd09dx7){return function(){SalesforceAccountEvents[_0xee58[10]](_0xd09dx6,_0xd09dx7)}} \ No newline at end of file diff --git a/server/api/salesforce_configuration/index.js b/server/api/salesforce_configuration/index.js index e0f8ff7..83ef54f 100644 --- a/server/api/salesforce_configuration/index.js +++ b/server/api/salesforce_configuration/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./salesforce_configuration.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); - -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.post('/:id/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationField); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); - -module.exports = router; +var _0xbfd0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbfd0[0];var express=require(_0xbfd0[1]);var auth=require(_0xbfd0[2]);var controller=require(_0xbfd0[3]);var router=express.Router();router[_0xbfd0[7]](_0xbfd0[4],auth[_0xbfd0[5]](),controller[_0xbfd0[6]]);router[_0xbfd0[7]](_0xbfd0[8],auth[_0xbfd0[5]](),auth[_0xbfd0[10]]([19],[_0xbfd0[9]]),controller[_0xbfd0[11]]);router[_0xbfd0[13]](_0xbfd0[4],auth[_0xbfd0[5]](),auth[_0xbfd0[10]]([19],[_0xbfd0[9]]),controller[_0xbfd0[12]]);router[_0xbfd0[15]](_0xbfd0[8],auth[_0xbfd0[5]](),auth[_0xbfd0[10]]([19],[_0xbfd0[9]]),controller[_0xbfd0[14]]);router[_0xbfd0[13]](_0xbfd0[16],auth[_0xbfd0[5]](),auth[_0xbfd0[10]]([19],[_0xbfd0[9]]),controller[_0xbfd0[17]]);router[_0xbfd0[19]](_0xbfd0[8],auth[_0xbfd0[5]](),auth[_0xbfd0[10]]([19],[_0xbfd0[9]]),controller[_0xbfd0[18]]);module[_0xbfd0[20]]= router \ No newline at end of file diff --git a/server/api/salesforce_configuration/salesforce_configuration.controller.js b/server/api/salesforce_configuration/salesforce_configuration.controller.js index 523aef6..f8a91a4 100644 --- a/server/api/salesforce_configuration/salesforce_configuration.controller.js +++ b/server/api/salesforce_configuration/salesforce_configuration.controller.js @@ -1,147 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/salesforce/configurations -> index - * POST /api/salesforce/configurations -> create - * GET /api/salesforce/configurations/:id -> show - * PUT /api/salesforce/configurations/:id -> update - * DELETE /api/salesforce/configurations/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var SalesforceConfiguration = require('../../models').SalesforceConfiguration; -var SalesforceField = require('../../models').SalesforceField; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of SalesforceConfigurations -exports.index = function(req, res) { - SalesforceConfiguration.findAll({ - where: req.query - }) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SalesforceConfiguration from the DB -exports.show = function(req, res) { - SalesforceConfiguration.find({ - where: { - id: req.params.id - }, - include: [{ - model: SalesforceField, - as: 'Subject' - }, { - model: SalesforceField, - as: 'Description' - }, { - model: SalesforceField, - as: 'Field' - }] - }) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new SalesforceConfiguration in the DB -exports.create = function(req, res) { - SalesforceConfiguration.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing SalesforceConfiguration in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - SalesforceConfiguration.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SalesforceConfiguration from the DB -exports.destroy = function(req, res) { - SalesforceConfiguration.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -exports.addConfigurationField = function(req, res, next) { - // console.log(req.params); - var salesforceConfiguration; - SalesforceConfiguration - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(salesforce_configuration) { - salesforceConfiguration = salesforce_configuration; - return SalesforceField.create(req.body) - }) - .then(function(salesforceField) { - switch (req.params.type) { - case 'subject': - return [salesforceConfiguration.addSubject(salesforceField), salesforceField]; - case 'description': - return [salesforceConfiguration.addDescription(salesforceField), salesforceField]; - case 'field': - return [salesforceConfiguration.addField(salesforceField), salesforceField]; - } - }) - .spread(function(data, salesforceField) { - return res.status(201).json(salesforceField); - }) - .catch(handleError(res)); -}; +var _0xae11=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0xae11[0];var _=require(_0xae11[1]);var SalesforceConfiguration=require(_0xae11[3])[_0xae11[2]];var SalesforceField=require(_0xae11[3])[_0xae11[4]];function handleError(_0x6fd2x5,_0x6fd2x6){_0x6fd2x6= _0x6fd2x6|| 500;return function(_0x6fd2x7){_0x6fd2x5[_0xae11[6]](_0x6fd2x6)[_0xae11[5]](_0x6fd2x7)}}function responseWithResult(_0x6fd2x5,_0x6fd2x6){_0x6fd2x6= _0x6fd2x6|| 200;return function(_0x6fd2x9){if(_0x6fd2x9){_0x6fd2x5[_0xae11[6]](_0x6fd2x6)[_0xae11[7]](_0x6fd2x9)}}}function handleEntityNotFound(_0x6fd2x5){return function(_0x6fd2x9){if(!_0x6fd2x9){_0x6fd2x5[_0xae11[6]](404)[_0xae11[8]]();return null};return _0x6fd2x9}}function saveUpdates(_0x6fd2xc){return function(_0x6fd2x9){return _0x6fd2x9[_0xae11[10]](_0x6fd2xc)[_0xae11[9]](function(_0x6fd2xd){return _0x6fd2xd})}}function removeEntity(_0x6fd2x5){return function(_0x6fd2x9){if(_0x6fd2x9){return _0x6fd2x9[_0xae11[11]]()[_0xae11[9]](function(){_0x6fd2x5[_0xae11[6]](204)[_0xae11[8]]()})}}}exports[_0xae11[12]]= function(_0x6fd2xf,_0x6fd2x5){SalesforceConfiguration[_0xae11[15]]({where:_0x6fd2xf[_0xae11[14]]})[_0xae11[9]](responseWithResult(_0x6fd2x5))[_0xae11[13]](handleError(_0x6fd2x5))};exports[_0xae11[16]]= function(_0x6fd2xf,_0x6fd2x5){SalesforceConfiguration[_0xae11[22]]({where:{id:_0x6fd2xf[_0xae11[18]][_0xae11[17]]},include:[{model:SalesforceField,as:_0xae11[19]},{model:SalesforceField,as:_0xae11[20]},{model:SalesforceField,as:_0xae11[21]}]})[_0xae11[9]](handleEntityNotFound(_0x6fd2x5))[_0xae11[9]](responseWithResult(_0x6fd2x5))[_0xae11[13]](handleError(_0x6fd2x5))};exports[_0xae11[23]]= function(_0x6fd2xf,_0x6fd2x5){SalesforceConfiguration[_0xae11[23]](_0x6fd2xf[_0xae11[24]])[_0xae11[9]](responseWithResult(_0x6fd2x5,201))[_0xae11[13]](handleError(_0x6fd2x5))};exports[_0xae11[25]]= function(_0x6fd2xf,_0x6fd2x5){if(_0x6fd2xf[_0xae11[24]][_0xae11[17]]){delete _0x6fd2xf[_0xae11[24]][_0xae11[17]]};SalesforceConfiguration[_0xae11[26]](_0x6fd2xf[_0xae11[18]][_0xae11[17]])[_0xae11[9]](handleEntityNotFound(_0x6fd2x5))[_0xae11[9]](saveUpdates(_0x6fd2xf[_0xae11[24]]))[_0xae11[9]](responseWithResult(_0x6fd2x5))[_0xae11[13]](handleError(_0x6fd2x5))};exports[_0xae11[11]]= function(_0x6fd2xf,_0x6fd2x5){SalesforceConfiguration[_0xae11[26]](_0x6fd2xf[_0xae11[18]][_0xae11[17]])[_0xae11[9]](handleEntityNotFound(_0x6fd2x5))[_0xae11[9]](removeEntity(_0x6fd2x5))[_0xae11[13]](handleError(_0x6fd2x5))};exports[_0xae11[27]]= function(_0x6fd2xf,_0x6fd2x5,_0x6fd2x10){var _0x6fd2x11;SalesforceConfiguration[_0xae11[26]](_0x6fd2xf[_0xae11[18]][_0xae11[17]])[_0xae11[9]](handleEntityNotFound(_0x6fd2x5))[_0xae11[9]](function(_0x6fd2x14){_0x6fd2x11= _0x6fd2x14;return SalesforceField[_0xae11[23]](_0x6fd2xf[_0xae11[24]])})[_0xae11[9]](function(_0x6fd2x13){switch(_0x6fd2xf[_0xae11[18]][_0xae11[35]]){case _0xae11[30]:return [_0x6fd2x11[_0xae11[29]](_0x6fd2x13),_0x6fd2x13];case _0xae11[32]:return [_0x6fd2x11[_0xae11[31]](_0x6fd2x13),_0x6fd2x13];case _0xae11[34]:return [_0x6fd2x11[_0xae11[33]](_0x6fd2x13),_0x6fd2x13]}})[_0xae11[28]](function(_0x6fd2x12,_0x6fd2x13){return _0x6fd2x5[_0xae11[6]](201)[_0xae11[7]](_0x6fd2x13)})[_0xae11[13]](handleError(_0x6fd2x5))} \ No newline at end of file diff --git a/server/api/salesforce_configuration/salesforce_configuration.events.js b/server/api/salesforce_configuration/salesforce_configuration.events.js index 0814fbf..66e1e1b 100644 --- a/server/api/salesforce_configuration/salesforce_configuration.events.js +++ b/server/api/salesforce_configuration/salesforce_configuration.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SalesforceConfiguration = require('../../models').SalesforceConfiguration; - -var SalesforceConfigurationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SalesforceConfigurationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SalesforceConfiguration.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SalesforceConfigurationEvents.emit(event + ':' + doc._id, doc); - SalesforceConfigurationEvents.emit(event, doc); - done(null); - } -} - -module.exports = SalesforceConfigurationEvents; +var _0xb58a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb58a[0];const EventEmitter=require(_0xb58a[1]);const SalesforceConfiguration=require(_0xb58a[3])[_0xb58a[2]];var SalesforceConfigurationEvents= new EventEmitter();SalesforceConfigurationEvents[_0xb58a[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb58a[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb58a[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb58a[6]};for(var e in events){var event=events[e];SalesforceConfiguration[_0xb58a[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x8012x8,_0x8012x9,_0x8012xa){SalesforceConfigurationEvents[_0xb58a[10]](event+ _0xb58a[8]+ _0x8012x8[_0xb58a[9]],_0x8012x8);SalesforceConfigurationEvents[_0xb58a[10]](event,_0x8012x8);_0x8012xa(null)}}module[_0xb58a[11]]= SalesforceConfigurationEvents \ No newline at end of file diff --git a/server/api/salesforce_configuration/salesforce_configuration.socket.js b/server/api/salesforce_configuration/salesforce_configuration.socket.js index df21994..ab94ebd 100644 --- a/server/api/salesforce_configuration/salesforce_configuration.socket.js +++ b/server/api/salesforce_configuration/salesforce_configuration.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SalesforceConfigurationEvents = require('./salesforce_configuration.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('salesforce_configuration:' + event, socket); - - SalesforceConfigurationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SalesforceConfigurationEvents.removeListener(event, listener); - }; -} +var _0x5c4c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x5c4c[0];const SalesforceConfigurationEvents=require(_0x5c4c[1]);var events=[_0x5c4c[2],_0x5c4c[3]];exports[_0x5c4c[4]]= function(_0xe6bcx3){for(var _0xe6bcx4=0,_0xe6bcx5=events[_0x5c4c[5]];_0xe6bcx4< _0xe6bcx5;_0xe6bcx4++){var _0xe6bcx6=events[_0xe6bcx4];var _0xe6bcx7=createListener(_0x5c4c[6]+ _0xe6bcx6,_0xe6bcx3);SalesforceConfigurationEvents[_0x5c4c[7]](_0xe6bcx6,_0xe6bcx7);_0xe6bcx3[_0x5c4c[7]](_0x5c4c[8],removeListener(_0xe6bcx6,_0xe6bcx7))}};function createListener(_0xe6bcx6,_0xe6bcx3){return function(_0xe6bcx9){_0xe6bcx3[_0x5c4c[9]](_0xe6bcx6,_0xe6bcx9)}}function removeListener(_0xe6bcx6,_0xe6bcx7){return function(){SalesforceConfigurationEvents[_0x5c4c[10]](_0xe6bcx6,_0xe6bcx7)}} \ No newline at end of file diff --git a/server/api/salesforce_field/index.js b/server/api/salesforce_field/index.js index 2dd2a9d..50de60d 100644 --- a/server/api/salesforce_field/index.js +++ b/server/api/salesforce_field/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./salesforce_field.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); - -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); - - -module.exports = router; +var _0x2059=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2059[0];var express=require(_0x2059[1]);var auth=require(_0x2059[2]);var controller=require(_0x2059[3]);var router=express.Router();router[_0x2059[7]](_0x2059[4],auth[_0x2059[5]](),controller[_0x2059[6]]);router[_0x2059[7]](_0x2059[8],auth[_0x2059[5]](),auth[_0x2059[10]]([19],[_0x2059[9]]),controller[_0x2059[11]]);router[_0x2059[13]](_0x2059[4],auth[_0x2059[5]](),auth[_0x2059[10]]([19],[_0x2059[9]]),controller[_0x2059[12]]);router[_0x2059[15]](_0x2059[8],auth[_0x2059[5]](),auth[_0x2059[10]]([19],[_0x2059[9]]),controller[_0x2059[14]]);router[_0x2059[17]](_0x2059[8],auth[_0x2059[5]](),auth[_0x2059[10]]([19],[_0x2059[9]]),controller[_0x2059[16]]);module[_0x2059[18]]= router \ No newline at end of file diff --git a/server/api/salesforce_field/salesforce_field.controller.js b/server/api/salesforce_field/salesforce_field.controller.js index bab61d7..47751cc 100644 --- a/server/api/salesforce_field/salesforce_field.controller.js +++ b/server/api/salesforce_field/salesforce_field.controller.js @@ -1,104 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/salesforce/fields -> index - * POST /api/salesforce/fields -> create - * GET /api/salesforce/fields/:id -> show - * PUT /api/salesforce/fields/:id -> update - * DELETE /api/salesforce/fields/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var SalesforceField = require('../../models').SalesforceField; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of SalesforceFields -exports.index = function(req, res) { - SalesforceField.findAll() - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SalesforceField from the DB -exports.show = function(req, res) { - SalesforceField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new SalesforceField in the DB -exports.create = function(req, res) { - SalesforceField.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing SalesforceField in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - SalesforceField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SalesforceField from the DB -exports.destroy = function(req, res) { - SalesforceField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0xc855=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xc855[0];var _=require(_0xc855[1]);var SalesforceField=require(_0xc855[3])[_0xc855[2]];function handleError(_0x1027x4,_0x1027x5){_0x1027x5= _0x1027x5|| 500;return function(_0x1027x6){_0x1027x4[_0xc855[5]](_0x1027x5)[_0xc855[4]](_0x1027x6)}}function responseWithResult(_0x1027x4,_0x1027x5){_0x1027x5= _0x1027x5|| 200;return function(_0x1027x8){if(_0x1027x8){_0x1027x4[_0xc855[5]](_0x1027x5)[_0xc855[6]](_0x1027x8)}}}function handleEntityNotFound(_0x1027x4){return function(_0x1027x8){if(!_0x1027x8){_0x1027x4[_0xc855[5]](404)[_0xc855[7]]();return null};return _0x1027x8}}function saveUpdates(_0x1027xb){return function(_0x1027x8){return _0x1027x8[_0xc855[9]](_0x1027xb)[_0xc855[8]](function(_0x1027xc){return _0x1027xc})}}function removeEntity(_0x1027x4){return function(_0x1027x8){if(_0x1027x8){return _0x1027x8[_0xc855[10]]()[_0xc855[8]](function(){_0x1027x4[_0xc855[5]](204)[_0xc855[7]]()})}}}exports[_0xc855[11]]= function(_0x1027xe,_0x1027x4){SalesforceField[_0xc855[13]]()[_0xc855[8]](responseWithResult(_0x1027x4))[_0xc855[12]](handleError(_0x1027x4))};exports[_0xc855[14]]= function(_0x1027xe,_0x1027x4){SalesforceField[_0xc855[17]](_0x1027xe[_0xc855[16]][_0xc855[15]])[_0xc855[8]](handleEntityNotFound(_0x1027x4))[_0xc855[8]](responseWithResult(_0x1027x4))[_0xc855[12]](handleError(_0x1027x4))};exports[_0xc855[18]]= function(_0x1027xe,_0x1027x4){SalesforceField[_0xc855[18]](_0x1027xe[_0xc855[19]])[_0xc855[8]](responseWithResult(_0x1027x4,201))[_0xc855[12]](handleError(_0x1027x4))};exports[_0xc855[20]]= function(_0x1027xe,_0x1027x4){if(_0x1027xe[_0xc855[19]][_0xc855[15]]){delete _0x1027xe[_0xc855[19]][_0xc855[15]]};SalesforceField[_0xc855[17]](_0x1027xe[_0xc855[16]][_0xc855[15]])[_0xc855[8]](handleEntityNotFound(_0x1027x4))[_0xc855[8]](saveUpdates(_0x1027xe[_0xc855[19]]))[_0xc855[8]](responseWithResult(_0x1027x4))[_0xc855[12]](handleError(_0x1027x4))};exports[_0xc855[10]]= function(_0x1027xe,_0x1027x4){SalesforceField[_0xc855[17]](_0x1027xe[_0xc855[16]][_0xc855[15]])[_0xc855[8]](handleEntityNotFound(_0x1027x4))[_0xc855[8]](removeEntity(_0x1027x4))[_0xc855[12]](handleError(_0x1027x4))} \ No newline at end of file diff --git a/server/api/salesforce_field/salesforce_field.events.js b/server/api/salesforce_field/salesforce_field.events.js index 44a66ad..217e776 100644 --- a/server/api/salesforce_field/salesforce_field.events.js +++ b/server/api/salesforce_field/salesforce_field.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SalesforceField = require('../../models').SalesforceField; - -var SalesforceFieldEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SalesforceFieldEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SalesforceField.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SalesforceFieldEvents.emit(event + ':' + doc._id, doc); - SalesforceFieldEvents.emit(event, doc); - done(null); - } -} - -module.exports = SalesforceFieldEvents; +var _0x3399=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3399[0];const EventEmitter=require(_0x3399[1]);const SalesforceField=require(_0x3399[3])[_0x3399[2]];var SalesforceFieldEvents= new EventEmitter();SalesforceFieldEvents[_0x3399[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3399[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3399[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3399[6]};for(var e in events){var event=events[e];SalesforceField[_0x3399[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc172x8,_0xc172x9,_0xc172xa){SalesforceFieldEvents[_0x3399[10]](event+ _0x3399[8]+ _0xc172x8[_0x3399[9]],_0xc172x8);SalesforceFieldEvents[_0x3399[10]](event,_0xc172x8);_0xc172xa(null)}}module[_0x3399[11]]= SalesforceFieldEvents \ No newline at end of file diff --git a/server/api/salesforce_field/salesforce_field.socket.js b/server/api/salesforce_field/salesforce_field.socket.js index e394e5b..1fd2eac 100644 --- a/server/api/salesforce_field/salesforce_field.socket.js +++ b/server/api/salesforce_field/salesforce_field.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SalesforceFieldEvents = require('./salesforce_field.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('salesforce_field:' + event, socket); - - SalesforceFieldEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SalesforceFieldEvents.removeListener(event, listener); - }; -} +var _0xb466=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb466[0];const SalesforceFieldEvents=require(_0xb466[1]);var events=[_0xb466[2],_0xb466[3]];exports[_0xb466[4]]= function(_0xee82x3){for(var _0xee82x4=0,_0xee82x5=events[_0xb466[5]];_0xee82x4< _0xee82x5;_0xee82x4++){var _0xee82x6=events[_0xee82x4];var _0xee82x7=createListener(_0xb466[6]+ _0xee82x6,_0xee82x3);SalesforceFieldEvents[_0xb466[7]](_0xee82x6,_0xee82x7);_0xee82x3[_0xb466[7]](_0xb466[8],removeListener(_0xee82x6,_0xee82x7))}};function createListener(_0xee82x6,_0xee82x3){return function(_0xee82x9){_0xee82x3[_0xb466[9]](_0xee82x6,_0xee82x9)}}function removeListener(_0xee82x6,_0xee82x7){return function(){SalesforceFieldEvents[_0xb466[10]](_0xee82x6,_0xee82x7)}} \ No newline at end of file diff --git a/server/api/scheduler/index.js b/server/api/scheduler/index.js index 7dd28ad..b39746d 100644 --- a/server/api/scheduler/index.js +++ b/server/api/scheduler/index.js @@ -1,19 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./scheduler.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); - -router.get('/:id', auth.isAuthenticated(), controller.show); -router.get('/:id/run', auth.isAuthenticated(), controller.runSchedule); -router.post('/', auth.isAuthenticated(), controller.create); -router.put('/:id', auth.isAuthenticated(), controller.update); -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - - -module.exports = router; +var _0x50d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x72\x75\x6E","\x72\x75\x6E\x53\x63\x68\x65\x64\x75\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x50d2[0];var express=require(_0x50d2[1]);var auth=require(_0x50d2[2]);var controller=require(_0x50d2[3]);var router=express.Router();router[_0x50d2[7]](_0x50d2[4],auth[_0x50d2[5]](),controller[_0x50d2[6]]);router[_0x50d2[7]](_0x50d2[8],auth[_0x50d2[5]](),controller[_0x50d2[9]]);router[_0x50d2[7]](_0x50d2[10],auth[_0x50d2[5]](),controller[_0x50d2[11]]);router[_0x50d2[13]](_0x50d2[4],auth[_0x50d2[5]](),controller[_0x50d2[12]]);router[_0x50d2[15]](_0x50d2[8],auth[_0x50d2[5]](),controller[_0x50d2[14]]);router[_0x50d2[16]](_0x50d2[8],auth[_0x50d2[5]](),controller[_0x50d2[14]]);router[_0x50d2[18]](_0x50d2[8],auth[_0x50d2[5]](),controller[_0x50d2[17]]);module[_0x50d2[19]]= router \ No newline at end of file diff --git a/server/api/scheduler/scheduler.controller.js b/server/api/scheduler/scheduler.controller.js index f25aa6a..77673d2 100644 --- a/server/api/scheduler/scheduler.controller.js +++ b/server/api/scheduler/scheduler.controller.js @@ -1,130 +1 @@ -'use strict'; - - -var _ = require('lodash'); - -var Schedule = require('../../models').Schedule; -var MailServerOut = require('../../models').MailServerOut; -var Reports = require('../../config/scheduler/reports'); - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - console.log(err); - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 200; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -function runSchedule(req) { - return function(entity) { - if (entity) { - switch (entity.type) { - case 'report': - var scheduler = new Reports(); - scheduler.extractReport(entity, req.user) - break; - default: - } - } - } -} - -// Gets a list of Schedules -exports.index = function(req, res) { - Schedule.findAndCountAll() - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single Schedule from the DB -exports.show = function(req, res) { - Schedule.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Execute single Schedule from the DB -exports.runSchedule = function(req, res) { - Schedule.findById(req.params.id, { - include: [MailServerOut] - }) - .then(handleEntityNotFound(res)) - .then(runSchedule(req)) - .then(responseWithoutResult(res)) - .catch(handleError(res)); -} - -// Creates a new Schedule in the DB -exports.create = function(req, res) { - Schedule.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing Schedule in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - Schedule.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a Schedule from the DB -exports.destroy = function(req, res) { - Schedule.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0xd454=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2F\x72\x65\x70\x6F\x72\x74\x73","\x6C\x6F\x67","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x75\x73\x65\x72","\x65\x78\x74\x72\x61\x63\x74\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74","\x74\x79\x70\x65","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x75\x6E\x53\x63\x68\x65\x64\x75\x6C\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xd454[0];var _=require(_0xd454[1]);var Schedule=require(_0xd454[3])[_0xd454[2]];var MailServerOut=require(_0xd454[3])[_0xd454[4]];var Reports=require(_0xd454[5]);function handleError(_0x7752x6,_0x7752x7){_0x7752x7= _0x7752x7|| 500;return function(_0x7752x8){console[_0xd454[6]](_0x7752x8);_0x7752x6[_0xd454[8]](_0x7752x7)[_0xd454[7]](_0x7752x8)}}function responseWithResult(_0x7752x6,_0x7752x7){_0x7752x7= _0x7752x7|| 200;return function(_0x7752xa){if(_0x7752xa){_0x7752x6[_0xd454[8]](_0x7752x7)[_0xd454[9]](_0x7752xa)}}}function responseWithoutResult(_0x7752x6,_0x7752x7){_0x7752x7= _0x7752x7|| 200;return function(){_0x7752x6[_0xd454[10]](_0x7752x7)}}function handleEntityNotFound(_0x7752x6){return function(_0x7752xa){if(!_0x7752xa){_0x7752x6[_0xd454[8]](404)[_0xd454[11]]();return null};return _0x7752xa}}function saveUpdates(_0x7752xe){return function(_0x7752xa){return _0x7752xa[_0xd454[13]](_0x7752xe)[_0xd454[12]](function(_0x7752xf){return _0x7752xf})}}function removeEntity(_0x7752x6){return function(_0x7752xa){if(_0x7752xa){return _0x7752xa[_0xd454[14]]()[_0xd454[12]](function(){_0x7752x6[_0xd454[8]](204)[_0xd454[11]]()})}}}function runSchedule(_0x7752x12){return function(_0x7752xa){if(_0x7752xa){switch(_0x7752xa[_0xd454[18]]){case _0xd454[17]:var _0x7752x13= new Reports();_0x7752x13[_0xd454[16]](_0x7752xa,_0x7752x12[_0xd454[15]]);break;default:}}}}exports[_0xd454[19]]= function(_0x7752x12,_0x7752x6){Schedule[_0xd454[21]]()[_0xd454[12]](responseWithResult(_0x7752x6))[_0xd454[20]](handleError(_0x7752x6))};exports[_0xd454[22]]= function(_0x7752x12,_0x7752x6){Schedule[_0xd454[25]](_0x7752x12[_0xd454[24]][_0xd454[23]])[_0xd454[12]](handleEntityNotFound(_0x7752x6))[_0xd454[12]](responseWithResult(_0x7752x6))[_0xd454[20]](handleError(_0x7752x6))};exports[_0xd454[26]]= function(_0x7752x12,_0x7752x6){Schedule[_0xd454[25]](_0x7752x12[_0xd454[24]][_0xd454[23]],{include:[MailServerOut]})[_0xd454[12]](handleEntityNotFound(_0x7752x6))[_0xd454[12]](runSchedule(_0x7752x12))[_0xd454[12]](responseWithoutResult(_0x7752x6))[_0xd454[20]](handleError(_0x7752x6))};exports[_0xd454[27]]= function(_0x7752x12,_0x7752x6){Schedule[_0xd454[27]](_0x7752x12[_0xd454[28]])[_0xd454[12]](responseWithResult(_0x7752x6,201))[_0xd454[20]](handleError(_0x7752x6))};exports[_0xd454[29]]= function(_0x7752x12,_0x7752x6){if(_0x7752x12[_0xd454[28]][_0xd454[23]]){delete _0x7752x12[_0xd454[28]][_0xd454[23]]};Schedule[_0xd454[25]](_0x7752x12[_0xd454[24]][_0xd454[23]])[_0xd454[12]](handleEntityNotFound(_0x7752x6))[_0xd454[12]](saveUpdates(_0x7752x12[_0xd454[28]]))[_0xd454[12]](responseWithResult(_0x7752x6))[_0xd454[20]](handleError(_0x7752x6))};exports[_0xd454[14]]= function(_0x7752x12,_0x7752x6){Schedule[_0xd454[25]](_0x7752x12[_0xd454[24]][_0xd454[23]])[_0xd454[12]](handleEntityNotFound(_0x7752x6))[_0xd454[12]](removeEntity(_0x7752x6))[_0xd454[20]](handleError(_0x7752x6))} \ No newline at end of file diff --git a/server/api/scheduler/scheduler.events.js b/server/api/scheduler/scheduler.events.js index 7718bf6..67695c6 100644 --- a/server/api/scheduler/scheduler.events.js +++ b/server/api/scheduler/scheduler.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Schedule = require('../../models').Schedule; - -var SchedulerEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SchedulerEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Schedule.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SchedulerEvents.emit(event + ':' + doc._id, doc); - SchedulerEvents.emit(event, doc); - done(null); - } -} - -module.exports = SchedulerEvents; +var _0x38c8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x38c8[0];const EventEmitter=require(_0x38c8[1]);const Schedule=require(_0x38c8[3])[_0x38c8[2]];var SchedulerEvents= new EventEmitter();SchedulerEvents[_0x38c8[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x38c8[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x38c8[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x38c8[6]};for(var e in events){var event=events[e];Schedule[_0x38c8[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5571x8,_0x5571x9,_0x5571xa){SchedulerEvents[_0x38c8[10]](event+ _0x38c8[8]+ _0x5571x8[_0x38c8[9]],_0x5571x8);SchedulerEvents[_0x38c8[10]](event,_0x5571x8);_0x5571xa(null)}}module[_0x38c8[11]]= SchedulerEvents \ No newline at end of file diff --git a/server/api/scheduler/scheduler.socket.js b/server/api/scheduler/scheduler.socket.js index 16264a4..a553c7b 100644 --- a/server/api/scheduler/scheduler.socket.js +++ b/server/api/scheduler/scheduler.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SchedulerEvents = require('./scheduler.events'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('schedule:' + event, socket); - - SchedulerEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SchedulerEvents.removeListener(event, listener); - }; -} +var _0x441c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x63\x68\x65\x64\x75\x6C\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x441c[0];const SchedulerEvents=require(_0x441c[1]);var events=[_0x441c[2],_0x441c[3],_0x441c[4]];exports[_0x441c[5]]= function(_0x8227x3){for(var _0x8227x4=0,_0x8227x5=events[_0x441c[6]];_0x8227x4< _0x8227x5;_0x8227x4++){var _0x8227x6=events[_0x8227x4];var _0x8227x7=createListener(_0x441c[7]+ _0x8227x6,_0x8227x3);SchedulerEvents[_0x441c[8]](_0x8227x6,_0x8227x7);_0x8227x3[_0x441c[8]](_0x441c[9],removeListener(_0x8227x6,_0x8227x7))}};function createListener(_0x8227x6,_0x8227x3){return function(_0x8227x9){_0x8227x3[_0x441c[10]](_0x8227x6,_0x8227x9)}}function removeListener(_0x8227x6,_0x8227x7){return function(){SchedulerEvents[_0x441c[11]](_0x8227x6,_0x8227x7)}} \ No newline at end of file diff --git a/server/api/setting/index.js b/server/api/setting/index.js index cbca952..21a1cca 100644 --- a/server/api/setting/index.js +++ b/server/api/setting/index.js @@ -1,28 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./setting.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index); -router.get('/smtp', auth.isAuthenticated(), auth.hasModule([9], ['admin', 'agent']), controller.showCustom); -router.get('/internal', auth.isAuthenticated(), auth.hasRole('admin'), controller.getInternal); -router.get('/mailbox', auth.isAuthenticated(), auth.hasRole('admin'), controller.getMailbox); -router.get('/logo/main/:filename', controller.getLogo); -router.get('/logo/login/:filename', controller.getLoginLogo); -router.get('/system', auth.isAuthenticated(), auth.hasRole('admin'), controller.stats); -router.get('/logs', auth.isAuthenticated(), auth.hasRole('admin'), controller.logs); -router.get('/info', controller.getInfo); -router.get('/:id', auth.isAuthenticated(), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.create); -router.post('/asterisk', auth.isAuthenticated(), auth.hasRole('admin'), controller.asteriskCommand); -router.post('/logo/main', auth.isAuthenticated(), auth.hasRole('admin'), controller.changeLogo); -router.post('/logo/login', auth.isAuthenticated(), auth.hasRole('admin'), controller.changeLoginLogo); -router.post('/smtp', auth.isAuthenticated(), auth.hasRole('admin'), controller.createSmtp); -router.put('/smtp/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.updateSmtp); -router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update); -router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy); - -module.exports = router; +var _0x9e58=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x73\x6D\x74\x70","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D","\x2F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x2F\x6D\x61\x69\x6C\x62\x6F\x78","\x67\x65\x74\x4D\x61\x69\x6C\x62\x6F\x78","\x2F\x6C\x6F\x67\x6F\x2F\x6D\x61\x69\x6E\x2F\x3A\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x4C\x6F\x67\x6F","\x2F\x6C\x6F\x67\x6F\x2F\x6C\x6F\x67\x69\x6E\x2F\x3A\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x2F\x73\x79\x73\x74\x65\x6D","\x73\x74\x61\x74\x73","\x2F\x6C\x6F\x67\x73","\x6C\x6F\x67\x73","\x2F\x69\x6E\x66\x6F","\x67\x65\x74\x49\x6E\x66\x6F","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x61\x73\x74\x65\x72\x69\x73\x6B","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6D\x6D\x61\x6E\x64","\x2F\x6C\x6F\x67\x6F\x2F\x6D\x61\x69\x6E","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x6F","\x2F\x6C\x6F\x67\x6F\x2F\x6C\x6F\x67\x69\x6E","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x63\x72\x65\x61\x74\x65\x53\x6D\x74\x70","\x2F\x73\x6D\x74\x70\x2F\x3A\x69\x64","\x75\x70\x64\x61\x74\x65\x53\x6D\x74\x70","\x70\x75\x74","\x75\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9e58[0];var express=require(_0x9e58[1]);var controller=require(_0x9e58[2]);var auth=require(_0x9e58[3]);var router=express.Router();router[_0x9e58[9]](_0x9e58[4],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[8]]);router[_0x9e58[9]](_0x9e58[10],auth[_0x9e58[5]](),auth[_0x9e58[12]]([9],[_0x9e58[6],_0x9e58[11]]),controller[_0x9e58[13]]);router[_0x9e58[9]](_0x9e58[14],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[15]]);router[_0x9e58[9]](_0x9e58[16],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[17]]);router[_0x9e58[9]](_0x9e58[18],controller[_0x9e58[19]]);router[_0x9e58[9]](_0x9e58[20],controller[_0x9e58[21]]);router[_0x9e58[9]](_0x9e58[22],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[23]]);router[_0x9e58[9]](_0x9e58[24],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[25]]);router[_0x9e58[9]](_0x9e58[26],controller[_0x9e58[27]]);router[_0x9e58[9]](_0x9e58[28],auth[_0x9e58[5]](),controller[_0x9e58[29]]);router[_0x9e58[31]](_0x9e58[4],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[30]]);router[_0x9e58[31]](_0x9e58[32],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[33]]);router[_0x9e58[31]](_0x9e58[34],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[35]]);router[_0x9e58[31]](_0x9e58[36],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[37]]);router[_0x9e58[31]](_0x9e58[10],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[38]]);router[_0x9e58[41]](_0x9e58[39],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[40]]);router[_0x9e58[41]](_0x9e58[28],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[42]]);router[_0x9e58[44]](_0x9e58[28],auth[_0x9e58[5]](),auth[_0x9e58[7]](_0x9e58[6]),controller[_0x9e58[43]]);module[_0x9e58[45]]= router \ No newline at end of file diff --git a/server/api/setting/setting.controller.js b/server/api/setting/setting.controller.js index f5db6ef..eae5c42 100644 --- a/server/api/setting/setting.controller.js +++ b/server/api/setting/setting.controller.js @@ -1,422 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Setting = require('../../models').Setting; -var system = require('../../config/tools/system'); -var Agent = require('../../models').User; -var VoiceMail = require('../../models').VoiceVoicemail; -var MailAccount = require('../../models').MailAccount; -var MailServerOut = require('../../models').MailServerOut; -var Promise = require('bluebird'); -var UploadFile = require('upload-file'); -var path = require('path'); -var sequelize = require('../../models').sequelize; -var config = require('../../config/environment'); -var sr = require('simple-random'); -var fs = require('fs'); - -// Get list of settings -exports.index = function(req, res) { - return Setting - .findAll() - .then(function(settings) { - return res.status(200).send(settings); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.stats = function(req, res) { - return Promise - .all([]) - .then(system.checkStatus()) - .then(function(stats) { - return res.status(200).send(stats); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -} - -exports.asteriskCommand = function(req, res) { - return Promise - .promisify(req.app.locals.ami.action)({ - action: 'Command', - command: req.body.command.trim(), - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.logs = function(req, res) { - var logs = { - output: '', - errors: '' - }; - var readFile = Promise.promisify(fs.readFile); - var exists = Promise.promisify(fs.exists); - return readFile('/var/log/xcally/motion-err.log', 'utf8') - .then(function(errs) { - logs.errors = errs; - }) - .catch(function(err) { - logs.errors = 'No error log file found!'; - }) - .then(function() { - return readFile('/var/log/xcally/motion-out.log', 'utf8'); - }) - .then(function(out) { - logs.output = out; - }) - .catch(function(err) { - logs.output = 'No output log file found!'; - }) - .then(function(result) { - return res.status(200).send(logs); - }) - .catch(function(err) { - console.log('logs error:', err.message); - return handleError(res, err); - }); -} - -exports.changeLogo = function(req, res) { - changeLogo(req, res, 'logo'); -} - -exports.changeLoginLogo = function(req, res) { - changeLogo(req, res, 'loginLogo'); -} - -function changeLogo(req, res, field) { - - var upload = new UploadFile({ - dest: path.join(config.root, 'server', 'files', 'images'), - maxNumberOfFiles: 1, - minNumberOfFiles: 0, - acceptFileTypes: /(\.|\/)(jpeg|png)$/i, - rename: function(name, file) { - return sr() + path.extname(file.filename); - }, - messages: { - maxNumberOfFiles: "Max number of files upload exceeded", - acceptFileTypes: "Only jpeg and png format accepted", - invalidRequest: "Invalid request" - } - }); - - upload.on('end', function(fields, files) { - if (!files.file.filename) { - return res.status(500).send(upload); - } - return sequelize.transaction(function(t) { - return Setting - .findById(1) - .then(function(settings) { - if (!settings) { - return res.sendStatus(404); - } - var body = {}; - body[field] = files.file.filename; - return settings - .update(body, { - transaction: t - }); - }) - .then(function(user) { - return res.status(200).send(user); - }) - }) - .catch(function(err) { - return handleError(res, err); - }); - }); - - upload.on('error', function(err) { - console.log('********** Upload error :', err) - return handleError(res, err); - }); - - upload.parse(req); -} - - -exports.getLogo = function(req, res) { - getLogo(req, res, 'logo.png'); -} - -exports.getLoginLogo = function(req, res) { - getLogo(req, res, 'logo-big.png'); -} - -function getLogo(req, res, image) { - var imgPath = path.join(config.root, 'server', 'files', 'images', req.params.filename); - - fs.exists(imgPath, function(exists) { - if (!exists) { - imgPath = path.join(config.root, 'server', 'files', 'images', 'default', image); - } - - return res.sendFile(imgPath); - }); -} - -// Get internal -exports.getInternal = function(req, res) { - var _settings; - return Setting - .findById(1) - .then(function(settings) { - _settings = settings; - return Agent - .findAll({ - attributes: ['internal'] - }); - }) - .then(function(internals) { - var _internals = _.map(internals, 'internal'); - var _internal = { - value: 0, - range: 0 //maximum number of internals before an occupied one, 0 is unlimited - }; - var nextUsed; - if (req.query.internal) { - _internal.value = Number(req.query.internal); - while (_.includes(_internals, _internal.value)) { - _internal.value++; - } - nextUsed = _.filter(_internals, function(elem) { - return elem > _internal.value; - }).shift(); - _internal.range = nextUsed - _internal.value; - } else { - var maxInternal = _.max(_internals); - _internal.value = _settings.min_internal; //if the max internal is lower than my lower limit, i just set the limit as the internal - if (maxInternal && maxInternal >= _settings.min_internal) { //otherwise i get the first of the used internals and then I increment the value until I find an empty one - while (_.includes(_internals, _internal.value)) { - _internal.value++; - } - //then I find the next used internal and calculate the maximum number of free internals before a used one - nextUsed = _.filter(_internals, function(elem) { - return elem > _internal.value; - }).shift(); - _internal.range = nextUsed - _internal.value; - } - } - return res.status(200).send(_internal); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get mailbox -exports.getMailbox = function(req, res) { - var _settings; - return Setting - .findById(1) - .then(function(settings) { - _settings = settings; - return VoiceMail - .findAll({ - attributes: ['mailbox'] - }); - }) - .then(function(mailboxes) { - var _mailboxes = _.map(mailboxes, function(elem) { - return Number(elem.mailbox); - }); - var _mailbox = { - value: 0, - range: 0 //maximum number of mailboxs before an occupied one, 0 is unlimited - }; - var nextUsed; - var maxMailbox = _.max(_mailboxes); - _mailbox.value = _settings.min_mailbox; //if the max mailbox is lower than my lower limit, i just set the limit as the mailbox - if (maxMailbox && maxMailbox >= _settings.min_mailbox) { //otherwise i get the first of the used mailboxes and then I increment the value until I find an empty one - while (_.includes(_mailboxes, _mailbox.value)) { - _mailbox.value++; - } - //then I find the next used mailbox and calculate the maximum number of free mailboxes before a used one - nextUsed = _.filter(_mailboxes, function(elem) { - return elem > _mailbox.value; - }).shift(); - _mailbox.range = nextUsed - _mailbox.value; - } - - return res.status(200).send(_mailbox); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get list of settings -exports.getInfo = function(req, res) { - - var info = require('../../../package.json'); - - return res.status(200).send({ - name: info.name, - version: info.version, - engines: info.engines - }); -}; - -// Get a single setting -exports.show = function(req, res) { - return Setting - .findById(req.params.id) - .then(function(setting) { - if (!setting) { - return res.sendStatus(404); - } - return res.send(setting); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single mailAccount -exports.showCustom = function(req, res, next) { - return MailAccount - .findOne({ - where: { - service: true - }, - include: [{ - model: MailServerOut, - attributes: ['id', 'host', 'port', 'username', 'password', 'ssl', 'state', 'source', 'description'] - }] - }) - .then(function(mailAccount) { - console.log('mailAccount', mailAccount); - if (!mailAccount) { - return res.sendStatus(404); - } - return res.send(mailAccount); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new setting in the DB. -exports.create = function(req, res) { - return Setting - .create(req.body) - .then(function(setting) { - return res.status(201).send(setting); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new mailAccount in the DB. -exports.createSmtp = function(req, res, next) { - return MailAccount - .create(req.body, { - include: [{ - model: MailServerOut - }] - }).then(function(mailAccount) { - return res.status(201).send(mailAccount); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new setting in the DB. -exports.updateSmtp = function(req, res) { - var _mailAccount; - - return MailAccount - .findById(req.params.id) - .then(function(mailAccount) { - _mailAccount = mailAccount; - - return _mailAccount - .update({ - name: req.body.name, - address: req.body.address, - service: req.body.service, - signature: req.body.signature, - ListId: req.body.ListId, - TemplateId: req.body.TemplateId - }); - }) - .then(function(mailAccount) { - if (req.body.MailServerOut) { - req.body.MailServerOut.state = 'CONNECTING'; - req.body.MailServerOut.source = null; - - return MailServerOut - .update(req.body.MailServerOut, { - where: { - id: req.body.MailServerOut.id - }, - individualHooks: true - }); - } - }) - .then(function(smtp) { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing setting in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return Setting - .findById(req.params.id) - .then(function(setting) { - if (!setting) { - return res.sendStatus(404); - } - var updated = _.merge(setting, req.body); - return updated.save(); - }) - .then(function(setting) { - return res.status(200).send(setting); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a setting from the DB. -exports.destroy = function(req, res) { - return Setting - .findById(req.params.id) - .then(function(setting) { - if (!setting) { - return res.sendStatus(404); - } - return setting.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x790f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x65\x74\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73\x2F\x73\x79\x73\x74\x65\x6D","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x70\x61\x74\x68","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x66\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x74\x61\x74\x73","\x6C\x6F\x67","\x63\x68\x65\x63\x6B\x53\x74\x61\x74\x75\x73","\x61\x6C\x6C","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6D\x6D\x61\x6E\x64","\x43\x6F\x6D\x6D\x61\x6E\x64","\x74\x72\x69\x6D","\x63\x6F\x6D\x6D\x61\x6E\x64","\x62\x6F\x64\x79","\x61\x63\x74\x69\x6F\x6E","\x61\x6D\x69","\x6C\x6F\x63\x61\x6C\x73","\x61\x70\x70","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x6C\x6F\x67\x73","","\x72\x65\x61\x64\x46\x69\x6C\x65","\x65\x78\x69\x73\x74\x73","\x6C\x6F\x67\x73\x20\x65\x72\x72\x6F\x72\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x6F\x75\x74\x70\x75\x74","\x4E\x6F\x20\x6F\x75\x74\x70\x75\x74\x20\x6C\x6F\x67\x20\x66\x69\x6C\x65\x20\x66\x6F\x75\x6E\x64\x21","\x2F\x76\x61\x72\x2F\x6C\x6F\x67\x2F\x78\x63\x61\x6C\x6C\x79\x2F\x6D\x6F\x74\x69\x6F\x6E\x2D\x6F\x75\x74\x2E\x6C\x6F\x67","\x75\x74\x66\x38","\x65\x72\x72\x6F\x72\x73","\x4E\x6F\x20\x65\x72\x72\x6F\x72\x20\x6C\x6F\x67\x20\x66\x69\x6C\x65\x20\x66\x6F\x75\x6E\x64\x21","\x2F\x76\x61\x72\x2F\x6C\x6F\x67\x2F\x78\x63\x61\x6C\x6C\x79\x2F\x6D\x6F\x74\x69\x6F\x6E\x2D\x65\x72\x72\x2E\x6C\x6F\x67","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x6F","\x6C\x6F\x67\x6F","\x63\x68\x61\x6E\x67\x65\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x6C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x6A\x70\x65\x67\x20\x61\x6E\x64\x20\x70\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x6F\x6E","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x67\x65\x74\x4C\x6F\x67\x6F","\x6C\x6F\x67\x6F\x2E\x70\x6E\x67","\x67\x65\x74\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x6C\x6F\x67\x6F\x2D\x62\x69\x67\x2E\x70\x6E\x67","\x70\x61\x72\x61\x6D\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x67\x65\x74\x49\x6E\x74\x65\x72\x6E\x61\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x6D\x61\x70","\x71\x75\x65\x72\x79","\x76\x61\x6C\x75\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x73\x68\x69\x66\x74","\x66\x69\x6C\x74\x65\x72","\x72\x61\x6E\x67\x65","\x6D\x61\x78","\x6D\x69\x6E\x5F\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x4D\x61\x69\x6C\x62\x6F\x78","\x6D\x61\x69\x6C\x62\x6F\x78","\x6D\x69\x6E\x5F\x6D\x61\x69\x6C\x62\x6F\x78","\x67\x65\x74\x49\x6E\x66\x6F","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x70\x61\x63\x6B\x61\x67\x65\x2E\x6A\x73\x6F\x6E","\x6E\x61\x6D\x65","\x76\x65\x72\x73\x69\x6F\x6E","\x65\x6E\x67\x69\x6E\x65\x73","\x73\x68\x6F\x77","\x69\x64","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x73\x6C","\x73\x74\x61\x74\x65","\x73\x6F\x75\x72\x63\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x53\x6D\x74\x70","\x75\x70\x64\x61\x74\x65\x53\x6D\x74\x70","\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4E\x47","\x61\x64\x64\x72\x65\x73\x73","\x73\x65\x72\x76\x69\x63\x65","\x73\x69\x67\x6E\x61\x74\x75\x72\x65","\x4C\x69\x73\x74\x49\x64","\x54\x65\x6D\x70\x6C\x61\x74\x65\x49\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x790f[0];var _=require(_0x790f[1]);var Setting=require(_0x790f[3])[_0x790f[2]];var system=require(_0x790f[4]);var Agent=require(_0x790f[3])[_0x790f[5]];var VoiceMail=require(_0x790f[3])[_0x790f[6]];var MailAccount=require(_0x790f[3])[_0x790f[7]];var MailServerOut=require(_0x790f[3])[_0x790f[8]];var Promise=require(_0x790f[9]);var UploadFile=require(_0x790f[10]);var path=require(_0x790f[11]);var sequelize=require(_0x790f[3])[_0x790f[12]];var config=require(_0x790f[13]);var sr=require(_0x790f[14]);var fs=require(_0x790f[15]);exports[_0x790f[16]]= function(_0xb6b5xf,_0xb6b5x10){return Setting[_0x790f[21]]()[_0x790f[20]](function(_0xb6b5x12){return _0xb6b5x10[_0x790f[19]](200)[_0x790f[18]](_0xb6b5x12)})[_0x790f[17]](function(_0xb6b5x11){return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[22]]= function(_0xb6b5xf,_0xb6b5x10){return Promise[_0x790f[25]]([])[_0x790f[20]](system[_0x790f[24]]())[_0x790f[20]](function(_0xb6b5x13){return _0xb6b5x10[_0x790f[19]](200)[_0x790f[18]](_0xb6b5x13)})[_0x790f[17]](function(_0xb6b5x11){console[_0x790f[23]](_0xb6b5x11);return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[26]]= function(_0xb6b5xf,_0xb6b5x10){return Promise[_0x790f[35]](_0xb6b5xf[_0x790f[34]][_0x790f[33]][_0x790f[32]][_0x790f[31]])({action:_0x790f[27],command:_0xb6b5xf[_0x790f[30]][_0x790f[29]][_0x790f[28]]()})[_0x790f[20]](function(_0xb6b5x14){return _0xb6b5x10[_0x790f[19]](200)[_0x790f[18]](_0xb6b5x14)})[_0x790f[17]](function(_0xb6b5x11){return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[36]]= function(_0xb6b5xf,_0xb6b5x10){var _0xb6b5x15={output:_0x790f[37],errors:_0x790f[37]};var _0xb6b5x16=Promise[_0x790f[35]](fs[_0x790f[38]]);var _0xb6b5x17=Promise[_0x790f[35]](fs[_0x790f[39]]);return _0xb6b5x16(_0x790f[48],_0x790f[45])[_0x790f[20]](function(_0xb6b5x19){_0xb6b5x15[_0x790f[46]]= _0xb6b5x19})[_0x790f[17]](function(_0xb6b5x11){_0xb6b5x15[_0x790f[46]]= _0x790f[47]})[_0x790f[20]](function(){return _0xb6b5x16(_0x790f[44],_0x790f[45])})[_0x790f[20]](function(_0xb6b5x18){_0xb6b5x15[_0x790f[42]]= _0xb6b5x18})[_0x790f[17]](function(_0xb6b5x11){_0xb6b5x15[_0x790f[42]]= _0x790f[43]})[_0x790f[20]](function(_0xb6b5x14){return _0xb6b5x10[_0x790f[19]](200)[_0x790f[18]](_0xb6b5x15)})[_0x790f[17]](function(_0xb6b5x11){console[_0x790f[23]](_0x790f[40],_0xb6b5x11[_0x790f[41]]);return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[49]]= function(_0xb6b5xf,_0xb6b5x10){changeLogo(_0xb6b5xf,_0xb6b5x10,_0x790f[50])};exports[_0x790f[51]]= function(_0xb6b5xf,_0xb6b5x10){changeLogo(_0xb6b5xf,_0xb6b5x10,_0x790f[52])};function changeLogo(_0xb6b5xf,_0xb6b5x10,_0xb6b5x1b){var _0xb6b5x1c= new UploadFile({dest:path[_0x790f[57]](config[_0x790f[53]],_0x790f[54],_0x790f[55],_0x790f[56]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0xb6b5x1d,_0xb6b5x1e){return sr()+ path[_0x790f[59]](_0xb6b5x1e[_0x790f[58]])},messages:{maxNumberOfFiles:_0x790f[60],acceptFileTypes:_0x790f[61],invalidRequest:_0x790f[62]}});_0xb6b5x1c[_0x790f[69]](_0x790f[63],function(_0xb6b5x1f,_0xb6b5x20){if(!_0xb6b5x20[_0x790f[64]][_0x790f[58]]){return _0xb6b5x10[_0x790f[19]](500)[_0x790f[18]](_0xb6b5x1c)};return sequelize[_0x790f[68]](function(_0xb6b5x21){return Setting[_0x790f[67]](1)[_0x790f[20]](function(_0xb6b5x12){if(!_0xb6b5x12){return _0xb6b5x10[_0x790f[65]](404)};var _0xb6b5x23={};_0xb6b5x23[_0xb6b5x1b]= _0xb6b5x20[_0x790f[64]][_0x790f[58]];return _0xb6b5x12[_0x790f[66]](_0xb6b5x23,{transaction:_0xb6b5x21})})[_0x790f[20]](function(_0xb6b5x22){return _0xb6b5x10[_0x790f[19]](200)[_0x790f[18]](_0xb6b5x22)})})[_0x790f[17]](function(_0xb6b5x11){return handleError(_0xb6b5x10,_0xb6b5x11)})});_0xb6b5x1c[_0x790f[69]](_0x790f[70],function(_0xb6b5x11){console[_0x790f[23]](_0x790f[71],_0xb6b5x11);return handleError(_0xb6b5x10,_0xb6b5x11)});_0xb6b5x1c[_0x790f[72]](_0xb6b5xf)}exports[_0x790f[73]]= function(_0xb6b5xf,_0xb6b5x10){getLogo(_0xb6b5xf,_0xb6b5x10,_0x790f[74])};exports[_0x790f[75]]= function(_0xb6b5xf,_0xb6b5x10){getLogo(_0xb6b5xf,_0xb6b5x10,_0x790f[76])};function getLogo(_0xb6b5xf,_0xb6b5x10,_0xb6b5x25){var _0xb6b5x26=path[_0x790f[57]](config[_0x790f[53]],_0x790f[54],_0x790f[55],_0x790f[56],_0xb6b5xf[_0x790f[77]][_0x790f[58]]);fs[_0x790f[39]](_0xb6b5x26,function(_0xb6b5x17){if(!_0xb6b5x17){_0xb6b5x26= path[_0x790f[57]](config[_0x790f[53]],_0x790f[54],_0x790f[55],_0x790f[56],_0x790f[78],_0xb6b5x25)};return _0xb6b5x10[_0x790f[79]](_0xb6b5x26)})}exports[_0x790f[80]]= function(_0xb6b5xf,_0xb6b5x10){var _0xb6b5x27;return Setting[_0x790f[67]](1)[_0x790f[20]](function(_0xb6b5x12){_0xb6b5x27= _0xb6b5x12;return Agent[_0x790f[21]]({attributes:[_0x790f[81]]})})[_0x790f[20]](function(_0xb6b5x28){var _0xb6b5x29=_[_0x790f[82]](_0xb6b5x28,_0x790f[81]);var _0xb6b5x2a={value:0,range:0};var _0xb6b5x2b;if(_0xb6b5xf[_0x790f[83]][_0x790f[81]]){_0xb6b5x2a[_0x790f[84]]= Number(_0xb6b5xf[_0x790f[83]][_0x790f[81]]);while(_[_0x790f[85]](_0xb6b5x29,_0xb6b5x2a[_0x790f[84]])){_0xb6b5x2a[_0x790f[84]]++};_0xb6b5x2b= _[_0x790f[87]](_0xb6b5x29,function(_0xb6b5x2c){return _0xb6b5x2c> _0xb6b5x2a[_0x790f[84]]})[_0x790f[86]]();_0xb6b5x2a[_0x790f[88]]= _0xb6b5x2b- _0xb6b5x2a[_0x790f[84]]}else {var _0xb6b5x2d=_[_0x790f[89]](_0xb6b5x29);_0xb6b5x2a[_0x790f[84]]= _0xb6b5x27[_0x790f[90]];if(_0xb6b5x2d&& _0xb6b5x2d>= _0xb6b5x27[_0x790f[90]]){while(_[_0x790f[85]](_0xb6b5x29,_0xb6b5x2a[_0x790f[84]])){_0xb6b5x2a[_0x790f[84]]++};_0xb6b5x2b= _[_0x790f[87]](_0xb6b5x29,function(_0xb6b5x2c){return _0xb6b5x2c> _0xb6b5x2a[_0x790f[84]]})[_0x790f[86]]();_0xb6b5x2a[_0x790f[88]]= _0xb6b5x2b- _0xb6b5x2a[_0x790f[84]]}};return _0xb6b5x10[_0x790f[19]](200)[_0x790f[18]](_0xb6b5x2a)})[_0x790f[17]](function(_0xb6b5x11){return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[91]]= function(_0xb6b5xf,_0xb6b5x10){var _0xb6b5x27;return Setting[_0x790f[67]](1)[_0x790f[20]](function(_0xb6b5x12){_0xb6b5x27= _0xb6b5x12;return VoiceMail[_0x790f[21]]({attributes:[_0x790f[92]]})})[_0x790f[20]](function(_0xb6b5x2e){var _0xb6b5x2f=_[_0x790f[82]](_0xb6b5x2e,function(_0xb6b5x2c){return Number(_0xb6b5x2c[_0x790f[92]])});var _0xb6b5x30={value:0,range:0};var _0xb6b5x2b;var _0xb6b5x31=_[_0x790f[89]](_0xb6b5x2f);_0xb6b5x30[_0x790f[84]]= _0xb6b5x27[_0x790f[93]];if(_0xb6b5x31&& _0xb6b5x31>= _0xb6b5x27[_0x790f[93]]){while(_[_0x790f[85]](_0xb6b5x2f,_0xb6b5x30[_0x790f[84]])){_0xb6b5x30[_0x790f[84]]++};_0xb6b5x2b= _[_0x790f[87]](_0xb6b5x2f,function(_0xb6b5x2c){return _0xb6b5x2c> _0xb6b5x30[_0x790f[84]]})[_0x790f[86]]();_0xb6b5x30[_0x790f[88]]= _0xb6b5x2b- _0xb6b5x30[_0x790f[84]]};return _0xb6b5x10[_0x790f[19]](200)[_0x790f[18]](_0xb6b5x30)})[_0x790f[17]](function(_0xb6b5x11){console[_0x790f[23]](_0xb6b5x11);return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[94]]= function(_0xb6b5xf,_0xb6b5x10){var _0xb6b5x32=require(_0x790f[95]);return _0xb6b5x10[_0x790f[19]](200)[_0x790f[18]]({name:_0xb6b5x32[_0x790f[96]],version:_0xb6b5x32[_0x790f[97]],engines:_0xb6b5x32[_0x790f[98]]})};exports[_0x790f[99]]= function(_0xb6b5xf,_0xb6b5x10){return Setting[_0x790f[67]](_0xb6b5xf[_0x790f[77]][_0x790f[100]])[_0x790f[20]](function(_0xb6b5x33){if(!_0xb6b5x33){return _0xb6b5x10[_0x790f[65]](404)};return _0xb6b5x10[_0x790f[18]](_0xb6b5x33)})[_0x790f[17]](function(_0xb6b5x11){return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[101]]= function(_0xb6b5xf,_0xb6b5x10,_0xb6b5x34){return MailAccount[_0x790f[111]]({where:{service:true},include:[{model:MailServerOut,attributes:[_0x790f[100],_0x790f[103],_0x790f[104],_0x790f[105],_0x790f[106],_0x790f[107],_0x790f[108],_0x790f[109],_0x790f[110]]}]})[_0x790f[20]](function(_0xb6b5x35){console[_0x790f[23]](_0x790f[102],_0xb6b5x35);if(!_0xb6b5x35){return _0xb6b5x10[_0x790f[65]](404)};return _0xb6b5x10[_0x790f[18]](_0xb6b5x35)})[_0x790f[17]](function(_0xb6b5x11){return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[112]]= function(_0xb6b5xf,_0xb6b5x10){return Setting[_0x790f[112]](_0xb6b5xf[_0x790f[30]])[_0x790f[20]](function(_0xb6b5x33){return _0xb6b5x10[_0x790f[19]](201)[_0x790f[18]](_0xb6b5x33)})[_0x790f[17]](function(_0xb6b5x11){return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[113]]= function(_0xb6b5xf,_0xb6b5x10,_0xb6b5x34){return MailAccount[_0x790f[112]](_0xb6b5xf[_0x790f[30]],{include:[{model:MailServerOut}]})[_0x790f[20]](function(_0xb6b5x35){return _0xb6b5x10[_0x790f[19]](201)[_0x790f[18]](_0xb6b5x35)})[_0x790f[17]](function(_0xb6b5x11){return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[114]]= function(_0xb6b5xf,_0xb6b5x10){var _0xb6b5x36;return MailAccount[_0x790f[67]](_0xb6b5xf[_0x790f[77]][_0x790f[100]])[_0x790f[20]](function(_0xb6b5x35){_0xb6b5x36= _0xb6b5x35;return _0xb6b5x36[_0x790f[66]]({name:_0xb6b5xf[_0x790f[30]][_0x790f[96]],address:_0xb6b5xf[_0x790f[30]][_0x790f[116]],service:_0xb6b5xf[_0x790f[30]][_0x790f[117]],signature:_0xb6b5xf[_0x790f[30]][_0x790f[118]],ListId:_0xb6b5xf[_0x790f[30]][_0x790f[119]],TemplateId:_0xb6b5xf[_0x790f[30]][_0x790f[120]]})})[_0x790f[20]](function(_0xb6b5x35){if(_0xb6b5xf[_0x790f[30]][_0x790f[8]]){_0xb6b5xf[_0x790f[30]][_0x790f[8]][_0x790f[108]]= _0x790f[115];_0xb6b5xf[_0x790f[30]][_0x790f[8]][_0x790f[109]]= null;return MailServerOut[_0x790f[66]](_0xb6b5xf[_0x790f[30]].MailServerOut,{where:{id:_0xb6b5xf[_0x790f[30]][_0x790f[8]][_0x790f[100]]},individualHooks:true})}})[_0x790f[20]](function(_0xb6b5x37){return _0xb6b5x10[_0x790f[65]](200)})[_0x790f[17]](function(_0xb6b5x11){return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[66]]= function(_0xb6b5xf,_0xb6b5x10){if(_0xb6b5xf[_0x790f[30]][_0x790f[100]]){delete _0xb6b5xf[_0x790f[30]][_0x790f[100]]};return Setting[_0x790f[67]](_0xb6b5xf[_0x790f[77]][_0x790f[100]])[_0x790f[20]](function(_0xb6b5x33){if(!_0xb6b5x33){return _0xb6b5x10[_0x790f[65]](404)};var _0xb6b5x38=_[_0x790f[121]](_0xb6b5x33,_0xb6b5xf[_0x790f[30]]);return _0xb6b5x38[_0x790f[122]]()})[_0x790f[20]](function(_0xb6b5x33){return _0xb6b5x10[_0x790f[19]](200)[_0x790f[18]](_0xb6b5x33)})[_0x790f[17]](function(_0xb6b5x11){return handleError(_0xb6b5x10,_0xb6b5x11)})};exports[_0x790f[123]]= function(_0xb6b5xf,_0xb6b5x10){return Setting[_0x790f[67]](_0xb6b5xf[_0x790f[77]][_0x790f[100]])[_0x790f[20]](function(_0xb6b5x33){if(!_0xb6b5x33){return _0xb6b5x10[_0x790f[65]](404)};return _0xb6b5x33[_0x790f[123]]()})[_0x790f[20]](function(){return _0xb6b5x10[_0x790f[65]](204)})[_0x790f[17]](function(_0xb6b5x11){return handleError(_0xb6b5x10,_0xb6b5x11)})};function handleError(_0xb6b5x10,_0xb6b5x11){return _0xb6b5x10[_0x790f[19]](500)[_0x790f[18]](_0xb6b5x11)} \ No newline at end of file diff --git a/server/api/setting/setting.events.js b/server/api/setting/setting.events.js index 1aa184d..57239d5 100644 --- a/server/api/setting/setting.events.js +++ b/server/api/setting/setting.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Setting = require('../../models').Setting; - -var SettingEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SettingEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Setting.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SettingEvents.emit(event + ':' + doc._id, doc); - SettingEvents.emit(event, doc); - done(null); - } -} - -module.exports = SettingEvents; +var _0x92a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x65\x74\x74\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x92a6[0];const EventEmitter=require(_0x92a6[1]);const Setting=require(_0x92a6[3])[_0x92a6[2]];var SettingEvents= new EventEmitter();SettingEvents[_0x92a6[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x92a6[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x92a6[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x92a6[6]};for(var e in events){var event=events[e];Setting[_0x92a6[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe719x8,_0xe719x9,_0xe719xa){SettingEvents[_0x92a6[10]](event+ _0x92a6[8]+ _0xe719x8[_0x92a6[9]],_0xe719x8);SettingEvents[_0x92a6[10]](event,_0xe719x8);_0xe719xa(null)}}module[_0x92a6[11]]= SettingEvents \ No newline at end of file diff --git a/server/api/setting/setting.socket.js b/server/api/setting/setting.socket.js index 6b71535..78c3f52 100644 --- a/server/api/setting/setting.socket.js +++ b/server/api/setting/setting.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SettingEvents = require('./setting.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('setting:' + event, socket); - - SettingEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SettingEvents.removeListener(event, listener); - }; -} +var _0x5302=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x65\x74\x74\x69\x6E\x67\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x5302[0];const SettingEvents=require(_0x5302[1]);var events=[_0x5302[2],_0x5302[3]];exports[_0x5302[4]]= function(_0x4f91x3){for(var _0x4f91x4=0,_0x4f91x5=events[_0x5302[5]];_0x4f91x4< _0x4f91x5;_0x4f91x4++){var _0x4f91x6=events[_0x4f91x4];var _0x4f91x7=createListener(_0x5302[6]+ _0x4f91x6,_0x4f91x3);SettingEvents[_0x5302[7]](_0x4f91x6,_0x4f91x7);_0x4f91x3[_0x5302[7]](_0x5302[8],removeListener(_0x4f91x6,_0x4f91x7))}};function createListener(_0x4f91x6,_0x4f91x3){return function(_0x4f91x9){_0x4f91x3[_0x5302[9]](_0x4f91x6,_0x4f91x9)}}function removeListener(_0x4f91x6,_0x4f91x7){return function(){SettingEvents[_0x5302[10]](_0x4f91x6,_0x4f91x7)}} \ No newline at end of file diff --git a/server/api/sms_account/index.js b/server/api/sms_account/index.js index 6870a09..1b5bad3 100644 --- a/server/api/sms_account/index.js +++ b/server/api/sms_account/index.js @@ -1,31 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sms_account.controller'); -var license = require('../../config/license/license.service'); -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.index); -router.get('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.show); -router.get('/:id/applications', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.showApplications); -router.get('/:id/check', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.checkAccount); -router.get('/:id/rooms', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.getSmsRooms); -router.get('/:id/dispositions', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.getDispositions); -router.post('/', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.create); -router.post('/:id/dispositions', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.createDisposition); -router.post('/:id/applications', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.createApplication); -router.post('/:id/send', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.sendMessage); -router.post('/:id/receive', license.isValidDate(), license.hasSms(), controller.receiveMessage); -router.post('/:id/message/:msgId/update', license.isValidDate(), license.hasSms(), controller.updateStatus); -router.post('/:id/messageStatus', license.isValidDate(), license.hasSms(), controller.messageStatus); -router.put('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.update); -router.put('/:id/applications', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.updateApplications); -router.put('/:id/applications/:appId', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.updateApplication); -router.put('/:id/dispositions/:dispId', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.updateDisposition); -router.delete('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.destroy); -router.delete('/:id/applications', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.bulkDestroyApplications); -router.delete('/:id/applications/:appId', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.destroyApplication); -router.delete('/:id/dispositions/:dispId', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.destroyDisposition); - -module.exports = router; +var _0x57a3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x53\x6D\x73","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x72\x6F\x6F\x6D\x73","\x67\x65\x74\x53\x6D\x73\x52\x6F\x6F\x6D\x73","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x72\x65\x63\x65\x69\x76\x65","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x2F\x3A\x6D\x73\x67\x49\x64\x2F\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x53\x74\x61\x74\x75\x73","\x6D\x65\x73\x73\x61\x67\x65\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x61\x70\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73\x2F\x3A\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x57a3[0];var express=require(_0x57a3[1]);var auth=require(_0x57a3[2]);var controller=require(_0x57a3[3]);var license=require(_0x57a3[4]);var router=express.Router();router[_0x57a3[13]](_0x57a3[5],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9],_0x57a3[10]]),controller[_0x57a3[12]]);router[_0x57a3[13]](_0x57a3[14],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[15]]);router[_0x57a3[13]](_0x57a3[16],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[17]]);router[_0x57a3[13]](_0x57a3[18],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[19]]);router[_0x57a3[13]](_0x57a3[20],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9],_0x57a3[10]]),controller[_0x57a3[21]]);router[_0x57a3[13]](_0x57a3[22],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9],_0x57a3[10]]),controller[_0x57a3[23]]);router[_0x57a3[25]](_0x57a3[5],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[24]]);router[_0x57a3[25]](_0x57a3[22],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[26]]);router[_0x57a3[25]](_0x57a3[16],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[27]]);router[_0x57a3[25]](_0x57a3[28],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9],_0x57a3[10]]),controller[_0x57a3[29]]);router[_0x57a3[25]](_0x57a3[30],license[_0x57a3[6]](),license[_0x57a3[7]](),controller[_0x57a3[31]]);router[_0x57a3[25]](_0x57a3[32],license[_0x57a3[6]](),license[_0x57a3[7]](),controller[_0x57a3[33]]);router[_0x57a3[25]](_0x57a3[34],license[_0x57a3[6]](),license[_0x57a3[7]](),controller[_0x57a3[35]]);router[_0x57a3[37]](_0x57a3[14],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[36]]);router[_0x57a3[37]](_0x57a3[16],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[38]]);router[_0x57a3[37]](_0x57a3[39],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[40]]);router[_0x57a3[37]](_0x57a3[41],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[42]]);router[_0x57a3[44]](_0x57a3[14],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[43]]);router[_0x57a3[44]](_0x57a3[16],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[45]]);router[_0x57a3[44]](_0x57a3[39],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[46]]);router[_0x57a3[44]](_0x57a3[41],license[_0x57a3[6]](),license[_0x57a3[7]](),auth[_0x57a3[8]](),auth[_0x57a3[11]]([11],[_0x57a3[9]]),controller[_0x57a3[47]]);module[_0x57a3[48]]= router \ No newline at end of file diff --git a/server/api/sms_account/sms_account.controller.js b/server/api/sms_account/sms_account.controller.js index 78cb631..49389c9 100644 --- a/server/api/sms_account/sms_account.controller.js +++ b/server/api/sms_account/sms_account.controller.js @@ -1,678 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sms_accounts -> index - * POST /api/sms_accounts -> create - * GET /api/sms_accounts/:id -> show - * PUT /api/sms_accounts/:id -> update - * DELETE /api/sms_accounts/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); -var skebby = require('../../config/sms/skebby'); -var sequelize = require('../../models').sequelize; -var User = require('../../models').User; -var SmsAccount = require('../../models').SmsAccount; -var SmsQueue = require('../../models').SmsQueue; -var SmsApplication = require('../../models').SmsApplication; -var SmsMessage = require('../../models').SmsMessage; -var SmsRoom = require('../../models').SmsRoom; -var SmsDisposition = require('../../models').SmsDisposition; -var Contact = require('../../models').Contact; -var Interval = require('../../models').Interval; -var Promise = require('bluebird'); -var moment = require('moment'); - - - -function handleError(res, err) { - return res.status(500).send(err); -} - -// Gets a list of SmsAccounts -exports.index = function(req, res) { - return SmsAccount - .findAndCountAll(Util.getQuery(req.query)) - .then(function(sms_account) { - res.status(200).send(sms_account); - }) - .catch(function(err) { - return handleError(res, err); - }); - -} - -// Gets a single SmsAccount from the DB -exports.show = function(req, res) { - return SmsAccount - .findById(req.params.id) - .then(function(smsAccount) { - if (!smsAccount) { - return res.sendStatus(404); - } - return res.send(smsAccount); - }) - .catch(function(err) { - return handleError(res, err); - }); -} -exports.checkAccount = function(req, res) { - return SmsAccount - .findById(req.params.id) - .then(function(smsAccount) { - if (!smsAccount) { - return res.sendStatus(404); - } - switch (smsAccount.type) { - case 'twilio': - var client = require('twilio')(smsAccount.sid, smsAccount.token); - var getList = Promise.promisify(client.accounts.list); - return getList(); - break; - case 'skebby': - var _mMessage = { - from: 'Test', - to: 'Test', - body: 'Test' - }; - smsAccount.smstype = 'test'; - return skebby.sendMessage(_mMessage, smsAccount) - break; - default: - throw new Error('There is no authentication for this account'); - - } - }) - .then(function(response) { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -} -exports.getDispositions = function(req, res, next) { - return SmsAccount - .findById(req.params.id) - .then(function(smsAccount) { - if (!smsAccount) { - return res.sendStatus(404); - } - - return smsAccount - .getSmsDispositions(); - }) - .then(function(smsDispositions) { - return res.status(200).send({ - rows: smsDispositions, - count: smsDispositions.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Get Applications -exports.showApplications = function(req, res, next) { - return SmsAccount - .scope('default') - .findById(req.params.id) - .then(function(smsAccount) { - if (!smsAccount) { - return res.sendStatus(404); - } - return smsAccount - .getSmsApplications(_.merge(Util.getQuery(req.query), { - include: [{ - model: SmsQueue, - attributes: ['id', 'name'] - }, { - model: User, - attributes: ['id', 'name', 'online'] - }, { - model: Interval, - attributes: ['id', 'name'] - }] - })); - }) - .then(function(smsApplications) { - return res.send({ - count: smsApplications.length, - rows: smsApplications - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a new SmsAccount in the DB -exports.create = function(req, res) { - return SmsAccount - .create(req.body) - .then(function(smsAccount) { - console.log(smsAccount); - return res.status(201).send(smsAccount); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); - -} - -exports.createDisposition = function(req, res, next) { - req.body.SmsAccountId = req.params.id; - - return SmsDisposition - .create(req.body) - .then(function(smsDiposition) { - return res.status(201).send(smsDiposition); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a send Message in the DB. -exports.sendMessage = function(req, res, next) { - req.body.SmsAccountId = req.params.id; - req.body.UserId = req.user.id; - - return SmsMessage - .create(req.body, { - user: req.user - }) - .then(function(sms_message) { - return res.status(201).send(sms_message); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a receive Message in the DB. -function getMessage(message) { - var _message; - console.log(message); - switch (message.accountType) { - case 'twilio': - if (message.From && message.To && message.Body) { - _message = { - from: message.From, - to: message.To, - body: message.Body - }; - } - break; - case 'skebby': - if ((message.sender && message.receiver && message.text)) { - _message = { - from: message.sender, - to: message.receiver, - body: message.text - }; - } - break; - default: - } - return _message; -} - -exports.receiveMessage = function(req, res, next) { - var _message; - var _account; - - return SmsAccount - .findById(req.params.id) - .then(function(smsAccount) { - if (!smsAccount) { - throw new Error('SMS account not found'); - } - _account = smsAccount; - req.body.accountType = _account.type; - - _message = getMessage(req.body); - if (!_message) { - throw new Error('SMS message format is not known'); - } - // console.log(_message); - if (_account.ListId) { - return Contact - .findOrCreate({ - where: { - ListId: _account.ListId, - mobile: _message.from - }, - defaults: { - ListId: _account.ListId, - mobile: _message.from - } - }); - } else { - return []; - } - - }) - .then(function(contact) { - return SmsRoom - .findAll({ - limit: 1, - where: { - contact: _message.from, - SmsAccountId: _account.id - }, - order: [ - ['createdAt', 'DESC'] - ] - }) - }) - .then(function(smsroom) { - var room = smsroom[0]; - if (!room || room.status === 'CLOSED') { - var parentID = room ? room.id : null; - return SmsRoom - .create({ - contact: _message.from, - SmsAccountId: _account.id, - status: 'NEW', - ParentId: parentID, - lastEvent: 'RECEIVED', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'), - smsIn: 1 - }) - } else { - return room - .updateAttributes({ - status: 'OPEN', - openReason: 'system', - lastEvent: 'RECEIVED', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'), - smsIn: ++room.smsIn - }); - } - }) - .then(function(room) { - // console.log(room); - _message.SmsAccountId = _account.id; - _message.SmsRoomId = room.id; - _message.status = 'RECEIVED'; - - return SmsMessage - .create(_message) - }) - .then(function(smsMessage) { - return res.status(201).send(smsMessage); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; -// Updates an existing SmsAccount in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SmsAccount.findById(req.params.id) - .then(function(smsAccount) { - if (!smsAccount) { - return res.sendStatus(404); - } - - var updated = _.merge(smsAccount, req.body); - return updated - .save(); - }) - .then(function(smsAccount) { - return res.status(200).send(smsAccount); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - console.log(' err', err); - return handleError(res, err); - }); - -} - -exports.updateDisposition = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return SmsDisposition - .findById(req.params.dispId) - .then(function(smsDisposition) { - if (!smsDisposition) { - return res.sendStatus(404); - } - var updated = _.merge(smsDisposition, req.body); - return updated - .save(); - }) - .then(function(mailAccount) { - return res.status(200).send(mailAccount); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Updates message status in the DB for TWILIO account -exports.updateStatus = function(req, res) { - - return SmsMessage - .findById(req.params.msgId) - .then(function(smsMessage) { - if (!smsMessage) { - return res.sendStatus(404); - } - var updated = _.merge(smsMessage, { - status: _.toUpper(req.body.MessageStatus), - errorcode: req.body.ErrorCode - }); - return updated - .save(); - }) - .then(function(smsMessage) { - return res.status(200).send(smsMessage); - }) - .catch(function(err) { - return handleError(res, err); - }); - -} - -exports.messageStatus = function(req, res) { - - return SmsMessage - .findOne({ - where: { - skebby_message_id: req.body.skebby_dispatch_id - } - }) - .then(function(smsMessage) { - if (!smsMessage) { - return res.sendStatus(404); - } - var updated = _.merge(smsMessage, { - status: req.body.status, - errorcode: req.body.error_code - }); - return updated - .save(); - }) - .then(function(smsMessage) { - return res.status(200).send(smsMessage); - }) - .catch(function(err) { - return handleError(res, err); - }); - - } - // Updates aapplications -exports.updateApplications = function(req, res) { - - var priority = 0; - var apps = req.body; - - apps.forEach(function(app) { - delete app.id; - delete app.createdAt; - delete app.updatedAt; - - app.priority = ++priority; - }); - - return sequelize.transaction(function(t) { - return SmsApplication - .destroy({ - where: { - SmsAccountId: req.params.id - }, - individualHooks: true, - transaction: t - }).then(function(smsApplication) { - return SmsApplication - .bulkCreate(apps, { - individualHooks: true, - transaction: t - }); - }); - }).then(function(smsAccounts) { - return res.status(200).send({ - count: smsAccounts.length, - rows: smsAccounts - }); - }).catch(function(err) { - return handleError(res, err); - }); -}; -// Deletes a SmsAccount from the DB -exports.destroy = function(req, res) { - return SmsAccount.findById(req.params.id) - .then(function(smsAccount) { - if (!smsAccount) { - return res.sendStatus(404); - } - - return smsAccount - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -} -exports.destroyApplication = function(req, res, next) { - return SmsApplication - .findById(req.params.appId) - .then(function(smsApplication) { - if (!smsApplication) { - return res.sendStatus(404); - } - - return smsApplication - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.destroyDisposition = function(req, res, next) { - return SmsDisposition - .findById(req.params.dispId) - .then(function(smsDiposition) { - if (!smsDiposition) { - return res.sendStatus(404); - } - return smsDiposition - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroyApplications = function(req, res) { - return SmsApplication - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -exports.getSmsRooms = function(req, res, next) { - var _query = { - where: { - SmsAccountId: req.params.id, - $and: [] - }, - attributes: ['id', 'contact', 'updatedAt', 'tags', 'disposition', 'voiceSource', 'lastEvent'], - include: [] - }; - - // TO MOVE SOON INTO AN EXTENAL UTIL FILE - if (req.query) { - if (req.query.tags) { - if (_.isArray(req.query.tags)) { - for (var i = 0; i < req.query.tags.length; i++) { - _query.where.$and.push({ - tags: { - $like: '%' + req.query.tags[i] + '%' - } - }); - } - } else { - _query.where.$and.push({ - tags: { - $like: '%' + req.query.tags + '%' - } - }); - } - - delete req.query.tags; - } - - _.merge(_query.where, req.query); - } - - switch (req.user.role) { - case 'agent': - _query.include.push({ - model: User, - attributes: ['id'] - }); - var _agents; - var _agentQueues; - var _accountQueues; - - return User - .findById(req.user.id) - .then(function(user) { - if (user) { - return user - .getSmsQueues(); - } else { - return []; - } - }) - .then(function(queues) { - _agentQueues = _.map(queues, 'id'); - return SmsAccount - .findById(req.params.id); - }) - .then(function(account) { - return account - .getSmsApplications({ - where: { - $or: [{ - app: 'queue' - }, { - app: 'agent' - }] - } - }); - }) - .then(function(apps) { - _agents = _.map(_.find(apps, { - 'app': 'agent' - }), 'UserId'); - _accountQueues = _.map(_.find(apps, { - 'app': 'queue' - }), 'SmsQueueId'); - // _accountQueues = _.map(queues, 'SmsQueueId'); - if (_.intersection(_agentQueues, _accountQueues).length || _.intersection(_agents, [req.user.id]).length) { - return SmsRoom - .findAll(_query) - .then(function(smsRooms) { - return res.status(200).send(smsRooms); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); - } else { - return res.status(200).send([]); - } - }) - .catch(function(err) { - console.error(err); - }); - - default: - - return SmsRoom - .findAll(_query) - .then(function(smsRooms) { - return res.status(200).send(smsRooms); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -exports.createApplication = function(req, res, next) { - - return SmsApplication - .max('priority', { - where: { - SmsAccountId: req.params.id - } - }).then(function(max) { - // SET PRIORITY - req.body.priority = max ? ++max : 1; - req.body.SmsAccountId = req.params.id; - - return SmsApplication.create(req.body); - }) - .then(function(smsApplication) { - return res.status(201).send(smsApplication); - }) - .catch(function(err) { - console.log('err', err); - return handleError(res, err); - }); -}; - -exports.updateApplication = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SmsApplication.findById(req.params.appId) - .then(function(smsApplication) { - if (!smsApplication) { - return res.sendStatus(404); - } - var updated = _.merge(smsApplication, req.body); - return updated.save(); - }) - .then(function(smsApplication) { - return res.status(200).send(smsApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); -} +var _0xa0d2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6D\x73\x2F\x73\x6B\x65\x62\x62\x79","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x51\x75\x65\x75\x65","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x52\x6F\x6F\x6D","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x73\x69\x64","\x74\x6F\x6B\x65\x6E","\x74\x77\x69\x6C\x69\x6F","\x6C\x69\x73\x74","\x61\x63\x63\x6F\x75\x6E\x74\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x54\x65\x73\x74","\x73\x6D\x73\x74\x79\x70\x65","\x74\x65\x73\x74","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x73\x6B\x65\x62\x62\x79","\x54\x68\x65\x72\x65\x20\x69\x73\x20\x6E\x6F\x20\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x74\x68\x69\x73\x20\x61\x63\x63\x6F\x75\x6E\x74","\x74\x79\x70\x65","\x67\x65\x74\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68","\x67\x65\x74\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x73\x68\x6F\x77\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x65\x72\x67\x65","\x67\x65\x74\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x6C\x6F\x67","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x55\x73\x65\x72\x49\x64","\x75\x73\x65\x72","\x46\x72\x6F\x6D","\x54\x6F","\x42\x6F\x64\x79","\x73\x65\x6E\x64\x65\x72","\x72\x65\x63\x65\x69\x76\x65\x72","\x74\x65\x78\x74","\x61\x63\x63\x6F\x75\x6E\x74\x54\x79\x70\x65","\x72\x65\x63\x65\x69\x76\x65\x4D\x65\x73\x73\x61\x67\x65","\x65\x72\x72\x6F\x72","\x53\x6D\x73\x52\x6F\x6F\x6D\x49\x64","\x52\x45\x43\x45\x49\x56\x45\x44","\x43\x4C\x4F\x53\x45\x44","\x66\x72\x6F\x6D","\x4E\x45\x57","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x4F\x50\x45\x4E","\x73\x79\x73\x74\x65\x6D","\x73\x6D\x73\x49\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x53\x4D\x53\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x4D\x53\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x66\x6F\x72\x6D\x61\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x6B\x6E\x6F\x77\x6E","\x4C\x69\x73\x74\x49\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x20\x20\x20\x65\x72\x72","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x69\x73\x70\x49\x64","\x75\x70\x64\x61\x74\x65\x53\x74\x61\x74\x75\x73","\x74\x6F\x55\x70\x70\x65\x72","\x45\x72\x72\x6F\x72\x43\x6F\x64\x65","\x6D\x73\x67\x49\x64","\x6D\x65\x73\x73\x61\x67\x65\x53\x74\x61\x74\x75\x73","\x65\x72\x72\x6F\x72\x5F\x63\x6F\x64\x65","\x73\x6B\x65\x62\x62\x79\x5F\x64\x69\x73\x70\x61\x74\x63\x68\x5F\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x61\x70\x70\x49\x64","\x64\x65\x73\x74\x72\x6F\x79\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x64\x73","\x67\x65\x74\x53\x6D\x73\x52\x6F\x6F\x6D\x73","\x63\x6F\x6E\x74\x61\x63\x74","\x74\x61\x67\x73","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x76\x6F\x69\x63\x65\x53\x6F\x75\x72\x63\x65","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x69\x73\x41\x72\x72\x61\x79","\x25","\x70\x75\x73\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x69\x6E\x63\x6C\x75\x64\x65","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64","\x6D\x61\x70","\x71\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65\x49\x64","\x69\x6E\x74\x65\x72\x73\x65\x63\x74\x69\x6F\x6E","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x65\x72\x72","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E"];_0xa0d2[0];var _=require(_0xa0d2[1]);var Util=require(_0xa0d2[2]);var skebby=require(_0xa0d2[3]);var sequelize=require(_0xa0d2[5])[_0xa0d2[4]];var User=require(_0xa0d2[5])[_0xa0d2[6]];var SmsAccount=require(_0xa0d2[5])[_0xa0d2[7]];var SmsQueue=require(_0xa0d2[5])[_0xa0d2[8]];var SmsApplication=require(_0xa0d2[5])[_0xa0d2[9]];var SmsMessage=require(_0xa0d2[5])[_0xa0d2[10]];var SmsRoom=require(_0xa0d2[5])[_0xa0d2[11]];var SmsDisposition=require(_0xa0d2[5])[_0xa0d2[12]];var Contact=require(_0xa0d2[5])[_0xa0d2[13]];var Interval=require(_0xa0d2[5])[_0xa0d2[14]];var Promise=require(_0xa0d2[15]);var moment=require(_0xa0d2[16]);function handleError(_0x8292x11,_0x8292x12){return _0x8292x11[_0xa0d2[18]](500)[_0xa0d2[17]](_0x8292x12)}exports[_0xa0d2[19]]= function(_0x8292x13,_0x8292x11){return SmsAccount[_0xa0d2[24]](Util[_0xa0d2[23]](_0x8292x13[_0xa0d2[22]]))[_0xa0d2[21]](function(_0x8292x14){_0x8292x11[_0xa0d2[18]](200)[_0xa0d2[17]](_0x8292x14)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[25]]= function(_0x8292x13,_0x8292x11){return SmsAccount[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[27]])[_0xa0d2[21]](function(_0x8292x15){if(!_0x8292x15){return _0x8292x11[_0xa0d2[26]](404)};return _0x8292x11[_0xa0d2[17]](_0x8292x15)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[30]]= function(_0x8292x13,_0x8292x11){return SmsAccount[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[27]])[_0xa0d2[21]](function(_0x8292x15){if(!_0x8292x15){return _0x8292x11[_0xa0d2[26]](404)};switch(_0x8292x15[_0xa0d2[43]]){case _0xa0d2[33]:var _0x8292x17=require(_0xa0d2[33])(_0x8292x15[_0xa0d2[31]],_0x8292x15[_0xa0d2[32]]);var _0x8292x18=Promise[_0xa0d2[36]](_0x8292x17[_0xa0d2[35]][_0xa0d2[34]]);return _0x8292x18();break;case _0xa0d2[41]:var _0x8292x19={from:_0xa0d2[37],to:_0xa0d2[37],body:_0xa0d2[37]};_0x8292x15[_0xa0d2[38]]= _0xa0d2[39];return skebby[_0xa0d2[40]](_0x8292x19,_0x8292x15);break;default:throw new Error(_0xa0d2[42])}})[_0xa0d2[21]](function(_0x8292x16){return _0x8292x11[_0xa0d2[26]](200)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[44]]= function(_0x8292x13,_0x8292x11,_0x8292x1a){return SmsAccount[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[27]])[_0xa0d2[21]](function(_0x8292x15){if(!_0x8292x15){return _0x8292x11[_0xa0d2[26]](404)};return _0x8292x15[_0xa0d2[46]]()})[_0xa0d2[21]](function(_0x8292x1b){return _0x8292x11[_0xa0d2[18]](200)[_0xa0d2[17]]({rows:_0x8292x1b,count:_0x8292x1b[_0xa0d2[45]]})})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[47]]= function(_0x8292x13,_0x8292x11,_0x8292x1a){return SmsAccount[_0xa0d2[53]](_0xa0d2[52])[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[27]])[_0xa0d2[21]](function(_0x8292x15){if(!_0x8292x15){return _0x8292x11[_0xa0d2[26]](404)};return _0x8292x15[_0xa0d2[51]](_[_0xa0d2[50]](Util[_0xa0d2[23]](_0x8292x13[_0xa0d2[22]]),{include:[{model:SmsQueue,attributes:[_0xa0d2[27],_0xa0d2[48]]},{model:User,attributes:[_0xa0d2[27],_0xa0d2[48],_0xa0d2[49]]},{model:Interval,attributes:[_0xa0d2[27],_0xa0d2[48]]}]}))})[_0xa0d2[21]](function(_0x8292x1c){return _0x8292x11[_0xa0d2[17]]({count:_0x8292x1c[_0xa0d2[45]],rows:_0x8292x1c})})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[54]]= function(_0x8292x13,_0x8292x11){return SmsAccount[_0xa0d2[54]](_0x8292x13[_0xa0d2[58]])[_0xa0d2[21]](function(_0x8292x15){console[_0xa0d2[57]](_0x8292x15);return _0x8292x11[_0xa0d2[18]](201)[_0xa0d2[17]](_0x8292x15)})[_0xa0d2[20]](sequelize.UniqueConstraintError,function(_0x8292x12){return Util[_0xa0d2[56]][_0xa0d2[55]](_0x8292x11,_0x8292x12)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[59]]= function(_0x8292x13,_0x8292x11,_0x8292x1a){_0x8292x13[_0xa0d2[58]][_0xa0d2[60]]= _0x8292x13[_0xa0d2[28]][_0xa0d2[27]];return SmsDisposition[_0xa0d2[54]](_0x8292x13[_0xa0d2[58]])[_0xa0d2[21]](function(_0x8292x1d){return _0x8292x11[_0xa0d2[18]](201)[_0xa0d2[17]](_0x8292x1d)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[40]]= function(_0x8292x13,_0x8292x11,_0x8292x1a){_0x8292x13[_0xa0d2[58]][_0xa0d2[60]]= _0x8292x13[_0xa0d2[28]][_0xa0d2[27]];_0x8292x13[_0xa0d2[58]][_0xa0d2[61]]= _0x8292x13[_0xa0d2[62]][_0xa0d2[27]];return SmsMessage[_0xa0d2[54]](_0x8292x13[_0xa0d2[58]],{user:_0x8292x13[_0xa0d2[62]]})[_0xa0d2[21]](function(_0x8292x1e){return _0x8292x11[_0xa0d2[18]](201)[_0xa0d2[17]](_0x8292x1e)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};function getMessage(_0x8292x20){var _0x8292x21;console[_0xa0d2[57]](_0x8292x20);switch(_0x8292x20[_0xa0d2[69]]){case _0xa0d2[33]:if(_0x8292x20[_0xa0d2[63]]&& _0x8292x20[_0xa0d2[64]]&& _0x8292x20[_0xa0d2[65]]){_0x8292x21= {from:_0x8292x20[_0xa0d2[63]],to:_0x8292x20[_0xa0d2[64]],body:_0x8292x20[_0xa0d2[65]]}};break;case _0xa0d2[41]:if((_0x8292x20[_0xa0d2[66]]&& _0x8292x20[_0xa0d2[67]]&& _0x8292x20[_0xa0d2[68]])){_0x8292x21= {from:_0x8292x20[_0xa0d2[66]],to:_0x8292x20[_0xa0d2[67]],body:_0x8292x20[_0xa0d2[68]]}};break;default:};return _0x8292x21}exports[_0xa0d2[70]]= function(_0x8292x13,_0x8292x11,_0x8292x1a){var _0x8292x21;var _0x8292x22;return SmsAccount[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[27]])[_0xa0d2[21]](function(_0x8292x15){if(!_0x8292x15){throw new Error(_0xa0d2[86])};_0x8292x22= _0x8292x15;_0x8292x13[_0xa0d2[58]][_0xa0d2[69]]= _0x8292x22[_0xa0d2[43]];_0x8292x21= getMessage(_0x8292x13[_0xa0d2[58]]);if(!_0x8292x21){throw new Error(_0xa0d2[87])};if(_0x8292x22[_0xa0d2[88]]){return Contact[_0xa0d2[89]]({where:{ListId:_0x8292x22[_0xa0d2[88]],mobile:_0x8292x21[_0xa0d2[75]]},defaults:{ListId:_0x8292x22[_0xa0d2[88]],mobile:_0x8292x21[_0xa0d2[75]]}})}else {return []}})[_0xa0d2[21]](function(_0x8292x27){return SmsRoom[_0xa0d2[85]]({limit:1,where:{contact:_0x8292x21[_0xa0d2[75]],SmsAccountId:_0x8292x22[_0xa0d2[27]]},order:[[_0xa0d2[83],_0xa0d2[84]]]})})[_0xa0d2[21]](function(_0x8292x25){var _0x8292x24=_0x8292x25[0];if(!_0x8292x24|| _0x8292x24[_0xa0d2[18]]=== _0xa0d2[74]){var _0x8292x26=_0x8292x24?_0x8292x24[_0xa0d2[27]]:null;return SmsRoom[_0xa0d2[54]]({contact:_0x8292x21[_0xa0d2[75]],SmsAccountId:_0x8292x22[_0xa0d2[27]],status:_0xa0d2[76],ParentId:_0x8292x26,lastEvent:_0xa0d2[73],lastEventAt:moment()[_0xa0d2[78]](_0xa0d2[77]),smsIn:1})}else {return _0x8292x24[_0xa0d2[82]]({status:_0xa0d2[79],openReason:_0xa0d2[80],lastEvent:_0xa0d2[73],lastEventAt:moment()[_0xa0d2[78]](_0xa0d2[77]),smsIn:++_0x8292x24[_0xa0d2[81]]})}})[_0xa0d2[21]](function(_0x8292x24){_0x8292x21[_0xa0d2[60]]= _0x8292x22[_0xa0d2[27]];_0x8292x21[_0xa0d2[72]]= _0x8292x24[_0xa0d2[27]];_0x8292x21[_0xa0d2[18]]= _0xa0d2[73];return SmsMessage[_0xa0d2[54]](_0x8292x21)})[_0xa0d2[21]](function(_0x8292x23){return _0x8292x11[_0xa0d2[18]](201)[_0xa0d2[17]](_0x8292x23)})[_0xa0d2[20]](function(_0x8292x12){console[_0xa0d2[71]](_0x8292x12);return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[90]]= function(_0x8292x13,_0x8292x11){if(_0x8292x13[_0xa0d2[58]][_0xa0d2[27]]){delete _0x8292x13[_0xa0d2[58]][_0xa0d2[27]]};return SmsAccount[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[27]])[_0xa0d2[21]](function(_0x8292x15){if(!_0x8292x15){return _0x8292x11[_0xa0d2[26]](404)};var _0x8292x28=_[_0xa0d2[50]](_0x8292x15,_0x8292x13[_0xa0d2[58]]);return _0x8292x28[_0xa0d2[92]]()})[_0xa0d2[21]](function(_0x8292x15){return _0x8292x11[_0xa0d2[18]](200)[_0xa0d2[17]](_0x8292x15)})[_0xa0d2[20]](sequelize.UniqueConstraintError,function(_0x8292x12){return Util[_0xa0d2[56]][_0xa0d2[55]](_0x8292x11,_0x8292x12)})[_0xa0d2[20]](function(_0x8292x12){console[_0xa0d2[57]](_0xa0d2[91],_0x8292x12);return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[93]]= function(_0x8292x13,_0x8292x11){if(_0x8292x13[_0xa0d2[58]][_0xa0d2[27]]){delete _0x8292x13[_0xa0d2[58]][_0xa0d2[27]]};return SmsDisposition[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[94]])[_0xa0d2[21]](function(_0x8292x2a){if(!_0x8292x2a){return _0x8292x11[_0xa0d2[26]](404)};var _0x8292x28=_[_0xa0d2[50]](_0x8292x2a,_0x8292x13[_0xa0d2[58]]);return _0x8292x28[_0xa0d2[92]]()})[_0xa0d2[21]](function(_0x8292x29){return _0x8292x11[_0xa0d2[18]](200)[_0xa0d2[17]](_0x8292x29)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[95]]= function(_0x8292x13,_0x8292x11){return SmsMessage[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[98]])[_0xa0d2[21]](function(_0x8292x23){if(!_0x8292x23){return _0x8292x11[_0xa0d2[26]](404)};var _0x8292x28=_[_0xa0d2[50]](_0x8292x23,{status:_[_0xa0d2[96]](_0x8292x13[_0xa0d2[58]].MessageStatus),errorcode:_0x8292x13[_0xa0d2[58]][_0xa0d2[97]]});return _0x8292x28[_0xa0d2[92]]()})[_0xa0d2[21]](function(_0x8292x23){return _0x8292x11[_0xa0d2[18]](200)[_0xa0d2[17]](_0x8292x23)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[99]]= function(_0x8292x13,_0x8292x11){return SmsMessage[_0xa0d2[102]]({where:{skebby_message_id:_0x8292x13[_0xa0d2[58]][_0xa0d2[101]]}})[_0xa0d2[21]](function(_0x8292x23){if(!_0x8292x23){return _0x8292x11[_0xa0d2[26]](404)};var _0x8292x28=_[_0xa0d2[50]](_0x8292x23,{status:_0x8292x13[_0xa0d2[58]][_0xa0d2[18]],errorcode:_0x8292x13[_0xa0d2[58]][_0xa0d2[100]]});return _0x8292x28[_0xa0d2[92]]()})[_0xa0d2[21]](function(_0x8292x23){return _0x8292x11[_0xa0d2[18]](200)[_0xa0d2[17]](_0x8292x23)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[103]]= function(_0x8292x13,_0x8292x11){var _0x8292x2b=0;var _0x8292x2c=_0x8292x13[_0xa0d2[58]];_0x8292x2c[_0xa0d2[106]](function(_0x8292x2d){delete _0x8292x2d[_0xa0d2[27]];delete _0x8292x2d[_0xa0d2[83]];delete _0x8292x2d[_0xa0d2[104]];_0x8292x2d[_0xa0d2[105]]= ++_0x8292x2b});return sequelize[_0xa0d2[109]](function(_0x8292x2f){return SmsApplication[_0xa0d2[108]]({where:{SmsAccountId:_0x8292x13[_0xa0d2[28]][_0xa0d2[27]]},individualHooks:true,transaction:_0x8292x2f})[_0xa0d2[21]](function(_0x8292x30){return SmsApplication[_0xa0d2[107]](_0x8292x2c,{individualHooks:true,transaction:_0x8292x2f})})})[_0xa0d2[21]](function(_0x8292x2e){return _0x8292x11[_0xa0d2[18]](200)[_0xa0d2[17]]({count:_0x8292x2e[_0xa0d2[45]],rows:_0x8292x2e})})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[108]]= function(_0x8292x13,_0x8292x11){return SmsAccount[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[27]])[_0xa0d2[21]](function(_0x8292x15){if(!_0x8292x15){return _0x8292x11[_0xa0d2[26]](404)};return _0x8292x15[_0xa0d2[108]]()})[_0xa0d2[21]](function(){return _0x8292x11[_0xa0d2[26]](204)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[110]]= function(_0x8292x13,_0x8292x11,_0x8292x1a){return SmsApplication[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[111]])[_0xa0d2[21]](function(_0x8292x30){if(!_0x8292x30){return _0x8292x11[_0xa0d2[26]](404)};return _0x8292x30[_0xa0d2[108]]()})[_0xa0d2[21]](function(){return _0x8292x11[_0xa0d2[26]](204)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[112]]= function(_0x8292x13,_0x8292x11,_0x8292x1a){return SmsDisposition[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[94]])[_0xa0d2[21]](function(_0x8292x1d){if(!_0x8292x1d){return _0x8292x11[_0xa0d2[26]](404)};return _0x8292x1d[_0xa0d2[108]]()})[_0xa0d2[21]](function(){return _0x8292x11[_0xa0d2[26]](204)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[113]]= function(_0x8292x13,_0x8292x11){return SmsApplication[_0xa0d2[108]]({where:{id:_0x8292x13[_0xa0d2[22]][_0xa0d2[114]]},individualHooks:true})[_0xa0d2[21]](function(){return _0x8292x11[_0xa0d2[26]](204)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[115]]= function(_0x8292x13,_0x8292x11,_0x8292x1a){var _0x8292x31={where:{SmsAccountId:_0x8292x13[_0xa0d2[28]][_0xa0d2[27]],$and:[]},attributes:[_0xa0d2[27],_0xa0d2[116],_0xa0d2[104],_0xa0d2[117],_0xa0d2[118],_0xa0d2[119],_0xa0d2[120]],include:[]};if(_0x8292x13[_0xa0d2[22]]){if(_0x8292x13[_0xa0d2[22]][_0xa0d2[117]]){if(_[_0xa0d2[121]](_0x8292x13[_0xa0d2[22]][_0xa0d2[117]])){for(var _0x8292x32=0;_0x8292x32< _0x8292x13[_0xa0d2[22]][_0xa0d2[117]][_0xa0d2[45]];_0x8292x32++){_0x8292x31[_0xa0d2[125]][_0xa0d2[124]][_0xa0d2[123]]({tags:{$like:_0xa0d2[122]+ _0x8292x13[_0xa0d2[22]][_0xa0d2[117]][_0x8292x32]+ _0xa0d2[122]}})}}else {_0x8292x31[_0xa0d2[125]][_0xa0d2[124]][_0xa0d2[123]]({tags:{$like:_0xa0d2[122]+ _0x8292x13[_0xa0d2[22]][_0xa0d2[117]]+ _0xa0d2[122]}})};delete _0x8292x13[_0xa0d2[22]][_0xa0d2[117]]};_[_0xa0d2[50]](_0x8292x31[_0xa0d2[125]],_0x8292x13[_0xa0d2[22]])};switch(_0x8292x13[_0xa0d2[62]][_0xa0d2[134]]){case _0xa0d2[127]:_0x8292x31[_0xa0d2[126]][_0xa0d2[123]]({model:User,attributes:[_0xa0d2[27]]});var _0x8292x33;var _0x8292x34;var _0x8292x35;return User[_0xa0d2[29]](_0x8292x13[_0xa0d2[62]][_0xa0d2[27]])[_0xa0d2[21]](function(_0x8292x39){if(_0x8292x39){return _0x8292x39[_0xa0d2[133]]()}else {return []}})[_0xa0d2[21]](function(_0x8292x38){_0x8292x34= _[_0xa0d2[129]](_0x8292x38,_0xa0d2[27]);return SmsAccount[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[27]])})[_0xa0d2[21]](function(_0x8292x37){return _0x8292x37[_0xa0d2[51]]({where:{$or:[{app:_0xa0d2[130]},{app:_0xa0d2[127]}]}})})[_0xa0d2[21]](function(_0x8292x2c){_0x8292x33= _[_0xa0d2[129]](_[_0xa0d2[128]](_0x8292x2c,{"\x61\x70\x70":_0xa0d2[127]}),_0xa0d2[61]);_0x8292x35= _[_0xa0d2[129]](_[_0xa0d2[128]](_0x8292x2c,{"\x61\x70\x70":_0xa0d2[130]}),_0xa0d2[131]);if(_[_0xa0d2[132]](_0x8292x34,_0x8292x35)[_0xa0d2[45]]|| _[_0xa0d2[132]](_0x8292x33,[_0x8292x13[_0xa0d2[62]][_0xa0d2[27]]])[_0xa0d2[45]]){return SmsRoom[_0xa0d2[85]](_0x8292x31)[_0xa0d2[21]](function(_0x8292x36){return _0x8292x11[_0xa0d2[18]](200)[_0xa0d2[17]](_0x8292x36)})[_0xa0d2[20]](function(_0x8292x12){console[_0xa0d2[71]](_0x8292x12);return handleError(_0x8292x11,_0x8292x12)})}else {return _0x8292x11[_0xa0d2[18]](200)[_0xa0d2[17]]([])}})[_0xa0d2[20]](function(_0x8292x12){console[_0xa0d2[71]](_0x8292x12)});default:return SmsRoom[_0xa0d2[85]](_0x8292x31)[_0xa0d2[21]](function(_0x8292x36){return _0x8292x11[_0xa0d2[18]](200)[_0xa0d2[17]](_0x8292x36)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})}};exports[_0xa0d2[135]]= function(_0x8292x13,_0x8292x11,_0x8292x1a){return SmsApplication[_0xa0d2[137]](_0xa0d2[105],{where:{SmsAccountId:_0x8292x13[_0xa0d2[28]][_0xa0d2[27]]}})[_0xa0d2[21]](function(_0x8292x3a){_0x8292x13[_0xa0d2[58]][_0xa0d2[105]]= _0x8292x3a?++_0x8292x3a:1;_0x8292x13[_0xa0d2[58]][_0xa0d2[60]]= _0x8292x13[_0xa0d2[28]][_0xa0d2[27]];return SmsApplication[_0xa0d2[54]](_0x8292x13[_0xa0d2[58]])})[_0xa0d2[21]](function(_0x8292x30){return _0x8292x11[_0xa0d2[18]](201)[_0xa0d2[17]](_0x8292x30)})[_0xa0d2[20]](function(_0x8292x12){console[_0xa0d2[57]](_0xa0d2[136],_0x8292x12);return handleError(_0x8292x11,_0x8292x12)})};exports[_0xa0d2[138]]= function(_0x8292x13,_0x8292x11){if(_0x8292x13[_0xa0d2[58]][_0xa0d2[27]]){delete _0x8292x13[_0xa0d2[58]][_0xa0d2[27]]};return SmsApplication[_0xa0d2[29]](_0x8292x13[_0xa0d2[28]][_0xa0d2[111]])[_0xa0d2[21]](function(_0x8292x30){if(!_0x8292x30){return _0x8292x11[_0xa0d2[26]](404)};var _0x8292x28=_[_0xa0d2[50]](_0x8292x30,_0x8292x13[_0xa0d2[58]]);return _0x8292x28[_0xa0d2[92]]()})[_0xa0d2[21]](function(_0x8292x30){return _0x8292x11[_0xa0d2[18]](200)[_0xa0d2[17]](_0x8292x30)})[_0xa0d2[20]](function(_0x8292x12){return handleError(_0x8292x11,_0x8292x12)})} \ No newline at end of file diff --git a/server/api/sms_account/sms_account.events.js b/server/api/sms_account/sms_account.events.js index 932ef04..b3569cb 100644 --- a/server/api/sms_account/sms_account.events.js +++ b/server/api/sms_account/sms_account.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SmsAccount = require('../../models').SmsAccount; - -var SmsAccountEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SmsAccountEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SmsAccount.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SmsAccountEvents.emit(event + ':' + doc._id, doc); - SmsAccountEvents.emit(event, doc); - done(null); - } -} - -module.exports = SmsAccountEvents; +var _0xe789=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe789[0];const EventEmitter=require(_0xe789[1]);const SmsAccount=require(_0xe789[3])[_0xe789[2]];var SmsAccountEvents= new EventEmitter();SmsAccountEvents[_0xe789[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe789[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe789[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe789[6]};for(var e in events){var event=events[e];SmsAccount[_0xe789[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x2dc8x8,_0x2dc8x9,_0x2dc8xa){SmsAccountEvents[_0xe789[10]](event+ _0xe789[8]+ _0x2dc8x8[_0xe789[9]],_0x2dc8x8);SmsAccountEvents[_0xe789[10]](event,_0x2dc8x8);_0x2dc8xa(null)}}module[_0xe789[11]]= SmsAccountEvents \ No newline at end of file diff --git a/server/api/sms_account/sms_account.socket.js b/server/api/sms_account/sms_account.socket.js index 4aa38a4..15e8392 100644 --- a/server/api/sms_account/sms_account.socket.js +++ b/server/api/sms_account/sms_account.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SmsAccountEvents = require('./sms_account.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('sms_account:' + event, socket); - - SmsAccountEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SmsAccountEvents.removeListener(event, listener); - }; -} +var _0x3973=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3973[0];const SmsAccountEvents=require(_0x3973[1]);var events=[_0x3973[2],_0x3973[3]];exports[_0x3973[4]]= function(_0x7764x3){for(var _0x7764x4=0,_0x7764x5=events[_0x3973[5]];_0x7764x4< _0x7764x5;_0x7764x4++){var _0x7764x6=events[_0x7764x4];var _0x7764x7=createListener(_0x3973[6]+ _0x7764x6,_0x7764x3);SmsAccountEvents[_0x3973[7]](_0x7764x6,_0x7764x7);_0x7764x3[_0x3973[7]](_0x3973[8],removeListener(_0x7764x6,_0x7764x7))}};function createListener(_0x7764x6,_0x7764x3){return function(_0x7764x9){_0x7764x3[_0x3973[9]](_0x7764x6,_0x7764x9)}}function removeListener(_0x7764x6,_0x7764x7){return function(){SmsAccountEvents[_0x3973[10]](_0x7764x6,_0x7764x7)}} \ No newline at end of file diff --git a/server/api/sms_application/index.js b/server/api/sms_application/index.js index fd4d4f1..d964560 100644 --- a/server/api/sms_application/index.js +++ b/server/api/sms_application/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sms_application.controller'); -var license = require('../../config/license/license.service'); -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.update); -router.delete('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.destroy); - -module.exports = router; +var _0xaddf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x53\x6D\x73","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xaddf[0];var express=require(_0xaddf[1]);var auth=require(_0xaddf[2]);var controller=require(_0xaddf[3]);var license=require(_0xaddf[4]);var router=express.Router();router[_0xaddf[11]](_0xaddf[5],auth[_0xaddf[6]](),license[_0xaddf[7]](),auth[_0xaddf[9]]([11],[_0xaddf[8]]),controller[_0xaddf[10]]);router[_0xaddf[11]](_0xaddf[12],auth[_0xaddf[6]](),license[_0xaddf[7]](),auth[_0xaddf[9]]([11],[_0xaddf[8]]),controller[_0xaddf[13]]);router[_0xaddf[15]](_0xaddf[5],auth[_0xaddf[6]](),license[_0xaddf[7]](),auth[_0xaddf[9]]([11],[_0xaddf[8]]),controller[_0xaddf[14]]);router[_0xaddf[17]](_0xaddf[12],auth[_0xaddf[6]](),license[_0xaddf[7]](),auth[_0xaddf[9]]([11],[_0xaddf[8]]),controller[_0xaddf[16]]);router[_0xaddf[19]](_0xaddf[12],auth[_0xaddf[6]](),license[_0xaddf[7]](),auth[_0xaddf[9]]([11],[_0xaddf[8]]),controller[_0xaddf[18]]);module[_0xaddf[20]]= router \ No newline at end of file diff --git a/server/api/sms_application/sms_application.controller.js b/server/api/sms_application/sms_application.controller.js index e1abd0b..83d3ab0 100644 --- a/server/api/sms_application/sms_application.controller.js +++ b/server/api/sms_application/sms_application.controller.js @@ -1,130 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sms/applications -> index - * POST /api/sms/applications -> create - * GET /api/sms/applications/:id -> show - * PUT /api/sms/applications/:id -> update - * DELETE /api/sms/applications/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var SmsApplication = require('../../models').SmsApplication; - - -function handleError(res, err) { - return res.status(500).send(err); -} - -// Gets a list of SmsApplications -exports.index = function(req, res) { - return SmsApplication - .findAll({ - where: req.query, - order: 'priority', - include: [{ - all: true - }] - }) - .then(function(smsApplications) { - return res.status(200).send(smsApplications); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Gets a single SmsApplication from the DB -exports.show = function(req, res) { - return SmsApplication - .findById(req.params.id, { - include: [{ - all: true - }] - }) - .then(function(smsApplication) { - if (!smsApplication) { - return res.sendStatus(404); - } - return res.send(smsApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); - -} - -// Creates a new SmsApplication in the DB -exports.create = function(req, res) { - - return SmsApplication - .max('priority', { - where: { - SmsAccountId: req.body.SmsAccountId - } - }) - .then(function(max) { - // SET PRIORITY - req.body.priority = max ? ++max : 1; - return SmsApplication - .create(req.body) - }) - .then(function(smsApplication) { - return res.status(201).send(smsApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); - - -} - -// Updates an existing SmsApplication in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SmsApplication - .findById(req.params.id) - .then(function(smsApplication) { - if (!smsApplication) { - return res.sendStatus(404); - } - var updated = _.merge(smsApplication, req.body); - return updated - .save() - - }) - .then(function(smsApplication) { - return res.status(200).send(smsApplication); - }) - .catch(function(err) { - return handleError(res, err); - }); - -} - - -// Deletes a SmsApplication from the DB -exports.destroy = function(req, res) { - return SmsApplication - .findById(req.params.id) - .then(function(smsApplication) { - if (!smsApplication) { - return res.sendStatus(404); - } - return smsApplication - .destroy() - - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -} +var _0xcf00=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x70\x72\x69\x6F\x72\x69\x74\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x78","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xcf00[0];var _=require(_0xcf00[1]);var Util=require(_0xcf00[2]);var SmsApplication=require(_0xcf00[4])[_0xcf00[3]];function handleError(_0xe1dax5,_0xe1dax6){return _0xe1dax5[_0xcf00[6]](500)[_0xcf00[5]](_0xe1dax6)}exports[_0xcf00[7]]= function(_0xe1dax7,_0xe1dax5){return SmsApplication[_0xcf00[12]]({where:_0xe1dax7[_0xcf00[10]],order:_0xcf00[11],include:[{all:true}]})[_0xcf00[9]](function(_0xe1dax8){return _0xe1dax5[_0xcf00[6]](200)[_0xcf00[5]](_0xe1dax8)})[_0xcf00[8]](function(_0xe1dax6){return handleError(_0xe1dax5,_0xe1dax6)})};exports[_0xcf00[13]]= function(_0xe1dax7,_0xe1dax5){return SmsApplication[_0xcf00[17]](_0xe1dax7[_0xcf00[16]][_0xcf00[15]],{include:[{all:true}]})[_0xcf00[9]](function(_0xe1dax9){if(!_0xe1dax9){return _0xe1dax5[_0xcf00[14]](404)};return _0xe1dax5[_0xcf00[5]](_0xe1dax9)})[_0xcf00[8]](function(_0xe1dax6){return handleError(_0xe1dax5,_0xe1dax6)})};exports[_0xcf00[18]]= function(_0xe1dax7,_0xe1dax5){return SmsApplication[_0xcf00[21]](_0xcf00[11],{where:{SmsAccountId:_0xe1dax7[_0xcf00[19]][_0xcf00[20]]}})[_0xcf00[9]](function(_0xe1daxa){_0xe1dax7[_0xcf00[19]][_0xcf00[11]]= _0xe1daxa?++_0xe1daxa:1;return SmsApplication[_0xcf00[18]](_0xe1dax7[_0xcf00[19]])})[_0xcf00[9]](function(_0xe1dax9){return _0xe1dax5[_0xcf00[6]](201)[_0xcf00[5]](_0xe1dax9)})[_0xcf00[8]](function(_0xe1dax6){return handleError(_0xe1dax5,_0xe1dax6)})};exports[_0xcf00[22]]= function(_0xe1dax7,_0xe1dax5){if(_0xe1dax7[_0xcf00[19]][_0xcf00[15]]){delete _0xe1dax7[_0xcf00[19]][_0xcf00[15]]};return SmsApplication[_0xcf00[17]](_0xe1dax7[_0xcf00[16]][_0xcf00[15]])[_0xcf00[9]](function(_0xe1dax9){if(!_0xe1dax9){return _0xe1dax5[_0xcf00[14]](404)};var _0xe1daxb=_[_0xcf00[23]](_0xe1dax9,_0xe1dax7[_0xcf00[19]]);return _0xe1daxb[_0xcf00[24]]()})[_0xcf00[9]](function(_0xe1dax9){return _0xe1dax5[_0xcf00[6]](200)[_0xcf00[5]](_0xe1dax9)})[_0xcf00[8]](function(_0xe1dax6){return handleError(_0xe1dax5,_0xe1dax6)})};exports[_0xcf00[25]]= function(_0xe1dax7,_0xe1dax5){return SmsApplication[_0xcf00[17]](_0xe1dax7[_0xcf00[16]][_0xcf00[15]])[_0xcf00[9]](function(_0xe1dax9){if(!_0xe1dax9){return _0xe1dax5[_0xcf00[14]](404)};return _0xe1dax9[_0xcf00[25]]()})[_0xcf00[9]](function(){return _0xe1dax5[_0xcf00[14]](204)})[_0xcf00[8]](function(_0xe1dax6){return handleError(_0xe1dax5,_0xe1dax6)})} \ No newline at end of file diff --git a/server/api/sms_application/sms_application.events.js b/server/api/sms_application/sms_application.events.js index 5d95d05..c3cf01b 100644 --- a/server/api/sms_application/sms_application.events.js +++ b/server/api/sms_application/sms_application.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SmsApplication = require('../../models').SmsApplication; - -var SmsApplicationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SmsApplicationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SmsApplication.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SmsApplicationEvents.emit(event + ':' + doc._id, doc); - SmsApplicationEvents.emit(event, doc); - done(null); - } -} - -module.exports = SmsApplicationEvents; +var _0xdc29=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdc29[0];const EventEmitter=require(_0xdc29[1]);const SmsApplication=require(_0xdc29[3])[_0xdc29[2]];var SmsApplicationEvents= new EventEmitter();SmsApplicationEvents[_0xdc29[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdc29[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdc29[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdc29[6]};for(var e in events){var event=events[e];SmsApplication[_0xdc29[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6ed8x8,_0x6ed8x9,_0x6ed8xa){SmsApplicationEvents[_0xdc29[10]](event+ _0xdc29[8]+ _0x6ed8x8[_0xdc29[9]],_0x6ed8x8);SmsApplicationEvents[_0xdc29[10]](event,_0x6ed8x8);_0x6ed8xa(null)}}module[_0xdc29[11]]= SmsApplicationEvents \ No newline at end of file diff --git a/server/api/sms_application/sms_application.socket.js b/server/api/sms_application/sms_application.socket.js index 9926f52..6939a87 100644 --- a/server/api/sms_application/sms_application.socket.js +++ b/server/api/sms_application/sms_application.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SmsApplicationEvents = require('./sms_application.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('sms_application:' + event, socket); - - SmsApplicationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SmsApplicationEvents.removeListener(event, listener); - }; -} +var _0xa0f6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xa0f6[0];const SmsApplicationEvents=require(_0xa0f6[1]);var events=[_0xa0f6[2],_0xa0f6[3]];exports[_0xa0f6[4]]= function(_0xeb4ax3){for(var _0xeb4ax4=0,_0xeb4ax5=events[_0xa0f6[5]];_0xeb4ax4< _0xeb4ax5;_0xeb4ax4++){var _0xeb4ax6=events[_0xeb4ax4];var _0xeb4ax7=createListener(_0xa0f6[6]+ _0xeb4ax6,_0xeb4ax3);SmsApplicationEvents[_0xa0f6[7]](_0xeb4ax6,_0xeb4ax7);_0xeb4ax3[_0xa0f6[7]](_0xa0f6[8],removeListener(_0xeb4ax6,_0xeb4ax7))}};function createListener(_0xeb4ax6,_0xeb4ax3){return function(_0xeb4ax9){_0xeb4ax3[_0xa0f6[9]](_0xeb4ax6,_0xeb4ax9)}}function removeListener(_0xeb4ax6,_0xeb4ax7){return function(){SmsApplicationEvents[_0xa0f6[10]](_0xeb4ax6,_0xeb4ax7)}} \ No newline at end of file diff --git a/server/api/sms_disposition/index.js b/server/api/sms_disposition/index.js index 6e1022b..480e2f5 100644 --- a/server/api/sms_disposition/index.js +++ b/server/api/sms_disposition/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./sms_disposition.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); -router.get('/:id', auth.isAuthenticated(), controller.show); -router.post('/', auth.isAuthenticated(), controller.create); -router.put('/:id', auth.isAuthenticated(), controller.update); -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - -module.exports = router; +var _0x71b2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x71b2[0];var express=require(_0x71b2[1]);var controller=require(_0x71b2[2]);var auth=require(_0x71b2[3]);var router=express.Router();router[_0x71b2[7]](_0x71b2[4],auth[_0x71b2[5]](),controller[_0x71b2[6]]);router[_0x71b2[7]](_0x71b2[8],auth[_0x71b2[5]](),controller[_0x71b2[9]]);router[_0x71b2[11]](_0x71b2[4],auth[_0x71b2[5]](),controller[_0x71b2[10]]);router[_0x71b2[13]](_0x71b2[8],auth[_0x71b2[5]](),controller[_0x71b2[12]]);router[_0x71b2[14]](_0x71b2[8],auth[_0x71b2[5]](),controller[_0x71b2[12]]);router[_0x71b2[16]](_0x71b2[8],auth[_0x71b2[5]](),controller[_0x71b2[15]]);module[_0x71b2[17]]= router \ No newline at end of file diff --git a/server/api/sms_disposition/sms_disposition.controller.js b/server/api/sms_disposition/sms_disposition.controller.js index 066dd7e..55f423c 100644 --- a/server/api/sms_disposition/sms_disposition.controller.js +++ b/server/api/sms_disposition/sms_disposition.controller.js @@ -1,95 +1 @@ -'use strict'; - - -var _ = require('lodash'); - -var SmsDisposition = require('../../models').SmsDisposition; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }) - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }) - } - }; -} - -// Gets a list of SmsDispositions -exports.index = function(req, res) { - SmsDisposition.findAndCountAll() - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SmsDisposition from the DB -exports.show = function(req, res) { - SmsDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new SmsDisposition in the DB -exports.create = function(req, res) { - SmsDisposition.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing SmsDisposition in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - SmsDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SmsDisposition from the DB -exports.destroy = function(req, res) { - SmsDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0x58c3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x58c3[0];var _=require(_0x58c3[1]);var SmsDisposition=require(_0x58c3[3])[_0x58c3[2]];function handleError(_0x37adx4,_0x37adx5){_0x37adx5= _0x37adx5|| 500;return function(_0x37adx6){_0x37adx4[_0x58c3[5]](_0x37adx5)[_0x58c3[4]](_0x37adx6)}}function responseWithResult(_0x37adx4,_0x37adx5){_0x37adx5= _0x37adx5|| 200;return function(_0x37adx8){if(_0x37adx8){_0x37adx4[_0x58c3[5]](_0x37adx5)[_0x58c3[6]](_0x37adx8)}}}function handleEntityNotFound(_0x37adx4){return function(_0x37adx8){if(!_0x37adx8){_0x37adx4[_0x58c3[5]](404)[_0x58c3[7]]();return null};return _0x37adx8}}function saveUpdates(_0x37adxb){return function(_0x37adx8){return _0x37adx8[_0x58c3[9]](_0x37adxb)[_0x58c3[8]](function(_0x37adxc){return _0x37adxc})}}function removeEntity(_0x37adx4){return function(_0x37adx8){if(_0x37adx8){return _0x37adx8[_0x58c3[10]]()[_0x58c3[8]](function(){_0x37adx4[_0x58c3[5]](204)[_0x58c3[7]]()})}}}exports[_0x58c3[11]]= function(_0x37adxe,_0x37adx4){SmsDisposition[_0x58c3[13]]()[_0x58c3[8]](responseWithResult(_0x37adx4))[_0x58c3[12]](handleError(_0x37adx4))};exports[_0x58c3[14]]= function(_0x37adxe,_0x37adx4){SmsDisposition[_0x58c3[17]](_0x37adxe[_0x58c3[16]][_0x58c3[15]])[_0x58c3[8]](handleEntityNotFound(_0x37adx4))[_0x58c3[8]](responseWithResult(_0x37adx4))[_0x58c3[12]](handleError(_0x37adx4))};exports[_0x58c3[18]]= function(_0x37adxe,_0x37adx4){SmsDisposition[_0x58c3[18]](_0x37adxe[_0x58c3[19]])[_0x58c3[8]](responseWithResult(_0x37adx4,201))[_0x58c3[12]](handleError(_0x37adx4))};exports[_0x58c3[20]]= function(_0x37adxe,_0x37adx4){if(_0x37adxe[_0x58c3[19]][_0x58c3[15]]){delete _0x37adxe[_0x58c3[19]][_0x58c3[15]]};SmsDisposition[_0x58c3[17]](_0x37adxe[_0x58c3[16]][_0x58c3[15]])[_0x58c3[8]](handleEntityNotFound(_0x37adx4))[_0x58c3[8]](saveUpdates(_0x37adxe[_0x58c3[19]]))[_0x58c3[8]](responseWithResult(_0x37adx4))[_0x58c3[12]](handleError(_0x37adx4))};exports[_0x58c3[10]]= function(_0x37adxe,_0x37adx4){SmsDisposition[_0x58c3[17]](_0x37adxe[_0x58c3[16]][_0x58c3[15]])[_0x58c3[8]](handleEntityNotFound(_0x37adx4))[_0x58c3[8]](removeEntity(_0x37adx4))[_0x58c3[12]](handleError(_0x37adx4))} \ No newline at end of file diff --git a/server/api/sms_disposition/sms_disposition.events.js b/server/api/sms_disposition/sms_disposition.events.js index 5f2d801..b935a7d 100644 --- a/server/api/sms_disposition/sms_disposition.events.js +++ b/server/api/sms_disposition/sms_disposition.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SmsDisposition = require('../../models').SmsDisposition; - -var SmsDispositionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SmsDispositionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SmsDisposition.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SmsDispositionEvents.emit(event + ':' + doc._id, doc); - SmsDispositionEvents.emit(event, doc); - done(null); - } -} - -module.exports = SmsDispositionEvents; +var _0x9c39=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9c39[0];const EventEmitter=require(_0x9c39[1]);const SmsDisposition=require(_0x9c39[3])[_0x9c39[2]];var SmsDispositionEvents= new EventEmitter();SmsDispositionEvents[_0x9c39[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9c39[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9c39[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9c39[6]};for(var e in events){var event=events[e];SmsDisposition[_0x9c39[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4894x8,_0x4894x9,_0x4894xa){SmsDispositionEvents[_0x9c39[10]](event+ _0x9c39[8]+ _0x4894x8[_0x9c39[9]],_0x4894x8);SmsDispositionEvents[_0x9c39[10]](event,_0x4894x8);_0x4894xa(null)}}module[_0x9c39[11]]= SmsDispositionEvents \ No newline at end of file diff --git a/server/api/sms_disposition/sms_disposition.socket.js b/server/api/sms_disposition/sms_disposition.socket.js index 577c85f..8369385 100644 --- a/server/api/sms_disposition/sms_disposition.socket.js +++ b/server/api/sms_disposition/sms_disposition.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SmsDispositionEvents = require('./sms_disposition.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('sms_disposition:' + event, socket); - - SmsDispositionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SmsDispositionEvents.removeListener(event, listener); - }; -} +var _0x873b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x873b[0];const SmsDispositionEvents=require(_0x873b[1]);var events=[_0x873b[2],_0x873b[3]];exports[_0x873b[4]]= function(_0x3f85x3){for(var _0x3f85x4=0,_0x3f85x5=events[_0x873b[5]];_0x3f85x4< _0x3f85x5;_0x3f85x4++){var _0x3f85x6=events[_0x3f85x4];var _0x3f85x7=createListener(_0x873b[6]+ _0x3f85x6,_0x3f85x3);SmsDispositionEvents[_0x873b[7]](_0x3f85x6,_0x3f85x7);_0x3f85x3[_0x873b[7]](_0x873b[8],removeListener(_0x3f85x6,_0x3f85x7))}};function createListener(_0x3f85x6,_0x3f85x3){return function(_0x3f85x9){_0x3f85x3[_0x873b[9]](_0x3f85x6,_0x3f85x9)}}function removeListener(_0x3f85x6,_0x3f85x7){return function(){SmsDispositionEvents[_0x873b[10]](_0x3f85x6,_0x3f85x7)}} \ No newline at end of file diff --git a/server/api/sms_message/index.js b/server/api/sms_message/index.js index 5c0b3d0..2a3b25c 100644 --- a/server/api/sms_message/index.js +++ b/server/api/sms_message/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sms_message.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.index); -router.get('/describe', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.describe); -router.get('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin', 'agent']), controller.show); -router.post('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.update); -router.delete('/:id', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.destroy); -router.delete('/', auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.bulkDelete); - -module.exports = router; +var _0x7470=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x53\x6D\x73","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x61\x67\x65\x6E\x74","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x7470[0];var express=require(_0x7470[1]);var auth=require(_0x7470[2]);var controller=require(_0x7470[3]);var license=require(_0x7470[4]);var router=express.Router();router[_0x7470[11]](_0x7470[5],auth[_0x7470[6]](),license[_0x7470[7]](),auth[_0x7470[9]]([11],[_0x7470[8]]),controller[_0x7470[10]]);router[_0x7470[11]](_0x7470[12],auth[_0x7470[6]](),license[_0x7470[7]](),auth[_0x7470[9]]([11],[_0x7470[8]]),controller[_0x7470[13]]);router[_0x7470[11]](_0x7470[14],auth[_0x7470[6]](),license[_0x7470[7]](),auth[_0x7470[9]]([11],[_0x7470[8],_0x7470[15]]),controller[_0x7470[16]]);router[_0x7470[18]](_0x7470[5],auth[_0x7470[6]](),license[_0x7470[7]](),auth[_0x7470[9]]([11],[_0x7470[8]]),controller[_0x7470[17]]);router[_0x7470[20]](_0x7470[14],auth[_0x7470[6]](),license[_0x7470[7]](),auth[_0x7470[9]]([11],[_0x7470[8]]),controller[_0x7470[19]]);router[_0x7470[22]](_0x7470[14],auth[_0x7470[6]](),license[_0x7470[7]](),auth[_0x7470[9]]([11],[_0x7470[8]]),controller[_0x7470[21]]);router[_0x7470[22]](_0x7470[5],auth[_0x7470[6]](),license[_0x7470[7]](),auth[_0x7470[9]]([11],[_0x7470[8]]),controller[_0x7470[23]]);module[_0x7470[24]]= router \ No newline at end of file diff --git a/server/api/sms_message/sms_message.controller.js b/server/api/sms_message/sms_message.controller.js index d1dd899..1603e9c 100644 --- a/server/api/sms_message/sms_message.controller.js +++ b/server/api/sms_message/sms_message.controller.js @@ -1,170 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sms/messages -> index - * POST /api/sms/messages -> create - * GET /api/sms/messages/:id -> show - * PUT /api/sms/messages/:id -> update - * DELETE /api/sms/messages/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var SmsMessage = require('../../models').SmsMessage; -var SmsRoom = require('../../models').SmsRoom; -var User = require('../../models').User; - - -function handleError(res, err) { - return res.status(500).send(err); -} - -// Gets a list of SmsMessages -exports.index = function(req, res) { - var params = { - order: 'createdAt DESC', - include: [{ - all: true, - include: [{ - all: true - }] - }] - }; - - switch (req.user.role) { - case 'admin': - params.where = req.query; - break; - case 'agent': - break; - default: - } - - return SmsMessage - .findAll(params) - .then(function(sms_messages) { - return res.status(200).send(sms_messages); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.describe = function(req, res) { - return SmsMessage - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Gets a single SmsMessage from the DB -exports.show = function(req, res) { - return SmsMessage - .findById(req.params.id, { - include: [{ - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }) - .then(function(smsMessage) { - if (!smsMessage) { - return res.sendStatus(404); - } - return res.send(smsMessage); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Creates a new SmsMessage in the DB -exports.create = function(req, res) { - req.body.UserId = req.user.id; - return SmsMessage - .create(req.body) - .then(function(smsMessage) { - return res.status(201).send(smsMessage); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Updates an existing SmsMessage in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SmsMessage - .findById(req.params.id, { - include: [{ - all: true - }] - }) - .then(function(smsMessage) { - if (!smsMessage) { - return res.sendStatus(404); - } - var updated = _.merge(smsMessage, req.body); - return updated - .save(); - }) - .then(function(updated) { - return res.status(200).send(updated); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Deletes a SmsMessage from the DB -exports.destroy = function(req, res) { - return SmsMessage - .findById(req.params.id) - .then(function(smsMessage) { - if (!smsMessage) { - return res.sendStatus(404); - } - return smsMessage - .destroy(); - }).then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.bulkDelete = function(req, res) { - return SmsMessage - .bulkUpdate({ - where: { - id: { - $in: req.body.id - } - }, - attributes: { - directory: 'TRASH' - } - }) - .then(function(smsMessage) { - if (!smsMessage) { - return res.sendStatus(404); - } - return smsMessage - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; +var _0x56fe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x77\x68\x65\x72\x65","\x71\x75\x65\x72\x79","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x65\x73\x63\x72\x69\x62\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x49\x64","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x6C\x65\x74\x65","\x54\x52\x41\x53\x48","\x62\x75\x6C\x6B\x55\x70\x64\x61\x74\x65"];_0x56fe[0];var _=require(_0x56fe[1]);var Util=require(_0x56fe[2]);var SmsMessage=require(_0x56fe[4])[_0x56fe[3]];var SmsRoom=require(_0x56fe[4])[_0x56fe[5]];var User=require(_0x56fe[4])[_0x56fe[6]];function handleError(_0x6980x7,_0x6980x8){return _0x6980x7[_0x56fe[8]](500)[_0x56fe[7]](_0x6980x8)}exports[_0x56fe[9]]= function(_0x6980x9,_0x6980x7){var _0x6980xa={order:_0x56fe[10],include:[{all:true,include:[{all:true}]}]};switch(_0x6980x9[_0x56fe[16]][_0x56fe[15]]){case _0x56fe[13]:_0x6980xa[_0x56fe[11]]= _0x6980x9[_0x56fe[12]];break;case _0x56fe[14]:break;default:};return SmsMessage[_0x56fe[19]](_0x6980xa)[_0x56fe[18]](function(_0x6980xb){return _0x6980x7[_0x56fe[8]](200)[_0x56fe[7]](_0x6980xb)})[_0x56fe[17]](function(_0x6980x8){return handleError(_0x6980x7,_0x6980x8)})};exports[_0x56fe[20]]= function(_0x6980x9,_0x6980x7){return SmsMessage[_0x56fe[20]]()[_0x56fe[18]](function(_0x6980xc){return _0x6980x7[_0x56fe[8]](200)[_0x56fe[7]](_0x6980xc)})[_0x56fe[17]](function(_0x6980x8){return handleError(_0x6980x7,_0x6980x8)})};exports[_0x56fe[21]]= function(_0x6980x9,_0x6980x7){return SmsMessage[_0x56fe[28]](_0x6980x9[_0x56fe[24]][_0x56fe[23]],{include:[{model:User,attributes:[_0x56fe[23],_0x56fe[25],_0x56fe[26],_0x56fe[27]]}]})[_0x56fe[18]](function(_0x6980xd){if(!_0x6980xd){return _0x6980x7[_0x56fe[22]](404)};return _0x6980x7[_0x56fe[7]](_0x6980xd)})[_0x56fe[17]](function(_0x6980x8){return handleError(_0x6980x7,_0x6980x8)})};exports[_0x56fe[29]]= function(_0x6980x9,_0x6980x7){_0x6980x9[_0x56fe[31]][_0x56fe[30]]= _0x6980x9[_0x56fe[16]][_0x56fe[23]];return SmsMessage[_0x56fe[29]](_0x6980x9[_0x56fe[31]])[_0x56fe[18]](function(_0x6980xd){return _0x6980x7[_0x56fe[8]](201)[_0x56fe[7]](_0x6980xd)})[_0x56fe[17]](function(_0x6980x8){return handleError(_0x6980x7,_0x6980x8)})};exports[_0x56fe[32]]= function(_0x6980x9,_0x6980x7){if(_0x6980x9[_0x56fe[31]][_0x56fe[23]]){delete _0x6980x9[_0x56fe[31]][_0x56fe[23]]};return SmsMessage[_0x56fe[28]](_0x6980x9[_0x56fe[24]][_0x56fe[23]],{include:[{all:true}]})[_0x56fe[18]](function(_0x6980xd){if(!_0x6980xd){return _0x6980x7[_0x56fe[22]](404)};var _0x6980xe=_[_0x56fe[33]](_0x6980xd,_0x6980x9[_0x56fe[31]]);return _0x6980xe[_0x56fe[34]]()})[_0x56fe[18]](function(_0x6980xe){return _0x6980x7[_0x56fe[8]](200)[_0x56fe[7]](_0x6980xe)})[_0x56fe[17]](function(_0x6980x8){return handleError(_0x6980x7,_0x6980x8)})};exports[_0x56fe[35]]= function(_0x6980x9,_0x6980x7){return SmsMessage[_0x56fe[28]](_0x6980x9[_0x56fe[24]][_0x56fe[23]])[_0x56fe[18]](function(_0x6980xd){if(!_0x6980xd){return _0x6980x7[_0x56fe[22]](404)};return _0x6980xd[_0x56fe[35]]()})[_0x56fe[18]](function(){return _0x6980x7[_0x56fe[22]](204)})[_0x56fe[17]](function(_0x6980x8){return handleError(_0x6980x7,_0x6980x8)})};exports[_0x56fe[36]]= function(_0x6980x9,_0x6980x7){return SmsMessage[_0x56fe[38]]({where:{id:{$in:_0x6980x9[_0x56fe[31]][_0x56fe[23]]}},attributes:{directory:_0x56fe[37]}})[_0x56fe[18]](function(_0x6980xd){if(!_0x6980xd){return _0x6980x7[_0x56fe[22]](404)};return _0x6980xd[_0x56fe[35]]()})[_0x56fe[18]](function(){return _0x6980x7[_0x56fe[22]](204)})[_0x56fe[17]](function(_0x6980x8){return handleError(_0x6980x7,_0x6980x8)})} \ No newline at end of file diff --git a/server/api/sms_message/sms_message.events.js b/server/api/sms_message/sms_message.events.js index 21dd796..d9fd563 100644 --- a/server/api/sms_message/sms_message.events.js +++ b/server/api/sms_message/sms_message.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SmsMessage = require('../../models').SmsMessage; - -var SmsMessageEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SmsMessageEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SmsMessage.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SmsMessageEvents.emit(event + ':' + doc._id, doc); - SmsMessageEvents.emit(event, doc); - done(null); - } -} - -module.exports = SmsMessageEvents; +var _0x84b1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x84b1[0];const EventEmitter=require(_0x84b1[1]);const SmsMessage=require(_0x84b1[3])[_0x84b1[2]];var SmsMessageEvents= new EventEmitter();SmsMessageEvents[_0x84b1[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x84b1[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x84b1[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x84b1[7]};for(var e in events){var event=events[e];SmsMessage[_0x84b1[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x1a0cx8,_0x1a0cx9,_0x1a0cxa){SmsMessageEvents[_0x84b1[11]](event+ _0x84b1[9]+ _0x1a0cx8[_0x84b1[10]],_0x1a0cx8);SmsMessageEvents[_0x84b1[11]](event,_0x1a0cx8);_0x1a0cxa(null)}}module[_0x84b1[12]]= SmsMessageEvents \ No newline at end of file diff --git a/server/api/sms_message/sms_message.socket.js b/server/api/sms_message/sms_message.socket.js index 70931c8..801b704 100644 --- a/server/api/sms_message/sms_message.socket.js +++ b/server/api/sms_message/sms_message.socket.js @@ -1,47 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SmsMessageEvents = require('./sms_message.events'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('sms_message:' + event, socket); - - SmsMessageEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'sms_message:save': - socket.emit(event, doc); - break; - case 'sms_message:update': - if (doc.changed('status')) { - socket.emit(event, doc); - } - break; - case 'sms_message:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - SmsMessageEvents.removeListener(event, listener); - }; -} +var _0x44bc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x73\x61\x76\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x75\x70\x64\x61\x74\x65","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x44bc[0];const SmsMessageEvents=require(_0x44bc[1]);var events=[_0x44bc[2],_0x44bc[3],_0x44bc[4]];exports[_0x44bc[5]]= function(_0x3042x3){for(var _0x3042x4=0,_0x3042x5=events[_0x44bc[6]];_0x3042x4< _0x3042x5;_0x3042x4++){var _0x3042x6=events[_0x3042x4];var _0x3042x7=createListener(_0x44bc[7]+ _0x3042x6,_0x3042x3);SmsMessageEvents[_0x44bc[8]](_0x3042x6,_0x3042x7);_0x3042x3[_0x44bc[8]](_0x44bc[9],removeListener(_0x3042x6,_0x3042x7))}};function createListener(_0x3042x6,_0x3042x3){return function(_0x3042x9){switch(_0x3042x6){case _0x44bc[11]:_0x3042x3[_0x44bc[10]](_0x3042x6,_0x3042x9);break;case _0x44bc[14]:if(_0x3042x9[_0x44bc[13]](_0x44bc[12])){_0x3042x3[_0x44bc[10]](_0x3042x6,_0x3042x9)};break;case _0x44bc[15]:_0x3042x3[_0x44bc[10]](_0x3042x6,_0x3042x9);break;default:}}}function removeListener(_0x3042x6,_0x3042x7){return function(){SmsMessageEvents[_0x44bc[16]](_0x3042x6,_0x3042x7)}} \ No newline at end of file diff --git a/server/api/sms_queue/index.js b/server/api/sms_queue/index.js index 2033118..716f278 100644 --- a/server/api/sms_queue/index.js +++ b/server/api/sms_queue/index.js @@ -1,21 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sms_queue.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.index); -router.get('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.show); -router.get('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasModule([11], ['admin']), controller.showAgents); -router.post('/', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.create); -router.post('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.addAgents); -router.put('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.update); -router.patch('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.update); -router.delete('/:id', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.destroy); -router.delete('/:id/agents', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.removeAgents); -router.delete('/', license.isValidDate(), auth.isAuthenticated(), license.hasSms(), auth.hasRole('admin'), controller.bulkDestroy); - -module.exports = router; +var _0x932b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x53\x6D\x73","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x68\x61\x73\x52\x6F\x6C\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x932b[0];var express=require(_0x932b[1]);var auth=require(_0x932b[2]);var controller=require(_0x932b[3]);var license=require(_0x932b[4]);var router=express.Router();router[_0x932b[12]](_0x932b[5],license[_0x932b[6]](),auth[_0x932b[7]](),license[_0x932b[8]](),auth[_0x932b[10]]([11],[_0x932b[9]]),controller[_0x932b[11]]);router[_0x932b[12]](_0x932b[13],license[_0x932b[6]](),auth[_0x932b[7]](),license[_0x932b[8]](),auth[_0x932b[10]]([11],[_0x932b[9]]),controller[_0x932b[14]]);router[_0x932b[12]](_0x932b[15],license[_0x932b[6]](),auth[_0x932b[7]](),license[_0x932b[8]](),auth[_0x932b[10]]([11],[_0x932b[9]]),controller[_0x932b[16]]);router[_0x932b[19]](_0x932b[5],license[_0x932b[6]](),auth[_0x932b[7]](),license[_0x932b[8]](),auth[_0x932b[17]](_0x932b[9]),controller[_0x932b[18]]);router[_0x932b[19]](_0x932b[15],license[_0x932b[6]](),auth[_0x932b[7]](),license[_0x932b[8]](),auth[_0x932b[17]](_0x932b[9]),controller[_0x932b[20]]);router[_0x932b[22]](_0x932b[13],license[_0x932b[6]](),auth[_0x932b[7]](),license[_0x932b[8]](),auth[_0x932b[17]](_0x932b[9]),controller[_0x932b[21]]);router[_0x932b[23]](_0x932b[13],license[_0x932b[6]](),auth[_0x932b[7]](),license[_0x932b[8]](),auth[_0x932b[17]](_0x932b[9]),controller[_0x932b[21]]);router[_0x932b[25]](_0x932b[13],license[_0x932b[6]](),auth[_0x932b[7]](),license[_0x932b[8]](),auth[_0x932b[17]](_0x932b[9]),controller[_0x932b[24]]);router[_0x932b[25]](_0x932b[15],license[_0x932b[6]](),auth[_0x932b[7]](),license[_0x932b[8]](),auth[_0x932b[17]](_0x932b[9]),controller[_0x932b[26]]);router[_0x932b[25]](_0x932b[5],license[_0x932b[6]](),auth[_0x932b[7]](),license[_0x932b[8]](),auth[_0x932b[17]](_0x932b[9]),controller[_0x932b[27]]);module[_0x932b[28]]= router \ No newline at end of file diff --git a/server/api/sms_queue/sms_queue.controller.js b/server/api/sms_queue/sms_queue.controller.js index da0bf5b..e2ee4a6 100644 --- a/server/api/sms_queue/sms_queue.controller.js +++ b/server/api/sms_queue/sms_queue.controller.js @@ -1,242 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sms/queues -> index - * POST /api/sms/queues -> create - * GET /api/sms/queues/:id -> show - * PUT /api/sms/queues/:id -> update - * DELETE /api/sms/queues/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var SmsQueue = require('../../models').SmsQueue; -var User = require('../../models').User; -var sequelize = require('../../models').sequelize; -var UserHasSmsQueue = require('../../models').UserHasSmsQueue; - -function handleError(res, err) { - return res.status(500).send(err); -} - -// Gets a list of SmsQueues -exports.index = function(req, res) { - - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getSmsQueuesIdByUser(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - - default: - return SmsQueue - .scope('default') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } - - - -} - -// Gets a single SmsQueue from the DB -exports.show = function(req, res) { - return SmsQueue - .scope('default') - .findById(req.params.id) - .then(function(smsQueue) { - if (!smsQueue) { - return res.sendStatus(404); - } - return res.send(smsQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.showAgents = function(req, res) { - return SmsQueue - .findById(req.params.id) - .then(function(queue) { - if (!queue) { - return res.sendStatus(404); - } - return queue - .getUsers({ - where: { - role: 'agent' - }, - attributes: ['id', 'name', 'fullname', 'email'] - }); - }) - .then(function(agents) { - return res.status(200).send({ - rows: agents, - count: agents.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a new SmsQueue in the DB -exports.create = function(req, res) { - var _smsQueue; - - return SmsQueue - .create(req.body) - .then(function(smsQueue) { - _smsQueue = smsQueue; - - if (req.body.agents) { - return _smsQueue - .addUsers(req.body.agents, { - penalty: req.body.penalty || 0, - queue: _smsQueue.name - }); - } - }) - .then(function() { - return res.status(201).send(_smsQueue); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Updates an existing SmsQueue in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SmsQueue - .findById(req.params.id) - .then(function(smsQueue) { - if (!smsQueue) { - return res.sendStatus(404); - } - var updated = _.merge(smsQueue, req.body); - return updated - .save(); - }) - .then(function(smsQueue) { - return res.status(200).send(smsQueue); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); - } - // Updates an existing user_has_smsQueue in the DB. -exports.addAgents = function(req, res, next) { - return SmsQueue - .findById(req.params.id) - .then(function(smsQueue) { - if (!smsQueue) { - return res.sendStatus(404); - } - var userHasSmsQueues = _.map(req.body.agents, function(agent) { - return { - UserId: agent, - penalty: req.body.penalty, - SmsQueueId: smsQueue.id, - queue: smsQueue.name - }; - }); - - return UserHasSmsQueue - .bulkCreate(userHasSmsQueues, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.removeAgents = function(req, res) { - return SmsQueue - .findById(req.params.id) - .then(function(smsQueue) { - if (smsQueue) { - return smsQueue - .removeUsers(req.query.agents, { - individualHooks: true - }); - } else { - throw new Error('SmsQueue not found'); - } - }) - .then(function() { - return res.sendStatus(202); - }) - .catch(function(err) { - return handleError(res, err); - }); - -}; - -// Deletes a SmsQueue from the DB -exports.destroy = function(req, res) { - var _smsQueue; - return SmsQueue - .findById(req.params.id) - .then(function(smsQueue) { - _smsQueue = smsQueue; - if (!smsQueue) { - return res.sendStatus(404); - } - return smsQueue - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(sequelize.ForeignKeyConstraintError, function(err) { - return Util.errorManager.handleForeignKeyConstraintError(res, 'queue', _smsQueue.name, err); - }) - .catch(function(err) { - console.error('err', err); - return handleError(res, err); - }); -} -exports.bulkDestroy = function(req, res) { - return SmsQueue - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; +var _0x2b20=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72\x73","\x53\x6D\x73\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x71\x75\x65\x75\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x2b20[0];var _=require(_0x2b20[1]);var Util=require(_0x2b20[2]);var SmsQueue=require(_0x2b20[4])[_0x2b20[3]];var User=require(_0x2b20[4])[_0x2b20[5]];var sequelize=require(_0x2b20[4])[_0x2b20[6]];var UserHasSmsQueue=require(_0x2b20[4])[_0x2b20[7]];function handleError(_0x3c5bx8,_0x3c5bx9){return _0x3c5bx8[_0x2b20[9]](500)[_0x2b20[8]](_0x3c5bx9)}exports[_0x2b20[10]]= function(_0x3c5bxa,_0x3c5bx8){switch(_0x3c5bxa[_0x2b20[16]][_0x2b20[22]]){case _0x2b20[16]:return User[_0x2b20[17]](_0x3c5bxa[_0x2b20[16]][_0x2b20[15]],{attributes:[_0x2b20[15]]})[_0x2b20[12]](Util[_0x2b20[14]](_0x3c5bxa[_0x2b20[13]]))[_0x2b20[12]](function(_0x3c5bxb){_0x3c5bx8[_0x2b20[9]](200)[_0x2b20[8]](_0x3c5bxb)})[_0x2b20[11]](function(_0x3c5bx9){return handleError(_0x3c5bx8,_0x3c5bx9)});default:return SmsQueue[_0x2b20[21]](_0x2b20[20])[_0x2b20[19]](Util[_0x2b20[18]](_0x3c5bxa[_0x2b20[13]]))[_0x2b20[12]](function(_0x3c5bxb){_0x3c5bx8[_0x2b20[9]](200)[_0x2b20[8]](_0x3c5bxb)})[_0x2b20[11]](function(_0x3c5bx9){return handleError(_0x3c5bx8,_0x3c5bx9)})}};exports[_0x2b20[23]]= function(_0x3c5bxa,_0x3c5bx8){return SmsQueue[_0x2b20[21]](_0x2b20[20])[_0x2b20[17]](_0x3c5bxa[_0x2b20[25]][_0x2b20[15]])[_0x2b20[12]](function(_0x3c5bxc){if(!_0x3c5bxc){return _0x3c5bx8[_0x2b20[24]](404)};return _0x3c5bx8[_0x2b20[8]](_0x3c5bxc)})[_0x2b20[11]](function(_0x3c5bx9){return handleError(_0x3c5bx8,_0x3c5bx9)})};exports[_0x2b20[26]]= function(_0x3c5bxa,_0x3c5bx8){return SmsQueue[_0x2b20[17]](_0x3c5bxa[_0x2b20[25]][_0x2b20[15]])[_0x2b20[12]](function(_0x3c5bxe){if(!_0x3c5bxe){return _0x3c5bx8[_0x2b20[24]](404)};return _0x3c5bxe[_0x2b20[32]]({where:{role:_0x2b20[28]},attributes:[_0x2b20[15],_0x2b20[29],_0x2b20[30],_0x2b20[31]]})})[_0x2b20[12]](function(_0x3c5bxd){return _0x3c5bx8[_0x2b20[9]](200)[_0x2b20[8]]({rows:_0x3c5bxd,count:_0x3c5bxd[_0x2b20[27]]})})[_0x2b20[11]](function(_0x3c5bx9){return handleError(_0x3c5bx8,_0x3c5bx9)})};exports[_0x2b20[33]]= function(_0x3c5bxa,_0x3c5bx8){var _0x3c5bxf;return SmsQueue[_0x2b20[33]](_0x3c5bxa[_0x2b20[37]])[_0x2b20[12]](function(_0x3c5bxc){_0x3c5bxf= _0x3c5bxc;if(_0x3c5bxa[_0x2b20[37]][_0x2b20[36]]){return _0x3c5bxf[_0x2b20[39]](_0x3c5bxa[_0x2b20[37]][_0x2b20[36]],{penalty:_0x3c5bxa[_0x2b20[37]][_0x2b20[38]]|| 0,queue:_0x3c5bxf[_0x2b20[29]]})}})[_0x2b20[12]](function(){return _0x3c5bx8[_0x2b20[9]](201)[_0x2b20[8]](_0x3c5bxf)})[_0x2b20[11]](sequelize.UniqueConstraintError,function(_0x3c5bx9){return Util[_0x2b20[35]][_0x2b20[34]](_0x3c5bx8,_0x3c5bx9)})[_0x2b20[11]](function(_0x3c5bx9){return handleError(_0x3c5bx8,_0x3c5bx9)})};exports[_0x2b20[40]]= function(_0x3c5bxa,_0x3c5bx8){if(_0x3c5bxa[_0x2b20[37]][_0x2b20[15]]){delete _0x3c5bxa[_0x2b20[37]][_0x2b20[15]]};return SmsQueue[_0x2b20[17]](_0x3c5bxa[_0x2b20[25]][_0x2b20[15]])[_0x2b20[12]](function(_0x3c5bxc){if(!_0x3c5bxc){return _0x3c5bx8[_0x2b20[24]](404)};var _0x3c5bx10=_[_0x2b20[41]](_0x3c5bxc,_0x3c5bxa[_0x2b20[37]]);return _0x3c5bx10[_0x2b20[42]]()})[_0x2b20[12]](function(_0x3c5bxc){return _0x3c5bx8[_0x2b20[9]](200)[_0x2b20[8]](_0x3c5bxc)})[_0x2b20[11]](sequelize.UniqueConstraintError,function(_0x3c5bx9){return Util[_0x2b20[35]][_0x2b20[34]](_0x3c5bx8,_0x3c5bx9)})[_0x2b20[11]](function(_0x3c5bx9){return handleError(_0x3c5bx8,_0x3c5bx9)})};exports[_0x2b20[43]]= function(_0x3c5bxa,_0x3c5bx8,_0x3c5bx11){return SmsQueue[_0x2b20[17]](_0x3c5bxa[_0x2b20[25]][_0x2b20[15]])[_0x2b20[12]](function(_0x3c5bxc){if(!_0x3c5bxc){return _0x3c5bx8[_0x2b20[24]](404)};var _0x3c5bx12=_[_0x2b20[44]](_0x3c5bxa[_0x2b20[37]][_0x2b20[36]],function(_0x3c5bx13){return {UserId:_0x3c5bx13,penalty:_0x3c5bxa[_0x2b20[37]][_0x2b20[38]],SmsQueueId:_0x3c5bxc[_0x2b20[15]],queue:_0x3c5bxc[_0x2b20[29]]}});return UserHasSmsQueue[_0x2b20[45]](_0x3c5bx12,{individualHooks:true})})[_0x2b20[12]](function(){return _0x3c5bx8[_0x2b20[24]](200)})[_0x2b20[11]](function(_0x3c5bx9){return handleError(_0x3c5bx8,_0x3c5bx9)})};exports[_0x2b20[46]]= function(_0x3c5bxa,_0x3c5bx8){return SmsQueue[_0x2b20[17]](_0x3c5bxa[_0x2b20[25]][_0x2b20[15]])[_0x2b20[12]](function(_0x3c5bxc){if(_0x3c5bxc){return _0x3c5bxc[_0x2b20[47]](_0x3c5bxa[_0x2b20[13]][_0x2b20[36]],{individualHooks:true})}else {throw new Error(_0x2b20[48])}})[_0x2b20[12]](function(){return _0x3c5bx8[_0x2b20[24]](202)})[_0x2b20[11]](function(_0x3c5bx9){return handleError(_0x3c5bx8,_0x3c5bx9)})};exports[_0x2b20[49]]= function(_0x3c5bxa,_0x3c5bx8){var _0x3c5bxf;return SmsQueue[_0x2b20[17]](_0x3c5bxa[_0x2b20[25]][_0x2b20[15]])[_0x2b20[12]](function(_0x3c5bxc){_0x3c5bxf= _0x3c5bxc;if(!_0x3c5bxc){return _0x3c5bx8[_0x2b20[24]](404)};return _0x3c5bxc[_0x2b20[49]]()})[_0x2b20[12]](function(){return _0x3c5bx8[_0x2b20[24]](204)})[_0x2b20[11]](sequelize.ForeignKeyConstraintError,function(_0x3c5bx9){return Util[_0x2b20[35]][_0x2b20[53]](_0x3c5bx8,_0x2b20[52],_0x3c5bxf[_0x2b20[29]],_0x3c5bx9)})[_0x2b20[11]](function(_0x3c5bx9){console[_0x2b20[51]](_0x2b20[50],_0x3c5bx9);return handleError(_0x3c5bx8,_0x3c5bx9)})};exports[_0x2b20[54]]= function(_0x3c5bxa,_0x3c5bx8){return SmsQueue[_0x2b20[49]]({where:{id:_0x3c5bxa[_0x2b20[13]][_0x2b20[55]]},individualHooks:true})[_0x2b20[12]](function(){return _0x3c5bx8[_0x2b20[24]](204)})[_0x2b20[11]](function(_0x3c5bx9){return handleError(_0x3c5bx8,_0x3c5bx9)})} \ No newline at end of file diff --git a/server/api/sms_queue/sms_queue.events.js b/server/api/sms_queue/sms_queue.events.js index 31beb9a..abd0591 100644 --- a/server/api/sms_queue/sms_queue.events.js +++ b/server/api/sms_queue/sms_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SmsQueue = require('../../models').SmsQueue; - -var SmsQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SmsQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SmsQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SmsQueueEvents.emit(event + ':' + doc._id, doc); - SmsQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = SmsQueueEvents; +var _0xf0ab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf0ab[0];const EventEmitter=require(_0xf0ab[1]);const SmsQueue=require(_0xf0ab[3])[_0xf0ab[2]];var SmsQueueEvents= new EventEmitter();SmsQueueEvents[_0xf0ab[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf0ab[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf0ab[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf0ab[6]};for(var e in events){var event=events[e];SmsQueue[_0xf0ab[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3f8ex8,_0x3f8ex9,_0x3f8exa){SmsQueueEvents[_0xf0ab[10]](event+ _0xf0ab[8]+ _0x3f8ex8[_0xf0ab[9]],_0x3f8ex8);SmsQueueEvents[_0xf0ab[10]](event,_0x3f8ex8);_0x3f8exa(null)}}module[_0xf0ab[11]]= SmsQueueEvents \ No newline at end of file diff --git a/server/api/sms_queue/sms_queue.socket.js b/server/api/sms_queue/sms_queue.socket.js index 2c6c4f1..87c9e4a 100644 --- a/server/api/sms_queue/sms_queue.socket.js +++ b/server/api/sms_queue/sms_queue.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SmsQueueEvents = require('./sms_queue.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('sms_queue:' + event, socket); - - SmsQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SmsQueueEvents.removeListener(event, listener); - }; -} +var _0xf1b8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xf1b8[0];const SmsQueueEvents=require(_0xf1b8[1]);var events=[_0xf1b8[2],_0xf1b8[3]];exports[_0xf1b8[4]]= function(_0x1cc0x3){for(var _0x1cc0x4=0,_0x1cc0x5=events[_0xf1b8[5]];_0x1cc0x4< _0x1cc0x5;_0x1cc0x4++){var _0x1cc0x6=events[_0x1cc0x4];var _0x1cc0x7=createListener(_0xf1b8[6]+ _0x1cc0x6,_0x1cc0x3);SmsQueueEvents[_0xf1b8[7]](_0x1cc0x6,_0x1cc0x7);_0x1cc0x3[_0xf1b8[7]](_0xf1b8[8],removeListener(_0x1cc0x6,_0x1cc0x7))}};function createListener(_0x1cc0x6,_0x1cc0x3){return function(_0x1cc0x9){_0x1cc0x3[_0xf1b8[9]](_0x1cc0x6,_0x1cc0x9)}}function removeListener(_0x1cc0x6,_0x1cc0x7){return function(){SmsQueueEvents[_0xf1b8[10]](_0x1cc0x6,_0x1cc0x7)}} \ No newline at end of file diff --git a/server/api/sms_room/index.js b/server/api/sms_room/index.js index 429772f..0477116 100644 --- a/server/api/sms_room/index.js +++ b/server/api/sms_room/index.js @@ -1,26 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sms_room.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.index); -router.get('/describe', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([1, 11], ['admin']), controller.describe); -router.get('/pending', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([11, 17], ['admin']), controller.pending); -router.get('/new', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([11, 17], ['admin']), controller.new); -router.get('/open', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([11, 17], ['admin']), controller.open); -router.get('/closed', auth.isAuthenticated(), license.isValidDate(), license.hasSms(), auth.hasModule([11, 17], ['admin']), controller.closed); -router.get('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.show); -router.get('/:id/agents', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.showAgents); -router.get('/messages/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.getRoomByMessage); -router.post('/', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.create); -router.post('/:id/messages', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.createMessage); -router.put('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.update); -router.put('/:id/agents', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.updateAgents); -router.patch('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin', 'agent']), controller.updatePatch); -router.delete('/:id', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.destroy); -router.delete('/', license.isValidDate(), license.hasSms(), auth.isAuthenticated(), auth.hasModule([11], ['admin']), controller.bulkDestroy); -module.exports = router; +var _0xca5c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x53\x6D\x73","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x70\x65\x6E\x64\x69\x6E\x67","\x70\x65\x6E\x64\x69\x6E\x67","\x2F\x6E\x65\x77","\x6E\x65\x77","\x2F\x6F\x70\x65\x6E","\x6F\x70\x65\x6E","\x2F\x63\x6C\x6F\x73\x65\x64","\x63\x6C\x6F\x73\x65\x64","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x2F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x3A\x69\x64","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x3A\x69\x64\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xca5c[0];var express=require(_0xca5c[1]);var auth=require(_0xca5c[2]);var controller=require(_0xca5c[3]);var license=require(_0xca5c[4]);var router=express.Router();router[_0xca5c[13]](_0xca5c[5],license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[8]](),auth[_0xca5c[11]]([11],[_0xca5c[9],_0xca5c[10]]),controller[_0xca5c[12]]);router[_0xca5c[13]](_0xca5c[14],auth[_0xca5c[8]](),license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[11]]([1,11],[_0xca5c[9]]),controller[_0xca5c[15]]);router[_0xca5c[13]](_0xca5c[16],auth[_0xca5c[8]](),license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[11]]([11,17],[_0xca5c[9]]),controller[_0xca5c[17]]);router[_0xca5c[13]](_0xca5c[18],auth[_0xca5c[8]](),license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[11]]([11,17],[_0xca5c[9]]),controller[_0xca5c[19]]);router[_0xca5c[13]](_0xca5c[20],auth[_0xca5c[8]](),license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[11]]([11,17],[_0xca5c[9]]),controller[_0xca5c[21]]);router[_0xca5c[13]](_0xca5c[22],auth[_0xca5c[8]](),license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[11]]([11,17],[_0xca5c[9]]),controller[_0xca5c[23]]);router[_0xca5c[13]](_0xca5c[24],license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[8]](),auth[_0xca5c[11]]([11],[_0xca5c[9],_0xca5c[10]]),controller[_0xca5c[25]]);router[_0xca5c[13]](_0xca5c[26],license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[8]](),auth[_0xca5c[11]]([11],[_0xca5c[9],_0xca5c[10]]),controller[_0xca5c[27]]);router[_0xca5c[13]](_0xca5c[28],license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[8]](),auth[_0xca5c[11]]([11],[_0xca5c[9],_0xca5c[10]]),controller[_0xca5c[29]]);router[_0xca5c[31]](_0xca5c[5],license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[8]](),auth[_0xca5c[11]]([11],[_0xca5c[9]]),controller[_0xca5c[30]]);router[_0xca5c[31]](_0xca5c[32],license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[8]](),auth[_0xca5c[11]]([11],[_0xca5c[9]]),controller[_0xca5c[33]]);router[_0xca5c[35]](_0xca5c[24],license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[8]](),auth[_0xca5c[11]]([11],[_0xca5c[9],_0xca5c[10]]),controller[_0xca5c[34]]);router[_0xca5c[35]](_0xca5c[26],license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[8]](),auth[_0xca5c[11]]([11],[_0xca5c[9],_0xca5c[10]]),controller[_0xca5c[36]]);router[_0xca5c[38]](_0xca5c[24],license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[8]](),auth[_0xca5c[11]]([11],[_0xca5c[9],_0xca5c[10]]),controller[_0xca5c[37]]);router[_0xca5c[40]](_0xca5c[24],license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[8]](),auth[_0xca5c[11]]([11],[_0xca5c[9]]),controller[_0xca5c[39]]);router[_0xca5c[40]](_0xca5c[5],license[_0xca5c[6]](),license[_0xca5c[7]](),auth[_0xca5c[8]](),auth[_0xca5c[11]]([11],[_0xca5c[9]]),controller[_0xca5c[41]]);module[_0xca5c[42]]= router \ No newline at end of file diff --git a/server/api/sms_room/sms_room.controller.js b/server/api/sms_room/sms_room.controller.js index e3946f0..2d420b8 100644 --- a/server/api/sms_room/sms_room.controller.js +++ b/server/api/sms_room/sms_room.controller.js @@ -1,399 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sms/rooms -> index - * POST /api/sms/rooms -> create - * GET /api/sms/rooms/:id -> show - * PUT /api/sms/rooms/:id -> update - * DELETE /api/sms/rooms/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); -var moment = require('moment'); - -var SmsRoom = require('../../models').SmsRoom; -var User = require('../../models').User; -var SmsMessage = require('../../models').SmsMessage; -var SmsAccount = require('../../models').SmsAccount; -var User = require('../../models').User; -var SmsApplication = require('../../models').SmsApplication; -var SmsQueue = require('../../models').SmsQueue; - - -function handleError(res, err) { - return res.status(500).send(err); -} - - - -// Gets a list of SmsRooms -exports.index = function(req, res) { - switch (req.user.role) { - case 'agent': - return SmsRoom - .scope('default', { - method: ['agent', req.user.id] - }) - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - - default: - return SmsRoom - .scope('default') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -} - -// Get list of fields -exports.describe = function(req, res) { - return SmsRoom - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function getSmsQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getSmsQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - return { - include: { - model: SmsAccount, - include: { - model: SmsApplication, - include: { - model: SmsQueue, - where: { - id: _.map(userQueues, 'id') - } - } - } - } - }; - }); - default: - return {}; - } - } -} - -exports.pending = function(req, res) { - return Promise - .all([]) - .then(getSmsQueues(req.user)) - .then(function(condition) { - return SmsRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'PENDING', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.new = function(req, res) { - return Promise - .all([]) - .then(getSmsQueues(req.user)) - .then(function(condition) { - return SmsRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'NEW', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.open = function(req, res) { - return Promise - .all([]) - .then(getSmsQueues(req.user)) - .then(function(condition) { - return SmsRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'OPEN', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.closed = function(req, res) { - return Promise - .all([]) - .then(getSmsQueues(req.user)) - .then(function(condition) { - return SmsRoom - .count(_.merge(Util.getQuery(req.query, { - status: 'CLOSED', - updatedAt: { - $gte: moment().startOf('day') - } - }), condition)); - }) - .then(function(data) { - return res.status(200).send({ - value: data - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Gets a single SmsRoom from the DB -exports.show = function(req, res) { - return SmsRoom - .scope('default') - .findById(req.params.id) - .then(function(smsRoom) { - if (!smsRoom) { - return res.sendStatus(404); - } - return res.send(smsRoom); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -exports.showAgents = function(req, res, next) { - return SmsRoom - .findById(req.params.id) - .then(function(smsRoom) { - if (!smsRoom) { - return res.sendStatus(404); - } - - return smsRoom - .getUsers({ - attributes: ['id', 'name', 'fullname', 'email', 'role', 'internal'] - }); - }) - .then(function(users) { - return res.send(users); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -exports.getRoomByMessage = function(req, res, next) { - return SmsMessage - .findById(req.params.id) - .then(function(Message) { - return Message - .getSmsRoom({ - include: [{ - model: SmsAccount - }, { - model: SmsMessage, - include: [{ - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }, { - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }] - }); - }) - .then(function(Room) { - // console.log('room', Room); - return res.send(Room); - }) - .catch(function(err) { - console.log('err', err); - return handleError(res, err); - }); -}; -// Creates a new SmsRoom in the DB -exports.create = function(req, res) { - - return SmsRoom - .create(req.body) - .then(function(smsMessage) { - return res.status(201).send(smsMessage); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - - -// Creates a new mailMessage in the DB. -exports.createMessage = function(req, res, next) { - req.body.UserId = req.user.id; - req.body.SmsRoomId = req.params.id; - return SmsMessage - .create(req.body) - .then(function(smsMessage) { - return res.status(201).send(smsMessage); - }).catch(function(err) { - return handleError(res, err); - }); -}; -// Updates an existing SmsRoom in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SmsRoom - .findById(req.params.id) - .then(function(smsRoom) { - if (!smsRoom) { - return res.sendStatus(404); - } - - var updated = _.merge(smsRoom, req.body); - - return updated - .save(); - }) - .then(function(smsRoom) { - return res.status(200).send(smsRoom); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.updateAgents = function(req, res, next) { - return SmsRoom - .findById(req.params.id) - .then(function(smsRoom) { - if (!smsRoom) { - return res.sendStatus(404); - } - - return smsRoom - .setUsers(req.body.agents, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a SmsRoom from the DB -exports.destroy = function(req, res) { - return SmsRoom - .findById(req.params.id) - .then(function(smsRoom) { - if (!smsRoom) { - return res.sendStatus(404); - } - return smsRoom.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -exports.bulkDestroy = function(req, res) { - return SmsRoom - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -exports.updatePatch = function(req, res, next) { - var _options = { - where: { - id: req.params.id.split(',') - }, - user: req.user, - individualHooks: true - }; - - return SmsRoom - .update(req.body, _options) - .then(function(smsRooms) { - if (!smsRooms) { - return res.sendStatus(404); - } - return smsRooms - }) - .then(function(smsRooms) { - return res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; +var _0x4b9e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x53\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x61\x67\x65\x6E\x74","\x69\x64","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x72\x6F\x6C\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x6D\x61\x70","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x70\x65\x6E\x64\x69\x6E\x67","\x6C\x6F\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x6E\x65\x77","\x4E\x45\x57","\x6F\x70\x65\x6E","\x4F\x50\x45\x4E","\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x67\x65\x74\x52\x6F\x6F\x6D\x42\x79\x4D\x65\x73\x73\x61\x67\x65","\x65\x72\x72","\x67\x65\x74\x53\x6D\x73\x52\x6F\x6F\x6D","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x55\x73\x65\x72\x49\x64","\x53\x6D\x73\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65\x41\x67\x65\x6E\x74\x73","\x61\x67\x65\x6E\x74\x73","\x73\x65\x74\x55\x73\x65\x72\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x75\x70\x64\x61\x74\x65\x50\x61\x74\x63\x68","\x2C","\x73\x70\x6C\x69\x74"];_0x4b9e[0];var _=require(_0x4b9e[1]);var Util=require(_0x4b9e[2]);var moment=require(_0x4b9e[3]);var SmsRoom=require(_0x4b9e[5])[_0x4b9e[4]];var User=require(_0x4b9e[5])[_0x4b9e[6]];var SmsMessage=require(_0x4b9e[5])[_0x4b9e[7]];var SmsAccount=require(_0x4b9e[5])[_0x4b9e[8]];var User=require(_0x4b9e[5])[_0x4b9e[6]];var SmsApplication=require(_0x4b9e[5])[_0x4b9e[9]];var SmsQueue=require(_0x4b9e[5])[_0x4b9e[10]];function handleError(_0xb3c2xb,_0xb3c2xc){return _0xb3c2xb[_0x4b9e[12]](500)[_0x4b9e[11]](_0xb3c2xc)}exports[_0x4b9e[13]]= function(_0xb3c2xd,_0xb3c2xb){switch(_0xb3c2xd[_0x4b9e[22]][_0x4b9e[24]]){case _0x4b9e[20]:return SmsRoom[_0x4b9e[23]](_0x4b9e[19],{method:[_0x4b9e[20],_0xb3c2xd[_0x4b9e[22]][_0x4b9e[21]]]})[_0x4b9e[18]](Util[_0x4b9e[17]](_0xb3c2xd[_0x4b9e[16]]))[_0x4b9e[15]](function(_0xb3c2xe){return _0xb3c2xb[_0x4b9e[12]](200)[_0x4b9e[11]](_0xb3c2xe)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)});default:return SmsRoom[_0x4b9e[23]](_0x4b9e[19])[_0x4b9e[18]](Util[_0x4b9e[17]](_0xb3c2xd[_0x4b9e[16]]))[_0x4b9e[15]](function(_0xb3c2xe){return _0xb3c2xb[_0x4b9e[12]](200)[_0x4b9e[11]](_0xb3c2xe)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)})}};exports[_0x4b9e[25]]= function(_0xb3c2xd,_0xb3c2xb){return SmsRoom[_0x4b9e[25]]()[_0x4b9e[15]](function(_0xb3c2xf){return _0xb3c2xb[_0x4b9e[12]](200)[_0x4b9e[11]](_0xb3c2xf)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)})};function getSmsQueues(_0xb3c2x11){return function(){switch(_0xb3c2x11[_0x4b9e[24]]){case _0x4b9e[22]:return User[_0x4b9e[28]](_0xb3c2x11[_0x4b9e[21]],{attributes:[_0x4b9e[21]]})[_0x4b9e[15]](Util[_0x4b9e[27]]({},{attributes:[_0x4b9e[21]],include:[{raw:true,model:User,attributes:[_0x4b9e[21]]}]}))[_0x4b9e[15]](function(_0xb3c2x12){return {include:{model:SmsAccount,include:{model:SmsApplication,include:{model:SmsQueue,where:{id:_[_0x4b9e[26]](_0xb3c2x12,_0x4b9e[21])}}}}}});default:return {}}}}exports[_0x4b9e[29]]= function(_0xb3c2xd,_0xb3c2xb){return Promise[_0x4b9e[36]]([])[_0x4b9e[15]](getSmsQueues(_0xb3c2xd[_0x4b9e[22]]))[_0x4b9e[15]](function(_0xb3c2x14){return SmsRoom[_0x4b9e[35]](_[_0x4b9e[34]](Util[_0x4b9e[17]](_0xb3c2xd[_0x4b9e[16]],{status:_0x4b9e[31],updatedAt:{$gte:moment()[_0x4b9e[33]](_0x4b9e[32])}}),_0xb3c2x14))})[_0x4b9e[15]](function(_0xb3c2x13){return _0xb3c2xb[_0x4b9e[12]](200)[_0x4b9e[11]]({value:_0xb3c2x13})})[_0x4b9e[14]](function(_0xb3c2xc){console[_0x4b9e[30]](_0xb3c2xc);return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[37]]= function(_0xb3c2xd,_0xb3c2xb){return Promise[_0x4b9e[36]]([])[_0x4b9e[15]](getSmsQueues(_0xb3c2xd[_0x4b9e[22]]))[_0x4b9e[15]](function(_0xb3c2x14){return SmsRoom[_0x4b9e[35]](_[_0x4b9e[34]](Util[_0x4b9e[17]](_0xb3c2xd[_0x4b9e[16]],{status:_0x4b9e[38],updatedAt:{$gte:moment()[_0x4b9e[33]](_0x4b9e[32])}}),_0xb3c2x14))})[_0x4b9e[15]](function(_0xb3c2x13){return _0xb3c2xb[_0x4b9e[12]](200)[_0x4b9e[11]]({value:_0xb3c2x13})})[_0x4b9e[14]](function(_0xb3c2xc){console[_0x4b9e[30]](_0xb3c2xc);return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[39]]= function(_0xb3c2xd,_0xb3c2xb){return Promise[_0x4b9e[36]]([])[_0x4b9e[15]](getSmsQueues(_0xb3c2xd[_0x4b9e[22]]))[_0x4b9e[15]](function(_0xb3c2x14){return SmsRoom[_0x4b9e[35]](_[_0x4b9e[34]](Util[_0x4b9e[17]](_0xb3c2xd[_0x4b9e[16]],{status:_0x4b9e[40],updatedAt:{$gte:moment()[_0x4b9e[33]](_0x4b9e[32])}}),_0xb3c2x14))})[_0x4b9e[15]](function(_0xb3c2x13){return _0xb3c2xb[_0x4b9e[12]](200)[_0x4b9e[11]]({value:_0xb3c2x13})})[_0x4b9e[14]](function(_0xb3c2xc){console[_0x4b9e[30]](_0xb3c2xc);return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[41]]= function(_0xb3c2xd,_0xb3c2xb){return Promise[_0x4b9e[36]]([])[_0x4b9e[15]](getSmsQueues(_0xb3c2xd[_0x4b9e[22]]))[_0x4b9e[15]](function(_0xb3c2x14){return SmsRoom[_0x4b9e[35]](_[_0x4b9e[34]](Util[_0x4b9e[17]](_0xb3c2xd[_0x4b9e[16]],{status:_0x4b9e[42],updatedAt:{$gte:moment()[_0x4b9e[33]](_0x4b9e[32])}}),_0xb3c2x14))})[_0x4b9e[15]](function(_0xb3c2x13){return _0xb3c2xb[_0x4b9e[12]](200)[_0x4b9e[11]]({value:_0xb3c2x13})})[_0x4b9e[14]](function(_0xb3c2xc){console[_0x4b9e[30]](_0xb3c2xc);return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[43]]= function(_0xb3c2xd,_0xb3c2xb){return SmsRoom[_0x4b9e[23]](_0x4b9e[19])[_0x4b9e[28]](_0xb3c2xd[_0x4b9e[45]][_0x4b9e[21]])[_0x4b9e[15]](function(_0xb3c2x15){if(!_0xb3c2x15){return _0xb3c2xb[_0x4b9e[44]](404)};return _0xb3c2xb[_0x4b9e[11]](_0xb3c2x15)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[46]]= function(_0xb3c2xd,_0xb3c2xb,_0xb3c2x16){return SmsRoom[_0x4b9e[28]](_0xb3c2xd[_0x4b9e[45]][_0x4b9e[21]])[_0x4b9e[15]](function(_0xb3c2x15){if(!_0xb3c2x15){return _0xb3c2xb[_0x4b9e[44]](404)};return _0xb3c2x15[_0x4b9e[51]]({attributes:[_0x4b9e[21],_0x4b9e[47],_0x4b9e[48],_0x4b9e[49],_0x4b9e[24],_0x4b9e[50]]})})[_0x4b9e[15]](function(_0xb3c2x17){return _0xb3c2xb[_0x4b9e[11]](_0xb3c2x17)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[52]]= function(_0xb3c2xd,_0xb3c2xb,_0xb3c2x16){return SmsMessage[_0x4b9e[28]](_0xb3c2xd[_0x4b9e[45]][_0x4b9e[21]])[_0x4b9e[15]](function(_0xb3c2x19){return _0xb3c2x19[_0x4b9e[54]]({include:[{model:SmsAccount},{model:SmsMessage,include:[{model:User,attributes:[_0x4b9e[21],_0x4b9e[47],_0x4b9e[48],_0x4b9e[49]]}]},{model:User,attributes:[_0x4b9e[21],_0x4b9e[47],_0x4b9e[48],_0x4b9e[49]]}]})})[_0x4b9e[15]](function(_0xb3c2x18){return _0xb3c2xb[_0x4b9e[11]](_0xb3c2x18)})[_0x4b9e[14]](function(_0xb3c2xc){console[_0x4b9e[30]](_0x4b9e[53],_0xb3c2xc);return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[55]]= function(_0xb3c2xd,_0xb3c2xb){return SmsRoom[_0x4b9e[55]](_0xb3c2xd[_0x4b9e[56]])[_0x4b9e[15]](function(_0xb3c2x1a){return _0xb3c2xb[_0x4b9e[12]](201)[_0x4b9e[11]](_0xb3c2x1a)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[57]]= function(_0xb3c2xd,_0xb3c2xb,_0xb3c2x16){_0xb3c2xd[_0x4b9e[56]][_0x4b9e[58]]= _0xb3c2xd[_0x4b9e[22]][_0x4b9e[21]];_0xb3c2xd[_0x4b9e[56]][_0x4b9e[59]]= _0xb3c2xd[_0x4b9e[45]][_0x4b9e[21]];return SmsMessage[_0x4b9e[55]](_0xb3c2xd[_0x4b9e[56]])[_0x4b9e[15]](function(_0xb3c2x1a){return _0xb3c2xb[_0x4b9e[12]](201)[_0x4b9e[11]](_0xb3c2x1a)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[60]]= function(_0xb3c2xd,_0xb3c2xb){if(_0xb3c2xd[_0x4b9e[56]][_0x4b9e[21]]){delete _0xb3c2xd[_0x4b9e[56]][_0x4b9e[21]]};return SmsRoom[_0x4b9e[28]](_0xb3c2xd[_0x4b9e[45]][_0x4b9e[21]])[_0x4b9e[15]](function(_0xb3c2x15){if(!_0xb3c2x15){return _0xb3c2xb[_0x4b9e[44]](404)};var _0xb3c2x1b=_[_0x4b9e[34]](_0xb3c2x15,_0xb3c2xd[_0x4b9e[56]]);return _0xb3c2x1b[_0x4b9e[61]]()})[_0x4b9e[15]](function(_0xb3c2x15){return _0xb3c2xb[_0x4b9e[12]](200)[_0x4b9e[11]](_0xb3c2x15)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[62]]= function(_0xb3c2xd,_0xb3c2xb,_0xb3c2x16){return SmsRoom[_0x4b9e[28]](_0xb3c2xd[_0x4b9e[45]][_0x4b9e[21]])[_0x4b9e[15]](function(_0xb3c2x15){if(!_0xb3c2x15){return _0xb3c2xb[_0x4b9e[44]](404)};return _0xb3c2x15[_0x4b9e[64]](_0xb3c2xd[_0x4b9e[56]][_0x4b9e[63]],{individualHooks:true})})[_0x4b9e[15]](function(){return _0xb3c2xb[_0x4b9e[44]](200)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[65]]= function(_0xb3c2xd,_0xb3c2xb){return SmsRoom[_0x4b9e[28]](_0xb3c2xd[_0x4b9e[45]][_0x4b9e[21]])[_0x4b9e[15]](function(_0xb3c2x15){if(!_0xb3c2x15){return _0xb3c2xb[_0x4b9e[44]](404)};return _0xb3c2x15[_0x4b9e[65]]()})[_0x4b9e[15]](function(){return _0xb3c2xb[_0x4b9e[44]](204)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[66]]= function(_0xb3c2xd,_0xb3c2xb){return SmsRoom[_0x4b9e[65]]({where:{id:_0xb3c2xd[_0x4b9e[16]][_0x4b9e[67]]},individualHooks:true})[_0x4b9e[15]](function(){return _0xb3c2xb[_0x4b9e[44]](200)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)})};exports[_0x4b9e[68]]= function(_0xb3c2xd,_0xb3c2xb,_0xb3c2x16){var _0xb3c2x1c={where:{id:_0xb3c2xd[_0x4b9e[45]][_0x4b9e[21]][_0x4b9e[70]](_0x4b9e[69])},user:_0xb3c2xd[_0x4b9e[22]],individualHooks:true};return SmsRoom[_0x4b9e[60]](_0xb3c2xd[_0x4b9e[56]],_0xb3c2x1c)[_0x4b9e[15]](function(_0xb3c2x1d){if(!_0xb3c2x1d){return _0xb3c2xb[_0x4b9e[44]](404)};return _0xb3c2x1d})[_0x4b9e[15]](function(_0xb3c2x1d){return _0xb3c2xb[_0x4b9e[44]](200)})[_0x4b9e[14]](function(_0xb3c2xc){return handleError(_0xb3c2xb,_0xb3c2xc)})} \ No newline at end of file diff --git a/server/api/sms_room/sms_room.events.js b/server/api/sms_room/sms_room.events.js index a1390fd..2347927 100644 --- a/server/api/sms_room/sms_room.events.js +++ b/server/api/sms_room/sms_room.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SmsRoom = require('../../models').SmsRoom; - -var SmsRoomEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SmsRoomEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SmsRoom.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SmsRoomEvents.emit(event + ':' + doc._id, doc); - SmsRoomEvents.emit(event, doc); - done(null); - } -} - -module.exports = SmsRoomEvents; +var _0xcb6f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xcb6f[0];const EventEmitter=require(_0xcb6f[1]);const SmsRoom=require(_0xcb6f[3])[_0xcb6f[2]];var SmsRoomEvents= new EventEmitter();SmsRoomEvents[_0xcb6f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xcb6f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xcb6f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xcb6f[6]};for(var e in events){var event=events[e];SmsRoom[_0xcb6f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xa1bfx8,_0xa1bfx9,_0xa1bfxa){SmsRoomEvents[_0xcb6f[10]](event+ _0xcb6f[8]+ _0xa1bfx8[_0xcb6f[9]],_0xa1bfx8);SmsRoomEvents[_0xcb6f[10]](event,_0xa1bfx8);_0xa1bfxa(null)}}module[_0xcb6f[11]]= SmsRoomEvents \ No newline at end of file diff --git a/server/api/sms_room/sms_room.socket.js b/server/api/sms_room/sms_room.socket.js index fe08042..d2753bc 100644 --- a/server/api/sms_room/sms_room.socket.js +++ b/server/api/sms_room/sms_room.socket.js @@ -1,33 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SmsRoomEvents = require('./sms_room.events'); - -// Model events to emit -var events = ['save', 'save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('sms_room:' + event, socket); - - SmsRoomEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - - -function removeListener(event, listener) { - return function() { - SmsRoomEvents.removeListener(event, listener); - }; -} +var _0x1935=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x1935[0];const SmsRoomEvents=require(_0x1935[1]);var events=[_0x1935[2],_0x1935[2],_0x1935[3]];exports[_0x1935[4]]= function(_0x3108x3){for(var _0x3108x4=0,_0x3108x5=events[_0x1935[5]];_0x3108x4< _0x3108x5;_0x3108x4++){var _0x3108x6=events[_0x3108x4];var _0x3108x7=createListener(_0x1935[6]+ _0x3108x6,_0x3108x3);SmsRoomEvents[_0x1935[7]](_0x3108x6,_0x3108x7);_0x3108x3[_0x1935[7]](_0x1935[8],removeListener(_0x3108x6,_0x3108x7))}};function createListener(_0x3108x6,_0x3108x3){return function(_0x3108x9){_0x3108x3[_0x1935[9]](_0x3108x6,_0x3108x9)}}function removeListener(_0x3108x6,_0x3108x7){return function(){SmsRoomEvents[_0x1935[10]](_0x3108x6,_0x3108x7)}} \ No newline at end of file diff --git a/server/api/sound/index.js b/server/api/sound/index.js index ac4a804..9773bad 100644 --- a/server/api/sound/index.js +++ b/server/api/sound/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./sound.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([13, 7], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show); -router.get('/:id/download', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.download); -router.get('/:id/stream', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.stream); -router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy); - -module.exports = router; +var _0x829d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x6F\x75\x6E\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x2F\x3A\x69\x64\x2F\x73\x74\x72\x65\x61\x6D","\x73\x74\x72\x65\x61\x6D","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x829d[0];var express=require(_0x829d[1]);var controller=require(_0x829d[2]);var auth=require(_0x829d[3]);var router=express.Router();router[_0x829d[9]](_0x829d[4],auth[_0x829d[5]](),auth[_0x829d[7]]([13,7],[_0x829d[6]]),controller[_0x829d[8]]);router[_0x829d[9]](_0x829d[10],auth[_0x829d[5]](),auth[_0x829d[7]]([13],[_0x829d[6]]),controller[_0x829d[11]]);router[_0x829d[9]](_0x829d[12],auth[_0x829d[5]](),auth[_0x829d[7]]([13],[_0x829d[6]]),controller[_0x829d[13]]);router[_0x829d[9]](_0x829d[14],auth[_0x829d[5]](),auth[_0x829d[7]]([13],[_0x829d[6]]),controller[_0x829d[15]]);router[_0x829d[17]](_0x829d[4],auth[_0x829d[5]](),auth[_0x829d[7]]([13],[_0x829d[6]]),controller[_0x829d[16]]);router[_0x829d[19]](_0x829d[10],auth[_0x829d[5]](),auth[_0x829d[7]]([13],[_0x829d[6]]),controller[_0x829d[18]]);router[_0x829d[21]](_0x829d[10],auth[_0x829d[5]](),auth[_0x829d[7]]([13],[_0x829d[6]]),controller[_0x829d[20]]);module[_0x829d[22]]= router \ No newline at end of file diff --git a/server/api/sound/sound.controller.js b/server/api/sound/sound.controller.js index 9cc2d15..79701ce 100644 --- a/server/api/sound/sound.controller.js +++ b/server/api/sound/sound.controller.js @@ -1,278 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Sound = require('../../models').Sound; -var uploadFile = require('upload-file'); -var sr = require('simple-random'); -var sox = require('sox'); -var path = require('path'); -var config = require('../../config/environment'); -var fs = require('fs'); -var sequelize = require('../../models').sequelize; -var base64 = require('file-base64'); -var Promise = require('bluebird'); -var Setting = require('../../models').Setting; - -// Get list of Sounds -exports.index = function(req, res) { - return Sound - .findAndCountAll() - .then(function(Sounds) { - return res.status(200).send(Sounds); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single Sound -exports.show = function(req, res) { - return Sound - .findById(req.params.id) - .then(function(Sound) { - if (!Sound) { - return res.sendStatus(404); - } - return res.send(Sound); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new Sound in the DB. -exports.create = function(req, res) { - var upload = new uploadFile({ - dest: path.join(config.originalSounds), - maxFileSize: 15 * 1000000, - maxNumberOfFiles: 10, - minNumberOfFiles: 0, - acceptFileTypes: /(\.|\/)(wav|mp3|gsm|ogg)$/i, - rename: function(name, file) { - return sr() + path.extname(file.filename); - }, - messages: { - maxNumberOfFiles: "Max number of files upload exceeded", - acceptFileTypes: "Only wav,mp3,gsm, and ogg format accepted", - maxFileSize: "The maximum file size is 15 Mb", - invalidRequest: "Invalid request" - } - }); - - upload.on('end', function(fields, files) { - if (!files.file.filename) { - return res.status(500).send(upload); - } - - return Setting - .findById(1) - .then(function(settings) { - var job_details = {}; - var original_format = path.extname(files.file.filename); - job_details.description = ""; - job_details.original_format = path.extname(files.file.filename).substring(1); - job_details.converted_format = 'wav'; - job_details.name = job_details.display_name = path.basename(files.file.path, original_format); - job_details.save_name = path.basename(files.file.filename, original_format); - - - - var filepath = path.join(config.originalSounds, job_details.save_name + original_format); - var destination = path.join(settings.soundPath || '/var/opt/motion/server/files/sounds/converted', job_details.save_name + '.' + job_details.converted_format); - // - - fs.chmodSync(filepath, parseInt('0777', 8)); - sox.identify(filepath, function(err, result) { - // console.log('************** Result: ', result); - }); - - var job = sox.transcode(filepath, destination, { - sampleRate: 8000, - format: 'wav', - channelCount: 1, - bitRate: 192 * 1024, - compressionQuality: 5, - }); - - - - job.on('error', function(err) { - console.error('********** Conversion Error: ', err); - fs.unlink(filepath, function(err) { - if (err) - return handleError(res, err); - }); - return handleError(res, err); - }); - - job.on('progress', function(amountDone, amountTotal) { - // console.log("*********** Progress", amountDone, amountTotal); - }); - - job.on('src', function(info) { - // console.log('********** src: ', info); - /* info looks like: - { - format: 'wav', - duration: 1.5, - sampleCount: 66150, - channelCount: 1, - bitRate: 722944, - sampleRate: 44100, - } - */ - job_details.original_duration = isNaN(info.duration) ? null : info.duration * 1000; - job_details.original_sampleCount = isNaN(info.sampleCount) ? null : info.sampleCount; - job_details.original_channelCount = isNaN(info.channelCount) ? null : info.channelCount; - job_details.original_bitRate = isNaN(info.bitRate) ? null : info.bitRate; - job_details.original_sampleRate = isNaN(info.sampleRate) ? null : info.sampleRate; - }); - - job.on('dest', function(info) { - // console.log('********** dest: ', info); - /* info looks like: - { - sampleRate: 44100, - format: 'mp3', - channelCount: 2, - sampleCount: 67958, - duration: 1.540998, - bitRate: 196608, - } - */ - job_details.converted_duration = isNaN(info.duration) ? null : info.duration * 1000; - job_details.converted_sampleCount = isNaN(info.sampleCount) ? null : info.sampleCount; - job_details.converted_channelCount = isNaN(info.channelCount) ? null : info.channelCount; - job_details.converted_bitRate = isNaN(info.bitRate) ? null : info.bitRate; - job_details.converted_sampleRate = isNaN(info.sampleRate) ? null : info.sampleRate; - }); - - job.on('end', function() { - console.log("Conversion completed"); - fs.chmodSync(destination, parseInt('0777', 8)); - return Sound - .create(job_details) - .then(function(sound) { - return res.status(201).send(sound); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - }); - - job.start(); - }) - .catch(function(err) { - return handleError(res, err); - }); - - - }); - - upload.on('error', function(err) { - console.log('********** Upload error :', err) - return handleError(res, err); - }); - - upload.parse(req); -}; - -// Updates an existing upload in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return Sound - .findById(req.params.id) - .then(function(sound) { - if (!sound) { - return res.sendStatus(404); - } - var updated = _.merge(sound, req.body); - return updated.save(); - }) - .then(function(sound) { - return res.status(200).send(sound); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a Sound from the DB. -exports.destroy = function(req, res) { - var _settings; - return Setting - .findById(1) - .then(function(settings) { - _settings = settings; - return Sound - .findById(req.params.id); - }) - .then(function(sound) { - if (!sound) { - return res.sendStatus(404); - } - var original_filepath = path.join(config.originalSounds, sound.save_name + '.' + sound.original_format); - var converted_filepath = path.join(_settings.soundPath || '/var/opt/motion/server/files/sounds/converted', sound.save_name + '.' + sound.converted_format); - return sequelize.transaction(function(t) { - return sound.destroy({ - transaction: t - }) - .then(function() { - fs.unlink(original_filepath, function(err) { - if (err) - return handleError(res, err); - }); - fs.unlink(converted_filepath, function(err) { - if (err) - return handleError(res, err); - }); - return res.status(200).send(sound); - }) - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -//Download an uploaded file -exports.download = function(req, res) { - getStream(req, res, 'original'); -}; - -//Stream an uploaded file -exports.stream = function(req, res) { - getStream(req, res, 'converted'); -} - - -function getStream(req, res, value) { - return Sound - .findById(req.params.id) - .then(function(sound) { - var readFile = Promise.promisify(fs.readFile); - return readFile(path.join(config[value + 'Sounds'], sound.save_name + '.' + sound[value + '_format'])); - }) - .then(function(result) { - var base64String = new Buffer(result, 'binary').toString('base64'); - return base64String; - }) - .then(function(base64String) { - return res.status(200).send({ - downloadString: base64String - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -} - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x962a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x73\x6F\x78","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x66\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x62\x6C\x75\x65\x62\x69\x72\x64","\x53\x65\x74\x74\x69\x6E\x67","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x53\x6F\x75\x6E\x64\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x77\x61\x76\x2C\x6D\x70\x33\x2C\x67\x73\x6D\x2C\x20\x61\x6E\x64\x20\x6F\x67\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x54\x68\x65\x20\x6D\x61\x78\x69\x6D\x75\x6D\x20\x66\x69\x6C\x65\x20\x73\x69\x7A\x65\x20\x69\x73\x20\x31\x35\x20\x4D\x62","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x66\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x6E\x61\x6D\x65","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x73\x6F\x75\x6E\x64\x50\x61\x74\x68","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x2E","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x69\x64\x65\x6E\x74\x69\x66\x79","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x65\x72\x72\x6F\x72","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x45\x72\x72\x6F\x72\x3A\x20","\x75\x6E\x6C\x69\x6E\x6B","\x6F\x6E","\x70\x72\x6F\x67\x72\x65\x73\x73","\x73\x72\x63","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x62\x69\x74\x52\x61\x74\x65","\x62\x69\x74\x52\x61\x74\x65","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x64\x65\x73\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x63\x68\x61\x6E\x6E\x65\x6C\x43\x6F\x75\x6E\x74","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x62\x69\x74\x52\x61\x74\x65","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x5F\x73\x61\x6D\x70\x6C\x65\x52\x61\x74\x65","\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x6C\x6F\x67","\x73\x74\x61\x72\x74","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x75\x70\x64\x61\x74\x65","\x62\x6F\x64\x79","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x6F\x72\x69\x67\x69\x6E\x61\x6C","\x73\x74\x72\x65\x61\x6D","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x53\x6F\x75\x6E\x64\x73","\x5F\x66\x6F\x72\x6D\x61\x74"];_0x962a[0];var _=require(_0x962a[1]);var Sound=require(_0x962a[3])[_0x962a[2]];var uploadFile=require(_0x962a[4]);var sr=require(_0x962a[5]);var sox=require(_0x962a[6]);var path=require(_0x962a[7]);var config=require(_0x962a[8]);var fs=require(_0x962a[9]);var sequelize=require(_0x962a[3])[_0x962a[10]];var base64=require(_0x962a[11]);var Promise=require(_0x962a[12]);var Setting=require(_0x962a[3])[_0x962a[13]];exports[_0x962a[14]]= function(_0x64ebxd,_0x64ebxe){return Sound[_0x962a[19]]()[_0x962a[18]](function(_0x64ebx10){return _0x64ebxe[_0x962a[17]](200)[_0x962a[16]](_0x64ebx10)})[_0x962a[15]](function(_0x64ebxf){return handleError(_0x64ebxe,_0x64ebxf)})};exports[_0x962a[20]]= function(_0x64ebxd,_0x64ebxe){return Sound[_0x962a[24]](_0x64ebxd[_0x962a[23]][_0x962a[22]])[_0x962a[18]](function(Sound){if(!Sound){return _0x64ebxe[_0x962a[21]](404)};return _0x64ebxe[_0x962a[16]](Sound)})[_0x962a[15]](function(_0x64ebxf){return handleError(_0x64ebxe,_0x64ebxf)})};exports[_0x962a[25]]= function(_0x64ebxd,_0x64ebxe){var _0x64ebx11= new uploadFile({dest:path[_0x962a[27]](config[_0x962a[26]]),maxFileSize:15* 1000000,maxNumberOfFiles:10,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(wav|mp3|gsm|ogg)$/i,rename:function(_0x64ebx12,_0x64ebx13){return sr()+ path[_0x962a[29]](_0x64ebx13[_0x962a[28]])},messages:{maxNumberOfFiles:_0x962a[30],acceptFileTypes:_0x962a[31],maxFileSize:_0x962a[32],invalidRequest:_0x962a[33]}});_0x64ebx11[_0x962a[56]](_0x962a[34],function(_0x64ebx14,_0x64ebx15){if(!_0x64ebx15[_0x962a[35]][_0x962a[28]]){return _0x64ebxe[_0x962a[17]](500)[_0x962a[16]](_0x64ebx11)};return Setting[_0x962a[24]](1)[_0x962a[18]](function(_0x64ebx16){var _0x64ebx17={};var _0x64ebx18=path[_0x962a[29]](_0x64ebx15[_0x962a[35]][_0x962a[28]]);_0x64ebx17[_0x962a[36]]= _0x962a[37];_0x64ebx17[_0x962a[38]]= path[_0x962a[29]](_0x64ebx15[_0x962a[35]][_0x962a[28]])[_0x962a[39]](1);_0x64ebx17[_0x962a[40]]= _0x962a[41];_0x64ebx17[_0x962a[42]]= _0x64ebx17[_0x962a[43]]= path[_0x962a[44]](_0x64ebx15[_0x962a[35]][_0x962a[7]],_0x64ebx18);_0x64ebx17[_0x962a[45]]= path[_0x962a[44]](_0x64ebx15[_0x962a[35]][_0x962a[28]],_0x64ebx18);var _0x64ebx19=path[_0x962a[27]](config[_0x962a[26]],_0x64ebx17[_0x962a[45]]+ _0x64ebx18);var _0x64ebx1a=path[_0x962a[27]](_0x64ebx16[_0x962a[46]]|| _0x962a[47],_0x64ebx17[_0x962a[45]]+ _0x962a[48]+ _0x64ebx17[_0x962a[40]]);fs[_0x962a[50]](_0x64ebx19,parseInt(_0x962a[49],8));sox[_0x962a[51]](_0x64ebx19,function(_0x64ebxf,_0x64ebx1b){});var _0x64ebx1c=sox[_0x962a[52]](_0x64ebx19,_0x64ebx1a,{sampleRate:8000,format:_0x962a[41],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0x64ebx1c[_0x962a[56]](_0x962a[53],function(_0x64ebxf){console[_0x962a[53]](_0x962a[54],_0x64ebxf);fs[_0x962a[55]](_0x64ebx19,function(_0x64ebxf){if(_0x64ebxf){return handleError(_0x64ebxe,_0x64ebxf)}});return handleError(_0x64ebxe,_0x64ebxf)});_0x64ebx1c[_0x962a[56]](_0x962a[57],function(_0x64ebx1d,_0x64ebx1e){});_0x64ebx1c[_0x962a[56]](_0x962a[58],function(_0x64ebx1f){_0x64ebx17[_0x962a[59]]= isNaN(_0x64ebx1f[_0x962a[60]])?null:_0x64ebx1f[_0x962a[60]]* 1000;_0x64ebx17[_0x962a[61]]= isNaN(_0x64ebx1f[_0x962a[62]])?null:_0x64ebx1f[_0x962a[62]];_0x64ebx17[_0x962a[63]]= isNaN(_0x64ebx1f[_0x962a[64]])?null:_0x64ebx1f[_0x962a[64]];_0x64ebx17[_0x962a[65]]= isNaN(_0x64ebx1f[_0x962a[66]])?null:_0x64ebx1f[_0x962a[66]];_0x64ebx17[_0x962a[67]]= isNaN(_0x64ebx1f[_0x962a[68]])?null:_0x64ebx1f[_0x962a[68]]});_0x64ebx1c[_0x962a[56]](_0x962a[69],function(_0x64ebx1f){_0x64ebx17[_0x962a[70]]= isNaN(_0x64ebx1f[_0x962a[60]])?null:_0x64ebx1f[_0x962a[60]]* 1000;_0x64ebx17[_0x962a[71]]= isNaN(_0x64ebx1f[_0x962a[62]])?null:_0x64ebx1f[_0x962a[62]];_0x64ebx17[_0x962a[72]]= isNaN(_0x64ebx1f[_0x962a[64]])?null:_0x64ebx1f[_0x962a[64]];_0x64ebx17[_0x962a[73]]= isNaN(_0x64ebx1f[_0x962a[66]])?null:_0x64ebx1f[_0x962a[66]];_0x64ebx17[_0x962a[74]]= isNaN(_0x64ebx1f[_0x962a[68]])?null:_0x64ebx1f[_0x962a[68]]});_0x64ebx1c[_0x962a[56]](_0x962a[34],function(){console[_0x962a[76]](_0x962a[75]);fs[_0x962a[50]](_0x64ebx1a,parseInt(_0x962a[49],8));return Sound[_0x962a[25]](_0x64ebx17)[_0x962a[18]](function(_0x64ebx20){return _0x64ebxe[_0x962a[17]](201)[_0x962a[16]](_0x64ebx20)})[_0x962a[15]](function(_0x64ebxf){console[_0x962a[76]](_0x64ebxf);return handleError(_0x64ebxe,_0x64ebxf)})});_0x64ebx1c[_0x962a[77]]()})[_0x962a[15]](function(_0x64ebxf){return handleError(_0x64ebxe,_0x64ebxf)})});_0x64ebx11[_0x962a[56]](_0x962a[53],function(_0x64ebxf){console[_0x962a[76]](_0x962a[78],_0x64ebxf);return handleError(_0x64ebxe,_0x64ebxf)});_0x64ebx11[_0x962a[79]](_0x64ebxd)};exports[_0x962a[80]]= function(_0x64ebxd,_0x64ebxe){if(_0x64ebxd[_0x962a[81]][_0x962a[22]]){delete _0x64ebxd[_0x962a[81]][_0x962a[22]]};return Sound[_0x962a[24]](_0x64ebxd[_0x962a[23]][_0x962a[22]])[_0x962a[18]](function(_0x64ebx20){if(!_0x64ebx20){return _0x64ebxe[_0x962a[21]](404)};var _0x64ebx21=_[_0x962a[82]](_0x64ebx20,_0x64ebxd[_0x962a[81]]);return _0x64ebx21[_0x962a[83]]()})[_0x962a[18]](function(_0x64ebx20){return _0x64ebxe[_0x962a[17]](200)[_0x962a[16]](_0x64ebx20)})[_0x962a[15]](function(_0x64ebxf){return handleError(_0x64ebxe,_0x64ebxf)})};exports[_0x962a[84]]= function(_0x64ebxd,_0x64ebxe){var _0x64ebx22;return Setting[_0x962a[24]](1)[_0x962a[18]](function(_0x64ebx16){_0x64ebx22= _0x64ebx16;return Sound[_0x962a[24]](_0x64ebxd[_0x962a[23]][_0x962a[22]])})[_0x962a[18]](function(_0x64ebx20){if(!_0x64ebx20){return _0x64ebxe[_0x962a[21]](404)};var _0x64ebx23=path[_0x962a[27]](config[_0x962a[26]],_0x64ebx20[_0x962a[45]]+ _0x962a[48]+ _0x64ebx20[_0x962a[38]]);var _0x64ebx24=path[_0x962a[27]](_0x64ebx22[_0x962a[46]]|| _0x962a[47],_0x64ebx20[_0x962a[45]]+ _0x962a[48]+ _0x64ebx20[_0x962a[40]]);return sequelize[_0x962a[85]](function(_0x64ebx25){return _0x64ebx20[_0x962a[84]]({transaction:_0x64ebx25})[_0x962a[18]](function(){fs[_0x962a[55]](_0x64ebx23,function(_0x64ebxf){if(_0x64ebxf){return handleError(_0x64ebxe,_0x64ebxf)}});fs[_0x962a[55]](_0x64ebx24,function(_0x64ebxf){if(_0x64ebxf){return handleError(_0x64ebxe,_0x64ebxf)}});return _0x64ebxe[_0x962a[17]](200)[_0x962a[16]](_0x64ebx20)})})[_0x962a[15]](function(_0x64ebxf){return handleError(_0x64ebxe,_0x64ebxf)})})[_0x962a[15]](function(_0x64ebxf){return handleError(_0x64ebxe,_0x64ebxf)})};exports[_0x962a[86]]= function(_0x64ebxd,_0x64ebxe){getStream(_0x64ebxd,_0x64ebxe,_0x962a[87])};exports[_0x962a[88]]= function(_0x64ebxd,_0x64ebxe){getStream(_0x64ebxd,_0x64ebxe,_0x962a[89])};function getStream(_0x64ebxd,_0x64ebxe,_0x64ebx27){return Sound[_0x962a[24]](_0x64ebxd[_0x962a[23]][_0x962a[22]])[_0x962a[18]](function(_0x64ebx20){var _0x64ebx29=Promise[_0x962a[93]](fs[_0x962a[92]]);return _0x64ebx29(path[_0x962a[27]](config[_0x64ebx27+ _0x962a[94]],_0x64ebx20[_0x962a[45]]+ _0x962a[48]+ _0x64ebx20[_0x64ebx27+ _0x962a[95]]))})[_0x962a[18]](function(_0x64ebx1b){var _0x64ebx28= new Buffer(_0x64ebx1b,_0x962a[91]).toString(_0x962a[90]);return _0x64ebx28})[_0x962a[18]](function(_0x64ebx28){return _0x64ebxe[_0x962a[17]](200)[_0x962a[16]]({downloadString:_0x64ebx28})})[_0x962a[15]](function(_0x64ebxf){console[_0x962a[76]](_0x64ebxf);return handleError(_0x64ebxe,_0x64ebxf)})}function handleError(_0x64ebxe,_0x64ebxf){return _0x64ebxe[_0x962a[17]](500)[_0x962a[16]](_0x64ebxf)} \ No newline at end of file diff --git a/server/api/sound/sound.events.js b/server/api/sound/sound.events.js index ce73c5a..0e3ddbe 100644 --- a/server/api/sound/sound.events.js +++ b/server/api/sound/sound.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Sound = require('../../models').Sound; - -var SoundEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SoundEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Sound.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SoundEvents.emit(event + ':' + doc._id, doc); - SoundEvents.emit(event, doc); - done(null); - } -} - -module.exports = SoundEvents; +var _0x27a5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x27a5[0];const EventEmitter=require(_0x27a5[1]);const Sound=require(_0x27a5[3])[_0x27a5[2]];var SoundEvents= new EventEmitter();SoundEvents[_0x27a5[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x27a5[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x27a5[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x27a5[6]};for(var e in events){var event=events[e];Sound[_0x27a5[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x5c29x8,_0x5c29x9,_0x5c29xa){SoundEvents[_0x27a5[10]](event+ _0x27a5[8]+ _0x5c29x8[_0x27a5[9]],_0x5c29x8);SoundEvents[_0x27a5[10]](event,_0x5c29x8);_0x5c29xa(null)}}module[_0x27a5[11]]= SoundEvents \ No newline at end of file diff --git a/server/api/sound/sound.socket.js b/server/api/sound/sound.socket.js index 137a669..48e11a1 100644 --- a/server/api/sound/sound.socket.js +++ b/server/api/sound/sound.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SoundEvents = require('./sound.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('sound:' + event, socket); - - SoundEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SoundEvents.removeListener(event, listener); - }; -} +var _0x357a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x6F\x75\x6E\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x6F\x75\x6E\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x357a[0];const SoundEvents=require(_0x357a[1]);var events=[_0x357a[2],_0x357a[3]];exports[_0x357a[4]]= function(_0x3735x3){for(var _0x3735x4=0,_0x3735x5=events[_0x357a[5]];_0x3735x4< _0x3735x5;_0x3735x4++){var _0x3735x6=events[_0x3735x4];var _0x3735x7=createListener(_0x357a[6]+ _0x3735x6,_0x3735x3);SoundEvents[_0x357a[7]](_0x3735x6,_0x3735x7);_0x3735x3[_0x357a[7]](_0x357a[8],removeListener(_0x3735x6,_0x3735x7))}};function createListener(_0x3735x6,_0x3735x3){return function(_0x3735x9){_0x3735x3[_0x357a[9]](_0x3735x6,_0x3735x9)}}function removeListener(_0x3735x6,_0x3735x7){return function(){SoundEvents[_0x357a[10]](_0x3735x6,_0x3735x7)}} \ No newline at end of file diff --git a/server/api/square_odbc/index.js b/server/api/square_odbc/index.js index b6dd309..fdb8943 100644 --- a/server/api/square_odbc/index.js +++ b/server/api/square_odbc/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./square_odbc.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.index); -router.get('/:id/check', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.checkConnection); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.destroy); - -module.exports = router; +var _0x5651=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x5651[0];var express=require(_0x5651[1]);var controller=require(_0x5651[2]);var auth=require(_0x5651[3]);var router=express.Router();router[_0x5651[9]](_0x5651[4],auth[_0x5651[5]](),auth[_0x5651[7]]([14],[_0x5651[6]]),controller[_0x5651[8]]);router[_0x5651[9]](_0x5651[10],auth[_0x5651[5]](),auth[_0x5651[7]]([14],[_0x5651[6]]),controller[_0x5651[11]]);router[_0x5651[9]](_0x5651[12],auth[_0x5651[5]](),auth[_0x5651[7]]([14],[_0x5651[6]]),controller[_0x5651[13]]);router[_0x5651[15]](_0x5651[4],auth[_0x5651[5]](),auth[_0x5651[7]]([14],[_0x5651[6]]),controller[_0x5651[14]]);router[_0x5651[17]](_0x5651[12],auth[_0x5651[5]](),auth[_0x5651[7]]([14],[_0x5651[6]]),controller[_0x5651[16]]);router[_0x5651[19]](_0x5651[4],auth[_0x5651[5]](),auth[_0x5651[7]]([14],[_0x5651[6]]),controller[_0x5651[18]]);router[_0x5651[19]](_0x5651[12],auth[_0x5651[5]](),auth[_0x5651[7]]([14],[_0x5651[6]]),controller[_0x5651[20]]);module[_0x5651[21]]= router \ No newline at end of file diff --git a/server/api/square_odbc/square_odbc.controller.js b/server/api/square_odbc/square_odbc.controller.js index 69af149..e4dffdc 100644 --- a/server/api/square_odbc/square_odbc.controller.js +++ b/server/api/square_odbc/square_odbc.controller.js @@ -1,135 +1 @@ -'use strict'; - -var _ = require('lodash'); -var db = require("odbc")(); - -var SquareOdbc = require('../../models').SquareOdbc; -var Util = require('../../config/util'); - -// Get list of square_odbcs -exports.index = function(req, res) { - return SquareOdbc - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single square_odbc -exports.show = function(req, res) { - return SquareOdbc - .findById(req.params.id) - .then(function(square_odbc) { - if (!square_odbc) { - return res.sendStatus(404); - } - return res.send(square_odbc); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new square_odbc in the DB. -exports.create = function(req, res) { - return SquareOdbc - .create(req.body) - .then(function(square_odbc) { - return res.status(201).send(square_odbc); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing square_odbc in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SquareOdbc - .findById(req.params.id) - .then(function(square_odbc) { - if (!square_odbc) { - return res.sendStatus(404); - } - var updated = _.merge(square_odbc, req.body); - updated.save() - .then(function() { - return res.status(200).send(square_odbc); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a square_odbc from the DB. -exports.destroy = function(req, res) { - return SquareOdbc - .findById(req.params.id) - .then(function(odbc) { - if (!odbc) { - return res.sendStatus(404); - } - return odbc - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a square_project from the DB. -exports.bulkDestroy = function(req, res) { - return SquareOdbc - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.checkConnection = function(req, res) { - return SquareOdbc - .findById(req.params.id) - .then(function(square_odbc) { - if (!square_odbc) { - return res.sendStatus(404); - } - db.open(square_odbc.dsn, function(err) { - if (err) { - return handleError(res, err); - } - db.close(function(err) { - if (err) { - return handleError(res, err); - } - return res.sendStatus(200); - }) - }) - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x8f8f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6F\x64\x62\x63","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x63\x68\x65\x63\x6B\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x64\x73\x6E","\x63\x6C\x6F\x73\x65","\x6F\x70\x65\x6E"];_0x8f8f[0];var _=require(_0x8f8f[1]);var db=require(_0x8f8f[2])();var SquareOdbc=require(_0x8f8f[4])[_0x8f8f[3]];var Util=require(_0x8f8f[5]);exports[_0x8f8f[6]]= function(_0x164dx5,_0x164dx6){return SquareOdbc[_0x8f8f[13]](Util[_0x8f8f[12]](_0x164dx5[_0x8f8f[11]]))[_0x8f8f[10]](function(_0x164dx8){_0x164dx6[_0x8f8f[9]](200)[_0x8f8f[8]](_0x164dx8)})[_0x8f8f[7]](function(_0x164dx7){return handleError(_0x164dx6,_0x164dx7)})};exports[_0x8f8f[14]]= function(_0x164dx5,_0x164dx6){return SquareOdbc[_0x8f8f[18]](_0x164dx5[_0x8f8f[17]][_0x8f8f[16]])[_0x8f8f[10]](function(_0x164dx9){if(!_0x164dx9){return _0x164dx6[_0x8f8f[15]](404)};return _0x164dx6[_0x8f8f[8]](_0x164dx9)})[_0x8f8f[7]](function(_0x164dx7){return handleError(_0x164dx6,_0x164dx7)})};exports[_0x8f8f[19]]= function(_0x164dx5,_0x164dx6){return SquareOdbc[_0x8f8f[19]](_0x164dx5[_0x8f8f[20]])[_0x8f8f[10]](function(_0x164dx9){return _0x164dx6[_0x8f8f[9]](201)[_0x8f8f[8]](_0x164dx9)})[_0x8f8f[7]](function(_0x164dx7){return handleError(_0x164dx6,_0x164dx7)})};exports[_0x8f8f[21]]= function(_0x164dx5,_0x164dx6){if(_0x164dx5[_0x8f8f[20]][_0x8f8f[16]]){delete _0x164dx5[_0x8f8f[20]][_0x8f8f[16]]};return SquareOdbc[_0x8f8f[18]](_0x164dx5[_0x8f8f[17]][_0x8f8f[16]])[_0x8f8f[10]](function(_0x164dx9){if(!_0x164dx9){return _0x164dx6[_0x8f8f[15]](404)};var _0x164dxa=_[_0x8f8f[22]](_0x164dx9,_0x164dx5[_0x8f8f[20]]);_0x164dxa[_0x8f8f[23]]()[_0x8f8f[10]](function(){return _0x164dx6[_0x8f8f[9]](200)[_0x8f8f[8]](_0x164dx9)})[_0x8f8f[7]](function(_0x164dx7){return handleError(_0x164dx6,_0x164dx7)})})[_0x8f8f[7]](function(_0x164dx7){return handleError(_0x164dx6,_0x164dx7)})};exports[_0x8f8f[24]]= function(_0x164dx5,_0x164dx6){return SquareOdbc[_0x8f8f[18]](_0x164dx5[_0x8f8f[17]][_0x8f8f[16]])[_0x8f8f[10]](function(_0x164dxb){if(!_0x164dxb){return _0x164dx6[_0x8f8f[15]](404)};return _0x164dxb[_0x8f8f[24]]()})[_0x8f8f[10]](function(){return _0x164dx6[_0x8f8f[15]](204)})[_0x8f8f[7]](function(_0x164dx7){return handleError(_0x164dx6,_0x164dx7)})};exports[_0x8f8f[25]]= function(_0x164dx5,_0x164dx6){return SquareOdbc[_0x8f8f[24]]({where:{id:_0x164dx5[_0x8f8f[11]][_0x8f8f[26]]},individualHooks:true})[_0x8f8f[10]](function(){return _0x164dx6[_0x8f8f[15]](204)})[_0x8f8f[7]](function(_0x164dx7){return handleError(_0x164dx6,_0x164dx7)})};exports[_0x8f8f[27]]= function(_0x164dx5,_0x164dx6){return SquareOdbc[_0x8f8f[18]](_0x164dx5[_0x8f8f[17]][_0x8f8f[16]])[_0x8f8f[10]](function(_0x164dx9){if(!_0x164dx9){return _0x164dx6[_0x8f8f[15]](404)};db[_0x8f8f[30]](_0x164dx9[_0x8f8f[28]],function(_0x164dx7){if(_0x164dx7){return handleError(_0x164dx6,_0x164dx7)};db[_0x8f8f[29]](function(_0x164dx7){if(_0x164dx7){return handleError(_0x164dx6,_0x164dx7)};return _0x164dx6[_0x8f8f[15]](200)})})})[_0x8f8f[7]](function(_0x164dx7){return handleError(_0x164dx6,_0x164dx7)})};function handleError(_0x164dx6,_0x164dx7){return _0x164dx6[_0x8f8f[9]](500)[_0x8f8f[8]](_0x164dx7)} \ No newline at end of file diff --git a/server/api/square_odbc/square_odbc.events.js b/server/api/square_odbc/square_odbc.events.js index 1f9776a..88c5da2 100644 --- a/server/api/square_odbc/square_odbc.events.js +++ b/server/api/square_odbc/square_odbc.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SquareOdbc = require('../../models').SquareOdbc; - -var SquareOdbcEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SquareOdbcEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SquareOdbc.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SquareOdbcEvents.emit(event + ':' + doc._id, doc); - SquareOdbcEvents.emit(event, doc); - done(null); - } -} - -module.exports = SquareOdbcEvents; +var _0xedea=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xedea[0];const EventEmitter=require(_0xedea[1]);const SquareOdbc=require(_0xedea[3])[_0xedea[2]];var SquareOdbcEvents= new EventEmitter();SquareOdbcEvents[_0xedea[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xedea[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xedea[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xedea[6]};for(var e in events){var event=events[e];SquareOdbc[_0xedea[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xba7bx8,_0xba7bx9,_0xba7bxa){SquareOdbcEvents[_0xedea[10]](event+ _0xedea[8]+ _0xba7bx8[_0xedea[9]],_0xba7bx8);SquareOdbcEvents[_0xedea[10]](event,_0xba7bx8);_0xba7bxa(null)}}module[_0xedea[11]]= SquareOdbcEvents \ No newline at end of file diff --git a/server/api/square_odbc/square_odbc.socket.js b/server/api/square_odbc/square_odbc.socket.js index 34d555e..dc4af31 100644 --- a/server/api/square_odbc/square_odbc.socket.js +++ b/server/api/square_odbc/square_odbc.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SquareOdbcEvents = require('./square_odbc.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('square_odbc:' + event, socket); - - SquareOdbcEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SquareOdbcEvents.removeListener(event, listener); - }; -} +var _0x2a5f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x2a5f[0];const SquareOdbcEvents=require(_0x2a5f[1]);var events=[_0x2a5f[2],_0x2a5f[3]];exports[_0x2a5f[4]]= function(_0xdb1ex3){for(var _0xdb1ex4=0,_0xdb1ex5=events[_0x2a5f[5]];_0xdb1ex4< _0xdb1ex5;_0xdb1ex4++){var _0xdb1ex6=events[_0xdb1ex4];var _0xdb1ex7=createListener(_0x2a5f[6]+ _0xdb1ex6,_0xdb1ex3);SquareOdbcEvents[_0x2a5f[7]](_0xdb1ex6,_0xdb1ex7);_0xdb1ex3[_0x2a5f[7]](_0x2a5f[8],removeListener(_0xdb1ex6,_0xdb1ex7))}};function createListener(_0xdb1ex6,_0xdb1ex3){return function(_0xdb1ex9){_0xdb1ex3[_0x2a5f[9]](_0xdb1ex6,_0xdb1ex9)}}function removeListener(_0xdb1ex6,_0xdb1ex7){return function(){SquareOdbcEvents[_0x2a5f[10]](_0xdb1ex6,_0xdb1ex7)}} \ No newline at end of file diff --git a/server/api/square_project/index.js b/server/api/square_project/index.js index 0b1c55e..36ff8b8 100644 --- a/server/api/square_project/index.js +++ b/server/api/square_project/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./square_project.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([14, 7], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.show); -router.get('/:id/download', controller.download); -router.post('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.destroy); - -module.exports = router; +var _0x5a7e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x5a7e[0];var express=require(_0x5a7e[1]);var controller=require(_0x5a7e[2]);var auth=require(_0x5a7e[3]);var router=express.Router();router[_0x5a7e[9]](_0x5a7e[4],auth[_0x5a7e[5]](),auth[_0x5a7e[7]]([14,7],[_0x5a7e[6]]),controller[_0x5a7e[8]]);router[_0x5a7e[9]](_0x5a7e[10],auth[_0x5a7e[5]](),auth[_0x5a7e[7]]([14],[_0x5a7e[6]]),controller[_0x5a7e[11]]);router[_0x5a7e[9]](_0x5a7e[12],controller[_0x5a7e[13]]);router[_0x5a7e[15]](_0x5a7e[4],auth[_0x5a7e[5]](),auth[_0x5a7e[7]]([14],[_0x5a7e[6]]),controller[_0x5a7e[14]]);router[_0x5a7e[17]](_0x5a7e[10],auth[_0x5a7e[5]](),auth[_0x5a7e[7]]([14],[_0x5a7e[6]]),controller[_0x5a7e[16]]);router[_0x5a7e[19]](_0x5a7e[4],auth[_0x5a7e[5]](),auth[_0x5a7e[7]]([14],[_0x5a7e[6]]),controller[_0x5a7e[18]]);router[_0x5a7e[19]](_0x5a7e[10],auth[_0x5a7e[5]](),auth[_0x5a7e[7]]([14],[_0x5a7e[6]]),controller[_0x5a7e[20]]);module[_0x5a7e[21]]= router \ No newline at end of file diff --git a/server/api/square_project/square_project.controller.js b/server/api/square_project/square_project.controller.js index 46766e9..24be338 100644 --- a/server/api/square_project/square_project.controller.js +++ b/server/api/square_project/square_project.controller.js @@ -1,133 +1 @@ -'use strict'; - -var _ = require('lodash'); -var path = require('path'); -var config = require('../../config/environment'); -var Util = require('../../config/util'); - -var SquareProject = require('../../models').SquareProject; - -// Get list of square_projects -exports.index = function(req, res) { - return SquareProject - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single square_project -exports.show = function(req, res) { - return SquareProject - .findById(req.params.id) - .then(function(square_project) { - if (!square_project) { - return res.sendStatus(404); - } - return res.send(square_project); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new square_project in the DB. -exports.create = function(req, res) { - return SquareProject - .create(req.body) - .then(function(square_project) { - return res.status(201).send(square_project); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing square_project in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - delete req.body.name; - return SquareProject - .findById(req.params.id) - .then(function(square_project) { - if (!square_project) { - return res.sendStatus(404); - } - var updated = _.merge(square_project, req.body); - updated.save() - .then(function() { - return res.status(200).send(square_project); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a square_project from the DB. -exports.destroy = function(req, res) { - return SquareProject - .findById(req.params.id) - .then(function(project) { - if (!project) { - return res.sendStatus(404); - } - return project - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a square_project from the DB. -exports.bulkDestroy = function(req, res) { - return SquareProject - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.download = function(req, res, next) { - SquareProject - .findById(req.params.id) - .then(function(square_project) { - if (!square_project) { - return res.sendStatus(404); - } - console.log(req.query.filename); - res.set({ - "Content-Disposition": "attachment; filename=\"" + req.query.filename + - ".xml\"", - "Content-Type": "txt/xml" - }); - return res.send(square_project.preproduction); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xeb3f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6E\x61\x6D\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x6C\x6F\x67","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x3B\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x3D\x22","\x2E\x78\x6D\x6C\x22","\x74\x78\x74\x2F\x78\x6D\x6C","\x73\x65\x74","\x70\x72\x65\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E"];_0xeb3f[0];var _=require(_0xeb3f[1]);var path=require(_0xeb3f[2]);var config=require(_0xeb3f[3]);var Util=require(_0xeb3f[4]);var SquareProject=require(_0xeb3f[6])[_0xeb3f[5]];exports[_0xeb3f[7]]= function(_0xaedfx6,_0xaedfx7){return SquareProject[_0xeb3f[14]](Util[_0xeb3f[13]](_0xaedfx6[_0xeb3f[12]]))[_0xeb3f[11]](function(_0xaedfx9){_0xaedfx7[_0xeb3f[10]](200)[_0xeb3f[9]](_0xaedfx9)})[_0xeb3f[8]](function(_0xaedfx8){return handleError(_0xaedfx7,_0xaedfx8)})};exports[_0xeb3f[15]]= function(_0xaedfx6,_0xaedfx7){return SquareProject[_0xeb3f[19]](_0xaedfx6[_0xeb3f[18]][_0xeb3f[17]])[_0xeb3f[11]](function(_0xaedfxa){if(!_0xaedfxa){return _0xaedfx7[_0xeb3f[16]](404)};return _0xaedfx7[_0xeb3f[9]](_0xaedfxa)})[_0xeb3f[8]](function(_0xaedfx8){return handleError(_0xaedfx7,_0xaedfx8)})};exports[_0xeb3f[20]]= function(_0xaedfx6,_0xaedfx7){return SquareProject[_0xeb3f[20]](_0xaedfx6[_0xeb3f[21]])[_0xeb3f[11]](function(_0xaedfxa){return _0xaedfx7[_0xeb3f[10]](201)[_0xeb3f[9]](_0xaedfxa)})[_0xeb3f[8]](function(_0xaedfx8){return handleError(_0xaedfx7,_0xaedfx8)})};exports[_0xeb3f[22]]= function(_0xaedfx6,_0xaedfx7){if(_0xaedfx6[_0xeb3f[21]][_0xeb3f[17]]){delete _0xaedfx6[_0xeb3f[21]][_0xeb3f[17]]};delete _0xaedfx6[_0xeb3f[21]][_0xeb3f[23]];return SquareProject[_0xeb3f[19]](_0xaedfx6[_0xeb3f[18]][_0xeb3f[17]])[_0xeb3f[11]](function(_0xaedfxa){if(!_0xaedfxa){return _0xaedfx7[_0xeb3f[16]](404)};var _0xaedfxb=_[_0xeb3f[24]](_0xaedfxa,_0xaedfx6[_0xeb3f[21]]);_0xaedfxb[_0xeb3f[25]]()[_0xeb3f[11]](function(){return _0xaedfx7[_0xeb3f[10]](200)[_0xeb3f[9]](_0xaedfxa)})[_0xeb3f[8]](function(_0xaedfx8){return handleError(_0xaedfx7,_0xaedfx8)})})[_0xeb3f[8]](function(_0xaedfx8){return handleError(_0xaedfx7,_0xaedfx8)})};exports[_0xeb3f[26]]= function(_0xaedfx6,_0xaedfx7){return SquareProject[_0xeb3f[19]](_0xaedfx6[_0xeb3f[18]][_0xeb3f[17]])[_0xeb3f[11]](function(_0xaedfxc){if(!_0xaedfxc){return _0xaedfx7[_0xeb3f[16]](404)};return _0xaedfxc[_0xeb3f[26]]()})[_0xeb3f[11]](function(){return _0xaedfx7[_0xeb3f[16]](204)})[_0xeb3f[8]](function(_0xaedfx8){return handleError(_0xaedfx7,_0xaedfx8)})};exports[_0xeb3f[27]]= function(_0xaedfx6,_0xaedfx7){return SquareProject[_0xeb3f[26]]({where:{id:_0xaedfx6[_0xeb3f[12]][_0xeb3f[28]]},individualHooks:true})[_0xeb3f[11]](function(){return _0xaedfx7[_0xeb3f[16]](204)})[_0xeb3f[8]](function(_0xaedfx8){return handleError(_0xaedfx7,_0xaedfx8)})};exports[_0xeb3f[29]]= function(_0xaedfx6,_0xaedfx7,_0xaedfxd){SquareProject[_0xeb3f[19]](_0xaedfx6[_0xeb3f[18]][_0xeb3f[17]])[_0xeb3f[11]](function(_0xaedfxa){if(!_0xaedfxa){return _0xaedfx7[_0xeb3f[16]](404)};console[_0xeb3f[31]](_0xaedfx6[_0xeb3f[12]][_0xeb3f[30]]);_0xaedfx7[_0xeb3f[35]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E":_0xeb3f[32]+ _0xaedfx6[_0xeb3f[12]][_0xeb3f[30]]+ _0xeb3f[33],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xeb3f[34]});return _0xaedfx7[_0xeb3f[9]](_0xaedfxa[_0xeb3f[36]])})[_0xeb3f[8]](function(_0xaedfx8){return handleError(_0xaedfx7,_0xaedfx8)})};function handleError(_0xaedfx7,_0xaedfx8){return _0xaedfx7[_0xeb3f[10]](500)[_0xeb3f[9]](_0xaedfx8)} \ No newline at end of file diff --git a/server/api/square_project/square_project.events.js b/server/api/square_project/square_project.events.js index d592ee2..79b1c12 100644 --- a/server/api/square_project/square_project.events.js +++ b/server/api/square_project/square_project.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SquareProject = require('../../models').SquareProject; - -var SquareProjectEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SquareProjectEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SquareProject.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SquareProjectEvents.emit(event + ':' + doc._id, doc); - SquareProjectEvents.emit(event, doc); - done(null); - } -} - -module.exports = SquareProjectEvents; +var _0xef89=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xef89[0];const EventEmitter=require(_0xef89[1]);const SquareProject=require(_0xef89[3])[_0xef89[2]];var SquareProjectEvents= new EventEmitter();SquareProjectEvents[_0xef89[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xef89[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xef89[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xef89[6]};for(var e in events){var event=events[e];SquareProject[_0xef89[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xf63dx8,_0xf63dx9,_0xf63dxa){SquareProjectEvents[_0xef89[10]](event+ _0xef89[8]+ _0xf63dx8[_0xef89[9]],_0xf63dx8);SquareProjectEvents[_0xef89[10]](event,_0xf63dx8);_0xf63dxa(null)}}module[_0xef89[11]]= SquareProjectEvents \ No newline at end of file diff --git a/server/api/square_project/square_project.socket.js b/server/api/square_project/square_project.socket.js index fc240c5..7d12dcf 100644 --- a/server/api/square_project/square_project.socket.js +++ b/server/api/square_project/square_project.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SquareProjectEvents = require('./square_project.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('square_project:' + event, socket); - - SquareProjectEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SquareProjectEvents.removeListener(event, listener); - }; -} +var _0xdb50=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xdb50[0];const SquareProjectEvents=require(_0xdb50[1]);var events=[_0xdb50[2],_0xdb50[3]];exports[_0xdb50[4]]= function(_0xd652x3){for(var _0xd652x4=0,_0xd652x5=events[_0xdb50[5]];_0xd652x4< _0xd652x5;_0xd652x4++){var _0xd652x6=events[_0xd652x4];var _0xd652x7=createListener(_0xdb50[6]+ _0xd652x6,_0xd652x3);SquareProjectEvents[_0xdb50[7]](_0xd652x6,_0xd652x7);_0xd652x3[_0xdb50[7]](_0xdb50[8],removeListener(_0xd652x6,_0xd652x7))}};function createListener(_0xd652x6,_0xd652x3){return function(_0xd652x9){_0xd652x3[_0xdb50[9]](_0xd652x6,_0xd652x9)}}function removeListener(_0xd652x6,_0xd652x7){return function(){SquareProjectEvents[_0xdb50[10]](_0xd652x6,_0xd652x7)}} \ No newline at end of file diff --git a/server/api/square_recording/index.js b/server/api/square_recording/index.js index 0ac38d5..c16cfc9 100644 --- a/server/api/square_recording/index.js +++ b/server/api/square_recording/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./square_recording.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.show); -router.get('/:id/stream', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.getStream); -router.post('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([14], ['admin']), controller.destroy); - -module.exports = router; +var _0x3f8f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x73\x74\x72\x65\x61\x6D","\x67\x65\x74\x53\x74\x72\x65\x61\x6D","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x3f8f[0];var express=require(_0x3f8f[1]);var auth=require(_0x3f8f[2]);var controller=require(_0x3f8f[3]);var router=express.Router();router[_0x3f8f[9]](_0x3f8f[4],auth[_0x3f8f[5]](),auth[_0x3f8f[7]]([14],[_0x3f8f[6]]),controller[_0x3f8f[8]]);router[_0x3f8f[9]](_0x3f8f[10],auth[_0x3f8f[5]](),auth[_0x3f8f[7]]([14],[_0x3f8f[6]]),controller[_0x3f8f[11]]);router[_0x3f8f[9]](_0x3f8f[12],auth[_0x3f8f[5]](),auth[_0x3f8f[7]]([14],[_0x3f8f[6]]),controller[_0x3f8f[13]]);router[_0x3f8f[15]](_0x3f8f[4],auth[_0x3f8f[5]](),auth[_0x3f8f[7]]([14],[_0x3f8f[6]]),controller[_0x3f8f[14]]);router[_0x3f8f[17]](_0x3f8f[10],auth[_0x3f8f[5]](),auth[_0x3f8f[7]]([14],[_0x3f8f[6]]),controller[_0x3f8f[16]]);router[_0x3f8f[19]](_0x3f8f[4],auth[_0x3f8f[5]](),auth[_0x3f8f[7]]([14],[_0x3f8f[6]]),controller[_0x3f8f[18]]);router[_0x3f8f[19]](_0x3f8f[10],auth[_0x3f8f[5]](),auth[_0x3f8f[7]]([14],[_0x3f8f[6]]),controller[_0x3f8f[20]]);module[_0x3f8f[21]]= router \ No newline at end of file diff --git a/server/api/square_recording/square_recording.controller.js b/server/api/square_recording/square_recording.controller.js index 12c824a..d8f0799 100644 --- a/server/api/square_recording/square_recording.controller.js +++ b/server/api/square_recording/square_recording.controller.js @@ -1,172 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/square/recordings -> index - * POST /api/square/recordings -> create - * GET /api/square/recordings/:id -> show - * PUT /api/square/recordings/:id -> update - * DELETE /api/square/recordings/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var util = require('util'); - -var SquareRecording = require('../../models').SquareRecording; -var Promise = require('bluebird'); -// var base64 = Promise.promisifyAll(require('file-base64')); -var base64 = require('file-base64'); -var fs = require('fs'); - -function handleError(res) { - return function(err) { - if (err.cause && err.cause.code === 'ENOENT') { - err = { - message: 'No file or directory', - translatedMessage: 'MESSAGE_NO_FILE_OR_DIRECTORY' - }; - } - return res.status(500).send(err); - } -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(body) { - return function(entity) { - return entity - .updateAttributes(body); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -function getQuery(query) { - var _query = {}; - _query.where = {}; - - _.forEach(query, function(value, key) { - switch (key) { - case 'limit': - case 'offset': - _query[key] = Number(value); - break; - case 'order': - _query[key] = value; - break; - default: - _query.where[key] = { - $like: '%' + value + '%' - }; - } - }); - - return _query; -} - -// Gets a list of SquareRecordings -exports.index = function(req, res) { - var _query = getQuery(req.query); - return SquareRecording - .findAndCountAll(_query) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SquareRecording from the DB -exports.show = function(req, res) { - return SquareRecording.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SquareRecording from the DB -exports.getStream = function(req, res) { - return SquareRecording - .findById(req.params.id) - .then(function(recording) { - var readFile = Promise.promisify(fs.readFile); - return readFile(recording.savePath); - }) - .then(function(result) { - var base64String = new Buffer(result, 'binary').toString('base64'); - return base64String; - }) - .then(function(base64String) { - return res.status(200).send({ - downloadString: base64String - }); - }) - .catch(handleError(res)); -} - - -// Creates a new SquareRecording in the DB -exports.create = function(req, res) { - return SquareRecording.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing SquareRecording in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SquareRecording.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SquareRecording from the DB -exports.destroy = function(req, res) { - return SquareRecording.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -// Deletes a recording from the DB. -exports.bulkDestroy = function(req, res) { - return SquareRecording - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(handleError(res)); -}; +var _0xd400=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x66\x73","\x63\x61\x75\x73\x65","\x63\x6F\x64\x65","\x45\x4E\x4F\x45\x4E\x54","\x4E\x6F\x20\x66\x69\x6C\x65\x20\x6F\x72\x20\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x4D\x45\x53\x53\x41\x47\x45\x5F\x4E\x4F\x5F\x46\x49\x4C\x45\x5F\x4F\x52\x5F\x44\x49\x52\x45\x43\x54\x4F\x52\x59","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x68\x65\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x77\x68\x65\x72\x65","\x6C\x69\x6D\x69\x74","\x6F\x66\x66\x73\x65\x74","\x6F\x72\x64\x65\x72","\x25","\x66\x6F\x72\x45\x61\x63\x68","\x69\x6E\x64\x65\x78","\x71\x75\x65\x72\x79","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x53\x74\x72\x65\x61\x6D","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x73\x61\x76\x65\x50\x61\x74\x68","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64\x73"];_0xd400[0];var _=require(_0xd400[1]);var util=require(_0xd400[2]);var SquareRecording=require(_0xd400[4])[_0xd400[3]];var Promise=require(_0xd400[5]);var base64=require(_0xd400[6]);var fs=require(_0xd400[7]);function handleError(_0xcf35x8){return function(_0xcf35x9){if(_0xcf35x9[_0xd400[8]]&& _0xcf35x9[_0xd400[8]][_0xd400[9]]=== _0xd400[10]){_0xcf35x9= {message:_0xd400[11],translatedMessage:_0xd400[12]}};return _0xcf35x8[_0xd400[14]](500)[_0xd400[13]](_0xcf35x9)}}function responseWithResult(_0xcf35x8,_0xcf35xb){_0xcf35xb= _0xcf35xb|| 200;return function(_0xcf35xc){if(_0xcf35xc){_0xcf35x8[_0xd400[14]](_0xcf35xb)[_0xd400[15]](_0xcf35xc)}}}function handleEntityNotFound(_0xcf35x8){return function(_0xcf35xc){if(!_0xcf35xc){_0xcf35x8[_0xd400[14]](404)[_0xd400[16]]();return null};return _0xcf35xc}}function saveUpdates(_0xcf35xf){return function(_0xcf35xc){return _0xcf35xc[_0xd400[17]](_0xcf35xf)}}function removeEntity(_0xcf35x8){return function(_0xcf35xc){if(_0xcf35xc){return _0xcf35xc[_0xd400[19]]()[_0xd400[18]](function(){_0xcf35x8[_0xd400[14]](204)[_0xd400[16]]()})}}}function getQuery(_0xcf35x12){var _0xcf35x13={};_0xcf35x13[_0xd400[20]]= {};_[_0xd400[25]](_0xcf35x12,function(_0xcf35x14,_0xcf35x15){switch(_0xcf35x15){case _0xd400[21]:;case _0xd400[22]:_0xcf35x13[_0xcf35x15]= Number(_0xcf35x14);break;case _0xd400[23]:_0xcf35x13[_0xcf35x15]= _0xcf35x14;break;default:_0xcf35x13[_0xd400[20]][_0xcf35x15]= {$like:_0xd400[24]+ _0xcf35x14+ _0xd400[24]}}});return _0xcf35x13}exports[_0xd400[26]]= function(_0xcf35x16,_0xcf35x8){var _0xcf35x13=getQuery(_0xcf35x16[_0xd400[27]]);return SquareRecording[_0xd400[29]](_0xcf35x13)[_0xd400[18]](responseWithResult(_0xcf35x8))[_0xd400[28]](handleError(_0xcf35x8))};exports[_0xd400[30]]= function(_0xcf35x16,_0xcf35x8){return SquareRecording[_0xd400[33]](_0xcf35x16[_0xd400[32]][_0xd400[31]])[_0xd400[18]](handleEntityNotFound(_0xcf35x8))[_0xd400[18]](responseWithResult(_0xcf35x8))[_0xd400[28]](handleError(_0xcf35x8))};exports[_0xd400[34]]= function(_0xcf35x16,_0xcf35x8){return SquareRecording[_0xd400[33]](_0xcf35x16[_0xd400[32]][_0xd400[31]])[_0xd400[18]](function(_0xcf35x19){var _0xcf35x1a=Promise[_0xd400[38]](fs[_0xd400[37]]);return _0xcf35x1a(_0xcf35x19[_0xd400[39]])})[_0xd400[18]](function(_0xcf35x18){var _0xcf35x17= new Buffer(_0xcf35x18,_0xd400[36]).toString(_0xd400[35]);return _0xcf35x17})[_0xd400[18]](function(_0xcf35x17){return _0xcf35x8[_0xd400[14]](200)[_0xd400[13]]({downloadString:_0xcf35x17})})[_0xd400[28]](handleError(_0xcf35x8))};exports[_0xd400[40]]= function(_0xcf35x16,_0xcf35x8){return SquareRecording[_0xd400[40]](_0xcf35x16[_0xd400[41]])[_0xd400[18]](responseWithResult(_0xcf35x8,201))[_0xd400[28]](handleError(_0xcf35x8))};exports[_0xd400[42]]= function(_0xcf35x16,_0xcf35x8){if(_0xcf35x16[_0xd400[41]][_0xd400[31]]){delete _0xcf35x16[_0xd400[41]][_0xd400[31]]};return SquareRecording[_0xd400[33]](_0xcf35x16[_0xd400[32]][_0xd400[31]])[_0xd400[18]](handleEntityNotFound(_0xcf35x8))[_0xd400[18]](saveUpdates(_0xcf35x16[_0xd400[41]]))[_0xd400[18]](responseWithResult(_0xcf35x8))[_0xd400[28]](handleError(_0xcf35x8))};exports[_0xd400[19]]= function(_0xcf35x16,_0xcf35x8){return SquareRecording[_0xd400[33]](_0xcf35x16[_0xd400[32]][_0xd400[31]])[_0xd400[18]](handleEntityNotFound(_0xcf35x8))[_0xd400[18]](removeEntity(_0xcf35x8))[_0xd400[28]](handleError(_0xcf35x8))};exports[_0xd400[43]]= function(_0xcf35x16,_0xcf35x8){return SquareRecording[_0xd400[19]]({where:{id:_0xcf35x16[_0xd400[27]][_0xd400[45]]},individualHooks:true})[_0xd400[18]](function(){return _0xcf35x8[_0xd400[44]](204)})[_0xd400[28]](handleError(_0xcf35x8))} \ No newline at end of file diff --git a/server/api/square_recording/square_recording.events.js b/server/api/square_recording/square_recording.events.js index 76305fd..71bc180 100644 --- a/server/api/square_recording/square_recording.events.js +++ b/server/api/square_recording/square_recording.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SquareRecording = require('../../models').SquareRecording; - -var SquareRecordingEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SquareRecordingEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SquareRecording.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SquareRecordingEvents.emit(event + ':' + doc._id, doc); - SquareRecordingEvents.emit(event, doc); - done(null); - } -} - -module.exports = SquareRecordingEvents; +var _0x97ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x97ff[0];const EventEmitter=require(_0x97ff[1]);const SquareRecording=require(_0x97ff[3])[_0x97ff[2]];var SquareRecordingEvents= new EventEmitter();SquareRecordingEvents[_0x97ff[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x97ff[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x97ff[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x97ff[6]};for(var e in events){var event=events[e];SquareRecording[_0x97ff[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9cb2x8,_0x9cb2x9,_0x9cb2xa){SquareRecordingEvents[_0x97ff[10]](event+ _0x97ff[8]+ _0x9cb2x8[_0x97ff[9]],_0x9cb2x8);SquareRecordingEvents[_0x97ff[10]](event,_0x9cb2x8);_0x9cb2xa(null)}}module[_0x97ff[11]]= SquareRecordingEvents \ No newline at end of file diff --git a/server/api/square_recording/square_recording.socket.js b/server/api/square_recording/square_recording.socket.js index 8ca5928..57d81b0 100644 --- a/server/api/square_recording/square_recording.socket.js +++ b/server/api/square_recording/square_recording.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SquareRecordingEvents = require('./square_recording.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('square_recording:' + event, socket); - - SquareRecordingEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SquareRecordingEvents.removeListener(event, listener); - }; -} +var _0x3995=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3995[0];const SquareRecordingEvents=require(_0x3995[1]);var events=[_0x3995[2],_0x3995[3]];exports[_0x3995[4]]= function(_0xc690x3){for(var _0xc690x4=0,_0xc690x5=events[_0x3995[5]];_0xc690x4< _0xc690x5;_0xc690x4++){var _0xc690x6=events[_0xc690x4];var _0xc690x7=createListener(_0x3995[6]+ _0xc690x6,_0xc690x3);SquareRecordingEvents[_0x3995[7]](_0xc690x6,_0xc690x7);_0xc690x3[_0x3995[7]](_0x3995[8],removeListener(_0xc690x6,_0xc690x7))}};function createListener(_0xc690x6,_0xc690x3){return function(_0xc690x9){_0xc690x3[_0x3995[9]](_0xc690x6,_0xc690x9)}}function removeListener(_0xc690x6,_0xc690x7){return function(){SquareRecordingEvents[_0x3995[10]](_0xc690x6,_0xc690x7)}} \ No newline at end of file diff --git a/server/api/sugarcrm_account/index.js b/server/api/sugarcrm_account/index.js index 5927151..db2a4f0 100644 --- a/server/api/sugarcrm_account/index.js +++ b/server/api/sugarcrm_account/index.js @@ -1,20 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sugarcrm_account.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([19, 13], ['admin']), controller.index); -router.get('/:id/check', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.checkAccount); -router.get('/:id/fields', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getFields); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.post('/validate/:field', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.accountValidation); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); - - -module.exports = router; +var _0xc13f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xc13f[0];var express=require(_0xc13f[1]);var auth=require(_0xc13f[2]);var controller=require(_0xc13f[3]);var router=express.Router();router[_0xc13f[9]](_0xc13f[4],auth[_0xc13f[5]](),auth[_0xc13f[7]]([19,13],[_0xc13f[6]]),controller[_0xc13f[8]]);router[_0xc13f[9]](_0xc13f[10],auth[_0xc13f[5]](),auth[_0xc13f[7]]([19],[_0xc13f[6]]),controller[_0xc13f[11]]);router[_0xc13f[9]](_0xc13f[12],auth[_0xc13f[5]](),auth[_0xc13f[7]]([19],[_0xc13f[6]]),controller[_0xc13f[13]]);router[_0xc13f[9]](_0xc13f[14],auth[_0xc13f[5]](),auth[_0xc13f[7]]([19],[_0xc13f[6]]),controller[_0xc13f[15]]);router[_0xc13f[18]](_0xc13f[16],auth[_0xc13f[5]](),auth[_0xc13f[7]]([19],[_0xc13f[6]]),controller[_0xc13f[17]]);router[_0xc13f[18]](_0xc13f[4],auth[_0xc13f[5]](),auth[_0xc13f[7]]([19],[_0xc13f[6]]),controller[_0xc13f[19]]);router[_0xc13f[21]](_0xc13f[14],auth[_0xc13f[5]](),auth[_0xc13f[7]]([19],[_0xc13f[6]]),controller[_0xc13f[20]]);router[_0xc13f[23]](_0xc13f[4],auth[_0xc13f[5]](),auth[_0xc13f[7]]([19],[_0xc13f[6]]),controller[_0xc13f[22]]);router[_0xc13f[23]](_0xc13f[14],auth[_0xc13f[5]](),auth[_0xc13f[7]]([19],[_0xc13f[6]]),controller[_0xc13f[24]]);module[_0xc13f[25]]= router \ No newline at end of file diff --git a/server/api/sugarcrm_account/sugarcrm_account.controller.js b/server/api/sugarcrm_account/sugarcrm_account.controller.js index 344c0ed..3d31398 100644 --- a/server/api/sugarcrm_account/sugarcrm_account.controller.js +++ b/server/api/sugarcrm_account/sugarcrm_account.controller.js @@ -1,202 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sugarcrm/accounts -> index - * POST /api/sugarcrm/accounts -> create - * GET /api/sugarcrm/accounts/:id -> show - * PUT /api/sugarcrm/accounts/:id -> update - * DELETE /api/sugarcrm/accounts/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var SugarcrmAccount = require('../../models').SugarcrmAccount; - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 200; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of SugarcrmAccounts -exports.index = function(req, res) { - return SugarcrmAccount - .scope('configurations') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SugarcrmAccount from the DB -exports.show = function(req, res) { - return SugarcrmAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new SugarcrmAccount in the DB -exports.create = function(req, res) { - return SugarcrmAccount.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing SugarcrmAccount in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return SugarcrmAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SugarcrmAccount from the DB -exports.destroy = function(req, res) { - return SugarcrmAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -exports.checkAccount = function(req, res) { - return SugarcrmAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(account) { - var sugar = require('node-sugarcrm-client'); - sugar.init({ - apiURL: Util.stripTrailingSlash(account.remoteUri) + "/service/v4_1/rest.php", - login: account.username, - passwd: account.password - }); - sugar.login(function(sessionId) { - if (!sessionId) { - return res.sendStatus(400); - } - return res.sendStatus(200); - }); - }) - .catch(handleError(res)); -} - -exports.bulkDestroy = function(req, res) { - SugarcrmAccount - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(handleError(res)); -}; - -exports.accountValidation = function(req, res) { - var where = {}; - where[req.params.field] = req.body.value; - return SugarcrmAccount - .findAndCountAll({ - where: where - }) - .then(function(result) { - if (result.count) { - return res.status(200).send({ - isValid: false, - value: req.body.value - }); - } - return res.status(200).send({ - isValid: true, - value: req.body.value - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getFields = function(req, res) { - var sugar = require('node-sugarcrm-client'); - return SugarcrmAccount.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(account) { - sugar.init({ - apiURL: Util.stripTrailingSlash(account.remoteUri) + "/service/v4_1/rest.php", - login: account.username, - passwd: account.password - }); - sugar.login(function(sessionId) { - if (!sessionId) { - return res.sendStatus(400); - } - var params = { - session: sessionId, - module_name: "Cases" - }; - sugar.call("get_module_fields", params, function(result, err) { - if (err) { - return res.sendStatus(400); - } - return res.status(200).send(result.module_fields); - }); - }); - }) - .catch(handleError(res)); -}; +var _0x3536=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x6E\x6F\x64\x65\x2D\x73\x75\x67\x61\x72\x63\x72\x6D\x2D\x63\x6C\x69\x65\x6E\x74","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x2F\x73\x65\x72\x76\x69\x63\x65\x2F\x76\x34\x5F\x31\x2F\x72\x65\x73\x74\x2E\x70\x68\x70","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x69\x6E\x69\x74","\x6C\x6F\x67\x69\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x61\x63\x63\x6F\x75\x6E\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x43\x61\x73\x65\x73","\x67\x65\x74\x5F\x6D\x6F\x64\x75\x6C\x65\x5F\x66\x69\x65\x6C\x64\x73","\x6D\x6F\x64\x75\x6C\x65\x5F\x66\x69\x65\x6C\x64\x73","\x63\x61\x6C\x6C"];_0x3536[0];var _=require(_0x3536[1]);var Util=require(_0x3536[2]);var SugarcrmAccount=require(_0x3536[4])[_0x3536[3]];function handleError(_0xde28x5,_0xde28x6){_0xde28x6= _0xde28x6|| 500;return function(_0xde28x7){_0xde28x5[_0x3536[6]](_0xde28x6)[_0x3536[5]](_0xde28x7)}}function responseWithResult(_0xde28x5,_0xde28x6){_0xde28x6= _0xde28x6|| 200;return function(_0xde28x9){if(_0xde28x9){_0xde28x5[_0x3536[6]](_0xde28x6)[_0x3536[7]](_0xde28x9)}}}function responseWithoutResult(_0xde28x5,_0xde28x6){_0xde28x6= _0xde28x6|| 200;return function(){_0xde28x5[_0x3536[8]](_0xde28x6)}}function handleEntityNotFound(_0xde28x5){return function(_0xde28x9){if(!_0xde28x9){_0xde28x5[_0x3536[6]](404)[_0x3536[9]]();return null};return _0xde28x9}}function saveUpdates(_0xde28xd){return function(_0xde28x9){return _0xde28x9[_0x3536[11]](_0xde28xd)[_0x3536[10]](function(_0xde28xe){return _0xde28xe})}}function removeEntity(_0xde28x5){return function(_0xde28x9){if(_0xde28x9){return _0xde28x9[_0x3536[12]]()[_0x3536[10]](function(){_0xde28x5[_0x3536[6]](204)[_0x3536[9]]()})}}}exports[_0x3536[13]]= function(_0xde28x10,_0xde28x5){return SugarcrmAccount[_0x3536[20]](_0x3536[19])[_0x3536[18]](_[_0x3536[17]](Util[_0x3536[16]](_0xde28x10[_0x3536[15]]),{distinct:true}))[_0x3536[10]](responseWithResult(_0xde28x5))[_0x3536[14]](handleError(_0xde28x5))};exports[_0x3536[21]]= function(_0xde28x10,_0xde28x5){return SugarcrmAccount[_0x3536[24]](_0xde28x10[_0x3536[23]][_0x3536[22]])[_0x3536[10]](handleEntityNotFound(_0xde28x5))[_0x3536[10]](responseWithResult(_0xde28x5))[_0x3536[14]](handleError(_0xde28x5))};exports[_0x3536[25]]= function(_0xde28x10,_0xde28x5){return SugarcrmAccount[_0x3536[25]](_0xde28x10[_0x3536[26]])[_0x3536[10]](responseWithResult(_0xde28x5,201))[_0x3536[14]](handleError(_0xde28x5))};exports[_0x3536[27]]= function(_0xde28x10,_0xde28x5){if(_0xde28x10[_0x3536[26]][_0x3536[22]]){delete _0xde28x10[_0x3536[26]][_0x3536[22]]};return SugarcrmAccount[_0x3536[24]](_0xde28x10[_0x3536[23]][_0x3536[22]])[_0x3536[10]](handleEntityNotFound(_0xde28x5))[_0x3536[10]](saveUpdates(_0xde28x10[_0x3536[26]]))[_0x3536[10]](responseWithResult(_0xde28x5))[_0x3536[14]](handleError(_0xde28x5))};exports[_0x3536[12]]= function(_0xde28x10,_0xde28x5){return SugarcrmAccount[_0x3536[24]](_0xde28x10[_0x3536[23]][_0x3536[22]])[_0x3536[10]](handleEntityNotFound(_0xde28x5))[_0x3536[10]](removeEntity(_0xde28x5))[_0x3536[14]](handleError(_0xde28x5))};exports[_0x3536[28]]= function(_0xde28x10,_0xde28x5){return SugarcrmAccount[_0x3536[24]](_0xde28x10[_0x3536[23]][_0x3536[22]])[_0x3536[10]](handleEntityNotFound(_0xde28x5))[_0x3536[10]](function(_0xde28x11){var _0xde28x12=require(_0x3536[29]);_0xde28x12[_0x3536[35]]({apiURL:Util[_0x3536[31]](_0xde28x11[_0x3536[30]])+ _0x3536[32],login:_0xde28x11[_0x3536[33]],passwd:_0xde28x11[_0x3536[34]]});_0xde28x12[_0x3536[36]](function(_0xde28x13){if(!_0xde28x13){return _0xde28x5[_0x3536[8]](400)};return _0xde28x5[_0x3536[8]](200)})})[_0x3536[14]](handleError(_0xde28x5))};exports[_0x3536[37]]= function(_0xde28x10,_0xde28x5){SugarcrmAccount[_0x3536[12]]({where:{id:_0xde28x10[_0x3536[15]][_0x3536[38]]},individualHooks:true})[_0x3536[10]](function(){return _0xde28x5[_0x3536[8]](204)})[_0x3536[14]](handleError(_0xde28x5))};exports[_0x3536[39]]= function(_0xde28x10,_0xde28x5){var _0xde28x14={};_0xde28x14[_0xde28x10[_0x3536[23]][_0x3536[40]]]= _0xde28x10[_0x3536[26]][_0x3536[41]];return SugarcrmAccount[_0x3536[18]]({where:_0xde28x14})[_0x3536[10]](function(_0xde28x15){if(_0xde28x15[_0x3536[42]]){return _0xde28x5[_0x3536[6]](200)[_0x3536[5]]({isValid:false,value:_0xde28x10[_0x3536[26]][_0x3536[41]]})};return _0xde28x5[_0x3536[6]](200)[_0x3536[5]]({isValid:true,value:_0xde28x10[_0x3536[26]][_0x3536[41]]})})[_0x3536[14]](function(_0xde28x7){return handleError(_0xde28x5,_0xde28x7)})};exports[_0x3536[43]]= function(_0xde28x10,_0xde28x5){var _0xde28x12=require(_0x3536[29]);return SugarcrmAccount[_0x3536[24]](_0xde28x10[_0x3536[23]][_0x3536[22]])[_0x3536[10]](handleEntityNotFound(_0xde28x5))[_0x3536[10]](function(_0xde28x11){_0xde28x12[_0x3536[35]]({apiURL:Util[_0x3536[31]](_0xde28x11[_0x3536[30]])+ _0x3536[32],login:_0xde28x11[_0x3536[33]],passwd:_0xde28x11[_0x3536[34]]});_0xde28x12[_0x3536[36]](function(_0xde28x13){if(!_0xde28x13){return _0xde28x5[_0x3536[8]](400)};var _0xde28x16={session:_0xde28x13,module_name:_0x3536[44]};_0xde28x12[_0x3536[47]](_0x3536[45],_0xde28x16,function(_0xde28x15,_0xde28x7){if(_0xde28x7){return _0xde28x5[_0x3536[8]](400)};return _0xde28x5[_0x3536[6]](200)[_0x3536[5]](_0xde28x15[_0x3536[46]])})})})[_0x3536[14]](handleError(_0xde28x5))} \ No newline at end of file diff --git a/server/api/sugarcrm_account/sugarcrm_account.events.js b/server/api/sugarcrm_account/sugarcrm_account.events.js index b65ac40..38b0433 100644 --- a/server/api/sugarcrm_account/sugarcrm_account.events.js +++ b/server/api/sugarcrm_account/sugarcrm_account.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SugarcrmAccount = require('../../models').SugarcrmAccount; - -var SugarcrmAccountEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SugarcrmAccountEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SugarcrmAccount.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SugarcrmAccountEvents.emit(event + ':' + doc._id, doc); - SugarcrmAccountEvents.emit(event, doc); - done(null); - } -} - -module.exports = SugarcrmAccountEvents; +var _0x2229=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x2229[0];const EventEmitter=require(_0x2229[1]);const SugarcrmAccount=require(_0x2229[3])[_0x2229[2]];var SugarcrmAccountEvents= new EventEmitter();SugarcrmAccountEvents[_0x2229[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x2229[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x2229[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x2229[6]};for(var e in events){var event=events[e];SugarcrmAccount[_0x2229[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3b4ax8,_0x3b4ax9,_0x3b4axa){SugarcrmAccountEvents[_0x2229[10]](event+ _0x2229[8]+ _0x3b4ax8[_0x2229[9]],_0x3b4ax8);SugarcrmAccountEvents[_0x2229[10]](event,_0x3b4ax8);_0x3b4axa(null)}}module[_0x2229[11]]= SugarcrmAccountEvents \ No newline at end of file diff --git a/server/api/sugarcrm_account/sugarcrm_account.socket.js b/server/api/sugarcrm_account/sugarcrm_account.socket.js index 5a94608..0886eba 100644 --- a/server/api/sugarcrm_account/sugarcrm_account.socket.js +++ b/server/api/sugarcrm_account/sugarcrm_account.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SugarcrmAccountEvents = require('./sugarcrm_account.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('sugarcrm_account:' + event, socket); - - SugarcrmAccountEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SugarcrmAccountEvents.removeListener(event, listener); - }; -} +var _0x215e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x215e[0];const SugarcrmAccountEvents=require(_0x215e[1]);var events=[_0x215e[2],_0x215e[3]];exports[_0x215e[4]]= function(_0x5763x3){for(var _0x5763x4=0,_0x5763x5=events[_0x215e[5]];_0x5763x4< _0x5763x5;_0x5763x4++){var _0x5763x6=events[_0x5763x4];var _0x5763x7=createListener(_0x215e[6]+ _0x5763x6,_0x5763x3);SugarcrmAccountEvents[_0x215e[7]](_0x5763x6,_0x5763x7);_0x5763x3[_0x215e[7]](_0x215e[8],removeListener(_0x5763x6,_0x5763x7))}};function createListener(_0x5763x6,_0x5763x3){return function(_0x5763x9){_0x5763x3[_0x215e[9]](_0x5763x6,_0x5763x9)}}function removeListener(_0x5763x6,_0x5763x7){return function(){SugarcrmAccountEvents[_0x215e[10]](_0x5763x6,_0x5763x7)}} \ No newline at end of file diff --git a/server/api/sugarcrm_configuration/index.js b/server/api/sugarcrm_configuration/index.js index a7bbe3c..eaa54dd 100644 --- a/server/api/sugarcrm_configuration/index.js +++ b/server/api/sugarcrm_configuration/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sugarcrm_configuration.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.post('/:id/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationField); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); - - -module.exports = router; +var _0x9783=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9783[0];var express=require(_0x9783[1]);var auth=require(_0x9783[2]);var controller=require(_0x9783[3]);var router=express.Router();router[_0x9783[9]](_0x9783[4],auth[_0x9783[5]](),auth[_0x9783[7]]([19],[_0x9783[6]]),controller[_0x9783[8]]);router[_0x9783[9]](_0x9783[10],auth[_0x9783[5]](),auth[_0x9783[7]]([19],[_0x9783[6]]),controller[_0x9783[11]]);router[_0x9783[13]](_0x9783[4],auth[_0x9783[5]](),auth[_0x9783[7]]([19],[_0x9783[6]]),controller[_0x9783[12]]);router[_0x9783[15]](_0x9783[10],auth[_0x9783[5]](),auth[_0x9783[7]]([19],[_0x9783[6]]),controller[_0x9783[14]]);router[_0x9783[13]](_0x9783[16],auth[_0x9783[5]](),auth[_0x9783[7]]([19],[_0x9783[6]]),controller[_0x9783[17]]);router[_0x9783[19]](_0x9783[10],auth[_0x9783[5]](),auth[_0x9783[7]]([19],[_0x9783[6]]),controller[_0x9783[18]]);module[_0x9783[20]]= router \ No newline at end of file diff --git a/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js b/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js index 5918283..468a642 100644 --- a/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js +++ b/server/api/sugarcrm_configuration/sugarcrm_configuration.controller.js @@ -1,145 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sugarcrm/configurations -> index - * POST /api/sugarcrm/configurations -> create - * GET /api/sugarcrm/configurations/:id -> show - * PUT /api/sugarcrm/configurations/:id -> update - * DELETE /api/sugarcrm/configurations/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var SugarcrmConfiguration = require('../../models').SugarcrmConfiguration; -var SugarcrmField = require('../../models').SugarcrmField; - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of SugarcrmConfigurations -exports.index = function(req, res) { - SugarcrmConfiguration.findAll({ - where: req.query - }) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SugarcrmConfiguration from the DB -exports.show = function(req, res) { - SugarcrmConfiguration.find({ - where: { - id: req.params.id - }, - include: [{ - model: SugarcrmField, - as: 'Subject' - }, { - model: SugarcrmField, - as: 'Description' - }, { - model: SugarcrmField, - as: 'Field' - }] - }) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new SugarcrmConfiguration in the DB -exports.create = function(req, res) { - SugarcrmConfiguration.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing SugarcrmConfiguration in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - SugarcrmConfiguration.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SugarcrmConfiguration from the DB -exports.destroy = function(req, res) { - SugarcrmConfiguration.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -exports.addConfigurationField = function(req, res, next) { - var sugarcrmConfiguration; - SugarcrmConfiguration - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(sugarcrm_configuration) { - sugarcrmConfiguration = sugarcrm_configuration; - return SugarcrmField.create(req.body) - }) - .then(function(sugarcrmField) { - switch (req.params.type) { - case 'subject': - return [sugarcrmConfiguration.addSubject(sugarcrmField), sugarcrmField]; - case 'description': - return [sugarcrmConfiguration.addDescription(sugarcrmField), sugarcrmField]; - case 'field': - return [sugarcrmConfiguration.addField(sugarcrmField), sugarcrmField]; - } - }) - .spread(function(data, sugarcrmField) { - return res.status(201).json(sugarcrmField); - }) - .catch(handleError(res)); -}; +var _0x4cce=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x53\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x73\x70\x72\x65\x61\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65"];_0x4cce[0];var _=require(_0x4cce[1]);var SugarcrmConfiguration=require(_0x4cce[3])[_0x4cce[2]];var SugarcrmField=require(_0x4cce[3])[_0x4cce[4]];function handleError(_0xb2acx5,_0xb2acx6){_0xb2acx6= _0xb2acx6|| 500;return function(_0xb2acx7){_0xb2acx5[_0x4cce[6]](_0xb2acx6)[_0x4cce[5]](_0xb2acx7)}}function responseWithResult(_0xb2acx5,_0xb2acx6){_0xb2acx6= _0xb2acx6|| 200;return function(_0xb2acx9){if(_0xb2acx9){_0xb2acx5[_0x4cce[6]](_0xb2acx6)[_0x4cce[7]](_0xb2acx9)}}}function handleEntityNotFound(_0xb2acx5){return function(_0xb2acx9){if(!_0xb2acx9){_0xb2acx5[_0x4cce[6]](404)[_0x4cce[8]]();return null};return _0xb2acx9}}function saveUpdates(_0xb2acxc){return function(_0xb2acx9){return _0xb2acx9[_0x4cce[10]](_0xb2acxc)[_0x4cce[9]](function(_0xb2acxd){return _0xb2acxd})}}function removeEntity(_0xb2acx5){return function(_0xb2acx9){if(_0xb2acx9){return _0xb2acx9[_0x4cce[11]]()[_0x4cce[9]](function(){_0xb2acx5[_0x4cce[6]](204)[_0x4cce[8]]()})}}}exports[_0x4cce[12]]= function(_0xb2acxf,_0xb2acx5){SugarcrmConfiguration[_0x4cce[15]]({where:_0xb2acxf[_0x4cce[14]]})[_0x4cce[9]](responseWithResult(_0xb2acx5))[_0x4cce[13]](handleError(_0xb2acx5))};exports[_0x4cce[16]]= function(_0xb2acxf,_0xb2acx5){SugarcrmConfiguration[_0x4cce[22]]({where:{id:_0xb2acxf[_0x4cce[18]][_0x4cce[17]]},include:[{model:SugarcrmField,as:_0x4cce[19]},{model:SugarcrmField,as:_0x4cce[20]},{model:SugarcrmField,as:_0x4cce[21]}]})[_0x4cce[9]](handleEntityNotFound(_0xb2acx5))[_0x4cce[9]](responseWithResult(_0xb2acx5))[_0x4cce[13]](handleError(_0xb2acx5))};exports[_0x4cce[23]]= function(_0xb2acxf,_0xb2acx5){SugarcrmConfiguration[_0x4cce[23]](_0xb2acxf[_0x4cce[24]])[_0x4cce[9]](responseWithResult(_0xb2acx5,201))[_0x4cce[13]](handleError(_0xb2acx5))};exports[_0x4cce[25]]= function(_0xb2acxf,_0xb2acx5){if(_0xb2acxf[_0x4cce[24]][_0x4cce[17]]){delete _0xb2acxf[_0x4cce[24]][_0x4cce[17]]};SugarcrmConfiguration[_0x4cce[26]](_0xb2acxf[_0x4cce[18]][_0x4cce[17]])[_0x4cce[9]](handleEntityNotFound(_0xb2acx5))[_0x4cce[9]](saveUpdates(_0xb2acxf[_0x4cce[24]]))[_0x4cce[9]](responseWithResult(_0xb2acx5))[_0x4cce[13]](handleError(_0xb2acx5))};exports[_0x4cce[11]]= function(_0xb2acxf,_0xb2acx5){SugarcrmConfiguration[_0x4cce[26]](_0xb2acxf[_0x4cce[18]][_0x4cce[17]])[_0x4cce[9]](handleEntityNotFound(_0xb2acx5))[_0x4cce[9]](removeEntity(_0xb2acx5))[_0x4cce[13]](handleError(_0xb2acx5))};exports[_0x4cce[27]]= function(_0xb2acxf,_0xb2acx5,_0xb2acx10){var _0xb2acx11;SugarcrmConfiguration[_0x4cce[26]](_0xb2acxf[_0x4cce[18]][_0x4cce[17]])[_0x4cce[9]](handleEntityNotFound(_0xb2acx5))[_0x4cce[9]](function(_0xb2acx14){_0xb2acx11= _0xb2acx14;return SugarcrmField[_0x4cce[23]](_0xb2acxf[_0x4cce[24]])})[_0x4cce[9]](function(_0xb2acx13){switch(_0xb2acxf[_0x4cce[18]][_0x4cce[35]]){case _0x4cce[30]:return [_0xb2acx11[_0x4cce[29]](_0xb2acx13),_0xb2acx13];case _0x4cce[32]:return [_0xb2acx11[_0x4cce[31]](_0xb2acx13),_0xb2acx13];case _0x4cce[34]:return [_0xb2acx11[_0x4cce[33]](_0xb2acx13),_0xb2acx13]}})[_0x4cce[28]](function(_0xb2acx12,_0xb2acx13){return _0xb2acx5[_0x4cce[6]](201)[_0x4cce[7]](_0xb2acx13)})[_0x4cce[13]](handleError(_0xb2acx5))} \ No newline at end of file diff --git a/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js b/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js index f1764e0..68b9af1 100644 --- a/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js +++ b/server/api/sugarcrm_configuration/sugarcrm_configuration.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SugarcrmConfiguration = require('../../models').SugarcrmConfiguration; - -var SugarcrmConfigurationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SugarcrmConfigurationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SugarcrmConfiguration.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SugarcrmConfigurationEvents.emit(event + ':' + doc._id, doc); - SugarcrmConfigurationEvents.emit(event, doc); - done(null); - } -} - -module.exports = SugarcrmConfigurationEvents; +var _0xf2ec=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf2ec[0];const EventEmitter=require(_0xf2ec[1]);const SugarcrmConfiguration=require(_0xf2ec[3])[_0xf2ec[2]];var SugarcrmConfigurationEvents= new EventEmitter();SugarcrmConfigurationEvents[_0xf2ec[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf2ec[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf2ec[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf2ec[6]};for(var e in events){var event=events[e];SugarcrmConfiguration[_0xf2ec[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6903x8,_0x6903x9,_0x6903xa){SugarcrmConfigurationEvents[_0xf2ec[10]](event+ _0xf2ec[8]+ _0x6903x8[_0xf2ec[9]],_0x6903x8);SugarcrmConfigurationEvents[_0xf2ec[10]](event,_0x6903x8);_0x6903xa(null)}}module[_0xf2ec[11]]= SugarcrmConfigurationEvents \ No newline at end of file diff --git a/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js b/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js index 3a1b051..59820a0 100644 --- a/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js +++ b/server/api/sugarcrm_configuration/sugarcrm_configuration.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SugarcrmConfigurationEvents = require('./sugarcrm_configuration.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('sugarcrm_configuration:' + event, socket); - - SugarcrmConfigurationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SugarcrmConfigurationEvents.removeListener(event, listener); - }; -} +var _0xd5c0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xd5c0[0];const SugarcrmConfigurationEvents=require(_0xd5c0[1]);var events=[_0xd5c0[2],_0xd5c0[3]];exports[_0xd5c0[4]]= function(_0x1e35x3){for(var _0x1e35x4=0,_0x1e35x5=events[_0xd5c0[5]];_0x1e35x4< _0x1e35x5;_0x1e35x4++){var _0x1e35x6=events[_0x1e35x4];var _0x1e35x7=createListener(_0xd5c0[6]+ _0x1e35x6,_0x1e35x3);SugarcrmConfigurationEvents[_0xd5c0[7]](_0x1e35x6,_0x1e35x7);_0x1e35x3[_0xd5c0[7]](_0xd5c0[8],removeListener(_0x1e35x6,_0x1e35x7))}};function createListener(_0x1e35x6,_0x1e35x3){return function(_0x1e35x9){_0x1e35x3[_0xd5c0[9]](_0x1e35x6,_0x1e35x9)}}function removeListener(_0x1e35x6,_0x1e35x7){return function(){SugarcrmConfigurationEvents[_0xd5c0[10]](_0x1e35x6,_0x1e35x7)}} \ No newline at end of file diff --git a/server/api/sugarcrm_field/index.js b/server/api/sugarcrm_field/index.js index 30e2ad2..9ed2375 100644 --- a/server/api/sugarcrm_field/index.js +++ b/server/api/sugarcrm_field/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./sugarcrm_field.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); - -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); - - -module.exports = router; +var _0xecbb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xecbb[0];var express=require(_0xecbb[1]);var auth=require(_0xecbb[2]);var controller=require(_0xecbb[3]);var router=express.Router();router[_0xecbb[7]](_0xecbb[4],auth[_0xecbb[5]](),controller[_0xecbb[6]]);router[_0xecbb[7]](_0xecbb[8],auth[_0xecbb[5]](),auth[_0xecbb[10]]([19],[_0xecbb[9]]),controller[_0xecbb[11]]);router[_0xecbb[13]](_0xecbb[4],auth[_0xecbb[5]](),auth[_0xecbb[10]]([19],[_0xecbb[9]]),controller[_0xecbb[12]]);router[_0xecbb[15]](_0xecbb[8],auth[_0xecbb[5]](),auth[_0xecbb[10]]([19],[_0xecbb[9]]),controller[_0xecbb[14]]);router[_0xecbb[17]](_0xecbb[8],auth[_0xecbb[5]](),auth[_0xecbb[10]]([19],[_0xecbb[9]]),controller[_0xecbb[16]]);module[_0xecbb[18]]= router \ No newline at end of file diff --git a/server/api/sugarcrm_field/sugarcrm_field.controller.js b/server/api/sugarcrm_field/sugarcrm_field.controller.js index eb6fe3d..72795da 100644 --- a/server/api/sugarcrm_field/sugarcrm_field.controller.js +++ b/server/api/sugarcrm_field/sugarcrm_field.controller.js @@ -1,104 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/sugarcrm/fields -> index - * POST /api/sugarcrm/fields -> create - * GET /api/sugarcrm/fields/:id -> show - * PUT /api/sugarcrm/fields/:id -> update - * DELETE /api/sugarcrm/fields/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var SugarcrmField = require('../../models').SugarcrmField; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of SugarcrmFields -exports.index = function(req, res) { - SugarcrmField.findAll() - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single SugarcrmField from the DB -exports.show = function(req, res) { - SugarcrmField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new SugarcrmField in the DB -exports.create = function(req, res) { - SugarcrmField.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing SugarcrmField in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - SugarcrmField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a SugarcrmField from the DB -exports.destroy = function(req, res) { - SugarcrmField.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0x2493=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0x2493[0];var _=require(_0x2493[1]);var SugarcrmField=require(_0x2493[3])[_0x2493[2]];function handleError(_0xc9bbx4,_0xc9bbx5){_0xc9bbx5= _0xc9bbx5|| 500;return function(_0xc9bbx6){_0xc9bbx4[_0x2493[5]](_0xc9bbx5)[_0x2493[4]](_0xc9bbx6)}}function responseWithResult(_0xc9bbx4,_0xc9bbx5){_0xc9bbx5= _0xc9bbx5|| 200;return function(_0xc9bbx8){if(_0xc9bbx8){_0xc9bbx4[_0x2493[5]](_0xc9bbx5)[_0x2493[6]](_0xc9bbx8)}}}function handleEntityNotFound(_0xc9bbx4){return function(_0xc9bbx8){if(!_0xc9bbx8){_0xc9bbx4[_0x2493[5]](404)[_0x2493[7]]();return null};return _0xc9bbx8}}function saveUpdates(_0xc9bbxb){return function(_0xc9bbx8){return _0xc9bbx8[_0x2493[9]](_0xc9bbxb)[_0x2493[8]](function(_0xc9bbxc){return _0xc9bbxc})}}function removeEntity(_0xc9bbx4){return function(_0xc9bbx8){if(_0xc9bbx8){return _0xc9bbx8[_0x2493[10]]()[_0x2493[8]](function(){_0xc9bbx4[_0x2493[5]](204)[_0x2493[7]]()})}}}exports[_0x2493[11]]= function(_0xc9bbxe,_0xc9bbx4){SugarcrmField[_0x2493[13]]()[_0x2493[8]](responseWithResult(_0xc9bbx4))[_0x2493[12]](handleError(_0xc9bbx4))};exports[_0x2493[14]]= function(_0xc9bbxe,_0xc9bbx4){SugarcrmField[_0x2493[17]](_0xc9bbxe[_0x2493[16]][_0x2493[15]])[_0x2493[8]](handleEntityNotFound(_0xc9bbx4))[_0x2493[8]](responseWithResult(_0xc9bbx4))[_0x2493[12]](handleError(_0xc9bbx4))};exports[_0x2493[18]]= function(_0xc9bbxe,_0xc9bbx4){SugarcrmField[_0x2493[18]](_0xc9bbxe[_0x2493[19]])[_0x2493[8]](responseWithResult(_0xc9bbx4,201))[_0x2493[12]](handleError(_0xc9bbx4))};exports[_0x2493[20]]= function(_0xc9bbxe,_0xc9bbx4){if(_0xc9bbxe[_0x2493[19]][_0x2493[15]]){delete _0xc9bbxe[_0x2493[19]][_0x2493[15]]};SugarcrmField[_0x2493[17]](_0xc9bbxe[_0x2493[16]][_0x2493[15]])[_0x2493[8]](handleEntityNotFound(_0xc9bbx4))[_0x2493[8]](saveUpdates(_0xc9bbxe[_0x2493[19]]))[_0x2493[8]](responseWithResult(_0xc9bbx4))[_0x2493[12]](handleError(_0xc9bbx4))};exports[_0x2493[10]]= function(_0xc9bbxe,_0xc9bbx4){SugarcrmField[_0x2493[17]](_0xc9bbxe[_0x2493[16]][_0x2493[15]])[_0x2493[8]](handleEntityNotFound(_0xc9bbx4))[_0x2493[8]](removeEntity(_0xc9bbx4))[_0x2493[12]](handleError(_0xc9bbx4))} \ No newline at end of file diff --git a/server/api/sugarcrm_field/sugarcrm_field.events.js b/server/api/sugarcrm_field/sugarcrm_field.events.js index 0845bee..00a088f 100644 --- a/server/api/sugarcrm_field/sugarcrm_field.events.js +++ b/server/api/sugarcrm_field/sugarcrm_field.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const SugarcrmField = require('../../models').SugarcrmField; - -var SugarcrmFieldEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -SugarcrmFieldEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - SugarcrmField.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - SugarcrmFieldEvents.emit(event + ':' + doc._id, doc); - SugarcrmFieldEvents.emit(event, doc); - done(null); - } -} - -module.exports = SugarcrmFieldEvents; +var _0x7977=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7977[0];const EventEmitter=require(_0x7977[1]);const SugarcrmField=require(_0x7977[3])[_0x7977[2]];var SugarcrmFieldEvents= new EventEmitter();SugarcrmFieldEvents[_0x7977[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7977[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7977[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7977[6]};for(var e in events){var event=events[e];SugarcrmField[_0x7977[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3662x8,_0x3662x9,_0x3662xa){SugarcrmFieldEvents[_0x7977[10]](event+ _0x7977[8]+ _0x3662x8[_0x7977[9]],_0x3662x8);SugarcrmFieldEvents[_0x7977[10]](event,_0x3662x8);_0x3662xa(null)}}module[_0x7977[11]]= SugarcrmFieldEvents \ No newline at end of file diff --git a/server/api/sugarcrm_field/sugarcrm_field.socket.js b/server/api/sugarcrm_field/sugarcrm_field.socket.js index 8830ac2..0471089 100644 --- a/server/api/sugarcrm_field/sugarcrm_field.socket.js +++ b/server/api/sugarcrm_field/sugarcrm_field.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const SugarcrmFieldEvents = require('./sugarcrm_field.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('sugarcrm_field:' + event, socket); - - SugarcrmFieldEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - SugarcrmFieldEvents.removeListener(event, listener); - }; -} +var _0x3bd2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3bd2[0];const SugarcrmFieldEvents=require(_0x3bd2[1]);var events=[_0x3bd2[2],_0x3bd2[3]];exports[_0x3bd2[4]]= function(_0xd9c8x3){for(var _0xd9c8x4=0,_0xd9c8x5=events[_0x3bd2[5]];_0xd9c8x4< _0xd9c8x5;_0xd9c8x4++){var _0xd9c8x6=events[_0xd9c8x4];var _0xd9c8x7=createListener(_0x3bd2[6]+ _0xd9c8x6,_0xd9c8x3);SugarcrmFieldEvents[_0x3bd2[7]](_0xd9c8x6,_0xd9c8x7);_0xd9c8x3[_0x3bd2[7]](_0x3bd2[8],removeListener(_0xd9c8x6,_0xd9c8x7))}};function createListener(_0xd9c8x6,_0xd9c8x3){return function(_0xd9c8x9){_0xd9c8x3[_0x3bd2[9]](_0xd9c8x6,_0xd9c8x9)}}function removeListener(_0xd9c8x6,_0xd9c8x7){return function(){SugarcrmFieldEvents[_0x3bd2[10]](_0xd9c8x6,_0xd9c8x7)}} \ No newline at end of file diff --git a/server/api/tag/index.js b/server/api/tag/index.js index 1751dda..a7159a3 100644 --- a/server/api/tag/index.js +++ b/server/api/tag/index.js @@ -1,171 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./tag.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); -/** - * @api {get} /api/tags/ Get Tags' list. - * - * @apiParam (Query) {Number} [offset] Pagination offset. - * @apiParam (Query) {Number} [limit] Pagination limit. - * - * @apiVersion 0.0.140 - * @apiName GetTags - * @apiGroup Tags - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of tags. - * @apiSuccess {Object[]} rows Tags' list. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 2, - * "rows": [{ - * "id": 1 - * "name": "tag1" - * "description": "my tag description" - * ... - * },{ - * "id": 2 - * "name": "newtag" - * "description": null - * ... - * },...] - * } - */ -router.get('/', auth.isAuthenticated(), auth.hasModule([5, 9, 13], ['admin', 'agent']), controller.index); -/** - * @api {get} /api/tags/:id Get Tag's details. - * @apiParam {Number} id Tag's unique ID. - * @apiVersion 0.0.140 - * @apiName GetTag - * @apiGroup Tags - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Object} Tag's details. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "tag1" - * "description": "my tag description" - * ... - * } - */ -router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show); -router.get('/chat/:tag', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.getChatByTag); -router.get('/mail/:tag', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.getMailByTag); -router.get('/fax/:tag', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.getFaxByTag); -router.get('/sms/:tag', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.getSmsByTag); -router.get('/contacts/:tag', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.getContactsByTag); -/** - * @api {post} /api/tags/ Create a new tag. - * @apiParam (body) {String} name Tag's name. - * @apiParam (body) {String} [description] Tag's description. - * - * @apiVersion 0.0.140 - * @apiName CreateTag - * @apiGroup Tags - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - * { - * "id": 3 - * "name": "Tag3" - * "description": "my tag" - * ... - * } - */ -router.post('/', auth.isAuthenticated(), auth.hasModule([5, 13], ['admin', 'agent']), controller.create); -/** - * @api {put} /api/tags/:id Update tag's details. - * @apiParam {Number} id Tag's unique ID. - * @apiParam (body) {String} name Tag's name. - * @apiParam (body) {String} [description] Tag's description. - * - * @apiVersion 0.0.140 - * @apiName UpdateTag - * @apiGroup Tags - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 3 - * "name": "Tag 3" - * "description": "My new description" - * ... - * } - */ -router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update); -/** - * @api {delete} /api/tags/ Bulk Delete tags. - * - * @apiParam (Query) {Number[]} ids Tags' unique ID array. - * - * @apiVersion 0.0.140 - * @apiName BulkDeleteTags - * @apiGroup Tags - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy); -/** - * @api {delete} /api/tags/:id Delete a tag. - * - * @apiParam {Number} id Tag's unique ID. - * - * @apiVersion 0.0.140 - * @apiName DeleteTag - * @apiGroup Tags - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy); - -module.exports = router; +var _0x3e5e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x61\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x63\x68\x61\x74\x2F\x3A\x74\x61\x67","\x67\x65\x74\x43\x68\x61\x74\x42\x79\x54\x61\x67","\x2F\x6D\x61\x69\x6C\x2F\x3A\x74\x61\x67","\x67\x65\x74\x4D\x61\x69\x6C\x42\x79\x54\x61\x67","\x2F\x66\x61\x78\x2F\x3A\x74\x61\x67","\x67\x65\x74\x46\x61\x78\x42\x79\x54\x61\x67","\x2F\x73\x6D\x73\x2F\x3A\x74\x61\x67","\x67\x65\x74\x53\x6D\x73\x42\x79\x54\x61\x67","\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2F\x3A\x74\x61\x67","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x42\x79\x54\x61\x67","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x3e5e[0];var express=require(_0x3e5e[1]);var controller=require(_0x3e5e[2]);var auth=require(_0x3e5e[3]);var router=express.Router();router[_0x3e5e[10]](_0x3e5e[4],auth[_0x3e5e[5]](),auth[_0x3e5e[8]]([5,9,13],[_0x3e5e[6],_0x3e5e[7]]),controller[_0x3e5e[9]]);router[_0x3e5e[10]](_0x3e5e[11],auth[_0x3e5e[5]](),auth[_0x3e5e[8]]([13],[_0x3e5e[6]]),controller[_0x3e5e[12]]);router[_0x3e5e[10]](_0x3e5e[13],auth[_0x3e5e[5]](),auth[_0x3e5e[8]]([13],[_0x3e5e[6]]),controller[_0x3e5e[14]]);router[_0x3e5e[10]](_0x3e5e[15],auth[_0x3e5e[5]](),auth[_0x3e5e[8]]([13],[_0x3e5e[6]]),controller[_0x3e5e[16]]);router[_0x3e5e[10]](_0x3e5e[17],auth[_0x3e5e[5]](),auth[_0x3e5e[8]]([13],[_0x3e5e[6]]),controller[_0x3e5e[18]]);router[_0x3e5e[10]](_0x3e5e[19],auth[_0x3e5e[5]](),auth[_0x3e5e[8]]([13],[_0x3e5e[6]]),controller[_0x3e5e[20]]);router[_0x3e5e[10]](_0x3e5e[21],auth[_0x3e5e[5]](),auth[_0x3e5e[8]]([13],[_0x3e5e[6]]),controller[_0x3e5e[22]]);router[_0x3e5e[24]](_0x3e5e[4],auth[_0x3e5e[5]](),auth[_0x3e5e[8]]([5,13],[_0x3e5e[6],_0x3e5e[7]]),controller[_0x3e5e[23]]);router[_0x3e5e[26]](_0x3e5e[11],auth[_0x3e5e[5]](),auth[_0x3e5e[8]]([13],[_0x3e5e[6]]),controller[_0x3e5e[25]]);router[_0x3e5e[28]](_0x3e5e[4],auth[_0x3e5e[5]](),auth[_0x3e5e[8]]([13],[_0x3e5e[6]]),controller[_0x3e5e[27]]);router[_0x3e5e[28]](_0x3e5e[11],auth[_0x3e5e[5]](),auth[_0x3e5e[8]]([13],[_0x3e5e[6]]),controller[_0x3e5e[29]]);module[_0x3e5e[30]]= router \ No newline at end of file diff --git a/server/api/tag/tag.controller.js b/server/api/tag/tag.controller.js index 8caf0e0..38fc251 100644 --- a/server/api/tag/tag.controller.js +++ b/server/api/tag/tag.controller.js @@ -1,209 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Tag = require('../../models').Tag; -var ChatRoom = require('../../models').ChatRoom; -var ChatWebsite = require('../../models').ChatWebsite; -var ChatVisitor = require('../../models').ChatVisitor; -var MailRoom = require('../../models').MailRoom; -var FaxRoom = require('../../models').FaxRoom; -var SmsRoom = require('../../models').SmsRoom; -var Contact = require('../../models').Contact; -var Util = require('../../config/util'); - -// Get list of tags -exports.index = function(req, res, next) { - return Tag - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single tag -exports.show = function(req, res) { - return Tag - .findById(req.params.id) - .then(function(tag) { - if (!tag) { - return res.sendStatus(404); - } - return res.send(tag); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -exports.getChatByTag = function(req, res) { - return ChatRoom - .findAndCountAll(_.merge(Util.getQuery(req.query, { - tags: { - $like: '%' + req.params.tag + ';%' - } - }), { - include: [ChatWebsite, ChatVisitor] - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getMailByTag = function(req, res) { - return MailRoom - .scope('default') - .findAndCountAll(Util.getQuery(req.query, { - tags: { - $like: '%' + req.params.tag + ';%' - } - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getFaxByTag = function(req, res) { - return FaxRoom - .scope('default') - .findAndCountAll(Util.getQuery(req.query, { - tags: { - $like: '%' + req.params.tag + ';%' - } - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getSmsByTag = function(req, res) { - return SmsRoom - .scope('default') - .findAndCountAll(Util.getQuery(req.query, { - tags: { - $like: '%' + req.params.tag + ';%' - } - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.getContactsByTag = function(req, res) { - return Contact - .scope('list', 'company', { - method: ['company_list_filter', req.query] - }) - .findAndCountAll(Util.getQuery(req.query, { - tags: { - $like: '%' + req.params.tag + ';%' - } - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - - -// Creates a new tag in the DB. -exports.create = function(req, res) { - return Tag - .create(req.body) - .then(function(tag) { - return res.status(201).send(tag); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing tag in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return Tag - .findById(req.params.id) - .then(function(tag) { - if (!tag) { - return res.sendStatus(404); - } - var updated = _.merge(tag, req.body); - return updated - .save(); - }) - .then(function(tag) { - return res.status(200).send(tag); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a tag from the DB. -exports.destroy = function(req, res) { - return Tag - .scope('configuration') - .findById(req.params.id) - .then(function(tag) { - if (!tag) { - return res.sendStatus(404); - } - if (tagHasAssociation(tag)) { - var err = new Error(); - err.message = 'Tag is associated with an integration\'s configuration'; - throw err; - } - return tag.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroy = function(req, res) { - return Tag - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} - -function tagHasAssociation(tag) { - return ((tag.ZendeskConfigurations && tag.ZendeskConfigurations.length > 0)); -} +var _0xf7c5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x61\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x46\x61\x78\x52\x6F\x6F\x6D","\x53\x6D\x73\x52\x6F\x6F\x6D","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x43\x68\x61\x74\x42\x79\x54\x61\x67","\x25","\x74\x61\x67","\x3B\x25","\x6D\x65\x72\x67\x65","\x67\x65\x74\x4D\x61\x69\x6C\x42\x79\x54\x61\x67","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x67\x65\x74\x46\x61\x78\x42\x79\x54\x61\x67","\x67\x65\x74\x53\x6D\x73\x42\x79\x54\x61\x67","\x67\x65\x74\x43\x6F\x6E\x74\x61\x63\x74\x73\x42\x79\x54\x61\x67","\x6C\x6F\x67","\x6C\x69\x73\x74","\x63\x6F\x6D\x70\x61\x6E\x79","\x63\x6F\x6D\x70\x61\x6E\x79\x5F\x6C\x69\x73\x74\x5F\x66\x69\x6C\x74\x65\x72","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x73\x73\x61\x67\x65","\x54\x61\x67\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x27\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x6C\x65\x6E\x67\x74\x68"];_0xf7c5[0];var _=require(_0xf7c5[1]);var Tag=require(_0xf7c5[3])[_0xf7c5[2]];var ChatRoom=require(_0xf7c5[3])[_0xf7c5[4]];var ChatWebsite=require(_0xf7c5[3])[_0xf7c5[5]];var ChatVisitor=require(_0xf7c5[3])[_0xf7c5[6]];var MailRoom=require(_0xf7c5[3])[_0xf7c5[7]];var FaxRoom=require(_0xf7c5[3])[_0xf7c5[8]];var SmsRoom=require(_0xf7c5[3])[_0xf7c5[9]];var Contact=require(_0xf7c5[3])[_0xf7c5[10]];var Util=require(_0xf7c5[11]);exports[_0xf7c5[12]]= function(_0xb60bxb,_0xb60bxc,_0xb60bxd){return Tag[_0xf7c5[19]](Util[_0xf7c5[18]](_0xb60bxb[_0xf7c5[17]]))[_0xf7c5[16]](function(_0xb60bxf){_0xb60bxc[_0xf7c5[15]](200)[_0xf7c5[14]](_0xb60bxf)})[_0xf7c5[13]](function(_0xb60bxe){return handleError(_0xb60bxc,_0xb60bxe)})};exports[_0xf7c5[20]]= function(_0xb60bxb,_0xb60bxc){return Tag[_0xf7c5[24]](_0xb60bxb[_0xf7c5[23]][_0xf7c5[22]])[_0xf7c5[16]](function(_0xb60bx10){if(!_0xb60bx10){return _0xb60bxc[_0xf7c5[21]](404)};return _0xb60bxc[_0xf7c5[14]](_0xb60bx10)})[_0xf7c5[13]](function(_0xb60bxe){return handleError(_0xb60bxc,_0xb60bxe)})};exports[_0xf7c5[25]]= function(_0xb60bxb,_0xb60bxc){return ChatRoom[_0xf7c5[19]](_[_0xf7c5[29]](Util[_0xf7c5[18]](_0xb60bxb[_0xf7c5[17]],{tags:{$like:_0xf7c5[26]+ _0xb60bxb[_0xf7c5[23]][_0xf7c5[27]]+ _0xf7c5[28]}}),{include:[ChatWebsite,ChatVisitor]}))[_0xf7c5[16]](function(_0xb60bxf){_0xb60bxc[_0xf7c5[15]](200)[_0xf7c5[14]](_0xb60bxf)})[_0xf7c5[13]](function(_0xb60bxe){return handleError(_0xb60bxc,_0xb60bxe)})};exports[_0xf7c5[30]]= function(_0xb60bxb,_0xb60bxc){return MailRoom[_0xf7c5[32]](_0xf7c5[31])[_0xf7c5[19]](Util[_0xf7c5[18]](_0xb60bxb[_0xf7c5[17]],{tags:{$like:_0xf7c5[26]+ _0xb60bxb[_0xf7c5[23]][_0xf7c5[27]]+ _0xf7c5[28]}}))[_0xf7c5[16]](function(_0xb60bxf){_0xb60bxc[_0xf7c5[15]](200)[_0xf7c5[14]](_0xb60bxf)})[_0xf7c5[13]](function(_0xb60bxe){return handleError(_0xb60bxc,_0xb60bxe)})};exports[_0xf7c5[33]]= function(_0xb60bxb,_0xb60bxc){return FaxRoom[_0xf7c5[32]](_0xf7c5[31])[_0xf7c5[19]](Util[_0xf7c5[18]](_0xb60bxb[_0xf7c5[17]],{tags:{$like:_0xf7c5[26]+ _0xb60bxb[_0xf7c5[23]][_0xf7c5[27]]+ _0xf7c5[28]}}))[_0xf7c5[16]](function(_0xb60bxf){_0xb60bxc[_0xf7c5[15]](200)[_0xf7c5[14]](_0xb60bxf)})[_0xf7c5[13]](function(_0xb60bxe){return handleError(_0xb60bxc,_0xb60bxe)})};exports[_0xf7c5[34]]= function(_0xb60bxb,_0xb60bxc){return SmsRoom[_0xf7c5[32]](_0xf7c5[31])[_0xf7c5[19]](Util[_0xf7c5[18]](_0xb60bxb[_0xf7c5[17]],{tags:{$like:_0xf7c5[26]+ _0xb60bxb[_0xf7c5[23]][_0xf7c5[27]]+ _0xf7c5[28]}}))[_0xf7c5[16]](function(_0xb60bxf){_0xb60bxc[_0xf7c5[15]](200)[_0xf7c5[14]](_0xb60bxf)})[_0xf7c5[13]](function(_0xb60bxe){return handleError(_0xb60bxc,_0xb60bxe)})};exports[_0xf7c5[35]]= function(_0xb60bxb,_0xb60bxc){return Contact[_0xf7c5[32]](_0xf7c5[37],_0xf7c5[38],{method:[_0xf7c5[39],_0xb60bxb[_0xf7c5[17]]]})[_0xf7c5[19]](Util[_0xf7c5[18]](_0xb60bxb[_0xf7c5[17]],{tags:{$like:_0xf7c5[26]+ _0xb60bxb[_0xf7c5[23]][_0xf7c5[27]]+ _0xf7c5[28]}}))[_0xf7c5[16]](function(_0xb60bxf){_0xb60bxc[_0xf7c5[15]](200)[_0xf7c5[14]](_0xb60bxf)})[_0xf7c5[13]](function(_0xb60bxe){console[_0xf7c5[36]](_0xb60bxe);return handleError(_0xb60bxc,_0xb60bxe)})};exports[_0xf7c5[40]]= function(_0xb60bxb,_0xb60bxc){return Tag[_0xf7c5[40]](_0xb60bxb[_0xf7c5[41]])[_0xf7c5[16]](function(_0xb60bx10){return _0xb60bxc[_0xf7c5[15]](201)[_0xf7c5[14]](_0xb60bx10)})[_0xf7c5[13]](function(_0xb60bxe){return handleError(_0xb60bxc,_0xb60bxe)})};exports[_0xf7c5[42]]= function(_0xb60bxb,_0xb60bxc){if(_0xb60bxb[_0xf7c5[41]][_0xf7c5[22]]){delete _0xb60bxb[_0xf7c5[41]][_0xf7c5[22]]};return Tag[_0xf7c5[24]](_0xb60bxb[_0xf7c5[23]][_0xf7c5[22]])[_0xf7c5[16]](function(_0xb60bx10){if(!_0xb60bx10){return _0xb60bxc[_0xf7c5[21]](404)};var _0xb60bx11=_[_0xf7c5[29]](_0xb60bx10,_0xb60bxb[_0xf7c5[41]]);return _0xb60bx11[_0xf7c5[43]]()})[_0xf7c5[16]](function(_0xb60bx10){return _0xb60bxc[_0xf7c5[15]](200)[_0xf7c5[14]](_0xb60bx10)})[_0xf7c5[13]](function(_0xb60bxe){return handleError(_0xb60bxc,_0xb60bxe)})};exports[_0xf7c5[44]]= function(_0xb60bxb,_0xb60bxc){return Tag[_0xf7c5[32]](_0xf7c5[47])[_0xf7c5[24]](_0xb60bxb[_0xf7c5[23]][_0xf7c5[22]])[_0xf7c5[16]](function(_0xb60bx10){if(!_0xb60bx10){return _0xb60bxc[_0xf7c5[21]](404)};if(tagHasAssociation(_0xb60bx10)){var _0xb60bxe= new Error();_0xb60bxe[_0xf7c5[45]]= _0xf7c5[46];throw _0xb60bxe};return _0xb60bx10[_0xf7c5[44]]()})[_0xf7c5[16]](function(){return _0xb60bxc[_0xf7c5[21]](204)})[_0xf7c5[13]](function(_0xb60bxe){return handleError(_0xb60bxc,_0xb60bxe)})};exports[_0xf7c5[48]]= function(_0xb60bxb,_0xb60bxc){return Tag[_0xf7c5[44]]({where:{id:_0xb60bxb[_0xf7c5[17]][_0xf7c5[49]]},individualHooks:true})[_0xf7c5[16]](function(){return _0xb60bxc[_0xf7c5[21]](204)})[_0xf7c5[13]](function(_0xb60bxe){return handleError(_0xb60bxc,_0xb60bxe)})};function handleError(_0xb60bxc,_0xb60bxe){return _0xb60bxc[_0xf7c5[15]](500)[_0xf7c5[14]](_0xb60bxe)}function tagHasAssociation(_0xb60bx10){return ((_0xb60bx10[_0xf7c5[50]]&& _0xb60bx10[_0xf7c5[50]][_0xf7c5[51]]> 0))} \ No newline at end of file diff --git a/server/api/tag/tag.events.js b/server/api/tag/tag.events.js index 61d6e17..42c7698 100644 --- a/server/api/tag/tag.events.js +++ b/server/api/tag/tag.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Tag = require('../../models').Tag; - -var TagEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -TagEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Tag.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - TagEvents.emit(event + ':' + doc._id, doc); - TagEvents.emit(event, doc); - done(null); - } -} - -module.exports = TagEvents; +var _0x1a12=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x61\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1a12[0];const EventEmitter=require(_0x1a12[1]);const Tag=require(_0x1a12[3])[_0x1a12[2]];var TagEvents= new EventEmitter();TagEvents[_0x1a12[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1a12[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1a12[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1a12[6]};for(var e in events){var event=events[e];Tag[_0x1a12[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7489x8,_0x7489x9,_0x7489xa){TagEvents[_0x1a12[10]](event+ _0x1a12[8]+ _0x7489x8[_0x1a12[9]],_0x7489x8);TagEvents[_0x1a12[10]](event,_0x7489x8);_0x7489xa(null)}}module[_0x1a12[11]]= TagEvents \ No newline at end of file diff --git a/server/api/tag/tag.socket.js b/server/api/tag/tag.socket.js index 6fccbd9..176114d 100644 --- a/server/api/tag/tag.socket.js +++ b/server/api/tag/tag.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const TagEvents = require('./tag.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('tag:' + event, socket); - - TagEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - TagEvents.removeListener(event, listener); - }; -} +var _0x4bb5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x61\x67\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x61\x67\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x4bb5[0];const TagEvents=require(_0x4bb5[1]);var events=[_0x4bb5[2],_0x4bb5[3]];exports[_0x4bb5[4]]= function(_0x70f5x3){for(var _0x70f5x4=0,_0x70f5x5=events[_0x4bb5[5]];_0x70f5x4< _0x70f5x5;_0x70f5x4++){var _0x70f5x6=events[_0x70f5x4];var _0x70f5x7=createListener(_0x4bb5[6]+ _0x70f5x6,_0x70f5x3);TagEvents[_0x4bb5[7]](_0x70f5x6,_0x70f5x7);_0x70f5x3[_0x4bb5[7]](_0x4bb5[8],removeListener(_0x70f5x6,_0x70f5x7))}};function createListener(_0x70f5x6,_0x70f5x3){return function(_0x70f5x9){_0x70f5x3[_0x4bb5[9]](_0x70f5x6,_0x70f5x9)}}function removeListener(_0x70f5x6,_0x70f5x7){return function(){TagEvents[_0x4bb5[10]](_0x70f5x6,_0x70f5x7)}} \ No newline at end of file diff --git a/server/api/team/index.js b/server/api/team/index.js index cfc9a7a..497cc8e 100644 --- a/server/api/team/index.js +++ b/server/api/team/index.js @@ -1,247 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./team.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -/** - * @api {get} /api/teams/ Get Teams' list. - * - * @apiParam (Query) {Number} [offset] Pagination offset. - * @apiParam (Query) {Number} [limit] Pagination limit. - * - * @apiVersion 0.0.140 - * @apiName GetTeams - * @apiGroup Teams - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of teams. - * @apiSuccess {Object[]} rows Teams' list. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 2, - * "rows": [{ - * "id": 1 - * "name": "T1" - * "description": "Default Team", - * ... - * },{ - * "id": 2 - * "name": "T2" - * "description": null - * ... - * },...] - * } - */ -router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index); -router.get('/associations', auth.isAuthenticated(), auth.hasModule([5], ['admin']), controller.associationsIndex); -/** - * @api {get} /api/teams/:id Get Team's details. - * @apiParam {Number} id Team's unique ID. - * @apiVersion 0.0.140 - * @apiName GetTeam - * @apiGroup Teams - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Object} Team's details. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "T1" - * "description": "Default Team" - * ... - * } - */ -router.get('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.show); -/** - * @api {get} /api/teams/:id/agents Get Team's agents - * @apiParam {Number} id Team's unique ID. - * @apiVersion 0.0.140 - * @apiName showAgents - * @apiGroup Teams - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of agents. - * @apiSuccess {Object[]} rows Agents list. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 2, - * "rows": [{ - * "id": 1 - * "name": "John Doe" - * "fullname": "john.doe" - * "email": "johndoe@test.com" - * "internal": 1000, - * ... - * },{ - * "id": 2 - * "name": "Jane Miller" - * "fullname": "jane.miller", - * "email": "janemiller@test.com" - * "internal": 1001, - * ... - * },...] - * } - */ -router.get('/:id/agents', auth.isAuthenticated(), auth.hasRole('admin'), controller.showAgents); -/** - * @api {post} /api/teams/ Create a new team. - * @apiParam (body) {String} name Team's name. - * @apiParam (body) {String} [description] Team's description. - * - * @apiVersion 0.0.140 - * @apiName CreateTeam - * @apiGroup Teams - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - * { - * "id": 3 - * "name": "My Team" - * "description": "New Team" - * ... - * } - */ -router.post('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.create); -/** - * @api {post} /api/teams/:id/agents Add agents to a team. - * @apiParam {Number} id Team's unique ID. - * @apiParam (body) {Number[]} agents Array of agents' ID - * - * @apiVersion 0.0.140 - * @apiName AddAgents - * @apiGroup Teams - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.post('/:id/agents', auth.isAuthenticated(), auth.hasRole('admin'), controller.addAgents); -/** - * @api {put} /api/teams/:id Update team's details. - * @apiParam {Number} id Team's unique ID. - * @apiParam (body) {String} name Team's name. - * @apiParam (body) {String} [description] Team's description. - * - * @apiVersion 0.0.140 - * @apiName UpdateTeam - * @apiGroup Teams - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 3 - * "name": "Team 3" - * "description": "My description" - * ... - * } - */ -router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update); -/** - * @api {delete} /api/teams/ Bulk Delete teams. - * - * @apiParam (Query) {Number[]} ids Teams' unique ID array. - * - * @apiVersion 0.0.140 - * @apiName BulkDeleteTeams - * @apiGroup Teams - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy); -/** - * @api {delete} /api/teams/:id Delete a team. - * - * @apiParam {Number} id Team's unique ID. - * - * @apiVersion 0.0.140 - * @apiName DeleteTeam - * @apiGroup Teams - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy); -/** - * @api {delete} /api/teams/:id/agents Remove agents from a team. - * @apiParam {Number} id Team's unique ID. - * @apiParam (Query) {Number[]} ids Agents' unique ID array. - * - * @apiVersion 0.0.140 - * @apiName RemoveAgents - * @apiGroup Teams - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id/agents', auth.isAuthenticated(), auth.hasRole('admin'), controller.removeAgents); - -module.exports = router; +var _0x62ae=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x65\x61\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x73","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x73\x49\x6E\x64\x65\x78","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x62ae[0];var express=require(_0x62ae[1]);var controller=require(_0x62ae[2]);var auth=require(_0x62ae[3]);var router=express.Router();router[_0x62ae[9]](_0x62ae[4],auth[_0x62ae[5]](),auth[_0x62ae[7]](_0x62ae[6]),controller[_0x62ae[8]]);router[_0x62ae[9]](_0x62ae[10],auth[_0x62ae[5]](),auth[_0x62ae[11]]([5],[_0x62ae[6]]),controller[_0x62ae[12]]);router[_0x62ae[9]](_0x62ae[13],auth[_0x62ae[5]](),auth[_0x62ae[7]](_0x62ae[6]),controller[_0x62ae[14]]);router[_0x62ae[9]](_0x62ae[15],auth[_0x62ae[5]](),auth[_0x62ae[7]](_0x62ae[6]),controller[_0x62ae[16]]);router[_0x62ae[18]](_0x62ae[4],auth[_0x62ae[5]](),auth[_0x62ae[7]](_0x62ae[6]),controller[_0x62ae[17]]);router[_0x62ae[18]](_0x62ae[15],auth[_0x62ae[5]](),auth[_0x62ae[7]](_0x62ae[6]),controller[_0x62ae[19]]);router[_0x62ae[21]](_0x62ae[13],auth[_0x62ae[5]](),auth[_0x62ae[7]](_0x62ae[6]),controller[_0x62ae[20]]);router[_0x62ae[23]](_0x62ae[4],auth[_0x62ae[5]](),auth[_0x62ae[7]](_0x62ae[6]),controller[_0x62ae[22]]);router[_0x62ae[23]](_0x62ae[13],auth[_0x62ae[5]](),auth[_0x62ae[7]](_0x62ae[6]),controller[_0x62ae[24]]);router[_0x62ae[23]](_0x62ae[15],auth[_0x62ae[5]](),auth[_0x62ae[7]](_0x62ae[6]),controller[_0x62ae[25]]);module[_0x62ae[26]]= router \ No newline at end of file diff --git a/server/api/team/team.controller.js b/server/api/team/team.controller.js index cac8024..1a349ab 100644 --- a/server/api/team/team.controller.js +++ b/server/api/team/team.controller.js @@ -1,252 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var Util = require('../../config/util'); - -var sequelize = require('../../models').sequelize; -var Team = require('../../models').Team; -var Agent = require('../../models').User; -var User = require('../../models').User; - -// Get list of teams -exports.index = function(req, res) { - return Team - .scope('default') - .findAndCountAll(_.merge(Util.getQuery(req.query))) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.associationsIndex = function(req, res) { - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id) - .then(function(user) { - if (!user) { - return res.sendStatus(404); - } - - return user; - }) - .then(Util.getAgentsIdByUser(req.query)) - .then(function(data) { - return Team - .scope({ - method: ['agents', _.map(data.rows, 'id')] - }) - .findAll(_.merge(Util.getQuery(req.query))); - }) - .then(function(result) { - res.status(200).send({ - rows: result, - count: result.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); - - default: - return Team - .scope('agents') - .findAll(_.merge(Util.getQuery(req.query))) - .then(function(result) { - res.status(200).send({ - rows: result, - count: result.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -// Get a single team -exports.show = function(req, res) { - return Team - // .scope('default') - .findById(req.params.id) - .then(function(team) { - if (!team) { - return res.sendStatus(404); - } - return res.send(team); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single team -exports.showAgents = function(req, res) { - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id) - .then(function(user) { - if (!user) { - return res.sendStatus(404); - } - return user; - }) - .then(Util.getAgentsIdByUser(req.query)) - .then(function(data) { - return Team - .scope({ - method: ['agents', _.map(data.rows, 'id')] - }) - .findById(req.params.id); - }) - .then(function(team) { - if (!team) { - return res.sendStatus(404); - } - return res.status(200).send({ - count: team.Users.length, - rows: team.Users - }); - }) - .catch(function(err) { - return handleError(res, err); - }); - default: - return Team - .scope('agents') - .findById(req.params.id) - .then(function(team) { - if (!team) { - return res.sendStatus(404); - } - return res.status(200).send({ - count: team.Users.length, - rows: team.Users - }); - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -// Creates a new team in the DB. -exports.create = function(req, res) { - return Team - // .scope('default') - .create(req.body) - .then(function(team) { - return res.status(201).send(team); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing team in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return Team - .findById(req.params.id) - .then(function(team) { - if (!team) { - return res.sendStatus(404); - } - var updated = _.merge(team, req.body); - return updated - .save(); - }) - .then(function(team) { - return res.status(200).send(team); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a team from the DB. -exports.destroy = function(req, res) { - return Team - .findById(req.params.id) - .then(function(team) { - if (!team) { - return res.sendStatus(404); - } - return team.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return Team - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing user_has_mail_queue in the DB. -exports.addAgents = function(req, res, next) { - return Team - .findById(req.params.id) - .then(function(team) { - if (!team) { - return res.sendStatus(404); - } - return team - .addUsers(req.body.agents); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return next(err); - }); -}; - -exports.removeAgents = function(req, res, next) { - return Team - .findById(req.params.id) - .then(function(team) { - if (!team) { - return res.sendStatus(404); - } - return team - .removeUser(req.query.agents); - }) - .then(function() { - return res.sendStatus(202); - }) - .catch(function(err) { - return next(err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xfb9b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x61\x6D","\x55\x73\x65\x72","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x73\x49\x6E\x64\x65\x78","\x6C\x65\x6E\x67\x74\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74\x73","\x72\x6F\x77\x73","\x69\x64","\x6D\x61\x70","\x67\x65\x74\x41\x67\x65\x6E\x74\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x61\x64\x64\x55\x73\x65\x72\x73","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x72\x65\x6D\x6F\x76\x65\x55\x73\x65\x72"];_0xfb9b[0];var _=require(_0xfb9b[1]);var util=require(_0xfb9b[2]);var Util=require(_0xfb9b[3]);var sequelize=require(_0xfb9b[5])[_0xfb9b[4]];var Team=require(_0xfb9b[5])[_0xfb9b[6]];var Agent=require(_0xfb9b[5])[_0xfb9b[7]];var User=require(_0xfb9b[5])[_0xfb9b[7]];exports[_0xfb9b[8]]= function(_0x6ff5x8,_0x6ff5x9){return Team[_0xfb9b[18]](_0xfb9b[17])[_0xfb9b[16]](_[_0xfb9b[15]](Util[_0xfb9b[14]](_0x6ff5x8[_0xfb9b[13]])))[_0xfb9b[12]](function(_0x6ff5xb){_0x6ff5x9[_0xfb9b[11]](200)[_0xfb9b[10]](_0x6ff5xb)})[_0xfb9b[9]](function(_0x6ff5xa){return handleError(_0x6ff5x9,_0x6ff5xa)})};exports[_0xfb9b[19]]= function(_0x6ff5x8,_0x6ff5x9){switch(_0x6ff5x8[_0xfb9b[28]][_0xfb9b[30]]){case _0xfb9b[28]:return User[_0xfb9b[29]](_0x6ff5x8[_0xfb9b[28]][_0xfb9b[24]])[_0xfb9b[12]](function(_0x6ff5xd){if(!_0x6ff5xd){return _0x6ff5x9[_0xfb9b[27]](404)};return _0x6ff5xd})[_0xfb9b[12]](Util[_0xfb9b[26]](_0x6ff5x8[_0xfb9b[13]]))[_0xfb9b[12]](function(_0x6ff5xc){return Team[_0xfb9b[18]]({method:[_0xfb9b[22],_[_0xfb9b[25]](_0x6ff5xc[_0xfb9b[23]],_0xfb9b[24])]})[_0xfb9b[21]](_[_0xfb9b[15]](Util[_0xfb9b[14]](_0x6ff5x8[_0xfb9b[13]])))})[_0xfb9b[12]](function(_0x6ff5xb){_0x6ff5x9[_0xfb9b[11]](200)[_0xfb9b[10]]({rows:_0x6ff5xb,count:_0x6ff5xb[_0xfb9b[20]]})})[_0xfb9b[9]](function(_0x6ff5xa){return handleError(_0x6ff5x9,_0x6ff5xa)});default:return Team[_0xfb9b[18]](_0xfb9b[22])[_0xfb9b[21]](_[_0xfb9b[15]](Util[_0xfb9b[14]](_0x6ff5x8[_0xfb9b[13]])))[_0xfb9b[12]](function(_0x6ff5xb){_0x6ff5x9[_0xfb9b[11]](200)[_0xfb9b[10]]({rows:_0x6ff5xb,count:_0x6ff5xb[_0xfb9b[20]]})})[_0xfb9b[9]](function(_0x6ff5xa){return handleError(_0x6ff5x9,_0x6ff5xa)})}};exports[_0xfb9b[31]]= function(_0x6ff5x8,_0x6ff5x9){return Team[_0xfb9b[29]](_0x6ff5x8[_0xfb9b[32]][_0xfb9b[24]])[_0xfb9b[12]](function(_0x6ff5xe){if(!_0x6ff5xe){return _0x6ff5x9[_0xfb9b[27]](404)};return _0x6ff5x9[_0xfb9b[10]](_0x6ff5xe)})[_0xfb9b[9]](function(_0x6ff5xa){return handleError(_0x6ff5x9,_0x6ff5xa)})};exports[_0xfb9b[33]]= function(_0x6ff5x8,_0x6ff5x9){switch(_0x6ff5x8[_0xfb9b[28]][_0xfb9b[30]]){case _0xfb9b[28]:return User[_0xfb9b[29]](_0x6ff5x8[_0xfb9b[28]][_0xfb9b[24]])[_0xfb9b[12]](function(_0x6ff5xd){if(!_0x6ff5xd){return _0x6ff5x9[_0xfb9b[27]](404)};return _0x6ff5xd})[_0xfb9b[12]](Util[_0xfb9b[26]](_0x6ff5x8[_0xfb9b[13]]))[_0xfb9b[12]](function(_0x6ff5xc){return Team[_0xfb9b[18]]({method:[_0xfb9b[22],_[_0xfb9b[25]](_0x6ff5xc[_0xfb9b[23]],_0xfb9b[24])]})[_0xfb9b[29]](_0x6ff5x8[_0xfb9b[32]][_0xfb9b[24]])})[_0xfb9b[12]](function(_0x6ff5xe){if(!_0x6ff5xe){return _0x6ff5x9[_0xfb9b[27]](404)};return _0x6ff5x9[_0xfb9b[11]](200)[_0xfb9b[10]]({count:_0x6ff5xe[_0xfb9b[34]][_0xfb9b[20]],rows:_0x6ff5xe[_0xfb9b[34]]})})[_0xfb9b[9]](function(_0x6ff5xa){return handleError(_0x6ff5x9,_0x6ff5xa)});default:return Team[_0xfb9b[18]](_0xfb9b[22])[_0xfb9b[29]](_0x6ff5x8[_0xfb9b[32]][_0xfb9b[24]])[_0xfb9b[12]](function(_0x6ff5xe){if(!_0x6ff5xe){return _0x6ff5x9[_0xfb9b[27]](404)};return _0x6ff5x9[_0xfb9b[11]](200)[_0xfb9b[10]]({count:_0x6ff5xe[_0xfb9b[34]][_0xfb9b[20]],rows:_0x6ff5xe[_0xfb9b[34]]})})[_0xfb9b[9]](function(_0x6ff5xa){return handleError(_0x6ff5x9,_0x6ff5xa)})}};exports[_0xfb9b[35]]= function(_0x6ff5x8,_0x6ff5x9){return Team[_0xfb9b[35]](_0x6ff5x8[_0xfb9b[38]])[_0xfb9b[12]](function(_0x6ff5xe){return _0x6ff5x9[_0xfb9b[11]](201)[_0xfb9b[10]](_0x6ff5xe)})[_0xfb9b[9]](sequelize.UniqueConstraintError,function(_0x6ff5xa){return Util[_0xfb9b[37]][_0xfb9b[36]](_0x6ff5x9,_0x6ff5xa)})[_0xfb9b[9]](function(_0x6ff5xa){return handleError(_0x6ff5x9,_0x6ff5xa)})};exports[_0xfb9b[39]]= function(_0x6ff5x8,_0x6ff5x9){if(_0x6ff5x8[_0xfb9b[38]][_0xfb9b[24]]){delete _0x6ff5x8[_0xfb9b[38]][_0xfb9b[24]]};return Team[_0xfb9b[29]](_0x6ff5x8[_0xfb9b[32]][_0xfb9b[24]])[_0xfb9b[12]](function(_0x6ff5xe){if(!_0x6ff5xe){return _0x6ff5x9[_0xfb9b[27]](404)};var _0x6ff5xf=_[_0xfb9b[15]](_0x6ff5xe,_0x6ff5x8[_0xfb9b[38]]);return _0x6ff5xf[_0xfb9b[40]]()})[_0xfb9b[12]](function(_0x6ff5xe){return _0x6ff5x9[_0xfb9b[11]](200)[_0xfb9b[10]](_0x6ff5xe)})[_0xfb9b[9]](function(_0x6ff5xa){return handleError(_0x6ff5x9,_0x6ff5xa)})};exports[_0xfb9b[41]]= function(_0x6ff5x8,_0x6ff5x9){return Team[_0xfb9b[29]](_0x6ff5x8[_0xfb9b[32]][_0xfb9b[24]])[_0xfb9b[12]](function(_0x6ff5xe){if(!_0x6ff5xe){return _0x6ff5x9[_0xfb9b[27]](404)};return _0x6ff5xe[_0xfb9b[41]]()})[_0xfb9b[12]](function(){return _0x6ff5x9[_0xfb9b[27]](204)})[_0xfb9b[9]](function(_0x6ff5xa){return handleError(_0x6ff5x9,_0x6ff5xa)})};exports[_0xfb9b[42]]= function(_0x6ff5x8,_0x6ff5x9){return Team[_0xfb9b[41]]({where:{id:_0x6ff5x8[_0xfb9b[13]][_0xfb9b[43]]},individualHooks:true})[_0xfb9b[12]](function(){return _0x6ff5x9[_0xfb9b[27]](204)})[_0xfb9b[9]](function(_0x6ff5xa){return handleError(_0x6ff5x9,_0x6ff5xa)})};exports[_0xfb9b[44]]= function(_0x6ff5x8,_0x6ff5x9,_0x6ff5x10){return Team[_0xfb9b[29]](_0x6ff5x8[_0xfb9b[32]][_0xfb9b[24]])[_0xfb9b[12]](function(_0x6ff5xe){if(!_0x6ff5xe){return _0x6ff5x9[_0xfb9b[27]](404)};return _0x6ff5xe[_0xfb9b[45]](_0x6ff5x8[_0xfb9b[38]][_0xfb9b[22]])})[_0xfb9b[12]](function(){return _0x6ff5x9[_0xfb9b[27]](204)})[_0xfb9b[9]](function(_0x6ff5xa){return _0x6ff5x10(_0x6ff5xa)})};exports[_0xfb9b[46]]= function(_0x6ff5x8,_0x6ff5x9,_0x6ff5x10){return Team[_0xfb9b[29]](_0x6ff5x8[_0xfb9b[32]][_0xfb9b[24]])[_0xfb9b[12]](function(_0x6ff5xe){if(!_0x6ff5xe){return _0x6ff5x9[_0xfb9b[27]](404)};return _0x6ff5xe[_0xfb9b[47]](_0x6ff5x8[_0xfb9b[13]][_0xfb9b[22]])})[_0xfb9b[12]](function(){return _0x6ff5x9[_0xfb9b[27]](202)})[_0xfb9b[9]](function(_0x6ff5xa){return _0x6ff5x10(_0x6ff5xa)})};function handleError(_0x6ff5x9,_0x6ff5xa){return _0x6ff5x9[_0xfb9b[11]](500)[_0xfb9b[10]](_0x6ff5xa)} \ No newline at end of file diff --git a/server/api/team/team.events.js b/server/api/team/team.events.js index 8a9173b..07ace3e 100644 --- a/server/api/team/team.events.js +++ b/server/api/team/team.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Team = require('../../models').Team; - -var TeamEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -TeamEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Team.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - TeamEvents.emit(event + ':' + doc._id, doc); - TeamEvents.emit(event, doc); - done(null); - } -} - -module.exports = TeamEvents; +var _0xdf1b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdf1b[0];const EventEmitter=require(_0xdf1b[1]);const Team=require(_0xdf1b[3])[_0xdf1b[2]];var TeamEvents= new EventEmitter();TeamEvents[_0xdf1b[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdf1b[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdf1b[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdf1b[6]};for(var e in events){var event=events[e];Team[_0xdf1b[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xcf43x8,_0xcf43x9,_0xcf43xa){TeamEvents[_0xdf1b[10]](event+ _0xdf1b[8]+ _0xcf43x8[_0xdf1b[9]],_0xcf43x8);TeamEvents[_0xdf1b[10]](event,_0xcf43x8);_0xcf43xa(null)}}module[_0xdf1b[11]]= TeamEvents \ No newline at end of file diff --git a/server/api/team/team.socket.js b/server/api/team/team.socket.js index 8217583..c3b892e 100644 --- a/server/api/team/team.socket.js +++ b/server/api/team/team.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const TeamEvents = require('./team.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('team:' + event, socket); - - TeamEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - TeamEvents.removeListener(event, listener); - }; -} +var _0xb297=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x65\x61\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x61\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xb297[0];const TeamEvents=require(_0xb297[1]);var events=[_0xb297[2],_0xb297[3]];exports[_0xb297[4]]= function(_0x29fdx3){for(var _0x29fdx4=0,_0x29fdx5=events[_0xb297[5]];_0x29fdx4< _0x29fdx5;_0x29fdx4++){var _0x29fdx6=events[_0x29fdx4];var _0x29fdx7=createListener(_0xb297[6]+ _0x29fdx6,_0x29fdx3);TeamEvents[_0xb297[7]](_0x29fdx6,_0x29fdx7);_0x29fdx3[_0xb297[7]](_0xb297[8],removeListener(_0x29fdx6,_0x29fdx7))}};function createListener(_0x29fdx6,_0x29fdx3){return function(_0x29fdx9){_0x29fdx3[_0xb297[9]](_0x29fdx6,_0x29fdx9)}}function removeListener(_0x29fdx6,_0x29fdx7){return function(){TeamEvents[_0xb297[10]](_0x29fdx6,_0x29fdx7)}} \ No newline at end of file diff --git a/server/api/telephone/index.js b/server/api/telephone/index.js index a545c63..8f19dbd 100644 --- a/server/api/telephone/index.js +++ b/server/api/telephone/index.js @@ -1,174 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./telephone.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -/** - * @api {get} /api/telephones/ Get telephones list. - * @apiVersion 0.0.140 - * @apiName GetTelephones - * @apiGroup Telephones - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of telephones. - * @apiSuccess {Object[]} rows Get list of agent detailss. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 1, - * "rows": [{ - * "id": 1 - * "name": "john.doe" - * "internal": 1001 - * ... - * }] - * } - */ -router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.index); - -/** - * @api {get} /api/telephones/:id Get telephone details. - * @apiParam {Number} id Telephone's unique ID. - * @apiVersion 0.0.140 - * @apiName GetTelephone - * @apiGroup Telephones - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Object} Telephone's details. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "john.doe" - * "internal": 1001 - * ... - * } - */ -router.get('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.show); - -/** - * @api {post} /api/telephones/ Create telephone. - * @apiParam (Body) {String} name Telephone's name. - * @apiParam (Body) {String} context="from-sip" Telephone's SIP context. - * @apiParam (Body) {String} password Telephone's password. - * @apiParam (Body) {Number} internal Telephone's internal number. - * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp" Telephone's SIP transport. - * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" Telephone's SIP codecs. - * @apiParam (Body) {Number} internal Telephone's internal number. - * - * @apiVersion 0.0.140 - * @apiName CreateTelephone - * @apiGroup Telephones - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - * { - * "id": 1 - * "name": "john.doe" - * "internal": 1001 - * ... - * } - */ -router.post('/', auth.isAuthenticated(), license.isValidDate(), license.isTelephonesLimit(), auth.hasRole('admin'), controller.create); - -/** - * @api {update} /api/telephones/:id Update telephone details. - * - * @apiParam (Params) {Number} id Telephone's unique ID. - * @apiParam (Body) {String} email Telephone's email. - * @apiParam (Body) {String} context="from-sip" Telephone's SIP context. - * @apiParam (Body) {String} password Telephone's password. - * @apiParam (Body) {Number} internal Telephone's internal number. - * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp" Telephone's SIP transport. - * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" Telephone's SIP codecs. - * - * @apiVersion 0.0.140 - * @apiName UpdateTelephone - * @apiGroup Telephones - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "john.doe" - * "internal": 1001 - * ... - * } - */ -router.put('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.update); - -/** - * @api {delete} /api/telephones/ Bulk Delete telephones. - * - * @apiParam (Query) {Number[]} ids Telephones' unique ID array. - * - * @apiVersion 0.0.140 - * @apiName BulkDeleteTelephones - * @apiGroup Telephones - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy); - -/** - * @api {delete} /api/telephones/:id Delete telephone. - * - * @apiParam {Number} id Telephone's unique ID. - * - * @apiVersion 0.0.140 - * @apiName DeleteTelephone - * @apiGroup Telephones - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy); - -module.exports = router; +var _0xc55c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x4C\x69\x6D\x69\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xc55c[0];var express=require(_0xc55c[1]);var auth=require(_0xc55c[2]);var controller=require(_0xc55c[3]);var license=require(_0xc55c[4]);var router=express.Router();router[_0xc55c[10]](_0xc55c[5],auth[_0xc55c[6]](),auth[_0xc55c[8]](_0xc55c[7]),controller[_0xc55c[9]]);router[_0xc55c[10]](_0xc55c[11],auth[_0xc55c[6]](),auth[_0xc55c[8]](_0xc55c[7]),controller[_0xc55c[12]]);router[_0xc55c[16]](_0xc55c[5],auth[_0xc55c[6]](),license[_0xc55c[13]](),license[_0xc55c[14]](),auth[_0xc55c[8]](_0xc55c[7]),controller[_0xc55c[15]]);router[_0xc55c[18]](_0xc55c[11],auth[_0xc55c[6]](),auth[_0xc55c[8]](_0xc55c[7]),controller[_0xc55c[17]]);router[_0xc55c[20]](_0xc55c[5],auth[_0xc55c[6]](),auth[_0xc55c[8]](_0xc55c[7]),controller[_0xc55c[19]]);router[_0xc55c[20]](_0xc55c[11],auth[_0xc55c[6]](),auth[_0xc55c[8]](_0xc55c[7]),controller[_0xc55c[21]]);module[_0xc55c[22]]= router \ No newline at end of file diff --git a/server/api/telephone/telephone.controller.js b/server/api/telephone/telephone.controller.js index 139df32..f8d4a84 100644 --- a/server/api/telephone/telephone.controller.js +++ b/server/api/telephone/telephone.controller.js @@ -1,157 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/telephones -> index - * POST /api/telephones -> create - * GET /api/telephones/:id -> show - * PUT /api/telephones/:id -> update - * DELETE /api/telephones/:id -> destroy - */ - -'use strict'; - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var sequelize = require('../../models').sequelize; -var Telephone = require('../../models').User; - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates, t) { - return function(entity) { - return entity.updateAttributes(updates, { - transaction: t - }) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of Telephones -exports.index = function(req, res) { - return Telephone - .scope('telephone') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -} - -// Gets a single Telephone from the DB -exports.show = function(req, res) { - Telephone.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new Telephone in the DB -exports.create = function(req, res) { - var password = String(req.body.password); - if (!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/.test(password))) { - throw new Error('Wrong password format!'); - } - // Set default role - req.body.role = 'telephone'; - return sequelize.transaction(function(t) { - return Telephone - .create(req.body, { - transaction: t - }) - .then(responseWithResult(res, 201)) - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(handleError(res)); -} - -// Updates an existing Telephone in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - if (req.body.password) { - var password = String(req.body.password); - if (!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/.test(password))) { - throw new Error('Wrong password format!'); - } - } - - delete req.body.name; - - return sequelize.transaction(function(t) { - return Telephone.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body, t)) - .then(responseWithResult(res)) - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(handleError(res)); -} - -// Deletes a Telephone from the DB -exports.destroy = function(req, res) { - return Telephone.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return Telephone - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; +var _0x984a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x62\x6F\x64\x79","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x72\x6F\x6C\x65","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x6E\x61\x6D\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64\x73"];_0x984a[0];var _=require(_0x984a[1]);var Util=require(_0x984a[2]);var sequelize=require(_0x984a[4])[_0x984a[3]];var Telephone=require(_0x984a[4])[_0x984a[5]];function handleError(_0x38fex6,_0x38fex7){_0x38fex7= _0x38fex7|| 500;return function(_0x38fex8){_0x38fex6[_0x984a[7]](_0x38fex7)[_0x984a[6]](_0x38fex8)}}function responseWithResult(_0x38fex6,_0x38fex7){_0x38fex7= _0x38fex7|| 200;return function(_0x38fexa){if(_0x38fexa){_0x38fex6[_0x984a[7]](_0x38fex7)[_0x984a[8]](_0x38fexa)}}}function handleEntityNotFound(_0x38fex6){return function(_0x38fexa){if(!_0x38fexa){_0x38fex6[_0x984a[7]](404)[_0x984a[9]]();return null};return _0x38fexa}}function saveUpdates(_0x38fexd,_0x38fexe){return function(_0x38fexa){return _0x38fexa[_0x984a[11]](_0x38fexd,{transaction:_0x38fexe})[_0x984a[10]](function(_0x38fexf){return _0x38fexf})}}function removeEntity(_0x38fex6){return function(_0x38fexa){if(_0x38fexa){return _0x38fexa[_0x984a[12]]()[_0x984a[10]](function(){_0x38fex6[_0x984a[7]](204)[_0x984a[9]]()})}}}exports[_0x984a[13]]= function(_0x38fex11,_0x38fex6){return Telephone[_0x984a[19]](_0x984a[18])[_0x984a[17]](Util[_0x984a[16]](_0x38fex11[_0x984a[15]]))[_0x984a[10]](function(_0x38fex12){_0x38fex6[_0x984a[7]](200)[_0x984a[6]](_0x38fex12)})[_0x984a[14]](function(_0x38fex8){return handleError(_0x38fex6,_0x38fex8)})};exports[_0x984a[20]]= function(_0x38fex11,_0x38fex6){Telephone[_0x984a[23]](_0x38fex11[_0x984a[22]][_0x984a[21]])[_0x984a[10]](handleEntityNotFound(_0x38fex6))[_0x984a[10]](responseWithResult(_0x38fex6))[_0x984a[14]](handleError(_0x38fex6))};exports[_0x984a[24]]= function(_0x38fex11,_0x38fex6){var _0x38fex13=String(_0x38fex11[_0x984a[26]][_0x984a[25]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0x984a[27]](_0x38fex13))){throw new Error(_0x984a[28])};_0x38fex11[_0x984a[26]][_0x984a[29]]= _0x984a[18];return sequelize[_0x984a[32]](function(_0x38fexe){return Telephone[_0x984a[24]](_0x38fex11[_0x984a[26]],{transaction:_0x38fexe})[_0x984a[10]](responseWithResult(_0x38fex6,201))})[_0x984a[14]](sequelize.UniqueConstraintError,function(_0x38fex8){return Util[_0x984a[31]][_0x984a[30]](_0x38fex6,_0x38fex8)})[_0x984a[14]](handleError(_0x38fex6))};exports[_0x984a[33]]= function(_0x38fex11,_0x38fex6){if(_0x38fex11[_0x984a[26]][_0x984a[21]]){delete _0x38fex11[_0x984a[26]][_0x984a[21]]};if(_0x38fex11[_0x984a[26]][_0x984a[25]]){var _0x38fex13=String(_0x38fex11[_0x984a[26]][_0x984a[25]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0x984a[27]](_0x38fex13))){throw new Error(_0x984a[28])}};delete _0x38fex11[_0x984a[26]][_0x984a[34]];return sequelize[_0x984a[32]](function(_0x38fexe){return Telephone[_0x984a[23]](_0x38fex11[_0x984a[22]][_0x984a[21]])[_0x984a[10]](handleEntityNotFound(_0x38fex6))[_0x984a[10]](saveUpdates(_0x38fex11[_0x984a[26]],_0x38fexe))[_0x984a[10]](responseWithResult(_0x38fex6))})[_0x984a[14]](sequelize.UniqueConstraintError,function(_0x38fex8){return Util[_0x984a[31]][_0x984a[30]](_0x38fex6,_0x38fex8)})[_0x984a[14]](handleError(_0x38fex6))};exports[_0x984a[12]]= function(_0x38fex11,_0x38fex6){return Telephone[_0x984a[23]](_0x38fex11[_0x984a[22]][_0x984a[21]])[_0x984a[10]](handleEntityNotFound(_0x38fex6))[_0x984a[10]](removeEntity(_0x38fex6))[_0x984a[14]](handleError(_0x38fex6))};exports[_0x984a[35]]= function(_0x38fex11,_0x38fex6){return Telephone[_0x984a[12]]({where:{id:_0x38fex11[_0x984a[15]][_0x984a[37]]},individualHooks:true})[_0x984a[10]](function(){return _0x38fex6[_0x984a[36]](204)})[_0x984a[14]](function(_0x38fex8){return handleError(_0x38fex6,_0x38fex8)})} \ No newline at end of file diff --git a/server/api/telephone/telephone.events.js b/server/api/telephone/telephone.events.js index 25f4f9a..e4eba2f 100644 --- a/server/api/telephone/telephone.events.js +++ b/server/api/telephone/telephone.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Telephone = require('../../models').Telephone; - -var TelephoneEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -TelephoneEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Telephone.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - TelephoneEvents.emit(event + ':' + doc._id, doc); - TelephoneEvents.emit(event, doc); - done(null); - } -} - -module.exports = TelephoneEvents; +var _0xa0b1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa0b1[0];const EventEmitter=require(_0xa0b1[1]);const Telephone=require(_0xa0b1[3])[_0xa0b1[2]];var TelephoneEvents= new EventEmitter();TelephoneEvents[_0xa0b1[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa0b1[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xa0b1[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa0b1[6]};for(var e in events){var event=events[e];Telephone[_0xa0b1[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x2d95x8,_0x2d95x9,_0x2d95xa){TelephoneEvents[_0xa0b1[10]](event+ _0xa0b1[8]+ _0x2d95x8[_0xa0b1[9]],_0x2d95x8);TelephoneEvents[_0xa0b1[10]](event,_0x2d95x8);_0x2d95xa(null)}}module[_0xa0b1[11]]= TelephoneEvents \ No newline at end of file diff --git a/server/api/telephone/telephone.socket.js b/server/api/telephone/telephone.socket.js index 66a9a8e..5ae43a2 100644 --- a/server/api/telephone/telephone.socket.js +++ b/server/api/telephone/telephone.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const TelephoneEvents = require('./telephone.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('telephone:' + event, socket); - - TelephoneEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - TelephoneEvents.removeListener(event, listener); - }; -} +var _0xe7db=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xe7db[0];const TelephoneEvents=require(_0xe7db[1]);var events=[_0xe7db[2],_0xe7db[3]];exports[_0xe7db[4]]= function(_0xd0bex3){for(var _0xd0bex4=0,_0xd0bex5=events[_0xe7db[5]];_0xd0bex4< _0xd0bex5;_0xd0bex4++){var _0xd0bex6=events[_0xd0bex4];var _0xd0bex7=createListener(_0xe7db[6]+ _0xd0bex6,_0xd0bex3);TelephoneEvents[_0xe7db[7]](_0xd0bex6,_0xd0bex7);_0xd0bex3[_0xe7db[7]](_0xe7db[8],removeListener(_0xd0bex6,_0xd0bex7))}};function createListener(_0xd0bex6,_0xd0bex3){return function(_0xd0bex9){_0xd0bex3[_0xe7db[9]](_0xd0bex6,_0xd0bex9)}}function removeListener(_0xd0bex6,_0xd0bex7){return function(){TelephoneEvents[_0xe7db[10]](_0xd0bex6,_0xd0bex7)}} \ No newline at end of file diff --git a/server/api/template/index.js b/server/api/template/index.js index 68e0650..a32ada2 100644 --- a/server/api/template/index.js +++ b/server/api/template/index.js @@ -1,182 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./template.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); -/** - * @api {get} /api/template/ Get Templates' list. - * - * @apiParam (Query) {Number} [offset] Pagination offset. - * @apiParam (Query) {Number} [limit] Pagination limit. - * - * @apiVersion 0.0.140 - * @apiName GetTemplates - * @apiGroup Templates - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of templates. - * @apiSuccess {Object[]} rows Templates list. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 2, - * "rows": [{ - * "id": 1 - * "name": "Template 1" - * "description": "Auto Response" - * "subject": "My subject" - * "attachment": null - * "html": null - * "text": "Hi, nice to meet you" - * ... - * },{ - * "id": 2 - * "name": "Template abc" - * "description": null - * ... - * },...] - * } - */ -router.get('/', auth.isAuthenticated(), auth.hasModule([13], ['admin', 'user', 'agent']), controller.index); -/** - * @api {get} /api/templates/:id Get Template's details. - * @apiParam {Number} id Template's unique ID. - * @apiVersion 0.0.140 - * @apiName GetTemplate - * @apiGroup Templates - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Object} Template's details. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "Template 1" - * "description": "Auto Response" - * "subject": "My subject" - * "attachment": null - * "html": null - * "text": "Hi, nice to meet you" - * ... - * } - */ -router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show); -/** - * @api {post} /api/templates/ Create a new template. - * @apiParam (body) {String} name Template's name. - * @apiParam (body) {String} [description] Template's description. - * @apiParam (body) {String} [subject] Template's subject. - * @apiParam (body) {String} [html] Template's content. - * - * @apiVersion 0.0.140 - * @apiName CreateTemplate - * @apiGroup Templates - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - * { - * id": 2 - * "name": "Template 2" - * "description": "My Response", - * "subject": "My subject", - * "html": null - * ... - * } - */ -router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create); -/** - * @api {put} /api/templates/:id Update template's details. - * @apiParam {Number} id Template's unique ID. - * @apiParam (body) {String} name Template's name. - * @apiParam (body) {String} [description] Template's description. - * @apiParam (body) {String} [subject] Template's subject. - * @apiParam (body) {String} [html] Template's content. - * - * @apiVersion 0.0.140 - * @apiName UpdateTemplate - * @apiGroup Templates - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * id": 2 - * "name": "Template 2" - * "description": "My Response", - * "subject": "My subject", - * "html": "Hi, nice to meet you" - * ... - * } - */ -router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update); -/** - * @api {delete} /api/templates/:id Delete a template. - * - * @apiParam {Number} id Template's unique ID. - * - * @apiVersion 0.0.140 - * @apiName DeleteTemplate - * @apiGroup Templates - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy); -/** - * @api {delete} /api/templates/ Bulk Delete templates. - * - * @apiParam (Query) {Number[]} ids Templates' unique ID array. - * - * @apiVersion 0.0.140 - * @apiName BulkDeleteTemplates - * @apiGroup Templates - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy); - -module.exports = router; +var _0xd6a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xd6a6[0];var express=require(_0xd6a6[1]);var controller=require(_0xd6a6[2]);var auth=require(_0xd6a6[3]);var router=express.Router();router[_0xd6a6[11]](_0xd6a6[4],auth[_0xd6a6[5]](),auth[_0xd6a6[9]]([13],[_0xd6a6[6],_0xd6a6[7],_0xd6a6[8]]),controller[_0xd6a6[10]]);router[_0xd6a6[11]](_0xd6a6[12],auth[_0xd6a6[5]](),auth[_0xd6a6[9]]([13],[_0xd6a6[6]]),controller[_0xd6a6[13]]);router[_0xd6a6[15]](_0xd6a6[4],auth[_0xd6a6[5]](),auth[_0xd6a6[9]]([13],[_0xd6a6[6]]),controller[_0xd6a6[14]]);router[_0xd6a6[17]](_0xd6a6[12],auth[_0xd6a6[5]](),auth[_0xd6a6[9]]([13],[_0xd6a6[6]]),controller[_0xd6a6[16]]);router[_0xd6a6[19]](_0xd6a6[12],auth[_0xd6a6[5]](),auth[_0xd6a6[9]]([13],[_0xd6a6[6]]),controller[_0xd6a6[18]]);router[_0xd6a6[19]](_0xd6a6[4],auth[_0xd6a6[5]](),auth[_0xd6a6[9]]([13],[_0xd6a6[6]]),controller[_0xd6a6[20]]);module[_0xd6a6[21]]= router \ No newline at end of file diff --git a/server/api/template/template.controller.js b/server/api/template/template.controller.js index 79f8d99..9dc1800 100644 --- a/server/api/template/template.controller.js +++ b/server/api/template/template.controller.js @@ -1,108 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var Util = require('../../config/util'); - -var Template = require('../../models').Template; - -// Get list of agents -exports.index = function(req, res, next) { - return Template - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single template -exports.show = function(req, res) { - return Template - .findById(req.params.id) - .then(function(template) { - if (!template) { - return res.sendStatus(404); - } - return res.send(template); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new template in the DB. -exports.create = function(req, res) { - return Template - .create(req.body) - .then(function(template) { - return res.status(201).send(template); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing template in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return Template - .findById(req.params.id) - .then(function(template) { - if (!template) { - return res.sendStatus(404); - } - var updated = _.merge(template, req.body); - return updated - .save(); - }) - .then(function(template) { - return res.status(200).send(template); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a template from the DB. -exports.destroy = function(req, res) { - return Template - .findById(req.params.id) - .then(function(template) { - if (!template) { - return res.sendStatus(404); - } - return template - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroy = function(req, res) { - return Template - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xf694=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xf694[0];var _=require(_0xf694[1]);var util=require(_0xf694[2]);var Util=require(_0xf694[3]);var Template=require(_0xf694[5])[_0xf694[4]];exports[_0xf694[6]]= function(_0xc0eex5,_0xc0eex6,_0xc0eex7){return Template[_0xf694[13]](Util[_0xf694[12]](_0xc0eex5[_0xf694[11]]))[_0xf694[10]](function(_0xc0eex9){_0xc0eex6[_0xf694[9]](200)[_0xf694[8]](_0xc0eex9)})[_0xf694[7]](function(_0xc0eex8){return handleError(_0xc0eex6,_0xc0eex8)})};exports[_0xf694[14]]= function(_0xc0eex5,_0xc0eex6){return Template[_0xf694[18]](_0xc0eex5[_0xf694[17]][_0xf694[16]])[_0xf694[10]](function(_0xc0eexa){if(!_0xc0eexa){return _0xc0eex6[_0xf694[15]](404)};return _0xc0eex6[_0xf694[8]](_0xc0eexa)})[_0xf694[7]](function(_0xc0eex8){return handleError(_0xc0eex6,_0xc0eex8)})};exports[_0xf694[19]]= function(_0xc0eex5,_0xc0eex6){return Template[_0xf694[19]](_0xc0eex5[_0xf694[20]])[_0xf694[10]](function(_0xc0eexa){return _0xc0eex6[_0xf694[9]](201)[_0xf694[8]](_0xc0eexa)})[_0xf694[7]](function(_0xc0eex8){return handleError(_0xc0eex6,_0xc0eex8)})};exports[_0xf694[21]]= function(_0xc0eex5,_0xc0eex6){if(_0xc0eex5[_0xf694[20]][_0xf694[16]]){delete _0xc0eex5[_0xf694[20]][_0xf694[16]]};return Template[_0xf694[18]](_0xc0eex5[_0xf694[17]][_0xf694[16]])[_0xf694[10]](function(_0xc0eexa){if(!_0xc0eexa){return _0xc0eex6[_0xf694[15]](404)};var _0xc0eexb=_[_0xf694[22]](_0xc0eexa,_0xc0eex5[_0xf694[20]]);return _0xc0eexb[_0xf694[23]]()})[_0xf694[10]](function(_0xc0eexa){return _0xc0eex6[_0xf694[9]](200)[_0xf694[8]](_0xc0eexa)})[_0xf694[7]](function(_0xc0eex8){return handleError(_0xc0eex6,_0xc0eex8)})};exports[_0xf694[24]]= function(_0xc0eex5,_0xc0eex6){return Template[_0xf694[18]](_0xc0eex5[_0xf694[17]][_0xf694[16]])[_0xf694[10]](function(_0xc0eexa){if(!_0xc0eexa){return _0xc0eex6[_0xf694[15]](404)};return _0xc0eexa[_0xf694[24]]()})[_0xf694[10]](function(){return _0xc0eex6[_0xf694[15]](204)})[_0xf694[7]](function(_0xc0eex8){return handleError(_0xc0eex6,_0xc0eex8)})};exports[_0xf694[25]]= function(_0xc0eex5,_0xc0eex6){return Template[_0xf694[24]]({where:{id:_0xc0eex5[_0xf694[11]][_0xf694[26]]},individualHooks:true})[_0xf694[10]](function(){return _0xc0eex6[_0xf694[15]](204)})[_0xf694[7]](function(_0xc0eex8){return handleError(_0xc0eex6,_0xc0eex8)})};function handleError(_0xc0eex6,_0xc0eex8){return _0xc0eex6[_0xf694[9]](500)[_0xf694[8]](_0xc0eex8)} \ No newline at end of file diff --git a/server/api/template/template.events.js b/server/api/template/template.events.js index aa7bb8e..ae0fbc0 100644 --- a/server/api/template/template.events.js +++ b/server/api/template/template.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Template = require('../../models').Template; - -var TemplateEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -TemplateEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Template.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - TemplateEvents.emit(event + ':' + doc._id, doc); - TemplateEvents.emit(event, doc); - done(null); - } -} - -module.exports = TemplateEvents; +var _0x58cc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x58cc[0];const EventEmitter=require(_0x58cc[1]);const Template=require(_0x58cc[3])[_0x58cc[2]];var TemplateEvents= new EventEmitter();TemplateEvents[_0x58cc[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x58cc[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x58cc[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x58cc[6]};for(var e in events){var event=events[e];Template[_0x58cc[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xcd7fx8,_0xcd7fx9,_0xcd7fxa){TemplateEvents[_0x58cc[10]](event+ _0x58cc[8]+ _0xcd7fx8[_0x58cc[9]],_0xcd7fx8);TemplateEvents[_0x58cc[10]](event,_0xcd7fx8);_0xcd7fxa(null)}}module[_0x58cc[11]]= TemplateEvents \ No newline at end of file diff --git a/server/api/template/template.socket.js b/server/api/template/template.socket.js index 1757712..3e7a750 100644 --- a/server/api/template/template.socket.js +++ b/server/api/template/template.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const TemplateEvents = require('./template.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('template:' + event, socket); - - TemplateEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - TemplateEvents.removeListener(event, listener); - }; -} +var _0x9e1c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x65\x6D\x70\x6C\x61\x74\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x9e1c[0];const TemplateEvents=require(_0x9e1c[1]);var events=[_0x9e1c[2],_0x9e1c[3]];exports[_0x9e1c[4]]= function(_0xeee9x3){for(var _0xeee9x4=0,_0xeee9x5=events[_0x9e1c[5]];_0xeee9x4< _0xeee9x5;_0xeee9x4++){var _0xeee9x6=events[_0xeee9x4];var _0xeee9x7=createListener(_0x9e1c[6]+ _0xeee9x6,_0xeee9x3);TemplateEvents[_0x9e1c[7]](_0xeee9x6,_0xeee9x7);_0xeee9x3[_0x9e1c[7]](_0x9e1c[8],removeListener(_0xeee9x6,_0xeee9x7))}};function createListener(_0xeee9x6,_0xeee9x3){return function(_0xeee9x9){_0xeee9x3[_0x9e1c[9]](_0xeee9x6,_0xeee9x9)}}function removeListener(_0xeee9x6,_0xeee9x7){return function(){TemplateEvents[_0x9e1c[10]](_0xeee9x6,_0xeee9x7)}} \ No newline at end of file diff --git a/server/api/trigger/index.js b/server/api/trigger/index.js index 05578f4..0fe4349 100644 --- a/server/api/trigger/index.js +++ b/server/api/trigger/index.js @@ -1,261 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./trigger.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); -/** - * @api {get} /api/triggers/ Get Triggers' list. - * - * @apiParam (Query) {Number} [offset] Pagination offset. - * @apiParam (Query) {Number} [limit] Pagination limit. - * - * @apiVersion 0.0.140 - * @apiName GetTriggers - * @apiGroup Triggers - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of triggers. - * @apiSuccess {Object[]} rows Triggers' list. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 2, - * "rows": [{ - * "id": 1 - * "name": "trigger1" - * "description": "my trigger description" - * ... - * },{ - * "id": 2 - * "name": "newtrigger" - * "description": null - * ... - * },...] - * } - */ -router.get('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.index); -/** - * @api {get} /api/triggers/:id Get Trigger's details. - * @apiParam {Number} id Trigger's unique ID. - * @apiVersion 0.0.140 - * @apiName GetTrigger - * @apiGroup Triggers - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Object} Trigger's details. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id":1, - * "All": [ - * { - * "field": "queue", - * "operator": "equals", - * "value": "Support" - * }, - * ... - * ], - * "Any": [ - * { - * "field": "lastevent", - * "operator": "equals", - * "value": "complete" - * }, - * { - * "field": "lastevent", - * "operator": "equals", - * "value": "abandoned" - * }, - * ... - * ], - * "Actions": [ - * { - * "action": "contactManager", - * "data1": "", - * "data2": "", - * "data3": "", - * "data4": "", - * "data5": "" - * }, - * ... - * ], - * "channel": "voice", - * "status": false, - * "name": "my trigger", - * "description": "my demo trigger", - * ... - * } - */ -router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show); -/** - * @api {post} /api/triggers/ Create a new trigger. - * @apiParam (body) {String} name Trigger's name. - * @apiParam (body) {String} [description] Trigger's description. - * @apiParam (body) {Boolean} status Trigger's status (active/inactive). - * @apiParam (body) {String} channel Trigger's channel. - * @apiParam (body) {conditions[]} All Trigger's conditions, all of them must be met. - * @apiParam (body) {conditions[]} Any Trigger's conditions, at least one of them must be met. - * @apiParam (body) {actions[]} Actions Trigger's actions. - * - * @apiParam (Conditions) {string} field Condition field. - * @apiParam (Conditions) {string} operator Condition operator, to compare field and value. - * @apiParam (Conditions) {string} value The value to compare the condition field with. - * - * @apiParam (Actions) {string} action Trigger action. - * @apiParam (Actions) {string} data1 Action data. - * @apiParam (Actions) {string} data2 Action data. - * @apiParam (Actions) {string} data3 Action data. - * @apiParam (Actions) {string} data4 Action data. - * @apiParam (Actions) {string} data5 Action data. - * - * @apiVersion 0.0.140 - * @apiName CreateTrigger - * @apiGroup Triggers - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - * { - * "id":1, - * "All": [ - * { - * "field": "queue", - * "operator": "equals", - * "value": "Support" - * }, - * ... - * ], - * "Any": [ - * { - * "field": "lastevent", - * "operator": "equals", - * "value": "complete" - * }, - * { - * "field": "lastevent", - * "operator": "equals", - * "value": "abandoned" - * }, - * ... - * ], - * "Actions": [ - * { - * "action": "contactManager", - * "data1": "", - * "data2": "", - * "data3": "", - * "data4": "", - * "data5": "" - * }, - * ... - * ], - * "channel": "voice", - * "status": false, - * "name": "my trigger", - * "description": "my demo trigger", - * ... - * } - */ -router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create); -/** - * @api {put} /api/triggers/:id Update an existing trigger. - * @apiParam {Number} id Trigger's unique ID. - * - * @apiParam (body) {String} name Trigger's name. - * @apiParam (body) {String} [description] Trigger's description. - * @apiParam (body) {Boolean} status Trigger's status (active/inactive). - * @apiParam (body) {String} channel Trigger's channel. - * @apiParam (body) {conditions[]} All Trigger's conditions, all of them must be met. - * @apiParam (body) {conditions[]} Any Trigger's conditions, at least one of them must be met. - * @apiParam (body) {actions[]} Actions Trigger's actions. - * - * @apiParam (Conditions) {string} field Condition field. - * @apiParam (Conditions) {string} operator Condition operator, to compare field and value. - * @apiParam (Conditions) {string} value The value to compare the condition field with. - * - * @apiParam (Actions) {string} action Trigger action. - * @apiParam (Actions) {string} data1 Action data. - * @apiParam (Actions) {string} data2 Action data. - * @apiParam (Actions) {string} data3 Action data. - * @apiParam (Actions) {string} data4 Action data. - * @apiParam (Actions) {string} data5 Action data. - * - * @apiVersion 0.0.140 - * @apiName UpdateTrigger - * @apiGroup Triggers - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - */ -router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update); -/** - * @api {delete} /api/triggers/:id Delete a trigger. - * - * @apiParam {Number} id Trigger's unique ID. - * - * @apiVersion 0.0.140 - * @apiName DeleteTrigger - * @apiGroup Triggers - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy); -/** - * @api {delete} /api/triggers/ Bulk Delete triggers. - * - * @apiParam (Query) {Number[]} ids Triggers' unique ID array. - * - * @apiVersion 0.0.140 - * @apiName BulkDeleteTriggers - * @apiGroup Triggers - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy); - -module.exports = router; +var _0xa9bf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xa9bf[0];var express=require(_0xa9bf[1]);var controller=require(_0xa9bf[2]);var auth=require(_0xa9bf[3]);var router=express.Router();router[_0xa9bf[9]](_0xa9bf[4],auth[_0xa9bf[5]](),auth[_0xa9bf[7]]([13],[_0xa9bf[6]]),controller[_0xa9bf[8]]);router[_0xa9bf[9]](_0xa9bf[10],auth[_0xa9bf[5]](),auth[_0xa9bf[7]]([13],[_0xa9bf[6]]),controller[_0xa9bf[11]]);router[_0xa9bf[13]](_0xa9bf[4],auth[_0xa9bf[5]](),auth[_0xa9bf[7]]([13],[_0xa9bf[6]]),controller[_0xa9bf[12]]);router[_0xa9bf[15]](_0xa9bf[10],auth[_0xa9bf[5]](),auth[_0xa9bf[7]]([13],[_0xa9bf[6]]),controller[_0xa9bf[14]]);router[_0xa9bf[17]](_0xa9bf[10],auth[_0xa9bf[5]](),auth[_0xa9bf[7]]([13],[_0xa9bf[6]]),controller[_0xa9bf[16]]);router[_0xa9bf[17]](_0xa9bf[4],auth[_0xa9bf[5]](),auth[_0xa9bf[7]]([13],[_0xa9bf[6]]),controller[_0xa9bf[18]]);module[_0xa9bf[19]]= router \ No newline at end of file diff --git a/server/api/trigger/trigger.controller.js b/server/api/trigger/trigger.controller.js index dbb3e29..a9b5630 100644 --- a/server/api/trigger/trigger.controller.js +++ b/server/api/trigger/trigger.controller.js @@ -1,216 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var Util = require('../../config/util'); -var sequelize = require('../../models').sequelize; - -var Trigger = require('../../models').Trigger; -var ToolsCondition = require('../../models').ToolsCondition; -var ToolsAction = require('../../models').ToolsAction; - -// Get list of agents -exports.index = function(req, res, next) { - return Trigger - .scope('all') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single Trigger -exports.show = function(req, res) { - return Trigger - .scope('all') - .findById(req.params.id) - .then(function(trigger) { - if (!trigger) { - return res.sendStatus(404); - } - return res.status(200).send(trigger); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new Trigger in the DB. -exports.create = function(req, res) { - return Trigger - .create(req.body, { - include: [{ - model: ToolsCondition, - as: 'All' - }, { - model: ToolsCondition, - as: 'Any' - }, { - model: ToolsAction, - as: 'Actions' - }], - newTrigger: req.body - }) - .then(function(trigger) { - return res.status(201).send(trigger); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing Trigger in the DB. -exports.update = function(req, res, next) { - var _trigger; - if (req.body.id) { - delete req.body.id; - } - // return sequelize.transaction(function(t) { - return Trigger - .findById(req.params.id) - .then(function(trigger) { - _trigger = trigger; - if (req.body.Any) { - return ToolsCondition - .destroy({ - where: { - TriggerAnyId: req.params.id - } - // , - // transaction: t - }); - } - return; - }) - .then(function() { - if (req.body.Any && Array.isArray(req.body.Any) && req.body.Any.length) { - _.forEach(req.body.Any, function(elem) { - elem.TriggerAnyId = req.params.id; - }); - return ToolsCondition - .bulkCreate(req.body.Any - // , { - // transaction: t - // } - ); - } - return; - }) - .then(function() { - if (req.body.All) { - return ToolsCondition - .destroy({ - where: { - TriggerAllId: req.params.id - } - // , - // transaction: t - }); - } - return; - }) - .then(function() { - if (req.body.All && Array.isArray(req.body.All) && req.body.All.length) { - _.forEach(req.body.All, function(elem) { - elem.TriggerAllId = req.params.id; - }); - return ToolsCondition - .bulkCreate(req.body.All - // , { - // transaction: t - // } - ); - } - return; - }) - .then(function() { - if (req.body.Actions) { - return ToolsAction - .destroy({ - where: { - TriggerId: req.params.id - } - // , - // transaction: t - }); - } - return; - }) - .then(function() { - if (req.body.Actions && Array.isArray(req.body.Actions) && req.body.Actions.length) { - _.forEach(req.body.Actions, function(elem) { - elem.TriggerId = req.params.id; - }); - return ToolsAction - .bulkCreate(req.body.Actions - // , { - // transaction: t - // } - ); - } - return; - }) - .then(function() { - var updated = _.merge(_trigger, req.body); - return updated - .save( - // { - // transaction: t - // } - ); - // }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Deletes a Trigger from the DB. -exports.destroy = function(req, res) { - return Trigger - .findById(req.params.id) - .then(function(Trigger) { - if (!Trigger) { - return res.sendStatus(404); - } - Trigger.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroy = function(req, res) { - return Trigger - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xfb5d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x72\x69\x67\x67\x65\x72","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x41\x6C\x6C","\x41\x6E\x79","\x41\x63\x74\x69\x6F\x6E\x73","\x75\x70\x64\x61\x74\x65","\x6C\x6F\x67","\x73\x61\x76\x65","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x54\x72\x69\x67\x67\x65\x72\x49\x64","\x66\x6F\x72\x45\x61\x63\x68","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x54\x72\x69\x67\x67\x65\x72\x41\x6C\x6C\x49\x64","\x54\x72\x69\x67\x67\x65\x72\x41\x6E\x79\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xfb5d[0];var _=require(_0xfb5d[1]);var util=require(_0xfb5d[2]);var Util=require(_0xfb5d[3]);var sequelize=require(_0xfb5d[5])[_0xfb5d[4]];var Trigger=require(_0xfb5d[5])[_0xfb5d[6]];var ToolsCondition=require(_0xfb5d[5])[_0xfb5d[7]];var ToolsAction=require(_0xfb5d[5])[_0xfb5d[8]];exports[_0xfb5d[9]]= function(_0xbf69x8,_0xbf69x9,_0xbf69xa){return Trigger[_0xfb5d[19]](_0xfb5d[18])[_0xfb5d[17]](_[_0xfb5d[16]](Util[_0xfb5d[15]](_0xbf69x8[_0xfb5d[14]]),{distinct:true}))[_0xfb5d[13]](function(_0xbf69xc){return _0xbf69x9[_0xfb5d[12]](200)[_0xfb5d[11]](_0xbf69xc)})[_0xfb5d[10]](function(_0xbf69xb){return handleError(_0xbf69x9,_0xbf69xb)})};exports[_0xfb5d[20]]= function(_0xbf69x8,_0xbf69x9){return Trigger[_0xfb5d[19]](_0xfb5d[18])[_0xfb5d[24]](_0xbf69x8[_0xfb5d[23]][_0xfb5d[22]])[_0xfb5d[13]](function(_0xbf69xd){if(!_0xbf69xd){return _0xbf69x9[_0xfb5d[21]](404)};return _0xbf69x9[_0xfb5d[12]](200)[_0xfb5d[11]](_0xbf69xd)})[_0xfb5d[10]](function(_0xbf69xb){return handleError(_0xbf69x9,_0xbf69xb)})};exports[_0xfb5d[25]]= function(_0xbf69x8,_0xbf69x9){return Trigger[_0xfb5d[25]](_0xbf69x8[_0xfb5d[26]],{include:[{model:ToolsCondition,as:_0xfb5d[27]},{model:ToolsCondition,as:_0xfb5d[28]},{model:ToolsAction,as:_0xfb5d[29]}],newTrigger:_0xbf69x8[_0xfb5d[26]]})[_0xfb5d[13]](function(_0xbf69xd){return _0xbf69x9[_0xfb5d[12]](201)[_0xfb5d[11]](_0xbf69xd)})[_0xfb5d[10]](function(_0xbf69xb){return handleError(_0xbf69x9,_0xbf69xb)})};exports[_0xfb5d[30]]= function(_0xbf69x8,_0xbf69x9,_0xbf69xa){var _0xbf69xe;if(_0xbf69x8[_0xfb5d[26]][_0xfb5d[22]]){delete _0xbf69x8[_0xfb5d[26]][_0xfb5d[22]]};return Trigger[_0xfb5d[24]](_0xbf69x8[_0xfb5d[23]][_0xfb5d[22]])[_0xfb5d[13]](function(_0xbf69xd){_0xbf69xe= _0xbf69xd;if(_0xbf69x8[_0xfb5d[26]][_0xfb5d[28]]){return ToolsCondition[_0xfb5d[38]]({where:{TriggerAnyId:_0xbf69x8[_0xfb5d[23]][_0xfb5d[22]]}})};return})[_0xfb5d[13]](function(){if(_0xbf69x8[_0xfb5d[26]][_0xfb5d[28]]&& Array[_0xfb5d[33]](_0xbf69x8[_0xfb5d[26]].Any)&& _0xbf69x8[_0xfb5d[26]][_0xfb5d[28]][_0xfb5d[34]]){_[_0xfb5d[36]](_0xbf69x8[_0xfb5d[26]].Any,function(_0xbf69x10){_0xbf69x10[_0xfb5d[40]]= _0xbf69x8[_0xfb5d[23]][_0xfb5d[22]]});return ToolsCondition[_0xfb5d[37]](_0xbf69x8[_0xfb5d[26]].Any)};return})[_0xfb5d[13]](function(){if(_0xbf69x8[_0xfb5d[26]][_0xfb5d[27]]){return ToolsCondition[_0xfb5d[38]]({where:{TriggerAllId:_0xbf69x8[_0xfb5d[23]][_0xfb5d[22]]}})};return})[_0xfb5d[13]](function(){if(_0xbf69x8[_0xfb5d[26]][_0xfb5d[27]]&& Array[_0xfb5d[33]](_0xbf69x8[_0xfb5d[26]].All)&& _0xbf69x8[_0xfb5d[26]][_0xfb5d[27]][_0xfb5d[34]]){_[_0xfb5d[36]](_0xbf69x8[_0xfb5d[26]].All,function(_0xbf69x10){_0xbf69x10[_0xfb5d[39]]= _0xbf69x8[_0xfb5d[23]][_0xfb5d[22]]});return ToolsCondition[_0xfb5d[37]](_0xbf69x8[_0xfb5d[26]].All)};return})[_0xfb5d[13]](function(){if(_0xbf69x8[_0xfb5d[26]][_0xfb5d[29]]){return ToolsAction[_0xfb5d[38]]({where:{TriggerId:_0xbf69x8[_0xfb5d[23]][_0xfb5d[22]]}})};return})[_0xfb5d[13]](function(){if(_0xbf69x8[_0xfb5d[26]][_0xfb5d[29]]&& Array[_0xfb5d[33]](_0xbf69x8[_0xfb5d[26]].Actions)&& _0xbf69x8[_0xfb5d[26]][_0xfb5d[29]][_0xfb5d[34]]){_[_0xfb5d[36]](_0xbf69x8[_0xfb5d[26]].Actions,function(_0xbf69x10){_0xbf69x10[_0xfb5d[35]]= _0xbf69x8[_0xfb5d[23]][_0xfb5d[22]]});return ToolsAction[_0xfb5d[37]](_0xbf69x8[_0xfb5d[26]].Actions)};return})[_0xfb5d[13]](function(){var _0xbf69xf=_[_0xfb5d[16]](_0xbf69xe,_0xbf69x8[_0xfb5d[26]]);return _0xbf69xf[_0xfb5d[32]]()})[_0xfb5d[13]](function(){return _0xbf69x9[_0xfb5d[21]](200)})[_0xfb5d[10]](function(_0xbf69xb){console[_0xfb5d[31]](_0xbf69xb);return handleError(_0xbf69x9,_0xbf69xb)})};exports[_0xfb5d[38]]= function(_0xbf69x8,_0xbf69x9){return Trigger[_0xfb5d[24]](_0xbf69x8[_0xfb5d[23]][_0xfb5d[22]])[_0xfb5d[13]](function(Trigger){if(!Trigger){return _0xbf69x9[_0xfb5d[21]](404)};Trigger[_0xfb5d[38]]()[_0xfb5d[13]](function(){return _0xbf69x9[_0xfb5d[21]](204)})[_0xfb5d[10]](function(_0xbf69xb){return handleError(_0xbf69x9,_0xbf69xb)})})[_0xfb5d[10]](function(_0xbf69xb){return handleError(_0xbf69x9,_0xbf69xb)})};exports[_0xfb5d[41]]= function(_0xbf69x8,_0xbf69x9){return Trigger[_0xfb5d[38]]({where:{id:_0xbf69x8[_0xfb5d[14]][_0xfb5d[42]]},individualHooks:true})[_0xfb5d[13]](function(){return _0xbf69x9[_0xfb5d[21]](204)})[_0xfb5d[10]](function(_0xbf69xb){return handleError(_0xbf69x9,_0xbf69xb)})};function handleError(_0xbf69x9,_0xbf69xb){return _0xbf69x9[_0xfb5d[12]](500)[_0xfb5d[11]](_0xbf69xb)} \ No newline at end of file diff --git a/server/api/trigger/trigger.events.js b/server/api/trigger/trigger.events.js index 5978c45..1cdedf0 100644 --- a/server/api/trigger/trigger.events.js +++ b/server/api/trigger/trigger.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Trigger = require('../../models').Trigger; - -var TriggerEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -TriggerEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Trigger.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - TriggerEvents.emit(event + ':' + doc._id, doc); - TriggerEvents.emit(event, doc); - done(null); - } -} - -module.exports = TriggerEvents; +var _0x9364=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x9364[0];const EventEmitter=require(_0x9364[1]);const Trigger=require(_0x9364[3])[_0x9364[2]];var TriggerEvents= new EventEmitter();TriggerEvents[_0x9364[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x9364[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x9364[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x9364[6]};for(var e in events){var event=events[e];Trigger[_0x9364[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x887dx8,_0x887dx9,_0x887dxa){TriggerEvents[_0x9364[10]](event+ _0x9364[8]+ _0x887dx8[_0x9364[9]],_0x887dx8);TriggerEvents[_0x9364[10]](event,_0x887dx8);_0x887dxa(null)}}module[_0x9364[11]]= TriggerEvents \ No newline at end of file diff --git a/server/api/trigger/trigger.socket.js b/server/api/trigger/trigger.socket.js index e83aa13..c006126 100644 --- a/server/api/trigger/trigger.socket.js +++ b/server/api/trigger/trigger.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const TriggerEvents = require('./trigger.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('trigger:' + event, socket); - - TriggerEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - TriggerEvents.removeListener(event, listener); - }; -} +var _0xea3d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x72\x69\x67\x67\x65\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xea3d[0];const TriggerEvents=require(_0xea3d[1]);var events=[_0xea3d[2],_0xea3d[3]];exports[_0xea3d[4]]= function(_0x11bdx3){for(var _0x11bdx4=0,_0x11bdx5=events[_0xea3d[5]];_0x11bdx4< _0x11bdx5;_0x11bdx4++){var _0x11bdx6=events[_0x11bdx4];var _0x11bdx7=createListener(_0xea3d[6]+ _0x11bdx6,_0x11bdx3);TriggerEvents[_0xea3d[7]](_0x11bdx6,_0x11bdx7);_0x11bdx3[_0xea3d[7]](_0xea3d[8],removeListener(_0x11bdx6,_0x11bdx7))}};function createListener(_0x11bdx6,_0x11bdx3){return function(_0x11bdx9){_0x11bdx3[_0xea3d[9]](_0x11bdx6,_0x11bdx9)}}function removeListener(_0x11bdx6,_0x11bdx7){return function(){TriggerEvents[_0xea3d[10]](_0x11bdx6,_0x11bdx7)}} \ No newline at end of file diff --git a/server/api/trunk/index.js b/server/api/trunk/index.js index fda6e40..0b66779 100644 --- a/server/api/trunk/index.js +++ b/server/api/trunk/index.js @@ -1,226 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./trunk.controller'); -var config = require('../../config/environment'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -/** - * @api {get} /api/trunks/ Get trunks' list. - * - * @apiParam (Query) {Number} [offset] Pagination offset. - * @apiParam (Query) {Number} [limit] Pagination limit. - * - * @apiVersion 0.0.140 - * @apiName GetTrunks - * @apiGroup Trunks - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of trunks. - * @apiSuccess {Object[]} rows Get trunks list. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 1, - * "rows": [{ - * "name": "DemoTrunk" - * "type": "friend" - * "context": "from-sip" - * "callingpres": "ALLOWED_NOT_SCREENED" - * "permit": "0.0.0.0/0.0.0.0" - * "deny": "0.0.0.0/0.0.0.0" - * ... - * }] - * } - */ -router.get('/', auth.isAuthenticated(), auth.hasModule([13, 7, 10], ['admin']), controller.index); - -/** - * @api {get} /api/trunks/:id Get trunk's details. - * @apiParam {Number} id Trunk unique ID. - * @apiVersion 0.0.140 - * @apiName GetTrunk - * @apiGroup Trunks - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "name": "DemoTrunk" - * "type": "friend" - * "context": "from-sip" - * "callingpres": "ALLOWED_NOT_SCREENED" - * "permit": "0.0.0.0/0.0.0.0" - * "deny": "0.0.0.0/0.0.0.0" - * ... - * } - */ -router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show); - -/** - * @api {post} /api/trunks/ Create trunk. - * - * @apiParam (Body) {String} name Trunk name. - * @apiParam (Body) {String="friend", "user", "peer"} [type="friend"] Trunk type. - * @apiParam (Body) {String} [context="from-sip"] Trunk context. - * @apiParam (Body) {String="ALLOWED_NOT_SCREENED", "ALLOWED_PASSED_SCREEN", "ALLOWED_FAILED_SCREEN", "ALLOWED", "PROHIB_NOT_SCREENED", "PROHIB_PASSED_SCREEN", "PROHIB_FAILED_SCREEN", "PROHIB"} [callinprogress="ALLOWED_NOT_SCREENED"] Trunk context. - * @apiParam (Body) {String} [permit] Trunk permit. - * @apiParam (Body) {String} [deny] Trunk deny. - * @apiParam (Body) {String} secret Trunk secret. - * @apiParam (Body) {String="rfc2833", "info", "shortinfo", "inband", "auto"} [dtmfmode="rfc2833"] Trunk internal number. - * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} [transport="udp"] Trunk SIP transport. - * @apiParam (Body) {String="alaw", "ulaw", "gsm"} [allow="alaw;ulaw;gsm"] Trunk SIP codecs. - * @apiParam (Body) {String="yes", "no", "nonat", "update", "outgoing"} [directmedia="no"] Trunk directmedia. - * @apiParam (Body) {String="yes", "no"} [directrtpsetup="no"] Trunk directrtpsetup. - * @apiParam (Body) {String} [nat="force_rport,comedia"] Trunk mobile phone. - * @apiParam (Body) {String} [disallow="all"] Trunk address. - * @apiParam (Body) {String} [allow="alaw;ulaw;gsm"] Trunk allow codecs. - * @apiParam (Body) {String} [callerid='"" <>'] Trunk callerid. - * @apiParam (Body) {String="yes"} [callcounter="yes, no"] Trunk callcounter. - * @apiParam (Body) {String="no"} [videosupport="yes, no"] Trunk video support. - * @apiParam (Body) {String="uas"} [session_refresher="uas, uac"] Trunk session refresher. - * @apiParam (Body) {String} [host="dynamic"] Trunk host. - * @apiParam (Body) {String="yes"} [qualify="yes,no"] Trunk qualify. - * @apiParam (Body) {String} [insecure="port,invite"] Trunk insicure. - * @apiParam (Body) {String="no"} [sendrpid="yes,no"] Trunk sendrpid. - * @apiParam (Body) {String="no"} [encryption="yes,no"] Trunk encryption. - * @apiParam (Body) {String="no"} [usereqphone="yes,no"] Trunk usereqphone. - * @apiParam (Body) {String="no"} [canreinvite="yes,no"] Trunk can reinvite. - * - * @apiVersion 0.0.140 - * @apiName CreateTrunk - * @apiGroup Trunks - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - * { - * "id": 1 - * "name": "john.doe" - * "email": "john.doe@xcally.com" - * "internal": 1001 - * "fullname": "John Doe" - * ... - * } - */ -router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create); - -/** - * @api {delete} /api/trunks/:id Update trunk's details. - * - * @apiParam (Params) {Number} id Trunk unique ID. - * @apiParam (Body) {String} name Trunk name. - * @apiParam (Body) {String="friend", "user", "peer"} [type="friend"] Trunk type. - * @apiParam (Body) {String} [context="from-sip"] Trunk context. - * @apiParam (Body) {String="ALLOWED_NOT_SCREENED", "ALLOWED_PASSED_SCREEN", "ALLOWED_FAILED_SCREEN", "ALLOWED", "PROHIB_NOT_SCREENED", "PROHIB_PASSED_SCREEN", "PROHIB_FAILED_SCREEN", "PROHIB"} [callinprogress="ALLOWED_NOT_SCREENED"] Trunk context. - * @apiParam (Body) {String} [permit] Trunk permit. - * @apiParam (Body) {String} [deny] Trunk deny. - * @apiParam (Body) {String} secret Trunk secret. - * @apiParam (Body) {String="rfc2833", "info", "shortinfo", "inband", "auto"} [dtmfmode="rfc2833"] Trunk internal number. - * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} [transport="udp"] Trunk SIP transport. - * @apiParam (Body) {String="alaw", "ulaw", "gsm"} [allow="alaw;ulaw;gsm"] Trunk SIP codecs. - * @apiParam (Body) {String="yes", "no", "nonat", "update", "outgoing"} [directmedia="no"] Trunk directmedia. - * @apiParam (Body) {String="yes", "no"} [directrtpsetup="no"] Trunk directrtpsetup. - * @apiParam (Body) {String} [nat="force_rport,comedia"] Trunk mobile phone. - * @apiParam (Body) {String} [disallow="all"] Trunk address. - * @apiParam (Body) {String} [allow="alaw;ulaw;gsm"] Trunk allow codecs. - * @apiParam (Body) {String} [callerid='"" <>'] Trunk callerid. - * @apiParam (Body) {String="yes"} [callcounter="yes, no"] Trunk callcounter. - * @apiParam (Body) {String="no"} [videosupport="yes, no"] Trunk video support. - * @apiParam (Body) {String="uas"} [session_refresher="uas, uac"] Trunk session refresher. - * @apiParam (Body) {String} [host="dynamic"] Trunk host. - * @apiParam (Body) {String="yes"} [qualify="yes,no"] Trunk qualify. - * @apiParam (Body) {String} [insecure="port,invite"] Trunk insicure. - * @apiParam (Body) {String="no"} [sendrpid="yes,no"] Trunk sendrpid. - * @apiParam (Body) {String="no"} [encryption="yes,no"] Trunk encryption. - * @apiParam (Body) {String="no"} [usereqphone="yes,no"] Trunk usereqphone. - * @apiParam (Body) {String="no"} [canreinvite="yes,no"] Trunk can reinvite. - * - * @apiVersion 0.0.140 - * @apiName UpdateTrunk - * @apiGroup Trunks - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "john.doe" - * "email": "john.doe@xcally.com" - * "internal": 1001 - * "fullname": "John Doe" - * ... - * } - */ -router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update); - -/** - * @api {delete} /api/trunks/ Bulk Delete trunks. - * - * @apiParam (Query) {Number[]} ids Trunks unique ID array. - * - * @apiVersion 0.0.140 - * @apiName BulkDeleteTrunks - * @apiGroup Trunks - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy); - -/** - * @api {delete} /api/trunks/:id Delete a trunk. - * - * @apiParam {Number} id Trunk unique ID. - * - * @apiVersion 0.0.140 - * @apiName DeleteTrunk - * @apiGroup Trunks - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy); - -module.exports = router; +var _0xb8ba=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x74\x72\x75\x6E\x6B\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xb8ba[0];var express=require(_0xb8ba[1]);var controller=require(_0xb8ba[2]);var config=require(_0xb8ba[3]);var auth=require(_0xb8ba[4]);var router=express.Router();router[_0xb8ba[10]](_0xb8ba[5],auth[_0xb8ba[6]](),auth[_0xb8ba[8]]([13,7,10],[_0xb8ba[7]]),controller[_0xb8ba[9]]);router[_0xb8ba[10]](_0xb8ba[11],auth[_0xb8ba[6]](),auth[_0xb8ba[8]]([13],[_0xb8ba[7]]),controller[_0xb8ba[12]]);router[_0xb8ba[14]](_0xb8ba[5],auth[_0xb8ba[6]](),auth[_0xb8ba[8]]([13],[_0xb8ba[7]]),controller[_0xb8ba[13]]);router[_0xb8ba[16]](_0xb8ba[11],auth[_0xb8ba[6]](),auth[_0xb8ba[8]]([13],[_0xb8ba[7]]),controller[_0xb8ba[15]]);router[_0xb8ba[18]](_0xb8ba[5],auth[_0xb8ba[6]](),auth[_0xb8ba[8]]([13],[_0xb8ba[7]]),controller[_0xb8ba[17]]);router[_0xb8ba[18]](_0xb8ba[11],auth[_0xb8ba[6]](),auth[_0xb8ba[8]]([13],[_0xb8ba[7]]),controller[_0xb8ba[19]]);module[_0xb8ba[20]]= router \ No newline at end of file diff --git a/server/api/trunk/trunk.controller.js b/server/api/trunk/trunk.controller.js index 9ee3289..d1612e9 100644 --- a/server/api/trunk/trunk.controller.js +++ b/server/api/trunk/trunk.controller.js @@ -1,111 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Trunk = require('../../models').Trunk; -var VoiceExtension = require('../../models').VoiceExtension; -var sequelize = require('../../models').sequelize; -var util = require('util'); -var Util = require('../../config/util'); - -// Get list of agents -exports.index = function(req, res, next) { - return Trunk - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single trunk -exports.show = function(req, res) { - return Trunk - .findById(req.params.id) - .then(function(trunk) { - if (!trunk) { - return res.sendStatus(404); - } - return res.send(trunk); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new trunk in the DB. -exports.create = function(req, res) { - return Trunk - .create(req.body) - .then(function(trunk) { - return res.status(201).send(trunk); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return Trunk - .findById(req.params.id) - .then(function(trunk) { - if (!trunk) { - return res.sendStatus(404); - } - var updated = _.merge(trunk, req.body); - return updated - .save(); - }) - .then(function(trunk) { - return res.status(200).send(trunk); - }) - .catch(function(err) { - console.log('trunk update error', err); - return handleError(res, err); - }); -}; - -// Deletes a trunk from the DB. -exports.destroy = function(req, res) { - return Trunk - .findById(req.params.id) - .then(function(trunk) { - if (!trunk) { - return res.sendStatus(404); - } - return trunk - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes multiple trunk from the DB. -exports.bulkDestroy = function(req, res) { - return Trunk - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x1ff8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x74\x72\x75\x6E\x6B\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72","\x6C\x6F\x67","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x1ff8[0];var _=require(_0x1ff8[1]);var Trunk=require(_0x1ff8[3])[_0x1ff8[2]];var VoiceExtension=require(_0x1ff8[3])[_0x1ff8[4]];var sequelize=require(_0x1ff8[3])[_0x1ff8[5]];var util=require(_0x1ff8[6]);var Util=require(_0x1ff8[7]);exports[_0x1ff8[8]]= function(_0x70a6x7,_0x70a6x8,_0x70a6x9){return Trunk[_0x1ff8[15]](Util[_0x1ff8[14]](_0x70a6x7[_0x1ff8[13]]))[_0x1ff8[12]](function(_0x70a6xb){_0x70a6x8[_0x1ff8[11]](200)[_0x1ff8[10]](_0x70a6xb)})[_0x1ff8[9]](function(_0x70a6xa){return handleError(_0x70a6x8,_0x70a6xa)})};exports[_0x1ff8[16]]= function(_0x70a6x7,_0x70a6x8){return Trunk[_0x1ff8[20]](_0x70a6x7[_0x1ff8[19]][_0x1ff8[18]])[_0x1ff8[12]](function(_0x70a6xc){if(!_0x70a6xc){return _0x70a6x8[_0x1ff8[17]](404)};return _0x70a6x8[_0x1ff8[10]](_0x70a6xc)})[_0x1ff8[9]](function(_0x70a6xa){return handleError(_0x70a6x8,_0x70a6xa)})};exports[_0x1ff8[21]]= function(_0x70a6x7,_0x70a6x8){return Trunk[_0x1ff8[21]](_0x70a6x7[_0x1ff8[22]])[_0x1ff8[12]](function(_0x70a6xc){return _0x70a6x8[_0x1ff8[11]](201)[_0x1ff8[10]](_0x70a6xc)})[_0x1ff8[9]](function(_0x70a6xa){return handleError(_0x70a6x8,_0x70a6xa)})};exports[_0x1ff8[23]]= function(_0x70a6x7,_0x70a6x8){if(_0x70a6x7[_0x1ff8[22]][_0x1ff8[18]]){delete _0x70a6x7[_0x1ff8[22]][_0x1ff8[18]]};return Trunk[_0x1ff8[20]](_0x70a6x7[_0x1ff8[19]][_0x1ff8[18]])[_0x1ff8[12]](function(_0x70a6xc){if(!_0x70a6xc){return _0x70a6x8[_0x1ff8[17]](404)};var _0x70a6xd=_[_0x1ff8[26]](_0x70a6xc,_0x70a6x7[_0x1ff8[22]]);return _0x70a6xd[_0x1ff8[27]]()})[_0x1ff8[12]](function(_0x70a6xc){return _0x70a6x8[_0x1ff8[11]](200)[_0x1ff8[10]](_0x70a6xc)})[_0x1ff8[9]](function(_0x70a6xa){console[_0x1ff8[25]](_0x1ff8[24],_0x70a6xa);return handleError(_0x70a6x8,_0x70a6xa)})};exports[_0x1ff8[28]]= function(_0x70a6x7,_0x70a6x8){return Trunk[_0x1ff8[20]](_0x70a6x7[_0x1ff8[19]][_0x1ff8[18]])[_0x1ff8[12]](function(_0x70a6xc){if(!_0x70a6xc){return _0x70a6x8[_0x1ff8[17]](404)};return _0x70a6xc[_0x1ff8[28]]()})[_0x1ff8[12]](function(){return _0x70a6x8[_0x1ff8[17]](204)})[_0x1ff8[9]](function(_0x70a6xa){return handleError(_0x70a6x8,_0x70a6xa)})};exports[_0x1ff8[29]]= function(_0x70a6x7,_0x70a6x8){return Trunk[_0x1ff8[28]]({where:{id:_0x70a6x7[_0x1ff8[13]][_0x1ff8[30]]},individualHooks:true})[_0x1ff8[12]](function(){return _0x70a6x8[_0x1ff8[17]](204)})[_0x1ff8[9]](function(_0x70a6xa){return handleError(_0x70a6x8,_0x70a6xa)})};function handleError(_0x70a6x8,_0x70a6xa){return _0x70a6x8[_0x1ff8[11]](500)[_0x1ff8[10]](_0x70a6xa)} \ No newline at end of file diff --git a/server/api/trunk/trunk.events.js b/server/api/trunk/trunk.events.js index 5ceb1a1..4cad42b 100644 --- a/server/api/trunk/trunk.events.js +++ b/server/api/trunk/trunk.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Trunk = require('../../models').Trunk; - -var TrunkEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -TrunkEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Trunk.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - TrunkEvents.emit(event + ':' + doc._id, doc); - TrunkEvents.emit(event, doc); - done(null); - } -} - -module.exports = TrunkEvents; +var _0x5823=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5823[0];const EventEmitter=require(_0x5823[1]);const Trunk=require(_0x5823[3])[_0x5823[2]];var TrunkEvents= new EventEmitter();TrunkEvents[_0x5823[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x5823[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x5823[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x5823[7]};for(var e in events){var event=events[e];Trunk[_0x5823[8]](e,emitEvent(event))};function emitEvent(event){return function(_0xee36x8,_0xee36x9,_0xee36xa){TrunkEvents[_0x5823[11]](event+ _0x5823[9]+ _0xee36x8[_0x5823[10]],_0xee36x8);TrunkEvents[_0x5823[11]](event,_0xee36x8);_0xee36xa(null)}}module[_0x5823[12]]= TrunkEvents \ No newline at end of file diff --git a/server/api/trunk/trunk.socket.js b/server/api/trunk/trunk.socket.js index 5dda5a9..bcc946b 100644 --- a/server/api/trunk/trunk.socket.js +++ b/server/api/trunk/trunk.socket.js @@ -1,47 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const TrunkEvents = require('./trunk.events'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('trunk:' + event, socket); - - TrunkEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'trunk:save': - socket.emit(event, doc); - break; - case 'trunk:update': - if (socket.role !== 'trunk' && (doc.changed('status') || doc.changed('peerstatus'))) { - socket.emit(event, doc); - } - break; - case 'trunk:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - TrunkEvents.removeListener(event, listener); - }; -} +var _0x801a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x74\x72\x75\x6E\x6B\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x74\x72\x75\x6E\x6B\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x74\x72\x75\x6E\x6B\x3A\x73\x61\x76\x65","\x72\x6F\x6C\x65","\x74\x72\x75\x6E\x6B","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x74\x72\x75\x6E\x6B\x3A\x75\x70\x64\x61\x74\x65","\x74\x72\x75\x6E\x6B\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x801a[0];const TrunkEvents=require(_0x801a[1]);var events=[_0x801a[2],_0x801a[3],_0x801a[4]];exports[_0x801a[5]]= function(_0x4e46x3){for(var _0x4e46x4=0,_0x4e46x5=events[_0x801a[6]];_0x4e46x4< _0x4e46x5;_0x4e46x4++){var _0x4e46x6=events[_0x4e46x4];var _0x4e46x7=createListener(_0x801a[7]+ _0x4e46x6,_0x4e46x3);TrunkEvents[_0x801a[8]](_0x4e46x6,_0x4e46x7);_0x4e46x3[_0x801a[8]](_0x801a[9],removeListener(_0x4e46x6,_0x4e46x7))}};function createListener(_0x4e46x6,_0x4e46x3){return function(_0x4e46x9){switch(_0x4e46x6){case _0x801a[11]:_0x4e46x3[_0x801a[10]](_0x4e46x6,_0x4e46x9);break;case _0x801a[17]:if(_0x4e46x3[_0x801a[12]]!== _0x801a[13]&& (_0x4e46x9[_0x801a[15]](_0x801a[14])|| _0x4e46x9[_0x801a[15]](_0x801a[16]))){_0x4e46x3[_0x801a[10]](_0x4e46x6,_0x4e46x9)};break;case _0x801a[18]:_0x4e46x3[_0x801a[10]](_0x4e46x6,_0x4e46x9);break;default:}}}function removeListener(_0x4e46x6,_0x4e46x7){return function(){TrunkEvents[_0x801a[19]](_0x4e46x6,_0x4e46x7)}} \ No newline at end of file diff --git a/server/api/update/index.js b/server/api/update/index.js index 6c97808..0630ae2 100644 --- a/server/api/update/index.js +++ b/server/api/update/index.js @@ -1,13 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./update.controller'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasRole('admin'), license.hasUpdate(), controller.index); -router.get('/pull', auth.isAuthenticated(), auth.hasRole('admin'), license.hasUpdate(), controller.pull); - -module.exports = router; +var _0x9b00=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x70\x64\x61\x74\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x52\x6F\x6C\x65","\x68\x61\x73\x55\x70\x64\x61\x74\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x70\x75\x6C\x6C","\x70\x75\x6C\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x9b00[0];var express=require(_0x9b00[1]);var controller=require(_0x9b00[2]);var auth=require(_0x9b00[3]);var license=require(_0x9b00[4]);var router=express.Router();router[_0x9b00[11]](_0x9b00[5],auth[_0x9b00[6]](),auth[_0x9b00[8]](_0x9b00[7]),license[_0x9b00[9]](),controller[_0x9b00[10]]);router[_0x9b00[11]](_0x9b00[12],auth[_0x9b00[6]](),auth[_0x9b00[8]](_0x9b00[7]),license[_0x9b00[9]](),controller[_0x9b00[13]]);module[_0x9b00[14]]= router \ No newline at end of file diff --git a/server/api/update/update.controller.js b/server/api/update/update.controller.js index c6da9ad..e27bbd2 100644 --- a/server/api/update/update.controller.js +++ b/server/api/update/update.controller.js @@ -1,48 +1 @@ -'use strict'; - -var _ = require('lodash'); -var path = require('path'); -var moment = require('moment'); -var config = require('../../config/environment'); - -var Git = require('simple-git')(path.join(config.root)); - -// Get list of updates -exports.index = function(req, res) { - return Git - .log(function(err, logs) { - if (err) { - return handleError(res, err); - } - - var rows = []; - for (var i = 0; i < 10 && i < logs.all.length; i++) { - rows.push({ - version: logs.all[i].message.split('|')[1] || 'unknown', - message: logs.all[i].message.split('|')[0], - createdAt: moment(logs.all[i].date).format("YYYY-MM-DD HH:mm:ss") - }); - } - - return res.status(200).send({ - rows: rows, - count: rows.length - }); - }); -}; - -// Get a single update -exports.pull = function(req, res) { - Git - .pull('origin', 'master', function(err, data) { - if (err) { - console.error('err', err); - } - }); - - return res.sendStatus(200).send(); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x31e4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x6F\x6F\x74","\x6A\x6F\x69\x6E","\x73\x69\x6D\x70\x6C\x65\x2D\x67\x69\x74","\x69\x6E\x64\x65\x78","\x6C\x65\x6E\x67\x74\x68","\x61\x6C\x6C","\x7C","\x73\x70\x6C\x69\x74","\x6D\x65\x73\x73\x61\x67\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x61\x74\x65","\x70\x75\x73\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6C\x6F\x67","\x70\x75\x6C\x6C","\x6F\x72\x69\x67\x69\x6E","\x6D\x61\x73\x74\x65\x72","\x65\x72\x72","\x65\x72\x72\x6F\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73"];_0x31e4[0];var _=require(_0x31e4[1]);var path=require(_0x31e4[2]);var moment=require(_0x31e4[3]);var config=require(_0x31e4[4]);var Git=require(_0x31e4[7])(path[_0x31e4[6]](config[_0x31e4[5]]));exports[_0x31e4[8]]= function(_0x1774x6,_0x1774x7){return Git[_0x31e4[21]](function(_0x1774x8,_0x1774x9){if(_0x1774x8){return handleError(_0x1774x7,_0x1774x8)};var _0x1774xa=[];for(var _0x1774xb=0;_0x1774xb< 10&& _0x1774xb< _0x1774x9[_0x31e4[10]][_0x31e4[9]];_0x1774xb++){_0x1774xa[_0x31e4[18]]({version:_0x1774x9[_0x31e4[10]][_0x1774xb][_0x31e4[13]][_0x31e4[12]](_0x31e4[11])[1]|| _0x31e4[14],message:_0x1774x9[_0x31e4[10]][_0x1774xb][_0x31e4[13]][_0x31e4[12]](_0x31e4[11])[0],createdAt:moment(_0x1774x9[_0x31e4[10]][_0x1774xb][_0x31e4[17]])[_0x31e4[16]](_0x31e4[15])})};return _0x1774x7[_0x31e4[20]](200)[_0x31e4[19]]({rows:_0x1774xa,count:_0x1774xa[_0x31e4[9]]})})};exports[_0x31e4[22]]= function(_0x1774x6,_0x1774x7){Git[_0x31e4[22]](_0x31e4[23],_0x31e4[24],function(_0x1774x8,_0x1774xc){if(_0x1774x8){console[_0x31e4[26]](_0x31e4[25],_0x1774x8)}});return _0x1774x7[_0x31e4[27]](200)[_0x31e4[19]]()};function handleError(_0x1774x7,_0x1774x8){return _0x1774x7[_0x31e4[20]](500)[_0x31e4[19]](_0x1774x8)} \ No newline at end of file diff --git a/server/api/user/index.js b/server/api/user/index.js index 86e16fb..1f54e22 100644 --- a/server/api/user/index.js +++ b/server/api/user/index.js @@ -1,261 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./user.controller'); -var config = require('../../config/environment'); -var auth = require('../../auth/auth.service'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -/** - * @api {get} /api/users/ Get users' profile. - * - * @api {get} /api/agents/ Get users' profile. - * - * @apiParam (Query) {Number} [offset] Pagination offset. - * @apiParam (Query) {Number} [limit] Pagination limit. - * - * @apiVersion 0.0.140 - * @apiName GetUsers - * @apiGroup Users - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of users. - * @apiSuccess {Object[]} rows Get list of user profiles. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 1, - * "rows": [{ - * "id": 1 - * "name": "john.doe" - * "email": "john.doe@xcally.com" - * "internal": 1001 - * "fullname": "John Doe" - * ... - * }] - * } - */ -router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'user', 'agent']), controller.index); -router.get('/describe', auth.isAuthenticated(), auth.hasModule([17], ['admin']), controller.describe); - -router.get('/me', auth.isAuthenticated(), controller.me); -router.get('/all', auth.isAuthenticated(), controller.getUsers); -router.get('/avatar/:filename', controller.getAvatar); -/** - * @api {get} /api/users/:id Get user's profile. - * @apiParam {Number} id User's unique ID. - * @apiVersion 0.0.140 - * @apiName GetUser - * @apiGroup Users - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "john.doe" - * "email": "john.doe@xcally.com" - * "internal": 1001 - * "fullname": "John Doe" - * ... - * } - */ -router.get('/:id', auth.isAuthenticated(), auth.hasModule([], ['admin', 'user']), controller.show); -router.get('/:id/avatar', auth.isAuthenticated(), controller.getAvatarById); -router.get('/:id/allowed/modules', auth.isAuthenticated(), auth.hasRole('admin'), controller.getAllowedModules); -router.get('/:id/allowed/:channel/queues', auth.isAuthenticated(), auth.hasRole('admin'), controller.getAllowedQueues); - -/** - * @api {post} /api/users/ Create user's profile. - * @apiParam (Body) {String} name User's username. - * @apiParam (Body) {String} fullname User's fullname. - * @apiParam (Body) {String} email User's email. - * @apiParam (Body) {String} context="from-sip" User's SIP context. - * @apiParam (Body) {String} password User's password. - * @apiParam (Body) {Number} internal User's internal number. - * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp" User's SIP transport. - * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" User's SIP codecs. - * @apiParam (Body) {Number} internal User's internal number. - * @apiParam (Body) {String} [phone] User's phone. - * @apiParam (Body) {String} [mobile] User's mobile phone. - * @apiParam (Body) {String} [address] User's address. - * @apiParam (Body) {String} [zipcode] User's zipcode. - * @apiParam (Body) {String} [city] User's city. - * @apiParam (Body) {String} [country] User's country. - * - * @apiVersion 0.0.140 - * @apiName CreateUser - * @apiGroup Users - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - * { - * "id": 1 - * "name": "john.doe" - * "email": "john.doe@xcally.com" - * "internal": 1001 - * "fullname": "John Doe" - * ... - * } - */ -router.post('/', auth.isAuthenticated(), license.isValidDate(), license.isUsersLimit(), auth.hasRole('admin'), controller.create); -router.post('/:id/allowed/modules', auth.isAuthenticated(), auth.hasRole('admin'), controller.setAllowedModules); -router.post('/:id/allowed/:channel/queues', auth.isAuthenticated(), auth.hasRole('admin'), controller.addAllowedQueues); -/** - * @api {put} /api/users/password Update user's password. - * - * @apiParam (Body) {String} oldPassword Old user's password. - * @apiParam (Body) {String} newPassword New user's password. - * - * @apiVersion 0.0.140 - * @apiName UpdateUserPassword - * @apiGroup Users - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - */ -router.put('/password', auth.isAuthenticated(), controller.changePassword); -/** - * @api {update} /api/users/:id Update user's profile. - * - * @apiParam (Params) {Number} id User's unique ID. - * @apiParam (Body) {String} fullname User's fullname. - * @apiParam (Body) {String} email User's email. - * @apiParam (Body) {String} context="from-sip" User's SIP context. - * @apiParam (Body) {String} password User's password. - * @apiParam (Body) {Number} internal User's internal number. - * @apiParam (Body) {String="tcp", "udp", "tcp,udp"} transport="udp" User's SIP transport. - * @apiParam (Body) {String="alaw", "ulaw", "gsm"} allow="alaw;ulaw;gsm" User's SIP codecs. - * @apiParam (Body) {Number} internal User's internal number. - * @apiParam (Body) {String} [phone] User's phone. - * @apiParam (Body) {String} [mobile] User's mobile phone. - * @apiParam (Body) {String} [address] User's address. - * @apiParam (Body) {String} [zipcode] User's zipcode. - * @apiParam (Body) {String} [city] User's city. - * @apiParam (Body) {String} [country] User's country. - * - * @apiVersion 0.0.140 - * @apiName UpdateUser - * @apiGroup Users - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "john.doe" - * "email": "john.doe@xcally.com" - * "internal": 1001 - * "fullname": "John Doe" - * ... - * } - */ - -router.put('/:id', auth.isAuthenticated(), auth.hasModule([], ['admin', 'user', 'agent']), controller.update); - -/** - * @api {delete} /api/users/ Bulk Delete users' profile. - * - * @apiParam (Query) {Number[]} ids Users' unique ID array. - * - * @apiVersion 0.0.140 - * @apiName BulkDeleteUsers - * @apiGroup Users - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/', auth.isAuthenticated(), auth.hasRole('admin'), controller.bulkDestroy); - -/** - * @api {delete} /api/users/:id Delete user's profile. - * - * @apiParam {Number} id User's unique ID. - * - * @apiVersion 0.0.140 - * @apiName DeleteUser - * @apiGroup Users - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id', auth.isAuthenticated(), auth.hasRole('admin'), controller.destroy); -router.delete('/:id/allowed/:channel/queues', auth.isAuthenticated(), auth.hasRole('admin'), controller.removeAllowedQueues); - - -/** - * @api {put} /api/users/:id/password Reset user's password. - * - * @apiParam (Params) {Number} id User's unique ID. - * @apiParam (Body) {String} newPassword New user's password. - * - * @apiPermission admin - * - * @apiVersion 0.0.140 - * @apiName ResetUserPassword - * @apiGroup Users - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - */ -router.put('/:id/password', auth.isAuthenticated(), auth.hasRole('admin'), controller.resetPassword); -router.post('/validate/:field', auth.isAuthenticated(), auth.hasRole('admin'), controller.userValidation); -router.post('/:id/avatar', auth.isAuthenticated(), auth.hasRole('admin'), controller.changeAvatar); - -module.exports = router; +var _0xfe67=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x6D\x65","\x6D\x65","\x2F\x61\x6C\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x2F\x61\x76\x61\x74\x61\x72\x2F\x3A\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x61\x76\x61\x74\x61\x72","\x67\x65\x74\x41\x76\x61\x74\x61\x72\x42\x79\x49\x64","\x2F\x3A\x69\x64\x2F\x61\x6C\x6C\x6F\x77\x65\x64\x2F\x6D\x6F\x64\x75\x6C\x65\x73","\x68\x61\x73\x52\x6F\x6C\x65","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x2F\x3A\x69\x64\x2F\x61\x6C\x6C\x6F\x77\x65\x64\x2F\x3A\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x55\x73\x65\x72\x73\x4C\x69\x6D\x69\x74","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x61\x64\x64\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x2F\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x70\x75\x74","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x2F\x3A\x69\x64\x2F\x70\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x75\x73\x65\x72\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x63\x68\x61\x6E\x67\x65\x41\x76\x61\x74\x61\x72","\x65\x78\x70\x6F\x72\x74\x73"];_0xfe67[0];var express=require(_0xfe67[1]);var controller=require(_0xfe67[2]);var config=require(_0xfe67[3]);var auth=require(_0xfe67[4]);var license=require(_0xfe67[5]);var router=express.Router();router[_0xfe67[13]](_0xfe67[6],auth[_0xfe67[7]](),auth[_0xfe67[11]]([7],[_0xfe67[8],_0xfe67[9],_0xfe67[10]]),controller[_0xfe67[12]]);router[_0xfe67[13]](_0xfe67[14],auth[_0xfe67[7]](),auth[_0xfe67[11]]([17],[_0xfe67[8]]),controller[_0xfe67[15]]);router[_0xfe67[13]](_0xfe67[16],auth[_0xfe67[7]](),controller[_0xfe67[17]]);router[_0xfe67[13]](_0xfe67[18],auth[_0xfe67[7]](),controller[_0xfe67[19]]);router[_0xfe67[13]](_0xfe67[20],controller[_0xfe67[21]]);router[_0xfe67[13]](_0xfe67[22],auth[_0xfe67[7]](),auth[_0xfe67[11]]([],[_0xfe67[8],_0xfe67[9]]),controller[_0xfe67[23]]);router[_0xfe67[13]](_0xfe67[24],auth[_0xfe67[7]](),controller[_0xfe67[25]]);router[_0xfe67[13]](_0xfe67[26],auth[_0xfe67[7]](),auth[_0xfe67[27]](_0xfe67[8]),controller[_0xfe67[28]]);router[_0xfe67[13]](_0xfe67[29],auth[_0xfe67[7]](),auth[_0xfe67[27]](_0xfe67[8]),controller[_0xfe67[30]]);router[_0xfe67[34]](_0xfe67[6],auth[_0xfe67[7]](),license[_0xfe67[31]](),license[_0xfe67[32]](),auth[_0xfe67[27]](_0xfe67[8]),controller[_0xfe67[33]]);router[_0xfe67[34]](_0xfe67[26],auth[_0xfe67[7]](),auth[_0xfe67[27]](_0xfe67[8]),controller[_0xfe67[35]]);router[_0xfe67[34]](_0xfe67[29],auth[_0xfe67[7]](),auth[_0xfe67[27]](_0xfe67[8]),controller[_0xfe67[36]]);router[_0xfe67[39]](_0xfe67[37],auth[_0xfe67[7]](),controller[_0xfe67[38]]);router[_0xfe67[39]](_0xfe67[22],auth[_0xfe67[7]](),auth[_0xfe67[11]]([],[_0xfe67[8],_0xfe67[9],_0xfe67[10]]),controller[_0xfe67[40]]);router[_0xfe67[42]](_0xfe67[6],auth[_0xfe67[7]](),auth[_0xfe67[27]](_0xfe67[8]),controller[_0xfe67[41]]);router[_0xfe67[42]](_0xfe67[22],auth[_0xfe67[7]](),auth[_0xfe67[27]](_0xfe67[8]),controller[_0xfe67[43]]);router[_0xfe67[42]](_0xfe67[29],auth[_0xfe67[7]](),auth[_0xfe67[27]](_0xfe67[8]),controller[_0xfe67[44]]);router[_0xfe67[39]](_0xfe67[45],auth[_0xfe67[7]](),auth[_0xfe67[27]](_0xfe67[8]),controller[_0xfe67[46]]);router[_0xfe67[34]](_0xfe67[47],auth[_0xfe67[7]](),auth[_0xfe67[27]](_0xfe67[8]),controller[_0xfe67[48]]);router[_0xfe67[34]](_0xfe67[24],auth[_0xfe67[7]](),auth[_0xfe67[27]](_0xfe67[8]),controller[_0xfe67[49]]);module[_0xfe67[50]]= router \ No newline at end of file diff --git a/server/api/user/user.controller.js b/server/api/user/user.controller.js index e1c3f64..cb477ba 100644 --- a/server/api/user/user.controller.js +++ b/server/api/user/user.controller.js @@ -1,739 +1 @@ -'use strict'; - -var User = require('../../models').User; -var Module = require('../../models').Module; -var Setting = require('../../models').Setting; -var VoiceQueue = require('../../models').VoiceQueue; -var ChatQueue = require('../../models').ChatQueue; -var MailQueue = require('../../models').MailQueue; -var FaxQueue = require('../../models').FaxQueue; -var SmsQueue = require('../../models').SmsQueue; -var sequelize = require('../../models').sequelize; - -var config = require('../../config/environment'); -var Util = require('../../config/util'); - -var passport = require('passport'); -var moment = require('moment'); -var jwt = require('jsonwebtoken'); -var uploadFile = require('upload-file'); -var path = require('path'); -var fs = require('fs'); -var _ = require('lodash'); -var util = require('util'); -var sr = require('simple-random'); - -/** - * Get list of admin/user - */ -exports.index = function(req, res, next) { - return User - .scope('user') - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get list of fields -exports.describe = function(req, res) { - return User - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} - -/** - * Get list of admin/user/agent/telephone - */ -exports.getUsers = function(req, res, next) { - return User - .findAll() - .then(function(users) { - return res.status(200).send({ - rows: users - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -/** - * Get list of allowed modules - */ -exports.getAllowedModules = function(req, res, next) { - return User - .findById(req.params.id) - .then(function(user) { - if (!user) { - return res.sendStatus(404); - } - - return user.getModules(); - }) - .then(function(modules) { - return res.status(200).send(modules); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -/** - * Creates a new user - */ -exports.create = function(req, res, next) { - - // Set default role - req.body.role = req.body.role || 'user'; - var password = String(req.body.password); - if (!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/.test(password))) { - throw new Error('Wrong password format!'); - } - - return sequelize.transaction(function(t) { - return User - .create(req.body, { - transaction: t - }) - .then(function(user) { - return res.status(201).send(user); - }) - }) - .catch(sequelize.UniqueConstraintError, function(err) { - return Util.errorManager.handleUniqueConstraintError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.setAllowedModules = function(req, res, next) { - return sequelize.transaction(function(t) { - return User - .findById(req.params.id) - .then(function(user) { - if (!user) { - return res.sendStatus(404); - } - return user.setModules(req.body.modules); - }) - .then(function() { - return res.sendStatus(201); - }) - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -/** - * Get a single user - */ -exports.show = function(req, res, next) { - return User - .findById(req.params.id) - .then(function(user) { - if (!user) { - return res.sendStatus(404); - } - - return res.status(200).send(user); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -/** - * Deletes a user - */ -exports.destroy = function(req, res, next) { - var userId = req.params.id; - var _user; - - return User - .findById(userId) - .then(function(user) { - _user = user; - if (!user) { - return res.sendStatus(404); - } - return user - .destroy(); - }) - .then(function(user) { - return res.status(200).send(user); - }) - .catch(sequelize.ForeignKeyConstraintError, function(err) { - return Util.errorManager.handleForeignKeyConstraintError(res, 'user', _user.name, err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a user from the DB. -exports.bulkDestroy = function(req, res) { - return User - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -/** - * Change a user password - */ -exports.changePassword = function(req, res, next) { - var userId = req.user.id; - var oldPass = String(req.body.oldPassword); - var newPass = String(req.body.newPassword); - return sequelize.transaction(function(t) { - return Setting - .findById(1) - .then(function(setting) { - if (setting.securePassword && !(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/.test(newPass))) { - throw new Error('Wrong password format!'); - } - - return User - .findById(userId); - }) - .then(function(user) { - if (!user.authenticate(oldPass)) { - return res.sendStatus(403); - } else { - user.password = newPass; - return user.save({ - transaction: t - }).then(function() { - return res.sendStatus(200); - }) - } - }) - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -/** - * Change a user password by admin - */ -exports.resetPassword = function(req, res, next) { - var _setting; - - var userId = req.params.id; - var newPass = String(req.body.newPassword); - - return sequelize.transaction(function(t) { - return Setting - .findById(1) - .then(function(setting) { - _setting = setting; - - return User - .findById(userId); - }) - .then(function(user) { - var regEx = _setting.securePassword ? /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/ : /^[a-zA-Z0-9]{6,}$/; - - if (_setting.securePassword && !regEx.test(newPass)) { - throw new Error('Invalid password pattern'); - } - - user.password = newPass; - return user - .save({ - transaction: t - }); - }) - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; - -/** - * Change the avatar of the user - */ -exports.changeAvatar = function(req, res, next) { - - var upload = new uploadFile({ - dest: path.join(config.root, 'server', 'files', 'images'), - maxNumberOfFiles: 1, - minNumberOfFiles: 0, - acceptFileTypes: /(\.|\/)(jpeg|png)$/i, - rename: function(name, file) { - return sr() + path.extname(file.filename); - }, - messages: { - maxNumberOfFiles: "Max number of files upload exceeded", - acceptFileTypes: "Only jpeg and png format accepted", - invalidRequest: "Invalid request" - } - }); - - upload.on('end', function(fields, files) { - if (!files.file.filename) { - return res.status(500).send(upload); - } - return sequelize.transaction(function(t) { - return User - .findById(req.params.id) - .then(function(user) { - if (!user) { - return res.sendStatus(404); - } - - return user - .update({ - userpic: files.file.filename - }, { - transaction: t - }); - }) - .then(function(user) { - return res.status(200).send(user); - }) - }) - .catch(function(err) { - return handleError(res, err); - }); - }); - - upload.on('error', function(err) { - console.log('********** Upload error :', err) - return handleError(res, err); - }); - - upload.parse(req); -}; - - -/** - * Get my info - */ -exports.me = function(req, res, next) { - var userId = req.user.id; - - return User - .findOne({ - where: { - id: userId - }, - attributes: ['id', 'fullname', 'name', 'email', 'role', 'userpic', 'lastLoginAt', 'voicePause', - 'mailPause', - 'chatPause', - 'faxPause', - 'smsPause', - 'openchannelPause', - 'lastPauseAt', - 'pauseType', - 'phoneBarRemoteControl', - 'phoneBarRemoteControlPort' - ], - include: [Module, { - model: VoiceQueue, - as: 'PVoiceQueues' - }, { - model: ChatQueue, - as: 'PChatQueues' - }, { - model: MailQueue, - as: 'PMailQueues' - }, { - model: FaxQueue, - as: 'PFaxQueues' - }, { - model: SmsQueue, - as: 'PSmsQueues' - }] - }) - .then(function(user) { - if (!user) { - return res.sendStatus(401); - } - return res.status(200).send(user); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -/** - * Update my user - */ -exports.update = function(req, res, next) { - var userId = req.user.id; - - delete req.body.password; - delete req.body.name; - - return sequelize.transaction(function(t) { - return User - .findById(req.params.id) - .then(function(user) { - if (!user) { - return res.sendStatus(500); - } - return user - .update(req.body, { - transaction: t - }); - }) - .then(function(user) { - return res.status(200).send(user); - }) - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -/** - * Get my avatar - */ -exports.getAvatar = function(req, res, next) { - var imgPath = path.join(config.root, 'server', 'files', 'images', req.params.filename); - - fs.exists(imgPath, function(exists) { - if (!exists) { - imgPath = path.join(config.root, 'server', 'files', 'images', 'userpic.png'); - } - - return res.sendFile(imgPath); - }); -}; - -/** - * Get my avatar by id - */ -exports.getAvatarById = function(req, res, next) { - if (req.params.id === 'visitor') { - var imgPath = path.join(config.root, 'server', 'files', 'images', 'customer.png'); - - fs.exists(imgPath, function(exists) { - return res.sendFile(imgPath); - }); - - } else { - return User - .findById(req.params.id) - .then(function(user) { - if (user) { - var imgPath = path.join(config.root, 'server', 'files', 'images', user.userpic ? user.userpic : 'userpic.png'); - - fs.exists(imgPath, function(exists) { - if (!exists) { - imgPath = path.join(config.root, 'server', 'files', 'images', 'userpic.png'); - } - - return res.sendFile(imgPath); - }); - } else { - return res.sendStatus(500); - } - }) - .catch(function(err) { - return handleError(res, err); - }); - } -}; - -/** - * Get my avatar by id - */ -// exports.getAllowedQueues = function(req, res, next) { -// var _user; -// var _permits = { -// voice: [], -// chat: [], -// mail: [], -// fax: [], -// sms: [] -// }; -// -// return User -// .findById(req.params.id, { -// attributes: ['id'] -// }) -// .then(function(user) { -// _user = user; -// if (!_user) { -// return res.sendStatus(401); -// } -// -// return _user -// .getPVoiceQueues({ -// attributes: ['name'] -// }); -// }) -// .then(function(queues) { -// _permits.voice = _permits.voice.concat(_.map(queues, 'name')); -// }) -// .then(function() { -// return _user -// .getPChatQueues({ -// attributes: ['name'] -// }); -// }) -// .then(function(queues) { -// _permits.chat = _permits.chat.concat(_.map(queues, 'name')); -// }) -// .then(function() { -// return _user -// .getPMailQueues({ -// attributes: ['name'] -// }); -// }) -// .then(function(queues) { -// _permits.mail = _permits.mail.concat(_.map(queues, 'name')); -// }) -// .then(function() { -// return _user -// .getPFaxQueues({ -// attributes: ['name'] -// }); -// }) -// .then(function(queues) { -// _permits.fax = _permits.fax.concat(_.map(queues, 'name')); -// }) -// // .then(function() { -// // return _user -// // .getPSmsQueues({ -// // attributes: ['name'] -// // }); -// // }) -// // .then(function(queues) { -// // _permits.sms = _permits.sms.concat(_.map(queues, 'name')); -// // }) -// .then(function() { -// return res.status(200).send(_permits); -// }) -// .catch(function(err) { -// console.error(err); -// return handleError(res, err); -// }); -// }; - -exports.getAllowedQueues = function(req, res, next) { - var _user; - - return User - .findById(req.params.id, { - attributes: ['id'] - }) - .then(function(user) { - _user = user; - if (!_user) { - return res.sendStatus(401); - } - - switch (req.params.channel) { - case 'voice': - return _user - .getPVoiceQueues({ - attributes: ['name'] - }); - case 'chat': - return _user - .getPChatQueues({ - attributes: ['id', 'name'] - }); - case 'mail': - return _user - .getPMailQueues({ - attributes: ['id', 'name'] - }); - case 'fax': - return _user - .getPFaxQueues({ - attributes: ['id', 'name'] - }); - case 'sms': - return _user - .getPSmsQueues({ - attributes: ['id', 'name'] - }); - case 'openchannel': - return _user - .getPOpenchannelQueues({ - attributes: ['id', 'name'] - }); - default: - throw new Error('The channel does not exist'); - } - }) - .then(function(queues) { - if (queues) { - return res.status(200).send(_.map(queues, function(queue) { - var _data = { - name: queue.name - }; - - if (queue.id) { - _data.id = queue.id; - } - - return _data; - })); - } - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; - -exports.addAllowedQueues = function(req, res, next) { - var _user; - - return User - .findById(req.params.id, { - attributes: ['id'] - }) - .then(function(user) { - _user = user; - if (!_user) { - return res.sendStatus(401); - } - - switch (req.params.channel) { - case 'voice': - return _user - .addPVoiceQueues(req.body); - case 'chat': - return _user - .addPChatQueues(req.body); - case 'mail': - return _user - .addPMailQueues(req.body); - case 'fax': - return _user - .addPFaxQueues(req.body); - case 'sms': - return _user - .addPSmsQueues(req.body); - case 'openchannel': - return _user - .addPOpenchannelQueues(req.body); - default: - return null; - } - }) - .then(function(queues) { - return res.sendStatus(queues ? 200 : 401); - }) - .catch(function(err) { - console.error(err); - }); -}; - -exports.removeAllowedQueues = function(req, res, next) { - var _user; - - return User - .findById(req.params.id, { - attributes: ['id'] - }) - .then(function(user) { - _user = user; - if (!_user) { - return res.sendStatus(401); - } - - switch (req.params.channel) { - case 'voice': - return _user - .removePVoiceQueues(req.query.ids); - case 'chat': - return _user - .removePChatQueues(req.query.ids); - case 'mail': - return _user - .removePMailQueues(req.query.ids); - case 'sms': - return _user - .removePSmsQueues(req.query.ids); - case 'fax': - return _user - .removePFaxQueues(req.query.ids); - case 'openchannel': - return _user - .removePOpenchannelQueues(req.query.ids); - default: - return null; - } - }) - .then(function(queues) { - return res.sendStatus(queues ? 200 : 401); - }) - .catch(function(err) { - console.error(err); - }); -}; - -exports.userValidation = function(req, res) { - var where = {}; - where[req.params.field] = req.body.value; - - return User - .findAndCountAll({ - where: where - }) - .then(function(result) { - if (result.count) { - return res.status(200).send({ - isValid: false, - value: req.body.value - }); - } - return res.status(200).send({ - isValid: true, - value: req.body.value - }); - }) - .catch(function(err) { - return handleError(res, err); - }); - -}; - -/** - * Authentication callback - */ -exports.authCallback = function(req, res, next) { - res.redirect('/'); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x2021=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x6F\x64\x75\x6C\x65","\x53\x65\x74\x74\x69\x6E\x67","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x70\x61\x73\x73\x70\x6F\x72\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6A\x73\x6F\x6E\x77\x65\x62\x74\x6F\x6B\x65\x6E","\x75\x70\x6C\x6F\x61\x64\x2D\x66\x69\x6C\x65","\x70\x61\x74\x68","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x75\x73\x65\x72","\x73\x63\x6F\x70\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x55\x73\x65\x72\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x67\x65\x74\x4D\x6F\x64\x75\x6C\x65\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6C\x65","\x62\x6F\x64\x79","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x68\x61\x6E\x64\x6C\x65\x55\x6E\x69\x71\x75\x65\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x65\x72\x72\x6F\x72\x4D\x61\x6E\x61\x67\x65\x72","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x73\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x4D\x6F\x64\x75\x6C\x65\x73","\x6C\x6F\x67","\x6D\x6F\x64\x75\x6C\x65\x73","\x73\x65\x74\x4D\x6F\x64\x75\x6C\x65\x73","\x73\x68\x6F\x77","\x64\x65\x73\x74\x72\x6F\x79","\x6E\x61\x6D\x65","\x68\x61\x6E\x64\x6C\x65\x46\x6F\x72\x65\x69\x67\x6E\x4B\x65\x79\x43\x6F\x6E\x73\x74\x72\x61\x69\x6E\x74\x45\x72\x72\x6F\x72","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x63\x68\x61\x6E\x67\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x6F\x6C\x64\x50\x61\x73\x73\x77\x6F\x72\x64","\x6E\x65\x77\x50\x61\x73\x73\x77\x6F\x72\x64","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x73\x61\x76\x65","\x73\x65\x63\x75\x72\x65\x50\x61\x73\x73\x77\x6F\x72\x64","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64","\x65\x72\x72\x6F\x72","\x49\x6E\x76\x61\x6C\x69\x64\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x70\x61\x74\x74\x65\x72\x6E","\x63\x68\x61\x6E\x67\x65\x41\x76\x61\x74\x61\x72","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x6A\x6F\x69\x6E","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x74\x6E\x61\x6D\x65","\x4D\x61\x78\x20\x6E\x75\x6D\x62\x65\x72\x20\x6F\x66\x20\x66\x69\x6C\x65\x73\x20\x75\x70\x6C\x6F\x61\x64\x20\x65\x78\x63\x65\x65\x64\x65\x64","\x4F\x6E\x6C\x79\x20\x6A\x70\x65\x67\x20\x61\x6E\x64\x20\x70\x6E\x67\x20\x66\x6F\x72\x6D\x61\x74\x20\x61\x63\x63\x65\x70\x74\x65\x64","\x49\x6E\x76\x61\x6C\x69\x64\x20\x72\x65\x71\x75\x65\x73\x74","\x65\x6E\x64","\x66\x69\x6C\x65","\x75\x70\x64\x61\x74\x65","\x6F\x6E","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x20\x55\x70\x6C\x6F\x61\x64\x20\x65\x72\x72\x6F\x72\x20\x3A","\x70\x61\x72\x73\x65","\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72\x70\x69\x63","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x6C\x61\x73\x74\x50\x61\x75\x73\x65\x41\x74","\x70\x61\x75\x73\x65\x54\x79\x70\x65","\x70\x68\x6F\x6E\x65\x42\x61\x72\x52\x65\x6D\x6F\x74\x65\x43\x6F\x6E\x74\x72\x6F\x6C","\x70\x68\x6F\x6E\x65\x42\x61\x72\x52\x65\x6D\x6F\x74\x65\x43\x6F\x6E\x74\x72\x6F\x6C\x50\x6F\x72\x74","\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x67\x65\x74\x41\x76\x61\x74\x61\x72","\x75\x73\x65\x72\x70\x69\x63\x2E\x70\x6E\x67","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x65\x78\x69\x73\x74\x73","\x67\x65\x74\x41\x76\x61\x74\x61\x72\x42\x79\x49\x64","\x76\x69\x73\x69\x74\x6F\x72","\x63\x75\x73\x74\x6F\x6D\x65\x72\x2E\x70\x6E\x67","\x67\x65\x74\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x6D\x61\x70","\x67\x65\x74\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x76\x6F\x69\x63\x65","\x67\x65\x74\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x63\x68\x61\x74","\x67\x65\x74\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x6D\x61\x69\x6C","\x67\x65\x74\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x66\x61\x78","\x67\x65\x74\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x73\x6D\x73","\x67\x65\x74\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x54\x68\x65\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x64\x64\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x61\x64\x64\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x41\x6C\x6C\x6F\x77\x65\x64\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x72\x65\x6D\x6F\x76\x65\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x75\x73\x65\x72\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x61\x75\x74\x68\x43\x61\x6C\x6C\x62\x61\x63\x6B","\x2F","\x72\x65\x64\x69\x72\x65\x63\x74"];_0x2021[0];var User=require(_0x2021[2])[_0x2021[1]];var Module=require(_0x2021[2])[_0x2021[3]];var Setting=require(_0x2021[2])[_0x2021[4]];var VoiceQueue=require(_0x2021[2])[_0x2021[5]];var ChatQueue=require(_0x2021[2])[_0x2021[6]];var MailQueue=require(_0x2021[2])[_0x2021[7]];var FaxQueue=require(_0x2021[2])[_0x2021[8]];var SmsQueue=require(_0x2021[2])[_0x2021[9]];var sequelize=require(_0x2021[2])[_0x2021[10]];var config=require(_0x2021[11]);var Util=require(_0x2021[12]);var passport=require(_0x2021[13]);var moment=require(_0x2021[14]);var jwt=require(_0x2021[15]);var uploadFile=require(_0x2021[16]);var path=require(_0x2021[17]);var fs=require(_0x2021[18]);var _=require(_0x2021[19]);var util=require(_0x2021[20]);var sr=require(_0x2021[21]);exports[_0x2021[22]]= function(_0x72cex15,_0x72cex16,_0x72cex17){return User[_0x2021[31]](_0x2021[30])[_0x2021[29]](Util[_0x2021[28]](_0x72cex15[_0x2021[27]]))[_0x2021[26]](function(_0x72cex19){_0x72cex16[_0x2021[25]](200)[_0x2021[24]](_0x72cex19)})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[32]]= function(_0x72cex15,_0x72cex16){return User[_0x2021[32]]()[_0x2021[26]](function(_0x72cex1a){return _0x72cex16[_0x2021[25]](200)[_0x2021[24]](_0x72cex1a)})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})};function handleError(_0x72cex16,_0x72cex18){return _0x72cex16[_0x2021[25]](500)[_0x2021[24]](_0x72cex18)}exports[_0x2021[33]]= function(_0x72cex15,_0x72cex16,_0x72cex17){return User[_0x2021[34]]()[_0x2021[26]](function(_0x72cex1c){return _0x72cex16[_0x2021[25]](200)[_0x2021[24]]({rows:_0x72cex1c})})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[35]]= function(_0x72cex15,_0x72cex16,_0x72cex17){return User[_0x2021[40]](_0x72cex15[_0x2021[39]][_0x2021[38]])[_0x2021[26]](function(_0x72cex1e){if(!_0x72cex1e){return _0x72cex16[_0x2021[36]](404)};return _0x72cex1e[_0x2021[37]]()})[_0x2021[26]](function(_0x72cex1d){return _0x72cex16[_0x2021[25]](200)[_0x2021[24]](_0x72cex1d)})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[41]]= function(_0x72cex15,_0x72cex16,_0x72cex17){_0x72cex15[_0x2021[43]][_0x2021[42]]= _0x72cex15[_0x2021[43]][_0x2021[42]]|| _0x2021[30];var _0x72cex1f=String(_0x72cex15[_0x2021[43]][_0x2021[44]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0x2021[45]](_0x72cex1f))){throw new Error(_0x2021[46])};return sequelize[_0x2021[49]](function(_0x72cex20){return User[_0x2021[41]](_0x72cex15[_0x2021[43]],{transaction:_0x72cex20})[_0x2021[26]](function(_0x72cex1e){return _0x72cex16[_0x2021[25]](201)[_0x2021[24]](_0x72cex1e)})})[_0x2021[23]](sequelize.UniqueConstraintError,function(_0x72cex18){return Util[_0x2021[48]][_0x2021[47]](_0x72cex16,_0x72cex18)})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[50]]= function(_0x72cex15,_0x72cex16,_0x72cex17){return sequelize[_0x2021[49]](function(_0x72cex20){return User[_0x2021[40]](_0x72cex15[_0x2021[39]][_0x2021[38]])[_0x2021[26]](function(_0x72cex1e){if(!_0x72cex1e){return _0x72cex16[_0x2021[36]](404)};return _0x72cex1e[_0x2021[53]](_0x72cex15[_0x2021[43]][_0x2021[52]])})[_0x2021[26]](function(){return _0x72cex16[_0x2021[36]](201)})})[_0x2021[23]](function(_0x72cex18){console[_0x2021[51]](_0x72cex18);return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[54]]= function(_0x72cex15,_0x72cex16,_0x72cex17){return User[_0x2021[40]](_0x72cex15[_0x2021[39]][_0x2021[38]])[_0x2021[26]](function(_0x72cex1e){if(!_0x72cex1e){return _0x72cex16[_0x2021[36]](404)};return _0x72cex16[_0x2021[25]](200)[_0x2021[24]](_0x72cex1e)})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[55]]= function(_0x72cex15,_0x72cex16,_0x72cex17){var _0x72cex21=_0x72cex15[_0x2021[39]][_0x2021[38]];var _0x72cex22;return User[_0x2021[40]](_0x72cex21)[_0x2021[26]](function(_0x72cex1e){_0x72cex22= _0x72cex1e;if(!_0x72cex1e){return _0x72cex16[_0x2021[36]](404)};return _0x72cex1e[_0x2021[55]]()})[_0x2021[26]](function(_0x72cex1e){return _0x72cex16[_0x2021[25]](200)[_0x2021[24]](_0x72cex1e)})[_0x2021[23]](sequelize.ForeignKeyConstraintError,function(_0x72cex18){return Util[_0x2021[48]][_0x2021[57]](_0x72cex16,_0x2021[30],_0x72cex22[_0x2021[56]],_0x72cex18)})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[58]]= function(_0x72cex15,_0x72cex16){return User[_0x2021[55]]({where:{id:_0x72cex15[_0x2021[27]][_0x2021[59]]},individualHooks:true})[_0x2021[26]](function(){return _0x72cex16[_0x2021[36]](204)})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[60]]= function(_0x72cex15,_0x72cex16,_0x72cex17){var _0x72cex21=_0x72cex15[_0x2021[30]][_0x2021[38]];var _0x72cex23=String(_0x72cex15[_0x2021[43]][_0x2021[61]]);var _0x72cex24=String(_0x72cex15[_0x2021[43]][_0x2021[62]]);return sequelize[_0x2021[49]](function(_0x72cex20){return Setting[_0x2021[40]](1)[_0x2021[26]](function(_0x72cex25){if(_0x72cex25[_0x2021[65]]&& !(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0x2021[45]](_0x72cex24))){throw new Error(_0x2021[46])};return User[_0x2021[40]](_0x72cex21)})[_0x2021[26]](function(_0x72cex1e){if(!_0x72cex1e[_0x2021[63]](_0x72cex23)){return _0x72cex16[_0x2021[36]](403)}else {_0x72cex1e[_0x2021[44]]= _0x72cex24;return _0x72cex1e[_0x2021[64]]({transaction:_0x72cex20})[_0x2021[26]](function(){return _0x72cex16[_0x2021[36]](200)})}})})[_0x2021[23]](function(_0x72cex18){console[_0x2021[51]](_0x72cex18);return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[66]]= function(_0x72cex15,_0x72cex16,_0x72cex17){var _0x72cex26;var _0x72cex21=_0x72cex15[_0x2021[39]][_0x2021[38]];var _0x72cex24=String(_0x72cex15[_0x2021[43]][_0x2021[62]]);return sequelize[_0x2021[49]](function(_0x72cex20){return Setting[_0x2021[40]](1)[_0x2021[26]](function(_0x72cex25){_0x72cex26= _0x72cex25;return User[_0x2021[40]](_0x72cex21)})[_0x2021[26]](function(_0x72cex1e){var _0x72cex27=_0x72cex26[_0x2021[65]]?/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/:/^[a-zA-Z0-9]{6,}$/;if(_0x72cex26[_0x2021[65]]&& !_0x72cex27[_0x2021[45]](_0x72cex24)){throw new Error(_0x2021[68])};_0x72cex1e[_0x2021[44]]= _0x72cex24;return _0x72cex1e[_0x2021[64]]({transaction:_0x72cex20})})})[_0x2021[26]](function(){return _0x72cex16[_0x2021[36]](200)})[_0x2021[23]](function(_0x72cex18){console[_0x2021[67]](_0x72cex18);return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[69]]= function(_0x72cex15,_0x72cex16,_0x72cex17){var _0x72cex28= new uploadFile({dest:path[_0x2021[74]](config[_0x2021[70]],_0x2021[71],_0x2021[72],_0x2021[73]),maxNumberOfFiles:1,minNumberOfFiles:0,acceptFileTypes:/(\.|\/)(jpeg|png)$/i,rename:function(_0x72cex29,_0x72cex2a){return sr()+ path[_0x2021[76]](_0x72cex2a[_0x2021[75]])},messages:{maxNumberOfFiles:_0x2021[77],acceptFileTypes:_0x2021[78],invalidRequest:_0x2021[79]}});_0x72cex28[_0x2021[83]](_0x2021[80],function(_0x72cex1a,_0x72cex2b){if(!_0x72cex2b[_0x2021[81]][_0x2021[75]]){return _0x72cex16[_0x2021[25]](500)[_0x2021[24]](_0x72cex28)};return sequelize[_0x2021[49]](function(_0x72cex20){return User[_0x2021[40]](_0x72cex15[_0x2021[39]][_0x2021[38]])[_0x2021[26]](function(_0x72cex1e){if(!_0x72cex1e){return _0x72cex16[_0x2021[36]](404)};return _0x72cex1e[_0x2021[82]]({userpic:_0x72cex2b[_0x2021[81]][_0x2021[75]]},{transaction:_0x72cex20})})[_0x2021[26]](function(_0x72cex1e){return _0x72cex16[_0x2021[25]](200)[_0x2021[24]](_0x72cex1e)})})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})});_0x72cex28[_0x2021[83]](_0x2021[67],function(_0x72cex18){console[_0x2021[51]](_0x2021[84],_0x72cex18);return handleError(_0x72cex16,_0x72cex18)});_0x72cex28[_0x2021[85]](_0x72cex15)};exports[_0x2021[86]]= function(_0x72cex15,_0x72cex16,_0x72cex17){var _0x72cex21=_0x72cex15[_0x2021[30]][_0x2021[38]];return User[_0x2021[106]]({where:{id:_0x72cex21},attributes:[_0x2021[38],_0x2021[87],_0x2021[56],_0x2021[88],_0x2021[42],_0x2021[89],_0x2021[90],_0x2021[91],_0x2021[92],_0x2021[93],_0x2021[94],_0x2021[95],_0x2021[96],_0x2021[97],_0x2021[98],_0x2021[99],_0x2021[100]],include:[Module,{model:VoiceQueue,as:_0x2021[101]},{model:ChatQueue,as:_0x2021[102]},{model:MailQueue,as:_0x2021[103]},{model:FaxQueue,as:_0x2021[104]},{model:SmsQueue,as:_0x2021[105]}]})[_0x2021[26]](function(_0x72cex1e){if(!_0x72cex1e){return _0x72cex16[_0x2021[36]](401)};return _0x72cex16[_0x2021[25]](200)[_0x2021[24]](_0x72cex1e)})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[82]]= function(_0x72cex15,_0x72cex16,_0x72cex17){var _0x72cex21=_0x72cex15[_0x2021[30]][_0x2021[38]];delete _0x72cex15[_0x2021[43]][_0x2021[44]];delete _0x72cex15[_0x2021[43]][_0x2021[56]];return sequelize[_0x2021[49]](function(_0x72cex20){return User[_0x2021[40]](_0x72cex15[_0x2021[39]][_0x2021[38]])[_0x2021[26]](function(_0x72cex1e){if(!_0x72cex1e){return _0x72cex16[_0x2021[36]](500)};return _0x72cex1e[_0x2021[82]](_0x72cex15[_0x2021[43]],{transaction:_0x72cex20})})[_0x2021[26]](function(_0x72cex1e){return _0x72cex16[_0x2021[25]](200)[_0x2021[24]](_0x72cex1e)})})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[107]]= function(_0x72cex15,_0x72cex16,_0x72cex17){var _0x72cex2c=path[_0x2021[74]](config[_0x2021[70]],_0x2021[71],_0x2021[72],_0x2021[73],_0x72cex15[_0x2021[39]][_0x2021[75]]);fs[_0x2021[110]](_0x72cex2c,function(_0x72cex2d){if(!_0x72cex2d){_0x72cex2c= path[_0x2021[74]](config[_0x2021[70]],_0x2021[71],_0x2021[72],_0x2021[73],_0x2021[108])};return _0x72cex16[_0x2021[109]](_0x72cex2c)})};exports[_0x2021[111]]= function(_0x72cex15,_0x72cex16,_0x72cex17){if(_0x72cex15[_0x2021[39]][_0x2021[38]]=== _0x2021[112]){var _0x72cex2c=path[_0x2021[74]](config[_0x2021[70]],_0x2021[71],_0x2021[72],_0x2021[73],_0x2021[113]);fs[_0x2021[110]](_0x72cex2c,function(_0x72cex2d){return _0x72cex16[_0x2021[109]](_0x72cex2c)})}else {return User[_0x2021[40]](_0x72cex15[_0x2021[39]][_0x2021[38]])[_0x2021[26]](function(_0x72cex1e){if(_0x72cex1e){var _0x72cex2c=path[_0x2021[74]](config[_0x2021[70]],_0x2021[71],_0x2021[72],_0x2021[73],_0x72cex1e[_0x2021[89]]?_0x72cex1e[_0x2021[89]]:_0x2021[108]);fs[_0x2021[110]](_0x72cex2c,function(_0x72cex2d){if(!_0x72cex2d){_0x72cex2c= path[_0x2021[74]](config[_0x2021[70]],_0x2021[71],_0x2021[72],_0x2021[73],_0x2021[108])};return _0x72cex16[_0x2021[109]](_0x72cex2c)})}else {return _0x72cex16[_0x2021[36]](500)}})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})}};exports[_0x2021[114]]= function(_0x72cex15,_0x72cex16,_0x72cex17){var _0x72cex22;return User[_0x2021[40]](_0x72cex15[_0x2021[39]][_0x2021[38]],{attributes:[_0x2021[38]]})[_0x2021[26]](function(_0x72cex1e){_0x72cex22= _0x72cex1e;if(!_0x72cex22){return _0x72cex16[_0x2021[36]](401)};switch(_0x72cex15[_0x2021[39]][_0x2021[129]]){case _0x2021[117]:return _0x72cex22[_0x2021[116]]({attributes:[_0x2021[56]]});case _0x2021[119]:return _0x72cex22[_0x2021[118]]({attributes:[_0x2021[38],_0x2021[56]]});case _0x2021[121]:return _0x72cex22[_0x2021[120]]({attributes:[_0x2021[38],_0x2021[56]]});case _0x2021[123]:return _0x72cex22[_0x2021[122]]({attributes:[_0x2021[38],_0x2021[56]]});case _0x2021[125]:return _0x72cex22[_0x2021[124]]({attributes:[_0x2021[38],_0x2021[56]]});case _0x2021[127]:return _0x72cex22[_0x2021[126]]({attributes:[_0x2021[38],_0x2021[56]]});default:throw new Error(_0x2021[128])}})[_0x2021[26]](function(_0x72cex2e){if(_0x72cex2e){return _0x72cex16[_0x2021[25]](200)[_0x2021[24]](_[_0x2021[115]](_0x72cex2e,function(_0x72cex2f){var _0x72cex30={name:_0x72cex2f[_0x2021[56]]};if(_0x72cex2f[_0x2021[38]]){_0x72cex30[_0x2021[38]]= _0x72cex2f[_0x2021[38]]};return _0x72cex30}))}})[_0x2021[23]](function(_0x72cex18){console[_0x2021[67]](_0x72cex18);return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[130]]= function(_0x72cex15,_0x72cex16,_0x72cex17){var _0x72cex22;return User[_0x2021[40]](_0x72cex15[_0x2021[39]][_0x2021[38]],{attributes:[_0x2021[38]]})[_0x2021[26]](function(_0x72cex1e){_0x72cex22= _0x72cex1e;if(!_0x72cex22){return _0x72cex16[_0x2021[36]](401)};switch(_0x72cex15[_0x2021[39]][_0x2021[129]]){case _0x2021[117]:return _0x72cex22[_0x2021[131]](_0x72cex15[_0x2021[43]]);case _0x2021[119]:return _0x72cex22[_0x2021[132]](_0x72cex15[_0x2021[43]]);case _0x2021[121]:return _0x72cex22[_0x2021[133]](_0x72cex15[_0x2021[43]]);case _0x2021[123]:return _0x72cex22[_0x2021[134]](_0x72cex15[_0x2021[43]]);case _0x2021[125]:return _0x72cex22[_0x2021[135]](_0x72cex15[_0x2021[43]]);case _0x2021[127]:return _0x72cex22[_0x2021[136]](_0x72cex15[_0x2021[43]]);default:return null}})[_0x2021[26]](function(_0x72cex2e){return _0x72cex16[_0x2021[36]](_0x72cex2e?200:401)})[_0x2021[23]](function(_0x72cex18){console[_0x2021[67]](_0x72cex18)})};exports[_0x2021[137]]= function(_0x72cex15,_0x72cex16,_0x72cex17){var _0x72cex22;return User[_0x2021[40]](_0x72cex15[_0x2021[39]][_0x2021[38]],{attributes:[_0x2021[38]]})[_0x2021[26]](function(_0x72cex1e){_0x72cex22= _0x72cex1e;if(!_0x72cex22){return _0x72cex16[_0x2021[36]](401)};switch(_0x72cex15[_0x2021[39]][_0x2021[129]]){case _0x2021[117]:return _0x72cex22[_0x2021[138]](_0x72cex15[_0x2021[27]][_0x2021[59]]);case _0x2021[119]:return _0x72cex22[_0x2021[139]](_0x72cex15[_0x2021[27]][_0x2021[59]]);case _0x2021[121]:return _0x72cex22[_0x2021[140]](_0x72cex15[_0x2021[27]][_0x2021[59]]);case _0x2021[125]:return _0x72cex22[_0x2021[141]](_0x72cex15[_0x2021[27]][_0x2021[59]]);case _0x2021[123]:return _0x72cex22[_0x2021[142]](_0x72cex15[_0x2021[27]][_0x2021[59]]);case _0x2021[127]:return _0x72cex22[_0x2021[143]](_0x72cex15[_0x2021[27]][_0x2021[59]]);default:return null}})[_0x2021[26]](function(_0x72cex2e){return _0x72cex16[_0x2021[36]](_0x72cex2e?200:401)})[_0x2021[23]](function(_0x72cex18){console[_0x2021[67]](_0x72cex18)})};exports[_0x2021[144]]= function(_0x72cex15,_0x72cex16){var _0x72cex31={};_0x72cex31[_0x72cex15[_0x2021[39]][_0x2021[145]]]= _0x72cex15[_0x2021[43]][_0x2021[146]];return User[_0x2021[29]]({where:_0x72cex31})[_0x2021[26]](function(_0x72cex19){if(_0x72cex19[_0x2021[147]]){return _0x72cex16[_0x2021[25]](200)[_0x2021[24]]({isValid:false,value:_0x72cex15[_0x2021[43]][_0x2021[146]]})};return _0x72cex16[_0x2021[25]](200)[_0x2021[24]]({isValid:true,value:_0x72cex15[_0x2021[43]][_0x2021[146]]})})[_0x2021[23]](function(_0x72cex18){return handleError(_0x72cex16,_0x72cex18)})};exports[_0x2021[148]]= function(_0x72cex15,_0x72cex16,_0x72cex17){_0x72cex16[_0x2021[150]](_0x2021[149])};function handleError(_0x72cex16,_0x72cex18){return _0x72cex16[_0x2021[25]](500)[_0x2021[24]](_0x72cex18)} \ No newline at end of file diff --git a/server/api/user/user.events.js b/server/api/user/user.events.js index 7052b15..e8966be 100644 --- a/server/api/user/user.events.js +++ b/server/api/user/user.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const User = require('../../models').User; - -var UserEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - User.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserEvents.emit(event + ':' + doc._id, doc); - UserEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserEvents; +var _0xf1a8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xf1a8[0];const EventEmitter=require(_0xf1a8[1]);const User=require(_0xf1a8[3])[_0xf1a8[2]];var UserEvents= new EventEmitter();UserEvents[_0xf1a8[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xf1a8[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xf1a8[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xf1a8[6]};for(var e in events){var event=events[e];User[_0xf1a8[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4394x8,_0x4394x9,_0x4394xa){UserEvents[_0xf1a8[10]](event+ _0xf1a8[8]+ _0x4394x8[_0xf1a8[9]],_0x4394x8);UserEvents[_0xf1a8[10]](event,_0x4394x8);_0x4394xa(null)}}module[_0xf1a8[11]]= UserEvents \ No newline at end of file diff --git a/server/api/user/user.socket.js b/server/api/user/user.socket.js index a5f1bc9..dd3eea0 100644 --- a/server/api/user/user.socket.js +++ b/server/api/user/user.socket.js @@ -1,34 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserEvents = require('./user.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user:' + event, socket); - - UserEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - if (doc.role === 'user' || doc.role === 'admin') { - socket.emit(event, doc); - } - }; -} - -function removeListener(event, listener) { - return function() { - UserEvents.removeListener(event, listener); - }; -} +var _0xf581=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x72\x6F\x6C\x65","\x75\x73\x65\x72","\x61\x64\x6D\x69\x6E","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xf581[0];const UserEvents=require(_0xf581[1]);var events=[_0xf581[2],_0xf581[3]];exports[_0xf581[4]]= function(_0xe62cx3){for(var _0xe62cx4=0,_0xe62cx5=events[_0xf581[5]];_0xe62cx4< _0xe62cx5;_0xe62cx4++){var _0xe62cx6=events[_0xe62cx4];var _0xe62cx7=createListener(_0xf581[6]+ _0xe62cx6,_0xe62cx3);UserEvents[_0xf581[7]](_0xe62cx6,_0xe62cx7);_0xe62cx3[_0xf581[7]](_0xf581[8],removeListener(_0xe62cx6,_0xe62cx7))}};function createListener(_0xe62cx6,_0xe62cx3){return function(_0xe62cx9){if(_0xe62cx9[_0xf581[9]]=== _0xf581[10]|| _0xe62cx9[_0xf581[9]]=== _0xf581[11]){_0xe62cx3[_0xf581[12]](_0xe62cx6,_0xe62cx9)}}}function removeListener(_0xe62cx6,_0xe62cx7){return function(){UserEvents[_0xf581[13]](_0xe62cx6,_0xe62cx7)}} \ No newline at end of file diff --git a/server/api/user_has_chat_queue/index.js b/server/api/user_has_chat_queue/index.js index bce94e7..bc73095 100644 --- a/server/api/user_has_chat_queue/index.js +++ b/server/api/user_has_chat_queue/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./user_has_chat_queue.controller'); - -var router = express.Router(); - -router.get('/', controller.index); -router.get('/:id', controller.show); -router.post('/', controller.create); -router.put('/:id', controller.update); -router.patch('/:id', controller.update); -router.delete('/:id', controller.destroy); - -module.exports = router; \ No newline at end of file +var _0x435d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x435d[0];var express=require(_0x435d[1]);var controller=require(_0x435d[2]);var router=express.Router();router[_0x435d[5]](_0x435d[3],controller[_0x435d[4]]);router[_0x435d[5]](_0x435d[6],controller[_0x435d[7]]);router[_0x435d[9]](_0x435d[3],controller[_0x435d[8]]);router[_0x435d[11]](_0x435d[6],controller[_0x435d[10]]);router[_0x435d[12]](_0x435d[6],controller[_0x435d[10]]);router[_0x435d[14]](_0x435d[6],controller[_0x435d[13]]);module[_0x435d[15]]= router \ No newline at end of file diff --git a/server/api/user_has_chat_queue/user_has_chat_queue.controller.js b/server/api/user_has_chat_queue/user_has_chat_queue.controller.js index b399892..f1cb386 100644 --- a/server/api/user_has_chat_queue/user_has_chat_queue.controller.js +++ b/server/api/user_has_chat_queue/user_has_chat_queue.controller.js @@ -1,103 +1 @@ -'use strict'; - -var _ = require('lodash'); -var UserHasChatQueue = require('../../models').UserHasChatQueue; - -// Get list of userHasChatQueues -exports.index = function(req, res) { - UserHasChatQueue - .findAll(req.query ? { - where: req.query - } : {}) - .then(function(userHasChatQueues) { - return res.status(200).send(userHasChatQueues); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single userHasChatQueue -exports.show = function(req, res) { - UserHasChatQueue - .findById(req.params.id) - .then(function(userHasChatQueue) { - if (!userHasChatQueue) { - return res.sendStatus(404); - } - return res.send(userHasChatQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new userHasChatQueue in the DB. -exports.create = function(req, res) { - UserHasChatQueue - .create(req.body) - .then(function(userHasChatQueue) { - return res.status(201).send(userHasChatQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing userHasChatQueue in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - UserHasChatQueue - .find({ - where: { - id: req.params.id - } - }) - .then(function(userHasChatQueue) { - if (!userHasChatQueue) { - return res.sendStatus(404); - } - var updated = _.merge(userHasChatQueue, req.body); - updated.save() - .then(function() { - return res.status(200).send(userHasChatQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a userHasChatQueue from the DB. -exports.destroy = function(req, res) { - UserHasChatQueue - .find({ - where: { - id: req.params.id - } - }) - .then(function(userHasChatQueue) { - if (!userHasChatQueue) { - return res.sendStatus(404); - } - userHasChatQueue.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xae9f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0xae9f[0];var _=require(_0xae9f[1]);var UserHasChatQueue=require(_0xae9f[3])[_0xae9f[2]];exports[_0xae9f[4]]= function(_0xd2dax3,_0xd2dax4){UserHasChatQueue[_0xae9f[10]](_0xd2dax3[_0xae9f[9]]?{where:_0xd2dax3[_0xae9f[9]]}:{})[_0xae9f[8]](function(_0xd2dax6){return _0xd2dax4[_0xae9f[7]](200)[_0xae9f[6]](_0xd2dax6)})[_0xae9f[5]](function(_0xd2dax5){return handleError(_0xd2dax4,_0xd2dax5)})};exports[_0xae9f[11]]= function(_0xd2dax3,_0xd2dax4){UserHasChatQueue[_0xae9f[15]](_0xd2dax3[_0xae9f[14]][_0xae9f[13]])[_0xae9f[8]](function(_0xd2dax7){if(!_0xd2dax7){return _0xd2dax4[_0xae9f[12]](404)};return _0xd2dax4[_0xae9f[6]](_0xd2dax7)})[_0xae9f[5]](function(_0xd2dax5){return handleError(_0xd2dax4,_0xd2dax5)})};exports[_0xae9f[16]]= function(_0xd2dax3,_0xd2dax4){UserHasChatQueue[_0xae9f[16]](_0xd2dax3[_0xae9f[17]])[_0xae9f[8]](function(_0xd2dax7){return _0xd2dax4[_0xae9f[7]](201)[_0xae9f[6]](_0xd2dax7)})[_0xae9f[5]](function(_0xd2dax5){return handleError(_0xd2dax4,_0xd2dax5)})};exports[_0xae9f[18]]= function(_0xd2dax3,_0xd2dax4){if(_0xd2dax3[_0xae9f[17]][_0xae9f[13]]){delete _0xd2dax3[_0xae9f[17]][_0xae9f[13]]};UserHasChatQueue[_0xae9f[21]]({where:{id:_0xd2dax3[_0xae9f[14]][_0xae9f[13]]}})[_0xae9f[8]](function(_0xd2dax7){if(!_0xd2dax7){return _0xd2dax4[_0xae9f[12]](404)};var _0xd2dax8=_[_0xae9f[19]](_0xd2dax7,_0xd2dax3[_0xae9f[17]]);_0xd2dax8[_0xae9f[20]]()[_0xae9f[8]](function(){return _0xd2dax4[_0xae9f[7]](200)[_0xae9f[6]](_0xd2dax7)})[_0xae9f[5]](function(_0xd2dax5){return handleError(_0xd2dax4,_0xd2dax5)})})[_0xae9f[5]](function(_0xd2dax5){return handleError(_0xd2dax4,_0xd2dax5)})};exports[_0xae9f[22]]= function(_0xd2dax3,_0xd2dax4){UserHasChatQueue[_0xae9f[21]]({where:{id:_0xd2dax3[_0xae9f[14]][_0xae9f[13]]}})[_0xae9f[8]](function(_0xd2dax7){if(!_0xd2dax7){return _0xd2dax4[_0xae9f[12]](404)};_0xd2dax7[_0xae9f[22]]()[_0xae9f[8]](function(){return _0xd2dax4[_0xae9f[12]](204)})[_0xae9f[5]](function(_0xd2dax5){return handleError(_0xd2dax4,_0xd2dax5)})})[_0xae9f[5]](function(_0xd2dax5){return handleError(_0xd2dax4,_0xd2dax5)})};function handleError(_0xd2dax4,_0xd2dax5){return _0xd2dax4[_0xae9f[7]](500)[_0xae9f[6]](_0xd2dax5)} \ No newline at end of file diff --git a/server/api/user_has_chat_queue/user_has_chat_queue.events.js b/server/api/user_has_chat_queue/user_has_chat_queue.events.js index 7289f5f..98996f6 100644 --- a/server/api/user_has_chat_queue/user_has_chat_queue.events.js +++ b/server/api/user_has_chat_queue/user_has_chat_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasChatQueue = require('../../models').UserHasChatQueue; - -var UserHasChatQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasChatQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasChatQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasChatQueueEvents.emit(event + ':' + doc._id, doc); - UserHasChatQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasChatQueueEvents; +var _0xdc18=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdc18[0];const EventEmitter=require(_0xdc18[1]);const UserHasChatQueue=require(_0xdc18[3])[_0xdc18[2]];var UserHasChatQueueEvents= new EventEmitter();UserHasChatQueueEvents[_0xdc18[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xdc18[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xdc18[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xdc18[6]};for(var e in events){var event=events[e];UserHasChatQueue[_0xdc18[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x460ax8,_0x460ax9,_0x460axa){UserHasChatQueueEvents[_0xdc18[10]](event+ _0xdc18[8]+ _0x460ax8[_0xdc18[9]],_0x460ax8);UserHasChatQueueEvents[_0xdc18[10]](event,_0x460ax8);_0x460axa(null)}}module[_0xdc18[11]]= UserHasChatQueueEvents \ No newline at end of file diff --git a/server/api/user_has_chat_queue/user_has_chat_queue.socket.js b/server/api/user_has_chat_queue/user_has_chat_queue.socket.js index cbe8860..64796ee 100644 --- a/server/api/user_has_chat_queue/user_has_chat_queue.socket.js +++ b/server/api/user_has_chat_queue/user_has_chat_queue.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasChatQueueEvents = require('./user_has_chat_queue.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_chat_queue:' + event, socket); - - UserHasChatQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - UserHasChatQueueEvents.removeListener(event, listener); - }; -} +var _0x84b6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x84b6[0];const UserHasChatQueueEvents=require(_0x84b6[1]);var events=[_0x84b6[2],_0x84b6[3]];exports[_0x84b6[4]]= function(_0x5bafx3){for(var _0x5bafx4=0,_0x5bafx5=events[_0x84b6[5]];_0x5bafx4< _0x5bafx5;_0x5bafx4++){var _0x5bafx6=events[_0x5bafx4];var _0x5bafx7=createListener(_0x84b6[6]+ _0x5bafx6,_0x5bafx3);UserHasChatQueueEvents[_0x84b6[7]](_0x5bafx6,_0x5bafx7);_0x5bafx3[_0x84b6[7]](_0x84b6[8],removeListener(_0x5bafx6,_0x5bafx7))}};function createListener(_0x5bafx6,_0x5bafx3){return function(_0x5bafx9){_0x5bafx3[_0x84b6[9]](_0x5bafx6,_0x5bafx9)}}function removeListener(_0x5bafx6,_0x5bafx7){return function(){UserHasChatQueueEvents[_0x84b6[10]](_0x5bafx6,_0x5bafx7)}} \ No newline at end of file diff --git a/server/api/user_has_chat_queue/user_has_chat_queue_permit.events.js b/server/api/user_has_chat_queue/user_has_chat_queue_permit.events.js index 985d823..9393369 100644 --- a/server/api/user_has_chat_queue/user_has_chat_queue_permit.events.js +++ b/server/api/user_has_chat_queue/user_has_chat_queue_permit.events.js @@ -1,35 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasChatQueuePermit = require('../../models').UserHasChatQueuePermit; - -var UserHasChatQueuePermitEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasChatQueuePermitEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasChatQueuePermit.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasChatQueuePermitEvents.emit(event + ':' + doc._id, doc); - UserHasChatQueuePermitEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasChatQueuePermitEvents; +var _0x6faf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6faf[0];const EventEmitter=require(_0x6faf[1]);const UserHasChatQueuePermit=require(_0x6faf[3])[_0x6faf[2]];var UserHasChatQueuePermitEvents= new EventEmitter();UserHasChatQueuePermitEvents[_0x6faf[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6faf[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6faf[6]};for(var e in events){var event=events[e];UserHasChatQueuePermit[_0x6faf[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9399x8,_0x9399x9,_0x9399xa){UserHasChatQueuePermitEvents[_0x6faf[10]](event+ _0x6faf[8]+ _0x9399x8[_0x6faf[9]],_0x9399x8);UserHasChatQueuePermitEvents[_0x6faf[10]](event,_0x9399x8);_0x9399xa(null)}}module[_0x6faf[11]]= UserHasChatQueuePermitEvents \ No newline at end of file diff --git a/server/api/user_has_chat_queue/user_has_chat_queue_permit.socket.js b/server/api/user_has_chat_queue/user_has_chat_queue_permit.socket.js index 4ffea53..945f5dc 100644 --- a/server/api/user_has_chat_queue/user_has_chat_queue_permit.socket.js +++ b/server/api/user_has_chat_queue/user_has_chat_queue_permit.socket.js @@ -1,34 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasChatQueuePermitEvents = require('./user_has_chat_queue_permit.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_chat_queue_permit:' + event, socket); - - UserHasChatQueuePermitEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - if (socket.userId === doc.Userid) { - socket.emit('user_has_chat_queue_permit:change'); - } - }; -} - -function removeListener(event, listener) { - return function() { - UserHasChatQueuePermitEvents.removeListener(event, listener); - }; -} +var _0x4827=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x4827[0];const UserHasChatQueuePermitEvents=require(_0x4827[1]);var events=[_0x4827[2],_0x4827[3]];exports[_0x4827[4]]= function(_0x2d40x3){for(var _0x2d40x4=0,_0x2d40x5=events[_0x4827[5]];_0x2d40x4< _0x2d40x5;_0x2d40x4++){var _0x2d40x6=events[_0x2d40x4];var _0x2d40x7=createListener(_0x4827[6]+ _0x2d40x6,_0x2d40x3);UserHasChatQueuePermitEvents[_0x4827[7]](_0x2d40x6,_0x2d40x7);_0x2d40x3[_0x4827[7]](_0x4827[8],removeListener(_0x2d40x6,_0x2d40x7))}};function createListener(_0x2d40x6,_0x2d40x3){return function(_0x2d40x9){if(_0x2d40x3[_0x4827[9]]=== _0x2d40x9[_0x4827[10]]){_0x2d40x3[_0x4827[12]](_0x4827[11])}}}function removeListener(_0x2d40x6,_0x2d40x7){return function(){UserHasChatQueuePermitEvents[_0x4827[13]](_0x2d40x6,_0x2d40x7)}} \ No newline at end of file diff --git a/server/api/user_has_chat_room/index.js b/server/api/user_has_chat_room/index.js index 381448d..cb9cc6e 100644 --- a/server/api/user_has_chat_room/index.js +++ b/server/api/user_has_chat_room/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./user_has_chat_room.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -// router.get('/', controller.index); -// router.get('/:id', controller.show); -// router.post('/', controller.create); -router.put('/:userId/:chatRoomId', controller.update); -// router.patch('/:id', controller.update); -// router.delete('/:id', controller.destroy); - -module.exports = router; +var _0x1efb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x3A\x75\x73\x65\x72\x49\x64\x2F\x3A\x63\x68\x61\x74\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1efb[0];var express=require(_0x1efb[1]);var controller=require(_0x1efb[2]);var auth=require(_0x1efb[3]);var router=express.Router();router[_0x1efb[6]](_0x1efb[4],controller[_0x1efb[5]]);module[_0x1efb[7]]= router \ No newline at end of file diff --git a/server/api/user_has_chat_room/user_has_chat_room.controller.js b/server/api/user_has_chat_room/user_has_chat_room.controller.js index d747380..e809922 100644 --- a/server/api/user_has_chat_room/user_has_chat_room.controller.js +++ b/server/api/user_has_chat_room/user_has_chat_room.controller.js @@ -1,96 +1 @@ -'use strict'; - -var _ = require('lodash'); -var UserHasChatRoom = require('../../models').UserHasChatRoom; - -// Get list of user_has_chat_rooms -exports.index = function(req, res) { - UserHasChatRoom - .findAll() - .then(function (user_has_chat_rooms) { - return res.status(200).send(user_has_chat_rooms); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single user_has_chat_room -exports.show = function(req, res) { - UserHasChatRoom - .findById(req.params.id) - .then(function (user_has_chat_room) { - if(!user_has_chat_room) { return res.sendStatus(404); } - return res.send(user_has_chat_room); - }) - .catch(function(err){ - return handleError(res, err); - }); -}; - -// Creates a new user_has_chat_room in the DB. -exports.create = function(req, res) { - - UserHasChatRoom - .create(req.body) - .then(function(user_has_chat_room) { - return res.status(201).send(user_has_chat_room); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing user_has_chat_room in the DB. -exports.update = function(req, res) { - - UserHasChatRoom - .findOne({ - where: { - UserId: req.params.userId, - ChatRoomId: req.params.chatRoomId - }, - limit: 1 - }) - .then(function (user_has_chat_room) { - if (!user_has_chat_room) { - return res.sendStatus(404); - } - - user_has_chat_room - .updateAttributes(req.body) - .then(function () { - return res.status(200).send(user_has_chat_room); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a user_has_chat_room from the DB. -exports.destroy = function(req, res) { - - UserHasChatRoom - .findById(req.params.id) - .then(function (user_has_chat_room) { - if(!user_has_chat_room) { return res.sendStatus(404); } - user_has_chat_room.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x3b04=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x75\x73\x65\x72\x49\x64","\x63\x68\x61\x74\x52\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x3b04[0];var _=require(_0x3b04[1]);var UserHasChatRoom=require(_0x3b04[3])[_0x3b04[2]];exports[_0x3b04[4]]= function(_0x1bd9x3,_0x1bd9x4){UserHasChatRoom[_0x3b04[9]]()[_0x3b04[8]](function(_0x1bd9x6){return _0x1bd9x4[_0x3b04[7]](200)[_0x3b04[6]](_0x1bd9x6)})[_0x3b04[5]](function(_0x1bd9x5){return handleError(_0x1bd9x4,_0x1bd9x5)})};exports[_0x3b04[10]]= function(_0x1bd9x3,_0x1bd9x4){UserHasChatRoom[_0x3b04[14]](_0x1bd9x3[_0x3b04[13]][_0x3b04[12]])[_0x3b04[8]](function(_0x1bd9x7){if(!_0x1bd9x7){return _0x1bd9x4[_0x3b04[11]](404)};return _0x1bd9x4[_0x3b04[6]](_0x1bd9x7)})[_0x3b04[5]](function(_0x1bd9x5){return handleError(_0x1bd9x4,_0x1bd9x5)})};exports[_0x3b04[15]]= function(_0x1bd9x3,_0x1bd9x4){UserHasChatRoom[_0x3b04[15]](_0x1bd9x3[_0x3b04[16]])[_0x3b04[8]](function(_0x1bd9x7){return _0x1bd9x4[_0x3b04[7]](201)[_0x3b04[6]](_0x1bd9x7)})[_0x3b04[5]](function(_0x1bd9x5){return handleError(_0x1bd9x4,_0x1bd9x5)})};exports[_0x3b04[17]]= function(_0x1bd9x3,_0x1bd9x4){UserHasChatRoom[_0x3b04[21]]({where:{UserId:_0x1bd9x3[_0x3b04[13]][_0x3b04[19]],ChatRoomId:_0x1bd9x3[_0x3b04[13]][_0x3b04[20]]},limit:1})[_0x3b04[8]](function(_0x1bd9x7){if(!_0x1bd9x7){return _0x1bd9x4[_0x3b04[11]](404)};_0x1bd9x7[_0x3b04[18]](_0x1bd9x3[_0x3b04[16]])[_0x3b04[8]](function(){return _0x1bd9x4[_0x3b04[7]](200)[_0x3b04[6]](_0x1bd9x7)})[_0x3b04[5]](function(_0x1bd9x5){return handleError(_0x1bd9x4,_0x1bd9x5)})})[_0x3b04[5]](function(_0x1bd9x5){return handleError(_0x1bd9x4,_0x1bd9x5)})};exports[_0x3b04[22]]= function(_0x1bd9x3,_0x1bd9x4){UserHasChatRoom[_0x3b04[14]](_0x1bd9x3[_0x3b04[13]][_0x3b04[12]])[_0x3b04[8]](function(_0x1bd9x7){if(!_0x1bd9x7){return _0x1bd9x4[_0x3b04[11]](404)};_0x1bd9x7[_0x3b04[22]]()[_0x3b04[8]](function(){return _0x1bd9x4[_0x3b04[11]](204)})[_0x3b04[5]](function(_0x1bd9x5){return handleError(_0x1bd9x4,_0x1bd9x5)})})[_0x3b04[5]](function(_0x1bd9x5){return handleError(_0x1bd9x4,_0x1bd9x5)})};function handleError(_0x1bd9x4,_0x1bd9x5){return _0x1bd9x4[_0x3b04[7]](500)[_0x3b04[6]](_0x1bd9x5)} \ No newline at end of file diff --git a/server/api/user_has_chat_room/user_has_chat_room.events.js b/server/api/user_has_chat_room/user_has_chat_room.events.js index 619a0ae..4542460 100644 --- a/server/api/user_has_chat_room/user_has_chat_room.events.js +++ b/server/api/user_has_chat_room/user_has_chat_room.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasChatRoom = require('../../models').UserHasChatRoom; - -var UserHasChatRoomEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasChatRoomEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasChatRoom.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasChatRoomEvents.emit(event + ':' + doc._id, doc); - UserHasChatRoomEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasChatRoomEvents; +var _0xb203=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb203[0];const EventEmitter=require(_0xb203[1]);const UserHasChatRoom=require(_0xb203[3])[_0xb203[2]];var UserHasChatRoomEvents= new EventEmitter();UserHasChatRoomEvents[_0xb203[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb203[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb203[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb203[6]};for(var e in events){var event=events[e];UserHasChatRoom[_0xb203[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xf5a5x8,_0xf5a5x9,_0xf5a5xa){UserHasChatRoomEvents[_0xb203[10]](event+ _0xb203[8]+ _0xf5a5x8[_0xb203[9]],_0xf5a5x8);UserHasChatRoomEvents[_0xb203[10]](event,_0xf5a5x8);_0xf5a5xa(null)}}module[_0xb203[11]]= UserHasChatRoomEvents \ No newline at end of file diff --git a/server/api/user_has_chat_room/user_has_chat_room.socket.js b/server/api/user_has_chat_room/user_has_chat_room.socket.js index 20d7dd6..1e77663 100644 --- a/server/api/user_has_chat_room/user_has_chat_room.socket.js +++ b/server/api/user_has_chat_room/user_has_chat_room.socket.js @@ -1,60 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasChatRoomEvents = require('./user_has_chat_room.events'); -const ChatRoom = require('../../models').ChatRoom; -const User = require('../../models').User; - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_chat_room:' + event, socket); - - UserHasChatRoomEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'user_has_chat_room:save': - return ChatRoom - .findById(doc.ChatRoomId, { - include: [{ - model: User, - attributes: ['id'] - }] - }) - .then(function(chatRoom) { - chatRoom.Users.forEach(function(user) { - if (socket.userId == user.id) { - socket.emit(event, doc); - } - }); - }) - .catch(function(err) { - console.error(err); - }); - - case 'user_has_chat_room:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - UserHasChatRoomEvents.removeListener(event, listener); - }; -} +var _0x3dad=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x75\x73\x65\x72\x49\x64","\x69\x64","\x65\x6D\x69\x74","\x66\x6F\x72\x45\x61\x63\x68","\x55\x73\x65\x72\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x73\x61\x76\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x3dad[0];const UserHasChatRoomEvents=require(_0x3dad[1]);const ChatRoom=require(_0x3dad[3])[_0x3dad[2]];const User=require(_0x3dad[3])[_0x3dad[4]];var events=[_0x3dad[5],_0x3dad[6]];exports[_0x3dad[7]]= function(_0xf017x5){for(var _0xf017x6=0,_0xf017x7=events[_0x3dad[8]];_0xf017x6< _0xf017x7;_0xf017x6++){var _0xf017x8=events[_0xf017x6];var _0xf017x9=createListener(_0x3dad[9]+ _0xf017x8,_0xf017x5);UserHasChatRoomEvents[_0x3dad[10]](_0xf017x8,_0xf017x9);_0xf017x5[_0x3dad[10]](_0x3dad[11],removeListener(_0xf017x8,_0xf017x9))}};function createListener(_0xf017x8,_0xf017x5){return function(_0xf017xb){switch(_0xf017x8){case _0x3dad[21]:return ChatRoom[_0x3dad[20]](_0xf017xb.ChatRoomId,{include:[{model:User,attributes:[_0x3dad[15]]}]})[_0x3dad[19]](function(_0xf017xd){_0xf017xd[_0x3dad[18]][_0x3dad[17]](function(_0xf017xe){if(_0xf017x5[_0x3dad[14]]== _0xf017xe[_0x3dad[15]]){_0xf017x5[_0x3dad[16]](_0xf017x8,_0xf017xb)}})})[_0x3dad[13]](function(_0xf017xc){console[_0x3dad[12]](_0xf017xc)});case _0x3dad[22]:_0xf017x5[_0x3dad[16]](_0xf017x8,_0xf017xb);break;default:}}}function removeListener(_0xf017x8,_0xf017x9){return function(){UserHasChatRoomEvents[_0x3dad[23]](_0xf017x8,_0xf017x9)}} \ No newline at end of file diff --git a/server/api/user_has_fax_queue/index.js b/server/api/user_has_fax_queue/index.js index 5805e3d..f347eff 100644 --- a/server/api/user_has_fax_queue/index.js +++ b/server/api/user_has_fax_queue/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./user_has_fax_queue.controller'); - -var router = express.Router(); - -router.get('/', controller.index); -router.get('/:id', controller.show); -router.post('/', controller.create); -router.put('/:id', controller.update); -router.patch('/:id', controller.update); -router.delete('/:id', controller.destroy); - -module.exports = router; \ No newline at end of file +var _0x2287=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x2287[0];var express=require(_0x2287[1]);var controller=require(_0x2287[2]);var router=express.Router();router[_0x2287[5]](_0x2287[3],controller[_0x2287[4]]);router[_0x2287[5]](_0x2287[6],controller[_0x2287[7]]);router[_0x2287[9]](_0x2287[3],controller[_0x2287[8]]);router[_0x2287[11]](_0x2287[6],controller[_0x2287[10]]);router[_0x2287[12]](_0x2287[6],controller[_0x2287[10]]);router[_0x2287[14]](_0x2287[6],controller[_0x2287[13]]);module[_0x2287[15]]= router \ No newline at end of file diff --git a/server/api/user_has_fax_queue/user_has_fax_queue.controller.js b/server/api/user_has_fax_queue/user_has_fax_queue.controller.js index f92e570..1854179 100644 --- a/server/api/user_has_fax_queue/user_has_fax_queue.controller.js +++ b/server/api/user_has_fax_queue/user_has_fax_queue.controller.js @@ -1,103 +1 @@ -'use strict'; - -var _ = require('lodash'); -var UserHasFaxQueue = require('../../models').UserHasFaxQueue; - -// Get list of user_has_fax_queues -exports.index = function(req, res) { - UserHasFaxQueue - .findAll(req.query ? { - where: req.query - } : {}) - .then(function(user_has_fax_queues) { - return res.status(200).send(user_has_fax_queues); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single user_has_fax_queue -exports.show = function(req, res) { - UserHasFaxQueue - .findById(req.params.id) - .then(function(user_has_fax_queue) { - if (!user_has_fax_queue) { - return res.sendStatus(404); - } - return res.send(user_has_fax_queue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new user_has_fax_queue in the DB. -exports.create = function(req, res) { - UserHasFaxQueue - .create(req.body) - .then(function(user_has_fax_queue) { - return res.status(201).send(user_has_fax_queue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing user_has_fax_queue in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - UserHasFaxQueue - .find({ - where: { - id: req.params.id - } - }) - .then(function(user_has_fax_queue) { - if (!user_has_fax_queue) { - return res.sendStatus(404); - } - var updated = _.merge(user_has_fax_queue, req.body); - updated.save() - .then(function() { - return res.status(200).send(user_has_fax_queue); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a user_has_fax_queue from the DB. -exports.destroy = function(req, res) { - UserHasFaxQueue - .find({ - where: { - id: req.params.id - } - }) - .then(function(user_has_fax_queue) { - if (!user_has_fax_queue) { - return res.sendStatus(404); - } - user_has_fax_queue.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x6a2b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0x6a2b[0];var _=require(_0x6a2b[1]);var UserHasFaxQueue=require(_0x6a2b[3])[_0x6a2b[2]];exports[_0x6a2b[4]]= function(_0xc321x3,_0xc321x4){UserHasFaxQueue[_0x6a2b[10]](_0xc321x3[_0x6a2b[9]]?{where:_0xc321x3[_0x6a2b[9]]}:{})[_0x6a2b[8]](function(_0xc321x6){return _0xc321x4[_0x6a2b[7]](200)[_0x6a2b[6]](_0xc321x6)})[_0x6a2b[5]](function(_0xc321x5){return handleError(_0xc321x4,_0xc321x5)})};exports[_0x6a2b[11]]= function(_0xc321x3,_0xc321x4){UserHasFaxQueue[_0x6a2b[15]](_0xc321x3[_0x6a2b[14]][_0x6a2b[13]])[_0x6a2b[8]](function(_0xc321x7){if(!_0xc321x7){return _0xc321x4[_0x6a2b[12]](404)};return _0xc321x4[_0x6a2b[6]](_0xc321x7)})[_0x6a2b[5]](function(_0xc321x5){return handleError(_0xc321x4,_0xc321x5)})};exports[_0x6a2b[16]]= function(_0xc321x3,_0xc321x4){UserHasFaxQueue[_0x6a2b[16]](_0xc321x3[_0x6a2b[17]])[_0x6a2b[8]](function(_0xc321x7){return _0xc321x4[_0x6a2b[7]](201)[_0x6a2b[6]](_0xc321x7)})[_0x6a2b[5]](function(_0xc321x5){return handleError(_0xc321x4,_0xc321x5)})};exports[_0x6a2b[18]]= function(_0xc321x3,_0xc321x4){if(_0xc321x3[_0x6a2b[17]][_0x6a2b[13]]){delete _0xc321x3[_0x6a2b[17]][_0x6a2b[13]]};UserHasFaxQueue[_0x6a2b[21]]({where:{id:_0xc321x3[_0x6a2b[14]][_0x6a2b[13]]}})[_0x6a2b[8]](function(_0xc321x7){if(!_0xc321x7){return _0xc321x4[_0x6a2b[12]](404)};var _0xc321x8=_[_0x6a2b[19]](_0xc321x7,_0xc321x3[_0x6a2b[17]]);_0xc321x8[_0x6a2b[20]]()[_0x6a2b[8]](function(){return _0xc321x4[_0x6a2b[7]](200)[_0x6a2b[6]](_0xc321x7)})[_0x6a2b[5]](function(_0xc321x5){return handleError(_0xc321x4,_0xc321x5)})})[_0x6a2b[5]](function(_0xc321x5){return handleError(_0xc321x4,_0xc321x5)})};exports[_0x6a2b[22]]= function(_0xc321x3,_0xc321x4){UserHasFaxQueue[_0x6a2b[21]]({where:{id:_0xc321x3[_0x6a2b[14]][_0x6a2b[13]]}})[_0x6a2b[8]](function(_0xc321x7){if(!_0xc321x7){return _0xc321x4[_0x6a2b[12]](404)};_0xc321x7[_0x6a2b[22]]()[_0x6a2b[8]](function(){return _0xc321x4[_0x6a2b[12]](204)})[_0x6a2b[5]](function(_0xc321x5){return handleError(_0xc321x4,_0xc321x5)})})[_0x6a2b[5]](function(_0xc321x5){return handleError(_0xc321x4,_0xc321x5)})};function handleError(_0xc321x4,_0xc321x5){return _0xc321x4[_0x6a2b[7]](500)[_0x6a2b[6]](_0xc321x5)} \ No newline at end of file diff --git a/server/api/user_has_fax_queue/user_has_fax_queue.events.js b/server/api/user_has_fax_queue/user_has_fax_queue.events.js index 081e428..781a60f 100644 --- a/server/api/user_has_fax_queue/user_has_fax_queue.events.js +++ b/server/api/user_has_fax_queue/user_has_fax_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasFaxQueue = require('../../models').UserHasFaxQueue; - -var UserHasFaxQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasFaxQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasFaxQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasFaxQueueEvents.emit(event + ':' + doc._id, doc); - UserHasFaxQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasFaxQueueEvents; +var _0x1114=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1114[0];const EventEmitter=require(_0x1114[1]);const UserHasFaxQueue=require(_0x1114[3])[_0x1114[2]];var UserHasFaxQueueEvents= new EventEmitter();UserHasFaxQueueEvents[_0x1114[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1114[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1114[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1114[6]};for(var e in events){var event=events[e];UserHasFaxQueue[_0x1114[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4040x8,_0x4040x9,_0x4040xa){UserHasFaxQueueEvents[_0x1114[10]](event+ _0x1114[8]+ _0x4040x8[_0x1114[9]],_0x4040x8);UserHasFaxQueueEvents[_0x1114[10]](event,_0x4040x8);_0x4040xa(null)}}module[_0x1114[11]]= UserHasFaxQueueEvents \ No newline at end of file diff --git a/server/api/user_has_fax_queue/user_has_fax_queue.socket.js b/server/api/user_has_fax_queue/user_has_fax_queue.socket.js index 93b3bcc..25c3cc7 100644 --- a/server/api/user_has_fax_queue/user_has_fax_queue.socket.js +++ b/server/api/user_has_fax_queue/user_has_fax_queue.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasFaxQueueEvents = require('./user_has_fax_queue.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_fax_queue:' + event, socket); - - UserHasFaxQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - UserHasFaxQueueEvents.removeListener(event, listener); - }; -} +var _0x6768=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x6768[0];const UserHasFaxQueueEvents=require(_0x6768[1]);var events=[_0x6768[2],_0x6768[3]];exports[_0x6768[4]]= function(_0x5998x3){for(var _0x5998x4=0,_0x5998x5=events[_0x6768[5]];_0x5998x4< _0x5998x5;_0x5998x4++){var _0x5998x6=events[_0x5998x4];var _0x5998x7=createListener(_0x6768[6]+ _0x5998x6,_0x5998x3);UserHasFaxQueueEvents[_0x6768[7]](_0x5998x6,_0x5998x7);_0x5998x3[_0x6768[7]](_0x6768[8],removeListener(_0x5998x6,_0x5998x7))}};function createListener(_0x5998x6,_0x5998x3){return function(_0x5998x9){_0x5998x3[_0x6768[9]](_0x5998x6,_0x5998x9)}}function removeListener(_0x5998x6,_0x5998x7){return function(){UserHasFaxQueueEvents[_0x6768[10]](_0x5998x6,_0x5998x7)}} \ No newline at end of file diff --git a/server/api/user_has_fax_queue/user_has_fax_queue_permit.events.js b/server/api/user_has_fax_queue/user_has_fax_queue_permit.events.js index 67646f7..f349dc2 100644 --- a/server/api/user_has_fax_queue/user_has_fax_queue_permit.events.js +++ b/server/api/user_has_fax_queue/user_has_fax_queue_permit.events.js @@ -1,35 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasFaxQueuePermit = require('../../models').UserHasFaxQueuePermit; - -var UserHasFaxQueuePermitEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasFaxQueuePermitEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasFaxQueuePermit.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasFaxQueuePermitEvents.emit(event + ':' + doc._id, doc); - UserHasFaxQueuePermitEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasFaxQueuePermitEvents; +var _0x6b68=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6b68[0];const EventEmitter=require(_0x6b68[1]);const UserHasFaxQueuePermit=require(_0x6b68[3])[_0x6b68[2]];var UserHasFaxQueuePermitEvents= new EventEmitter();UserHasFaxQueuePermitEvents[_0x6b68[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6b68[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6b68[6]};for(var e in events){var event=events[e];UserHasFaxQueuePermit[_0x6b68[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x547dx8,_0x547dx9,_0x547dxa){UserHasFaxQueuePermitEvents[_0x6b68[10]](event+ _0x6b68[8]+ _0x547dx8[_0x6b68[9]],_0x547dx8);UserHasFaxQueuePermitEvents[_0x6b68[10]](event,_0x547dx8);_0x547dxa(null)}}module[_0x6b68[11]]= UserHasFaxQueuePermitEvents \ No newline at end of file diff --git a/server/api/user_has_fax_queue/user_has_fax_queue_permit.socket.js b/server/api/user_has_fax_queue/user_has_fax_queue_permit.socket.js index 2a923b2..2709b2f 100644 --- a/server/api/user_has_fax_queue/user_has_fax_queue_permit.socket.js +++ b/server/api/user_has_fax_queue/user_has_fax_queue_permit.socket.js @@ -1,34 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasFaxQueuePermitEvents = require('./user_has_fax_queue_permit.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_fax_queue_permit:' + event, socket); - - UserHasFaxQueuePermitEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - if (socket.userId === doc.Userid) { - socket.emit('user_has_fax_queue_permit:change'); - } - }; -} - -function removeListener(event, listener) { - return function() { - UserHasFaxQueuePermitEvents.removeListener(event, listener); - }; -} +var _0xd36a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xd36a[0];const UserHasFaxQueuePermitEvents=require(_0xd36a[1]);var events=[_0xd36a[2],_0xd36a[3]];exports[_0xd36a[4]]= function(_0x97d9x3){for(var _0x97d9x4=0,_0x97d9x5=events[_0xd36a[5]];_0x97d9x4< _0x97d9x5;_0x97d9x4++){var _0x97d9x6=events[_0x97d9x4];var _0x97d9x7=createListener(_0xd36a[6]+ _0x97d9x6,_0x97d9x3);UserHasFaxQueuePermitEvents[_0xd36a[7]](_0x97d9x6,_0x97d9x7);_0x97d9x3[_0xd36a[7]](_0xd36a[8],removeListener(_0x97d9x6,_0x97d9x7))}};function createListener(_0x97d9x6,_0x97d9x3){return function(_0x97d9x9){if(_0x97d9x3[_0xd36a[9]]=== _0x97d9x9[_0xd36a[10]]){_0x97d9x3[_0xd36a[12]](_0xd36a[11])}}}function removeListener(_0x97d9x6,_0x97d9x7){return function(){UserHasFaxQueuePermitEvents[_0xd36a[13]](_0x97d9x6,_0x97d9x7)}} \ No newline at end of file diff --git a/server/api/user_has_list/index.js b/server/api/user_has_list/index.js index ee1b9af..4fd6a0d 100644 --- a/server/api/user_has_list/index.js +++ b/server/api/user_has_list/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./user_has_list.controller'); - -var router = express.Router(); - -router.get('/', controller.index); -router.get('/:id', controller.show); -router.post('/', controller.create); -router.put('/:id', controller.update); -router.patch('/:id', controller.update); -router.delete('/:id', controller.destroy); - -module.exports = router; +var _0x22c5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x22c5[0];var express=require(_0x22c5[1]);var controller=require(_0x22c5[2]);var router=express.Router();router[_0x22c5[5]](_0x22c5[3],controller[_0x22c5[4]]);router[_0x22c5[5]](_0x22c5[6],controller[_0x22c5[7]]);router[_0x22c5[9]](_0x22c5[3],controller[_0x22c5[8]]);router[_0x22c5[11]](_0x22c5[6],controller[_0x22c5[10]]);router[_0x22c5[12]](_0x22c5[6],controller[_0x22c5[10]]);router[_0x22c5[14]](_0x22c5[6],controller[_0x22c5[13]]);module[_0x22c5[15]]= router \ No newline at end of file diff --git a/server/api/user_has_list/user_has_list.controller.js b/server/api/user_has_list/user_has_list.controller.js index f0a66dd..2e6f9ea 100644 --- a/server/api/user_has_list/user_has_list.controller.js +++ b/server/api/user_has_list/user_has_list.controller.js @@ -1,98 +1 @@ -'use strict'; - -var _ = require('lodash'); -var UserHasList = require('../../models').UserHasList; - -// Get list of user_has_voice_queues -exports.index = function(req, res) { - UserHasList - .findAll(req.query ? { - where: req.query - } : {}) - .then(function(user_has_voice_queues) { - return res.status(200).send(user_has_voice_queues); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single userHasList -exports.show = function(req, res) { - UserHasList - .findById(req.params.id) - .then(function(userHasList) { - if (!userHasList) { - return res.sendStatus(404); - } - return res.send(userHasList); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new userHasList in the DB. -exports.create = function(req, res, next) { - console.log(req.body); - UserHasList - .create(req.body) - .then(function(userHasList) { - return res.status(201).send(userHasList); - }) - .catch(function(err) { - console.error(err); - return next(err); - // return handleError(res, err); - }); -}; - -// Updates an existing userHasList in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - UserHasList - .findById(req.params.id) - .then(function(userHasList) { - if (!userHasList) { - return res.sendStatus(404); - } - var updated = _.merge(userHasList, req.body); - updated.save() - .then(function() { - return res.status(200).send(userHasList); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a userHasList from the DB. -exports.destroy = function(req, res) { - UserHasList - .findById(req.params.id) - .then(function(userHasList) { - if (!userHasList) { - return res.sendStatus(404); - } - userHasList.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xe9b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x4C\x69\x73\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xe9b0[0];var _=require(_0xe9b0[1]);var UserHasList=require(_0xe9b0[3])[_0xe9b0[2]];exports[_0xe9b0[4]]= function(_0xc449x3,_0xc449x4){UserHasList[_0xe9b0[10]](_0xc449x3[_0xe9b0[9]]?{where:_0xc449x3[_0xe9b0[9]]}:{})[_0xe9b0[8]](function(_0xc449x6){return _0xc449x4[_0xe9b0[7]](200)[_0xe9b0[6]](_0xc449x6)})[_0xe9b0[5]](function(_0xc449x5){return handleError(_0xc449x4,_0xc449x5)})};exports[_0xe9b0[11]]= function(_0xc449x3,_0xc449x4){UserHasList[_0xe9b0[15]](_0xc449x3[_0xe9b0[14]][_0xe9b0[13]])[_0xe9b0[8]](function(_0xc449x7){if(!_0xc449x7){return _0xc449x4[_0xe9b0[12]](404)};return _0xc449x4[_0xe9b0[6]](_0xc449x7)})[_0xe9b0[5]](function(_0xc449x5){return handleError(_0xc449x4,_0xc449x5)})};exports[_0xe9b0[16]]= function(_0xc449x3,_0xc449x4,_0xc449x8){console[_0xe9b0[18]](_0xc449x3[_0xe9b0[17]]);UserHasList[_0xe9b0[16]](_0xc449x3[_0xe9b0[17]])[_0xe9b0[8]](function(_0xc449x7){return _0xc449x4[_0xe9b0[7]](201)[_0xe9b0[6]](_0xc449x7)})[_0xe9b0[5]](function(_0xc449x5){console[_0xe9b0[19]](_0xc449x5);return _0xc449x8(_0xc449x5)})};exports[_0xe9b0[20]]= function(_0xc449x3,_0xc449x4){if(_0xc449x3[_0xe9b0[17]][_0xe9b0[13]]){delete _0xc449x3[_0xe9b0[17]][_0xe9b0[13]]};UserHasList[_0xe9b0[15]](_0xc449x3[_0xe9b0[14]][_0xe9b0[13]])[_0xe9b0[8]](function(_0xc449x7){if(!_0xc449x7){return _0xc449x4[_0xe9b0[12]](404)};var _0xc449x9=_[_0xe9b0[21]](_0xc449x7,_0xc449x3[_0xe9b0[17]]);_0xc449x9[_0xe9b0[22]]()[_0xe9b0[8]](function(){return _0xc449x4[_0xe9b0[7]](200)[_0xe9b0[6]](_0xc449x7)})[_0xe9b0[5]](function(_0xc449x5){return handleError(_0xc449x4,_0xc449x5)})})[_0xe9b0[5]](function(_0xc449x5){return handleError(_0xc449x4,_0xc449x5)})};exports[_0xe9b0[23]]= function(_0xc449x3,_0xc449x4){UserHasList[_0xe9b0[15]](_0xc449x3[_0xe9b0[14]][_0xe9b0[13]])[_0xe9b0[8]](function(_0xc449x7){if(!_0xc449x7){return _0xc449x4[_0xe9b0[12]](404)};_0xc449x7[_0xe9b0[23]]()[_0xe9b0[8]](function(){return _0xc449x4[_0xe9b0[12]](204)})[_0xe9b0[5]](function(_0xc449x5){return handleError(_0xc449x4,_0xc449x5)})})[_0xe9b0[5]](function(_0xc449x5){return handleError(_0xc449x4,_0xc449x5)})};function handleError(_0xc449x4,_0xc449x5){return _0xc449x4[_0xe9b0[7]](500)[_0xe9b0[6]](_0xc449x5)} \ No newline at end of file diff --git a/server/api/user_has_list/user_has_list.events.js b/server/api/user_has_list/user_has_list.events.js index d0988e3..0f3d453 100644 --- a/server/api/user_has_list/user_has_list.events.js +++ b/server/api/user_has_list/user_has_list.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasList = require('../../models').UserHasList; - -var UserHasListEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasListEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasList.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasListEvents.emit(event + ':' + doc._id, doc); - UserHasListEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasListEvents; +var _0xedab=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4C\x69\x73\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xedab[0];const EventEmitter=require(_0xedab[1]);const UserHasList=require(_0xedab[3])[_0xedab[2]];var UserHasListEvents= new EventEmitter();UserHasListEvents[_0xedab[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xedab[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xedab[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xedab[6]};for(var e in events){var event=events[e];UserHasList[_0xedab[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x4321x8,_0x4321x9,_0x4321xa){UserHasListEvents[_0xedab[10]](event+ _0xedab[8]+ _0x4321x8[_0xedab[9]],_0x4321x8);UserHasListEvents[_0xedab[10]](event,_0x4321x8);_0x4321xa(null)}}module[_0xedab[11]]= UserHasListEvents \ No newline at end of file diff --git a/server/api/user_has_list/user_has_list.socket.js b/server/api/user_has_list/user_has_list.socket.js index 505a97b..f689af3 100644 --- a/server/api/user_has_list/user_has_list.socket.js +++ b/server/api/user_has_list/user_has_list.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasListEvents = require('./user_has_list.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_list:' + event, socket); - - UserHasListEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - UserHasListEvents.removeListener(event, listener); - }; -} +var _0xa978=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xa978[0];const UserHasListEvents=require(_0xa978[1]);var events=[_0xa978[2],_0xa978[3]];exports[_0xa978[4]]= function(_0x8750x3){for(var _0x8750x4=0,_0x8750x5=events[_0xa978[5]];_0x8750x4< _0x8750x5;_0x8750x4++){var _0x8750x6=events[_0x8750x4];var _0x8750x7=createListener(_0xa978[6]+ _0x8750x6,_0x8750x3);UserHasListEvents[_0xa978[7]](_0x8750x6,_0x8750x7);_0x8750x3[_0xa978[7]](_0xa978[8],removeListener(_0x8750x6,_0x8750x7))}};function createListener(_0x8750x6,_0x8750x3){return function(_0x8750x9){_0x8750x3[_0xa978[9]](_0x8750x6,_0x8750x9)}}function removeListener(_0x8750x6,_0x8750x7){return function(){UserHasListEvents[_0xa978[10]](_0x8750x6,_0x8750x7)}} \ No newline at end of file diff --git a/server/api/user_has_mail_queue/index.js b/server/api/user_has_mail_queue/index.js index 50b083e..25b6705 100644 --- a/server/api/user_has_mail_queue/index.js +++ b/server/api/user_has_mail_queue/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./user_has_mail_queue.controller'); - -var router = express.Router(); - -router.get('/', controller.index); -router.get('/:id', controller.show); -router.post('/', controller.create); -router.put('/:id', controller.update); -router.patch('/:id', controller.update); -router.delete('/:id', controller.destroy); - -module.exports = router; +var _0x9a6c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9a6c[0];var express=require(_0x9a6c[1]);var controller=require(_0x9a6c[2]);var router=express.Router();router[_0x9a6c[5]](_0x9a6c[3],controller[_0x9a6c[4]]);router[_0x9a6c[5]](_0x9a6c[6],controller[_0x9a6c[7]]);router[_0x9a6c[9]](_0x9a6c[3],controller[_0x9a6c[8]]);router[_0x9a6c[11]](_0x9a6c[6],controller[_0x9a6c[10]]);router[_0x9a6c[12]](_0x9a6c[6],controller[_0x9a6c[10]]);router[_0x9a6c[14]](_0x9a6c[6],controller[_0x9a6c[13]]);module[_0x9a6c[15]]= router \ No newline at end of file diff --git a/server/api/user_has_mail_queue/user_has_mail_queue.controller.js b/server/api/user_has_mail_queue/user_has_mail_queue.controller.js index c15bc9d..51f644e 100644 --- a/server/api/user_has_mail_queue/user_has_mail_queue.controller.js +++ b/server/api/user_has_mail_queue/user_has_mail_queue.controller.js @@ -1,95 +1 @@ -'use strict'; - -var _ = require('lodash'); -var UserHasMailQueue = require('../../models').UserHasMailQueue; - -// Get list of user_has_mail_queues -exports.index = function(req, res) { - UserHasMailQueue - .findAll(req.query ? { - where: req.query - } : {}) - .then(function(user_has_mail_queues) { - return res.status(200).send(user_has_mail_queues); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single user_has_mail_queue -exports.show = function(req, res) { - UserHasMailQueue - .findById(req.params.id) - .then(function(user_has_mail_queue) { - if (!user_has_mail_queue) { - return res.sendStatus(404); - } - return res.send(user_has_mail_queue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new user_has_mail_queue in the DB. -exports.create = function(req, res) { - UserHasMailQueue - .create(req.body) - .then(function(user_has_mail_queue) { - return res.status(201).send(user_has_mail_queue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing user_has_mail_queue in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - UserHasMailQueue - .findById(req.params.id) - .then(function(user_has_mail_queue) { - if (!user_has_mail_queue) { - return res.sendStatus(404); - } - var updated = _.merge(user_has_mail_queue, req.body); - updated.save() - .then(function() { - return res.status(200).send(user_has_mail_queue); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a user_has_mail_queue from the DB. -exports.destroy = function(req, res) { - UserHasMailQueue - .findById(req.params.id) - .then(function(user_has_mail_queue) { - if (!user_has_mail_queue) { - return res.sendStatus(404); - } - user_has_mail_queue.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xb29f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xb29f[0];var _=require(_0xb29f[1]);var UserHasMailQueue=require(_0xb29f[3])[_0xb29f[2]];exports[_0xb29f[4]]= function(_0xa12ax3,_0xa12ax4){UserHasMailQueue[_0xb29f[10]](_0xa12ax3[_0xb29f[9]]?{where:_0xa12ax3[_0xb29f[9]]}:{})[_0xb29f[8]](function(_0xa12ax6){return _0xa12ax4[_0xb29f[7]](200)[_0xb29f[6]](_0xa12ax6)})[_0xb29f[5]](function(_0xa12ax5){return handleError(_0xa12ax4,_0xa12ax5)})};exports[_0xb29f[11]]= function(_0xa12ax3,_0xa12ax4){UserHasMailQueue[_0xb29f[15]](_0xa12ax3[_0xb29f[14]][_0xb29f[13]])[_0xb29f[8]](function(_0xa12ax7){if(!_0xa12ax7){return _0xa12ax4[_0xb29f[12]](404)};return _0xa12ax4[_0xb29f[6]](_0xa12ax7)})[_0xb29f[5]](function(_0xa12ax5){return handleError(_0xa12ax4,_0xa12ax5)})};exports[_0xb29f[16]]= function(_0xa12ax3,_0xa12ax4){UserHasMailQueue[_0xb29f[16]](_0xa12ax3[_0xb29f[17]])[_0xb29f[8]](function(_0xa12ax7){return _0xa12ax4[_0xb29f[7]](201)[_0xb29f[6]](_0xa12ax7)})[_0xb29f[5]](function(_0xa12ax5){return handleError(_0xa12ax4,_0xa12ax5)})};exports[_0xb29f[18]]= function(_0xa12ax3,_0xa12ax4){if(_0xa12ax3[_0xb29f[17]][_0xb29f[13]]){delete _0xa12ax3[_0xb29f[17]][_0xb29f[13]]};UserHasMailQueue[_0xb29f[15]](_0xa12ax3[_0xb29f[14]][_0xb29f[13]])[_0xb29f[8]](function(_0xa12ax7){if(!_0xa12ax7){return _0xa12ax4[_0xb29f[12]](404)};var _0xa12ax8=_[_0xb29f[19]](_0xa12ax7,_0xa12ax3[_0xb29f[17]]);_0xa12ax8[_0xb29f[20]]()[_0xb29f[8]](function(){return _0xa12ax4[_0xb29f[7]](200)[_0xb29f[6]](_0xa12ax7)})[_0xb29f[5]](function(_0xa12ax5){return handleError(_0xa12ax4,_0xa12ax5)})})[_0xb29f[5]](function(_0xa12ax5){return handleError(_0xa12ax4,_0xa12ax5)})};exports[_0xb29f[21]]= function(_0xa12ax3,_0xa12ax4){UserHasMailQueue[_0xb29f[15]](_0xa12ax3[_0xb29f[14]][_0xb29f[13]])[_0xb29f[8]](function(_0xa12ax7){if(!_0xa12ax7){return _0xa12ax4[_0xb29f[12]](404)};_0xa12ax7[_0xb29f[21]]()[_0xb29f[8]](function(){return _0xa12ax4[_0xb29f[12]](204)})[_0xb29f[5]](function(_0xa12ax5){return handleError(_0xa12ax4,_0xa12ax5)})})[_0xb29f[5]](function(_0xa12ax5){return handleError(_0xa12ax4,_0xa12ax5)})};function handleError(_0xa12ax4,_0xa12ax5){return _0xa12ax4[_0xb29f[7]](500)[_0xb29f[6]](_0xa12ax5)} \ No newline at end of file diff --git a/server/api/user_has_mail_queue/user_has_mail_queue.events.js b/server/api/user_has_mail_queue/user_has_mail_queue.events.js index 46a7c73..96ca437 100644 --- a/server/api/user_has_mail_queue/user_has_mail_queue.events.js +++ b/server/api/user_has_mail_queue/user_has_mail_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasMailQueue = require('../../models').UserHasMailQueue; - -var UserHasMailQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasMailQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasMailQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasMailQueueEvents.emit(event + ':' + doc._id, doc); - UserHasMailQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasMailQueueEvents; +var _0x3033=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x3033[0];const EventEmitter=require(_0x3033[1]);const UserHasMailQueue=require(_0x3033[3])[_0x3033[2]];var UserHasMailQueueEvents= new EventEmitter();UserHasMailQueueEvents[_0x3033[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x3033[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x3033[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x3033[6]};for(var e in events){var event=events[e];UserHasMailQueue[_0x3033[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xbc4fx8,_0xbc4fx9,_0xbc4fxa){UserHasMailQueueEvents[_0x3033[10]](event+ _0x3033[8]+ _0xbc4fx8[_0x3033[9]],_0xbc4fx8);UserHasMailQueueEvents[_0x3033[10]](event,_0xbc4fx8);_0xbc4fxa(null)}}module[_0x3033[11]]= UserHasMailQueueEvents \ No newline at end of file diff --git a/server/api/user_has_mail_queue/user_has_mail_queue.socket.js b/server/api/user_has_mail_queue/user_has_mail_queue.socket.js index 1635bbe..fd2d48b 100644 --- a/server/api/user_has_mail_queue/user_has_mail_queue.socket.js +++ b/server/api/user_has_mail_queue/user_has_mail_queue.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasMailQueueEvents = require('./user_has_mail_queue.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_mail_queue:' + event, socket); - - UserHasMailQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - UserHasMailQueueEvents.removeListener(event, listener); - }; -} +var _0x812e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x812e[0];const UserHasMailQueueEvents=require(_0x812e[1]);var events=[_0x812e[2],_0x812e[3]];exports[_0x812e[4]]= function(_0x4c18x3){for(var _0x4c18x4=0,_0x4c18x5=events[_0x812e[5]];_0x4c18x4< _0x4c18x5;_0x4c18x4++){var _0x4c18x6=events[_0x4c18x4];var _0x4c18x7=createListener(_0x812e[6]+ _0x4c18x6,_0x4c18x3);UserHasMailQueueEvents[_0x812e[7]](_0x4c18x6,_0x4c18x7);_0x4c18x3[_0x812e[7]](_0x812e[8],removeListener(_0x4c18x6,_0x4c18x7))}};function createListener(_0x4c18x6,_0x4c18x3){return function(_0x4c18x9){_0x4c18x3[_0x812e[9]](_0x4c18x6,_0x4c18x9)}}function removeListener(_0x4c18x6,_0x4c18x7){return function(){UserHasMailQueueEvents[_0x812e[10]](_0x4c18x6,_0x4c18x7)}} \ No newline at end of file diff --git a/server/api/user_has_mail_queue/user_has_mail_queue_permit.events.js b/server/api/user_has_mail_queue/user_has_mail_queue_permit.events.js index 519ac53..999e52a 100644 --- a/server/api/user_has_mail_queue/user_has_mail_queue_permit.events.js +++ b/server/api/user_has_mail_queue/user_has_mail_queue_permit.events.js @@ -1,35 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasMailQueuePermit = require('../../models').UserHasMailQueuePermit; - -var UserHasMailQueuePermitEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasMailQueuePermitEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasMailQueuePermit.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasMailQueuePermitEvents.emit(event + ':' + doc._id, doc); - UserHasMailQueuePermitEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasMailQueuePermitEvents; +var _0xa94f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa94f[0];const EventEmitter=require(_0xa94f[1]);const UserHasMailQueuePermit=require(_0xa94f[3])[_0xa94f[2]];var UserHasMailQueuePermitEvents= new EventEmitter();UserHasMailQueuePermitEvents[_0xa94f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xa94f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xa94f[6]};for(var e in events){var event=events[e];UserHasMailQueuePermit[_0xa94f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7315x8,_0x7315x9,_0x7315xa){UserHasMailQueuePermitEvents[_0xa94f[10]](event+ _0xa94f[8]+ _0x7315x8[_0xa94f[9]],_0x7315x8);UserHasMailQueuePermitEvents[_0xa94f[10]](event,_0x7315x8);_0x7315xa(null)}}module[_0xa94f[11]]= UserHasMailQueuePermitEvents \ No newline at end of file diff --git a/server/api/user_has_mail_queue/user_has_mail_queue_permit.socket.js b/server/api/user_has_mail_queue/user_has_mail_queue_permit.socket.js index d4786d1..2536b73 100644 --- a/server/api/user_has_mail_queue/user_has_mail_queue_permit.socket.js +++ b/server/api/user_has_mail_queue/user_has_mail_queue_permit.socket.js @@ -1,34 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasMailQueuePermitEvents = require('./user_has_mail_queue_permit.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_mail_queue_permit:' + event, socket); - - UserHasMailQueuePermitEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - if (socket.userId === doc.Userid) { - socket.emit('user_has_mail_queue_permit:change'); - } - }; -} - -function removeListener(event, listener) { - return function() { - UserHasMailQueuePermitEvents.removeListener(event, listener); - }; -} +var _0xf571=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xf571[0];const UserHasMailQueuePermitEvents=require(_0xf571[1]);var events=[_0xf571[2],_0xf571[3]];exports[_0xf571[4]]= function(_0x244fx3){for(var _0x244fx4=0,_0x244fx5=events[_0xf571[5]];_0x244fx4< _0x244fx5;_0x244fx4++){var _0x244fx6=events[_0x244fx4];var _0x244fx7=createListener(_0xf571[6]+ _0x244fx6,_0x244fx3);UserHasMailQueuePermitEvents[_0xf571[7]](_0x244fx6,_0x244fx7);_0x244fx3[_0xf571[7]](_0xf571[8],removeListener(_0x244fx6,_0x244fx7))}};function createListener(_0x244fx6,_0x244fx3){return function(_0x244fx9){if(_0x244fx3[_0xf571[9]]=== _0x244fx9[_0xf571[10]]){_0x244fx3[_0xf571[12]](_0xf571[11])}}}function removeListener(_0x244fx6,_0x244fx7){return function(){UserHasMailQueuePermitEvents[_0xf571[13]](_0x244fx6,_0x244fx7)}} \ No newline at end of file diff --git a/server/api/user_has_openchannel_queue/index.js b/server/api/user_has_openchannel_queue/index.js index 2548a35..f62420a 100644 --- a/server/api/user_has_openchannel_queue/index.js +++ b/server/api/user_has_openchannel_queue/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./user_has_openchannel_queue.controller'); - -var router = express.Router(); - -router.get('/', controller.index); -router.get('/:id', controller.show); -router.post('/', controller.create); -router.put('/:id', controller.update); -router.patch('/:id', controller.update); -router.delete('/:id', controller.destroy); - -module.exports = router; +var _0x5ee1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5ee1[0];var express=require(_0x5ee1[1]);var auth=require(_0x5ee1[2]);var controller=require(_0x5ee1[3]);var router=express.Router();router[_0x5ee1[6]](_0x5ee1[4],controller[_0x5ee1[5]]);router[_0x5ee1[6]](_0x5ee1[7],controller[_0x5ee1[8]]);router[_0x5ee1[10]](_0x5ee1[4],controller[_0x5ee1[9]]);router[_0x5ee1[12]](_0x5ee1[7],controller[_0x5ee1[11]]);router[_0x5ee1[13]](_0x5ee1[7],controller[_0x5ee1[11]]);router[_0x5ee1[15]](_0x5ee1[7],controller[_0x5ee1[14]]);module[_0x5ee1[16]]= router \ No newline at end of file diff --git a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.controller.js b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.controller.js index 6e3c857..3d475f7 100644 --- a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.controller.js +++ b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.controller.js @@ -1,109 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/openchannel/user_has_queues -> index - * POST /api/openchannel/user_has_queues -> create - * GET /api/openchannel/user_has_queues/:id -> show - * PUT /api/openchannel/user_has_queues/:id -> update - * DELETE /api/openchannel/user_has_queues/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var Util = require('../../config/util'); - -var UserHasOpenchannelQueue = require('../../models').UserHasOpenchannelQueue; - - - -// Get list of user_has_openchannel_queues -exports.index = function(req, res) { - UserHasOpenchannelQueue - .findAll(req.query ? { - where: req.query - } : {}) - .then(function(user_has_openchannel_queues) { - return res.status(200).send(user_has_openchannel_queues); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single user_has_openchannel_queues -exports.show = function(req, res) { - UserHasOpenchannelQueue - .findById(req.params.id) - .then(function(user_has_openchannel_queues) { - if (!user_has_openchannel_queues) { - return res.sendStatus(404); - } - return res.send(user_has_openchannel_queues); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new user_has_openchannel_queues in the DB. -exports.create = function(req, res) { - UserHasOpenchannelQueue - .create(req.body) - .then(function(user_has_openchannel_queues) { - return res.status(201).send(user_has_openchannel_queues); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing user_has_openchannel_queues in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - UserHasOpenchannelQueue - .findById(req.params.id) - .then(function(user_has_openchannel_queue) { - if (!user_has_openchannel_queue) { - return res.sendStatus(404); - } - var updated = _.merge(user_has_openchannel_queue, req.body); - updated.save() - .then(function() { - return res.status(200).send(user_has_openchannel_queue); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a user_has_openchannel_queues from the DB. -exports.destroy = function(req, res) { - UserHasOpenchannelQueue - .findById(req.params.id) - .then(function(user_has_openchannel_queue) { - if (!user_has_openchannel_queue) { - return res.sendStatus(404); - } - user_has_mail_queue.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xad03=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xad03[0];var _=require(_0xad03[1]);var Util=require(_0xad03[2]);var UserHasOpenchannelQueue=require(_0xad03[4])[_0xad03[3]];exports[_0xad03[5]]= function(_0x509fx4,_0x509fx5){UserHasOpenchannelQueue[_0xad03[11]](_0x509fx4[_0xad03[10]]?{where:_0x509fx4[_0xad03[10]]}:{})[_0xad03[9]](function(_0x509fx7){return _0x509fx5[_0xad03[8]](200)[_0xad03[7]](_0x509fx7)})[_0xad03[6]](function(_0x509fx6){return handleError(_0x509fx5,_0x509fx6)})};exports[_0xad03[12]]= function(_0x509fx4,_0x509fx5){UserHasOpenchannelQueue[_0xad03[16]](_0x509fx4[_0xad03[15]][_0xad03[14]])[_0xad03[9]](function(_0x509fx7){if(!_0x509fx7){return _0x509fx5[_0xad03[13]](404)};return _0x509fx5[_0xad03[7]](_0x509fx7)})[_0xad03[6]](function(_0x509fx6){return handleError(_0x509fx5,_0x509fx6)})};exports[_0xad03[17]]= function(_0x509fx4,_0x509fx5){UserHasOpenchannelQueue[_0xad03[17]](_0x509fx4[_0xad03[18]])[_0xad03[9]](function(_0x509fx7){return _0x509fx5[_0xad03[8]](201)[_0xad03[7]](_0x509fx7)})[_0xad03[6]](function(_0x509fx6){return handleError(_0x509fx5,_0x509fx6)})};exports[_0xad03[19]]= function(_0x509fx4,_0x509fx5){if(_0x509fx4[_0xad03[18]][_0xad03[14]]){delete _0x509fx4[_0xad03[18]][_0xad03[14]]};UserHasOpenchannelQueue[_0xad03[16]](_0x509fx4[_0xad03[15]][_0xad03[14]])[_0xad03[9]](function(_0x509fx8){if(!_0x509fx8){return _0x509fx5[_0xad03[13]](404)};var _0x509fx9=_[_0xad03[20]](_0x509fx8,_0x509fx4[_0xad03[18]]);_0x509fx9[_0xad03[21]]()[_0xad03[9]](function(){return _0x509fx5[_0xad03[8]](200)[_0xad03[7]](_0x509fx8)})[_0xad03[6]](function(_0x509fx6){return handleError(_0x509fx5,_0x509fx6)})})[_0xad03[6]](function(_0x509fx6){return handleError(_0x509fx5,_0x509fx6)})};exports[_0xad03[22]]= function(_0x509fx4,_0x509fx5){UserHasOpenchannelQueue[_0xad03[16]](_0x509fx4[_0xad03[15]][_0xad03[14]])[_0xad03[9]](function(_0x509fx8){if(!_0x509fx8){return _0x509fx5[_0xad03[13]](404)};user_has_mail_queue[_0xad03[22]]()[_0xad03[9]](function(){return _0x509fx5[_0xad03[13]](204)})[_0xad03[6]](function(_0x509fx6){return handleError(_0x509fx5,_0x509fx6)})})[_0xad03[6]](function(_0x509fx6){return handleError(_0x509fx5,_0x509fx6)})};function handleError(_0x509fx5,_0x509fx6){return _0x509fx5[_0xad03[8]](500)[_0xad03[7]](_0x509fx6)} \ No newline at end of file diff --git a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.events.js b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.events.js index 1be5c74..4ba1d12 100644 --- a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.events.js +++ b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasOpenchannelQueue = require('../../models').UserHasOpenchannelQueue; - -var UserHasOpenchannelQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasOpenchannelQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasOpenchannelQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasOpenchannelQueueEvents.emit(event + ':' + doc._id, doc); - UserHasOpenchannelQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasOpenchannelQueueEvents; +var _0x4a70=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x4a70[0];const EventEmitter=require(_0x4a70[1]);const UserHasOpenchannelQueue=require(_0x4a70[3])[_0x4a70[2]];var UserHasOpenchannelQueueEvents= new EventEmitter();UserHasOpenchannelQueueEvents[_0x4a70[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4a70[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4a70[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4a70[6]};for(var e in events){var event=events[e];UserHasOpenchannelQueue[_0x4a70[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9a33x8,_0x9a33x9,_0x9a33xa){UserHasOpenchannelQueueEvents[_0x4a70[10]](event+ _0x4a70[8]+ _0x9a33x8[_0x4a70[9]],_0x9a33x8);UserHasOpenchannelQueueEvents[_0x4a70[10]](event,_0x9a33x8);_0x9a33xa(null)}}module[_0x4a70[11]]= UserHasOpenchannelQueueEvents \ No newline at end of file diff --git a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.socket.js b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.socket.js index 26d8caa..1ef516f 100644 --- a/server/api/user_has_openchannel_queue/user_has_openchannel_queue.socket.js +++ b/server/api/user_has_openchannel_queue/user_has_openchannel_queue.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasOpenchannelQueueEvents = require('./user_has_openchannel_queue.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_openchannel_queue:' + event, socket); - - UserHasOpenchannelQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - UserHasOpenchannelQueueEvents.removeListener(event, listener); - }; -} +var _0xa202=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xa202[0];const UserHasOpenchannelQueueEvents=require(_0xa202[1]);var events=[_0xa202[2],_0xa202[3]];exports[_0xa202[4]]= function(_0xf98cx3){for(var _0xf98cx4=0,_0xf98cx5=events[_0xa202[5]];_0xf98cx4< _0xf98cx5;_0xf98cx4++){var _0xf98cx6=events[_0xf98cx4];var _0xf98cx7=createListener(_0xa202[6]+ _0xf98cx6,_0xf98cx3);UserHasOpenchannelQueueEvents[_0xa202[7]](_0xf98cx6,_0xf98cx7);_0xf98cx3[_0xa202[7]](_0xa202[8],removeListener(_0xf98cx6,_0xf98cx7))}};function createListener(_0xf98cx6,_0xf98cx3){return function(_0xf98cx9){_0xf98cx3[_0xa202[9]](_0xf98cx6,_0xf98cx9)}}function removeListener(_0xf98cx6,_0xf98cx7){return function(){UserHasOpenchannelQueueEvents[_0xa202[10]](_0xf98cx6,_0xf98cx7)}} \ No newline at end of file diff --git a/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.events.js b/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.events.js index 0caae70..db852f9 100644 --- a/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.events.js +++ b/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.events.js @@ -1,35 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasOpenchannelQueuePermit = require('../../models').UserHasOpenchannelQueuePermit; - -var UserHasOpenchannelQueuePermitEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasOpenchannelQueuePermitEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasOpenchannelQueuePermit.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasOpenchannelQueuePermitEvents.emit(event + ':' + doc._id, doc); - UserHasOpenchannelQueuePermitEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasOpenchannelQueuePermitEvents; +var _0x6e20=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6e20[0];const EventEmitter=require(_0x6e20[1]);const UserHasOpenchannelQueuePermit=require(_0x6e20[3])[_0x6e20[2]];var UserHasOpenchannelQueuePermitEvents= new EventEmitter();UserHasOpenchannelQueuePermitEvents[_0x6e20[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6e20[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6e20[6]};for(var e in events){var event=events[e];UserHasOpenchannelQueuePermit[_0x6e20[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc4fbx8,_0xc4fbx9,_0xc4fbxa){UserHasOpenchannelQueuePermitEvents[_0x6e20[10]](event+ _0x6e20[8]+ _0xc4fbx8[_0x6e20[9]],_0xc4fbx8);UserHasOpenchannelQueuePermitEvents[_0x6e20[10]](event,_0xc4fbx8);_0xc4fbxa(null)}}module[_0x6e20[11]]= UserHasOpenchannelQueuePermitEvents \ No newline at end of file diff --git a/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.socket.js b/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.socket.js index 1c7289d..62e8efc 100644 --- a/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.socket.js +++ b/server/api/user_has_openchannel_queue/user_has_openchannel_queue_permit.socket.js @@ -1,34 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasOpenchannelQueuePermitEvents = require('./user_has_openchannel_queue_permit.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_openchannel_queue_permit:' + event, socket); - - UserHasOpenchannelQueuePermitEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - if (socket.userId === doc.Userid) { - socket.emit('user_has_openchannel_queue_permit:change'); - } - }; -} - -function removeListener(event, listener) { - return function() { - UserHasOpenchannelQueuePermitEvents.removeListener(event, listener); - }; -} +var _0x7e4c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x7e4c[0];const UserHasOpenchannelQueuePermitEvents=require(_0x7e4c[1]);var events=[_0x7e4c[2],_0x7e4c[3]];exports[_0x7e4c[4]]= function(_0x2956x3){for(var _0x2956x4=0,_0x2956x5=events[_0x7e4c[5]];_0x2956x4< _0x2956x5;_0x2956x4++){var _0x2956x6=events[_0x2956x4];var _0x2956x7=createListener(_0x7e4c[6]+ _0x2956x6,_0x2956x3);UserHasOpenchannelQueuePermitEvents[_0x7e4c[7]](_0x2956x6,_0x2956x7);_0x2956x3[_0x7e4c[7]](_0x7e4c[8],removeListener(_0x2956x6,_0x2956x7))}};function createListener(_0x2956x6,_0x2956x3){return function(_0x2956x9){if(_0x2956x3[_0x7e4c[9]]=== _0x2956x9[_0x7e4c[10]]){_0x2956x3[_0x7e4c[12]](_0x7e4c[11])}}}function removeListener(_0x2956x6,_0x2956x7){return function(){UserHasOpenchannelQueuePermitEvents[_0x7e4c[13]](_0x2956x6,_0x2956x7)}} \ No newline at end of file diff --git a/server/api/user_has_sms_queue/index.js b/server/api/user_has_sms_queue/index.js index 5e63266..e44edfb 100644 --- a/server/api/user_has_sms_queue/index.js +++ b/server/api/user_has_sms_queue/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./user_has_sms_queue.controller'); - -var router = express.Router(); - -router.get('/', controller.index); -router.get('/:id', controller.show); -router.post('/', controller.create); -router.put('/:id', controller.update); -router.patch('/:id', controller.update); -router.delete('/:id', controller.destroy); - -module.exports = router; +var _0x1ae3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1ae3[0];var express=require(_0x1ae3[1]);var controller=require(_0x1ae3[2]);var router=express.Router();router[_0x1ae3[5]](_0x1ae3[3],controller[_0x1ae3[4]]);router[_0x1ae3[5]](_0x1ae3[6],controller[_0x1ae3[7]]);router[_0x1ae3[9]](_0x1ae3[3],controller[_0x1ae3[8]]);router[_0x1ae3[11]](_0x1ae3[6],controller[_0x1ae3[10]]);router[_0x1ae3[12]](_0x1ae3[6],controller[_0x1ae3[10]]);router[_0x1ae3[14]](_0x1ae3[6],controller[_0x1ae3[13]]);module[_0x1ae3[15]]= router \ No newline at end of file diff --git a/server/api/user_has_sms_queue/user_has_sms_queue.controller.js b/server/api/user_has_sms_queue/user_has_sms_queue.controller.js index 9293afa..dcede24 100644 --- a/server/api/user_has_sms_queue/user_has_sms_queue.controller.js +++ b/server/api/user_has_sms_queue/user_has_sms_queue.controller.js @@ -1,103 +1 @@ -'use strict'; - -var _ = require('lodash'); -var UserHasSmsQueue = require('../../models').UserHasSmsQueue; - -// Get list of UserHasSmsQueues -exports.index = function(req, res) { - UserHasSmsQueue - .findAll(req.query ? { - where: req.query - } : {}) - .then(function(UserHasSmsQueues) { - return res.status(200).send(UserHasSmsQueues); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single UserHasSmsQueue -exports.show = function(req, res) { - UserHasSmsQueue - .findById(req.params.id) - .then(function(UserHasSmsQueue) { - if (!UserHasSmsQueue) { - return res.sendStatus(404); - } - return res.send(UserHasSmsQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new UserHasSmsQueue in the DB. -exports.create = function(req, res) { - UserHasSmsQueue - .create(req.body) - .then(function(UserHasSmsQueue) { - return res.status(201).send(UserHasSmsQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing UserHasSmsQueue in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - UserHasSmsQueue - .find({ - where: { - id: req.params.id - } - }) - .then(function(UserHasSmsQueue) { - if (!UserHasSmsQueue) { - return res.sendStatus(404); - } - var updated = _.merge(UserHasSmsQueue, req.body); - updated.save() - .then(function() { - return res.status(200).send(UserHasSmsQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a UserHasSmsQueue from the DB. -exports.destroy = function(req, res) { - UserHasSmsQueue - .find({ - where: { - id: req.params.id - } - }) - .then(function(UserHasSmsQueue) { - if (!UserHasSmsQueue) { - return res.sendStatus(404); - } - UserHasSmsQueue.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x1cf9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64","\x64\x65\x73\x74\x72\x6F\x79"];_0x1cf9[0];var _=require(_0x1cf9[1]);var UserHasSmsQueue=require(_0x1cf9[3])[_0x1cf9[2]];exports[_0x1cf9[4]]= function(_0x238ax3,_0x238ax4){UserHasSmsQueue[_0x1cf9[10]](_0x238ax3[_0x1cf9[9]]?{where:_0x238ax3[_0x1cf9[9]]}:{})[_0x1cf9[8]](function(_0x238ax6){return _0x238ax4[_0x1cf9[7]](200)[_0x1cf9[6]](_0x238ax6)})[_0x1cf9[5]](function(_0x238ax5){return handleError(_0x238ax4,_0x238ax5)})};exports[_0x1cf9[11]]= function(_0x238ax3,_0x238ax4){UserHasSmsQueue[_0x1cf9[15]](_0x238ax3[_0x1cf9[14]][_0x1cf9[13]])[_0x1cf9[8]](function(UserHasSmsQueue){if(!UserHasSmsQueue){return _0x238ax4[_0x1cf9[12]](404)};return _0x238ax4[_0x1cf9[6]](UserHasSmsQueue)})[_0x1cf9[5]](function(_0x238ax5){return handleError(_0x238ax4,_0x238ax5)})};exports[_0x1cf9[16]]= function(_0x238ax3,_0x238ax4){UserHasSmsQueue[_0x1cf9[16]](_0x238ax3[_0x1cf9[17]])[_0x1cf9[8]](function(UserHasSmsQueue){return _0x238ax4[_0x1cf9[7]](201)[_0x1cf9[6]](UserHasSmsQueue)})[_0x1cf9[5]](function(_0x238ax5){return handleError(_0x238ax4,_0x238ax5)})};exports[_0x1cf9[18]]= function(_0x238ax3,_0x238ax4){if(_0x238ax3[_0x1cf9[17]][_0x1cf9[13]]){delete _0x238ax3[_0x1cf9[17]][_0x1cf9[13]]};UserHasSmsQueue[_0x1cf9[21]]({where:{id:_0x238ax3[_0x1cf9[14]][_0x1cf9[13]]}})[_0x1cf9[8]](function(UserHasSmsQueue){if(!UserHasSmsQueue){return _0x238ax4[_0x1cf9[12]](404)};var _0x238ax7=_[_0x1cf9[19]](UserHasSmsQueue,_0x238ax3[_0x1cf9[17]]);_0x238ax7[_0x1cf9[20]]()[_0x1cf9[8]](function(){return _0x238ax4[_0x1cf9[7]](200)[_0x1cf9[6]](UserHasSmsQueue)})[_0x1cf9[5]](function(_0x238ax5){return handleError(_0x238ax4,_0x238ax5)})})[_0x1cf9[5]](function(_0x238ax5){return handleError(_0x238ax4,_0x238ax5)})};exports[_0x1cf9[22]]= function(_0x238ax3,_0x238ax4){UserHasSmsQueue[_0x1cf9[21]]({where:{id:_0x238ax3[_0x1cf9[14]][_0x1cf9[13]]}})[_0x1cf9[8]](function(UserHasSmsQueue){if(!UserHasSmsQueue){return _0x238ax4[_0x1cf9[12]](404)};UserHasSmsQueue[_0x1cf9[22]]()[_0x1cf9[8]](function(){return _0x238ax4[_0x1cf9[12]](204)})[_0x1cf9[5]](function(_0x238ax5){return handleError(_0x238ax4,_0x238ax5)})})[_0x1cf9[5]](function(_0x238ax5){return handleError(_0x238ax4,_0x238ax5)})};function handleError(_0x238ax4,_0x238ax5){return _0x238ax4[_0x1cf9[7]](500)[_0x1cf9[6]](_0x238ax5)} \ No newline at end of file diff --git a/server/api/user_has_sms_queue/user_has_sms_queue.events.js b/server/api/user_has_sms_queue/user_has_sms_queue.events.js index 2104253..5510095 100644 --- a/server/api/user_has_sms_queue/user_has_sms_queue.events.js +++ b/server/api/user_has_sms_queue/user_has_sms_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasSmsQueue = require('../../models').UserHasSmsQueue; - -var UserHasSmsQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasSmsQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasSmsQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasSmsQueueEvents.emit(event + ':' + doc._id, doc); - UserHasSmsQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasSmsQueueEvents; +var _0xe4b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xe4b0[0];const EventEmitter=require(_0xe4b0[1]);const UserHasSmsQueue=require(_0xe4b0[3])[_0xe4b0[2]];var UserHasSmsQueueEvents= new EventEmitter();UserHasSmsQueueEvents[_0xe4b0[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xe4b0[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xe4b0[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xe4b0[6]};for(var e in events){var event=events[e];UserHasSmsQueue[_0xe4b0[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x71a0x8,_0x71a0x9,_0x71a0xa){UserHasSmsQueueEvents[_0xe4b0[10]](event+ _0xe4b0[8]+ _0x71a0x8[_0xe4b0[9]],_0x71a0x8);UserHasSmsQueueEvents[_0xe4b0[10]](event,_0x71a0x8);_0x71a0xa(null)}}module[_0xe4b0[11]]= UserHasSmsQueueEvents \ No newline at end of file diff --git a/server/api/user_has_sms_queue/user_has_sms_queue.socket.js b/server/api/user_has_sms_queue/user_has_sms_queue.socket.js index 7dfde5c..12e2d56 100644 --- a/server/api/user_has_sms_queue/user_has_sms_queue.socket.js +++ b/server/api/user_has_sms_queue/user_has_sms_queue.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasSmsQueueEvents = require('./user_has_sms_queue.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_sms_queue:' + event, socket); - - UserHasSmsQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - UserHasSmsQueueEvents.removeListener(event, listener); - }; -} +var _0x9962=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x9962[0];const UserHasSmsQueueEvents=require(_0x9962[1]);var events=[_0x9962[2],_0x9962[3]];exports[_0x9962[4]]= function(_0x8c52x3){for(var _0x8c52x4=0,_0x8c52x5=events[_0x9962[5]];_0x8c52x4< _0x8c52x5;_0x8c52x4++){var _0x8c52x6=events[_0x8c52x4];var _0x8c52x7=createListener(_0x9962[6]+ _0x8c52x6,_0x8c52x3);UserHasSmsQueueEvents[_0x9962[7]](_0x8c52x6,_0x8c52x7);_0x8c52x3[_0x9962[7]](_0x9962[8],removeListener(_0x8c52x6,_0x8c52x7))}};function createListener(_0x8c52x6,_0x8c52x3){return function(_0x8c52x9){_0x8c52x3[_0x9962[9]](_0x8c52x6,_0x8c52x9)}}function removeListener(_0x8c52x6,_0x8c52x7){return function(){UserHasSmsQueueEvents[_0x9962[10]](_0x8c52x6,_0x8c52x7)}} \ No newline at end of file diff --git a/server/api/user_has_sms_queue/user_has_sms_queue_permit.events.js b/server/api/user_has_sms_queue/user_has_sms_queue_permit.events.js index b6b7a01..f2059dc 100644 --- a/server/api/user_has_sms_queue/user_has_sms_queue_permit.events.js +++ b/server/api/user_has_sms_queue/user_has_sms_queue_permit.events.js @@ -1,35 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasSmsQueuePermit = require('../../models').UserHasSmsQueuePermit; - -var UserHasSmsQueuePermitEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasSmsQueuePermitEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasSmsQueuePermit.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasSmsQueuePermitEvents.emit(event + ':' + doc._id, doc); - UserHasSmsQueuePermitEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasSmsQueuePermitEvents; +var _0xd0f4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd0f4[0];const EventEmitter=require(_0xd0f4[1]);const UserHasSmsQueuePermit=require(_0xd0f4[3])[_0xd0f4[2]];var UserHasSmsQueuePermitEvents= new EventEmitter();UserHasSmsQueuePermitEvents[_0xd0f4[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd0f4[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd0f4[6]};for(var e in events){var event=events[e];UserHasSmsQueuePermit[_0xd0f4[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x83c1x8,_0x83c1x9,_0x83c1xa){UserHasSmsQueuePermitEvents[_0xd0f4[10]](event+ _0xd0f4[8]+ _0x83c1x8[_0xd0f4[9]],_0x83c1x8);UserHasSmsQueuePermitEvents[_0xd0f4[10]](event,_0x83c1x8);_0x83c1xa(null)}}module[_0xd0f4[11]]= UserHasSmsQueuePermitEvents \ No newline at end of file diff --git a/server/api/user_has_sms_queue/user_has_sms_queue_permit.socket.js b/server/api/user_has_sms_queue/user_has_sms_queue_permit.socket.js index 2c2b49c..8319e09 100644 --- a/server/api/user_has_sms_queue/user_has_sms_queue_permit.socket.js +++ b/server/api/user_has_sms_queue/user_has_sms_queue_permit.socket.js @@ -1,34 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasSmsQueuePermitEvents = require('./user_has_sms_queue_permit.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_sms_queue_permit:' + event, socket); - - UserHasSmsQueuePermitEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - if (socket.userId === doc.Userid) { - socket.emit('user_has_sms_queue_permit:change'); - } - }; -} - -function removeListener(event, listener) { - return function() { - UserHasSmsQueuePermitEvents.removeListener(event, listener); - }; -} +var _0x479b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x479b[0];const UserHasSmsQueuePermitEvents=require(_0x479b[1]);var events=[_0x479b[2],_0x479b[3]];exports[_0x479b[4]]= function(_0x12d3x3){for(var _0x12d3x4=0,_0x12d3x5=events[_0x479b[5]];_0x12d3x4< _0x12d3x5;_0x12d3x4++){var _0x12d3x6=events[_0x12d3x4];var _0x12d3x7=createListener(_0x479b[6]+ _0x12d3x6,_0x12d3x3);UserHasSmsQueuePermitEvents[_0x479b[7]](_0x12d3x6,_0x12d3x7);_0x12d3x3[_0x479b[7]](_0x479b[8],removeListener(_0x12d3x6,_0x12d3x7))}};function createListener(_0x12d3x6,_0x12d3x3){return function(_0x12d3x9){if(_0x12d3x3[_0x479b[9]]=== _0x12d3x9[_0x479b[10]]){_0x12d3x3[_0x479b[12]](_0x479b[11])}}}function removeListener(_0x12d3x6,_0x12d3x7){return function(){UserHasSmsQueuePermitEvents[_0x479b[13]](_0x12d3x6,_0x12d3x7)}} \ No newline at end of file diff --git a/server/api/user_has_team/index.js b/server/api/user_has_team/index.js index 723bdc1..db1fad0 100644 --- a/server/api/user_has_team/index.js +++ b/server/api/user_has_team/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./user_has_team.controller'); - -var router = express.Router(); - -router.get('/', controller.index); -router.get('/:id', controller.show); -router.post('/', controller.create); -router.put('/:id', controller.update); -router.patch('/:id', controller.update); -router.delete('/:id', controller.destroy); - -module.exports = router; \ No newline at end of file +var _0xac70=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xac70[0];var express=require(_0xac70[1]);var controller=require(_0xac70[2]);var router=express.Router();router[_0xac70[5]](_0xac70[3],controller[_0xac70[4]]);router[_0xac70[5]](_0xac70[6],controller[_0xac70[7]]);router[_0xac70[9]](_0xac70[3],controller[_0xac70[8]]);router[_0xac70[11]](_0xac70[6],controller[_0xac70[10]]);router[_0xac70[12]](_0xac70[6],controller[_0xac70[10]]);router[_0xac70[14]](_0xac70[6],controller[_0xac70[13]]);module[_0xac70[15]]= router \ No newline at end of file diff --git a/server/api/user_has_team/user_has_team.controller.js b/server/api/user_has_team/user_has_team.controller.js index 7f0f426..9eef909 100644 --- a/server/api/user_has_team/user_has_team.controller.js +++ b/server/api/user_has_team/user_has_team.controller.js @@ -1,96 +1 @@ -'use strict'; - -var _ = require('lodash'); -var UserHasTeam = require('../../models').UserHasTeam; - -// Get list of user_has_teams -exports.index = function(req, res) { - console.log(req.query); - UserHasTeam - .findAll({ - where: req.query - }) - .then(function(user_has_teams) { - return res.status(200).send(user_has_teams); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single user_has_team -exports.show = function(req, res) { - UserHasTeam - .findById(req.params.id) - .then(function(user_has_team) { - if (!user_has_team) { - return res.sendStatus(404); - } - return res.send(user_has_team); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new user_has_team in the DB. -exports.create = function(req, res) { - UserHasTeam - .create(req.body) - .then(function(user_has_team) { - return res.status(201).send(user_has_team); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing user_has_team in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - UserHasTeam - .findById(req.params.id) - .then(function(user_has_team) { - if (!user_has_team) { - return res.sendStatus(404); - } - var updated = _.merge(user_has_team, req.body); - updated.save() - .then(function() { - return res.status(200).send(user_has_team); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a user_has_team from the DB. -exports.destroy = function(req, res) { - UserHasTeam - .findById(req.params.id) - .then(function(user_has_team) { - if (!user_has_team) { - return res.sendStatus(404); - } - user_has_team.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xa304=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x71\x75\x65\x72\x79","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xa304[0];var _=require(_0xa304[1]);var UserHasTeam=require(_0xa304[3])[_0xa304[2]];exports[_0xa304[4]]= function(_0x4732x3,_0x4732x4){console[_0xa304[6]](_0x4732x3[_0xa304[5]]);UserHasTeam[_0xa304[11]]({where:_0x4732x3[_0xa304[5]]})[_0xa304[10]](function(_0x4732x6){return _0x4732x4[_0xa304[9]](200)[_0xa304[8]](_0x4732x6)})[_0xa304[7]](function(_0x4732x5){return handleError(_0x4732x4,_0x4732x5)})};exports[_0xa304[12]]= function(_0x4732x3,_0x4732x4){UserHasTeam[_0xa304[16]](_0x4732x3[_0xa304[15]][_0xa304[14]])[_0xa304[10]](function(_0x4732x7){if(!_0x4732x7){return _0x4732x4[_0xa304[13]](404)};return _0x4732x4[_0xa304[8]](_0x4732x7)})[_0xa304[7]](function(_0x4732x5){return handleError(_0x4732x4,_0x4732x5)})};exports[_0xa304[17]]= function(_0x4732x3,_0x4732x4){UserHasTeam[_0xa304[17]](_0x4732x3[_0xa304[18]])[_0xa304[10]](function(_0x4732x7){return _0x4732x4[_0xa304[9]](201)[_0xa304[8]](_0x4732x7)})[_0xa304[7]](function(_0x4732x5){return handleError(_0x4732x4,_0x4732x5)})};exports[_0xa304[19]]= function(_0x4732x3,_0x4732x4){if(_0x4732x3[_0xa304[18]][_0xa304[14]]){delete _0x4732x3[_0xa304[18]][_0xa304[14]]};UserHasTeam[_0xa304[16]](_0x4732x3[_0xa304[15]][_0xa304[14]])[_0xa304[10]](function(_0x4732x7){if(!_0x4732x7){return _0x4732x4[_0xa304[13]](404)};var _0x4732x8=_[_0xa304[20]](_0x4732x7,_0x4732x3[_0xa304[18]]);_0x4732x8[_0xa304[21]]()[_0xa304[10]](function(){return _0x4732x4[_0xa304[9]](200)[_0xa304[8]](_0x4732x7)})[_0xa304[7]](function(_0x4732x5){return handleError(_0x4732x4,_0x4732x5)})})[_0xa304[7]](function(_0x4732x5){return handleError(_0x4732x4,_0x4732x5)})};exports[_0xa304[22]]= function(_0x4732x3,_0x4732x4){UserHasTeam[_0xa304[16]](_0x4732x3[_0xa304[15]][_0xa304[14]])[_0xa304[10]](function(_0x4732x7){if(!_0x4732x7){return _0x4732x4[_0xa304[13]](404)};_0x4732x7[_0xa304[22]]()[_0xa304[10]](function(){return _0x4732x4[_0xa304[13]](204)})[_0xa304[7]](function(_0x4732x5){return handleError(_0x4732x4,_0x4732x5)})})[_0xa304[7]](function(_0x4732x5){return handleError(_0x4732x4,_0x4732x5)})};function handleError(_0x4732x4,_0x4732x5){return _0x4732x4[_0xa304[9]](500)[_0xa304[8]](_0x4732x5)} \ No newline at end of file diff --git a/server/api/user_has_team/user_has_team.events.js b/server/api/user_has_team/user_has_team.events.js index ce02e87..2d16124 100644 --- a/server/api/user_has_team/user_has_team.events.js +++ b/server/api/user_has_team/user_has_team.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasTeam = require('../../models').UserHasTeam; - -var UserHasTeamEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasTeamEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasTeam.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasTeamEvents.emit(event + ':' + doc._id, doc); - UserHasTeamEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasTeamEvents; +var _0x1877=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x54\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1877[0];const EventEmitter=require(_0x1877[1]);const UserHasTeam=require(_0x1877[3])[_0x1877[2]];var UserHasTeamEvents= new EventEmitter();UserHasTeamEvents[_0x1877[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1877[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x1877[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1877[6]};for(var e in events){var event=events[e];UserHasTeam[_0x1877[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x25c9x8,_0x25c9x9,_0x25c9xa){UserHasTeamEvents[_0x1877[10]](event+ _0x1877[8]+ _0x25c9x8[_0x1877[9]],_0x25c9x8);UserHasTeamEvents[_0x1877[10]](event,_0x25c9x8);_0x25c9xa(null)}}module[_0x1877[11]]= UserHasTeamEvents \ No newline at end of file diff --git a/server/api/user_has_team/user_has_team.socket.js b/server/api/user_has_team/user_has_team.socket.js index 423b31f..24495e6 100644 --- a/server/api/user_has_team/user_has_team.socket.js +++ b/server/api/user_has_team/user_has_team.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasTeamEvents = require('./user_has_team.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_team:' + event, socket); - - UserHasTeamEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - UserHasTeamEvents.removeListener(event, listener); - }; -} +var _0x49ef=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x49ef[0];const UserHasTeamEvents=require(_0x49ef[1]);var events=[_0x49ef[2],_0x49ef[3]];exports[_0x49ef[4]]= function(_0x7801x3){for(var _0x7801x4=0,_0x7801x5=events[_0x49ef[5]];_0x7801x4< _0x7801x5;_0x7801x4++){var _0x7801x6=events[_0x7801x4];var _0x7801x7=createListener(_0x49ef[6]+ _0x7801x6,_0x7801x3);UserHasTeamEvents[_0x49ef[7]](_0x7801x6,_0x7801x7);_0x7801x3[_0x49ef[7]](_0x49ef[8],removeListener(_0x7801x6,_0x7801x7))}};function createListener(_0x7801x6,_0x7801x3){return function(_0x7801x9){_0x7801x3[_0x49ef[9]](_0x7801x6,_0x7801x9)}}function removeListener(_0x7801x6,_0x7801x7){return function(){UserHasTeamEvents[_0x49ef[10]](_0x7801x6,_0x7801x7)}} \ No newline at end of file diff --git a/server/api/user_has_voice_queue/index.js b/server/api/user_has_voice_queue/index.js index 72551d5..6e7b054 100644 --- a/server/api/user_has_voice_queue/index.js +++ b/server/api/user_has_voice_queue/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./user_has_voice_queue.controller'); - -var router = express.Router(); - -router.get('/', controller.index); -router.get('/:id', controller.show); -router.post('/', controller.create); -router.put('/:id', controller.update); -router.patch('/:id', controller.update); -router.delete('/:id', controller.destroy); - -module.exports = router; \ No newline at end of file +var _0x1b81=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1b81[0];var express=require(_0x1b81[1]);var controller=require(_0x1b81[2]);var router=express.Router();router[_0x1b81[5]](_0x1b81[3],controller[_0x1b81[4]]);router[_0x1b81[5]](_0x1b81[6],controller[_0x1b81[7]]);router[_0x1b81[9]](_0x1b81[3],controller[_0x1b81[8]]);router[_0x1b81[11]](_0x1b81[6],controller[_0x1b81[10]]);router[_0x1b81[12]](_0x1b81[6],controller[_0x1b81[10]]);router[_0x1b81[14]](_0x1b81[6],controller[_0x1b81[13]]);module[_0x1b81[15]]= router \ No newline at end of file diff --git a/server/api/user_has_voice_queue/user_has_voice_queue.controller.js b/server/api/user_has_voice_queue/user_has_voice_queue.controller.js index f3e5d22..581c384 100644 --- a/server/api/user_has_voice_queue/user_has_voice_queue.controller.js +++ b/server/api/user_has_voice_queue/user_has_voice_queue.controller.js @@ -1,98 +1 @@ -'use strict'; - -var _ = require('lodash'); -var UserHasVoiceQueue = require('../../models').UserHasVoiceQueue; - -// Get list of user_has_voice_queues -exports.index = function(req, res) { - UserHasVoiceQueue - .findAll(req.query ? { - where: req.query - } : {}) - .then(function(user_has_voice_queues) { - return res.status(200).send(user_has_voice_queues); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single userHasVoiceQueue -exports.show = function(req, res) { - UserHasVoiceQueue - .findById(req.params.id) - .then(function(userHasVoiceQueue) { - if (!userHasVoiceQueue) { - return res.sendStatus(404); - } - return res.send(userHasVoiceQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new userHasVoiceQueue in the DB. -exports.create = function(req, res, next) { - console.log(req.body); - UserHasVoiceQueue - .create(req.body) - .then(function(userHasVoiceQueue) { - return res.status(201).send(userHasVoiceQueue); - }) - .catch(function(err) { - console.error(err); - return next(err); - // return handleError(res, err); - }); -}; - -// Updates an existing userHasVoiceQueue in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - UserHasVoiceQueue - .findById(req.params.id) - .then(function(userHasVoiceQueue) { - if (!userHasVoiceQueue) { - return res.sendStatus(404); - } - var updated = _.merge(userHasVoiceQueue, req.body); - updated.save() - .then(function() { - return res.status(200).send(userHasVoiceQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a userHasVoiceQueue from the DB. -exports.destroy = function(req, res) { - UserHasVoiceQueue - .findById(req.params.id) - .then(function(userHasVoiceQueue) { - if (!userHasVoiceQueue) { - return res.sendStatus(404); - } - userHasVoiceQueue.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x91d3=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0x91d3[0];var _=require(_0x91d3[1]);var UserHasVoiceQueue=require(_0x91d3[3])[_0x91d3[2]];exports[_0x91d3[4]]= function(_0x2373x3,_0x2373x4){UserHasVoiceQueue[_0x91d3[10]](_0x2373x3[_0x91d3[9]]?{where:_0x2373x3[_0x91d3[9]]}:{})[_0x91d3[8]](function(_0x2373x6){return _0x2373x4[_0x91d3[7]](200)[_0x91d3[6]](_0x2373x6)})[_0x91d3[5]](function(_0x2373x5){return handleError(_0x2373x4,_0x2373x5)})};exports[_0x91d3[11]]= function(_0x2373x3,_0x2373x4){UserHasVoiceQueue[_0x91d3[15]](_0x2373x3[_0x91d3[14]][_0x91d3[13]])[_0x91d3[8]](function(_0x2373x7){if(!_0x2373x7){return _0x2373x4[_0x91d3[12]](404)};return _0x2373x4[_0x91d3[6]](_0x2373x7)})[_0x91d3[5]](function(_0x2373x5){return handleError(_0x2373x4,_0x2373x5)})};exports[_0x91d3[16]]= function(_0x2373x3,_0x2373x4,_0x2373x8){console[_0x91d3[18]](_0x2373x3[_0x91d3[17]]);UserHasVoiceQueue[_0x91d3[16]](_0x2373x3[_0x91d3[17]])[_0x91d3[8]](function(_0x2373x7){return _0x2373x4[_0x91d3[7]](201)[_0x91d3[6]](_0x2373x7)})[_0x91d3[5]](function(_0x2373x5){console[_0x91d3[19]](_0x2373x5);return _0x2373x8(_0x2373x5)})};exports[_0x91d3[20]]= function(_0x2373x3,_0x2373x4){if(_0x2373x3[_0x91d3[17]][_0x91d3[13]]){delete _0x2373x3[_0x91d3[17]][_0x91d3[13]]};UserHasVoiceQueue[_0x91d3[15]](_0x2373x3[_0x91d3[14]][_0x91d3[13]])[_0x91d3[8]](function(_0x2373x7){if(!_0x2373x7){return _0x2373x4[_0x91d3[12]](404)};var _0x2373x9=_[_0x91d3[21]](_0x2373x7,_0x2373x3[_0x91d3[17]]);_0x2373x9[_0x91d3[22]]()[_0x91d3[8]](function(){return _0x2373x4[_0x91d3[7]](200)[_0x91d3[6]](_0x2373x7)})[_0x91d3[5]](function(_0x2373x5){return handleError(_0x2373x4,_0x2373x5)})})[_0x91d3[5]](function(_0x2373x5){return handleError(_0x2373x4,_0x2373x5)})};exports[_0x91d3[23]]= function(_0x2373x3,_0x2373x4){UserHasVoiceQueue[_0x91d3[15]](_0x2373x3[_0x91d3[14]][_0x91d3[13]])[_0x91d3[8]](function(_0x2373x7){if(!_0x2373x7){return _0x2373x4[_0x91d3[12]](404)};_0x2373x7[_0x91d3[23]]()[_0x91d3[8]](function(){return _0x2373x4[_0x91d3[12]](204)})[_0x91d3[5]](function(_0x2373x5){return handleError(_0x2373x4,_0x2373x5)})})[_0x91d3[5]](function(_0x2373x5){return handleError(_0x2373x4,_0x2373x5)})};function handleError(_0x2373x4,_0x2373x5){return _0x2373x4[_0x91d3[7]](500)[_0x91d3[6]](_0x2373x5)} \ No newline at end of file diff --git a/server/api/user_has_voice_queue/user_has_voice_queue.events.js b/server/api/user_has_voice_queue/user_has_voice_queue.events.js index aacd9a7..f0a9453 100644 --- a/server/api/user_has_voice_queue/user_has_voice_queue.events.js +++ b/server/api/user_has_voice_queue/user_has_voice_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasVoiceQueue = require('../../models').UserHasVoiceQueue; - -var UserHasVoiceQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasVoiceQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasVoiceQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasVoiceQueueEvents.emit(event + ':' + doc._id, doc); - UserHasVoiceQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasVoiceQueueEvents; +var _0xc8e2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc8e2[0];const EventEmitter=require(_0xc8e2[1]);const UserHasVoiceQueue=require(_0xc8e2[3])[_0xc8e2[2]];var UserHasVoiceQueueEvents= new EventEmitter();UserHasVoiceQueueEvents[_0xc8e2[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc8e2[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc8e2[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc8e2[6]};for(var e in events){var event=events[e];UserHasVoiceQueue[_0xc8e2[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x662fx8,_0x662fx9,_0x662fxa){UserHasVoiceQueueEvents[_0xc8e2[10]](event+ _0xc8e2[8]+ _0x662fx8[_0xc8e2[9]],_0x662fx8);UserHasVoiceQueueEvents[_0xc8e2[10]](event,_0x662fx8);_0x662fxa(null)}}module[_0xc8e2[11]]= UserHasVoiceQueueEvents \ No newline at end of file diff --git a/server/api/user_has_voice_queue/user_has_voice_queue.socket.js b/server/api/user_has_voice_queue/user_has_voice_queue.socket.js index 5056bed..a528dcc 100644 --- a/server/api/user_has_voice_queue/user_has_voice_queue.socket.js +++ b/server/api/user_has_voice_queue/user_has_voice_queue.socket.js @@ -1,58 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasVoiceQueueEvents = require('./user_has_voice_queue.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_voice_queue:' + event, socket); - - UserHasVoiceQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'user_has_voice_queue:save': - socket.emit(event, { - logged: doc.logged, - loggedAt: doc.loggedAt, - queue: doc.queue, - membername: doc.membername, - interface: doc.interface, - callstaken: doc.callstaken, - lastcall: doc.lastcall, - status: doc.status, - statusdesc: doc.statusdesc, - statusAt: doc.statusAt, - paused: doc.paused, - pausedAt: doc.pausedAt, - reason: doc.reason, - UserId: doc.UserId - }); - break; - - case 'user_has_voice_queue:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - UserHasVoiceQueueEvents.removeListener(event, listener); - }; -} +var _0xaea1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x6C\x6F\x67\x67\x65\x64","\x6C\x6F\x67\x67\x65\x64\x41\x74","\x71\x75\x65\x75\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x63\x61\x6C\x6C\x73\x74\x61\x6B\x65\x6E","\x6C\x61\x73\x74\x63\x61\x6C\x6C","\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73\x64\x65\x73\x63","\x73\x74\x61\x74\x75\x73\x41\x74","\x70\x61\x75\x73\x65\x64","\x70\x61\x75\x73\x65\x64\x41\x74","\x72\x65\x61\x73\x6F\x6E","\x55\x73\x65\x72\x49\x64","\x65\x6D\x69\x74","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xaea1[0];const UserHasVoiceQueueEvents=require(_0xaea1[1]);var events=[_0xaea1[2],_0xaea1[3]];exports[_0xaea1[4]]= function(_0x2e6ax3){for(var _0x2e6ax4=0,_0x2e6ax5=events[_0xaea1[5]];_0x2e6ax4< _0x2e6ax5;_0x2e6ax4++){var _0x2e6ax6=events[_0x2e6ax4];var _0x2e6ax7=createListener(_0xaea1[6]+ _0x2e6ax6,_0x2e6ax3);UserHasVoiceQueueEvents[_0xaea1[7]](_0x2e6ax6,_0x2e6ax7);_0x2e6ax3[_0xaea1[7]](_0xaea1[8],removeListener(_0x2e6ax6,_0x2e6ax7))}};function createListener(_0x2e6ax6,_0x2e6ax3){return function(_0x2e6ax9){switch(_0x2e6ax6){case _0xaea1[24]:_0x2e6ax3[_0xaea1[23]](_0x2e6ax6,{logged:_0x2e6ax9[_0xaea1[9]],loggedAt:_0x2e6ax9[_0xaea1[10]],queue:_0x2e6ax9[_0xaea1[11]],membername:_0x2e6ax9[_0xaea1[12]],interface:_0x2e6ax9[_0xaea1[13]],callstaken:_0x2e6ax9[_0xaea1[14]],lastcall:_0x2e6ax9[_0xaea1[15]],status:_0x2e6ax9[_0xaea1[16]],statusdesc:_0x2e6ax9[_0xaea1[17]],statusAt:_0x2e6ax9[_0xaea1[18]],paused:_0x2e6ax9[_0xaea1[19]],pausedAt:_0x2e6ax9[_0xaea1[20]],reason:_0x2e6ax9[_0xaea1[21]],UserId:_0x2e6ax9[_0xaea1[22]]});break;case _0xaea1[25]:_0x2e6ax3[_0xaea1[23]](_0x2e6ax6,_0x2e6ax9);break;default:}}}function removeListener(_0x2e6ax6,_0x2e6ax7){return function(){UserHasVoiceQueueEvents[_0xaea1[26]](_0x2e6ax6,_0x2e6ax7)}} \ No newline at end of file diff --git a/server/api/user_has_voice_queue/user_has_voice_queue_permit.events.js b/server/api/user_has_voice_queue/user_has_voice_queue_permit.events.js index edcd78c..03231be 100644 --- a/server/api/user_has_voice_queue/user_has_voice_queue_permit.events.js +++ b/server/api/user_has_voice_queue/user_has_voice_queue_permit.events.js @@ -1,35 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const UserHasVoiceQueuePermit = require('../../models').UserHasVoiceQueuePermit; - -var UserHasVoiceQueuePermitEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -UserHasVoiceQueuePermitEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - UserHasVoiceQueuePermit.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - UserHasVoiceQueuePermitEvents.emit(event + ':' + doc._id, doc); - UserHasVoiceQueuePermitEvents.emit(event, doc); - done(null); - } -} - -module.exports = UserHasVoiceQueuePermitEvents; +var _0x1998=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x50\x65\x72\x6D\x69\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x1998[0];const EventEmitter=require(_0x1998[1]);const UserHasVoiceQueuePermit=require(_0x1998[3])[_0x1998[2]];var UserHasVoiceQueuePermitEvents= new EventEmitter();UserHasVoiceQueuePermitEvents[_0x1998[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x1998[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x1998[6]};for(var e in events){var event=events[e];UserHasVoiceQueuePermit[_0x1998[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x7934x8,_0x7934x9,_0x7934xa){UserHasVoiceQueuePermitEvents[_0x1998[10]](event+ _0x1998[8]+ _0x7934x8[_0x1998[9]],_0x7934x8);UserHasVoiceQueuePermitEvents[_0x1998[10]](event,_0x7934x8);_0x7934xa(null)}}module[_0x1998[11]]= UserHasVoiceQueuePermitEvents \ No newline at end of file diff --git a/server/api/user_has_voice_queue/user_has_voice_queue_permit.socket.js b/server/api/user_has_voice_queue/user_has_voice_queue_permit.socket.js index 877e1e4..30299f5 100644 --- a/server/api/user_has_voice_queue/user_has_voice_queue_permit.socket.js +++ b/server/api/user_has_voice_queue/user_has_voice_queue_permit.socket.js @@ -1,34 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const UserHasVoiceQueuePermitEvents = require('./user_has_voice_queue_permit.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('user_has_voice_queue_permit:' + event, socket); - - UserHasVoiceQueuePermitEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - if (socket.userId === doc.Userid) { - socket.emit('user_has_voice_queue_permit:change'); - } - }; -} - -function removeListener(event, listener) { - return function() { - UserHasVoiceQueuePermitEvents.removeListener(event, listener); - }; -} +var _0x8d52=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x73\x65\x72\x49\x64","\x55\x73\x65\x72\x69\x64","\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x3A\x63\x68\x61\x6E\x67\x65","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x8d52[0];const UserHasVoiceQueuePermitEvents=require(_0x8d52[1]);var events=[_0x8d52[2],_0x8d52[3]];exports[_0x8d52[4]]= function(_0xb34dx3){for(var _0xb34dx4=0,_0xb34dx5=events[_0x8d52[5]];_0xb34dx4< _0xb34dx5;_0xb34dx4++){var _0xb34dx6=events[_0xb34dx4];var _0xb34dx7=createListener(_0x8d52[6]+ _0xb34dx6,_0xb34dx3);UserHasVoiceQueuePermitEvents[_0x8d52[7]](_0xb34dx6,_0xb34dx7);_0xb34dx3[_0x8d52[7]](_0x8d52[8],removeListener(_0xb34dx6,_0xb34dx7))}};function createListener(_0xb34dx6,_0xb34dx3){return function(_0xb34dx9){if(_0xb34dx3[_0x8d52[9]]=== _0xb34dx9[_0x8d52[10]]){_0xb34dx3[_0x8d52[12]](_0x8d52[11])}}}function removeListener(_0xb34dx6,_0xb34dx7){return function(){UserHasVoiceQueuePermitEvents[_0x8d52[13]](_0xb34dx6,_0xb34dx7)}} \ No newline at end of file diff --git a/server/api/variable/index.js b/server/api/variable/index.js index 3af9541..92d8e91 100644 --- a/server/api/variable/index.js +++ b/server/api/variable/index.js @@ -1,166 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./variable.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); -/** - * @api {get} /api/variables/ Get Variables' list. - * - * @apiParam (Query) {Number} [offset] Pagination offset. - * @apiParam (Query) {Number} [limit] Pagination limit. - * - * @apiVersion 0.0.140 - * @apiName GetVariables - * @apiGroup Variables - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Number} count Number of variables. - * @apiSuccess {Object[]} rows Variables' list. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "count": 2, - * "rows": [{ - * "id": 1 - * "name": "variable1" - * "description": "my variable description" - * ... - * },{ - * "id": 2 - * "name": "newvariable" - * "description": null - * ... - * },...] - * } - */ -router.get('/', auth.isAuthenticated(), auth.hasModule([13, 14], ['admin']), controller.index); -/** - * @api {get} /api/variables/:id Get Variable's details. - * @apiParam {Number} id Variable's unique ID. - * @apiVersion 0.0.140 - * @apiName GetVariable - * @apiGroup Variables - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccess {Object} Variable's details. - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 1 - * "name": "variable1" - * "description": "my variable description" - * ... - * } - */ -router.get('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.show); -/** - * @api {post} /api/variables/ Create a new variable. - * @apiParam (body) {String} name Variable's name. - * @apiParam (body) {String} [description] Variable's description. - * - * @apiVersion 0.0.140 - * @apiName CreateVariable - * @apiGroup Variables - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 201 Created - * { - * "id": 3 - * "name": "Variable3" - * "description": "my variable" - * ... - * } - */ -router.post('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.create); -/** - * @api {put} /api/variables/:id Update variable's details. - * @apiParam {Number} id Variable's unique ID. - * @apiParam (body) {String} name Variable's name. - * @apiParam (body) {String} [description] Variable's description. - * - * @apiVersion 0.0.140 - * @apiName UpdateVariable - * @apiGroup Variables - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 200 OK - * { - * "id": 3 - * "name": "Variable 3" - * "description": "My new description" - * ... - * } - */ -router.put('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.update); -/** - * @api {delete} /api/variables/ Bulk Delete variables. - * - * @apiParam (Query) {Number[]} ids Variables' unique ID array. - * - * @apiVersion 0.0.140 - * @apiName BulkDeleteVariables - * @apiGroup Variables - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.bulkDestroy); -/** - * @api {delete} /api/variables/:id Delete a variable. - * - * @apiParam {Number} id Variable's unique ID. - * - * @apiVersion 0.0.140 - * @apiName DeleteVariable - * @apiGroup Variables - * - * @apiHeader (Header) {String} Authorization Authorization access token. - * - * @apiHeaderExample {json} Header-Example: - * { - * "Authentication": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpZCI" - * } - * - * @apiSuccessExample {json} Success-Response: - * HTTP/1.1 204 No Content - */ -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([13], ['admin']), controller.destroy); - -module.exports = router; +var _0x9f14=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x9f14[0];var express=require(_0x9f14[1]);var controller=require(_0x9f14[2]);var auth=require(_0x9f14[3]);var router=express.Router();router[_0x9f14[9]](_0x9f14[4],auth[_0x9f14[5]](),auth[_0x9f14[7]]([13,14],[_0x9f14[6]]),controller[_0x9f14[8]]);router[_0x9f14[9]](_0x9f14[10],auth[_0x9f14[5]](),auth[_0x9f14[7]]([13],[_0x9f14[6]]),controller[_0x9f14[11]]);router[_0x9f14[13]](_0x9f14[4],auth[_0x9f14[5]](),auth[_0x9f14[7]]([13],[_0x9f14[6]]),controller[_0x9f14[12]]);router[_0x9f14[15]](_0x9f14[10],auth[_0x9f14[5]](),auth[_0x9f14[7]]([13],[_0x9f14[6]]),controller[_0x9f14[14]]);router[_0x9f14[17]](_0x9f14[4],auth[_0x9f14[5]](),auth[_0x9f14[7]]([13],[_0x9f14[6]]),controller[_0x9f14[16]]);router[_0x9f14[17]](_0x9f14[10],auth[_0x9f14[5]](),auth[_0x9f14[7]]([13],[_0x9f14[6]]),controller[_0x9f14[18]]);module[_0x9f14[19]]= router \ No newline at end of file diff --git a/server/api/variable/variable.controller.js b/server/api/variable/variable.controller.js index 2378a95..578030f 100644 --- a/server/api/variable/variable.controller.js +++ b/server/api/variable/variable.controller.js @@ -1,117 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Variable = require('../../models').Variable; -var Util = require('../../config/util'); - -// Get list of variables -exports.index = function(req, res, next) { - return Variable - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single variable -exports.show = function(req, res) { - return Variable - .findById(req.params.id) - .then(function(variable) { - if (!variable) { - return res.sendStatus(404); - } - return res.send(variable); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new variable in the DB. -exports.create = function(req, res) { - return Variable - .create(req.body) - .then(function(variable) { - return res.status(201).send(variable); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing variable in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return Variable - .findById(req.params.id) - .then(function(variable) { - if (!variable) { - return res.sendStatus(404); - } - var updated = _.merge(variable, req.body); - return updated - .save(); - }) - .then(function(variable) { - return res.status(200).send(variable); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a variable from the DB. -exports.destroy = function(req, res) { - return Variable - .scope('fields') - .findById(req.params.id) - .then(function(variable) { - if (!variable) { - return res.sendStatus(404); - } - if (variableHasAssociation(variable)) { - var err = new Error(); - err.message = 'Variable is associated with an integration\'s configuration'; - throw err; - } - return variable.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.bulkDestroy = function(req, res) { - return Variable - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} - -function variableHasAssociation(variable) { - return ((variable.ZendeskFields && variable.ZendeskFields.length > 0) || (variable.DeskFields && variable.DeskFields.length > 0) || (variable.SalesforceFields && variable.SalesforceFields.length > - 0) || (variable.FreshdeskFields && variable.FreshdeskFields.length > 0) || (variable.SugarcrmFields && variable.SugarcrmFields.length > 0)); -} +var _0x2bb4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x6D\x65\x73\x73\x61\x67\x65","\x56\x61\x72\x69\x61\x62\x6C\x65\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x27\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x73","\x6C\x65\x6E\x67\x74\x68","\x44\x65\x73\x6B\x46\x69\x65\x6C\x64\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x46\x69\x65\x6C\x64\x73","\x46\x72\x65\x73\x68\x64\x65\x73\x6B\x46\x69\x65\x6C\x64\x73","\x53\x75\x67\x61\x72\x63\x72\x6D\x46\x69\x65\x6C\x64\x73"];_0x2bb4[0];var _=require(_0x2bb4[1]);var Variable=require(_0x2bb4[3])[_0x2bb4[2]];var Util=require(_0x2bb4[4]);exports[_0x2bb4[5]]= function(_0xa62fx4,_0xa62fx5,_0xa62fx6){return Variable[_0x2bb4[12]](Util[_0x2bb4[11]](_0xa62fx4[_0x2bb4[10]]))[_0x2bb4[9]](function(_0xa62fx8){_0xa62fx5[_0x2bb4[8]](200)[_0x2bb4[7]](_0xa62fx8)})[_0x2bb4[6]](function(_0xa62fx7){return handleError(_0xa62fx5,_0xa62fx7)})};exports[_0x2bb4[13]]= function(_0xa62fx4,_0xa62fx5){return Variable[_0x2bb4[17]](_0xa62fx4[_0x2bb4[16]][_0x2bb4[15]])[_0x2bb4[9]](function(_0xa62fx9){if(!_0xa62fx9){return _0xa62fx5[_0x2bb4[14]](404)};return _0xa62fx5[_0x2bb4[7]](_0xa62fx9)})[_0x2bb4[6]](function(_0xa62fx7){return handleError(_0xa62fx5,_0xa62fx7)})};exports[_0x2bb4[18]]= function(_0xa62fx4,_0xa62fx5){return Variable[_0x2bb4[18]](_0xa62fx4[_0x2bb4[19]])[_0x2bb4[9]](function(_0xa62fx9){return _0xa62fx5[_0x2bb4[8]](201)[_0x2bb4[7]](_0xa62fx9)})[_0x2bb4[6]](function(_0xa62fx7){return handleError(_0xa62fx5,_0xa62fx7)})};exports[_0x2bb4[20]]= function(_0xa62fx4,_0xa62fx5){if(_0xa62fx4[_0x2bb4[19]][_0x2bb4[15]]){delete _0xa62fx4[_0x2bb4[19]][_0x2bb4[15]]};return Variable[_0x2bb4[17]](_0xa62fx4[_0x2bb4[16]][_0x2bb4[15]])[_0x2bb4[9]](function(_0xa62fx9){if(!_0xa62fx9){return _0xa62fx5[_0x2bb4[14]](404)};var _0xa62fxa=_[_0x2bb4[21]](_0xa62fx9,_0xa62fx4[_0x2bb4[19]]);return _0xa62fxa[_0x2bb4[22]]()})[_0x2bb4[9]](function(_0xa62fx9){return _0xa62fx5[_0x2bb4[8]](200)[_0x2bb4[7]](_0xa62fx9)})[_0x2bb4[6]](function(_0xa62fx7){return handleError(_0xa62fx5,_0xa62fx7)})};exports[_0x2bb4[23]]= function(_0xa62fx4,_0xa62fx5){return Variable[_0x2bb4[27]](_0x2bb4[26])[_0x2bb4[17]](_0xa62fx4[_0x2bb4[16]][_0x2bb4[15]])[_0x2bb4[9]](function(_0xa62fx9){if(!_0xa62fx9){return _0xa62fx5[_0x2bb4[14]](404)};if(variableHasAssociation(_0xa62fx9)){var _0xa62fx7= new Error();_0xa62fx7[_0x2bb4[24]]= _0x2bb4[25];throw _0xa62fx7};return _0xa62fx9[_0x2bb4[23]]()})[_0x2bb4[9]](function(){return _0xa62fx5[_0x2bb4[14]](204)})[_0x2bb4[6]](function(_0xa62fx7){return handleError(_0xa62fx5,_0xa62fx7)})};exports[_0x2bb4[28]]= function(_0xa62fx4,_0xa62fx5){return Variable[_0x2bb4[23]]({where:{id:_0xa62fx4[_0x2bb4[10]][_0x2bb4[29]]},individualHooks:true})[_0x2bb4[9]](function(){return _0xa62fx5[_0x2bb4[14]](204)})[_0x2bb4[6]](function(_0xa62fx7){return handleError(_0xa62fx5,_0xa62fx7)})};function handleError(_0xa62fx5,_0xa62fx7){return _0xa62fx5[_0x2bb4[8]](500)[_0x2bb4[7]](_0xa62fx7)}function variableHasAssociation(_0xa62fx9){return ((_0xa62fx9[_0x2bb4[30]]&& _0xa62fx9[_0x2bb4[30]][_0x2bb4[31]]> 0)|| (_0xa62fx9[_0x2bb4[32]]&& _0xa62fx9[_0x2bb4[32]][_0x2bb4[31]]> 0)|| (_0xa62fx9[_0x2bb4[33]]&& _0xa62fx9[_0x2bb4[33]][_0x2bb4[31]]> 0)|| (_0xa62fx9[_0x2bb4[34]]&& _0xa62fx9[_0x2bb4[34]][_0x2bb4[31]]> 0)|| (_0xa62fx9[_0x2bb4[35]]&& _0xa62fx9[_0x2bb4[35]][_0x2bb4[31]]> 0))} \ No newline at end of file diff --git a/server/api/variable/variable.events.js b/server/api/variable/variable.events.js index 2f51fee..d4fe3b6 100644 --- a/server/api/variable/variable.events.js +++ b/server/api/variable/variable.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const Variable = require('../../models').Variable; - -var VariableEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -VariableEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - Variable.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - VariableEvents.emit(event + ':' + doc._id, doc); - VariableEvents.emit(event, doc); - done(null); - } -} - -module.exports = VariableEvents; +var _0xc1c9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xc1c9[0];const EventEmitter=require(_0xc1c9[1]);const Variable=require(_0xc1c9[3])[_0xc1c9[2]];var VariableEvents= new EventEmitter();VariableEvents[_0xc1c9[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xc1c9[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xc1c9[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xc1c9[6]};for(var e in events){var event=events[e];Variable[_0xc1c9[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x6a09x8,_0x6a09x9,_0x6a09xa){VariableEvents[_0xc1c9[10]](event+ _0xc1c9[8]+ _0x6a09x8[_0xc1c9[9]],_0x6a09x8);VariableEvents[_0xc1c9[10]](event,_0x6a09x8);_0x6a09xa(null)}}module[_0xc1c9[11]]= VariableEvents \ No newline at end of file diff --git a/server/api/variable/variable.socket.js b/server/api/variable/variable.socket.js index 32f14e8..07d5e36 100644 --- a/server/api/variable/variable.socket.js +++ b/server/api/variable/variable.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const VariableEvents = require('./variable.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('variable:' + event, socket); - - VariableEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - VariableEvents.removeListener(event, listener); - }; -} +var _0x866e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x61\x72\x69\x61\x62\x6C\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x866e[0];const VariableEvents=require(_0x866e[1]);var events=[_0x866e[2],_0x866e[3]];exports[_0x866e[4]]= function(_0x8201x3){for(var _0x8201x4=0,_0x8201x5=events[_0x866e[5]];_0x8201x4< _0x8201x5;_0x8201x4++){var _0x8201x6=events[_0x8201x4];var _0x8201x7=createListener(_0x866e[6]+ _0x8201x6,_0x8201x3);VariableEvents[_0x866e[7]](_0x8201x6,_0x8201x7);_0x8201x3[_0x866e[7]](_0x866e[8],removeListener(_0x8201x6,_0x8201x7))}};function createListener(_0x8201x6,_0x8201x3){return function(_0x8201x9){_0x8201x3[_0x866e[9]](_0x8201x6,_0x8201x9)}}function removeListener(_0x8201x6,_0x8201x7){return function(){VariableEvents[_0x866e[10]](_0x8201x6,_0x8201x7)}} \ No newline at end of file diff --git a/server/api/voice_context/index.js b/server/api/voice_context/index.js index 8f14e04..f20db6f 100644 --- a/server/api/voice_context/index.js +++ b/server/api/voice_context/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./voice_context.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create); -router.post('/validate', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.contextValidation); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy); -module.exports = router; +var _0x60b5=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x63\x6F\x6E\x74\x65\x78\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x60b5[0];var express=require(_0x60b5[1]);var controller=require(_0x60b5[2]);var auth=require(_0x60b5[3]);var router=express.Router();router[_0x60b5[9]](_0x60b5[4],auth[_0x60b5[5]](),auth[_0x60b5[7]]([7],[_0x60b5[6]]),controller[_0x60b5[8]]);router[_0x60b5[9]](_0x60b5[10],auth[_0x60b5[5]](),auth[_0x60b5[7]]([7],[_0x60b5[6]]),controller[_0x60b5[11]]);router[_0x60b5[13]](_0x60b5[4],auth[_0x60b5[5]](),auth[_0x60b5[7]]([7],[_0x60b5[6]]),controller[_0x60b5[12]]);router[_0x60b5[13]](_0x60b5[14],auth[_0x60b5[5]](),auth[_0x60b5[7]]([7],[_0x60b5[6]]),controller[_0x60b5[15]]);router[_0x60b5[17]](_0x60b5[10],auth[_0x60b5[5]](),auth[_0x60b5[7]]([7],[_0x60b5[6]]),controller[_0x60b5[16]]);router[_0x60b5[19]](_0x60b5[4],auth[_0x60b5[5]](),auth[_0x60b5[7]]([7],[_0x60b5[6]]),controller[_0x60b5[18]]);router[_0x60b5[19]](_0x60b5[10],auth[_0x60b5[5]](),auth[_0x60b5[7]]([7],[_0x60b5[6]]),controller[_0x60b5[20]]);module[_0x60b5[21]]= router \ No newline at end of file diff --git a/server/api/voice_context/voice_context.controller.js b/server/api/voice_context/voice_context.controller.js index c6ec224..c840e92 100644 --- a/server/api/voice_context/voice_context.controller.js +++ b/server/api/voice_context/voice_context.controller.js @@ -1,227 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); - -var Util = require('../../config/util'); -var sequelize = require('../../models').sequelize; - -var VoiceContext = require('../../models').VoiceContext; -var VoiceExtension = require('../../models').VoiceExtension; - -// Get list of agents -exports.index = function(req, res, next) { - return VoiceContext - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single voiceContext -exports.show = function(req, res) { - return VoiceContext - .findById(req.params.id) - .then(function(voiceContext) { - if (!voiceContext) { - return res.sendStatus(404); - } - return res.send(voiceContext); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Validate the existence of a context -exports.contextValidation = function(req, res) { - return VoiceContext - .findAll({ - where: { - name: req.body.name - } - }) - .then(function(voiceContexts) { - if (!voiceContexts) { - return res.sendStatus(404); - } - return res.send(voiceContexts); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new voiceContext in the DB. -exports.create = function(req, res) { - return VoiceContext - .create(req.body) - .then(function(voiceContext) { - return res.status(201).send(voiceContext); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - err.message = 'The context name already exists'; - err.translatedMessage = 'MESSAGE_EXIST_CONTEXT' - return handleError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); - -}; - -// Updates an existing voiceContext in the DB. -exports.update = function(req, res) { - return VoiceContext - .findAll({ - where: { - name: req.body.name, - id: { - $ne: req.body.id - } - } - }) - .then(function(existingContexts) { - if (!existingContexts) { - return res.sendStatus(404); - } - if (existingContexts.length > 0) { - return res.status(500).send({ - message: 'MESSAGE_EXIST_CONTEXT' - }); - } - if (req.body.id) { - delete req.body.id; - } - return VoiceContext - .findById(req.params.id); - }) - .then(function(voiceContext) { - if (!voiceContext) { - return res.sendStatus(404); - } - var updated = _.merge(voiceContext, req.body); - return updated - .save(); - }) - .then(function(voiceContext) { - return res.status(200).send(voiceContext); - }) - .catch(function(err) { - return handleError(res, err); - }); - -}; - -// Deletes a voiceContext from the DB. -exports.destroy = function(req, res) { - var _voiceContext; - - return VoiceContext - .findById(req.params.id) - .then(function(voiceContext) { - _voiceContext = voiceContext; - if (!_voiceContext) { - return res.sendStatus(404); - } - if (_voiceContext.defaultEntry) { - return res.status(500).send({ - message: 'You can\'t delete a default entry!', - translatedMessage: 'MESSAGE_DEFAULT_ENTRY' - }); - } - return VoiceExtension - .findAll({ - where: { - context: _voiceContext.name, - VoiceContextId: null - } - }); - }) - .then(function(contextExtensions) { - console.log(contextExtensions); - if (contextExtensions.length > 0) { - return res.status(500).send({ - message: 'The context is associated to a route, delete or change it first', - translatedMessage: 'MESSAGE_CONTEXT_ROUTE_ASSOCIATED' - }); - } - return _voiceContext - .destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - console.log('err', err); - return handleError(res, err); - }); - -}; - -// Deletes a context from the DB. -exports.bulkDestroy = function(req, res) { - - var _voiceContexts; - - return VoiceContext - .findAll({ - where: { - id: req.query.ids - } - }) - .then(function(voiceContexts) { - _voiceContexts = voiceContexts; - var isDefault = _.find(_voiceContexts, { - defaultEntry: true - }); - if (isDefault) { - return res.status(500).send({ - message: 'You can\'t delete a default entry!', - translatedMessage: 'MESSAGE_DEFAULT_ENTRY' - }); - } - if (!_voiceContexts) { - return res.sendStatus(404); - } - var destroyContextsNames = _.map(_.map(_voiceContexts, 'dataValues'), 'name'); - - return VoiceExtension - .findAll({ - where: { - context: destroyContextsNames, - VoiceContextId: null - } - }); - }) - .then(function(contextExtensions) { - if (contextExtensions.length > _voiceContexts.length) { - return res.status(500).send({ - message: 'The context is associated to a route, delete or change it first', - translatedMessage: 'MESSAGE_CONTEXT_ROUTE_ASSOCIATED' - }); - } - - return VoiceContext - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xfc1e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x6F\x6E\x74\x65\x78\x74\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x6E\x61\x6D\x65","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65","\x54\x68\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x6E\x61\x6D\x65\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74\x73","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x43\x4F\x4E\x54\x45\x58\x54","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x6C\x65\x6E\x67\x74\x68","\x64\x65\x73\x74\x72\x6F\x79","\x65\x72\x72","\x6C\x6F\x67","\x54\x68\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x69\x73\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x65\x64\x20\x74\x6F\x20\x61\x20\x72\x6F\x75\x74\x65\x2C\x20\x64\x65\x6C\x65\x74\x65\x20\x6F\x72\x20\x63\x68\x61\x6E\x67\x65\x20\x69\x74\x20\x66\x69\x72\x73\x74","\x4D\x45\x53\x53\x41\x47\x45\x5F\x43\x4F\x4E\x54\x45\x58\x54\x5F\x52\x4F\x55\x54\x45\x5F\x41\x53\x53\x4F\x43\x49\x41\x54\x45\x44","\x64\x65\x66\x61\x75\x6C\x74\x45\x6E\x74\x72\x79","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x64\x65\x6C\x65\x74\x65\x20\x61\x20\x64\x65\x66\x61\x75\x6C\x74\x20\x65\x6E\x74\x72\x79\x21","\x4D\x45\x53\x53\x41\x47\x45\x5F\x44\x45\x46\x41\x55\x4C\x54\x5F\x45\x4E\x54\x52\x59","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x66\x69\x6E\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6D\x61\x70"];_0xfc1e[0];var _=require(_0xfc1e[1]);var util=require(_0xfc1e[2]);var Util=require(_0xfc1e[3]);var sequelize=require(_0xfc1e[5])[_0xfc1e[4]];var VoiceContext=require(_0xfc1e[5])[_0xfc1e[6]];var VoiceExtension=require(_0xfc1e[5])[_0xfc1e[7]];exports[_0xfc1e[8]]= function(_0xb807x7,_0xb807x8,_0xb807x9){return VoiceContext[_0xfc1e[15]](Util[_0xfc1e[14]](_0xb807x7[_0xfc1e[13]]))[_0xfc1e[12]](function(_0xb807xb){_0xb807x8[_0xfc1e[11]](200)[_0xfc1e[10]](_0xb807xb)})[_0xfc1e[9]](function(_0xb807xa){return handleError(_0xb807x8,_0xb807xa)})};exports[_0xfc1e[16]]= function(_0xb807x7,_0xb807x8){return VoiceContext[_0xfc1e[20]](_0xb807x7[_0xfc1e[19]][_0xfc1e[18]])[_0xfc1e[12]](function(_0xb807xc){if(!_0xb807xc){return _0xb807x8[_0xfc1e[17]](404)};return _0xb807x8[_0xfc1e[10]](_0xb807xc)})[_0xfc1e[9]](function(_0xb807xa){return handleError(_0xb807x8,_0xb807xa)})};exports[_0xfc1e[21]]= function(_0xb807x7,_0xb807x8){return VoiceContext[_0xfc1e[24]]({where:{name:_0xb807x7[_0xfc1e[23]][_0xfc1e[22]]}})[_0xfc1e[12]](function(_0xb807xd){if(!_0xb807xd){return _0xb807x8[_0xfc1e[17]](404)};return _0xb807x8[_0xfc1e[10]](_0xb807xd)})[_0xfc1e[9]](function(_0xb807xa){return handleError(_0xb807x8,_0xb807xa)})};exports[_0xfc1e[25]]= function(_0xb807x7,_0xb807x8){return VoiceContext[_0xfc1e[25]](_0xb807x7[_0xfc1e[23]])[_0xfc1e[12]](function(_0xb807xc){return _0xb807x8[_0xfc1e[11]](201)[_0xfc1e[10]](_0xb807xc)})[_0xfc1e[9]](sequelize.UniqueConstraintError,function(_0xb807xa){_0xb807xa[_0xfc1e[26]]= _0xfc1e[27];_0xb807xa[_0xfc1e[28]]= _0xfc1e[29];return handleError(_0xb807x8,_0xb807xa)})[_0xfc1e[9]](function(_0xb807xa){return handleError(_0xb807x8,_0xb807xa)})};exports[_0xfc1e[30]]= function(_0xb807x7,_0xb807x8){return VoiceContext[_0xfc1e[24]]({where:{name:_0xb807x7[_0xfc1e[23]][_0xfc1e[22]],id:{$ne:_0xb807x7[_0xfc1e[23]][_0xfc1e[18]]}}})[_0xfc1e[12]](function(_0xb807xf){if(!_0xb807xf){return _0xb807x8[_0xfc1e[17]](404)};if(_0xb807xf[_0xfc1e[33]]> 0){return _0xb807x8[_0xfc1e[11]](500)[_0xfc1e[10]]({message:_0xfc1e[29]})};if(_0xb807x7[_0xfc1e[23]][_0xfc1e[18]]){delete _0xb807x7[_0xfc1e[23]][_0xfc1e[18]]};return VoiceContext[_0xfc1e[20]](_0xb807x7[_0xfc1e[19]][_0xfc1e[18]])})[_0xfc1e[12]](function(_0xb807xc){if(!_0xb807xc){return _0xb807x8[_0xfc1e[17]](404)};var _0xb807xe=_[_0xfc1e[31]](_0xb807xc,_0xb807x7[_0xfc1e[23]]);return _0xb807xe[_0xfc1e[32]]()})[_0xfc1e[12]](function(_0xb807xc){return _0xb807x8[_0xfc1e[11]](200)[_0xfc1e[10]](_0xb807xc)})[_0xfc1e[9]](function(_0xb807xa){return handleError(_0xb807x8,_0xb807xa)})};exports[_0xfc1e[34]]= function(_0xb807x7,_0xb807x8){var _0xb807x10;return VoiceContext[_0xfc1e[20]](_0xb807x7[_0xfc1e[19]][_0xfc1e[18]])[_0xfc1e[12]](function(_0xb807xc){_0xb807x10= _0xb807xc;if(!_0xb807x10){return _0xb807x8[_0xfc1e[17]](404)};if(_0xb807x10[_0xfc1e[39]]){return _0xb807x8[_0xfc1e[11]](500)[_0xfc1e[10]]({message:_0xfc1e[40],translatedMessage:_0xfc1e[41]})};return VoiceExtension[_0xfc1e[24]]({where:{context:_0xb807x10[_0xfc1e[22]],VoiceContextId:null}})})[_0xfc1e[12]](function(_0xb807x11){console[_0xfc1e[36]](_0xb807x11);if(_0xb807x11[_0xfc1e[33]]> 0){return _0xb807x8[_0xfc1e[11]](500)[_0xfc1e[10]]({message:_0xfc1e[37],translatedMessage:_0xfc1e[38]})};return _0xb807x10[_0xfc1e[34]]()})[_0xfc1e[12]](function(){return _0xb807x8[_0xfc1e[17]](204)})[_0xfc1e[9]](function(_0xb807xa){console[_0xfc1e[36]](_0xfc1e[35],_0xb807xa);return handleError(_0xb807x8,_0xb807xa)})};exports[_0xfc1e[42]]= function(_0xb807x7,_0xb807x8){var _0xb807x12;return VoiceContext[_0xfc1e[24]]({where:{id:_0xb807x7[_0xfc1e[13]][_0xfc1e[43]]}})[_0xfc1e[12]](function(_0xb807xd){_0xb807x12= _0xb807xd;var _0xb807x13=_[_0xfc1e[44]](_0xb807x12,{defaultEntry:true});if(_0xb807x13){return _0xb807x8[_0xfc1e[11]](500)[_0xfc1e[10]]({message:_0xfc1e[40],translatedMessage:_0xfc1e[41]})};if(!_0xb807x12){return _0xb807x8[_0xfc1e[17]](404)};var _0xb807x14=_[_0xfc1e[46]](_[_0xfc1e[46]](_0xb807x12,_0xfc1e[45]),_0xfc1e[22]);return VoiceExtension[_0xfc1e[24]]({where:{context:_0xb807x14,VoiceContextId:null}})})[_0xfc1e[12]](function(_0xb807x11){if(_0xb807x11[_0xfc1e[33]]> _0xb807x12[_0xfc1e[33]]){return _0xb807x8[_0xfc1e[11]](500)[_0xfc1e[10]]({message:_0xfc1e[37],translatedMessage:_0xfc1e[38]})};return VoiceContext[_0xfc1e[34]]({where:{id:_0xb807x7[_0xfc1e[13]][_0xfc1e[43]]},individualHooks:true})})[_0xfc1e[12]](function(){return _0xb807x8[_0xfc1e[17]](204)})[_0xfc1e[9]](function(_0xb807xa){console[_0xfc1e[36]](_0xb807xa);return handleError(_0xb807x8,_0xb807xa)})};function handleError(_0xb807x8,_0xb807xa){return _0xb807x8[_0xfc1e[11]](500)[_0xfc1e[10]](_0xb807xa)} \ No newline at end of file diff --git a/server/api/voice_context/voice_context.events.js b/server/api/voice_context/voice_context.events.js index c7c0711..0465f21 100644 --- a/server/api/voice_context/voice_context.events.js +++ b/server/api/voice_context/voice_context.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const VoiceContext = require('../../models').VoiceContext; - -var VoiceContextEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -VoiceContextEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - VoiceContext.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - VoiceContextEvents.emit(event + ':' + doc._id, doc); - VoiceContextEvents.emit(event, doc); - done(null); - } -} - -module.exports = VoiceContextEvents; +var _0x7539=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7539[0];const EventEmitter=require(_0x7539[1]);const VoiceContext=require(_0x7539[3])[_0x7539[2]];var VoiceContextEvents= new EventEmitter();VoiceContextEvents[_0x7539[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x7539[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x7539[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x7539[6]};for(var e in events){var event=events[e];VoiceContext[_0x7539[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xbceax8,_0xbceax9,_0xbceaxa){VoiceContextEvents[_0x7539[10]](event+ _0x7539[8]+ _0xbceax8[_0x7539[9]],_0xbceax8);VoiceContextEvents[_0x7539[10]](event,_0xbceax8);_0xbceaxa(null)}}module[_0x7539[11]]= VoiceContextEvents \ No newline at end of file diff --git a/server/api/voice_context/voice_context.socket.js b/server/api/voice_context/voice_context.socket.js index 34a2d6e..b6ad6f8 100644 --- a/server/api/voice_context/voice_context.socket.js +++ b/server/api/voice_context/voice_context.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const VoiceContextEvents = require('./voice_context.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('voice_context:' + event, socket); - - VoiceContextEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - VoiceContextEvents.removeListener(event, listener); - }; -} +var _0x516f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x516f[0];const VoiceContextEvents=require(_0x516f[1]);var events=[_0x516f[2],_0x516f[3]];exports[_0x516f[4]]= function(_0x9c65x3){for(var _0x9c65x4=0,_0x9c65x5=events[_0x516f[5]];_0x9c65x4< _0x9c65x5;_0x9c65x4++){var _0x9c65x6=events[_0x9c65x4];var _0x9c65x7=createListener(_0x516f[6]+ _0x9c65x6,_0x9c65x3);VoiceContextEvents[_0x516f[7]](_0x9c65x6,_0x9c65x7);_0x9c65x3[_0x516f[7]](_0x516f[8],removeListener(_0x9c65x6,_0x9c65x7))}};function createListener(_0x9c65x6,_0x9c65x3){return function(_0x9c65x9){_0x9c65x3[_0x516f[9]](_0x9c65x6,_0x9c65x9)}}function removeListener(_0x9c65x6,_0x9c65x7){return function(){VoiceContextEvents[_0x516f[10]](_0x9c65x6,_0x9c65x7)}} \ No newline at end of file diff --git a/server/api/voice_disposition/index.js b/server/api/voice_disposition/index.js index 2c15433..17e5225 100644 --- a/server/api/voice_disposition/index.js +++ b/server/api/voice_disposition/index.js @@ -1,18 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./voice_disposition.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), controller.index); - -router.get('/:id', auth.isAuthenticated(), controller.show); -router.post('/', auth.isAuthenticated(), controller.create); -router.put('/:id', auth.isAuthenticated(), controller.update); -router.patch('/:id', auth.isAuthenticated(), controller.update); -router.delete('/:id', auth.isAuthenticated(), controller.destroy); - - -module.exports = router; +var _0xf4a6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x70\x61\x74\x63\x68","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf4a6[0];var express=require(_0xf4a6[1]);var auth=require(_0xf4a6[2]);var controller=require(_0xf4a6[3]);var router=express.Router();router[_0xf4a6[7]](_0xf4a6[4],auth[_0xf4a6[5]](),controller[_0xf4a6[6]]);router[_0xf4a6[7]](_0xf4a6[8],auth[_0xf4a6[5]](),controller[_0xf4a6[9]]);router[_0xf4a6[11]](_0xf4a6[4],auth[_0xf4a6[5]](),controller[_0xf4a6[10]]);router[_0xf4a6[13]](_0xf4a6[8],auth[_0xf4a6[5]](),controller[_0xf4a6[12]]);router[_0xf4a6[14]](_0xf4a6[8],auth[_0xf4a6[5]](),controller[_0xf4a6[12]]);router[_0xf4a6[16]](_0xf4a6[8],auth[_0xf4a6[5]](),controller[_0xf4a6[15]]);module[_0xf4a6[17]]= router \ No newline at end of file diff --git a/server/api/voice_disposition/voice_disposition.controller.js b/server/api/voice_disposition/voice_disposition.controller.js index 96b0f15..1e0798e 100644 --- a/server/api/voice_disposition/voice_disposition.controller.js +++ b/server/api/voice_disposition/voice_disposition.controller.js @@ -1,112 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/voice/dispositions -> index - * POST /api/voice/dispositions -> create - * GET /api/voice/dispositions/:id -> show - * PUT /api/voice/dispositions/:id -> update - * DELETE /api/voice/dispositions/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); - -var VoiceDisposition = require('../../models').VoiceDisposition; - - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - console.log(err); - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 200; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of VoiceDispositions -exports.index = function(req, res) { - VoiceDisposition.findAndCountAll() - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Gets a single VoiceDisposition from the DB -exports.show = function(req, res) { - VoiceDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Creates a new VoiceDisposition in the DB -exports.create = function(req, res) { - VoiceDisposition.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing VoiceDisposition in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - VoiceDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a VoiceDisposition from the DB -exports.destroy = function(req, res) { - VoiceDisposition.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} +var _0xa15a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x6C\x6F\x67","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65"];_0xa15a[0];var _=require(_0xa15a[1]);var VoiceDisposition=require(_0xa15a[3])[_0xa15a[2]];function handleError(_0x45c8x4,_0x45c8x5){_0x45c8x5= _0x45c8x5|| 500;return function(_0x45c8x6){console[_0xa15a[4]](_0x45c8x6);_0x45c8x4[_0xa15a[6]](_0x45c8x5)[_0xa15a[5]](_0x45c8x6)}}function responseWithResult(_0x45c8x4,_0x45c8x5){_0x45c8x5= _0x45c8x5|| 200;return function(_0x45c8x8){if(_0x45c8x8){_0x45c8x4[_0xa15a[6]](_0x45c8x5)[_0xa15a[7]](_0x45c8x8)}}}function responseWithoutResult(_0x45c8x4,_0x45c8x5){_0x45c8x5= _0x45c8x5|| 200;return function(){_0x45c8x4[_0xa15a[8]](_0x45c8x5)}}function handleEntityNotFound(_0x45c8x4){return function(_0x45c8x8){if(!_0x45c8x8){_0x45c8x4[_0xa15a[6]](404)[_0xa15a[9]]();return null};return _0x45c8x8}}function saveUpdates(_0x45c8xc){return function(_0x45c8x8){return _0x45c8x8[_0xa15a[11]](_0x45c8xc)[_0xa15a[10]](function(_0x45c8xd){return _0x45c8xd})}}function removeEntity(_0x45c8x4){return function(_0x45c8x8){if(_0x45c8x8){return _0x45c8x8[_0xa15a[12]]()[_0xa15a[10]](function(){_0x45c8x4[_0xa15a[6]](204)[_0xa15a[9]]()})}}}exports[_0xa15a[13]]= function(_0x45c8xf,_0x45c8x4){VoiceDisposition[_0xa15a[15]]()[_0xa15a[10]](responseWithResult(_0x45c8x4))[_0xa15a[14]](handleError(_0x45c8x4))};exports[_0xa15a[16]]= function(_0x45c8xf,_0x45c8x4){VoiceDisposition[_0xa15a[19]](_0x45c8xf[_0xa15a[18]][_0xa15a[17]])[_0xa15a[10]](handleEntityNotFound(_0x45c8x4))[_0xa15a[10]](responseWithResult(_0x45c8x4))[_0xa15a[14]](handleError(_0x45c8x4))};exports[_0xa15a[20]]= function(_0x45c8xf,_0x45c8x4){VoiceDisposition[_0xa15a[20]](_0x45c8xf[_0xa15a[21]])[_0xa15a[10]](responseWithResult(_0x45c8x4,201))[_0xa15a[14]](handleError(_0x45c8x4))};exports[_0xa15a[22]]= function(_0x45c8xf,_0x45c8x4){if(_0x45c8xf[_0xa15a[21]][_0xa15a[17]]){delete _0x45c8xf[_0xa15a[21]][_0xa15a[17]]};VoiceDisposition[_0xa15a[19]](_0x45c8xf[_0xa15a[18]][_0xa15a[17]])[_0xa15a[10]](handleEntityNotFound(_0x45c8x4))[_0xa15a[10]](saveUpdates(_0x45c8xf[_0xa15a[21]]))[_0xa15a[10]](responseWithResult(_0x45c8x4))[_0xa15a[14]](handleError(_0x45c8x4))};exports[_0xa15a[12]]= function(_0x45c8xf,_0x45c8x4){VoiceDisposition[_0xa15a[19]](_0x45c8xf[_0xa15a[18]][_0xa15a[17]])[_0xa15a[10]](handleEntityNotFound(_0x45c8x4))[_0xa15a[10]](removeEntity(_0x45c8x4))[_0xa15a[14]](handleError(_0x45c8x4))} \ No newline at end of file diff --git a/server/api/voice_disposition/voice_disposition.events.js b/server/api/voice_disposition/voice_disposition.events.js index 8436878..b4dbc59 100644 --- a/server/api/voice_disposition/voice_disposition.events.js +++ b/server/api/voice_disposition/voice_disposition.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const VoiceDisposition = require('../../models').VoiceDisposition; - -var VoiceDispositionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -VoiceDispositionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - VoiceDisposition.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - VoiceDispositionEvents.emit(event + ':' + doc._id, doc); - VoiceDispositionEvents.emit(event, doc); - done(null); - } -} - -module.exports = VoiceDispositionEvents; +var _0x396c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x396c[0];const EventEmitter=require(_0x396c[1]);const VoiceDisposition=require(_0x396c[3])[_0x396c[2]];var VoiceDispositionEvents= new EventEmitter();VoiceDispositionEvents[_0x396c[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x396c[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x396c[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x396c[6]};for(var e in events){var event=events[e];VoiceDisposition[_0x396c[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x8adex8,_0x8adex9,_0x8adexa){VoiceDispositionEvents[_0x396c[10]](event+ _0x396c[8]+ _0x8adex8[_0x396c[9]],_0x8adex8);VoiceDispositionEvents[_0x396c[10]](event,_0x8adex8);_0x8adexa(null)}}module[_0x396c[11]]= VoiceDispositionEvents \ No newline at end of file diff --git a/server/api/voice_disposition/voice_disposition.socket.js b/server/api/voice_disposition/voice_disposition.socket.js index 6cfaf1c..66b4bc8 100644 --- a/server/api/voice_disposition/voice_disposition.socket.js +++ b/server/api/voice_disposition/voice_disposition.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const VoiceDispositionEvents = require('./voice_disposition.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('voice_disposition:' + event, socket); - - VoiceDispositionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - VoiceDispositionEvents.removeListener(event, listener); - }; -} +var _0x2517=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x2517[0];const VoiceDispositionEvents=require(_0x2517[1]);var events=[_0x2517[2],_0x2517[3]];exports[_0x2517[4]]= function(_0x93d2x3){for(var _0x93d2x4=0,_0x93d2x5=events[_0x2517[5]];_0x93d2x4< _0x93d2x5;_0x93d2x4++){var _0x93d2x6=events[_0x93d2x4];var _0x93d2x7=createListener(_0x2517[6]+ _0x93d2x6,_0x93d2x3);VoiceDispositionEvents[_0x2517[7]](_0x93d2x6,_0x93d2x7);_0x93d2x3[_0x2517[7]](_0x2517[8],removeListener(_0x93d2x6,_0x93d2x7))}};function createListener(_0x93d2x6,_0x93d2x3){return function(_0x93d2x9){_0x93d2x3[_0x2517[9]](_0x93d2x6,_0x93d2x9)}}function removeListener(_0x93d2x6,_0x93d2x7){return function(){VoiceDispositionEvents[_0x2517[10]](_0x93d2x6,_0x93d2x7)}} \ No newline at end of file diff --git a/server/api/voice_extension/index.js b/server/api/voice_extension/index.js index 29591db..6701514 100644 --- a/server/api/voice_extension/index.js +++ b/server/api/voice_extension/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./voice_extension.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy); //check it for apps -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy); //check it for apps - -module.exports = router; +var _0x873e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x873e[0];var express=require(_0x873e[1]);var controller=require(_0x873e[2]);var auth=require(_0x873e[3]);var router=express.Router();router[_0x873e[9]](_0x873e[4],auth[_0x873e[5]](),auth[_0x873e[7]]([7],[_0x873e[6]]),controller[_0x873e[8]]);router[_0x873e[9]](_0x873e[10],auth[_0x873e[5]](),auth[_0x873e[7]]([7],[_0x873e[6]]),controller[_0x873e[11]]);router[_0x873e[13]](_0x873e[4],auth[_0x873e[5]](),auth[_0x873e[7]]([7],[_0x873e[6]]),controller[_0x873e[12]]);router[_0x873e[15]](_0x873e[10],auth[_0x873e[5]](),auth[_0x873e[7]]([7],[_0x873e[6]]),controller[_0x873e[14]]);router[_0x873e[17]](_0x873e[4],auth[_0x873e[5]](),auth[_0x873e[7]]([7],[_0x873e[6]]),controller[_0x873e[16]]);router[_0x873e[17]](_0x873e[10],auth[_0x873e[5]](),auth[_0x873e[7]]([7],[_0x873e[6]]),controller[_0x873e[18]]);module[_0x873e[19]]= router \ No newline at end of file diff --git a/server/api/voice_extension/voice_extension.controller.js b/server/api/voice_extension/voice_extension.controller.js index 8a6ec34..2df4fad 100644 --- a/server/api/voice_extension/voice_extension.controller.js +++ b/server/api/voice_extension/voice_extension.controller.js @@ -1,148 +1 @@ -'use strict'; - -var _ = require('lodash'); -var VoiceExtension = require('../../models').VoiceExtension; -var Interval = require('../../models').Interval; -var sequelize = require('../../models').sequelize; -var Sequelize = require('../../models').Sequelize; -var util = require('util'); -var async = require('async'); -var veUtil = require('../../utils/voice_extension'); -var Util = require('../../config/util'); - -var Applications = veUtil.Applications; - -// Get list of extensions -exports.index = function(req, res, next) { - return VoiceExtension - .scope('routes', 'application') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get a single voice_extension or application -exports.show = function(req, res) { - return VoiceExtension - .scope('application') - .findOne({ - where: { - id: req.params.id, - VoiceExtensionId: null - } - }) - .then(function(voice_extension) { - if (!voice_extension) { - return res.sendStatus(404); - } - return res.send(voice_extension); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.create = function(req, res) { - var _route; - return sequelize.transaction(function(t) { - return VoiceExtension - .create(req.body, { - transaction: t - }) - .then(function(route) { - _route = route; - if (req.body.Applications && Array.isArray(req.body.Applications) && req.body.Applications.length) { - return route; - } - }) - .then(veUtil.createApps(req.body.Applications, t, res)); - }) - .then(function() { - return res.status(201).send(_route); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - err.message = 'Extension/context combination already exist'; - err.translatedMessage = 'MESSAGE_EXIST_ROUTE' - return handleError(res, err); - }) - .catch(sequelize.ValidationError, function(err) { - err.message = 'Extension/context combination already exist'; - err.translatedMessage = 'MESSAGE_EXIST_ROUTE' - return handleError(res, err); - }) - .catch(function(err) { - console.log('err', err); - return handleError(res, err); - }); -} - - - -// Updates an existing voice_extension in the DB. -exports.update = function(req, res) { - return sequelize.transaction(function(t) { - return veUtil.routeUpdate(req, t); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - err.message = 'Extension/context combination already exist'; - err.translatedMessage = 'MESSAGE_EXIST_ROUTE' - console.log(err); - return handleError(res, err); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -} - -// Deletes a voice_extension from the DB. -exports.destroy = function(req, res, next) { - return sequelize.transaction(function(t) { - return VoiceExtension - .findById(req.params.id) - .then(function(voice_extension) { - if (!voice_extension) { - return res.sendStatus(404); - } - return voice_extension.destroy(); - }); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Deletes from the DB. -exports.bulkDestroy = function(req, res) { - return VoiceExtension - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x8fc2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x53\x65\x71\x75\x65\x6C\x69\x7A\x65","\x75\x74\x69\x6C","\x61\x73\x79\x6E\x63","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x75\x74\x65\x73","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x65\x72\x72","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x66\x69\x6E\x64\x42\x79\x49\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0x8fc2[0];var _=require(_0x8fc2[1]);var VoiceExtension=require(_0x8fc2[3])[_0x8fc2[2]];var Interval=require(_0x8fc2[3])[_0x8fc2[4]];var sequelize=require(_0x8fc2[3])[_0x8fc2[5]];var Sequelize=require(_0x8fc2[3])[_0x8fc2[6]];var util=require(_0x8fc2[7]);var async=require(_0x8fc2[8]);var veUtil=require(_0x8fc2[9]);var Util=require(_0x8fc2[10]);var Applications=veUtil[_0x8fc2[11]];exports[_0x8fc2[12]]= function(_0x7700xb,_0x7700xc,_0x7700xd){return VoiceExtension[_0x8fc2[24]](_0x8fc2[22],_0x8fc2[23])[_0x8fc2[21]](_[_0x8fc2[20]](Util[_0x8fc2[19]](_0x7700xb[_0x8fc2[18]]),{distinct:true}))[_0x8fc2[17]](function(_0x7700xf){_0x7700xc[_0x8fc2[16]](200)[_0x8fc2[15]](_0x7700xf)})[_0x8fc2[14]](function(_0x7700xe){console[_0x8fc2[13]](_0x7700xe);return handleError(_0x7700xc,_0x7700xe)})};exports[_0x8fc2[25]]= function(_0x7700xb,_0x7700xc){return VoiceExtension[_0x8fc2[24]](_0x8fc2[23])[_0x8fc2[29]]({where:{id:_0x7700xb[_0x8fc2[28]][_0x8fc2[27]],VoiceExtensionId:null}})[_0x8fc2[17]](function(_0x7700x10){if(!_0x7700x10){return _0x7700xc[_0x8fc2[26]](404)};return _0x7700xc[_0x8fc2[15]](_0x7700x10)})[_0x8fc2[14]](function(_0x7700xe){return handleError(_0x7700xc,_0x7700xe)})};exports[_0x8fc2[30]]= function(_0x7700xb,_0x7700xc){var _0x7700x11;return sequelize[_0x8fc2[40]](function(_0x7700x12){return VoiceExtension[_0x8fc2[30]](_0x7700xb[_0x8fc2[36]],{transaction:_0x7700x12})[_0x8fc2[17]](function(_0x7700x13){_0x7700x11= _0x7700x13;if(_0x7700xb[_0x8fc2[36]][_0x8fc2[11]]&& Array[_0x8fc2[38]](_0x7700xb[_0x8fc2[36]].Applications)&& _0x7700xb[_0x8fc2[36]][_0x8fc2[11]][_0x8fc2[39]]){return _0x7700x13}})[_0x8fc2[17]](veUtil[_0x8fc2[37]](_0x7700xb[_0x8fc2[36]].Applications,_0x7700x12,_0x7700xc))})[_0x8fc2[17]](function(){return _0x7700xc[_0x8fc2[16]](201)[_0x8fc2[15]](_0x7700x11)})[_0x8fc2[14]](sequelize.UniqueConstraintError,function(_0x7700xe){_0x7700xe[_0x8fc2[32]]= _0x8fc2[33];_0x7700xe[_0x8fc2[34]]= _0x8fc2[35];return handleError(_0x7700xc,_0x7700xe)})[_0x8fc2[14]](sequelize.ValidationError,function(_0x7700xe){_0x7700xe[_0x8fc2[32]]= _0x8fc2[33];_0x7700xe[_0x8fc2[34]]= _0x8fc2[35];return handleError(_0x7700xc,_0x7700xe)})[_0x8fc2[14]](function(_0x7700xe){console[_0x8fc2[13]](_0x8fc2[31],_0x7700xe);return handleError(_0x7700xc,_0x7700xe)})};exports[_0x8fc2[41]]= function(_0x7700xb,_0x7700xc){return sequelize[_0x8fc2[40]](function(_0x7700x12){return veUtil[_0x8fc2[42]](_0x7700xb,_0x7700x12)})[_0x8fc2[17]](function(){return _0x7700xc[_0x8fc2[26]](200)})[_0x8fc2[14]](sequelize.UniqueConstraintError,function(_0x7700xe){_0x7700xe[_0x8fc2[32]]= _0x8fc2[33];_0x7700xe[_0x8fc2[34]]= _0x8fc2[35];console[_0x8fc2[13]](_0x7700xe);return handleError(_0x7700xc,_0x7700xe)})[_0x8fc2[14]](function(_0x7700xe){console[_0x8fc2[13]](_0x7700xe);return handleError(_0x7700xc,_0x7700xe)})};exports[_0x8fc2[43]]= function(_0x7700xb,_0x7700xc,_0x7700xd){return sequelize[_0x8fc2[40]](function(_0x7700x12){return VoiceExtension[_0x8fc2[44]](_0x7700xb[_0x8fc2[28]][_0x8fc2[27]])[_0x8fc2[17]](function(_0x7700x10){if(!_0x7700x10){return _0x7700xc[_0x8fc2[26]](404)};return _0x7700x10[_0x8fc2[43]]()})})[_0x8fc2[17]](function(){return _0x7700xc[_0x8fc2[26]](204)})[_0x8fc2[14]](function(_0x7700xe){console[_0x8fc2[13]](_0x7700xe);return handleError(_0x7700xc,_0x7700xe)})};exports[_0x8fc2[45]]= function(_0x7700xb,_0x7700xc){return VoiceExtension[_0x8fc2[43]]({where:{id:_0x7700xb[_0x8fc2[18]][_0x8fc2[46]]},individualHooks:true})[_0x8fc2[17]](function(){return _0x7700xc[_0x8fc2[26]](204)})[_0x8fc2[14]](function(_0x7700xe){return handleError(_0x7700xc,_0x7700xe)})};function handleError(_0x7700xc,_0x7700xe){return _0x7700xc[_0x8fc2[16]](500)[_0x8fc2[15]](_0x7700xe)} \ No newline at end of file diff --git a/server/api/voice_extension/voice_extension.events.js b/server/api/voice_extension/voice_extension.events.js index 2facad8..9cf47db 100644 --- a/server/api/voice_extension/voice_extension.events.js +++ b/server/api/voice_extension/voice_extension.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const VoiceExtension = require('../../models').VoiceExtension; - -var VoiceExtensionEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -VoiceExtensionEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'update', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - VoiceExtension.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - VoiceExtensionEvents.emit(event + ':' + doc._id, doc); - VoiceExtensionEvents.emit(event, doc); - done(null); - } -} - -module.exports = VoiceExtensionEvents; +var _0x6314=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x6314[0];const EventEmitter=require(_0x6314[1]);const VoiceExtension=require(_0x6314[3])[_0x6314[2]];var VoiceExtensionEvents= new EventEmitter();VoiceExtensionEvents[_0x6314[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x6314[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x6314[6],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x6314[7]};for(var e in events){var event=events[e];VoiceExtension[_0x6314[8]](e,emitEvent(event))};function emitEvent(event){return function(_0x741cx8,_0x741cx9,_0x741cxa){VoiceExtensionEvents[_0x6314[11]](event+ _0x6314[9]+ _0x741cx8[_0x6314[10]],_0x741cx8);VoiceExtensionEvents[_0x6314[11]](event,_0x741cx8);_0x741cxa(null)}}module[_0x6314[12]]= VoiceExtensionEvents \ No newline at end of file diff --git a/server/api/voice_extension/voice_extension.socket.js b/server/api/voice_extension/voice_extension.socket.js index 7f2dca6..c598983 100644 --- a/server/api/voice_extension/voice_extension.socket.js +++ b/server/api/voice_extension/voice_extension.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const VoiceExtensionEvents = require('./voice_extension.events'); - -// Model events to emit -var events = ['save', 'update', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('voice_extension:' + event, socket); - - VoiceExtensionEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - VoiceExtensionEvents.removeListener(event, listener); - }; -} +var _0x191b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x75\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x191b[0];const VoiceExtensionEvents=require(_0x191b[1]);var events=[_0x191b[2],_0x191b[3],_0x191b[4]];exports[_0x191b[5]]= function(_0x3285x3){for(var _0x3285x4=0,_0x3285x5=events[_0x191b[6]];_0x3285x4< _0x3285x5;_0x3285x4++){var _0x3285x6=events[_0x3285x4];var _0x3285x7=createListener(_0x191b[7]+ _0x3285x6,_0x3285x3);VoiceExtensionEvents[_0x191b[8]](_0x3285x6,_0x3285x7);_0x3285x3[_0x191b[8]](_0x191b[9],removeListener(_0x3285x6,_0x3285x7))}};function createListener(_0x3285x6,_0x3285x3){return function(_0x3285x9){_0x3285x3[_0x191b[10]](_0x3285x6,_0x3285x9)}}function removeListener(_0x3285x6,_0x3285x7){return function(){VoiceExtensionEvents[_0x191b[11]](_0x3285x6,_0x3285x7)}} \ No newline at end of file diff --git a/server/api/voice_musiconhold/index.js b/server/api/voice_musiconhold/index.js index 8bcbd0e..6c26f9f 100644 --- a/server/api/voice_musiconhold/index.js +++ b/server/api/voice_musiconhold/index.js @@ -1,21 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./voice_musiconhold.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index); -router.get('/stream', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.stream); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show); -router.get('/:id/files', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.showAudioFiles); -router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create); -router.post('/validate', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.mohValidation); -router.post('/:id/files', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.addFiles); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy); -router.delete('/:id/files', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.deleteAudioFiles); - -module.exports = router; +var _0x830f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x73\x74\x72\x65\x61\x6D","\x73\x74\x72\x65\x61\x6D","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x66\x69\x6C\x65\x73","\x73\x68\x6F\x77\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x6D\x6F\x68\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x6C\x65\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x830f[0];var express=require(_0x830f[1]);var controller=require(_0x830f[2]);var auth=require(_0x830f[3]);var router=express.Router();router[_0x830f[9]](_0x830f[4],auth[_0x830f[5]](),auth[_0x830f[7]]([7],[_0x830f[6]]),controller[_0x830f[8]]);router[_0x830f[9]](_0x830f[10],auth[_0x830f[5]](),auth[_0x830f[7]]([7],[_0x830f[6]]),controller[_0x830f[11]]);router[_0x830f[9]](_0x830f[12],auth[_0x830f[5]](),auth[_0x830f[7]]([7],[_0x830f[6]]),controller[_0x830f[13]]);router[_0x830f[9]](_0x830f[14],auth[_0x830f[5]](),auth[_0x830f[7]]([7],[_0x830f[6]]),controller[_0x830f[15]]);router[_0x830f[17]](_0x830f[4],auth[_0x830f[5]](),auth[_0x830f[7]]([7],[_0x830f[6]]),controller[_0x830f[16]]);router[_0x830f[17]](_0x830f[18],auth[_0x830f[5]](),auth[_0x830f[7]]([7],[_0x830f[6]]),controller[_0x830f[19]]);router[_0x830f[17]](_0x830f[14],auth[_0x830f[5]](),auth[_0x830f[7]]([7],[_0x830f[6]]),controller[_0x830f[20]]);router[_0x830f[22]](_0x830f[12],auth[_0x830f[5]](),auth[_0x830f[7]]([7],[_0x830f[6]]),controller[_0x830f[21]]);router[_0x830f[24]](_0x830f[4],auth[_0x830f[5]](),auth[_0x830f[7]]([7],[_0x830f[6]]),controller[_0x830f[23]]);router[_0x830f[24]](_0x830f[12],auth[_0x830f[5]](),auth[_0x830f[7]]([7],[_0x830f[6]]),controller[_0x830f[25]]);router[_0x830f[24]](_0x830f[14],auth[_0x830f[5]](),auth[_0x830f[7]]([7],[_0x830f[6]]),controller[_0x830f[26]]);module[_0x830f[27]]= router \ No newline at end of file diff --git a/server/api/voice_musiconhold/voice_musiconhold.controller.js b/server/api/voice_musiconhold/voice_musiconhold.controller.js index 83c6288..2517181 100644 --- a/server/api/voice_musiconhold/voice_musiconhold.controller.js +++ b/server/api/voice_musiconhold/voice_musiconhold.controller.js @@ -1,290 +1 @@ -'use strict'; - -var fs = require('fs'); -var _ = require('lodash'); -var path = require('path'); -var util = require('util'); -var fse = require('fs-extra'); -var remove = require('remove'); -var base64 = require('file-base64'); - -var config = require('../../config/environment'); -var Util = require('../../config/util'); - -var Sound = require('../../models').Sound; -var Setting = require('../../models').Setting; -var sequelize = require('../../models').sequelize; -var VoiceMusicOnHold = require('../../models').VoiceMusicOnHold; - - -// Get list of voice_musiconholds -exports.index = function(req, res) { - return VoiceMusicOnHold - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single voiceMusiconhold -exports.show = function(req, res) { - return VoiceMusicOnHold - .findById(req.params.id) - .then(function(voiceMusiconhold) { - if (!voiceMusiconhold) { - return res.sendStatus(404); - } - return res.send(voiceMusiconhold); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Add files to moh class -exports.addFiles = function(req, res) { - var _voiceMusiconhold, _soundFiles; - return VoiceMusicOnHold - .findById(req.params.id) - .then(function(voiceMusiconhold) { - if (!voiceMusiconhold) { - return res.sendStatus(404); - } - _voiceMusiconhold = voiceMusiconhold; - - return Sound - .findAll({ - where: { - id: req.body.sounds - } - }); - }) - .then(function(soundFiles) { - _soundFiles = soundFiles; - - return Setting - .findById(1); - }) - .then(function(settings) { - - var dest; - _soundFiles.forEach(function(elem) { - dest = path.join(_voiceMusiconhold.directory, elem.display_name + '.wav'); - fse.copySync(path.join(settings.soundPath || '/var/opt/motion/server/files/sounds/converted', elem.save_name + '.wav'), dest); - }); - fs.chmodSync(dest, parseInt('0777', 8)); - res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.showAudioFiles = function(req, res) { - var fileObject = {}; - VoiceMusicOnHold - .findById(req.params.id) - .then(function(voiceMusiconhold) { - if (!voiceMusiconhold) { - return res.sendStatus(404); - } - fileObject.path = voiceMusiconhold.directory; - fs.readdir(voiceMusiconhold.directory, function(err, files) { - if (!err) { - fileObject.files = files; - return res.send(fileObject); - } else { - throw err; - } - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.deleteAudioFiles = function(req, res) { - return VoiceMusicOnHold - .findById(req.params.id) - .then(function(voiceMusiconhold) { - if (!voiceMusiconhold) { - return res.sendStatus(404); - } - var deletePath = voiceMusiconhold.directory + '/' + req.query.filename; - fs.unlink(deletePath, function(err) { - if (err) { - return handleError(res, err); - } else { - return res.sendStatus(204); - } - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Validate the existence of a route -exports.mohValidation = function(req, res) { - console.log(req.body); - return VoiceMusicOnHold - .findAll({ - where: { - name: req.body.name, - } - }) - .then(function(voice_mohs) { - if (!voice_mohs) { - return res.sendStatus(404); - } - return res.send(voice_mohs); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new voiceMusiconhold in the DB. -exports.create = function(req, res) { - return sequelize.transaction().then(function(t) { - req.body.directory = path.join(config.root, 'server/files/moh', req.body.name); - return VoiceMusicOnHold - .create(req.body, { - transaction: t - }) - .then(function(voiceMusiconhold) { - fs.mkdir(voiceMusiconhold.directory, parseInt('0777', 8), function(err) { - if (err) { - console.log('file error'); - t.rollback(); - return res.status(500).send({ - message: 'MESSAGE_FILE_CREATION_ERROR' - }); - } - t.commit(); - console.log('file created'); - return res.status(201).send(voiceMusiconhold); - }); - }) - .catch(function(err) { - t.rollback(); - }); - }) -}; - -// Updates an existing voiceMusiconhold in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - - return VoiceMusicOnHold - .findById(req.params.id) - .then(function(voiceMusiconhold) { - if (!voiceMusiconhold) { - return res.sendStatus(404); - } - var updated = _.merge(voiceMusiconhold, req.body); - - return updated - .save(); - }) - .then(function(voiceMusiconhold) { - return res.status(200).send(voiceMusiconhold); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a voiceMusiconhold from the DB. -exports.destroy = function(req, res) { - var _voicemoh; - return sequelize.transaction(function(t) { - return VoiceMusicOnHold - .findById(req.params.id) - .then(function(voiceMusiconhold) { - if (!voiceMusiconhold) { - return res.sendStatus(404); - } - _voicemoh = voiceMusiconhold; - return voiceMusiconhold.destroy({ - transaction: t - }); - }) - .then(function() { - remove(_voicemoh.directory, function(err) { - if (err) { - console.log(err); - } - return res.sendStatus(204); - }); - }) - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes multiple voice_musiconholds from the DB. -exports.bulkDestroy = function(req, res) { - var _voicemohs; - return sequelize.transaction(function(t) { - return VoiceMusicOnHold - .findAll({ - where: { - id: req.query.ids - } - }) - .then(function(voice_musiconholds) { - if (!voice_musiconholds) { - return res.sendStatus(404); - } - _voicemohs = voice_musiconholds; - var bulkDest = []; - voice_musiconholds.forEach(function(element) { - bulkDest.push(element.destroy({ - transaction: t - })); - }); - return bulkDest; - }) - .all() - .then(function() { - _voicemohs.forEach(function(element) { - remove(element.directory, function(err) { - if (err) { - console.log(err); - throw err - } - }); - }) - }); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// stream a moh file -exports.stream = function(req, res) { - var filepath = decodeURI(req.query.path); - base64.encode(filepath, function(err, base64String) { - if (err) { - return handleError(res, err); - } else { - return res.status(200).send(base64String); - } - }); -}; - -function handleError(res, err) { - console.log(err); - return res.status(500).send(err); -} +var _0xae6f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x6C\x6F\x64\x61\x73\x68","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x66\x73\x2D\x65\x78\x74\x72\x61","\x72\x65\x6D\x6F\x76\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x53\x6F\x75\x6E\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x65\x74\x74\x69\x6E\x67","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x46\x69\x6C\x65\x73","\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x2E\x77\x61\x76","\x6A\x6F\x69\x6E","\x73\x6F\x75\x6E\x64\x50\x61\x74\x68","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x63\x6F\x70\x79\x53\x79\x6E\x63","\x66\x6F\x72\x45\x61\x63\x68","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x73\x6F\x75\x6E\x64\x73","\x62\x6F\x64\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x66\x69\x6C\x65\x73","\x72\x65\x61\x64\x64\x69\x72","\x64\x65\x6C\x65\x74\x65\x41\x75\x64\x69\x6F\x46\x69\x6C\x65\x73","\x2F","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x75\x6E\x6C\x69\x6E\x6B","\x6D\x6F\x68\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x6C\x6F\x67","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x6D\x6F\x68","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x66\x69\x6C\x65\x20\x65\x72\x72\x6F\x72","\x4D\x45\x53\x53\x41\x47\x45\x5F\x46\x49\x4C\x45\x5F\x43\x52\x45\x41\x54\x49\x4F\x4E\x5F\x45\x52\x52\x4F\x52","\x63\x6F\x6D\x6D\x69\x74","\x66\x69\x6C\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x6D\x6B\x64\x69\x72","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x70\x75\x73\x68","\x69\x64\x73","\x73\x74\x72\x65\x61\x6D","\x65\x6E\x63\x6F\x64\x65"];_0xae6f[0];var fs=require(_0xae6f[1]);var _=require(_0xae6f[2]);var path=require(_0xae6f[3]);var util=require(_0xae6f[4]);var fse=require(_0xae6f[5]);var remove=require(_0xae6f[6]);var base64=require(_0xae6f[7]);var config=require(_0xae6f[8]);var Util=require(_0xae6f[9]);var Sound=require(_0xae6f[11])[_0xae6f[10]];var Setting=require(_0xae6f[11])[_0xae6f[12]];var sequelize=require(_0xae6f[11])[_0xae6f[13]];var VoiceMusicOnHold=require(_0xae6f[11])[_0xae6f[14]];exports[_0xae6f[15]]= function(_0x1c7axe,_0x1c7axf){return VoiceMusicOnHold[_0xae6f[22]](Util[_0xae6f[21]](_0x1c7axe[_0xae6f[20]]))[_0xae6f[19]](function(_0x1c7ax11){_0x1c7axf[_0xae6f[18]](200)[_0xae6f[17]](_0x1c7ax11)})[_0xae6f[16]](function(_0x1c7ax10){return handleError(_0x1c7axf,_0x1c7ax10)})};exports[_0xae6f[23]]= function(_0x1c7axe,_0x1c7axf){return VoiceMusicOnHold[_0xae6f[27]](_0x1c7axe[_0xae6f[26]][_0xae6f[25]])[_0xae6f[19]](function(_0x1c7ax12){if(!_0x1c7ax12){return _0x1c7axf[_0xae6f[24]](404)};return _0x1c7axf[_0xae6f[17]](_0x1c7ax12)})[_0xae6f[16]](function(_0x1c7ax10){return handleError(_0x1c7axf,_0x1c7ax10)})};exports[_0xae6f[28]]= function(_0x1c7axe,_0x1c7axf){var _0x1c7ax13,_0x1c7ax14;return VoiceMusicOnHold[_0xae6f[27]](_0x1c7axe[_0xae6f[26]][_0xae6f[25]])[_0xae6f[19]](function(_0x1c7ax12){if(!_0x1c7ax12){return _0x1c7axf[_0xae6f[24]](404)};_0x1c7ax13= _0x1c7ax12;return Sound[_0xae6f[42]]({where:{id:_0x1c7axe[_0xae6f[41]][_0xae6f[40]]}})})[_0xae6f[19]](function(_0x1c7ax18){_0x1c7ax14= _0x1c7ax18;return Setting[_0xae6f[27]](1)})[_0xae6f[19]](function(_0x1c7ax15){var _0x1c7ax16;_0x1c7ax14[_0xae6f[37]](function(_0x1c7ax17){_0x1c7ax16= path[_0xae6f[32]](_0x1c7ax13[_0xae6f[29]],_0x1c7ax17[_0xae6f[30]]+ _0xae6f[31]);fse[_0xae6f[36]](path[_0xae6f[32]](_0x1c7ax15[_0xae6f[33]]|| _0xae6f[34],_0x1c7ax17[_0xae6f[35]]+ _0xae6f[31]),_0x1c7ax16)});fs[_0xae6f[39]](_0x1c7ax16,parseInt(_0xae6f[38],8));_0x1c7axf[_0xae6f[24]](200)})[_0xae6f[16]](function(_0x1c7ax10){return handleError(_0x1c7axf,_0x1c7ax10)})};exports[_0xae6f[43]]= function(_0x1c7axe,_0x1c7axf){var _0x1c7ax19={};VoiceMusicOnHold[_0xae6f[27]](_0x1c7axe[_0xae6f[26]][_0xae6f[25]])[_0xae6f[19]](function(_0x1c7ax12){if(!_0x1c7ax12){return _0x1c7axf[_0xae6f[24]](404)};_0x1c7ax19[_0xae6f[3]]= _0x1c7ax12[_0xae6f[29]];fs[_0xae6f[45]](_0x1c7ax12[_0xae6f[29]],function(_0x1c7ax10,_0x1c7ax1a){if(!_0x1c7ax10){_0x1c7ax19[_0xae6f[44]]= _0x1c7ax1a;return _0x1c7axf[_0xae6f[17]](_0x1c7ax19)}else {throw _0x1c7ax10}})})[_0xae6f[16]](function(_0x1c7ax10){return handleError(_0x1c7axf,_0x1c7ax10)})};exports[_0xae6f[46]]= function(_0x1c7axe,_0x1c7axf){return VoiceMusicOnHold[_0xae6f[27]](_0x1c7axe[_0xae6f[26]][_0xae6f[25]])[_0xae6f[19]](function(_0x1c7ax12){if(!_0x1c7ax12){return _0x1c7axf[_0xae6f[24]](404)};var _0x1c7ax1b=_0x1c7ax12[_0xae6f[29]]+ _0xae6f[47]+ _0x1c7axe[_0xae6f[20]][_0xae6f[48]];fs[_0xae6f[49]](_0x1c7ax1b,function(_0x1c7ax10){if(_0x1c7ax10){return handleError(_0x1c7axf,_0x1c7ax10)}else {return _0x1c7axf[_0xae6f[24]](204)}})})[_0xae6f[16]](function(_0x1c7ax10){return handleError(_0x1c7axf,_0x1c7ax10)})};exports[_0xae6f[50]]= function(_0x1c7axe,_0x1c7axf){console[_0xae6f[51]](_0x1c7axe[_0xae6f[41]]);return VoiceMusicOnHold[_0xae6f[42]]({where:{name:_0x1c7axe[_0xae6f[41]][_0xae6f[52]]}})[_0xae6f[19]](function(_0x1c7ax1c){if(!_0x1c7ax1c){return _0x1c7axf[_0xae6f[24]](404)};return _0x1c7axf[_0xae6f[17]](_0x1c7ax1c)})[_0xae6f[16]](function(_0x1c7ax10){return handleError(_0x1c7axf,_0x1c7ax10)})};exports[_0xae6f[53]]= function(_0x1c7axe,_0x1c7axf){return sequelize[_0xae6f[62]]()[_0xae6f[19]](function(_0x1c7ax1d){_0x1c7axe[_0xae6f[41]][_0xae6f[29]]= path[_0xae6f[32]](config[_0xae6f[54]],_0xae6f[55],_0x1c7axe[_0xae6f[41]][_0xae6f[52]]);return VoiceMusicOnHold[_0xae6f[53]](_0x1c7axe[_0xae6f[41]],{transaction:_0x1c7ax1d})[_0xae6f[19]](function(_0x1c7ax12){fs[_0xae6f[61]](_0x1c7ax12[_0xae6f[29]],parseInt(_0xae6f[38],8),function(_0x1c7ax10){if(_0x1c7ax10){console[_0xae6f[51]](_0xae6f[57]);_0x1c7ax1d[_0xae6f[56]]();return _0x1c7axf[_0xae6f[18]](500)[_0xae6f[17]]({message:_0xae6f[58]})};_0x1c7ax1d[_0xae6f[59]]();console[_0xae6f[51]](_0xae6f[60]);return _0x1c7axf[_0xae6f[18]](201)[_0xae6f[17]](_0x1c7ax12)})})[_0xae6f[16]](function(_0x1c7ax10){_0x1c7ax1d[_0xae6f[56]]()})})};exports[_0xae6f[63]]= function(_0x1c7axe,_0x1c7axf){if(_0x1c7axe[_0xae6f[41]][_0xae6f[25]]){delete _0x1c7axe[_0xae6f[41]][_0xae6f[25]]};return VoiceMusicOnHold[_0xae6f[27]](_0x1c7axe[_0xae6f[26]][_0xae6f[25]])[_0xae6f[19]](function(_0x1c7ax12){if(!_0x1c7ax12){return _0x1c7axf[_0xae6f[24]](404)};var _0x1c7ax1e=_[_0xae6f[64]](_0x1c7ax12,_0x1c7axe[_0xae6f[41]]);return _0x1c7ax1e[_0xae6f[65]]()})[_0xae6f[19]](function(_0x1c7ax12){return _0x1c7axf[_0xae6f[18]](200)[_0xae6f[17]](_0x1c7ax12)})[_0xae6f[16]](function(_0x1c7ax10){return handleError(_0x1c7axf,_0x1c7ax10)})};exports[_0xae6f[66]]= function(_0x1c7axe,_0x1c7axf){var _0x1c7ax1f;return sequelize[_0xae6f[62]](function(_0x1c7ax1d){return VoiceMusicOnHold[_0xae6f[27]](_0x1c7axe[_0xae6f[26]][_0xae6f[25]])[_0xae6f[19]](function(_0x1c7ax12){if(!_0x1c7ax12){return _0x1c7axf[_0xae6f[24]](404)};_0x1c7ax1f= _0x1c7ax12;return _0x1c7ax12[_0xae6f[66]]({transaction:_0x1c7ax1d})})[_0xae6f[19]](function(){remove(_0x1c7ax1f[_0xae6f[29]],function(_0x1c7ax10){if(_0x1c7ax10){console[_0xae6f[51]](_0x1c7ax10)};return _0x1c7axf[_0xae6f[24]](204)})})})[_0xae6f[16]](function(_0x1c7ax10){return handleError(_0x1c7axf,_0x1c7ax10)})};exports[_0xae6f[67]]= function(_0x1c7axe,_0x1c7axf){var _0x1c7ax20;return sequelize[_0xae6f[62]](function(_0x1c7ax1d){return VoiceMusicOnHold[_0xae6f[42]]({where:{id:_0x1c7axe[_0xae6f[20]][_0xae6f[70]]}})[_0xae6f[19]](function(_0x1c7ax22){if(!_0x1c7ax22){return _0x1c7axf[_0xae6f[24]](404)};_0x1c7ax20= _0x1c7ax22;var _0x1c7ax23=[];_0x1c7ax22[_0xae6f[37]](function(_0x1c7ax21){_0x1c7ax23[_0xae6f[69]](_0x1c7ax21[_0xae6f[66]]({transaction:_0x1c7ax1d}))});return _0x1c7ax23})[_0xae6f[68]]()[_0xae6f[19]](function(){_0x1c7ax20[_0xae6f[37]](function(_0x1c7ax21){remove(_0x1c7ax21[_0xae6f[29]],function(_0x1c7ax10){if(_0x1c7ax10){console[_0xae6f[51]](_0x1c7ax10);throw _0x1c7ax10}})})})})[_0xae6f[19]](function(){return _0x1c7axf[_0xae6f[24]](204)})[_0xae6f[16]](function(_0x1c7ax10){return handleError(_0x1c7axf,_0x1c7ax10)})};exports[_0xae6f[71]]= function(_0x1c7axe,_0x1c7axf){var _0x1c7ax24=decodeURI(_0x1c7axe[_0xae6f[20]][_0xae6f[3]]);base64[_0xae6f[72]](_0x1c7ax24,function(_0x1c7ax10,_0x1c7ax25){if(_0x1c7ax10){return handleError(_0x1c7axf,_0x1c7ax10)}else {return _0x1c7axf[_0xae6f[18]](200)[_0xae6f[17]](_0x1c7ax25)}})};function handleError(_0x1c7axf,_0x1c7ax10){console[_0xae6f[51]](_0x1c7ax10);return _0x1c7axf[_0xae6f[18]](500)[_0xae6f[17]](_0x1c7ax10)} \ No newline at end of file diff --git a/server/api/voice_musiconhold/voice_musiconhold.events.js b/server/api/voice_musiconhold/voice_musiconhold.events.js index e3d8587..5c6882a 100644 --- a/server/api/voice_musiconhold/voice_musiconhold.events.js +++ b/server/api/voice_musiconhold/voice_musiconhold.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const VoiceMusicOnHold = require('../../models').VoiceMusicOnHold; - -var VoiceMusicOnHoldEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -VoiceMusicOnHoldEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - VoiceMusicOnHold.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - VoiceMusicOnHoldEvents.emit(event + ':' + doc._id, doc); - VoiceMusicOnHoldEvents.emit(event, doc); - done(null); - } -} - -module.exports = VoiceMusicOnHoldEvents; +var _0x598d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x598d[0];const EventEmitter=require(_0x598d[1]);const VoiceMusicOnHold=require(_0x598d[3])[_0x598d[2]];var VoiceMusicOnHoldEvents= new EventEmitter();VoiceMusicOnHoldEvents[_0x598d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x598d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x598d[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x598d[6]};for(var e in events){var event=events[e];VoiceMusicOnHold[_0x598d[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xdd08x8,_0xdd08x9,_0xdd08xa){VoiceMusicOnHoldEvents[_0x598d[10]](event+ _0x598d[8]+ _0xdd08x8[_0x598d[9]],_0xdd08x8);VoiceMusicOnHoldEvents[_0x598d[10]](event,_0xdd08x8);_0xdd08xa(null)}}module[_0x598d[11]]= VoiceMusicOnHoldEvents \ No newline at end of file diff --git a/server/api/voice_musiconhold/voice_musiconhold.socket.js b/server/api/voice_musiconhold/voice_musiconhold.socket.js index cbc19a2..689fe9f 100644 --- a/server/api/voice_musiconhold/voice_musiconhold.socket.js +++ b/server/api/voice_musiconhold/voice_musiconhold.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const VoiceMusicOnHoldEvents = require('./voice_musiconhold.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('voice_musiconhold:' + event, socket); - - VoiceMusicOnHoldEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - VoiceMusicOnHoldEvents.removeListener(event, listener); - }; -} +var _0x46e6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x46e6[0];const VoiceMusicOnHoldEvents=require(_0x46e6[1]);var events=[_0x46e6[2],_0x46e6[3]];exports[_0x46e6[4]]= function(_0xf6b1x3){for(var _0xf6b1x4=0,_0xf6b1x5=events[_0x46e6[5]];_0xf6b1x4< _0xf6b1x5;_0xf6b1x4++){var _0xf6b1x6=events[_0xf6b1x4];var _0xf6b1x7=createListener(_0x46e6[6]+ _0xf6b1x6,_0xf6b1x3);VoiceMusicOnHoldEvents[_0x46e6[7]](_0xf6b1x6,_0xf6b1x7);_0xf6b1x3[_0x46e6[7]](_0x46e6[8],removeListener(_0xf6b1x6,_0xf6b1x7))}};function createListener(_0xf6b1x6,_0xf6b1x3){return function(_0xf6b1x9){_0xf6b1x3[_0x46e6[9]](_0xf6b1x6,_0xf6b1x9)}}function removeListener(_0xf6b1x6,_0xf6b1x7){return function(){VoiceMusicOnHoldEvents[_0x46e6[10]](_0xf6b1x6,_0xf6b1x7)}} \ No newline at end of file diff --git a/server/api/voice_queue/index.js b/server/api/voice_queue/index.js index f1f9c3f..c89ae8f 100644 --- a/server/api/voice_queue/index.js +++ b/server/api/voice_queue/index.js @@ -1,20 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./voice_queue.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([7, 13], ['admin']), controller.index); -router.get('/:name', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show); -router.get('/realtime/voice', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.getRealtimeQueues); -router.get('/:name/agents', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.showAgents); -router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create); -router.post('/:name/agents', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.addAgents); -router.put('/:name', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update); -router.delete('/:name/agents', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.removeAgents); -router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy); -router.delete('/:name', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy); - -module.exports = router; +var _0x138c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x6E\x61\x6D\x65","\x73\x68\x6F\x77","\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x6F\x69\x63\x65","\x67\x65\x74\x52\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x73","\x2F\x3A\x6E\x61\x6D\x65\x2F\x61\x67\x65\x6E\x74\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x6C\x65\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x138c[0];var express=require(_0x138c[1]);var controller=require(_0x138c[2]);var auth=require(_0x138c[3]);var router=express.Router();router[_0x138c[9]](_0x138c[4],auth[_0x138c[5]](),auth[_0x138c[7]]([7,13],[_0x138c[6]]),controller[_0x138c[8]]);router[_0x138c[9]](_0x138c[10],auth[_0x138c[5]](),auth[_0x138c[7]]([7],[_0x138c[6]]),controller[_0x138c[11]]);router[_0x138c[9]](_0x138c[12],auth[_0x138c[5]](),auth[_0x138c[7]]([7],[_0x138c[6]]),controller[_0x138c[13]]);router[_0x138c[9]](_0x138c[14],auth[_0x138c[5]](),auth[_0x138c[7]]([7],[_0x138c[6]]),controller[_0x138c[15]]);router[_0x138c[17]](_0x138c[4],auth[_0x138c[5]](),auth[_0x138c[7]]([7],[_0x138c[6]]),controller[_0x138c[16]]);router[_0x138c[17]](_0x138c[14],auth[_0x138c[5]](),auth[_0x138c[7]]([7],[_0x138c[6]]),controller[_0x138c[18]]);router[_0x138c[20]](_0x138c[10],auth[_0x138c[5]](),auth[_0x138c[7]]([7],[_0x138c[6]]),controller[_0x138c[19]]);router[_0x138c[22]](_0x138c[14],auth[_0x138c[5]](),auth[_0x138c[7]]([7],[_0x138c[6]]),controller[_0x138c[21]]);router[_0x138c[22]](_0x138c[4],auth[_0x138c[5]](),auth[_0x138c[7]]([7],[_0x138c[6]]),controller[_0x138c[23]]);router[_0x138c[22]](_0x138c[10],auth[_0x138c[5]](),auth[_0x138c[7]]([7],[_0x138c[6]]),controller[_0x138c[24]]);module[_0x138c[25]]= router \ No newline at end of file diff --git a/server/api/voice_queue/voice_queue.controller.js b/server/api/voice_queue/voice_queue.controller.js index 2f70952..3e5d87f 100644 --- a/server/api/voice_queue/voice_queue.controller.js +++ b/server/api/voice_queue/voice_queue.controller.js @@ -1,304 +1 @@ -'use strict'; - -var _ = require('lodash'); - -var util = require('util'); -var Util = require('../../config/util'); - -var sequelize = require('../../models').sequelize; -var User = require('../../models').User; -var VoiceQueue = require('../../models').VoiceQueue; -var UserHasVoiceQueue = require('../../models').UserHasVoiceQueue; -var VoiceExtension = require('../../models').VoiceExtension; - -// Get list of voiceQueues -exports.index = function(req, res) { - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getVoiceQueuesIdByUser(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); - - default: - return VoiceQueue - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } -}; - -exports.getRealtimeQueues = function(req, res, next) { - switch (req.user.role) { - case 'user': - var agents = []; - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getVoiceQueuesIdByUser({}, { - attributes: ['name'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var voiceQueues = _.map(queues.rows, 'name'); - queues.rows.forEach(function(queue) { - agents = _.union(agents, _.map(queue.Users, 'id')); - }); - return VoiceQueue - .findAndCountAll(_.merge(Util.getQuery(req.query, { - name: voiceQueues - }), { - include: [{ - model: User, - where: { - id: agents - }, - required: false - }] - })); - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - default: - return VoiceQueue - .findAndCountAll(_.merge(Util.getQuery(req.query), { - include: [{ - model: User, - required: false - }] - })) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); - } -}; - - -// Get a single voiceQueue -exports.show = function(req, res) { - return VoiceQueue - .findById(req.params.name) - .then(function(voiceQueue) { - if (!voiceQueue) { - return res.sendStatus(404); - } - return res.send(voiceQueue); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single queue -exports.showAgents = function(req, res) { - return VoiceQueue - .findById(req.params.name) - .then(function(queue) { - if (!queue) { - return res.sendStatus(404); - } - return queue - .getUsers({ - where: { - role: 'agent' - }, - attributes: ['id', 'name', 'fullname', 'email'] - }); - }) - .then(function(agents) { - return res.status(200).send({ - rows: agents, - count: agents.length - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new voiceQueue in the DB. -exports.create = function(req, res) { - var _voiceQueue; - - return VoiceQueue - .create(req.body) - .then(function(voiceQueue) { - _voiceQueue = voiceQueue; - - if (req.body.agents) { - return _voiceQueue - .addUsers(req.body.agents, { - penalty: req.body.penalty || 0 - }); - } - }) - .then(function() { - return res.status(201).send(_voiceQueue); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - var paths = []; - - err.errors.forEach(function(error) { - switch (error.path) { - case 'PRIMARY': - paths.push('name'); - break; - default: - paths.push(error.path); - } - }); - - paths.push(' must be unique'); - err.message = paths.join(); - err.translatedMessage = 'MESSAGE_EXIST_QUEUE'; - - return res.status(500).send(err); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing voiceQueue in the DB. -exports.update = function(req, res) { - if (req.body.name) { - delete req.body.name; - } - - return VoiceQueue - .findById(req.params.name) - .then(function(voiceQueue) { - if (!voiceQueue) { - return res.sendStatus(404); - } - var updated = _.merge(voiceQueue, req.body); - return updated - .save(); - }) - .then(function(voiceQueue) { - return res.status(200).send(voiceQueue); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - - -// Add agents to voice queues -exports.addAgents = function(req, res, next) { - return User - .findAll({ - where: { - id: { - $in: req.body.agents - } - } - }) - .then(function(users) { - var userHasVoiceQueues = _.map(users, function(user) { - return { - queue: req.params.name, - interface: util.format('SIP/%s', user.name), - stateinterface: util.format('SIP/%s', user.name), - membername: user.name, - UserId: user.id, - penalty: req.body.penalty - }; - }); - - return UserHasVoiceQueue - .bulkCreate(userHasVoiceQueues, { - individualHooks: true - }); - }) - .then(function() { - return res.sendStatus(200); - }) - .catch(function(err) { - console.log(err); - return next(err); - }); -}; - -exports.removeAgents = function(req, res, next) { - return UserHasVoiceQueue - .destroy({ - where: { - UserId: req.query.agents, - queue: req.params.name - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(202); - }) - .catch(function(err) { - return next(err); - }); -}; - -// Deletes a voiceQueue from the DB. -exports.destroy = function(req, res) { - return VoiceQueue - .destroy({ - where: { - name: req.params.name - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes multiple voiceQueues from the DB. -exports.bulkDestroy = function(req, res) { - return VoiceQueue - .destroy({ - where: { - name: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xfd89=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6C\x6F\x67","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x72\x6F\x6C\x65","\x67\x65\x74\x52\x65\x61\x6C\x74\x69\x6D\x65\x51\x75\x65\x75\x65\x73","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x70\x61\x72\x61\x6D\x73","\x73\x68\x6F\x77\x41\x67\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x67\x65\x74\x55\x73\x65\x72\x73","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x50\x52\x49\x4D\x41\x52\x59","\x70\x61\x74\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x51\x55\x45\x55\x45","\x61\x67\x65\x6E\x74\x73","\x62\x6F\x64\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x61\x64\x64\x55\x73\x65\x72\x73","\x75\x70\x64\x61\x74\x65","\x73\x61\x76\x65","\x61\x64\x64\x41\x67\x65\x6E\x74\x73","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x6D\x6F\x76\x65\x41\x67\x65\x6E\x74\x73","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73"];_0xfd89[0];var _=require(_0xfd89[1]);var util=require(_0xfd89[2]);var Util=require(_0xfd89[3]);var sequelize=require(_0xfd89[5])[_0xfd89[4]];var User=require(_0xfd89[5])[_0xfd89[6]];var VoiceQueue=require(_0xfd89[5])[_0xfd89[7]];var UserHasVoiceQueue=require(_0xfd89[5])[_0xfd89[8]];var VoiceExtension=require(_0xfd89[5])[_0xfd89[9]];exports[_0xfd89[10]]= function(_0xd00cx9,_0xd00cxa){switch(_0xd00cx9[_0xfd89[18]][_0xfd89[23]]){case _0xfd89[18]:return User[_0xfd89[19]](_0xd00cx9[_0xfd89[18]][_0xfd89[17]],{attributes:[_0xfd89[17]]})[_0xfd89[14]](Util[_0xfd89[16]](_0xd00cx9[_0xfd89[15]]))[_0xfd89[14]](function(_0xd00cxc){_0xd00cxa[_0xfd89[13]](200)[_0xfd89[12]](_0xd00cxc)})[_0xfd89[11]](function(_0xd00cxb){return handleError(_0xd00cxa,_0xd00cxb)});default:return VoiceQueue[_0xfd89[22]](Util[_0xfd89[21]](_0xd00cx9[_0xfd89[15]]))[_0xfd89[14]](function(_0xd00cxc){_0xd00cxa[_0xfd89[13]](200)[_0xfd89[12]](_0xd00cxc)})[_0xfd89[11]](function(_0xd00cxb){console[_0xfd89[20]](_0xd00cxb);return handleError(_0xd00cxa,_0xd00cxb)})}};exports[_0xfd89[24]]= function(_0xd00cx9,_0xd00cxa,_0xd00cxd){switch(_0xd00cx9[_0xfd89[18]][_0xfd89[23]]){case _0xfd89[18]:var _0xd00cxe=[];return User[_0xfd89[19]](_0xd00cx9[_0xfd89[18]][_0xfd89[17]],{attributes:[_0xfd89[17]]})[_0xfd89[14]](Util[_0xfd89[16]]({},{attributes:[_0xfd89[26]],include:[{raw:true,model:User,attributes:[_0xfd89[17]]}]}))[_0xfd89[14]](function(_0xd00cxf){var _0xd00cx10=_[_0xfd89[27]](_0xd00cxf[_0xfd89[25]],_0xfd89[26]);_0xd00cxf[_0xfd89[25]][_0xfd89[29]](function(_0xd00cx11){_0xd00cxe= _[_0xfd89[28]](_0xd00cxe,_[_0xfd89[27]](_0xd00cx11.Users,_0xfd89[17]))});return VoiceQueue[_0xfd89[22]](_[_0xfd89[30]](Util[_0xfd89[21]](_0xd00cx9[_0xfd89[15]],{name:_0xd00cx10}),{include:[{model:User,where:{id:_0xd00cxe},required:false}]}))})[_0xfd89[14]](function(_0xd00cxc){return _0xd00cxa[_0xfd89[13]](200)[_0xfd89[12]](_0xd00cxc)})[_0xfd89[11]](function(_0xd00cxb){console[_0xfd89[20]](_0xd00cxb);return handleError(_0xd00cxa,_0xd00cxb)});default:return VoiceQueue[_0xfd89[22]](_[_0xfd89[30]](Util[_0xfd89[21]](_0xd00cx9[_0xfd89[15]]),{include:[{model:User,required:false}]}))[_0xfd89[14]](function(_0xd00cxc){return _0xd00cxa[_0xfd89[13]](200)[_0xfd89[12]](_0xd00cxc)})[_0xfd89[11]](function(_0xd00cxb){console[_0xfd89[20]](_0xd00cxb);return handleError(_0xd00cxa,_0xd00cxb)})}};exports[_0xfd89[31]]= function(_0xd00cx9,_0xd00cxa){return VoiceQueue[_0xfd89[19]](_0xd00cx9[_0xfd89[33]][_0xfd89[26]])[_0xfd89[14]](function(_0xd00cx12){if(!_0xd00cx12){return _0xd00cxa[_0xfd89[32]](404)};return _0xd00cxa[_0xfd89[12]](_0xd00cx12)})[_0xfd89[11]](function(_0xd00cxb){return handleError(_0xd00cxa,_0xd00cxb)})};exports[_0xfd89[34]]= function(_0xd00cx9,_0xd00cxa){return VoiceQueue[_0xfd89[19]](_0xd00cx9[_0xfd89[33]][_0xfd89[26]])[_0xfd89[14]](function(_0xd00cx11){if(!_0xd00cx11){return _0xd00cxa[_0xfd89[32]](404)};return _0xd00cx11[_0xfd89[39]]({where:{role:_0xfd89[36]},attributes:[_0xfd89[17],_0xfd89[26],_0xfd89[37],_0xfd89[38]]})})[_0xfd89[14]](function(_0xd00cxe){return _0xd00cxa[_0xfd89[13]](200)[_0xfd89[12]]({rows:_0xd00cxe,count:_0xd00cxe[_0xfd89[35]]})})[_0xfd89[11]](function(_0xd00cxb){return handleError(_0xd00cxa,_0xd00cxb)})};exports[_0xfd89[40]]= function(_0xd00cx9,_0xd00cxa){var _0xd00cx13;return VoiceQueue[_0xfd89[40]](_0xd00cx9[_0xfd89[51]])[_0xfd89[14]](function(_0xd00cx12){_0xd00cx13= _0xd00cx12;if(_0xd00cx9[_0xfd89[51]][_0xfd89[50]]){return _0xd00cx13[_0xfd89[53]](_0xd00cx9[_0xfd89[51]][_0xfd89[50]],{penalty:_0xd00cx9[_0xfd89[51]][_0xfd89[52]]|| 0})}})[_0xfd89[14]](function(){return _0xd00cxa[_0xfd89[13]](201)[_0xfd89[12]](_0xd00cx13)})[_0xfd89[11]](sequelize.UniqueConstraintError,function(_0xd00cxb){var _0xd00cx14=[];_0xd00cxb[_0xfd89[44]][_0xfd89[29]](function(_0xd00cx15){switch(_0xd00cx15[_0xfd89[43]]){case _0xfd89[42]:_0xd00cx14[_0xfd89[41]](_0xfd89[26]);break;default:_0xd00cx14[_0xfd89[41]](_0xd00cx15[_0xfd89[43]])}});_0xd00cx14[_0xfd89[41]](_0xfd89[45]);_0xd00cxb[_0xfd89[46]]= _0xd00cx14[_0xfd89[47]]();_0xd00cxb[_0xfd89[48]]= _0xfd89[49];return _0xd00cxa[_0xfd89[13]](500)[_0xfd89[12]](_0xd00cxb)})[_0xfd89[11]](function(_0xd00cxb){return handleError(_0xd00cxa,_0xd00cxb)})};exports[_0xfd89[54]]= function(_0xd00cx9,_0xd00cxa){if(_0xd00cx9[_0xfd89[51]][_0xfd89[26]]){delete _0xd00cx9[_0xfd89[51]][_0xfd89[26]]};return VoiceQueue[_0xfd89[19]](_0xd00cx9[_0xfd89[33]][_0xfd89[26]])[_0xfd89[14]](function(_0xd00cx12){if(!_0xd00cx12){return _0xd00cxa[_0xfd89[32]](404)};var _0xd00cx16=_[_0xfd89[30]](_0xd00cx12,_0xd00cx9[_0xfd89[51]]);return _0xd00cx16[_0xfd89[55]]()})[_0xfd89[14]](function(_0xd00cx12){return _0xd00cxa[_0xfd89[13]](200)[_0xfd89[12]](_0xd00cx12)})[_0xfd89[11]](function(_0xd00cxb){console[_0xfd89[20]](_0xd00cxb);return handleError(_0xd00cxa,_0xd00cxb)})};exports[_0xfd89[56]]= function(_0xd00cx9,_0xd00cxa,_0xd00cxd){return User[_0xfd89[60]]({where:{id:{$in:_0xd00cx9[_0xfd89[51]][_0xfd89[50]]}}})[_0xfd89[14]](function(_0xd00cx17){var _0xd00cx18=_[_0xfd89[27]](_0xd00cx17,function(_0xd00cx19){return {queue:_0xd00cx9[_0xfd89[33]][_0xfd89[26]],interface:util[_0xfd89[58]](_0xfd89[57],_0xd00cx19[_0xfd89[26]]),stateinterface:util[_0xfd89[58]](_0xfd89[57],_0xd00cx19[_0xfd89[26]]),membername:_0xd00cx19[_0xfd89[26]],UserId:_0xd00cx19[_0xfd89[17]],penalty:_0xd00cx9[_0xfd89[51]][_0xfd89[52]]}});return UserHasVoiceQueue[_0xfd89[59]](_0xd00cx18,{individualHooks:true})})[_0xfd89[14]](function(){return _0xd00cxa[_0xfd89[32]](200)})[_0xfd89[11]](function(_0xd00cxb){console[_0xfd89[20]](_0xd00cxb);return _0xd00cxd(_0xd00cxb)})};exports[_0xfd89[61]]= function(_0xd00cx9,_0xd00cxa,_0xd00cxd){return UserHasVoiceQueue[_0xfd89[62]]({where:{UserId:_0xd00cx9[_0xfd89[15]][_0xfd89[50]],queue:_0xd00cx9[_0xfd89[33]][_0xfd89[26]]},individualHooks:true})[_0xfd89[14]](function(){return _0xd00cxa[_0xfd89[32]](202)})[_0xfd89[11]](function(_0xd00cxb){return _0xd00cxd(_0xd00cxb)})};exports[_0xfd89[62]]= function(_0xd00cx9,_0xd00cxa){return VoiceQueue[_0xfd89[62]]({where:{name:_0xd00cx9[_0xfd89[33]][_0xfd89[26]]},individualHooks:true})[_0xfd89[14]](function(){return _0xd00cxa[_0xfd89[32]](204)})[_0xfd89[11]](function(_0xd00cxb){return handleError(_0xd00cxa,_0xd00cxb)})};exports[_0xfd89[63]]= function(_0xd00cx9,_0xd00cxa){return VoiceQueue[_0xfd89[62]]({where:{name:_0xd00cx9[_0xfd89[15]][_0xfd89[64]]},individualHooks:true})[_0xfd89[14]](function(){return _0xd00cxa[_0xfd89[32]](204)})[_0xfd89[11]](function(_0xd00cxb){return handleError(_0xd00cxa,_0xd00cxb)})};function handleError(_0xd00cxa,_0xd00cxb){return _0xd00cxa[_0xfd89[13]](500)[_0xfd89[12]](_0xd00cxb)} \ No newline at end of file diff --git a/server/api/voice_queue/voice_queue.events.js b/server/api/voice_queue/voice_queue.events.js index 47e7ba6..2c24d3f 100644 --- a/server/api/voice_queue/voice_queue.events.js +++ b/server/api/voice_queue/voice_queue.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const VoiceQueue = require('../../models').VoiceQueue; - -var VoiceQueueEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -VoiceQueueEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - VoiceQueue.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - VoiceQueueEvents.emit(event + ':' + doc._id, doc); - VoiceQueueEvents.emit(event, doc); - done(null); - } -} - -module.exports = VoiceQueueEvents; +var _0xb29d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xb29d[0];const EventEmitter=require(_0xb29d[1]);const VoiceQueue=require(_0xb29d[3])[_0xb29d[2]];var VoiceQueueEvents= new EventEmitter();VoiceQueueEvents[_0xb29d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xb29d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xb29d[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xb29d[6]};for(var e in events){var event=events[e];VoiceQueue[_0xb29d[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xc26bx8,_0xc26bx9,_0xc26bxa){VoiceQueueEvents[_0xb29d[10]](event+ _0xb29d[8]+ _0xc26bx8[_0xb29d[9]],_0xc26bx8);VoiceQueueEvents[_0xb29d[10]](event,_0xc26bx8);_0xc26bxa(null)}}module[_0xb29d[11]]= VoiceQueueEvents \ No newline at end of file diff --git a/server/api/voice_queue/voice_queue.socket.js b/server/api/voice_queue/voice_queue.socket.js index 1036ff9..e5504e9 100644 --- a/server/api/voice_queue/voice_queue.socket.js +++ b/server/api/voice_queue/voice_queue.socket.js @@ -1,86 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const VoiceQueueEvents = require('./voice_queue.events'); -const VoiceQueue = require('../../models').VoiceQueue; -const User = require('../../models').User; -const Util = require('../../config/util'); -const _ = require('lodash'); -const Promise = require('bluebird'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('voice_queue:' + event, socket); - - VoiceQueueEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - switch (event) { - case 'voice_queue:save': - return Promise - .all([]) - .then(getVoiceQueues(socket)) - .then(function(userQueues) { - if (_.includes(userQueues, doc.name)) { - socket.emit(event, doc); - } - }) - .catch(function(err) { - console.log('Error filtering queues after queue save', err); - }) - break; - case 'voice_queue:remove': - socket.emit(event, doc); - break; - - default: - - } - }; -} - -function removeListener(event, listener) { - return function() { - VoiceQueueEvents.removeListener(event, listener); - }; -} - -function getVoiceQueues(user) { - return function() { - switch (user.role) { - case 'user': - return User - .findById(user.userId, { - attributes: ['id'] - }) - .then(Util.getVoiceQueuesIdByUser()) - .then(function(userQueues) { - return _.map(userQueues.rows, 'name'); - }); - case 'admin': - return VoiceQueue - .findAll() - .then(function(queues) { - return { - rows: queues - }; - }) - .then(function(userQueues) { - return _.map(userQueues.rows, 'name'); - }); - default: - return []; - } - } -} +var _0x9dbe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x45\x72\x72\x6F\x72\x20\x66\x69\x6C\x74\x65\x72\x69\x6E\x67\x20\x71\x75\x65\x75\x65\x73\x20\x61\x66\x74\x65\x72\x20\x71\x75\x65\x75\x65\x20\x73\x61\x76\x65","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x6E\x61\x6D\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x65\x6D\x69\x74","\x74\x68\x65\x6E","\x61\x6C\x6C","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x73\x61\x76\x65","\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x3A\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72","\x72\x6F\x77\x73","\x6D\x61\x70","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x75\x73\x65\x72\x49\x64","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x64\x6D\x69\x6E","\x72\x6F\x6C\x65"];_0x9dbe[0];const VoiceQueueEvents=require(_0x9dbe[1]);const VoiceQueue=require(_0x9dbe[3])[_0x9dbe[2]];const User=require(_0x9dbe[3])[_0x9dbe[4]];const Util=require(_0x9dbe[5]);const _=require(_0x9dbe[6]);const Promise=require(_0x9dbe[7]);var events=[_0x9dbe[8],_0x9dbe[9]];exports[_0x9dbe[10]]= function(_0xe13ax8){for(var _0xe13ax9=0,_0xe13axa=events[_0x9dbe[11]];_0xe13ax9< _0xe13axa;_0xe13ax9++){var _0xe13axb=events[_0xe13ax9];var _0xe13axc=createListener(_0x9dbe[12]+ _0xe13axb,_0xe13ax8);VoiceQueueEvents[_0x9dbe[13]](_0xe13axb,_0xe13axc);_0xe13ax8[_0x9dbe[13]](_0x9dbe[14],removeListener(_0xe13axb,_0xe13axc))}};function createListener(_0xe13axb,_0xe13ax8){return function(_0xe13axe){switch(_0xe13axb){case _0x9dbe[23]:return Promise[_0x9dbe[22]]([])[_0x9dbe[21]](getVoiceQueues(_0xe13ax8))[_0x9dbe[21]](function(_0xe13ax10){if(_[_0x9dbe[19]](_0xe13ax10,_0xe13axe[_0x9dbe[18]])){_0xe13ax8[_0x9dbe[20]](_0xe13axb,_0xe13axe)}})[_0x9dbe[17]](function(_0xe13axf){console[_0x9dbe[16]](_0x9dbe[15],_0xe13axf)});break;case _0x9dbe[24]:_0xe13ax8[_0x9dbe[20]](_0xe13axb,_0xe13axe);break;default:}}}function removeListener(_0xe13axb,_0xe13axc){return function(){VoiceQueueEvents[_0x9dbe[25]](_0xe13axb,_0xe13axc)}}function getVoiceQueues(_0xe13ax13){return function(){switch(_0xe13ax13[_0x9dbe[35]]){case _0x9dbe[32]:return User[_0x9dbe[31]](_0xe13ax13[_0x9dbe[29]],{attributes:[_0x9dbe[30]]})[_0x9dbe[21]](Util[_0x9dbe[28]]())[_0x9dbe[21]](function(_0xe13ax10){return _[_0x9dbe[27]](_0xe13ax10[_0x9dbe[26]],_0x9dbe[18])});case _0x9dbe[34]:return VoiceQueue[_0x9dbe[33]]()[_0x9dbe[21]](function(_0xe13ax14){return {rows:_0xe13ax14}})[_0x9dbe[21]](function(_0xe13ax10){return _[_0x9dbe[27]](_0xe13ax10[_0x9dbe[26]],_0x9dbe[18])});default:return []}}} \ No newline at end of file diff --git a/server/api/voice_recording/index.js b/server/api/voice_recording/index.js index bc07dc3..a300e15 100644 --- a/server/api/voice_recording/index.js +++ b/server/api/voice_recording/index.js @@ -1,19 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./voice_recording.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'agent']), controller.index); -router.get('/describe', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.describe); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show); -router.get('/:id/download', controller.getStreamById); -router.get('/:id/stream', auth.isAuthenticated(), auth.hasModule([7], ['admin', 'agent']), controller.getStream); -router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy); - -module.exports = router; +var _0x66dc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x61\x67\x65\x6E\x74","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x64\x65\x73\x63\x72\x69\x62\x65","\x64\x65\x73\x63\x72\x69\x62\x65","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x67\x65\x74\x53\x74\x72\x65\x61\x6D\x42\x79\x49\x64","\x2F\x3A\x69\x64\x2F\x73\x74\x72\x65\x61\x6D","\x67\x65\x74\x53\x74\x72\x65\x61\x6D","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x66dc[0];var express=require(_0x66dc[1]);var auth=require(_0x66dc[2]);var controller=require(_0x66dc[3]);var router=express.Router();router[_0x66dc[10]](_0x66dc[4],auth[_0x66dc[5]](),auth[_0x66dc[8]]([7],[_0x66dc[6],_0x66dc[7]]),controller[_0x66dc[9]]);router[_0x66dc[10]](_0x66dc[11],auth[_0x66dc[5]](),auth[_0x66dc[8]]([7],[_0x66dc[6]]),controller[_0x66dc[12]]);router[_0x66dc[10]](_0x66dc[13],auth[_0x66dc[5]](),auth[_0x66dc[8]]([7],[_0x66dc[6]]),controller[_0x66dc[14]]);router[_0x66dc[10]](_0x66dc[15],controller[_0x66dc[16]]);router[_0x66dc[10]](_0x66dc[17],auth[_0x66dc[5]](),auth[_0x66dc[8]]([7],[_0x66dc[6],_0x66dc[7]]),controller[_0x66dc[18]]);router[_0x66dc[20]](_0x66dc[4],auth[_0x66dc[5]](),auth[_0x66dc[8]]([7],[_0x66dc[6]]),controller[_0x66dc[19]]);router[_0x66dc[22]](_0x66dc[13],auth[_0x66dc[5]](),auth[_0x66dc[8]]([7],[_0x66dc[6]]),controller[_0x66dc[21]]);router[_0x66dc[24]](_0x66dc[4],auth[_0x66dc[5]](),auth[_0x66dc[8]]([7],[_0x66dc[6]]),controller[_0x66dc[23]]);router[_0x66dc[24]](_0x66dc[13],auth[_0x66dc[5]](),auth[_0x66dc[8]]([7],[_0x66dc[6]]),controller[_0x66dc[25]]);module[_0x66dc[26]]= router \ No newline at end of file diff --git a/server/api/voice_recording/voice_recording.controller.js b/server/api/voice_recording/voice_recording.controller.js index 032e36d..b1b7fd3 100644 --- a/server/api/voice_recording/voice_recording.controller.js +++ b/server/api/voice_recording/voice_recording.controller.js @@ -1,215 +1 @@ -/** - * Using Rails-like standard naming convention for endpoints. - * GET /api/voice/recordings -> index - * POST /api/voice/recordings -> create - * GET /api/voice/recordings/:id -> show - * PUT /api/voice/recordings/:id -> update - * DELETE /api/voice/recordings/:id -> destroy - */ - -'use strict'; - - -var _ = require('lodash'); -var util = require('util'); -var Util = require('../../config/util'); - -var VoiceRecording = require('../../models').VoiceRecording; -var User = require('../../models').User; -var Promise = require('bluebird'); -// var base64 = Promise.promisifyAll(require('file-base64')); -var base64 = require('file-base64'); -var fs = require('fs'); -var path = require('path'); - -function handleError(res) { - return function(err) { - if (err.cause && err.cause.code === 'ENOENT') { - err = { - message: 'No file or directory', - translatedMessage: 'MESSAGE_NO_FILE_OR_DIRECTORY' - }; - } - return res.status(500).send(err); - } -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(body) { - return function(entity) { - return entity - .updateAttributes(body); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Gets a list of VoiceRecordings -exports.index = function(req, res) { - switch (req.user.role) { - case 'user': - return User - .findById(req.user.id, { - attributes: ['id'] - }) - .then(Util.getVoiceQueuesIdByUser()) - .then(function(userQueues) { - var users = []; - var _userQueues = _.map(userQueues.rows, 'name'); - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'name')); - }); - return VoiceRecording - .findAndCountAll(Util.getQuery(req.query, { - $or: { - queue: _userQueues, - membername: users - } - })) - }) - .then(responseWithResult(res)) - .catch(handleError(res)); - case 'agent': - return VoiceRecording - .findAndCountAll(Util.getQuery(req.query, { - membername: req.user.name - })) - .then(responseWithResult(res)) - .catch(handleError(res)); - default: - return VoiceRecording - .findAndCountAll(Util.getQuery(req.query)) - .then(responseWithResult(res)) - .catch(handleError(res)); - } -} - -// Gets a single VoiceRecording from the DB -exports.show = function(req, res) { - return VoiceRecording.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Get list of fields -exports.describe = function(req, res) { - return VoiceRecording - .describe() - .then(function(fields) { - return res.status(200).send(fields); - }) - .catch(handleError(res)); -}; - - -// Gets a single VoiceRecording from the DB -exports.getStream = function(req, res) { - return VoiceRecording - .findById(req.params.id) - .then(function(recording) { - var readFile = Promise.promisify(fs.readFile); - return readFile(recording.value); - }) - .then(function(result) { - var base64String = new Buffer(result, 'binary').toString('base64'); - return base64String; - }) - .then(function(base64String) { - return res.status(200).send({ - downloadString: base64String - }); - }) - .catch(handleError(res)); -} - -//Download a Vocie Recordings: Not authenticated -exports.getStreamById = function(req, res) { - var where = {}; - - if (req.query && req.query.hasOwnProperty('type') && req.query.type === 'uniqueid') { - where.uniqueid = req.params.id; - } else { - where.id = req.params.id; - } - - return VoiceRecording - .findOne({ - where: where - }) - .then(handleEntityNotFound(res)) - .then(function(recording) { - return res.download(recording.value, path.basename(recording.value)); - }) - .catch(handleError(res)); -} - - -// Creates a new VoiceRecording in the DB -exports.create = function(req, res) { - return VoiceRecording.create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -} - -// Updates an existing VoiceRecording in the DB -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return VoiceRecording.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -// Deletes a VoiceRecording from the DB -exports.destroy = function(req, res) { - return VoiceRecording.findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -} - -// Deletes a agent from the DB. -exports.bulkDestroy = function(req, res) { - return VoiceRecording - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(handleError(res)); -}; +var _0x111f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x62\x6C\x75\x65\x62\x69\x72\x64","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x66\x73","\x70\x61\x74\x68","\x63\x61\x75\x73\x65","\x63\x6F\x64\x65","\x45\x4E\x4F\x45\x4E\x54","\x4E\x6F\x20\x66\x69\x6C\x65\x20\x6F\x72\x20\x64\x69\x72\x65\x63\x74\x6F\x72\x79","\x4D\x45\x53\x53\x41\x47\x45\x5F\x4E\x4F\x5F\x46\x49\x4C\x45\x5F\x4F\x52\x5F\x44\x49\x52\x45\x43\x54\x4F\x52\x59","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x65\x6E\x64","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x68\x65\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x72\x6F\x77\x73","\x6E\x61\x6D\x65","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x69\x64","\x75\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x73\x68\x6F\x77","\x70\x61\x72\x61\x6D\x73","\x64\x65\x73\x63\x72\x69\x62\x65","\x67\x65\x74\x53\x74\x72\x65\x61\x6D","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x72\x65\x61\x64\x46\x69\x6C\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x76\x61\x6C\x75\x65","\x67\x65\x74\x53\x74\x72\x65\x61\x6D\x42\x79\x49\x64","\x74\x79\x70\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x75\x6E\x69\x71\x75\x65\x69\x64","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64\x73"];_0x111f[0];var _=require(_0x111f[1]);var util=require(_0x111f[2]);var Util=require(_0x111f[3]);var VoiceRecording=require(_0x111f[5])[_0x111f[4]];var User=require(_0x111f[5])[_0x111f[6]];var Promise=require(_0x111f[7]);var base64=require(_0x111f[8]);var fs=require(_0x111f[9]);var path=require(_0x111f[10]);function handleError(_0x2421xb){return function(_0x2421xc){if(_0x2421xc[_0x111f[11]]&& _0x2421xc[_0x111f[11]][_0x111f[12]]=== _0x111f[13]){_0x2421xc= {message:_0x111f[14],translatedMessage:_0x111f[15]}};return _0x2421xb[_0x111f[17]](500)[_0x111f[16]](_0x2421xc)}}function responseWithResult(_0x2421xb,_0x2421xe){_0x2421xe= _0x2421xe|| 200;return function(_0x2421xf){if(_0x2421xf){_0x2421xb[_0x111f[17]](_0x2421xe)[_0x111f[18]](_0x2421xf)}}}function handleEntityNotFound(_0x2421xb){return function(_0x2421xf){if(!_0x2421xf){_0x2421xb[_0x111f[17]](404)[_0x111f[19]]();return null};return _0x2421xf}}function saveUpdates(_0x2421x12){return function(_0x2421xf){return _0x2421xf[_0x111f[20]](_0x2421x12)}}function removeEntity(_0x2421xb){return function(_0x2421xf){if(_0x2421xf){return _0x2421xf[_0x111f[22]]()[_0x111f[21]](function(){_0x2421xb[_0x111f[17]](204)[_0x111f[19]]()})}}}exports[_0x111f[23]]= function(_0x2421x14,_0x2421xb){switch(_0x2421x14[_0x111f[35]][_0x111f[38]]){case _0x111f[35]:return User[_0x111f[36]](_0x2421x14[_0x111f[35]][_0x111f[34]],{attributes:[_0x111f[34]]})[_0x111f[21]](Util[_0x111f[33]]())[_0x111f[21]](function(_0x2421x15){var _0x2421x16=[];var _0x2421x17=_[_0x111f[27]](_0x2421x15[_0x111f[25]],_0x111f[26]);_0x2421x15[_0x111f[25]][_0x111f[29]](function(_0x2421x18){_0x2421x16= _[_0x111f[28]](_0x2421x16,_[_0x111f[27]](_0x2421x18.Users,_0x111f[26]))});return VoiceRecording[_0x111f[32]](Util[_0x111f[31]](_0x2421x14[_0x111f[30]],{$or:{queue:_0x2421x17,membername:_0x2421x16}}))})[_0x111f[21]](responseWithResult(_0x2421xb))[_0x111f[24]](handleError(_0x2421xb));case _0x111f[37]:return VoiceRecording[_0x111f[32]](Util[_0x111f[31]](_0x2421x14[_0x111f[30]],{membername:_0x2421x14[_0x111f[35]][_0x111f[26]]}))[_0x111f[21]](responseWithResult(_0x2421xb))[_0x111f[24]](handleError(_0x2421xb));default:return VoiceRecording[_0x111f[32]](Util[_0x111f[31]](_0x2421x14[_0x111f[30]]))[_0x111f[21]](responseWithResult(_0x2421xb))[_0x111f[24]](handleError(_0x2421xb))}};exports[_0x111f[39]]= function(_0x2421x14,_0x2421xb){return VoiceRecording[_0x111f[36]](_0x2421x14[_0x111f[40]][_0x111f[34]])[_0x111f[21]](handleEntityNotFound(_0x2421xb))[_0x111f[21]](responseWithResult(_0x2421xb))[_0x111f[24]](handleError(_0x2421xb))};exports[_0x111f[41]]= function(_0x2421x14,_0x2421xb){return VoiceRecording[_0x111f[41]]()[_0x111f[21]](function(_0x2421x19){return _0x2421xb[_0x111f[17]](200)[_0x111f[16]](_0x2421x19)})[_0x111f[24]](handleError(_0x2421xb))};exports[_0x111f[42]]= function(_0x2421x14,_0x2421xb){return VoiceRecording[_0x111f[36]](_0x2421x14[_0x111f[40]][_0x111f[34]])[_0x111f[21]](function(_0x2421x1c){var _0x2421x1d=Promise[_0x111f[46]](fs[_0x111f[45]]);return _0x2421x1d(_0x2421x1c[_0x111f[47]])})[_0x111f[21]](function(_0x2421x1b){var _0x2421x1a= new Buffer(_0x2421x1b,_0x111f[44]).toString(_0x111f[43]);return _0x2421x1a})[_0x111f[21]](function(_0x2421x1a){return _0x2421xb[_0x111f[17]](200)[_0x111f[16]]({downloadString:_0x2421x1a})})[_0x111f[24]](handleError(_0x2421xb))};exports[_0x111f[48]]= function(_0x2421x14,_0x2421xb){var _0x2421x1e={};if(_0x2421x14[_0x111f[30]]&& _0x2421x14[_0x111f[30]][_0x111f[50]](_0x111f[49])&& _0x2421x14[_0x111f[30]][_0x111f[49]]=== _0x111f[51]){_0x2421x1e[_0x111f[51]]= _0x2421x14[_0x111f[40]][_0x111f[34]]}else {_0x2421x1e[_0x111f[34]]= _0x2421x14[_0x111f[40]][_0x111f[34]]};return VoiceRecording[_0x111f[54]]({where:_0x2421x1e})[_0x111f[21]](handleEntityNotFound(_0x2421xb))[_0x111f[21]](function(_0x2421x1c){return _0x2421xb[_0x111f[53]](_0x2421x1c[_0x111f[47]],path[_0x111f[52]](_0x2421x1c[_0x111f[47]]))})[_0x111f[24]](handleError(_0x2421xb))};exports[_0x111f[55]]= function(_0x2421x14,_0x2421xb){return VoiceRecording[_0x111f[55]](_0x2421x14[_0x111f[56]])[_0x111f[21]](responseWithResult(_0x2421xb,201))[_0x111f[24]](handleError(_0x2421xb))};exports[_0x111f[57]]= function(_0x2421x14,_0x2421xb){if(_0x2421x14[_0x111f[56]][_0x111f[34]]){delete _0x2421x14[_0x111f[56]][_0x111f[34]]};return VoiceRecording[_0x111f[36]](_0x2421x14[_0x111f[40]][_0x111f[34]])[_0x111f[21]](handleEntityNotFound(_0x2421xb))[_0x111f[21]](saveUpdates(_0x2421x14[_0x111f[56]]))[_0x111f[21]](responseWithResult(_0x2421xb))[_0x111f[24]](handleError(_0x2421xb))};exports[_0x111f[22]]= function(_0x2421x14,_0x2421xb){return VoiceRecording[_0x111f[36]](_0x2421x14[_0x111f[40]][_0x111f[34]])[_0x111f[21]](handleEntityNotFound(_0x2421xb))[_0x111f[21]](removeEntity(_0x2421xb))[_0x111f[24]](handleError(_0x2421xb))};exports[_0x111f[58]]= function(_0x2421x14,_0x2421xb){return VoiceRecording[_0x111f[22]]({where:{id:_0x2421x14[_0x111f[30]][_0x111f[60]]},individualHooks:true})[_0x111f[21]](function(){return _0x2421xb[_0x111f[59]](204)})[_0x111f[24]](handleError(_0x2421xb))} \ No newline at end of file diff --git a/server/api/voice_recording/voice_recording.events.js b/server/api/voice_recording/voice_recording.events.js index ac0c175..d25e8f2 100644 --- a/server/api/voice_recording/voice_recording.events.js +++ b/server/api/voice_recording/voice_recording.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const VoiceRecording = require('../../models').VoiceRecording; - -var VoiceRecordingEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -VoiceRecordingEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - VoiceRecording.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - VoiceRecordingEvents.emit(event + ':' + doc._id, doc); - VoiceRecordingEvents.emit(event, doc); - done(null); - } -} - -module.exports = VoiceRecordingEvents; +var _0x4d66=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x4d66[0];const EventEmitter=require(_0x4d66[1]);const VoiceRecording=require(_0x4d66[3])[_0x4d66[2]];var VoiceRecordingEvents= new EventEmitter();VoiceRecordingEvents[_0x4d66[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x4d66[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x4d66[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x4d66[6]};for(var e in events){var event=events[e];VoiceRecording[_0x4d66[7]](e,emitEvent(event))};function emitEvent(event){return function(_0xe998x8,_0xe998x9,_0xe998xa){VoiceRecordingEvents[_0x4d66[10]](event+ _0x4d66[8]+ _0xe998x8[_0x4d66[9]],_0xe998x8);VoiceRecordingEvents[_0x4d66[10]](event,_0xe998x8);_0xe998xa(null)}}module[_0x4d66[11]]= VoiceRecordingEvents \ No newline at end of file diff --git a/server/api/voice_recording/voice_recording.socket.js b/server/api/voice_recording/voice_recording.socket.js index 6b7ee22..62beb68 100644 --- a/server/api/voice_recording/voice_recording.socket.js +++ b/server/api/voice_recording/voice_recording.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const VoiceRecordingEvents = require('./voice_recording.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('voice_recording:' + event, socket); - - VoiceRecordingEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - VoiceRecordingEvents.removeListener(event, listener); - }; -} +var _0x7f1b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x7f1b[0];const VoiceRecordingEvents=require(_0x7f1b[1]);var events=[_0x7f1b[2],_0x7f1b[3]];exports[_0x7f1b[4]]= function(_0x6f8fx3){for(var _0x6f8fx4=0,_0x6f8fx5=events[_0x7f1b[5]];_0x6f8fx4< _0x6f8fx5;_0x6f8fx4++){var _0x6f8fx6=events[_0x6f8fx4];var _0x6f8fx7=createListener(_0x7f1b[6]+ _0x6f8fx6,_0x6f8fx3);VoiceRecordingEvents[_0x7f1b[7]](_0x6f8fx6,_0x6f8fx7);_0x6f8fx3[_0x7f1b[7]](_0x7f1b[8],removeListener(_0x6f8fx6,_0x6f8fx7))}};function createListener(_0x6f8fx6,_0x6f8fx3){return function(_0x6f8fx9){_0x6f8fx3[_0x7f1b[9]](_0x6f8fx6,_0x6f8fx9)}}function removeListener(_0x6f8fx6,_0x6f8fx7){return function(){VoiceRecordingEvents[_0x7f1b[10]](_0x6f8fx6,_0x6f8fx7)}} \ No newline at end of file diff --git a/server/api/voice_voicemail/index.js b/server/api/voice_voicemail/index.js index db2e635..74c8af2 100644 --- a/server/api/voice_voicemail/index.js +++ b/server/api/voice_voicemail/index.js @@ -1,17 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./voice_voicemail.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index); -router.get('/:uniqueid', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.create); -router.post('/validate', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.mailboxValidation); -router.put('/:uniqueid', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.update); -router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy); -router.delete('/:uniqueid', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy); - -module.exports = router; +var _0xd68b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65","\x6D\x61\x69\x6C\x62\x6F\x78\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xd68b[0];var express=require(_0xd68b[1]);var controller=require(_0xd68b[2]);var auth=require(_0xd68b[3]);var router=express.Router();router[_0xd68b[9]](_0xd68b[4],auth[_0xd68b[5]](),auth[_0xd68b[7]]([7],[_0xd68b[6]]),controller[_0xd68b[8]]);router[_0xd68b[9]](_0xd68b[10],auth[_0xd68b[5]](),auth[_0xd68b[7]]([7],[_0xd68b[6]]),controller[_0xd68b[11]]);router[_0xd68b[13]](_0xd68b[4],auth[_0xd68b[5]](),auth[_0xd68b[7]]([7],[_0xd68b[6]]),controller[_0xd68b[12]]);router[_0xd68b[13]](_0xd68b[14],auth[_0xd68b[5]](),auth[_0xd68b[7]]([7],[_0xd68b[6]]),controller[_0xd68b[15]]);router[_0xd68b[17]](_0xd68b[10],auth[_0xd68b[5]](),auth[_0xd68b[7]]([7],[_0xd68b[6]]),controller[_0xd68b[16]]);router[_0xd68b[19]](_0xd68b[4],auth[_0xd68b[5]](),auth[_0xd68b[7]]([7],[_0xd68b[6]]),controller[_0xd68b[18]]);router[_0xd68b[19]](_0xd68b[10],auth[_0xd68b[5]](),auth[_0xd68b[7]]([7],[_0xd68b[6]]),controller[_0xd68b[20]]);module[_0xd68b[21]]= router \ No newline at end of file diff --git a/server/api/voice_voicemail/voice_voicemail.controller.js b/server/api/voice_voicemail/voice_voicemail.controller.js index 69a1139..7c7c662 100644 --- a/server/api/voice_voicemail/voice_voicemail.controller.js +++ b/server/api/voice_voicemail/voice_voicemail.controller.js @@ -1,190 +1 @@ -'use strict'; - -var _ = require('lodash'); -var stream = require('stream'); -var Util = require('../../config/util'); - -var VoiceVoicemail = require('../../models').VoiceVoicemail; -var VoiceVoicemailMessages = require('../../models').VoiceVoicemailMessages; - -// Get list of voice_voicemails -exports.index = function(req, res) { - return VoiceVoicemail - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single voice_voicemail -exports.show = function(req, res) { - VoiceVoicemail - .find({ - where: { - uniqueid: req.params.uniqueid - } - }) - .then(function(voice_voicemail) { - if (!voice_voicemail) { - return res.sendStatus(404); - } - return res.send(voice_voicemail); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// validate mailbox uniqueness -exports.mailboxValidation = function(req, res) { - console.log(req.body); - VoiceVoicemail - .findAll({ - where: { - mailbox: req.body.mailbox, - context: req.body.context - } - }) - .then(function(voicemails) { - if (!voicemails) { - return res.sendStatus(404); - } - return res.send(voicemails); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; -// Creates a new voice_voicemail in the DB. -exports.create = function(req, res) { - VoiceVoicemail - .findAll({ - where: { - mailbox: req.body.mailbox, - context: req.body.context - } - }) - .then(function(voicemails) { - if (!voicemails) { - return res.sendStatus(404); - } - if (voicemails.length > 0) { - return res.status(500).send({ - message: 'MESSAGE_EXIST_MAILBOX' - }) - } - VoiceVoicemail - .create(req.body) - .then(function(voice_voicemail) { - return res.status(201).send(voice_voicemail); - }) - .catch(function(err) { - return handleError(res, err); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) -}; - -// Updates an existing voice_voicemail in the DB. -exports.update = function(req, res) { - VoiceVoicemail - .findAll({ - where: { - mailbox: req.body.mailbox, - context: req.body.context, - uniqueid: { - $ne: req.body.uniqueid - } - } - }) - .then(function(voicemails) { - if (!voicemails) { - return res.sendStatus(404); - } - if (voicemails.length > 0) { - return res.status(500).send({ - message: 'MESSAGE_EXIST_MAILBOX' - }) - } - if (req.body.uniqueid) { - delete req.body.uniqueid; - } - VoiceVoicemail - .find({ - where: { - uniqueid: req.params.uniqueid - } - }) - .then(function(voice_voicemail) { - if (!voice_voicemail) { - return res.sendStatus(404); - } - var updated = _.merge(voice_voicemail, req.body); - updated.save() - .then(function() { - return res.status(200).send(voice_voicemail); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); - -}; - -// Deletes a voice_voicemail from the DB. -exports.destroy = function(req, res) { - VoiceVoicemail - .find({ - where: { - uniqueid: req.params.uniqueid - } - }) - .then(function(voice_voicemail) { - if (!voice_voicemail) { - return res.sendStatus(404); - } - voice_voicemail.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a voice_voicemail from the DB. -exports.bulkDestroy = function(req, res) { - VoiceVoicemail - .destroy({ - where: { - uniqueid: req.query.uniqueid - }, - individualHooks: true - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x3300=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x74\x72\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x6D\x61\x69\x6C\x62\x6F\x78\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x62\x6F\x64\x79","\x6C\x6F\x67","\x6D\x61\x69\x6C\x62\x6F\x78","\x63\x6F\x6E\x74\x65\x78\x74","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x6C\x65\x6E\x67\x74\x68","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x4D\x41\x49\x4C\x42\x4F\x58","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79"];_0x3300[0];var _=require(_0x3300[1]);var stream=require(_0x3300[2]);var Util=require(_0x3300[3]);var VoiceVoicemail=require(_0x3300[5])[_0x3300[4]];var VoiceVoicemailMessages=require(_0x3300[5])[_0x3300[6]];exports[_0x3300[7]]= function(_0xc8b8x6,_0xc8b8x7){return VoiceVoicemail[_0x3300[14]](Util[_0x3300[13]](_0xc8b8x6[_0x3300[12]]))[_0x3300[11]](function(_0xc8b8x9){_0xc8b8x7[_0x3300[10]](200)[_0x3300[9]](_0xc8b8x9)})[_0x3300[8]](function(_0xc8b8x8){return handleError(_0xc8b8x7,_0xc8b8x8)})};exports[_0x3300[15]]= function(_0xc8b8x6,_0xc8b8x7){VoiceVoicemail[_0x3300[19]]({where:{uniqueid:_0xc8b8x6[_0x3300[18]][_0x3300[17]]}})[_0x3300[11]](function(_0xc8b8xa){if(!_0xc8b8xa){return _0xc8b8x7[_0x3300[16]](404)};return _0xc8b8x7[_0x3300[9]](_0xc8b8xa)})[_0x3300[8]](function(_0xc8b8x8){return handleError(_0xc8b8x7,_0xc8b8x8)})};exports[_0x3300[20]]= function(_0xc8b8x6,_0xc8b8x7){console[_0x3300[22]](_0xc8b8x6[_0x3300[21]]);VoiceVoicemail[_0x3300[25]]({where:{mailbox:_0xc8b8x6[_0x3300[21]][_0x3300[23]],context:_0xc8b8x6[_0x3300[21]][_0x3300[24]]}})[_0x3300[11]](function(_0xc8b8xb){if(!_0xc8b8xb){return _0xc8b8x7[_0x3300[16]](404)};return _0xc8b8x7[_0x3300[9]](_0xc8b8xb)})[_0x3300[8]](function(_0xc8b8x8){return handleError(_0xc8b8x7,_0xc8b8x8)})};exports[_0x3300[26]]= function(_0xc8b8x6,_0xc8b8x7){VoiceVoicemail[_0x3300[25]]({where:{mailbox:_0xc8b8x6[_0x3300[21]][_0x3300[23]],context:_0xc8b8x6[_0x3300[21]][_0x3300[24]]}})[_0x3300[11]](function(_0xc8b8xb){if(!_0xc8b8xb){return _0xc8b8x7[_0x3300[16]](404)};if(_0xc8b8xb[_0x3300[27]]> 0){return _0xc8b8x7[_0x3300[10]](500)[_0x3300[9]]({message:_0x3300[28]})};VoiceVoicemail[_0x3300[26]](_0xc8b8x6[_0x3300[21]])[_0x3300[11]](function(_0xc8b8xa){return _0xc8b8x7[_0x3300[10]](201)[_0x3300[9]](_0xc8b8xa)})[_0x3300[8]](function(_0xc8b8x8){return handleError(_0xc8b8x7,_0xc8b8x8)})[_0x3300[8]](function(_0xc8b8x8){return handleError(_0xc8b8x7,_0xc8b8x8)})})};exports[_0x3300[29]]= function(_0xc8b8x6,_0xc8b8x7){VoiceVoicemail[_0x3300[25]]({where:{mailbox:_0xc8b8x6[_0x3300[21]][_0x3300[23]],context:_0xc8b8x6[_0x3300[21]][_0x3300[24]],uniqueid:{$ne:_0xc8b8x6[_0x3300[21]][_0x3300[17]]}}})[_0x3300[11]](function(_0xc8b8xb){if(!_0xc8b8xb){return _0xc8b8x7[_0x3300[16]](404)};if(_0xc8b8xb[_0x3300[27]]> 0){return _0xc8b8x7[_0x3300[10]](500)[_0x3300[9]]({message:_0x3300[28]})};if(_0xc8b8x6[_0x3300[21]][_0x3300[17]]){delete _0xc8b8x6[_0x3300[21]][_0x3300[17]]};VoiceVoicemail[_0x3300[19]]({where:{uniqueid:_0xc8b8x6[_0x3300[18]][_0x3300[17]]}})[_0x3300[11]](function(_0xc8b8xa){if(!_0xc8b8xa){return _0xc8b8x7[_0x3300[16]](404)};var _0xc8b8xc=_[_0x3300[30]](_0xc8b8xa,_0xc8b8x6[_0x3300[21]]);_0xc8b8xc[_0x3300[31]]()[_0x3300[11]](function(){return _0xc8b8x7[_0x3300[10]](200)[_0x3300[9]](_0xc8b8xa)})[_0x3300[8]](function(_0xc8b8x8){return handleError(_0xc8b8x7,_0xc8b8x8)})})[_0x3300[8]](function(_0xc8b8x8){return handleError(_0xc8b8x7,_0xc8b8x8)})})[_0x3300[8]](function(_0xc8b8x8){return handleError(_0xc8b8x7,_0xc8b8x8)})};exports[_0x3300[32]]= function(_0xc8b8x6,_0xc8b8x7){VoiceVoicemail[_0x3300[19]]({where:{uniqueid:_0xc8b8x6[_0x3300[18]][_0x3300[17]]}})[_0x3300[11]](function(_0xc8b8xa){if(!_0xc8b8xa){return _0xc8b8x7[_0x3300[16]](404)};_0xc8b8xa[_0x3300[32]]()[_0x3300[11]](function(){return _0xc8b8x7[_0x3300[16]](204)})[_0x3300[8]](function(_0xc8b8x8){return handleError(_0xc8b8x7,_0xc8b8x8)})})[_0x3300[8]](function(_0xc8b8x8){return handleError(_0xc8b8x7,_0xc8b8x8)})};exports[_0x3300[33]]= function(_0xc8b8x6,_0xc8b8x7){VoiceVoicemail[_0x3300[32]]({where:{uniqueid:_0xc8b8x6[_0x3300[12]][_0x3300[17]]},individualHooks:true})[_0x3300[11]](function(){return _0xc8b8x7[_0x3300[16]](204)})[_0x3300[8]](function(_0xc8b8x8){return handleError(_0xc8b8x7,_0xc8b8x8)})};function handleError(_0xc8b8x7,_0xc8b8x8){return _0xc8b8x7[_0x3300[10]](500)[_0x3300[9]](_0xc8b8x8)} \ No newline at end of file diff --git a/server/api/voice_voicemail/voice_voicemail.events.js b/server/api/voice_voicemail/voice_voicemail.events.js index 7f8360b..2e07b0b 100644 --- a/server/api/voice_voicemail/voice_voicemail.events.js +++ b/server/api/voice_voicemail/voice_voicemail.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const VoiceVoicemail = require('../../models').VoiceVoicemail; - -var VoiceVoicemailEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -VoiceVoicemailEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - VoiceVoicemail.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - VoiceVoicemailEvents.emit(event + ':' + doc._id, doc); - VoiceVoicemailEvents.emit(event, doc); - done(null); - } -} - -module.exports = VoiceVoicemailEvents; +var _0xd443=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd443[0];const EventEmitter=require(_0xd443[1]);const VoiceVoicemail=require(_0xd443[3])[_0xd443[2]];var VoiceVoicemailEvents= new EventEmitter();VoiceVoicemailEvents[_0xd443[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd443[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd443[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd443[6]};for(var e in events){var event=events[e];VoiceVoicemail[_0xd443[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x9536x8,_0x9536x9,_0x9536xa){VoiceVoicemailEvents[_0xd443[10]](event+ _0xd443[8]+ _0x9536x8[_0xd443[9]],_0x9536x8);VoiceVoicemailEvents[_0xd443[10]](event,_0x9536x8);_0x9536xa(null)}}module[_0xd443[11]]= VoiceVoicemailEvents \ No newline at end of file diff --git a/server/api/voice_voicemail/voice_voicemail.socket.js b/server/api/voice_voicemail/voice_voicemail.socket.js index 1c63f6d..e32a872 100644 --- a/server/api/voice_voicemail/voice_voicemail.socket.js +++ b/server/api/voice_voicemail/voice_voicemail.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const VoiceVoicemailEvents = require('./voice_voicemail.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('voice_voicemail:' + event, socket); - - VoiceVoicemailEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - VoiceVoicemailEvents.removeListener(event, listener); - }; -} +var _0x10bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x10bd[0];const VoiceVoicemailEvents=require(_0x10bd[1]);var events=[_0x10bd[2],_0x10bd[3]];exports[_0x10bd[4]]= function(_0xc708x3){for(var _0xc708x4=0,_0xc708x5=events[_0x10bd[5]];_0xc708x4< _0xc708x5;_0xc708x4++){var _0xc708x6=events[_0xc708x4];var _0xc708x7=createListener(_0x10bd[6]+ _0xc708x6,_0xc708x3);VoiceVoicemailEvents[_0x10bd[7]](_0xc708x6,_0xc708x7);_0xc708x3[_0x10bd[7]](_0x10bd[8],removeListener(_0xc708x6,_0xc708x7))}};function createListener(_0xc708x6,_0xc708x3){return function(_0xc708x9){_0xc708x3[_0x10bd[9]](_0xc708x6,_0xc708x9)}}function removeListener(_0xc708x6,_0xc708x7){return function(){VoiceVoicemailEvents[_0x10bd[10]](_0xc708x6,_0xc708x7)}} \ No newline at end of file diff --git a/server/api/voice_voicemail_messages/index.js b/server/api/voice_voicemail_messages/index.js index 94f57a6..f39ba16 100644 --- a/server/api/voice_voicemail_messages/index.js +++ b/server/api/voice_voicemail_messages/index.js @@ -1,15 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./voice_voicemail_messages.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.show); -router.get('/:id/download', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.download); -router.delete('/', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([7], ['admin']), controller.destroy); - -module.exports = router; +var _0x1cf1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x1cf1[0];var express=require(_0x1cf1[1]);var controller=require(_0x1cf1[2]);var auth=require(_0x1cf1[3]);var router=express.Router();router[_0x1cf1[9]](_0x1cf1[4],auth[_0x1cf1[5]](),auth[_0x1cf1[7]]([7],[_0x1cf1[6]]),controller[_0x1cf1[8]]);router[_0x1cf1[9]](_0x1cf1[10],auth[_0x1cf1[5]](),auth[_0x1cf1[7]]([7],[_0x1cf1[6]]),controller[_0x1cf1[11]]);router[_0x1cf1[9]](_0x1cf1[12],auth[_0x1cf1[5]](),auth[_0x1cf1[7]]([7],[_0x1cf1[6]]),controller[_0x1cf1[13]]);router[_0x1cf1[15]](_0x1cf1[4],auth[_0x1cf1[5]](),auth[_0x1cf1[7]]([7],[_0x1cf1[6]]),controller[_0x1cf1[14]]);router[_0x1cf1[15]](_0x1cf1[10],auth[_0x1cf1[5]](),auth[_0x1cf1[7]]([7],[_0x1cf1[6]]),controller[_0x1cf1[16]]);module[_0x1cf1[17]]= router \ No newline at end of file diff --git a/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js b/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js index f97d1a1..330fddf 100644 --- a/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js +++ b/server/api/voice_voicemail_messages/voice_voicemail_messages.controller.js @@ -1,106 +1 @@ -'use strict'; - -var _ = require('lodash'); -var stream = require('stream'); -var Util = require('../../config/util'); - -var VoiceVoicemailMessages = require('../../models').VoiceVoicemailMessages; - -// Get list of voicemail messages -exports.index = function(req, res) { - return VoiceVoicemailMessages - .scope({ - method: ['mailbox', req.query] - }) - .findAndCountAll(Util.getQuery(req.query)) - .then(function(result) { - res.status(200).send(result); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -// Get a single voicemail_message -exports.show = function(req, res) { - return VoiceVoicemailMessages - .findById(req.params.id) - .then(function(voicemail_message) { - if (!voicemail_message) { - return res.sendStatus(404); - } - return res.send(voicemail_message); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a voicemail_message from the DB. -exports.destroy = function(req, res) { - return VoiceVoicemailMessages - .findById(req.params.id) - .then(function(voicemail_message) { - if (!voicemail_message) { - return res.sendStatus(404); - } - voicemail_message.recording = null; - voicemail_message.destroy(); - }) - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes all voicemail_messages from the DB. -exports.bulkDestroy = function(req, res) { - return VoiceVoicemailMessages - .findAll({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(function(voicemail_messages) { - var bulkDest = []; - voicemail_messages.forEach(function(message) { - message.recording = null; - bulkDest.push(message.destroy()); - }); - return bulkDest; - }) - .all() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.download = function(req, res) { - return VoiceVoicemailMessages - .findById(req.params.id) - .then(function(message) { - var base64String = new Buffer(message.recording, 'binary').toString('base64'); - return base64String; - }) - .then(function(base64String) { - return res.status(200).send({ - downloadString: base64String - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xa817=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x73\x74\x72\x65\x61\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x6D\x61\x69\x6C\x62\x6F\x78","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x65\x73\x74\x72\x6F\x79","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x6C\x6C","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x69\x64\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79"];_0xa817[0];var _=require(_0xa817[1]);var stream=require(_0xa817[2]);var Util=require(_0xa817[3]);var VoiceVoicemailMessages=require(_0xa817[5])[_0xa817[4]];exports[_0xa817[6]]= function(_0xafa1x5,_0xafa1x6){return VoiceVoicemailMessages[_0xa817[16]]({method:[_0xa817[15],_0xafa1x5[_0xa817[12]]]})[_0xa817[14]](Util[_0xa817[13]](_0xafa1x5[_0xa817[12]]))[_0xa817[11]](function(_0xafa1x8){_0xafa1x6[_0xa817[10]](200)[_0xa817[9]](_0xafa1x8)})[_0xa817[8]](function(_0xafa1x7){console[_0xa817[7]](_0xafa1x7);return handleError(_0xafa1x6,_0xafa1x7)})};exports[_0xa817[17]]= function(_0xafa1x5,_0xafa1x6){return VoiceVoicemailMessages[_0xa817[21]](_0xafa1x5[_0xa817[20]][_0xa817[19]])[_0xa817[11]](function(_0xafa1x9){if(!_0xafa1x9){return _0xafa1x6[_0xa817[18]](404)};return _0xafa1x6[_0xa817[9]](_0xafa1x9)})[_0xa817[8]](function(_0xafa1x7){return handleError(_0xafa1x6,_0xafa1x7)})};exports[_0xa817[22]]= function(_0xafa1x5,_0xafa1x6){return VoiceVoicemailMessages[_0xa817[21]](_0xafa1x5[_0xa817[20]][_0xa817[19]])[_0xa817[11]](function(_0xafa1x9){if(!_0xafa1x9){return _0xafa1x6[_0xa817[18]](404)};_0xafa1x9[_0xa817[23]]= null;_0xafa1x9[_0xa817[22]]()})[_0xa817[11]](function(){return _0xafa1x6[_0xa817[18]](204)})[_0xa817[8]](function(_0xafa1x7){return handleError(_0xafa1x6,_0xafa1x7)})};exports[_0xa817[24]]= function(_0xafa1x5,_0xafa1x6){return VoiceVoicemailMessages[_0xa817[29]]({where:{id:_0xafa1x5[_0xa817[12]][_0xa817[28]]},individualHooks:true})[_0xa817[11]](function(_0xafa1xa){var _0xafa1xb=[];_0xafa1xa[_0xa817[27]](function(_0xafa1xc){_0xafa1xc[_0xa817[23]]= null;_0xafa1xb[_0xa817[26]](_0xafa1xc[_0xa817[22]]())});return _0xafa1xb})[_0xa817[25]]()[_0xa817[11]](function(){return _0xafa1x6[_0xa817[18]](204)})[_0xa817[8]](function(_0xafa1x7){return handleError(_0xafa1x6,_0xafa1x7)})};exports[_0xa817[30]]= function(_0xafa1x5,_0xafa1x6){return VoiceVoicemailMessages[_0xa817[21]](_0xafa1x5[_0xa817[20]][_0xa817[19]])[_0xa817[11]](function(_0xafa1xc){var _0xafa1xd= new Buffer(_0xafa1xc[_0xa817[23]],_0xa817[32]).toString(_0xa817[31]);return _0xafa1xd})[_0xa817[11]](function(_0xafa1xd){return _0xafa1x6[_0xa817[10]](200)[_0xa817[9]]({downloadString:_0xafa1xd})})[_0xa817[8]](function(_0xafa1x7){console[_0xa817[7]](_0xafa1x7);return handleError(_0xafa1x6,_0xafa1x7)})};function handleError(_0xafa1x6,_0xafa1x7){return _0xafa1x6[_0xa817[10]](500)[_0xa817[9]](_0xafa1x7)} \ No newline at end of file diff --git a/server/api/voice_voicemail_messages/voice_voicemail_messages.events.js b/server/api/voice_voicemail_messages/voice_voicemail_messages.events.js index aa3edd9..dd8ea83 100644 --- a/server/api/voice_voicemail_messages/voice_voicemail_messages.events.js +++ b/server/api/voice_voicemail_messages/voice_voicemail_messages.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const VoiceVoicemailMessages = require('../../models').VoiceVoicemailMessages; - -var VoiceVoicemailMessagesEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -VoiceVoicemailMessagesEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - VoiceVoicemailMessages.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - VoiceVoicemailMessagesEvents.emit(event + ':' + doc._id, doc); - VoiceVoicemailMessagesEvents.emit(event, doc); - done(null); - } -} - -module.exports = VoiceVoicemailMessagesEvents; +var _0x771e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x56\x6F\x69\x63\x65\x56\x6F\x69\x63\x65\x6D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x771e[0];const EventEmitter=require(_0x771e[1]);const VoiceVoicemailMessages=require(_0x771e[3])[_0x771e[2]];var VoiceVoicemailMessagesEvents= new EventEmitter();VoiceVoicemailMessagesEvents[_0x771e[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x771e[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x771e[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x771e[6]};for(var e in events){var event=events[e];VoiceVoicemailMessages[_0x771e[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3945x8,_0x3945x9,_0x3945xa){VoiceVoicemailMessagesEvents[_0x771e[10]](event+ _0x771e[8]+ _0x3945x8[_0x771e[9]],_0x3945x8);VoiceVoicemailMessagesEvents[_0x771e[10]](event,_0x3945x8);_0x3945xa(null)}}module[_0x771e[11]]= VoiceVoicemailMessagesEvents \ No newline at end of file diff --git a/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js b/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js index 3e1dac1..95f6857 100644 --- a/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js +++ b/server/api/voice_voicemail_messages/voice_voicemail_messages.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const VoiceVoicemailMessagesEvents = require('./voice_voicemail_messages.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('voice_voicemail_messages:' + event, socket); - - VoiceVoicemailMessagesEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - VoiceVoicemailMessagesEvents.removeListener(event, listener); - }; -} +var _0xfb90=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0xfb90[0];const VoiceVoicemailMessagesEvents=require(_0xfb90[1]);var events=[_0xfb90[2],_0xfb90[3]];exports[_0xfb90[4]]= function(_0x4b6ax3){for(var _0x4b6ax4=0,_0x4b6ax5=events[_0xfb90[5]];_0x4b6ax4< _0x4b6ax5;_0x4b6ax4++){var _0x4b6ax6=events[_0x4b6ax4];var _0x4b6ax7=createListener(_0xfb90[6]+ _0x4b6ax6,_0x4b6ax3);VoiceVoicemailMessagesEvents[_0xfb90[7]](_0x4b6ax6,_0x4b6ax7);_0x4b6ax3[_0xfb90[7]](_0xfb90[8],removeListener(_0x4b6ax6,_0x4b6ax7))}};function createListener(_0x4b6ax6,_0x4b6ax3){return function(_0x4b6ax9){_0x4b6ax3[_0xfb90[9]](_0x4b6ax6,_0x4b6ax9)}}function removeListener(_0x4b6ax6,_0x4b6ax7){return function(){VoiceVoicemailMessagesEvents[_0xfb90[10]](_0x4b6ax6,_0x4b6ax7)}} \ No newline at end of file diff --git a/server/api/widget/index.js b/server/api/widget/index.js index 8fec508..42be569 100644 --- a/server/api/widget/index.js +++ b/server/api/widget/index.js @@ -1,13 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./widget.controller'); -var auth = require('../../auth/auth.service'); - -var router = express.Router(); - -router.get('/counter', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.counter); -router.get('/table', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.table); -router.get('/piechart', auth.isAuthenticated(), auth.hasModule([2], ['admin']), controller.piechart); - -module.exports = router; +var _0xa4e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x77\x69\x64\x67\x65\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x6F\x75\x6E\x74\x65\x72","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x63\x6F\x75\x6E\x74\x65\x72","\x67\x65\x74","\x2F\x74\x61\x62\x6C\x65","\x74\x61\x62\x6C\x65","\x2F\x70\x69\x65\x63\x68\x61\x72\x74","\x70\x69\x65\x63\x68\x61\x72\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xa4e8[0];var express=require(_0xa4e8[1]);var controller=require(_0xa4e8[2]);var auth=require(_0xa4e8[3]);var router=express.Router();router[_0xa4e8[9]](_0xa4e8[4],auth[_0xa4e8[5]](),auth[_0xa4e8[7]]([2],[_0xa4e8[6]]),controller[_0xa4e8[8]]);router[_0xa4e8[9]](_0xa4e8[10],auth[_0xa4e8[5]](),auth[_0xa4e8[7]]([2],[_0xa4e8[6]]),controller[_0xa4e8[11]]);router[_0xa4e8[9]](_0xa4e8[12],auth[_0xa4e8[5]](),auth[_0xa4e8[7]]([2],[_0xa4e8[6]]),controller[_0xa4e8[13]]);module[_0xa4e8[14]]= router \ No newline at end of file diff --git a/server/api/widget/widget.controller.js b/server/api/widget/widget.controller.js index dbcb701..dd91209 100644 --- a/server/api/widget/widget.controller.js +++ b/server/api/widget/widget.controller.js @@ -1,147 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var sequelize = require('../../models').sequelize; -var reportBuildUtils = require('../../utils/report_build'); -var Promise = require('bluebird'); - -// var ReportAgent = require('../../models').ReportAgent; -// var ReportCall = require('../../models').ReportCall; -// var ReportDial = require('../../models').ReportDial; -// var ReportMember = require('../../models').ReportMember; -// var ReportQueue = require('../../models').ReportQueue; - - - -exports.counter = function(req, res) { - return Promise - .all([]) - .then(function() { - return req.query.table; - }) - .then(reportBuildUtils.buildFilter(req.user)) - .then(function(filter) { - var query = util.format("SELECT %s FROM %s", req.query.select, req.query.table); - if (req.query.condition) { - query += util.format(" WHERE %s", decodeURIComponent(req.query.condition)) - } - if (!filter || filter !== 'empty') { - if (filter) { - query += req.query.condition ? ' AND ' + filter : ' WHERE ' + filter; - } - console.log(' ==== RESULTING QUERY ===='); - console.log(query); - console.log(' ========================='); - return sequelize.query(query, { - type: sequelize.QueryTypes.SELECT - }); - } else { - console.log(' ==== RESULTING QUERY ===='); - console.log('NO SUFFICIENT PERMISSIONS'); - console.log(' ========================='); - return []; - } - }) - .then(function(result) { - return res.status(200).send({ - result: result - }); - }) - .catch(function(err) { - console.log(err); - return handleError(res, err); - }); -}; - -exports.table = function(req, res) { - var columns = []; - var elem; - if (req.query.fields) { - if (_.isArray(req.query.fields)) { - req.query.fields.forEach(function(element) { - elem = JSON.parse(element); - if (elem.column && elem.alias) { - columns.push(elem.column + ' AS "' + elem.alias + '"'); - } - }); - } else if (_.isString(req.query.fields)) { - elem = JSON.parse(req.query.fields); - if (elem.column && elem.alias) { - columns.push(elem.column + ' AS "' + elem.alias + '"'); - } - } - } - var select = columns.length ? columns.join(',') : '*'; - sequelize.query(util.format("SELECT %s FROM %s WHERE %s", select, 'report' + req.query.table, decodeURIComponent(req.query.condition)), { - type: sequelize.QueryTypes.SELECT - }) - .then(function(result) { - return res.status(200).send(result); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.piechart = function(req, res) { - return Promise - .all([]) - .then(function() { - return req.query.table; - }) - .then(reportBuildUtils.buildFilter(req.user)) - .then(function(filter) { - var columns = []; - var elem; - if (req.query.fields) { - if (_.isArray(req.query.fields)) { - req.query.fields.forEach(function(element) { - elem = JSON.parse(element); - if (elem.column && elem.alias) { - columns.push(elem.column + ' AS "' + elem.alias + '"'); - } - }); - } else if (_.isString(req.query.fields)) { - elem = JSON.parse(req.query.fields); - if (elem.column && elem.alias) { - columns.push(elem.column + ' AS "' + elem.alias + '"'); - } - } - } - var select = columns.length ? columns.join(',') : '*'; - var where = ''; - if (req.query.condition !== 'undefined') { - where = util.format(' WHERE %s', decodeURIComponent(req.query.condition)); - } - if (!filter || filter !== 'empty') { - if (filter) { - where += ' AND ' + filter; - } - var query = util.format("SELECT %s FROM %s%s", select, req.query.table, where); - console.log(' ==== RESULTING QUERY ===='); - console.log(query); - console.log(' ========================='); - return sequelize.query(query, { - type: sequelize.QueryTypes.SELECT - }); - } else { - console.log(' ==== RESULTING QUERY ===='); - console.log('NO SUFFICIENT PERMISSIONS'); - console.log(' ========================='); - return []; - } - }) - .then(function(result) { - return res.status(200).send({ - result: result - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0x8c3f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x62\x6C\x75\x65\x62\x69\x72\x64","\x63\x6F\x75\x6E\x74\x65\x72","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x25\x73","\x73\x65\x6C\x65\x63\x74","\x71\x75\x65\x72\x79","\x74\x61\x62\x6C\x65","\x66\x6F\x72\x6D\x61\x74","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x20\x57\x48\x45\x52\x45\x20\x25\x73","\x65\x6D\x70\x74\x79","\x20\x41\x4E\x44\x20","\x20\x57\x48\x45\x52\x45\x20","\x20\x3D\x3D\x3D\x3D\x20\x52\x45\x53\x55\x4C\x54\x49\x4E\x47\x20\x51\x55\x45\x52\x59\x20\x3D\x3D\x3D\x3D","\x20\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x4E\x4F\x20\x53\x55\x46\x46\x49\x43\x49\x45\x4E\x54\x20\x50\x45\x52\x4D\x49\x53\x53\x49\x4F\x4E\x53","\x75\x73\x65\x72","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x61\x6C\x6C","\x66\x69\x65\x6C\x64\x73","\x69\x73\x41\x72\x72\x61\x79","\x70\x61\x72\x73\x65","\x63\x6F\x6C\x75\x6D\x6E","\x61\x6C\x69\x61\x73","\x20\x41\x53\x20\x22","\x22","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x69\x73\x53\x74\x72\x69\x6E\x67","\x6C\x65\x6E\x67\x74\x68","\x2C","\x6A\x6F\x69\x6E","\x2A","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x25\x73\x20\x57\x48\x45\x52\x45\x20\x25\x73","\x72\x65\x70\x6F\x72\x74","\x70\x69\x65\x63\x68\x61\x72\x74","","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x53\x45\x4C\x45\x43\x54\x20\x25\x73\x20\x46\x52\x4F\x4D\x20\x25\x73\x25\x73"];_0x8c3f[0];var _=require(_0x8c3f[1]);var util=require(_0x8c3f[2]);var sequelize=require(_0x8c3f[4])[_0x8c3f[3]];var reportBuildUtils=require(_0x8c3f[5]);var Promise=require(_0x8c3f[6]);exports[_0x8c3f[7]]= function(_0x2d8bx6,_0x2d8bx7){return Promise[_0x8c3f[30]]([])[_0x8c3f[12]](function(){return _0x2d8bx6[_0x8c3f[15]][_0x8c3f[16]]})[_0x8c3f[12]](reportBuildUtils[_0x8c3f[29]](_0x2d8bx6[_0x8c3f[28]]))[_0x8c3f[12]](function(_0x2d8bxa){var _0x2d8bxb=util[_0x8c3f[17]](_0x8c3f[13],_0x2d8bx6[_0x8c3f[15]][_0x8c3f[14]],_0x2d8bx6[_0x8c3f[15]][_0x8c3f[16]]);if(_0x2d8bx6[_0x8c3f[15]][_0x8c3f[18]]){_0x2d8bxb+= util[_0x8c3f[17]](_0x8c3f[19],decodeURIComponent(_0x2d8bx6[_0x8c3f[15]][_0x8c3f[18]]))};if(!_0x2d8bxa|| _0x2d8bxa!== _0x8c3f[20]){if(_0x2d8bxa){_0x2d8bxb+= _0x2d8bx6[_0x8c3f[15]][_0x8c3f[18]]?_0x8c3f[21]+ _0x2d8bxa:_0x8c3f[22]+ _0x2d8bxa};console[_0x8c3f[8]](_0x8c3f[23]);console[_0x8c3f[8]](_0x2d8bxb);console[_0x8c3f[8]](_0x8c3f[24]);return sequelize[_0x8c3f[15]](_0x2d8bxb,{type:sequelize[_0x8c3f[26]][_0x8c3f[25]]})}else {console[_0x8c3f[8]](_0x8c3f[23]);console[_0x8c3f[8]](_0x8c3f[27]);console[_0x8c3f[8]](_0x8c3f[24]);return []}})[_0x8c3f[12]](function(_0x2d8bx9){return _0x2d8bx7[_0x8c3f[11]](200)[_0x8c3f[10]]({result:_0x2d8bx9})})[_0x8c3f[9]](function(_0x2d8bx8){console[_0x8c3f[8]](_0x2d8bx8);return handleError(_0x2d8bx7,_0x2d8bx8)})};exports[_0x8c3f[16]]= function(_0x2d8bx6,_0x2d8bx7){var _0x2d8bxc=[];var _0x2d8bxd;if(_0x2d8bx6[_0x8c3f[15]][_0x8c3f[31]]){if(_[_0x8c3f[32]](_0x2d8bx6[_0x8c3f[15]][_0x8c3f[31]])){_0x2d8bx6[_0x8c3f[15]][_0x8c3f[31]][_0x8c3f[39]](function(_0x2d8bxe){_0x2d8bxd= JSON[_0x8c3f[33]](_0x2d8bxe);if(_0x2d8bxd[_0x8c3f[34]]&& _0x2d8bxd[_0x8c3f[35]]){_0x2d8bxc[_0x8c3f[38]](_0x2d8bxd[_0x8c3f[34]]+ _0x8c3f[36]+ _0x2d8bxd[_0x8c3f[35]]+ _0x8c3f[37])}})}else {if(_[_0x8c3f[40]](_0x2d8bx6[_0x8c3f[15]][_0x8c3f[31]])){_0x2d8bxd= JSON[_0x8c3f[33]](_0x2d8bx6[_0x8c3f[15]][_0x8c3f[31]]);if(_0x2d8bxd[_0x8c3f[34]]&& _0x2d8bxd[_0x8c3f[35]]){_0x2d8bxc[_0x8c3f[38]](_0x2d8bxd[_0x8c3f[34]]+ _0x8c3f[36]+ _0x2d8bxd[_0x8c3f[35]]+ _0x8c3f[37])}}}};var _0x2d8bxf=_0x2d8bxc[_0x8c3f[41]]?_0x2d8bxc[_0x8c3f[43]](_0x8c3f[42]):_0x8c3f[44];sequelize[_0x8c3f[15]](util[_0x8c3f[17]](_0x8c3f[45],_0x2d8bxf,_0x8c3f[46]+ _0x2d8bx6[_0x8c3f[15]][_0x8c3f[16]],decodeURIComponent(_0x2d8bx6[_0x8c3f[15]][_0x8c3f[18]])),{type:sequelize[_0x8c3f[26]][_0x8c3f[25]]})[_0x8c3f[12]](function(_0x2d8bx9){return _0x2d8bx7[_0x8c3f[11]](200)[_0x8c3f[10]](_0x2d8bx9)})[_0x8c3f[9]](function(_0x2d8bx8){return handleError(_0x2d8bx7,_0x2d8bx8)})};exports[_0x8c3f[47]]= function(_0x2d8bx6,_0x2d8bx7){return Promise[_0x8c3f[30]]([])[_0x8c3f[12]](function(){return _0x2d8bx6[_0x8c3f[15]][_0x8c3f[16]]})[_0x8c3f[12]](reportBuildUtils[_0x8c3f[29]](_0x2d8bx6[_0x8c3f[28]]))[_0x8c3f[12]](function(_0x2d8bxa){var _0x2d8bxc=[];var _0x2d8bxd;if(_0x2d8bx6[_0x8c3f[15]][_0x8c3f[31]]){if(_[_0x8c3f[32]](_0x2d8bx6[_0x8c3f[15]][_0x8c3f[31]])){_0x2d8bx6[_0x8c3f[15]][_0x8c3f[31]][_0x8c3f[39]](function(_0x2d8bxe){_0x2d8bxd= JSON[_0x8c3f[33]](_0x2d8bxe);if(_0x2d8bxd[_0x8c3f[34]]&& _0x2d8bxd[_0x8c3f[35]]){_0x2d8bxc[_0x8c3f[38]](_0x2d8bxd[_0x8c3f[34]]+ _0x8c3f[36]+ _0x2d8bxd[_0x8c3f[35]]+ _0x8c3f[37])}})}else {if(_[_0x8c3f[40]](_0x2d8bx6[_0x8c3f[15]][_0x8c3f[31]])){_0x2d8bxd= JSON[_0x8c3f[33]](_0x2d8bx6[_0x8c3f[15]][_0x8c3f[31]]);if(_0x2d8bxd[_0x8c3f[34]]&& _0x2d8bxd[_0x8c3f[35]]){_0x2d8bxc[_0x8c3f[38]](_0x2d8bxd[_0x8c3f[34]]+ _0x8c3f[36]+ _0x2d8bxd[_0x8c3f[35]]+ _0x8c3f[37])}}}};var _0x2d8bxf=_0x2d8bxc[_0x8c3f[41]]?_0x2d8bxc[_0x8c3f[43]](_0x8c3f[42]):_0x8c3f[44];var _0x2d8bx10=_0x8c3f[48];if(_0x2d8bx6[_0x8c3f[15]][_0x8c3f[18]]!== _0x8c3f[49]){_0x2d8bx10= util[_0x8c3f[17]](_0x8c3f[19],decodeURIComponent(_0x2d8bx6[_0x8c3f[15]][_0x8c3f[18]]))};if(!_0x2d8bxa|| _0x2d8bxa!== _0x8c3f[20]){if(_0x2d8bxa){_0x2d8bx10+= _0x8c3f[21]+ _0x2d8bxa};var _0x2d8bxb=util[_0x8c3f[17]](_0x8c3f[50],_0x2d8bxf,_0x2d8bx6[_0x8c3f[15]][_0x8c3f[16]],_0x2d8bx10);console[_0x8c3f[8]](_0x8c3f[23]);console[_0x8c3f[8]](_0x2d8bxb);console[_0x8c3f[8]](_0x8c3f[24]);return sequelize[_0x8c3f[15]](_0x2d8bxb,{type:sequelize[_0x8c3f[26]][_0x8c3f[25]]})}else {console[_0x8c3f[8]](_0x8c3f[23]);console[_0x8c3f[8]](_0x8c3f[27]);console[_0x8c3f[8]](_0x8c3f[24]);return []}})[_0x8c3f[12]](function(_0x2d8bx9){return _0x2d8bx7[_0x8c3f[11]](200)[_0x8c3f[10]]({result:_0x2d8bx9})})[_0x8c3f[9]](function(_0x2d8bx8){return handleError(_0x2d8bx7,_0x2d8bx8)})};function handleError(_0x2d8bx7,_0x2d8bx8){return _0x2d8bx7[_0x8c3f[11]](500)[_0x8c3f[10]](_0x2d8bx8)} \ No newline at end of file diff --git a/server/api/xchatty/index.js b/server/api/xchatty/index.js index d408579..3908063 100644 --- a/server/api/xchatty/index.js +++ b/server/api/xchatty/index.js @@ -1,28 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./xchatty.controller'); -var license = require('../../config/license/license.service'); - -var router = express.Router(); - -router.get('/jquery', controller.getJqueryLibrary); -router.get('/assets', controller.getAssets); - -router.get('/submit', controller.submitEnquiry); -router.get('/rating', controller.setRating); - -router.get('/:id', license.isValidDate(), license.hasChat(), controller.getJsByWebsite); -router.get('/:id/abandon', license.isValidDate(), license.hasChat(), controller.abandonCustomer); -router.get('/:id/html', license.isValidDate(), license.hasChat(), controller.getHtmlByWebsite); -router.get('/:id/proactive', license.isValidDate(), license.hasChat(), controller.getProactiveActionsByWebsite); -router.get('/:id/read', license.isValidDate(), license.hasChat(), controller.getMessages); -router.get('/:id/send', license.isValidDate(), license.hasChat(), controller.sendMessage); -router.get('/:id/signout', license.isValidDate(), license.hasChat(), controller.signoutCustomer); -router.get('/:id/signup', license.isValidDate(), license.hasChat(), controller.signupCustomer); -router.get('/:id/status', license.isValidDate(), license.hasChat(), controller.getStatusByWebsite); -router.get('/:id/styles', license.isValidDate(), license.hasChat(), controller.getStyleByWebsite); -router.get('/:id/transcript', license.isValidDate(), license.hasChat(), controller.getTranscript); -router.get('/:id/unserved', license.isValidDate(), license.hasChat(), controller.unservedCustomer); - -module.exports = router; +var _0xd50e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x78\x63\x68\x61\x74\x74\x79\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x6A\x71\x75\x65\x72\x79","\x67\x65\x74\x4A\x71\x75\x65\x72\x79\x4C\x69\x62\x72\x61\x72\x79","\x67\x65\x74","\x2F\x61\x73\x73\x65\x74\x73","\x67\x65\x74\x41\x73\x73\x65\x74\x73","\x2F\x73\x75\x62\x6D\x69\x74","\x73\x75\x62\x6D\x69\x74\x45\x6E\x71\x75\x69\x72\x79","\x2F\x72\x61\x74\x69\x6E\x67","\x73\x65\x74\x52\x61\x74\x69\x6E\x67","\x2F\x3A\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x68\x61\x73\x43\x68\x61\x74","\x67\x65\x74\x4A\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x43\x75\x73\x74\x6F\x6D\x65\x72","\x2F\x3A\x69\x64\x2F\x68\x74\x6D\x6C","\x67\x65\x74\x48\x74\x6D\x6C\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65","\x67\x65\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x72\x65\x61\x64","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x2F\x3A\x69\x64\x2F\x73\x65\x6E\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x2F\x3A\x69\x64\x2F\x73\x69\x67\x6E\x6F\x75\x74","\x73\x69\x67\x6E\x6F\x75\x74\x43\x75\x73\x74\x6F\x6D\x65\x72","\x2F\x3A\x69\x64\x2F\x73\x69\x67\x6E\x75\x70","\x73\x69\x67\x6E\x75\x70\x43\x75\x73\x74\x6F\x6D\x65\x72","\x2F\x3A\x69\x64\x2F\x73\x74\x61\x74\x75\x73","\x67\x65\x74\x53\x74\x61\x74\x75\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x73\x74\x79\x6C\x65\x73","\x67\x65\x74\x53\x74\x79\x6C\x65\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x2F\x3A\x69\x64\x2F\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x67\x65\x74\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x2F\x3A\x69\x64\x2F\x75\x6E\x73\x65\x72\x76\x65\x64","\x75\x6E\x73\x65\x72\x76\x65\x64\x43\x75\x73\x74\x6F\x6D\x65\x72","\x65\x78\x70\x6F\x72\x74\x73"];_0xd50e[0];var express=require(_0xd50e[1]);var controller=require(_0xd50e[2]);var license=require(_0xd50e[3]);var router=express.Router();router[_0xd50e[6]](_0xd50e[4],controller[_0xd50e[5]]);router[_0xd50e[6]](_0xd50e[7],controller[_0xd50e[8]]);router[_0xd50e[6]](_0xd50e[9],controller[_0xd50e[10]]);router[_0xd50e[6]](_0xd50e[11],controller[_0xd50e[12]]);router[_0xd50e[6]](_0xd50e[13],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[16]]);router[_0xd50e[6]](_0xd50e[17],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[18]]);router[_0xd50e[6]](_0xd50e[19],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[20]]);router[_0xd50e[6]](_0xd50e[21],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[22]]);router[_0xd50e[6]](_0xd50e[23],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[24]]);router[_0xd50e[6]](_0xd50e[25],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[26]]);router[_0xd50e[6]](_0xd50e[27],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[28]]);router[_0xd50e[6]](_0xd50e[29],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[30]]);router[_0xd50e[6]](_0xd50e[31],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[32]]);router[_0xd50e[6]](_0xd50e[33],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[34]]);router[_0xd50e[6]](_0xd50e[35],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[36]]);router[_0xd50e[6]](_0xd50e[37],license[_0xd50e[14]](),license[_0xd50e[15]](),controller[_0xd50e[38]]);module[_0xd50e[39]]= router \ No newline at end of file diff --git a/server/api/xchatty/xchatty.controller.js b/server/api/xchatty/xchatty.controller.js index 527adb7..ad4d082 100644 --- a/server/api/xchatty/xchatty.controller.js +++ b/server/api/xchatty/xchatty.controller.js @@ -1,1286 +1 @@ -'use strict'; - -var _ = require('lodash'); -var jsmin = require('jsmin').jsmin; -var Mustache = require('mustache'); -var querystring = require('querystring'); -var path = require('path'); -var md5 = require('md5'); -var fs = require('fs'); -var UAParser = require('ua-parser-js'); -var uaParser = new UAParser(); -var languageParser = require('accept-language-parser'); -var ipaddr = require('ipaddr.js'); -var geoip = require('geoip-lite'); -var csv = require('to-csv'); -var util = require('util'); -var moment = require('moment'); - -var Scheduler = require('../../config/routing/scheduler'); -var config = require('../../config/environment'); -var xchatty_components = require('../../components/xchatty'); -var Util = require('../../config/util'); -var license = require('../../config/license/license.service'); -var demoLicense = { - users: 1, - agents: 1, - telephones: 0, - chat: false, - mail: false, - fax: false, - messaging: false, - cm: false, - dialer: false, - jscripty: false, - update: false, - custom: false, - description: 'DEMO LICENSE' -}; - -var sequelize = require('../../models').sequelize; -var User = require('../../models').User; -var Agent = require('../../models').User; -var ChatRoom = require('../../models').ChatRoom; -var ChatEnquiry = require('../../models').ChatEnquiry; -var ChatVisitor = require('../../models').ChatVisitor; -var ChatMessage = require('../../models').ChatMessage; -var ChatWebsite = require('../../models').ChatWebsite; -var ChatWebsitesField = require('../../models').ChatWebsitesField; -var ChatProactiveAction = require('../../models').ChatProactiveAction; -var ReportChatSession = require('../../models').ReportChatSession; -var ChatQueue = require('../../models').ChatQueue; -var License = require('../../models').License; -var Xchatty = require('../../models').Xchatty; -var Setting = require('../../models').Setting; -const Contact = require('../../models').Contact; -var Interval = require('../../models').Interval; - -const weekDaysCollection = { - mon: 1, - tue: 2, - wed: 3, - thu: 4, - fri: 5, - sat: 6, - sun: 7 -}; - -const monthsCollection = { - jan: 1, - feb: 2, - mar: 3, - apr: 4, - may: 5, - jun: 6, - jul: 7, - aug: 8, - sep: 9, - oct: 10, - nov: 11, - dec: 12 -}; - -var id = 1; - -// Get list of xchattys -exports.index = function(req, res, next) { - return Xchatty - .findAll() - .then(function(xchattys) { - return res.status(200).send(xchattys); - }) - .catch(function(err) { - return next(err); - }); -}; - -exports.getJsByWebsite = function(req, res, next) { - - // TO DO: Find the configuration of the website and replace configuration in the file - ChatWebsite - .findById(req.params.id) - .then(function(chatWebsite) { - res.set({ - 'Content-Type': 'application/javascript', - 'x-timestamp': Date.now(), - 'x-sent': true - }); - - var js = xchatty_components.js; - /*jshint multistr: true */ - var configJS = { - websiteId: req.params.id, - // rootPath: path.join(chatWebsite.remote, 'api', 'xchatty/'), - rootPath: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/', - signedUp: 'false', - windowFocused: 'false', - isNewPage: 'true', - processingSignUp: 'false', - processingEnquiry: 'false', - processingSend: 'false', - processingRating: 'false', - visitorFullname: '""', - visitorAvatar: '""', - timerReadMessages: 'null', - timerCheckStatus: 'null', - isOnline: 'false', - decayHistory: 0, - defaultTimeout: 5000, - isInitialStatusCheck: 'true', - muteNotificationSoundOnce: 'false', - assetBase: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/assets', - hasSessionSaf: 'false', - restoreOpenState: 'false', - animateHover: chatWebsite.animation, - hideEmail: 'false', - hideOffline: 'false', - headerShape: chatWebsite.header_shape, - HeaderOnline: chatWebsite.header_online, - OnlineMessage: chatWebsite.online_message, - UsernamePlaceholder: chatWebsite.username_placeholder, - EmailPlaceholder: chatWebsite.email_placeholder, - StartChatButtonText: chatWebsite.start_chat_button, - OfflineMessage: chatWebsite.offline_message, - HeaderOffline: chatWebsite.header_offline, - EnquiryMessagePlaceholder: chatWebsite.enquiry_message_placeholder, - EnquiryButtonText: chatWebsite.enquiry_button, - downloadTranscript: chatWebsite.download_transcript, - RatingMessage: chatWebsite.rating_message, - RatingSend: chatWebsite.rating_send, - RatingSkip: chatWebsite.rating_skip, - MessageAgentsBusy: chatWebsite.agents_busy, - NameTitle: chatWebsite.name_title, - EmailTitle: chatWebsite.email_title, - MessageTitle: chatWebsite.message_title - }; - - js = Mustache.render(js, configJS); - res.send(js); - - }) - .catch(function(err) { - next(err); - }); - -}; - -exports.getStyleByWebsite = function(req, res, next) { - - // TO DO: Find the configuration of the website and replace configuration in the file - ChatWebsite - .findById(req.params.id) - .then(function(chatWebsite) { - - res.set({ - 'Content-Type': 'text/css', - 'x-timestamp': Date.now(), - 'x-sent': true - }); - - var css = xchatty_components.css; - - var configCSS = { - // assetBase: path.join(chatWebsite.remote, 'api', 'xchatty', - // 'assets'), - assetBase: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/assets', - color: chatWebsite.color, - colorFocus: chatWebsite.color_focus, - colorButton: chatWebsite.color_button - }; - - css = Mustache.render(css, configCSS); - res.send(css); - }) - .catch(function(err) { - next(err); - }); -}; - -exports.getAssets = function(req, res, next) { - if (req.query.hasOwnProperty('uploaded')) { - res.download(path.join(config.root, 'server', 'files', req.query.resource)); - } else { - res.download(path.join(config.root, 'server', 'components', 'xchatty', 'assets', req.query.resource)); - } -}; - -exports.getJqueryLibrary = function(req, res, next) { - - // TODO: Find the configuration of the website and replace configuration in the file - res.set({ - 'Content-Type': 'application/javascript', - 'x-timestamp': Date.now(), - 'x-sent': true - }); - - var jquery = xchatty_components.jquery; - res.send(jquery); - -}; - -exports.getStatus = function(req, res, next) { - - if (!req.session.xchatty) { - req.session.xchatty = {}; - } - - var _jsonResponse = {}; - - return Agent - .findAll({ - where: { - online: true, - role: 'agent' - } - }) - .then(function(agents) { - if (req.query.data.open_state) - req.session.xchatty.open_state = req.query.data.open_state === 'true' ? true : false; - _jsonResponse = { - success: true, - has_session_saf: null, - signed_up: req.session.xchatty.room_id ? true : false, - fullname: req.session.xchatty.fullname ? req.session.xchatty.fullname : '', - email: req.session.xchatty.email ? req.session.xchatty.email : '', - avatar: req.session.xchatty.avatar ? req.session.xchatty.avatar : '', - open_state: req.session.xchatty.open_state || req.session.xchatty.room_id ? true : false, - online: agents.length ? true : false, - is_unserved: false, - room_id: 0 - }; - return; - }) - .then(function() { - if (req.session.xchatty.visitor_id) { - return ChatRoom - .findOne({ - where: { - ChatVisitorId: req.session.xchatty.visitor_id, - status: 'OPEN', - token: { - $ne: '' - } - } - }); - } - return; - }) - .then(function(chatRoom) { - if (chatRoom) { - req.session.xchatty.room_id = chatRoom.id; - _jsonResponse.room_id = chatRoom.id; - _jsonResponse.signed_up = true; - } else { - _jsonResponse.signed_up = false; - } - return; - }) - .then(function() { - if (req.session.xchatty.visitor_id) { - return ChatVisitor - .findOne({ - where: { - id: req.session.xchatty.visitor_id, - status: 'unserved' - } - }) - } - return; - }) - .then(function(visitor) { - if (visitor) { - _jsonResponse.is_unserved = true; - } - return res.send(req.query.callback + '(' + JSON.stringify(_jsonResponse) + ')'); - }) - .catch(function(err) { - return next(err); - }); -}; - -exports.getMessages = function(req, res, next) { - - var _websiteId = req.params.id; - - /*jshint multistr: true */ - var condition = { - where: { - ChatRoomId: req.session.xchatty[_websiteId].room_id - }, - include: [{ - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }, { - model: ChatVisitor, - attributes: ['id', 'fullname', 'email'] - }] - }; - - if (req.query.data.is_new_page === 'false') { - condition.where.id = { - $gt: req.query.data.last_id - }; - } - - ChatMessage - .findAll(condition) - .then(function(chatMessages) { - var json = { - success: true, - messages: chatMessages, - composing: false, - composing_fullname: null - }; - - res.send(req.query.callback + '(' + JSON.stringify(json) + ')'); - }) - .catch(function(err) { - next(err); - }); -}; - -exports.sendMessage = function(req, res, next) { - - var _websiteId = req.params.id; - - /*jshint multistr: true */ - var condition = { - where: { - ChatRoomId: req.session.xchatty[_websiteId].room_id - }, - include: [{ - model: User, - attributes: ['id', 'name', 'fullname', 'email'] - }, { - model: ChatVisitor, - attributes: ['id', 'fullname', 'email'] - }] - }; - - if (req.query.data.is_new_page === 'false') { - condition.where.id = { - $gt: req.query.data.last_id - }; - } - - ChatMessage - .create({ - body: req.query.data.Message.message, - ChatRoomId: req.session.xchatty[_websiteId].room_id, - ChatVisitorId: req.session.xchatty[_websiteId].visitor_id - }) - .then(function(chatMessage) { - ChatMessage - .findAll(condition) - .then(function(chatMessages) { - var json = { - errors: [], - success: true, - data: chatMessage, - messages: chatMessages - }; - - res.send(req.query.callback + '(' + JSON.stringify(json) + ')'); - }) - .catch(function(err) { - next(err); - }); - }) - .catch(function(err) { - next(err); - }); - -}; - -exports.signoutCustomer = function(req, res, next) { - - var _websiteId = req.params.id; - - return ChatRoom - .findById(req.session.xchatty[_websiteId].room_id) - .then(function(chatRoom) { - return chatRoom - .update({ - status: 'CLOSED', - completeReason: 'requester' - }); - }) - .then(function() { - var json = { - success: true, - errors: [] - }; - req.session.xchatty[_websiteId] = {}; - res.send(req.query.callback + '(' + JSON.stringify(json) + ')'); - }) - .catch(function(err) { - next(err); - }); -}; - -exports.signupCustomer = function(req, res, next) { - - var _websiteId = req.params.id; - - var ua = uaParser.setUA(req.headers['user-agent']).getResult(); - var languages = languageParser.parse(req.headers['accept-language']); - var remoteAddress = req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] : req.connection.remoteAddress || req.ip; - - var body = { - fullname: req.query.data.Discussion.fullname, - email: req.query.data.Discussion.email, - remote_address: remoteAddress, - user_agent: req.headers['user-agent'], - visitor_language: req.headers['accept-language'], - referer: req.headers.referer, - origin: 'webchat', - browser: ua.browser.name + ' ' + ua.browser.version, - engine: ua.engine.name + ' ' + ua.engine.version, - os: ua.os.name + ' ' + ua.os.version, - device: ua.device.model ? ua.device.model + ' ' + ua.device.vendor + ' ' + ua.device.type : null, - ChatWebsiteId: req.query.chatWebsiteId - }; - - if (req.query.data.Discussion.data1 && req.query.data.Discussion.labelData1) { - body.data1 = req.query.data.Discussion.data1; - if (_.isArray(body.data1)) { - body.data1 = _.join(body.data1, ','); - } - body.labelData1 = req.query.data.Discussion.labelData1; - } - if (req.query.data.Discussion.data2 && req.query.data.Discussion.labelData2) { - body.data2 = req.query.data.Discussion.data2; - if (_.isArray(body.data2)) { - body.data2 = _.join(body.data2, ','); - } - body.labelData2 = req.query.data.Discussion.labelData2; - } - if (req.query.data.Discussion.data3 && req.query.data.Discussion.labelData3) { - body.data3 = req.query.data.Discussion.data3; - if (_.isArray(body.data3)) { - body.data3 = _.join(body.data3, ','); - } - body.labelData3 = req.query.data.Discussion.labelData3; - } - - var _chatVisitor, _chatWebsite, _chatRoom; - - return ChatVisitor - .create(body) - .then(function(chatVisitor) { - - _chatVisitor = chatVisitor; - return ChatWebsite - .findById(_chatVisitor.ChatWebsiteId); - }) - .then(function(website) { - _chatWebsite = website; - - if (_chatWebsite.ListId) { - return Contact - .findOrCreate({ - where: { - email: _chatVisitor.email, - }, - defaults: { - email: _chatVisitor.email, - firstName: _chatVisitor.fullname, - ListId: _chatWebsite.ListId - } - }); - } - }) - .then(function() { - return ChatRoom - .create({ - type: 'external', - ChatVisitorId: _chatVisitor.id, - ChatWebsiteId: _chatWebsite.id, - contact: _chatVisitor.email, - website: _chatWebsite.name - }); - }) - .then(function(chatRoom) { - _chatRoom = chatRoom; - - var scheduler = new Scheduler({ - channel: 'chat', - uniqueid: util.format('%s.%s', moment().unix(), _chatRoom.id), - roomid: _chatRoom.id, - websiteid: _chatWebsite.id, - websitename: _chatWebsite.name, - websiteaddress: _chatWebsite.address, - accountid: _chatWebsite.id, - accountname: _chatWebsite.name, - accountaddress: _chatWebsite.address, - visitorid: _chatVisitor.id, - visitorname: _chatVisitor.fullname, - visitoremail: _chatVisitor.email - }) - - scheduler.init(); - - req.session.xchatty[_websiteId].fullname = _chatVisitor.fullname; - req.session.xchatty[_websiteId].email = _chatVisitor.email; - req.session.xchatty[_websiteId].avatar = md5(_chatVisitor.email).toString('base64'); - req.session.xchatty[_websiteId].visitor_id = _chatVisitor.id; - - var json = { - success: true, - errors: [], - chatVisitor: { - id: _chatVisitor.id - } - }; - - /*jshint multistr: true */ - res.send(req.query.callback + '(' + JSON.stringify(json) + ')'); - }) - .catch(function(err) { - next(err); - }); -}; - -exports.unservedCustomer = function(req, res, next) { - - var _websiteId = req.params.id; - - return ChatVisitor - .findById(req.session.xchatty[_websiteId].visitor_id) - .then(function(chatVisitor) { - return chatVisitor - .update({ - status: 'unserved' - }); - }) - .then(function() { - var json = { - success: true, - errors: [] - }; - req.session.xchatty[_websiteId] = {}; - res.send(req.query.callback + '(' + JSON.stringify(json) + ')'); - }) - .catch(function(err) { - next(err); - }); -}; - -exports.submitEnquiry = function(req, res, next) { - - return sequelize.transaction().then(function(t) { - - var remoteAddress = req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] : req.connection.remoteAddress || req.ip; - - var ua = uaParser.setUA(req.headers['user-agent']).getResult(); - var languages = languageParser.parse(req.headers['accept-language']); - var body = { - fullname: req.query.data.Enquiry.fullname, - email: req.query.data.Enquiry.email, - remote_address: remoteAddress, - user_agent: req.headers['user-agent'], - visitor_language: req.headers['accept-language'], - browser: ua.browser.name + ' ' + ua.browser.version, - engine: ua.engine.name + ' ' + ua.engine.version, - os: ua.os.name + ' ' + ua.os.version, - device: ua.device.model ? ua.device.model + ' ' + ua.device.vendor + ' ' + ua.device.type : null, - referer: req.headers.referer, - origin: 'enquiry', - status: 'unserved', - ChatWebsiteId: parseInt(req.query.data.Enquiry.websiteId, 10), - ChatEnquiry: { - username: req.query.data.Enquiry.fullname, - email: req.query.data.Enquiry.email, - text: req.query.data.Enquiry.message, - ChatWebsiteId: parseInt(req.query.data.Enquiry.websiteId, 10) - } - }; - - if (req.query.data.Enquiry.offlineData1 && req.query.data.Enquiry.labelOfflineData1) { - body.offlineData1 = req.query.data.Enquiry.offlineData1; - if (_.isArray(body.offlineData1)) { - body.offlineData1 = _.join(body.offlineData1, ','); - } - body.labelOfflineData1 = req.query.data.Enquiry.labelOfflineData1; - } - if (req.query.data.Enquiry.offlineData2 && req.query.data.Enquiry.labelOfflineData2) { - body.offlineData2 = req.query.data.Enquiry.offlineData2; - if (_.isArray(body.offlineData2)) { - body.offlineData2 = _.join(body.offlineData2, ','); - } - body.labelOfflineData2 = req.query.data.Enquiry.labelOfflineData2; - } - if (req.query.data.Enquiry.offlineData3 && req.query.data.Enquiry.labelOfflineData3) { - body.offlineData3 = req.query.data.Enquiry.offlineData3; - if (_.isArray(body.offlineData3)) { - body.offlineData3 = _.join(body.offlineData3, ','); - } - body.labelOfflineData3 = req.query.data.Enquiry.labelOfflineData3; - } - var _chatVisitor; - return ChatVisitor - .create(body, { - transaction: t, - include: [{ - model: ChatEnquiry - }] - }) - .then(function(chatVisitor) { - - _chatVisitor = chatVisitor; - return ChatWebsite - .findById(_chatVisitor.ChatWebsiteId); - }) - .then(function(website) { - if (website.ListId) { - return Contact - .findOrCreate({ - where: { - email: _chatVisitor.email, - }, - defaults: { - email: _chatVisitor.email, - firstName: _chatVisitor.fullname, - ListId: website.ListId - } - }); - } - }) - .then(function() { - t.commit(); - res.send(req.query.callback + '(' + JSON.stringify({ - success: true, - errors: [] - }) + ')'); - }) - .catch(function(err) { - t.rollback(); - next(err); - }); - }); -}; - -exports.getTranscript = function(req, res, next) { - - var _websiteId = req.params.id; - - if (req.session.xchatty[_websiteId] && req.session.xchatty[_websiteId].visitor_id && req.session.xchatty[_websiteId].room_id) { - ChatMessage - .findAll({ - where: { - ChatRoomId: req.session.xchatty[_websiteId].room_id - }, - include: [{ - model: Agent, - attributes: ['id', 'fullname'] - }, { - model: ChatVisitor, - attributes: ['id', 'fullname'] - }] - }) - .then(function(chatMessages) { - var chatMessageForCSV = []; - chatMessages.forEach(function(chatMessage) { - var chatMsg = { - name: chatMessage.UserId ? chatMessage.User.fullname : chatMessage.ChatVisitor.fullname, - text: chatMessage.body.replace(/(\r\n|\n|\r)/gm, " "), - date: chatMessage.createdAt - }; - chatMessageForCSV.push(chatMsg); - }); - var csv_transcript = csv(chatMessageForCSV); - res.type('text/csv').status(200).send(csv_transcript); - }) - .catch(function(err) { - next(err); - }); - } -}; - -// Get a single xchatty -exports.show = function(req, res, next) { - return Xchatty - .findById(req.params.id) - .then(function(xchatty) { - if (!xchatty) { - return res.sendStatus(404); - } - return res.send(xchatty); - }) - .catch(function(err) { - return next(err); - }); -}; - -// Creates a new xchatty in the DB. -exports.create = function(req, res, next) { - return Xchatty - .create(req.body) - .then(function(xchatty) { - return res.status(201).send(xchatty); - }) - .catch(function(err) { - return next(err); - }); -}; - -// Updates an existing xchatty in the DB. -exports.update = function(req, res, next) { - if (req.body.id) { - delete req.body.id; - } - - return Xchatty - .findById(req.params.id) - .then(function(xchatty) { - if (!xchatty) { - return res.sendStatus(404); - } - var updated = _.merge(xchatty, req.body); - updated.save() - .then(function() { - return res.status(200).send(xchatty); - }) - .catch(function(err) { - return next(err); - }); - }) - .catch(function(err) { - return next(err); - }); -}; - -// Deletes a xchatty from the DB. -exports.destroy = function(req, res, next) { - return Xchatty - .findById(req.params.id) - .then(function(xchatty) { - if (!xchatty) { - return res.sendStatus(404); - } - xchatty.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return next(err); - }); - }) - .catch(function(err) { - return next(err); - }); -}; - - -exports.getHtmlByWebsite = function(req, res, next) { - var chatWebsite, myLicense, _settings; - var template = xchatty_components.template; - return ChatWebsite - .findById(req.params.id, { - include: [{ - all: true - }] - }) - .then(function(_chatWebsite) { - chatWebsite = _chatWebsite; - return Setting - .findById(1); - }) - .then(function(settings) { - _settings = settings; - return License - .findById(1); - }) - .then(function(_license) { - - if (_license) { - myLicense = JSON.parse(license.decrypt(_license.dataValues.license, _license.data1)); - } else { - myLicense = demoLicense; - } - - var configWebsite = { - rootPath: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/', - assetBase: Util.stripTrailingSlash(chatWebsite.remote) + '/api/xchatty/assets', - websiteId: chatWebsite.id, - headerShape: chatWebsite.header_shape, - enquiryEnable: chatWebsite.enquiry_enable, - onlineFields: chatWebsite.Online, - logo: function() { - if (myLicense.custom && !chatWebsite.defaultLogo && chatWebsite.logo) { - return 'images/' + chatWebsite.logo + '&uploaded'; - } else { - return 'images/motionLogo.png'; - } - }, - whiteLabel: function() { - if (myLicense.custom && !chatWebsite.defaultWhiteLabel) { - return chatWebsite.whiteLabel; - } else { - return 'Powered by xCALLY'; - } - }, - renderedOnlineField: function() { - var renderedElement = ''; - var element = this; - switch (this.component) { - case 'textInput': - renderedElement = '
'; - renderedElement += util.format('', element.index, element.label, element.required ? '*' : ''); - renderedElement += util.format('', element.label, element.index, element.index + - 1, - element.placeholder, element.required ? - 'required' : - ''); - renderedElement += '
'; - break; - case 'textArea': - renderedElement = '
'; - renderedElement += util.format('', element.index, element.label, element.required ? '*' : ''); - renderedElement += util.format('', element.index, element.label, element.index + - 1, - element.placeholder, element.required ? - 'required' : - ''); - renderedElement += '
'; - break; - case 'checkbox': - renderedElement = '
'; - renderedElement += util.format('', element.label); - _.forEach(element.options, function(item) { - renderedElement += ''; - }); - renderedElement += '
'; - break; - case 'radio': - renderedElement = '
'; - renderedElement += util.format('', element.label); - _.forEach(element.options, function(item) { - renderedElement += ''; - }); - renderedElement += '
'; - break; - case 'select': - renderedElement = '
'; - renderedElement += util.format('', element.index, element.label); - renderedElement += util.format('
'; - break; - } - renderedElement += '
'; - renderedElement += util.format('', element.index + 1, element.label); - return renderedElement; - }, - offlineFields: chatWebsite.Offline, - renderedOfflineField: function() { - var renderedElement = ''; - var element = this; - switch (this.component) { - case 'textInput': - renderedElement = '
'; - renderedElement += util.format('', element.index, element.label, element.required ? '*' : ''); - renderedElement += util.format('', element.label, element.index, - element.index + - 1, - element.placeholder, element.required ? - 'required' : - ''); - renderedElement += '
'; - break; - case 'textArea': - renderedElement = '
'; - renderedElement += util.format('', element.index, element.label, element.required ? '*' : ''); - renderedElement += util.format('', element.index, element.label, - element.index + - 1, - element.placeholder, element.required ? - 'required' : - ''); - renderedElement += '
'; - break; - case 'checkbox': - renderedElement = '
'; - renderedElement += util.format('', element.label); - _.forEach(element.options, function(item) { - renderedElement += ''; - }); - renderedElement += '
'; - break; - case 'radio': - renderedElement = '
'; - renderedElement += util.format('', element.label); - _.forEach(element.options, function(item) { - renderedElement += ''; - }); - renderedElement += '
'; - break; - case 'select': - renderedElement = '
'; - renderedElement += util.format('', element.label); - renderedElement += util.format('
'; - break; - } - renderedElement += '
'; - renderedElement += util.format('', element.index + 1, element.label); - return renderedElement; - } - }; - template = Mustache.render(template, configWebsite); - return res.status(200).jsonp(template); - }) - .catch(function(err) { - return next(err); - }); -}; - -exports.getProactiveActionsByWebsite = function(req, res, next) { - return ChatWebsite - .findById(req.params.id, { - include: [{ - model: ChatProactiveAction - }] - }) - .then(function(chatWebsite) { - if (!chatWebsite) { - return res.status(400).jsonp({}); - } - return res.status(200).jsonp(chatWebsite.ChatProactiveActions); - }) - .catch(function(err) { - return next(err); - }); -}; - -exports.setRating = function(req, res, next) { - return ChatRoom - .findById(req.query.data.Rating.room_id) - .then(function(chatRoom) { - if (!chatRoom) { - return res.status(400).jsonp({}); - } - if (req.query.data.Rating.hasOwnProperty('rating') && req.query.data.Rating.hasOwnProperty('message')) { - return chatRoom - .update({ - rating: req.query.data.Rating.rating, - ratingMessage: req.query.data.Rating.message - }); - } - return; - }) - .then(function() { - return res.status(200).jsonp({}); - }) - .catch(function(err) { - return res.status(400).jsonp(err); - }); -} - -exports.abandonCustomer = function(req, res, next) { - var _websiteId = req.params.id; - if (req.session && req.session.xchatty) { - if (req.session.xchatty.hasOwnProperty(_websiteId) && req.session.xchatty[_websiteId].hasOwnProperty('visitor_id') && req.session.xchatty[_websiteId].visitor_id > 0) { - return ReportChatSession - .find({ - where: { - visitorid: req.session.xchatty[_websiteId].visitor_id, - leaveAt: null - } - }) - .then(function(reportChatSession) { - if (!reportChatSession) { - return; - } - return reportChatSession - .update({ - abandon: true, - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - }) - .then(function() { - return res.status(200).jsonp({}); - }) - .catch(function(err) { - res.status(500).jsonp({}); - }); - } - } - return res.status(200).jsonp({}); -} - -exports.getStatusByWebsite = function(req, res, next) { - - /* - Create params for the same session chat. - The session is created for each browser and not for each tab in the browser. - */ - - if (!req.session.xchatty) { - req.session.xchatty = {}; - } - - if (!req.session.xchatty[req.params.id]) { - req.session.xchatty[req.params.id] = {}; - } - - - var _websiteId = req.params.id; - var _website; - var _jsonResponse = {}; - var _users = []; - - return ChatWebsite - .findById(_websiteId) - .then(function(website) { - if (!website) { - // return res.status(500).jsonp({}); - return res.sendStatus(500); - } - _website = website; - return _website.getChatApplications({ - include: [{ - model: ChatQueue, - include: [{ - model: Agent - }] - }, { - model: Agent - }, { - model: Interval, - include: [{ - all: true - }] - }] - }); - }) - .then(function(chatApplications) { - _.forEach(chatApplications, function(app) { - if (checkAppInterval(app)) { - if (app.app === 'queue') { - if (app.ChatQueue.hasOwnProperty('Users') && app.ChatQueue.Users.length > 0) { - _users = _.uniq(_.merge(_users, _.map(app.ChatQueue.Users, 'id'))); - } - } else if (app.app === 'agent') { - _users.push(app.User.id); - _users = _.uniq(_users); - } - } - }); - return Agent.findAndCountAll({ - where: { - online: true, - id: { - $in: _users - } - } - }); - }) - .then(function(result) { - - if (req.query.data.open_state) - req.session.xchatty[_websiteId].open_state = req.query.data.open_state === 'true' ? true : false; - - _jsonResponse = { - success: true, - has_session_saf: null, - signed_up: req.session.xchatty[_websiteId].room_id ? true : false, - fullname: req.session.xchatty[_websiteId].fullname || '', - email: req.session.xchatty[_websiteId].email || '', - avatar: req.session.xchatty[_websiteId].avatar || '', - open_state: req.session.xchatty[_websiteId].open_state || req.session.xchatty[_websiteId].room_id ? true : false, - online: result.count ? true : false, - is_unserved: false, - room_id: 0 - }; - - if (req.session.xchatty[_websiteId].visitor_id) { - return ChatRoom - .findOne({ - where: { - ChatVisitorId: req.session.xchatty[_websiteId].visitor_id, - status: 'OPEN', - token: { - $ne: '' - } - } - }); - } - - return; - }) - .then(function(chatRoom) { - if (chatRoom) { - req.session.xchatty[_websiteId].room_id = chatRoom.id; - _jsonResponse.room_id = chatRoom.id; - _jsonResponse.signed_up = true; - } else { - _jsonResponse.signed_up = false; - } - - if (req.session.xchatty[_websiteId].visitor_id) { - return ChatVisitor - .findOne({ - where: { - id: req.session.xchatty[_websiteId].visitor_id, - status: 'unserved' - } - }) - } - - return; - }) - .then(function(visitor) { - if (visitor) { - _jsonResponse.is_unserved = true; - } - // return res.status(200).send(_jsonResponse); - return res.status(200).jsonp(_jsonResponse); - }) - .catch(function(err) { - console.log('err', err); - // return res.sendStatus(500); - return res.status(500).jsonp({}); - }); -} - -function checkAppInterval(app) { - var valid = true; - - if (app.Interval) { - for (var j = 0; j < app.Interval.SubIntervals.length; j++) { - if (isIntervalValid(splitInterval(app.Interval.SubIntervals[j].interval))) { - break; - } else { - valid = false; - } - } - } else { - if (!isIntervalValid(splitInterval(app.interval))) { - valid = false; - } - } - - return valid; -} - -function splitInterval(interval) { - var finalInterval = {}; - var splittedInterval = interval.split(','); - var intValues; - splittedInterval.forEach(function(element, index) { - switch (index) { - case 0: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.t_from = moment(intValues[0], 'HH:mm'); - finalInterval.t_to = moment(intValues[1], 'HH:mm'); - } else { - finalInterval.t_from = null; - finalInterval.t_to = null; - } - break; - case 1: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.wd_from = weekDaysCollection[intValues[0]]; - finalInterval.wd_to = intValues[1] ? weekDaysCollection[intValues[1]] : null; - } else { - finalInterval.wd_from = null; - finalInterval.wd_to = null; - } - break; - case 2: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.md_from = intValues[0]; - finalInterval.md_to = intValues[1] ? intValues[1] : null; - } else { - finalInterval.md_from = null; - finalInterval.md_to = null; - } - break; - case 3: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.m_from = monthsCollection[intValues[0]]; - finalInterval.m_to = intValues[1] ? monthsCollection[intValues[1]] : null; - } else { - finalInterval.m_from = null; - finalInterval.m_to = null; - } - break; - default: - - } - - - }); - return finalInterval; -} - -function isIntervalValid(interval) { - var hour = moment().format("HH:mm"); - var day = moment().format("E"); - var monthDay = moment().format("D"); - var month = moment().format("M"); - - var tValid, wdValid, mdValid, mValid; - var monthsNumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; - var weekDaysNumbers = [1, 2, 3, 4, 5, 6, 7]; - var daysOfMonthsNumbers = []; - for (var i = 1; i <= 31; i++) { - daysOfMonthsNumbers.push(i); - } - tValid = (interval.t_from && interval.t_to) ? moment(hour, "HH:mm").isBetween(moment(interval.t_from, "HH:mm"), moment(interval.t_to, "HH:mm")) : true; - if (interval.wd_from) { - if (interval.wd_to) { - var validWeekdays = _.filter(weekDaysNumbers, function(elem) { - return (elem >= interval.wd_from) && (elem <= interval.wd_to); - }); - wdValid = (validWeekdays.indexOf(parseInt(day)) !== -1) ? true : false; - } else { - wdValid = (parseInt(day) === interval.wd_from) ? true : false; - } - } else { - wdValid = true; - } - if (interval.md_from) { - if (interval.md_to) { - var validMonthsdays = _.filter(daysOfMonthsNumbers, function(elem) { - return (elem >= interval.md_from) && (elem <= interval.md_to); - }); - mdValid = (validMonthsdays.indexOf(parseInt(monthDay)) !== -1) ? true : false; - } else { - mdValid = (parseInt(monthDay) === interval.md_from) ? true : false; - } - } else { - mdValid = true; - } - if (interval.m_from) { - if (interval.m_to) { - var validMonths = _.filter(monthsNumbers, function(elem) { - return (elem >= interval.m_from) && (elem <= interval.m_to); - }); - mValid = (validMonths.indexOf(parseInt(month)) !== -1) ? true : false; - } else { - mValid = (parseInt(month) === interval.m_from) ? true : false; - } - } else { - mValid = true; - } - return tValid && wdValid && mdValid && mValid; -} +var _0x8af6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6A\x73\x6D\x69\x6E","\x6D\x75\x73\x74\x61\x63\x68\x65","\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x70\x61\x74\x68","\x6D\x64\x35","\x66\x73","\x75\x61\x2D\x70\x61\x72\x73\x65\x72\x2D\x6A\x73","\x61\x63\x63\x65\x70\x74\x2D\x6C\x61\x6E\x67\x75\x61\x67\x65\x2D\x70\x61\x72\x73\x65\x72","\x69\x70\x61\x64\x64\x72\x2E\x6A\x73","\x67\x65\x6F\x69\x70\x2D\x6C\x69\x74\x65","\x74\x6F\x2D\x63\x73\x76","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x78\x63\x68\x61\x74\x74\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x44\x45\x4D\x4F\x20\x4C\x49\x43\x45\x4E\x53\x45","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x73\x46\x69\x65\x6C\x64","\x43\x68\x61\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4C\x69\x63\x65\x6E\x73\x65","\x58\x63\x68\x61\x74\x74\x79","\x53\x65\x74\x74\x69\x6E\x67","\x43\x6F\x6E\x74\x61\x63\x74","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x67\x65\x74\x4A\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x6E\x6F\x77","\x73\x65\x74","\x6A\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x72\x65\x6D\x6F\x74\x65","\x73\x74\x72\x69\x70\x54\x72\x61\x69\x6C\x69\x6E\x67\x53\x6C\x61\x73\x68","\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79\x2F","\x66\x61\x6C\x73\x65","\x74\x72\x75\x65","\x22\x22","\x6E\x75\x6C\x6C","\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79\x2F\x61\x73\x73\x65\x74\x73","\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E","\x68\x65\x61\x64\x65\x72\x5F\x73\x68\x61\x70\x65","\x68\x65\x61\x64\x65\x72\x5F\x6F\x6E\x6C\x69\x6E\x65","\x6F\x6E\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65\x5F\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x65\x6D\x61\x69\x6C\x5F\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x73\x74\x61\x72\x74\x5F\x63\x68\x61\x74\x5F\x62\x75\x74\x74\x6F\x6E","\x6F\x66\x66\x6C\x69\x6E\x65\x5F\x6D\x65\x73\x73\x61\x67\x65","\x68\x65\x61\x64\x65\x72\x5F\x6F\x66\x66\x6C\x69\x6E\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x6D\x65\x73\x73\x61\x67\x65\x5F\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x65\x6E\x71\x75\x69\x72\x79\x5F\x62\x75\x74\x74\x6F\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x5F\x74\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x72\x61\x74\x69\x6E\x67\x5F\x6D\x65\x73\x73\x61\x67\x65","\x72\x61\x74\x69\x6E\x67\x5F\x73\x65\x6E\x64","\x72\x61\x74\x69\x6E\x67\x5F\x73\x6B\x69\x70","\x61\x67\x65\x6E\x74\x73\x5F\x62\x75\x73\x79","\x6E\x61\x6D\x65\x5F\x74\x69\x74\x6C\x65","\x65\x6D\x61\x69\x6C\x5F\x74\x69\x74\x6C\x65","\x6D\x65\x73\x73\x61\x67\x65\x5F\x74\x69\x74\x6C\x65","\x72\x65\x6E\x64\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x53\x74\x79\x6C\x65\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x63\x73\x73","\x63\x6F\x6C\x6F\x72","\x63\x6F\x6C\x6F\x72\x5F\x66\x6F\x63\x75\x73","\x63\x6F\x6C\x6F\x72\x5F\x62\x75\x74\x74\x6F\x6E","\x67\x65\x74\x41\x73\x73\x65\x74\x73","\x75\x70\x6C\x6F\x61\x64\x65\x64","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x71\x75\x65\x72\x79","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x72\x65\x73\x6F\x75\x72\x63\x65","\x6A\x6F\x69\x6E","\x64\x6F\x77\x6E\x6C\x6F\x61\x64","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73","\x78\x63\x68\x61\x74\x74\x79","\x61\x73\x73\x65\x74\x73","\x67\x65\x74\x4A\x71\x75\x65\x72\x79\x4C\x69\x62\x72\x61\x72\x79","\x6A\x71\x75\x65\x72\x79","\x67\x65\x74\x53\x74\x61\x74\x75\x73","\x73\x65\x73\x73\x69\x6F\x6E","\x69\x73\x5F\x75\x6E\x73\x65\x72\x76\x65\x64","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x28","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x29","\x76\x69\x73\x69\x74\x6F\x72\x5F\x69\x64","\x75\x6E\x73\x65\x72\x76\x65\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x6F\x6F\x6D\x5F\x69\x64","\x73\x69\x67\x6E\x65\x64\x5F\x75\x70","\x4F\x50\x45\x4E","","\x6F\x70\x65\x6E\x5F\x73\x74\x61\x74\x65","\x64\x61\x74\x61","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x61\x76\x61\x74\x61\x72","\x6C\x65\x6E\x67\x74\x68","\x61\x67\x65\x6E\x74","\x67\x65\x74\x4D\x65\x73\x73\x61\x67\x65\x73","\x6E\x61\x6D\x65","\x69\x73\x5F\x6E\x65\x77\x5F\x70\x61\x67\x65","\x77\x68\x65\x72\x65","\x6C\x61\x73\x74\x5F\x69\x64","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x6D\x65\x73\x73\x61\x67\x65","\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65","\x73\x69\x67\x6E\x6F\x75\x74\x43\x75\x73\x74\x6F\x6D\x65\x72","\x43\x4C\x4F\x53\x45\x44","\x72\x65\x71\x75\x65\x73\x74\x65\x72","\x75\x70\x64\x61\x74\x65","\x73\x69\x67\x6E\x75\x70\x43\x75\x73\x74\x6F\x6D\x65\x72","\x67\x65\x74\x52\x65\x73\x75\x6C\x74","\x75\x73\x65\x72\x2D\x61\x67\x65\x6E\x74","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x74\x55\x41","\x61\x63\x63\x65\x70\x74\x2D\x6C\x61\x6E\x67\x75\x61\x67\x65","\x70\x61\x72\x73\x65","\x78\x2D\x66\x6F\x72\x77\x61\x72\x64\x65\x64\x2D\x66\x6F\x72","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x69\x70","\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E","\x72\x65\x66\x65\x72\x65\x72","\x77\x65\x62\x63\x68\x61\x74","\x62\x72\x6F\x77\x73\x65\x72","\x20","\x76\x65\x72\x73\x69\x6F\x6E","\x65\x6E\x67\x69\x6E\x65","\x6F\x73","\x6D\x6F\x64\x65\x6C","\x64\x65\x76\x69\x63\x65","\x76\x65\x6E\x64\x6F\x72","\x74\x79\x70\x65","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x64\x61\x74\x61\x31","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x31","\x69\x73\x41\x72\x72\x61\x79","\x2C","\x64\x61\x74\x61\x32","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x33","\x63\x68\x61\x74","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x72\x65\x73\x73","\x69\x6E\x69\x74","\x62\x61\x73\x65\x36\x34","\x65\x78\x74\x65\x72\x6E\x61\x6C","\x4C\x69\x73\x74\x49\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x75\x6E\x73\x65\x72\x76\x65\x64\x43\x75\x73\x74\x6F\x6D\x65\x72","\x73\x75\x62\x6D\x69\x74\x45\x6E\x71\x75\x69\x72\x79","\x45\x6E\x71\x75\x69\x72\x79","\x65\x6E\x71\x75\x69\x72\x79","\x77\x65\x62\x73\x69\x74\x65\x49\x64","\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x31","\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x31","\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x32","\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x32","\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x33","\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x33","\x72\x6F\x6C\x6C\x62\x61\x63\x6B","\x63\x6F\x6D\x6D\x69\x74","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x67\x65\x74\x54\x72\x61\x6E\x73\x63\x72\x69\x70\x74","\x55\x73\x65\x72\x49\x64","\x72\x65\x70\x6C\x61\x63\x65","\x62\x6F\x64\x79","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x65\x78\x74\x2F\x63\x73\x76","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79","\x67\x65\x74\x48\x74\x6D\x6C\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x64\x65\x63\x72\x79\x70\x74","\x65\x6E\x71\x75\x69\x72\x79\x5F\x65\x6E\x61\x62\x6C\x65","\x4F\x6E\x6C\x69\x6E\x65","\x63\x75\x73\x74\x6F\x6D","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x67\x6F","\x6C\x6F\x67\x6F","\x69\x6D\x61\x67\x65\x73\x2F","\x26\x75\x70\x6C\x6F\x61\x64\x65\x64","\x69\x6D\x61\x67\x65\x73\x2F\x6D\x6F\x74\x69\x6F\x6E\x4C\x6F\x67\x6F\x2E\x70\x6E\x67","\x64\x65\x66\x61\x75\x6C\x74\x57\x68\x69\x74\x65\x4C\x61\x62\x65\x6C","\x77\x68\x69\x74\x65\x4C\x61\x62\x65\x6C","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x50\x6F\x77\x65\x72\x65\x64\x20\x62\x79\x20\x78\x43\x41\x4C\x4C\x59\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x64\x69\x76\x5F\x67\x72\x6F\x75\x70\x22\x3E","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x20\x66\x6F\x72\x3D\x22\x25\x64\x22\x3E\x25\x73\x20\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x6C\x61\x62\x65\x6C","\x72\x65\x71\x75\x69\x72\x65\x64","\x2A","\x3C\x69\x6E\x70\x75\x74\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x69\x64\x3D\x22\x25\x64\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x2F\x3E","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x3C\x2F\x64\x69\x76\x3E","\x74\x65\x78\x74\x49\x6E\x70\x75\x74","\x3C\x74\x65\x78\x74\x61\x72\x65\x61\x20\x69\x64\x3D\x22\x25\x64\x22\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x3E\x3C\x2F\x74\x65\x78\x74\x61\x72\x65\x61\x3E","\x74\x65\x78\x74\x41\x72\x65\x61","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x3E\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x6F\x70\x74\x69\x6F\x6E\x73","\x3C\x6C\x61\x62\x65\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x72\x61\x64\x69\x6F\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x72\x61\x64\x69\x6F","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x20\x66\x6F\x72\x3D\x22\x25\x64\x22\x3E\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x64\x61\x74\x61\x25\x64\x5D\x22\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x25\x73\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E\x3C\x2F\x64\x69\x76\x3E","\x73\x65\x6C\x65\x63\x74","\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74","\x3C\x62\x72\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x44\x69\x73\x63\x75\x73\x73\x69\x6F\x6E\x5D\x5B\x6C\x61\x62\x65\x6C\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E","\x4F\x66\x66\x6C\x69\x6E\x65","\x3C\x6C\x61\x62\x65\x6C\x20\x63\x6C\x61\x73\x73\x3D\x22\x78\x63\x5F\x6C\x61\x62\x65\x6C\x22\x20\x66\x6F\x72\x3D\x22\x6F\x66\x66\x6C\x69\x6E\x65\x25\x64\x22\x3E\x25\x73\x20\x25\x73\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x69\x64\x3D\x22\x6F\x66\x66\x6C\x69\x6E\x65\x25\x64\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x2F\x3E","\x3C\x74\x65\x78\x74\x61\x72\x65\x61\x20\x69\x64\x3D\x22\x6F\x66\x66\x6C\x69\x6E\x65\x25\x64\x22\x20\x64\x61\x74\x61\x2D\x6C\x61\x62\x65\x6C\x3D\x22\x25\x73\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x25\x73\x22\x20\x25\x73\x3E\x3C\x2F\x74\x65\x78\x74\x61\x72\x65\x61\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x72\x61\x64\x69\x6F\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E\x20\x25\x73\x3C\x62\x72\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x64\x61\x74\x61\x5B\x45\x6E\x71\x75\x69\x72\x79\x5D\x5B\x6C\x61\x62\x65\x6C\x4F\x66\x66\x6C\x69\x6E\x65\x44\x61\x74\x61\x25\x64\x5D\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x25\x73\x22\x3E","\x6A\x73\x6F\x6E\x70","\x67\x65\x74\x50\x72\x6F\x61\x63\x74\x69\x76\x65\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x73\x65\x74\x52\x61\x74\x69\x6E\x67","\x72\x61\x74\x69\x6E\x67","\x52\x61\x74\x69\x6E\x67","\x61\x62\x61\x6E\x64\x6F\x6E\x43\x75\x73\x74\x6F\x6D\x65\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x69\x6E\x64","\x67\x65\x74\x53\x74\x61\x74\x75\x73\x42\x79\x57\x65\x62\x73\x69\x74\x65","\x65\x72\x72","\x6C\x6F\x67","\x63\x6F\x75\x6E\x74","\x61\x70\x70","\x71\x75\x65\x75\x65","\x55\x73\x65\x72\x73","\x6D\x61\x70","\x75\x6E\x69\x71","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x67\x65\x74\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x73\x70\x6C\x69\x74","\x2D","\x74\x5F\x66\x72\x6F\x6D","\x48\x48\x3A\x6D\x6D","\x74\x5F\x74\x6F","\x77\x64\x5F\x66\x72\x6F\x6D","\x77\x64\x5F\x74\x6F","\x6D\x64\x5F\x66\x72\x6F\x6D","\x6D\x64\x5F\x74\x6F","\x6D\x5F\x66\x72\x6F\x6D","\x6D\x5F\x74\x6F","\x45","\x44","\x4D","\x69\x73\x42\x65\x74\x77\x65\x65\x6E","\x66\x69\x6C\x74\x65\x72","\x69\x6E\x64\x65\x78\x4F\x66"];_0x8af6[0];var _=require(_0x8af6[1]);var jsmin=require(_0x8af6[2])[_0x8af6[2]];var Mustache=require(_0x8af6[3]);var querystring=require(_0x8af6[4]);var path=require(_0x8af6[5]);var md5=require(_0x8af6[6]);var fs=require(_0x8af6[7]);var UAParser=require(_0x8af6[8]);var uaParser= new UAParser();var languageParser=require(_0x8af6[9]);var ipaddr=require(_0x8af6[10]);var geoip=require(_0x8af6[11]);var csv=require(_0x8af6[12]);var util=require(_0x8af6[13]);var moment=require(_0x8af6[14]);var Scheduler=require(_0x8af6[15]);var config=require(_0x8af6[16]);var xchatty_components=require(_0x8af6[17]);var Util=require(_0x8af6[18]);var license=require(_0x8af6[19]);var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,messaging:false,cm:false,dialer:false,jscripty:false,update:false,custom:false,description:_0x8af6[20]};var sequelize=require(_0x8af6[22])[_0x8af6[21]];var User=require(_0x8af6[22])[_0x8af6[23]];var Agent=require(_0x8af6[22])[_0x8af6[23]];var ChatRoom=require(_0x8af6[22])[_0x8af6[24]];var ChatEnquiry=require(_0x8af6[22])[_0x8af6[25]];var ChatVisitor=require(_0x8af6[22])[_0x8af6[26]];var ChatMessage=require(_0x8af6[22])[_0x8af6[27]];var ChatWebsite=require(_0x8af6[22])[_0x8af6[28]];var ChatWebsitesField=require(_0x8af6[22])[_0x8af6[29]];var ChatProactiveAction=require(_0x8af6[22])[_0x8af6[30]];var ReportChatSession=require(_0x8af6[22])[_0x8af6[31]];var ChatQueue=require(_0x8af6[22])[_0x8af6[32]];var License=require(_0x8af6[22])[_0x8af6[33]];var Xchatty=require(_0x8af6[22])[_0x8af6[34]];var Setting=require(_0x8af6[22])[_0x8af6[35]];const Contact=require(_0x8af6[22])[_0x8af6[36]];var Interval=require(_0x8af6[22])[_0x8af6[37]];const weekDaysCollection={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:7};const monthsCollection={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12};var id=1;exports[_0x8af6[38]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){return Xchatty[_0x8af6[43]]()[_0x8af6[42]](function(_0xb9d7x2e){return _0xb9d7x2b[_0x8af6[41]](200)[_0x8af6[40]](_0xb9d7x2e)})[_0x8af6[39]](function(_0xb9d7x2d){return _0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[44]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){ChatWebsite[_0x8af6[79]](_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]])[_0x8af6[42]](function(_0xb9d7x2f){_0xb9d7x2b[_0x8af6[47]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x8af6[45],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0x8af6[46]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0xb9d7x30=xchatty_components[_0x8af6[48]];var _0xb9d7x31={websiteId:_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]],rootPath:Util[_0x8af6[52]](_0xb9d7x2f[_0x8af6[51]])+ _0x8af6[53],signedUp:_0x8af6[54],windowFocused:_0x8af6[54],isNewPage:_0x8af6[55],processingSignUp:_0x8af6[54],processingEnquiry:_0x8af6[54],processingSend:_0x8af6[54],processingRating:_0x8af6[54],visitorFullname:_0x8af6[56],visitorAvatar:_0x8af6[56],timerReadMessages:_0x8af6[57],timerCheckStatus:_0x8af6[57],isOnline:_0x8af6[54],decayHistory:0,defaultTimeout:5000,isInitialStatusCheck:_0x8af6[55],muteNotificationSoundOnce:_0x8af6[54],assetBase:Util[_0x8af6[52]](_0xb9d7x2f[_0x8af6[51]])+ _0x8af6[58],hasSessionSaf:_0x8af6[54],restoreOpenState:_0x8af6[54],animateHover:_0xb9d7x2f[_0x8af6[59]],hideEmail:_0x8af6[54],hideOffline:_0x8af6[54],headerShape:_0xb9d7x2f[_0x8af6[60]],HeaderOnline:_0xb9d7x2f[_0x8af6[61]],OnlineMessage:_0xb9d7x2f[_0x8af6[62]],UsernamePlaceholder:_0xb9d7x2f[_0x8af6[63]],EmailPlaceholder:_0xb9d7x2f[_0x8af6[64]],StartChatButtonText:_0xb9d7x2f[_0x8af6[65]],OfflineMessage:_0xb9d7x2f[_0x8af6[66]],HeaderOffline:_0xb9d7x2f[_0x8af6[67]],EnquiryMessagePlaceholder:_0xb9d7x2f[_0x8af6[68]],EnquiryButtonText:_0xb9d7x2f[_0x8af6[69]],downloadTranscript:_0xb9d7x2f[_0x8af6[70]],RatingMessage:_0xb9d7x2f[_0x8af6[71]],RatingSend:_0xb9d7x2f[_0x8af6[72]],RatingSkip:_0xb9d7x2f[_0x8af6[73]],MessageAgentsBusy:_0xb9d7x2f[_0x8af6[74]],NameTitle:_0xb9d7x2f[_0x8af6[75]],EmailTitle:_0xb9d7x2f[_0x8af6[76]],MessageTitle:_0xb9d7x2f[_0x8af6[77]]};_0xb9d7x30= Mustache[_0x8af6[78]](_0xb9d7x30,_0xb9d7x31);_0xb9d7x2b[_0x8af6[40]](_0xb9d7x30)})[_0x8af6[39]](function(_0xb9d7x2d){_0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[80]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){ChatWebsite[_0x8af6[79]](_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]])[_0x8af6[42]](function(_0xb9d7x2f){_0xb9d7x2b[_0x8af6[47]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x8af6[81],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0x8af6[46]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0xb9d7x32=xchatty_components[_0x8af6[82]];var _0xb9d7x33={assetBase:Util[_0x8af6[52]](_0xb9d7x2f[_0x8af6[51]])+ _0x8af6[58],color:_0xb9d7x2f[_0x8af6[83]],colorFocus:_0xb9d7x2f[_0x8af6[84]],colorButton:_0xb9d7x2f[_0x8af6[85]]};_0xb9d7x32= Mustache[_0x8af6[78]](_0xb9d7x32,_0xb9d7x33);_0xb9d7x2b[_0x8af6[40]](_0xb9d7x32)})[_0x8af6[39]](function(_0xb9d7x2d){_0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[86]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[88]](_0x8af6[87])){_0xb9d7x2b[_0x8af6[95]](path[_0x8af6[94]](config[_0x8af6[90]],_0x8af6[91],_0x8af6[92],_0xb9d7x2a[_0x8af6[89]][_0x8af6[93]]))}else {_0xb9d7x2b[_0x8af6[95]](path[_0x8af6[94]](config[_0x8af6[90]],_0x8af6[91],_0x8af6[96],_0x8af6[97],_0x8af6[98],_0xb9d7x2a[_0x8af6[89]][_0x8af6[93]]))}};exports[_0x8af6[99]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){_0xb9d7x2b[_0x8af6[47]]({"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x8af6[45],"\x78\x2D\x74\x69\x6D\x65\x73\x74\x61\x6D\x70":Date[_0x8af6[46]](),"\x78\x2D\x73\x65\x6E\x74":true});var _0xb9d7x34=xchatty_components[_0x8af6[100]];_0xb9d7x2b[_0x8af6[40]](_0xb9d7x34)};exports[_0x8af6[101]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){if(!_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]]){_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]]= {}};var _0xb9d7x35={};return Agent[_0x8af6[43]]({where:{online:true,role:_0x8af6[121]}})[_0x8af6[42]](function(_0xb9d7x38){if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[115]]){_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[115]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[115]]=== _0x8af6[55]?true:false};_0xb9d7x35= {success:true,has_session_saf:null,signed_up:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[111]]?true:false,fullname:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[117]]?_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[117]]:_0x8af6[114],email:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[118]]?_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[118]]:_0x8af6[114],avatar:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[119]]?_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[119]]:_0x8af6[114],open_state:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[115]]|| _0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[111]]?true:false,online:_0xb9d7x38[_0x8af6[120]]?true:false,is_unserved:false,room_id:0};return})[_0x8af6[42]](function(){if(_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[108]]){return ChatRoom[_0x8af6[110]]({where:{ChatVisitorId:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[108]],status:_0x8af6[113],token:{$ne:_0x8af6[114]}}})};return})[_0x8af6[42]](function(_0xb9d7x37){if(_0xb9d7x37){_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[111]]= _0xb9d7x37[_0x8af6[49]];_0xb9d7x35[_0x8af6[111]]= _0xb9d7x37[_0x8af6[49]];_0xb9d7x35[_0x8af6[112]]= true}else {_0xb9d7x35[_0x8af6[112]]= false};return})[_0x8af6[42]](function(){if(_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[108]]){return ChatVisitor[_0x8af6[110]]({where:{id:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[108]],status:_0x8af6[109]}})};return})[_0x8af6[42]](function(_0xb9d7x36){if(_0xb9d7x36){_0xb9d7x35[_0x8af6[103]]= true};return _0xb9d7x2b[_0x8af6[40]](_0xb9d7x2a[_0x8af6[89]][_0x8af6[104]]+ _0x8af6[105]+ JSON[_0x8af6[106]](_0xb9d7x35)+ _0x8af6[107])})[_0x8af6[39]](function(_0xb9d7x2d){return _0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[122]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){var _0xb9d7x39=_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]];var _0xb9d7x3a={where:{ChatRoomId:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[111]]},include:[{model:User,attributes:[_0x8af6[49],_0x8af6[123],_0x8af6[117],_0x8af6[118]]},{model:ChatVisitor,attributes:[_0x8af6[49],_0x8af6[117],_0x8af6[118]]}]};if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[124]]=== _0x8af6[54]){_0xb9d7x3a[_0x8af6[125]][_0x8af6[49]]= {$gt:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[126]]}};ChatMessage[_0x8af6[43]](_0xb9d7x3a)[_0x8af6[42]](function(_0xb9d7x3b){var _0xb9d7x3c={success:true,messages:_0xb9d7x3b,composing:false,composing_fullname:null};_0xb9d7x2b[_0x8af6[40]](_0xb9d7x2a[_0x8af6[89]][_0x8af6[104]]+ _0x8af6[105]+ JSON[_0x8af6[106]](_0xb9d7x3c)+ _0x8af6[107])})[_0x8af6[39]](function(_0xb9d7x2d){_0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[127]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){var _0xb9d7x39=_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]];var _0xb9d7x3a={where:{ChatRoomId:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[111]]},include:[{model:User,attributes:[_0x8af6[49],_0x8af6[123],_0x8af6[117],_0x8af6[118]]},{model:ChatVisitor,attributes:[_0x8af6[49],_0x8af6[117],_0x8af6[118]]}]};if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[124]]=== _0x8af6[54]){_0xb9d7x3a[_0x8af6[125]][_0x8af6[49]]= {$gt:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[126]]}};ChatMessage[_0x8af6[130]]({body:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[129]][_0x8af6[128]],ChatRoomId:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[111]],ChatVisitorId:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[108]]})[_0x8af6[42]](function(_0xb9d7x3d){ChatMessage[_0x8af6[43]](_0xb9d7x3a)[_0x8af6[42]](function(_0xb9d7x3b){var _0xb9d7x3c={errors:[],success:true,data:_0xb9d7x3d,messages:_0xb9d7x3b};_0xb9d7x2b[_0x8af6[40]](_0xb9d7x2a[_0x8af6[89]][_0x8af6[104]]+ _0x8af6[105]+ JSON[_0x8af6[106]](_0xb9d7x3c)+ _0x8af6[107])})[_0x8af6[39]](function(_0xb9d7x2d){_0xb9d7x2c(_0xb9d7x2d)})})[_0x8af6[39]](function(_0xb9d7x2d){_0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[131]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){var _0xb9d7x39=_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]];return ChatRoom[_0x8af6[79]](_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[111]])[_0x8af6[42]](function(_0xb9d7x37){return _0xb9d7x37[_0x8af6[134]]({status:_0x8af6[132],completeReason:_0x8af6[133]})})[_0x8af6[42]](function(){var _0xb9d7x3c={success:true,errors:[]};_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39]= {};_0xb9d7x2b[_0x8af6[40]](_0xb9d7x2a[_0x8af6[89]][_0x8af6[104]]+ _0x8af6[105]+ JSON[_0x8af6[106]](_0xb9d7x3c)+ _0x8af6[107])})[_0x8af6[39]](function(_0xb9d7x2d){_0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[135]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){var _0xb9d7x39=_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]];var _0xb9d7x3e=uaParser[_0x8af6[139]](_0xb9d7x2a[_0x8af6[138]][_0x8af6[137]])[_0x8af6[136]]();var _0xb9d7x3f=languageParser[_0x8af6[141]](_0xb9d7x2a[_0x8af6[138]][_0x8af6[140]]);var _0xb9d7x40=_0xb9d7x2a[_0x8af6[138]][_0x8af6[142]]?_0xb9d7x2a[_0x8af6[138]][_0x8af6[142]]:_0xb9d7x2a[_0x8af6[144]][_0x8af6[143]]|| _0xb9d7x2a[_0x8af6[145]];var _0xb9d7x41={fullname:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[117]],email:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[118]],remote_address:_0xb9d7x40,user_agent:_0xb9d7x2a[_0x8af6[138]][_0x8af6[137]],visitor_language:_0xb9d7x2a[_0x8af6[138]][_0x8af6[140]],referer:_0xb9d7x2a[_0x8af6[138]][_0x8af6[147]],origin:_0x8af6[148],browser:_0xb9d7x3e[_0x8af6[149]][_0x8af6[123]]+ _0x8af6[150]+ _0xb9d7x3e[_0x8af6[149]][_0x8af6[151]],engine:_0xb9d7x3e[_0x8af6[152]][_0x8af6[123]]+ _0x8af6[150]+ _0xb9d7x3e[_0x8af6[152]][_0x8af6[151]],os:_0xb9d7x3e[_0x8af6[153]][_0x8af6[123]]+ _0x8af6[150]+ _0xb9d7x3e[_0x8af6[153]][_0x8af6[151]],device:_0xb9d7x3e[_0x8af6[155]][_0x8af6[154]]?_0xb9d7x3e[_0x8af6[155]][_0x8af6[154]]+ _0x8af6[150]+ _0xb9d7x3e[_0x8af6[155]][_0x8af6[156]]+ _0x8af6[150]+ _0xb9d7x3e[_0x8af6[155]][_0x8af6[157]]:null,ChatWebsiteId:_0xb9d7x2a[_0x8af6[89]][_0x8af6[158]]};if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[159]]&& _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[160]]){_0xb9d7x41[_0x8af6[159]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[159]];if(_[_0x8af6[161]](_0xb9d7x41[_0x8af6[159]])){_0xb9d7x41[_0x8af6[159]]= _[_0x8af6[94]](_0xb9d7x41[_0x8af6[159]],_0x8af6[162])};_0xb9d7x41[_0x8af6[160]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[160]]};if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[163]]&& _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[164]]){_0xb9d7x41[_0x8af6[163]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[163]];if(_[_0x8af6[161]](_0xb9d7x41[_0x8af6[163]])){_0xb9d7x41[_0x8af6[163]]= _[_0x8af6[94]](_0xb9d7x41[_0x8af6[163]],_0x8af6[162])};_0xb9d7x41[_0x8af6[164]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[164]]};if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[165]]&& _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[166]]){_0xb9d7x41[_0x8af6[165]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[165]];if(_[_0x8af6[161]](_0xb9d7x41[_0x8af6[165]])){_0xb9d7x41[_0x8af6[165]]= _[_0x8af6[94]](_0xb9d7x41[_0x8af6[165]],_0x8af6[162])};_0xb9d7x41[_0x8af6[166]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[146]][_0x8af6[166]]};var _0xb9d7x42,_0xb9d7x43,_0xb9d7x44;return ChatVisitor[_0x8af6[130]](_0xb9d7x41)[_0x8af6[42]](function(_0xb9d7x47){_0xb9d7x42= _0xb9d7x47;return ChatWebsite[_0x8af6[79]](_0xb9d7x42.ChatWebsiteId)})[_0x8af6[42]](function(_0xb9d7x46){_0xb9d7x43= _0xb9d7x46;if(_0xb9d7x43[_0x8af6[175]]){return Contact[_0x8af6[176]]({where:{email:_0xb9d7x42[_0x8af6[118]]},defaults:{email:_0xb9d7x42[_0x8af6[118]],firstName:_0xb9d7x42[_0x8af6[117]],ListId:_0xb9d7x43[_0x8af6[175]]}})}})[_0x8af6[42]](function(){return ChatRoom[_0x8af6[130]]({type:_0x8af6[174],ChatVisitorId:_0xb9d7x42[_0x8af6[49]],ChatWebsiteId:_0xb9d7x43[_0x8af6[49]],contact:_0xb9d7x42[_0x8af6[118]],website:_0xb9d7x43[_0x8af6[123]]})})[_0x8af6[42]](function(_0xb9d7x37){_0xb9d7x44= _0xb9d7x37;var _0xb9d7x45= new Scheduler({channel:_0x8af6[167],uniqueid:util[_0x8af6[170]](_0x8af6[168],moment()[_0x8af6[169]](),_0xb9d7x44[_0x8af6[49]]),roomid:_0xb9d7x44[_0x8af6[49]],websiteid:_0xb9d7x43[_0x8af6[49]],websitename:_0xb9d7x43[_0x8af6[123]],websiteaddress:_0xb9d7x43[_0x8af6[171]],accountid:_0xb9d7x43[_0x8af6[49]],accountname:_0xb9d7x43[_0x8af6[123]],accountaddress:_0xb9d7x43[_0x8af6[171]],visitorid:_0xb9d7x42[_0x8af6[49]],visitorname:_0xb9d7x42[_0x8af6[117]],visitoremail:_0xb9d7x42[_0x8af6[118]]});_0xb9d7x45[_0x8af6[172]]();_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[117]]= _0xb9d7x42[_0x8af6[117]];_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[118]]= _0xb9d7x42[_0x8af6[118]];_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[119]]= md5(_0xb9d7x42[_0x8af6[118]]).toString(_0x8af6[173]);_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[108]]= _0xb9d7x42[_0x8af6[49]];var _0xb9d7x3c={success:true,errors:[],chatVisitor:{id:_0xb9d7x42[_0x8af6[49]]}};_0xb9d7x2b[_0x8af6[40]](_0xb9d7x2a[_0x8af6[89]][_0x8af6[104]]+ _0x8af6[105]+ JSON[_0x8af6[106]](_0xb9d7x3c)+ _0x8af6[107])})[_0x8af6[39]](function(_0xb9d7x2d){_0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[177]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){var _0xb9d7x39=_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]];return ChatVisitor[_0x8af6[79]](_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[108]])[_0x8af6[42]](function(_0xb9d7x47){return _0xb9d7x47[_0x8af6[134]]({status:_0x8af6[109]})})[_0x8af6[42]](function(){var _0xb9d7x3c={success:true,errors:[]};_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39]= {};_0xb9d7x2b[_0x8af6[40]](_0xb9d7x2a[_0x8af6[89]][_0x8af6[104]]+ _0x8af6[105]+ JSON[_0x8af6[106]](_0xb9d7x3c)+ _0x8af6[107])})[_0x8af6[39]](function(_0xb9d7x2d){_0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[178]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){return sequelize[_0x8af6[190]]()[_0x8af6[42]](function(_0xb9d7x48){var _0xb9d7x40=_0xb9d7x2a[_0x8af6[138]][_0x8af6[142]]?_0xb9d7x2a[_0x8af6[138]][_0x8af6[142]]:_0xb9d7x2a[_0x8af6[144]][_0x8af6[143]]|| _0xb9d7x2a[_0x8af6[145]];var _0xb9d7x3e=uaParser[_0x8af6[139]](_0xb9d7x2a[_0x8af6[138]][_0x8af6[137]])[_0x8af6[136]]();var _0xb9d7x3f=languageParser[_0x8af6[141]](_0xb9d7x2a[_0x8af6[138]][_0x8af6[140]]);var _0xb9d7x41={fullname:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[117]],email:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[118]],remote_address:_0xb9d7x40,user_agent:_0xb9d7x2a[_0x8af6[138]][_0x8af6[137]],visitor_language:_0xb9d7x2a[_0x8af6[138]][_0x8af6[140]],browser:_0xb9d7x3e[_0x8af6[149]][_0x8af6[123]]+ _0x8af6[150]+ _0xb9d7x3e[_0x8af6[149]][_0x8af6[151]],engine:_0xb9d7x3e[_0x8af6[152]][_0x8af6[123]]+ _0x8af6[150]+ _0xb9d7x3e[_0x8af6[152]][_0x8af6[151]],os:_0xb9d7x3e[_0x8af6[153]][_0x8af6[123]]+ _0x8af6[150]+ _0xb9d7x3e[_0x8af6[153]][_0x8af6[151]],device:_0xb9d7x3e[_0x8af6[155]][_0x8af6[154]]?_0xb9d7x3e[_0x8af6[155]][_0x8af6[154]]+ _0x8af6[150]+ _0xb9d7x3e[_0x8af6[155]][_0x8af6[156]]+ _0x8af6[150]+ _0xb9d7x3e[_0x8af6[155]][_0x8af6[157]]:null,referer:_0xb9d7x2a[_0x8af6[138]][_0x8af6[147]],origin:_0x8af6[180],status:_0x8af6[109],ChatWebsiteId:parseInt(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[181]],10),ChatEnquiry:{username:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[117]],email:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[118]],text:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[128]],ChatWebsiteId:parseInt(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[181]],10)}};if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[182]]&& _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[183]]){_0xb9d7x41[_0x8af6[182]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[182]];if(_[_0x8af6[161]](_0xb9d7x41[_0x8af6[182]])){_0xb9d7x41[_0x8af6[182]]= _[_0x8af6[94]](_0xb9d7x41[_0x8af6[182]],_0x8af6[162])};_0xb9d7x41[_0x8af6[183]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[183]]};if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[184]]&& _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[185]]){_0xb9d7x41[_0x8af6[184]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[184]];if(_[_0x8af6[161]](_0xb9d7x41[_0x8af6[184]])){_0xb9d7x41[_0x8af6[184]]= _[_0x8af6[94]](_0xb9d7x41[_0x8af6[184]],_0x8af6[162])};_0xb9d7x41[_0x8af6[185]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[185]]};if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[186]]&& _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[187]]){_0xb9d7x41[_0x8af6[186]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[186]];if(_[_0x8af6[161]](_0xb9d7x41[_0x8af6[186]])){_0xb9d7x41[_0x8af6[186]]= _[_0x8af6[94]](_0xb9d7x41[_0x8af6[186]],_0x8af6[162])};_0xb9d7x41[_0x8af6[187]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[179]][_0x8af6[187]]};var _0xb9d7x42;return ChatVisitor[_0x8af6[130]](_0xb9d7x41,{transaction:_0xb9d7x48,include:[{model:ChatEnquiry}]})[_0x8af6[42]](function(_0xb9d7x47){_0xb9d7x42= _0xb9d7x47;return ChatWebsite[_0x8af6[79]](_0xb9d7x42.ChatWebsiteId)})[_0x8af6[42]](function(_0xb9d7x46){if(_0xb9d7x46[_0x8af6[175]]){return Contact[_0x8af6[176]]({where:{email:_0xb9d7x42[_0x8af6[118]]},defaults:{email:_0xb9d7x42[_0x8af6[118]],firstName:_0xb9d7x42[_0x8af6[117]],ListId:_0xb9d7x46[_0x8af6[175]]}})}})[_0x8af6[42]](function(){_0xb9d7x48[_0x8af6[189]]();_0xb9d7x2b[_0x8af6[40]](_0xb9d7x2a[_0x8af6[89]][_0x8af6[104]]+ _0x8af6[105]+ JSON[_0x8af6[106]]({success:true,errors:[]})+ _0x8af6[107])})[_0x8af6[39]](function(_0xb9d7x2d){_0xb9d7x48[_0x8af6[188]]();_0xb9d7x2c(_0xb9d7x2d)})})};exports[_0x8af6[191]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){var _0xb9d7x39=_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]];if(_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39]&& _0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[108]]&& _0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[111]]){ChatMessage[_0x8af6[43]]({where:{ChatRoomId:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[111]]},include:[{model:Agent,attributes:[_0x8af6[49],_0x8af6[117]]},{model:ChatVisitor,attributes:[_0x8af6[49],_0x8af6[117]]}]})[_0x8af6[42]](function(_0xb9d7x3b){var _0xb9d7x49=[];_0xb9d7x3b[_0x8af6[197]](function(_0xb9d7x3d){var _0xb9d7x4a={name:_0xb9d7x3d[_0x8af6[192]]?_0xb9d7x3d[_0x8af6[23]][_0x8af6[117]]:_0xb9d7x3d[_0x8af6[26]][_0x8af6[117]],text:_0xb9d7x3d[_0x8af6[194]][_0x8af6[193]](/(\r\n|\n|\r)/gm,_0x8af6[150]),date:_0xb9d7x3d[_0x8af6[195]]};_0xb9d7x49[_0x8af6[196]](_0xb9d7x4a)});var _0xb9d7x4b=csv(_0xb9d7x49);_0xb9d7x2b[_0x8af6[157]](_0x8af6[198])[_0x8af6[41]](200)[_0x8af6[40]](_0xb9d7x4b)})[_0x8af6[39]](function(_0xb9d7x2d){_0xb9d7x2c(_0xb9d7x2d)})}};exports[_0x8af6[199]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){return Xchatty[_0x8af6[79]](_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]])[_0x8af6[42]](function(_0xb9d7x4c){if(!_0xb9d7x4c){return _0xb9d7x2b[_0x8af6[200]](404)};return _0xb9d7x2b[_0x8af6[40]](_0xb9d7x4c)})[_0x8af6[39]](function(_0xb9d7x2d){return _0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[130]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){return Xchatty[_0x8af6[130]](_0xb9d7x2a[_0x8af6[194]])[_0x8af6[42]](function(_0xb9d7x4c){return _0xb9d7x2b[_0x8af6[41]](201)[_0x8af6[40]](_0xb9d7x4c)})[_0x8af6[39]](function(_0xb9d7x2d){return _0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[134]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){if(_0xb9d7x2a[_0x8af6[194]][_0x8af6[49]]){delete _0xb9d7x2a[_0x8af6[194]][_0x8af6[49]]};return Xchatty[_0x8af6[79]](_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]])[_0x8af6[42]](function(_0xb9d7x4c){if(!_0xb9d7x4c){return _0xb9d7x2b[_0x8af6[200]](404)};var _0xb9d7x4d=_[_0x8af6[201]](_0xb9d7x4c,_0xb9d7x2a[_0x8af6[194]]);_0xb9d7x4d[_0x8af6[202]]()[_0x8af6[42]](function(){return _0xb9d7x2b[_0x8af6[41]](200)[_0x8af6[40]](_0xb9d7x4c)})[_0x8af6[39]](function(_0xb9d7x2d){return _0xb9d7x2c(_0xb9d7x2d)})})[_0x8af6[39]](function(_0xb9d7x2d){return _0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[203]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){return Xchatty[_0x8af6[79]](_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]])[_0x8af6[42]](function(_0xb9d7x4c){if(!_0xb9d7x4c){return _0xb9d7x2b[_0x8af6[200]](404)};_0xb9d7x4c[_0x8af6[203]]()[_0x8af6[42]](function(){return _0xb9d7x2b[_0x8af6[200]](204)})[_0x8af6[39]](function(_0xb9d7x2d){return _0xb9d7x2c(_0xb9d7x2d)})})[_0x8af6[39]](function(_0xb9d7x2d){return _0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[204]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){var _0xb9d7x2f,_0xb9d7x4e,_0xb9d7x4f;var _0xb9d7x50=xchatty_components[_0x8af6[205]];return ChatWebsite[_0x8af6[79]](_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]],{include:[{all:true}]})[_0x8af6[42]](function(_0xb9d7x43){_0xb9d7x2f= _0xb9d7x43;return Setting[_0x8af6[79]](1)})[_0x8af6[42]](function(_0xb9d7x56){_0xb9d7x4f= _0xb9d7x56;return License[_0x8af6[79]](1)})[_0x8af6[42]](function(_0xb9d7x51){if(_0xb9d7x51){_0xb9d7x4e= JSON[_0x8af6[141]](license[_0x8af6[208]](_0xb9d7x51[_0x8af6[207]][_0x8af6[206]],_0xb9d7x51[_0x8af6[159]]))}else {_0xb9d7x4e= demoLicense};var _0xb9d7x52={rootPath:Util[_0x8af6[52]](_0xb9d7x2f[_0x8af6[51]])+ _0x8af6[53],assetBase:Util[_0x8af6[52]](_0xb9d7x2f[_0x8af6[51]])+ _0x8af6[58],websiteId:_0xb9d7x2f[_0x8af6[49]],headerShape:_0xb9d7x2f[_0x8af6[60]],enquiryEnable:_0xb9d7x2f[_0x8af6[209]],onlineFields:_0xb9d7x2f[_0x8af6[210]],logo:function(){if(_0xb9d7x4e[_0x8af6[211]]&& !_0xb9d7x2f[_0x8af6[212]]&& _0xb9d7x2f[_0x8af6[213]]){return _0x8af6[214]+ _0xb9d7x2f[_0x8af6[213]]+ _0x8af6[215]}else {return _0x8af6[216]}},whiteLabel:function(){if(_0xb9d7x4e[_0x8af6[211]]&& !_0xb9d7x2f[_0x8af6[217]]){return _0xb9d7x2f[_0x8af6[218]]}else {return _0x8af6[219]}},renderedOnlineField:function(){var _0xb9d7x53=_0x8af6[114];var _0xb9d7x54=this;switch(this[_0x8af6[244]]){case _0x8af6[228]:_0xb9d7x53= _0x8af6[220];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[221],_0xb9d7x54[_0x8af6[38]],_0xb9d7x54[_0x8af6[222]],_0xb9d7x54[_0x8af6[223]]?_0x8af6[224]:_0x8af6[114]);_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[225],_0xb9d7x54[_0x8af6[222]],_0xb9d7x54[_0x8af6[38]],_0xb9d7x54[_0x8af6[38]]+ 1,_0xb9d7x54[_0x8af6[226]],_0xb9d7x54[_0x8af6[223]]?_0x8af6[223]:_0x8af6[114]);_0xb9d7x53+= _0x8af6[227];break;case _0x8af6[230]:_0xb9d7x53= _0x8af6[220];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[221],_0xb9d7x54[_0x8af6[38]],_0xb9d7x54[_0x8af6[222]],_0xb9d7x54[_0x8af6[223]]?_0x8af6[224]:_0x8af6[114]);_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[229],_0xb9d7x54[_0x8af6[38]],_0xb9d7x54[_0x8af6[222]],_0xb9d7x54[_0x8af6[38]]+ 1,_0xb9d7x54[_0x8af6[226]],_0xb9d7x54[_0x8af6[223]]?_0x8af6[223]:_0x8af6[114]);_0xb9d7x53+= _0x8af6[227];break;case _0x8af6[236]:_0xb9d7x53= _0x8af6[220];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[231],_0xb9d7x54[_0x8af6[222]]);_[_0x8af6[197]](_0xb9d7x54[_0x8af6[232]],function(_0xb9d7x55){_0xb9d7x53+= _0x8af6[233];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[234],_0xb9d7x54[_0x8af6[38]]+ 1,_0xb9d7x55,_0xb9d7x55);_0xb9d7x53+= _0x8af6[235]});_0xb9d7x53+= _0x8af6[227];break;case _0x8af6[238]:_0xb9d7x53= _0x8af6[220];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[231],_0xb9d7x54[_0x8af6[222]]);_[_0x8af6[197]](_0xb9d7x54[_0x8af6[232]],function(_0xb9d7x55){_0xb9d7x53+= _0x8af6[233];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[237],_0xb9d7x54[_0x8af6[38]]+ 1,_0xb9d7x55,_0xb9d7x55);_0xb9d7x53+= _0x8af6[235]});_0xb9d7x53+= _0x8af6[227];break;case _0x8af6[243]:_0xb9d7x53= _0x8af6[220];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[239],_0xb9d7x54[_0x8af6[38]],_0xb9d7x54[_0x8af6[222]]);_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[240],_0xb9d7x54[_0x8af6[38]]+ 1);_[_0x8af6[197]](_0xb9d7x54[_0x8af6[232]],function(_0xb9d7x55){_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[241],_0xb9d7x55,_0xb9d7x55)});_0xb9d7x53+= _0x8af6[242];break};_0xb9d7x53+= _0x8af6[245];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[246],_0xb9d7x54[_0x8af6[38]]+ 1,_0xb9d7x54[_0x8af6[222]]);return _0xb9d7x53},offlineFields:_0xb9d7x2f[_0x8af6[247]],renderedOfflineField:function(){var _0xb9d7x53=_0x8af6[114];var _0xb9d7x54=this;switch(this[_0x8af6[244]]){case _0x8af6[228]:_0xb9d7x53= _0x8af6[220];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[248],_0xb9d7x54[_0x8af6[38]],_0xb9d7x54[_0x8af6[222]],_0xb9d7x54[_0x8af6[223]]?_0x8af6[224]:_0x8af6[114]);_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[249],_0xb9d7x54[_0x8af6[222]],_0xb9d7x54[_0x8af6[38]],_0xb9d7x54[_0x8af6[38]]+ 1,_0xb9d7x54[_0x8af6[226]],_0xb9d7x54[_0x8af6[223]]?_0x8af6[223]:_0x8af6[114]);_0xb9d7x53+= _0x8af6[227];break;case _0x8af6[230]:_0xb9d7x53= _0x8af6[220];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[248],_0xb9d7x54[_0x8af6[38]],_0xb9d7x54[_0x8af6[222]],_0xb9d7x54[_0x8af6[223]]?_0x8af6[224]:_0x8af6[114]);_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[250],_0xb9d7x54[_0x8af6[38]],_0xb9d7x54[_0x8af6[222]],_0xb9d7x54[_0x8af6[38]]+ 1,_0xb9d7x54[_0x8af6[226]],_0xb9d7x54[_0x8af6[223]]?_0x8af6[223]:_0x8af6[114]);_0xb9d7x53+= _0x8af6[227];break;case _0x8af6[236]:_0xb9d7x53= _0x8af6[220];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[231],_0xb9d7x54[_0x8af6[222]]);_[_0x8af6[197]](_0xb9d7x54[_0x8af6[232]],function(_0xb9d7x55){_0xb9d7x53+= _0x8af6[233];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[251],_0xb9d7x54[_0x8af6[38]]+ 1,_0xb9d7x55,_0xb9d7x55);_0xb9d7x53+= _0x8af6[235]});_0xb9d7x53+= _0x8af6[227];break;case _0x8af6[238]:_0xb9d7x53= _0x8af6[220];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[231],_0xb9d7x54[_0x8af6[222]]);_[_0x8af6[197]](_0xb9d7x54[_0x8af6[232]],function(_0xb9d7x55){_0xb9d7x53+= _0x8af6[233];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[252],_0xb9d7x54[_0x8af6[38]]+ 1,_0xb9d7x55,_0xb9d7x55);_0xb9d7x53+= _0x8af6[235]});_0xb9d7x53+= _0x8af6[227];break;case _0x8af6[243]:_0xb9d7x53= _0x8af6[220];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[231],_0xb9d7x54[_0x8af6[222]]);_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[253],_0xb9d7x54[_0x8af6[38]]+ 1);_[_0x8af6[197]](_0xb9d7x54[_0x8af6[232]],function(_0xb9d7x55){_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[241],_0xb9d7x55,_0xb9d7x55)});_0xb9d7x53+= _0x8af6[242];break};_0xb9d7x53+= _0x8af6[245];_0xb9d7x53+= util[_0x8af6[170]](_0x8af6[254],_0xb9d7x54[_0x8af6[38]]+ 1,_0xb9d7x54[_0x8af6[222]]);return _0xb9d7x53}};_0xb9d7x50= Mustache[_0x8af6[78]](_0xb9d7x50,_0xb9d7x52);return _0xb9d7x2b[_0x8af6[41]](200)[_0x8af6[255]](_0xb9d7x50)})[_0x8af6[39]](function(_0xb9d7x2d){return _0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[256]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){return ChatWebsite[_0x8af6[79]](_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]],{include:[{model:ChatProactiveAction}]})[_0x8af6[42]](function(_0xb9d7x2f){if(!_0xb9d7x2f){return _0xb9d7x2b[_0x8af6[41]](400)[_0x8af6[255]]({})};return _0xb9d7x2b[_0x8af6[41]](200)[_0x8af6[255]](_0xb9d7x2f.ChatProactiveActions)})[_0x8af6[39]](function(_0xb9d7x2d){return _0xb9d7x2c(_0xb9d7x2d)})};exports[_0x8af6[257]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){return ChatRoom[_0x8af6[79]](_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[259]][_0x8af6[111]])[_0x8af6[42]](function(_0xb9d7x37){if(!_0xb9d7x37){return _0xb9d7x2b[_0x8af6[41]](400)[_0x8af6[255]]({})};if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[259]][_0x8af6[88]](_0x8af6[258])&& _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[259]][_0x8af6[88]](_0x8af6[128])){return _0xb9d7x37[_0x8af6[134]]({rating:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[259]][_0x8af6[258]],ratingMessage:_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[259]][_0x8af6[128]]})};return})[_0x8af6[42]](function(){return _0xb9d7x2b[_0x8af6[41]](200)[_0x8af6[255]]({})})[_0x8af6[39]](function(_0xb9d7x2d){return _0xb9d7x2b[_0x8af6[41]](400)[_0x8af6[255]](_0xb9d7x2d)})};exports[_0x8af6[260]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){var _0xb9d7x39=_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]];if(_0xb9d7x2a[_0x8af6[102]]&& _0xb9d7x2a[_0x8af6[102]][_0x8af6[97]]){if(_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0x8af6[88]](_0xb9d7x39)&& _0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[88]](_0x8af6[108])&& _0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[108]]> 0){return ReportChatSession[_0x8af6[262]]({where:{visitorid:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[108]],leaveAt:null}})[_0x8af6[42]](function(_0xb9d7x57){if(!_0xb9d7x57){return};return _0xb9d7x57[_0x8af6[134]]({abandon:true,leaveAt:moment()[_0x8af6[170]](_0x8af6[261])})})[_0x8af6[42]](function(){return _0xb9d7x2b[_0x8af6[41]](200)[_0x8af6[255]]({})})[_0x8af6[39]](function(_0xb9d7x2d){_0xb9d7x2b[_0x8af6[41]](500)[_0x8af6[255]]({})})}};return _0xb9d7x2b[_0x8af6[41]](200)[_0x8af6[255]]({})};exports[_0x8af6[263]]= function(_0xb9d7x2a,_0xb9d7x2b,_0xb9d7x2c){if(!_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]]){_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]]= {}};if(!_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]]]){_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]]]= {}};var _0xb9d7x39=_0xb9d7x2a[_0x8af6[50]][_0x8af6[49]];var _0xb9d7x58;var _0xb9d7x35={};var _0xb9d7x59=[];return ChatWebsite[_0x8af6[79]](_0xb9d7x39)[_0x8af6[42]](function(_0xb9d7x46){if(!_0xb9d7x46){return _0xb9d7x2b[_0x8af6[200]](500)};_0xb9d7x58= _0xb9d7x46;return _0xb9d7x58[_0x8af6[273]]({include:[{model:ChatQueue,include:[{model:Agent}]},{model:Agent},{model:Interval,include:[{all:true}]}]})})[_0x8af6[42]](function(_0xb9d7x5b){_[_0x8af6[197]](_0xb9d7x5b,function(_0xb9d7x5c){if(checkAppInterval(_0xb9d7x5c)){if(_0xb9d7x5c[_0x8af6[267]]=== _0x8af6[268]){if(_0xb9d7x5c[_0x8af6[32]][_0x8af6[88]](_0x8af6[269])&& _0xb9d7x5c[_0x8af6[32]][_0x8af6[269]][_0x8af6[120]]> 0){_0xb9d7x59= _[_0x8af6[271]](_[_0x8af6[201]](_0xb9d7x59,_[_0x8af6[270]](_0xb9d7x5c[_0x8af6[32]].Users,_0x8af6[49])))}}else {if(_0xb9d7x5c[_0x8af6[267]]=== _0x8af6[121]){_0xb9d7x59[_0x8af6[196]](_0xb9d7x5c[_0x8af6[23]][_0x8af6[49]]);_0xb9d7x59= _[_0x8af6[271]](_0xb9d7x59)}}}});return Agent[_0x8af6[272]]({where:{online:true,id:{$in:_0xb9d7x59}}})})[_0x8af6[42]](function(_0xb9d7x5a){if(_0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[115]]){_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[115]]= _0xb9d7x2a[_0x8af6[89]][_0x8af6[116]][_0x8af6[115]]=== _0x8af6[55]?true:false};_0xb9d7x35= {success:true,has_session_saf:null,signed_up:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[111]]?true:false,fullname:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[117]]|| _0x8af6[114],email:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[118]]|| _0x8af6[114],avatar:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[119]]|| _0x8af6[114],open_state:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[115]]|| _0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[111]]?true:false,online:_0xb9d7x5a[_0x8af6[266]]?true:false,is_unserved:false,room_id:0};if(_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[108]]){return ChatRoom[_0x8af6[110]]({where:{ChatVisitorId:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[108]],status:_0x8af6[113],token:{$ne:_0x8af6[114]}}})};return})[_0x8af6[42]](function(_0xb9d7x37){if(_0xb9d7x37){_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[111]]= _0xb9d7x37[_0x8af6[49]];_0xb9d7x35[_0x8af6[111]]= _0xb9d7x37[_0x8af6[49]];_0xb9d7x35[_0x8af6[112]]= true}else {_0xb9d7x35[_0x8af6[112]]= false};if(_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[108]]){return ChatVisitor[_0x8af6[110]]({where:{id:_0xb9d7x2a[_0x8af6[102]][_0x8af6[97]][_0xb9d7x39][_0x8af6[108]],status:_0x8af6[109]}})};return})[_0x8af6[42]](function(_0xb9d7x36){if(_0xb9d7x36){_0xb9d7x35[_0x8af6[103]]= true};return _0xb9d7x2b[_0x8af6[41]](200)[_0x8af6[255]](_0xb9d7x35)})[_0x8af6[39]](function(_0xb9d7x2d){console[_0x8af6[265]](_0x8af6[264],_0xb9d7x2d);return _0xb9d7x2b[_0x8af6[41]](500)[_0x8af6[255]]({})})};function checkAppInterval(_0xb9d7x5c){var _0xb9d7x5e=true;if(_0xb9d7x5c[_0x8af6[37]]){for(var _0xb9d7x5f=0;_0xb9d7x5f< _0xb9d7x5c[_0x8af6[37]][_0x8af6[274]][_0x8af6[120]];_0xb9d7x5f++){if(isIntervalValid(splitInterval(_0xb9d7x5c[_0x8af6[37]][_0x8af6[274]][_0xb9d7x5f][_0x8af6[275]]))){break}else {_0xb9d7x5e= false}}}else {if(!isIntervalValid(splitInterval(_0xb9d7x5c[_0x8af6[275]]))){_0xb9d7x5e= false}};return _0xb9d7x5e}function splitInterval(_0xb9d7x61){var _0xb9d7x62={};var _0xb9d7x63=_0xb9d7x61[_0x8af6[276]](_0x8af6[162]);var _0xb9d7x64;_0xb9d7x63[_0x8af6[197]](function(_0xb9d7x54,_0xb9d7x65){switch(_0xb9d7x65){case 0:if(_0xb9d7x54!== _0x8af6[224]){_0xb9d7x64= _0xb9d7x54[_0x8af6[276]](_0x8af6[277]);_0xb9d7x62[_0x8af6[278]]= moment(_0xb9d7x64[0],_0x8af6[279]);_0xb9d7x62[_0x8af6[280]]= moment(_0xb9d7x64[1],_0x8af6[279])}else {_0xb9d7x62[_0x8af6[278]]= null;_0xb9d7x62[_0x8af6[280]]= null};break;case 1:if(_0xb9d7x54!== _0x8af6[224]){_0xb9d7x64= _0xb9d7x54[_0x8af6[276]](_0x8af6[277]);_0xb9d7x62[_0x8af6[281]]= weekDaysCollection[_0xb9d7x64[0]];_0xb9d7x62[_0x8af6[282]]= _0xb9d7x64[1]?weekDaysCollection[_0xb9d7x64[1]]:null}else {_0xb9d7x62[_0x8af6[281]]= null;_0xb9d7x62[_0x8af6[282]]= null};break;case 2:if(_0xb9d7x54!== _0x8af6[224]){_0xb9d7x64= _0xb9d7x54[_0x8af6[276]](_0x8af6[277]);_0xb9d7x62[_0x8af6[283]]= _0xb9d7x64[0];_0xb9d7x62[_0x8af6[284]]= _0xb9d7x64[1]?_0xb9d7x64[1]:null}else {_0xb9d7x62[_0x8af6[283]]= null;_0xb9d7x62[_0x8af6[284]]= null};break;case 3:if(_0xb9d7x54!== _0x8af6[224]){_0xb9d7x64= _0xb9d7x54[_0x8af6[276]](_0x8af6[277]);_0xb9d7x62[_0x8af6[285]]= monthsCollection[_0xb9d7x64[0]];_0xb9d7x62[_0x8af6[286]]= _0xb9d7x64[1]?monthsCollection[_0xb9d7x64[1]]:null}else {_0xb9d7x62[_0x8af6[285]]= null;_0xb9d7x62[_0x8af6[286]]= null};break;default:}});return _0xb9d7x62}function isIntervalValid(_0xb9d7x61){var _0xb9d7x67=moment()[_0x8af6[170]](_0x8af6[279]);var _0xb9d7x68=moment()[_0x8af6[170]](_0x8af6[287]);var _0xb9d7x69=moment()[_0x8af6[170]](_0x8af6[288]);var _0xb9d7x6a=moment()[_0x8af6[170]](_0x8af6[289]);var _0xb9d7x6b,_0xb9d7x6c,_0xb9d7x6d,_0xb9d7x6e;var _0xb9d7x6f=[1,2,3,4,5,6,7,8,9,10,11,12];var _0xb9d7x70=[1,2,3,4,5,6,7];var _0xb9d7x71=[];for(var _0xb9d7x72=1;_0xb9d7x72<= 31;_0xb9d7x72++){_0xb9d7x71[_0x8af6[196]](_0xb9d7x72)};_0xb9d7x6b= (_0xb9d7x61[_0x8af6[278]]&& _0xb9d7x61[_0x8af6[280]])?moment(_0xb9d7x67,_0x8af6[279])[_0x8af6[290]](moment(_0xb9d7x61[_0x8af6[278]],_0x8af6[279]),moment(_0xb9d7x61[_0x8af6[280]],_0x8af6[279])):true;if(_0xb9d7x61[_0x8af6[281]]){if(_0xb9d7x61[_0x8af6[282]]){var _0xb9d7x73=_[_0x8af6[291]](_0xb9d7x70,function(_0xb9d7x74){return (_0xb9d7x74>= _0xb9d7x61[_0x8af6[281]])&& (_0xb9d7x74<= _0xb9d7x61[_0x8af6[282]])});_0xb9d7x6c= (_0xb9d7x73[_0x8af6[292]](parseInt(_0xb9d7x68))!== -1)?true:false}else {_0xb9d7x6c= (parseInt(_0xb9d7x68)=== _0xb9d7x61[_0x8af6[281]])?true:false}}else {_0xb9d7x6c= true};if(_0xb9d7x61[_0x8af6[283]]){if(_0xb9d7x61[_0x8af6[284]]){var _0xb9d7x75=_[_0x8af6[291]](_0xb9d7x71,function(_0xb9d7x74){return (_0xb9d7x74>= _0xb9d7x61[_0x8af6[283]])&& (_0xb9d7x74<= _0xb9d7x61[_0x8af6[284]])});_0xb9d7x6d= (_0xb9d7x75[_0x8af6[292]](parseInt(_0xb9d7x69))!== -1)?true:false}else {_0xb9d7x6d= (parseInt(_0xb9d7x69)=== _0xb9d7x61[_0x8af6[283]])?true:false}}else {_0xb9d7x6d= true};if(_0xb9d7x61[_0x8af6[285]]){if(_0xb9d7x61[_0x8af6[286]]){var _0xb9d7x76=_[_0x8af6[291]](_0xb9d7x6f,function(_0xb9d7x74){return (_0xb9d7x74>= _0xb9d7x61[_0x8af6[285]])&& (_0xb9d7x74<= _0xb9d7x61[_0x8af6[286]])});_0xb9d7x6e= (_0xb9d7x76[_0x8af6[292]](parseInt(_0xb9d7x6a))!== -1)?true:false}else {_0xb9d7x6e= (parseInt(_0xb9d7x6a)=== _0xb9d7x61[_0x8af6[285]])?true:false}}else {_0xb9d7x6e= true};return _0xb9d7x6b&& _0xb9d7x6c&& _0xb9d7x6d&& _0xb9d7x6e} \ No newline at end of file diff --git a/server/api/zendesk_account/index.js b/server/api/zendesk_account/index.js index 46ca688..896e16a 100644 --- a/server/api/zendesk_account/index.js +++ b/server/api/zendesk_account/index.js @@ -1,28 +1 @@ -'use strict'; - -var express = require('express'); -var auth = require('../../auth/auth.service'); -var controller = require('./zendesk_account.controller'); - -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([19, 13], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.get('/:id/check', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.checkAccount); -router.get('/:id/fields', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getFields); -router.get('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getAccountConfigurations); -router.get('/:id/configurations/:cid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.getConfiguration); -router.post('/validate/:field', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.zendeskValidation); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.post('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.createConfiguration); -router.post('/:id/configurations/:cid/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.createField); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.put('/:id/configurations/:cid/tags', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationTags); -router.put('/:id/configurations/:cid/fields/:fid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.updateField); -router.delete('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroy); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); -router.delete('/:id/configurations', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.bulkDestroyConfigurations); -router.delete('/:id/configurations/:cid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroyConfiguration); -router.delete('/:id/configurations/:cid/fields/:fid', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroyField); - -module.exports = router; +var _0x44ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x2F\x3A\x69\x64\x2F\x63\x68\x65\x63\x6B","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2F\x3A\x69\x64\x2F\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x76\x61\x6C\x69\x64\x61\x74\x65\x2F\x3A\x66\x69\x65\x6C\x64","\x7A\x65\x6E\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x70\x6F\x73\x74","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x3A\x74\x79\x70\x65","\x63\x72\x65\x61\x74\x65\x46\x69\x65\x6C\x64","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x74\x61\x67\x73","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x2F\x3A\x69\x64\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73\x2F\x3A\x63\x69\x64\x2F\x66\x69\x65\x6C\x64\x73\x2F\x3A\x66\x69\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x65\x6C\x64","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79\x46\x69\x65\x6C\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x44ff[0];var express=require(_0x44ff[1]);var auth=require(_0x44ff[2]);var controller=require(_0x44ff[3]);var router=express.Router();router[_0x44ff[9]](_0x44ff[4],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19,13],[_0x44ff[6]]),controller[_0x44ff[8]]);router[_0x44ff[9]](_0x44ff[10],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[11]]);router[_0x44ff[9]](_0x44ff[12],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[13]]);router[_0x44ff[9]](_0x44ff[14],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[15]]);router[_0x44ff[9]](_0x44ff[16],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[17]]);router[_0x44ff[9]](_0x44ff[18],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[19]]);router[_0x44ff[22]](_0x44ff[20],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[21]]);router[_0x44ff[22]](_0x44ff[4],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[23]]);router[_0x44ff[22]](_0x44ff[16],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[24]]);router[_0x44ff[22]](_0x44ff[25],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[26]]);router[_0x44ff[28]](_0x44ff[10],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[27]]);router[_0x44ff[28]](_0x44ff[29],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[30]]);router[_0x44ff[28]](_0x44ff[31],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[32]]);router[_0x44ff[34]](_0x44ff[4],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[33]]);router[_0x44ff[34]](_0x44ff[10],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[35]]);router[_0x44ff[34]](_0x44ff[16],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[36]]);router[_0x44ff[34]](_0x44ff[18],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[37]]);router[_0x44ff[34]](_0x44ff[31],auth[_0x44ff[5]](),auth[_0x44ff[7]]([19],[_0x44ff[6]]),controller[_0x44ff[38]]);module[_0x44ff[39]]= router \ No newline at end of file diff --git a/server/api/zendesk_account/zendesk_account.controller.js b/server/api/zendesk_account/zendesk_account.controller.js index 22ceb99..01f655e 100644 --- a/server/api/zendesk_account/zendesk_account.controller.js +++ b/server/api/zendesk_account/zendesk_account.controller.js @@ -1,515 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Util = require('../../config/util'); -var zendesk = require('node-zendesk'); - -var ZendeskAccount = require('../../models').ZendeskAccount; -var ZendeskConfiguration = require('../../models').ZendeskConfiguration; -var ZendeskField = require('../../models').ZendeskField; - -function handleError(res, statusCode) { - statusCode = statusCode || 500; - return function(err) { - res.status(statusCode).send(err); - }; -} - -function responseWithResult(res, statusCode) { - statusCode = statusCode || 200; - return function(entity) { - if (entity) { - res.status(statusCode).json(entity); - } - }; -} - -function responseWithoutResult(res, statusCode) { - statusCode = statusCode || 200; - return function() { - res.sendStatus(statusCode); - }; -} - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function saveUpdates(updates) { - return function(entity) { - return entity.updateAttributes(updates) - .then(function(updated) { - return updated; - }); - }; -} - -function removeEntity(res) { - return function(entity) { - if (entity) { - return entity.destroy() - .then(function() { - res.status(204).end(); - }); - } - }; -} - -// Get list of zendesk_accounts -exports.index = function(req, res, next) { - return ZendeskAccount - .scope('configurations') - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(responseWithResult(res)) - .catch(handleError(res)); -}; - -// Get a single zendesk_account -exports.show = function(req, res) { - return ZendeskAccount - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -}; - -// Creates a new zendesk_account in the DB. -exports.create = function(req, res) { - return ZendeskAccount - .create(req.body) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -}; - -// Updates an existing zendesk_account in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ZendeskAccount - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -}; - -// Deletes a zendesk_account from the DB. -exports.destroy = function(req, res) { - return ZendeskAccount - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -}; - -exports.bulkDestroy = function(req, res) { - return ZendeskAccount - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(responseWithResult(res, 204)) - .catch(handleError(res)); -}; - -exports.zendeskValidation = function(req, res) { - var where = {}; - where[req.params.field] = req.body.value; - return ZendeskAccount - .findAndCountAll({ - where: where - }) - .then(function(result) { - if (result.count) { - return res.status(200).send({ - isValid: false, - value: req.body.value - }); - } - return res.status(200).send({ - isValid: true, - value: req.body.value - }); - }) - .catch(handleError(res)); - -}; - -exports.checkAccount = function(req, res) { - return ZendeskAccount - .findById(req.params.id) - .then(function(account) { - var accountZendesk = { - username: account.username, - remoteUri: account.remoteUri, - // debug: true - }; - if (account.authType === 'password') { - accountZendesk.password = account.password; - } else if (account.authType === 'token') { - accountZendesk.token = account.token; - // accountZendesk.oauth = true; - } - // console.log(accountZendesk); - var client = zendesk.createClient(accountZendesk); - client.users.auth(function(err, res2, result) { - if (err) { - console.error(err); - return handleError(res, err); - } - // console.log(result); - if (!result.verified) { - return res.sendStatus(500); - } - return res.sendStatus(204); - }); - }) - .catch(handleError(res)); -}; - -exports.getFields = function(req, res) { - return ZendeskAccount - .findById(req.params.id) - .then(function(account) { - var accountZendesk = { - username: account.username, - remoteUri: account.remoteUri, - // debug: true - }; - if (account.authType === 'password') { - accountZendesk.password = account.password; - } else if (account.authType === 'token') { - accountZendesk.token = account.token; - } - var client = zendesk.createClient(accountZendesk); - client.ticketfields.list(function(err, res2, result) { - if (err) { - console.error(err); - return handleError(res, err); - } - return res.status(200).send(result); - }); - }) - .catch(handleError(res)); -} - -exports.getAccountConfigurations = function(req, res) { - return ZendeskConfiguration - .scope({ - method: ['account', req.params.id] - }) - .findAndCountAll(_.merge(Util.getQuery(req.query), { - distinct: true - })) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -exports.getConfiguration = function(req, res) { - - return ZendeskConfiguration - .scope({ - method: ['account', req.params.id] - }) - .findById(req.params.cid) - .then(handleEntityNotFound(res)) - .then(responseWithResult(res)) - .catch(handleError(res)); -} - -exports.destroyConfiguration = function(req, res) { - return ZendeskConfiguration - .scope({ - method: ['account', req.params.id] - }) - .findById(req.params.cid) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -}; - -exports.bulkDestroyConfigurations = function(req, res) { - return ZendeskConfiguration - .destroy({ - where: { - id: req.query.ids - }, - individualHooks: true - }) - .then(responseWithResult(res, 204)) - .catch(handleError(res)); -}; - -exports.createConfiguration = function(req, res) { - req.body['AccountId'] = req.params.id; - - switch (req.body.channel) { - case 'voice': - - if (req.body.type === 'Queue') { - req.body.Subject = [{ - "type": "string", - "content": "[xCALLY Ticket]", - "variableName": null - }, { - "type": "variable", - "content": "", - "variableName": "queue" - }, { - "type": "variable", - "content": "", - "variableName": "calleridnum" - }]; - req.body.Description = [{ - "type": "string", - "content": "*** Call Info ***", - "key": null, - "keyType": null, - "variableName": null - }, { - "type": "keyValue", - "content": "", - "key": "Caller Number", - "keyType": "variable", - "variableName": "calleridnum" - }, { - "type": "keyValue", - "content": "", - "key": "Caller Name", - "keyType": "variable", - "variableName": "calleridname" - }, { - "type": "keyValue", - "content": "", - "key": "Call To", - "keyType": "variable", - "variableName": "destexten" - }, { - "type": "keyValue", - "content": "", - "key": "Queue", - "keyType": "variable", - "variableName": "queue" - }, { - "type": "keyValue", - "content": "", - "key": "UniqueId", - "keyType": "variable", - "variableName": "uniqueid" - }, { - "type": "keyValue", - "content": "", - "key": "Date", - "keyType": "variable", - "variableName": "agentcalledAt" - }, { - "type": "string", - "content": "*** Agent Info ***", - "key": null, - "keyType": null, - "variableName": null - }, { - "type": "keyValue", - "content": "", - "key": "Agent Name", - "keyType": "variable", - "variableName": "destcalleridname" - }, { - "type": "keyValue", - "content": "", - "key": "Agent Number", - "keyType": "variable", - "variableName": "destcalleridnum" - }, { - "type": "string", - "content": "*** Time Info ***", - "key": null, - "keyType": null, - "variableName": null - }, { - "type": "keyValue", - "content": "", - "key": "Agent Ring", - "keyType": "variable", - "variableName": "agentcalledAt" - }, { - "type": "keyValue", - "content": "", - "key": "Agent Connect", - "keyType": "variable", - "variableName": "agentconnectAt" - }, { - "type": "keyValue", - "content": "", - "key": "Agent Complete", - "keyType": "variable", - "variableName": "agentcompleteAt" - }, { - "type": "keyValue", - "content": "", - "key": "Hold Time", - "keyType": "variable", - "variableName": "holdtime" - }, { - "type": "keyValue", - "content": "", - "key": "Talk Time", - "keyType": "variable", - "variableName": "talktime" - }]; - } else if (req.body.type === 'Outbound') { - req.body.Subject = [{ - "type": "string", - "content": "[xCALLY Ticket]", - "variableName": null - }, { - "type": "string", - "content": "Outbound Call", - "variableName": null - }, { - "type": "variable", - "content": "", - "variableName": "destcalleridnum" - }]; - req.body.Description = [{ - "type": "string", - "content": "*** Call Info ***", - "variableName": null - }, { - "type": "keyValue", - "content": "", - "key": "Called Number", - "keyType": "variable", - "keyContent": "", - "variableName": "destcalleridnum" - }, { - "type": "keyValue", - "content": "", - "key": "Member Name", - "keyType": "variable", - "keyContent": "", - "variableName": "membername" - }, { - "type": "keyValue", - "content": "", - "key": "UniqueId", - "keyType": "variable", - "keyContent": "", - "variableName": "uniqueid" - }, { - "type": "keyValue", - "content": "", - "key": "Date", - "keyType": "variable", - "keyContent": "", - "variableName": "starttime" - }, { - "type": "string", - "content": "*** Time Info ***", - }, { - "type": "keyValue", - "content": "", - "key": "Answer Time", - "keyType": "variable", - "keyContent": "", - "variableName": "answertime" - }, { - "type": "keyValue", - "content": "", - "key": "Complete Time", - "keyType": "variable", - "keyContent": "", - "variableName": "endtime" - }]; - } - break; - default: - console.log('Channel not available:', req.body.channel); - } - - delete req.body.channel; - delete req.body.type; - - return ZendeskConfiguration - .create(req.body, { - include: [{ - model: ZendeskField, - as: 'Subject' - }, { - model: ZendeskField, - as: 'Description' - }] - }) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -}; - -exports.createField = function(req, res) { - return ZendeskConfiguration - .scope({ - method: ['account', req.params.id] - }) - .findById(req.params.cid) - .then(handleEntityNotFound(res)) - .then(function(configuration) { - switch (req.params.type) { - case 'subject': - req.body['SubjectId'] = req.params.cid; - break; - case 'description': - req.body['DescriptionId'] = req.params.cid; - break; - case 'field': - req.body['FieldId'] = req.params.cid; - break; - } - return ZendeskField.create(req.body); - }) - .then(responseWithResult(res, 201)) - .catch(handleError(res)); -}; - -exports.updateField = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - return ZendeskField - .findById(req.params.fid) - .then(handleEntityNotFound(res)) - .then(saveUpdates(req.body)) - .then(responseWithResult(res)) - .catch(handleError(res)); -}; - -exports.destroyField = function(req, res) { - return ZendeskField - .findById(req.params.fid) - .then(handleEntityNotFound(res)) - .then(removeEntity(res)) - .catch(handleError(res)); -}; - -exports.addConfigurationTags = function(req, res, next) { - return ZendeskConfiguration - .findById(req.params.cid) - .then(handleEntityNotFound(res)) - .then(function(configuration) { - return configuration.setTags(req.body); - }) - .then(responseWithoutResult(res, 200)) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; +var _0xda6e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6E\x6F\x64\x65\x2D\x7A\x65\x6E\x64\x65\x73\x6B","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x6A\x73\x6F\x6E","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x65\x6E\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x64\x65\x73\x74\x72\x6F\x79","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x71\x75\x65\x72\x79","\x67\x65\x74\x51\x75\x65\x72\x79","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x73\x63\x6F\x70\x65","\x73\x68\x6F\x77","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x69\x64\x73","\x7A\x65\x6E\x64\x65\x73\x6B\x56\x61\x6C\x69\x64\x61\x74\x69\x6F\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x63\x6F\x75\x6E\x74","\x63\x68\x65\x63\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x74\x6F\x6B\x65\x6E","\x63\x72\x65\x61\x74\x65\x43\x6C\x69\x65\x6E\x74","\x65\x72\x72\x6F\x72","\x76\x65\x72\x69\x66\x69\x65\x64","\x61\x75\x74\x68","\x75\x73\x65\x72\x73","\x67\x65\x74\x46\x69\x65\x6C\x64\x73","\x6C\x69\x73\x74","\x74\x69\x63\x6B\x65\x74\x66\x69\x65\x6C\x64\x73","\x67\x65\x74\x41\x63\x63\x6F\x75\x6E\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x61\x63\x63\x6F\x75\x6E\x74","\x67\x65\x74\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x63\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x63\x72\x65\x61\x74\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x74\x79\x70\x65","\x51\x75\x65\x75\x65","\x53\x75\x62\x6A\x65\x63\x74","\x73\x74\x72\x69\x6E\x67","\x5B\x78\x43\x41\x4C\x4C\x59\x20\x54\x69\x63\x6B\x65\x74\x5D","\x76\x61\x72\x69\x61\x62\x6C\x65","","\x71\x75\x65\x75\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x2A\x2A\x2A\x20\x43\x61\x6C\x6C\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x75\x6D\x62\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x4E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x20\x54\x6F","\x64\x65\x73\x74\x65\x78\x74\x65\x6E","\x55\x6E\x69\x71\x75\x65\x49\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x44\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x2A\x2A\x2A\x20\x41\x67\x65\x6E\x74\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x4E\x61\x6D\x65","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74\x20\x4E\x75\x6D\x62\x65\x72","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x2A\x2A\x2A\x20\x54\x69\x6D\x65\x20\x49\x6E\x66\x6F\x20\x2A\x2A\x2A","\x41\x67\x65\x6E\x74\x20\x52\x69\x6E\x67","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x41\x67\x65\x6E\x74\x20\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x48\x6F\x6C\x64\x20\x54\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C","\x43\x61\x6C\x6C\x65\x64\x20\x4E\x75\x6D\x62\x65\x72","\x4D\x65\x6D\x62\x65\x72\x20\x4E\x61\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x20\x54\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x3A","\x63\x68\x61\x6E\x6E\x65\x6C","\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x46\x69\x65\x6C\x64","\x53\x75\x62\x6A\x65\x63\x74\x49\x64","\x73\x75\x62\x6A\x65\x63\x74","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x49\x64","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x46\x69\x65\x6C\x64\x49\x64","\x75\x70\x64\x61\x74\x65\x46\x69\x65\x6C\x64","\x66\x69\x64","\x64\x65\x73\x74\x72\x6F\x79\x46\x69\x65\x6C\x64","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x73\x65\x74\x54\x61\x67\x73"];_0xda6e[0];var _=require(_0xda6e[1]);var Util=require(_0xda6e[2]);var zendesk=require(_0xda6e[3]);var ZendeskAccount=require(_0xda6e[5])[_0xda6e[4]];var ZendeskConfiguration=require(_0xda6e[5])[_0xda6e[6]];var ZendeskField=require(_0xda6e[5])[_0xda6e[7]];function handleError(_0xe40ax8,_0xe40ax9){_0xe40ax9= _0xe40ax9|| 500;return function(_0xe40axa){_0xe40ax8[_0xda6e[9]](_0xe40ax9)[_0xda6e[8]](_0xe40axa)}}function responseWithResult(_0xe40ax8,_0xe40ax9){_0xe40ax9= _0xe40ax9|| 200;return function(_0xe40axc){if(_0xe40axc){_0xe40ax8[_0xda6e[9]](_0xe40ax9)[_0xda6e[10]](_0xe40axc)}}}function responseWithoutResult(_0xe40ax8,_0xe40ax9){_0xe40ax9= _0xe40ax9|| 200;return function(){_0xe40ax8[_0xda6e[11]](_0xe40ax9)}}function handleEntityNotFound(_0xe40ax8){return function(_0xe40axc){if(!_0xe40axc){_0xe40ax8[_0xda6e[9]](404)[_0xda6e[12]]();return null};return _0xe40axc}}function saveUpdates(_0xe40ax10){return function(_0xe40axc){return _0xe40axc[_0xda6e[14]](_0xe40ax10)[_0xda6e[13]](function(_0xe40ax11){return _0xe40ax11})}}function removeEntity(_0xe40ax8){return function(_0xe40axc){if(_0xe40axc){return _0xe40axc[_0xda6e[15]]()[_0xda6e[13]](function(){_0xe40ax8[_0xda6e[9]](204)[_0xda6e[12]]()})}}}exports[_0xda6e[16]]= function(_0xe40ax13,_0xe40ax8,_0xe40ax14){return ZendeskAccount[_0xda6e[23]](_0xda6e[22])[_0xda6e[21]](_[_0xda6e[20]](Util[_0xda6e[19]](_0xe40ax13[_0xda6e[18]]),{distinct:true}))[_0xda6e[13]](responseWithResult(_0xe40ax8))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[24]]= function(_0xe40ax13,_0xe40ax8){return ZendeskAccount[_0xda6e[27]](_0xe40ax13[_0xda6e[26]][_0xda6e[25]])[_0xda6e[13]](handleEntityNotFound(_0xe40ax8))[_0xda6e[13]](responseWithResult(_0xe40ax8))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[28]]= function(_0xe40ax13,_0xe40ax8){return ZendeskAccount[_0xda6e[28]](_0xe40ax13[_0xda6e[29]])[_0xda6e[13]](responseWithResult(_0xe40ax8,201))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[30]]= function(_0xe40ax13,_0xe40ax8){if(_0xe40ax13[_0xda6e[29]][_0xda6e[25]]){delete _0xe40ax13[_0xda6e[29]][_0xda6e[25]]};return ZendeskAccount[_0xda6e[27]](_0xe40ax13[_0xda6e[26]][_0xda6e[25]])[_0xda6e[13]](handleEntityNotFound(_0xe40ax8))[_0xda6e[13]](saveUpdates(_0xe40ax13[_0xda6e[29]]))[_0xda6e[13]](responseWithResult(_0xe40ax8))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[15]]= function(_0xe40ax13,_0xe40ax8){return ZendeskAccount[_0xda6e[27]](_0xe40ax13[_0xda6e[26]][_0xda6e[25]])[_0xda6e[13]](handleEntityNotFound(_0xe40ax8))[_0xda6e[13]](removeEntity(_0xe40ax8))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[31]]= function(_0xe40ax13,_0xe40ax8){return ZendeskAccount[_0xda6e[15]]({where:{id:_0xe40ax13[_0xda6e[18]][_0xda6e[32]]},individualHooks:true})[_0xda6e[13]](responseWithResult(_0xe40ax8,204))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[33]]= function(_0xe40ax13,_0xe40ax8){var _0xe40ax15={};_0xe40ax15[_0xe40ax13[_0xda6e[26]][_0xda6e[34]]]= _0xe40ax13[_0xda6e[29]][_0xda6e[35]];return ZendeskAccount[_0xda6e[21]]({where:_0xe40ax15})[_0xda6e[13]](function(_0xe40ax16){if(_0xe40ax16[_0xda6e[36]]){return _0xe40ax8[_0xda6e[9]](200)[_0xda6e[8]]({isValid:false,value:_0xe40ax13[_0xda6e[29]][_0xda6e[35]]})};return _0xe40ax8[_0xda6e[9]](200)[_0xda6e[8]]({isValid:true,value:_0xe40ax13[_0xda6e[29]][_0xda6e[35]]})})[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[37]]= function(_0xe40ax13,_0xe40ax8){return ZendeskAccount[_0xda6e[27]](_0xe40ax13[_0xda6e[26]][_0xda6e[25]])[_0xda6e[13]](function(_0xe40ax17){var _0xe40ax18={username:_0xe40ax17[_0xda6e[38]],remoteUri:_0xe40ax17[_0xda6e[39]]};if(_0xe40ax17[_0xda6e[40]]=== _0xda6e[41]){_0xe40ax18[_0xda6e[41]]= _0xe40ax17[_0xda6e[41]]}else {if(_0xe40ax17[_0xda6e[40]]=== _0xda6e[42]){_0xe40ax18[_0xda6e[42]]= _0xe40ax17[_0xda6e[42]]}};var _0xe40ax19=zendesk[_0xda6e[43]](_0xe40ax18);_0xe40ax19[_0xda6e[47]][_0xda6e[46]](function(_0xe40axa,_0xe40ax1a,_0xe40ax16){if(_0xe40axa){console[_0xda6e[44]](_0xe40axa);return handleError(_0xe40ax8,_0xe40axa)};if(!_0xe40ax16[_0xda6e[45]]){return _0xe40ax8[_0xda6e[11]](500)};return _0xe40ax8[_0xda6e[11]](204)})})[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[48]]= function(_0xe40ax13,_0xe40ax8){return ZendeskAccount[_0xda6e[27]](_0xe40ax13[_0xda6e[26]][_0xda6e[25]])[_0xda6e[13]](function(_0xe40ax17){var _0xe40ax18={username:_0xe40ax17[_0xda6e[38]],remoteUri:_0xe40ax17[_0xda6e[39]]};if(_0xe40ax17[_0xda6e[40]]=== _0xda6e[41]){_0xe40ax18[_0xda6e[41]]= _0xe40ax17[_0xda6e[41]]}else {if(_0xe40ax17[_0xda6e[40]]=== _0xda6e[42]){_0xe40ax18[_0xda6e[42]]= _0xe40ax17[_0xda6e[42]]}};var _0xe40ax19=zendesk[_0xda6e[43]](_0xe40ax18);_0xe40ax19[_0xda6e[50]][_0xda6e[49]](function(_0xe40axa,_0xe40ax1a,_0xe40ax16){if(_0xe40axa){console[_0xda6e[44]](_0xe40axa);return handleError(_0xe40ax8,_0xe40axa)};return _0xe40ax8[_0xda6e[9]](200)[_0xda6e[8]](_0xe40ax16)})})[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[51]]= function(_0xe40ax13,_0xe40ax8){return ZendeskConfiguration[_0xda6e[23]]({method:[_0xda6e[52],_0xe40ax13[_0xda6e[26]][_0xda6e[25]]]})[_0xda6e[21]](_[_0xda6e[20]](Util[_0xda6e[19]](_0xe40ax13[_0xda6e[18]]),{distinct:true}))[_0xda6e[13]](responseWithResult(_0xe40ax8))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[53]]= function(_0xe40ax13,_0xe40ax8){return ZendeskConfiguration[_0xda6e[23]]({method:[_0xda6e[52],_0xe40ax13[_0xda6e[26]][_0xda6e[25]]]})[_0xda6e[27]](_0xe40ax13[_0xda6e[26]][_0xda6e[54]])[_0xda6e[13]](handleEntityNotFound(_0xe40ax8))[_0xda6e[13]](responseWithResult(_0xe40ax8))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[55]]= function(_0xe40ax13,_0xe40ax8){return ZendeskConfiguration[_0xda6e[23]]({method:[_0xda6e[52],_0xe40ax13[_0xda6e[26]][_0xda6e[25]]]})[_0xda6e[27]](_0xe40ax13[_0xda6e[26]][_0xda6e[54]])[_0xda6e[13]](handleEntityNotFound(_0xe40ax8))[_0xda6e[13]](removeEntity(_0xe40ax8))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[56]]= function(_0xe40ax13,_0xe40ax8){return ZendeskConfiguration[_0xda6e[15]]({where:{id:_0xe40ax13[_0xda6e[18]][_0xda6e[32]]},individualHooks:true})[_0xda6e[13]](responseWithResult(_0xe40ax8,204))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[57]]= function(_0xe40ax13,_0xe40ax8){_0xe40ax13[_0xda6e[29]][_0xda6e[58]]= _0xe40ax13[_0xda6e[26]][_0xda6e[25]];switch(_0xe40ax13[_0xda6e[29]][_0xda6e[107]]){case _0xda6e[105]:if(_0xe40ax13[_0xda6e[29]][_0xda6e[59]]=== _0xda6e[60]){_0xe40ax13[_0xda6e[29]][_0xda6e[61]]= [{"\x74\x79\x70\x65":_0xda6e[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[63],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xda6e[64],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[66]},{"\x74\x79\x70\x65":_0xda6e[64],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[67]}];_0xe40ax13[_0xda6e[29]][_0xda6e[68]]= [{"\x74\x79\x70\x65":_0xda6e[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[69],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[71],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[67]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[72],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[73]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[74],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[75]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[60],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[66]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[76],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[77]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[78],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[79]},{"\x74\x79\x70\x65":_0xda6e[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[80],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[81],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[82]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[83],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[84]},{"\x74\x79\x70\x65":_0xda6e[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[85],"\x6B\x65\x79":null,"\x6B\x65\x79\x54\x79\x70\x65":null,"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[86],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[79]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[87],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[88]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[89],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[90]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[91],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[92]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[93],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[94]}]}else {if(_0xe40ax13[_0xda6e[29]][_0xda6e[59]]=== _0xda6e[95]){_0xe40ax13[_0xda6e[29]][_0xda6e[61]]= [{"\x74\x79\x70\x65":_0xda6e[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[63],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xda6e[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[96],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xda6e[64],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[84]}];_0xe40ax13[_0xda6e[29]][_0xda6e[68]]= [{"\x74\x79\x70\x65":_0xda6e[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[69],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":null},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[97],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[84]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[98],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[99]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[76],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[77]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[78],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[100]},{"\x74\x79\x70\x65":_0xda6e[62],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[85]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[101],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[102]},{"\x74\x79\x70\x65":_0xda6e[70],"\x63\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x6B\x65\x79":_0xda6e[103],"\x6B\x65\x79\x54\x79\x70\x65":_0xda6e[64],"\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74":_0xda6e[65],"\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65":_0xda6e[104]}]}};break;default:console[_0xda6e[108]](_0xda6e[106],_0xe40ax13[_0xda6e[29]][_0xda6e[107]])};delete _0xe40ax13[_0xda6e[29]][_0xda6e[107]];delete _0xe40ax13[_0xda6e[29]][_0xda6e[59]];return ZendeskConfiguration[_0xda6e[28]](_0xe40ax13[_0xda6e[29]],{include:[{model:ZendeskField,as:_0xda6e[61]},{model:ZendeskField,as:_0xda6e[68]}]})[_0xda6e[13]](responseWithResult(_0xe40ax8,201))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[109]]= function(_0xe40ax13,_0xe40ax8){return ZendeskConfiguration[_0xda6e[23]]({method:[_0xda6e[52],_0xe40ax13[_0xda6e[26]][_0xda6e[25]]]})[_0xda6e[27]](_0xe40ax13[_0xda6e[26]][_0xda6e[54]])[_0xda6e[13]](handleEntityNotFound(_0xe40ax8))[_0xda6e[13]](function(_0xe40ax1b){switch(_0xe40ax13[_0xda6e[26]][_0xda6e[59]]){case _0xda6e[111]:_0xe40ax13[_0xda6e[29]][_0xda6e[110]]= _0xe40ax13[_0xda6e[26]][_0xda6e[54]];break;case _0xda6e[113]:_0xe40ax13[_0xda6e[29]][_0xda6e[112]]= _0xe40ax13[_0xda6e[26]][_0xda6e[54]];break;case _0xda6e[34]:_0xe40ax13[_0xda6e[29]][_0xda6e[114]]= _0xe40ax13[_0xda6e[26]][_0xda6e[54]];break};return ZendeskField[_0xda6e[28]](_0xe40ax13[_0xda6e[29]])})[_0xda6e[13]](responseWithResult(_0xe40ax8,201))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[115]]= function(_0xe40ax13,_0xe40ax8){if(_0xe40ax13[_0xda6e[29]][_0xda6e[25]]){delete _0xe40ax13[_0xda6e[29]][_0xda6e[25]]};return ZendeskField[_0xda6e[27]](_0xe40ax13[_0xda6e[26]][_0xda6e[116]])[_0xda6e[13]](handleEntityNotFound(_0xe40ax8))[_0xda6e[13]](saveUpdates(_0xe40ax13[_0xda6e[29]]))[_0xda6e[13]](responseWithResult(_0xe40ax8))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[117]]= function(_0xe40ax13,_0xe40ax8){return ZendeskField[_0xda6e[27]](_0xe40ax13[_0xda6e[26]][_0xda6e[116]])[_0xda6e[13]](handleEntityNotFound(_0xe40ax8))[_0xda6e[13]](removeEntity(_0xe40ax8))[_0xda6e[17]](handleError(_0xe40ax8))};exports[_0xda6e[118]]= function(_0xe40ax13,_0xe40ax8,_0xe40ax14){return ZendeskConfiguration[_0xda6e[27]](_0xe40ax13[_0xda6e[26]][_0xda6e[54]])[_0xda6e[13]](handleEntityNotFound(_0xe40ax8))[_0xda6e[13]](function(_0xe40ax1b){return _0xe40ax1b[_0xda6e[119]](_0xe40ax13[_0xda6e[29]])})[_0xda6e[13]](responseWithoutResult(_0xe40ax8,200))[_0xda6e[17]](function(_0xe40axa){console[_0xda6e[44]](_0xe40axa);return handleError(_0xe40ax8,_0xe40axa)})} \ No newline at end of file diff --git a/server/api/zendesk_account/zendesk_account.events.js b/server/api/zendesk_account/zendesk_account.events.js index cf5855e..1dc216d 100644 --- a/server/api/zendesk_account/zendesk_account.events.js +++ b/server/api/zendesk_account/zendesk_account.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ZendeskAccount = require('../../models').ZendeskAccount; - -var ZendeskAccountEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ZendeskAccountEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ZendeskAccount.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ZendeskAccountEvents.emit(event + ':' + doc._id, doc); - ZendeskAccountEvents.emit(event, doc); - done(null); - } -} - -module.exports = ZendeskAccountEvents; +var _0x492f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x492f[0];const EventEmitter=require(_0x492f[1]);const ZendeskAccount=require(_0x492f[3])[_0x492f[2]];var ZendeskAccountEvents= new EventEmitter();ZendeskAccountEvents[_0x492f[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x492f[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x492f[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x492f[6]};for(var e in events){var event=events[e];ZendeskAccount[_0x492f[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x72afx8,_0x72afx9,_0x72afxa){ZendeskAccountEvents[_0x492f[10]](event+ _0x492f[8]+ _0x72afx8[_0x492f[9]],_0x72afx8);ZendeskAccountEvents[_0x492f[10]](event,_0x72afx8);_0x72afxa(null)}}module[_0x492f[11]]= ZendeskAccountEvents \ No newline at end of file diff --git a/server/api/zendesk_account/zendesk_account.socket.js b/server/api/zendesk_account/zendesk_account.socket.js index c2f0be2..ed05748 100644 --- a/server/api/zendesk_account/zendesk_account.socket.js +++ b/server/api/zendesk_account/zendesk_account.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ZendeskAccountEvents = require('./zendesk_account.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('zendesk_account:' + event, socket); - - ZendeskAccountEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ZendeskAccountEvents.removeListener(event, listener); - }; -} +var _0x90d9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x90d9[0];const ZendeskAccountEvents=require(_0x90d9[1]);var events=[_0x90d9[2],_0x90d9[3]];exports[_0x90d9[4]]= function(_0x4e59x3){for(var _0x4e59x4=0,_0x4e59x5=events[_0x90d9[5]];_0x4e59x4< _0x4e59x5;_0x4e59x4++){var _0x4e59x6=events[_0x4e59x4];var _0x4e59x7=createListener(_0x90d9[6]+ _0x4e59x6,_0x4e59x3);ZendeskAccountEvents[_0x90d9[7]](_0x4e59x6,_0x4e59x7);_0x4e59x3[_0x90d9[7]](_0x90d9[8],removeListener(_0x4e59x6,_0x4e59x7))}};function createListener(_0x4e59x6,_0x4e59x3){return function(_0x4e59x9){_0x4e59x3[_0x90d9[9]](_0x4e59x6,_0x4e59x9)}}function removeListener(_0x4e59x6,_0x4e59x7){return function(){ZendeskAccountEvents[_0x90d9[10]](_0x4e59x6,_0x4e59x7)}} \ No newline at end of file diff --git a/server/api/zendesk_configuration/index.js b/server/api/zendesk_configuration/index.js index f91b034..30f4fcd 100644 --- a/server/api/zendesk_configuration/index.js +++ b/server/api/zendesk_configuration/index.js @@ -1,16 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./zendesk_configuration.controller'); -var auth = require('../../auth/auth.service'); -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.post('/:id/tags', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationTags); -router.post('/:id/:type', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.addConfigurationField); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); - -module.exports = router; +var _0xdd60=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x2F\x3A\x69\x64\x2F\x74\x61\x67\x73","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x2F\x3A\x69\x64\x2F\x3A\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xdd60[0];var express=require(_0xdd60[1]);var controller=require(_0xdd60[2]);var auth=require(_0xdd60[3]);var router=express.Router();router[_0xdd60[9]](_0xdd60[4],auth[_0xdd60[5]](),auth[_0xdd60[7]]([19],[_0xdd60[6]]),controller[_0xdd60[8]]);router[_0xdd60[9]](_0xdd60[10],auth[_0xdd60[5]](),auth[_0xdd60[7]]([19],[_0xdd60[6]]),controller[_0xdd60[11]]);router[_0xdd60[13]](_0xdd60[4],auth[_0xdd60[5]](),auth[_0xdd60[7]]([19],[_0xdd60[6]]),controller[_0xdd60[12]]);router[_0xdd60[15]](_0xdd60[10],auth[_0xdd60[5]](),auth[_0xdd60[7]]([19],[_0xdd60[6]]),controller[_0xdd60[14]]);router[_0xdd60[13]](_0xdd60[16],auth[_0xdd60[5]](),auth[_0xdd60[7]]([19],[_0xdd60[6]]),controller[_0xdd60[17]]);router[_0xdd60[13]](_0xdd60[18],auth[_0xdd60[5]](),auth[_0xdd60[7]]([19],[_0xdd60[6]]),controller[_0xdd60[19]]);router[_0xdd60[21]](_0xdd60[10],auth[_0xdd60[5]](),auth[_0xdd60[7]]([19],[_0xdd60[6]]),controller[_0xdd60[20]]);module[_0xdd60[22]]= router \ No newline at end of file diff --git a/server/api/zendesk_configuration/zendesk_configuration.controller.js b/server/api/zendesk_configuration/zendesk_configuration.controller.js index e299424..517a7d3 100644 --- a/server/api/zendesk_configuration/zendesk_configuration.controller.js +++ b/server/api/zendesk_configuration/zendesk_configuration.controller.js @@ -1,181 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ZendeskConfiguration = require('../../models').ZendeskConfiguration; -var ZendeskField = require('../../models').ZendeskField; - -// Get list of zendesk_configurations -exports.index = function(req, res) { - ZendeskConfiguration - .findAll({ - where: req.query - }) - .then(function(zendesk_configurations) { - return res.status(200).send(zendesk_configurations); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single zendesk_configuration -exports.show = function(req, res) { - ZendeskConfiguration - .find({ - where: { - id: req.params.id - }, - include: [{ - all: true - }] - }) - .then(function(zendesk_configuration) { - if (!zendesk_configuration) { - return res.sendStatus(404); - } - return res.send(zendesk_configuration); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new zendesk_configuration in the DB. -exports.create = function(req, res) { - ZendeskConfiguration - .create(req.body) - .then(function(zendesk_configuration) { - return res.status(201).send(zendesk_configuration); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing zendesk_configuration in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - ZendeskConfiguration - .findById(req.params.id) - .then(function(zendesk_configuration) { - if (!zendesk_configuration) { - return res.sendStatus(404); - } - var updated = _.merge(zendesk_configuration, req.body); - updated.save() - .then(function() { - return res.status(200).send(zendesk_configuration); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a zendesk_configuration from the DB. -exports.destroy = function(req, res) { - ZendeskConfiguration - .findById(req.params.id) - .then(function(zendesk_configuration) { - if (!zendesk_configuration) { - return res.sendStatus(404); - } - zendesk_configuration.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -exports.addConfigurationField = function(req, res, next) { - // console.log(req.params); - ZendeskConfiguration - .findById(req.params.id) - .then(function(configuration) { - if (!configuration) { - return res.sendStatus(500); - } - ZendeskField - .create(req.body) - .then(function(field) { - switch (req.params.type) { - case 'subject': - configuration.addSubject(field) - .then(function() { - return res.status(200).send(field); - }) - .catch(function(err) { - return handleError(res, err); - }); - break; - case 'description': - configuration.addDescription(field) - .then(function() { - return res.status(200).send(field); - }) - .catch(function(err) { - return handleError(res, err); - }); - break; - case 'field': - configuration.addField(field) - .then(function() { - return res.status(200).send(field); - }) - .catch(function(err) { - return handleError(res, err); - }); - break; - } - }) - .catch(function(err) { - return handleError(res, err); - // return next(err); - }); - }) - .catch(function(err) { - // return next(err); - return handleError(res, err); - }); -}; - -exports.addConfigurationTags = function(req, res, next) { - ZendeskConfiguration - .findById(req.params.id) - .then(handleEntityNotFound(res)) - .then(function(configuration) { - return configuration.setTags(req.body); - }) - .then(function(data) { - return res.sendStatus(200); - }) - .catch(function(err) { - console.error(err); - return handleError(res, err); - }); -}; - -function handleEntityNotFound(res) { - return function(entity) { - if (!entity) { - res.status(404).end(); - return null; - } - return entity; - }; -} - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xd5cf=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x71\x75\x65\x72\x79","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x65\x73\x74\x72\x6F\x79","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x46\x69\x65\x6C\x64","\x61\x64\x64\x53\x75\x62\x6A\x65\x63\x74","\x73\x75\x62\x6A\x65\x63\x74","\x61\x64\x64\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x61\x64\x64\x46\x69\x65\x6C\x64","\x66\x69\x65\x6C\x64","\x74\x79\x70\x65","\x61\x64\x64\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x54\x61\x67\x73","\x65\x72\x72\x6F\x72","\x73\x65\x74\x54\x61\x67\x73","\x65\x6E\x64"];_0xd5cf[0];var _=require(_0xd5cf[1]);var ZendeskConfiguration=require(_0xd5cf[3])[_0xd5cf[2]];var ZendeskField=require(_0xd5cf[3])[_0xd5cf[4]];exports[_0xd5cf[5]]= function(_0xccb0x4,_0xccb0x5){ZendeskConfiguration[_0xd5cf[11]]({where:_0xccb0x4[_0xd5cf[10]]})[_0xd5cf[9]](function(_0xccb0x7){return _0xccb0x5[_0xd5cf[8]](200)[_0xd5cf[7]](_0xccb0x7)})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)})};exports[_0xd5cf[12]]= function(_0xccb0x4,_0xccb0x5){ZendeskConfiguration[_0xd5cf[16]]({where:{id:_0xccb0x4[_0xd5cf[15]][_0xd5cf[14]]},include:[{all:true}]})[_0xd5cf[9]](function(_0xccb0x8){if(!_0xccb0x8){return _0xccb0x5[_0xd5cf[13]](404)};return _0xccb0x5[_0xd5cf[7]](_0xccb0x8)})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)})};exports[_0xd5cf[17]]= function(_0xccb0x4,_0xccb0x5){ZendeskConfiguration[_0xd5cf[17]](_0xccb0x4[_0xd5cf[18]])[_0xd5cf[9]](function(_0xccb0x8){return _0xccb0x5[_0xd5cf[8]](201)[_0xd5cf[7]](_0xccb0x8)})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)})};exports[_0xd5cf[19]]= function(_0xccb0x4,_0xccb0x5){if(_0xccb0x4[_0xd5cf[18]][_0xd5cf[14]]){delete _0xccb0x4[_0xd5cf[18]][_0xd5cf[14]]};ZendeskConfiguration[_0xd5cf[22]](_0xccb0x4[_0xd5cf[15]][_0xd5cf[14]])[_0xd5cf[9]](function(_0xccb0x8){if(!_0xccb0x8){return _0xccb0x5[_0xd5cf[13]](404)};var _0xccb0x9=_[_0xd5cf[20]](_0xccb0x8,_0xccb0x4[_0xd5cf[18]]);_0xccb0x9[_0xd5cf[21]]()[_0xd5cf[9]](function(){return _0xccb0x5[_0xd5cf[8]](200)[_0xd5cf[7]](_0xccb0x8)})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)})})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)})};exports[_0xd5cf[23]]= function(_0xccb0x4,_0xccb0x5){ZendeskConfiguration[_0xd5cf[22]](_0xccb0x4[_0xd5cf[15]][_0xd5cf[14]])[_0xd5cf[9]](function(_0xccb0x8){if(!_0xccb0x8){return _0xccb0x5[_0xd5cf[13]](404)};_0xccb0x8[_0xd5cf[23]]()[_0xd5cf[9]](function(){return _0xccb0x5[_0xd5cf[13]](204)})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)})})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)})};exports[_0xd5cf[24]]= function(_0xccb0x4,_0xccb0x5,_0xccb0xa){ZendeskConfiguration[_0xd5cf[22]](_0xccb0x4[_0xd5cf[15]][_0xd5cf[14]])[_0xd5cf[9]](function(_0xccb0xb){if(!_0xccb0xb){return _0xccb0x5[_0xd5cf[13]](500)};ZendeskField[_0xd5cf[17]](_0xccb0x4[_0xd5cf[18]])[_0xd5cf[9]](function(_0xccb0xc){switch(_0xccb0x4[_0xd5cf[15]][_0xd5cf[31]]){case _0xd5cf[26]:_0xccb0xb[_0xd5cf[25]](_0xccb0xc)[_0xd5cf[9]](function(){return _0xccb0x5[_0xd5cf[8]](200)[_0xd5cf[7]](_0xccb0xc)})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)});break;case _0xd5cf[28]:_0xccb0xb[_0xd5cf[27]](_0xccb0xc)[_0xd5cf[9]](function(){return _0xccb0x5[_0xd5cf[8]](200)[_0xd5cf[7]](_0xccb0xc)})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)});break;case _0xd5cf[30]:_0xccb0xb[_0xd5cf[29]](_0xccb0xc)[_0xd5cf[9]](function(){return _0xccb0x5[_0xd5cf[8]](200)[_0xd5cf[7]](_0xccb0xc)})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)});break}})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)})})[_0xd5cf[6]](function(_0xccb0x6){return handleError(_0xccb0x5,_0xccb0x6)})};exports[_0xd5cf[32]]= function(_0xccb0x4,_0xccb0x5,_0xccb0xa){ZendeskConfiguration[_0xd5cf[22]](_0xccb0x4[_0xd5cf[15]][_0xd5cf[14]])[_0xd5cf[9]](handleEntityNotFound(_0xccb0x5))[_0xd5cf[9]](function(_0xccb0xb){return _0xccb0xb[_0xd5cf[34]](_0xccb0x4[_0xd5cf[18]])})[_0xd5cf[9]](function(_0xccb0xd){return _0xccb0x5[_0xd5cf[13]](200)})[_0xd5cf[6]](function(_0xccb0x6){console[_0xd5cf[33]](_0xccb0x6);return handleError(_0xccb0x5,_0xccb0x6)})};function handleEntityNotFound(_0xccb0x5){return function(_0xccb0xf){if(!_0xccb0xf){_0xccb0x5[_0xd5cf[8]](404)[_0xd5cf[35]]();return null};return _0xccb0xf}}function handleError(_0xccb0x5,_0xccb0x6){return _0xccb0x5[_0xd5cf[8]](500)[_0xd5cf[7]](_0xccb0x6)} \ No newline at end of file diff --git a/server/api/zendesk_configuration/zendesk_configuration.events.js b/server/api/zendesk_configuration/zendesk_configuration.events.js index f745627..eb585ea 100644 --- a/server/api/zendesk_configuration/zendesk_configuration.events.js +++ b/server/api/zendesk_configuration/zendesk_configuration.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ZendeskConfiguration = require('../../models').ZendeskConfiguration; - -var ZendeskConfigurationEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ZendeskConfigurationEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ZendeskConfiguration.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ZendeskConfigurationEvents.emit(event + ':' + doc._id, doc); - ZendeskConfigurationEvents.emit(event, doc); - done(null); - } -} - -module.exports = ZendeskConfigurationEvents; +var _0xd646=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xd646[0];const EventEmitter=require(_0xd646[1]);const ZendeskConfiguration=require(_0xd646[3])[_0xd646[2]];var ZendeskConfigurationEvents= new EventEmitter();ZendeskConfigurationEvents[_0xd646[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0xd646[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0xd646[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0xd646[6]};for(var e in events){var event=events[e];ZendeskConfiguration[_0xd646[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x1b62x8,_0x1b62x9,_0x1b62xa){ZendeskConfigurationEvents[_0xd646[10]](event+ _0xd646[8]+ _0x1b62x8[_0xd646[9]],_0x1b62x8);ZendeskConfigurationEvents[_0xd646[10]](event,_0x1b62x8);_0x1b62xa(null)}}module[_0xd646[11]]= ZendeskConfigurationEvents \ No newline at end of file diff --git a/server/api/zendesk_configuration/zendesk_configuration.socket.js b/server/api/zendesk_configuration/zendesk_configuration.socket.js index e6e6b68..1ecde78 100644 --- a/server/api/zendesk_configuration/zendesk_configuration.socket.js +++ b/server/api/zendesk_configuration/zendesk_configuration.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ZendeskConfigurationEvents = require('./zendesk_configuration.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('zendesk_configuration:' + event, socket); - - ZendeskConfigurationEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ZendeskConfigurationEvents.removeListener(event, listener); - }; -} +var _0x363b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x363b[0];const ZendeskConfigurationEvents=require(_0x363b[1]);var events=[_0x363b[2],_0x363b[3]];exports[_0x363b[4]]= function(_0x29cex3){for(var _0x29cex4=0,_0x29cex5=events[_0x363b[5]];_0x29cex4< _0x29cex5;_0x29cex4++){var _0x29cex6=events[_0x29cex4];var _0x29cex7=createListener(_0x363b[6]+ _0x29cex6,_0x29cex3);ZendeskConfigurationEvents[_0x363b[7]](_0x29cex6,_0x29cex7);_0x29cex3[_0x363b[7]](_0x363b[8],removeListener(_0x29cex6,_0x29cex7))}};function createListener(_0x29cex6,_0x29cex3){return function(_0x29cex9){_0x29cex3[_0x363b[9]](_0x29cex6,_0x29cex9)}}function removeListener(_0x29cex6,_0x29cex7){return function(){ZendeskConfigurationEvents[_0x363b[10]](_0x29cex6,_0x29cex7)}} \ No newline at end of file diff --git a/server/api/zendesk_field/index.js b/server/api/zendesk_field/index.js index e84b58d..10ca082 100644 --- a/server/api/zendesk_field/index.js +++ b/server/api/zendesk_field/index.js @@ -1,14 +1 @@ -'use strict'; - -var express = require('express'); -var controller = require('./zendesk_field.controller'); -var auth = require('../../auth/auth.service'); -var router = express.Router(); - -router.get('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.index); -router.get('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.show); -router.post('/', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.create); -router.put('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.update); -router.delete('/:id', auth.isAuthenticated(), auth.hasModule([19], ['admin']), controller.destroy); - -module.exports = router; +var _0x4add=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x63\x6F\x6E\x74\x72\x6F\x6C\x6C\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x75\x74\x68\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x61\x64\x6D\x69\x6E","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x69\x6E\x64\x65\x78","\x67\x65\x74","\x2F\x3A\x69\x64","\x73\x68\x6F\x77","\x63\x72\x65\x61\x74\x65","\x70\x6F\x73\x74","\x75\x70\x64\x61\x74\x65","\x70\x75\x74","\x64\x65\x73\x74\x72\x6F\x79","\x64\x65\x6C\x65\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4add[0];var express=require(_0x4add[1]);var controller=require(_0x4add[2]);var auth=require(_0x4add[3]);var router=express.Router();router[_0x4add[9]](_0x4add[4],auth[_0x4add[5]](),auth[_0x4add[7]]([19],[_0x4add[6]]),controller[_0x4add[8]]);router[_0x4add[9]](_0x4add[10],auth[_0x4add[5]](),auth[_0x4add[7]]([19],[_0x4add[6]]),controller[_0x4add[11]]);router[_0x4add[13]](_0x4add[4],auth[_0x4add[5]](),auth[_0x4add[7]]([19],[_0x4add[6]]),controller[_0x4add[12]]);router[_0x4add[15]](_0x4add[10],auth[_0x4add[5]](),auth[_0x4add[7]]([19],[_0x4add[6]]),controller[_0x4add[14]]);router[_0x4add[17]](_0x4add[10],auth[_0x4add[5]](),auth[_0x4add[7]]([19],[_0x4add[6]]),controller[_0x4add[16]]);module[_0x4add[18]]= router \ No newline at end of file diff --git a/server/api/zendesk_field/zendesk_field.controller.js b/server/api/zendesk_field/zendesk_field.controller.js index 48d0c38..43bd253 100644 --- a/server/api/zendesk_field/zendesk_field.controller.js +++ b/server/api/zendesk_field/zendesk_field.controller.js @@ -1,93 +1 @@ -'use strict'; - -var _ = require('lodash'); -var ZendeskField = require('../../models').ZendeskField; - -// Get list of zendesk_fields -exports.index = function(req, res) { - ZendeskField - .findAll() - .then(function(zendesk_fields) { - return res.status(200).send(zendesk_fields); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Get a single zendesk_field -exports.show = function(req, res) { - ZendeskField - .findById(req.params.id) - .then(function(zendesk_field) { - if (!zendesk_field) { - return res.sendStatus(404); - } - return res.send(zendesk_field); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Creates a new zendesk_field in the DB. -exports.create = function(req, res) { - ZendeskField - .create(req.body) - .then(function(zendesk_field) { - return res.status(201).send(zendesk_field); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Updates an existing zendesk_field in the DB. -exports.update = function(req, res) { - if (req.body.id) { - delete req.body.id; - } - ZendeskField - .findById(req.params.id) - .then(function(zendesk_field) { - if (!zendesk_field) { - return res.sendStatus(404); - } - var updated = _.merge(zendesk_field, req.body); - updated.save() - .then(function() { - return res.status(200).send(zendesk_field); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -// Deletes a zendesk_field from the DB. -exports.destroy = function(req, res) { - ZendeskField - .findById(req.params.id) - .then(function(zendesk_field) { - if (!zendesk_field) { - return res.sendStatus(404); - } - zendesk_field.destroy() - .then(function() { - return res.sendStatus(204); - }) - .catch(function(err) { - return handleError(res, err); - }); - }) - .catch(function(err) { - return handleError(res, err); - }); -}; - -function handleError(res, err) { - return res.status(500).send(err); -} +var _0xe7d6=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x6E\x64\x65\x78","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x68\x6F\x77","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x69\x64","\x70\x61\x72\x61\x6D\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x63\x72\x65\x61\x74\x65","\x62\x6F\x64\x79","\x75\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x64\x65\x73\x74\x72\x6F\x79"];_0xe7d6[0];var _=require(_0xe7d6[1]);var ZendeskField=require(_0xe7d6[3])[_0xe7d6[2]];exports[_0xe7d6[4]]= function(_0x28adx3,_0x28adx4){ZendeskField[_0xe7d6[9]]()[_0xe7d6[8]](function(_0x28adx6){return _0x28adx4[_0xe7d6[7]](200)[_0xe7d6[6]](_0x28adx6)})[_0xe7d6[5]](function(_0x28adx5){return handleError(_0x28adx4,_0x28adx5)})};exports[_0xe7d6[10]]= function(_0x28adx3,_0x28adx4){ZendeskField[_0xe7d6[14]](_0x28adx3[_0xe7d6[13]][_0xe7d6[12]])[_0xe7d6[8]](function(_0x28adx7){if(!_0x28adx7){return _0x28adx4[_0xe7d6[11]](404)};return _0x28adx4[_0xe7d6[6]](_0x28adx7)})[_0xe7d6[5]](function(_0x28adx5){return handleError(_0x28adx4,_0x28adx5)})};exports[_0xe7d6[15]]= function(_0x28adx3,_0x28adx4){ZendeskField[_0xe7d6[15]](_0x28adx3[_0xe7d6[16]])[_0xe7d6[8]](function(_0x28adx7){return _0x28adx4[_0xe7d6[7]](201)[_0xe7d6[6]](_0x28adx7)})[_0xe7d6[5]](function(_0x28adx5){return handleError(_0x28adx4,_0x28adx5)})};exports[_0xe7d6[17]]= function(_0x28adx3,_0x28adx4){if(_0x28adx3[_0xe7d6[16]][_0xe7d6[12]]){delete _0x28adx3[_0xe7d6[16]][_0xe7d6[12]]};ZendeskField[_0xe7d6[14]](_0x28adx3[_0xe7d6[13]][_0xe7d6[12]])[_0xe7d6[8]](function(_0x28adx7){if(!_0x28adx7){return _0x28adx4[_0xe7d6[11]](404)};var _0x28adx8=_[_0xe7d6[18]](_0x28adx7,_0x28adx3[_0xe7d6[16]]);_0x28adx8[_0xe7d6[19]]()[_0xe7d6[8]](function(){return _0x28adx4[_0xe7d6[7]](200)[_0xe7d6[6]](_0x28adx7)})[_0xe7d6[5]](function(_0x28adx5){return handleError(_0x28adx4,_0x28adx5)})})[_0xe7d6[5]](function(_0x28adx5){return handleError(_0x28adx4,_0x28adx5)})};exports[_0xe7d6[20]]= function(_0x28adx3,_0x28adx4){ZendeskField[_0xe7d6[14]](_0x28adx3[_0xe7d6[13]][_0xe7d6[12]])[_0xe7d6[8]](function(_0x28adx7){if(!_0x28adx7){return _0x28adx4[_0xe7d6[11]](404)};_0x28adx7[_0xe7d6[20]]()[_0xe7d6[8]](function(){return _0x28adx4[_0xe7d6[11]](204)})[_0xe7d6[5]](function(_0x28adx5){return handleError(_0x28adx4,_0x28adx5)})})[_0xe7d6[5]](function(_0x28adx5){return handleError(_0x28adx4,_0x28adx5)})};function handleError(_0x28adx4,_0x28adx5){return _0x28adx4[_0xe7d6[7]](500)[_0xe7d6[6]](_0x28adx5)} \ No newline at end of file diff --git a/server/api/zendesk_field/zendesk_field.events.js b/server/api/zendesk_field/zendesk_field.events.js index 3b68978..700883f 100644 --- a/server/api/zendesk_field/zendesk_field.events.js +++ b/server/api/zendesk_field/zendesk_field.events.js @@ -1,36 +1 @@ -/** - * Thing model events - */ - -'use strict'; - -const EventEmitter = require('events'); -const ZendeskField = require('../../models').ZendeskField; - -var ZendeskFieldEvents = new EventEmitter(); - -// Set max event listeners (0 == unlimited) -ZendeskFieldEvents.setMaxListeners(0); - -// Model events -var events = { - 'afterCreate': 'save', - 'afterUpdate': 'save', - 'afterDestroy': 'remove' -}; - -// Register the event emitter to the model events -for (var e in events) { - var event = events[e]; - ZendeskField.hook(e, emitEvent(event)); -} - -function emitEvent(event) { - return function(doc, options, done) { - ZendeskFieldEvents.emit(event + ':' + doc._id, doc); - ZendeskFieldEvents.emit(event, doc); - done(null); - } -} - -module.exports = ZendeskFieldEvents; +var _0x845d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x76\x65\x6E\x74\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x46\x69\x65\x6C\x64","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x68\x6F\x6F\x6B","\x3A","\x5F\x69\x64","\x65\x6D\x69\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x845d[0];const EventEmitter=require(_0x845d[1]);const ZendeskField=require(_0x845d[3])[_0x845d[2]];var ZendeskFieldEvents= new EventEmitter();ZendeskFieldEvents[_0x845d[4]](0);var events={"\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65":_0x845d[5],"\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65":_0x845d[5],"\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79":_0x845d[6]};for(var e in events){var event=events[e];ZendeskField[_0x845d[7]](e,emitEvent(event))};function emitEvent(event){return function(_0x3a5cx8,_0x3a5cx9,_0x3a5cxa){ZendeskFieldEvents[_0x845d[10]](event+ _0x845d[8]+ _0x3a5cx8[_0x845d[9]],_0x3a5cx8);ZendeskFieldEvents[_0x845d[10]](event,_0x3a5cx8);_0x3a5cxa(null)}}module[_0x845d[11]]= ZendeskFieldEvents \ No newline at end of file diff --git a/server/api/zendesk_field/zendesk_field.socket.js b/server/api/zendesk_field/zendesk_field.socket.js index 891c45b..516c385 100644 --- a/server/api/zendesk_field/zendesk_field.socket.js +++ b/server/api/zendesk_field/zendesk_field.socket.js @@ -1,32 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -const ZendeskFieldEvents = require('./zendesk_field.events'); - -// Model events to emit -var events = ['save', 'remove']; - -exports.register = function(socket) { - for (var i = 0, eventsLength = events.length; i < eventsLength; i++) { - var event = events[i]; - var listener = createListener('zendesk_field:' + event, socket); - - ZendeskFieldEvents.on(event, listener); - socket.on('disconnect', removeListener(event, listener)); - } -} - -function createListener(event, socket) { - return function(doc) { - socket.emit(event, doc); - }; -} - -function removeListener(event, listener) { - return function() { - ZendeskFieldEvents.removeListener(event, listener); - }; -} +var _0x2b77=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x65\x76\x65\x6E\x74\x73","\x73\x61\x76\x65","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x67\x69\x73\x74\x65\x72","\x6C\x65\x6E\x67\x74\x68","\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x3A","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x65\x6D\x69\x74","\x72\x65\x6D\x6F\x76\x65\x4C\x69\x73\x74\x65\x6E\x65\x72"];_0x2b77[0];const ZendeskFieldEvents=require(_0x2b77[1]);var events=[_0x2b77[2],_0x2b77[3]];exports[_0x2b77[4]]= function(_0xd826x3){for(var _0xd826x4=0,_0xd826x5=events[_0x2b77[5]];_0xd826x4< _0xd826x5;_0xd826x4++){var _0xd826x6=events[_0xd826x4];var _0xd826x7=createListener(_0x2b77[6]+ _0xd826x6,_0xd826x3);ZendeskFieldEvents[_0x2b77[7]](_0xd826x6,_0xd826x7);_0xd826x3[_0x2b77[7]](_0x2b77[8],removeListener(_0xd826x6,_0xd826x7))}};function createListener(_0xd826x6,_0xd826x3){return function(_0xd826x9){_0xd826x3[_0x2b77[9]](_0xd826x6,_0xd826x9)}}function removeListener(_0xd826x6,_0xd826x7){return function(){ZendeskFieldEvents[_0x2b77[10]](_0xd826x6,_0xd826x7)}} \ No newline at end of file diff --git a/server/app.js b/server/app.js index 4ca80a4..1330e6f 100644 --- a/server/app.js +++ b/server/app.js @@ -1,100 +1 @@ -'use strict'; - -/** - * Main application file - */ - -// Set default node environment to development -process.env.NODE_ENV = process.env.NODE_ENV || 'development'; -process.env.NODE_TLS_REJECT_UNAUTHORIZED = 0; - -process.on('uncaughtException', function(err) { - if (typeof err === 'object') { - if (err.message) { - console.log('\nMessage: ' + err.message) - } - if (err.stack) { - console.log('\nStacktrace:') - console.log('====================') - console.log(err.stack); - } - } else { - console.log('dumpError :: argument is not an object'); - } -}); - -var os = require('os'); -var http = require('http'); -var util = require('util'); -var crypto = require('crypto'); -var cronjob = require('cron').CronJob; -var shelljs = require('shelljs/global'); -var sticky = require('sticky-session'); - -var express = require('express'); -var config = require('./config/environment'); -var models = require('./models'); - -var sio = require('socket.io'); -var sio_redis = require('socket.io-redis'); - -// Setup server -var app = express(); -var server = require('http').createServer(app); - -// Start server -server.listen(config.port, config.ip, function() { - console.log('Express server listening on %d, in %s mode', config.port, app.get('env')); -}); - -var io = require('socket.io')(server, { - serveClient: (config.env === 'production') ? false : true, - path: '/socket.io-client' -}); -var redis = require('socket.io-redis'); -io.adapter(redis({ - host: config.ip, - port: 6379 -})); - -require('./config/express')(app); -require('./routes')(app); - -models - .sequelize - .sync() - .then(function() { - - // Populate DB Develop with sample data - if (config.seedDB) { - require('./config/seed'); - } - // Populate DB Production with sample data - if (config.seedPDB) { - require('./config/seedp'); - } - - var cpAmi = require('./config/ami'); - - require('./services/dashboard')(cpAmi) - require('./config/socketio')(io); - require('./config/automations/mail')(); - require('./config/automations/fax')(); - require('./config/automations/chat')(); - require('./config/triggers')(cpAmi); - require('./config/scheduler')(); - require('./config/imap')(); - require('./config/smtp')(); - require('./config/sms')(); - require('./config/chat')(); - require('./config/openchannel')(); - require('./config/tools')(); - require('./config/agi')(); - require('./config/license')(); - }) - .catch(function(err) { - console.error(err); - }); - -// Expose app -exports = module.exports = app; +var _0x530d=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4E\x4F\x44\x45\x5F\x45\x4E\x56","\x65\x6E\x76","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x4E\x4F\x44\x45\x5F\x54\x4C\x53\x5F\x52\x45\x4A\x45\x43\x54\x5F\x55\x4E\x41\x55\x54\x48\x4F\x52\x49\x5A\x45\x44","\x75\x6E\x63\x61\x75\x67\x68\x74\x45\x78\x63\x65\x70\x74\x69\x6F\x6E","\x6F\x62\x6A\x65\x63\x74","\x6D\x65\x73\x73\x61\x67\x65","\x0A\x4D\x65\x73\x73\x61\x67\x65\x3A\x20","\x6C\x6F\x67","\x73\x74\x61\x63\x6B","\x0A\x53\x74\x61\x63\x6B\x74\x72\x61\x63\x65\x3A","\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x64\x75\x6D\x70\x45\x72\x72\x6F\x72\x20\x3A\x3A\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x61\x6E\x20\x6F\x62\x6A\x65\x63\x74","\x6F\x6E","\x6F\x73","\x68\x74\x74\x70","\x75\x74\x69\x6C","\x63\x72\x79\x70\x74\x6F","\x43\x72\x6F\x6E\x4A\x6F\x62","\x63\x72\x6F\x6E","\x73\x68\x65\x6C\x6C\x6A\x73\x2F\x67\x6C\x6F\x62\x61\x6C","\x73\x74\x69\x63\x6B\x79\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x72\x65\x64\x69\x73","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\x70\x6F\x72\x74","\x69\x70","\x45\x78\x70\x72\x65\x73\x73\x20\x73\x65\x72\x76\x65\x72\x20\x6C\x69\x73\x74\x65\x6E\x69\x6E\x67\x20\x6F\x6E\x20\x25\x64\x2C\x20\x69\x6E\x20\x25\x73\x20\x6D\x6F\x64\x65","\x67\x65\x74","\x6C\x69\x73\x74\x65\x6E","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x2F\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x63\x6C\x69\x65\x6E\x74","\x61\x64\x61\x70\x74\x65\x72","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x78\x70\x72\x65\x73\x73","\x2E\x2F\x72\x6F\x75\x74\x65\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x65\x65\x64\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64","\x73\x65\x65\x64\x50\x44\x42","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x65\x65\x64\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x6D\x69","\x2E\x2F\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6F\x63\x6B\x65\x74\x69\x6F","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x6D\x61\x69\x6C","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x66\x61\x78","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73\x2F\x63\x68\x61\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x69\x6D\x61\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6D\x74\x70","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x73\x6D\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x63\x68\x61\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x74\x6F\x6F\x6C\x73","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x61\x67\x69","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x74\x68\x65\x6E","\x73\x79\x6E\x63","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x530d[0];process[_0x530d[2]][_0x530d[1]]= process[_0x530d[2]][_0x530d[1]]|| _0x530d[3];process[_0x530d[2]][_0x530d[4]]= 0;process[_0x530d[14]](_0x530d[5],function(_0x10f5x1){if( typeof _0x10f5x1=== _0x530d[6]){if(_0x10f5x1[_0x530d[7]]){console[_0x530d[9]](_0x530d[8]+ _0x10f5x1[_0x530d[7]])};if(_0x10f5x1[_0x530d[10]]){console[_0x530d[9]](_0x530d[11]);console[_0x530d[9]](_0x530d[12]);console[_0x530d[9]](_0x10f5x1[_0x530d[10]])}}else {console[_0x530d[9]](_0x530d[13])}});var os=require(_0x530d[15]);var http=require(_0x530d[16]);var util=require(_0x530d[17]);var crypto=require(_0x530d[18]);var cronjob=require(_0x530d[20])[_0x530d[19]];var shelljs=require(_0x530d[21]);var sticky=require(_0x530d[22]);var express=require(_0x530d[23]);var config=require(_0x530d[24]);var models=require(_0x530d[25]);var sio=require(_0x530d[26]);var sio_redis=require(_0x530d[27]);var app=express();var server=require(_0x530d[16])[_0x530d[28]](app);server[_0x530d[33]](config[_0x530d[29]],config[_0x530d[30]],function(){console[_0x530d[9]](_0x530d[31],config[_0x530d[29]],app[_0x530d[32]](_0x530d[2]))});var io=require(_0x530d[26])(server,{serveClient:(config[_0x530d[2]]=== _0x530d[34])?false:true,path:_0x530d[35]});var redis=require(_0x530d[27]);io[_0x530d[36]](redis({host:config[_0x530d[30]],port:6379}));require(_0x530d[37])(app);require(_0x530d[38])(app);models[_0x530d[63]][_0x530d[62]]()[_0x530d[61]](function(){if(config[_0x530d[41]]){require(_0x530d[42])};if(config[_0x530d[43]]){require(_0x530d[44])};var _0x10f5x12=require(_0x530d[45]);require(_0x530d[46])(_0x10f5x12);require(_0x530d[47])(io);require(_0x530d[48])();require(_0x530d[49])();require(_0x530d[50])();require(_0x530d[51])(_0x10f5x12);require(_0x530d[52])();require(_0x530d[53])();require(_0x530d[54])();require(_0x530d[55])();require(_0x530d[56])();require(_0x530d[57])();require(_0x530d[58])();require(_0x530d[59])();require(_0x530d[60])()})[_0x530d[40]](function(_0x10f5x1){console[_0x530d[39]](_0x10f5x1)});exports= module[_0x530d[64]]= app \ No newline at end of file diff --git a/server/auth/auth.service.js b/server/auth/auth.service.js index e82ba59..977d09b 100644 --- a/server/auth/auth.service.js +++ b/server/auth/auth.service.js @@ -1,150 +1 @@ -'use strict'; - -//var mongoose = require('mongoose'); -var passport = require('passport'); -var config = require('../config/environment'); -var jwt = require('jsonwebtoken'); -var expressJwt = require('express-jwt'); -var compose = require('composable-middleware'); -// var User = require('../api/user/user.model'); -var User = require('../models').User; -var List = require('../models').List; -var validateJwt = expressJwt({ - secret: config.session.secret -}); -var Promise = require('bluebird'); -var _ = require('lodash'); - -/** - * Attaches the user object to the request if authenticated - * Otherwise returns 403 - */ -function isAuthenticated() { - return compose() - // Validate jwt - .use(function(req, res, next) { - // allow access_token to be passed through query parameter as well - if (req.query && req.query.hasOwnProperty('access_token')) { - req.headers.authorization = 'Bearer ' + req.query.access_token; - } - if (req.headers && req.headers.authorization && _.startsWith(req.headers.authorization, 'Basic')) { - var arrAuth = _.split(req.headers.authorization, ' '); - var authString = new Buffer(arrAuth[1], 'base64').toString("ascii"); - var username = _.split(authString, ':')[0]; - var pwd = _.split(authString, ':')[1]; - return User.findOne({ - where: { - name: username - } - }) - .then(function(user) { - if (!user || !user.authenticate(pwd)) { - next(new Error('Wrong credentials.')); - } - req.user = { - id: user.id - }; - next(); - }) - } else { - validateJwt(req, res, next); - } - }) - // Attach user to request - .use(function(req, res, next) { - User - .findById(req.user.id, { - include: [{ - model: List - }] - }) - .then(function(user) { - if (!user) return res.sendStatus(401); - req.user = user; - return next(); - }) - .catch(function(err) { - return next(err); - }); - }); -} - -/** - * Checks if the module meets the requirements - */ -function hasModule(modules, roles) { - return compose() - .use(function(req, res, next) { - return User - .findById(req.user.id) - .then(function(user) { - var bulkModule = []; - modules.forEach(function(element) { - bulkModule.push(user.hasModule(element)); - }); - return Promise.all(bulkModule); - }) - .then(function(hasModuleArr) { - var hasModule = (_.reduce(hasModuleArr, function(total, n) { - return total || n; - })); - if (_.includes(roles, req.user.role) || hasModule) { - return next(); - } else { - res.sendStatus(403); - } - }) - .catch(function(err) { - return next(err); - }); - }); -} - -/** - * Checks if the user role meets the minimum requirements of the route - */ -function hasRole(roleRequired) { - if (!roleRequired) throw new Error('Required role needs to be set'); - - return compose() - .use(isAuthenticated()) - .use(function meetsRequirements(req, res, next) { - if (config.userRoles.indexOf(req.user.role) >= config.userRoles.indexOf(roleRequired)) { - return next(); - } else { - return res.sendStatus(403); - } - }); -} - -/** - * Returns a jwt token signed by the app secret - */ -function signToken(id, role, remember) { - var expiresIn = 60 * 24 * 365 * 5; //If remember, it expires in 5 years - if (!remember) - expiresIn = "1d"; //Expire in one day - return jwt.sign({ - id: id - }, config.session.secret, { - expiresIn: expiresIn - }); -} - -/** - * Set token cookie directly for oAuth strategies - */ -function setTokenCookie(req, res) { - if (!req.user) return res.json(404, { - message: 'Something went wrong, please try again.' - }); - var token = signToken(req.user.id, req.user.role); - res.cookie('token', JSON.stringify(token)); - res.redirect('/'); -} - -exports.isAuthenticated = isAuthenticated; -exports.hasRole = hasRole; -exports.hasModule = hasModule; -exports.signToken = signToken; -exports.setTokenCookie = setTokenCookie; +var _0x16cb=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6A\x73\x6F\x6E\x77\x65\x62\x74\x6F\x6B\x65\x6E","\x65\x78\x70\x72\x65\x73\x73\x2D\x6A\x77\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4C\x69\x73\x74","\x73\x65\x63\x72\x65\x74","\x73\x65\x73\x73\x69\x6F\x6E","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x63\x61\x74\x63\x68","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x75\x73\x65\x72","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65","\x71\x75\x65\x72\x79","\x61\x63\x63\x65\x73\x73\x5F\x74\x6F\x6B\x65\x6E","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x61\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x68\x65\x61\x64\x65\x72\x73","\x42\x65\x61\x72\x65\x72\x20","\x42\x61\x73\x69\x63","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x20","\x73\x70\x6C\x69\x74","\x61\x73\x63\x69\x69","\x62\x61\x73\x65\x36\x34","\x3A","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73\x2E","\x66\x69\x6E\x64\x4F\x6E\x65","\x72\x65\x64\x75\x63\x65","\x72\x6F\x6C\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x68\x61\x73\x4D\x6F\x64\x75\x6C\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x52\x65\x71\x75\x69\x72\x65\x64\x20\x72\x6F\x6C\x65\x20\x6E\x65\x65\x64\x73\x20\x74\x6F\x20\x62\x65\x20\x73\x65\x74","\x69\x6E\x64\x65\x78\x4F\x66","\x75\x73\x65\x72\x52\x6F\x6C\x65\x73","\x31\x64","\x73\x69\x67\x6E","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x77\x65\x6E\x74\x20\x77\x72\x6F\x6E\x67\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x2E","\x6A\x73\x6F\x6E","\x74\x6F\x6B\x65\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x63\x6F\x6F\x6B\x69\x65","\x2F","\x72\x65\x64\x69\x72\x65\x63\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x68\x61\x73\x52\x6F\x6C\x65","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65"];_0x16cb[0];var passport=require(_0x16cb[1]);var config=require(_0x16cb[2]);var jwt=require(_0x16cb[3]);var expressJwt=require(_0x16cb[4]);var compose=require(_0x16cb[5]);var User=require(_0x16cb[7])[_0x16cb[6]];var List=require(_0x16cb[7])[_0x16cb[8]];var validateJwt=expressJwt({secret:config[_0x16cb[10]][_0x16cb[9]]});var Promise=require(_0x16cb[11]);var _=require(_0x16cb[12]);function isAuthenticated(){return compose()[_0x16cb[19]](function(_0x1b79xc,_0x1b79xd,_0x1b79xe){if(_0x1b79xc[_0x16cb[20]]&& _0x1b79xc[_0x16cb[20]][_0x16cb[22]](_0x16cb[21])){_0x1b79xc[_0x16cb[24]][_0x16cb[23]]= _0x16cb[25]+ _0x1b79xc[_0x16cb[20]][_0x16cb[21]]};if(_0x1b79xc[_0x16cb[24]]&& _0x1b79xc[_0x16cb[24]][_0x16cb[23]]&& _[_0x16cb[27]](_0x1b79xc[_0x16cb[24]][_0x16cb[23]],_0x16cb[26])){var _0x1b79x11=_[_0x16cb[29]](_0x1b79xc[_0x16cb[24]][_0x16cb[23]],_0x16cb[28]);var _0x1b79x12= new Buffer(_0x1b79x11[1],_0x16cb[31]).toString(_0x16cb[30]);var _0x1b79x13=_[_0x16cb[29]](_0x1b79x12,_0x16cb[32])[0];var _0x1b79x14=_[_0x16cb[29]](_0x1b79x12,_0x16cb[32])[1];return User[_0x16cb[35]]({where:{name:_0x1b79x13}})[_0x16cb[16]](function(_0x1b79x10){if(!_0x1b79x10|| !_0x1b79x10[_0x16cb[33]](_0x1b79x14)){_0x1b79xe( new Error(_0x16cb[34]))};_0x1b79xc[_0x16cb[15]]= {id:_0x1b79x10[_0x16cb[17]]};_0x1b79xe()})}else {validateJwt(_0x1b79xc,_0x1b79xd,_0x1b79xe)}})[_0x16cb[19]](function(_0x1b79xc,_0x1b79xd,_0x1b79xe){User[_0x16cb[18]](_0x1b79xc[_0x16cb[15]][_0x16cb[17]],{include:[{model:List}]})[_0x16cb[16]](function(_0x1b79x10){if(!_0x1b79x10){return _0x1b79xd[_0x16cb[14]](401)};_0x1b79xc[_0x16cb[15]]= _0x1b79x10;return _0x1b79xe()})[_0x16cb[13]](function(_0x1b79xf){return _0x1b79xe(_0x1b79xf)})})}function hasModule(_0x1b79x16,_0x1b79x17){return compose()[_0x16cb[19]](function(_0x1b79xc,_0x1b79xd,_0x1b79xe){return User[_0x16cb[18]](_0x1b79xc[_0x16cb[15]][_0x16cb[17]])[_0x16cb[16]](function(_0x1b79x10){var _0x1b79x1b=[];_0x1b79x16[_0x16cb[41]](function(_0x1b79x1c){_0x1b79x1b[_0x16cb[40]](_0x1b79x10[_0x16cb[39]](_0x1b79x1c))});return Promise[_0x16cb[42]](_0x1b79x1b)})[_0x16cb[16]](function(_0x1b79x18){var hasModule=(_[_0x16cb[36]](_0x1b79x18,function(_0x1b79x19,_0x1b79x1a){return _0x1b79x19|| _0x1b79x1a}));if(_[_0x16cb[38]](_0x1b79x17,_0x1b79xc[_0x16cb[15]][_0x16cb[37]])|| hasModule){return _0x1b79xe()}else {_0x1b79xd[_0x16cb[14]](403)}})[_0x16cb[13]](function(_0x1b79xf){return _0x1b79xe(_0x1b79xf)})})}function hasRole(_0x1b79x1e){if(!_0x1b79x1e){throw new Error(_0x16cb[43])};return compose()[_0x16cb[19]](isAuthenticated())[_0x16cb[19]](function _0x1b79x1f(_0x1b79xc,_0x1b79xd,_0x1b79xe){if(config[_0x16cb[45]][_0x16cb[44]](_0x1b79xc[_0x16cb[15]][_0x16cb[37]])>= config[_0x16cb[45]][_0x16cb[44]](_0x1b79x1e)){return _0x1b79xe()}else {return _0x1b79xd[_0x16cb[14]](403)}})}function signToken(_0x1b79x21,_0x1b79x22,_0x1b79x23){var _0x1b79x24=60* 24* 365* 5;if(!_0x1b79x23){_0x1b79x24= _0x16cb[46]};return jwt[_0x16cb[47]]({id:_0x1b79x21},config[_0x16cb[10]][_0x16cb[9]],{expiresIn:_0x1b79x24})}function setTokenCookie(_0x1b79xc,_0x1b79xd){if(!_0x1b79xc[_0x16cb[15]]){return _0x1b79xd[_0x16cb[49]](404,{message:_0x16cb[48]})};var _0x1b79x26=signToken(_0x1b79xc[_0x16cb[15]][_0x16cb[17]],_0x1b79xc[_0x16cb[15]][_0x16cb[37]]);_0x1b79xd[_0x16cb[52]](_0x16cb[50],JSON[_0x16cb[51]](_0x1b79x26));_0x1b79xd[_0x16cb[54]](_0x16cb[53])}exports[_0x16cb[55]]= isAuthenticated;exports[_0x16cb[56]]= hasRole;exports[_0x16cb[39]]= hasModule;exports[_0x16cb[57]]= signToken;exports[_0x16cb[58]]= setTokenCookie \ No newline at end of file diff --git a/server/auth/facebook/index.js b/server/auth/facebook/index.js index 4a6f878..0df4e56 100644 --- a/server/auth/facebook/index.js +++ b/server/auth/facebook/index.js @@ -1,21 +1 @@ -'use strict'; - -var express = require('express'); -var passport = require('passport'); -var auth = require('../auth.service'); - -var router = express.Router(); - -router - .get('/', passport.authenticate('facebook', { - scope: ['email', 'user_about_me'], - failureRedirect: '/signup', - session: false - })) - - .get('/callback', passport.authenticate('facebook', { - failureRedirect: '/signup', - session: false - }), auth.setTokenCookie); - -module.exports = router; \ No newline at end of file +var _0xb9a9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x2F\x73\x69\x67\x6E\x75\x70","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x67\x65\x74","\x2F","\x65\x6D\x61\x69\x6C","\x75\x73\x65\x72\x5F\x61\x62\x6F\x75\x74\x5F\x6D\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xb9a9[0];var express=require(_0xb9a9[1]);var passport=require(_0xb9a9[2]);var auth=require(_0xb9a9[3]);var router=express.Router();router[_0xb9a9[9]](_0xb9a9[10],passport[_0xb9a9[7]](_0xb9a9[5],{scope:[_0xb9a9[11],_0xb9a9[12]],failureRedirect:_0xb9a9[6],session:false}))[_0xb9a9[9]](_0xb9a9[4],passport[_0xb9a9[7]](_0xb9a9[5],{failureRedirect:_0xb9a9[6],session:false}),auth[_0xb9a9[8]]);module[_0xb9a9[13]]= router \ No newline at end of file diff --git a/server/auth/facebook/passport.js b/server/auth/facebook/passport.js index 90ae489..6dfcb14 100644 --- a/server/auth/facebook/passport.js +++ b/server/auth/facebook/passport.js @@ -1,37 +1 @@ -var passport = require('passport'); -var FacebookStrategy = require('passport-facebook').Strategy; - -exports.setup = function (User, config) { - passport.use(new FacebookStrategy({ - clientID: config.facebook.clientID, - clientSecret: config.facebook.clientSecret, - callbackURL: config.facebook.callbackURL - }, - function(accessToken, refreshToken, profile, done) { - User.findOne({ - 'facebook.id': profile.id - }, - function(err, user) { - if (err) { - return done(err); - } - if (!user) { - user = new User({ - name: profile.displayName, - email: profile.emails[0].value, - role: 'user', - username: profile.username, - provider: 'facebook', - facebook: profile._json - }); - user.save(function(err) { - if (err) done(err); - return done(err, user); - }); - } else { - return done(err, user); - } - }) - } - )); -}; \ No newline at end of file +var _0x6759=["\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x73\x65\x74\x75\x70","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x65\x6D\x61\x69\x6C\x73","\x75\x73\x65\x72","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x5F\x6A\x73\x6F\x6E","\x73\x61\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];var passport=require(_0x6759[0]);var FacebookStrategy=require(_0x6759[2])[_0x6759[1]];exports[_0x6759[3]]= function(_0xa046x3,_0xa046x4){passport[_0x6759[17]]( new FacebookStrategy({clientID:_0xa046x4[_0x6759[5]][_0x6759[4]],clientSecret:_0xa046x4[_0x6759[5]][_0x6759[6]],callbackURL:_0xa046x4[_0x6759[5]][_0x6759[7]]},function(_0xa046x5,_0xa046x6,_0xa046x7,_0xa046x8){_0xa046x3[_0x6759[16]]({"\x66\x61\x63\x65\x62\x6F\x6F\x6B\x2E\x69\x64":_0xa046x7[_0x6759[8]]},function(_0xa046x9,_0xa046xa){if(_0xa046x9){return _0xa046x8(_0xa046x9)};if(!_0xa046xa){_0xa046xa= new _0xa046x3({name:_0xa046x7[_0x6759[9]],email:_0xa046x7[_0x6759[11]][0][_0x6759[10]],role:_0x6759[12],username:_0xa046x7[_0x6759[13]],provider:_0x6759[5],facebook:_0xa046x7[_0x6759[14]]});_0xa046xa[_0x6759[15]](function(_0xa046x9){if(_0xa046x9){_0xa046x8(_0xa046x9)};return _0xa046x8(_0xa046x9,_0xa046xa)})}else {return _0xa046x8(_0xa046x9,_0xa046xa)}})}))} \ No newline at end of file diff --git a/server/auth/google/index.js b/server/auth/google/index.js index 9b1ce39..82bda9e 100644 --- a/server/auth/google/index.js +++ b/server/auth/google/index.js @@ -1,24 +1 @@ -'use strict'; - -var express = require('express'); -var passport = require('passport'); -var auth = require('../auth.service'); - -var router = express.Router(); - -router - .get('/', passport.authenticate('google', { - failureRedirect: '/signup', - scope: [ - 'https://www.googleapis.com/auth/userinfo.profile', - 'https://www.googleapis.com/auth/userinfo.email' - ], - session: false - })) - - .get('/callback', passport.authenticate('google', { - failureRedirect: '/signup', - session: false - }), auth.setTokenCookie); - -module.exports = router; \ No newline at end of file +var _0xb6f0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x67\x6F\x6F\x67\x6C\x65","\x2F\x73\x69\x67\x6E\x75\x70","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x67\x65\x74","\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D\x2F\x61\x75\x74\x68\x2F\x75\x73\x65\x72\x69\x6E\x66\x6F\x2E\x70\x72\x6F\x66\x69\x6C\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D\x2F\x61\x75\x74\x68\x2F\x75\x73\x65\x72\x69\x6E\x66\x6F\x2E\x65\x6D\x61\x69\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0xb6f0[0];var express=require(_0xb6f0[1]);var passport=require(_0xb6f0[2]);var auth=require(_0xb6f0[3]);var router=express.Router();router[_0xb6f0[9]](_0xb6f0[10],passport[_0xb6f0[7]](_0xb6f0[5],{failureRedirect:_0xb6f0[6],scope:[_0xb6f0[11],_0xb6f0[12]],session:false}))[_0xb6f0[9]](_0xb6f0[4],passport[_0xb6f0[7]](_0xb6f0[5],{failureRedirect:_0xb6f0[6],session:false}),auth[_0xb6f0[8]]);module[_0xb6f0[13]]= router \ No newline at end of file diff --git a/server/auth/google/passport.js b/server/auth/google/passport.js index d304e8a..a536d86 100644 --- a/server/auth/google/passport.js +++ b/server/auth/google/passport.js @@ -1,33 +1 @@ -var passport = require('passport'); -var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy; - -exports.setup = function (User, config) { - passport.use(new GoogleStrategy({ - clientID: config.google.clientID, - clientSecret: config.google.clientSecret, - callbackURL: config.google.callbackURL - }, - function(accessToken, refreshToken, profile, done) { - User.findOne({ - 'google.id': profile.id - }, function(err, user) { - if (!user) { - user = new User({ - name: profile.displayName, - email: profile.emails[0].value, - role: 'user', - username: profile.username, - provider: 'google', - google: profile._json - }); - user.save(function(err) { - if (err) done(err); - return done(err, user); - }); - } else { - return done(err, user); - } - }); - } - )); -}; +var _0x4578=["\x70\x61\x73\x73\x70\x6F\x72\x74","\x4F\x41\x75\x74\x68\x32\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x67\x6F\x6F\x67\x6C\x65\x2D\x6F\x61\x75\x74\x68","\x73\x65\x74\x75\x70","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x67\x6F\x6F\x67\x6C\x65","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x4E\x61\x6D\x65","\x76\x61\x6C\x75\x65","\x65\x6D\x61\x69\x6C\x73","\x75\x73\x65\x72","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x5F\x6A\x73\x6F\x6E","\x73\x61\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];var passport=require(_0x4578[0]);var GoogleStrategy=require(_0x4578[2])[_0x4578[1]];exports[_0x4578[3]]= function(_0x7af9x3,_0x7af9x4){passport[_0x4578[17]]( new GoogleStrategy({clientID:_0x7af9x4[_0x4578[5]][_0x4578[4]],clientSecret:_0x7af9x4[_0x4578[5]][_0x4578[6]],callbackURL:_0x7af9x4[_0x4578[5]][_0x4578[7]]},function(_0x7af9x5,_0x7af9x6,_0x7af9x7,_0x7af9x8){_0x7af9x3[_0x4578[16]]({"\x67\x6F\x6F\x67\x6C\x65\x2E\x69\x64":_0x7af9x7[_0x4578[8]]},function(_0x7af9x9,_0x7af9xa){if(!_0x7af9xa){_0x7af9xa= new _0x7af9x3({name:_0x7af9x7[_0x4578[9]],email:_0x7af9x7[_0x4578[11]][0][_0x4578[10]],role:_0x4578[12],username:_0x7af9x7[_0x4578[13]],provider:_0x4578[5],google:_0x7af9x7[_0x4578[14]]});_0x7af9xa[_0x4578[15]](function(_0x7af9x9){if(_0x7af9x9){_0x7af9x8(_0x7af9x9)};return _0x7af9x8(_0x7af9x9,_0x7af9xa)})}else {return _0x7af9x8(_0x7af9x9,_0x7af9xa)}})}))} \ No newline at end of file diff --git a/server/auth/index.js b/server/auth/index.js index 42c323f..be4e1cd 100644 --- a/server/auth/index.js +++ b/server/auth/index.js @@ -1,22 +1 @@ -'use strict'; - -var express = require('express'); -var passport = require('passport'); -var config = require('../config/environment'); -var User = require('../models').User; - - -// Passport Configuration -require('./local/passport').setup(User, config); -require('./facebook/passport').setup(User, config); -require('./google/passport').setup(User, config); -require('./twitter/passport').setup(User, config); - -var router = express.Router(); - -router.use('/local', require('./local')); -router.use('/facebook', require('./facebook')); -router.use('/twitter', require('./twitter')); -router.use('/google', require('./google')); - -module.exports = router; +var _0xdc3e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x74\x75\x70","\x2E\x2F\x6C\x6F\x63\x61\x6C\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2F\x66\x61\x63\x65\x62\x6F\x6F\x6B\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2F\x67\x6F\x6F\x67\x6C\x65\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2F\x74\x77\x69\x74\x74\x65\x72\x2F\x70\x61\x73\x73\x70\x6F\x72\x74","\x2F\x6C\x6F\x63\x61\x6C","\x2E\x2F\x6C\x6F\x63\x61\x6C","\x75\x73\x65","\x2F\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x2E\x2F\x66\x61\x63\x65\x62\x6F\x6F\x6B","\x2F\x74\x77\x69\x74\x74\x65\x72","\x2E\x2F\x74\x77\x69\x74\x74\x65\x72","\x2F\x67\x6F\x6F\x67\x6C\x65","\x2E\x2F\x67\x6F\x6F\x67\x6C\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xdc3e[0];var express=require(_0xdc3e[1]);var passport=require(_0xdc3e[2]);var config=require(_0xdc3e[3]);var User=require(_0xdc3e[5])[_0xdc3e[4]];require(_0xdc3e[7])[_0xdc3e[6]](User,config);require(_0xdc3e[8])[_0xdc3e[6]](User,config);require(_0xdc3e[9])[_0xdc3e[6]](User,config);require(_0xdc3e[10])[_0xdc3e[6]](User,config);var router=express.Router();router[_0xdc3e[13]](_0xdc3e[11],require(_0xdc3e[12]));router[_0xdc3e[13]](_0xdc3e[14],require(_0xdc3e[15]));router[_0xdc3e[13]](_0xdc3e[16],require(_0xdc3e[17]));router[_0xdc3e[13]](_0xdc3e[18],require(_0xdc3e[19]));module[_0xdc3e[20]]= router \ No newline at end of file diff --git a/server/auth/local/index.js b/server/auth/local/index.js index 54f86ad..66e2d88 100644 --- a/server/auth/local/index.js +++ b/server/auth/local/index.js @@ -1,213 +1 @@ -'use strict'; - -var express = require('express'); -var passport = require('passport'); -var async = require('async'); -var Promise = require('bluebird'); -var nodemailer = require('nodemailer'); -var smtpTransport = require('nodemailer-smtp-transport'); -var crypto = require('crypto'); -var moment = require('moment'); - -var auth = require('../auth.service'); -var User = require('../../models').User; -var Action = require('../../models').Action; -var ReportMember = require('../../models').ReportMember; -var MailServerOut = require('../../models').MailServerOut; -var license = require('../../config/license/license.service'); - -var channels = ['voice', 'chat', 'mail', 'fax']; -var router = express.Router(); - -router.post('/', function(req, res, next) { - passport.authenticate('local-login', function(err, user, info) { - if (err) return res.status(401).json({ - message: err.message - }); - if (!user) return res.status(404).json(info || { - message: 'Something went wrong, please try again.' - }); - return Promise - .all([]) - .then(function() { - if (req.body.hasOwnProperty('queueLogin') && req.body.queueLogin === false) { - return; - } - return Action - .create({ - name: 'login', - data1: user.id, - data2: user.name, - UserId: user.id - }); - }) - .then(function() { - return res.json({ - role: user.role, - token: auth.signToken(user.id, user.role, req.body.remember || false), - userId: user.id - }); - }) - .catch(function(err) { - return next(err); - }); - - })(req, res, next) -}); - -router.post('/recover', function(req, res, next) { - var _token, _user, _server; - return User - .findOne({ - where: { - email: req.body.email - } - }) - .then(function(user) { - if (!user) { - throw new Error('Email not found in database!'); - } - _user = user; - return MailServerOut - .findOne({ - where: { - service: true - } - }); - }) - .then(function(mailServer) { - if (!mailServer) { - throw new Error('No SMTP service configured'); - } - _server = mailServer; - return Promise - .promisify(crypto.randomBytes)(20); - }) - .then(function(buffer) { - _token = buffer.toString('hex'); - _user.resetPasswordToken = _token; - _user.resetPasswordExpires = moment().add(1, 'hour'); - return _user.save(); - }) - .then(function() { - var smtp = nodemailer.createTransport(smtpTransport({ - host: _server.host, - port: _server.port, - secure: _server.ssl, - pool: true, - auth: { - user: _server.username, - pass: _server.password - } - })); - var mailOptions = { - to: _user.email, - from: _server.host, - subject: 'xCALLY Motion Password Reset', - text: 'You are receiving this because you (or someone else) have requested the reset of the password for your account.\n\n' + - 'Please click on the following link, or paste this into your browser to complete the process:\n\n' + - 'http://' + req.headers.host + '/reset/' + _token + '\n\n' + - 'The link will be valid for the next 60 minutes.' + - 'If you did not request this, please ignore this email and your password will remain unchanged.\n' - }; - return smtp - .sendMail(mailOptions); - }) - .then(function(info) { - res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err) - }); -}); - -router.post('/reset/:token', function(req, res, next) { - var _user, _server; - return User - .findOne({ - where: { - resetPasswordToken: req.params.token, - resetPasswordExpires: { - $gt: moment() - } - }, - }) - .then(function(user) { - if (!user) { - throw new Error('Password reset token is invalid or has expired'); - } - var newPass = String(req.body.password); - if (!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/.test(newPass))) { - throw new Error('Wrong password format!'); - } - user.password = newPass; - user.resetPasswordToken = null; - user.resetPasswordExpires = null; - return user.save(); - }) - .then(function(user) { - _user = user; - return MailServerOut - .findOne({ - where: { - service: true - } - }); - }) - .then(function(mailServer) { - if (!mailServer) { - throw new Error('No SMTP service configured'); - } - var smtp = nodemailer.createTransport(smtpTransport({ - host: mailServer.host, - port: mailServer.port, - secure: mailServer.ssl, - pool: true, - auth: { - user: mailServer.username, - pass: mailServer.password - } - })); - var mailOptions = { - to: _user.email, - from: mailServer.host, - subject: 'Your password has been changed', - text: 'Hello,\n\n' + - 'This is a confirmation that the password for your account ' + _user.email + ' has just been changed.\n' - }; - return smtp - .sendMail(mailOptions); - }) - .then(function(info) { - res.sendStatus(200); - }) - .catch(function(err) { - return handleError(res, err) - }); -}); - -router - .get('/logout', auth.isAuthenticated(), function(req, res, next) { - return Action - .create({ - name: 'logout', - data1: req.user.id, - data2: req.user.name, - UserId: req.user.id - }) - .then(function() { - req.logout(); - res.redirect('/'); - }) - .catch(function(err) { - return next(err); - }); - }); - -function handleError(res, err) { - return res.status(500).send({ - message: err.message - }); -} - -module.exports = router; +var _0xf11e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x61\x73\x79\x6E\x63","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72\x2D\x73\x6D\x74\x70\x2D\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x76\x6F\x69\x63\x65","\x63\x68\x61\x74","\x6D\x61\x69\x6C","\x66\x61\x78","\x2F","\x6C\x6F\x63\x61\x6C\x2D\x6C\x6F\x67\x69\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x73\x6F\x6E","\x73\x74\x61\x74\x75\x73","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x77\x65\x6E\x74\x20\x77\x72\x6F\x6E\x67\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x74\x72\x79\x20\x61\x67\x61\x69\x6E\x2E","\x63\x61\x74\x63\x68","\x72\x6F\x6C\x65","\x69\x64","\x72\x65\x6D\x65\x6D\x62\x65\x72","\x62\x6F\x64\x79","\x73\x69\x67\x6E\x54\x6F\x6B\x65\x6E","\x74\x68\x65\x6E","\x71\x75\x65\x75\x65\x4C\x6F\x67\x69\x6E","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x6C\x6F\x67\x69\x6E","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x61\x6C\x6C","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x6F\x73\x74","\x2F\x72\x65\x63\x6F\x76\x65\x72","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x73\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x6F\x72\x74","\x65\x6D\x61\x69\x6C","\x78\x43\x41\x4C\x4C\x59\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x52\x65\x73\x65\x74","\x59\x6F\x75\x20\x61\x72\x65\x20\x72\x65\x63\x65\x69\x76\x69\x6E\x67\x20\x74\x68\x69\x73\x20\x62\x65\x63\x61\x75\x73\x65\x20\x79\x6F\x75\x20\x28\x6F\x72\x20\x73\x6F\x6D\x65\x6F\x6E\x65\x20\x65\x6C\x73\x65\x29\x20\x68\x61\x76\x65\x20\x72\x65\x71\x75\x65\x73\x74\x65\x64\x20\x74\x68\x65\x20\x72\x65\x73\x65\x74\x20\x6F\x66\x20\x74\x68\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x20\x79\x6F\x75\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x2E\x0A\x0A","\x50\x6C\x65\x61\x73\x65\x20\x63\x6C\x69\x63\x6B\x20\x6F\x6E\x20\x74\x68\x65\x20\x66\x6F\x6C\x6C\x6F\x77\x69\x6E\x67\x20\x6C\x69\x6E\x6B\x2C\x20\x6F\x72\x20\x70\x61\x73\x74\x65\x20\x74\x68\x69\x73\x20\x69\x6E\x74\x6F\x20\x79\x6F\x75\x72\x20\x62\x72\x6F\x77\x73\x65\x72\x20\x74\x6F\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x74\x68\x65\x20\x70\x72\x6F\x63\x65\x73\x73\x3A\x0A\x0A","\x68\x74\x74\x70\x3A\x2F\x2F","\x68\x65\x61\x64\x65\x72\x73","\x2F\x72\x65\x73\x65\x74\x2F","\x0A\x0A","\x54\x68\x65\x20\x6C\x69\x6E\x6B\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x76\x61\x6C\x69\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x6E\x65\x78\x74\x20\x36\x30\x20\x6D\x69\x6E\x75\x74\x65\x73\x2E","\x49\x66\x20\x79\x6F\x75\x20\x64\x69\x64\x20\x6E\x6F\x74\x20\x72\x65\x71\x75\x65\x73\x74\x20\x74\x68\x69\x73\x2C\x20\x70\x6C\x65\x61\x73\x65\x20\x69\x67\x6E\x6F\x72\x65\x20\x74\x68\x69\x73\x20\x65\x6D\x61\x69\x6C\x20\x61\x6E\x64\x20\x79\x6F\x75\x72\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x72\x65\x6D\x61\x69\x6E\x20\x75\x6E\x63\x68\x61\x6E\x67\x65\x64\x2E\x0A","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x68\x65\x78","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64\x54\x6F\x6B\x65\x6E","\x72\x65\x73\x65\x74\x50\x61\x73\x73\x77\x6F\x72\x64\x45\x78\x70\x69\x72\x65\x73","\x68\x6F\x75\x72","\x61\x64\x64","\x73\x61\x76\x65","\x4E\x6F\x20\x53\x4D\x54\x50\x20\x73\x65\x72\x76\x69\x63\x65\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x72\x61\x6E\x64\x6F\x6D\x42\x79\x74\x65\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x45\x6D\x61\x69\x6C\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x69\x6E\x20\x64\x61\x74\x61\x62\x61\x73\x65\x21","\x66\x69\x6E\x64\x4F\x6E\x65","\x2F\x72\x65\x73\x65\x74\x2F\x3A\x74\x6F\x6B\x65\x6E","\x59\x6F\x75\x72\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x63\x68\x61\x6E\x67\x65\x64","\x48\x65\x6C\x6C\x6F\x2C\x0A\x0A","\x54\x68\x69\x73\x20\x69\x73\x20\x61\x20\x63\x6F\x6E\x66\x69\x72\x6D\x61\x74\x69\x6F\x6E\x20\x74\x68\x61\x74\x20\x74\x68\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x20\x79\x6F\x75\x72\x20\x61\x63\x63\x6F\x75\x6E\x74\x20","\x20\x68\x61\x73\x20\x6A\x75\x73\x74\x20\x62\x65\x65\x6E\x20\x63\x68\x61\x6E\x67\x65\x64\x2E\x0A","\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x72\x65\x73\x65\x74\x20\x74\x6F\x6B\x65\x6E\x20\x69\x73\x20\x69\x6E\x76\x61\x6C\x69\x64\x20\x6F\x72\x20\x68\x61\x73\x20\x65\x78\x70\x69\x72\x65\x64","\x74\x65\x73\x74","\x57\x72\x6F\x6E\x67\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x66\x6F\x72\x6D\x61\x74\x21","\x74\x6F\x6B\x65\x6E","\x70\x61\x72\x61\x6D\x73","\x2F\x6C\x6F\x67\x6F\x75\x74","\x69\x73\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65\x64","\x6C\x6F\x67\x6F\x75\x74","\x72\x65\x64\x69\x72\x65\x63\x74","\x75\x73\x65\x72","\x67\x65\x74","\x73\x65\x6E\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xf11e[0];var express=require(_0xf11e[1]);var passport=require(_0xf11e[2]);var async=require(_0xf11e[3]);var Promise=require(_0xf11e[4]);var nodemailer=require(_0xf11e[5]);var smtpTransport=require(_0xf11e[6]);var crypto=require(_0xf11e[7]);var moment=require(_0xf11e[8]);var auth=require(_0xf11e[9]);var User=require(_0xf11e[11])[_0xf11e[10]];var Action=require(_0xf11e[11])[_0xf11e[12]];var ReportMember=require(_0xf11e[11])[_0xf11e[13]];var MailServerOut=require(_0xf11e[11])[_0xf11e[14]];var license=require(_0xf11e[15]);var channels=[_0xf11e[16],_0xf11e[17],_0xf11e[18],_0xf11e[19]];var router=express.Router();router[_0xf11e[40]](_0xf11e[20],function(_0xbc99x11,_0xbc99x12,_0xbc99x13){passport[_0xf11e[39]](_0xf11e[21],function(_0xbc99x14,_0xbc99x15,_0xbc99x16){if(_0xbc99x14){return _0xbc99x12[_0xf11e[24]](401)[_0xf11e[23]]({message:_0xbc99x14[_0xf11e[22]]})};if(!_0xbc99x15){return _0xbc99x12[_0xf11e[24]](404)[_0xf11e[23]](_0xbc99x16|| {message:_0xf11e[25]})};return Promise[_0xf11e[38]]([])[_0xf11e[32]](function(){if(_0xbc99x11[_0xf11e[30]][_0xf11e[34]](_0xf11e[33])&& _0xbc99x11[_0xf11e[30]][_0xf11e[33]]=== false){return};return Action[_0xf11e[37]]({name:_0xf11e[35],data1:_0xbc99x15[_0xf11e[28]],data2:_0xbc99x15[_0xf11e[36]],UserId:_0xbc99x15[_0xf11e[28]]})})[_0xf11e[32]](function(){return _0xbc99x12[_0xf11e[23]]({role:_0xbc99x15[_0xf11e[27]],token:auth[_0xf11e[31]](_0xbc99x15[_0xf11e[28]],_0xbc99x15[_0xf11e[27]],_0xbc99x11[_0xf11e[30]][_0xf11e[29]]|| false),userId:_0xbc99x15[_0xf11e[28]]})})[_0xf11e[26]](function(_0xbc99x14){return _0xbc99x13(_0xbc99x14)})})(_0xbc99x11,_0xbc99x12,_0xbc99x13)});router[_0xf11e[40]](_0xf11e[41],function(_0xbc99x11,_0xbc99x12,_0xbc99x13){var _0xbc99x17,_0xbc99x18,_0xbc99x19;return User[_0xf11e[70]]({where:{email:_0xbc99x11[_0xf11e[30]][_0xf11e[49]]}})[_0xf11e[32]](function(_0xbc99x15){if(!_0xbc99x15){throw new Error(_0xf11e[69])};_0xbc99x18= _0xbc99x15;return MailServerOut[_0xf11e[70]]({where:{service:true}})})[_0xf11e[32]](function(_0xbc99x1d){if(!_0xbc99x1d){throw new Error(_0xf11e[66])};_0xbc99x19= _0xbc99x1d;return Promise[_0xf11e[68]](crypto[_0xf11e[67]])(20)})[_0xf11e[32]](function(_0xbc99x1c){_0xbc99x17= _0xbc99x1c.toString(_0xf11e[60]);_0xbc99x18[_0xf11e[61]]= _0xbc99x17;_0xbc99x18[_0xf11e[62]]= moment()[_0xf11e[64]](1,_0xf11e[63]);return _0xbc99x18[_0xf11e[65]]()})[_0xf11e[32]](function(){var _0xbc99x1a=nodemailer[_0xf11e[48]](smtpTransport({host:_0xbc99x19[_0xf11e[43]],port:_0xbc99x19[_0xf11e[44]],secure:_0xbc99x19[_0xf11e[45]],pool:true,auth:{user:_0xbc99x19[_0xf11e[46]],pass:_0xbc99x19[_0xf11e[47]]}}));var _0xbc99x1b={to:_0xbc99x18[_0xf11e[49]],from:_0xbc99x19[_0xf11e[43]],subject:_0xf11e[50],text:_0xf11e[51]+ _0xf11e[52]+ _0xf11e[53]+ _0xbc99x11[_0xf11e[54]][_0xf11e[43]]+ _0xf11e[55]+ _0xbc99x17+ _0xf11e[56]+ _0xf11e[57]+ _0xf11e[58]};return _0xbc99x1a[_0xf11e[59]](_0xbc99x1b)})[_0xf11e[32]](function(_0xbc99x16){_0xbc99x12[_0xf11e[42]](200)})[_0xf11e[26]](function(_0xbc99x14){return handleError(_0xbc99x12,_0xbc99x14)})});router[_0xf11e[40]](_0xf11e[71],function(_0xbc99x11,_0xbc99x12,_0xbc99x13){var _0xbc99x18,_0xbc99x19;return User[_0xf11e[70]]({where:{resetPasswordToken:_0xbc99x11[_0xf11e[80]][_0xf11e[79]],resetPasswordExpires:{$gt:moment()}}})[_0xf11e[32]](function(_0xbc99x15){if(!_0xbc99x15){throw new Error(_0xf11e[76])};var _0xbc99x1e=String(_0xbc99x11[_0xf11e[30]][_0xf11e[47]]);if(!(/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[~!@#$%^&\-_=+\[\{\]\}.])[0-9a-zA-Z~!@#$%^&\-_=+\[\{\]\}.]{8,}$/[_0xf11e[77]](_0xbc99x1e))){throw new Error(_0xf11e[78])};_0xbc99x15[_0xf11e[47]]= _0xbc99x1e;_0xbc99x15[_0xf11e[61]]= null;_0xbc99x15[_0xf11e[62]]= null;return _0xbc99x15[_0xf11e[65]]()})[_0xf11e[32]](function(_0xbc99x15){_0xbc99x18= _0xbc99x15;return MailServerOut[_0xf11e[70]]({where:{service:true}})})[_0xf11e[32]](function(_0xbc99x1d){if(!_0xbc99x1d){throw new Error(_0xf11e[66])};var _0xbc99x1a=nodemailer[_0xf11e[48]](smtpTransport({host:_0xbc99x1d[_0xf11e[43]],port:_0xbc99x1d[_0xf11e[44]],secure:_0xbc99x1d[_0xf11e[45]],pool:true,auth:{user:_0xbc99x1d[_0xf11e[46]],pass:_0xbc99x1d[_0xf11e[47]]}}));var _0xbc99x1b={to:_0xbc99x18[_0xf11e[49]],from:_0xbc99x1d[_0xf11e[43]],subject:_0xf11e[72],text:_0xf11e[73]+ _0xf11e[74]+ _0xbc99x18[_0xf11e[49]]+ _0xf11e[75]};return _0xbc99x1a[_0xf11e[59]](_0xbc99x1b)})[_0xf11e[32]](function(_0xbc99x16){_0xbc99x12[_0xf11e[42]](200)})[_0xf11e[26]](function(_0xbc99x14){return handleError(_0xbc99x12,_0xbc99x14)})});router[_0xf11e[86]](_0xf11e[81],auth[_0xf11e[82]](),function(_0xbc99x11,_0xbc99x12,_0xbc99x13){return Action[_0xf11e[37]]({name:_0xf11e[83],data1:_0xbc99x11[_0xf11e[85]][_0xf11e[28]],data2:_0xbc99x11[_0xf11e[85]][_0xf11e[36]],UserId:_0xbc99x11[_0xf11e[85]][_0xf11e[28]]})[_0xf11e[32]](function(){_0xbc99x11[_0xf11e[83]]();_0xbc99x12[_0xf11e[84]](_0xf11e[20])})[_0xf11e[26]](function(_0xbc99x14){return _0xbc99x13(_0xbc99x14)})});function handleError(_0xbc99x12,_0xbc99x14){return _0xbc99x12[_0xf11e[24]](500)[_0xf11e[87]]({message:_0xbc99x14[_0xf11e[22]]})}module[_0xf11e[88]]= router \ No newline at end of file diff --git a/server/auth/local/local.ami.js b/server/auth/local/local.ami.js index bfb533d..a5f8b47 100644 --- a/server/auth/local/local.ami.js +++ b/server/auth/local/local.ami.js @@ -1,51 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var util = require('util'); -var amiController = require('../../api/ami/ami.ami'); - -exports.logout = function(userid, username, queuename, callback) { - var body = { - action: 'QueuePause', - queue: queuename, - interface: util.format('SIP/%s', username), - paused: false - }; - body.data = JSON.stringify(body); - body.UserId = userid; - - amiController.action(body, function(err, res) { - if (err) { - console.log(err); - } - var body = { - action: 'QueueRemove', - queue: queuename, - interface: util.format('SIP/%s', username) - }; - body.data = JSON.stringify(body); - body.UserId = userid; - - amiController.action(body, callback); - }); -} - -exports.login = function(userid, username, queuename, callback) { - - var body = { - action: 'QueueAdd', - queue: queuename, - interface: util.format('SIP/%s', username), - penalty: 0, - paused: false, - membername: username - }; - - body.data = JSON.stringify(body); - body.UserId = userid; - - amiController.action(body, callback); -} +var _0xfb55=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6D\x69\x2F\x61\x6D\x69\x2E\x61\x6D\x69","\x6C\x6F\x67\x6F\x75\x74","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x53\x49\x50\x2F\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x64\x61\x74\x61","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x55\x73\x65\x72\x49\x64","\x6C\x6F\x67","\x51\x75\x65\x75\x65\x52\x65\x6D\x6F\x76\x65","\x61\x63\x74\x69\x6F\x6E","\x6C\x6F\x67\x69\x6E","\x51\x75\x65\x75\x65\x41\x64\x64"];_0xfb55[0];var util=require(_0xfb55[1]);var amiController=require(_0xfb55[2]);exports[_0xfb55[3]]= function(_0x84c9x3,_0x84c9x4,_0x84c9x5,_0x84c9x6){var _0x84c9x7={action:_0xfb55[4],queue:_0x84c9x5,interface:util[_0xfb55[6]](_0xfb55[5],_0x84c9x4),paused:false};_0x84c9x7[_0xfb55[7]]= JSON[_0xfb55[8]](_0x84c9x7);_0x84c9x7[_0xfb55[9]]= _0x84c9x3;amiController[_0xfb55[12]](_0x84c9x7,function(_0x84c9x8,_0x84c9x9){if(_0x84c9x8){console[_0xfb55[10]](_0x84c9x8)};var _0x84c9x7={action:_0xfb55[11],queue:_0x84c9x5,interface:util[_0xfb55[6]](_0xfb55[5],_0x84c9x4)};_0x84c9x7[_0xfb55[7]]= JSON[_0xfb55[8]](_0x84c9x7);_0x84c9x7[_0xfb55[9]]= _0x84c9x3;amiController[_0xfb55[12]](_0x84c9x7,_0x84c9x6)})};exports[_0xfb55[13]]= function(_0x84c9x3,_0x84c9x4,_0x84c9x5,_0x84c9x6){var _0x84c9x7={action:_0xfb55[14],queue:_0x84c9x5,interface:util[_0xfb55[6]](_0xfb55[5],_0x84c9x4),penalty:0,paused:false,membername:_0x84c9x4};_0x84c9x7[_0xfb55[7]]= JSON[_0xfb55[8]](_0x84c9x7);_0x84c9x7[_0xfb55[9]]= _0x84c9x3;amiController[_0xfb55[12]](_0x84c9x7,_0x84c9x6)} \ No newline at end of file diff --git a/server/auth/local/passport.js b/server/auth/local/passport.js index ab09929..a9c251c 100644 --- a/server/auth/local/passport.js +++ b/server/auth/local/passport.js @@ -1,42 +1 @@ -var passport = require('passport'); -var LocalStrategy = require('passport-local').Strategy; -var license = require('../../config/license/license.service'); - -exports.setup = function(User, config) { - passport.use('local-login', new LocalStrategy({ - usernameField: 'name', - passwordField: 'password' // this is the virtual field on the model - }, - function(name, password, done) { - var _user; - - return User.findOne({ - where: { - name: name - } - }) - .then(function(user) { - _user = user; - - if (!_user || !user.authenticate(password)) { - throw new Error('Wrong credentials'); - } - - return _user; - }) - .then(license.isValidAgent()) - .then(function(valid) { - if (valid) { - return done(null, _user); - } else { - return done(null, false, { - message: 'Maximum login limit has been reached.' - }); - } - }) - .catch(function(err) { - return done(err, false, null); - }); - } - )); -}; +var _0xf2b9=["\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x6C\x6F\x63\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x73\x65\x74\x75\x70","\x6C\x6F\x63\x61\x6C\x2D\x6C\x6F\x67\x69\x6E","\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x61\x74\x63\x68","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x6C\x6F\x67\x69\x6E\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64\x2E","\x74\x68\x65\x6E","\x69\x73\x56\x61\x6C\x69\x64\x41\x67\x65\x6E\x74","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x57\x72\x6F\x6E\x67\x20\x63\x72\x65\x64\x65\x6E\x74\x69\x61\x6C\x73","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];var passport=require(_0xf2b9[0]);var LocalStrategy=require(_0xf2b9[2])[_0xf2b9[1]];var license=require(_0xf2b9[3]);exports[_0xf2b9[4]]= function(_0xb770x4,_0xb770x5){passport[_0xf2b9[15]](_0xf2b9[5], new LocalStrategy({usernameField:_0xf2b9[6],passwordField:_0xf2b9[7]},function(_0xb770x6,_0xb770x7,_0xb770x8){var _0xb770x9;return _0xb770x4[_0xf2b9[14]]({where:{name:_0xb770x6}})[_0xf2b9[10]](function(_0xb770xc){_0xb770x9= _0xb770xc;if(!_0xb770x9|| !_0xb770xc[_0xf2b9[12]](_0xb770x7)){throw new Error(_0xf2b9[13])};return _0xb770x9})[_0xf2b9[10]](license[_0xf2b9[11]]())[_0xf2b9[10]](function(_0xb770xb){if(_0xb770xb){return _0xb770x8(null,_0xb770x9)}else {return _0xb770x8(null,false,{message:_0xf2b9[9]})}})[_0xf2b9[8]](function(_0xb770xa){return _0xb770x8(_0xb770xa,false,null)})}))} \ No newline at end of file diff --git a/server/auth/twitter/index.js b/server/auth/twitter/index.js index 8360247..b0d66b2 100644 --- a/server/auth/twitter/index.js +++ b/server/auth/twitter/index.js @@ -1,20 +1 @@ -'use strict'; - -var express = require('express'); -var passport = require('passport'); -var auth = require('../auth.service'); - -var router = express.Router(); - -router - .get('/', passport.authenticate('twitter', { - failureRedirect: '/signup', - session: false - })) - - .get('/callback', passport.authenticate('twitter', { - failureRedirect: '/signup', - session: false - }), auth.setTokenCookie); - -module.exports = router; \ No newline at end of file +var _0x59be=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x70\x61\x73\x73\x70\x6F\x72\x74","\x2E\x2E\x2F\x61\x75\x74\x68\x2E\x73\x65\x72\x76\x69\x63\x65","\x2F\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x74\x77\x69\x74\x74\x65\x72","\x2F\x73\x69\x67\x6E\x75\x70","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x73\x65\x74\x54\x6F\x6B\x65\x6E\x43\x6F\x6F\x6B\x69\x65","\x67\x65\x74","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0x59be[0];var express=require(_0x59be[1]);var passport=require(_0x59be[2]);var auth=require(_0x59be[3]);var router=express.Router();router[_0x59be[9]](_0x59be[10],passport[_0x59be[7]](_0x59be[5],{failureRedirect:_0x59be[6],session:false}))[_0x59be[9]](_0x59be[4],passport[_0x59be[7]](_0x59be[5],{failureRedirect:_0x59be[6],session:false}),auth[_0x59be[8]]);module[_0x59be[11]]= router \ No newline at end of file diff --git a/server/auth/twitter/passport.js b/server/auth/twitter/passport.js index a2eb4a5..b080b89 100644 --- a/server/auth/twitter/passport.js +++ b/server/auth/twitter/passport.js @@ -1,35 +1 @@ -exports.setup = function (User, config) { - var passport = require('passport'); - var TwitterStrategy = require('passport-twitter').Strategy; - - passport.use(new TwitterStrategy({ - consumerKey: config.twitter.clientID, - consumerSecret: config.twitter.clientSecret, - callbackURL: config.twitter.callbackURL - }, - function(token, tokenSecret, profile, done) { - User.findOne({ - 'twitter.id_str': profile.id - }, function(err, user) { - if (err) { - return done(err); - } - if (!user) { - user = new User({ - name: profile.displayName, - username: profile.username, - role: 'user', - provider: 'twitter', - twitter: profile._json - }); - user.save(function(err) { - if (err) return done(err); - return done(err, user); - }); - } else { - return done(err, user); - } - }); - } - )); -}; \ No newline at end of file +var _0x9fac=["\x73\x65\x74\x75\x70","\x70\x61\x73\x73\x70\x6F\x72\x74","\x53\x74\x72\x61\x74\x65\x67\x79","\x70\x61\x73\x73\x70\x6F\x72\x74\x2D\x74\x77\x69\x74\x74\x65\x72","\x63\x6C\x69\x65\x6E\x74\x49\x44","\x74\x77\x69\x74\x74\x65\x72","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x63\x61\x6C\x6C\x62\x61\x63\x6B\x55\x52\x4C","\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x4E\x61\x6D\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x75\x73\x65\x72","\x5F\x6A\x73\x6F\x6E","\x73\x61\x76\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x73\x65"];exports[_0x9fac[0]]= function(_0x2f05x1,_0x2f05x2){var _0x2f05x3=require(_0x9fac[1]);var _0x2f05x4=require(_0x9fac[3])[_0x9fac[2]];_0x2f05x3[_0x9fac[15]]( new _0x2f05x4({consumerKey:_0x2f05x2[_0x9fac[5]][_0x9fac[4]],consumerSecret:_0x2f05x2[_0x9fac[5]][_0x9fac[6]],callbackURL:_0x2f05x2[_0x9fac[5]][_0x9fac[7]]},function(_0x2f05x5,_0x2f05x6,_0x2f05x7,_0x2f05x8){_0x2f05x1[_0x9fac[14]]({"\x74\x77\x69\x74\x74\x65\x72\x2E\x69\x64\x5F\x73\x74\x72":_0x2f05x7[_0x9fac[8]]},function(_0x2f05x9,_0x2f05xa){if(_0x2f05x9){return _0x2f05x8(_0x2f05x9)};if(!_0x2f05xa){_0x2f05xa= new _0x2f05x1({name:_0x2f05x7[_0x9fac[9]],username:_0x2f05x7[_0x9fac[10]],role:_0x9fac[11],provider:_0x9fac[5],twitter:_0x2f05x7[_0x9fac[12]]});_0x2f05xa[_0x9fac[13]](function(_0x2f05x9){if(_0x2f05x9){return _0x2f05x8(_0x2f05x9)};return _0x2f05x8(_0x2f05x9,_0x2f05xa)})}else {return _0x2f05x8(_0x2f05x9,_0x2f05xa)}})}))} \ No newline at end of file diff --git a/server/config/agi/agi.js b/server/config/agi/agi.js index 589efd2..c9257e8 100644 --- a/server/config/agi/agi.js +++ b/server/config/agi/agi.js @@ -1,1959 +1 @@ -'use strict'; - -var _ = require('lodash'); - -var agi = require('agi'); -var util = require('util'); -var moment = require('moment'); -var xml = require('xml2js'); -var wait = require('wait.for'); -var sr = require('simple-random'); -var path = require('path'); -var config = require('../environment'); -var sh = require('shelljs'); -var Promise = require('bluebird'); -var rp = require('request-promise'); -const googleTTS = require('google-tts-api'); -const fs = require('fs'); -const sox = require('sox'); -const request = require('request'); -const base64 = require('file-base64'); - -var db = require("odbc")(); - -var SquareProject = require('../../models').SquareProject; -var Variable = require('../../models').Variable; -var SquareOdbc = require('../../models').SquareOdbc; -var Setting = require('../../models').Setting; -var User = require('../../models').User; -var VoiceQueue = require('../../models').VoiceQueue; -var Interval = require('../../models').Interval; -var Sound = require('../../models').Sound; -var SquareRecording = require('../../models').SquareRecording; -var SmsAccount = require('../../models').SmsAccount; -var MailServerOut = require('../../models').MailServerOut; -var Mustache = require('mustache'); -var Template = require('../../models').Template; - -var collections = {}; -var weekDaysCollection = { - mon: 1, - tue: 2, - wed: 3, - thu: 4, - fri: 5, - sat: 6, - sun: 7 -}; -var monthsCollection = { - jan: 1, - feb: 2, - mar: 3, - apr: 4, - may: 5, - jun: 6, - jul: 7, - aug: 8, - sep: 9, - oct: 10, - nov: 11, - dec: 12 -}; - -var methods = {}; - -process - .on('close', function(code) { - console.log(util.format('AGI SERVER EXITED WITH CODE %s, PROCESS ID: %s ', code, process.pid)); - }) - .on('error', function(err) { - console.error(err); - }); - -console.log(util.format('AGI SERVER STARTING, PROCESS ID: %s ', process.pid)); - -methods.answer = function(context, vertex, callback) { - console.log('--ANSWER BLOCK--'); - console.log('Answering the call...'); - context.send('ANSWER\n', function(err, res) { - callback(err, res); - }); -}; - -methods.custom_app = function(context, vertex, callback) { - console.log('--CUSTOM APP BLOCK--'); - console.log('Executing custom app "' + vertex.application + '"...'); - context.exec(vertex.application, vertex.options, function(err, res) { - if (callback) { - callback(err, res); - } - }); -}; - - -methods.dial = function(context, vertex, callback) { - console.log('--INTERNAL_DIAL BLOCK--'); - if (!collections.users) { - getUsers(false); - } - var sip = _.find(collections.users, { - id: parseInt(vertex.sip_id) - }); - console.log('Calling ' + util.format('SIP/%s', sip.name) + '...'); - var parameters = [util.format('SIP/%s', sip.name), vertex.timeout, vertex.opts, - vertex.url - ]; - context.exec('DIAL', parameters.join(','), - function(err, res) { - callback(err, res); - }); -}; - -methods.start = function(context, vertex, callback) { - console.log('--START BLOCK--'); - if (vertex.answer === 'yes') { - context.send('ANSWER\n', function(err, res) { - callback(err, res); - }); - } else { - callback(null, { - code: 200, - result: 1 - }); - } -}; - -methods.ext_dial = function(context, vertex, callback) { - console.log('--EXTERNAL_DIAL BLOCK--'); - console.log('Calling ' + util.format('SIP/%s', vertex.trunk_name) + '...'); - var parameters = [util.format('SIP/%s/%s', vertex.trunk_name, vertex.phone), - vertex.timeout, vertex.opts, vertex.url - ]; - context.exec('DIAL', parameters.join(','), - function(err, res) { - callback(err, res); - }); -}; - -methods.queue = function(context, vertex, callback) { - console.log('--QUEUE BLOCK--'); - - if (!collections.queues) { - getQueues(false); - } - var queue = _.find(collections.queues, { - name: vertex.queue_id - }); - var squareDetail = { - uniqueid: context.uniqueid, - node: vertex.label, - application: vertex.tag, - data: queue.name, - project_name: context.project_name, - callerid: context.callerid, - message: 'detail' - } - process.send(squareDetail); - getFilePath(vertex.file_id).then(function(announceOverride) { - var parameters = [queue.name, vertex.opts, vertex.url, - announceOverride, vertex.timeout, vertex.agi, vertex.macro, - vertex.gosub, '', vertex.position - ]; - console.log('Joining ' + queue.name + ' queue...'); - context.exec('QUEUE', parameters.join(','), function(err, res) { - callback(err, res); - }); - }) -}; - -methods.voicemail = function(context, vertex, callback) { - console.log('--VOICEMAIL BLOCK--'); - var parameters = [vertex.mailbox, vertex.opts]; - var squareDetail = { - uniqueid: context.uniqueid, - node: vertex.label, - application: vertex.tag, - data: parameters.join(',') || null, - project_name: context.project_name, - callerid: context.callerid, - message: 'detail' - } - process.send(squareDetail); - console.log('Starting voicemail recording...'); - context.exec('VOICEMAIL', parameters.join(','), function(err, res) { - callback(err, res); - }); -}; - -methods.callback = function(context, vertex, callback) { - console.log('--CALLBACK BLOCK--'); - var options = { - method: 'POST', - uri: 'http://localhost/api/rest/contact/insert', - body: { - id_list: parseInt(vertex.list_id), - name: vertex.name || '', - phones: vertex.phone.trim().split(','), - description: vertex.label || '', - planningtime: moment().add(vertex.delay || 5, 'minutes').format('YYYY-MM-DD HH:mm:ss') - }, - json: true // Automatically stringifies the body to JSON - }; - - rp(options) - .then(function(parsedBody) { - if (parsedBody.status > 0) { - console.log(parsedBody.response.RMI); - } else { - console.log(parsedBody.response.RMI.errors); - } - }) - .catch(function(err) { - console.error('TD problem with request:', err.message); - }) - .finally(function() { - console.log('TD finally'); - callback(null, { - code: 200, - result: 1 - }); - }); -}; - -methods.math = function(context, vertex, callback) { - console.log('--MATH BLOCK--'); - console.log('Calculating expression...'); - try { - var result = eval(vertex.operation); - console.log('Saving result in variable...'); - var varName = getVariableName(vertex.variable_id); - if (_.isArray(result)) { - result.forEach(function(elem, index) { - wait.for(setVariable, context, varName + '[' + index + ']', '"' + elem + '"'); - }); - } else { - wait.for(setVariable, context, varName, '"' + result + '"'); - } - } catch (err) { - console.log('Error evaluating expression'); - callback(null, { - code: 200, - result: 1 - }); - } - -} - -// methods.background = function(context, vertex, callback) { -// var parameters = [getFilePath(vertex.file_id), vertex.opts]; -// context.exec('BACKGROUND', parameters.join('|'), function(err, res) { -// callback(err, res); -// }); -// }; - -methods.playback = function(context, vertex, callback) { - console.log('--PLAYBACK BLOCK--'); - getFilePath(vertex.file_id).then(function(audiofile) { - // var audiofile = '/var/www/html/files/sounds/d0269ff87187df665ece75538e4cddfd'; - var parameters = [audiofile, vertex.opts]; - console.log('Executing playback...'); - context.exec('PLAYBACK', parameters.join(','), function(err, res) { - callback(err, res); - }); - }) -}; - -methods.menu = function(context, vertex, callback) { - console.log('--MENU BLOCK--'); - var res = {}; - console.log('There are ' + vertex.retry + ' retries'); - if (vertex.retry > 0) { - vertex.retry--; - getFilePath(vertex.file_id).then(function(announce) { - // var announce = '/var/www/html/files/sounds/b19642d2f71e9cfffbd783fcc79c7415'; - // console.log(announce); - console.log('Announcing and waiting for user entry...'); - context.send(util.format('GET DATA %s %s %s\n', announce, parseInt(vertex.response) * 1000, vertex.digit), - function(err, res) { - var squareDetail = { - uniqueid: context.uniqueid, - node: vertex.label, - application: vertex.tag, - data: res.result || null, - project_name: context.project_name, - callerid: context.callerid, - message: 'detail' - } - process.send(squareDetail); - res.result = res.result.replace('(timeout)', '').trim(); - if (res.result.length) { - if (res.result === '-1') { - callback(null, res); - } else { - res.data = res.result; - if (vertex.variable_id !== '-1') { - console.log('Saving user entry in a variable...'); - var varName = getVariableName(vertex.variable_id); - setVariable(context, varName, '"' + res.data + '"', function() { - callback(null, res); - }); - } else { - callback(null, res); - } - } - } else { - console.log('Menu timeout!'); - res = { - code: 200, - result: '0', - data: 't' - }; - callback(null, res); - } - }); - }); - } else { - console.log('Run out of retries!'); - res = { - code: 200, - result: '0', - data: '-' - }; - callback(null, res); - } -}; - -methods.saynumber = function(context, vertex, callback) { - console.log('--SAYNUMBER BLOCK--'); - console.log('Saying number...'); - context.send(util.format('SAY NUMBER %s "%s"\n', vertex.number, vertex.escape_digits), - function(err, res) { - callback(err, res); - }); -}; - -methods.sayphonetic = function(context, vertex, callback) { - console.log('--SAYPHONETIC BLOCK--'); - console.log('Saying phonetic...'); - context.send(util.format('SAY PHONETIC %s "%s"\n', vertex.text, vertex.escape_digits), - function(err, res) { - callback(err, res); - }); -}; - -// methods.tts = function(context, vertex, callback) { -// console.log('--GOOGLE_TTS BLOCK--'); -// var parameters = [path.join(config.root, 'server/config/agi_scripts', 'googletts.agi'), encodeURIComponent(vertex.text), vertex.google_tts_language]; -// // var parameters = ['/var/www/html/agisquare/agiscripts/googletts.agi', encodeURIComponent(vertex.text), vertex.google_tts_language]; -// console.log('Calling Google TTS API...'); -// context.exec('AGI', parameters.join(','), -// function(err, res) { -// callback(err, res); -// }); -// }; - -methods.tts = function(context, vertex, callback) { - console.log('--GOOGLE_TTS BLOCK--'); - googleTTS(vertex.text, vertex.google_tts_language, 1) - .then(function(url) { - // console.log('The google tts url is: ', url); - console.log('Calling Google TTS API...'); - saveAndPlayTTS(context, vertex, url, 'playback', callback); - }) - .catch(function(err) { - console.error('Google TTS error: ', err.message); - callback(err, { - code: 200, - result: '0' - }) - }); -}; - -function saveAndPlayTTS(context, vertex, url, asteriskFunction, callback) { - var item = { - _saveName: '', - _savePath: '', - _convertedPath: '' - }; - - var options = { - url: url, - }; - - item._saveName = sr({ - length: 6 - }); - - item._savePath = util.format("/tmp/%s.mp3", item._saveName); - var mp3File = fs.createWriteStream(item._savePath); - - // Make API request - request - .get(options) - .on('error', function(err) { - console.log('TTS request error:', err); - }) - .on('data', function(data) { - mp3File.write(data); - }) - .on('end', function() { - console.log('Got audio buffer!'); - mp3File.end(); - - console.log('Audio saved to ', item._savePath); - item._convertedPath = util.format("/tmp/%s.wav", item._saveName); - console.log('Setting original audio file access permissions!'); - fs.chmodSync(item._savePath, parseInt('0777', 8)); - console.log('Converting original audio file and saving in ', item._convertedPath); - var job = sox.transcode(item._savePath, item._convertedPath, { - sampleRate: 8000, - format: 'wav', - channelCount: 1, - bitRate: 192 * 1024, - compressionQuality: 5, - }); - - job.on('error', function(err) { - console.error('**********TTS audio Conversion Error: ', err); - deleteTempFile(item._savePath); - callback(err, { - code: 200, - result: '0' - }) - }); - - job.on('end', function() { - console.log("TTS audio conversion completed"); - console.log('Setting converted audio file access permissions!'); - fs.chmodSync(item._convertedPath, parseInt('0777', 8)); - switch (asteriskFunction) { - case 'playback': - console.log('Calling asterisk playback...'); - context.exec('PLAYBACK', util.format("/tmp/%s", item._saveName), function(err, res) { - if (err) { - console.log('Asterisk playback error: ', err); - } - console.log('Deleting temp audio files...'); - deleteTempFile(item._savePath); - deleteTempFile(item._convertedPath); - callback(err, { - code: 200, - result: '0' - }) - }); - break; - case 'stream': - console.log('Calling asterisk stream file...'); - context.send(util.format('STREAM FILE %s "%s"\n', util.format("/tmp/%s", item._saveName), vertex.intKey), function(err, res) { - if (err) { - console.log('Asterisk stream file error: ', err); - } - console.log('Deleting temp audio files...'); - deleteTempFile(item._savePath); - deleteTempFile(item._convertedPath); - callback(err, { - code: 200, - result: '0' - }) - }); - break; - default: - console.log('Calling asterisk playback...'); - context.exec('PLAYBACK', util.format("/tmp/%s", item._saveName), function(err, res) { - if (err) { - console.log('Asterisk playback error: ', err); - } - console.log('Deleting temp audio files...'); - deleteTempFile(item._savePath); - deleteTempFile(item._convertedPath); - callback(err, { - code: 200, - result: '0' - }) - }); - } - }); - job.start(); - }); -} - -function deleteTempFile(file) { - Promise - .promisify(fs.unlink)(file) - .then(function() { - console.log('Temp audio file ' + file + ' deleted!'); - }) - .catch(function(err) { - // console.log('Error deleting temp audio file: ', err); - }); -} - -// methods.ispeechtts = function(context, vertex, callback) { -// console.log('--ISPEECH_TTS BLOCK--'); -// // var parameters = [path.join(config.root, 'server/config/agi_scripts', 'ispeech-tts.agi'), encodeURIComponent(vertex.text), vertex.ispeech_tts_language, '', '', vertex.key]; -// var parameters = ['/var/www/html/agisquare/agiscripts/ispeech-tts.agi', encodeURIComponent(vertex.text), vertex.ispeech_tts_language, vertex.intKey, vertex.speed, vertex.key]; -// console.log('Calling iSpeech TTS API...'); -// context.exec('AGI', parameters.join(','), -// function(err, res) { -// callback(err, res); -// }); -// }; - -methods.ispeechtts = function(context, vertex, callback) { - console.log('--ISPEECH_TTS BLOCK--'); - var url = util.format('https://api.ispeech.org/api/rest?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3', vertex.key, encodeURIComponent(vertex.text), vertex.ispeech_tts_language, - vertex.speed); - try { - console.log('The ispeech tts url is: ', url); - console.log('Calling iSpeech TTS API...'); - saveAndPlayTTS(context, vertex, url, 'stream', callback); - } catch (err) { - console.error('iSPeech TTS error: ', err); - callback(err, { - code: 200, - result: '0' - }); - } -}; - -methods.getdigits = function(context, vertex, callback) { - console.log('--GETDIGITS BLOCK--'); - var res = {}; - console.log('There are ' + vertex.retry + ' retries'); - if (vertex.retry > 0) { - vertex.retry--; - getFilePath(vertex.file_id).then(function(announce) { - // var announce = '/var/www/html/files/sounds/b19642d2f71e9cfffbd783fcc79c7415'; - console.log('Announcing and waiting for user entry...'); - context.send(util.format('GET DATA %s %s %s\n', announce, parseInt(vertex.response) * 1000, vertex.maxdigit), - function(err, res) { - var squareDetail = { - uniqueid: context.uniqueid, - node: vertex.label, - application: vertex.tag, - data: res.result || null, - project_name: context.project_name, - callerid: context.callerid, - message: 'detail' - } - process.send(squareDetail); - res.result = res.result.replace('(timeout)', '').trim(); - if (res.result.length >= parseInt(vertex.mindigit)) { - if (res.result !== '-1') { - console.log('There is a result, is over the minimum length and not due to an hangup!'); - if (vertex.variable_id !== '-1') { - console.log('Saving user entry in a variable...'); - var varName = getVariableName(vertex.variable_id); - setVariable(context, varName, '"' + res.result + '"', function() { - res = { - code: 200, - result: '0', - data: 'x' - }; - callback(null, res); - }); - } else { - console.log('Variable not found, unable to save the result!'); - res = { - code: 200, - result: '0', - data: 'i' - }; - callback(null, res); - } - } else { - console.log('Channel hangup!'); - res = { - code: 500, - result: '-1' - }; - callback(null, res); - } - } else { - console.log('No entry or not long enough!'); - res = { - code: 200, - result: '0', - data: 'i' - }; - callback(null, res); - } - }); - }) - } else { - console.log('Run out of retries!'); - res = { - code: 500, - result: '-1' - }; - callback(null, res); - } -}; - -methods.getsecretdigits = function(context, vertex, callback) { - console.log('--GETSECRETDIGITS BLOCK--'); - var res = {}; - console.log('There are ' + vertex.retry + ' retries'); - if (vertex.retry > 0) { - vertex.retry--; - getFilePath(vertex.file_id).then(function(announce) { - // var announce = '/var/www/html/files/sounds/b19642d2f71e9cfffbd783fcc79c7415'; - console.log('Announcing and waiting for user entry...'); - context.send(util.format('GET DATA %s %s %s\n', announce, parseInt(vertex.response) * 1000, vertex.maxdigit), - function(err, res) { - var squareDetail = { - uniqueid: context.uniqueid, - node: vertex.label, - application: vertex.tag, - data: res.result || null, - project_name: context.project_name, - callerid: context.callerid, - message: 'detail' - } - res.result = res.result.replace('(timeout)', '').trim(); - if (res.result.length >= parseInt(vertex.mindigit)) { - if (res.result !== '-1') { - console.log('There is a result, is over the minimum length and not due to an hangup!'); - if (vertex.variable_id !== '-1') { - var stringArray = res.result.split(''); - var length = stringArray.length; - var i; - var limit = Number(vertex.hiddendigitsnum); - if (vertex.hiddendigitspos === 'first') { - for (i = 0; i < limit && i < length; i++) { - stringArray[i] = '*'; - } - } else { - for (i = length - 1; i >= 0 && limit > 0; i--, limit--) { - stringArray[i] = '*'; - } - } - squareDetail.data = stringArray.join(''); - process.send(squareDetail); - console.log('Saving user entry in a variable...'); - var varName = getVariableName(vertex.variable_id); - setVariable(context, varName, '"' + res.result + '"', function() { - res = { - code: 200, - result: '0', - data: 'x' - }; - callback(null, res); - }); - } else { - process.send(squareDetail); - console.log('Variable not found, unable to save the result!'); - res = { - code: 200, - result: '0' - }; - callback(null, res); - } - } else { - process.send(squareDetail); - console.log('Channel hangup!'); - res = { - code: 500, - result: '-1' - }; - callback(null, res); - } - } else { - process.send(squareDetail); - console.log('No entry or not long enough!'); - res = { - code: 200, - result: '0', - data: 'i' - }; - callback(null, res); - } - }); - }) - } else { - console.log('Run out of retries!'); - res = { - code: 500, - result: '-1' - }; - callback(null, res); - } -}; - -methods.record = function(context, vertex, callback) { - console.log('--RECORD BLOCK--'); - var saveName = sr({ - length: 4 - }); - console.log('Starting call recording...'); - context.send(util.format('RECORD FILE %s %s "%s" %s %s %s %s\n', path.join(config.root, 'server/files/recordings', context.uniqueid + '_' + saveName), vertex.recordingFormat || 'wav', vertex.escape_digits, vertex.timeout * 1000, null, true, null), - function( - err, res) { - if (res.code === 200 && res.result !== '-1') { - SquareRecording - .create({ - uniqueid: context.uniqueid, - callerid: context.callerid, - calleridname: context.calleridname, - context: context.context, - extension: context.extension, - priority: context.priority, - accountcode: context.accountcode, - dnid: context.dnid, - project_name: context.project_name, - saveName: context.uniqueid + '_' + saveName, - filename: vertex.file || null, - savePath: path.join(config.root, 'server/files/recordings', context.uniqueid + '_' + saveName + '.wav') - }) - .catch(function(err) { - console.log('Error saving ' + vertex.tag + ':' + vertex.label + ' block log', err); - }); - console.log('Saving recording filename in RECORDING_SAVENAME variable...'); - context.send(util.format('SET VARIABLE %s %s\n', 'RECORDING_SAVENAME', context.uniqueid + '_' + saveName), function(err, res) { - callback(err, res); - }); - } else { - callback(err, res); - } - }); -}; - -methods.gotoiftime = function(context, vertex, callback) { //single or multiple intervals - console.log('--GOTOIFTIME BLOCK--'); - var res; - var valid = 'false'; - var gotoIntervals; - if (!collections.intervals) { - getIntervals(false); - } - var interval = _.find(collections.intervals, { - id: parseInt(vertex.interval_id) - }); - if (!interval.IntervalId) { - gotoIntervals = _.filter(collections.intervals, { - IntervalId: parseInt(interval.id) - }); - } - if (gotoIntervals) { - console.log('Is a group of intervals!'); - if (gotoIntervals.length) { - console.log('There are ' + gotoIntervals.length + ' intervals!'); - var subInterval; - console.log('Checking if at least one interval is valid...'); - gotoIntervals.forEach(function(elem, index) { - subInterval = splitInterval(elem.interval); - if (isIntervalValid(subInterval)) { - console.log('Interval ' + index + ' is valid!'); - valid = 'true'; - } - }); - } else { - console.log('There are no sub intervals, so it will be always true!'); - valid = 'true'; - } - } else { - console.log('Is a single interval!'); - var splittedInterval = splitInterval(interval.interval); - if (isIntervalValid(splittedInterval)) { - console.log('The interval is valid!'); - valid = 'true'; - } - } - console.log('The final result for the intervals is "' + valid + '"!'); - res = { - code: 200, - result: '0', - data: valid - }; - callback(null, res); -}; - -methods.vswitch = function(context, vertex, callback) { - console.log('--VARIABLE_SWITCH BLOCK--'); - console.log('Getting the variable value and searching the right exit...'); - var varName = getVariableName(vertex.variable_id); - getVariable(context, varName, function(err, res) { - if (!res.data) { - res.data = '-'; - } - callback(null, res); - }); - -}; - -methods.goal = function(context, vertex, callback) { - var squareDetail = { - uniqueid: context.uniqueid, - node: vertex.label, - application: vertex.tag, - data: vertex.goalname || null, - project_name: context.project_name, - callerid: context.callerid, - message: 'detail' - } - process.send(squareDetail); - var res = { - code: 200, - result: '1' - }; - callback(null, res); -}; -methods.sendmail = function(context, vertex, callback) { - console.log('--sendMail BLOCK--'); - - var squareDetail = { - uniqueid: context.uniqueid, - node: vertex.label, - application: vertex.tag, - data: vertex.account_id, - project_name: context.project_name, - callerid: context.callerid, - message: 'detail' - } - process.send(squareDetail); - - var res; - - if (vertex.account_id !== '-1') { - var server = _.find(collections.mailServerOut, { - id: Number(vertex.account_id) - }); - if (server) { - var _message = { - from: [server.username], - to: vertex.to.split(","), - cc: vertex.cc ? vertex.cc.split(",") : [], - subject: vertex.subject, - html: vertex.text, - voiceSource: context.uniqueid, - auto: true, - message: 'createMail' - }; - if (vertex.template_id !== '-1') { - var template = _.find(collections.templates, { - id: Number(vertex.template_id) - }); - if (template) { - var msg = { - from: _message.from, - to: _message.to, - cc: _message.cc, - subject: _message.subject, - body: _message.html - }; - _message.subject = template.subject ? Mustache.render(template.subject, msg) : null; - _message.html = template.html ? Mustache.render(template.html, msg) : null; - process.send(_message); - res = { - code: 200, - result: '1' - }; - callback(null, res); - } else { - console.log('Error finding template'); - res = { - code: 200, - result: '1' - }; - callback(null, res); - } - } else { - - process.send(_message); - res = { - code: 200, - result: '1' - }; - callback(null, res); - } - - } else { - console.log(vertex.account_id ? 'Error finding mailAccount address' : 'Error finding general SMTP address'); - res = { - code: 200, - result: '1' - }; - callback(null, res); - } - } else { - console.log('The configured account is not valid'); - res = { - code: 200, - result: '1' - }; - callback(null, res); - } - -}; - -methods.sendsms = function(context, vertex, callback) { - console.log('--sendSMS BLOCK--'); - var squareDetail = { - uniqueid: context.uniqueid, - node: vertex.label, - application: vertex.tag, - data: vertex.account_id, - project_name: context.project_name, - callerid: context.callerid, - message: 'detail' - } - process.send(squareDetail); - - var _message = { - body: vertex.sms_text, - SmsAccountId: vertex.account_id, - source: context.uniqueid, - auto: true, - message: 'createSms' - } - var res; - if (vertex.account_id !== '-1') { - var server = _.find(collections.smsAccounts, { - id: Number(vertex.account_id) - }); - if (server) { - if (server.type === 'twilio') { - _message.from = /^[\+][0-9]+$/.test(server.phone) ? server.phone : '+' + server.phone; - _message.to = /^[\+][0-9]+$/.test(vertex.to) ? vertex.to : '+' + vertex.to; - } else { - _message.from = /^[\+][0-9]+$/.test(server.phone) ? server.phone.replace('+', '') : server.phone; - _message.to = /^[\+][0-9]+$/.test(vertex.to) ? vertex.to.replace('+', '') : vertex.to; - } - process.send(_message); - res = { - code: 200, - result: '1' - }; - callback(null, res); - } else { - console.log('Error finding SMS account'); - res = { - code: 200, - result: '1' - }; - callback(null, res); - } - } else { - console.log('The configured account is not valid'); - res = { - code: 200, - result: '1' - }; - callback(null, res); - } - -}; - -methods.system = function(context, vertex, callback) { - console.log('--SYSTEM BLOCK--'); - var squareDetail = { - uniqueid: context.uniqueid, - node: vertex.label, - application: vertex.tag, - data: _.trim(vertex.command) || null, - project_name: context.project_name, - callerid: context.callerid, - message: 'detail' - } - process.send(squareDetail); - console.log('Executing the system command...'); - sh.exec(_.trim(vertex.command), function(code, output) { - var formattedOutput = output.replace(/(\r\n|\n|\r)/gm, ""); - console.log('Program output:', formattedOutput); - console.log('Saving the output in a variable...'); - var varName = getVariableName(vertex.variable_id); - setVariable(context, varName, '"' + formattedOutput + '"', callback); - }); -}; - -methods.agi = function(context, vertex, callback) { - console.log('--AGI BLOCK--'); - console.log('Executing the AGI command...'); - context.exec('AGI', vertex.command, vertex.args, - function(err, res) { - callback(err, res); - }); -}; - -methods.subproject = function(context, vertex, callback) { - console.log('--SUBPROJECT BLOCK--'); - if (!collections.projects) { - getProjects(false); - } - var project = _.find(collections.projects, { - id: parseInt(vertex.project_id) - }); - console.log('Moving to project ""' + project.name + '"...'); - context.exec('AGI', util.format('"agi://127.0.0.1/square,%s"', project.name), - function(err, res) { - callback(err, res); - }); -}; - -// methods.ispeechasr = function(context, vertex, callback) { -// console.log('--ISPEECH_ASR BLOCK--'); -// // var parameters = ['/var/www/html/agisquare/agiscripts/ispeech-asr.agi', vertex.ispeech_asr_language, '', (vertex.model === '0' ? '' : vertex.model), '1', '#', '', vertex.key]; -// var parameters = [path.join(config.root, 'server/config/agi_scripts', 'ispeech-asr.agi'), vertex.ispeech_asr_language, '', (vertex.model === '0' ? '' : vertex.model), vertex.timeout, vertex.intKey, -// vertex.beep === 'BEEP' ? '' : vertex.beep, vertex.key -// ]; -// console.log('Calling Ispeech ASR API...'); -// context.exec('AGI', parameters.join(','), -// function(err, res) { -// callback(err, res); -// }); -// }; - -methods.ispeechasr = function(context, vertex, callback) { - console.log('--ISPEECH_ASR BLOCK--'); - wait.for(setVariable, context, 'utterance', '"-1"'); - wait.for(setVariable, context, 'status', '"-1"'); - wait.for(setVariable, context, 'confidence', '"-1"'); - var vars = wait.for(asr, context, vertex); - if (!_.isEmpty(vars)) { - console.log('Saving server response into variables...'); - _.forOwn(vars, function(value, key) { - wait.for(setVariable, context, key, '"' + value + '"'); - }); - } else { - console.log('Error: No response from the server!'); - wait.for(setVariable, context, 'ASR_ERROR', '"No response from the server!"'); - } -}; - -function asr(context, vertex, callback) { //wait.for creates automatically a callback that have to be called to exit from the called function - var item = { - _saveName: '', - _savePath: '', - _convertedPath: '' - }; - //reinitialize in case of wrong variables format passed from the function - var vars = {}; - - item._saveName = sr({ - length: 6 - }); - - item._savePath = util.format("/tmp/%s.wav", item._saveName); - // console.log('Temp file is ', item._saveName); - var recordParams = util.format('%s,%s,,', item._savePath, vertex.timeout ? vertex.timeout : ''); - if (vertex.beep && vertex.beep !== 'BEEP') { - recordParams += 'q'; - } - if (vertex.intKey && vertex.intKey !== '#') { - recordParams += 't'; - } - context.exec('RECORD', recordParams, function(err, res) { - if (err) { - console.log('Asterisk record file error: ', err); - callback(err, null); - } else { - console.log('Getting ASR url...'); - var url = util.format('https://api.ispeech.org/api/rest?apikey=%s&action=recognize&locale=%s', vertex.key, vertex.ispeech_asr_language); - if (vertex.model && vertex.model !== '0') { - url += util.format('&model=%s', encodeURIComponent(vertex.model)); - } else { - url += '&freeform=3'; - } - console.log('Reading temp ASR audio file...'); - Promise.promisify(fs.readFile)(item._savePath) - .then(function(result) { - console.log('Got audio file from filesystem, generating url...'); - var base64audio = new Buffer(result, 'binary').toString('base64'); - url += util.format('&content-type=audio/x-wav&audio=%s', base64audio); - var options = { - url: url - }; - console.log('Calling ASR server...'); - return rp(options); - }) - .then(function(asrResponse) { - console.log('Got response from the ASR server, elaborating response...'); - asrResponse = asrResponse.split('&'); - // console.log('The ASR response is ', asrResponse); - var property, error; - _.forEach(asrResponse, function(elem) { - property = elem.split('='); - if (property.length === 2) { - switch (property[0]) { - case 'text': - vars.utterance = property[1].replace(/\+/g, ' '); - break; - case 'result': - if (property[1] === 'success') { - vars.status = 0; - } - break; - case 'confidence': - vars.confidence = decodeURIComponent(property[1]); - break; - case 'message': - vars.ASR_ERROR = decodeURIComponent(property[1].replace(/\+/g, ' ')); - break; - default: - } - } - }); - }) - .catch(function(err) { - console.log('ASR request error: ', err); - }) - .finally(function() { - console.log('Deleting temp ASR file...'); - deleteTempFile(item._savePath); - callback(null, vars); - }); - } - }); -} - -methods.database = function(context, vertex, callback) { - console.log('--DATABASE BLOCK--'); - if (!collections.dbConnections) { - getDbConnections(false); - } - var connection = _.find(collections.dbConnections, { - id: parseInt(vertex.odbc_id) - }); - console.log('Trying to get ODBC connection...'); - var squareDetail = { - uniqueid: context.uniqueid, - node: vertex.label, - application: vertex.tag, - data: vertex.query || null, - project_name: context.project_name, - callerid: context.callerid, - message: 'detail' - } - process.send(squareDetail); - try { - db.openSync(connection.dsn); - var data = db.querySync(vertex.query); - db.closeSync(); - setVariablesMatrix(context, vertex, callback, data); - } catch (e) { - console.log(e.message); - wait.for(setVariable, context, 'ERROR', 'true'); - wait.for(setVariable, context, 'MESSAGE', '"' + e.message + '"'); - } -}; - -methods.gotoc = function(context, vertex, callback) { - console.log('--GOTO BLOCK--'); - console.log('Going to extension ' + vertex.extension + ' ...'); - context.exec('DIAL', util.format('Local/%s@%s', vertex.extension, vertex.context), - function(err, res) { - callback(err, res); - }); -}; - -methods.gotoif = function(context, vertex, callback) { - console.log('--GOTOIF BLOCK--'); - var res = { - code: 200, - result: '0' - }; - context.exec('NOOP', '"Condition: ' + vertex.condition + '"', - function(err, res) { - console.log('Evaluating condition...'); - try { - res.data = String(eval(vertex.condition) ? 'true' : 'false'); - } catch (err) { - console.log('Error evaluating condition, going into the false branch...'); - res.data = 'false'; - } - console.log('The result is ' + res.data); - callback(null, res); - }); -}; - -methods.hangup = function(context, vertex, callback) { - console.log('--HANGUP BLOCK--'); - console.log('Hangin up the call...'); - context.hangup(); -}; - -methods.noop = function(context, vertex, callback) { - console.log('--NOOP BLOCK--'); - var output = (vertex.output) ? '\"' + vertex.output + '\"' : '\"' + - vertex.label + '\"'; - console.log('NOOP value is ' + output); - context.exec('NOOP', output, - function(err, res) { - callback(err, res); - }); -}; - -methods.saydigits = function(context, vertex, callback) { - console.log('--SAYDIGITS BLOCK--'); - console.log('Saying digits...'); - context.send(util.format('SAY DIGITS %s "%s"\n', vertex.digits, vertex.escape_digits), - function(err, res) { - callback(err, res); - }); -}; - -methods.set = function(context, vertex, callback) { - console.log('--SET BLOCK--'); - console.log('Saving value in a variable...'); - var varName = getVariableName(vertex.variable_id); - wait.for(setVariable, context, varName, '"' + vertex.variable_value + '"'); -}; - -function getVertices(root) { - return _.reduce(root, function(result, edge, tag) { - - if (tag === 'mxcell') { - return result; - } - - if (_.isArray(edge)) { - _.forIn(edge, function(value, key) { - result[value.$.id] = value.$; - result[value.$.id].tag = tag; - }); - return result; - } - - result[edge.$.id] = edge.$; - result[edge.$.id].tag = tag; - return result; - - }, {}); -} - -function getTargetBySource(root, source, value, menu) { - return _.result(_.find(root.mxcell, function(edge) { - if (edge.$.edge && edge.$.source) { - if (edge.$.source === source) { - if (edge.$.value && edge.$.value !== value) { - if (menu) { - var values = edge.$.value.split(','); - if (_.includes(values, value)) { - return true; - } - } - return false; - } - return true; - } - } - return false; - }), '$.target'); -} - -// function replaceAllVariables(context, vertex, callback) { -// var obj = vertex; -// for (var key in obj) { -// var res = obj[key].match(/{+(.*?)}/gi); -// if (res) { -// console.log('res', res); -// res.forEach(function(variable, index) { -// console.log('variable', res[index].substring(1, res[index].length - 1)); -// var value = wait.for(getVariable, context, res[index].substring(1, res[index].length - 1)); -// console.log('value', value); -// if (value.data) { -// obj[key] = obj[key].replace(res[index], value.data); -// // console.log('Replace', res[index], string); -// } -// }) -// } -// } -// obj.replaced = true; -// return obj; -// } - -function recurReplace(text, context, start) { //the start parameter says that i'm at the first instance of the recursion, so I don' t have to check if the text is an asterisk variable cause I already have the wanted value - // if (start) { - // console.log('First call, the text arrived from function call is: ', text); - // } else { - // console.log('Recursive Call, the text arrived is: ', text); - // } - var a = 0, - r = {}, - i; - var count = 0; - for (i = 0; i < text.length; i++) { - if (text.charAt(i) === '{') { - if (count === 0) { - a = i; - } - count++; - } - if (text.charAt(i) === '}') { - count--; - if (count === 0) { - r[text.substring(a + 1, i)] = text.substring(a + 1, i); - } - } - } - if (Object.keys(r).length !== 0) { - // console.log('Extracted words are: ', r); - for (var key in r) { - // console.log('Current text element is: ', key); - r[key] = recurReplace(key, context); - // console.log('Replaced text is: ', r[key]); - } - for (var key2 in r) { - text = text.replace(new RegExp('{' + key2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") + '}', 'g'), r[key2]); - } - } - if (start) { - // console.log('Exiting recursive function!'); - return text; - } else { - // console.log('Returning single word value: ', text); - var value = wait.for(getVariable, context, text); - return value.data || '{' + text + '}'; - } -} - -function replaceAllVariables(context, vertex, callback) { - var obj = _.clone(vertex); - for (var key in obj) { - obj[key] = recurReplace(obj[key], context, true); - console.log('Text after variables replace: ', obj[key]); - } - return obj; -} - -function xstart(context) { - var root = context.root; - var vertices = context.vertices; - - if (root.start) { - if (!_.isArray(root.start)) { - var source = root.start.$.id; - var res = {}; - do { - try { - var vertex = replaceAllVariables(context, vertices[source]); - if (vertex) { - if (_.isFunction(methods[vertex.tag])) { - res = wait.for(methods[vertex.tag], context, vertex); - } else { - res = wait.for(methods.noop, context, vertex); - } - if (res.code === 200 && res.result !== '-1') { - if (vertex.tag === 'menu' || vertex.tag === 'getdigits' || vertex.tag === 'getsecretdigits') { - vertices[source].retry = vertex.retry; - } - var target = getTargetBySource(root, source, res.data, vertex.tag === 'menu'); - if (!target) { - if (vertex.tag === 'menu') { - if (vertex.retry > 0) { - target = getTargetBySource(root, source, 'i', true); - if (!target) { - target = source; - } - } else { - target = getTargetBySource(root, source, '-', true); - } - } - if ((vertex.tag === 'getdigits' || vertex.tag === 'getsecretdigits') && vertex.retry > 0) { - target = source; - } - if (vertex.tag === 'vswitch' && res.data !== '-') { // if I didn't find the target and I didn't fail to get the variable value I try to go to the minus branch - target = getTargetBySource(root, source, '-'); - } - } - source = target; - } else { - source = null; - } - } else { - source = null; - } - } catch (err) { - console.log(err); - } - } - while (source); - console.log('No target found, hangup!'); - context.hangup(); - } - } -} - - -function xfinally(context) { - var root = context.root; - var vertices = context.vertices; - - if (root.finally) { - if (!_.isArray(root.finally)) { - var source = root.finally.$.id; - var res = {}; - do { - try { - var vertex = vertices[source].replaced ? vertices[source] : replaceAllVariables(context, vertices[source]); - if (vertex) { - if (_.isFunction(methods[vertex.tag])) { - res = wait.for(methods[vertex.tag], context, vertex); - } else { - res = wait.for(methods.noop, context, vertex); - } - if (res.code === 200 && res.result !== '-1') { - var target = getTargetBySource(root, source, res.data, vertex.tag === 'menu'); - if (!target) { - if (vertex.tag === 'menu') { - if (vertex.retry > 0) { - target = getTargetBySource(root, source, 'i', true); - if (!target) { - target = source; - } - } else { - target = getTargetBySource(root, source, '-', true); - } - } - if (vertex.tag === 'getdigits' && vertex.retry > 0) { - target = source; - } - if (vertex.tag === 'vswitch' && res.data !== '-') { // if I didn't find the target and I didn't fail to get the variable value I try to go to the minus branch - target = getTargetBySource(root, source, '-'); - } - } - source = target; - } else { - source = null; - } - } else { - source = null; - } - } catch (err) { - console.log(err); - } - } while (source); - context.hangup(); - console.log('No target found, stopping "Finally" branch!'); - } - } - context.end(); -} - - -function main(context) { - - context.on('error', function(err) { - console.log('//Error:', err); - }); - - context.on('close', function() { - console.log('//Context close'); - }); - - context.on('hangup', function() { - if (context.finally) { - context.finally = false; - console.log('//Starting "Finally" branch!'); - wait.launchFiber(xfinally, context); - } else { - process.send({ - message: 'update', - uniqueid: context.uniqueid, - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - console.log('//Context Hangup'); - } - }); - - context.on('response', function(res) { - //console.log('Response:', res); - }); - - context.on('variables', function(vars) { - console.log(vars); - console.log('Received new call from: ' + vars.agi_callerid + - ' with uniqueid: ' + vars.agi_uniqueid); - var squareLog = { - network: vars.agi_network, - network_script: vars.agi_network_script, - request: vars.agi_request, - channel: vars.agi_channel, - language: vars.agi_language, - type: vars.agi_type, - uniqueid: vars.agi_uniqueid, - version: vars.agi_version, - callerid: vars.agi_callerid, - calleridname: vars.agi_calleridname, - callingpres: vars.agi_callingpres, - callingani2: vars.agi_callingani2, - callington: vars.agi_callington, - callingtns: vars.agi_callingtns, - dnid: vars.agi_dnid, - rdnis: vars.agi_rdnis, - context: vars.agi_context, - extension: vars.agi_extension, - priority: vars.agi_priority, - enhanced: vars.agi_enhanced, - accountcode: vars.agi_accountcode, - threadid: vars.agi_threadid, - project_name: vars.agi_arg_1, - joinAt: moment().format("YYYY-MM-DD HH:mm:ss"), - message: 'create' - }; - - process.send(squareLog); - - if (vars.agi_arg_1) { - SquareProject - .findOne({ - where: { - name: vars.agi_arg_1 - }, - attributes: ['id', 'production'] - }) - .then(function(project) { - if (project) { - if (project.production) { - xml.parseString(project.production, { - normalizeTags: true, - explicitArray: false - }, function(err, result) { - var root = result.mxgraphmodel.root; - if (root) { - context.root = root; - context.finally = true; - context.uniqueid = vars.agi_uniqueid; - context.callerid = vars.agi_callerid; - context.calleridname = vars.agi_calleridname; - context.context = vars.agi_context; - context.extension = vars.agi_extension; - context.priority = vars.agi_priority; - context.accountcode = vars.agi_accountcode; - context.dnid = vars.agi_dnid; - context.project_name = vars.agi_arg_1; - context.vertices = getVertices(root); - wait.launchFiber(xstart, context); - } else { - console.log('No root in project!'); - context.end(); - } - }); - } else { - console.log('No project published!'); - context.end(); - } - } else { - console.log('No project found!'); - context.end(); - } - }) - .catch(function(err) { - console.log('Error:', err); - context.end(); - }); - } else { - console.log('No project argument!'); - context.end(); - } - }); -} - -function splitInterval(interval) { - var finalInterval = {}; - var splittedInterval = interval.split(','); - var intValues; - splittedInterval.forEach(function(element, index) { - switch (index) { - case 0: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.t_from = moment(intValues[0], 'HH:mm'); - finalInterval.t_to = moment(intValues[1], 'HH:mm'); - } else { - finalInterval.t_from = null; - finalInterval.t_to = null; - } - break; - case 1: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.wd_from = weekDaysCollection[intValues[0]]; - finalInterval.wd_to = intValues[1] ? weekDaysCollection[intValues[1]] : null; - } else { - finalInterval.wd_from = null; - finalInterval.wd_to = null; - } - break; - case 2: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.md_from = intValues[0]; - finalInterval.md_to = intValues[1] ? intValues[1] : null; - } else { - finalInterval.md_from = null; - finalInterval.md_to = null; - } - break; - case 3: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.m_from = monthsCollection[intValues[0]]; - finalInterval.m_to = intValues[1] ? monthsCollection[intValues[1]] : null; - } else { - finalInterval.m_from = null; - finalInterval.m_to = null; - } - break; - default: - - } - - - }); - return finalInterval; -} - -function isIntervalValid(interval) { - var hour = moment().format("HH:mm"); - var day = moment().format("E"); - var monthDay = moment().format("D"); - var month = moment().format("M"); - console.log('Now: Hour: ', hour, ', Day: ', day, ', MonthDay: ', monthDay, ', Month: ', month); - console.log('Interval:'); - console.log(' Hours:', moment(interval.t_from, "HH:mm").format('HH:mm'), ' - ', moment(interval.t_to, "HH:mm").format('HH:mm')); - console.log(' weekday:', interval.wd_from, ' - ', interval.wd_to); - console.log(' monthday:', interval.md_from, ' - ', interval.md_to); - console.log(' month:', interval.m_from, ' - ', interval.m_to); - var tValid, wdValid, mdValid, mValid; - var monthsNumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; - var weekDaysNumbers = [1, 2, 3, 4, 5, 6, 7]; - var daysOfMonthsNumbers = []; - for (var i = 1; i <= 31; i++) { - daysOfMonthsNumbers.push(i); - } - tValid = (interval.t_from && interval.t_to) ? moment(hour, "HH:mm").isBetween(moment(interval.t_from, "HH:mm"), moment(interval.t_to, "HH:mm")) : true; - if (interval.wd_from) { - if (interval.wd_to) { - var validWeekdays = _.filter(weekDaysNumbers, function(elem) { - return (elem >= interval.wd_from) && (elem <= interval.wd_to); - }); - console.log('valid weekdays', validWeekdays); - wdValid = (validWeekdays.indexOf(parseInt(day)) !== -1) ? true : false; - } else { - wdValid = (parseInt(day) === interval.wd_from) ? true : false; - } - } else { - wdValid = true; - } - if (interval.md_from) { - if (interval.md_to) { - var validMonthsdays = _.filter(daysOfMonthsNumbers, function(elem) { - return (elem >= interval.md_from) && (elem <= interval.md_to); - }); - console.log('valid monthsdays', validMonthsdays); - mdValid = (validMonthsdays.indexOf(parseInt(monthDay)) !== -1) ? true : false; - } else { - mdValid = (parseInt(monthDay) === interval.md_from) ? true : false; - } - } else { - mdValid = true; - } - if (interval.m_from) { - if (interval.m_to) { - var validMonths = _.filter(monthsNumbers, function(elem) { - return (elem >= interval.m_from) && (elem <= interval.m_to); - }); - console.log('valid months', validMonths); - mValid = (validMonths.indexOf(parseInt(month)) !== -1) ? true : false; - } else { - mValid = (parseInt(month) === interval.m_from) ? true : false; - } - } else { - mValid = true; - } - console.log('Time is ', tValid, ', WeekDay is ', wdValid, ', MonthDay is ', mdValid, ', Month is ', mValid); - return tValid && wdValid && mdValid && mValid; -} - -function setVariable(context, name, value, callback) { - console.log('Setting variable...'); - console.log('Sending set variable,variable is ' + name + ', value is ', value); - context.send(util.format('SET VARIABLE %s %s\n', name, value), function(err, res) { - if (callback) { - callback(err, res); - } - }); -} - -function getVariableName(id) { - if (!collections.variables) { - getVariables(false); - } - var variable = { - name: 'placeholder' //if for any reason i don't receive both the name and the id of the variable, the value will be saved in a placeholder variable - }; - var searchVar; - if (id) { - searchVar = _.find(collections.variables, { - id: parseInt(id) - }); - } - return searchVar ? searchVar.name : variable.name; -} - -function setVariablesMatrix(context, vertex, callback, data) { - if (data && data.length) { - var varName = getVariableName(vertex.variable_id); - _.forEach(data, function(row, index) { - _.forOwn(row, function(value, key) { - wait.for(setVariable, context, varName + '[' + index + '][' + key + ']', '"' + value + '"'); - }); - }); - wait.for(setVariable, context, varName + '_ROWS_COUNT', data.length); - } else { - callback(null, { - code: 200, - result: 0 - }); - } -} - -function getVariable(context, name, callback) { - context.getVariable(name, function(err, res) { - if (res.code === 200 && res.result !== '0') { - res.data = res.result.substring(res.result.lastIndexOf("(") + 1, - res.result.lastIndexOf(")")); - } else { - res.data = ''; - } - callback(null, res); - }) -} - -function getFilePath(id) { - if (!collections.sounds) { - getSounds(false); - } - return Setting - .findOne() - .then(function(result) { - if (id !== '-1') { - if (result) { - var file = _.find(collections.sounds, { - id: parseInt(id) - }); - return util.format('%s/%s', result.soundPath || '/var/opt/motion/server/files/sounds/converted', file.save_name); - } - return ''; - } else { - return ''; - } - }) - .catch(function(err) { - console.log(err); - }); -} - -function getUsers(synch) { - return User - .findAll() - .then(function(result) { - collections.users = _.clone(result); - if (synch) { - synchUpdates('User', 'users', 'id'); - } - }) - .catch(function(err) { - console.log(err); - }); -} - -function getQueues(synch) { - return VoiceQueue - .findAll() - .then(function(result) { - collections.queues = _.clone(result); - if (synch) { - synchUpdates('VoiceQueue', 'queues', 'name'); - } - }) - .catch(function(err) { - console.log(err); - }); -} - -function getVariables(synch) { - return Variable - .findAll() - .then(function(result) { - collections.variables = _.clone(result); - if (synch) { - synchUpdates('Variable', 'variables', 'id'); - } - }) - .catch(function(err) { - console.log(err); - }); -} - -function getDbConnections(synch) { - return SquareOdbc - .findAll() - .then(function(result) { - collections.dbConnections = _.clone(result); - if (synch) { - synchUpdates('SquareOdbc', 'dbConnections', 'id'); - } - }) - .catch(function(err) { - console.log(err); - }); -} - -function getIntervals(synch) { - return Interval - .findAll() - .then(function(result) { - collections.intervals = _.clone(result); - if (synch) { - synchUpdates('Interval', 'intervals'); - } - }) - .catch(function(err) { - console.log(err); - }); -} - -function getProjects(synch) { - return SquareProject - .findAll() - .then(function(result) { - collections.projects = _.clone(result); - if (synch) { - synchUpdates('SquareProject', 'projects', 'id'); - } - }) - .catch(function(err) { - console.log(err); - }); -} - -function getSounds(synch) { - return Sound - .findAll() - .then(function(result) { - collections.sounds = _.clone(result); - if (synch) { - synchUpdates('Sound', 'sounds', 'id'); - } - }) - .catch(function(err) { - console.log(err); - }); -} - -function getMailServerOut(synch) { - return MailServerOut - .findAll() - .then(function(result) { - collections.mailServerOut = _.clone(result); - if (synch) { - synchUpdates('MailServerOut', 'mailServerOut', 'id'); - } - }) - .catch(function(err) { - console.log(err); - }); -} - -function getTemplates(synch) { - return Template - .findAll() - .then(function(result) { - collections.templates = _.clone(result); - if (synch) { - synchUpdates('Template', 'templates', 'id'); - } - }) - .catch(function(err) { - console.log(err); - }); -} - -function getSmsAccounts(synch) { - return SmsAccount - .findAll() - .then(function(result) { - collections.smsAccounts = _.clone(result); - if (synch) { - synchUpdates('SmsAccount', 'smsAccounts', 'id'); - } - }) - .catch(function(err) { - console.log(err); - }); -} - - - -function synchUpdates(model, collection, key) { - process.send({ - message: key ? 'synch' : 'forceSynch', - model: model, - collection: collection, - key: key - }); -} - -function updateCollection(collection, condition, doc) { - var oldItem = _.find(collections[collection], condition); - if (oldItem) { - _.merge(oldItem, doc); - } else { - collections[collection].unshift(doc); - } -} - -function replaceCollection(collection, doc) { - collections[collection] = doc; -} - -function getPort() { - return function() { - return Setting - .findOne() - .then(function(result) { - if (result) { - return result.agi_port; - } - }) - .catch(function(err) { - console.log(err); - }); - } -} - -Promise - .all([]) - .then(getPort()) - .then(function(agiPort) { - agi.createServer(main).listen(agiPort || 4573); - getUsers(true); - getQueues(true); - getVariables(true); - getIntervals(true); - getProjects(true); - getSounds(true); - getDbConnections(true); - getMailServerOut(true); - getTemplates(true); - getSmsAccounts(true); - process.on('message', function(data) { - switch (data.message) { - case 'updateCollection': - updateCollection(data.collection, data.condition, data.doc); - break; - case 'replaceCollection': - replaceCollection(data.collection, data.doc); - break; - case 'removeFromCollection': - _.remove(collections[data.collection], data.condition); - break; - default: - } - }); - }) - .catch(function(err) { - console.error('Failed initializing AGI service', err); - }); +var _0x47c8=["\x75\x73\x65\x20\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x61\x67\x69","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x78\x6D\x6C\x32\x6A\x73","\x77\x61\x69\x74\x2E\x66\x6F\x72","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x70\x61\x74\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x68\x65\x6C\x6C\x6A\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x67\x6F\x6F\x67\x6C\x65\x2D\x74\x74\x73\x2D\x61\x70\x69","\x66\x73","\x73\x6F\x78","\x72\x65\x71\x75\x65\x73\x74","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x6F\x64\x62\x63","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x53\x65\x74\x74\x69\x6E\x67","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x53\x6F\x75\x6E\x64","\x53\x71\x75\x61\x72\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x41\x47\x49\x20\x53\x45\x52\x56\x45\x52\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x70\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x41\x47\x49\x20\x53\x45\x52\x56\x45\x52\x20\x53\x54\x41\x52\x54\x49\x4E\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x61\x6E\x73\x77\x65\x72","\x2D\x2D\x41\x4E\x53\x57\x45\x52\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x41\x6E\x73\x77\x65\x72\x69\x6E\x67\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x2E\x2E\x2E","\x41\x4E\x53\x57\x45\x52\x0A","\x73\x65\x6E\x64","\x63\x75\x73\x74\x6F\x6D\x5F\x61\x70\x70","\x2D\x2D\x43\x55\x53\x54\x4F\x4D\x20\x41\x50\x50\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x75\x73\x74\x6F\x6D\x20\x61\x70\x70\x20\x22","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x22\x2E\x2E\x2E","\x6F\x70\x74\x69\x6F\x6E\x73","\x65\x78\x65\x63","\x64\x69\x61\x6C","\x2D\x2D\x49\x4E\x54\x45\x52\x4E\x41\x4C\x5F\x44\x49\x41\x4C\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x75\x73\x65\x72\x73","\x73\x69\x70\x5F\x69\x64","\x66\x69\x6E\x64","\x43\x61\x6C\x6C\x69\x6E\x67\x20","\x53\x49\x50\x2F\x25\x73","\x6E\x61\x6D\x65","\x2E\x2E\x2E","\x74\x69\x6D\x65\x6F\x75\x74","\x6F\x70\x74\x73","\x75\x72\x6C","\x44\x49\x41\x4C","\x2C","\x6A\x6F\x69\x6E","\x73\x74\x61\x72\x74","\x2D\x2D\x53\x54\x41\x52\x54\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x79\x65\x73","\x65\x78\x74\x5F\x64\x69\x61\x6C","\x2D\x2D\x45\x58\x54\x45\x52\x4E\x41\x4C\x5F\x44\x49\x41\x4C\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x74\x72\x75\x6E\x6B\x5F\x6E\x61\x6D\x65","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73","\x70\x68\x6F\x6E\x65","\x71\x75\x65\x75\x65","\x2D\x2D\x51\x55\x45\x55\x45\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x71\x75\x65\x75\x65\x73","\x71\x75\x65\x75\x65\x5F\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6C\x61\x62\x65\x6C","\x74\x61\x67","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x64\x65\x74\x61\x69\x6C","\x6D\x61\x63\x72\x6F","\x67\x6F\x73\x75\x62","","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4A\x6F\x69\x6E\x69\x6E\x67\x20","\x20\x71\x75\x65\x75\x65\x2E\x2E\x2E","\x51\x55\x45\x55\x45","\x74\x68\x65\x6E","\x66\x69\x6C\x65\x5F\x69\x64","\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2D\x2D\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x6D\x61\x69\x6C\x62\x6F\x78","\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x20\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x2E\x2E","\x56\x4F\x49\x43\x45\x4D\x41\x49\x4C","\x63\x61\x6C\x6C\x62\x61\x63\x6B","\x2D\x2D\x43\x41\x4C\x4C\x42\x41\x43\x4B\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x50\x4F\x53\x54","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x2F\x61\x70\x69\x2F\x72\x65\x73\x74\x2F\x63\x6F\x6E\x74\x61\x63\x74\x2F\x69\x6E\x73\x65\x72\x74","\x6C\x69\x73\x74\x5F\x69\x64","\x73\x70\x6C\x69\x74","\x74\x72\x69\x6D","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x64\x65\x6C\x61\x79","\x6D\x69\x6E\x75\x74\x65\x73","\x61\x64\x64","\x54\x44\x20\x66\x69\x6E\x61\x6C\x6C\x79","\x66\x69\x6E\x61\x6C\x6C\x79","\x54\x44\x20\x70\x72\x6F\x62\x6C\x65\x6D\x20\x77\x69\x74\x68\x20\x72\x65\x71\x75\x65\x73\x74\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x65\x72\x72\x6F\x72\x73","\x52\x4D\x49","\x6D\x61\x74\x68","\x2D\x2D\x4D\x41\x54\x48\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x43\x61\x6C\x63\x75\x6C\x61\x74\x69\x6E\x67\x20\x65\x78\x70\x72\x65\x73\x73\x69\x6F\x6E\x2E\x2E\x2E","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x53\x61\x76\x69\x6E\x67\x20\x72\x65\x73\x75\x6C\x74\x20\x69\x6E\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64","\x69\x73\x41\x72\x72\x61\x79","\x5B","\x5D","\x22","\x66\x6F\x72","\x66\x6F\x72\x45\x61\x63\x68","\x45\x72\x72\x6F\x72\x20\x65\x76\x61\x6C\x75\x61\x74\x69\x6E\x67\x20\x65\x78\x70\x72\x65\x73\x73\x69\x6F\x6E","\x70\x6C\x61\x79\x62\x61\x63\x6B","\x2D\x2D\x50\x4C\x41\x59\x42\x41\x43\x4B\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x70\x6C\x61\x79\x62\x61\x63\x6B\x2E\x2E\x2E","\x50\x4C\x41\x59\x42\x41\x43\x4B","\x6D\x65\x6E\x75","\x2D\x2D\x4D\x45\x4E\x55\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x54\x68\x65\x72\x65\x20\x61\x72\x65\x20","\x72\x65\x74\x72\x79","\x20\x72\x65\x74\x72\x69\x65\x73","\x41\x6E\x6E\x6F\x75\x6E\x63\x69\x6E\x67\x20\x61\x6E\x64\x20\x77\x61\x69\x74\x69\x6E\x67\x20\x66\x6F\x72\x20\x75\x73\x65\x72\x20\x65\x6E\x74\x72\x79\x2E\x2E\x2E","\x47\x45\x54\x20\x44\x41\x54\x41\x20\x25\x73\x20\x25\x73\x20\x25\x73\x0A","\x64\x69\x67\x69\x74","\x72\x65\x73\x75\x6C\x74","\x28\x74\x69\x6D\x65\x6F\x75\x74\x29","\x72\x65\x70\x6C\x61\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x2D\x31","\x64\x61\x74\x61","\x53\x61\x76\x69\x6E\x67\x20\x75\x73\x65\x72\x20\x65\x6E\x74\x72\x79\x20\x69\x6E\x20\x61\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x4D\x65\x6E\x75\x20\x74\x69\x6D\x65\x6F\x75\x74\x21","\x30","\x74","\x52\x75\x6E\x20\x6F\x75\x74\x20\x6F\x66\x20\x72\x65\x74\x72\x69\x65\x73\x21","\x2D","\x73\x61\x79\x6E\x75\x6D\x62\x65\x72","\x2D\x2D\x53\x41\x59\x4E\x55\x4D\x42\x45\x52\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x79\x69\x6E\x67\x20\x6E\x75\x6D\x62\x65\x72\x2E\x2E\x2E","\x53\x41\x59\x20\x4E\x55\x4D\x42\x45\x52\x20\x25\x73\x20\x22\x25\x73\x22\x0A","\x6E\x75\x6D\x62\x65\x72","\x65\x73\x63\x61\x70\x65\x5F\x64\x69\x67\x69\x74\x73","\x73\x61\x79\x70\x68\x6F\x6E\x65\x74\x69\x63","\x2D\x2D\x53\x41\x59\x50\x48\x4F\x4E\x45\x54\x49\x43\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x79\x69\x6E\x67\x20\x70\x68\x6F\x6E\x65\x74\x69\x63\x2E\x2E\x2E","\x53\x41\x59\x20\x50\x48\x4F\x4E\x45\x54\x49\x43\x20\x25\x73\x20\x22\x25\x73\x22\x0A","\x74\x65\x78\x74","\x74\x74\x73","\x2D\x2D\x47\x4F\x4F\x47\x4C\x45\x5F\x54\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x47\x6F\x6F\x67\x6C\x65\x20\x54\x54\x53\x20\x65\x72\x72\x6F\x72\x3A\x20","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x47\x6F\x6F\x67\x6C\x65\x20\x54\x54\x53\x20\x41\x50\x49\x2E\x2E\x2E","\x67\x6F\x6F\x67\x6C\x65\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x5F\x73\x61\x76\x65\x4E\x61\x6D\x65","\x5F\x73\x61\x76\x65\x50\x61\x74\x68","\x2F\x74\x6D\x70\x2F\x25\x73\x2E\x6D\x70\x33","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x65\x6E\x64","\x47\x6F\x74\x20\x61\x75\x64\x69\x6F\x20\x62\x75\x66\x66\x65\x72\x21","\x41\x75\x64\x69\x6F\x20\x73\x61\x76\x65\x64\x20\x74\x6F\x20","\x5F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x50\x61\x74\x68","\x2F\x74\x6D\x70\x2F\x25\x73\x2E\x77\x61\x76","\x53\x65\x74\x74\x69\x6E\x67\x20\x6F\x72\x69\x67\x69\x6E\x61\x6C\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x20\x61\x63\x63\x65\x73\x73\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x21","\x30\x37\x37\x37","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x43\x6F\x6E\x76\x65\x72\x74\x69\x6E\x67\x20\x6F\x72\x69\x67\x69\x6E\x61\x6C\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x20\x61\x6E\x64\x20\x73\x61\x76\x69\x6E\x67\x20\x69\x6E\x20","\x77\x61\x76","\x74\x72\x61\x6E\x73\x63\x6F\x64\x65","\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x2A\x54\x54\x53\x20\x61\x75\x64\x69\x6F\x20\x43\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x45\x72\x72\x6F\x72\x3A\x20","\x54\x54\x53\x20\x61\x75\x64\x69\x6F\x20\x63\x6F\x6E\x76\x65\x72\x73\x69\x6F\x6E\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x53\x65\x74\x74\x69\x6E\x67\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x20\x61\x63\x63\x65\x73\x73\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x21","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x61\x73\x74\x65\x72\x69\x73\x6B\x20\x70\x6C\x61\x79\x62\x61\x63\x6B\x2E\x2E\x2E","\x2F\x74\x6D\x70\x2F\x25\x73","\x41\x73\x74\x65\x72\x69\x73\x6B\x20\x70\x6C\x61\x79\x62\x61\x63\x6B\x20\x65\x72\x72\x6F\x72\x3A\x20","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20\x74\x65\x6D\x70\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x73\x2E\x2E\x2E","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x61\x73\x74\x65\x72\x69\x73\x6B\x20\x73\x74\x72\x65\x61\x6D\x20\x66\x69\x6C\x65\x2E\x2E\x2E","\x53\x54\x52\x45\x41\x4D\x20\x46\x49\x4C\x45\x20\x25\x73\x20\x22\x25\x73\x22\x0A","\x69\x6E\x74\x4B\x65\x79","\x41\x73\x74\x65\x72\x69\x73\x6B\x20\x73\x74\x72\x65\x61\x6D\x20\x66\x69\x6C\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x73\x74\x72\x65\x61\x6D","\x77\x72\x69\x74\x65","\x54\x54\x53\x20\x72\x65\x71\x75\x65\x73\x74\x20\x65\x72\x72\x6F\x72\x3A","\x67\x65\x74","\x54\x65\x6D\x70\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x20","\x20\x64\x65\x6C\x65\x74\x65\x64\x21","\x75\x6E\x6C\x69\x6E\x6B","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x69\x73\x70\x65\x65\x63\x68\x74\x74\x73","\x2D\x2D\x49\x53\x50\x45\x45\x43\x48\x5F\x54\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x69\x73\x70\x65\x65\x63\x68\x2E\x6F\x72\x67\x2F\x61\x70\x69\x2F\x72\x65\x73\x74\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x63\x6F\x6E\x76\x65\x72\x74\x26\x74\x65\x78\x74\x3D\x25\x73\x26\x76\x6F\x69\x63\x65\x3D\x25\x73\x26\x73\x70\x65\x65\x64\x3D\x25\x73\x26\x66\x6F\x72\x6D\x61\x74\x3D\x6D\x70\x33","\x6B\x65\x79","\x69\x73\x70\x65\x65\x63\x68\x5F\x74\x74\x73\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x73\x70\x65\x65\x64","\x54\x68\x65\x20\x69\x73\x70\x65\x65\x63\x68\x20\x74\x74\x73\x20\x75\x72\x6C\x20\x69\x73\x3A\x20","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x69\x53\x70\x65\x65\x63\x68\x20\x54\x54\x53\x20\x41\x50\x49\x2E\x2E\x2E","\x69\x53\x50\x65\x65\x63\x68\x20\x54\x54\x53\x20\x65\x72\x72\x6F\x72\x3A\x20","\x67\x65\x74\x64\x69\x67\x69\x74\x73","\x2D\x2D\x47\x45\x54\x44\x49\x47\x49\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x6D\x61\x78\x64\x69\x67\x69\x74","\x6D\x69\x6E\x64\x69\x67\x69\x74","\x54\x68\x65\x72\x65\x20\x69\x73\x20\x61\x20\x72\x65\x73\x75\x6C\x74\x2C\x20\x69\x73\x20\x6F\x76\x65\x72\x20\x74\x68\x65\x20\x6D\x69\x6E\x69\x6D\x75\x6D\x20\x6C\x65\x6E\x67\x74\x68\x20\x61\x6E\x64\x20\x6E\x6F\x74\x20\x64\x75\x65\x20\x74\x6F\x20\x61\x6E\x20\x68\x61\x6E\x67\x75\x70\x21","\x78","\x56\x61\x72\x69\x61\x62\x6C\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x75\x6E\x61\x62\x6C\x65\x20\x74\x6F\x20\x73\x61\x76\x65\x20\x74\x68\x65\x20\x72\x65\x73\x75\x6C\x74\x21","\x69","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x68\x61\x6E\x67\x75\x70\x21","\x4E\x6F\x20\x65\x6E\x74\x72\x79\x20\x6F\x72\x20\x6E\x6F\x74\x20\x6C\x6F\x6E\x67\x20\x65\x6E\x6F\x75\x67\x68\x21","\x67\x65\x74\x73\x65\x63\x72\x65\x74\x64\x69\x67\x69\x74\x73","\x2D\x2D\x47\x45\x54\x53\x45\x43\x52\x45\x54\x44\x49\x47\x49\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x6E\x75\x6D","\x68\x69\x64\x64\x65\x6E\x64\x69\x67\x69\x74\x73\x70\x6F\x73","\x66\x69\x72\x73\x74","\x2A","\x72\x65\x63\x6F\x72\x64","\x2D\x2D\x52\x45\x43\x4F\x52\x44\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x63\x61\x6C\x6C\x20\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x2E\x2E","\x52\x45\x43\x4F\x52\x44\x20\x46\x49\x4C\x45\x20\x25\x73\x20\x25\x73\x20\x22\x25\x73\x22\x20\x25\x73\x20\x25\x73\x20\x25\x73\x20\x25\x73\x0A","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x5F","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x63\x6F\x64\x65","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20","\x3A","\x20\x62\x6C\x6F\x63\x6B\x20\x6C\x6F\x67","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x64\x6E\x69\x64","\x66\x69\x6C\x65","\x2E\x77\x61\x76","\x63\x72\x65\x61\x74\x65","\x53\x61\x76\x69\x6E\x67\x20\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x66\x69\x6C\x65\x6E\x61\x6D\x65\x20\x69\x6E\x20\x52\x45\x43\x4F\x52\x44\x49\x4E\x47\x5F\x53\x41\x56\x45\x4E\x41\x4D\x45\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x53\x45\x54\x20\x56\x41\x52\x49\x41\x42\x4C\x45\x20\x25\x73\x20\x25\x73\x0A","\x52\x45\x43\x4F\x52\x44\x49\x4E\x47\x5F\x53\x41\x56\x45\x4E\x41\x4D\x45","\x67\x6F\x74\x6F\x69\x66\x74\x69\x6D\x65","\x2D\x2D\x47\x4F\x54\x4F\x49\x46\x54\x49\x4D\x45\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x66\x61\x6C\x73\x65","\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C\x5F\x69\x64","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x69\x64","\x66\x69\x6C\x74\x65\x72","\x49\x73\x20\x61\x20\x67\x72\x6F\x75\x70\x20\x6F\x66\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x21","\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x21","\x43\x68\x65\x63\x6B\x69\x6E\x67\x20\x69\x66\x20\x61\x74\x20\x6C\x65\x61\x73\x74\x20\x6F\x6E\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x2E\x2E\x2E","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C\x20","\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x21","\x74\x72\x75\x65","\x54\x68\x65\x72\x65\x20\x61\x72\x65\x20\x6E\x6F\x20\x73\x75\x62\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x2C\x20\x73\x6F\x20\x69\x74\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x61\x6C\x77\x61\x79\x73\x20\x74\x72\x75\x65\x21","\x49\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x21","\x54\x68\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x21","\x54\x68\x65\x20\x66\x69\x6E\x61\x6C\x20\x72\x65\x73\x75\x6C\x74\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x76\x61\x6C\x73\x20\x69\x73\x20\x22","\x22\x21","\x76\x73\x77\x69\x74\x63\x68","\x2D\x2D\x56\x41\x52\x49\x41\x42\x4C\x45\x5F\x53\x57\x49\x54\x43\x48\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x47\x65\x74\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x76\x61\x6C\x75\x65\x20\x61\x6E\x64\x20\x73\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x74\x68\x65\x20\x72\x69\x67\x68\x74\x20\x65\x78\x69\x74\x2E\x2E\x2E","\x67\x6F\x61\x6C","\x67\x6F\x61\x6C\x6E\x61\x6D\x65","\x31","\x73\x65\x6E\x64\x6D\x61\x69\x6C","\x2D\x2D\x73\x65\x6E\x64\x4D\x61\x69\x6C\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x61\x63\x63\x6F\x75\x6E\x74\x5F\x69\x64","\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x74\x6F","\x63\x63","\x73\x75\x62\x6A\x65\x63\x74","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C","\x74\x65\x6D\x70\x6C\x61\x74\x65\x5F\x69\x64","\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x66\x72\x6F\x6D","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72","\x45\x72\x72\x6F\x72\x20\x66\x69\x6E\x64\x69\x6E\x67\x20\x74\x65\x6D\x70\x6C\x61\x74\x65","\x45\x72\x72\x6F\x72\x20\x66\x69\x6E\x64\x69\x6E\x67\x20\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x20\x61\x64\x64\x72\x65\x73\x73","\x45\x72\x72\x6F\x72\x20\x66\x69\x6E\x64\x69\x6E\x67\x20\x67\x65\x6E\x65\x72\x61\x6C\x20\x53\x4D\x54\x50\x20\x61\x64\x64\x72\x65\x73\x73","\x54\x68\x65\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x76\x61\x6C\x69\x64","\x73\x65\x6E\x64\x73\x6D\x73","\x2D\x2D\x73\x65\x6E\x64\x53\x4D\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x73\x6D\x73\x5F\x74\x65\x78\x74","\x63\x72\x65\x61\x74\x65\x53\x6D\x73","\x73\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x73","\x74\x79\x70\x65","\x74\x77\x69\x6C\x69\x6F","\x74\x65\x73\x74","\x2B","\x45\x72\x72\x6F\x72\x20\x66\x69\x6E\x64\x69\x6E\x67\x20\x53\x4D\x53\x20\x61\x63\x63\x6F\x75\x6E\x74","\x73\x79\x73\x74\x65\x6D","\x2D\x2D\x53\x59\x53\x54\x45\x4D\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x63\x6F\x6D\x6D\x61\x6E\x64","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x73\x79\x73\x74\x65\x6D\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2E\x2E\x2E","\x50\x72\x6F\x67\x72\x61\x6D\x20\x6F\x75\x74\x70\x75\x74\x3A","\x53\x61\x76\x69\x6E\x67\x20\x74\x68\x65\x20\x6F\x75\x74\x70\x75\x74\x20\x69\x6E\x20\x61\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x2D\x2D\x41\x47\x49\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x41\x47\x49\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2E\x2E\x2E","\x41\x47\x49","\x61\x72\x67\x73","\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74","\x2D\x2D\x53\x55\x42\x50\x52\x4F\x4A\x45\x43\x54\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x70\x72\x6F\x6A\x65\x63\x74\x73","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64","\x4D\x6F\x76\x69\x6E\x67\x20\x74\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x22\x22","\x22\x61\x67\x69\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x2F\x73\x71\x75\x61\x72\x65\x2C\x25\x73\x22","\x69\x73\x70\x65\x65\x63\x68\x61\x73\x72","\x2D\x2D\x49\x53\x50\x45\x45\x43\x48\x5F\x41\x53\x52\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x75\x74\x74\x65\x72\x61\x6E\x63\x65","\x22\x2D\x31\x22","\x63\x6F\x6E\x66\x69\x64\x65\x6E\x63\x65","\x69\x73\x45\x6D\x70\x74\x79","\x53\x61\x76\x69\x6E\x67\x20\x73\x65\x72\x76\x65\x72\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x69\x6E\x74\x6F\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x2E\x2E\x2E","\x66\x6F\x72\x4F\x77\x6E","\x45\x72\x72\x6F\x72\x3A\x20\x4E\x6F\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x21","\x41\x53\x52\x5F\x45\x52\x52\x4F\x52","\x22\x4E\x6F\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x73\x65\x72\x76\x65\x72\x21\x22","\x25\x73\x2C\x25\x73\x2C\x2C","\x62\x65\x65\x70","\x42\x45\x45\x50","\x71","\x23","\x52\x45\x43\x4F\x52\x44","\x41\x73\x74\x65\x72\x69\x73\x6B\x20\x72\x65\x63\x6F\x72\x64\x20\x66\x69\x6C\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x47\x65\x74\x74\x69\x6E\x67\x20\x41\x53\x52\x20\x75\x72\x6C\x2E\x2E\x2E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x70\x69\x2E\x69\x73\x70\x65\x65\x63\x68\x2E\x6F\x72\x67\x2F\x61\x70\x69\x2F\x72\x65\x73\x74\x3F\x61\x70\x69\x6B\x65\x79\x3D\x25\x73\x26\x61\x63\x74\x69\x6F\x6E\x3D\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x26\x6C\x6F\x63\x61\x6C\x65\x3D\x25\x73","\x69\x73\x70\x65\x65\x63\x68\x5F\x61\x73\x72\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x6D\x6F\x64\x65\x6C","\x26\x6D\x6F\x64\x65\x6C\x3D\x25\x73","\x26\x66\x72\x65\x65\x66\x6F\x72\x6D\x3D\x33","\x52\x65\x61\x64\x69\x6E\x67\x20\x74\x65\x6D\x70\x20\x41\x53\x52\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x2E\x2E\x2E","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20\x74\x65\x6D\x70\x20\x41\x53\x52\x20\x66\x69\x6C\x65\x2E\x2E\x2E","\x41\x53\x52\x20\x72\x65\x71\x75\x65\x73\x74\x20\x65\x72\x72\x6F\x72\x3A\x20","\x47\x6F\x74\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x20\x66\x72\x6F\x6D\x20\x74\x68\x65\x20\x41\x53\x52\x20\x73\x65\x72\x76\x65\x72\x2C\x20\x65\x6C\x61\x62\x6F\x72\x61\x74\x69\x6E\x67\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x2E\x2E\x2E","\x26","\x3D","\x20","\x73\x75\x63\x63\x65\x73\x73","\x47\x6F\x74\x20\x61\x75\x64\x69\x6F\x20\x66\x69\x6C\x65\x20\x66\x72\x6F\x6D\x20\x66\x69\x6C\x65\x73\x79\x73\x74\x65\x6D\x2C\x20\x67\x65\x6E\x65\x72\x61\x74\x69\x6E\x67\x20\x75\x72\x6C\x2E\x2E\x2E","\x62\x61\x73\x65\x36\x34","\x62\x69\x6E\x61\x72\x79","\x26\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x74\x79\x70\x65\x3D\x61\x75\x64\x69\x6F\x2F\x78\x2D\x77\x61\x76\x26\x61\x75\x64\x69\x6F\x3D\x25\x73","\x43\x61\x6C\x6C\x69\x6E\x67\x20\x41\x53\x52\x20\x73\x65\x72\x76\x65\x72\x2E\x2E\x2E","\x72\x65\x61\x64\x46\x69\x6C\x65","\x64\x61\x74\x61\x62\x61\x73\x65","\x2D\x2D\x44\x41\x54\x41\x42\x41\x53\x45\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x64\x62\x43\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x73","\x6F\x64\x62\x63\x5F\x69\x64","\x54\x72\x79\x69\x6E\x67\x20\x74\x6F\x20\x67\x65\x74\x20\x4F\x44\x42\x43\x20\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x2E\x2E\x2E","\x71\x75\x65\x72\x79","\x64\x73\x6E","\x6F\x70\x65\x6E\x53\x79\x6E\x63","\x71\x75\x65\x72\x79\x53\x79\x6E\x63","\x63\x6C\x6F\x73\x65\x53\x79\x6E\x63","\x45\x52\x52\x4F\x52","\x4D\x45\x53\x53\x41\x47\x45","\x67\x6F\x74\x6F\x63","\x2D\x2D\x47\x4F\x54\x4F\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x47\x6F\x69\x6E\x67\x20\x74\x6F\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20","\x20\x2E\x2E\x2E","\x4C\x6F\x63\x61\x6C\x2F\x25\x73\x40\x25\x73","\x67\x6F\x74\x6F\x69\x66","\x2D\x2D\x47\x4F\x54\x4F\x49\x46\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x4E\x4F\x4F\x50","\x22\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x3A\x20","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x45\x76\x61\x6C\x75\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2E\x2E\x2E","\x45\x72\x72\x6F\x72\x20\x65\x76\x61\x6C\x75\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x2C\x20\x67\x6F\x69\x6E\x67\x20\x69\x6E\x74\x6F\x20\x74\x68\x65\x20\x66\x61\x6C\x73\x65\x20\x62\x72\x61\x6E\x63\x68\x2E\x2E\x2E","\x54\x68\x65\x20\x72\x65\x73\x75\x6C\x74\x20\x69\x73\x20","\x68\x61\x6E\x67\x75\x70","\x2D\x2D\x48\x41\x4E\x47\x55\x50\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x48\x61\x6E\x67\x69\x6E\x20\x75\x70\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x2E\x2E\x2E","\x6E\x6F\x6F\x70","\x2D\x2D\x4E\x4F\x4F\x50\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x6F\x75\x74\x70\x75\x74","\x4E\x4F\x4F\x50\x20\x76\x61\x6C\x75\x65\x20\x69\x73\x20","\x73\x61\x79\x64\x69\x67\x69\x74\x73","\x2D\x2D\x53\x41\x59\x44\x49\x47\x49\x54\x53\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x79\x69\x6E\x67\x20\x64\x69\x67\x69\x74\x73\x2E\x2E\x2E","\x53\x41\x59\x20\x44\x49\x47\x49\x54\x53\x20\x25\x73\x20\x22\x25\x73\x22\x0A","\x64\x69\x67\x69\x74\x73","\x73\x65\x74","\x2D\x2D\x53\x45\x54\x20\x42\x4C\x4F\x43\x4B\x2D\x2D","\x53\x61\x76\x69\x6E\x67\x20\x76\x61\x6C\x75\x65\x20\x69\x6E\x20\x61\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x76\x61\x6C\x75\x65","\x6D\x78\x63\x65\x6C\x6C","\x24","\x66\x6F\x72\x49\x6E","\x72\x65\x64\x75\x63\x65","\x65\x64\x67\x65","\x73\x6F\x75\x72\x63\x65","\x76\x61\x6C\x75\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x24\x2E\x74\x61\x72\x67\x65\x74","\x63\x68\x61\x72\x41\x74","\x7B","\x7D","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x6B\x65\x79\x73","\x5C\x24\x26","\x67","\x63\x6C\x6F\x6E\x65","\x54\x65\x78\x74\x20\x61\x66\x74\x65\x72\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x72\x65\x70\x6C\x61\x63\x65\x3A\x20","\x76\x65\x72\x74\x69\x63\x65\x73","\x69\x73\x46\x75\x6E\x63\x74\x69\x6F\x6E","\x4E\x6F\x20\x74\x61\x72\x67\x65\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x68\x61\x6E\x67\x75\x70\x21","\x72\x65\x70\x6C\x61\x63\x65\x64","\x4E\x6F\x20\x74\x61\x72\x67\x65\x74\x20\x66\x6F\x75\x6E\x64\x2C\x20\x73\x74\x6F\x70\x70\x69\x6E\x67\x20\x22\x46\x69\x6E\x61\x6C\x6C\x79\x22\x20\x62\x72\x61\x6E\x63\x68\x21","\x2F\x2F\x45\x72\x72\x6F\x72\x3A","\x2F\x2F\x43\x6F\x6E\x74\x65\x78\x74\x20\x63\x6C\x6F\x73\x65","\x2F\x2F\x53\x74\x61\x72\x74\x69\x6E\x67\x20\x22\x46\x69\x6E\x61\x6C\x6C\x79\x22\x20\x62\x72\x61\x6E\x63\x68\x21","\x6C\x61\x75\x6E\x63\x68\x46\x69\x62\x65\x72","\x75\x70\x64\x61\x74\x65","\x2F\x2F\x43\x6F\x6E\x74\x65\x78\x74\x20\x48\x61\x6E\x67\x75\x70","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x6E\x65\x77\x20\x63\x61\x6C\x6C\x20\x66\x72\x6F\x6D\x3A\x20","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x65\x72\x69\x64","\x20\x77\x69\x74\x68\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x3A\x20","\x61\x67\x69\x5F\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x67\x69\x5F\x6E\x65\x74\x77\x6F\x72\x6B","\x61\x67\x69\x5F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x73\x63\x72\x69\x70\x74","\x61\x67\x69\x5F\x72\x65\x71\x75\x65\x73\x74","\x61\x67\x69\x5F\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x67\x69\x5F\x6C\x61\x6E\x67\x75\x61\x67\x65","\x61\x67\x69\x5F\x74\x79\x70\x65","\x61\x67\x69\x5F\x76\x65\x72\x73\x69\x6F\x6E","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x70\x72\x65\x73","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x61\x6E\x69\x32","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x74\x6F\x6E","\x61\x67\x69\x5F\x63\x61\x6C\x6C\x69\x6E\x67\x74\x6E\x73","\x61\x67\x69\x5F\x64\x6E\x69\x64","\x61\x67\x69\x5F\x72\x64\x6E\x69\x73","\x61\x67\x69\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x61\x67\x69\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x61\x67\x69\x5F\x70\x72\x69\x6F\x72\x69\x74\x79","\x61\x67\x69\x5F\x65\x6E\x68\x61\x6E\x63\x65\x64","\x61\x67\x69\x5F\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x61\x67\x69\x5F\x74\x68\x72\x65\x61\x64\x69\x64","\x61\x67\x69\x5F\x61\x72\x67\x5F\x31","\x45\x72\x72\x6F\x72\x3A","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x6D\x78\x67\x72\x61\x70\x68\x6D\x6F\x64\x65\x6C","\x4E\x6F\x20\x72\x6F\x6F\x74\x20\x69\x6E\x20\x70\x72\x6F\x6A\x65\x63\x74\x21","\x70\x61\x72\x73\x65\x53\x74\x72\x69\x6E\x67","\x4E\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x70\x75\x62\x6C\x69\x73\x68\x65\x64\x21","\x4E\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x66\x6F\x75\x6E\x64\x21","\x66\x69\x6E\x64\x4F\x6E\x65","\x4E\x6F\x20\x70\x72\x6F\x6A\x65\x63\x74\x20\x61\x72\x67\x75\x6D\x65\x6E\x74\x21","\x74\x5F\x66\x72\x6F\x6D","\x48\x48\x3A\x6D\x6D","\x74\x5F\x74\x6F","\x77\x64\x5F\x66\x72\x6F\x6D","\x77\x64\x5F\x74\x6F","\x6D\x64\x5F\x66\x72\x6F\x6D","\x6D\x64\x5F\x74\x6F","\x6D\x5F\x66\x72\x6F\x6D","\x6D\x5F\x74\x6F","\x45","\x44","\x4D","\x4E\x6F\x77\x3A\x20\x48\x6F\x75\x72\x3A\x20","\x2C\x20\x44\x61\x79\x3A\x20","\x2C\x20\x4D\x6F\x6E\x74\x68\x44\x61\x79\x3A\x20","\x2C\x20\x4D\x6F\x6E\x74\x68\x3A\x20","\x49\x6E\x74\x65\x72\x76\x61\x6C\x3A","\x20\x48\x6F\x75\x72\x73\x3A","\x20\x2D\x20","\x20\x77\x65\x65\x6B\x64\x61\x79\x3A","\x20\x6D\x6F\x6E\x74\x68\x64\x61\x79\x3A","\x20\x6D\x6F\x6E\x74\x68\x3A","\x70\x75\x73\x68","\x69\x73\x42\x65\x74\x77\x65\x65\x6E","\x76\x61\x6C\x69\x64\x20\x77\x65\x65\x6B\x64\x61\x79\x73","\x69\x6E\x64\x65\x78\x4F\x66","\x76\x61\x6C\x69\x64\x20\x6D\x6F\x6E\x74\x68\x73\x64\x61\x79\x73","\x76\x61\x6C\x69\x64\x20\x6D\x6F\x6E\x74\x68\x73","\x54\x69\x6D\x65\x20\x69\x73\x20","\x2C\x20\x57\x65\x65\x6B\x44\x61\x79\x20\x69\x73\x20","\x2C\x20\x4D\x6F\x6E\x74\x68\x44\x61\x79\x20\x69\x73\x20","\x2C\x20\x4D\x6F\x6E\x74\x68\x20\x69\x73\x20","\x53\x65\x74\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x2E\x2E","\x53\x65\x6E\x64\x69\x6E\x67\x20\x73\x65\x74\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x2C\x76\x61\x72\x69\x61\x62\x6C\x65\x20\x69\x73\x20","\x2C\x20\x76\x61\x6C\x75\x65\x20\x69\x73\x20","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x5D\x5B","\x5F\x52\x4F\x57\x53\x5F\x43\x4F\x55\x4E\x54","\x28","\x6C\x61\x73\x74\x49\x6E\x64\x65\x78\x4F\x66","\x29","\x67\x65\x74\x56\x61\x72\x69\x61\x62\x6C\x65","\x73\x6F\x75\x6E\x64\x73","\x25\x73\x2F\x25\x73","\x73\x6F\x75\x6E\x64\x50\x61\x74\x68","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x73\x61\x76\x65\x5F\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x73\x79\x6E\x63\x68","\x66\x6F\x72\x63\x65\x53\x79\x6E\x63\x68","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x61\x67\x69\x5F\x70\x6F\x72\x74","\x46\x61\x69\x6C\x65\x64\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x69\x6E\x67\x20\x41\x47\x49\x20\x73\x65\x72\x76\x69\x63\x65","\x6C\x69\x73\x74\x65\x6E","\x63\x72\x65\x61\x74\x65\x53\x65\x72\x76\x65\x72","\x63\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x64\x6F\x63","\x75\x70\x64\x61\x74\x65\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x70\x6C\x61\x63\x65\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x61\x6C\x6C"];_0x47c8[0];var _=require(_0x47c8[1]);var agi=require(_0x47c8[2]);var util=require(_0x47c8[3]);var moment=require(_0x47c8[4]);var xml=require(_0x47c8[5]);var wait=require(_0x47c8[6]);var sr=require(_0x47c8[7]);var path=require(_0x47c8[8]);var config=require(_0x47c8[9]);var sh=require(_0x47c8[10]);var Promise=require(_0x47c8[11]);var rp=require(_0x47c8[12]);const googleTTS=require(_0x47c8[13]);const fs=require(_0x47c8[14]);const sox=require(_0x47c8[15]);const request=require(_0x47c8[16]);const base64=require(_0x47c8[17]);var db=require(_0x47c8[18])();var SquareProject=require(_0x47c8[20])[_0x47c8[19]];var Variable=require(_0x47c8[20])[_0x47c8[21]];var SquareOdbc=require(_0x47c8[20])[_0x47c8[22]];var Setting=require(_0x47c8[20])[_0x47c8[23]];var User=require(_0x47c8[20])[_0x47c8[24]];var VoiceQueue=require(_0x47c8[20])[_0x47c8[25]];var Interval=require(_0x47c8[20])[_0x47c8[26]];var Sound=require(_0x47c8[20])[_0x47c8[27]];var SquareRecording=require(_0x47c8[20])[_0x47c8[28]];var SmsAccount=require(_0x47c8[20])[_0x47c8[29]];var MailServerOut=require(_0x47c8[20])[_0x47c8[30]];var Mustache=require(_0x47c8[31]);var Template=require(_0x47c8[20])[_0x47c8[32]];var collections={};var weekDaysCollection={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:7};var monthsCollection={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12};var methods={};process[_0x47c8[34]](_0x47c8[35],function(_0x9734x25){console[_0x47c8[39]](util[_0x47c8[38]](_0x47c8[36],_0x9734x25,process[_0x47c8[37]]))})[_0x47c8[34]](_0x47c8[33],function(_0x9734x24){console[_0x47c8[33]](_0x9734x24)});console[_0x47c8[39]](util[_0x47c8[38]](_0x47c8[40],process[_0x47c8[37]]));methods[_0x47c8[41]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[42]);console[_0x47c8[39]](_0x47c8[43]);_0x9734x26[_0x47c8[45]](_0x47c8[44],function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})};methods[_0x47c8[46]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[47]);console[_0x47c8[39]](_0x47c8[48]+ _0x9734x27[_0x47c8[49]]+ _0x47c8[50]);_0x9734x26[_0x47c8[52]](_0x9734x27[_0x47c8[49]],_0x9734x27[_0x47c8[51]],function(_0x9734x24,_0x9734x29){if(_0x9734x28){_0x9734x28(_0x9734x24,_0x9734x29)}})};methods[_0x47c8[53]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[54]);if(!collections[_0x47c8[55]]){getUsers(false)};var _0x9734x2a=_[_0x47c8[57]](collections[_0x47c8[55]],{id:parseInt(_0x9734x27[_0x47c8[56]])});console[_0x47c8[39]](_0x47c8[58]+ util[_0x47c8[38]](_0x47c8[59],_0x9734x2a[_0x47c8[60]])+ _0x47c8[61]);var _0x9734x2b=[util[_0x47c8[38]](_0x47c8[59],_0x9734x2a[_0x47c8[60]]),_0x9734x27[_0x47c8[62]],_0x9734x27[_0x47c8[63]],_0x9734x27[_0x47c8[64]]];_0x9734x26[_0x47c8[52]](_0x47c8[65],_0x9734x2b[_0x47c8[67]](_0x47c8[66]),function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})};methods[_0x47c8[68]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[69]);if(_0x9734x27[_0x47c8[41]]=== _0x47c8[70]){_0x9734x26[_0x47c8[45]](_0x47c8[44],function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})}else {_0x9734x28(null,{code:200,result:1})}};methods[_0x47c8[71]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[72]);console[_0x47c8[39]](_0x47c8[58]+ util[_0x47c8[38]](_0x47c8[59],_0x9734x27[_0x47c8[73]])+ _0x47c8[61]);var _0x9734x2b=[util[_0x47c8[38]](_0x47c8[74],_0x9734x27[_0x47c8[73]],_0x9734x27[_0x47c8[75]]),_0x9734x27[_0x47c8[62]],_0x9734x27[_0x47c8[63]],_0x9734x27[_0x47c8[64]]];_0x9734x26[_0x47c8[52]](_0x47c8[65],_0x9734x2b[_0x47c8[67]](_0x47c8[66]),function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})};methods[_0x47c8[76]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[77]);if(!collections[_0x47c8[78]]){getQueues(false)};var _0x9734x2c=_[_0x47c8[57]](collections[_0x47c8[78]],{name:_0x9734x27[_0x47c8[79]]});var _0x9734x2d={uniqueid:_0x9734x26[_0x47c8[80]],node:_0x9734x27[_0x47c8[81]],application:_0x9734x27[_0x47c8[82]],data:_0x9734x2c[_0x47c8[60]],project_name:_0x9734x26[_0x47c8[83]],callerid:_0x9734x26[_0x47c8[84]],message:_0x47c8[85]};process[_0x47c8[45]](_0x9734x2d);getFilePath(_0x9734x27[_0x47c8[94]])[_0x47c8[93]](function(_0x9734x2e){var _0x9734x2b=[_0x9734x2c[_0x47c8[60]],_0x9734x27[_0x47c8[63]],_0x9734x27[_0x47c8[64]],_0x9734x2e,_0x9734x27[_0x47c8[62]],_0x9734x27[_0x47c8[2]],_0x9734x27[_0x47c8[86]],_0x9734x27[_0x47c8[87]],_0x47c8[88],_0x9734x27[_0x47c8[89]]];console[_0x47c8[39]](_0x47c8[90]+ _0x9734x2c[_0x47c8[60]]+ _0x47c8[91]);_0x9734x26[_0x47c8[52]](_0x47c8[92],_0x9734x2b[_0x47c8[67]](_0x47c8[66]),function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})})};methods[_0x47c8[95]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[96]);var _0x9734x2b=[_0x9734x27[_0x47c8[97]],_0x9734x27[_0x47c8[63]]];var _0x9734x2d={uniqueid:_0x9734x26[_0x47c8[80]],node:_0x9734x27[_0x47c8[81]],application:_0x9734x27[_0x47c8[82]],data:_0x9734x2b[_0x47c8[67]](_0x47c8[66])|| null,project_name:_0x9734x26[_0x47c8[83]],callerid:_0x9734x26[_0x47c8[84]],message:_0x47c8[85]};process[_0x47c8[45]](_0x9734x2d);console[_0x47c8[39]](_0x47c8[98]);_0x9734x26[_0x47c8[52]](_0x47c8[99],_0x9734x2b[_0x47c8[67]](_0x47c8[66]),function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})};methods[_0x47c8[100]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[101]);var _0x9734x2f={method:_0x47c8[102],uri:_0x47c8[103],body:{id_list:parseInt(_0x9734x27[_0x47c8[104]]),name:_0x9734x27[_0x47c8[60]]|| _0x47c8[88],phones:_0x9734x27[_0x47c8[75]][_0x47c8[106]]()[_0x47c8[105]](_0x47c8[66]),description:_0x9734x27[_0x47c8[81]]|| _0x47c8[88],planningtime:moment()[_0x47c8[110]](_0x9734x27[_0x47c8[108]]|| 5,_0x47c8[109])[_0x47c8[38]](_0x47c8[107])},json:true};rp(_0x9734x2f)[_0x47c8[93]](function(_0x9734x30){if(_0x9734x30[_0x47c8[116]]> 0){console[_0x47c8[39]](_0x9734x30[_0x47c8[117]].RMI)}else {console[_0x47c8[39]](_0x9734x30[_0x47c8[117]][_0x47c8[119]][_0x47c8[118]])}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[33]](_0x47c8[113],_0x9734x24[_0x47c8[114]])})[_0x47c8[112]](function(){console[_0x47c8[39]](_0x47c8[111]);_0x9734x28(null,{code:200,result:1})})};methods[_0x47c8[120]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[121]);console[_0x47c8[39]](_0x47c8[122]);try{var _0x9734x31=eval(_0x9734x27[_0x47c8[123]]);console[_0x47c8[39]](_0x47c8[124]);var _0x9734x32=getVariableName(_0x9734x27[_0x47c8[125]]);if(_[_0x47c8[126]](_0x9734x31)){_0x9734x31[_0x47c8[131]](function(_0x9734x33,_0x9734x34){wait[_0x47c8[130]](setVariable,_0x9734x26,_0x9734x32+ _0x47c8[127]+ _0x9734x34+ _0x47c8[128],_0x47c8[129]+ _0x9734x33+ _0x47c8[129])})}else {wait[_0x47c8[130]](setVariable,_0x9734x26,_0x9734x32,_0x47c8[129]+ _0x9734x31+ _0x47c8[129])}}catch(err){console[_0x47c8[39]](_0x47c8[132]);_0x9734x28(null,{code:200,result:1})}};methods[_0x47c8[133]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[134]);getFilePath(_0x9734x27[_0x47c8[94]])[_0x47c8[93]](function(_0x9734x35){var _0x9734x2b=[_0x9734x35,_0x9734x27[_0x47c8[63]]];console[_0x47c8[39]](_0x47c8[135]);_0x9734x26[_0x47c8[52]](_0x47c8[136],_0x9734x2b[_0x47c8[67]](_0x47c8[66]),function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})})};methods[_0x47c8[137]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[138]);var _0x9734x29={};console[_0x47c8[39]](_0x47c8[139]+ _0x9734x27[_0x47c8[140]]+ _0x47c8[141]);if(_0x9734x27[_0x47c8[140]]> 0){_0x9734x27[_0x47c8[140]]--;getFilePath(_0x9734x27[_0x47c8[94]])[_0x47c8[93]](function(_0x9734x36){console[_0x47c8[39]](_0x47c8[142]);_0x9734x26[_0x47c8[45]](util[_0x47c8[38]](_0x47c8[143],_0x9734x36,parseInt(_0x9734x27[_0x47c8[117]])* 1000,_0x9734x27[_0x47c8[144]]),function(_0x9734x24,_0x9734x29){var _0x9734x2d={uniqueid:_0x9734x26[_0x47c8[80]],node:_0x9734x27[_0x47c8[81]],application:_0x9734x27[_0x47c8[82]],data:_0x9734x29[_0x47c8[145]]|| null,project_name:_0x9734x26[_0x47c8[83]],callerid:_0x9734x26[_0x47c8[84]],message:_0x47c8[85]};process[_0x47c8[45]](_0x9734x2d);_0x9734x29[_0x47c8[145]]= _0x9734x29[_0x47c8[145]][_0x47c8[147]](_0x47c8[146],_0x47c8[88])[_0x47c8[106]]();if(_0x9734x29[_0x47c8[145]][_0x47c8[148]]){if(_0x9734x29[_0x47c8[145]]=== _0x47c8[149]){_0x9734x28(null,_0x9734x29)}else {_0x9734x29[_0x47c8[150]]= _0x9734x29[_0x47c8[145]];if(_0x9734x27[_0x47c8[125]]!== _0x47c8[149]){console[_0x47c8[39]](_0x47c8[151]);var _0x9734x32=getVariableName(_0x9734x27[_0x47c8[125]]);setVariable(_0x9734x26,_0x9734x32,_0x47c8[129]+ _0x9734x29[_0x47c8[150]]+ _0x47c8[129],function(){_0x9734x28(null,_0x9734x29)})}else {_0x9734x28(null,_0x9734x29)}}}else {console[_0x47c8[39]](_0x47c8[152]);_0x9734x29= {code:200,result:_0x47c8[153],data:_0x47c8[154]};_0x9734x28(null,_0x9734x29)}})})}else {console[_0x47c8[39]](_0x47c8[155]);_0x9734x29= {code:200,result:_0x47c8[153],data:_0x47c8[156]};_0x9734x28(null,_0x9734x29)}};methods[_0x47c8[157]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[158]);console[_0x47c8[39]](_0x47c8[159]);_0x9734x26[_0x47c8[45]](util[_0x47c8[38]](_0x47c8[160],_0x9734x27[_0x47c8[161]],_0x9734x27[_0x47c8[162]]),function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})};methods[_0x47c8[163]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[164]);console[_0x47c8[39]](_0x47c8[165]);_0x9734x26[_0x47c8[45]](util[_0x47c8[38]](_0x47c8[166],_0x9734x27[_0x47c8[167]],_0x9734x27[_0x47c8[162]]),function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})};methods[_0x47c8[168]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[169]);googleTTS(_0x9734x27[_0x47c8[167]],_0x9734x27[_0x47c8[172]],1)[_0x47c8[93]](function(_0x9734x37){console[_0x47c8[39]](_0x47c8[171]);saveAndPlayTTS(_0x9734x26,_0x9734x27,_0x9734x37,_0x47c8[133],_0x9734x28)})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[33]](_0x47c8[170],_0x9734x24[_0x47c8[114]]);_0x9734x28(_0x9734x24,{code:200,result:_0x47c8[153]})})};function saveAndPlayTTS(_0x9734x26,_0x9734x27,_0x9734x37,_0x9734x39,_0x9734x28){var _0x9734x3a={_saveName:_0x47c8[88],_savePath:_0x47c8[88],_convertedPath:_0x47c8[88]};var _0x9734x2f={url:_0x9734x37};_0x9734x3a[_0x47c8[173]]= sr({length:6});_0x9734x3a[_0x47c8[174]]= util[_0x47c8[38]](_0x47c8[175],_0x9734x3a._saveName);var _0x9734x3b=fs[_0x47c8[176]](_0x9734x3a._savePath);request[_0x47c8[202]](_0x9734x2f)[_0x47c8[34]](_0x47c8[33],function(_0x9734x24){console[_0x47c8[39]](_0x47c8[201],_0x9734x24)})[_0x47c8[34]](_0x47c8[150],function(_0x9734x3d){_0x9734x3b[_0x47c8[200]](_0x9734x3d)})[_0x47c8[34]](_0x47c8[177],function(){console[_0x47c8[39]](_0x47c8[178]);_0x9734x3b[_0x47c8[177]]();console[_0x47c8[39]](_0x47c8[179],_0x9734x3a._savePath);_0x9734x3a[_0x47c8[180]]= util[_0x47c8[38]](_0x47c8[181],_0x9734x3a._saveName);console[_0x47c8[39]](_0x47c8[182]);fs[_0x47c8[184]](_0x9734x3a._savePath,parseInt(_0x47c8[183],8));console[_0x47c8[39]](_0x47c8[185],_0x9734x3a._convertedPath);var _0x9734x3c=sox[_0x47c8[187]](_0x9734x3a._savePath,_0x9734x3a._convertedPath,{sampleRate:8000,format:_0x47c8[186],channelCount:1,bitRate:192* 1024,compressionQuality:5});_0x9734x3c[_0x47c8[34]](_0x47c8[33],function(_0x9734x24){console[_0x47c8[33]](_0x47c8[188],_0x9734x24);deleteTempFile(_0x9734x3a._savePath);_0x9734x28(_0x9734x24,{code:200,result:_0x47c8[153]})});_0x9734x3c[_0x47c8[34]](_0x47c8[177],function(){console[_0x47c8[39]](_0x47c8[189]);console[_0x47c8[39]](_0x47c8[190]);fs[_0x47c8[184]](_0x9734x3a._convertedPath,parseInt(_0x47c8[183],8));switch(_0x9734x39){case _0x47c8[133]:console[_0x47c8[39]](_0x47c8[191]);_0x9734x26[_0x47c8[52]](_0x47c8[136],util[_0x47c8[38]](_0x47c8[192],_0x9734x3a._saveName),function(_0x9734x24,_0x9734x29){if(_0x9734x24){console[_0x47c8[39]](_0x47c8[193],_0x9734x24)};console[_0x47c8[39]](_0x47c8[194]);deleteTempFile(_0x9734x3a._savePath);deleteTempFile(_0x9734x3a._convertedPath);_0x9734x28(_0x9734x24,{code:200,result:_0x47c8[153]})});break;case _0x47c8[199]:console[_0x47c8[39]](_0x47c8[195]);_0x9734x26[_0x47c8[45]](util[_0x47c8[38]](_0x47c8[196],util[_0x47c8[38]](_0x47c8[192],_0x9734x3a._saveName),_0x9734x27[_0x47c8[197]]),function(_0x9734x24,_0x9734x29){if(_0x9734x24){console[_0x47c8[39]](_0x47c8[198],_0x9734x24)};console[_0x47c8[39]](_0x47c8[194]);deleteTempFile(_0x9734x3a._savePath);deleteTempFile(_0x9734x3a._convertedPath);_0x9734x28(_0x9734x24,{code:200,result:_0x47c8[153]})});break;default:console[_0x47c8[39]](_0x47c8[191]);_0x9734x26[_0x47c8[52]](_0x47c8[136],util[_0x47c8[38]](_0x47c8[192],_0x9734x3a._saveName),function(_0x9734x24,_0x9734x29){if(_0x9734x24){console[_0x47c8[39]](_0x47c8[193],_0x9734x24)};console[_0x47c8[39]](_0x47c8[194]);deleteTempFile(_0x9734x3a._savePath);deleteTempFile(_0x9734x3a._convertedPath);_0x9734x28(_0x9734x24,{code:200,result:_0x47c8[153]})})}});_0x9734x3c[_0x47c8[68]]()})}function deleteTempFile(_0x9734x3f){Promise[_0x47c8[206]](fs[_0x47c8[205]])(_0x9734x3f)[_0x47c8[93]](function(){console[_0x47c8[39]](_0x47c8[203]+ _0x9734x3f+ _0x47c8[204])})[_0x47c8[115]](function(_0x9734x24){})}methods[_0x47c8[207]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[208]);var _0x9734x37=util[_0x47c8[38]](_0x47c8[209],_0x9734x27[_0x47c8[210]],encodeURIComponent(_0x9734x27[_0x47c8[167]]),_0x9734x27[_0x47c8[211]],_0x9734x27[_0x47c8[212]]);try{console[_0x47c8[39]](_0x47c8[213],_0x9734x37);console[_0x47c8[39]](_0x47c8[214]);saveAndPlayTTS(_0x9734x26,_0x9734x27,_0x9734x37,_0x47c8[199],_0x9734x28)}catch(err){console[_0x47c8[33]](_0x47c8[215],err);_0x9734x28(err,{code:200,result:_0x47c8[153]})}};methods[_0x47c8[216]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[217]);var _0x9734x29={};console[_0x47c8[39]](_0x47c8[139]+ _0x9734x27[_0x47c8[140]]+ _0x47c8[141]);if(_0x9734x27[_0x47c8[140]]> 0){_0x9734x27[_0x47c8[140]]--;getFilePath(_0x9734x27[_0x47c8[94]])[_0x47c8[93]](function(_0x9734x36){console[_0x47c8[39]](_0x47c8[142]);_0x9734x26[_0x47c8[45]](util[_0x47c8[38]](_0x47c8[143],_0x9734x36,parseInt(_0x9734x27[_0x47c8[117]])* 1000,_0x9734x27[_0x47c8[218]]),function(_0x9734x24,_0x9734x29){var _0x9734x2d={uniqueid:_0x9734x26[_0x47c8[80]],node:_0x9734x27[_0x47c8[81]],application:_0x9734x27[_0x47c8[82]],data:_0x9734x29[_0x47c8[145]]|| null,project_name:_0x9734x26[_0x47c8[83]],callerid:_0x9734x26[_0x47c8[84]],message:_0x47c8[85]};process[_0x47c8[45]](_0x9734x2d);_0x9734x29[_0x47c8[145]]= _0x9734x29[_0x47c8[145]][_0x47c8[147]](_0x47c8[146],_0x47c8[88])[_0x47c8[106]]();if(_0x9734x29[_0x47c8[145]][_0x47c8[148]]>= parseInt(_0x9734x27[_0x47c8[219]])){if(_0x9734x29[_0x47c8[145]]!== _0x47c8[149]){console[_0x47c8[39]](_0x47c8[220]);if(_0x9734x27[_0x47c8[125]]!== _0x47c8[149]){console[_0x47c8[39]](_0x47c8[151]);var _0x9734x32=getVariableName(_0x9734x27[_0x47c8[125]]);setVariable(_0x9734x26,_0x9734x32,_0x47c8[129]+ _0x9734x29[_0x47c8[145]]+ _0x47c8[129],function(){_0x9734x29= {code:200,result:_0x47c8[153],data:_0x47c8[221]};_0x9734x28(null,_0x9734x29)})}else {console[_0x47c8[39]](_0x47c8[222]);_0x9734x29= {code:200,result:_0x47c8[153],data:_0x47c8[223]};_0x9734x28(null,_0x9734x29)}}else {console[_0x47c8[39]](_0x47c8[224]);_0x9734x29= {code:500,result:_0x47c8[149]};_0x9734x28(null,_0x9734x29)}}else {console[_0x47c8[39]](_0x47c8[225]);_0x9734x29= {code:200,result:_0x47c8[153],data:_0x47c8[223]};_0x9734x28(null,_0x9734x29)}})})}else {console[_0x47c8[39]](_0x47c8[155]);_0x9734x29= {code:500,result:_0x47c8[149]};_0x9734x28(null,_0x9734x29)}};methods[_0x47c8[226]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[227]);var _0x9734x29={};console[_0x47c8[39]](_0x47c8[139]+ _0x9734x27[_0x47c8[140]]+ _0x47c8[141]);if(_0x9734x27[_0x47c8[140]]> 0){_0x9734x27[_0x47c8[140]]--;getFilePath(_0x9734x27[_0x47c8[94]])[_0x47c8[93]](function(_0x9734x36){console[_0x47c8[39]](_0x47c8[142]);_0x9734x26[_0x47c8[45]](util[_0x47c8[38]](_0x47c8[143],_0x9734x36,parseInt(_0x9734x27[_0x47c8[117]])* 1000,_0x9734x27[_0x47c8[218]]),function(_0x9734x24,_0x9734x29){var _0x9734x2d={uniqueid:_0x9734x26[_0x47c8[80]],node:_0x9734x27[_0x47c8[81]],application:_0x9734x27[_0x47c8[82]],data:_0x9734x29[_0x47c8[145]]|| null,project_name:_0x9734x26[_0x47c8[83]],callerid:_0x9734x26[_0x47c8[84]],message:_0x47c8[85]};_0x9734x29[_0x47c8[145]]= _0x9734x29[_0x47c8[145]][_0x47c8[147]](_0x47c8[146],_0x47c8[88])[_0x47c8[106]]();if(_0x9734x29[_0x47c8[145]][_0x47c8[148]]>= parseInt(_0x9734x27[_0x47c8[219]])){if(_0x9734x29[_0x47c8[145]]!== _0x47c8[149]){console[_0x47c8[39]](_0x47c8[220]);if(_0x9734x27[_0x47c8[125]]!== _0x47c8[149]){var _0x9734x40=_0x9734x29[_0x47c8[145]][_0x47c8[105]](_0x47c8[88]);var _0x9734x41=_0x9734x40[_0x47c8[148]];var _0x9734x42;var _0x9734x43=Number(_0x9734x27[_0x47c8[228]]);if(_0x9734x27[_0x47c8[229]]=== _0x47c8[230]){for(_0x9734x42= 0;_0x9734x42< _0x9734x43&& _0x9734x42< _0x9734x41;_0x9734x42++){_0x9734x40[_0x9734x42]= _0x47c8[231]}}else {for(_0x9734x42= _0x9734x41- 1;_0x9734x42>= 0&& _0x9734x43> 0;_0x9734x42--,_0x9734x43--){_0x9734x40[_0x9734x42]= _0x47c8[231]}};_0x9734x2d[_0x47c8[150]]= _0x9734x40[_0x47c8[67]](_0x47c8[88]);process[_0x47c8[45]](_0x9734x2d);console[_0x47c8[39]](_0x47c8[151]);var _0x9734x32=getVariableName(_0x9734x27[_0x47c8[125]]);setVariable(_0x9734x26,_0x9734x32,_0x47c8[129]+ _0x9734x29[_0x47c8[145]]+ _0x47c8[129],function(){_0x9734x29= {code:200,result:_0x47c8[153],data:_0x47c8[221]};_0x9734x28(null,_0x9734x29)})}else {process[_0x47c8[45]](_0x9734x2d);console[_0x47c8[39]](_0x47c8[222]);_0x9734x29= {code:200,result:_0x47c8[153]};_0x9734x28(null,_0x9734x29)}}else {process[_0x47c8[45]](_0x9734x2d);console[_0x47c8[39]](_0x47c8[224]);_0x9734x29= {code:500,result:_0x47c8[149]};_0x9734x28(null,_0x9734x29)}}else {process[_0x47c8[45]](_0x9734x2d);console[_0x47c8[39]](_0x47c8[225]);_0x9734x29= {code:200,result:_0x47c8[153],data:_0x47c8[223]};_0x9734x28(null,_0x9734x29)}})})}else {console[_0x47c8[39]](_0x47c8[155]);_0x9734x29= {code:500,result:_0x47c8[149]};_0x9734x28(null,_0x9734x29)}};methods[_0x47c8[232]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[233]);var _0x9734x44=sr({length:4});console[_0x47c8[39]](_0x47c8[234]);_0x9734x26[_0x47c8[45]](util[_0x47c8[38]](_0x47c8[235],path[_0x47c8[67]](config[_0x47c8[236]],_0x47c8[237],_0x9734x26[_0x47c8[80]]+ _0x47c8[238]+ _0x9734x44),_0x9734x27[_0x47c8[239]]|| _0x47c8[186],_0x9734x27[_0x47c8[162]],_0x9734x27[_0x47c8[62]]* 1000,null,true,null),function(_0x9734x24,_0x9734x29){if(_0x9734x29[_0x47c8[240]]=== 200&& _0x9734x29[_0x47c8[145]]!== _0x47c8[149]){SquareRecording[_0x47c8[252]]({uniqueid:_0x9734x26[_0x47c8[80]],callerid:_0x9734x26[_0x47c8[84]],calleridname:_0x9734x26[_0x47c8[244]],context:_0x9734x26[_0x47c8[245]],extension:_0x9734x26[_0x47c8[246]],priority:_0x9734x26[_0x47c8[247]],accountcode:_0x9734x26[_0x47c8[248]],dnid:_0x9734x26[_0x47c8[249]],project_name:_0x9734x26[_0x47c8[83]],saveName:_0x9734x26[_0x47c8[80]]+ _0x47c8[238]+ _0x9734x44,filename:_0x9734x27[_0x47c8[250]]|| null,savePath:path[_0x47c8[67]](config[_0x47c8[236]],_0x47c8[237],_0x9734x26[_0x47c8[80]]+ _0x47c8[238]+ _0x9734x44+ _0x47c8[251])})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x47c8[241]+ _0x9734x27[_0x47c8[82]]+ _0x47c8[242]+ _0x9734x27[_0x47c8[81]]+ _0x47c8[243],_0x9734x24)});console[_0x47c8[39]](_0x47c8[253]);_0x9734x26[_0x47c8[45]](util[_0x47c8[38]](_0x47c8[254],_0x47c8[255],_0x9734x26[_0x47c8[80]]+ _0x47c8[238]+ _0x9734x44),function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})}else {_0x9734x28(_0x9734x24,_0x9734x29)}})};methods[_0x47c8[256]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[257]);var _0x9734x29;var _0x9734x45=_0x47c8[258];var _0x9734x46;if(!collections[_0x47c8[259]]){getIntervals(false)};var _0x9734x47=_[_0x47c8[57]](collections[_0x47c8[259]],{id:parseInt(_0x9734x27[_0x47c8[260]])});if(!_0x9734x47[_0x47c8[261]]){_0x9734x46= _[_0x47c8[263]](collections[_0x47c8[259]],{IntervalId:parseInt(_0x9734x47[_0x47c8[262]])})};if(_0x9734x46){console[_0x47c8[39]](_0x47c8[264]);if(_0x9734x46[_0x47c8[148]]){console[_0x47c8[39]](_0x47c8[139]+ _0x9734x46[_0x47c8[148]]+ _0x47c8[265]);var _0x9734x48;console[_0x47c8[39]](_0x47c8[266]);_0x9734x46[_0x47c8[131]](function(_0x9734x33,_0x9734x34){_0x9734x48= splitInterval(_0x9734x33[_0x47c8[267]]);if(isIntervalValid(_0x9734x48)){console[_0x47c8[39]](_0x47c8[268]+ _0x9734x34+ _0x47c8[269]);_0x9734x45= _0x47c8[270]}})}else {console[_0x47c8[39]](_0x47c8[271]);_0x9734x45= _0x47c8[270]}}else {console[_0x47c8[39]](_0x47c8[272]);var _0x9734x49=splitInterval(_0x9734x47[_0x47c8[267]]);if(isIntervalValid(_0x9734x49)){console[_0x47c8[39]](_0x47c8[273]);_0x9734x45= _0x47c8[270]}};console[_0x47c8[39]](_0x47c8[274]+ _0x9734x45+ _0x47c8[275]);_0x9734x29= {code:200,result:_0x47c8[153],data:_0x9734x45};_0x9734x28(null,_0x9734x29)};methods[_0x47c8[276]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[277]);console[_0x47c8[39]](_0x47c8[278]);var _0x9734x32=getVariableName(_0x9734x27[_0x47c8[125]]);getVariable(_0x9734x26,_0x9734x32,function(_0x9734x24,_0x9734x29){if(!_0x9734x29[_0x47c8[150]]){_0x9734x29[_0x47c8[150]]= _0x47c8[156]};_0x9734x28(null,_0x9734x29)})};methods[_0x47c8[279]]= function(_0x9734x26,_0x9734x27,_0x9734x28){var _0x9734x2d={uniqueid:_0x9734x26[_0x47c8[80]],node:_0x9734x27[_0x47c8[81]],application:_0x9734x27[_0x47c8[82]],data:_0x9734x27[_0x47c8[280]]|| null,project_name:_0x9734x26[_0x47c8[83]],callerid:_0x9734x26[_0x47c8[84]],message:_0x47c8[85]};process[_0x47c8[45]](_0x9734x2d);var _0x9734x29={code:200,result:_0x47c8[281]};_0x9734x28(null,_0x9734x29)};methods[_0x47c8[282]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[283]);var _0x9734x2d={uniqueid:_0x9734x26[_0x47c8[80]],node:_0x9734x27[_0x47c8[81]],application:_0x9734x27[_0x47c8[82]],data:_0x9734x27[_0x47c8[284]],project_name:_0x9734x26[_0x47c8[83]],callerid:_0x9734x26[_0x47c8[84]],message:_0x47c8[85]};process[_0x47c8[45]](_0x9734x2d);var _0x9734x29;if(_0x9734x27[_0x47c8[284]]!== _0x47c8[149]){var _0x9734x4a=_[_0x47c8[57]](collections[_0x47c8[285]],{id:Number(_0x9734x27[_0x47c8[284]])});if(_0x9734x4a){var _0x9734x4b={from:[_0x9734x4a[_0x47c8[286]]],to:_0x9734x27[_0x47c8[287]][_0x47c8[105]](_0x47c8[66]),cc:_0x9734x27[_0x47c8[288]]?_0x9734x27[_0x47c8[288]][_0x47c8[105]](_0x47c8[66]):[],subject:_0x9734x27[_0x47c8[289]],html:_0x9734x27[_0x47c8[167]],voiceSource:_0x9734x26[_0x47c8[80]],auto:true,message:_0x47c8[290]};if(_0x9734x27[_0x47c8[291]]!== _0x47c8[149]){var _0x9734x4c=_[_0x47c8[57]](collections[_0x47c8[292]],{id:Number(_0x9734x27[_0x47c8[291]])});if(_0x9734x4c){var _0x9734x4d={from:_0x9734x4b[_0x47c8[293]],to:_0x9734x4b[_0x47c8[287]],cc:_0x9734x4b[_0x47c8[288]],subject:_0x9734x4b[_0x47c8[289]],body:_0x9734x4b[_0x47c8[294]]};_0x9734x4b[_0x47c8[289]]= _0x9734x4c[_0x47c8[289]]?Mustache[_0x47c8[295]](_0x9734x4c[_0x47c8[289]],_0x9734x4d):null;_0x9734x4b[_0x47c8[294]]= _0x9734x4c[_0x47c8[294]]?Mustache[_0x47c8[295]](_0x9734x4c[_0x47c8[294]],_0x9734x4d):null;process[_0x47c8[45]](_0x9734x4b);_0x9734x29= {code:200,result:_0x47c8[281]};_0x9734x28(null,_0x9734x29)}else {console[_0x47c8[39]](_0x47c8[296]);_0x9734x29= {code:200,result:_0x47c8[281]};_0x9734x28(null,_0x9734x29)}}else {process[_0x47c8[45]](_0x9734x4b);_0x9734x29= {code:200,result:_0x47c8[281]};_0x9734x28(null,_0x9734x29)}}else {console[_0x47c8[39]](_0x9734x27[_0x47c8[284]]?_0x47c8[297]:_0x47c8[298]);_0x9734x29= {code:200,result:_0x47c8[281]};_0x9734x28(null,_0x9734x29)}}else {console[_0x47c8[39]](_0x47c8[299]);_0x9734x29= {code:200,result:_0x47c8[281]};_0x9734x28(null,_0x9734x29)}};methods[_0x47c8[300]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[301]);var _0x9734x2d={uniqueid:_0x9734x26[_0x47c8[80]],node:_0x9734x27[_0x47c8[81]],application:_0x9734x27[_0x47c8[82]],data:_0x9734x27[_0x47c8[284]],project_name:_0x9734x26[_0x47c8[83]],callerid:_0x9734x26[_0x47c8[84]],message:_0x47c8[85]};process[_0x47c8[45]](_0x9734x2d);var _0x9734x4b={body:_0x9734x27[_0x47c8[302]],SmsAccountId:_0x9734x27[_0x47c8[284]],source:_0x9734x26[_0x47c8[80]],auto:true,message:_0x47c8[303]};var _0x9734x29;if(_0x9734x27[_0x47c8[284]]!== _0x47c8[149]){var _0x9734x4a=_[_0x47c8[57]](collections[_0x47c8[304]],{id:Number(_0x9734x27[_0x47c8[284]])});if(_0x9734x4a){if(_0x9734x4a[_0x47c8[305]]=== _0x47c8[306]){_0x9734x4b[_0x47c8[293]]= /^[\+][0-9]+$/[_0x47c8[307]](_0x9734x4a[_0x47c8[75]])?_0x9734x4a[_0x47c8[75]]:_0x47c8[308]+ _0x9734x4a[_0x47c8[75]];_0x9734x4b[_0x47c8[287]]= /^[\+][0-9]+$/[_0x47c8[307]](_0x9734x27[_0x47c8[287]])?_0x9734x27[_0x47c8[287]]:_0x47c8[308]+ _0x9734x27[_0x47c8[287]]}else {_0x9734x4b[_0x47c8[293]]= /^[\+][0-9]+$/[_0x47c8[307]](_0x9734x4a[_0x47c8[75]])?_0x9734x4a[_0x47c8[75]][_0x47c8[147]](_0x47c8[308],_0x47c8[88]):_0x9734x4a[_0x47c8[75]];_0x9734x4b[_0x47c8[287]]= /^[\+][0-9]+$/[_0x47c8[307]](_0x9734x27[_0x47c8[287]])?_0x9734x27[_0x47c8[287]][_0x47c8[147]](_0x47c8[308],_0x47c8[88]):_0x9734x27[_0x47c8[287]]};process[_0x47c8[45]](_0x9734x4b);_0x9734x29= {code:200,result:_0x47c8[281]};_0x9734x28(null,_0x9734x29)}else {console[_0x47c8[39]](_0x47c8[309]);_0x9734x29= {code:200,result:_0x47c8[281]};_0x9734x28(null,_0x9734x29)}}else {console[_0x47c8[39]](_0x47c8[299]);_0x9734x29= {code:200,result:_0x47c8[281]};_0x9734x28(null,_0x9734x29)}};methods[_0x47c8[310]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[311]);var _0x9734x2d={uniqueid:_0x9734x26[_0x47c8[80]],node:_0x9734x27[_0x47c8[81]],application:_0x9734x27[_0x47c8[82]],data:_[_0x47c8[106]](_0x9734x27[_0x47c8[312]])|| null,project_name:_0x9734x26[_0x47c8[83]],callerid:_0x9734x26[_0x47c8[84]],message:_0x47c8[85]};process[_0x47c8[45]](_0x9734x2d);console[_0x47c8[39]](_0x47c8[313]);sh[_0x47c8[52]](_[_0x47c8[106]](_0x9734x27[_0x47c8[312]]),function(_0x9734x25,_0x9734x4e){var _0x9734x4f=_0x9734x4e[_0x47c8[147]](/(\r\n|\n|\r)/gm,_0x47c8[88]);console[_0x47c8[39]](_0x47c8[314],_0x9734x4f);console[_0x47c8[39]](_0x47c8[315]);var _0x9734x32=getVariableName(_0x9734x27[_0x47c8[125]]);setVariable(_0x9734x26,_0x9734x32,_0x47c8[129]+ _0x9734x4f+ _0x47c8[129],_0x9734x28)})};methods[_0x47c8[2]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[316]);console[_0x47c8[39]](_0x47c8[317]);_0x9734x26[_0x47c8[52]](_0x47c8[318],_0x9734x27[_0x47c8[312]],_0x9734x27[_0x47c8[319]],function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})};methods[_0x47c8[320]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[321]);if(!collections[_0x47c8[322]]){getProjects(false)};var _0x9734x50=_[_0x47c8[57]](collections[_0x47c8[322]],{id:parseInt(_0x9734x27[_0x47c8[323]])});console[_0x47c8[39]](_0x47c8[324]+ _0x9734x50[_0x47c8[60]]+ _0x47c8[50]);_0x9734x26[_0x47c8[52]](_0x47c8[318],util[_0x47c8[38]](_0x47c8[325],_0x9734x50[_0x47c8[60]]),function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})};methods[_0x47c8[326]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[327]);wait[_0x47c8[130]](setVariable,_0x9734x26,_0x47c8[328],_0x47c8[329]);wait[_0x47c8[130]](setVariable,_0x9734x26,_0x47c8[116],_0x47c8[329]);wait[_0x47c8[130]](setVariable,_0x9734x26,_0x47c8[330],_0x47c8[329]);var _0x9734x51=wait[_0x47c8[130]](asr,_0x9734x26,_0x9734x27);if(!_[_0x47c8[331]](_0x9734x51)){console[_0x47c8[39]](_0x47c8[332]);_[_0x47c8[333]](_0x9734x51,function(_0x9734x52,_0x9734x53){wait[_0x47c8[130]](setVariable,_0x9734x26,_0x9734x53,_0x47c8[129]+ _0x9734x52+ _0x47c8[129])})}else {console[_0x47c8[39]](_0x47c8[334]);wait[_0x47c8[130]](setVariable,_0x9734x26,_0x47c8[335],_0x47c8[336])}};function asr(_0x9734x26,_0x9734x27,_0x9734x28){var _0x9734x3a={_saveName:_0x47c8[88],_savePath:_0x47c8[88],_convertedPath:_0x47c8[88]};var _0x9734x51={};_0x9734x3a[_0x47c8[173]]= sr({length:6});_0x9734x3a[_0x47c8[174]]= util[_0x47c8[38]](_0x47c8[181],_0x9734x3a._saveName);var _0x9734x55=util[_0x47c8[38]](_0x47c8[337],_0x9734x3a._savePath,_0x9734x27[_0x47c8[62]]?_0x9734x27[_0x47c8[62]]:_0x47c8[88]);if(_0x9734x27[_0x47c8[338]]&& _0x9734x27[_0x47c8[338]]!== _0x47c8[339]){_0x9734x55+= _0x47c8[340]};if(_0x9734x27[_0x47c8[197]]&& _0x9734x27[_0x47c8[197]]!== _0x47c8[341]){_0x9734x55+= _0x47c8[154]};_0x9734x26[_0x47c8[52]](_0x47c8[342],_0x9734x55,function(_0x9734x24,_0x9734x29){if(_0x9734x24){console[_0x47c8[39]](_0x47c8[343],_0x9734x24);_0x9734x28(_0x9734x24,null)}else {console[_0x47c8[39]](_0x47c8[344]);var _0x9734x37=util[_0x47c8[38]](_0x47c8[345],_0x9734x27[_0x47c8[210]],_0x9734x27[_0x47c8[346]]);if(_0x9734x27[_0x47c8[347]]&& _0x9734x27[_0x47c8[347]]!== _0x47c8[153]){_0x9734x37+= util[_0x47c8[38]](_0x47c8[348],encodeURIComponent(_0x9734x27[_0x47c8[347]]))}else {_0x9734x37+= _0x47c8[349]};console[_0x47c8[39]](_0x47c8[350]);Promise[_0x47c8[206]](fs[_0x47c8[363]])(_0x9734x3a._savePath)[_0x47c8[93]](function(_0x9734x31){console[_0x47c8[39]](_0x47c8[358]);var _0x9734x59= new Buffer(_0x9734x31,_0x47c8[360]).toString(_0x47c8[359]);_0x9734x37+= util[_0x47c8[38]](_0x47c8[361],_0x9734x59);var _0x9734x2f={url:_0x9734x37};console[_0x47c8[39]](_0x47c8[362]);return rp(_0x9734x2f)})[_0x47c8[93]](function(_0x9734x56){console[_0x47c8[39]](_0x47c8[353]);_0x9734x56= _0x9734x56[_0x47c8[105]](_0x47c8[354]);var _0x9734x57,_0x9734x58;_[_0x47c8[131]](_0x9734x56,function(_0x9734x33){_0x9734x57= _0x9734x33[_0x47c8[105]](_0x47c8[355]);if(_0x9734x57[_0x47c8[148]]=== 2){switch(_0x9734x57[0]){case _0x47c8[167]:_0x9734x51[_0x47c8[328]]= _0x9734x57[1][_0x47c8[147]](/\+/g,_0x47c8[356]);break;case _0x47c8[145]:if(_0x9734x57[1]=== _0x47c8[357]){_0x9734x51[_0x47c8[116]]= 0};break;case _0x47c8[330]:_0x9734x51[_0x47c8[330]]= decodeURIComponent(_0x9734x57[1]);break;case _0x47c8[114]:_0x9734x51[_0x47c8[335]]= decodeURIComponent(_0x9734x57[1][_0x47c8[147]](/\+/g,_0x47c8[356]));break;default:}}})})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x47c8[352],_0x9734x24)})[_0x47c8[112]](function(){console[_0x47c8[39]](_0x47c8[351]);deleteTempFile(_0x9734x3a._savePath);_0x9734x28(null,_0x9734x51)})}})}methods[_0x47c8[364]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[365]);if(!collections[_0x47c8[366]]){getDbConnections(false)};var _0x9734x5a=_[_0x47c8[57]](collections[_0x47c8[366]],{id:parseInt(_0x9734x27[_0x47c8[367]])});console[_0x47c8[39]](_0x47c8[368]);var _0x9734x2d={uniqueid:_0x9734x26[_0x47c8[80]],node:_0x9734x27[_0x47c8[81]],application:_0x9734x27[_0x47c8[82]],data:_0x9734x27[_0x47c8[369]]|| null,project_name:_0x9734x26[_0x47c8[83]],callerid:_0x9734x26[_0x47c8[84]],message:_0x47c8[85]};process[_0x47c8[45]](_0x9734x2d);try{db[_0x47c8[371]](_0x9734x5a[_0x47c8[370]]);var _0x9734x3d=db[_0x47c8[372]](_0x9734x27[_0x47c8[369]]);db[_0x47c8[373]]();setVariablesMatrix(_0x9734x26,_0x9734x27,_0x9734x28,_0x9734x3d)}catch(e){console[_0x47c8[39]](e[_0x47c8[114]]);wait[_0x47c8[130]](setVariable,_0x9734x26,_0x47c8[374],_0x47c8[270]);wait[_0x47c8[130]](setVariable,_0x9734x26,_0x47c8[375],_0x47c8[129]+ e[_0x47c8[114]]+ _0x47c8[129])}};methods[_0x47c8[376]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[377]);console[_0x47c8[39]](_0x47c8[378]+ _0x9734x27[_0x47c8[246]]+ _0x47c8[379]);_0x9734x26[_0x47c8[52]](_0x47c8[65],util[_0x47c8[38]](_0x47c8[380],_0x9734x27[_0x47c8[246]],_0x9734x27[_0x47c8[245]]),function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})};methods[_0x47c8[381]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[382]);var _0x9734x29={code:200,result:_0x47c8[153]};_0x9734x26[_0x47c8[52]](_0x47c8[383],_0x47c8[384]+ _0x9734x27[_0x47c8[385]]+ _0x47c8[129],function(_0x9734x24,_0x9734x29){console[_0x47c8[39]](_0x47c8[386]);try{_0x9734x29[_0x47c8[150]]= String(eval(_0x9734x27[_0x47c8[385]])?_0x47c8[270]:_0x47c8[258])}catch(_0x9734x24){console[_0x47c8[39]](_0x47c8[387]);_0x9734x29[_0x47c8[150]]= _0x47c8[258]};console[_0x47c8[39]](_0x47c8[388]+ _0x9734x29[_0x47c8[150]]);_0x9734x28(null,_0x9734x29)})};methods[_0x47c8[389]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[390]);console[_0x47c8[39]](_0x47c8[391]);_0x9734x26[_0x47c8[389]]()};methods[_0x47c8[392]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[393]);var _0x9734x4e=(_0x9734x27[_0x47c8[394]])?_0x47c8[129]+ _0x9734x27[_0x47c8[394]]+ _0x47c8[129]:_0x47c8[129]+ _0x9734x27[_0x47c8[81]]+ _0x47c8[129];console[_0x47c8[39]](_0x47c8[395]+ _0x9734x4e);_0x9734x26[_0x47c8[52]](_0x47c8[383],_0x9734x4e,function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})};methods[_0x47c8[396]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[397]);console[_0x47c8[39]](_0x47c8[398]);_0x9734x26[_0x47c8[45]](util[_0x47c8[38]](_0x47c8[399],_0x9734x27[_0x47c8[400]],_0x9734x27[_0x47c8[162]]),function(_0x9734x24,_0x9734x29){_0x9734x28(_0x9734x24,_0x9734x29)})};methods[_0x47c8[401]]= function(_0x9734x26,_0x9734x27,_0x9734x28){console[_0x47c8[39]](_0x47c8[402]);console[_0x47c8[39]](_0x47c8[403]);var _0x9734x32=getVariableName(_0x9734x27[_0x47c8[125]]);wait[_0x47c8[130]](setVariable,_0x9734x26,_0x9734x32,_0x47c8[129]+ _0x9734x27[_0x47c8[404]]+ _0x47c8[129])};function getVertices(_0x9734x5c){return _[_0x47c8[408]](_0x9734x5c,function(_0x9734x31,_0x9734x5d,_0x9734x5e){if(_0x9734x5e=== _0x47c8[405]){return _0x9734x31};if(_[_0x47c8[126]](_0x9734x5d)){_[_0x47c8[407]](_0x9734x5d,function(_0x9734x52,_0x9734x53){_0x9734x31[_0x9734x52[_0x47c8[406]][_0x47c8[262]]]= _0x9734x52[_0x47c8[406]];_0x9734x31[_0x9734x52[_0x47c8[406]][_0x47c8[262]]][_0x47c8[82]]= _0x9734x5e});return _0x9734x31};_0x9734x31[_0x9734x5d[_0x47c8[406]][_0x47c8[262]]]= _0x9734x5d[_0x47c8[406]];_0x9734x31[_0x9734x5d[_0x47c8[406]][_0x47c8[262]]][_0x47c8[82]]= _0x9734x5e;return _0x9734x31},{})}function getTargetBySource(_0x9734x5c,_0x9734x60,_0x9734x52,_0x9734x61){return _[_0x47c8[145]](_[_0x47c8[57]](_0x9734x5c[_0x47c8[405]],function(_0x9734x5d){if(_0x9734x5d[_0x47c8[406]][_0x47c8[409]]&& _0x9734x5d[_0x47c8[406]][_0x47c8[410]]){if(_0x9734x5d[_0x47c8[406]][_0x47c8[410]]=== _0x9734x60){if(_0x9734x5d[_0x47c8[406]][_0x47c8[411]]&& _0x9734x5d[_0x47c8[406]][_0x47c8[411]]!== _0x9734x52){if(_0x9734x61){var _0x9734x62=_0x9734x5d[_0x47c8[406]][_0x47c8[411]][_0x47c8[105]](_0x47c8[66]);if(_[_0x47c8[412]](_0x9734x62,_0x9734x52)){return true}};return false};return true}};return false}),_0x47c8[413])}function recurReplace(_0x9734x64,_0x9734x26,_0x9734x65){var _0x9734x66=0,_0x9734x67={},_0x9734x42;var _0x9734x68=0;for(_0x9734x42= 0;_0x9734x42< _0x9734x64[_0x47c8[148]];_0x9734x42++){if(_0x9734x64[_0x47c8[414]](_0x9734x42)=== _0x47c8[415]){if(_0x9734x68=== 0){_0x9734x66= _0x9734x42};_0x9734x68++};if(_0x9734x64[_0x47c8[414]](_0x9734x42)=== _0x47c8[416]){_0x9734x68--;if(_0x9734x68=== 0){_0x9734x67[_0x9734x64[_0x47c8[417]](_0x9734x66+ 1,_0x9734x42)]= _0x9734x64[_0x47c8[417]](_0x9734x66+ 1,_0x9734x42)}}};if(Object[_0x47c8[418]](_0x9734x67)[_0x47c8[148]]!== 0){for(var _0x9734x53 in _0x9734x67){_0x9734x67[_0x9734x53]= recurReplace(_0x9734x53,_0x9734x26)};for(var _0x9734x69 in _0x9734x67){_0x9734x64= _0x9734x64[_0x47c8[147]]( new RegExp(_0x47c8[415]+ _0x9734x69[_0x47c8[147]](/[.*+?^${}()|[\]\\]/g,_0x47c8[419])+ _0x47c8[416],_0x47c8[420]),_0x9734x67[_0x9734x69])}};if(_0x9734x65){return _0x9734x64}else {var _0x9734x52=wait[_0x47c8[130]](getVariable,_0x9734x26,_0x9734x64);return _0x9734x52[_0x47c8[150]]|| _0x47c8[415]+ _0x9734x64+ _0x47c8[416]}}function replaceAllVariables(_0x9734x26,_0x9734x27,_0x9734x28){var _0x9734x6b=_[_0x47c8[421]](_0x9734x27);for(var _0x9734x53 in _0x9734x6b){_0x9734x6b[_0x9734x53]= recurReplace(_0x9734x6b[_0x9734x53],_0x9734x26,true);console[_0x47c8[39]](_0x47c8[422],_0x9734x6b[_0x9734x53])};return _0x9734x6b}function xstart(_0x9734x26){var _0x9734x5c=_0x9734x26[_0x47c8[236]];var _0x9734x6d=_0x9734x26[_0x47c8[423]];if(_0x9734x5c[_0x47c8[68]]){if(!_[_0x47c8[126]](_0x9734x5c[_0x47c8[68]])){var _0x9734x60=_0x9734x5c[_0x47c8[68]][_0x47c8[406]][_0x47c8[262]];var _0x9734x29={};do{try{var _0x9734x27=replaceAllVariables(_0x9734x26,_0x9734x6d[_0x9734x60]);if(_0x9734x27){if(_[_0x47c8[424]](methods[_0x9734x27[_0x47c8[82]]])){_0x9734x29= wait[_0x47c8[130]](methods[_0x9734x27[_0x47c8[82]]],_0x9734x26,_0x9734x27)}else {_0x9734x29= wait[_0x47c8[130]](methods[_0x47c8[392]],_0x9734x26,_0x9734x27)};if(_0x9734x29[_0x47c8[240]]=== 200&& _0x9734x29[_0x47c8[145]]!== _0x47c8[149]){if(_0x9734x27[_0x47c8[82]]=== _0x47c8[137]|| _0x9734x27[_0x47c8[82]]=== _0x47c8[216]|| _0x9734x27[_0x47c8[82]]=== _0x47c8[226]){_0x9734x6d[_0x9734x60][_0x47c8[140]]= _0x9734x27[_0x47c8[140]]};var _0x9734x6e=getTargetBySource(_0x9734x5c,_0x9734x60,_0x9734x29[_0x47c8[150]],_0x9734x27[_0x47c8[82]]=== _0x47c8[137]);if(!_0x9734x6e){if(_0x9734x27[_0x47c8[82]]=== _0x47c8[137]){if(_0x9734x27[_0x47c8[140]]> 0){_0x9734x6e= getTargetBySource(_0x9734x5c,_0x9734x60,_0x47c8[223],true);if(!_0x9734x6e){_0x9734x6e= _0x9734x60}}else {_0x9734x6e= getTargetBySource(_0x9734x5c,_0x9734x60,_0x47c8[156],true)}};if((_0x9734x27[_0x47c8[82]]=== _0x47c8[216]|| _0x9734x27[_0x47c8[82]]=== _0x47c8[226])&& _0x9734x27[_0x47c8[140]]> 0){_0x9734x6e= _0x9734x60};if(_0x9734x27[_0x47c8[82]]=== _0x47c8[276]&& _0x9734x29[_0x47c8[150]]!== _0x47c8[156]){_0x9734x6e= getTargetBySource(_0x9734x5c,_0x9734x60,_0x47c8[156])}};_0x9734x60= _0x9734x6e}else {_0x9734x60= null}}else {_0x9734x60= null}}catch(err){console[_0x47c8[39]](err)}}while(_0x9734x60);;console[_0x47c8[39]](_0x47c8[425]);_0x9734x26[_0x47c8[389]]()}}}function xfinally(_0x9734x26){var _0x9734x5c=_0x9734x26[_0x47c8[236]];var _0x9734x6d=_0x9734x26[_0x47c8[423]];if(_0x9734x5c[_0x47c8[112]]){if(!_[_0x47c8[126]](_0x9734x5c[_0x47c8[112]])){var _0x9734x60=_0x9734x5c[_0x47c8[112]][_0x47c8[406]][_0x47c8[262]];var _0x9734x29={};do{try{var _0x9734x27=_0x9734x6d[_0x9734x60][_0x47c8[426]]?_0x9734x6d[_0x9734x60]:replaceAllVariables(_0x9734x26,_0x9734x6d[_0x9734x60]);if(_0x9734x27){if(_[_0x47c8[424]](methods[_0x9734x27[_0x47c8[82]]])){_0x9734x29= wait[_0x47c8[130]](methods[_0x9734x27[_0x47c8[82]]],_0x9734x26,_0x9734x27)}else {_0x9734x29= wait[_0x47c8[130]](methods[_0x47c8[392]],_0x9734x26,_0x9734x27)};if(_0x9734x29[_0x47c8[240]]=== 200&& _0x9734x29[_0x47c8[145]]!== _0x47c8[149]){var _0x9734x6e=getTargetBySource(_0x9734x5c,_0x9734x60,_0x9734x29[_0x47c8[150]],_0x9734x27[_0x47c8[82]]=== _0x47c8[137]);if(!_0x9734x6e){if(_0x9734x27[_0x47c8[82]]=== _0x47c8[137]){if(_0x9734x27[_0x47c8[140]]> 0){_0x9734x6e= getTargetBySource(_0x9734x5c,_0x9734x60,_0x47c8[223],true);if(!_0x9734x6e){_0x9734x6e= _0x9734x60}}else {_0x9734x6e= getTargetBySource(_0x9734x5c,_0x9734x60,_0x47c8[156],true)}};if(_0x9734x27[_0x47c8[82]]=== _0x47c8[216]&& _0x9734x27[_0x47c8[140]]> 0){_0x9734x6e= _0x9734x60};if(_0x9734x27[_0x47c8[82]]=== _0x47c8[276]&& _0x9734x29[_0x47c8[150]]!== _0x47c8[156]){_0x9734x6e= getTargetBySource(_0x9734x5c,_0x9734x60,_0x47c8[156])}};_0x9734x60= _0x9734x6e}else {_0x9734x60= null}}else {_0x9734x60= null}}catch(err){console[_0x47c8[39]](err)}}while(_0x9734x60);;_0x9734x26[_0x47c8[389]]();console[_0x47c8[39]](_0x47c8[427])}};_0x9734x26[_0x47c8[177]]()}function main(_0x9734x26){_0x9734x26[_0x47c8[34]](_0x47c8[33],function(_0x9734x24){console[_0x47c8[39]](_0x47c8[428],_0x9734x24)});_0x9734x26[_0x47c8[34]](_0x47c8[35],function(){console[_0x47c8[39]](_0x47c8[429])});_0x9734x26[_0x47c8[34]](_0x47c8[389],function(){if(_0x9734x26[_0x47c8[112]]){_0x9734x26[_0x47c8[112]]= false;console[_0x47c8[39]](_0x47c8[430]);wait[_0x47c8[431]](xfinally,_0x9734x26)}else {process[_0x47c8[45]]({message:_0x47c8[432],uniqueid:_0x9734x26[_0x47c8[80]],leaveAt:moment()[_0x47c8[38]](_0x47c8[107])});console[_0x47c8[39]](_0x47c8[433])}});_0x9734x26[_0x47c8[34]](_0x47c8[117],function(_0x9734x29){});_0x9734x26[_0x47c8[34]](_0x47c8[434],function(_0x9734x51){console[_0x47c8[39]](_0x9734x51);console[_0x47c8[39]](_0x47c8[435]+ _0x9734x51[_0x47c8[436]]+ _0x47c8[437]+ _0x9734x51[_0x47c8[438]]);var _0x9734x71={network:_0x9734x51[_0x47c8[439]],network_script:_0x9734x51[_0x47c8[440]],request:_0x9734x51[_0x47c8[441]],channel:_0x9734x51[_0x47c8[442]],language:_0x9734x51[_0x47c8[443]],type:_0x9734x51[_0x47c8[444]],uniqueid:_0x9734x51[_0x47c8[438]],version:_0x9734x51[_0x47c8[445]],callerid:_0x9734x51[_0x47c8[436]],calleridname:_0x9734x51[_0x47c8[446]],callingpres:_0x9734x51[_0x47c8[447]],callingani2:_0x9734x51[_0x47c8[448]],callington:_0x9734x51[_0x47c8[449]],callingtns:_0x9734x51[_0x47c8[450]],dnid:_0x9734x51[_0x47c8[451]],rdnis:_0x9734x51[_0x47c8[452]],context:_0x9734x51[_0x47c8[453]],extension:_0x9734x51[_0x47c8[454]],priority:_0x9734x51[_0x47c8[455]],enhanced:_0x9734x51[_0x47c8[456]],accountcode:_0x9734x51[_0x47c8[457]],threadid:_0x9734x51[_0x47c8[458]],project_name:_0x9734x51[_0x47c8[459]],joinAt:moment()[_0x47c8[38]](_0x47c8[107]),message:_0x47c8[252]};process[_0x47c8[45]](_0x9734x71);if(_0x9734x51[_0x47c8[459]]){SquareProject[_0x47c8[467]]({where:{name:_0x9734x51[_0x47c8[459]]},attributes:[_0x47c8[262],_0x47c8[461]]})[_0x47c8[93]](function(_0x9734x50){if(_0x9734x50){if(_0x9734x50[_0x47c8[461]]){xml[_0x47c8[464]](_0x9734x50[_0x47c8[461]],{normalizeTags:true,explicitArray:false},function(_0x9734x24,_0x9734x31){var _0x9734x5c=_0x9734x31[_0x47c8[462]][_0x47c8[236]];if(_0x9734x5c){_0x9734x26[_0x47c8[236]]= _0x9734x5c;_0x9734x26[_0x47c8[112]]= true;_0x9734x26[_0x47c8[80]]= _0x9734x51[_0x47c8[438]];_0x9734x26[_0x47c8[84]]= _0x9734x51[_0x47c8[436]];_0x9734x26[_0x47c8[244]]= _0x9734x51[_0x47c8[446]];_0x9734x26[_0x47c8[245]]= _0x9734x51[_0x47c8[453]];_0x9734x26[_0x47c8[246]]= _0x9734x51[_0x47c8[454]];_0x9734x26[_0x47c8[247]]= _0x9734x51[_0x47c8[455]];_0x9734x26[_0x47c8[248]]= _0x9734x51[_0x47c8[457]];_0x9734x26[_0x47c8[249]]= _0x9734x51[_0x47c8[451]];_0x9734x26[_0x47c8[83]]= _0x9734x51[_0x47c8[459]];_0x9734x26[_0x47c8[423]]= getVertices(_0x9734x5c);wait[_0x47c8[431]](xstart,_0x9734x26)}else {console[_0x47c8[39]](_0x47c8[463]);_0x9734x26[_0x47c8[177]]()}})}else {console[_0x47c8[39]](_0x47c8[465]);_0x9734x26[_0x47c8[177]]()}}else {console[_0x47c8[39]](_0x47c8[466]);_0x9734x26[_0x47c8[177]]()}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x47c8[460],_0x9734x24);_0x9734x26[_0x47c8[177]]()})}else {console[_0x47c8[39]](_0x47c8[468]);_0x9734x26[_0x47c8[177]]()}})}function splitInterval(_0x9734x47){var _0x9734x73={};var _0x9734x49=_0x9734x47[_0x47c8[105]](_0x47c8[66]);var _0x9734x74;_0x9734x49[_0x47c8[131]](function(_0x9734x75,_0x9734x34){switch(_0x9734x34){case 0:if(_0x9734x75!== _0x47c8[231]){_0x9734x74= _0x9734x75[_0x47c8[105]](_0x47c8[156]);_0x9734x73[_0x47c8[469]]= moment(_0x9734x74[0],_0x47c8[470]);_0x9734x73[_0x47c8[471]]= moment(_0x9734x74[1],_0x47c8[470])}else {_0x9734x73[_0x47c8[469]]= null;_0x9734x73[_0x47c8[471]]= null};break;case 1:if(_0x9734x75!== _0x47c8[231]){_0x9734x74= _0x9734x75[_0x47c8[105]](_0x47c8[156]);_0x9734x73[_0x47c8[472]]= weekDaysCollection[_0x9734x74[0]];_0x9734x73[_0x47c8[473]]= _0x9734x74[1]?weekDaysCollection[_0x9734x74[1]]:null}else {_0x9734x73[_0x47c8[472]]= null;_0x9734x73[_0x47c8[473]]= null};break;case 2:if(_0x9734x75!== _0x47c8[231]){_0x9734x74= _0x9734x75[_0x47c8[105]](_0x47c8[156]);_0x9734x73[_0x47c8[474]]= _0x9734x74[0];_0x9734x73[_0x47c8[475]]= _0x9734x74[1]?_0x9734x74[1]:null}else {_0x9734x73[_0x47c8[474]]= null;_0x9734x73[_0x47c8[475]]= null};break;case 3:if(_0x9734x75!== _0x47c8[231]){_0x9734x74= _0x9734x75[_0x47c8[105]](_0x47c8[156]);_0x9734x73[_0x47c8[476]]= monthsCollection[_0x9734x74[0]];_0x9734x73[_0x47c8[477]]= _0x9734x74[1]?monthsCollection[_0x9734x74[1]]:null}else {_0x9734x73[_0x47c8[476]]= null;_0x9734x73[_0x47c8[477]]= null};break;default:}});return _0x9734x73}function isIntervalValid(_0x9734x47){var _0x9734x77=moment()[_0x47c8[38]](_0x47c8[470]);var _0x9734x78=moment()[_0x47c8[38]](_0x47c8[478]);var _0x9734x79=moment()[_0x47c8[38]](_0x47c8[479]);var _0x9734x7a=moment()[_0x47c8[38]](_0x47c8[480]);console[_0x47c8[39]](_0x47c8[481],_0x9734x77,_0x47c8[482],_0x9734x78,_0x47c8[483],_0x9734x79,_0x47c8[484],_0x9734x7a);console[_0x47c8[39]](_0x47c8[485]);console[_0x47c8[39]](_0x47c8[486],moment(_0x9734x47[_0x47c8[469]],_0x47c8[470])[_0x47c8[38]](_0x47c8[470]),_0x47c8[487],moment(_0x9734x47[_0x47c8[471]],_0x47c8[470])[_0x47c8[38]](_0x47c8[470]));console[_0x47c8[39]](_0x47c8[488],_0x9734x47[_0x47c8[472]],_0x47c8[487],_0x9734x47[_0x47c8[473]]);console[_0x47c8[39]](_0x47c8[489],_0x9734x47[_0x47c8[474]],_0x47c8[487],_0x9734x47[_0x47c8[475]]);console[_0x47c8[39]](_0x47c8[490],_0x9734x47[_0x47c8[476]],_0x47c8[487],_0x9734x47[_0x47c8[477]]);var _0x9734x7b,_0x9734x7c,_0x9734x7d,_0x9734x7e;var _0x9734x7f=[1,2,3,4,5,6,7,8,9,10,11,12];var _0x9734x80=[1,2,3,4,5,6,7];var _0x9734x81=[];for(var _0x9734x42=1;_0x9734x42<= 31;_0x9734x42++){_0x9734x81[_0x47c8[491]](_0x9734x42)};_0x9734x7b= (_0x9734x47[_0x47c8[469]]&& _0x9734x47[_0x47c8[471]])?moment(_0x9734x77,_0x47c8[470])[_0x47c8[492]](moment(_0x9734x47[_0x47c8[469]],_0x47c8[470]),moment(_0x9734x47[_0x47c8[471]],_0x47c8[470])):true;if(_0x9734x47[_0x47c8[472]]){if(_0x9734x47[_0x47c8[473]]){var _0x9734x82=_[_0x47c8[263]](_0x9734x80,function(_0x9734x33){return (_0x9734x33>= _0x9734x47[_0x47c8[472]])&& (_0x9734x33<= _0x9734x47[_0x47c8[473]])});console[_0x47c8[39]](_0x47c8[493],_0x9734x82);_0x9734x7c= (_0x9734x82[_0x47c8[494]](parseInt(_0x9734x78))!== -1)?true:false}else {_0x9734x7c= (parseInt(_0x9734x78)=== _0x9734x47[_0x47c8[472]])?true:false}}else {_0x9734x7c= true};if(_0x9734x47[_0x47c8[474]]){if(_0x9734x47[_0x47c8[475]]){var _0x9734x83=_[_0x47c8[263]](_0x9734x81,function(_0x9734x33){return (_0x9734x33>= _0x9734x47[_0x47c8[474]])&& (_0x9734x33<= _0x9734x47[_0x47c8[475]])});console[_0x47c8[39]](_0x47c8[495],_0x9734x83);_0x9734x7d= (_0x9734x83[_0x47c8[494]](parseInt(_0x9734x79))!== -1)?true:false}else {_0x9734x7d= (parseInt(_0x9734x79)=== _0x9734x47[_0x47c8[474]])?true:false}}else {_0x9734x7d= true};if(_0x9734x47[_0x47c8[476]]){if(_0x9734x47[_0x47c8[477]]){var _0x9734x84=_[_0x47c8[263]](_0x9734x7f,function(_0x9734x33){return (_0x9734x33>= _0x9734x47[_0x47c8[476]])&& (_0x9734x33<= _0x9734x47[_0x47c8[477]])});console[_0x47c8[39]](_0x47c8[496],_0x9734x84);_0x9734x7e= (_0x9734x84[_0x47c8[494]](parseInt(_0x9734x7a))!== -1)?true:false}else {_0x9734x7e= (parseInt(_0x9734x7a)=== _0x9734x47[_0x47c8[476]])?true:false}}else {_0x9734x7e= true};console[_0x47c8[39]](_0x47c8[497],_0x9734x7b,_0x47c8[498],_0x9734x7c,_0x47c8[499],_0x9734x7d,_0x47c8[500],_0x9734x7e);return _0x9734x7b&& _0x9734x7c&& _0x9734x7d&& _0x9734x7e}function setVariable(_0x9734x26,_0x9734x86,_0x9734x52,_0x9734x28){console[_0x47c8[39]](_0x47c8[501]);console[_0x47c8[39]](_0x47c8[502]+ _0x9734x86+ _0x47c8[503],_0x9734x52);_0x9734x26[_0x47c8[45]](util[_0x47c8[38]](_0x47c8[254],_0x9734x86,_0x9734x52),function(_0x9734x24,_0x9734x29){if(_0x9734x28){_0x9734x28(_0x9734x24,_0x9734x29)}})}function getVariableName(_0x9734x88){if(!collections[_0x47c8[434]]){getVariables(false)};var _0x9734x89={name:_0x47c8[504]};var _0x9734x8a;if(_0x9734x88){_0x9734x8a= _[_0x47c8[57]](collections[_0x47c8[434]],{id:parseInt(_0x9734x88)})};return _0x9734x8a?_0x9734x8a[_0x47c8[60]]:_0x9734x89[_0x47c8[60]]}function setVariablesMatrix(_0x9734x26,_0x9734x27,_0x9734x28,_0x9734x3d){if(_0x9734x3d&& _0x9734x3d[_0x47c8[148]]){var _0x9734x32=getVariableName(_0x9734x27[_0x47c8[125]]);_[_0x47c8[131]](_0x9734x3d,function(_0x9734x8c,_0x9734x34){_[_0x47c8[333]](_0x9734x8c,function(_0x9734x52,_0x9734x53){wait[_0x47c8[130]](setVariable,_0x9734x26,_0x9734x32+ _0x47c8[127]+ _0x9734x34+ _0x47c8[505]+ _0x9734x53+ _0x47c8[128],_0x47c8[129]+ _0x9734x52+ _0x47c8[129])})});wait[_0x47c8[130]](setVariable,_0x9734x26,_0x9734x32+ _0x47c8[506],_0x9734x3d[_0x47c8[148]])}else {_0x9734x28(null,{code:200,result:0})}}function getVariable(_0x9734x26,_0x9734x86,_0x9734x28){_0x9734x26[_0x47c8[510]](_0x9734x86,function(_0x9734x24,_0x9734x29){if(_0x9734x29[_0x47c8[240]]=== 200&& _0x9734x29[_0x47c8[145]]!== _0x47c8[153]){_0x9734x29[_0x47c8[150]]= _0x9734x29[_0x47c8[145]][_0x47c8[417]](_0x9734x29[_0x47c8[145]][_0x47c8[508]](_0x47c8[507])+ 1,_0x9734x29[_0x47c8[145]][_0x47c8[508]](_0x47c8[509]))}else {_0x9734x29[_0x47c8[150]]= _0x47c8[88]};_0x9734x28(null,_0x9734x29)})}function getFilePath(_0x9734x88){if(!collections[_0x47c8[511]]){getSounds(false)};return Setting[_0x47c8[467]]()[_0x47c8[93]](function(_0x9734x31){if(_0x9734x88!== _0x47c8[149]){if(_0x9734x31){var _0x9734x3f=_[_0x47c8[57]](collections[_0x47c8[511]],{id:parseInt(_0x9734x88)});return util[_0x47c8[38]](_0x47c8[512],_0x9734x31[_0x47c8[513]]|| _0x47c8[514],_0x9734x3f[_0x47c8[515]])};return _0x47c8[88]}else {return _0x47c8[88]}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}function getUsers(_0x9734x90){return User[_0x47c8[516]]()[_0x47c8[93]](function(_0x9734x31){collections[_0x47c8[55]]= _[_0x47c8[421]](_0x9734x31);if(_0x9734x90){synchUpdates(_0x47c8[24],_0x47c8[55],_0x47c8[262])}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}function getQueues(_0x9734x90){return VoiceQueue[_0x47c8[516]]()[_0x47c8[93]](function(_0x9734x31){collections[_0x47c8[78]]= _[_0x47c8[421]](_0x9734x31);if(_0x9734x90){synchUpdates(_0x47c8[25],_0x47c8[78],_0x47c8[60])}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}function getVariables(_0x9734x90){return Variable[_0x47c8[516]]()[_0x47c8[93]](function(_0x9734x31){collections[_0x47c8[434]]= _[_0x47c8[421]](_0x9734x31);if(_0x9734x90){synchUpdates(_0x47c8[21],_0x47c8[434],_0x47c8[262])}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}function getDbConnections(_0x9734x90){return SquareOdbc[_0x47c8[516]]()[_0x47c8[93]](function(_0x9734x31){collections[_0x47c8[366]]= _[_0x47c8[421]](_0x9734x31);if(_0x9734x90){synchUpdates(_0x47c8[22],_0x47c8[366],_0x47c8[262])}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}function getIntervals(_0x9734x90){return Interval[_0x47c8[516]]()[_0x47c8[93]](function(_0x9734x31){collections[_0x47c8[259]]= _[_0x47c8[421]](_0x9734x31);if(_0x9734x90){synchUpdates(_0x47c8[26],_0x47c8[259])}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}function getProjects(_0x9734x90){return SquareProject[_0x47c8[516]]()[_0x47c8[93]](function(_0x9734x31){collections[_0x47c8[322]]= _[_0x47c8[421]](_0x9734x31);if(_0x9734x90){synchUpdates(_0x47c8[19],_0x47c8[322],_0x47c8[262])}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}function getSounds(_0x9734x90){return Sound[_0x47c8[516]]()[_0x47c8[93]](function(_0x9734x31){collections[_0x47c8[511]]= _[_0x47c8[421]](_0x9734x31);if(_0x9734x90){synchUpdates(_0x47c8[27],_0x47c8[511],_0x47c8[262])}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}function getMailServerOut(_0x9734x90){return MailServerOut[_0x47c8[516]]()[_0x47c8[93]](function(_0x9734x31){collections[_0x47c8[285]]= _[_0x47c8[421]](_0x9734x31);if(_0x9734x90){synchUpdates(_0x47c8[30],_0x47c8[285],_0x47c8[262])}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}function getTemplates(_0x9734x90){return Template[_0x47c8[516]]()[_0x47c8[93]](function(_0x9734x31){collections[_0x47c8[292]]= _[_0x47c8[421]](_0x9734x31);if(_0x9734x90){synchUpdates(_0x47c8[32],_0x47c8[292],_0x47c8[262])}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}function getSmsAccounts(_0x9734x90){return SmsAccount[_0x47c8[516]]()[_0x47c8[93]](function(_0x9734x31){collections[_0x47c8[304]]= _[_0x47c8[421]](_0x9734x31);if(_0x9734x90){synchUpdates(_0x47c8[29],_0x47c8[304],_0x47c8[262])}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}function synchUpdates(_0x9734x9b,_0x9734x9c,_0x9734x53){process[_0x47c8[45]]({message:_0x9734x53?_0x47c8[517]:_0x47c8[518],model:_0x9734x9b,collection:_0x9734x9c,key:_0x9734x53})}function updateCollection(_0x9734x9c,_0x9734x9e,_0x9734x9f){var _0x9734xa0=_[_0x47c8[57]](collections[_0x9734x9c],_0x9734x9e);if(_0x9734xa0){_[_0x47c8[519]](_0x9734xa0,_0x9734x9f)}else {collections[_0x9734x9c][_0x47c8[520]](_0x9734x9f)}}function replaceCollection(_0x9734x9c,_0x9734x9f){collections[_0x9734x9c]= _0x9734x9f}function getPort(){return function(){return Setting[_0x47c8[467]]()[_0x47c8[93]](function(_0x9734x31){if(_0x9734x31){return _0x9734x31[_0x47c8[521]]}})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[39]](_0x9734x24)})}}Promise[_0x47c8[531]]([])[_0x47c8[93]](getPort())[_0x47c8[93]](function(_0x9734xa3){agi[_0x47c8[524]](main)[_0x47c8[523]](_0x9734xa3|| 4573);getUsers(true);getQueues(true);getVariables(true);getIntervals(true);getProjects(true);getSounds(true);getDbConnections(true);getMailServerOut(true);getTemplates(true);getSmsAccounts(true);process[_0x47c8[34]](_0x47c8[114],function(_0x9734x3d){switch(_0x9734x3d[_0x47c8[114]]){case _0x47c8[527]:updateCollection(_0x9734x3d[_0x47c8[525]],_0x9734x3d[_0x47c8[385]],_0x9734x3d[_0x47c8[526]]);break;case _0x47c8[528]:replaceCollection(_0x9734x3d[_0x47c8[525]],_0x9734x3d[_0x47c8[526]]);break;case _0x47c8[530]:_[_0x47c8[529]](collections[_0x9734x3d[_0x47c8[525]]],_0x9734x3d[_0x47c8[385]]);break;default:}})})[_0x47c8[115]](function(_0x9734x24){console[_0x47c8[33]](_0x47c8[522],_0x9734x24)}) \ No newline at end of file diff --git a/server/config/agi/index.js b/server/config/agi/index.js index b2c8a79..1532351 100644 --- a/server/config/agi/index.js +++ b/server/config/agi/index.js @@ -1,127 +1 @@ -var cp = require('child_process'); -var util = require('util'); -var models = require('../../models'); - -module.exports = function() { - var child = cp - .fork(__dirname + '/agi') - .on('message', function(data) { - switch (data.message) { - case 'update': - return models.ReportSquare.update({ - leaveAt: data.leaveAt - }, { - where: { - uniqueid: data.uniqueid - }, - individualHooks: true - }) - .catch(function(err) { - console.log('Error saving exit time from IVR', err); - }); - case 'create': - delete data.message; - return models.ReportSquare - .create(data) - .catch(function(err) { - console.log('Error saving enter time for IVR', err); - }); - case 'detail': - delete data.message; - return models.ReportSquareDetail - .create(data) - .catch(function(err) { - console.log('Error saving ' + data.application + ':' + data.node + ' block log', err); - }); - case 'synch': - synchCollection(data, child); - break; - case 'forceSynch': //in case of collections with sub-collections (es: voiceextension, interval) - replaceCollection(data, child); - break; - case 'createSms': - delete data.message; - return models.SmsMessage - .create(data) - .catch(function(err) { - console.log('Error creating sms message', err); - }); - case 'createMail': - delete data.message; - return models.MailMessage - .create(data) - .catch(function(err) { - console.log('Error creating sms message', err); - }); - default: - } - }) - .on('close', function(code) { - console.log(util.format('AGI SERVER EXITED WITH CODE %s', code)); - }) - .on('error', function(err) { - console.error(err); - }); - - process.on('exit', function(code) { - child.kill(); - }); -}; - -function synchCollection(data, child) { - var condition = {}; - models[data.model].afterCreate(function(doc) { - condition[data.key] = doc[data.key]; - child.send({ - message: 'updateCollection', - collection: data.collection, - condition: condition, - doc: doc - }); - }); - models[data.model].afterUpdate(function(doc) { - condition[data.key] = doc[data.key]; - child.send({ - message: 'updateCollection', - collection: data.collection, - condition: condition, - doc: doc - }); - }); - models[data.model].afterDestroy(function(doc) { - condition[data.key] = doc[data.key]; - child.send({ - message: 'removeFromCollection', - collection: data.collection, - condition: condition - }); - }); -} - -function replaceCollection(data, child) { - var condition = {}; - models[data.model].afterCreate(function(doc) { - getCollection(data, child, doc); - }); - models[data.model].afterUpdate(function(doc) { - getCollection(data, child, doc); - }); - models[data.model].afterDestroy(function(doc) { - getCollection(data, child, doc); - }); -} - -function getCollection(data, child, doc) { - models[data.model] - .findAll() - .then(function(results) { - child.send({ - message: 'replaceCollection', - collection: data.collection, - doc: results - }); - }) - .catch(function(err) { - console.log('AGI error on replacing ', data.collection, ' collection', err); - }); -} +var _0xd8fc=["\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x41\x47\x49\x20\x53\x45\x52\x56\x45\x52\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x65\x78\x69\x74\x20\x74\x69\x6D\x65\x20\x66\x72\x6F\x6D\x20\x49\x56\x52","\x63\x61\x74\x63\x68","\x6C\x65\x61\x76\x65\x41\x74","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20\x65\x6E\x74\x65\x72\x20\x74\x69\x6D\x65\x20\x66\x6F\x72\x20\x49\x56\x52","\x63\x72\x65\x61\x74\x65","\x45\x72\x72\x6F\x72\x20\x73\x61\x76\x69\x6E\x67\x20","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x3A","\x6E\x6F\x64\x65","\x20\x62\x6C\x6F\x63\x6B\x20\x6C\x6F\x67","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C","\x64\x65\x74\x61\x69\x6C","\x73\x79\x6E\x63\x68","\x66\x6F\x72\x63\x65\x53\x79\x6E\x63\x68","\x45\x72\x72\x6F\x72\x20\x63\x72\x65\x61\x74\x69\x6E\x67\x20\x73\x6D\x73\x20\x6D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x53\x6D\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x63\x72\x65\x61\x74\x65\x4D\x61\x69\x6C","\x2F\x61\x67\x69","\x66\x6F\x72\x6B","\x65\x78\x69\x74","\x6B\x69\x6C\x6C","\x6B\x65\x79","\x75\x70\x64\x61\x74\x65\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x63\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6D\x6F\x64\x65\x6C","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65\x46\x72\x6F\x6D\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x41\x47\x49\x20\x65\x72\x72\x6F\x72\x20\x6F\x6E\x20\x72\x65\x70\x6C\x61\x63\x69\x6E\x67\x20","\x20\x63\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x72\x65\x70\x6C\x61\x63\x65\x43\x6F\x6C\x6C\x65\x63\x74\x69\x6F\x6E","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C"];var cp=require(_0xd8fc[0]);var util=require(_0xd8fc[1]);var models=require(_0xd8fc[2]);module[_0xd8fc[3]]= function(){var _0x6a7cx4=cp[_0xd8fc[34]](__dirname+ _0xd8fc[33])[_0xd8fc[5]](_0xd8fc[10],function(_0x6a7cx7){switch(_0x6a7cx7[_0xd8fc[10]]){case _0xd8fc[15]:return models[_0xd8fc[16]][_0xd8fc[15]]({leaveAt:_0x6a7cx7[_0xd8fc[13]]},{where:{uniqueid:_0x6a7cx7[_0xd8fc[14]]},individualHooks:true})[_0xd8fc[12]](function(_0x6a7cx5){console[_0xd8fc[9]](_0xd8fc[11],_0x6a7cx5)});case _0xd8fc[18]:delete _0x6a7cx7[_0xd8fc[10]];return models[_0xd8fc[16]][_0xd8fc[18]](_0x6a7cx7)[_0xd8fc[12]](function(_0x6a7cx5){console[_0xd8fc[9]](_0xd8fc[17],_0x6a7cx5)});case _0xd8fc[25]:delete _0x6a7cx7[_0xd8fc[10]];return models[_0xd8fc[24]][_0xd8fc[18]](_0x6a7cx7)[_0xd8fc[12]](function(_0x6a7cx5){console[_0xd8fc[9]](_0xd8fc[19]+ _0x6a7cx7[_0xd8fc[20]]+ _0xd8fc[21]+ _0x6a7cx7[_0xd8fc[22]]+ _0xd8fc[23],_0x6a7cx5)});case _0xd8fc[26]:synchCollection(_0x6a7cx7,_0x6a7cx4);break;case _0xd8fc[27]:replaceCollection(_0x6a7cx7,_0x6a7cx4);break;case _0xd8fc[30]:delete _0x6a7cx7[_0xd8fc[10]];return models[_0xd8fc[29]][_0xd8fc[18]](_0x6a7cx7)[_0xd8fc[12]](function(_0x6a7cx5){console[_0xd8fc[9]](_0xd8fc[28],_0x6a7cx5)});case _0xd8fc[32]:delete _0x6a7cx7[_0xd8fc[10]];return models[_0xd8fc[31]][_0xd8fc[18]](_0x6a7cx7)[_0xd8fc[12]](function(_0x6a7cx5){console[_0xd8fc[9]](_0xd8fc[28],_0x6a7cx5)});default:}})[_0xd8fc[5]](_0xd8fc[6],function(_0x6a7cx6){console[_0xd8fc[9]](util[_0xd8fc[8]](_0xd8fc[7],_0x6a7cx6))})[_0xd8fc[5]](_0xd8fc[4],function(_0x6a7cx5){console[_0xd8fc[4]](_0x6a7cx5)});process[_0xd8fc[5]](_0xd8fc[35],function(_0x6a7cx6){_0x6a7cx4[_0xd8fc[36]]()})};function synchCollection(_0x6a7cx7,_0x6a7cx4){var _0x6a7cx9={};models[_0x6a7cx7[_0xd8fc[42]]][_0xd8fc[41]](function(_0x6a7cxa){_0x6a7cx9[_0x6a7cx7[_0xd8fc[37]]]= _0x6a7cxa[_0x6a7cx7[_0xd8fc[37]]];_0x6a7cx4[_0xd8fc[40]]({message:_0xd8fc[38],collection:_0x6a7cx7[_0xd8fc[39]],condition:_0x6a7cx9,doc:_0x6a7cxa})});models[_0x6a7cx7[_0xd8fc[42]]][_0xd8fc[43]](function(_0x6a7cxa){_0x6a7cx9[_0x6a7cx7[_0xd8fc[37]]]= _0x6a7cxa[_0x6a7cx7[_0xd8fc[37]]];_0x6a7cx4[_0xd8fc[40]]({message:_0xd8fc[38],collection:_0x6a7cx7[_0xd8fc[39]],condition:_0x6a7cx9,doc:_0x6a7cxa})});models[_0x6a7cx7[_0xd8fc[42]]][_0xd8fc[45]](function(_0x6a7cxa){_0x6a7cx9[_0x6a7cx7[_0xd8fc[37]]]= _0x6a7cxa[_0x6a7cx7[_0xd8fc[37]]];_0x6a7cx4[_0xd8fc[40]]({message:_0xd8fc[44],collection:_0x6a7cx7[_0xd8fc[39]],condition:_0x6a7cx9})})}function replaceCollection(_0x6a7cx7,_0x6a7cx4){var _0x6a7cx9={};models[_0x6a7cx7[_0xd8fc[42]]][_0xd8fc[41]](function(_0x6a7cxa){getCollection(_0x6a7cx7,_0x6a7cx4,_0x6a7cxa)});models[_0x6a7cx7[_0xd8fc[42]]][_0xd8fc[43]](function(_0x6a7cxa){getCollection(_0x6a7cx7,_0x6a7cx4,_0x6a7cxa)});models[_0x6a7cx7[_0xd8fc[42]]][_0xd8fc[45]](function(_0x6a7cxa){getCollection(_0x6a7cx7,_0x6a7cx4,_0x6a7cxa)})}function getCollection(_0x6a7cx7,_0x6a7cx4,_0x6a7cxa){models[_0x6a7cx7[_0xd8fc[42]]][_0xd8fc[50]]()[_0xd8fc[49]](function(_0x6a7cxd){_0x6a7cx4[_0xd8fc[40]]({message:_0xd8fc[48],collection:_0x6a7cx7[_0xd8fc[39]],doc:_0x6a7cxd})})[_0xd8fc[12]](function(_0x6a7cx5){console[_0xd8fc[9]](_0xd8fc[46],_0x6a7cx7[_0xd8fc[39]],_0xd8fc[47],_0x6a7cx5)})} \ No newline at end of file diff --git a/server/config/ami/action.js b/server/config/ami/action.js index 205a934..41de342 100644 --- a/server/config/ami/action.js +++ b/server/config/ami/action.js @@ -1,735 +1 @@ -'use strict'; - -const moment = require('moment'); -const util = require('util'); -const Promise = require('bluebird'); - -const config = require('../environment'); -const Agent = require('../../models').User; -const Sequelize = require('../../models').sequelize; -const VoiceQueue = require('../../models').VoiceQueue; -const ReportMember = require('../../models').ReportMember; -const UserHasVoiceQueue = require('../../models').UserHasVoiceQueue; -const UserHasChatQueue = require('../../models').UserHasChatQueue; -const UserHasMailQueue = require('../../models').UserHasMailQueue; -const UserHasFaxQueue = require('../../models').UserHasFaxQueue; -const UserHasSmsQueue = require('../../models').UserHasSmsQueue; -const UserHasOpenchannelQueue = require('../../models').UserHasOpenchannelQueue; - -function Action(ami, io) { - console.log('Action Initialization...'); - var channels = ['voice', 'chat', 'mail', 'fax', 'sms', 'openchannel']; - - Agent.afterUpdate(function(doc, options) { - io.to(util.format('%s:%s', doc.role, doc.id)).emit('agent:save', doc); - }); - - process.on('message', function(data) { - switch (data.evt) { - case 'Action.afterCreate': - return onSave(data, data.options, ami); - - case 'ReportMember.beforeCreate': - return ReportMember - .findAll({ - where: { - channel: data.channel, - membername: data.membername, - interface: data.interface, - type: data.type, - exitAt: null - } - }) - .then(function(elms) { - var queries = []; - elms.forEach(function(elm) { - queries.push(elm.update({ - exitAt: moment().format("YYYY-MM-DD HH:mm:ss"), - })); - }); - - return Promise - .all(queries); - }); - - default: - } - }); - - // HANDLE PAUSE FUNCTION - function handlePause(options, action) { - return function(agent) { - return Promise - .promisify(ami.action)({ - action: 'QueuePause', - interface: util.format('%s/%s', 'SIP', agent.name), - paused: true, - reason: options.body.type || action.data1, - }) - .then(function(astData) { - return agent - .update({ - voicePause: true, - chatPause: true, - mailPause: true, - faxPause: true, - smsPause: true, - openchannelPause: true, - pauseType: options.body.type || action.data1, - lastPauseAt: moment().format("YYYY-MM-DD HH:mm:ss") - }, { - transaction: options.transaction || null - }); - }) - .then(function(agent) { - var reportMembers = []; - channels.forEach(function(channel) { - reportMembers.push({ - channel: channel, - membername: agent.name, - interface: util.format('%s/%s', 'SIP', agent.name), - type: 'PAUSE', - enterAt: moment().format("YYYY-MM-DD HH:mm:ss"), - data1: options.body.type || action.data1, - data2: action.data2, - data3: action.data3, - data4: action.data4, - role: agent.role, - internal: agent.internal - }); - }) - return ReportMember - .bulkCreate(reportMembers, { - individualHooks: true, - transaction: options.transaction || null - }); - }); - } - } - - // HANDLE PAUSE FUNCTION - function handlePauseLogin(options, action) { - return function(agent) { - if (agent.loginInPause && !agent.online) { - return Promise - .promisify(ami.action)({ - action: 'QueuePause', - interface: util.format('%s/%s', 'SIP', agent.name), - paused: true, - reason: 'DEFAULT PAUSE', - }) - .then(function(astData) { - return agent - .update({ - voicePause: true, - chatPause: true, - mailPause: true, - faxPause: true, - smsPause: true, - openchannelPause: true, - pauseType: 'DEFAULT PAUSE', - lastPauseAt: moment().format("YYYY-MM-DD HH:mm:ss") - }, { - transaction: options.transaction || null - }); - }) - .then(function(agent) { - var reportMembers = []; - channels.forEach(function(channel) { - reportMembers.push({ - channel: channel, - membername: agent.name, - interface: util.format('%s/%s', 'SIP', agent.name), - type: 'PAUSE', - enterAt: moment().format("YYYY-MM-DD HH:mm:ss"), - data1: 'DEFAULT PAUSE', - data2: action.data2, - data3: action.data3, - data4: 'DEFAULT PAUSE', - role: agent.role, - internal: agent.internal - }); - }) - return ReportMember - .bulkCreate(reportMembers, { - individualHooks: true, - transaction: options.transaction || null - }); - }); - } - } - } - - // HANDLE UNPAUSE FUNCTION - function handleUnpause(options, action) { - return function(agent) { - if (!options.body) { - options.body = {} - } - - switch (options.body.channel) { - case 'voice': - - return Promise - .promisify(ami.action)({ - action: 'QueuePause', - interface: util.format('%s/%s', 'SIP', agent.name), - paused: false, - reason: options.body.type - }) - .then(function() { - return agent - .update({ - voicePause: false, - }, { - transaction: options.transaction || null - }); - }) - .then(function(agent) { - return ReportMember - .findOne({ - where: { - channel: options.body.channel, - membername: agent.name, - interface: util.format('%s/%s', 'SIP', agent.name), - type: 'PAUSE', - exitAt: null - } - }); - }) - .then(handleEntityNotFound({ - message: 'Already Pause Off' - })) - .then(function(reportMember) { - return reportMember - .update({ - exitAt: moment().format("YYYY-MM-DD HH:mm:ss"), - }, { - individualHooks: true, - transaction: options.transaction || null - }); - }) - .then(function() { - return agent; - }); - - case 'chat': - case 'mail': - case 'fax': - case 'sms': - case 'openchannel': - - var data = {}; - data[util.format('%s%s', options.body.channel, 'Pause')] = false; - - return agent - .update(data, { - transaction: options.transaction || null - }) - .then(function(agent) { - - return ReportMember - .findOne({ - where: { - channel: options.body.channel, - membername: agent.name, - interface: util.format('%s/%s', 'SIP', agent.name), - type: 'PAUSE', - exitAt: null - } - }); - }) - .then(handleEntityNotFound({ - message: 'Already Pause Off' - })) - .then(function(reportMember) { - return reportMember - .update({ - exitAt: moment().format("YYYY-MM-DD HH:mm:ss"), - }, { - individualHooks: true, - transaction: options.transaction || null - }); - }) - .then(function() { - return agent; - }); - - default: - var action = Promise.promisify(ami.action); - return action({ - action: 'QueuePause', - interface: util.format('%s/%s', 'SIP', agent.name), - paused: false - }) - .catch(function(err) { - console.error(err); - }) - .then(function() { - return agent - .update({ - voicePause: false, - mailPause: false, - chatPause: false, - faxPause: false, - smsPause: false, - openchannelPause: false - }, { - transaction: options.transaction || null - }); - }) - .then(function(agent) { - return ReportMember - .findAll({ - where: { - membername: agent.name, - interface: util.format('%s/%s', 'SIP', agent.name), - type: 'PAUSE', - exitAt: null - }, - }); - }) - .then(function(members) { - var promises = []; - - members.forEach(function(member) { - promises.push(member.update({ - exitAt: moment().format("YYYY-MM-DD HH:mm:ss") - })); - }); - - return Promise - .all(promises); - }) - .then(function() { - return agent; - }); - } - } - } - - // HANDLE LOGIN FUNCTION - function handleLogin(options, action) { - return function(agent) { - if (!agent.online) { - return agent - .getVoiceQueues() - .then(function(voiceQueues) { - var actions = []; - voiceQueues.forEach(function(voiceQueue) { - actions.push(ami.action({ - action: 'QueueAdd', - queue: voiceQueue.name, - interface: util.format('%s/%s', 'SIP', agent.name), - membername: agent.name - })); - }); - return Promise.all(actions); - }) - .then(function(astData) { - var reportMembers = []; - channels.forEach(function(channel) { - reportMembers.push({ - channel: channel, - membername: agent.name, - interface: util.format('%s/%s', 'SIP', agent.name), - type: 'LOGIN', - enterAt: moment().format("YYYY-MM-DD HH:mm:ss"), - role: agent.role, - internal: agent.internal - }); - }); - return ReportMember - .bulkCreate(reportMembers, { - individualHooks: true - }); - }); - } - } - } - - // HANDLE LOGOUT FUNCTION - function handleLogout(options, action) { - return function(agent) { - return VoiceQueue - .findAll() - .then(function(voiceQueues) { - var actions = []; - voiceQueues.forEach(function(voiceQueue) { - actions.push(ami.action({ - action: 'QueueRemove', - queue: voiceQueue.name, - interface: util.format('%s/%s', 'SIP', agent.name) - })); - }); - return Promise - .all(actions) - .catch(function(err) { - console.error(err); - }); - }) - .then(function(astData) { - return ReportMember - .findAll({ - where: { - membername: agent.name, - interface: util.format('%s/%s', 'SIP', agent.name), - type: 'LOGIN', - exitAt: null - }, - }); - }) - .then(function(members) { - //single update - var promises = []; - - members.forEach(function(member) { - promises.push(member.update({ - exitAt: moment().format("YYYY-MM-DD HH:mm:ss") - })); - }); - - return Promise - .all(promises); - }); - } - } - - // HANDLE QUEUEADD FUNCTION - function handleQueueAdd(options, action) { - return function(agent) { - var bulkQueues = []; - switch (options.body.channel) { - case 'voice': - options.body.queues.forEach(function(queue) { - bulkQueues.push(UserHasVoiceQueue - .findOrCreate({ - where: { - UserId: agent.id, - queue: queue - }, - defaults: { - queue: queue, - location: util.format('SIP/%s', agent.name), - membername: agent.name, - UserId: agent.id, - }, - transaction: options.transaction || null, - individualHooks: true - })); - }); - return Promise - .all(bulkQueues) - .then(function() { - var actions = []; - options.body.queues.forEach(function(queue) { - actions.push(ami.action({ - action: 'QueueAdd', - queue: queue, - interface: util.format('%s/%s', 'SIP', agent.name), - membername: agent.name - })); - }); - return Promise - .all(actions); - }) - .catch(function(err) { - console.error(err); - }) - case 'chat': - options.body.queues.forEach(function(queue) { - bulkQueues.push(UserHasChatQueue - .findOrCreate({ - where: { - UserId: agent.id, - ChatQueueId: queue.id - }, - defaults: { - ChatQueueId: queue.id, - queue: queue.name, - UserId: agent.id, - }, - transaction: options.transaction || null - })); - }); - return Promise - .all(bulkQueues) - .catch(function(err) { - console.log(err); - }); - case 'mail': - options.body.queues.forEach(function(queue) { - bulkQueues.push(UserHasMailQueue - .findOrCreate({ - where: { - UserId: agent.id, - MailQueueId: queue.id - }, - defaults: { - MailQueueId: queue.id, - queue: queue.name, - UserId: agent.id, - }, - transaction: options.transaction || null - })); - }); - return Promise - .all(bulkQueues) - .catch(function(err) { - console.log(err); - }); - case 'sms': - options.body.queues.forEach(function(queue) { - bulkQueues.push(UserHasSmsQueue - .findOrCreate({ - where: { - UserId: agent.id, - SmsQueueId: queue.id - }, - defaults: { - SmsQueueId: queue.id, - queue: queue.name, - UserId: agent.id, - }, - transaction: options.transaction || null - })); - }); - return Promise - .all(bulkQueues) - .catch(function(err) { - console.log(err); - }); - case 'openchannel': - options.body.queues.forEach(function(queue) { - bulkQueues.push(UserHasOpenchannelQueue - .findOrCreate({ - where: { - UserId: agent.id, - OpenchannelQueueId: queue.id - }, - defaults: { - OpenchannelQueueId: queue.id, - queue: queue.name, - UserId: agent.id, - }, - transaction: options.transaction || null - })); - }); - return Promise - .all(bulkQueues) - .catch(function(err) { - console.log(err); - }); - case 'fax': - options.body.queues.forEach(function(queue) { - bulkQueues.push(UserHasFaxQueue - .findOrCreate({ - where: { - UserId: agent.id, - FaxQueueId: queue.id - }, - defaults: { - faxQueueId: queue.id, - queue: queue.name, - UserId: agent.id, - }, - transaction: options.transaction || null - })); - }); - return Promise - .all(bulkQueues) - .catch(function(err) { - console.log(err); - }); - default: - } - } - } - - // HANDLE QUEUEREMOVE FUNCTION - function handleQueueRemove(options, action) { - return function(agent) { - switch (options.body.channel) { - case 'voice': - return UserHasVoiceQueue - .destroy({ - where: { - UserId: agent.id, - queue: options.body.queue - }, - transaction: options.transaction || null, - individualHooks: true - }) - .then(function() { - var newAction = Promise.promisify(ami.action); - return newAction({ - action: 'QueueRemove', - queue: options.body.queue, - interface: util.format('%s/%s', 'SIP', agent.name), - }); - }) - .catch(function(err) { - console.error('queue association remove error :', err); - }); - case 'chat': - return UserHasChatQueue - .destroy({ - where: { - UserId: agent.id, - ChatQueueId: options.body.queueId - }, - transaction: options.transaction || null, - individualHooks: true - }) - .catch(function(err) { - console.error('queue association remove error :', err); - }); - case 'mail': - return UserHasMailQueue - .destroy({ - where: { - UserId: agent.id, - MailQueueId: options.body.queueId - }, - transaction: options.transaction || null, - individualHooks: true - }) - .catch(function(err) { - console.error('queue association remove error :', err); - }); - case 'sms': - return UserHasSmsQueue - .destroy({ - where: { - UserId: agent.id, - SmsQueueId: options.body.queueId - }, - transaction: options.transaction || null, - individualHooks: true - }) - .catch(function(err) { - console.error('queue association remove error :', err); - }); - case 'openchannel': - return UserHasOpenchannelQueue - .destroy({ - where: { - UserId: agent.id, - OpenchannelQueueId: options.body.queueId - }, - transaction: options.transaction || null, - individualHooks: true - }) - .catch(function(err) { - console.error('queue association remove error :', err); - }); - case 'fax': - return UserHasFaxQueue - .destroy({ - where: { - UserId: agent.id, - FaxQueueId: options.body.queueId - }, - transaction: options.transaction || null, - individualHooks: true - }) - .catch(function(err) { - console.error('queue association remove error :', err); - }); - default: - } - } - } - - // HANDLE ENTITY NOT FOUND - function handleEntityNotFound(error) { - return function(entity) { - if (!entity) { - throw error; - } - return entity; - }; - } - - function onSave(action, options, ami) { - // START ACTION STATEMENT - switch (action.name) { - case 'pause': - // START HANDLE PAUSE - return Agent - .findById(options.body.agent) - .then(handleEntityNotFound({ - message: 'Unknown Agent' - })) - .then(handlePause(options, action)); - // END HANDLE PAUSE - case 'unpause': - // START HANDLE UNPAUSE - return Agent - .findById(options.body.agent) - .then(handleEntityNotFound({ - message: 'Unknown Agent' - })) - .then(handleUnpause(options, action)); - // END HANDLE UNPAUSE - - case 'login': - // START HANDLE LOGIN - return Agent - .findById(action.data1) - .then(handleEntityNotFound({ - message: 'Unknown Agent' - })) - .then(handleLogin(options, action)) - .then(function() { - return Agent - .findById(action.data1) - }) - .then(handlePauseLogin(options, action)); - // END HANDLE LOGING - - case 'logout': - // START HANDLE LOGOUT - return Agent - .findById(action.data1) - .then(handleEntityNotFound({ - message: 'Unknown Agent' - })) - .then(handleUnpause(options, action)) - .then(handleLogout(options, action)); - // END HANDLE LOGOUT - case 'QueueAdd': - // START HANDLE QUEUEADD - return Agent - .findById(options.body.agent) - .then(handleEntityNotFound({ - message: 'Unknown Agent' - })) - .then(handleQueueAdd(options, action)); - // END HANDLE QUEUEADD - case 'QueueRemove': - // START HANDLE QUEUEREMOVE - return Agent - .findById(options.body.agent) - .then(handleEntityNotFound({ - message: 'Unknown Agent' - })) - .then(handleQueueRemove(options, action)); - // END HANDLE QUEUEREMOVE - - default: - throw { - message: 'Unknown Action' - }; - } - // END ACTION STATEMENT - } - - return {}; -} - -// SOCKET IO CHILD CONNETION - - - -module.exports = Action; +var _0x5cc8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x41\x63\x74\x69\x6F\x6E\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x76\x6F\x69\x63\x65","\x63\x68\x61\x74","\x6D\x61\x69\x6C","\x66\x61\x78","\x73\x6D\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x67\x65\x6E\x74\x3A\x73\x61\x76\x65","\x65\x6D\x69\x74","\x25\x73\x3A\x25\x73","\x72\x6F\x6C\x65","\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x74\x6F","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x41\x63\x74\x69\x6F\x6E\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x74\x68\x65\x6E","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x74\x79\x70\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x2E\x62\x65\x66\x6F\x72\x65\x43\x72\x65\x61\x74\x65","\x65\x76\x74","\x6F\x6E","\x6E\x61\x6D\x65","\x25\x73\x2F\x25\x73","\x53\x49\x50","\x50\x41\x55\x53\x45","\x62\x6F\x64\x79","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x34","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x51\x75\x65\x75\x65\x50\x61\x75\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x6C\x6F\x67\x69\x6E\x49\x6E\x50\x61\x75\x73\x65","\x6F\x6E\x6C\x69\x6E\x65","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x41\x6C\x72\x65\x61\x64\x79\x20\x50\x61\x75\x73\x65\x20\x4F\x66\x66","\x66\x69\x6E\x64\x4F\x6E\x65","\x25\x73\x25\x73","\x50\x61\x75\x73\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x4C\x4F\x47\x49\x4E","\x51\x75\x65\x75\x65\x41\x64\x64","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x51\x75\x65\x75\x65\x52\x65\x6D\x6F\x76\x65","\x53\x49\x50\x2F\x25\x73","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x71\x75\x65\x75\x65\x73","\x71\x75\x65\x75\x65\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x20\x3A","\x71\x75\x65\x75\x65","\x64\x65\x73\x74\x72\x6F\x79","\x71\x75\x65\x75\x65\x49\x64","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x70\x61\x75\x73\x65","\x75\x6E\x70\x61\x75\x73\x65","\x6C\x6F\x67\x69\x6E","\x6C\x6F\x67\x6F\x75\x74","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x5cc8[0];const moment=require(_0x5cc8[1]);const util=require(_0x5cc8[2]);const Promise=require(_0x5cc8[3]);const config=require(_0x5cc8[4]);const Agent=require(_0x5cc8[6])[_0x5cc8[5]];const Sequelize=require(_0x5cc8[6])[_0x5cc8[7]];const VoiceQueue=require(_0x5cc8[6])[_0x5cc8[8]];const ReportMember=require(_0x5cc8[6])[_0x5cc8[9]];const UserHasVoiceQueue=require(_0x5cc8[6])[_0x5cc8[10]];const UserHasChatQueue=require(_0x5cc8[6])[_0x5cc8[11]];const UserHasMailQueue=require(_0x5cc8[6])[_0x5cc8[12]];const UserHasFaxQueue=require(_0x5cc8[6])[_0x5cc8[13]];const UserHasSmsQueue=require(_0x5cc8[6])[_0x5cc8[14]];const UserHasOpenchannelQueue=require(_0x5cc8[6])[_0x5cc8[15]];function Action(_0x97eax10,_0x97eax11){console[_0x5cc8[17]](_0x5cc8[16]);var _0x97eax12=[_0x5cc8[18],_0x5cc8[19],_0x5cc8[20],_0x5cc8[21],_0x5cc8[22],_0x5cc8[23]];Agent[_0x5cc8[31]](function(_0x97eax13,_0x97eax14){_0x97eax11[_0x5cc8[30]](util[_0x5cc8[29]](_0x5cc8[26],_0x97eax13[_0x5cc8[27]],_0x97eax13[_0x5cc8[28]]))[_0x5cc8[25]](_0x5cc8[24],_0x97eax13)});process[_0x5cc8[48]](_0x5cc8[32],function(_0x97eax15){switch(_0x97eax15[_0x5cc8[47]]){case _0x5cc8[34]:return _0x97eax33(_0x97eax15,_0x97eax15[_0x5cc8[33]],_0x97eax10);case _0x5cc8[46]:return ReportMember[_0x5cc8[45]]({where:{channel:_0x97eax15[_0x5cc8[41]],membername:_0x97eax15[_0x5cc8[42]],interface:_0x97eax15[_0x5cc8[43]],type:_0x97eax15[_0x5cc8[44]],exitAt:null}})[_0x5cc8[40]](function(_0x97eax16){var _0x97eax17=[];_0x97eax16[_0x5cc8[38]](function(_0x97eax18){_0x97eax17[_0x5cc8[37]](_0x97eax18[_0x5cc8[36]]({exitAt:moment()[_0x5cc8[29]](_0x5cc8[35])}))});return Promise[_0x5cc8[39]](_0x97eax17)});default:}});function _0x97eax19(_0x97eax14,_0x97eax1a){return function(_0x97eax1b){return Promise[_0x5cc8[63]](_0x97eax10[_0x5cc8[62]])({action:_0x5cc8[61],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),paused:true,reason:_0x97eax14[_0x5cc8[53]][_0x5cc8[44]]|| _0x97eax1a[_0x5cc8[54]]})[_0x5cc8[40]](function(_0x97eax1e){return _0x97eax1b[_0x5cc8[36]]({voicePause:true,chatPause:true,mailPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0x97eax14[_0x5cc8[53]][_0x5cc8[44]]|| _0x97eax1a[_0x5cc8[54]],lastPauseAt:moment()[_0x5cc8[29]](_0x5cc8[35])},{transaction:_0x97eax14[_0x5cc8[59]]|| null})})[_0x5cc8[40]](function(_0x97eax1b){var _0x97eax1c=[];_0x97eax12[_0x5cc8[38]](function(_0x97eax1d){_0x97eax1c[_0x5cc8[37]]({channel:_0x97eax1d,membername:_0x97eax1b[_0x5cc8[49]],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),type:_0x5cc8[52],enterAt:moment()[_0x5cc8[29]](_0x5cc8[35]),data1:_0x97eax14[_0x5cc8[53]][_0x5cc8[44]]|| _0x97eax1a[_0x5cc8[54]],data2:_0x97eax1a[_0x5cc8[55]],data3:_0x97eax1a[_0x5cc8[56]],data4:_0x97eax1a[_0x5cc8[57]],role:_0x97eax1b[_0x5cc8[27]],internal:_0x97eax1b[_0x5cc8[58]]})});return ReportMember[_0x5cc8[60]](_0x97eax1c,{individualHooks:true,transaction:_0x97eax14[_0x5cc8[59]]|| null})})}}function _0x97eax1f(_0x97eax14,_0x97eax1a){return function(_0x97eax1b){if(_0x97eax1b[_0x5cc8[64]]&& !_0x97eax1b[_0x5cc8[65]]){return Promise[_0x5cc8[63]](_0x97eax10[_0x5cc8[62]])({action:_0x5cc8[61],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),paused:true,reason:_0x5cc8[66]})[_0x5cc8[40]](function(_0x97eax1e){return _0x97eax1b[_0x5cc8[36]]({voicePause:true,chatPause:true,mailPause:true,faxPause:true,smsPause:true,openchannelPause:true,pauseType:_0x5cc8[66],lastPauseAt:moment()[_0x5cc8[29]](_0x5cc8[35])},{transaction:_0x97eax14[_0x5cc8[59]]|| null})})[_0x5cc8[40]](function(_0x97eax1b){var _0x97eax1c=[];_0x97eax12[_0x5cc8[38]](function(_0x97eax1d){_0x97eax1c[_0x5cc8[37]]({channel:_0x97eax1d,membername:_0x97eax1b[_0x5cc8[49]],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),type:_0x5cc8[52],enterAt:moment()[_0x5cc8[29]](_0x5cc8[35]),data1:_0x5cc8[66],data2:_0x97eax1a[_0x5cc8[55]],data3:_0x97eax1a[_0x5cc8[56]],data4:_0x5cc8[66],role:_0x97eax1b[_0x5cc8[27]],internal:_0x97eax1b[_0x5cc8[58]]})});return ReportMember[_0x5cc8[60]](_0x97eax1c,{individualHooks:true,transaction:_0x97eax14[_0x5cc8[59]]|| null})})}}}function _0x97eax20(_0x97eax14,_0x97eax1a){return function(_0x97eax1b){if(!_0x97eax14[_0x5cc8[53]]){_0x97eax14[_0x5cc8[53]]= {}};switch(_0x97eax14[_0x5cc8[53]][_0x5cc8[41]]){case _0x5cc8[18]:return Promise[_0x5cc8[63]](_0x97eax10[_0x5cc8[62]])({action:_0x5cc8[61],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),paused:false,reason:_0x97eax14[_0x5cc8[53]][_0x5cc8[44]]})[_0x5cc8[40]](function(){return _0x97eax1b[_0x5cc8[36]]({voicePause:false},{transaction:_0x97eax14[_0x5cc8[59]]|| null})})[_0x5cc8[40]](function(_0x97eax1b){return ReportMember[_0x5cc8[68]]({where:{channel:_0x97eax14[_0x5cc8[53]][_0x5cc8[41]],membername:_0x97eax1b[_0x5cc8[49]],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),type:_0x5cc8[52],exitAt:null}})})[_0x5cc8[40]](_0x97eax30({message:_0x5cc8[67]}))[_0x5cc8[40]](function(_0x97eax21){return _0x97eax21[_0x5cc8[36]]({exitAt:moment()[_0x5cc8[29]](_0x5cc8[35])},{individualHooks:true,transaction:_0x97eax14[_0x5cc8[59]]|| null})})[_0x5cc8[40]](function(){return _0x97eax1b});case _0x5cc8[19]:;case _0x5cc8[20]:;case _0x5cc8[21]:;case _0x5cc8[22]:;case _0x5cc8[23]:var _0x97eax15={};_0x97eax15[util[_0x5cc8[29]](_0x5cc8[69],_0x97eax14[_0x5cc8[53]][_0x5cc8[41]],_0x5cc8[70])]= false;return _0x97eax1b[_0x5cc8[36]](_0x97eax15,{transaction:_0x97eax14[_0x5cc8[59]]|| null})[_0x5cc8[40]](function(_0x97eax1b){return ReportMember[_0x5cc8[68]]({where:{channel:_0x97eax14[_0x5cc8[53]][_0x5cc8[41]],membername:_0x97eax1b[_0x5cc8[49]],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),type:_0x5cc8[52],exitAt:null}})})[_0x5cc8[40]](_0x97eax30({message:_0x5cc8[67]}))[_0x5cc8[40]](function(_0x97eax21){return _0x97eax21[_0x5cc8[36]]({exitAt:moment()[_0x5cc8[29]](_0x5cc8[35])},{individualHooks:true,transaction:_0x97eax14[_0x5cc8[59]]|| null})})[_0x5cc8[40]](function(){return _0x97eax1b});default:var _0x97eax1a=Promise[_0x5cc8[63]](_0x97eax10[_0x5cc8[62]]);return _0x97eax1a({action:_0x5cc8[61],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),paused:false})[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[71]](_0x97eax25)})[_0x5cc8[40]](function(){return _0x97eax1b[_0x5cc8[36]]({voicePause:false,mailPause:false,chatPause:false,faxPause:false,smsPause:false,openchannelPause:false},{transaction:_0x97eax14[_0x5cc8[59]]|| null})})[_0x5cc8[40]](function(_0x97eax1b){return ReportMember[_0x5cc8[45]]({where:{membername:_0x97eax1b[_0x5cc8[49]],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),type:_0x5cc8[52],exitAt:null}})})[_0x5cc8[40]](function(_0x97eax22){var _0x97eax23=[];_0x97eax22[_0x5cc8[38]](function(_0x97eax24){_0x97eax23[_0x5cc8[37]](_0x97eax24[_0x5cc8[36]]({exitAt:moment()[_0x5cc8[29]](_0x5cc8[35])}))});return Promise[_0x5cc8[39]](_0x97eax23)})[_0x5cc8[40]](function(){return _0x97eax1b})}}}function _0x97eax26(_0x97eax14,_0x97eax1a){return function(_0x97eax1b){if(!_0x97eax1b[_0x5cc8[65]]){return _0x97eax1b[_0x5cc8[75]]()[_0x5cc8[40]](function(_0x97eax27){var _0x97eax28=[];_0x97eax27[_0x5cc8[38]](function(_0x97eax29){_0x97eax28[_0x5cc8[37]](_0x97eax10[_0x5cc8[62]]({action:_0x5cc8[74],queue:_0x97eax29[_0x5cc8[49]],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),membername:_0x97eax1b[_0x5cc8[49]]}))});return Promise[_0x5cc8[39]](_0x97eax28)})[_0x5cc8[40]](function(_0x97eax1e){var _0x97eax1c=[];_0x97eax12[_0x5cc8[38]](function(_0x97eax1d){_0x97eax1c[_0x5cc8[37]]({channel:_0x97eax1d,membername:_0x97eax1b[_0x5cc8[49]],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),type:_0x5cc8[73],enterAt:moment()[_0x5cc8[29]](_0x5cc8[35]),role:_0x97eax1b[_0x5cc8[27]],internal:_0x97eax1b[_0x5cc8[58]]})});return ReportMember[_0x5cc8[60]](_0x97eax1c,{individualHooks:true})})}}}function _0x97eax2a(_0x97eax14,_0x97eax1a){return function(_0x97eax1b){return VoiceQueue[_0x5cc8[45]]()[_0x5cc8[40]](function(_0x97eax27){var _0x97eax28=[];_0x97eax27[_0x5cc8[38]](function(_0x97eax29){_0x97eax28[_0x5cc8[37]](_0x97eax10[_0x5cc8[62]]({action:_0x5cc8[76],queue:_0x97eax29[_0x5cc8[49]],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]])}))});return Promise[_0x5cc8[39]](_0x97eax28)[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[71]](_0x97eax25)})})[_0x5cc8[40]](function(_0x97eax1e){return ReportMember[_0x5cc8[45]]({where:{membername:_0x97eax1b[_0x5cc8[49]],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),type:_0x5cc8[73],exitAt:null}})})[_0x5cc8[40]](function(_0x97eax22){var _0x97eax23=[];_0x97eax22[_0x5cc8[38]](function(_0x97eax24){_0x97eax23[_0x5cc8[37]](_0x97eax24[_0x5cc8[36]]({exitAt:moment()[_0x5cc8[29]](_0x5cc8[35])}))});return Promise[_0x5cc8[39]](_0x97eax23)})}}function _0x97eax2b(_0x97eax14,_0x97eax1a){return function(_0x97eax1b){var _0x97eax2c=[];switch(_0x97eax14[_0x5cc8[53]][_0x5cc8[41]]){case _0x5cc8[18]:_0x97eax14[_0x5cc8[53]][_0x5cc8[79]][_0x5cc8[38]](function(_0x97eax2d){_0x97eax2c[_0x5cc8[37]](UserHasVoiceQueue[_0x5cc8[78]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],queue:_0x97eax2d},defaults:{queue:_0x97eax2d,location:util[_0x5cc8[29]](_0x5cc8[77],_0x97eax1b[_0x5cc8[49]]),membername:_0x97eax1b[_0x5cc8[49]],UserId:_0x97eax1b[_0x5cc8[28]]},transaction:_0x97eax14[_0x5cc8[59]]|| null,individualHooks:true}))});return Promise[_0x5cc8[39]](_0x97eax2c)[_0x5cc8[40]](function(){var _0x97eax28=[];_0x97eax14[_0x5cc8[53]][_0x5cc8[79]][_0x5cc8[38]](function(_0x97eax2d){_0x97eax28[_0x5cc8[37]](_0x97eax10[_0x5cc8[62]]({action:_0x5cc8[74],queue:_0x97eax2d,interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]]),membername:_0x97eax1b[_0x5cc8[49]]}))});return Promise[_0x5cc8[39]](_0x97eax28)})[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[71]](_0x97eax25)});case _0x5cc8[19]:_0x97eax14[_0x5cc8[53]][_0x5cc8[79]][_0x5cc8[38]](function(_0x97eax2d){_0x97eax2c[_0x5cc8[37]](UserHasChatQueue[_0x5cc8[78]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],ChatQueueId:_0x97eax2d[_0x5cc8[28]]},defaults:{ChatQueueId:_0x97eax2d[_0x5cc8[28]],queue:_0x97eax2d[_0x5cc8[49]],UserId:_0x97eax1b[_0x5cc8[28]]},transaction:_0x97eax14[_0x5cc8[59]]|| null}))});return Promise[_0x5cc8[39]](_0x97eax2c)[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[17]](_0x97eax25)});case _0x5cc8[20]:_0x97eax14[_0x5cc8[53]][_0x5cc8[79]][_0x5cc8[38]](function(_0x97eax2d){_0x97eax2c[_0x5cc8[37]](UserHasMailQueue[_0x5cc8[78]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],MailQueueId:_0x97eax2d[_0x5cc8[28]]},defaults:{MailQueueId:_0x97eax2d[_0x5cc8[28]],queue:_0x97eax2d[_0x5cc8[49]],UserId:_0x97eax1b[_0x5cc8[28]]},transaction:_0x97eax14[_0x5cc8[59]]|| null}))});return Promise[_0x5cc8[39]](_0x97eax2c)[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[17]](_0x97eax25)});case _0x5cc8[22]:_0x97eax14[_0x5cc8[53]][_0x5cc8[79]][_0x5cc8[38]](function(_0x97eax2d){_0x97eax2c[_0x5cc8[37]](UserHasSmsQueue[_0x5cc8[78]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],SmsQueueId:_0x97eax2d[_0x5cc8[28]]},defaults:{SmsQueueId:_0x97eax2d[_0x5cc8[28]],queue:_0x97eax2d[_0x5cc8[49]],UserId:_0x97eax1b[_0x5cc8[28]]},transaction:_0x97eax14[_0x5cc8[59]]|| null}))});return Promise[_0x5cc8[39]](_0x97eax2c)[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[17]](_0x97eax25)});case _0x5cc8[23]:_0x97eax14[_0x5cc8[53]][_0x5cc8[79]][_0x5cc8[38]](function(_0x97eax2d){_0x97eax2c[_0x5cc8[37]](UserHasOpenchannelQueue[_0x5cc8[78]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],OpenchannelQueueId:_0x97eax2d[_0x5cc8[28]]},defaults:{OpenchannelQueueId:_0x97eax2d[_0x5cc8[28]],queue:_0x97eax2d[_0x5cc8[49]],UserId:_0x97eax1b[_0x5cc8[28]]},transaction:_0x97eax14[_0x5cc8[59]]|| null}))});return Promise[_0x5cc8[39]](_0x97eax2c)[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[17]](_0x97eax25)});case _0x5cc8[21]:_0x97eax14[_0x5cc8[53]][_0x5cc8[79]][_0x5cc8[38]](function(_0x97eax2d){_0x97eax2c[_0x5cc8[37]](UserHasFaxQueue[_0x5cc8[78]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],FaxQueueId:_0x97eax2d[_0x5cc8[28]]},defaults:{faxQueueId:_0x97eax2d[_0x5cc8[28]],queue:_0x97eax2d[_0x5cc8[49]],UserId:_0x97eax1b[_0x5cc8[28]]},transaction:_0x97eax14[_0x5cc8[59]]|| null}))});return Promise[_0x5cc8[39]](_0x97eax2c)[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[17]](_0x97eax25)});default:}}}function _0x97eax2e(_0x97eax14,_0x97eax1a){return function(_0x97eax1b){switch(_0x97eax14[_0x5cc8[53]][_0x5cc8[41]]){case _0x5cc8[18]:return UserHasVoiceQueue[_0x5cc8[82]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],queue:_0x97eax14[_0x5cc8[53]][_0x5cc8[81]]},transaction:_0x97eax14[_0x5cc8[59]]|| null,individualHooks:true})[_0x5cc8[40]](function(){var _0x97eax2f=Promise[_0x5cc8[63]](_0x97eax10[_0x5cc8[62]]);return _0x97eax2f({action:_0x5cc8[76],queue:_0x97eax14[_0x5cc8[53]][_0x5cc8[81]],interface:util[_0x5cc8[29]](_0x5cc8[50],_0x5cc8[51],_0x97eax1b[_0x5cc8[49]])})})[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[71]](_0x5cc8[80],_0x97eax25)});case _0x5cc8[19]:return UserHasChatQueue[_0x5cc8[82]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],ChatQueueId:_0x97eax14[_0x5cc8[53]][_0x5cc8[83]]},transaction:_0x97eax14[_0x5cc8[59]]|| null,individualHooks:true})[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[71]](_0x5cc8[80],_0x97eax25)});case _0x5cc8[20]:return UserHasMailQueue[_0x5cc8[82]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],MailQueueId:_0x97eax14[_0x5cc8[53]][_0x5cc8[83]]},transaction:_0x97eax14[_0x5cc8[59]]|| null,individualHooks:true})[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[71]](_0x5cc8[80],_0x97eax25)});case _0x5cc8[22]:return UserHasSmsQueue[_0x5cc8[82]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],SmsQueueId:_0x97eax14[_0x5cc8[53]][_0x5cc8[83]]},transaction:_0x97eax14[_0x5cc8[59]]|| null,individualHooks:true})[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[71]](_0x5cc8[80],_0x97eax25)});case _0x5cc8[23]:return UserHasOpenchannelQueue[_0x5cc8[82]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],OpenchannelQueueId:_0x97eax14[_0x5cc8[53]][_0x5cc8[83]]},transaction:_0x97eax14[_0x5cc8[59]]|| null,individualHooks:true})[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[71]](_0x5cc8[80],_0x97eax25)});case _0x5cc8[21]:return UserHasFaxQueue[_0x5cc8[82]]({where:{UserId:_0x97eax1b[_0x5cc8[28]],FaxQueueId:_0x97eax14[_0x5cc8[53]][_0x5cc8[83]]},transaction:_0x97eax14[_0x5cc8[59]]|| null,individualHooks:true})[_0x5cc8[72]](function(_0x97eax25){console[_0x5cc8[71]](_0x5cc8[80],_0x97eax25)});default:}}}function _0x97eax30(_0x97eax31){return function(_0x97eax32){if(!_0x97eax32){throw _0x97eax31};return _0x97eax32}}function _0x97eax33(_0x97eax1a,_0x97eax14,_0x97eax10){switch(_0x97eax1a[_0x5cc8[49]]){case _0x5cc8[87]:return Agent[_0x5cc8[86]](_0x97eax14[_0x5cc8[53]][_0x5cc8[85]])[_0x5cc8[40]](_0x97eax30({message:_0x5cc8[84]}))[_0x5cc8[40]](_0x97eax19(_0x97eax14,_0x97eax1a));case _0x5cc8[88]:return Agent[_0x5cc8[86]](_0x97eax14[_0x5cc8[53]][_0x5cc8[85]])[_0x5cc8[40]](_0x97eax30({message:_0x5cc8[84]}))[_0x5cc8[40]](_0x97eax20(_0x97eax14,_0x97eax1a));case _0x5cc8[89]:return Agent[_0x5cc8[86]](_0x97eax1a[_0x5cc8[54]])[_0x5cc8[40]](_0x97eax30({message:_0x5cc8[84]}))[_0x5cc8[40]](_0x97eax26(_0x97eax14,_0x97eax1a))[_0x5cc8[40]](function(){return Agent[_0x5cc8[86]](_0x97eax1a[_0x5cc8[54]])})[_0x5cc8[40]](_0x97eax1f(_0x97eax14,_0x97eax1a));case _0x5cc8[90]:return Agent[_0x5cc8[86]](_0x97eax1a[_0x5cc8[54]])[_0x5cc8[40]](_0x97eax30({message:_0x5cc8[84]}))[_0x5cc8[40]](_0x97eax20(_0x97eax14,_0x97eax1a))[_0x5cc8[40]](_0x97eax2a(_0x97eax14,_0x97eax1a));case _0x5cc8[74]:return Agent[_0x5cc8[86]](_0x97eax14[_0x5cc8[53]][_0x5cc8[85]])[_0x5cc8[40]](_0x97eax30({message:_0x5cc8[84]}))[_0x5cc8[40]](_0x97eax2b(_0x97eax14,_0x97eax1a));case _0x5cc8[76]:return Agent[_0x5cc8[86]](_0x97eax14[_0x5cc8[53]][_0x5cc8[85]])[_0x5cc8[40]](_0x97eax30({message:_0x5cc8[84]}))[_0x5cc8[40]](_0x97eax2e(_0x97eax14,_0x97eax1a));default:throw {message:_0x5cc8[91]}}}return {}}module[_0x5cc8[92]]= Action \ No newline at end of file diff --git a/server/config/ami/acw.js b/server/config/ami/acw.js index 2799028..b8adf09 100644 --- a/server/config/ami/acw.js +++ b/server/config/ami/acw.js @@ -1,162 +1 @@ -'use strict'; - -var util = require('util'); -var moment = require('moment'); - -var _ = require('lodash'); -var VoiceQueue = require('../../models').VoiceQueue; -var Agent = require('../../models').User; -var Action = require('../../models').Action; -var ReportAgent = require('../../models').ReportAgent; -var _voiceQueues; -var _agents; -var activeAcw = {}; - -function ACW(ami) { - console.log('ACW Initialization...'); - return VoiceQueue - .findAll() - .then(function(voiceQueues) { - _voiceQueues = voiceQueues; - - synchCollection(VoiceQueue, _voiceQueues, 'name'); - return Agent - .scope('agent') - .findAll(); - }) - .then(function(agents) { - _agents = agents; - - synchCollection(Agent, _agents, 'id'); - - Action.afterDestroy(function(doc, options) { - return onSave(doc, options); - }); - }) - .catch(function(err) { - console.log(err); - }); -} - -function onSave(doc, options) { - var acwTime; - if ((doc.name === 'pause' || doc.name === 'unpause') && activeAcw[options.body.agent]) { - if (doc.name === 'unpause' && activeAcw[options.body.agent].unpause) { - acwTime = activeAcw[options.body.agent].acwTime; - } else { - clearTimeout(activeAcw[options.body.agent].timeout); - acwTime = moment.duration(moment() - activeAcw[options.body.agent].acwAt).asSeconds(); - } - return ReportAgent - .update({ - agentacw: true, - acwtime: acwTime - }, { - where: { - uniqueid: activeAcw[options.body.agent].uniqueid, - destuniqueid: activeAcw[options.body.agent].destuniqueid - }, - // transaction: options.transaction, - individualHooks: true, - raw: true - }) - .catch(function(err) { - console.log(err); - }) - .finally(function() { - delete activeAcw[options.body.agent]; - }); - } -} - -ACW.prototype.agentcomplete = function(evt) { - var queueIsAcw = _.find(_voiceQueues, { - name: evt.queue, - acw: true - }); - if (queueIsAcw) { - var agent = _.find(_agents, { - name: evt.membername - }); - Action - .create({ - name: 'pause', - data1: 'ACW', - data2: queueIsAcw.acwTimeout, - data3: evt.uniqueid, - data4: evt.queue - }, { - body: { - agent: agent.id, - type: 'ACW' - }, - raw: true - }) - .then(function() { - console.log('PAUSED BY ACW'); - activeAcw[agent.id] = { - uniqueid: evt.uniqueid, - destuniqueid: evt.destuniqueid, - acwTime: queueIsAcw.acwTimeout, - acwAt: moment(), - unpause: false - }; - - activeAcw[agent.id].timeout = setTimeout(function() { - console.log('UNPAUSED BY ACW'); - activeAcw[agent.id].unpause = true; - return Action - .create({ - name: 'unpause', - data1: 'ACW', - data2: queueIsAcw.acwTimeout, - data3: evt.uniqueid, - data4: evt.queue - }, { - body: { - agent: agent.id, - type: 'ACW' - }, - raw: true - }) - .catch(function(err) { - console.log(err); - }); - }, queueIsAcw.acwTimeout * 1000); - }) - .catch(function(err) { - console.log(err); - }); - } -} - -function synchCollection(model, array, uniqueProperty) { - var condition = {}; - - model.addHook('afterCreate', function(doc, options) { - condition[uniqueProperty] = doc[uniqueProperty] - updateCollection(array, doc, condition); - }); - - model.addHook('afterUpdate', function(doc, options) { - condition[uniqueProperty] = doc[uniqueProperty] - updateCollection(array, doc, condition); - }); - - model.addHook('afterDestroy', function(doc, options) { - condition[uniqueProperty] = doc[uniqueProperty] - _.remove(array, condition); - }); -} - -function updateCollection(collection, doc, condition) { - var oldItem = _.find(collection, condition); - var index = collection.indexOf(oldItem); - if (oldItem) { - _.merge(collection[index], doc); - } else { - collection.unshift(doc); - } -} - -module.exports = ACW; +var _0x5f23=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x41\x43\x57\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x69\x64","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x70\x61\x75\x73\x65","\x75\x6E\x70\x61\x75\x73\x65","\x62\x6F\x64\x79","\x61\x63\x77\x54\x69\x6D\x65","\x74\x69\x6D\x65\x6F\x75\x74","\x61\x73\x53\x65\x63\x6F\x6E\x64\x73","\x61\x63\x77\x41\x74","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x66\x69\x6E\x61\x6C\x6C\x79","\x75\x6E\x69\x71\x75\x65\x69\x64","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x71\x75\x65\x75\x65","\x66\x69\x6E\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x61\x63\x77\x54\x69\x6D\x65\x6F\x75\x74","\x55\x4E\x50\x41\x55\x53\x45\x44\x20\x42\x59\x20\x41\x43\x57","\x41\x43\x57","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x64\x64\x48\x6F\x6F\x6B","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x69\x6E\x64\x65\x78\x4F\x66","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x5f23[0];var util=require(_0x5f23[1]);var moment=require(_0x5f23[2]);var _=require(_0x5f23[3]);var VoiceQueue=require(_0x5f23[5])[_0x5f23[4]];var Agent=require(_0x5f23[5])[_0x5f23[6]];var Action=require(_0x5f23[5])[_0x5f23[7]];var ReportAgent=require(_0x5f23[5])[_0x5f23[8]];var _voiceQueues;var _agents;var activeAcw={};function ACW(_0x205bxc){console[_0x5f23[10]](_0x5f23[9]);return VoiceQueue[_0x5f23[16]]()[_0x5f23[14]](function(_0x205bx11){_voiceQueues= _0x205bx11;synchCollection(VoiceQueue,_voiceQueues,_0x5f23[15]);return Agent[_0x5f23[18]](_0x5f23[17])[_0x5f23[16]]()})[_0x5f23[14]](function(_0x205bxe){_agents= _0x205bxe;synchCollection(Agent,_agents,_0x5f23[12]);Action[_0x5f23[13]](function(_0x205bxf,_0x205bx10){return onSave(_0x205bxf,_0x205bx10)})})[_0x5f23[11]](function(_0x205bxd){console[_0x5f23[10]](_0x205bxd)})}function onSave(_0x205bxf,_0x205bx10){var _0x205bx13;if((_0x205bxf[_0x5f23[15]]=== _0x5f23[19]|| _0x205bxf[_0x5f23[15]]=== _0x5f23[20])&& activeAcw[_0x205bx10[_0x5f23[21]][_0x5f23[17]]]){if(_0x205bxf[_0x5f23[15]]=== _0x5f23[20]&& activeAcw[_0x205bx10[_0x5f23[21]][_0x5f23[17]]][_0x5f23[20]]){_0x205bx13= activeAcw[_0x205bx10[_0x5f23[21]][_0x5f23[17]]][_0x5f23[22]]}else {clearTimeout(activeAcw[_0x205bx10[_0x5f23[21]][_0x5f23[17]]][_0x5f23[23]]);_0x205bx13= moment[_0x5f23[26]](moment()- activeAcw[_0x205bx10[_0x5f23[21]][_0x5f23[17]]][_0x5f23[25]])[_0x5f23[24]]()};return ReportAgent[_0x5f23[30]]({agentacw:true,acwtime:_0x205bx13},{where:{uniqueid:activeAcw[_0x205bx10[_0x5f23[21]][_0x5f23[17]]][_0x5f23[28]],destuniqueid:activeAcw[_0x205bx10[_0x5f23[21]][_0x5f23[17]]][_0x5f23[29]]},individualHooks:true,raw:true})[_0x5f23[11]](function(_0x205bxd){console[_0x5f23[10]](_0x205bxd)})[_0x5f23[27]](function(){delete activeAcw[_0x205bx10[_0x5f23[21]][_0x5f23[17]]]})}}ACW[_0x5f23[32]][_0x5f23[31]]= function(_0x205bx14){var _0x205bx15=_[_0x5f23[34]](_voiceQueues,{name:_0x205bx14[_0x5f23[33]],acw:true});if(_0x205bx15){var _0x205bx16=_[_0x5f23[34]](_agents,{name:_0x205bx14[_0x5f23[35]]});Action[_0x5f23[40]]({name:_0x5f23[19],data1:_0x5f23[39],data2:_0x205bx15[_0x5f23[37]],data3:_0x205bx14[_0x5f23[28]],data4:_0x205bx14[_0x5f23[33]]},{body:{agent:_0x205bx16[_0x5f23[12]],type:_0x5f23[39]},raw:true})[_0x5f23[14]](function(){console[_0x5f23[10]](_0x5f23[36]);activeAcw[_0x205bx16[_0x5f23[12]]]= {uniqueid:_0x205bx14[_0x5f23[28]],destuniqueid:_0x205bx14[_0x5f23[29]],acwTime:_0x205bx15[_0x5f23[37]],acwAt:moment(),unpause:false};activeAcw[_0x205bx16[_0x5f23[12]]][_0x5f23[23]]= setTimeout(function(){console[_0x5f23[10]](_0x5f23[38]);activeAcw[_0x205bx16[_0x5f23[12]]][_0x5f23[20]]= true;return Action[_0x5f23[40]]({name:_0x5f23[20],data1:_0x5f23[39],data2:_0x205bx15[_0x5f23[37]],data3:_0x205bx14[_0x5f23[28]],data4:_0x205bx14[_0x5f23[33]]},{body:{agent:_0x205bx16[_0x5f23[12]],type:_0x5f23[39]},raw:true})[_0x5f23[11]](function(_0x205bxd){console[_0x5f23[10]](_0x205bxd)})},_0x205bx15[_0x5f23[37]]* 1000)})[_0x5f23[11]](function(_0x205bxd){console[_0x5f23[10]](_0x205bxd)})}};function synchCollection(_0x205bx18,_0x205bx19,_0x205bx1a){var _0x205bx1b={};_0x205bx18[_0x5f23[42]](_0x5f23[41],function(_0x205bxf,_0x205bx10){_0x205bx1b[_0x205bx1a]= _0x205bxf[_0x205bx1a];updateCollection(_0x205bx19,_0x205bxf,_0x205bx1b)});_0x205bx18[_0x5f23[42]](_0x5f23[43],function(_0x205bxf,_0x205bx10){_0x205bx1b[_0x205bx1a]= _0x205bxf[_0x205bx1a];updateCollection(_0x205bx19,_0x205bxf,_0x205bx1b)});_0x205bx18[_0x5f23[42]](_0x5f23[13],function(_0x205bxf,_0x205bx10){_0x205bx1b[_0x205bx1a]= _0x205bxf[_0x205bx1a];_[_0x5f23[44]](_0x205bx19,_0x205bx1b)})}function updateCollection(_0x205bx1d,_0x205bxf,_0x205bx1b){var _0x205bx1e=_[_0x5f23[34]](_0x205bx1d,_0x205bx1b);var _0x205bx1f=_0x205bx1d[_0x5f23[45]](_0x205bx1e);if(_0x205bx1e){_[_0x5f23[46]](_0x205bx1d[_0x205bx1f],_0x205bxf)}else {_0x205bx1d[_0x5f23[47]](_0x205bxf)}}module[_0x5f23[48]]= ACW \ No newline at end of file diff --git a/server/config/ami/agent.js b/server/config/ami/agent.js index 013867f..8691b15 100644 --- a/server/config/ami/agent.js +++ b/server/config/ami/agent.js @@ -1,117 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); -const ReportAgent = require('../../models').ReportAgent; - -function Agent() { - console.log('Agent Initialization...'); -} - -Agent.prototype.called = function(evt) { - evt.lastevent = 'called'; - evt.agentcalledAt = moment().format("YYYY-MM-DD HH:mm:ss"); - return createAgent(evt); -} - -Agent.prototype.connect = function(evt) { - evt.lastevent = 'connect'; - evt.agentconnectAt = moment().format("YYYY-MM-DD HH:mm:ss"); - updateAgents(evt); - updateAgents({ - agentringnoanswer: true, - agentringnoanswerAt: moment().format("YYYY-MM-DD HH:mm:ss"), - reason: 'answered_elsewhere', - lastevent: 'answered_elsewhere', - answeredelsewheredestinationuniqueid: evt.destuniqueid, - answeredelsewheremembername: evt.membername - }, { - uniqueid: evt.uniqueid, - destuniqueid: { - $ne: evt.destuniqueid - }, - reason: null - }); -} - -Agent.prototype.complete = function(evt) { - evt.lastevent = 'complete'; - evt.agentcomplete = true; - evt.agentcompleteAt = moment().format("YYYY-MM-DD HH:mm:ss"); - return updateAgents(evt); -} - -Agent.prototype.dump = function(evt) { - evt.lastevent = 'dump'; - - evt.agentdump = true; - evt.agentdumpAt = moment().format("YYYY-MM-DD HH:mm:ss"); - return updateAgents(evt); -} - -Agent.prototype.ringnoanswer = function(evt) { - evt.lastevent = 'rejected'; - evt.agentringnoanswer = true; - evt.agentringnoanswerAt = moment().format("YYYY-MM-DD HH:mm:ss"); - evt.reason = 'rejected'; - return updateAgents(evt); -} - -Agent.prototype.callerabandon = function(evt) { - evt.lastevent = 'abandoned'; - evt.agentringnoanswer = true; - evt.agentringnoanswerAt = moment().format("YYYY-MM-DD HH:mm:ss"); - evt.reason = 'abandoned'; - return updateAgents(evt, { - uniqueid: evt.uniqueid, - reason: null - }); -} - -function createAgent(evt) { - return ReportAgent - .create(evt, { - raw: true - }) - .then(function(data) { - console.log('[report] agent create'); - }) - .catch(function(err) { - console.error('[report] agent ' + err); - }); -} - -function updateAgents(evt, where) { - return ReportAgent - .findOne({ - where: where || { - uniqueid: evt.uniqueid, - destuniqueid: evt.destuniqueid - }, - }) - .then(function(reportAgent) { - if (reportAgent) { - return reportAgent - .update(evt); - } - }) - .then(function(data) { - console.log('[agent] agent update'); - }) - .catch(function(err) { - console.error('[agent] agent error: ' + err); - }); -} - -ReportAgent.afterCreate(function(doc, options) { - doc.dataValues.evt = 'ReportAgent.afterCreate'; - process.send(doc.dataValues); -}); - -ReportAgent.afterUpdate(function(doc, options) { - doc.dataValues.evt = 'ReportAgent.afterUpdate'; - doc.dataValues.changed = _.keyBy(doc.changed()); - process.send(doc.dataValues); -}); - -module.exports = Agent; +var _0xe874=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x67\x65\x6E\x74\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x61\x6C\x6C\x65\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x61\x6E\x73\x77\x65\x72\x65\x64\x5F\x65\x6C\x73\x65\x77\x68\x65\x72\x65","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x64\x75\x6D\x70","\x61\x67\x65\x6E\x74\x64\x75\x6D\x70","\x61\x67\x65\x6E\x74\x64\x75\x6D\x70\x41\x74","\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x72\x65\x6A\x65\x63\x74\x65\x64","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72\x41\x74","\x72\x65\x61\x73\x6F\x6E","\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x61\x67\x65\x6E\x74\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x61\x67\x65\x6E\x74\x20\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x61\x67\x65\x6E\x74\x5D\x20\x61\x67\x65\x6E\x74\x20\x65\x72\x72\x6F\x72\x3A\x20","\x5B\x61\x67\x65\x6E\x74\x5D\x20\x61\x67\x65\x6E\x74\x20\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe874[0];const _=require(_0xe874[1]);const moment=require(_0xe874[2]);const ReportAgent=require(_0xe874[4])[_0xe874[3]];function Agent(){console[_0xe874[6]](_0xe874[5])}Agent[_0xe874[8]][_0xe874[7]]= function(_0x177ex5){_0x177ex5[_0xe874[9]]= _0xe874[7];_0x177ex5[_0xe874[10]]= moment()[_0xe874[12]](_0xe874[11]);return createAgent(_0x177ex5)};Agent[_0xe874[8]][_0xe874[13]]= function(_0x177ex5){_0x177ex5[_0xe874[9]]= _0xe874[13];_0x177ex5[_0xe874[14]]= moment()[_0xe874[12]](_0xe874[11]);updateAgents(_0x177ex5);updateAgents({agentringnoanswer:true,agentringnoanswerAt:moment()[_0xe874[12]](_0xe874[11]),reason:_0xe874[15],lastevent:_0xe874[15],answeredelsewheredestinationuniqueid:_0x177ex5[_0xe874[16]],answeredelsewheremembername:_0x177ex5[_0xe874[17]]},{uniqueid:_0x177ex5[_0xe874[18]],destuniqueid:{$ne:_0x177ex5[_0xe874[16]]},reason:null})};Agent[_0xe874[8]][_0xe874[19]]= function(_0x177ex5){_0x177ex5[_0xe874[9]]= _0xe874[19];_0x177ex5[_0xe874[20]]= true;_0x177ex5[_0xe874[21]]= moment()[_0xe874[12]](_0xe874[11]);return updateAgents(_0x177ex5)};Agent[_0xe874[8]][_0xe874[22]]= function(_0x177ex5){_0x177ex5[_0xe874[9]]= _0xe874[22];_0x177ex5[_0xe874[23]]= true;_0x177ex5[_0xe874[24]]= moment()[_0xe874[12]](_0xe874[11]);return updateAgents(_0x177ex5)};Agent[_0xe874[8]][_0xe874[25]]= function(_0x177ex5){_0x177ex5[_0xe874[9]]= _0xe874[26];_0x177ex5[_0xe874[27]]= true;_0x177ex5[_0xe874[28]]= moment()[_0xe874[12]](_0xe874[11]);_0x177ex5[_0xe874[29]]= _0xe874[26];return updateAgents(_0x177ex5)};Agent[_0xe874[8]][_0xe874[30]]= function(_0x177ex5){_0x177ex5[_0xe874[9]]= _0xe874[31];_0x177ex5[_0xe874[27]]= true;_0x177ex5[_0xe874[28]]= moment()[_0xe874[12]](_0xe874[11]);_0x177ex5[_0xe874[29]]= _0xe874[31];return updateAgents(_0x177ex5,{uniqueid:_0x177ex5[_0xe874[18]],reason:null})};function createAgent(_0x177ex5){return ReportAgent[_0xe874[37]](_0x177ex5,{raw:true})[_0xe874[36]](function(_0x177ex8){console[_0xe874[6]](_0xe874[35])})[_0xe874[34]](function(_0x177ex7){console[_0xe874[33]](_0xe874[32]+ _0x177ex7)})}function updateAgents(_0x177ex5,_0x177exa){return ReportAgent[_0xe874[41]]({where:_0x177exa|| {uniqueid:_0x177ex5[_0xe874[18]],destuniqueid:_0x177ex5[_0xe874[16]]}})[_0xe874[36]](function(_0x177exb){if(_0x177exb){return _0x177exb[_0xe874[40]](_0x177ex5)}})[_0xe874[36]](function(_0x177ex8){console[_0xe874[6]](_0xe874[39])})[_0xe874[34]](function(_0x177ex7){console[_0xe874[33]](_0xe874[38]+ _0x177ex7)})}ReportAgent[_0xe874[46]](function(_0x177exc,_0x177exd){_0x177exc[_0xe874[43]][_0xe874[42]]= _0xe874[44];process[_0xe874[45]](_0x177exc[_0xe874[43]])});ReportAgent[_0xe874[50]](function(_0x177exc,_0x177exd){_0x177exc[_0xe874[43]][_0xe874[42]]= _0xe874[47];_0x177exc[_0xe874[43]][_0xe874[48]]= _[_0xe874[49]](_0x177exc[_0xe874[48]]());process[_0xe874[45]](_0x177exc[_0xe874[43]])});module[_0xe874[51]]= Agent \ No newline at end of file diff --git a/server/config/ami/ami.js b/server/config/ami/ami.js index 3724878..5b07827 100644 --- a/server/config/ami/ami.js +++ b/server/config/ami/ami.js @@ -1,337 +1 @@ -'use strict'; - -console.log('Ami process started..'); - -var Agent = require('./agent'); -var Action = require('./action'); -var Call = require('./call'); -var Member = require('./member'); -var QueueCaller = require('./queue_caller'); -var QueueMember = require('./queue_member'); -var Recording = require('./recording'); -var Trunk = require('./trunk'); -var Context = require('./voice_context'); -var ACW = require('./acw'); -var User = require('./user'); -var Transfer = require('./transfer'); -var Network = require('./network'); -var Fax = require('./fax'); -var Dial = require('./dial'); -var Cleaner = require('./cleaner'); - -var _ = require('lodash'); -var config = require('../environment'); - -function getVariable(event) { - var _event = _.clone(event) - var keys = _.keys(_event.variable); - _event.variable = keys[0]; - return _event; -} - -var ami = require('asterisk-manager')(config.asterisk.port, - config.asterisk.host, - config.asterisk.username, - config.asterisk.password, - true); - -ami.keepConnected(); - -var io = require('socket.io-emitter')({ - host: config.ip, - port: 6379 -}); - -var agent = new Agent(); -var call = new Call(); -var member = new Member(); -var queuemember = new QueueMember(); -var queuecaller = new QueueCaller(); -var recording = new Recording(); -var trunk = new Trunk(ami); -var context = new Context(ami); -var action = new Action(ami, io); -var acw = new ACW(ami); -var user = new User(); -var tranfer = new Transfer(); -var network = new Network(ami); -var fax = new Fax(ami); -var dial = new Dial(); -var cleaner = new Cleaner(ami); - -// Asterisk Status Connect - -// Raised when asterisk is connected -ami.on('connect', function() { - console.info('[%s:%s] AMI CONNECTED', ami.options.host, ami.options.port); - ami.options.connectedAt = new Date(); - // Call onConnect. -}); - -// Raised when asterisk is disconnected -ami.on('disconnect', function() { - // Call onDisconnect. - console.info('[%s:%s] AMI DISCONNECTED', ami.options.host, ami.options.port); -}); - -// Raised when asterisk is closed -ami.on('close', function(flag) { - console.log('[%s:%s] AMI CLOSE: %s', ami.options.host, ami.options.port, flag); -}); - -// Raised when asterisk has an error -ami.on('error', function(err) { - console.log('[%s:%s] AMI ERROR: %s', ami.options.host, ami.options.port, err); -}); - -// ami.on('managerevent', function(evt) { -// console.log('managerevent', evt); -// }); - -ami.on('devicestatechange', function(evt) { - if (evt.device === 'SIP/massimiliano.bungaro') console.log('statechange', evt.state); - if (evt.device.indexOf('SIP/') === 0) { - user.stateUpdate(evt); - } -}); - -// Agent Status Events - -// Raised when an Agent is notified of a member in the queue. -ami.on('agentcalled', function(evt) { - agent.called(evt); - user.queueStatusUpdate('called', evt); -}); - -// Raised when an agent has finished servicing a member in the queue. -ami.on('agentcomplete', function(evt) { - // console.log('agentcomplete', evt); - delete evt.holdtime; - - recording.updateQueue(evt); - // acw.agentcomplete(evt); - agent.complete(evt); - member.inboundComplete(evt); - queuecaller.complete(evt); - user.queueStatusUpdate('complete', evt); -}); - -// Raised when an agent answers and is bridged to a member in the queue. -ami.on('agentconnect', function(evt) { - // console.log('agentconnect', evt); - queuecaller.leave(evt); - agent.connect(evt); - member.inboundTalking(evt); - user.queueStatusUpdate('connect', evt); -}); - -// Raised when an agent hangs up on a member in the queue. -ami.on('agentdump', function(evt) { - // console.log('agentdump', evt); - agent.dump(evt); - user.queueStatusUpdate('complete', evt); -}); - -// Raised when an agent is notified of a member in the queue and fails to answer. -ami.on('agentringnoanswer', function(evt) { - // console.log('agentringnoanswer', evt); - agent.ringnoanswer(evt); - user.queueStatusUpdate('complete', evt); -}); - -// Member Status Events in Queue - -// Raised when a member is added to the queue. -ami.on('queuememberadded', function(evt) { - queuemember.added(evt); -}); - -// Raised when a member is paused/unpaused in the queue with a reason. -ami.on('queuememberpause', function(evt) { - queuemember.pause(evt); -}); - -// Raised when a member's penalty is changed. -ami.on('queuememberpenalty', function(evt) { - queuemember.penalty(evt); -}); - -// Raised when a member is removed from the queue. -ami.on('queuememberremoved', function(evt) { - queuemember.removed(evt); -}); - -// Raised when a member's ringinuse setting is changed. -ami.on('queuememberringinuse', function(evt) { - queuemember.ringinuse(evt); -}); - -// Raised when a Queue member's status has changed. -ami.on('queuememberstatus', function(evt) { - queuemember.status(evt); -}); - -// Queue Status Events - -// Raised when a caller joins a Queue. -ami.on('queuecallerjoin', function(evt) { - queuecaller.join(evt); -}); - -// Raised when a caller abandons the queue. -ami.on('queuecallerabandon', function(evt) { - queuecaller.abandon(evt); - //queuemember.callerabandon(evt); - user.queueStatusUpdate('complete', evt); - agent.callerabandon(evt); -}); - -// Raised when a caller leaves a Queue. -ami.on('queuecallerleave', function(evt) { - // queuecaller.leave(evt); -}); - -// Cdr Status Events - -// Raised when a CDR is generated. -ami.on('cdr', function(evt) { - call.add(evt); - recording.updateType(evt); -}); - -// Hangup Status Events -ami.on('hangup', function(evt) { - // console.log('hangup', evt); - //agent.hangup(evt); - dial.hangup(evt); - member.outboundComplete(evt); -}); - -// // Recordings Events -// ami.on('monitorstart', function(evt) { -// // console.log('evt', evt); -// });trna -// -// ami.on('monitorstop', function(evt) { -// // console.log('evt', evt); -// recording.create(evt, 'outbound'); -// }); - -ami.on('blindtransfer', function(evt) { - // console.log('blindtransfer', evt); - evt.type = 'blind'; - tranfer.createBlind(evt); -}); - -ami.on('attendedtransfer', function(evt) { - // console.log('attendedtransfer', evt); - evt.type = 'attended'; - tranfer.createAttended(evt); -}); - -// Variable Events -ami.on('varset', function(evt) { - evt.evt = evt.event; - process.send(evt); - - var event = getVariable(evt); - switch (event.variable) { - case 'mixmonitor_filename': - recording.create(event); - break; - case 'queuestatus': - queuecaller.exit(event); - break; - case 'faxerror': - console.log('VarSet faxerror', evt); - if (evt.value) { - fax.updateError(evt); - } - break; - case 'faxstatusstring': - console.log('VarSet faxstatusstring', evt); - break; - case 'faxpages': - console.log('VarSet faxpages', evt); - break; - case 'outboundrouteid': - if (evt.value) { - dial.beforeDial({ - uniqueid: evt.uniqueid, - routeId: evt.value - }); - } - break; - default: - // console.log('Variable not managed:', event.variable); - break; - } -}); - -//Trunk registry event -ami.on('registry', function(evt) { - trunk.statusUpdate(evt); -}); - -ami.on('peerstatus', function(evt) { - trunk.peerstatusUpdate(evt); -}); - -//Fax Events -ami.on('receivefax', function(evt) { - fax.receivefax(evt); -}); - -// Debug purpose -// setTimeout(function() { -// console.log('New timeout'); -// fax.receivefax({ -// event: 'ReceiveFAX', -// privilege: 'call,all', -// channel: 'SIP/Demo citalia-0000003b', -// channelstate: '6', -// channelstatedesc: 'Up', -// calleridnum: '01119214291', -// calleridname: '', -// connectedlinenum: '', -// connectedlinename: '', -// language: 'en', -// accountcode: '', -// context: 'from-voip-provider', -// exten: '01119827770', -// priority: '120', -// uniqueid: '1466507863.139', -// linkedid: '1466507863.139', -// localstationid: '01119827770', -// remotestationid: '01119214291', -// pagestransferred: '1', -// resolution: '8031x7700', -// transferrate: '9600', -// filename: '/var/opt/motion/server/files/fax/inbound/original/fax-20160621-131746.tif' -// }); -// }, 10 * 1000); - -ami.on('faxstatus', function(evt) { - if (evt.operation === 'send') { - console.log('FaxStatus Event', evt); - //Update outgoing message - fax.updateMessage(evt); - } -}); - -ami.on('dialbegin', function(evt) { - dial.begin(evt); -}); - -ami.on('dialend', function(evt) { - dial.end(evt); - member.outboundTalking(evt); -}) - -ami.on('sendfax', function(evt) { - console.log('SendFAX Event', evt); - fax.updateSend(evt); -}); - -// require('./../fax').register(ami); -// require('../../api/ami/ami.ami').register(ami); +var _0x6887=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x41\x6D\x69\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x73\x74\x61\x72\x74\x65\x64\x2E\x2E","\x6C\x6F\x67","\x2E\x2F\x61\x67\x65\x6E\x74","\x2E\x2F\x61\x63\x74\x69\x6F\x6E","\x2E\x2F\x63\x61\x6C\x6C","\x2E\x2F\x6D\x65\x6D\x62\x65\x72","\x2E\x2F\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72","\x2E\x2F\x71\x75\x65\x75\x65\x5F\x6D\x65\x6D\x62\x65\x72","\x2E\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2F\x74\x72\x75\x6E\x6B","\x2E\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x2E\x2F\x61\x63\x77","\x2E\x2F\x75\x73\x65\x72","\x2E\x2F\x74\x72\x61\x6E\x73\x66\x65\x72","\x2E\x2F\x6E\x65\x74\x77\x6F\x72\x6B","\x2E\x2F\x66\x61\x78","\x2E\x2F\x64\x69\x61\x6C","\x2E\x2F\x63\x6C\x65\x61\x6E\x65\x72","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x63\x6C\x6F\x6E\x65","\x76\x61\x72\x69\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x70\x6F\x72\x74","\x61\x73\x74\x65\x72\x69\x73\x6B","\x68\x6F\x73\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x61\x73\x74\x65\x72\x69\x73\x6B\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x6B\x65\x65\x70\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x69\x70","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x63\x6F\x6E\x6E\x65\x63\x74","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x66\x6F","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x63\x6C\x6F\x73\x65","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x43\x4C\x4F\x53\x45\x3A\x20\x25\x73","\x65\x72\x72\x6F\x72","\x5B\x25\x73\x3A\x25\x73\x5D\x20\x41\x4D\x49\x20\x45\x52\x52\x4F\x52\x3A\x20\x25\x73","\x64\x65\x76\x69\x63\x65\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x64\x65\x76\x69\x63\x65","\x53\x49\x50\x2F\x6D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x2E\x62\x75\x6E\x67\x61\x72\x6F","\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x73\x74\x61\x74\x65","\x53\x49\x50\x2F","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x74\x61\x74\x65\x55\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64","\x63\x61\x6C\x6C\x65\x64","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x75\x70\x64\x61\x74\x65\x51\x75\x65\x75\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x69\x6E\x62\x6F\x75\x6E\x64\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74","\x6C\x65\x61\x76\x65","\x69\x6E\x62\x6F\x75\x6E\x64\x54\x61\x6C\x6B\x69\x6E\x67","\x61\x67\x65\x6E\x74\x64\x75\x6D\x70","\x64\x75\x6D\x70","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x61\x64\x64\x65\x64","\x61\x64\x64\x65\x64","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x70\x61\x75\x73\x65","\x70\x61\x75\x73\x65","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x70\x65\x6E\x61\x6C\x74\x79","\x70\x65\x6E\x61\x6C\x74\x79","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x72\x65\x6D\x6F\x76\x65\x64","\x72\x65\x6D\x6F\x76\x65\x64","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x73\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E","\x6A\x6F\x69\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E","\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65","\x63\x64\x72","\x61\x64\x64","\x75\x70\x64\x61\x74\x65\x54\x79\x70\x65","\x68\x61\x6E\x67\x75\x70","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x62\x6C\x69\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x74\x79\x70\x65","\x62\x6C\x69\x6E\x64","\x63\x72\x65\x61\x74\x65\x42\x6C\x69\x6E\x64","\x61\x74\x74\x65\x6E\x64\x65\x64\x74\x72\x61\x6E\x73\x66\x65\x72","\x61\x74\x74\x65\x6E\x64\x65\x64","\x63\x72\x65\x61\x74\x65\x41\x74\x74\x65\x6E\x64\x65\x64","\x76\x61\x72\x73\x65\x74","\x65\x76\x74","\x65\x76\x65\x6E\x74","\x73\x65\x6E\x64","\x63\x72\x65\x61\x74\x65","\x6D\x69\x78\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x73\x74\x61\x74\x75\x73","\x56\x61\x72\x53\x65\x74\x20\x66\x61\x78\x65\x72\x72\x6F\x72","\x76\x61\x6C\x75\x65","\x75\x70\x64\x61\x74\x65\x45\x72\x72\x6F\x72","\x66\x61\x78\x65\x72\x72\x6F\x72","\x56\x61\x72\x53\x65\x74\x20\x66\x61\x78\x73\x74\x61\x74\x75\x73\x73\x74\x72\x69\x6E\x67","\x66\x61\x78\x73\x74\x61\x74\x75\x73\x73\x74\x72\x69\x6E\x67","\x56\x61\x72\x53\x65\x74\x20\x66\x61\x78\x70\x61\x67\x65\x73","\x66\x61\x78\x70\x61\x67\x65\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x62\x65\x66\x6F\x72\x65\x44\x69\x61\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x72\x6F\x75\x74\x65\x69\x64","\x72\x65\x67\x69\x73\x74\x72\x79","\x64\x65\x66\x61\x75\x6C\x74\x75\x73\x65\x72","\x73\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x66\x61\x78\x73\x74\x61\x74\x75\x73","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x46\x61\x78\x53\x74\x61\x74\x75\x73\x20\x45\x76\x65\x6E\x74","\x75\x70\x64\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x64\x69\x61\x6C\x62\x65\x67\x69\x6E","\x62\x65\x67\x69\x6E","\x64\x69\x61\x6C\x65\x6E\x64","\x65\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x54\x61\x6C\x6B\x69\x6E\x67","\x73\x65\x6E\x64\x66\x61\x78","\x53\x65\x6E\x64\x46\x41\x58\x20\x45\x76\x65\x6E\x74","\x75\x70\x64\x61\x74\x65\x53\x65\x6E\x64"];_0x6887[0];console[_0x6887[2]](_0x6887[1]);var Agent=require(_0x6887[3]);var Action=require(_0x6887[4]);var Call=require(_0x6887[5]);var Member=require(_0x6887[6]);var QueueCaller=require(_0x6887[7]);var QueueMember=require(_0x6887[8]);var Recording=require(_0x6887[9]);var Trunk=require(_0x6887[10]);var Context=require(_0x6887[11]);var ACW=require(_0x6887[12]);var User=require(_0x6887[13]);var Transfer=require(_0x6887[14]);var Network=require(_0x6887[15]);var Fax=require(_0x6887[16]);var Dial=require(_0x6887[17]);var Cleaner=require(_0x6887[18]);var _=require(_0x6887[19]);var config=require(_0x6887[20]);var trunkStates={};function getVariable(_0x2a19x15){var _0x2a19x16=_[_0x6887[21]](_0x2a19x15);var _0x2a19x17=_[_0x6887[23]](_0x2a19x16[_0x6887[22]]);_0x2a19x16[_0x6887[22]]= _0x2a19x17[0];return _0x2a19x16}var ami=require(_0x6887[29])(config[_0x6887[25]][_0x6887[24]],config[_0x6887[25]][_0x6887[26]],config[_0x6887[25]][_0x6887[27]],config[_0x6887[25]][_0x6887[28]],true);ami[_0x6887[30]]();var io=require(_0x6887[32])({host:config[_0x6887[31]],port:6379});var agent= new Agent();var call= new Call();var member= new Member();var queuemember= new QueueMember();var queuecaller= new QueueCaller();var recording= new Recording();var trunk= new Trunk(ami);var context= new Context(ami);var action= new Action(ami,io);var acw= new ACW(ami);var user= new User();var tranfer= new Transfer();var network= new Network(ami);var fax= new Fax(ami);var dial= new Dial();var cleaner= new Cleaner(ami);ami[_0x6887[38]](_0x6887[33],function(){console[_0x6887[36]](_0x6887[34],ami[_0x6887[35]][_0x6887[26]],ami[_0x6887[35]][_0x6887[24]]);ami[_0x6887[35]][_0x6887[37]]= new Date()});ami[_0x6887[38]](_0x6887[39],function(){console[_0x6887[36]](_0x6887[40],ami[_0x6887[35]][_0x6887[26]],ami[_0x6887[35]][_0x6887[24]])});ami[_0x6887[38]](_0x6887[41],function(_0x2a19x2a){console[_0x6887[2]](_0x6887[42],ami[_0x6887[35]][_0x6887[26]],ami[_0x6887[35]][_0x6887[24]],_0x2a19x2a)});ami[_0x6887[38]](_0x6887[43],function(_0x2a19x2b){console[_0x6887[2]](_0x6887[44],ami[_0x6887[35]][_0x6887[26]],ami[_0x6887[35]][_0x6887[24]],_0x2a19x2b)});ami[_0x6887[38]](_0x6887[45],function(_0x2a19x2c){if(_0x2a19x2c[_0x6887[46]]=== _0x6887[47]){console[_0x6887[2]](_0x6887[48],_0x2a19x2c[_0x6887[49]])};if(_0x2a19x2c[_0x6887[46]][_0x6887[51]](_0x6887[50])=== 0){user[_0x6887[52]](_0x2a19x2c)}});ami[_0x6887[38]](_0x6887[53],function(_0x2a19x2c){agent[_0x6887[54]](_0x2a19x2c);user[_0x6887[55]](_0x6887[54],_0x2a19x2c)});ami[_0x6887[38]](_0x6887[56],function(_0x2a19x2c){delete _0x2a19x2c[_0x6887[57]];recording[_0x6887[58]](_0x2a19x2c);agent[_0x6887[59]](_0x2a19x2c);member[_0x6887[60]](_0x2a19x2c);queuecaller[_0x6887[59]](_0x2a19x2c);user[_0x6887[55]](_0x6887[59],_0x2a19x2c)});ami[_0x6887[38]](_0x6887[61],function(_0x2a19x2c){queuecaller[_0x6887[62]](_0x2a19x2c);agent[_0x6887[33]](_0x2a19x2c);member[_0x6887[63]](_0x2a19x2c);user[_0x6887[55]](_0x6887[33],_0x2a19x2c)});ami[_0x6887[38]](_0x6887[64],function(_0x2a19x2c){agent[_0x6887[65]](_0x2a19x2c);user[_0x6887[55]](_0x6887[59],_0x2a19x2c)});ami[_0x6887[38]](_0x6887[66],function(_0x2a19x2c){agent[_0x6887[67]](_0x2a19x2c);user[_0x6887[55]](_0x6887[59],_0x2a19x2c)});ami[_0x6887[38]](_0x6887[68],function(_0x2a19x2c){queuemember[_0x6887[69]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[70],function(_0x2a19x2c){queuemember[_0x6887[71]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[72],function(_0x2a19x2c){queuemember[_0x6887[73]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[74],function(_0x2a19x2c){queuemember[_0x6887[75]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[76],function(_0x2a19x2c){queuemember[_0x6887[77]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[78],function(_0x2a19x2c){queuemember[_0x6887[79]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[80],function(_0x2a19x2c){queuecaller[_0x6887[81]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[82],function(_0x2a19x2c){queuecaller[_0x6887[83]](_0x2a19x2c);user[_0x6887[55]](_0x6887[59],_0x2a19x2c);agent[_0x6887[84]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[85],function(_0x2a19x2c){});ami[_0x6887[38]](_0x6887[86],function(_0x2a19x2c){call[_0x6887[87]](_0x2a19x2c);recording[_0x6887[88]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[89],function(_0x2a19x2c){dial[_0x6887[89]](_0x2a19x2c);member[_0x6887[90]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[91],function(_0x2a19x2c){_0x2a19x2c[_0x6887[92]]= _0x6887[93];tranfer[_0x6887[94]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[95],function(_0x2a19x2c){_0x2a19x2c[_0x6887[92]]= _0x6887[96];tranfer[_0x6887[97]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[98],function(_0x2a19x2c){_0x2a19x2c[_0x6887[99]]= _0x2a19x2c[_0x6887[100]];process[_0x6887[101]](_0x2a19x2c);var _0x2a19x15=getVariable(_0x2a19x2c);switch(_0x2a19x15[_0x6887[22]]){case _0x6887[103]:recording[_0x6887[102]](_0x2a19x15);break;case _0x6887[105]:queuecaller[_0x6887[104]](_0x2a19x15);break;case _0x6887[109]:console[_0x6887[2]](_0x6887[106],_0x2a19x2c);if(_0x2a19x2c[_0x6887[107]]){fax[_0x6887[108]](_0x2a19x2c)};break;case _0x6887[111]:console[_0x6887[2]](_0x6887[110],_0x2a19x2c);break;case _0x6887[113]:console[_0x6887[2]](_0x6887[112],_0x2a19x2c);break;case _0x6887[116]:if(_0x2a19x2c[_0x6887[107]]){dial[_0x6887[115]]({uniqueid:_0x2a19x2c[_0x6887[114]],routeId:_0x2a19x2c[_0x6887[107]]})};break;default:break}});ami[_0x6887[38]](_0x6887[117],function(_0x2a19x2c){if(trunkStates[_0x2a19x2c[_0x6887[118]]]){if(trunkStates[_0x2a19x2c[_0x6887[118]]]!== _0x2a19x2c[_0x6887[79]]){trunk[_0x6887[119]](_0x2a19x2c)}}else {trunkStates[_0x2a19x2c[_0x6887[118]]]= _0x2a19x2c[_0x6887[79]];trunk[_0x6887[119]](_0x2a19x2c)}});ami[_0x6887[38]](_0x6887[120],function(_0x2a19x2c){trunk[_0x6887[121]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[122],function(_0x2a19x2c){fax[_0x6887[122]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[123],function(_0x2a19x2c){if(_0x2a19x2c[_0x6887[124]]=== _0x6887[101]){console[_0x6887[2]](_0x6887[125],_0x2a19x2c);fax[_0x6887[126]](_0x2a19x2c)}});ami[_0x6887[38]](_0x6887[127],function(_0x2a19x2c){dial[_0x6887[128]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[129],function(_0x2a19x2c){dial[_0x6887[130]](_0x2a19x2c);member[_0x6887[131]](_0x2a19x2c)});ami[_0x6887[38]](_0x6887[132],function(_0x2a19x2c){console[_0x6887[2]](_0x6887[133],_0x2a19x2c);fax[_0x6887[134]](_0x2a19x2c)}) \ No newline at end of file diff --git a/server/config/ami/call.js b/server/config/ami/call.js index 81518e7..9409595 100644 --- a/server/config/ami/call.js +++ b/server/config/ami/call.js @@ -1,70 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); -const ReportCall = require('../../models').ReportCall; - -function Call() { - console.log('Call Initialization...'); -} - -Call.prototype.add = function(evt) { - if (evt.type) { - create(evt); - } -} - -function create(evt) { - return ReportCall - .findOrCreate({ - where: { - uniqueid: evt.uniqueid - }, - defaults: evt - }) - .spread(function(call, created) { - if (!created) { - - if (evt.answertime) { - console.log('[report] call uniqueid', evt.uniqueid, 'answertime', evt.answertime, 'updated'); - call.answertime = evt.answertime; - } - - if (evt.endtime && call.endtime) { - if (moment(evt.endtime).isAfter(call.endtime)) { - console.log('[report] call uniqueid', evt.uniqueid, 'endtime', evt.endtime, 'updated'); - - call.endtime = evt.endtime; - call.disposition = evt.disposition; - call.destinationchannel = evt.destinationchannel; - call.lastapplication = evt.lastapplication; - call.lastdata = evt.lastdata; - - call.duration = moment(call.endtime).diff(call.starttime, 'seconds'); - call.billableseconds = moment(call.endtime).diff(call.answertime, 'seconds'); - } - } - - return call - .save(); - } else { - console.log('[report] call', evt.uniqueid, 'created'); - } - }) - .catch(function(err) { - console.error('[report] call ' + err); - }); -} - -ReportCall.afterCreate(function(doc, options) { - doc.dataValues.evt = 'ReportCall.afterCreate'; - process.send(doc.dataValues); -}); - -ReportCall.afterUpdate(function(doc, options) { - doc.dataValues.evt = 'ReportCall.afterUpdate'; - doc.dataValues.changed = _.keyBy(doc.changed()); - process.send(doc.dataValues); -}); - -module.exports = Call; +var _0xf021=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x61\x6C\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x64\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x74\x79\x70\x65","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x63\x61\x6C\x6C\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x63\x61\x6C\x6C\x20\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65\x64","\x65\x6E\x64\x74\x69\x6D\x65","\x69\x73\x41\x66\x74\x65\x72","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x6C\x61\x73\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x6C\x61\x73\x74\x64\x61\x74\x61","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x73","\x64\x69\x66\x66","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x73\x61\x76\x65","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x63\x61\x6C\x6C","\x63\x72\x65\x61\x74\x65\x64","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf021[0];const _=require(_0xf021[1]);const moment=require(_0xf021[2]);const ReportCall=require(_0xf021[4])[_0xf021[3]];function Call(){console[_0xf021[6]](_0xf021[5])}Call[_0xf021[8]][_0xf021[7]]= function(_0x469ex5){if(_0x469ex5[_0xf021[9]]){create(_0x469ex5)}};function create(_0x469ex5){return ReportCall[_0xf021[32]]({where:{uniqueid:_0x469ex5[_0xf021[15]]},defaults:_0x469ex5})[_0xf021[31]](function(_0x469ex8,_0x469ex9){if(!_0x469ex9){if(_0x469ex5[_0xf021[13]]){console[_0xf021[6]](_0xf021[14],_0x469ex5[_0xf021[15]],_0xf021[13],_0x469ex5[_0xf021[13]],_0xf021[16]);_0x469ex8[_0xf021[13]]= _0x469ex5[_0xf021[13]]};if(_0x469ex5[_0xf021[17]]&& _0x469ex8[_0xf021[17]]){if(moment(_0x469ex5[_0xf021[17]])[_0xf021[18]](_0x469ex8[_0xf021[17]])){console[_0xf021[6]](_0xf021[14],_0x469ex5[_0xf021[15]],_0xf021[17],_0x469ex5[_0xf021[17]],_0xf021[16]);_0x469ex8[_0xf021[17]]= _0x469ex5[_0xf021[17]];_0x469ex8[_0xf021[19]]= _0x469ex5[_0xf021[19]];_0x469ex8[_0xf021[20]]= _0x469ex5[_0xf021[20]];_0x469ex8[_0xf021[21]]= _0x469ex5[_0xf021[21]];_0x469ex8[_0xf021[22]]= _0x469ex5[_0xf021[22]];_0x469ex8[_0xf021[23]]= moment(_0x469ex8[_0xf021[17]])[_0xf021[26]](_0x469ex8[_0xf021[24]],_0xf021[25]);_0x469ex8[_0xf021[27]]= moment(_0x469ex8[_0xf021[17]])[_0xf021[26]](_0x469ex8[_0xf021[13]],_0xf021[25])}};return _0x469ex8[_0xf021[28]]()}else {console[_0xf021[6]](_0xf021[29],_0x469ex5[_0xf021[15]],_0xf021[30])}})[_0xf021[12]](function(_0x469ex7){console[_0xf021[11]](_0xf021[10]+ _0x469ex7)})}ReportCall[_0xf021[37]](function(_0x469exa,_0x469exb){_0x469exa[_0xf021[34]][_0xf021[33]]= _0xf021[35];process[_0xf021[36]](_0x469exa[_0xf021[34]])});ReportCall[_0xf021[41]](function(_0x469exa,_0x469exb){_0x469exa[_0xf021[34]][_0xf021[33]]= _0xf021[38];_0x469exa[_0xf021[34]][_0xf021[39]]= _[_0xf021[40]](_0x469exa[_0xf021[39]]());process[_0xf021[36]](_0x469exa[_0xf021[34]])});module[_0xf021[42]]= Call \ No newline at end of file diff --git a/server/config/ami/cleaner.js b/server/config/ami/cleaner.js index 4470e4a..4c9c2f1 100644 --- a/server/config/ami/cleaner.js +++ b/server/config/ami/cleaner.js @@ -1,110 +1 @@ -'use strict'; - -var moment = require('moment'); -var _ = require('lodash'); -var Promise = require('bluebird'); - -var ReportQueue = require('../../models').ReportQueue; -var ReportSquare = require('../../models').ReportSquare; -var ReportDial = require('../../models').ReportDial; - -function Cleaner(ami) { - console.log('Cleaner Initialization...'); - removeInactiveCalls(ami); - setInterval(function() { - removeInactiveCalls(ami); - }, 10 * 60 * 1000); -} - -function removeInactiveCalls(ami) { - console.log('Removing inactive calls...'); - var _bulkClean = [], - _activeCalls = []; - return Promise - .promisify(ami.action)({ - action: 'Command', - command: 'core show channels concise', - }) - .then(function(result) { - var tmpArray; - if (result && result.content) { - var res = result.content.split('\n'); - _.forEach(res, function(elem) { - if (elem) { - tmpArray = elem.split('!'); - tmpArray.length === 14 && _activeCalls.push(tmpArray.pop()); - } - }); - } - return ReportQueue - .findAll({ - where: { - $or: [{ - queuecallerleaveAt: null - }, { - queuecallerexit: false, - queuecallerabandon: false, - queuecallercomplete: false, - queuecallerleaveAt: { - $ne: null - } - }] - } - }); - }) - .then(function(queueCalls) { - _.forEach(queueCalls, function(call) { - if (!_.includes(_activeCalls, call.uniqueid)) { - _bulkClean.push(call.updateAttributes({ - queuecallerleaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - queuecallerexitAt: moment().format("YYYY-MM-DD HH:mm:ss"), - queuecallerexit: true, - queuecallerexitreason: 'zombie' - })) - } - }); - return ReportSquare - .findAll({ - where: { - leaveAt: null - } - }); - }) - .then(function(squareCalls) { - _.forEach(squareCalls, function(call) { - if (!_.includes(_activeCalls, call.uniqueid)) { - _bulkClean.push(call.updateAttributes({ - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - network: 'no' - })) - } - }); - - return ReportDial - .findAll({ - where: { - endtime: null - } - }); - }) - .then(function(dialCalls) { - _.forEach(dialCalls, function(call) { - if (!_.includes(_activeCalls, call.uniqueid)) { - _bulkClean.push(call.updateAttributes({ - endtime: moment().format("YYYY-MM-DD HH:mm:ss"), - dialstatus: 'ZOMBIE' - })) - } - }); - return _bulkClean; - }) - .all() - .then(function() { - console.log('Inactive calls cleaning completed!'); - }) - .catch(function(err) { - console.log('Inactive calls remove error:', err); - }); -} - -module.exports = Cleaner; +var _0x6d72=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x43\x6C\x65\x61\x6E\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x52\x65\x6D\x6F\x76\x69\x6E\x67\x20\x69\x6E\x61\x63\x74\x69\x76\x65\x20\x63\x61\x6C\x6C\x73\x2E\x2E\x2E","\x49\x6E\x61\x63\x74\x69\x76\x65\x20\x63\x61\x6C\x6C\x73\x20\x72\x65\x6D\x6F\x76\x65\x20\x65\x72\x72\x6F\x72\x3A","\x63\x61\x74\x63\x68","\x49\x6E\x61\x63\x74\x69\x76\x65\x20\x63\x61\x6C\x6C\x73\x20\x63\x6C\x65\x61\x6E\x69\x6E\x67\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64\x21","\x74\x68\x65\x6E","\x61\x6C\x6C","\x75\x6E\x69\x71\x75\x65\x69\x64","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x5A\x4F\x4D\x42\x49\x45","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x6E\x6F","\x66\x69\x6E\x64\x41\x6C\x6C","\x7A\x6F\x6D\x62\x69\x65","\x63\x6F\x6E\x74\x65\x6E\x74","\x0A","\x73\x70\x6C\x69\x74","\x21","\x6C\x65\x6E\x67\x74\x68","\x70\x6F\x70","\x43\x6F\x6D\x6D\x61\x6E\x64","\x63\x6F\x72\x65\x20\x73\x68\x6F\x77\x20\x63\x68\x61\x6E\x6E\x65\x6C\x73\x20\x63\x6F\x6E\x63\x69\x73\x65","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x6d72[0];var moment=require(_0x6d72[1]);var _=require(_0x6d72[2]);var Promise=require(_0x6d72[3]);var ReportQueue=require(_0x6d72[5])[_0x6d72[4]];var ReportSquare=require(_0x6d72[5])[_0x6d72[6]];var ReportDial=require(_0x6d72[5])[_0x6d72[7]];function Cleaner(_0xc12ex8){console[_0x6d72[9]](_0x6d72[8]);removeInactiveCalls(_0xc12ex8);setInterval(function(){removeInactiveCalls(_0xc12ex8)},10* 60* 1000)}function removeInactiveCalls(_0xc12ex8){console[_0x6d72[9]](_0x6d72[10]);var _0xc12exa=[],_0xc12exb=[];return Promise[_0x6d72[36]](_0xc12ex8[_0x6d72[35]])({action:_0x6d72[33],command:_0x6d72[34]})[_0x6d72[14]](function(_0xc12ex11){var _0xc12ex12;if(_0xc12ex11&& _0xc12ex11[_0x6d72[27]]){var _0xc12ex13=_0xc12ex11[_0x6d72[27]][_0x6d72[29]](_0x6d72[28]);_[_0x6d72[23]](_0xc12ex13,function(_0xc12ex14){if(_0xc12ex14){_0xc12ex12= _0xc12ex14[_0x6d72[29]](_0x6d72[30]);_0xc12ex12[_0x6d72[31]]=== 14&& _0xc12exb[_0x6d72[22]](_0xc12ex12[_0x6d72[32]]())}})};return ReportQueue[_0x6d72[25]]({where:{$or:[{queuecallerleaveAt:null},{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null}}]}})})[_0x6d72[14]](function(_0xc12ex10){_[_0x6d72[23]](_0xc12ex10,function(_0xc12exe){if(!_[_0x6d72[17]](_0xc12exb,_0xc12exe[_0x6d72[16]])){_0xc12exa[_0x6d72[22]](_0xc12exe[_0x6d72[21]]({queuecallerleaveAt:moment()[_0x6d72[19]](_0x6d72[18]),queuecallerexitAt:moment()[_0x6d72[19]](_0x6d72[18]),queuecallerexit:true,queuecallerexitreason:_0x6d72[26]}))}});return ReportSquare[_0x6d72[25]]({where:{leaveAt:null}})})[_0x6d72[14]](function(_0xc12exf){_[_0x6d72[23]](_0xc12exf,function(_0xc12exe){if(!_[_0x6d72[17]](_0xc12exb,_0xc12exe[_0x6d72[16]])){_0xc12exa[_0x6d72[22]](_0xc12exe[_0x6d72[21]]({leaveAt:moment()[_0x6d72[19]](_0x6d72[18]),network:_0x6d72[24]}))}});return ReportDial[_0x6d72[25]]({where:{endtime:null}})})[_0x6d72[14]](function(_0xc12exd){_[_0x6d72[23]](_0xc12exd,function(_0xc12exe){if(!_[_0x6d72[17]](_0xc12exb,_0xc12exe[_0x6d72[16]])){_0xc12exa[_0x6d72[22]](_0xc12exe[_0x6d72[21]]({endtime:moment()[_0x6d72[19]](_0x6d72[18]),dialstatus:_0x6d72[20]}))}});return _0xc12exa})[_0x6d72[15]]()[_0x6d72[14]](function(){console[_0x6d72[9]](_0x6d72[13])})[_0x6d72[12]](function(_0xc12exc){console[_0x6d72[9]](_0x6d72[11],_0xc12exc)})}module[_0x6d72[37]]= Cleaner \ No newline at end of file diff --git a/server/config/ami/dial.js b/server/config/ami/dial.js index 654a7ba..f5a0736 100644 --- a/server/config/ami/dial.js +++ b/server/config/ami/dial.js @@ -1,98 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); -const ReportDial = require('../../models').ReportDial; - -function Dial() { - console.log('Agent Initialization...'); -} - -Dial.prototype.beforeDial = function(evt) { - return createDial(evt); -} - -Dial.prototype.begin = function(evt) { - if (evt.dialstring) { - var dialString = evt.dialstring.split('/'); - if (dialString.length > 1 && dialString[0] !== 'SIP') { - evt.starttime = moment().format("YYYY-MM-DD HH:mm:ss"); - evt.lastevent = 'called'; - return updateDial(evt); - } - } -} - -Dial.prototype.end = function(evt) { - evt.endtime = moment().format("YYYY-MM-DD HH:mm:ss"); - if (evt.dialstatus === 'ANSWER') { - evt.lastevent = 'connect'; - evt.answertime = moment().format("YYYY-MM-DD HH:mm:ss"); - } else { - evt.lastevent = 'rejected'; - } - return updateDial(evt); -} - -Dial.prototype.hangup = function(evt) { - return ReportDial - .findOne({ - where: { - uniqueid: evt.uniqueid - }, - order: 'createdAt DESC' - }) - .then(function(dial) { - if (dial) { - evt.endtime = moment().format("YYYY-MM-DD HH:mm:ss"); - evt.lastevent = dial.answertime ? 'complete' : 'rejected'; - return updateDial(evt); - } - }) -} - -function createDial(evt) { - return ReportDial - .create(evt) - .then(function(data) { - console.log('[dial] begin'); - }) - .catch(function(err) { - console.error('[dial] dial creation error: ' + err); - }); -} - -function updateDial(evt, where) { - return ReportDial - .findOne({ - where: where || { - uniqueid: evt.uniqueid - }, - order: 'createdAt DESC' - }) - .then(function(row) { - if (row) { - return row - .update(evt); - } - }) - .then(function(data) { - console.log('[dial] update'); - }) - .catch(function(err) { - console.error('[dial] update error: ' + err); - }); -} - -ReportDial.afterCreate(function(doc, options) { - doc.dataValues.evt = 'ReportDial.afterCreate'; - process.send(doc.dataValues); -}); - -ReportDial.afterUpdate(function(doc, options) { - doc.dataValues.evt = 'ReportDial.afterUpdate'; - doc.dataValues.changed = _.keyBy(doc.changed()); - process.send(doc.dataValues); -}); - -module.exports = Dial; +var _0x4cec=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x67\x65\x6E\x74\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x62\x65\x66\x6F\x72\x65\x44\x69\x61\x6C","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x62\x65\x67\x69\x6E","\x64\x69\x61\x6C\x73\x74\x72\x69\x6E\x67","\x2F","\x73\x70\x6C\x69\x74","\x6C\x65\x6E\x67\x74\x68","\x53\x49\x50","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x63\x61\x6C\x6C\x65\x64","\x65\x6E\x64","\x65\x6E\x64\x74\x69\x6D\x65","\x64\x69\x61\x6C\x73\x74\x61\x74\x75\x73","\x41\x4E\x53\x57\x45\x52","\x63\x6F\x6E\x6E\x65\x63\x74","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x72\x65\x6A\x65\x63\x74\x65\x64","\x68\x61\x6E\x67\x75\x70","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x74\x68\x65\x6E","\x75\x6E\x69\x71\x75\x65\x69\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74\x20\x44\x45\x53\x43","\x66\x69\x6E\x64\x4F\x6E\x65","\x5B\x64\x69\x61\x6C\x5D\x20\x64\x69\x61\x6C\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x64\x69\x61\x6C\x5D\x20\x62\x65\x67\x69\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x64\x69\x61\x6C\x5D\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x5B\x64\x69\x61\x6C\x5D\x20\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x4cec[0];const _=require(_0x4cec[1]);const moment=require(_0x4cec[2]);const ReportDial=require(_0x4cec[4])[_0x4cec[3]];function Dial(){console[_0x4cec[6]](_0x4cec[5])}Dial[_0x4cec[8]][_0x4cec[7]]= function(_0x6585x5){return createDial(_0x6585x5)};Dial[_0x4cec[8]][_0x4cec[9]]= function(_0x6585x5){if(_0x6585x5[_0x4cec[10]]){var _0x6585x6=_0x6585x5[_0x4cec[10]][_0x4cec[12]](_0x4cec[11]);if(_0x6585x6[_0x4cec[13]]> 1&& _0x6585x6[0]!== _0x4cec[14]){_0x6585x5[_0x4cec[15]]= moment()[_0x4cec[17]](_0x4cec[16]);_0x6585x5[_0x4cec[18]]= _0x4cec[19];return updateDial(_0x6585x5)}}};Dial[_0x4cec[8]][_0x4cec[20]]= function(_0x6585x5){_0x6585x5[_0x4cec[21]]= moment()[_0x4cec[17]](_0x4cec[16]);if(_0x6585x5[_0x4cec[22]]=== _0x4cec[23]){_0x6585x5[_0x4cec[18]]= _0x4cec[24];_0x6585x5[_0x4cec[25]]= moment()[_0x4cec[17]](_0x4cec[16])}else {_0x6585x5[_0x4cec[18]]= _0x4cec[26]};return updateDial(_0x6585x5)};Dial[_0x4cec[8]][_0x4cec[27]]= function(_0x6585x5){return ReportDial[_0x4cec[32]]({where:{uniqueid:_0x6585x5[_0x4cec[30]]},order:_0x4cec[31]})[_0x4cec[29]](function(_0x6585x7){if(_0x6585x7){_0x6585x5[_0x4cec[21]]= moment()[_0x4cec[17]](_0x4cec[16]);_0x6585x5[_0x4cec[18]]= _0x6585x7[_0x4cec[25]]?_0x4cec[28]:_0x4cec[26];return updateDial(_0x6585x5)}})};function createDial(_0x6585x5){return ReportDial[_0x4cec[37]](_0x6585x5)[_0x4cec[29]](function(_0x6585xa){console[_0x4cec[6]](_0x4cec[36])})[_0x4cec[35]](function(_0x6585x9){console[_0x4cec[34]](_0x4cec[33]+ _0x6585x9)})}function updateDial(_0x6585x5,_0x6585xc){return ReportDial[_0x4cec[32]]({where:_0x6585xc|| {uniqueid:_0x6585x5[_0x4cec[30]]},order:_0x4cec[31]})[_0x4cec[29]](function(_0x6585xd){if(_0x6585xd){return _0x6585xd[_0x4cec[40]](_0x6585x5)}})[_0x4cec[29]](function(_0x6585xa){console[_0x4cec[6]](_0x4cec[39])})[_0x4cec[35]](function(_0x6585x9){console[_0x4cec[34]](_0x4cec[38]+ _0x6585x9)})}ReportDial[_0x4cec[45]](function(_0x6585xe,_0x6585xf){_0x6585xe[_0x4cec[42]][_0x4cec[41]]= _0x4cec[43];process[_0x4cec[44]](_0x6585xe[_0x4cec[42]])});ReportDial[_0x4cec[49]](function(_0x6585xe,_0x6585xf){_0x6585xe[_0x4cec[42]][_0x4cec[41]]= _0x4cec[46];_0x6585xe[_0x4cec[42]][_0x4cec[47]]= _[_0x4cec[48]](_0x6585xe[_0x4cec[47]]());process[_0x4cec[44]](_0x6585xe[_0x4cec[42]])});module[_0x4cec[50]]= Dial \ No newline at end of file diff --git a/server/config/ami/fax.js b/server/config/ami/fax.js index bb7bf42..631c7a0 100644 --- a/server/config/ami/fax.js +++ b/server/config/ami/fax.js @@ -1,586 +1 @@ -'use stict'; - -var fs = require('fs'); -var util = require('util'); -var path = require('path'); -var config = require('../../config/environment'); -var _ = require('lodash'); -var Promise = require('bluebird'); - -// var tiff2pdf = Promise.promisify(require('tiff2pdf')); -var exec = require('child-process-promise').exec; -var fse = require('fs-extra'); -var moment = require('moment'); - -var FaxAccount = require('../../models').FaxAccount; -var FaxRoom = require('../../models').FaxRoom; -var FaxMessage = require('../../models').FaxMessage; -var FaxAttachment = require('../../models').FaxAttachment; -var Trunk = require('../../models').Trunk; -var User = require('../../models').User; -var Contact = require('../../models').Contact; -var ReportFax = require('../../models').ReportFax; -var Util = require('../util'); - -var Scheduler = require('../routing/scheduler'); -var faxaccounts; - -function Fax(ami) { - console.log('Fax Initialization...'); - - // emitter.on('FaxMessage.afterCreate', function(doc, options) { - // sendfax(doc, ami, 0, options); - // }); - // - // emitter.on('FaxMessage.afterUpdate', function(doc, options) { - // if (_.includes(options.changed, 'status') && doc.status === 'SENDING') { - // sendfax(doc, ami, doc.retry + 1, options); - // } - // }); - - FaxAccount - .findAll() - .then(function(accounts) { - faxaccounts = accounts; - synch(faxaccounts); - - // emitter.on('ReportFax.afterUpdate', function(doc, options) { - // var account = _.find(faxaccounts, { - // id: parseInt(doc.accountid) - // }); - // if (account && _.includes(options.changed, 'connectid')) { - // webhook(doc, account, 'accept'); - // } - // if (account && _.includes(options.changed, 'rejectedAt')) { - // webhook(doc, account, 'reject'); - // } - // }); - - // emitter.on('FaxRoom.afterUpdate', function(doc, options) { - // var account = _.find(faxaccounts, { - // id: doc.FaxAccountId - // }); - // if (account && _.includes(options.changed, 'status') && doc.status === 'CLOSED') { - // webhook(doc, account, 'close'); - // } - // }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function synch(faxaccounts) { - // emitter.on('FaxAccount.afterCreate', function(doc) { - // faxaccounts.push(doc); - // }); - - // emitter.on('FaxAccount.afterUpdate', function(doc, options) { - // var oldItem = _.find(faxaccounts, { - // id: doc.id - // }); - // if (oldItem) { - // console.log('Fax account: ' + oldItem.name + ' Update'); - // _.merge(oldItem, doc); - // } else { - // faxaccounts.unshift(doc); - // } - // }); - // - // emitter.on('FaxAccount.afterDestroy', function(doc) { - // _.remove(faxaccounts, { - // id: doc.id - // }); - // }); -} - -function webhook(doc, account, hook) { - var _Account = account; - switch (hook) { - case 'accept': - if (_Account.acceptMethod && _Account.acceptUrl) { - console.log('Fax account <' + _Account.name + '> executing accept webhook'); - execRequest(doc.dataValues || doc, _Account.acceptMethod, _Account.acceptUrl); - } - if (_Account.actions.length) { - _.forEach(_Account.actions, function(action) { - if (action.enabled) { - Util.execAction(action, doc); - } - }) - } - break; - case 'reject': - if (_Account.rejectMethod && _Account.rejectUrl) { - console.log('Fax account <' + _Account.name + '> executing reject webhook'); - execRequest(doc.dataValues || doc, _Account.rejectMethod, _Account.rejectUrl); - } - break; - case 'close': - if (_Account.closeMethod && _Account.closeUrl) { - console.log('Fax account <' + _Account.name + '> executing close webhook'); - execRequest(doc.dataValues || doc, _Account.closeMethod, _Account.closeUrl); - } - break; - default: - console.log('Webhook not recognized'); - } -} - -function execRequest(doc, method, url) { - return Util - .sendRequest(doc, method, url) - .then(function(values) { - console.log('request successeful!'); - }) - .catch(function(err) { - console.log('request failed!'); - }) -} - -Fax.prototype.updateError = function(evt) { - return FaxMessage - .findOne({ - where: { - channel: evt.channel - } - }) - .then(function(faxMessage) { - if (!faxMessage) { - throw new Error('Fax message not found'); - } - return faxMessage.updateAttributes({ - error: evt.value - }); - }) - .catch(function(err) { - console.log('Error', err); - }); -}; - -Fax.prototype.updateMessage = function(evt) { - return FaxMessage - .findOne({ - where: { - filename: evt.filename, - localstationid: evt.localstationid - } - }) - .then(function(faxMessage) { - if (!faxMessage) { - throw new Error('Fax message not found'); - } - - return faxMessage - .updateAttributes({ - channel: evt.channel, - channelstate: evt.channelstate, - channelstatedesc: evt.channelstatedesc, - calleridnum: evt.calleridnum, - calleridname: evt.calleridname, - connectedlinenum: evt.connectedlinenum, - connectedlinename: evt.connectedlinename, - accountcode: evt.accountcode, - context: evt.context, - exten: evt.exten, - priority: evt.priority, - uniqueid: evt.uniqueid, - linkedid: evt.linkedid, - lastStatus: evt.status - }); - - }) - .catch(function(err) { - console.log('Error', err); - }); -} - -Fax.prototype.updateSend = function(evt) { - var _fMessage; - - return FaxMessage - .findOne({ - where: { - filename: evt.filename, - localstationid: evt.localstationid - } - }) - .then(function(faxMessage) { - if (!faxMessage) { - throw new Error('Fax message not found'); - } - - _fMessage = faxMessage; - - var status = 'SENT'; - if (evt.pagestransferred == '0') { - status = 'FAILED'; - } - - return _fMessage - .updateAttributes({ - remotestationid: evt.remotestationid, - pagestransferred: evt.pagestransferred, - resolution: evt.resolution, - transferrate: evt.transferrate, - status: status - }); - - }) - .then(function() { - return _fMessage.getFaxRoom(); - }) - .then(function(faxRoom) { - if (!faxRoom) { - throw new Error('Fax room not found'); - } - return faxRoom - .updateAttributes({ - lastEvent: 'SENT' - }, { - individualHooks: true - }); - }) - .catch(function(err) { - console.log('Error', err); - }); -} - -Fax.prototype.receivefax = function(evt) { - - console.log(util.format('New Fax message from %s', evt.calleridnum)); - var _message = _.clone(evt); - var _account; - var _fMessage, _fRoom; - - //Get the FaxAccount based on localstationid - return FaxAccount - .findOne({ - where: { - localstationid: evt.localstationid - } - }) - .then(function(faxAccount) { - if (!faxAccount) { - throw new Error('Fax account not found'); - } - console.log('Fax account found:', evt.localstationid); - _account = faxAccount; - if (_account.ListId) { - return Contact - .findOrCreate({ - where: { - ListId: _account.ListId, - $or: [{ - phone: evt.calleridnum - }, { - fax: evt.calleridnum - }] - }, - defaults: { - phone: evt.calleridnum, - fax: evt.calleridnum, - firstName: evt.calleridnum, - ListId: _account.ListId - } - }); - } else { - return []; - } - }) - .spread(function(contact, created) { - if (created != undefined && !created) { - return contact.updateAttributes({ - fax: evt.calleridnum - }); - } - return; - }) - .then(function() { - return FaxRoom - .findAll({ - limit: 1, - where: { - contact: _message.calleridnum, - FaxAccountId: _account.id, - status: { - $ne: 'CLOSED' - } - }, - order: [ - ['createdAt', 'DESC'] - ] - }) - }) - .then(function(room) { - if (room.length) { - // console.log('Fax room to update'); - room = _.first(room); - return room - .updateAttributes({ - lastEvent: 'RECEIVED', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'), - status: 'OPEN', - openReason: 'system', - faxIn: ++room.faxIn - }); - } else { - // console.log('Fax room to create'); - return FaxRoom - .create({ - contact: _message.calleridnum, - account: _account.name, - status: 'NEW', - lastEvent: 'RECEIVED', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'), - FaxAccountId: _account.id, - faxIn: 1 - }); - } - }) - .then(function(room) { - if (!room) { - throw new Error('Fax room not found/created'); - } - // console.log('Fax room found/created:', room.id); - _fRoom = room; - _message.FaxRoomId = room.id; - _message.status = 'RECEIVED'; - _message.from = _message.calleridnum; - _message.to = _message.localstationid; - return FaxMessage.create(_message); - }) - .then(function(message) { - _fMessage = message; - var _files = []; - var name = path.parse(evt.filename).name; - var namePdf = name + '.pdf'; - return FaxAttachment - .create({ - path: path.join(config.root, 'server', 'files', 'fax', 'inbound', 'converted', namePdf), - basename: namePdf, - name: name, - FaxMessageId: message.id - }); - }) - .then(function(faxAttachment) { - return exec('tiff2pdf -o ' + faxAttachment.path + ' ' + evt.filename); - // return tiff2pdf(evt.filename, path.join(config.root, 'server', 'files', 'fax', 'inbound', 'converted', '/')); - }) - .then(function() { - var scheduler = new Scheduler({ - channel: 'fax', - uniqueid: util.format('%s.%s', moment().unix(), _fRoom.id), - messageid: _fMessage.id, - roomid: _fRoom.id, - accountid: _account.id, - accountname: _account.name, - accountphone: _account.localstationid, - from: _fMessage.from - }) - - scheduler.init(); - }) - .catch(function(err) { - console.log('Error receiving fax message', err); - }); - -}; - -function sendfax(message, ami, retry, opt) { - if (message.status === 'SENDING') { - var _fRoom; - var _fMessage = message; - var _fFrom = message.from; - var _fTo = message.to; - var _fAccount; - var _fTrunk; - var _originalFile, _convertedFile; - - return FaxAccount - .findOne({ - where: { - localstationid: _fMessage.from - } - }) - .then(function(faxAccount) { - if (!faxAccount) { - throw new Error('Fax account not found'); - } - _fAccount = _.clone(faxAccount.dataValues); - return Trunk.findOne({ - where: { - name: _fAccount.TrunkName - }, - attributes: ['name'] - }); - }) - .then(function(trunk) { - if (!trunk) { - throw new Error('Trunk not found'); - } - _fTrunk = _.clone(trunk.dataValues); - return; - }) - .then(function() { - return _fAccount; - }) - .then(getFaxRoom(_fMessage)) - .then(function(faxRoom) { - _fRoom = faxRoom; - return _fRoom.addFaxMessage(_fMessage.id); - }) - .then(function() { - return _fRoom - .updateAttributes({ - status: 'PENDING', - lastEvent: 'SENDING', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'), - faxOut: ++_fRoom.faxOut - }, { - individualHooks: true, - user: opt.user - }); - }) - .then(function() { - return _fRoom.addUser(_fMessage.UserId); - }) - .then(function() { - return User.findById(_fMessage.UserId); - }) - .then(function() { - if (_fAccount.ListId) { - return Contact - .findOrCreate({ - where: { - ListId: _fAccount.ListId, - $or: [{ - phone: _fTo - }, { - fax: _fTo - }] - }, - defaults: { - fax: _fTo, - phone: _fTo, - firstName: _fTo, - ListId: _fAccount.ListId - } - }); - } else { - return []; - } - }) - .spread(function(contact, created) { - if (created != undefined && !created) { - return contact.updateAttributes({ - fax: _fTo - }); - } - return; - }) - .then(function() { - _originalFile = _fMessage.FaxAttachments[0].path; - if (_fMessage.FaxAttachments[0].type === 'application/pdf') { - //File is PDF - _convertedFile = path.join(config.root, 'server', 'files', 'fax', 'outbound', 'converted', '/', path.parse(_originalFile).name + '.tif'); - return exec('gs -q -dNOPAUSE -dBATCH -sDEVICE=tiffg4 -sPAPERSIZE=letter -sOutputFile=' + _convertedFile + ' ' + _originalFile); - } else { - //File is TIFF: no conversation but I copy in the converted directory - _convertedFile = path.join(config.root, 'server', 'files', 'fax', 'outbound', 'converted', '/', path.parse(_originalFile).base); - fse.copySync(_originalFile, _convertedFile); - return; - } - }) - .then(function() { - fs.chmodSync(_convertedFile, 511); //511 is the decimal version of 777 - return _fMessage.updateAttributes({ - filename: _convertedFile, - localstationid: _fMessage.from, - retry: retry - }); - }) - .then(function() { - return Promise - .promisify(ami.action)({ - action: 'originate', - channel: util.format('%s/%s/%s', _fAccount.tech, _fTrunk.name, _fTo), - exten: _fTo, - context: 'outbound-fax', - priority: 1, - callerid: util.format("\"%s\" <%s>", _fAccount.localstationid, _fAccount.localstationid), - variable: { - FAXNAME: _fAccount.name, - FAXNUMBER: _fTo, - FAXECM: _fAccount.ecm, - FAXHEADERINFO: _fAccount.headerinfo, - FAXLOCALSTATIONID: _fAccount.localstationid, - FAXMINRATE: _fAccount.minrate, - FAXMAXRATE: _fAccount.maxrate, - FAXMODEM: util.format('\"%s\"', _fAccount.modem), - FAXGATEWAY: _fAccount.gateway, - FAXT38TIMEOUT: _fAccount.t38timeout, - FAXOUTFILE: _convertedFile - }, - account: _fAccount.localstationid - }); - }) - .then(function(res) { - console.log('res', res); - }) - .catch(function(err) { - console.log('Error sending fax', err); - return _fMessage.update({ - status: 'FAILED' - }) - .then(function() { - if (_fRoom) { - return _fRoom.updateAttributes({ - lastEvent: 'FAILED' - }); - } - return; - }) - .catch(function(err) { - console.log('Error updating error status'); - }); - }); - } -} - -function getFaxRoom(_fMessage) { - return function(account) { - if (_fMessage.FaxRoomId) { - return FaxRoom.findById(_fMessage.FaxRoomId) - } else { - return FaxRoom - .findAll({ - limit: 1, - where: { - contact: _fMessage.to, - FaxAccountId: account.id - }, - order: [ - ['createdAt', 'DESC'] - ] - }) - .then(function(faxrooms) { - var room = _.first(faxrooms); - if (!room || room.status === 'CLOSED') { - return FaxRoom - .create({ - contact: _fMessage.to, - account: account.name, - status: 'PENDING', - FaxAccountId: account.id, - }) - } else { - return room; - } - }) - } - - } -} - -module.exports = Fax; +var _0x5bae=["\x75\x73\x65\x20\x73\x74\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x2D\x70\x72\x6F\x63\x65\x73\x73\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x66\x73\x2D\x65\x78\x74\x72\x61","\x6D\x6F\x6D\x65\x6E\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x54\x72\x75\x6E\x6B","\x55\x73\x65\x72","\x43\x6F\x6E\x74\x61\x63\x74","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x2E\x2E\x2F\x75\x74\x69\x6C","\x2E\x2E\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x46\x61\x78\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x64\x6F\x63","\x6F\x70\x74\x69\x6F\x6E\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x73\x74\x61\x74\x75\x73","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x53\x45\x4E\x44\x49\x4E\x47","\x72\x65\x74\x72\x79","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x66\x69\x6E\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x61\x63\x63\x65\x70\x74","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x72\x65\x6A\x65\x63\x74","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x43\x4C\x4F\x53\x45\x44","\x63\x6C\x6F\x73\x65","\x46\x61\x78\x52\x6F\x6F\x6D\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x70\x75\x73\x68","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x64","\x46\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74\x3A\x20","\x6E\x61\x6D\x65","\x20\x55\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x65\x6D\x6F\x76\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x6F\x6E","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x46\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x3C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x75\x70\x64\x61\x74\x65\x45\x72\x72\x6F\x72","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x45\x72\x72\x6F\x72","\x46\x61\x78\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x76\x61\x6C\x75\x65","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x63\x68\x61\x6E\x6E\x65\x6C","\x66\x69\x6E\x64\x4F\x6E\x65","\x75\x70\x64\x61\x74\x65\x4D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C\x73\x74\x61\x74\x65\x64\x65\x73\x63","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E","\x70\x72\x69\x6F\x72\x69\x74\x79","\x75\x6E\x69\x71\x75\x65\x69\x64","\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x75\x70\x64\x61\x74\x65\x53\x65\x6E\x64","\x46\x61\x78\x20\x72\x6F\x6F\x6D\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x53\x45\x4E\x54","\x67\x65\x74\x46\x61\x78\x52\x6F\x6F\x6D","\x70\x61\x67\x65\x73\x74\x72\x61\x6E\x73\x66\x65\x72\x72\x65\x64","\x30","\x46\x41\x49\x4C\x45\x44","\x72\x65\x6D\x6F\x74\x65\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x72\x65\x73\x6F\x6C\x75\x74\x69\x6F\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x72\x61\x74\x65","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x4E\x65\x77\x20\x46\x61\x78\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x66\x72\x6F\x6D\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x6C\x6F\x6E\x65","\x45\x72\x72\x6F\x72\x20\x72\x65\x63\x65\x69\x76\x69\x6E\x67\x20\x66\x61\x78\x20\x6D\x65\x73\x73\x61\x67\x65","\x66\x61\x78","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x72\x6F\x6D","\x69\x6E\x69\x74","\x74\x69\x66\x66\x32\x70\x64\x66\x20\x2D\x6F\x20","\x20","\x70\x61\x72\x73\x65","\x2E\x70\x64\x66","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6E\x62\x6F\x75\x6E\x64","\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x6A\x6F\x69\x6E","\x63\x72\x65\x61\x74\x65","\x46\x61\x78\x20\x72\x6F\x6F\x6D\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2F\x63\x72\x65\x61\x74\x65\x64","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x52\x45\x43\x45\x49\x56\x45\x44","\x74\x6F","\x66\x69\x72\x73\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x4F\x50\x45\x4E","\x73\x79\x73\x74\x65\x6D","\x66\x61\x78\x49\x6E","\x4E\x45\x57","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x73\x70\x72\x65\x61\x64","\x46\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x46\x61\x78\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x4C\x69\x73\x74\x49\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x45\x72\x72\x6F\x72\x20\x73\x65\x6E\x64\x69\x6E\x67\x20\x66\x61\x78","\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x65\x72\x72\x6F\x72\x20\x73\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x72\x65\x73","\x6F\x72\x69\x67\x69\x6E\x61\x74\x65","\x25\x73\x2F\x25\x73\x2F\x25\x73","\x74\x65\x63\x68","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x65\x63\x6D","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x6D\x69\x6E\x72\x61\x74\x65","\x6D\x61\x78\x72\x61\x74\x65","\x22\x25\x73\x22","\x6D\x6F\x64\x65\x6D","\x67\x61\x74\x65\x77\x61\x79","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x61\x63\x74\x69\x6F\x6E","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x63\x68\x6D\x6F\x64\x53\x79\x6E\x63","\x46\x61\x78\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x74\x79\x70\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x70\x64\x66","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x2F","\x2E\x74\x69\x66","\x67\x73\x20\x2D\x71\x20\x2D\x64\x4E\x4F\x50\x41\x55\x53\x45\x20\x2D\x64\x42\x41\x54\x43\x48\x20\x2D\x73\x44\x45\x56\x49\x43\x45\x3D\x74\x69\x66\x66\x67\x34\x20\x2D\x73\x50\x41\x50\x45\x52\x53\x49\x5A\x45\x3D\x6C\x65\x74\x74\x65\x72\x20\x2D\x73\x4F\x75\x74\x70\x75\x74\x46\x69\x6C\x65\x3D","\x62\x61\x73\x65","\x63\x6F\x70\x79\x53\x79\x6E\x63","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x64\x64\x55\x73\x65\x72","\x50\x45\x4E\x44\x49\x4E\x47","\x66\x61\x78\x4F\x75\x74","\x75\x73\x65\x72","\x61\x64\x64\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x54\x72\x75\x6E\x6B\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64","\x54\x72\x75\x6E\x6B\x4E\x61\x6D\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x5bae[0];var fs=require(_0x5bae[1]);var util=require(_0x5bae[2]);var path=require(_0x5bae[3]);var config=require(_0x5bae[4]);var _=require(_0x5bae[5]);var Promise=require(_0x5bae[6]);var exec=require(_0x5bae[8])[_0x5bae[7]];var fse=require(_0x5bae[9]);var moment=require(_0x5bae[10]);var FaxAccount=require(_0x5bae[12])[_0x5bae[11]];var FaxRoom=require(_0x5bae[12])[_0x5bae[13]];var FaxMessage=require(_0x5bae[12])[_0x5bae[14]];var FaxAttachment=require(_0x5bae[12])[_0x5bae[15]];var Trunk=require(_0x5bae[12])[_0x5bae[16]];var User=require(_0x5bae[12])[_0x5bae[17]];var Contact=require(_0x5bae[12])[_0x5bae[18]];var ReportFax=require(_0x5bae[12])[_0x5bae[19]];var Util=require(_0x5bae[20]);var Scheduler=require(_0x5bae[21]);var faxaccounts;function Fax(_0x6b1ex16){console[_0x5bae[23]](_0x5bae[22]);process[_0x5bae[56]](_0x5bae[24],function(_0x6b1ex17){switch(_0x6b1ex17[_0x5bae[24]]){case _0x5bae[27]:sendfax(_0x6b1ex17[_0x5bae[25]],_0x6b1ex16,0,_0x6b1ex17[_0x5bae[26]]);break;case _0x5bae[33]:if(_[_0x5bae[30]](_0x6b1ex17[_0x5bae[26]][_0x5bae[28]],_0x5bae[29])&& _0x6b1ex17[_0x5bae[25]][_0x5bae[29]]=== _0x5bae[31]){sendfax(_0x6b1ex17[_0x5bae[25]],_0x6b1ex16,_0x6b1ex17[_0x5bae[25]][_0x5bae[32]]+ 1,_0x6b1ex17[_0x5bae[26]])};break;case _0x5bae[40]:var _0x6b1ex18=_[_0x5bae[35]](faxaccounts,{id:parseInt(_0x6b1ex17[_0x5bae[25]][_0x5bae[34]])});if(_0x6b1ex18&& _[_0x5bae[30]](_0x6b1ex17[_0x5bae[26]][_0x5bae[28]],_0x5bae[36])){webhook(_0x6b1ex17[_0x5bae[25]],_0x6b1ex18,_0x5bae[37])};if(_0x6b1ex18&& _[_0x5bae[30]](_0x6b1ex17[_0x5bae[26]][_0x5bae[28]],_0x5bae[38])){webhook(_0x6b1ex17[_0x5bae[25]],_0x6b1ex18,_0x5bae[39])};break;case _0x5bae[44]:var _0x6b1ex19=_[_0x5bae[35]](faxaccounts,{id:_0x6b1ex17[_0x5bae[25]][_0x5bae[41]]});if(_0x6b1ex19&& _[_0x5bae[30]](_0x6b1ex17[_0x5bae[26]][_0x5bae[28]],_0x5bae[29])&& _0x6b1ex17[_0x5bae[25]][_0x5bae[29]]=== _0x5bae[42]){webhook(_0x6b1ex17[_0x5bae[25]],_0x6b1ex19,_0x5bae[43])};break;case _0x5bae[46]:faxaccounts[_0x5bae[45]](_0x6b1ex17[_0x5bae[25]]);break;case _0x5bae[53]:var _0x6b1ex1a=_[_0x5bae[35]](faxaccounts,{id:_0x6b1ex17[_0x5bae[25]][_0x5bae[47]]});if(_0x6b1ex1a){console[_0x5bae[23]](_0x5bae[48]+ _0x6b1ex1a[_0x5bae[49]]+ _0x5bae[50]);_[_0x5bae[51]](_0x6b1ex1a,_0x6b1ex17[_0x5bae[25]])}else {faxaccounts[_0x5bae[52]](_0x6b1ex17[_0x5bae[25]])};break;case _0x5bae[55]:_[_0x5bae[54]](faxaccounts,{id:_0x6b1ex17[_0x5bae[25]][_0x5bae[47]]});break;default:}});FaxAccount[_0x5bae[60]]()[_0x5bae[59]](function(_0x6b1ex1c){faxaccounts= _0x6b1ex1c})[_0x5bae[58]](function(_0x6b1ex1b){console[_0x5bae[57]](_0x6b1ex1b)})}function webhook(_0x6b1ex1e,_0x6b1ex18,_0x6b1ex1f){var _0x6b1ex20=_0x6b1ex18;switch(_0x6b1ex1f){case _0x5bae[37]:if(_0x6b1ex20[_0x5bae[61]]&& _0x6b1ex20[_0x5bae[62]]){console[_0x5bae[23]](_0x5bae[63]+ _0x6b1ex20[_0x5bae[49]]+ _0x5bae[64]);execRequest(_0x6b1ex1e[_0x5bae[65]]|| _0x6b1ex1e,_0x6b1ex20[_0x5bae[61]],_0x6b1ex20[_0x5bae[62]])};if(_0x6b1ex20[_0x5bae[67]][_0x5bae[66]]){_[_0x5bae[70]](_0x6b1ex20[_0x5bae[67]],function(_0x6b1ex21){if(_0x6b1ex21[_0x5bae[68]]){Util[_0x5bae[69]](_0x6b1ex21,_0x6b1ex1e)}})};break;case _0x5bae[39]:if(_0x6b1ex20[_0x5bae[71]]&& _0x6b1ex20[_0x5bae[72]]){console[_0x5bae[23]](_0x5bae[63]+ _0x6b1ex20[_0x5bae[49]]+ _0x5bae[73]);execRequest(_0x6b1ex1e[_0x5bae[65]]|| _0x6b1ex1e,_0x6b1ex20[_0x5bae[71]],_0x6b1ex20[_0x5bae[72]])};break;case _0x5bae[43]:if(_0x6b1ex20[_0x5bae[74]]&& _0x6b1ex20[_0x5bae[75]]){console[_0x5bae[23]](_0x5bae[63]+ _0x6b1ex20[_0x5bae[49]]+ _0x5bae[76]);execRequest(_0x6b1ex1e[_0x5bae[65]]|| _0x6b1ex1e,_0x6b1ex20[_0x5bae[74]],_0x6b1ex20[_0x5bae[75]])};break;default:console[_0x5bae[23]](_0x5bae[77])}}function execRequest(_0x6b1ex1e,_0x6b1ex23,_0x6b1ex24){return Util[_0x5bae[80]](_0x6b1ex1e,_0x6b1ex23,_0x6b1ex24)[_0x5bae[59]](function(_0x6b1ex25){console[_0x5bae[23]](_0x5bae[79])})[_0x5bae[58]](function(_0x6b1ex1b){console[_0x5bae[23]](_0x5bae[78])})}Fax[_0x5bae[82]][_0x5bae[81]]= function(_0x6b1ex26){return FaxMessage[_0x5bae[88]]({where:{channel:_0x6b1ex26[_0x5bae[87]]}})[_0x5bae[59]](function(_0x6b1ex27){if(!_0x6b1ex27){throw new Error(_0x5bae[84])};return _0x6b1ex27[_0x5bae[86]]({error:_0x6b1ex26[_0x5bae[85]]})})[_0x5bae[58]](function(_0x6b1ex1b){console[_0x5bae[23]](_0x5bae[83],_0x6b1ex1b)})};Fax[_0x5bae[82]][_0x5bae[89]]= function(_0x6b1ex26){return FaxMessage[_0x5bae[88]]({where:{filename:_0x6b1ex26[_0x5bae[102]],localstationid:_0x6b1ex26[_0x5bae[103]]}})[_0x5bae[59]](function(_0x6b1ex27){if(!_0x6b1ex27){throw new Error(_0x5bae[84])};return _0x6b1ex27[_0x5bae[86]]({channel:_0x6b1ex26[_0x5bae[87]],channelstate:_0x6b1ex26[_0x5bae[90]],channelstatedesc:_0x6b1ex26[_0x5bae[91]],calleridnum:_0x6b1ex26[_0x5bae[92]],calleridname:_0x6b1ex26[_0x5bae[93]],connectedlinenum:_0x6b1ex26[_0x5bae[94]],connectedlinename:_0x6b1ex26[_0x5bae[95]],accountcode:_0x6b1ex26[_0x5bae[96]],context:_0x6b1ex26[_0x5bae[97]],exten:_0x6b1ex26[_0x5bae[98]],priority:_0x6b1ex26[_0x5bae[99]],uniqueid:_0x6b1ex26[_0x5bae[100]],linkedid:_0x6b1ex26[_0x5bae[101]],lastStatus:_0x6b1ex26[_0x5bae[29]]})})[_0x5bae[58]](function(_0x6b1ex1b){console[_0x5bae[23]](_0x5bae[83],_0x6b1ex1b)})};Fax[_0x5bae[82]][_0x5bae[104]]= function(_0x6b1ex26){var _0x6b1ex28;return FaxMessage[_0x5bae[88]]({where:{filename:_0x6b1ex26[_0x5bae[102]],localstationid:_0x6b1ex26[_0x5bae[103]]}})[_0x5bae[59]](function(_0x6b1ex27){if(!_0x6b1ex27){throw new Error(_0x5bae[84])};_0x6b1ex28= _0x6b1ex27;var _0x6b1ex2a=_0x5bae[106];if(_0x6b1ex26[_0x5bae[108]]== _0x5bae[109]){_0x6b1ex2a= _0x5bae[110]};return _0x6b1ex28[_0x5bae[86]]({remotestationid:_0x6b1ex26[_0x5bae[111]],pagestransferred:_0x6b1ex26[_0x5bae[108]],resolution:_0x6b1ex26[_0x5bae[112]],transferrate:_0x6b1ex26[_0x5bae[113]],status:_0x6b1ex2a})})[_0x5bae[59]](function(){return _0x6b1ex28[_0x5bae[107]]()})[_0x5bae[59]](function(_0x6b1ex29){if(!_0x6b1ex29){throw new Error(_0x5bae[105])};return _0x6b1ex29[_0x5bae[86]]({lastEvent:_0x5bae[106]},{individualHooks:true})})[_0x5bae[58]](function(_0x6b1ex1b){console[_0x5bae[23]](_0x5bae[83],_0x6b1ex1b)})};Fax[_0x5bae[82]][_0x5bae[114]]= function(_0x6b1ex26){console[_0x5bae[23]](util[_0x5bae[116]](_0x5bae[115],_0x6b1ex26[_0x5bae[92]]));var _0x6b1ex2b=_[_0x5bae[117]](_0x6b1ex26);var _0x6b1ex2c;var _0x6b1ex28,_0x6b1ex2d;return FaxAccount[_0x5bae[88]]({where:{localstationid:_0x6b1ex26[_0x5bae[103]]}})[_0x5bae[59]](function(_0x6b1ex37){if(!_0x6b1ex37){throw new Error(_0x5bae[148])};console[_0x5bae[23]](_0x5bae[149],_0x6b1ex26[_0x5bae[103]]);_0x6b1ex2c= _0x6b1ex37;if(_0x6b1ex2c[_0x5bae[150]]){return Contact[_0x5bae[151]]({where:{ListId:_0x6b1ex2c[_0x5bae[150]],$or:[{phone:_0x6b1ex26[_0x5bae[92]]},{fax:_0x6b1ex26[_0x5bae[92]]}]},defaults:{phone:_0x6b1ex26[_0x5bae[92]],fax:_0x6b1ex26[_0x5bae[92]],firstName:_0x6b1ex26[_0x5bae[92]],ListId:_0x6b1ex2c[_0x5bae[150]]}})}else {return []}})[_0x5bae[147]](function(_0x6b1ex35,_0x6b1ex36){if(_0x6b1ex36!= undefined&& !_0x6b1ex36){return _0x6b1ex35[_0x5bae[86]]({fax:_0x6b1ex26[_0x5bae[92]]})};return})[_0x5bae[59]](function(){return FaxRoom[_0x5bae[60]]({limit:1,where:{contact:_0x6b1ex2b[_0x5bae[92]],FaxAccountId:_0x6b1ex2c[_0x5bae[47]],status:{$ne:_0x5bae[42]}},order:[[_0x5bae[145],_0x5bae[146]]]})})[_0x5bae[59]](function(_0x6b1ex34){if(_0x6b1ex34[_0x5bae[66]]){_0x6b1ex34= _[_0x5bae[139]](_0x6b1ex34);return _0x6b1ex34[_0x5bae[86]]({lastEvent:_0x5bae[137],lastEventAt:moment()[_0x5bae[116]](_0x5bae[140]),status:_0x5bae[141],openReason:_0x5bae[142],faxIn:++_0x6b1ex34[_0x5bae[143]]})}else {return FaxRoom[_0x5bae[134]]({contact:_0x6b1ex2b[_0x5bae[92]],account:_0x6b1ex2c[_0x5bae[49]],status:_0x5bae[144],lastEvent:_0x5bae[137],lastEventAt:moment()[_0x5bae[116]](_0x5bae[140]),FaxAccountId:_0x6b1ex2c[_0x5bae[47]],faxIn:1})}})[_0x5bae[59]](function(_0x6b1ex34){if(!_0x6b1ex34){throw new Error(_0x5bae[135])};_0x6b1ex2d= _0x6b1ex34;_0x6b1ex2b[_0x5bae[136]]= _0x6b1ex34[_0x5bae[47]];_0x6b1ex2b[_0x5bae[29]]= _0x5bae[137];_0x6b1ex2b[_0x5bae[122]]= _0x6b1ex2b[_0x5bae[92]];_0x6b1ex2b[_0x5bae[138]]= _0x6b1ex2b[_0x5bae[103]];return FaxMessage[_0x5bae[134]](_0x6b1ex2b)})[_0x5bae[59]](function(_0x6b1ex30){_0x6b1ex28= _0x6b1ex30;var _0x6b1ex31=[];var _0x6b1ex32=path[_0x5bae[126]](_0x6b1ex26[_0x5bae[102]])[_0x5bae[49]];var _0x6b1ex33=_0x6b1ex32+ _0x5bae[127];return FaxAttachment[_0x5bae[134]]({path:path[_0x5bae[133]](config[_0x5bae[128]],_0x5bae[129],_0x5bae[130],_0x5bae[119],_0x5bae[131],_0x5bae[132],_0x6b1ex33),basename:_0x6b1ex33,name:_0x6b1ex32,FaxMessageId:_0x6b1ex30[_0x5bae[47]]})})[_0x5bae[59]](function(_0x6b1ex2f){return exec(_0x5bae[124]+ _0x6b1ex2f[_0x5bae[3]]+ _0x5bae[125]+ _0x6b1ex26[_0x5bae[102]])})[_0x5bae[59]](function(){var _0x6b1ex2e= new Scheduler({channel:_0x5bae[119],uniqueid:util[_0x5bae[116]](_0x5bae[120],moment()[_0x5bae[121]](),_0x6b1ex2d[_0x5bae[47]]),messageid:_0x6b1ex28[_0x5bae[47]],roomid:_0x6b1ex2d[_0x5bae[47]],accountid:_0x6b1ex2c[_0x5bae[47]],accountname:_0x6b1ex2c[_0x5bae[49]],accountphone:_0x6b1ex2c[_0x5bae[103]],from:_0x6b1ex28[_0x5bae[122]]});_0x6b1ex2e[_0x5bae[123]]()})[_0x5bae[58]](function(_0x6b1ex1b){console[_0x5bae[23]](_0x5bae[118],_0x6b1ex1b)})};function sendfax(_0x6b1ex30,_0x6b1ex16,_0x6b1ex39,_0x6b1ex3a){if(_0x6b1ex30[_0x5bae[29]]=== _0x5bae[31]){var _0x6b1ex2d;var _0x6b1ex28=_0x6b1ex30;var _0x6b1ex3b=_0x6b1ex30[_0x5bae[122]];var _0x6b1ex3c=_0x6b1ex30[_0x5bae[138]];var _0x6b1ex3d;var _0x6b1ex3e;var _0x6b1ex3f,_0x6b1ex40;return FaxAccount[_0x5bae[88]]({where:{localstationid:_0x6b1ex28[_0x5bae[122]]}})[_0x5bae[59]](function(_0x6b1ex37){if(!_0x6b1ex37){throw new Error(_0x5bae[148])};_0x6b1ex3d= _[_0x5bae[117]](_0x6b1ex37[_0x5bae[65]]);return Trunk[_0x5bae[88]]({where:{name:_0x6b1ex3d[_0x5bae[188]]},attributes:[_0x5bae[49]]})})[_0x5bae[59]](function(_0x6b1ex42){if(!_0x6b1ex42){throw new Error(_0x5bae[187])};_0x6b1ex3e= _[_0x5bae[117]](_0x6b1ex42[_0x5bae[65]]);return})[_0x5bae[59]](function(){return _0x6b1ex3d})[_0x5bae[59]](getFaxRoom(_0x6b1ex28))[_0x5bae[59]](function(_0x6b1ex29){_0x6b1ex2d= _0x6b1ex29;return _0x6b1ex2d[_0x5bae[186]](_0x6b1ex28[_0x5bae[47]])})[_0x5bae[59]](function(){return _0x6b1ex2d[_0x5bae[86]]({status:_0x5bae[183],lastEvent:_0x5bae[31],lastEventAt:moment()[_0x5bae[116]](_0x5bae[140]),faxOut:++_0x6b1ex2d[_0x5bae[184]]},{individualHooks:true,user:_0x6b1ex3a[_0x5bae[185]]})})[_0x5bae[59]](function(){return _0x6b1ex2d[_0x5bae[182]](_0x6b1ex28.UserId)})[_0x5bae[59]](function(){return User[_0x5bae[181]](_0x6b1ex28.UserId)})[_0x5bae[59]](function(){if(_0x6b1ex3d[_0x5bae[150]]){return Contact[_0x5bae[151]]({where:{ListId:_0x6b1ex3d[_0x5bae[150]],$or:[{phone:_0x6b1ex3c},{fax:_0x6b1ex3c}]},defaults:{fax:_0x6b1ex3c,phone:_0x6b1ex3c,firstName:_0x6b1ex3c,ListId:_0x6b1ex3d[_0x5bae[150]]}})}else {return []}})[_0x5bae[147]](function(_0x6b1ex35,_0x6b1ex36){if(_0x6b1ex36!= undefined&& !_0x6b1ex36){return _0x6b1ex35[_0x5bae[86]]({fax:_0x6b1ex3c})};return})[_0x5bae[59]](function(){_0x6b1ex3f= _0x6b1ex28[_0x5bae[172]][0][_0x5bae[3]];if(_0x6b1ex28[_0x5bae[172]][0][_0x5bae[173]]=== _0x5bae[174]){_0x6b1ex40= path[_0x5bae[133]](config[_0x5bae[128]],_0x5bae[129],_0x5bae[130],_0x5bae[119],_0x5bae[175],_0x5bae[132],_0x5bae[176],path[_0x5bae[126]](_0x6b1ex3f)[_0x5bae[49]]+ _0x5bae[177]);return exec(_0x5bae[178]+ _0x6b1ex40+ _0x5bae[125]+ _0x6b1ex3f)}else {_0x6b1ex40= path[_0x5bae[133]](config[_0x5bae[128]],_0x5bae[129],_0x5bae[130],_0x5bae[119],_0x5bae[175],_0x5bae[132],_0x5bae[176],path[_0x5bae[126]](_0x6b1ex3f)[_0x5bae[179]]);fse[_0x5bae[180]](_0x6b1ex3f,_0x6b1ex40);return}})[_0x5bae[59]](function(){fs[_0x5bae[171]](_0x6b1ex40,511);return _0x6b1ex28[_0x5bae[86]]({filename:_0x6b1ex40,localstationid:_0x6b1ex28[_0x5bae[122]],retry:_0x6b1ex39})})[_0x5bae[59]](function(){return Promise[_0x5bae[170]](_0x6b1ex16[_0x5bae[169]])({action:_0x5bae[156],channel:util[_0x5bae[116]](_0x5bae[157],_0x6b1ex3d[_0x5bae[158]],_0x6b1ex3e[_0x5bae[49]],_0x6b1ex3c),exten:_0x6b1ex3c,context:_0x5bae[159],priority:1,callerid:util[_0x5bae[116]](_0x5bae[160],_0x6b1ex3d[_0x5bae[103]],_0x6b1ex3d[_0x5bae[103]]),variable:{FAXNAME:_0x6b1ex3d[_0x5bae[49]],FAXNUMBER:_0x6b1ex3c,FAXECM:_0x6b1ex3d[_0x5bae[161]],FAXHEADERINFO:_0x6b1ex3d[_0x5bae[162]],FAXLOCALSTATIONID:_0x6b1ex3d[_0x5bae[103]],FAXMINRATE:_0x6b1ex3d[_0x5bae[163]],FAXMAXRATE:_0x6b1ex3d[_0x5bae[164]],FAXMODEM:util[_0x5bae[116]](_0x5bae[165],_0x6b1ex3d[_0x5bae[166]]),FAXGATEWAY:_0x6b1ex3d[_0x5bae[167]],FAXT38TIMEOUT:_0x6b1ex3d[_0x5bae[168]],FAXOUTFILE:_0x6b1ex40},account:_0x6b1ex3d[_0x5bae[103]]})})[_0x5bae[59]](function(_0x6b1ex41){console[_0x5bae[23]](_0x5bae[155],_0x6b1ex41)})[_0x5bae[58]](function(_0x6b1ex1b){console[_0x5bae[23]](_0x5bae[152],_0x6b1ex1b);return _0x6b1ex28[_0x5bae[154]]({status:_0x5bae[110]})[_0x5bae[59]](function(){if(_0x6b1ex2d){return _0x6b1ex2d[_0x5bae[86]]({lastEvent:_0x5bae[110]})};return})[_0x5bae[58]](function(_0x6b1ex1b){console[_0x5bae[23]](_0x5bae[153])})})}}function getFaxRoom(_0x6b1ex28){return function(_0x6b1ex18){if(_0x6b1ex28[_0x5bae[136]]){return FaxRoom[_0x5bae[181]](_0x6b1ex28.FaxRoomId)}else {return FaxRoom[_0x5bae[60]]({limit:1,where:{contact:_0x6b1ex28[_0x5bae[138]],FaxAccountId:_0x6b1ex18[_0x5bae[47]]},order:[[_0x5bae[145],_0x5bae[146]]]})[_0x5bae[59]](function(_0x6b1ex44){var _0x6b1ex34=_[_0x5bae[139]](_0x6b1ex44);if(!_0x6b1ex34|| _0x6b1ex34[_0x5bae[29]]=== _0x5bae[42]){return FaxRoom[_0x5bae[134]]({contact:_0x6b1ex28[_0x5bae[138]],account:_0x6b1ex18[_0x5bae[49]],status:_0x5bae[183],FaxAccountId:_0x6b1ex18[_0x5bae[47]]})}else {return _0x6b1ex34}})}}}module[_0x5bae[189]]= Fax \ No newline at end of file diff --git a/server/config/ami/index.js b/server/config/ami/index.js index 7a7d20f..c1b02bd 100644 --- a/server/config/ami/index.js +++ b/server/config/ami/index.js @@ -1,27 +1 @@ -'use strict'; - -const path = require('path'); -const cp = require('child_process'); - -const config = require('../environment'); -const User = require('../../models').User; -const Action = require('../../models').Action; -const ReportMember = require('../../models').ReportMember; - -var cpAmi = cp.fork(path.join(__dirname, 'ami')); - -Action.afterCreate(function(doc, options) { - doc.dataValues.evt = 'Action.afterCreate'; - doc.dataValues.options = { - body: options.body || null - }; - - cpAmi.send(doc.dataValues); -}); - -ReportMember.afterCreate(function(doc, options) { - doc.dataValues.evt = 'ReportMember.beforeCreate'; - cpAmi.send(doc.dataValues); -}); - -module.exports = cpAmi; +var _0x1f10=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x41\x63\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x46\x61\x78\x52\x6F\x6F\x6D","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x61\x6D\x69","\x6A\x6F\x69\x6E","\x66\x6F\x72\x6B","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x41\x63\x74\x69\x6F\x6E\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6F\x70\x74\x69\x6F\x6E\x73","\x62\x6F\x64\x79","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x2E\x62\x65\x66\x6F\x72\x65\x43\x72\x65\x61\x74\x65","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x46\x61\x78\x52\x6F\x6F\x6D\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x2E\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x1f10[0];const path=require(_0x1f10[1]);const cp=require(_0x1f10[2]);const config=require(_0x1f10[3]);const User=require(_0x1f10[5])[_0x1f10[4]];const Action=require(_0x1f10[5])[_0x1f10[6]];const ReportMember=require(_0x1f10[5])[_0x1f10[7]];const FaxMessage=require(_0x1f10[5])[_0x1f10[8]];const ReportFax=require(_0x1f10[5])[_0x1f10[9]];const FaxRoom=require(_0x1f10[5])[_0x1f10[10]];const FaxAccount=require(_0x1f10[5])[_0x1f10[11]];var cpAmi=cp[_0x1f10[14]](path[_0x1f10[13]](__dirname,_0x1f10[12]));Action[_0x1f10[21]](function(_0x23e4xc,_0x23e4xd){_0x23e4xc[_0x1f10[16]][_0x1f10[15]]= _0x1f10[17];_0x23e4xc[_0x1f10[16]][_0x1f10[18]]= {body:_0x23e4xd[_0x1f10[19]]|| null};cpAmi[_0x1f10[20]](_0x23e4xc[_0x1f10[16]])});ReportMember[_0x1f10[21]](function(_0x23e4xc,_0x23e4xd){_0x23e4xc[_0x1f10[16]][_0x1f10[15]]= _0x1f10[22];cpAmi[_0x1f10[20]](_0x23e4xc[_0x1f10[16]])});FaxMessage[_0x1f10[21]](function(_0x23e4xc,_0x23e4xd){var _0x23e4xe={message:_0x1f10[23],doc:_0x23e4xc[_0x1f10[16]],options:_0x23e4xd};cpAmi[_0x1f10[20]](_0x23e4xe)});FaxMessage[_0x1f10[26]](function(_0x23e4xc,_0x23e4xd){_0x23e4xd[_0x1f10[24]]= _0x23e4xc[_0x1f10[24]]();var _0x23e4xe={message:_0x1f10[25],doc:_0x23e4xc[_0x1f10[16]],options:_0x23e4xd};cpAmi[_0x1f10[20]](_0x23e4xe)});ReportFax[_0x1f10[26]](function(_0x23e4xc,_0x23e4xd){_0x23e4xd[_0x1f10[24]]= _0x23e4xc[_0x1f10[24]]();var _0x23e4xe={message:_0x1f10[27],doc:_0x23e4xc[_0x1f10[16]],options:_0x23e4xd};cpAmi[_0x1f10[20]](_0x23e4xe)});FaxRoom[_0x1f10[26]](function(_0x23e4xc,_0x23e4xd){_0x23e4xd[_0x1f10[24]]= _0x23e4xc[_0x1f10[24]]();var _0x23e4xe={message:_0x1f10[28],doc:_0x23e4xc[_0x1f10[16]],options:_0x23e4xd};cpAmi[_0x1f10[20]](_0x23e4xe)});FaxAccount[_0x1f10[21]](function(_0x23e4xc,_0x23e4xd){var _0x23e4xe={message:_0x1f10[29],doc:_0x23e4xc[_0x1f10[16]],options:_0x23e4xd};cpAmi[_0x1f10[20]](_0x23e4xe)});FaxAccount[_0x1f10[26]](function(_0x23e4xc,_0x23e4xd){_0x23e4xd[_0x1f10[24]]= _0x23e4xc[_0x1f10[24]]();var _0x23e4xe={message:_0x1f10[30],doc:_0x23e4xc[_0x1f10[16]],options:_0x23e4xd};cpAmi[_0x1f10[20]](_0x23e4xe)});FaxAccount[_0x1f10[32]](function(_0x23e4xc,_0x23e4xd){var _0x23e4xe={message:_0x1f10[31],doc:_0x23e4xc[_0x1f10[16]],options:_0x23e4xd};cpAmi[_0x1f10[20]](_0x23e4xe)});module[_0x1f10[33]]= cpAmi \ No newline at end of file diff --git a/server/config/ami/member.js b/server/config/ami/member.js index f4dfac0..d293e8e 100644 --- a/server/config/ami/member.js +++ b/server/config/ami/member.js @@ -1,104 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); -const ReportMember = require('../../models').ReportMember; - -function Member() { - console.log('Member Initialization...'); -} - -Member.prototype.inboundTalking = function(evt) { - return createMember({ - channel: 'voice', - membername: evt.membername, - interface: evt.interface, - type: 'TALKING', - enterAt: moment().format("YYYY-MM-DD HH:mm:ss"), - data1: 'inbound', - role: 'agent', - internal: evt.connectedlinenum - }); -} - -Member.prototype.inboundComplete = function(evt) { - return updateMember({ - channel: 'voice', - type: 'TALKING', - membername: evt.membername, - interface: evt.interface, - exitAt: null - }); -} - -Member.prototype.outboundTalking = function(evt) { - if (evt.dialstring) { //dialstring is present only if outbound - var dialString = evt.dialstring.split('/'); - if (evt.dialstatus === 'ANSWER' && evt.dialString.length > 1 && dialString[0] !== 'SIP') { - return createMember({ - channel: 'voice', - membername: evt.channel.split(/\/|-/)[1], - interface: evt.destchannel.split('-')[0], - type: 'TALKING', - enterAt: moment().format("YYYY-MM-DD HH:mm:ss"), - data1: 'outbound', - role: 'agent', - internal: evt.accountcode, - uniqueid: evt.destuniqueid - }); - } - } -} - -Member.prototype.outboundComplete = function(evt) { - return updateMember({ - uniqueid: evt.uniqueid - }); -} - -function createMember(evt) { - return ReportMember - .create(evt) - .then(function(data) { - console.log('[report] member talking created'); - }) - .catch(function(err) { - console.error('[report] member create ' + err); - }); -} - -function updateMember(where) { - return ReportMember - .findOne({ - where: where - }) - .then(function(member) { - if (member) { - return member - .update({ - exitAt: moment().format("YYYY-MM-DD HH:mm:ss"), - duration: moment.duration(moment() - moment(member.enterAt)).asSeconds() - }); - - } - }) - .then(function(data) { - console.error('[report] member update'); - }) - .catch(function(err) { - console.error('[report] member update ' + err); - }); -} - -ReportMember.afterCreate(function(doc, options) { - doc.dataValues.evt = 'ReportMember.afterCreate'; - process.send(doc.dataValues); -}); - -ReportMember.afterUpdate(function(doc, options) { - doc.dataValues.evt = 'ReportMember.afterUpdate'; - doc.dataValues.changed = _.keyBy(doc.changed()); - process.send(doc.dataValues); -}); - -module.exports = Member; +var _0x8875=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x65\x6D\x62\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x69\x6E\x62\x6F\x75\x6E\x64\x54\x61\x6C\x6B\x69\x6E\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x76\x6F\x69\x63\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x54\x41\x4C\x4B\x49\x4E\x47","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x69\x6E\x62\x6F\x75\x6E\x64","\x61\x67\x65\x6E\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x69\x6E\x62\x6F\x75\x6E\x64\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x54\x61\x6C\x6B\x69\x6E\x67","\x64\x69\x61\x6C\x73\x74\x72\x69\x6E\x67","\x2F","\x73\x70\x6C\x69\x74","\x64\x69\x61\x6C\x73\x74\x61\x74\x75\x73","\x41\x4E\x53\x57\x45\x52","\x6C\x65\x6E\x67\x74\x68","\x64\x69\x61\x6C\x53\x74\x72\x69\x6E\x67","\x53\x49\x50","\x63\x68\x61\x6E\x6E\x65\x6C","\x2D","\x64\x65\x73\x74\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x64\x65\x73\x74\x75\x6E\x69\x71\x75\x65\x69\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x6D\x65\x6D\x62\x65\x72\x20\x63\x72\x65\x61\x74\x65\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x6D\x65\x6D\x62\x65\x72\x20\x74\x61\x6C\x6B\x69\x6E\x67\x20\x63\x72\x65\x61\x74\x65\x64","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x6D\x65\x6D\x62\x65\x72\x20\x75\x70\x64\x61\x74\x65\x20","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x6D\x65\x6D\x62\x65\x72\x20\x75\x70\x64\x61\x74\x65","\x61\x73\x53\x65\x63\x6F\x6E\x64\x73","\x65\x6E\x74\x65\x72\x41\x74","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8875[0];const _=require(_0x8875[1]);const moment=require(_0x8875[2]);const ReportMember=require(_0x8875[4])[_0x8875[3]];function Member(){console[_0x8875[6]](_0x8875[5])}Member[_0x8875[8]][_0x8875[7]]= function(_0x2559x5){return createMember({channel:_0x8875[9],membername:_0x2559x5[_0x8875[10]],interface:_0x2559x5[_0x8875[11]],type:_0x8875[12],enterAt:moment()[_0x8875[14]](_0x8875[13]),data1:_0x8875[15],role:_0x8875[16],internal:_0x2559x5[_0x8875[17]]})};Member[_0x8875[8]][_0x8875[18]]= function(_0x2559x5){return updateMember({channel:_0x8875[9],type:_0x8875[12],membername:_0x2559x5[_0x8875[10]],interface:_0x2559x5[_0x8875[11]],exitAt:null})};Member[_0x8875[8]][_0x8875[19]]= function(_0x2559x5){if(_0x2559x5[_0x8875[20]]){var _0x2559x6=_0x2559x5[_0x8875[20]][_0x8875[22]](_0x8875[21]);if(_0x2559x5[_0x8875[23]]=== _0x8875[24]&& _0x2559x5[_0x8875[26]][_0x8875[25]]> 1&& _0x2559x6[0]!== _0x8875[27]){return createMember({channel:_0x8875[9],membername:_0x2559x5[_0x8875[28]][_0x8875[22]](/\/|-/)[1],interface:_0x2559x5[_0x8875[30]][_0x8875[22]](_0x8875[29])[0],type:_0x8875[12],enterAt:moment()[_0x8875[14]](_0x8875[13]),data1:_0x8875[31],role:_0x8875[16],internal:_0x2559x5[_0x8875[32]],uniqueid:_0x2559x5[_0x8875[33]]})}}};Member[_0x8875[8]][_0x8875[34]]= function(_0x2559x5){return updateMember({uniqueid:_0x2559x5[_0x8875[35]]})};function createMember(_0x2559x5){return ReportMember[_0x8875[41]](_0x2559x5)[_0x8875[40]](function(_0x2559x9){console[_0x8875[6]](_0x8875[39])})[_0x8875[38]](function(_0x2559x8){console[_0x8875[37]](_0x8875[36]+ _0x2559x8)})}function updateMember(_0x2559xb){return ReportMember[_0x8875[48]]({where:_0x2559xb})[_0x8875[40]](function(_0x2559xc){if(_0x2559xc){return _0x2559xc[_0x8875[47]]({exitAt:moment()[_0x8875[14]](_0x8875[13]),duration:moment[_0x8875[46]](moment()- moment(_0x2559xc[_0x8875[45]]))[_0x8875[44]]()})}})[_0x8875[40]](function(_0x2559x9){console[_0x8875[37]](_0x8875[43])})[_0x8875[38]](function(_0x2559x8){console[_0x8875[37]](_0x8875[42]+ _0x2559x8)})}ReportMember[_0x8875[53]](function(_0x2559xd,_0x2559xe){_0x2559xd[_0x8875[50]][_0x8875[49]]= _0x8875[51];process[_0x8875[52]](_0x2559xd[_0x8875[50]])});ReportMember[_0x8875[57]](function(_0x2559xd,_0x2559xe){_0x2559xd[_0x8875[50]][_0x8875[49]]= _0x8875[54];_0x2559xd[_0x8875[50]][_0x8875[55]]= _[_0x8875[56]](_0x2559xd[_0x8875[55]]());process[_0x8875[52]](_0x2559xd[_0x8875[50]])});module[_0x8875[58]]= Member \ No newline at end of file diff --git a/server/config/ami/network.js b/server/config/ami/network.js index dcf1246..71e1025 100644 --- a/server/config/ami/network.js +++ b/server/config/ami/network.js @@ -1,90 +1 @@ -'use strict'; - -const _ = require('lodash'); -const util = require('util'); -const path = require('path'); -const fs = require('fs'); - -var NetwokModel = require('../../models').Network; -var config = require('../../config/environment'); - -function Network(ami) { - console.log('Network Initialization...'); - - NetwokModel.afterCreate(function(doc) { - networkRewrite(doc, ami); - }); - - NetwokModel.afterUpdate(function(doc) { - networkRewrite(doc, ami); - }); - - NetwokModel.afterDestroy(function(doc) { - networkRewrite(doc, ami); - }); -} - -function networkRewrite(doc, ami) { - switch (doc.type) { - case 'localnet': - return NetwokModel - .scope('localnet') - .findAll() - .then(function(localnets) { - var localnetStrings = ''; - var localnetFile = 'sip_xcally_localnet.conf'; - localnets.forEach(function(localnet) { - localnetStrings += util.format('localnet = %s\n', localnet.value); - }); - fs.writeFile(path.join(config.asteriskConf, localnetFile), localnetStrings, { - flags: 'w', - mode: parseInt('0777', 8) - }, function(err) { - if (err) throw err; - reload(ami); - console.log("Localnet file saved!"); - }); - }) - .catch(function(err) { - console.log('Error writing localnet:', err); - }); - case 'externip': - return NetwokModel - .scope('externip') - .findAll() - .then(function(externips) { - var externipStrings = ''; - var externipFile = 'sip_xcally_externip.conf'; - externips.forEach(function(externip) { - externipStrings += util.format('externip = %s\n', externip.value); - }); - fs.writeFile(path.join(config.asteriskConf, externipFile), externipStrings, { - flags: 'w', - mode: parseInt('0777', 8) - }, function(err) { - if (err) throw err; - reload(ami); - console.log("Externip file saved!"); - }); - }) - .catch(function(err) { - console.log('Error writing externip:', err); - }); - default: - console.log('Type not recognized:', doc.type); - } -} - -function reload(ami) { - ami.action({ - Action: 'Reload' - }, function(err, res) { - if (err) { - console.error(err); - } else { - console.log(res); - } - }); -} - -module.exports = Network; +var _0x4d05=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x66\x73","\x4E\x65\x74\x77\x6F\x72\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x4E\x65\x74\x77\x6F\x72\x6B\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x45\x72\x72\x6F\x72\x20\x77\x72\x69\x74\x69\x6E\x67\x20\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x3A","\x63\x61\x74\x63\x68","","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x2E\x63\x6F\x6E\x66","\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x20\x3D\x20\x25\x73\x0A","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x45\x61\x63\x68","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x4C\x6F\x63\x61\x6C\x6E\x65\x74\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x6C\x6F\x63\x61\x6C\x6E\x65\x74","\x73\x63\x6F\x70\x65","\x45\x72\x72\x6F\x72\x20\x77\x72\x69\x74\x69\x6E\x67\x20\x65\x78\x74\x65\x72\x6E\x69\x70\x3A","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x2E\x63\x6F\x6E\x66","\x65\x78\x74\x65\x72\x6E\x69\x70\x20\x3D\x20\x25\x73\x0A","\x45\x78\x74\x65\x72\x6E\x69\x70\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x65\x78\x74\x65\x72\x6E\x69\x70","\x54\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x74\x79\x70\x65","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x4d05[0];const _=require(_0x4d05[1]);const util=require(_0x4d05[2]);const path=require(_0x4d05[3]);const fs=require(_0x4d05[4]);var NetwokModel=require(_0x4d05[6])[_0x4d05[5]];var config=require(_0x4d05[7]);function Network(_0xc855x8){console[_0x4d05[9]](_0x4d05[8]);NetwokModel[_0x4d05[10]](function(_0xc855x9){networkRewrite(_0xc855x9,_0xc855x8)});NetwokModel[_0x4d05[11]](function(_0xc855x9){networkRewrite(_0xc855x9,_0xc855x8)});NetwokModel[_0x4d05[12]](function(_0xc855x9){networkRewrite(_0xc855x9,_0xc855x8)})}function networkRewrite(_0xc855x9,_0xc855x8){switch(_0xc855x9[_0x4d05[37]]){case _0x4d05[29]:return NetwokModel[_0x4d05[30]](_0x4d05[29])[_0x4d05[28]]()[_0x4d05[27]](function(_0xc855xc){var _0xc855xd=_0x4d05[15];var _0xc855xe=_0x4d05[16];_0xc855xc[_0x4d05[20]](function(_0xc855xf){_0xc855xd+= util[_0x4d05[19]](_0x4d05[17],_0xc855xf[_0x4d05[18]])});fs[_0x4d05[26]](path[_0x4d05[22]](config[_0x4d05[21]],_0xc855xe),_0xc855xd,{flags:_0x4d05[23],mode:parseInt(_0x4d05[24],8)},function(_0xc855xb){if(_0xc855xb){throw _0xc855xb};reload(_0xc855x8);console[_0x4d05[9]](_0x4d05[25])})})[_0x4d05[14]](function(_0xc855xb){console[_0x4d05[9]](_0x4d05[13],_0xc855xb)});case _0x4d05[35]:return NetwokModel[_0x4d05[30]](_0x4d05[35])[_0x4d05[28]]()[_0x4d05[27]](function(_0xc855x10){var _0xc855x11=_0x4d05[15];var _0xc855x12=_0x4d05[32];_0xc855x10[_0x4d05[20]](function(_0xc855x13){_0xc855x11+= util[_0x4d05[19]](_0x4d05[33],_0xc855x13[_0x4d05[18]])});fs[_0x4d05[26]](path[_0x4d05[22]](config[_0x4d05[21]],_0xc855x12),_0xc855x11,{flags:_0x4d05[23],mode:parseInt(_0x4d05[24],8)},function(_0xc855xb){if(_0xc855xb){throw _0xc855xb};reload(_0xc855x8);console[_0x4d05[9]](_0x4d05[34])})})[_0x4d05[14]](function(_0xc855xb){console[_0x4d05[9]](_0x4d05[31],_0xc855xb)});default:console[_0x4d05[9]](_0x4d05[36],_0xc855x9[_0x4d05[37]])}}function reload(_0xc855x8){_0xc855x8[_0x4d05[40]]({Action:_0x4d05[38]},function(_0xc855xb,_0xc855x15){if(_0xc855xb){console[_0x4d05[39]](_0xc855xb)}else {console[_0x4d05[9]](_0xc855x15)}})}module[_0x4d05[41]]= Network \ No newline at end of file diff --git a/server/config/ami/queue_caller.js b/server/config/ami/queue_caller.js index 6a1a4af..e96fdcf 100644 --- a/server/config/ami/queue_caller.js +++ b/server/config/ami/queue_caller.js @@ -1,90 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); -const ReportQueue = require('../../models').ReportQueue; - -function QueueCaller() { - console.log('QueueCaller Initialization...'); -} - -QueueCaller.prototype.join = function(evt) { - evt.queuecallerjoinAt = moment().format("YYYY-MM-DD HH:mm:ss"); - return create(evt); -} - -QueueCaller.prototype.leave = function(evt) { - return findAndUpdate({ - uniqueid: evt.uniqueid, - queuecallerleaveAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); -} - -QueueCaller.prototype.abandon = function(evt) { - evt.queuecallerabandon = true; - evt.queuecallerabandonAt = moment().format("YYYY-MM-DD HH:mm:ss"); - evt.queuecallerleaveAt = moment().format("YYYY-MM-DD HH:mm:ss"); - return findAndUpdate(evt); -} - -QueueCaller.prototype.complete = function(evt) { - evt.queuecallercomplete = true; - evt.queuecallercompleteAt = moment().format("YYYY-MM-DD HH:mm:ss"); - return findAndUpdate(evt); -} - -QueueCaller.prototype.exit = function(evt) { - evt.queuecallerabandon = false; - evt.queuecallerabandonAt = null; - - evt.queuecallerexit = true; - evt.queuecallerexitAt = moment().format("YYYY-MM-DD HH:mm:ss"); - evt.queuecallerexitreason = evt.value.toLowerCase(); - - return findAndUpdate(evt); -} - -function create(evt) { - return ReportQueue - .create(evt) - .then(function(data) { - console.log('[report] queue created'); - }) - .catch(function(err) { - console.error('[report] queue ' + err); - }); -} - -function findAndUpdate(evt) { - return ReportQueue - .findOne({ - where: { - uniqueid: evt.uniqueid - } - }) - .then(function(reportQueue) { - if (reportQueue) { - return reportQueue - .update(evt); - } - }) - .then(function() { - console.log('[report] queue update'); - }) - .catch(function(err) { - console.error('[queue_caller] update error: ' + err); - }); -} - -ReportQueue.afterCreate(function(doc, options) { - doc.dataValues.evt = 'ReportQueue.afterCreate'; - process.send(doc.dataValues); -}); - -ReportQueue.afterUpdate(function(doc, options) { - doc.dataValues.evt = 'ReportQueue.afterUpdate'; - doc.dataValues.changed = _.keyBy(doc.changed()); - process.send(doc.dataValues); -}); - -module.exports = QueueCaller; +var _0xe257=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6A\x6F\x69\x6E","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x65\x61\x76\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x72\x65\x61\x73\x6F\x6E","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x76\x61\x6C\x75\x65","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x71\x75\x65\x75\x65\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x71\x75\x65\x75\x65\x20\x63\x72\x65\x61\x74\x65\x64","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x5B\x71\x75\x65\x75\x65\x5F\x63\x61\x6C\x6C\x65\x72\x5D\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x5B\x72\x65\x70\x6F\x72\x74\x5D\x20\x71\x75\x65\x75\x65\x20\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xe257[0];const _=require(_0xe257[1]);const moment=require(_0xe257[2]);const ReportQueue=require(_0xe257[4])[_0xe257[3]];function QueueCaller(){console[_0xe257[6]](_0xe257[5])}QueueCaller[_0xe257[8]][_0xe257[7]]= function(_0x5f86x5){_0x5f86x5[_0xe257[9]]= moment()[_0xe257[11]](_0xe257[10]);return create(_0x5f86x5)};QueueCaller[_0xe257[8]][_0xe257[12]]= function(_0x5f86x5){return findAndUpdate({uniqueid:_0x5f86x5[_0xe257[13]],queuecallerleaveAt:moment()[_0xe257[11]](_0xe257[10])})};QueueCaller[_0xe257[8]][_0xe257[14]]= function(_0x5f86x5){_0x5f86x5[_0xe257[15]]= true;_0x5f86x5[_0xe257[16]]= moment()[_0xe257[11]](_0xe257[10]);_0x5f86x5[_0xe257[17]]= moment()[_0xe257[11]](_0xe257[10]);return findAndUpdate(_0x5f86x5)};QueueCaller[_0xe257[8]][_0xe257[18]]= function(_0x5f86x5){_0x5f86x5[_0xe257[19]]= true;_0x5f86x5[_0xe257[20]]= moment()[_0xe257[11]](_0xe257[10]);return findAndUpdate(_0x5f86x5)};QueueCaller[_0xe257[8]][_0xe257[21]]= function(_0x5f86x5){_0x5f86x5[_0xe257[15]]= false;_0x5f86x5[_0xe257[16]]= null;_0x5f86x5[_0xe257[22]]= true;_0x5f86x5[_0xe257[23]]= moment()[_0xe257[11]](_0xe257[10]);_0x5f86x5[_0xe257[24]]= _0x5f86x5[_0xe257[26]][_0xe257[25]]();return findAndUpdate(_0x5f86x5)};function create(_0x5f86x5){return ReportQueue[_0xe257[32]](_0x5f86x5)[_0xe257[31]](function(_0x5f86x8){console[_0xe257[6]](_0xe257[30])})[_0xe257[29]](function(_0x5f86x7){console[_0xe257[28]](_0xe257[27]+ _0x5f86x7)})}function findAndUpdate(_0x5f86x5){return ReportQueue[_0xe257[36]]({where:{uniqueid:_0x5f86x5[_0xe257[13]]}})[_0xe257[31]](function(_0x5f86xa){if(_0x5f86xa){return _0x5f86xa[_0xe257[35]](_0x5f86x5)}})[_0xe257[31]](function(){console[_0xe257[6]](_0xe257[34])})[_0xe257[29]](function(_0x5f86x7){console[_0xe257[28]](_0xe257[33]+ _0x5f86x7)})}ReportQueue[_0xe257[41]](function(_0x5f86xb,_0x5f86xc){_0x5f86xb[_0xe257[38]][_0xe257[37]]= _0xe257[39];process[_0xe257[40]](_0x5f86xb[_0xe257[38]])});ReportQueue[_0xe257[45]](function(_0x5f86xb,_0x5f86xc){_0x5f86xb[_0xe257[38]][_0xe257[37]]= _0xe257[42];_0x5f86xb[_0xe257[38]][_0xe257[43]]= _[_0xe257[44]](_0x5f86xb[_0xe257[43]]());process[_0xe257[40]](_0x5f86xb[_0xe257[38]])});module[_0xe257[46]]= QueueCaller \ No newline at end of file diff --git a/server/config/ami/queue_member.js b/server/config/ami/queue_member.js index dafa42e..967ac3e 100644 --- a/server/config/ami/queue_member.js +++ b/server/config/ami/queue_member.js @@ -1,80 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); -const UserHasVoiceQueue = require('../../models').UserHasVoiceQueue; - -function QueueMember() { - console.log('QueueMember Initialization...'); -} - -QueueMember.prototype.added = function(evt) { - delete evt.lastcall; - delete evt.callstaken; - - evt.logged = true; - evt.loggedAt = moment().format('YYYY-MM-DD HH:mm:ss'); - return findAndUpdate(evt); -} - -QueueMember.prototype.pause = function(evt) { - evt.pausedAt = parseInt(evt.paused, 10) ? moment().format('YYYY-MM-DD HH:mm:ss') : null; - return findAndUpdate(evt); -} - -QueueMember.prototype.penalty = function(evt) { - return findAndUpdate(evt); -} - -QueueMember.prototype.removed = function(evt) { - return findAndUpdate(evt); -} - -QueueMember.prototype.ringinuse = function(evt) { - return findAndUpdate(evt); -} - -QueueMember.prototype.status = function(evt) { - // return findAndUpdate(evt); -} - -function findAndUpdate(evt, options) { - return UserHasVoiceQueue - .update(evt, { - where: { - queue: evt.queue, - membername: evt.membername - }, - individualHooks: true, - raw: true - }) - .then(function() { - console.log('[queuemember] update member'); - }) - .catch(function(err) { - console.error('[queuemember] update member error: ' + err); - }); -} - -UserHasVoiceQueue.afterCreate(function(doc, options) { - doc.dataValues.evt = 'UserHasVoiceQueue.afterCreate'; - process.send(doc.dataValues); -}); - -UserHasVoiceQueue.afterBulkCreate(function(doc, options) { - doc.dataValues.evt = 'UserHasVoiceQueue.afterBulkCreate'; - process.send(doc.dataValues); -}); - -UserHasVoiceQueue.afterBulkDestroy(function(doc, options) { - doc.dataValues.evt = 'UserHasVoiceQueue.afterBulkDestroy'; - process.send(doc.dataValues); -}); - -UserHasVoiceQueue.afterUpdate(function(doc, options) { - doc.dataValues.evt = 'UserHasVoiceQueue.afterUpdate'; - doc.dataValues.changed = _.keyBy(doc.changed()); - process.send(doc.dataValues); -}); - -module.exports = QueueMember; +var _0xf20c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x64\x64\x65\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6C\x61\x73\x74\x63\x61\x6C\x6C","\x63\x61\x6C\x6C\x73\x74\x61\x6B\x65\x6E","\x6C\x6F\x67\x67\x65\x64","\x6C\x6F\x67\x67\x65\x64\x41\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x70\x61\x75\x73\x65","\x70\x61\x75\x73\x65\x64\x41\x74","\x70\x61\x75\x73\x65\x64","\x70\x65\x6E\x61\x6C\x74\x79","\x72\x65\x6D\x6F\x76\x65\x64","\x72\x69\x6E\x67\x69\x6E\x75\x73\x65","\x73\x74\x61\x74\x75\x73","\x5B\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x5D\x20\x75\x70\x64\x61\x74\x65\x20\x6D\x65\x6D\x62\x65\x72\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x71\x75\x65\x75\x65\x6D\x65\x6D\x62\x65\x72\x5D\x20\x75\x70\x64\x61\x74\x65\x20\x6D\x65\x6D\x62\x65\x72","\x74\x68\x65\x6E","\x71\x75\x65\x75\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x70\x64\x61\x74\x65","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf20c[0];const _=require(_0xf20c[1]);const moment=require(_0xf20c[2]);const UserHasVoiceQueue=require(_0xf20c[4])[_0xf20c[3]];function QueueMember(){console[_0xf20c[6]](_0xf20c[5])}QueueMember[_0xf20c[8]][_0xf20c[7]]= function(_0x5265x5){delete _0x5265x5[_0xf20c[9]];delete _0x5265x5[_0xf20c[10]];_0x5265x5[_0xf20c[11]]= true;_0x5265x5[_0xf20c[12]]= moment()[_0xf20c[14]](_0xf20c[13]);return findAndUpdate(_0x5265x5)};QueueMember[_0xf20c[8]][_0xf20c[15]]= function(_0x5265x5){_0x5265x5[_0xf20c[16]]= parseInt(_0x5265x5[_0xf20c[17]],10)?moment()[_0xf20c[14]](_0xf20c[13]):null;return findAndUpdate(_0x5265x5)};QueueMember[_0xf20c[8]][_0xf20c[18]]= function(_0x5265x5){return findAndUpdate(_0x5265x5)};QueueMember[_0xf20c[8]][_0xf20c[19]]= function(_0x5265x5){return findAndUpdate(_0x5265x5)};QueueMember[_0xf20c[8]][_0xf20c[20]]= function(_0x5265x5){return findAndUpdate(_0x5265x5)};QueueMember[_0xf20c[8]][_0xf20c[21]]= function(_0x5265x5){};function findAndUpdate(_0x5265x5,_0x5265x7){return UserHasVoiceQueue[_0xf20c[29]](_0x5265x5,{where:{queue:_0x5265x5[_0xf20c[27]],membername:_0x5265x5[_0xf20c[28]]},individualHooks:true,raw:true})[_0xf20c[26]](function(){console[_0xf20c[6]](_0xf20c[25])})[_0xf20c[24]](function(_0x5265x8){console[_0xf20c[23]](_0xf20c[22]+ _0x5265x8)})}UserHasVoiceQueue[_0xf20c[34]](function(_0x5265x9,_0x5265x7){_0x5265x9[_0xf20c[31]][_0xf20c[30]]= _0xf20c[32];process[_0xf20c[33]](_0x5265x9[_0xf20c[31]])});UserHasVoiceQueue[_0xf20c[36]](function(_0x5265x9,_0x5265x7){_0x5265x9[_0xf20c[31]][_0xf20c[30]]= _0xf20c[35];process[_0xf20c[33]](_0x5265x9[_0xf20c[31]])});UserHasVoiceQueue[_0xf20c[38]](function(_0x5265x9,_0x5265x7){_0x5265x9[_0xf20c[31]][_0xf20c[30]]= _0xf20c[37];process[_0xf20c[33]](_0x5265x9[_0xf20c[31]])});UserHasVoiceQueue[_0xf20c[42]](function(_0x5265x9,_0x5265x7){_0x5265x9[_0xf20c[31]][_0xf20c[30]]= _0xf20c[39];_0x5265x9[_0xf20c[31]][_0xf20c[40]]= _[_0xf20c[41]](_0x5265x9[_0xf20c[40]]());process[_0xf20c[33]](_0x5265x9[_0xf20c[31]])});module[_0xf20c[43]]= QueueMember \ No newline at end of file diff --git a/server/config/ami/recording.js b/server/config/ami/recording.js index 873d66d..67c3958 100644 --- a/server/config/ami/recording.js +++ b/server/config/ami/recording.js @@ -1,83 +1 @@ -'use strict'; - -const _ = require('lodash'); -const VoiceRecording = require('../../models').VoiceRecording; - -function Recording() { - console.log('Recording Initialization...'); -} - -Recording.prototype.create = function(evt) { - create(evt); -} - -Recording.prototype.updateQueue = function(evt) { - updateQueue(evt); -} - -Recording.prototype.updateType = function(evt) { - updateType(evt); -} - -function create(evt) { - evt.type = 'unknown'; - evt.customerPhone = evt.calleridnum; - return VoiceRecording - .create(evt, { - raw: true - }) - .catch(function(err) { - console.error('Recording create error:', err); - }); -} - -function updateQueue(evt) { - return VoiceRecording - .update({ - queue: evt.queue, - membername: evt.membername - }, { - where: { - uniqueid: evt.uniqueid - }, - raw: true, - individualHooks: true - }) - .catch(function(err) { - console.error('Recording queue update error:', err); - }); -} - -function updateType(evt) { - return VoiceRecording - .findOne({ - where: { - uniqueid: evt.uniqueid - } - }) - .then(function(recording) { - if (recording) { - recording.type = evt.type; - recording.customerPhone = evt.type === 'outbound' ? recording.exten : recording.calleridnum; - - return recording - .save(); - } - }) - .catch(function(err) { - console.error('Recording queue update error:', err); - }); -} - -VoiceRecording.afterCreate(function(doc, options) { - doc.dataValues.evt = 'VoiceRecording.afterCreate'; - process.send(doc.dataValues); -}); - -VoiceRecording.afterUpdate(function(doc, options) { - doc.dataValues.evt = 'VoiceRecording.afterUpdate'; - doc.dataValues.changed = _.keyBy(doc.changed()); - process.send(doc.dataValues); -}); - -module.exports = Recording; +var _0xbdf4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x75\x70\x64\x61\x74\x65\x51\x75\x65\x75\x65","\x75\x70\x64\x61\x74\x65\x54\x79\x70\x65","\x74\x79\x70\x65","\x75\x6E\x6B\x6E\x6F\x77\x6E","\x63\x75\x73\x74\x6F\x6D\x65\x72\x50\x68\x6F\x6E\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x63\x72\x65\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x71\x75\x65\x75\x65\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A","\x71\x75\x65\x75\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x70\x64\x61\x74\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x65\x78\x74\x65\x6E","\x73\x61\x76\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xbdf4[0];const _=require(_0xbdf4[1]);const VoiceRecording=require(_0xbdf4[3])[_0xbdf4[2]];function Recording(){console[_0xbdf4[5]](_0xbdf4[4])}Recording[_0xbdf4[7]][_0xbdf4[6]]= function(_0x59adx4){create(_0x59adx4)};Recording[_0xbdf4[7]][_0xbdf4[8]]= function(_0x59adx4){updateQueue(_0x59adx4)};Recording[_0xbdf4[7]][_0xbdf4[9]]= function(_0x59adx4){updateType(_0x59adx4)};function create(_0x59adx4){_0x59adx4[_0xbdf4[10]]= _0xbdf4[11];_0x59adx4[_0xbdf4[12]]= _0x59adx4[_0xbdf4[13]];return VoiceRecording[_0xbdf4[6]](_0x59adx4,{raw:true})[_0xbdf4[16]](function(_0x59adx6){console[_0xbdf4[15]](_0xbdf4[14],_0x59adx6)})}function updateQueue(_0x59adx4){return VoiceRecording[_0xbdf4[21]]({queue:_0x59adx4[_0xbdf4[18]],membername:_0x59adx4[_0xbdf4[19]]},{where:{uniqueid:_0x59adx4[_0xbdf4[20]]},raw:true,individualHooks:true})[_0xbdf4[16]](function(_0x59adx6){console[_0xbdf4[15]](_0xbdf4[17],_0x59adx6)})}function updateType(_0x59adx4){return VoiceRecording[_0xbdf4[26]]({where:{uniqueid:_0x59adx4[_0xbdf4[20]]}})[_0xbdf4[25]](function(_0x59adx9){if(_0x59adx9){_0x59adx9[_0xbdf4[10]]= _0x59adx4[_0xbdf4[10]];_0x59adx9[_0xbdf4[12]]= _0x59adx4[_0xbdf4[10]]=== _0xbdf4[22]?_0x59adx9[_0xbdf4[23]]:_0x59adx9[_0xbdf4[13]];return _0x59adx9[_0xbdf4[24]]()}})[_0xbdf4[16]](function(_0x59adx6){console[_0xbdf4[15]](_0xbdf4[17],_0x59adx6)})}VoiceRecording[_0xbdf4[31]](function(_0x59adxa,_0x59adxb){_0x59adxa[_0xbdf4[28]][_0xbdf4[27]]= _0xbdf4[29];process[_0xbdf4[30]](_0x59adxa[_0xbdf4[28]])});VoiceRecording[_0xbdf4[35]](function(_0x59adxa,_0x59adxb){_0x59adxa[_0xbdf4[28]][_0xbdf4[27]]= _0xbdf4[32];_0x59adxa[_0xbdf4[28]][_0xbdf4[33]]= _[_0xbdf4[34]](_0x59adxa[_0xbdf4[33]]());process[_0xbdf4[30]](_0x59adxa[_0xbdf4[28]])});module[_0xbdf4[36]]= Recording \ No newline at end of file diff --git a/server/config/ami/transfer.js b/server/config/ami/transfer.js index 9e41ba4..52c1e6f 100644 --- a/server/config/ami/transfer.js +++ b/server/config/ami/transfer.js @@ -1,56 +1 @@ -var moment = require('moment'); -var ReportCallTransfer = require('../../models').ReportCallTransfer; - -function Transfer() { - console.log('Transfer Initialization...'); -} - -Transfer.prototype.createBlind = function(evt) { - return ReportCallTransfer - .create(evt, { - raw: true - }) - .then(function() { - console.log('[blind tranfer] created'); - }) - .catch(function(err) { - console.error('[blind tranfer] created error: ' + err); - }); -} - -Transfer.prototype.createAttended = function(evt) { - return ReportCallTransfer - .create({ - result: evt.result, - transfererchannel: evt.origtransfererchannel, - transferercalleridnum: evt.origtransferercalleridnum, - transferercalleridname: evt.origtransferercalleridname, - transfererconnectedlinenum: evt.secondtransfererconnectedlinenum, - transfererconnectedlinename: evt.secondtransfererconnectedlinename, - transfereraccountcode: evt.origtransfereraccountcode, - transferercontext: evt.secondtransferercontext, - transfererexten: evt.secondtransfererexten, - transfererlinkedid: evt.origtransfererlinkedid, - transfereechannel: evt.transfertargetchannel, - transfereecalleridnum: evt.transfertargetcalleridnum, - transfereecalleridname: evt.transfertargetcalleridname, - transfereeconnectedlinenum: evt.transfertargetconnectedlinenum, - transfereeconnectedlinename: evt.transfertargetconnectedlinename, - transfereeaccountcode: evt.transfertargetaccountcode, - transfereecontext: evt.transfertargetcontext, - transfereeexten: evt.transfertargetexten, - transfereelinkedid: evt.transfertargetlinkedid, - isexternal: evt.isexternal, - context: evt.origtransferercontext, - extension: evt.origtransfererexten, - type: 'attended' - }) - .then(function() { - console.log('[attended tranfer] created'); - }) - .catch(function(err) { - console.error('[attended tranfer] created error: ' + err); - }); -} - -module.exports = Transfer; +var _0xe70f=["\x6D\x6F\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x54\x72\x61\x6E\x73\x66\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x72\x61\x6E\x73\x66\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x63\x72\x65\x61\x74\x65\x42\x6C\x69\x6E\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x5B\x62\x6C\x69\x6E\x64\x20\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x62\x6C\x69\x6E\x64\x20\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x41\x74\x74\x65\x6E\x64\x65\x64","\x5B\x61\x74\x74\x65\x6E\x64\x65\x64\x20\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64\x20\x65\x72\x72\x6F\x72\x3A\x20","\x5B\x61\x74\x74\x65\x6E\x64\x65\x64\x20\x74\x72\x61\x6E\x66\x65\x72\x5D\x20\x63\x72\x65\x61\x74\x65\x64","\x72\x65\x73\x75\x6C\x74","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x68\x61\x6E\x6E\x65\x6C","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x73\x65\x63\x6F\x6E\x64\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x68\x61\x6E\x6E\x65\x6C","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x75\x6D","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x63\x6F\x6E\x74\x65\x78\x74","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x65\x78\x74\x65\x6E","\x74\x72\x61\x6E\x73\x66\x65\x72\x74\x61\x72\x67\x65\x74\x6C\x69\x6E\x6B\x65\x64\x69\x64","\x69\x73\x65\x78\x74\x65\x72\x6E\x61\x6C","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x63\x6F\x6E\x74\x65\x78\x74","\x6F\x72\x69\x67\x74\x72\x61\x6E\x73\x66\x65\x72\x65\x72\x65\x78\x74\x65\x6E","\x61\x74\x74\x65\x6E\x64\x65\x64","\x65\x78\x70\x6F\x72\x74\x73"];var moment=require(_0xe70f[0]);var ReportCallTransfer=require(_0xe70f[2])[_0xe70f[1]];function Transfer(){console[_0xe70f[4]](_0xe70f[3])}Transfer[_0xe70f[6]][_0xe70f[5]]= function(_0x889cx4){return ReportCallTransfer[_0xe70f[12]](_0x889cx4,{raw:true})[_0xe70f[11]](function(){console[_0xe70f[4]](_0xe70f[10])})[_0xe70f[9]](function(_0x889cx5){console[_0xe70f[8]](_0xe70f[7]+ _0x889cx5)})};Transfer[_0xe70f[6]][_0xe70f[13]]= function(_0x889cx4){return ReportCallTransfer[_0xe70f[12]]({result:_0x889cx4[_0xe70f[16]],transfererchannel:_0x889cx4[_0xe70f[17]],transferercalleridnum:_0x889cx4[_0xe70f[18]],transferercalleridname:_0x889cx4[_0xe70f[19]],transfererconnectedlinenum:_0x889cx4[_0xe70f[20]],transfererconnectedlinename:_0x889cx4[_0xe70f[21]],transfereraccountcode:_0x889cx4[_0xe70f[22]],transferercontext:_0x889cx4[_0xe70f[23]],transfererexten:_0x889cx4[_0xe70f[24]],transfererlinkedid:_0x889cx4[_0xe70f[25]],transfereechannel:_0x889cx4[_0xe70f[26]],transfereecalleridnum:_0x889cx4[_0xe70f[27]],transfereecalleridname:_0x889cx4[_0xe70f[28]],transfereeconnectedlinenum:_0x889cx4[_0xe70f[29]],transfereeconnectedlinename:_0x889cx4[_0xe70f[30]],transfereeaccountcode:_0x889cx4[_0xe70f[31]],transfereecontext:_0x889cx4[_0xe70f[32]],transfereeexten:_0x889cx4[_0xe70f[33]],transfereelinkedid:_0x889cx4[_0xe70f[34]],isexternal:_0x889cx4[_0xe70f[35]],context:_0x889cx4[_0xe70f[36]],extension:_0x889cx4[_0xe70f[37]],type:_0xe70f[38]})[_0xe70f[11]](function(){console[_0xe70f[4]](_0xe70f[15])})[_0xe70f[9]](function(_0x889cx5){console[_0xe70f[8]](_0xe70f[14]+ _0x889cx5)})};module[_0xe70f[39]]= Transfer \ No newline at end of file diff --git a/server/config/ami/trunk.js b/server/config/ami/trunk.js index f3b86d8..636bc36 100644 --- a/server/config/ami/trunk.js +++ b/server/config/ami/trunk.js @@ -1,182 +1 @@ -'use strict'; - -var TrunkModel = require('../../models').Trunk; - -var fs = require('fs'); -var util = require('util'); -var path = require('path'); -var config = require('../../config/environment'); -var _ = require('lodash'); - -function Trunk(ami) { - console.log('Trunk Initialization...'); - - TrunkModel.afterCreate(function(doc) { - if (doc.active) { - trunksRewrite(doc, ami, false); - } - }); - - TrunkModel.afterUpdate(function(doc) { - if (doc.active && !doc.changed('status') && !doc.changed('peerstatus')) { - trunksRewrite(doc, ami, false); - } - }); - - TrunkModel.afterDestroy(function(doc) { - trunksRewrite(doc, ami, true); - }); -} - -Trunk.prototype.statusUpdate = function(evt) { - return TrunkModel - .update({ - status: evt.status - }, { - where: { - defaultuser: evt.username, - host: evt.domain, - active: true, - $and: [{ - registry: { - $ne: '' - } - }, { - registry: { - $ne: null - } - }] - }, - individualHooks: true, - raw: true - }) - .catch(function(err) { - console.log('Trunk status update error:', err); - }); -} - -Trunk.prototype.peerstatusUpdate = function(evt) { - return TrunkModel - .update({ - peerstatus: evt.peerstatus - }, { - where: { - name: evt.peer.split('/')[1], - }, - individualHooks: true, - raw: true - }) - .catch(function(err) { - console.log('Trunk peerstatus update error:', err); - }); -} - -function trunksRewrite(doc, ami, deleteTrunk) { - var trunksFile = ''; - var trunksRegistersFile = ''; - var registryString = 'register => %s\n'; - if (!deleteTrunk && doc.active) { - var newTrunk = _.clone(doc.dataValues); - delete newTrunk.createdAt; - delete newTrunk.updatedAt; - delete newTrunk.active; - delete newTrunk.status; - trunksFile += util.format('[%s]\n', newTrunk.name); - if (newTrunk.otherFields) { - trunksFile += util.format('%s\n', newTrunk.otherFields); - delete newTrunk.otherFields; - } - for (var key in newTrunk) { - if (newTrunk[key]) { - switch (key) { - case 'allow': - var codecs = newTrunk[key].split(';'); - codecs.forEach(function(elem) { - trunksFile += util.format('%s=%s\n', key, elem); - }); - break; - default: - trunksFile += util.format('%s=%s\n', key, newTrunk[key]); - } - } - } - if (newTrunk.registry) { - trunksRegistersFile += util.format(registryString, newTrunk.registry); - } - } - return TrunkModel - .findAll({ - where: { - name: { - $ne: doc.name, - }, - active: true - } - }) - .then(function(trunks) { - var oldTrunks = _.map(trunks, 'dataValues'); - oldTrunks.forEach(function(element) { - delete element.createdAt; - delete element.updatedAt; - delete element.active; - delete element.status; - trunksFile += util.format('[%s]\n', element.name); - if (element.otherFields) { - trunksFile += util.format('%s\n', element.otherFields); - delete element.otherFields; - } - for (var key in element) { - if (element[key]) { - switch (key) { - case 'allow': - var codecs = element[key].split(';'); - codecs.forEach(function(elem) { - trunksFile += util.format('%s=%s\n', key, elem); - }) - break; - default: - trunksFile += util.format('%s=%s\n', key, element[key]); - } - } - } - if (element.registry) { - trunksRegistersFile += util.format(registryString, element.registry); - } - }); - fs.writeFile(path.join(config.asteriskConf, 'sip_xcally_trunks.conf'), trunksFile, { - flags: 'w', - mode: parseInt('0777', 8) - }, function(err) { - if (err) throw err; - console.log("Trunks file saved!"); - fs.writeFile(path.join(config.asteriskConf, 'sip_xcally_registers.conf'), trunksRegistersFile, { - flags: 'w', - mode: parseInt('0777', 8) - }, function(err) { - if (err) throw err; - reload(ami); - console.log("Trunks register file saved!"); - }); - }); - - - }) - .catch(function(err) { - console.log(err); - }); -} - -function reload(ami) { - ami.action({ - Action: 'Reload' - }, function(err, res) { - if (err) { - console.error(err); - } else { - console.log(res); - } - }); -} - - -module.exports = Trunk; +var _0x3592=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x54\x72\x75\x6E\x6B","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x72\x75\x6E\x6B\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x63\x74\x69\x76\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x73\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x54\x72\x75\x6E\x6B\x20\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A","\x63\x61\x74\x63\x68","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x64\x6F\x6D\x61\x69\x6E","","\x75\x70\x64\x61\x74\x65","\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x54\x72\x75\x6E\x6B\x20\x70\x65\x65\x72\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A","\x2F","\x73\x70\x6C\x69\x74","\x70\x65\x65\x72","\x72\x65\x67\x69\x73\x74\x65\x72\x20\x3D\x3E\x20\x25\x73\x0A","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x63\x6C\x6F\x6E\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x75\x70\x64\x61\x74\x65\x64\x41\x74","\x5B\x25\x73\x5D\x0A","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x6F\x74\x68\x65\x72\x46\x69\x65\x6C\x64\x73","\x25\x73\x0A","\x3B","\x25\x73\x3D\x25\x73\x0A","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C\x6F\x77","\x72\x65\x67\x69\x73\x74\x72\x79","\x6D\x61\x70","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x74\x72\x75\x6E\x6B\x73\x2E\x63\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x54\x72\x75\x6E\x6B\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x73\x69\x70\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x72\x65\x67\x69\x73\x74\x65\x72\x73\x2E\x63\x6F\x6E\x66","\x54\x72\x75\x6E\x6B\x73\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73"];_0x3592[0];var TrunkModel=require(_0x3592[2])[_0x3592[1]];var fs=require(_0x3592[3]);var util=require(_0x3592[4]);var path=require(_0x3592[5]);var config=require(_0x3592[6]);var _=require(_0x3592[7]);function Trunk(_0xc065x8){console[_0x3592[9]](_0x3592[8]);TrunkModel[_0x3592[11]](function(_0xc065x9){if(_0xc065x9[_0x3592[10]]){trunksRewrite(_0xc065x9,_0xc065x8,false)}});TrunkModel[_0x3592[15]](function(_0xc065x9){if(_0xc065x9[_0x3592[10]]&& !_0xc065x9[_0x3592[13]](_0x3592[12])&& !_0xc065x9[_0x3592[13]](_0x3592[14])){trunksRewrite(_0xc065x9,_0xc065x8,false)}});TrunkModel[_0x3592[16]](function(_0xc065x9){trunksRewrite(_0xc065x9,_0xc065x8,true)})}Trunk[_0x3592[18]][_0x3592[17]]= function(_0xc065xa){return TrunkModel[_0x3592[24]]({status:_0xc065xa[_0x3592[12]]},{where:{defaultuser:_0xc065xa[_0x3592[21]],host:_0xc065xa[_0x3592[22]],active:true,$and:[{registry:{$ne:_0x3592[23]}},{registry:{$ne:null}}]},individualHooks:true,raw:true})[_0x3592[20]](function(_0xc065xb){console[_0x3592[9]](_0x3592[19],_0xc065xb)})};Trunk[_0x3592[18]][_0x3592[25]]= function(_0xc065xa){return TrunkModel[_0x3592[24]]({peerstatus:_0xc065xa[_0x3592[14]]},{where:{name:_0xc065xa[_0x3592[29]][_0x3592[28]](_0x3592[27])[1]},individualHooks:true,raw:true})[_0x3592[20]](function(_0xc065xb){console[_0x3592[9]](_0x3592[26],_0xc065xb)})};function trunksRewrite(_0xc065x9,_0xc065x8,_0xc065xd){var _0xc065xe=_0x3592[23];var _0xc065xf=_0x3592[23];var _0xc065x10=_0x3592[30];if(!_0xc065xd&& _0xc065x9[_0x3592[10]]){var _0xc065x11=_[_0x3592[32]](_0xc065x9[_0x3592[31]]);delete _0xc065x11[_0x3592[33]];delete _0xc065x11[_0x3592[34]];delete _0xc065x11[_0x3592[10]];delete _0xc065x11[_0x3592[12]];_0xc065xe+= util[_0x3592[37]](_0x3592[35],_0xc065x11[_0x3592[36]]);if(_0xc065x11[_0x3592[38]]){_0xc065xe+= util[_0x3592[37]](_0x3592[39],_0xc065x11[_0x3592[38]]);delete _0xc065x11[_0x3592[38]]};for(var _0xc065x12 in _0xc065x11){if(_0xc065x11[_0xc065x12]){switch(_0xc065x12){case _0x3592[43]:var _0xc065x13=_0xc065x11[_0xc065x12][_0x3592[28]](_0x3592[40]);_0xc065x13[_0x3592[42]](function(_0xc065x14){_0xc065xe+= util[_0x3592[37]](_0x3592[41],_0xc065x12,_0xc065x14)});break;default:_0xc065xe+= util[_0x3592[37]](_0x3592[41],_0xc065x12,_0xc065x11[_0xc065x12])}}};if(_0xc065x11[_0x3592[44]]){_0xc065xf+= util[_0x3592[37]](_0xc065x10,_0xc065x11[_0x3592[44]])}};return TrunkModel[_0x3592[56]]({where:{name:{$ne:_0xc065x9[_0x3592[36]]},active:true}})[_0x3592[55]](function(_0xc065x15){var _0xc065x16=_[_0x3592[45]](_0xc065x15,_0x3592[31]);_0xc065x16[_0x3592[42]](function(_0xc065x17){delete _0xc065x17[_0x3592[33]];delete _0xc065x17[_0x3592[34]];delete _0xc065x17[_0x3592[10]];delete _0xc065x17[_0x3592[12]];_0xc065xe+= util[_0x3592[37]](_0x3592[35],_0xc065x17[_0x3592[36]]);if(_0xc065x17[_0x3592[38]]){_0xc065xe+= util[_0x3592[37]](_0x3592[39],_0xc065x17[_0x3592[38]]);delete _0xc065x17[_0x3592[38]]};for(var _0xc065x12 in _0xc065x17){if(_0xc065x17[_0xc065x12]){switch(_0xc065x12){case _0x3592[43]:var _0xc065x13=_0xc065x17[_0xc065x12][_0x3592[28]](_0x3592[40]);_0xc065x13[_0x3592[42]](function(_0xc065x14){_0xc065xe+= util[_0x3592[37]](_0x3592[41],_0xc065x12,_0xc065x14)});break;default:_0xc065xe+= util[_0x3592[37]](_0x3592[41],_0xc065x12,_0xc065x17[_0xc065x12])}}};if(_0xc065x17[_0x3592[44]]){_0xc065xf+= util[_0x3592[37]](_0xc065x10,_0xc065x17[_0x3592[44]])}});fs[_0x3592[54]](path[_0x3592[48]](config[_0x3592[46]],_0x3592[47]),_0xc065xe,{flags:_0x3592[49],mode:parseInt(_0x3592[50],8)},function(_0xc065xb){if(_0xc065xb){throw _0xc065xb};console[_0x3592[9]](_0x3592[51]);fs[_0x3592[54]](path[_0x3592[48]](config[_0x3592[46]],_0x3592[52]),_0xc065xf,{flags:_0x3592[49],mode:parseInt(_0x3592[50],8)},function(_0xc065xb){if(_0xc065xb){throw _0xc065xb};reload(_0xc065x8);console[_0x3592[9]](_0x3592[53])})})})[_0x3592[20]](function(_0xc065xb){console[_0x3592[9]](_0xc065xb)})}function reload(_0xc065x8){_0xc065x8[_0x3592[59]]({Action:_0x3592[57]},function(_0xc065xb,_0xc065x19){if(_0xc065xb){console[_0x3592[58]](_0xc065xb)}else {console[_0x3592[9]](_0xc065x19)}})}module[_0x3592[60]]= Trunk \ No newline at end of file diff --git a/server/config/ami/user.js b/server/config/ami/user.js index 36fa80b..c2bca66 100644 --- a/server/config/ami/user.js +++ b/server/config/ami/user.js @@ -1,77 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); -const UserModel = require('../../models').User; - -function User() { - console.log('QueueMember Initialization...'); -} - -User.prototype.stateUpdate = function(evt) { - var obj = { - status: evt.state, - statusAt: moment().format("YYYY-MM-DD HH:mm:ss") - } - var condition = { - name: evt.device.replace('SIP/', '') - }; - return findAndUpdate(obj, condition); -} - -User.prototype.queueStatusUpdate = function(status, evt) { - var obj = { - queueStatus: status, - queueStatusAt: moment().format("YYYY-MM-DD HH:mm:ss"), - lastQueue: evt.queue - }; - var condition = (evt.event === 'QueueCallerAbandon') ? { - lastQueue: evt.queue - } : { - name: evt.membername - }; - findAndUpdate(obj, condition); - if (status === 'connect') { - findAndUpdate({ - queueStatus: 'complete', - queueStatusAt: moment().format("YYYY-MM-DD HH:mm:ss") - }, { - lastQueue: evt.queue, - name: { - $ne: evt.membername - } - }) - } -} - -function findAndUpdate(obj, condition) { - return UserModel - .findOne({ - where: condition - }) - .then(function(user) { - if (user) { - return user - .update(obj); - } - }) - .then(function(data) { - console.log('[user] status update'); - }) - .catch(function(err) { - console.error('[user] status update error: ' + err); - }); -} - -UserModel.afterCreate(function(doc, options) { - doc.dataValues.evt = 'UserModel.afterCreate'; - process.send(doc.dataValues); -}); - -UserModel.afterUpdate(function(doc, options) { - doc.dataValues.evt = 'UserModel.afterUpdate'; - doc.dataValues.changed = _.keyBy(doc.changed()); - process.send(doc.dataValues); -}); - -module.exports = User; +var _0x1742=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x51\x75\x65\x75\x65\x4D\x65\x6D\x62\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x73\x74\x61\x74\x65\x55\x70\x64\x61\x74\x65","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x73\x74\x61\x74\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x53\x49\x50\x2F","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x65\x76\x69\x63\x65","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73\x55\x70\x64\x61\x74\x65","\x71\x75\x65\x75\x65","\x65\x76\x65\x6E\x74","\x51\x75\x65\x75\x65\x43\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x5B\x75\x73\x65\x72\x5D\x20\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65\x20\x65\x72\x72\x6F\x72\x3A\x20","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x5B\x75\x73\x65\x72\x5D\x20\x73\x74\x61\x74\x75\x73\x20\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x65\x76\x74","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x55\x73\x65\x72\x4D\x6F\x64\x65\x6C\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72\x4D\x6F\x64\x65\x6C\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6B\x65\x79\x42\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x1742[0];const _=require(_0x1742[1]);const moment=require(_0x1742[2]);const UserModel=require(_0x1742[4])[_0x1742[3]];function User(){console[_0x1742[6]](_0x1742[5])}User[_0x1742[8]][_0x1742[7]]= function(_0x74e9x5){var _0x74e9x6={status:_0x74e9x5[_0x1742[9]],statusAt:moment()[_0x1742[11]](_0x1742[10])};var _0x74e9x7={name:_0x74e9x5[_0x1742[15]][_0x1742[14]](_0x1742[12],_0x1742[13])};return findAndUpdate(_0x74e9x6,_0x74e9x7)};User[_0x1742[8]][_0x1742[16]]= function(_0x74e9x8,_0x74e9x5){var _0x74e9x6={queueStatus:_0x74e9x8,queueStatusAt:moment()[_0x1742[11]](_0x1742[10]),lastQueue:_0x74e9x5[_0x1742[17]]};var _0x74e9x7=(_0x74e9x5[_0x1742[18]]=== _0x1742[19])?{lastQueue:_0x74e9x5[_0x1742[17]]}:{name:_0x74e9x5[_0x1742[20]]};findAndUpdate(_0x74e9x6,_0x74e9x7);if(_0x74e9x8=== _0x1742[21]){findAndUpdate({queueStatus:_0x1742[22],queueStatusAt:moment()[_0x1742[11]](_0x1742[10])},{lastQueue:_0x74e9x5[_0x1742[17]],name:{$ne:_0x74e9x5[_0x1742[20]]}})}};function findAndUpdate(_0x74e9x6,_0x74e9x7){return UserModel[_0x1742[29]]({where:_0x74e9x7})[_0x1742[27]](function(_0x74e9xc){if(_0x74e9xc){return _0x74e9xc[_0x1742[28]](_0x74e9x6)}})[_0x1742[27]](function(_0x74e9xb){console[_0x1742[6]](_0x1742[26])})[_0x1742[25]](function(_0x74e9xa){console[_0x1742[24]](_0x1742[23]+ _0x74e9xa)})}UserModel[_0x1742[34]](function(_0x74e9xd,_0x74e9xe){_0x74e9xd[_0x1742[31]][_0x1742[30]]= _0x1742[32];process[_0x1742[33]](_0x74e9xd[_0x1742[31]])});UserModel[_0x1742[38]](function(_0x74e9xd,_0x74e9xe){_0x74e9xd[_0x1742[31]][_0x1742[30]]= _0x1742[35];_0x74e9xd[_0x1742[31]][_0x1742[36]]= _[_0x1742[37]](_0x74e9xd[_0x1742[36]]());process[_0x1742[33]](_0x74e9xd[_0x1742[31]])});module[_0x1742[39]]= User \ No newline at end of file diff --git a/server/config/ami/voice_context.js b/server/config/ami/voice_context.js index d5db720..c8392be 100644 --- a/server/config/ami/voice_context.js +++ b/server/config/ami/voice_context.js @@ -1,106 +1 @@ -'use strict'; - -var VoiceContext = require('../../models').VoiceContext; -var VoiceExtension = require('../../models').VoiceExtension; -var fs = require('fs'); -var util = require('util'); -var path = require('path'); -var config = require('../../config/environment'); - -function Context(ami) { - - // emitter.on('VoiceContext.beforeUpdate', function(doc, options) { - // if (doc.changed('name')) { - // throw new Error("You can't modify a context name"); - // } - // if (doc.defaultEntry) { - // throw new Error("You can't modify a default context"); - // } - // }); - // - // emitter.on('VoiceContext.beforeDelete', function(doc, options) { - // if (doc.defaultEntry) { - // throw new Error("You can't delete a default context"); - // } - // }); - // - // emitter.on('VoiceContext.afterCreate', function(doc, options) { - // rewriteContexts(doc, ami, false); - // createHangup(doc); - // }); - // - // emitter.on('VoiceContext.afterDelete', function(doc, options) { - // rewriteContexts(doc, ami, true); - // }); -} - -function rewriteContexts(doc, ami, deleteContext) { - var contextValues = ''; - if (!deleteContext) { - contextValues = util.format('[%s]\ninclude => %s-custom\nswitch => Realtime\n', doc.name, doc.name); - } - VoiceContext - .findAll({ - where: { - id: { - $ne: doc.id - } - } - }) - .then(function(contexts) { - contexts.forEach(function(element) { - contextValues += util.format('[%s]\ninclude => %s-custom\nswitch => Realtime\n', element.name, element.name); - }); - fs.writeFile(path.join(config.asteriskConf, 'extensions_xcally_contexts.conf'), contextValues, { - flags: 'w', - mode: parseInt('0777', 8) - }, function(err) { - if (err) throw err; - console.log("Contexts file saved!"); - ami.action({ - Action: 'Reload', - }, function(err, res) { - if (err) { - console.error(err); - } else { - console.log(res); - } - }); - }); - }) - .catch(function(err) { - console.log(err); - }); -} - -function createHangup(doc) { - console.log('create context hangup', doc.name); - var data = [{ - context: doc.name, - exten: 'h', - priority: '1', - VoiceContextId: doc.id, - type: 'system', - app: 'Hangup' - }, { - context: doc.name, - exten: 'failed', - priority: '1', - VoiceContextId: doc.id, - type: 'system', - app: 'Hangup' - }]; - - return VoiceExtension - .bulkCreate(data, { - raw: true - }) - .then(function() { - console.log('hangup extension created'); - }) - .catch(function(err) { - console.log(err); - }); -} - -module.exports = Context; +var _0x9ba8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","","\x5B\x25\x73\x5D\x0A\x69\x6E\x63\x6C\x75\x64\x65\x20\x3D\x3E\x20\x25\x73\x2D\x63\x75\x73\x74\x6F\x6D\x0A\x73\x77\x69\x74\x63\x68\x20\x3D\x3E\x20\x52\x65\x61\x6C\x74\x69\x6D\x65\x0A","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x73\x74\x65\x72\x69\x73\x6B\x43\x6F\x6E\x66","\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x5F\x78\x63\x61\x6C\x6C\x79\x5F\x63\x6F\x6E\x74\x65\x78\x74\x73\x2E\x63\x6F\x6E\x66","\x6A\x6F\x69\x6E","\x77","\x30\x37\x37\x37","\x43\x6F\x6E\x74\x65\x78\x74\x73\x20\x66\x69\x6C\x65\x20\x73\x61\x76\x65\x64\x21","\x52\x65\x6C\x6F\x61\x64","\x65\x72\x72\x6F\x72","\x61\x63\x74\x69\x6F\x6E","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x63\x72\x65\x61\x74\x65\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x68\x61\x6E\x67\x75\x70","\x68","\x31","\x73\x79\x73\x74\x65\x6D","\x48\x61\x6E\x67\x75\x70","\x66\x61\x69\x6C\x65\x64","\x68\x61\x6E\x67\x75\x70\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65\x64","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x9ba8[0];var VoiceContext=require(_0x9ba8[2])[_0x9ba8[1]];var VoiceExtension=require(_0x9ba8[2])[_0x9ba8[3]];var fs=require(_0x9ba8[4]);var util=require(_0x9ba8[5]);var path=require(_0x9ba8[6]);var config=require(_0x9ba8[7]);function Context(_0xe46ex8){}function rewriteContexts(_0xe46exa,_0xe46ex8,_0xe46exb){var _0xe46exc=_0x9ba8[8];if(!_0xe46exb){_0xe46exc= util[_0x9ba8[11]](_0x9ba8[9],_0xe46exa[_0x9ba8[10]],_0xe46exa[_0x9ba8[10]])};VoiceContext[_0x9ba8[27]]({where:{id:{$ne:_0xe46exa[_0x9ba8[26]]}}})[_0x9ba8[25]](function(_0xe46exe){_0xe46exe[_0x9ba8[14]](function(_0xe46exf){_0xe46exc+= util[_0x9ba8[11]](_0x9ba8[9],_0xe46exf[_0x9ba8[10]],_0xe46exf[_0x9ba8[10]])});fs[_0x9ba8[24]](path[_0x9ba8[17]](config[_0x9ba8[15]],_0x9ba8[16]),_0xe46exc,{flags:_0x9ba8[18],mode:parseInt(_0x9ba8[19],8)},function(_0xe46exd){if(_0xe46exd){throw _0xe46exd};console[_0x9ba8[12]](_0x9ba8[20]);_0xe46ex8[_0x9ba8[23]]({Action:_0x9ba8[21]},function(_0xe46exd,_0xe46ex10){if(_0xe46exd){console[_0x9ba8[22]](_0xe46exd)}else {console[_0x9ba8[12]](_0xe46ex10)}})})})[_0x9ba8[13]](function(_0xe46exd){console[_0x9ba8[12]](_0xe46exd)})}function createHangup(_0xe46exa){console[_0x9ba8[12]](_0x9ba8[28],_0xe46exa[_0x9ba8[10]]);var _0xe46ex12=[{context:_0xe46exa[_0x9ba8[10]],exten:_0x9ba8[29],priority:_0x9ba8[30],VoiceContextId:_0xe46exa[_0x9ba8[26]],type:_0x9ba8[31],app:_0x9ba8[32]},{context:_0xe46exa[_0x9ba8[10]],exten:_0x9ba8[33],priority:_0x9ba8[30],VoiceContextId:_0xe46exa[_0x9ba8[26]],type:_0x9ba8[31],app:_0x9ba8[32]}];return VoiceExtension[_0x9ba8[35]](_0xe46ex12,{raw:true})[_0x9ba8[25]](function(){console[_0x9ba8[12]](_0x9ba8[34])})[_0x9ba8[13]](function(_0xe46exd){console[_0x9ba8[12]](_0xe46exd)})}module[_0x9ba8[36]]= Context \ No newline at end of file diff --git a/server/config/analytics.js b/server/config/analytics.js index e69de29..3c7503d 100644 --- a/server/config/analytics.js +++ b/server/config/analytics.js @@ -0,0 +1 @@ +var _0xc13e=[] \ No newline at end of file diff --git a/server/config/autodialer/index.js b/server/config/autodialer/index.js index a47295f..c8aa17c 100644 --- a/server/config/autodialer/index.js +++ b/server/config/autodialer/index.js @@ -1,125 +1 @@ -'use strict'; -var util = require('util'); -var Process = require('./process'); - -module.exports = function(ami) { - - console.log('Autodialer Starting...'); - var proc = new Process(); - - proc.getProcesses(function(res, err) { - if(err) - { - console.log(err); - return; - } - // console.log(res.Contacts); - // if (util.isArray(res.Contacts)) - // { - // var contact = res.Contacts; - // console.log(contact); - // } - // else - // { - // var contacts = res.Contacts; - // if (contacts.length) - // { - // contacts.forEach(function(contact) { - // console.log(contact); - // }) - // } - // } - - - - }); - -} - -// var _ = require('lodash'); -// -// var agents = ['SIP/massimiliano.bungaro', 'SIP/daniele.cinti']; -// var channels = []; -// var peers = []; -// var contacts = ['600', '600', '600']; -// -// var ami; -// -// function coreshow() { -// channels = []; -// if (contacts.length > 0) { -// ami.action({ -// action: 'CoreShowChannels' -// }, function(err, res) { -// if (err) { -// console.log(err); -// } -// console.log(res); -// }); -// } -// -// } -// -// function peerstatus() { -// peers = []; -// if (contacts.length > 0) { -// ami.action({ -// action: 'SIPpeerstatus' -// }, function(err, res) { -// if (err) { -// console.log(err); -// } -// console.log(res); -// }) -// } -// } -// -// module.exports = function(asterisk_manager) { -// -// ami = asterisk_manager; -// -// peerstatus(); -// -// ami.on('peerstatus', function(evt) { -// if (evt.peerstatus == 'Reachable') { -// peers.push(evt.peer); -// } -// }); -// -// ami.on('coreshowchannel', function(evt) { -// channels.push(evt.channel.split('-')[0]); -// }); -// -// ami.on('sippeerstatuscomplete', function(evt) { -// coreshow(); -// }); -// -// ami.on('coreshowchannelscomplete', function(evt) { -// console.log('Agents registered ', peers); -// console.log('Agents in call ', channels); -// -// -// var agent = _.find(agents, function(agent) { -// return !_.includes(channels, agent); -// }); -// -// if (agent) { -// if (_.includes(peers, agent)) { -// ami.action({ -// action: 'originate', -// channel: agent, -// exten: contacts.pop(), -// context: 'demo', -// priority: 1, -// async: true -// }, function(err, res) { -// if (err) { -// console.log(err); -// } -// console.log(res); -// }); -// } -// } -// peerstatus(); -// }); -// }; +var _0xf549=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x2E\x2F\x70\x72\x6F\x63\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73","\x41\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x20\x53\x74\x61\x72\x74\x69\x6E\x67\x2E\x2E\x2E","\x6C\x6F\x67","\x67\x65\x74\x50\x72\x6F\x63\x65\x73\x73\x65\x73"];_0xf549[0];var util=require(_0xf549[1]);var Process=require(_0xf549[2]);module[_0xf549[3]]= function(_0x767fx3){console[_0xf549[5]](_0xf549[4]);var _0x767fx4= new Process();_0x767fx4[_0xf549[6]](function(_0x767fx5,_0x767fx6){if(_0x767fx6){console[_0xf549[5]](_0x767fx6);return}})} \ No newline at end of file diff --git a/server/config/autodialer/process.js b/server/config/autodialer/process.js index 7974168..6075609 100644 --- a/server/config/autodialer/process.js +++ b/server/config/autodialer/process.js @@ -1,26 +1 @@ -var AutodialerProcess = require('../../models').AutodialerProcess; -var Contact = require('../../models').Contact; - -function Process() { - console.log('Process Initialization...'); -} - -Process.prototype.getProcesses = function(callback) { - - AutodialerProcess - .findAll({ - where: { - enable: true - }, - include: [Contact] - }) - .then(function(res) { - callback(res); - }) - .catch(function(err) { - callback(null, err); - }); - -} - -module.exports = Process; +var _0x2824=["\x41\x75\x74\x6F\x64\x69\x61\x6C\x65\x72\x50\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74","\x50\x72\x6F\x63\x65\x73\x73\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x67\x65\x74\x50\x72\x6F\x63\x65\x73\x73\x65\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x65\x78\x70\x6F\x72\x74\x73"];var AutodialerProcess=require(_0x2824[1])[_0x2824[0]];var Contact=require(_0x2824[1])[_0x2824[2]];function Process(){console[_0x2824[4]](_0x2824[3])}Process[_0x2824[6]][_0x2824[5]]= function(_0x9267x4){AutodialerProcess[_0x2824[9]]({where:{enable:true},include:[Contact]})[_0x2824[8]](function(_0x9267x6){_0x9267x4(_0x9267x6)})[_0x2824[7]](function(_0x9267x5){_0x9267x4(null,_0x9267x5)})};module[_0x2824[10]]= Process \ No newline at end of file diff --git a/server/config/automations/chat.js b/server/config/automations/chat.js index a874ea6..0cd0853 100644 --- a/server/config/automations/chat.js +++ b/server/config/automations/chat.js @@ -1,190 +1 @@ -'use strict'; - -var _ = require('lodash'); -var moment = require('moment'); - -var Automation = require('../../models').Automation; -var ChatRoom = require('../../models').ChatRoom; -var activeChatAutomations = {}; - -function executeAutomation(id) { - console.log('[Automation] Executing Chat', id); - var _chatAutomation; - return Automation - .scope('all') - .findById(id) - .then(function(chatAutomation) { - _chatAutomation = chatAutomation; - - var $or = []; - var $and = []; - var query = { - where: {} - }; - - chatAutomation.All.forEach(function(condition) { - $and.push(getCondition(condition.dataValues)); - }); - chatAutomation.Any.forEach(function(condition) { - $or.push(getCondition(condition.dataValues)); - }); - - if ($and.length) { - query.where.$and = $and; - } - if ($or.length) { - query.where.$or = $or; - } - - return ChatRoom.findAll(query); - }) - .then(function(chats) { - chats.forEach(function(chat) { - _chatAutomation.Actions.forEach(function(action) { - switch (action.action) { - case 'status': - setStatus(chat.id, action.data1); - break; - default: - } - }); - }); - }) - .catch(function(err) { - console.error('[Automation] Error in Chat exec'); - console.error('[Automation] Message:', err.message); - console.error('[Automation] Stack:', err.stack); - }); -} - -function setStatus(ticketId, newStatus) { - return ChatRoom.update({ - status: newStatus, - }, { - where: { - id: ticketId - } - }) - .catch(function(err) { - console.error('[Automation] Error in Mail setStatus'); - console.error('[Automation] Message:', err.message); - console.error('[Automation] Stack:', err.stack); - }); -} - -function getCondition(condition) { - var result = {}; - switch (condition.field) { - case 'status': - switch (condition.operator) { - case 'equals': - result[condition.field] = condition.value; - break; - case 'not_equals': - result[condition.field] = { - $ne: condition.value - }; - break; - default: - } - break; - case 'createdAt': - var compareDate = moment().subtract(parseInt(condition.value, 10), 'hours').format("YYYY-MM-DD HH:mm:ss"); - switch (condition.operator) { - case 'greater': - result[condition.field] = { - lt: compareDate - }; - break; - case 'greater_or_equal': - result[condition.field] = { - $lte: compareDate - }; - break; - case 'less': - result[condition.field] = { - $gt: compareDate - }; - break; - case 'less_or_equal': - result[condition.field] = { - $gte: compareDate - }; - break; - default: - } - break; - default: - } - return result; -} - -function createInterval(chatAutomation) { - console.log('[Automation] Mail', chatAutomation.id, 'set with timeout', chatAutomation.timeout * 60 * 1000); - activeChatAutomations['interval' + chatAutomation.id] = setInterval(function() { - executeAutomation(chatAutomation.id); - }, chatAutomation.timeout * 60 * 1000); -} - -module.exports = function() { - - console.log('[Automation] Chat service started'); - - Automation.afterCreate(function(doc, options) { - if (doc.channel === 'chat') { - console.log('[Automation] Chat', doc.id, 'created, the status is', doc.status); - if (doc.status) { - createInterval(doc); - } - } - }); - - Automation.afterUpdate(function(doc, options) { - if (doc.channel === 'chat') { - console.log('[Automation] Chat', doc.id, 'updated, the status is', doc.status); - if (activeChatAutomations['interval' + doc.id]) { - console.log('[Automation] Chat unset ', doc.id); - clearInterval(activeChatAutomations['interval' + doc.id]); - delete activeChatAutomations['interval' + doc.id]; - } - if (doc.status) { - createInterval(doc); - } - } - }); - - Automation.afterDelete(function(doc, options) { - if (doc.channel === 'chat') { - console.log('[Automation] Chat', doc.id, ' deleted'); - if (activeChatAutomations['interval' + doc.id]) { - console.log('[Automation] Chat unset ', doc.id); - clearInterval(activeChatAutomations['interval' + doc.id]); - delete activeChatAutomations['interval' + doc.id]; - } - } - }); - - return Automation - .scope('all') - .findAll({ - where: { - status: true, - channel: 'chat' - }, - attributes: ['id', 'timeout'] - }) - .then(function(chatAutomations) { - - console.log('[Automation] Chat are', chatAutomations.length); - - chatAutomations.forEach(function(chatAutomation) { - createInterval(chatAutomation); - }); - - }) - .catch(function(err) { - console.error('[Automation] Error in Chat init'); - console.error('[Automation] Message:', err.message); - console.error('[Automation] Stack:', err.stack); - }); -}; +var _0x5ad2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x43\x68\x61\x74","\x6C\x6F\x67","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x43\x68\x61\x74\x20\x65\x78\x65\x63","\x65\x72\x72\x6F\x72","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x69\x64","\x64\x61\x74\x61\x31","\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x41\x63\x74\x69\x6F\x6E\x73","\x74\x68\x65\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x75\x73\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x24\x6F\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x6F\x75\x72\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x67\x72\x65\x61\x74\x65\x72","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C","\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x43\x68\x61\x74\x20\x73\x65\x72\x76\x69\x63\x65\x20\x73\x74\x61\x72\x74\x65\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x63\x68\x61\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x43\x68\x61\x74","\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x43\x68\x61\x74\x20\x75\x6E\x73\x65\x74\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x20\x64\x65\x6C\x65\x74\x65\x64","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x43\x68\x61\x74\x20\x69\x6E\x69\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x43\x68\x61\x74\x20\x61\x72\x65"];_0x5ad2[0];var _=require(_0x5ad2[1]);var moment=require(_0x5ad2[2]);var Automation=require(_0x5ad2[4])[_0x5ad2[3]];var ChatRoom=require(_0x5ad2[4])[_0x5ad2[5]];var activeChatAutomations={};function executeAutomation(_0x499ex7){console[_0x5ad2[7]](_0x5ad2[6],_0x499ex7);var _0x499ex8;return Automation[_0x5ad2[33]](_0x5ad2[32])[_0x5ad2[31]](_0x499ex7)[_0x5ad2[21]](function(_0x499exd){_0x499ex8= _0x499exd;var _0x499exe=[];var _0x499exf=[];var _0x499ex10={where:{}};_0x499exd[_0x5ad2[24]][_0x5ad2[19]](function(_0x499ex11){_0x499exf[_0x5ad2[23]](getCondition(_0x499ex11[_0x5ad2[22]]))});_0x499exd[_0x5ad2[25]][_0x5ad2[19]](function(_0x499ex11){_0x499exe[_0x5ad2[23]](getCondition(_0x499ex11[_0x5ad2[22]]))});if(_0x499exf[_0x5ad2[26]]){_0x499ex10[_0x5ad2[28]][_0x5ad2[27]]= _0x499exf};if(_0x499exe[_0x5ad2[26]]){_0x499ex10[_0x5ad2[28]][_0x5ad2[29]]= _0x499exe};return ChatRoom[_0x5ad2[30]](_0x499ex10)})[_0x5ad2[21]](function(_0x499exa){_0x499exa[_0x5ad2[19]](function(_0x499exb){_0x499ex8[_0x5ad2[20]][_0x5ad2[19]](function(_0x499exc){switch(_0x499exc[_0x5ad2[18]]){case _0x5ad2[17]:setStatus(_0x499exb[_0x5ad2[15]],_0x499exc[_0x5ad2[16]]);break;default:}})})})[_0x5ad2[14]](function(_0x499ex9){console[_0x5ad2[9]](_0x5ad2[8]);console[_0x5ad2[9]](_0x5ad2[10],_0x499ex9[_0x5ad2[11]]);console[_0x5ad2[9]](_0x5ad2[12],_0x499ex9[_0x5ad2[13]])})}function setStatus(_0x499ex13,_0x499ex14){return ChatRoom[_0x5ad2[35]]({status:_0x499ex14},{where:{id:_0x499ex13}})[_0x5ad2[14]](function(_0x499ex9){console[_0x5ad2[9]](_0x5ad2[34]);console[_0x5ad2[9]](_0x5ad2[10],_0x499ex9[_0x5ad2[11]]);console[_0x5ad2[9]](_0x5ad2[12],_0x499ex9[_0x5ad2[13]])})}function getCondition(_0x499ex11){var _0x499ex16={};switch(_0x499ex11[_0x5ad2[36]]){case _0x5ad2[17]:switch(_0x499ex11[_0x5ad2[40]]){case _0x5ad2[38]:_0x499ex16[_0x499ex11[_0x5ad2[36]]]= _0x499ex11[_0x5ad2[37]];break;case _0x5ad2[39]:_0x499ex16[_0x499ex11[_0x5ad2[36]]]= {$ne:_0x499ex11[_0x5ad2[37]]};break;default:};break;case _0x5ad2[49]:var _0x499ex17=moment()[_0x5ad2[44]](parseInt(_0x499ex11[_0x5ad2[37]],10),_0x5ad2[43])[_0x5ad2[42]](_0x5ad2[41]);switch(_0x499ex11[_0x5ad2[40]]){case _0x5ad2[45]:_0x499ex16[_0x499ex11[_0x5ad2[36]]]= {lt:_0x499ex17};break;case _0x5ad2[46]:_0x499ex16[_0x499ex11[_0x5ad2[36]]]= {$lte:_0x499ex17};break;case _0x5ad2[47]:_0x499ex16[_0x499ex11[_0x5ad2[36]]]= {$gt:_0x499ex17};break;case _0x5ad2[48]:_0x499ex16[_0x499ex11[_0x5ad2[36]]]= {$gte:_0x499ex17};break;default:};break;default:};return _0x499ex16}function createInterval(_0x499exd){console[_0x5ad2[7]](_0x5ad2[50],_0x499exd[_0x5ad2[15]],_0x5ad2[51],_0x499exd[_0x5ad2[52]]* 60* 1000);activeChatAutomations[_0x5ad2[53]+ _0x499exd[_0x5ad2[15]]]= setInterval(function(){executeAutomation(_0x499exd[_0x5ad2[15]])},_0x499exd[_0x5ad2[52]]* 60* 1000)}module[_0x5ad2[54]]= function(){console[_0x5ad2[7]](_0x5ad2[55]);Automation[_0x5ad2[60]](function(_0x499ex19,_0x499ex1a){if(_0x499ex19[_0x5ad2[56]]=== _0x5ad2[57]){console[_0x5ad2[7]](_0x5ad2[58],_0x499ex19[_0x5ad2[15]],_0x5ad2[59],_0x499ex19[_0x5ad2[17]]);if(_0x499ex19[_0x5ad2[17]]){createInterval(_0x499ex19)}}});Automation[_0x5ad2[63]](function(_0x499ex19,_0x499ex1a){if(_0x499ex19[_0x5ad2[56]]=== _0x5ad2[57]){console[_0x5ad2[7]](_0x5ad2[58],_0x499ex19[_0x5ad2[15]],_0x5ad2[61],_0x499ex19[_0x5ad2[17]]);if(activeChatAutomations[_0x5ad2[53]+ _0x499ex19[_0x5ad2[15]]]){console[_0x5ad2[7]](_0x5ad2[62],_0x499ex19[_0x5ad2[15]]);clearInterval(activeChatAutomations[_0x5ad2[53]+ _0x499ex19[_0x5ad2[15]]]);delete activeChatAutomations[_0x5ad2[53]+ _0x499ex19[_0x5ad2[15]]]};if(_0x499ex19[_0x5ad2[17]]){createInterval(_0x499ex19)}}});Automation[_0x5ad2[65]](function(_0x499ex19,_0x499ex1a){if(_0x499ex19[_0x5ad2[56]]=== _0x5ad2[57]){console[_0x5ad2[7]](_0x5ad2[58],_0x499ex19[_0x5ad2[15]],_0x5ad2[64]);if(activeChatAutomations[_0x5ad2[53]+ _0x499ex19[_0x5ad2[15]]]){console[_0x5ad2[7]](_0x5ad2[62],_0x499ex19[_0x5ad2[15]]);clearInterval(activeChatAutomations[_0x5ad2[53]+ _0x499ex19[_0x5ad2[15]]]);delete activeChatAutomations[_0x5ad2[53]+ _0x499ex19[_0x5ad2[15]]]}}});return Automation[_0x5ad2[33]](_0x5ad2[32])[_0x5ad2[30]]({where:{status:true,channel:_0x5ad2[57]},attributes:[_0x5ad2[15],_0x5ad2[52]]})[_0x5ad2[21]](function(_0x499ex1b){console[_0x5ad2[7]](_0x5ad2[67],_0x499ex1b[_0x5ad2[26]]);_0x499ex1b[_0x5ad2[19]](function(_0x499exd){createInterval(_0x499exd)})})[_0x5ad2[14]](function(_0x499ex9){console[_0x5ad2[9]](_0x5ad2[66]);console[_0x5ad2[9]](_0x5ad2[10],_0x499ex9[_0x5ad2[11]]);console[_0x5ad2[9]](_0x5ad2[12],_0x499ex9[_0x5ad2[13]])})} \ No newline at end of file diff --git a/server/config/automations/fax.js b/server/config/automations/fax.js index d69bba5..5e4f517 100644 --- a/server/config/automations/fax.js +++ b/server/config/automations/fax.js @@ -1,191 +1 @@ -'use strict'; - -var _ = require('lodash'); -var moment = require('moment'); - -var Automation = require('../../models').Automation; -var FaxRoom = require('../../models').FaxRoom; -var activeFaxAutomations = {}; - -function executeAutomation(id) { - console.log('[Automation] Executing Fax', id); - var _faxAutomation; - return Automation - .scope('all') - .findById(id) - .then(function(faxAutomation) { - _faxAutomation = faxAutomation; - - var $or = []; - var $and = []; - var query = { - where: {} - }; - - faxAutomation.All.forEach(function(condition) { - $and.push(getCondition(condition.dataValues)); - }); - faxAutomation.Any.forEach(function(condition) { - $or.push(getCondition(condition.dataValues)); - }); - - if ($and.length) { - query.where.$and = $and; - } - if ($or.length) { - query.where.$or = $or; - } - - return FaxRoom - .findAll(query); - }) - .then(function(faxes) { - faxes.forEach(function(fax) { - _faxAutomation.Actions.forEach(function(action) { - switch (action.action) { - case 'status': - setStatus(fax.id, action.data1); - break; - default: - } - }); - }); - }) - .catch(function(err) { - console.error('[Automation] Error in Fax exec'); - console.error('[Automation] Message:', err.message); - console.error('[Automation] Stack:', err.stack); - }); -} - -function setStatus(ticketId, newStatus) { - return FaxRoom.update({ - status: newStatus, - }, { - where: { - id: ticketId - } - }) - .catch(function(err) { - console.error('[Automation] Error in Fax setStatus'); - console.error('[Automation] Message:', err.message); - console.error('[Automation] Stack:', err.stack); - }); -} - -function getCondition(condition) { - var result = {}; - switch (condition.field) { - case 'status': - switch (condition.operator) { - case 'equals': - result[condition.field] = condition.value; - break; - case 'not_equals': - result[condition.field] = { - $ne: condition.value - }; - break; - default: - } - break; - case 'createdAt': - var compareDate = moment().subtract(parseInt(condition.value, 10), 'hours').format("YYYY-MM-DD HH:mm:ss"); - switch (condition.operator) { - case 'greater': - result[condition.field] = { - lt: compareDate - }; - break; - case 'greater_or_equal': - result[condition.field] = { - $lte: compareDate - }; - break; - case 'less': - result[condition.field] = { - $gt: compareDate - }; - break; - case 'less_or_equal': - result[condition.field] = { - $gte: compareDate - }; - break; - default: - } - break; - default: - } - return result; -} - -function createInterval(faxAutomation) { - console.log('[Automation] Mail', faxAutomation.id, 'set with timeout', faxAutomation.timeout * 60 * 1000); - activeFaxAutomations['interval' + faxAutomation.id] = setInterval(function() { - executeAutomation(faxAutomation.id); - }, faxAutomation.timeout * 60 * 1000); -} - -module.exports = function() { - - console.log('[Automation] Fax service started'); - - Automation.afterCreate(function(doc, options) { - if (doc.channel === 'fax') { - console.log('[Automation] Fax', doc.id, 'created, the status is', doc.status); - if (doc.status) { - createInterval(doc); - } - } - }); - - Automation.afterUpdate(function(doc, options) { - if (doc.channel === 'fax') { - console.log('[Automation] Fax', doc.id, 'updated, the status is', doc.status); - if (activeFaxAutomations['interval' + doc.id]) { - console.log('[Automation] Fax unset ', doc.id); - clearInterval(activeFaxAutomations['interval' + doc.id]); - delete activeFaxAutomations['interval' + doc.id]; - } - if (doc.status) { - createInterval(doc); - } - } - }); - - Automation.afterDelete(function(doc, options) { - if (doc.channel === 'fax') { - console.log('[Automation] Fax', doc.id, ' deleted'); - if (activeFaxAutomations['interval' + doc.id]) { - console.log('[Automation] Fax unset ', doc.id); - clearInterval(activeFaxAutomations['interval' + doc.id]); - delete activeFaxAutomations['interval' + doc.id]; - } - } - }); - - return Automation - .scope('all') - .findAll({ - where: { - status: true, - channel: 'fax' - }, - attributes: ['id', 'timeout'] - }) - .then(function(faxAutomations) { - - console.log('[Automation] Fax are', faxAutomations.length); - - faxAutomations.forEach(function(faxAutomation) { - createInterval(faxAutomation); - }); - - }) - .catch(function(err) { - console.error('[Automation] Error in Mail init'); - console.error('[Automation] Message:', err.message); - console.error('[Automation] Stack:', err.stack); - }); -}; +var _0xc279=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x46\x61\x78","\x6C\x6F\x67","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x46\x61\x78\x20\x65\x78\x65\x63","\x65\x72\x72\x6F\x72","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x69\x64","\x64\x61\x74\x61\x31","\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x41\x63\x74\x69\x6F\x6E\x73","\x74\x68\x65\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x75\x73\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x24\x6F\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x46\x61\x78\x20\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x6F\x75\x72\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x67\x72\x65\x61\x74\x65\x72","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C","\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78\x20\x73\x65\x72\x76\x69\x63\x65\x20\x73\x74\x61\x72\x74\x65\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x66\x61\x78","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78","\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78\x20\x75\x6E\x73\x65\x74\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x20\x64\x65\x6C\x65\x74\x65\x64","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x69\x6E\x69\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x46\x61\x78\x20\x61\x72\x65"];_0xc279[0];var _=require(_0xc279[1]);var moment=require(_0xc279[2]);var Automation=require(_0xc279[4])[_0xc279[3]];var FaxRoom=require(_0xc279[4])[_0xc279[5]];var activeFaxAutomations={};function executeAutomation(_0xe175x7){console[_0xc279[7]](_0xc279[6],_0xe175x7);var _0xe175x8;return Automation[_0xc279[33]](_0xc279[32])[_0xc279[31]](_0xe175x7)[_0xc279[21]](function(_0xe175xd){_0xe175x8= _0xe175xd;var _0xe175xe=[];var _0xe175xf=[];var _0xe175x10={where:{}};_0xe175xd[_0xc279[24]][_0xc279[19]](function(_0xe175x11){_0xe175xf[_0xc279[23]](getCondition(_0xe175x11[_0xc279[22]]))});_0xe175xd[_0xc279[25]][_0xc279[19]](function(_0xe175x11){_0xe175xe[_0xc279[23]](getCondition(_0xe175x11[_0xc279[22]]))});if(_0xe175xf[_0xc279[26]]){_0xe175x10[_0xc279[28]][_0xc279[27]]= _0xe175xf};if(_0xe175xe[_0xc279[26]]){_0xe175x10[_0xc279[28]][_0xc279[29]]= _0xe175xe};return FaxRoom[_0xc279[30]](_0xe175x10)})[_0xc279[21]](function(_0xe175xa){_0xe175xa[_0xc279[19]](function(_0xe175xb){_0xe175x8[_0xc279[20]][_0xc279[19]](function(_0xe175xc){switch(_0xe175xc[_0xc279[18]]){case _0xc279[17]:setStatus(_0xe175xb[_0xc279[15]],_0xe175xc[_0xc279[16]]);break;default:}})})})[_0xc279[14]](function(_0xe175x9){console[_0xc279[9]](_0xc279[8]);console[_0xc279[9]](_0xc279[10],_0xe175x9[_0xc279[11]]);console[_0xc279[9]](_0xc279[12],_0xe175x9[_0xc279[13]])})}function setStatus(_0xe175x13,_0xe175x14){return FaxRoom[_0xc279[35]]({status:_0xe175x14},{where:{id:_0xe175x13}})[_0xc279[14]](function(_0xe175x9){console[_0xc279[9]](_0xc279[34]);console[_0xc279[9]](_0xc279[10],_0xe175x9[_0xc279[11]]);console[_0xc279[9]](_0xc279[12],_0xe175x9[_0xc279[13]])})}function getCondition(_0xe175x11){var _0xe175x16={};switch(_0xe175x11[_0xc279[36]]){case _0xc279[17]:switch(_0xe175x11[_0xc279[40]]){case _0xc279[38]:_0xe175x16[_0xe175x11[_0xc279[36]]]= _0xe175x11[_0xc279[37]];break;case _0xc279[39]:_0xe175x16[_0xe175x11[_0xc279[36]]]= {$ne:_0xe175x11[_0xc279[37]]};break;default:};break;case _0xc279[49]:var _0xe175x17=moment()[_0xc279[44]](parseInt(_0xe175x11[_0xc279[37]],10),_0xc279[43])[_0xc279[42]](_0xc279[41]);switch(_0xe175x11[_0xc279[40]]){case _0xc279[45]:_0xe175x16[_0xe175x11[_0xc279[36]]]= {lt:_0xe175x17};break;case _0xc279[46]:_0xe175x16[_0xe175x11[_0xc279[36]]]= {$lte:_0xe175x17};break;case _0xc279[47]:_0xe175x16[_0xe175x11[_0xc279[36]]]= {$gt:_0xe175x17};break;case _0xc279[48]:_0xe175x16[_0xe175x11[_0xc279[36]]]= {$gte:_0xe175x17};break;default:};break;default:};return _0xe175x16}function createInterval(_0xe175xd){console[_0xc279[7]](_0xc279[50],_0xe175xd[_0xc279[15]],_0xc279[51],_0xe175xd[_0xc279[52]]* 60* 1000);activeFaxAutomations[_0xc279[53]+ _0xe175xd[_0xc279[15]]]= setInterval(function(){executeAutomation(_0xe175xd[_0xc279[15]])},_0xe175xd[_0xc279[52]]* 60* 1000)}module[_0xc279[54]]= function(){console[_0xc279[7]](_0xc279[55]);Automation[_0xc279[60]](function(_0xe175x19,_0xe175x1a){if(_0xe175x19[_0xc279[56]]=== _0xc279[57]){console[_0xc279[7]](_0xc279[58],_0xe175x19[_0xc279[15]],_0xc279[59],_0xe175x19[_0xc279[17]]);if(_0xe175x19[_0xc279[17]]){createInterval(_0xe175x19)}}});Automation[_0xc279[63]](function(_0xe175x19,_0xe175x1a){if(_0xe175x19[_0xc279[56]]=== _0xc279[57]){console[_0xc279[7]](_0xc279[58],_0xe175x19[_0xc279[15]],_0xc279[61],_0xe175x19[_0xc279[17]]);if(activeFaxAutomations[_0xc279[53]+ _0xe175x19[_0xc279[15]]]){console[_0xc279[7]](_0xc279[62],_0xe175x19[_0xc279[15]]);clearInterval(activeFaxAutomations[_0xc279[53]+ _0xe175x19[_0xc279[15]]]);delete activeFaxAutomations[_0xc279[53]+ _0xe175x19[_0xc279[15]]]};if(_0xe175x19[_0xc279[17]]){createInterval(_0xe175x19)}}});Automation[_0xc279[65]](function(_0xe175x19,_0xe175x1a){if(_0xe175x19[_0xc279[56]]=== _0xc279[57]){console[_0xc279[7]](_0xc279[58],_0xe175x19[_0xc279[15]],_0xc279[64]);if(activeFaxAutomations[_0xc279[53]+ _0xe175x19[_0xc279[15]]]){console[_0xc279[7]](_0xc279[62],_0xe175x19[_0xc279[15]]);clearInterval(activeFaxAutomations[_0xc279[53]+ _0xe175x19[_0xc279[15]]]);delete activeFaxAutomations[_0xc279[53]+ _0xe175x19[_0xc279[15]]]}}});return Automation[_0xc279[33]](_0xc279[32])[_0xc279[30]]({where:{status:true,channel:_0xc279[57]},attributes:[_0xc279[15],_0xc279[52]]})[_0xc279[21]](function(_0xe175x1b){console[_0xc279[7]](_0xc279[67],_0xe175x1b[_0xc279[26]]);_0xe175x1b[_0xc279[19]](function(_0xe175xd){createInterval(_0xe175xd)})})[_0xc279[14]](function(_0xe175x9){console[_0xc279[9]](_0xc279[66]);console[_0xc279[9]](_0xc279[10],_0xe175x9[_0xc279[11]]);console[_0xc279[9]](_0xc279[12],_0xe175x9[_0xc279[13]])})} \ No newline at end of file diff --git a/server/config/automations/mail.js b/server/config/automations/mail.js index ec240d2..0562307 100644 --- a/server/config/automations/mail.js +++ b/server/config/automations/mail.js @@ -1,191 +1 @@ -'use strict'; - -var _ = require('lodash'); -var moment = require('moment'); - -var Automation = require('../../models').Automation; -var MailRoom = require('../../models').MailRoom; -var activeMailAutomations = {}; - -function executeAutomation(id) { - console.log('[Automation] Executing Mail', id); - var _mailAutomation; - return Automation - .scope('all') - .findById(id) - .then(function(mailAutomation) { - _mailAutomation = mailAutomation; - - var $or = []; - var $and = []; - var query = { - where: {} - }; - - mailAutomation.All.forEach(function(condition) { - $and.push(getCondition(condition.dataValues)); - }); - mailAutomation.Any.forEach(function(condition) { - $or.push(getCondition(condition.dataValues)); - }); - - if ($and.length) { - query.where.$and = $and; - } - if ($or.length) { - query.where.$or = $or; - } - - return MailRoom - .findAll(query); - }) - .then(function(mails) { - mails.forEach(function(mail) { - _mailAutomation.Actions.forEach(function(action) { - switch (action.action) { - case 'status': - setStatus(mail.id, action.data1); - break; - default: - } - }); - }); - }) - .catch(function(err) { - console.error('[Automation] Error in Mail exec'); - console.error('[Automation] Message:', err.message); - console.error('[Automation] Stack:', err.stack); - }); -} - -function setStatus(ticketId, newStatus) { - return MailRoom.update({ - status: newStatus, - }, { - where: { - id: ticketId - } - }) - .catch(function(err) { - console.error('[Automation] Error in Mail setStatus'); - console.error('[Automation] Message:', err.message); - console.error('[Automation] Stack:', err.stack); - }); -} - -function getCondition(condition) { - var result = {}; - switch (condition.field) { - case 'status': - switch (condition.operator) { - case 'equals': - result[condition.field] = condition.value; - break; - case 'not_equals': - result[condition.field] = { - $ne: condition.value - }; - break; - default: - } - break; - case 'createdAt': - var compareDate = moment().subtract(parseInt(condition.value, 10), 'hours').format("YYYY-MM-DD HH:mm:ss"); - switch (condition.operator) { - case 'greater': - result[condition.field] = { - lt: compareDate - }; - break; - case 'greater_or_equal': - result[condition.field] = { - $lte: compareDate - }; - break; - case 'less': - result[condition.field] = { - $gt: compareDate - }; - break; - case 'less_or_equal': - result[condition.field] = { - $gte: compareDate - }; - break; - default: - } - break; - default: - } - return result; -} - -function createInterval(mailAutomation) { - console.log('[Automation] Mail', mailAutomation.id, 'set with timeout', mailAutomation.timeout * 60 * 1000); - activeMailAutomations['interval' + mailAutomation.id] = setInterval(function() { - executeAutomation(mailAutomation.id); - }, mailAutomation.timeout * 60 * 1000); -} - -module.exports = function() { - - console.log('[Automation] Mail service started'); - - Automation.afterCreate(function(doc, options) { - if (doc.channel === 'mail') { - console.log('[Automation] Mail', doc.id, 'created, the status is', doc.status); - if (doc.status) { - createInterval(doc); - } - } - }); - - Automation.afterUpdate(function(doc, options) { - if (doc.channel === 'mail') { - console.log('[Automation] Mail', doc.id, 'updated, the status is', doc.status); - if (activeMailAutomations['interval' + doc.id]) { - console.log('[Automation] Mail unset ', doc.id); - clearInterval(activeMailAutomations['interval' + doc.id]); - delete activeMailAutomations['interval' + doc.id]; - } - if (doc.status) { - createInterval(doc); - } - } - }); - - Automation.afterDestroy(function(doc, options) { - if (doc.channel === 'mail') { - console.log('[Automation] Mail', doc.id, ' deleted'); - if (activeMailAutomations['interval' + doc.id]) { - console.log('[Automation] Mail unset ', doc.id); - clearInterval(activeMailAutomations['interval' + doc.id]); - delete activeMailAutomations['interval' + doc.id]; - } - } - }); - - return Automation - .scope('all') - .findAll({ - where: { - status: true, - channel: 'mail' - }, - attributes: ['id', 'timeout'] - }) - .then(function(mailAutomations) { - - console.log('[Automation] Mail are', mailAutomations.length); - - mailAutomations.forEach(function(mailAutomation) { - createInterval(mailAutomation); - }); - - }) - .catch(function(err) { - console.error('[Automation] Error in Mail init'); - console.error('[Automation] Message:', err.message); - console.error('[Automation] Stack:', err.stack); - }); -}; +var _0xf6b9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x4D\x61\x69\x6C","\x6C\x6F\x67","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x65\x78\x65\x63","\x65\x72\x72\x6F\x72","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x63\x61\x74\x63\x68","\x69\x64","\x64\x61\x74\x61\x31","\x73\x74\x61\x74\x75\x73","\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x41\x63\x74\x69\x6F\x6E\x73","\x74\x68\x65\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x70\x75\x73\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x24\x6F\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x73\x65\x74\x53\x74\x61\x74\x75\x73","\x75\x70\x64\x61\x74\x65","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x68\x6F\x75\x72\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x67\x72\x65\x61\x74\x65\x72","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C","\x73\x65\x74\x20\x77\x69\x74\x68\x20\x74\x69\x6D\x65\x6F\x75\x74","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x73\x65\x72\x76\x69\x63\x65\x20\x73\x74\x61\x72\x74\x65\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x6D\x61\x69\x6C","\x63\x72\x65\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x64\x2C\x20\x74\x68\x65\x20\x73\x74\x61\x74\x75\x73\x20\x69\x73","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x75\x6E\x73\x65\x74\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x20\x64\x65\x6C\x65\x74\x65\x64","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x4D\x61\x69\x6C\x20\x69\x6E\x69\x74","\x5B\x41\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x5D\x20\x4D\x61\x69\x6C\x20\x61\x72\x65"];_0xf6b9[0];var _=require(_0xf6b9[1]);var moment=require(_0xf6b9[2]);var Automation=require(_0xf6b9[4])[_0xf6b9[3]];var MailRoom=require(_0xf6b9[4])[_0xf6b9[5]];var activeMailAutomations={};function executeAutomation(_0xce0dx7){console[_0xf6b9[7]](_0xf6b9[6],_0xce0dx7);var _0xce0dx8;return Automation[_0xf6b9[33]](_0xf6b9[32])[_0xf6b9[31]](_0xce0dx7)[_0xf6b9[21]](function(_0xce0dxd){_0xce0dx8= _0xce0dxd;var _0xce0dxe=[];var _0xce0dxf=[];var _0xce0dx10={where:{}};_0xce0dxd[_0xf6b9[24]][_0xf6b9[19]](function(_0xce0dx11){_0xce0dxf[_0xf6b9[23]](getCondition(_0xce0dx11[_0xf6b9[22]]))});_0xce0dxd[_0xf6b9[25]][_0xf6b9[19]](function(_0xce0dx11){_0xce0dxe[_0xf6b9[23]](getCondition(_0xce0dx11[_0xf6b9[22]]))});if(_0xce0dxf[_0xf6b9[26]]){_0xce0dx10[_0xf6b9[28]][_0xf6b9[27]]= _0xce0dxf};if(_0xce0dxe[_0xf6b9[26]]){_0xce0dx10[_0xf6b9[28]][_0xf6b9[29]]= _0xce0dxe};return MailRoom[_0xf6b9[30]](_0xce0dx10)})[_0xf6b9[21]](function(_0xce0dxa){_0xce0dxa[_0xf6b9[19]](function(_0xce0dxb){_0xce0dx8[_0xf6b9[20]][_0xf6b9[19]](function(_0xce0dxc){switch(_0xce0dxc[_0xf6b9[18]]){case _0xf6b9[17]:setStatus(_0xce0dxb[_0xf6b9[15]],_0xce0dxc[_0xf6b9[16]]);break;default:}})})})[_0xf6b9[14]](function(_0xce0dx9){console[_0xf6b9[9]](_0xf6b9[8]);console[_0xf6b9[9]](_0xf6b9[10],_0xce0dx9[_0xf6b9[11]]);console[_0xf6b9[9]](_0xf6b9[12],_0xce0dx9[_0xf6b9[13]])})}function setStatus(_0xce0dx13,_0xce0dx14){return MailRoom[_0xf6b9[35]]({status:_0xce0dx14},{where:{id:_0xce0dx13}})[_0xf6b9[14]](function(_0xce0dx9){console[_0xf6b9[9]](_0xf6b9[34]);console[_0xf6b9[9]](_0xf6b9[10],_0xce0dx9[_0xf6b9[11]]);console[_0xf6b9[9]](_0xf6b9[12],_0xce0dx9[_0xf6b9[13]])})}function getCondition(_0xce0dx11){var _0xce0dx16={};switch(_0xce0dx11[_0xf6b9[36]]){case _0xf6b9[17]:switch(_0xce0dx11[_0xf6b9[40]]){case _0xf6b9[38]:_0xce0dx16[_0xce0dx11[_0xf6b9[36]]]= _0xce0dx11[_0xf6b9[37]];break;case _0xf6b9[39]:_0xce0dx16[_0xce0dx11[_0xf6b9[36]]]= {$ne:_0xce0dx11[_0xf6b9[37]]};break;default:};break;case _0xf6b9[49]:var _0xce0dx17=moment()[_0xf6b9[44]](parseInt(_0xce0dx11[_0xf6b9[37]],10),_0xf6b9[43])[_0xf6b9[42]](_0xf6b9[41]);switch(_0xce0dx11[_0xf6b9[40]]){case _0xf6b9[45]:_0xce0dx16[_0xce0dx11[_0xf6b9[36]]]= {lt:_0xce0dx17};break;case _0xf6b9[46]:_0xce0dx16[_0xce0dx11[_0xf6b9[36]]]= {$lte:_0xce0dx17};break;case _0xf6b9[47]:_0xce0dx16[_0xce0dx11[_0xf6b9[36]]]= {$gt:_0xce0dx17};break;case _0xf6b9[48]:_0xce0dx16[_0xce0dx11[_0xf6b9[36]]]= {$gte:_0xce0dx17};break;default:};break;default:};return _0xce0dx16}function createInterval(_0xce0dxd){console[_0xf6b9[7]](_0xf6b9[50],_0xce0dxd[_0xf6b9[15]],_0xf6b9[51],_0xce0dxd[_0xf6b9[52]]* 60* 1000);activeMailAutomations[_0xf6b9[53]+ _0xce0dxd[_0xf6b9[15]]]= setInterval(function(){executeAutomation(_0xce0dxd[_0xf6b9[15]])},_0xce0dxd[_0xf6b9[52]]* 60* 1000)}module[_0xf6b9[54]]= function(){console[_0xf6b9[7]](_0xf6b9[55]);Automation[_0xf6b9[59]](function(_0xce0dx19,_0xce0dx1a){if(_0xce0dx19[_0xf6b9[56]]=== _0xf6b9[57]){console[_0xf6b9[7]](_0xf6b9[50],_0xce0dx19[_0xf6b9[15]],_0xf6b9[58],_0xce0dx19[_0xf6b9[17]]);if(_0xce0dx19[_0xf6b9[17]]){createInterval(_0xce0dx19)}}});Automation[_0xf6b9[62]](function(_0xce0dx19,_0xce0dx1a){if(_0xce0dx19[_0xf6b9[56]]=== _0xf6b9[57]){console[_0xf6b9[7]](_0xf6b9[50],_0xce0dx19[_0xf6b9[15]],_0xf6b9[60],_0xce0dx19[_0xf6b9[17]]);if(activeMailAutomations[_0xf6b9[53]+ _0xce0dx19[_0xf6b9[15]]]){console[_0xf6b9[7]](_0xf6b9[61],_0xce0dx19[_0xf6b9[15]]);clearInterval(activeMailAutomations[_0xf6b9[53]+ _0xce0dx19[_0xf6b9[15]]]);delete activeMailAutomations[_0xf6b9[53]+ _0xce0dx19[_0xf6b9[15]]]};if(_0xce0dx19[_0xf6b9[17]]){createInterval(_0xce0dx19)}}});Automation[_0xf6b9[64]](function(_0xce0dx19,_0xce0dx1a){if(_0xce0dx19[_0xf6b9[56]]=== _0xf6b9[57]){console[_0xf6b9[7]](_0xf6b9[50],_0xce0dx19[_0xf6b9[15]],_0xf6b9[63]);if(activeMailAutomations[_0xf6b9[53]+ _0xce0dx19[_0xf6b9[15]]]){console[_0xf6b9[7]](_0xf6b9[61],_0xce0dx19[_0xf6b9[15]]);clearInterval(activeMailAutomations[_0xf6b9[53]+ _0xce0dx19[_0xf6b9[15]]]);delete activeMailAutomations[_0xf6b9[53]+ _0xce0dx19[_0xf6b9[15]]]}}});return Automation[_0xf6b9[33]](_0xf6b9[32])[_0xf6b9[30]]({where:{status:true,channel:_0xf6b9[57]},attributes:[_0xf6b9[15],_0xf6b9[52]]})[_0xf6b9[21]](function(_0xce0dx1b){console[_0xf6b9[7]](_0xf6b9[66],_0xce0dx1b[_0xf6b9[26]]);_0xce0dx1b[_0xf6b9[19]](function(_0xce0dxd){createInterval(_0xce0dxd)})})[_0xf6b9[14]](function(_0xce0dx9){console[_0xf6b9[9]](_0xf6b9[65]);console[_0xf6b9[9]](_0xf6b9[10],_0xce0dx9[_0xf6b9[11]]);console[_0xf6b9[9]](_0xf6b9[12],_0xce0dx9[_0xf6b9[13]])})} \ No newline at end of file diff --git a/server/config/chat.js b/server/config/chat.js index eff997c..2f8e9e7 100644 --- a/server/config/chat.js +++ b/server/config/chat.js @@ -1,109 +1 @@ -'use strict'; -var ChatWebsite = require('../models').ChatWebsite; -var ChatRoom = require('../models').ChatRoom; -var Website = require('./chat'); -var ReportChat = require('../models').ReportChat; -var _ = require('lodash'); -var Util = require('./util'); -var chatwebsites; - -module.exports = function() { - - return ChatWebsite - .findAll() - .then(function(websites) { - console.log('CHAT website Initialization'); - chatwebsites = websites; - synch(chatwebsites); - ReportChat.afterUpdate(function(doc) { - var website = _.find(chatwebsites, { - id: doc.websiteid - }); - if (website && doc.changed('connectid')) { - webhook(doc, website, 'accept'); - } - if (website && doc.changed('rejectedAt')) { - webhook(doc, website, 'reject'); - } - }); - ChatRoom.afterUpdate(function(doc) { - var website = _.find(chatwebsites, { - id: doc.ChatWebsiteId - }); - if (website && doc.changed('status') && doc.status === 'CLOSED') { - webhook(doc, website, 'close'); - } - }) - }) - .catch(function(err) { - console.error(err); - }); -} - -function webhook(doc, website, hook) { - var _website = website; - switch (hook) { - case 'accept': - if (_website.acceptMethod && _website.acceptUrl) { - console.log('Chat website <' + _website.name + '> executing accept webhook'); - execRequest(doc.dataValues, _website.acceptMethod, _website.acceptUrl); - } - if (_website.actions.length) { - _.forEach(_website.actions, function(action) { - if (action.enabled) { - Util.execAction(action, doc); - } - }) - } - break; - case 'reject': - if (_website.rejectMethod && _website.rejectUrl) { - console.log('Chat website <' + _website.name + '> executing reject webhook'); - execRequest(doc.dataValues, _website.rejectMethod, _website.rejectUrl); - } - break; - case 'close': - if (_website.closeMethod && _website.closeUrl) { - console.log('Chat website <' + _website.name + '> executing close webhook'); - execRequest(doc.dataValues, _website.closeMethod, _website.closeUrl); - } - break; - default: - console.log('Webhook not recognized'); - } -} - -function execRequest(doc, method, url) { - Util.sendRequest(doc, method, url) - .then(function(values) { - console.log('request successeful!'); - }) - .catch(function(err) { - console.log('request failed!'); - }) -} - - -function synch(chatwebsites) { - ChatWebsite.afterCreate(function(doc) { - console.log('Chat website: ' + doc.name + ' Create'); - chatwebsites.push(doc); - }); - ChatWebsite.afterUpdate(function(doc) { - var oldItem = _.find(chatwebsites, { - id: doc.id - }); - if (oldItem) { - console.log('Chat website: ' + oldItem.name + ' Update'); - _.merge(oldItem, doc); - } else { - chatwebsites.unshift(doc); - } - }); - ChatWebsite.afterDestroy(function(doc) { - _.remove(chatwebsites, { - id: doc.id - }); - }); - -} +var _0xac29=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2F\x63\x68\x61\x74","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x75\x74\x69\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x43\x48\x41\x54\x20\x77\x65\x62\x73\x69\x74\x65\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E","\x6C\x6F\x67","\x77\x65\x62\x73\x69\x74\x65\x69\x64","\x66\x69\x6E\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x61\x63\x63\x65\x70\x74","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x72\x65\x6A\x65\x63\x74","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65\x49\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x63\x6C\x6F\x73\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x43\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65\x20\x3C","\x6E\x61\x6D\x65","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x43\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65\x3A\x20","\x20\x43\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x64","\x20\x55\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79"];_0xac29[0];var ChatWebsite=require(_0xac29[2])[_0xac29[1]];var ChatRoom=require(_0xac29[2])[_0xac29[3]];var Website=require(_0xac29[4]);var ReportChat=require(_0xac29[2])[_0xac29[5]];var _=require(_0xac29[6]);var Util=require(_0xac29[7]);var chatwebsites;module[_0xac29[8]]= function(){return ChatWebsite[_0xac29[26]]()[_0xac29[25]](function(_0x3393x9){console[_0xac29[12]](_0xac29[11]);chatwebsites= _0x3393x9;synch(chatwebsites);ReportChat[_0xac29[20]](function(_0x3393xa){var _0x3393xb=_[_0xac29[14]](chatwebsites,{id:_0x3393xa[_0xac29[13]]});if(_0x3393xb&& _0x3393xa[_0xac29[16]](_0xac29[15])){webhook(_0x3393xa,_0x3393xb,_0xac29[17])};if(_0x3393xb&& _0x3393xa[_0xac29[16]](_0xac29[18])){webhook(_0x3393xa,_0x3393xb,_0xac29[19])}});ChatRoom[_0xac29[20]](function(_0x3393xa){var _0x3393xb=_[_0xac29[14]](chatwebsites,{id:_0x3393xa[_0xac29[21]]});if(_0x3393xb&& _0x3393xa[_0xac29[16]](_0xac29[22])&& _0x3393xa[_0xac29[22]]=== _0xac29[23]){webhook(_0x3393xa,_0x3393xb,_0xac29[24])}})})[_0xac29[10]](function(_0x3393x8){console[_0xac29[9]](_0x3393x8)})};function webhook(_0x3393xa,_0x3393xb,_0x3393xd){var _0x3393xe=_0x3393xb;switch(_0x3393xd){case _0xac29[17]:if(_0x3393xe[_0xac29[27]]&& _0x3393xe[_0xac29[28]]){console[_0xac29[12]](_0xac29[29]+ _0x3393xe[_0xac29[30]]+ _0xac29[31]);execRequest(_0x3393xa[_0xac29[32]],_0x3393xe[_0xac29[27]],_0x3393xe[_0xac29[28]])};if(_0x3393xe[_0xac29[34]][_0xac29[33]]){_[_0xac29[37]](_0x3393xe[_0xac29[34]],function(_0x3393xf){if(_0x3393xf[_0xac29[35]]){Util[_0xac29[36]](_0x3393xf,_0x3393xa)}})};break;case _0xac29[19]:if(_0x3393xe[_0xac29[38]]&& _0x3393xe[_0xac29[39]]){console[_0xac29[12]](_0xac29[29]+ _0x3393xe[_0xac29[30]]+ _0xac29[40]);execRequest(_0x3393xa[_0xac29[32]],_0x3393xe[_0xac29[38]],_0x3393xe[_0xac29[39]])};break;case _0xac29[24]:if(_0x3393xe[_0xac29[41]]&& _0x3393xe[_0xac29[42]]){console[_0xac29[12]](_0xac29[29]+ _0x3393xe[_0xac29[30]]+ _0xac29[43]);execRequest(_0x3393xa[_0xac29[32]],_0x3393xe[_0xac29[41]],_0x3393xe[_0xac29[42]])};break;default:console[_0xac29[12]](_0xac29[44])}}function execRequest(_0x3393xa,_0x3393x11,_0x3393x12){Util[_0xac29[47]](_0x3393xa,_0x3393x11,_0x3393x12)[_0xac29[25]](function(_0x3393x13){console[_0xac29[12]](_0xac29[46])})[_0xac29[10]](function(_0x3393x8){console[_0xac29[12]](_0xac29[45])})}function synch(chatwebsites){ChatWebsite[_0xac29[51]](function(_0x3393xa){console[_0xac29[12]](_0xac29[48]+ _0x3393xa[_0xac29[30]]+ _0xac29[49]);chatwebsites[_0xac29[50]](_0x3393xa)});ChatWebsite[_0xac29[20]](function(_0x3393xa){var _0x3393x15=_[_0xac29[14]](chatwebsites,{id:_0x3393xa[_0xac29[52]]});if(_0x3393x15){console[_0xac29[12]](_0xac29[48]+ _0x3393x15[_0xac29[30]]+ _0xac29[53]);_[_0xac29[54]](_0x3393x15,_0x3393xa)}else {chatwebsites[_0xac29[55]](_0x3393xa)}});ChatWebsite[_0xac29[57]](function(_0x3393xa){_[_0xac29[56]](chatwebsites,{id:_0x3393xa[_0xac29[52]]})})} \ No newline at end of file diff --git a/server/config/express.js b/server/config/express.js index 30258e5..d02d564 100644 --- a/server/config/express.js +++ b/server/config/express.js @@ -1,80 +1 @@ -/** - * Express configuration - */ - -'use strict'; - -var express = require('express'); -var favicon = require('serve-favicon'); -var morgan = require('morgan'); -var compression = require('compression'); -var bodyParser = require('body-parser'); -var queryParser = require('express-query-int'); -var methodOverride = require('method-override'); -var cookieParser = require('cookie-parser'); -var errorHandler = require('errorhandler'); -var path = require('path'); -var passport = require('passport'); -var session = require('express-session'); -var flash = require('connect-flash'); -var SessionStore = require('express-mysql-session')(session); -var config = require('./environment'); - -module.exports = function(app) { - var env = app.get('env'); - - app.set('views', config.root + '/server/views'); - app.engine('html', require('ejs').renderFile); - app.set('view engine', 'html'); - app.use(compression()); - app.use(bodyParser.urlencoded({ - limit: '50mb', - extended: false - })); - app.use(bodyParser.json()); - // app.use(queryParser()); - app.use(methodOverride()); - app.use(cookieParser()); - app.use(passport.initialize()); - - // Express/MySQL session storage - app.use(session({ - secret: config.session.secret, - store: new SessionStore({ - host: config.db.host, - port: config.db.port, - user: config.db.username, - password: config.db.password, - database: config.db.database - }), - cookie: config.session.cookie, - name: config.session.name, - resave: true, - saveUninitialized: true - })); - - if ('production' === env) { - app.use(favicon(path.join(config.root, 'public', 'favicon.ico'))); - app.use(express.static(path.join(config.root, 'public'))); - app.set('appPath', config.root + '/public'); - morgan.token('remote-address', function(req, res) { - return req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] : req.connection.remoteAddress || req.ip; - }); - app.use(morgan(':method :remote-address :remote-user :url :status :response-time ms - :res[content-length]')); - } - - if ('development' === env || 'test' === env) { - app.use(require('connect-livereload')()); - app.use(express.static(path.join(config.root, '.tmp'))); - app.use(express.static(path.join(config.root, 'client'))); - app.set('appPath', 'client'); - morgan.token('remote-address', function(req, res) { - return req.headers['x-forwarded-for'] ? req.headers['x-forwarded-for'] : req.connection.remoteAddress || req.ip; - }); - app.use(morgan(':method :remote-address :remote-user :url :status :response-time ms - :res[content-length]')); - app.use(errorHandler()); // Error handler - has to be last - } - - // Connect flash for flash messages - app.use(flash()); -}; +var _0x508f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x72\x65\x73\x73","\x73\x65\x72\x76\x65\x2D\x66\x61\x76\x69\x63\x6F\x6E","\x6D\x6F\x72\x67\x61\x6E","\x63\x6F\x6D\x70\x72\x65\x73\x73\x69\x6F\x6E","\x62\x6F\x64\x79\x2D\x70\x61\x72\x73\x65\x72","\x65\x78\x70\x72\x65\x73\x73\x2D\x71\x75\x65\x72\x79\x2D\x69\x6E\x74","\x6D\x65\x74\x68\x6F\x64\x2D\x6F\x76\x65\x72\x72\x69\x64\x65","\x63\x6F\x6F\x6B\x69\x65\x2D\x70\x61\x72\x73\x65\x72","\x65\x72\x72\x6F\x72\x68\x61\x6E\x64\x6C\x65\x72","\x70\x61\x74\x68","\x70\x61\x73\x73\x70\x6F\x72\x74","\x65\x78\x70\x72\x65\x73\x73\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x63\x6F\x6E\x6E\x65\x63\x74\x2D\x66\x6C\x61\x73\x68","\x65\x78\x70\x72\x65\x73\x73\x2D\x6D\x79\x73\x71\x6C\x2D\x73\x65\x73\x73\x69\x6F\x6E","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x65\x6E\x76","\x67\x65\x74","\x76\x69\x65\x77\x73","\x72\x6F\x6F\x74","\x2F\x73\x65\x72\x76\x65\x72\x2F\x76\x69\x65\x77\x73","\x73\x65\x74","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72\x46\x69\x6C\x65","\x65\x6A\x73","\x65\x6E\x67\x69\x6E\x65","\x76\x69\x65\x77\x20\x65\x6E\x67\x69\x6E\x65","\x75\x73\x65","\x35\x30\x6D\x62","\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6A\x73\x6F\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65","\x73\x65\x63\x72\x65\x74","\x73\x65\x73\x73\x69\x6F\x6E","\x68\x6F\x73\x74","\x64\x62","\x70\x6F\x72\x74","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x64\x61\x74\x61\x62\x61\x73\x65","\x63\x6F\x6F\x6B\x69\x65","\x6E\x61\x6D\x65","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x70\x75\x62\x6C\x69\x63","\x66\x61\x76\x69\x63\x6F\x6E\x2E\x69\x63\x6F","\x6A\x6F\x69\x6E","\x73\x74\x61\x74\x69\x63","\x61\x70\x70\x50\x61\x74\x68","\x2F\x70\x75\x62\x6C\x69\x63","\x72\x65\x6D\x6F\x74\x65\x2D\x61\x64\x64\x72\x65\x73\x73","\x78\x2D\x66\x6F\x72\x77\x61\x72\x64\x65\x64\x2D\x66\x6F\x72","\x68\x65\x61\x64\x65\x72\x73","\x72\x65\x6D\x6F\x74\x65\x41\x64\x64\x72\x65\x73\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x69\x70","\x74\x6F\x6B\x65\x6E","\x3A\x6D\x65\x74\x68\x6F\x64\x20\x3A\x72\x65\x6D\x6F\x74\x65\x2D\x61\x64\x64\x72\x65\x73\x73\x20\x3A\x72\x65\x6D\x6F\x74\x65\x2D\x75\x73\x65\x72\x20\x3A\x75\x72\x6C\x20\x3A\x73\x74\x61\x74\x75\x73\x20\x3A\x72\x65\x73\x70\x6F\x6E\x73\x65\x2D\x74\x69\x6D\x65\x20\x6D\x73\x20\x2D\x20\x3A\x72\x65\x73\x5B\x63\x6F\x6E\x74\x65\x6E\x74\x2D\x6C\x65\x6E\x67\x74\x68\x5D","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x74\x65\x73\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x2D\x6C\x69\x76\x65\x72\x65\x6C\x6F\x61\x64","\x2E\x74\x6D\x70","\x63\x6C\x69\x65\x6E\x74"];_0x508f[0];var express=require(_0x508f[1]);var favicon=require(_0x508f[2]);var morgan=require(_0x508f[3]);var compression=require(_0x508f[4]);var bodyParser=require(_0x508f[5]);var queryParser=require(_0x508f[6]);var methodOverride=require(_0x508f[7]);var cookieParser=require(_0x508f[8]);var errorHandler=require(_0x508f[9]);var path=require(_0x508f[10]);var passport=require(_0x508f[11]);var session=require(_0x508f[12]);var flash=require(_0x508f[13]);var SessionStore=require(_0x508f[14])(session);var config=require(_0x508f[15]);module[_0x508f[16]]= function(_0xb539x10){var _0xb539x11=_0xb539x10[_0x508f[18]](_0x508f[17]);_0xb539x10[_0x508f[22]](_0x508f[19],config[_0x508f[20]]+ _0x508f[21]);_0xb539x10[_0x508f[26]](_0x508f[23],require(_0x508f[25])[_0x508f[24]]);_0xb539x10[_0x508f[22]](_0x508f[27],_0x508f[23]);_0xb539x10[_0x508f[28]](compression());_0xb539x10[_0x508f[28]](bodyParser[_0x508f[30]]({limit:_0x508f[29],extended:false}));_0xb539x10[_0x508f[28]](bodyParser[_0x508f[31]]());_0xb539x10[_0x508f[28]](methodOverride());_0xb539x10[_0x508f[28]](cookieParser());_0xb539x10[_0x508f[28]](passport[_0x508f[32]]());_0xb539x10[_0x508f[28]](session({secret:config[_0x508f[34]][_0x508f[33]],store: new SessionStore({host:config[_0x508f[36]][_0x508f[35]],port:config[_0x508f[36]][_0x508f[37]],user:config[_0x508f[36]][_0x508f[38]],password:config[_0x508f[36]][_0x508f[39]],database:config[_0x508f[36]][_0x508f[40]]}),cookie:config[_0x508f[34]][_0x508f[41]],name:config[_0x508f[34]][_0x508f[42]],resave:true,saveUninitialized:true}));if(_0x508f[43]=== _0xb539x11){_0xb539x10[_0x508f[28]](favicon(path[_0x508f[46]](config[_0x508f[20]],_0x508f[44],_0x508f[45])));_0xb539x10[_0x508f[28]](express[_0x508f[47]](path[_0x508f[46]](config[_0x508f[20]],_0x508f[44])));_0xb539x10[_0x508f[22]](_0x508f[48],config[_0x508f[20]]+ _0x508f[49]);morgan[_0x508f[56]](_0x508f[50],function(_0xb539x12,_0xb539x13){return _0xb539x12[_0x508f[52]][_0x508f[51]]?_0xb539x12[_0x508f[52]][_0x508f[51]]:_0xb539x12[_0x508f[54]][_0x508f[53]]|| _0xb539x12[_0x508f[55]]});_0xb539x10[_0x508f[28]](morgan(_0x508f[57]))};if(_0x508f[58]=== _0xb539x11|| _0x508f[59]=== _0xb539x11){_0xb539x10[_0x508f[28]](require(_0x508f[60])());_0xb539x10[_0x508f[28]](express[_0x508f[47]](path[_0x508f[46]](config[_0x508f[20]],_0x508f[61])));_0xb539x10[_0x508f[28]](express[_0x508f[47]](path[_0x508f[46]](config[_0x508f[20]],_0x508f[62])));_0xb539x10[_0x508f[22]](_0x508f[48],_0x508f[62]);morgan[_0x508f[56]](_0x508f[50],function(_0xb539x12,_0xb539x13){return _0xb539x12[_0x508f[52]][_0x508f[51]]?_0xb539x12[_0x508f[52]][_0x508f[51]]:_0xb539x12[_0x508f[54]][_0x508f[53]]|| _0xb539x12[_0x508f[55]]});_0xb539x10[_0x508f[28]](morgan(_0x508f[57]));_0xb539x10[_0x508f[28]](errorHandler())};_0xb539x10[_0x508f[28]](flash())} \ No newline at end of file diff --git a/server/config/fax.js b/server/config/fax.js index c64343b..e3ee23e 100644 --- a/server/config/fax.js +++ b/server/config/fax.js @@ -1,240 +1 @@ -'use strict'; - -var _ = require('lodash'); -var uuidLib = require('node-uuid'); -var ConvertTiff = require('tiff-to-png'); -var exec = require('child_process').exec; -var fs = require('fs'); -var path = require('path'); - -var FaxMessage = require('../models').FaxMessage; -var FaxRoom = require('../models').FaxRoom; -var Contact = require('../models').Contact; -var Event = require('../models').Event; -var config = require('./environment'); - -exports.register = function(ami) { - - ami.on('receivefax', function(evt) { - - FaxRoom - .create({ - status: 'NEW', - from: evt.remotestationid, - FaxAccountId: 1, //TODO Handle account ID - }) - .then(function(faxRoom) { - - evt.status = 'RECEIVED'; - evt.FaxRoomId = faxRoom.id; - - FaxMessage - .create(evt) - .then(function(faxMessage) { - - Event - .create({ - name: 'INCOMING', - channel: 'FAX', - FaxRoomId: faxRoom.id, - FaxAccountId: 1 //TODO Handle account ID - }) - .catch(function(err) { - console.error(err); - }); - - Contact - .findOrCreate({ - where: { - phone: evt.remotestationid - }, - defaults: { - phone: evt.remotestationid, - fullname: evt.remotestationid - } - }) - .spread(function(contact, created) { - faxMessage.setFrom(contact); - }); - - Contact - .findOrCreate({ - where: { - phone: evt.localstationid - }, - defaults: { - phone: evt.localstationid, - fullname: evt.localstationid - } - }) - .spread(function(contact, created) { - faxMessage.setTo(contact); - }); - - //Convert tiff to png - var uuid = uuidLib.v4(); - var inputPath = evt.filename; //Restore for normal usage - // var inputPath = '/tmp/sample.tif' //Used for testing - var resultPath = path.join(config.root, 'server', 'files', 'fax', 'inbound', uuid + '.pdf'); - var command = 'convert ' + inputPath + ' ' + resultPath; - fs.exists(inputPath, function(exists) { - if (exists) { - console.error('The file ' + inputPath + ' exits'); - //Install ImageMagick for doing that! - exec(command, function(err) { - if (err) { - console.error(err); - } else { - faxMessage.updateAttributes({ - filenamePDF: uuid + '.pdf' - }) - .then(function() { - console.error('The file ' + inputPath + ' was converted in PDF'); - }) - .catch(function(err) { - console.error(err); - }); - } - }); - } else { - console.error('The file ' + inputPath + ' does not exits'); - } - }); - }) - .catch(function(err) { - console.error(err); - }); - - }) - .catch(function(err) { - console.error(err); - }); - }); - - ami.on('sendfax', function(evt) { - console.log('***SendFAX***'); - - FaxMessage - .findOne({ - where: { - uniqueid: evt.uniqueid - } - }) - .then(function(faxMessage) { - if (faxMessage) { - faxMessage.updateAttributes(evt); - } - }) - .catch(function(err) { - console.error(err); - }); - - }); - - ami.on('varset', function(evt) { - if (evt.variable.hasOwnProperty('faxstatus')) { - FaxMessage - .findOne({ - where: { - uniqueid: evt.uniqueid - } - }) - .then(function(faxMessage) { - if (faxMessage) { - console.log('VarSet: ', 'status', evt.value); - faxMessage.updateAttributes({ - status: evt.value == 'FAILED' ? 'FAILED' : 'SENT' - }); - } - }) - .catch(function(err) { - console.error(err); - }); - } else if (evt.variable.hasOwnProperty('faxerror')) { - FaxMessage - .findOne({ - where: { - uniqueid: evt.uniqueid - } - }) - .then(function(faxMessage) { - if (faxMessage) { - console.log('VarSet: ', 'error', evt.value); - faxMessage.updateAttributes({ - error: evt.value - }); - } - }) - .catch(function(err) { - console.error(err); - }); - } else if (evt.variable.hasOwnProperty('faxstatusstring')) { - FaxMessage - .findOne({ - where: { - uniqueid: evt.uniqueid - } - }) - .then(function(faxMessage) { - if (faxMessage) { - console.log('VarSet: ', 'laststatus', evt.value); - faxMessage.updateAttributes({ - laststatus: evt.value - }); - } - }) - .catch(function(err) { - console.error(err); - }); - } - - }); - - ami.on('userevent', function(evt) { - if (evt.userevent === 'Fax') { - FaxMessage - .findOne({ - where: { - uuid: evt.uuid - } - }) - .then(function(faxMessage) { - if (faxMessage) { - evt.status = 'SENDING'; - faxMessage.updateAttributes(evt); - } - }) - .catch(function(err) { - console.error(err); - }); - } - - }); - - ami.on('faxstatus', function(evt) { - FaxMessage - .findOne({ - where: { - uniqueid: evt.uniqueid - } - }) - .then(function(faxMessage) { - if (faxMessage) { - - console.log('FAXStatus: ', evt.uniqueid, evt.status); - - faxMessage.updateAttributes({ - operation: evt.operation, - laststatus: evt.status - }); - } - }) - .catch(function(err) { - console.error(err); - }); - - }) - - require('../api/fax_message/fax_message.ami').register(ami); - -}; +var _0x23a9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6E\x6F\x64\x65\x2D\x75\x75\x69\x64","\x74\x69\x66\x66\x2D\x74\x6F\x2D\x70\x6E\x67","\x65\x78\x65\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x66\x73","\x70\x61\x74\x68","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x43\x6F\x6E\x74\x61\x63\x74","\x45\x76\x65\x6E\x74","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x72\x65\x63\x65\x69\x76\x65\x66\x61\x78","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x46\x61\x78\x52\x6F\x6F\x6D\x49\x64","\x69\x64","\x49\x4E\x43\x4F\x4D\x49\x4E\x47","\x46\x41\x58","\x63\x72\x65\x61\x74\x65","\x73\x65\x74\x46\x72\x6F\x6D","\x73\x70\x72\x65\x61\x64","\x72\x65\x6D\x6F\x74\x65\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x73\x65\x74\x54\x6F","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x76\x34","\x66\x69\x6C\x65\x6E\x61\x6D\x65","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x66\x61\x78","\x69\x6E\x62\x6F\x75\x6E\x64","\x2E\x70\x64\x66","\x6A\x6F\x69\x6E","\x63\x6F\x6E\x76\x65\x72\x74\x20","\x20","\x54\x68\x65\x20\x66\x69\x6C\x65\x20","\x20\x65\x78\x69\x74\x73","\x20\x77\x61\x73\x20\x63\x6F\x6E\x76\x65\x72\x74\x65\x64\x20\x69\x6E\x20\x50\x44\x46","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x74\x73","\x65\x78\x69\x73\x74\x73","\x4E\x45\x57","\x6F\x6E","\x73\x65\x6E\x64\x66\x61\x78","\x2A\x2A\x2A\x53\x65\x6E\x64\x46\x41\x58\x2A\x2A\x2A","\x6C\x6F\x67","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x69\x6E\x64\x4F\x6E\x65","\x76\x61\x72\x73\x65\x74","\x66\x61\x78\x73\x74\x61\x74\x75\x73","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x76\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x53\x65\x74\x3A\x20","\x76\x61\x6C\x75\x65","\x46\x41\x49\x4C\x45\x44","\x53\x45\x4E\x54","\x66\x61\x78\x65\x72\x72\x6F\x72","\x66\x61\x78\x73\x74\x61\x74\x75\x73\x73\x74\x72\x69\x6E\x67","\x6C\x61\x73\x74\x73\x74\x61\x74\x75\x73","\x75\x73\x65\x72\x65\x76\x65\x6E\x74","\x46\x61\x78","\x53\x45\x4E\x44\x49\x4E\x47","\x75\x75\x69\x64","\x46\x41\x58\x53\x74\x61\x74\x75\x73\x3A\x20","\x6F\x70\x65\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x61\x6D\x69"];_0x23a9[0];var _=require(_0x23a9[1]);var uuidLib=require(_0x23a9[2]);var ConvertTiff=require(_0x23a9[3]);var exec=require(_0x23a9[5])[_0x23a9[4]];var fs=require(_0x23a9[6]);var path=require(_0x23a9[7]);var FaxMessage=require(_0x23a9[9])[_0x23a9[8]];var FaxRoom=require(_0x23a9[9])[_0x23a9[10]];var Contact=require(_0x23a9[9])[_0x23a9[11]];var Event=require(_0x23a9[9])[_0x23a9[12]];var config=require(_0x23a9[13]);exports[_0x23a9[14]]= function(_0xf118xc){_0xf118xc[_0x23a9[50]](_0x23a9[15],function(_0xf118xd){FaxRoom[_0x23a9[24]]({status:_0x23a9[49],from:_0xf118xd[_0x23a9[27]],FaxAccountId:1})[_0x23a9[45]](function(_0xf118xf){_0xf118xd[_0x23a9[18]]= _0x23a9[19];_0xf118xd[_0x23a9[20]]= _0xf118xf[_0x23a9[21]];FaxMessage[_0x23a9[24]](_0xf118xd)[_0x23a9[45]](function(_0xf118x10){Event[_0x23a9[24]]({name:_0x23a9[22],channel:_0x23a9[23],FaxRoomId:_0xf118xf[_0x23a9[21]],FaxAccountId:1})[_0x23a9[17]](function(_0xf118xe){console[_0x23a9[16]](_0xf118xe)});Contact[_0x23a9[28]]({where:{phone:_0xf118xd[_0x23a9[27]]},defaults:{phone:_0xf118xd[_0x23a9[27]],fullname:_0xf118xd[_0x23a9[27]]}})[_0x23a9[26]](function(_0xf118x11,_0xf118x12){_0xf118x10[_0x23a9[25]](_0xf118x11)});Contact[_0x23a9[28]]({where:{phone:_0xf118xd[_0x23a9[30]]},defaults:{phone:_0xf118xd[_0x23a9[30]],fullname:_0xf118xd[_0x23a9[30]]}})[_0x23a9[26]](function(_0xf118x11,_0xf118x12){_0xf118x10[_0x23a9[29]](_0xf118x11)});var _0xf118x13=uuidLib[_0x23a9[31]]();var _0xf118x14=_0xf118xd[_0x23a9[32]];var _0xf118x15=path[_0x23a9[39]](config[_0x23a9[33]],_0x23a9[34],_0x23a9[35],_0x23a9[36],_0x23a9[37],_0xf118x13+ _0x23a9[38]);var _0xf118x16=_0x23a9[40]+ _0xf118x14+ _0x23a9[41]+ _0xf118x15;fs[_0x23a9[48]](_0xf118x14,function(_0xf118x17){if(_0xf118x17){console[_0x23a9[16]](_0x23a9[42]+ _0xf118x14+ _0x23a9[43]);exec(_0xf118x16,function(_0xf118xe){if(_0xf118xe){console[_0x23a9[16]](_0xf118xe)}else {_0xf118x10[_0x23a9[46]]({filenamePDF:_0xf118x13+ _0x23a9[38]})[_0x23a9[45]](function(){console[_0x23a9[16]](_0x23a9[42]+ _0xf118x14+ _0x23a9[44])})[_0x23a9[17]](function(_0xf118xe){console[_0x23a9[16]](_0xf118xe)})}})}else {console[_0x23a9[16]](_0x23a9[42]+ _0xf118x14+ _0x23a9[47])}})})[_0x23a9[17]](function(_0xf118xe){console[_0x23a9[16]](_0xf118xe)})})[_0x23a9[17]](function(_0xf118xe){console[_0x23a9[16]](_0xf118xe)})});_0xf118xc[_0x23a9[50]](_0x23a9[51],function(_0xf118xd){console[_0x23a9[53]](_0x23a9[52]);FaxMessage[_0x23a9[55]]({where:{uniqueid:_0xf118xd[_0x23a9[54]]}})[_0x23a9[45]](function(_0xf118x10){if(_0xf118x10){_0xf118x10[_0x23a9[46]](_0xf118xd)}})[_0x23a9[17]](function(_0xf118xe){console[_0x23a9[16]](_0xf118xe)})});_0xf118xc[_0x23a9[50]](_0x23a9[56],function(_0xf118xd){if(_0xf118xd[_0x23a9[59]][_0x23a9[58]](_0x23a9[57])){FaxMessage[_0x23a9[55]]({where:{uniqueid:_0xf118xd[_0x23a9[54]]}})[_0x23a9[45]](function(_0xf118x10){if(_0xf118x10){console[_0x23a9[53]](_0x23a9[60],_0x23a9[18],_0xf118xd[_0x23a9[61]]);_0xf118x10[_0x23a9[46]]({status:_0xf118xd[_0x23a9[61]]== _0x23a9[62]?_0x23a9[62]:_0x23a9[63]})}})[_0x23a9[17]](function(_0xf118xe){console[_0x23a9[16]](_0xf118xe)})}else {if(_0xf118xd[_0x23a9[59]][_0x23a9[58]](_0x23a9[64])){FaxMessage[_0x23a9[55]]({where:{uniqueid:_0xf118xd[_0x23a9[54]]}})[_0x23a9[45]](function(_0xf118x10){if(_0xf118x10){console[_0x23a9[53]](_0x23a9[60],_0x23a9[16],_0xf118xd[_0x23a9[61]]);_0xf118x10[_0x23a9[46]]({error:_0xf118xd[_0x23a9[61]]})}})[_0x23a9[17]](function(_0xf118xe){console[_0x23a9[16]](_0xf118xe)})}else {if(_0xf118xd[_0x23a9[59]][_0x23a9[58]](_0x23a9[65])){FaxMessage[_0x23a9[55]]({where:{uniqueid:_0xf118xd[_0x23a9[54]]}})[_0x23a9[45]](function(_0xf118x10){if(_0xf118x10){console[_0x23a9[53]](_0x23a9[60],_0x23a9[66],_0xf118xd[_0x23a9[61]]);_0xf118x10[_0x23a9[46]]({laststatus:_0xf118xd[_0x23a9[61]]})}})[_0x23a9[17]](function(_0xf118xe){console[_0x23a9[16]](_0xf118xe)})}}}});_0xf118xc[_0x23a9[50]](_0x23a9[67],function(_0xf118xd){if(_0xf118xd[_0x23a9[67]]=== _0x23a9[68]){FaxMessage[_0x23a9[55]]({where:{uuid:_0xf118xd[_0x23a9[70]]}})[_0x23a9[45]](function(_0xf118x10){if(_0xf118x10){_0xf118xd[_0x23a9[18]]= _0x23a9[69];_0xf118x10[_0x23a9[46]](_0xf118xd)}})[_0x23a9[17]](function(_0xf118xe){console[_0x23a9[16]](_0xf118xe)})}});_0xf118xc[_0x23a9[50]](_0x23a9[57],function(_0xf118xd){FaxMessage[_0x23a9[55]]({where:{uniqueid:_0xf118xd[_0x23a9[54]]}})[_0x23a9[45]](function(_0xf118x10){if(_0xf118x10){console[_0x23a9[53]](_0x23a9[71],_0xf118xd[_0x23a9[54]],_0xf118xd[_0x23a9[18]]);_0xf118x10[_0x23a9[46]]({operation:_0xf118xd[_0x23a9[72]],laststatus:_0xf118xd[_0x23a9[18]]})}})[_0x23a9[17]](function(_0xf118xe){console[_0x23a9[16]](_0xf118xe)})});require(_0x23a9[73])[_0x23a9[14]](_0xf118xc)} \ No newline at end of file diff --git a/server/config/history/history.js b/server/config/history/history.js index 2e3f620..afe1540 100644 --- a/server/config/history/history.js +++ b/server/config/history/history.js @@ -1,131 +1 @@ -'use strict'; - - -var sequelize = require('../../models').sequelize; -var moment = require('moment'); -var async = require('async'); - -var ReportMove = require('./reportMove'); -var Models = require('../../models'); -var HistoryModels = require('../../models').history; -var moment = require('moment'); - -var defaultCondition = { - where: { - createdAt: { - $lte: moment().format("YYYY-MM-DD HH:mm:ss") - } - }, - raw: true -}; - -module.exports = function(CronJob) { - - // Every 1 Minute - var job = new CronJob({ - cronTime: '0 59 23 * * *', - // cronTime: '* * * * *', - onTick: function() { - console.log('Moving data into history...'); - - return Promise - .all([]) - .then(ReportMove.move(Models.ReportIntegration, HistoryModels.ReportIntegrationHistory)) - .then(ReportMove.move(Models.ReportCall, HistoryModels.ReportCallHistory)) - .then(ReportMove.move(Models.ReportSquareDetail, HistoryModels.ReportSquareDetailHistory)) - .then(ReportMove.move(Models.ReportTigerDial, HistoryModels.ReportTigerDialHistory)) - .then(ReportMove.move(Models.ReportDial, HistoryModels.ReportDialHistory)) - .then(ReportMove.move(Models.ReportCallTransfer, HistoryModels.ReportCallTransferHistory)) - .then(ReportMove.move(Models.ReportAgent, HistoryModels.ReportAgentHistory, { - reason: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportMember, HistoryModels.ReportMemberHistory, { - exitAt: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportQueue, HistoryModels.ReportQueueHistory, { - queuecallerleaveAt: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportChat, HistoryModels.ReportChatHistory, { - reason: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportChatSession, HistoryModels.ReportChatSessionHistory, { - leaveAt: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportChatRoom, HistoryModels.ReportChatRoomHistory, { - leaveAt: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportMail, HistoryModels.ReportMailHistory, { - reason: { - $ne: null - } - })) - // .then(ReportMove.move(Models.ReportMailSession, HistoryModels.ReportMailSessionHistory, { - // leaveAt: { - // $ne: null - // } - // })) - .then(ReportMove.move(Models.ReportMailRoom, HistoryModels.ReportMailRoomHistory, { - leaveAt: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportSms, HistoryModels.ReportSmsHistory, { - reason: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportSmsSession, HistoryModels.ReportSmsSessionHistory, { - leaveAt: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportSquare, HistoryModels.ReportSquareHistory, { - leaveAt: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportFax, HistoryModels.ReportFaxHistory, { - reason: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportFaxSession, HistoryModels.ReportFaxSessionHistory, { - leaveAt: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportFaxRoom, HistoryModels.ReportFaxRoomHistory, { - leaveAt: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportOpenchannel, HistoryModels.ReportOpenchannelHistory, { - reason: { - $ne: null - } - })) - .then(ReportMove.move(Models.ReportOpenchannelSession, HistoryModels.ReportOpenchannelSessionHistory, { - leaveAt: { - $ne: null - } - })) - .catch(function(err) { - console.error(err); - }); - } - }); - - job.start(); -} +var _0x9438=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x6D\x6F\x6D\x65\x6E\x74","\x61\x73\x79\x6E\x63","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x4D\x6F\x76\x65","\x68\x69\x73\x74\x6F\x72\x79","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x65\x78\x70\x6F\x72\x74\x73","\x30\x20\x35\x39\x20\x32\x33\x20\x2A\x20\x2A\x20\x2A","\x4D\x6F\x76\x69\x6E\x67\x20\x64\x61\x74\x61\x20\x69\x6E\x74\x6F\x20\x68\x69\x73\x74\x6F\x72\x79\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6D\x6F\x76\x65","\x74\x68\x65\x6E","\x61\x6C\x6C","\x73\x74\x61\x72\x74"];_0x9438[0];var sequelize=require(_0x9438[2])[_0x9438[1]];var moment=require(_0x9438[3]);var async=require(_0x9438[4]);var ReportMove=require(_0x9438[5]);var Models=require(_0x9438[2]);var HistoryModels=require(_0x9438[2])[_0x9438[6]];var moment=require(_0x9438[3]);var defaultCondition={where:{createdAt:{$lte:moment()[_0x9438[8]](_0x9438[7])}},raw:true};module[_0x9438[9]]= function(_0x1f48x8){var _0x1f48x9= new _0x1f48x8({cronTime:_0x9438[10],onTick:function(){console[_0x9438[12]](_0x9438[11]);return Promise[_0x9438[17]]([])[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportIntegration,HistoryModels.ReportIntegrationHistory))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportCall,HistoryModels.ReportCallHistory))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportSquareDetail,HistoryModels.ReportSquareDetailHistory))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportTigerDial,HistoryModels.ReportTigerDialHistory))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportDial,HistoryModels.ReportDialHistory))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportCallTransfer,HistoryModels.ReportCallTransferHistory))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportAgent,HistoryModels.ReportAgentHistory,{reason:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportMember,HistoryModels.ReportMemberHistory,{exitAt:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportQueue,HistoryModels.ReportQueueHistory,{queuecallerleaveAt:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportChat,HistoryModels.ReportChatHistory,{reason:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportChatSession,HistoryModels.ReportChatSessionHistory,{leaveAt:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportChatRoom,HistoryModels.ReportChatRoomHistory,{leaveAt:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportMail,HistoryModels.ReportMailHistory,{reason:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportMailRoom,HistoryModels.ReportMailRoomHistory,{leaveAt:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportSms,HistoryModels.ReportSmsHistory,{reason:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportSmsSession,HistoryModels.ReportSmsSessionHistory,{leaveAt:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportSquare,HistoryModels.ReportSquareHistory,{leaveAt:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportFax,HistoryModels.ReportFaxHistory,{reason:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportFaxSession,HistoryModels.ReportFaxSessionHistory,{leaveAt:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportFaxRoom,HistoryModels.ReportFaxRoomHistory,{leaveAt:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportOpenchannel,HistoryModels.ReportOpenchannelHistory,{reason:{$ne:null}}))[_0x9438[16]](ReportMove[_0x9438[15]](Models.ReportOpenchannelSession,HistoryModels.ReportOpenchannelSessionHistory,{leaveAt:{$ne:null}}))[_0x9438[14]](function(_0x1f48xa){console[_0x9438[13]](_0x1f48xa)})}});_0x1f48x9[_0x9438[18]]()} \ No newline at end of file diff --git a/server/config/history/reportMove.js b/server/config/history/reportMove.js index de5d2c8..f81b451 100644 --- a/server/config/history/reportMove.js +++ b/server/config/history/reportMove.js @@ -1,50 +1 @@ -'use strict'; - -var _ = require('lodash'); -var moment = require('moment'); -var sequelize = require('../../models').sequelize; -var util = require('util'); - -exports.move = function(Report, ReportHistory, where) { - var _items; - var _where = { - createdAt: { - $lte: moment().format("YYYY-MM-DD HH:mm:ss") - } - }; - - return function() { - return sequelize.transaction(function(t) { - return Report - .findAll({ - where: where ? _.merge(_where, where) : _where, - raw: true - }) - .then(function(items) { - _items = items; - return ReportHistory - .bulkCreate(items, { - individualHooks: true, - transaction: t - }); - }) - .then(function() { - return Report - .destroy({ - where: { - id: _.map(_items, 'id') - } - }, { - individualHooks: true, - transaction: t - }); - }); - }) - .then(function() { - console.log(util.format('Moving %s - DONE', Report.tableName)); - }) - .catch(function(err) { - console.error(util.format('Moving %s error: %s.', Report.tableName, _.map(err.errors, 'message').join('; '))); - }); - } -} +var _0xb331=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x75\x74\x69\x6C","\x6D\x6F\x76\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x4D\x6F\x76\x69\x6E\x67\x20\x25\x73\x20\x65\x72\x72\x6F\x72\x3A\x20\x25\x73\x2E","\x74\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x3B\x20","\x6A\x6F\x69\x6E","\x65\x72\x72\x6F\x72\x73","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x61\x70","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x4D\x6F\x76\x69\x6E\x67\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45","\x6C\x6F\x67","\x74\x68\x65\x6E","\x69\x64","\x64\x65\x73\x74\x72\x6F\x79","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E"];_0xb331[0];var _=require(_0xb331[1]);var moment=require(_0xb331[2]);var sequelize=require(_0xb331[4])[_0xb331[3]];var util=require(_0xb331[5]);exports[_0xb331[6]]= function(_0xd114x5,_0xd114x6,_0xd114x7){var _0xd114x8;var _0xd114x9={createdAt:{$lte:moment()[_0xb331[8]](_0xb331[7])}};return function(){return sequelize[_0xb331[26]](function(_0xd114xb){return _0xd114x5[_0xb331[25]]({where:_0xd114x7?_[_0xb331[24]](_0xd114x9,_0xd114x7):_0xd114x9,raw:true})[_0xb331[20]](function(_0xd114xc){_0xd114x8= _0xd114xc;return _0xd114x6[_0xb331[23]](_0xd114xc,{individualHooks:true,transaction:_0xd114xb})})[_0xb331[20]](function(){return _0xd114x5[_0xb331[22]]({where:{id:_[_0xb331[15]](_0xd114x8,_0xb331[21])}},{individualHooks:true,transaction:_0xd114xb})})})[_0xb331[20]](function(){console[_0xb331[19]](util[_0xb331[8]](_0xb331[18],_0xd114x5[_0xb331[10]]))})[_0xb331[17]](function(_0xd114xa){console[_0xb331[16]](util[_0xb331[8]](_0xb331[9],_0xd114x5[_0xb331[10]],_[_0xb331[15]](_0xd114xa[_0xb331[13]],_0xb331[14])[_0xb331[12]](_0xb331[11])))})}} \ No newline at end of file diff --git a/server/config/imap/imap.js b/server/config/imap/imap.js index 93bfa0d..3f0bcc2 100644 --- a/server/config/imap/imap.js +++ b/server/config/imap/imap.js @@ -1,105 +1 @@ -'use strict'; - -var util = require('util'); -var path = require('path'); - -var _ = require('lodash'); -var Promise = require('bluebird'); -var ImapListener = require("mail-listener2"); -var writeFile = Promise.promisify(require("fs").writeFile); - -var config = require('../environment'); - -var Server = require('../../models').MailServerIn; -var Room = require('../../models').MailRoom; -var Message = require('../../models').MailMessage; -var Account = require('../../models').MailAccount; -var Attachment = require('../../models').MailAttachment; - -var imap; -var timeout; - -process - .on('close', function(code) { - console.log(util.format('IMAP SERVER %s EXITED WITH CODE %s, PROCESS ID: %s ', process.argv[3], code, process.pid)); - }) - .on('error', function(err) { - console.error(err); - }); - -console.log(util.format('IMAP SERVER %s STARTING, PROCESS ID: %s ', process.argv[3], process.pid)); - -process.send({ - type: 'state', - state: 'CONNECTING' -}); - -function onSave(server) { - imap = new ImapListener({ - username: server.username, - password: server.password, - host: server.host, - port: server.port, - tls: server.ssl, - tlsOptions: { - rejectUnauthorized: false - }, - mailbox: server.mailbox, // mailbox to monitor - searchFilter: [server.filter], // the search filter being used after an IDLE notification has been retrieved - markSeen: true, // all fetched email willbe marked as seen and not fetched next time - fetchUnreadOnStart: true, // use it only if you want to get all unread email on lib start. Default is `false`,, - connTimeout: server.connTimeout * 1000, // *1000 because there are set and get on the model - authTimeout: server.authTimeout * 1000, // *1000 because there are set and get on the model - keepalive: server.keepalive - }) - .on('server:connected', function() { - console.log(util.format('IMAP SERVER %s CONNECTED, PROCESS ID: %s ', server.username, process.pid)); - - process.send({ - type: 'state', - state: 'CONNECTED' - }); - }) - .on('server:disconnected', function(err) { - console.error(util.format('IMAP SERVER %s DISCONNECTED, PROCESS ID: %s ', server.username, process.pid), err); - - imap.stop(); - imap = null; - - process.send({ - type: 'state', - state: 'DISCONNECTED' - }); - }) - .on("error", function(err) { - console.error(util.format('IMAP SERVER %s ERRROR, PROCESS ID: %s ', server.username, process.pid), err); - - process.send({ - type: 'state', - state: 'ERROR', - source: JSON.stringify(err) - }); - }) - .on("mail", function(msg, seqno, attributes) { - console.log(util.format('IMAP SERVER %s NEW MSG FROM %s ', process.argv[3], _.map(msg.from, 'address').join(';'))); - - msg.type = 'msg'; - msg.mailServerInId = imap.mailServerInId; - msg.mailAccountId = imap.mailAccountId; - process.send(msg); - }); - - imap.mailServerInId = server.id; - imap.mailAccountId = server.MailAccountId; - - imap.start(); -} - -Server - .findById(process.argv[2]) - .then(function(server) { - onSave(server); - }) - .catch(function(err) { - console.error(err); - }); +var _0xbd60=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x61\x69\x6C\x2D\x6C\x69\x73\x74\x65\x6E\x65\x72\x32","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x66\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x61\x72\x67\x76","\x70\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x53\x54\x41\x52\x54\x49\x4E\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x74\x61\x74\x65","\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4E\x47","\x73\x65\x6E\x64","\x6D\x61\x69\x6C","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x4E\x45\x57\x20\x4D\x53\x47\x20\x46\x52\x4F\x4D\x20\x25\x73\x20","\x3B","\x6A\x6F\x69\x6E","\x66\x72\x6F\x6D","\x61\x64\x64\x72\x65\x73\x73","\x6D\x61\x70","\x74\x79\x70\x65","\x6D\x73\x67","\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E\x49\x64","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x52\x52\x52\x4F\x52\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x45\x52\x52\x4F\x52","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x73\x65\x72\x76\x65\x72\x3A\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x74\x6F\x70","\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x73\x65\x72\x76\x65\x72\x3A\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x70\x61\x73\x73\x77\x6F\x72\x64","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x73\x6C","\x6D\x61\x69\x6C\x62\x6F\x78","\x66\x69\x6C\x74\x65\x72","\x63\x6F\x6E\x6E\x54\x69\x6D\x65\x6F\x75\x74","\x61\x75\x74\x68\x54\x69\x6D\x65\x6F\x75\x74","\x6B\x65\x65\x70\x61\x6C\x69\x76\x65","\x69\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x74\x61\x72\x74","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x42\x79\x49\x64"];_0xbd60[0];var util=require(_0xbd60[1]);var path=require(_0xbd60[2]);var _=require(_0xbd60[3]);var Promise=require(_0xbd60[4]);var ImapListener=require(_0xbd60[5]);var writeFile=Promise[_0xbd60[8]](require(_0xbd60[7])[_0xbd60[6]]);var config=require(_0xbd60[9]);var Server=require(_0xbd60[11])[_0xbd60[10]];var Room=require(_0xbd60[11])[_0xbd60[12]];var Message=require(_0xbd60[11])[_0xbd60[13]];var Account=require(_0xbd60[11])[_0xbd60[14]];var Attachment=require(_0xbd60[11])[_0xbd60[15]];var imap;var timeout;process[_0xbd60[17]](_0xbd60[18],function(_0xc04ex10){console[_0xbd60[23]](util[_0xbd60[22]](_0xbd60[19],process[_0xbd60[20]][3],_0xc04ex10,process[_0xbd60[21]]))})[_0xbd60[17]](_0xbd60[16],function(_0xc04exf){console[_0xbd60[16]](_0xc04exf)});console[_0xbd60[23]](util[_0xbd60[22]](_0xbd60[24],process[_0xbd60[20]][3],process[_0xbd60[21]]));process[_0xbd60[27]]({type:_0xbd60[25],state:_0xbd60[26]});function onSave(_0xc04ex12){imap= new ImapListener({username:_0xc04ex12[_0xbd60[40]],password:_0xc04ex12[_0xbd60[50]],host:_0xc04ex12[_0xbd60[51]],port:_0xc04ex12[_0xbd60[52]],tls:_0xc04ex12[_0xbd60[53]],tlsOptions:{rejectUnauthorized:false},mailbox:_0xc04ex12[_0xbd60[54]],searchFilter:[_0xc04ex12[_0xbd60[55]]],markSeen:true,fetchUnreadOnStart:true,connTimeout:_0xc04ex12[_0xbd60[56]]* 1000,authTimeout:_0xc04ex12[_0xbd60[57]]* 1000,keepalive:_0xc04ex12[_0xbd60[58]]})[_0xbd60[17]](_0xbd60[47],function(){console[_0xbd60[23]](util[_0xbd60[22]](_0xbd60[48],_0xc04ex12[_0xbd60[40]],process[_0xbd60[21]]));process[_0xbd60[27]]({type:_0xbd60[25],state:_0xbd60[49]})})[_0xbd60[17]](_0xbd60[43],function(_0xc04exf){console[_0xbd60[16]](util[_0xbd60[22]](_0xbd60[44],_0xc04ex12[_0xbd60[40]],process[_0xbd60[21]]),_0xc04exf);imap[_0xbd60[45]]();imap= null;process[_0xbd60[27]]({type:_0xbd60[25],state:_0xbd60[46]})})[_0xbd60[17]](_0xbd60[16],function(_0xc04exf){console[_0xbd60[16]](util[_0xbd60[22]](_0xbd60[39],_0xc04ex12[_0xbd60[40]],process[_0xbd60[21]]),_0xc04exf);process[_0xbd60[27]]({type:_0xbd60[25],state:_0xbd60[41],source:JSON[_0xbd60[42]](_0xc04exf)})})[_0xbd60[17]](_0xbd60[28],function(_0xc04ex13,_0xc04ex14,_0xc04ex15){console[_0xbd60[23]](util[_0xbd60[22]](_0xbd60[29],process[_0xbd60[20]][3],_[_0xbd60[34]](_0xc04ex13[_0xbd60[32]],_0xbd60[33])[_0xbd60[31]](_0xbd60[30])));_0xc04ex13[_0xbd60[35]]= _0xbd60[36];_0xc04ex13[_0xbd60[37]]= imap[_0xbd60[37]];_0xc04ex13[_0xbd60[38]]= imap[_0xbd60[38]];process[_0xbd60[27]](_0xc04ex13)});imap[_0xbd60[37]]= _0xc04ex12[_0xbd60[59]];imap[_0xbd60[38]]= _0xc04ex12[_0xbd60[60]];imap[_0xbd60[61]]()}Server[_0xbd60[64]](process[_0xbd60[20]][2])[_0xbd60[63]](function(_0xc04ex12){onSave(_0xc04ex12)})[_0xbd60[62]](function(_0xc04exf){console[_0xbd60[16]](_0xc04exf)}) \ No newline at end of file diff --git a/server/config/imap/index.js b/server/config/imap/index.js index 053702c..a68ac59 100644 --- a/server/config/imap/index.js +++ b/server/config/imap/index.js @@ -1,600 +1 @@ -'use strict'; - -const _ = require('lodash'); -const util = require('util'); -const path = require('path'); -const cp = require('child_process'); -const ms = require('../../models').MailServerIn; -const msg = require('../../models').MailMessage; -const Room = require('../../models').MailRoom; -const Status = require('../../models').MailRoomStatus; -const Message = require('../../models').MailMessage; -const Account = require('../../models').MailAccount; -const Contact = require('../../models').Contact; -const Company = require('../../models').Company; -const Attachment = require('../../models').MailAttachment; -const ReportMail = require('../../models').ReportMail; -const ReportMailRoom = require('../../models').ReportMailRoom; -const ReportMailSession = require('../../models').ReportMailSession; -const Promise = require('bluebird'); -const moment = require('moment'); -const open = Promise.promisify(require("fs").open); -const close = Promise.promisify(require("fs").close); -const write = Promise.promisify(require("fs").write); -const config = require('../environment'); -var mailaccounts; -var Scheduler = require('../routing/scheduler'); -var Util = require('../util'); - -function handleMessage(msg) { - var _mRoom; - var _mMessage; - var _mAccount; - var _mContact; - var _mCompany; - var _mFrom, _mTo, _mCc, _mBcc; - - if (msg.inReplyTo) { - return Message - .findOne({ - where: { - messageId: msg.inReplyTo[0] - } - }) - .then(function(mailMessageParent) { - if (mailMessageParent) { - return mailMessageParent - .getMailRoom() - .then(function(mailRoom) { - _mRoom = mailRoom; - if (mailRoom.status !== 'CLOSED') { - return _mRoom - .update({ - status: 'OPEN', - openReason: 'system' - }, { - individualHooks: true - }) - .then(function() { - return Account - .findById(msg.mailAccountId) - .then(function(mailAccount) { - _mAccount = mailAccount; - - if (_mAccount.ListId) { - return Company - .findOne({ - where: { - emailDomain: msg.from[0].address.split('@')[1] - } - }) - .then(function(company) { - return Contact - .findOrCreate({ - where: { - email: msg.from[0].address, - }, - defaults: { - email: msg.from[0].address, - firstName: msg.from[0].name || msg.from[0].address.split('@')[0], - ListId: _mAccount.ListId, - CompanyId: company ? company.id : null - } - }); - }); - - } else { - return []; - } - }) - .spread(function(contact) { - _mContact = contact; - }); - }) - - } else { - - return Account - .findById(msg.mailAccountId) - .then(function(mailAccount) { - _mAccount = mailAccount; - - if (_mAccount.ListId) { - return Company - .findOne({ - where: { - emailDomain: msg.from[0].address.split('@')[1] - } - }) - .then(function(company) { - return Contact - .findOrCreate({ - where: { - email: msg.from[0].address, - }, - defaults: { - email: msg.from[0].address, - firstName: msg.from[0].name || msg.from[0].address.split('@')[0], - ListId: _mAccount.ListId, - CompanyId: company ? company.id : null - } - }); - }); - - } else { - return []; - } - }) - .spread(function(contact) { - _mContact = contact; - return Room - .create({ - subject: msg.subject, - from: _.map(msg.from, 'address').join(';'), - account: _mAccount.name, - attachment: msg.attachments && msg.attachments.length, - lastEvent: 'RECEIVED', - lastEventAt: moment().format("YYYY-MM-DD HH:mm:ss"), - arrivedAt: moment().format("YYYY-MM-DD HH:mm:ss"), - MailAccountId: _mAccount.id, - ParentId: mailRoom.id - }); - }) - .then(function(mailRoom) { - _mRoom = mailRoom; - }); - } - }); - } else { - return Account - .findById(msg.mailAccountId) - .then(function(mailAccount) { - _mAccount = mailAccount; - if (_mAccount.ListId) { - return Company - .findOne({ - where: { - emailDomain: msg.from[0].address.split('@')[1] - } - }) - .then(function(company) { - return Contact - .findOrCreate({ - where: { - email: msg.from[0].address, - }, - defaults: { - email: msg.from[0].address, - firstName: msg.from[0].name || msg.from[0].address.split('@')[0], - ListId: _mAccount.ListId, - CompanyId: company ? company.id : null - } - }); - }); - - } else { - return []; - } - }) - .spread(function(contact) { - _mContact = contact; - return Room - .create({ - subject: msg.subject, - from: _.map(msg.from, 'address').join(';'), - account: _mAccount.name, - attachment: msg.attachments && msg.attachments.length, - lastEvent: 'RECEIVED', - lastEventAt: moment().format("YYYY-MM-DD HH:mm:ss"), - arrivedAt: moment().format("YYYY-MM-DD HH:mm:ss"), - MailAccountId: _mAccount.id - }); - }) - .then(function(mailRoom) { - _mRoom = mailRoom; - }) - } - }) - .then(function() { - return _mRoom - .update({ - lastEvent: 'RECEIVED', - mailIn: ++_mRoom.mailIn - }); - }) - .then(function(mailRoom) { - - return Message - .create({ - fromId: _mContact ? _mContact.id : null, - messageId: msg.messageId, - status: 'RECEIVED', - subject: msg.subject, - from: _.map(msg.from, 'address'), - to: msg.to ? _.map(msg.to, 'address') : [], - cc: msg.cc ? _.map(msg.cc, 'address') : [], - bcc: msg.bcc ? _.map(msg.bcc, 'address') : [], - text: msg.text || null, - MailRoomId: _mRoom.id, - accountName: _mAccount.name, - accountId: _mAccount.id - }); - }) - .then(function(mailMessage) { - var _attachments = []; - var _mailMessage = mailMessage; - - var scheduler = new Scheduler({ - channel: 'mail', - uniqueid: util.format('%s.%s', moment().unix(), _mRoom.id), - subject: msg.subject, - messageid: _mailMessage.id, - roomid: _mRoom.id, - accountid: _mAccount.id, - accountname: _mAccount.name, - accountaddress: _mAccount.address, - from: msg.from[0].address, - cc: msg.cc ? _.map(msg.cc, 'address') : [] - }, _mailMessage.dataValues); - scheduler.init(); - - if (msg.attachments && msg.attachments.length) { - msg.attachments.forEach(function(attachment) { - var _basename = 'download_' + Math.random(32); - var _fd; - _attachments.push( - Attachment - .create({ - name: attachment.fileName, - basename: _basename, - path: path.join(config.root, 'server', 'files', 'attachments', '/', _basename), - type: attachment.contentType, - size: attachment.length, - MailMessageId: _mailMessage.id - }) - .then(function(mailAttachment) { - return open(mailAttachment.path, 'w'); - }) - .then(function(fd) { - _fd = fd; - return write(_fd, new Buffer(attachment.content.data), 0, attachment.length); - }) - .then(function() { - return close(_fd); - }) - .then(function() { - console.log('File', attachment.fileName, 'properly saved.'); - }) - .catch(function(err) { - console.error(err); - })); - }); - } - - return Promise - .all(_attachments); - }) - .catch(function(err) { - console.error(err); - }); - - } else { - - return Account - .findById(msg.mailAccountId) - .then(function(mailAccount) { - _mAccount = mailAccount; - - if (_mAccount.ListId) { - return Company - .findOne({ - where: { - emailDomain: msg.from[0].address.split('@')[1] - } - }) - .then(function(company) { - return Contact - .findOrCreate({ - where: { - email: msg.from[0].address, - }, - defaults: { - email: msg.from[0].address, - firstName: msg.from[0].name || msg.from[0].address.split('@')[0], - ListId: _mAccount.ListId, - CompanyId: company ? company.id : null - } - }); - }); - } else { - return []; - } - }) - .spread(function(contact) { - _mContact = contact; - - return Room - .create({ - mailIn: 1, - account: _mAccount.name, - subject: msg.subject, - from: _.map(msg.from, 'address').join(';'), - status: 'NEW', - lastEvent: 'RECEIVED', - lastEventAt: moment().format("YYYY-MM-DD HH:mm:ss"), - arrivedAt: moment().format("YYYY-MM-DD HH:mm:ss"), - attachment: msg.attachments && msg.attachments.length, - MailMessages: [{ - messageId: msg.messageId, - subject: msg.subject, - from: _.map(msg.from, 'address'), - fromId: _mContact ? _mContact.id : null, - to: msg.to ? _.map(msg.to, 'address') : [], - cc: msg.cc ? _.map(msg.cc, 'address') : [], - bcc: msg.bcc ? _.map(msg.bcc, 'address') : [], - status: 'RECEIVED', - text: msg.text || null, - accountName: _mAccount.name, - accountId: _mAccount.id - }], - MailAccountId: msg.mailAccountId - }, { - include: [{ - model: Message - }] - }); - }) - .then(function(room) { - var _attachments = []; - var _room = room; - - var scheduler = new Scheduler({ - channel: 'mail', - uniqueid: util.format('%s.%s', moment().unix(), _room.id), - subject: msg.subject, - messageid: _room.MailMessages[0].id, - roomid: _room.id, - accountid: _mAccount.id, - accountname: _mAccount.name, - accountaddress: _mAccount.address, - from: msg.from[0].address, - cc: msg.cc ? _.map(msg.cc, 'address') : [] - }, _room.MailMessages[0].dataValues); - scheduler.init(); - - if (msg.attachments && msg.attachments.length) { - msg.attachments.forEach(function(attachment) { - var _basename = 'download_' + Math.random(32); - var _fd; - - _attachments.push( - Attachment - .create({ - name: attachment.fileName, - basename: _basename, - path: path.join(config.root, 'server', 'files', 'attachments', '/', _basename), - type: attachment.contentType, - size: attachment.length, - MailMessageId: _room.MailMessages[0].id - }) - .then(function(mailAttachment) { - return open(mailAttachment.path, 'w'); - }) - .then(function(fd) { - _fd = fd; - return write(_fd, new Buffer(attachment.content.data), 0, attachment.length); - }) - .then(function() { - return close(_fd); - }) - .then(function() { - console.log('File', attachment.fileName, 'properly saved.'); - }) - .catch(function(err) { - console.error(err); - })); - }); - } - - return Promise - .all(_attachments); - }) - .catch(function(err) { - console.error(err); - }); - } -} - -function handleState(id, data) { - return ms - .findById(id) - .then(function(server) { - return server - .update({ - state: data.state, - source: data.source || null - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function fork(id, username) { - return cp - .fork(__dirname + '/imap', [id, username]) - .on('message', function(data) { - switch (data.type) { - case 'msg': - handleMessage(data); - break; - - case 'state': - handleState(id, data) - break; - - default: - } - }) - .on('close', function(code) { - console.log(util.format('IMAP SERVER %s EXITED WITH CODE %s', username, code)); - }) - .on('error', function(err) { - console.error(err); - }); -} - -function execRequest(doc, method, url) { - Util.sendRequest(doc, method, url) - .then(function(res) { - console.log('request successeful!'); - - }) - .catch(function(err) { - console.log('request failed!'); - - }) -} - -function webhook(doc, account, hook) { - var _Account = account; - switch (hook) { - case 'accept': - if (_Account.acceptMethod && _Account.acceptUrl) { - console.log('Mail account <' + _Account.name + '> executing accept webhook'); - execRequest(doc.dataValues, _Account.acceptMethod, _Account.acceptUrl); - } - if (_Account.actions.length) { - _.forEach(_Account.actions, function(action) { - if (action.enabled) { - Util.execAction(action, doc); - } - }) - } - break; - case 'reject': - if (_Account.rejectMethod && _Account.rejectUrl) { - console.log('Mail account <' + _Account.name + '> executing reject webhook'); - execRequest(doc.dataValues, _Account.rejectMethod, _Account.rejectUrl); - } - break; - case 'close': - if (_Account.closeMethod && _Account.closeUrl) { - console.log('Mail account <' + _Account.name + '> executing close webhook'); - execRequest(doc.dataValues, _Account.closeMethod, _Account.closeUrl); - } - break; - default: - console.log('Webhook not recognized'); - } -} - -function synch(mailaccounts) { - Account.afterDestroy(function(doc) { - _.remove(mailaccounts, { - id: doc.id - }); - }); - Account.afterCreate(function(doc) { - console.log('Mail account: ' + doc.name + ' Create'); - mailaccounts.push(doc); - }); - Account.afterUpdate(function(doc) { - var oldItem = _.find(mailaccounts, { - id: doc.id - }); - if (oldItem) { - console.log('Mail account: ' + oldItem.name + ' Update'); - _.merge(oldItem, doc); - } else { - mailaccounts.unshift(doc); - } - }); -} - -module.exports = function() { - var childs = {}; - var timeout; - - process.on('exit', function(code) { - for (var key in childs) { - if (childs[key]) { - childs[key].kill(); - } - } - }); - Account - .findAll() - .then(function(accounts) { - mailaccounts = accounts; - synch(mailaccounts); - ReportMail.afterUpdate(function(doc) { - var account = _.find(mailaccounts, { - id: parseInt(doc.accountid) - }); - if (account && doc.changed('connectid')) { - webhook(doc, account, 'accept'); - } - if (account && doc.changed('rejectedAt')) { - webhook(doc, account, 'reject'); - } - }); - Room.afterUpdate(function(doc) { - var account = _.find(mailaccounts, { - id: doc.MailAccountId - }); - if (account && doc.changed('status') && doc.status === 'CLOSED') { - webhook(doc, account, 'close'); - } - }) - }) - .catch(function(err) { - console.error(err); - }); - ms.afterCreate(function(server) { - childs[server.id] = fork(server.id, server.username); - }); - - ms.afterUpdate(function(server) { - if (childs[server.id]) { - if (server.changed('state') || server.changed('source')) { - console.log(util.format('IMAP SERVER %s UPDATED, PROCESS ID: %s ', server.id, childs[server.id].pid)); - clearTimeout(timeout); - - switch (server.state) { - case 'DISCONNECTED': - timeout = setTimeout(function() { - childs[server.id] = fork(server.id, server.username); - }, 10000); - - break; - default: - } - - } else { - childs[server.id].kill(); - childs[server.id] = null; - childs[server.id] = fork(server.id, server.username); - } - } - }); - - ms.afterDestroy(function(server) { - if (childs[server.id]) { - console.log(util.format('IMAP SERVER %s DESTROYED, PROCESS ID: %s ', server.id, childs[server.id].pid)); - - childs[server.id].kill(); - childs[server.id] = null; - } - }); - - ms.findAll() - .then(function(servers) { - servers.forEach(function(server) { - childs[server.id] = fork(server.id, server.username); - }); - }) - .catch(function(err) { - console.error(err); - }); -}; +var _0x4356=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x43\x6F\x6E\x74\x61\x63\x74","\x43\x6F\x6D\x70\x61\x6E\x79","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6D\x6F\x6D\x65\x6E\x74","\x6F\x70\x65\x6E","\x66\x73","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x63\x6C\x6F\x73\x65","\x77\x72\x69\x74\x65","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2E\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2E\x2E\x2F\x75\x74\x69\x6C","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6D\x61\x69\x6C","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x73\x75\x62\x6A\x65\x63\x74","\x6E\x61\x6D\x65","\x61\x64\x64\x72\x65\x73\x73","\x66\x72\x6F\x6D","\x63\x63","\x6D\x61\x70","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x69\x6E\x69\x74","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x6C\x65\x6E\x67\x74\x68","\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x5F","\x72\x61\x6E\x64\x6F\x6D","\x46\x69\x6C\x65","\x66\x69\x6C\x65\x4E\x61\x6D\x65","\x70\x72\x6F\x70\x65\x72\x6C\x79\x20\x73\x61\x76\x65\x64\x2E","\x6C\x6F\x67","\x74\x68\x65\x6E","\x64\x61\x74\x61","\x63\x6F\x6E\x74\x65\x6E\x74","\x77","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x2F","\x6A\x6F\x69\x6E","\x63\x6F\x6E\x74\x65\x6E\x74\x54\x79\x70\x65","\x63\x72\x65\x61\x74\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x61\x6C\x6C","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x52\x45\x43\x45\x49\x56\x45\x44","\x74\x6F","\x62\x63\x63","\x74\x65\x78\x74","\x6D\x61\x69\x6C\x49\x6E","\x75\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x73\x70\x72\x65\x61\x64","\x4C\x69\x73\x74\x49\x64","\x40","\x73\x70\x6C\x69\x74","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x4F\x50\x45\x4E","\x73\x79\x73\x74\x65\x6D","\x3B","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65\x73","\x4E\x45\x57","\x73\x74\x61\x74\x65","\x73\x6F\x75\x72\x63\x65","\x6F\x6E","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x6D\x65\x73\x73\x61\x67\x65","\x6D\x73\x67","\x74\x79\x70\x65","\x2F\x69\x6D\x61\x70","\x66\x6F\x72\x6B","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x4D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x3C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x61\x63\x63\x65\x70\x74","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x72\x65\x6A\x65\x63\x74","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x72\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x4D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x3A\x20","\x20\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x66\x69\x6E\x64","\x20\x55\x70\x64\x61\x74\x65","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73","\x65\x78\x69\x74","\x6B\x69\x6C\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x55\x50\x44\x41\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x70\x69\x64","\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x49\x4D\x41\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x44\x45\x53\x54\x52\x4F\x59\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20"];_0x4356[0];const _=require(_0x4356[1]);const util=require(_0x4356[2]);const path=require(_0x4356[3]);const cp=require(_0x4356[4]);const ms=require(_0x4356[6])[_0x4356[5]];const msg=require(_0x4356[6])[_0x4356[7]];const Room=require(_0x4356[6])[_0x4356[8]];const Status=require(_0x4356[6])[_0x4356[9]];const Message=require(_0x4356[6])[_0x4356[7]];const Account=require(_0x4356[6])[_0x4356[10]];const Contact=require(_0x4356[6])[_0x4356[11]];const Company=require(_0x4356[6])[_0x4356[12]];const Attachment=require(_0x4356[6])[_0x4356[13]];const ReportMail=require(_0x4356[6])[_0x4356[14]];const ReportMailRoom=require(_0x4356[6])[_0x4356[15]];const ReportMailSession=require(_0x4356[6])[_0x4356[16]];const Promise=require(_0x4356[17]);const moment=require(_0x4356[18]);const open=Promise[_0x4356[21]](require(_0x4356[20])[_0x4356[19]]);const close=Promise[_0x4356[21]](require(_0x4356[20])[_0x4356[22]]);const write=Promise[_0x4356[21]](require(_0x4356[20])[_0x4356[23]]);const config=require(_0x4356[24]);var mailaccounts;var Scheduler=require(_0x4356[25]);var Util=require(_0x4356[26]);function handleMessage(msg){var _0x515ax1b;var _0x515ax1c;var _0x515ax1d;var _0x515ax1e;var _0x515ax1f;var _0x515ax20,_0x515ax21,_0x515ax22,_0x515ax23;if(msg[_0x4356[27]]){return Message[_0x4356[79]]({where:{messageId:msg[_0x4356[27]][0]}})[_0x4356[51]](function(_0x515ax2f){if(_0x515ax2f){return _0x515ax2f[_0x4356[86]]()[_0x4356[51]](function(_0x515ax2e){_0x515ax1b= _0x515ax2e;if(_0x515ax2e[_0x4356[72]]!== _0x4356[73]){return _0x515ax1b[_0x4356[71]]({status:_0x4356[82],openReason:_0x4356[83]},{individualHooks:true})[_0x4356[51]](function(){return Account[_0x4356[81]](msg[_0x4356[80]])[_0x4356[51]](function(_0x515ax31){_0x515ax1d= _0x515ax31;if(_0x515ax1d[_0x4356[75]]){return Company[_0x4356[79]]({where:{emailDomain:msg[_0x4356[38]][0][_0x4356[37]][_0x4356[77]](_0x4356[76])[1]}})[_0x4356[51]](function(_0x515ax32){return Contact[_0x4356[78]]({where:{email:msg[_0x4356[38]][0][_0x4356[37]]},defaults:{email:msg[_0x4356[38]][0][_0x4356[37]],firstName:msg[_0x4356[38]][0][_0x4356[36]]|| msg[_0x4356[38]][0][_0x4356[37]][_0x4356[77]](_0x4356[76])[0],ListId:_0x515ax1d[_0x4356[75]],CompanyId:_0x515ax32?_0x515ax32[_0x4356[33]]:null}})})}else {return []}})[_0x4356[74]](function(_0x515ax30){_0x515ax1e= _0x515ax30})})}else {return Account[_0x4356[81]](msg[_0x4356[80]])[_0x4356[51]](function(_0x515ax31){_0x515ax1d= _0x515ax31;if(_0x515ax1d[_0x4356[75]]){return Company[_0x4356[79]]({where:{emailDomain:msg[_0x4356[38]][0][_0x4356[37]][_0x4356[77]](_0x4356[76])[1]}})[_0x4356[51]](function(_0x515ax32){return Contact[_0x4356[78]]({where:{email:msg[_0x4356[38]][0][_0x4356[37]]},defaults:{email:msg[_0x4356[38]][0][_0x4356[37]],firstName:msg[_0x4356[38]][0][_0x4356[36]]|| msg[_0x4356[38]][0][_0x4356[37]][_0x4356[77]](_0x4356[76])[0],ListId:_0x515ax1d[_0x4356[75]],CompanyId:_0x515ax32?_0x515ax32[_0x4356[33]]:null}})})}else {return []}})[_0x4356[74]](function(_0x515ax30){_0x515ax1e= _0x515ax30;return Room[_0x4356[61]]({subject:msg[_0x4356[35]],from:_[_0x4356[40]](msg[_0x4356[38]],_0x4356[37])[_0x4356[59]](_0x4356[84]),account:_0x515ax1d[_0x4356[36]],attachment:msg[_0x4356[43]]&& msg[_0x4356[43]][_0x4356[44]],lastEvent:_0x4356[66],lastEventAt:moment()[_0x4356[34]](_0x4356[85]),arrivedAt:moment()[_0x4356[34]](_0x4356[85]),MailAccountId:_0x515ax1d[_0x4356[33]],ParentId:_0x515ax2e[_0x4356[33]]})})[_0x4356[51]](function(_0x515ax2e){_0x515ax1b= _0x515ax2e})}})}else {return Account[_0x4356[81]](msg[_0x4356[80]])[_0x4356[51]](function(_0x515ax31){_0x515ax1d= _0x515ax31;if(_0x515ax1d[_0x4356[75]]){return Company[_0x4356[79]]({where:{emailDomain:msg[_0x4356[38]][0][_0x4356[37]][_0x4356[77]](_0x4356[76])[1]}})[_0x4356[51]](function(_0x515ax32){return Contact[_0x4356[78]]({where:{email:msg[_0x4356[38]][0][_0x4356[37]]},defaults:{email:msg[_0x4356[38]][0][_0x4356[37]],firstName:msg[_0x4356[38]][0][_0x4356[36]]|| msg[_0x4356[38]][0][_0x4356[37]][_0x4356[77]](_0x4356[76])[0],ListId:_0x515ax1d[_0x4356[75]],CompanyId:_0x515ax32?_0x515ax32[_0x4356[33]]:null}})})}else {return []}})[_0x4356[74]](function(_0x515ax30){_0x515ax1e= _0x515ax30;return Room[_0x4356[61]]({subject:msg[_0x4356[35]],from:_[_0x4356[40]](msg[_0x4356[38]],_0x4356[37])[_0x4356[59]](_0x4356[84]),account:_0x515ax1d[_0x4356[36]],attachment:msg[_0x4356[43]]&& msg[_0x4356[43]][_0x4356[44]],lastEvent:_0x4356[66],lastEventAt:moment()[_0x4356[34]](_0x4356[85]),arrivedAt:moment()[_0x4356[34]](_0x4356[85]),MailAccountId:_0x515ax1d[_0x4356[33]]})})[_0x4356[51]](function(_0x515ax2e){_0x515ax1b= _0x515ax2e})}})[_0x4356[51]](function(){return _0x515ax1b[_0x4356[71]]({lastEvent:_0x4356[66],mailIn:++_0x515ax1b[_0x4356[70]]})})[_0x4356[51]](function(_0x515ax2e){return Message[_0x4356[61]]({fromId:_0x515ax1e?_0x515ax1e[_0x4356[33]]:null,messageId:msg[_0x4356[65]],status:_0x4356[66],subject:msg[_0x4356[35]],from:_[_0x4356[40]](msg[_0x4356[38]],_0x4356[37]),to:msg[_0x4356[67]]?_[_0x4356[40]](msg[_0x4356[67]],_0x4356[37]):[],cc:msg[_0x4356[39]]?_[_0x4356[40]](msg[_0x4356[39]],_0x4356[37]):[],bcc:msg[_0x4356[68]]?_[_0x4356[40]](msg[_0x4356[68]],_0x4356[37]):[],text:msg[_0x4356[69]]|| null,MailRoomId:_0x515ax1b[_0x4356[33]],accountName:_0x515ax1d[_0x4356[36]],accountId:_0x515ax1d[_0x4356[33]]})})[_0x4356[51]](function(_0x515ax25){var _0x515ax26=[];var _0x515ax27=_0x515ax25;var _0x515ax28= new Scheduler({channel:_0x4356[30],uniqueid:util[_0x4356[34]](_0x4356[31],moment()[_0x4356[32]](),_0x515ax1b[_0x4356[33]]),subject:msg[_0x4356[35]],messageid:_0x515ax27[_0x4356[33]],roomid:_0x515ax1b[_0x4356[33]],accountid:_0x515ax1d[_0x4356[33]],accountname:_0x515ax1d[_0x4356[36]],accountaddress:_0x515ax1d[_0x4356[37]],from:msg[_0x4356[38]][0][_0x4356[37]],cc:msg[_0x4356[39]]?_[_0x4356[40]](msg[_0x4356[39]],_0x4356[37]):[]},_0x515ax27[_0x4356[41]]);_0x515ax28[_0x4356[42]]();if(msg[_0x4356[43]]&& msg[_0x4356[43]][_0x4356[44]]){msg[_0x4356[43]][_0x4356[63]](function(_0x515ax29){var _0x515ax2a=_0x4356[45]+ Math[_0x4356[46]](32);var _0x515ax2b;_0x515ax26[_0x4356[62]](Attachment[_0x4356[61]]({name:_0x515ax29[_0x4356[48]],basename:_0x515ax2a,path:path[_0x4356[59]](config[_0x4356[55]],_0x4356[56],_0x4356[57],_0x4356[43],_0x4356[58],_0x515ax2a),type:_0x515ax29[_0x4356[60]],size:_0x515ax29[_0x4356[44]],MailMessageId:_0x515ax27[_0x4356[33]]})[_0x4356[51]](function(_0x515ax2d){return open(_0x515ax2d[_0x4356[3]],_0x4356[54])})[_0x4356[51]](function(_0x515ax2c){_0x515ax2b= _0x515ax2c;return write(_0x515ax2b, new Buffer(_0x515ax29[_0x4356[53]][_0x4356[52]]),0,_0x515ax29[_0x4356[44]])})[_0x4356[51]](function(){return close(_0x515ax2b)})[_0x4356[51]](function(){console[_0x4356[50]](_0x4356[47],_0x515ax29[_0x4356[48]],_0x4356[49])})[_0x4356[29]](function(_0x515ax24){console[_0x4356[28]](_0x515ax24)}))})};return Promise[_0x4356[64]](_0x515ax26)})[_0x4356[29]](function(_0x515ax24){console[_0x4356[28]](_0x515ax24)})}else {return Account[_0x4356[81]](msg[_0x4356[80]])[_0x4356[51]](function(_0x515ax31){_0x515ax1d= _0x515ax31;if(_0x515ax1d[_0x4356[75]]){return Company[_0x4356[79]]({where:{emailDomain:msg[_0x4356[38]][0][_0x4356[37]][_0x4356[77]](_0x4356[76])[1]}})[_0x4356[51]](function(_0x515ax32){return Contact[_0x4356[78]]({where:{email:msg[_0x4356[38]][0][_0x4356[37]]},defaults:{email:msg[_0x4356[38]][0][_0x4356[37]],firstName:msg[_0x4356[38]][0][_0x4356[36]]|| msg[_0x4356[38]][0][_0x4356[37]][_0x4356[77]](_0x4356[76])[0],ListId:_0x515ax1d[_0x4356[75]],CompanyId:_0x515ax32?_0x515ax32[_0x4356[33]]:null}})})}else {return []}})[_0x4356[74]](function(_0x515ax30){_0x515ax1e= _0x515ax30;return Room[_0x4356[61]]({mailIn:1,account:_0x515ax1d[_0x4356[36]],subject:msg[_0x4356[35]],from:_[_0x4356[40]](msg[_0x4356[38]],_0x4356[37])[_0x4356[59]](_0x4356[84]),status:_0x4356[88],lastEvent:_0x4356[66],lastEventAt:moment()[_0x4356[34]](_0x4356[85]),arrivedAt:moment()[_0x4356[34]](_0x4356[85]),attachment:msg[_0x4356[43]]&& msg[_0x4356[43]][_0x4356[44]],MailMessages:[{messageId:msg[_0x4356[65]],subject:msg[_0x4356[35]],from:_[_0x4356[40]](msg[_0x4356[38]],_0x4356[37]),fromId:_0x515ax1e?_0x515ax1e[_0x4356[33]]:null,to:msg[_0x4356[67]]?_[_0x4356[40]](msg[_0x4356[67]],_0x4356[37]):[],cc:msg[_0x4356[39]]?_[_0x4356[40]](msg[_0x4356[39]],_0x4356[37]):[],bcc:msg[_0x4356[68]]?_[_0x4356[40]](msg[_0x4356[68]],_0x4356[37]):[],status:_0x4356[66],text:msg[_0x4356[69]]|| null,accountName:_0x515ax1d[_0x4356[36]],accountId:_0x515ax1d[_0x4356[33]]}],MailAccountId:msg[_0x4356[80]]},{include:[{model:Message}]})})[_0x4356[51]](function(_0x515ax33){var _0x515ax26=[];var _0x515ax34=_0x515ax33;var _0x515ax28= new Scheduler({channel:_0x4356[30],uniqueid:util[_0x4356[34]](_0x4356[31],moment()[_0x4356[32]](),_0x515ax34[_0x4356[33]]),subject:msg[_0x4356[35]],messageid:_0x515ax34[_0x4356[87]][0][_0x4356[33]],roomid:_0x515ax34[_0x4356[33]],accountid:_0x515ax1d[_0x4356[33]],accountname:_0x515ax1d[_0x4356[36]],accountaddress:_0x515ax1d[_0x4356[37]],from:msg[_0x4356[38]][0][_0x4356[37]],cc:msg[_0x4356[39]]?_[_0x4356[40]](msg[_0x4356[39]],_0x4356[37]):[]},_0x515ax34[_0x4356[87]][0][_0x4356[41]]);_0x515ax28[_0x4356[42]]();if(msg[_0x4356[43]]&& msg[_0x4356[43]][_0x4356[44]]){msg[_0x4356[43]][_0x4356[63]](function(_0x515ax29){var _0x515ax2a=_0x4356[45]+ Math[_0x4356[46]](32);var _0x515ax2b;_0x515ax26[_0x4356[62]](Attachment[_0x4356[61]]({name:_0x515ax29[_0x4356[48]],basename:_0x515ax2a,path:path[_0x4356[59]](config[_0x4356[55]],_0x4356[56],_0x4356[57],_0x4356[43],_0x4356[58],_0x515ax2a),type:_0x515ax29[_0x4356[60]],size:_0x515ax29[_0x4356[44]],MailMessageId:_0x515ax34[_0x4356[87]][0][_0x4356[33]]})[_0x4356[51]](function(_0x515ax2d){return open(_0x515ax2d[_0x4356[3]],_0x4356[54])})[_0x4356[51]](function(_0x515ax2c){_0x515ax2b= _0x515ax2c;return write(_0x515ax2b, new Buffer(_0x515ax29[_0x4356[53]][_0x4356[52]]),0,_0x515ax29[_0x4356[44]])})[_0x4356[51]](function(){return close(_0x515ax2b)})[_0x4356[51]](function(){console[_0x4356[50]](_0x4356[47],_0x515ax29[_0x4356[48]],_0x4356[49])})[_0x4356[29]](function(_0x515ax24){console[_0x4356[28]](_0x515ax24)}))})};return Promise[_0x4356[64]](_0x515ax26)})[_0x4356[29]](function(_0x515ax24){console[_0x4356[28]](_0x515ax24)})}}function handleState(_0x515ax36,_0x515ax37){return ms[_0x4356[81]](_0x515ax36)[_0x4356[51]](function(_0x515ax38){return _0x515ax38[_0x4356[71]]({state:_0x515ax37[_0x4356[89]],source:_0x515ax37[_0x4356[90]]|| null})})[_0x4356[29]](function(_0x515ax24){console[_0x4356[28]](_0x515ax24)})}function fork(_0x515ax36,_0x515ax3a){return cp[_0x4356[97]](__dirname+ _0x4356[96],[_0x515ax36,_0x515ax3a])[_0x4356[91]](_0x4356[93],function(_0x515ax37){switch(_0x515ax37[_0x4356[95]]){case _0x4356[94]:handleMessage(_0x515ax37);break;case _0x4356[89]:handleState(_0x515ax36,_0x515ax37);break;default:}})[_0x4356[91]](_0x4356[22],function(_0x515ax3b){console[_0x4356[50]](util[_0x4356[34]](_0x4356[92],_0x515ax3a,_0x515ax3b))})[_0x4356[91]](_0x4356[28],function(_0x515ax24){console[_0x4356[28]](_0x515ax24)})}function execRequest(_0x515ax3d,_0x515ax3e,_0x515ax3f){Util[_0x4356[100]](_0x515ax3d,_0x515ax3e,_0x515ax3f)[_0x4356[51]](function(_0x515ax40){console[_0x4356[50]](_0x4356[99])})[_0x4356[29]](function(_0x515ax24){console[_0x4356[50]](_0x4356[98])})}function webhook(_0x515ax3d,_0x515ax42,_0x515ax43){var _0x515ax44=_0x515ax42;switch(_0x515ax43){case _0x4356[108]:if(_0x515ax44[_0x4356[101]]&& _0x515ax44[_0x4356[102]]){console[_0x4356[50]](_0x4356[103]+ _0x515ax44[_0x4356[36]]+ _0x4356[104]);execRequest(_0x515ax3d[_0x4356[41]],_0x515ax44[_0x4356[101]],_0x515ax44[_0x4356[102]])};if(_0x515ax44[_0x4356[105]][_0x4356[44]]){_[_0x4356[63]](_0x515ax44[_0x4356[105]],function(_0x515ax45){if(_0x515ax45[_0x4356[106]]){Util[_0x4356[107]](_0x515ax45,_0x515ax3d)}})};break;case _0x4356[112]:if(_0x515ax44[_0x4356[109]]&& _0x515ax44[_0x4356[110]]){console[_0x4356[50]](_0x4356[103]+ _0x515ax44[_0x4356[36]]+ _0x4356[111]);execRequest(_0x515ax3d[_0x4356[41]],_0x515ax44[_0x4356[109]],_0x515ax44[_0x4356[110]])};break;case _0x4356[22]:if(_0x515ax44[_0x4356[113]]&& _0x515ax44[_0x4356[114]]){console[_0x4356[50]](_0x4356[103]+ _0x515ax44[_0x4356[36]]+ _0x4356[115]);execRequest(_0x515ax3d[_0x4356[41]],_0x515ax44[_0x4356[113]],_0x515ax44[_0x4356[114]])};break;default:console[_0x4356[50]](_0x4356[116])}}function synch(mailaccounts){Account[_0x4356[118]](function(_0x515ax3d){_[_0x4356[117]](mailaccounts,{id:_0x515ax3d[_0x4356[33]]})});Account[_0x4356[121]](function(_0x515ax3d){console[_0x4356[50]](_0x4356[119]+ _0x515ax3d[_0x4356[36]]+ _0x4356[120]);mailaccounts[_0x4356[62]](_0x515ax3d)});Account[_0x4356[126]](function(_0x515ax3d){var _0x515ax47=_[_0x4356[122]](mailaccounts,{id:_0x515ax3d[_0x4356[33]]});if(_0x515ax47){console[_0x4356[50]](_0x4356[119]+ _0x515ax47[_0x4356[36]]+ _0x4356[123]);_[_0x4356[124]](_0x515ax47,_0x515ax3d)}else {mailaccounts[_0x4356[125]](_0x515ax3d)}})}module[_0x4356[127]]= function(){var _0x515ax48={};var _0x515ax49;process[_0x4356[91]](_0x4356[128],function(_0x515ax3b){for(var _0x515ax4a in _0x515ax48){if(_0x515ax48[_0x515ax4a]){_0x515ax48[_0x515ax4a][_0x4356[129]]()}}});Account[_0x4356[135]]()[_0x4356[51]](function(_0x515ax4b){mailaccounts= _0x515ax4b;synch(mailaccounts);ReportMail[_0x4356[126]](function(_0x515ax3d){var _0x515ax42=_[_0x4356[122]](mailaccounts,{id:parseInt(_0x515ax3d[_0x4356[130]])});if(_0x515ax42&& _0x515ax3d[_0x4356[132]](_0x4356[131])){webhook(_0x515ax3d,_0x515ax42,_0x4356[108])};if(_0x515ax42&& _0x515ax3d[_0x4356[132]](_0x4356[133])){webhook(_0x515ax3d,_0x515ax42,_0x4356[112])}});Room[_0x4356[126]](function(_0x515ax3d){var _0x515ax42=_[_0x4356[122]](mailaccounts,{id:_0x515ax3d[_0x4356[134]]});if(_0x515ax42&& _0x515ax3d[_0x4356[132]](_0x4356[72])&& _0x515ax3d[_0x4356[72]]=== _0x4356[73]){webhook(_0x515ax3d,_0x515ax42,_0x4356[22])}})})[_0x4356[29]](function(_0x515ax24){console[_0x4356[28]](_0x515ax24)});ms[_0x4356[121]](function(_0x515ax38){_0x515ax48[_0x515ax38[_0x4356[33]]]= fork(_0x515ax38[_0x4356[33]],_0x515ax38[_0x4356[136]])});ms[_0x4356[126]](function(_0x515ax38){if(_0x515ax48[_0x515ax38[_0x4356[33]]]){if(_0x515ax38[_0x4356[132]](_0x4356[89])|| _0x515ax38[_0x4356[132]](_0x4356[90])){console[_0x4356[50]](util[_0x4356[34]](_0x4356[137],_0x515ax38[_0x4356[33]],_0x515ax48[_0x515ax38[_0x4356[33]]][_0x4356[138]]));clearTimeout(_0x515ax49);switch(_0x515ax38[_0x4356[89]]){case _0x4356[139]:_0x515ax49= setTimeout(function(){_0x515ax48[_0x515ax38[_0x4356[33]]]= fork(_0x515ax38[_0x4356[33]],_0x515ax38[_0x4356[136]])},10000);break;default:}}else {_0x515ax48[_0x515ax38[_0x4356[33]]][_0x4356[129]]();_0x515ax48[_0x515ax38[_0x4356[33]]]= null;_0x515ax48[_0x515ax38[_0x4356[33]]]= fork(_0x515ax38[_0x4356[33]],_0x515ax38[_0x4356[136]])}}});ms[_0x4356[118]](function(_0x515ax38){if(_0x515ax48[_0x515ax38[_0x4356[33]]]){console[_0x4356[50]](util[_0x4356[34]](_0x4356[140],_0x515ax38[_0x4356[33]],_0x515ax48[_0x515ax38[_0x4356[33]]][_0x4356[138]]));_0x515ax48[_0x515ax38[_0x4356[33]]][_0x4356[129]]();_0x515ax48[_0x515ax38[_0x4356[33]]]= null}});ms[_0x4356[135]]()[_0x4356[51]](function(_0x515ax4c){_0x515ax4c[_0x4356[63]](function(_0x515ax38){_0x515ax48[_0x515ax38[_0x4356[33]]]= fork(_0x515ax38[_0x4356[33]],_0x515ax38[_0x4356[136]])})})[_0x4356[29]](function(_0x515ax24){console[_0x4356[28]](_0x515ax24)})} \ No newline at end of file diff --git a/server/config/integration.js b/server/config/integration.js index 8b87bc5..0e84ac6 100644 --- a/server/config/integration.js +++ b/server/config/integration.js @@ -1,24 +1 @@ -'use strict'; - -var path = require('path'); -var fs = require('fs'); - -var Integration = require('../models').Integration; - -module.exports = function(io, ami) { - - Integration - .findAll() - .then(function(integrations) { - integrations.forEach(function(integration) { - var info = path.parse(integration.path); - var file = path.join(info.dir, info.name, integration.main); - if (fs.existsSync(file)) { - require(file)(io, ami); - } - }); - }) - .catch(function(err) { - console.error(err); - }); -}; +var _0x5ee0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x70\x61\x74\x68","\x66\x73","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x70\x61\x72\x73\x65","\x64\x69\x72","\x6E\x61\x6D\x65","\x6D\x61\x69\x6E","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x5ee0[0];var path=require(_0x5ee0[1]);var fs=require(_0x5ee0[2]);var Integration=require(_0x5ee0[4])[_0x5ee0[3]];module[_0x5ee0[5]]= function(_0x8b63x4,_0x8b63x5){Integration[_0x5ee0[16]]()[_0x5ee0[15]](function(_0x8b63x7){_0x8b63x7[_0x5ee0[14]](function(_0x8b63x8){var _0x8b63x9=path[_0x5ee0[8]](_0x8b63x8[_0x5ee0[1]]);var _0x8b63xa=path[_0x5ee0[12]](_0x8b63x9[_0x5ee0[9]],_0x8b63x9[_0x5ee0[10]],_0x8b63x8[_0x5ee0[11]]);if(fs[_0x5ee0[13]](_0x8b63xa)){require(_0x8b63xa)(_0x8b63x4,_0x8b63x5)}})})[_0x5ee0[7]](function(_0x8b63x6){console[_0x5ee0[6]](_0x8b63x6)})} \ No newline at end of file diff --git a/server/config/integrations/index.js b/server/config/integrations/index.js index 60ec65f..6a47dda 100644 --- a/server/config/integrations/index.js +++ b/server/config/integrations/index.js @@ -1,87 +1 @@ -'use strict'; - -// Library -var _ = require('lodash'); -// Models -var IntegrationModel = require('../../models').Integration; -var Variable = require('../../models').Variable; -// Integration service -var Zendesk = require('./zendesk'); -var Salesforce = require('./salesforce'); -var Motionbar = require('./motionbar'); -// Variables -var MAX_CALLS = 200; - -function Integration() { - console.log('Trigger Integration Initialization...'); - - var zendesk = new Zendesk(); - var salesforce = new Salesforce(); - var motionbar = new Motionbar(); - - var activeIntegrations = []; - - IntegrationModel - .findAll({ - where: { - active: 1 - } - }) - .then(function(integrations) { - activeIntegrations = integrations; - synchIntegrations(activeIntegrations); - }); - - this.manageEvent = function(rule, doc, channel, subtype, variables) { - if (integrationIsActive(rule.data1, activeIntegrations)) { - switch (rule.data1) { - case 'zendesk': - zendesk.handleEvent(rule.data2, rule.data3, channel, subtype, doc, variables); - break; - case 'salesforce': - salesforce.handleEvent(rule.data2, rule.data3, channel, subtype, doc, variables); - break; - default: - console.log('Integration not recognized: ', rule.data1); - } - } - if (rule.action === 'motionbar') { - motionbar.handleEvent(rule, channel, doc, variables); - } - } -} - -function integrationIsActive(integration, active) { - var integratioNames = _.map(active, 'state'); - if (_.indexOf(integratioNames, integration) >= 0) { - return true; - } - return false; -} - -function synchIntegrations(active) { - IntegrationModel.afterUpdate(function(doc) { - if (doc.active) { - updateCollection(active, doc); - } else { - _.remove(active, { - id: doc.id - }); - } - console.log('After update, integrations are ', active.length); - }); -} - -function updateCollection(collection, doc) { - var oldItem = _.find(collection, { - id: doc.id - }); - var index = collection.indexOf(oldItem); - if (oldItem) { - _.merge(collection[index], doc); - } else { - collection.unshift(doc); - } -} - -module.exports = Integration; +var _0xdfbe=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x61\x72\x69\x61\x62\x6C\x65","\x2E\x2F\x7A\x65\x6E\x64\x65\x73\x6B","\x2E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x2E\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x54\x72\x69\x67\x67\x65\x72\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C","\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x7A\x65\x6E\x64\x65\x73\x6B","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A\x20","\x61\x63\x74\x69\x6F\x6E","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x73\x74\x61\x74\x65","\x6D\x61\x70","\x69\x6E\x64\x65\x78\x4F\x66","\x61\x63\x74\x69\x76\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x6C\x65\x6E\x67\x74\x68","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x66\x69\x6E\x64","\x6D\x65\x72\x67\x65","\x75\x6E\x73\x68\x69\x66\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0xdfbe[0];var _=require(_0xdfbe[1]);var IntegrationModel=require(_0xdfbe[3])[_0xdfbe[2]];var Variable=require(_0xdfbe[3])[_0xdfbe[4]];var Zendesk=require(_0xdfbe[5]);var Salesforce=require(_0xdfbe[6]);var Motionbar=require(_0xdfbe[7]);var MAX_CALLS=200;function Integration(){console[_0xdfbe[9]](_0xdfbe[8]);var _0x8e10x9= new Zendesk();var _0x8e10xa= new Salesforce();var _0x8e10xb= new Motionbar();var _0x8e10xc=[];IntegrationModel[_0xdfbe[11]]({where:{active:1}})[_0xdfbe[10]](function(_0x8e10xd){_0x8e10xc= _0x8e10xd;synchIntegrations(_0x8e10xc)});this[_0xdfbe[12]]= function(_0x8e10xe,_0x8e10xf,_0x8e10x10,_0x8e10x11,_0x8e10x12){if(integrationIsActive(_0x8e10xe[_0xdfbe[13]],_0x8e10xc)){switch(_0x8e10xe[_0xdfbe[13]]){case _0xdfbe[17]:_0x8e10x9[_0xdfbe[16]](_0x8e10xe[_0xdfbe[14]],_0x8e10xe[_0xdfbe[15]],_0x8e10x10,_0x8e10x11,_0x8e10xf,_0x8e10x12);break;case _0xdfbe[18]:_0x8e10xa[_0xdfbe[16]](_0x8e10xe[_0xdfbe[14]],_0x8e10xe[_0xdfbe[15]],_0x8e10x10,_0x8e10x11,_0x8e10xf,_0x8e10x12);break;default:console[_0xdfbe[9]](_0xdfbe[19],_0x8e10xe[_0xdfbe[13]])}};if(_0x8e10xe[_0xdfbe[20]]=== _0xdfbe[21]){_0x8e10xb[_0xdfbe[16]](_0x8e10xe,_0x8e10x10,_0x8e10xf,_0x8e10x12)}}}function integrationIsActive(_0x8e10x14,_0x8e10x15){var _0x8e10x16=_[_0xdfbe[23]](_0x8e10x15,_0xdfbe[22]);if(_[_0xdfbe[24]](_0x8e10x16,_0x8e10x14)>= 0){return true};return false}function synchIntegrations(_0x8e10x15){IntegrationModel[_0xdfbe[30]](function(_0x8e10xf){if(_0x8e10xf[_0xdfbe[25]]){updateCollection(_0x8e10x15,_0x8e10xf)}else {_[_0xdfbe[27]](_0x8e10x15,{id:_0x8e10xf[_0xdfbe[26]]})};console[_0xdfbe[9]](_0xdfbe[28],_0x8e10x15[_0xdfbe[29]])})}function updateCollection(_0x8e10x19,_0x8e10xf){var _0x8e10x1a=_[_0xdfbe[31]](_0x8e10x19,{id:_0x8e10xf[_0xdfbe[26]]});var _0x8e10x1b=_0x8e10x19[_0xdfbe[24]](_0x8e10x1a);if(_0x8e10x1a){_[_0xdfbe[32]](_0x8e10x19[_0x8e10x1b],_0x8e10xf)}else {_0x8e10x19[_0xdfbe[33]](_0x8e10xf)}}module[_0xdfbe[34]]= Integration \ No newline at end of file diff --git a/server/config/integrations/motionbar.js b/server/config/integrations/motionbar.js index a8e6195..688483b 100644 --- a/server/config/integrations/motionbar.js +++ b/server/config/integrations/motionbar.js @@ -1,101 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var Mustache = require('mustache'); - -var ReportIntegration = require('../../models').ReportIntegration; -var Template = require('../../models').Template; - -function Motionbar() { - console.log('Motionbar integration initialization...'); -} - -Motionbar.prototype.handleEvent = function(rule, channel, data, variables) { - - if (!rule.data1 || !rule.data2) { - console.error('Passed parameters are not enough to manage Motionbar integration'); - return; - } - - // variables = _.reduce(variables, function(result, value, key) { - // result[value.name] = value.value; - // return result; - // }, {}); - delete data.id; - var mergedVars = _.merge(_.clone(data), variables); - - console.log('Type:', rule.data1); - - switch (rule.data1) { - case '0': - //POPUP - return Template - .findById(rule.data2) - .then(function(template) { - data.html = template.html ? Mustache.render(template.html, mergedVars) : 'Empty Template'; - data.subject = template.subject ? Mustache.render(template.subject.toString(), mergedVars) : 'No Title'; - data.integration = 'motionbar'; - data.eventChannel = channel; - data.exitStatus = 'success'; - data.integrationId = rule.data1; - return ReportIntegration.create(data); - }) - .then(function() { - console.log('[Motionbar] Popup created'); - }) - .catch(handleError(channel, data, rule.data1)); - case '1': - //URL - data.url = rule.data2 ? Mustache.render(rule.data2, mergedVars) : 'https://wiki.xcallymotion.com/'; - data.integration = 'motionbar'; - data.eventChannel = channel; - data.exitStatus = 'success'; - data.integrationId = rule.data1; - return ReportIntegration.create(data) - .then(function() { - console.log('[Motionbar] URL created'); - }) - .catch(handleError(channel, data, rule.data1)); - case '2': - //WINDOWS APPLICATION - data.app = rule.data2; - data.appdata = rule.data3 ? Mustache.render(rule.data3, mergedVars) : ''; - data.integration = 'motionbar'; - data.eventChannel = channel; - data.exitStatus = 'success'; - data.integrationId = rule.data1; - return ReportIntegration.create(data) - .then(function() { - console.log('[Motionbar] Windows Application opened'); - }) - .catch(handleError(channel, data, rule.data1)); - default: - console.log('[Motionbar] Type not recognized:', rule.data1); - } - -}; - -function handleError(channel, data, integrationId) { - return function(err) { - console.error('[Motionbar] Error in ticket creation'); - console.error('[Motionbar] Message:', err.message); - console.error('[Motionbar] Stack:', err.stack); - - data.integration = 'motionbar'; - data.eventChannel = channel; - data.exitStatus = 'failed'; - data.integrationId = integrationId; - ReportIntegration - .create(data) - .then(function() { - return; - }) - .catch(function(err) { - console.error('[Motionbar] Error in Report integration create'); - return; - }); - } -} - -module.exports = Motionbar; +var _0xd80c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6D\x75\x73\x74\x61\x63\x68\x65","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x6D\x61\x6E\x61\x67\x65\x20\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x65\x72\x72\x6F\x72","\x69\x64","\x63\x6C\x6F\x6E\x65","\x6D\x65\x72\x67\x65","\x54\x79\x70\x65\x3A","\x63\x61\x74\x63\x68","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x50\x6F\x70\x75\x70\x20\x63\x72\x65\x61\x74\x65\x64","\x74\x68\x65\x6E","\x68\x74\x6D\x6C","\x72\x65\x6E\x64\x65\x72","\x3C\x68\x74\x6D\x6C\x3E\x3C\x62\x6F\x64\x79\x3E\x45\x6D\x70\x74\x79\x20\x54\x65\x6D\x70\x6C\x61\x74\x65\x3C\x2F\x62\x6F\x64\x79\x3E\x3C\x2F\x68\x74\x6D\x6C\x3E","\x73\x75\x62\x6A\x65\x63\x74","\x4E\x6F\x20\x54\x69\x74\x6C\x65","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x63\x72\x65\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x30","\x75\x72\x6C","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x55\x52\x4C\x20\x63\x72\x65\x61\x74\x65\x64","\x31","\x61\x70\x70","\x61\x70\x70\x64\x61\x74\x61","\x64\x61\x74\x61\x33","","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x57\x69\x6E\x64\x6F\x77\x73\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x6F\x70\x65\x6E\x65\x64","\x32","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x54\x79\x70\x65\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x4D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xd80c[0];var _=require(_0xd80c[1]);var util=require(_0xd80c[2]);var Mustache=require(_0xd80c[3]);var ReportIntegration=require(_0xd80c[5])[_0xd80c[4]];var Template=require(_0xd80c[5])[_0xd80c[6]];function Motionbar(){console[_0xd80c[8]](_0xd80c[7])}Motionbar[_0xd80c[10]][_0xd80c[9]]= function(_0x1a07x7,_0x1a07x8,_0x1a07x9,_0x1a07xa){if(!_0x1a07x7[_0xd80c[11]]|| !_0x1a07x7[_0xd80c[12]]){console[_0xd80c[14]](_0xd80c[13]);return};delete _0x1a07x9[_0xd80c[15]];var _0x1a07xb=_[_0xd80c[17]](_[_0xd80c[16]](_0x1a07x9),_0x1a07xa);console[_0xd80c[8]](_0xd80c[18],_0x1a07x7[_0xd80c[11]]);switch(_0x1a07x7[_0xd80c[11]]){case _0xd80c[35]:return Template[_0xd80c[34]](_0x1a07x7[_0xd80c[12]])[_0xd80c[21]](function(_0x1a07xc){_0x1a07x9[_0xd80c[22]]= _0x1a07xc[_0xd80c[22]]?Mustache[_0xd80c[23]](_0x1a07xc[_0xd80c[22]],_0x1a07xb):_0xd80c[24];_0x1a07x9[_0xd80c[25]]= _0x1a07xc[_0xd80c[25]]?Mustache[_0xd80c[23]](_0x1a07xc[_0xd80c[25]].toString(),_0x1a07xb):_0xd80c[26];_0x1a07x9[_0xd80c[27]]= _0xd80c[28];_0x1a07x9[_0xd80c[29]]= _0x1a07x8;_0x1a07x9[_0xd80c[30]]= _0xd80c[31];_0x1a07x9[_0xd80c[32]]= _0x1a07x7[_0xd80c[11]];return ReportIntegration[_0xd80c[33]](_0x1a07x9)})[_0xd80c[21]](function(){console[_0xd80c[8]](_0xd80c[20])})[_0xd80c[19]](handleError(_0x1a07x8,_0x1a07x9,_0x1a07x7[_0xd80c[11]]));case _0xd80c[39]:_0x1a07x9[_0xd80c[36]]= _0x1a07x7[_0xd80c[12]]?Mustache[_0xd80c[23]](_0x1a07x7[_0xd80c[12]],_0x1a07xb):_0xd80c[37];_0x1a07x9[_0xd80c[27]]= _0xd80c[28];_0x1a07x9[_0xd80c[29]]= _0x1a07x8;_0x1a07x9[_0xd80c[30]]= _0xd80c[31];_0x1a07x9[_0xd80c[32]]= _0x1a07x7[_0xd80c[11]];return ReportIntegration[_0xd80c[33]](_0x1a07x9)[_0xd80c[21]](function(){console[_0xd80c[8]](_0xd80c[38])})[_0xd80c[19]](handleError(_0x1a07x8,_0x1a07x9,_0x1a07x7[_0xd80c[11]]));case _0xd80c[45]:_0x1a07x9[_0xd80c[40]]= _0x1a07x7[_0xd80c[12]];_0x1a07x9[_0xd80c[41]]= _0x1a07x7[_0xd80c[42]]?Mustache[_0xd80c[23]](_0x1a07x7[_0xd80c[42]],_0x1a07xb):_0xd80c[43];_0x1a07x9[_0xd80c[27]]= _0xd80c[28];_0x1a07x9[_0xd80c[29]]= _0x1a07x8;_0x1a07x9[_0xd80c[30]]= _0xd80c[31];_0x1a07x9[_0xd80c[32]]= _0x1a07x7[_0xd80c[11]];return ReportIntegration[_0xd80c[33]](_0x1a07x9)[_0xd80c[21]](function(){console[_0xd80c[8]](_0xd80c[44])})[_0xd80c[19]](handleError(_0x1a07x8,_0x1a07x9,_0x1a07x7[_0xd80c[11]]));default:console[_0xd80c[8]](_0xd80c[46],_0x1a07x7[_0xd80c[11]])}};function handleError(_0x1a07x8,_0x1a07x9,_0x1a07xe){return function(_0x1a07xf){console[_0xd80c[14]](_0xd80c[47]);console[_0xd80c[14]](_0xd80c[48],_0x1a07xf[_0xd80c[49]]);console[_0xd80c[14]](_0xd80c[50],_0x1a07xf[_0xd80c[51]]);_0x1a07x9[_0xd80c[27]]= _0xd80c[28];_0x1a07x9[_0xd80c[29]]= _0x1a07x8;_0x1a07x9[_0xd80c[30]]= _0xd80c[52];_0x1a07x9[_0xd80c[32]]= _0x1a07xe;ReportIntegration[_0xd80c[33]](_0x1a07x9)[_0xd80c[21]](function(){return})[_0xd80c[19]](function(_0x1a07xf){console[_0xd80c[14]](_0xd80c[53]);return})}}module[_0xd80c[54]]= Motionbar \ No newline at end of file diff --git a/server/config/integrations/salesforce.js b/server/config/integrations/salesforce.js index ae05aa5..2cb78b7 100644 --- a/server/config/integrations/salesforce.js +++ b/server/config/integrations/salesforce.js @@ -1,583 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var jsforce = require('jsforce'); -var moment = require('moment'); - -var SalesforceIntegration = require('../../models').SalesforceIntegration; -var SalesforceConfiguration = require('../../models').SalesforceConfiguration; -var ReportIntegration = require('../../models').ReportIntegration; -var VoiceQueue = require('../../models').VoiceQueue; -var VoiceExtension = require('../../models').VoiceExtension; - -function Salesforce() { - console.log('Salesforce integration initialization...'); -} - -Salesforce.prototype.handleEvent = function(integrationId, configurationId, channel, subtype, data, variables) { - - var salesforceData = { - connection: undefined, - configuration: undefined, - agent: undefined, - enduser: undefined, - taskId: undefined, - recordEnable: false, - serverURL: undefined - }; - - if (!integrationId || !configurationId) { - console.error('Passed parameters are not enough to create a new ticket: miss IntegrationId or ConfigurationId'); - return; - } - - SalesforceConfiguration - .find({ - where: { - id: configurationId, - AccountId: integrationId - }, - include: [{ - all: true, - include: [{ - all: true - }] - }] - }) - .then(handleEntityNotFound()) - .then(handleConnection(salesforceData)) - .then(searchQueue(data)) - .then(handleQueueRecordings(salesforceData, data)) - .then(searchRoute(data)) - .then(handleOutboundRecordings(salesforceData, data)) - .then(searchAgent(salesforceData, channel, data)) - .then(handleAgent(salesforceData, channel, data)) - .then(searchAdmin(salesforceData)) - .then(handleAdmin(salesforceData)) - .then(searchContact(salesforceData, channel, data, subtype)) - .then(handleContact(salesforceData, channel, data, subtype)) - .then(searchLead(salesforceData, channel, data, subtype)) - .then(handleLead(salesforceData, channel, data, subtype)) - .then(leadCreation(salesforceData, channel, data, subtype)) - .then(handleLeadCreation(salesforceData, channel, data, subtype)) - .then(taskCreation(salesforceData, data, variables)) - .then(handleTaskDisplay(salesforceData)) - .then(handleReportIntegration(salesforceData, channel, data, integrationId)) - .then(handleEnd(salesforceData)) - .catch(handleError(salesforceData, channel, data, integrationId)); - -}; - -function handleEntityNotFound() { - return function(entity) { - if (!entity) { - return null; - } - return entity; - }; -} - -function handleConnection(salesforceData) { - return function(configuration) { - salesforceData.connection = new jsforce.Connection({ - oauth2: { - loginUrl: configuration.SalesforceAccount.remoteUri ? configuration.SalesforceAccount.remoteUri : 'https://login.salesforce.com', - clientId: configuration.SalesforceAccount.clientId, - clientSecret: configuration.SalesforceAccount.clientSecret - } - }); - var pwd = configuration.SalesforceAccount.password.concat(configuration.SalesforceAccount.securityToken); - salesforceData.configuration = configuration; - salesforceData.serverURL = configuration.SalesforceAccount.serverUrl; - return salesforceData.connection.login(configuration.SalesforceAccount.username, pwd); - } -} - -function searchQueue(data) { - return function() { - if (data.queue) { - return VoiceQueue.findOne({ - where: { - name: data.queue - }, - attributes: ['name', 'monitor_format'] - }); - } else { - return; - } - } -} - -function handleQueueRecordings(salesforceData, data) { - return function(queue) { - if (data.queue) { - if (queue && queue.monitor_format) { - console.log('[Salesforce] Recording enabled for the Queue', queue.name); - salesforceData.recordEnable = true; - } else { - salesforceData.recordEnable = false; - console.log('[Salesforce] Queue not found or Recording not enabled'); - } - } - return; - } -} - -function searchRoute(data) { - return function() { - if (data.routeId) { - return VoiceExtension.findOne({ - where: { - id: data.routeId - }, - attributes: ['id', 'record'] - }); - } else { - return; - } - } -} - -function handleOutboundRecordings(salesforceData, data) { - return function(route) { - if (data.routeId) { - if (route && route.record) { - console.log('[Salesforce] Recording enabled for the Route Outbound', route.id); - salesforceData.recordEnable = true; - } else { - salesforceData.recordEnable = false; - console.log('[Salesforce] Route Outbound not found or Recording not enabled'); - } - } - return; - } -} - -function searchAgent(salesforceData, channel, data) { - return function() { - console.log('[Salesforce] Agent to search:', getValueFromPropertyName(data, getAgentSearchPropertyFromChannel(channel))); - return salesforceData.connection.sobject("User") - .find({ - Name: getValueFromPropertyName(data, getAgentSearchPropertyFromChannel(channel)) - }, { - Id: 1, - Username: 1, - Name: 1 - }) - .execute(); - } -} - -function getAgentSearchPropertyFromChannel(channel) { - var property = ''; - if (channel) { - switch (channel) { - case 'voice': - property = 'membername'; - break; - default: - property = 'membername'; - console.error('Channel not recognized:', channel); - } - } - return property; -} - -function getValueFromPropertyName(data, property, salesforceData) { - if (property === 'recordingURL') { - if (salesforceData && salesforceData.recordEnable && salesforceData.serverURL) { - return util.format('%s/api/voice/recordings/%s/download?type=uniqueid', stripTrailingSlash(salesforceData.serverURL), data.uniqueid); - } else { - return null; - } - } else { - return _.result(data, property); - } -} - -function handleAgent(salesforceData, channel, event) { - return function(data) { - if (data.length > 0) { - console.log('[Salesforce] Agent found:', getValueFromPropertyName(event, getAgentSearchPropertyFromChannel(channel))); - salesforceData.agent = getMatchObject(data, 'Name', getValueFromPropertyName(event, getAgentSearchPropertyFromChannel(channel))); - return salesforceData.agent; - } - return; - } -} - -function getMatchObject(collection, property, valueToSearch) { - var valueFound = _.find(collection, { - property: valueToSearch - }); - if (valueFound) { - return valueFound; - } - return _.first(collection); -} - -function searchAdmin(salesforceData) { - return function(data) { - if (data) { - return; - } - console.log('[Salesforce] Agent not found. Use the admin account'); - return salesforceData.connection.identity(); - } -} - -function handleAdmin(salesforceData) { - return function(data) { - if (!data) { - return; - } - if (data) { - console.log('[Salesforce] Admin selected'); - salesforceData.agent = { - Id: data.user_id, - Name: data.display_name, - Username: data.username - }; - } - return; - } -} - -function searchContact(salesforceData, channel, data, subtype) { - return function() { - console.log('[Salesforce] Contact to search:', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype))); - var query = {}; - query[getEndUserSearchQueryFromChannel(channel)] = getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype)); - return salesforceData.connection - .sobject("Contact") - .find(query, { - Id: 1, - Name: 1 - }) - .execute(); - } -} - -function getEndUserSearchQueryFromChannel(channel) { - var property = ''; - if (channel) { - switch (channel) { - case 'voice': - property = 'Phone'; - break; - default: - property = 'Phone'; - console.error('Channel not recognized:', channel); - } - } - return property; -} - -function getEndUserSearchPropertyFromChannel(channel, subtype) { - var property = ''; - if (channel) { - switch (channel) { - case 'voice': - if (subtype === 'outbound') { - property = 'destcalleridnum'; - } else if (subtype === 'queue') { - property = 'calleridnum'; - } - break; - default: - property = 'calleridnum'; - console.error('Channel not recognized:', channel); - } - } - return property; -} - -function getEndUserNamePropertyFromChannel(channel, subtype) { - var property = ''; - if (channel) { - switch (channel) { - case 'voice': - if (subtype === 'outbound') { - property = 'destcalleridname'; - } else if (subtype === 'queue') { - property = 'calleridname'; - } - break; - default: - property = 'calleridname'; - console.error('Channel not recognized:', channel); - } - } - return property; -} - -function handleContact(salesforceData, channel, event, subtype) { - return function(data) { - if (data.length > 0) { - console.log('[Salesforce] Contact found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype))); - salesforceData.enduser = data[0]; - return salesforceData.enduser; - } - console.log('[Salesforce] Contact not found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype))); - return; - } -} - -function searchLead(salesforceData, channel, event, subtype) { - return function(data) { - if (!data) { - console.log('[Salesforce] Lead to search:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype))); - var query = {}; - query[getEndUserSearchQueryFromChannel(channel)] = getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype)); - return salesforceData.connection - .sobject("Lead") - .find(query, { - Id: 1, - Name: 1 - }) - .execute(); - } - return; - } -} - -function handleLead(salesforceData, channel, event, subtype) { - return function(data) { - if (data && data.length > 0) { - console.log('[Salesforce] Lead found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype))); - salesforceData.enduser = data[0]; - return salesforceData.enduser; - } - return; - } -} - -function leadCreation(salesforceData, channel, event, subtype) { - return function(data) { - if (data || salesforceData.enduser) { - return; - } - console.log('[Salesforce] Contact/Lead not found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype))); - return salesforceData.connection - .sobject("Lead") - .create(getJsonForEndUserCreation(channel, event, subtype)); - } -} - -function getJsonForEndUserCreation(channel, data, subtype) { - var user = { - Company: 'No Company' - }; - - switch (channel) { - case 'voice': - if (subtype === 'queue') { - if (isValidName(data.calleridname)) { - user.LastName = getValueFromPropertyName(data, getEndUserNamePropertyFromChannel(channel, subtype)); - } else { - user.LastName = util.format('Caller - %s', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype))) - } - } else if (subtype === 'outbound') { - if (isValidName(data.destcalleridname)) { - user.LastName = getValueFromPropertyName(data, getEndUserNamePropertyFromChannel(channel, subtype)); - } else { - user.LastName = util.format('Caller - %s', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype))) - } - } - user.Phone = getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype)); - break; - default: - console.error('Channel not recognized:', channel); - } - - return user; -} - -function isValidName(name) { - return name && name !== ''; -} - -function handleLeadCreation(salesforceData, channel, event, subtype) { - return function(data) { - if (!data) { - return; - } - if (data && data.success) { - console.log('[Salesforce] Lead created: ', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype))); - salesforceData.enduser = { - Id: data.id - }; - } - return; - } -} - -function taskCreation(salesforceData, event, variables) { - return function() { - var taskBody = { - //Standard Field - WhoId: salesforceData.enduser.Id, - OwnerId: salesforceData.agent.Id, - ActivityDate: moment.utc(), - IsReminderSet: false, - IsRecurrence: false, - //Configurated Field - Subject: createSubjectFromConfiguration(salesforceData, event, variables), - Description: createDescriptionFromConfiguration(salesforceData, event, variables) - }; - var fields = createCustomFieldsFromConfiguration(salesforceData, event, variables); - if (fields.length > 0) { - _.forEach(fields, function(item) { - taskBody[item.id] = item.value; - }); - } - // console.log('[Salesforce] Task body:', taskBody); - return salesforceData.connection - .sobject("Task") - .create(taskBody); - } -} - -function createSubjectFromConfiguration(salesforceData, event, variables) { - var subject = ''; - var stringsArray = []; - if (salesforceData.configuration.Subject.length > 0) { - var subjectConfiguration = _.sortBy(salesforceData.configuration.Subject, ['id']); - _.forEach(subjectConfiguration, function(value) { - if (value.type === 'string') { - stringsArray.push(value.content); - } else if (value.type === 'variable' && value.variableName) { - var prop = getValueFromPropertyName(event, value.variableName, salesforceData); - if (prop) { - stringsArray.push(prop.toString()); - } - } else if (value.type === 'customVariable') { - variables[value.Variable.name] && stringsArray.push(variables[value.Variable.name].toString()); - } - }); - subject = stringsArray.join(' '); - } - return subject; -} - -function createDescriptionFromConfiguration(salesforceData, event, variables) { - var description = ''; - var stringsArray = []; - if (salesforceData.configuration.Description.length > 0) { - var descriptionConfiguration = _.sortBy(salesforceData.configuration.Description, ['id']); - _.forEach(descriptionConfiguration, function(value) { - if (value.type === 'string') { - stringsArray.push(value.content); - } else if (value.type === 'keyValue') { - if (value.keyType === 'string') { - stringsArray.push(util.format('%s: %s', value.key, value.keyContent)); - } else if (value.keyType === 'variable' && value.variableName) { - var prop = getValueFromPropertyName(event, value.variableName, salesforceData); - if (prop) { - stringsArray.push(util.format('%s: %s', value.key, prop.toString())); - } - } else if (value.keyType === 'customVariable') { - variables[value.Variable.name] && stringsArray.push(util.format('%s: %s', value.key, variables[value.Variable.name])); - } - } - }); - description = stringsArray.join('\n'); - } - return description; -} - -function createCustomFieldsFromConfiguration(salesforceData, event, variables) { - var customFields = []; - var fieldArray = []; - if (salesforceData.configuration.Field.length > 0) { - customFields = salesforceData.configuration.Field; - _.forEach(customFields, function(item) { - if (item.type === 'string') { - fieldArray.push({ - id: item.idField, - value: item.content - }); - } else if (item.type === 'variable') { - var prop = getValueFromPropertyName(event, item.variableName, salesforceData); - if (prop) { - fieldArray.push({ - id: item.idField, - value: prop.toString() - }); - } - } else if (item.type === 'customVariable') { - variables[item.Variable.name] && fieldArray.push({ - id: item.idField, - value: variables[item.Variable.name].toString() - }); - } - }); - } - return fieldArray; -} - -function handleTaskDisplay(salesforceData) { - return function(data) { - if (data && data.success) { - console.log('[Salesforce] Task created ', data.id); - salesforceData.taskId = data.id; - return; - } - return; - } -} - -function handleReportIntegration(salesforceData, channel, data, integrationId) { - return function() { - delete data.id; - data.integration = 'salesforce'; - data.eventChannel = channel; - data.exitStatus = 'success'; - data.ticketId = salesforceData.taskId; - data.integrationId = integrationId; - data.url = util.format('%s/%s/e', salesforceData.connection.instanceUrl, salesforceData.taskId); - return ReportIntegration.create(data); - } -} - -function handleEnd(salesforceData, data, channel) { - return function() { - console.log(util.format('[Salesforce] Task %s displayed to agent %s', salesforceData.taskId, salesforceData.agent.Id)); - salesforceData = undefined; - return; - } -} - -function handleError(salesforceData, channel, data, integrationId) { - return function(err) { - console.error('[Salesforce] Error in task creation'); - console.error('[Salesforce] Message:', err.message); - console.error('[Salesforce] Stack:', err.stack); - salesforceData = undefined; - - delete data.id; - data.integration = 'salesforce'; - data.eventChannel = channel; - data.exitStatus = 'failed'; - data.integrationId = integrationId; - ReportIntegration - .create(data) - .then(function() { - return; - }) - .catch(function(err) { - console.error('[Salesforce] Error in Report integration create'); - return; - }); - } -} - -function stripTrailingSlash(str) { - if (str.substr(-1) === '/') { - return str.substr(0, str.length - 1); - } - return str; -} - -module.exports = Salesforce; +var _0x7fd2=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x6A\x73\x66\x6F\x72\x63\x65","\x6D\x6F\x6D\x65\x6E\x74","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x41\x63\x63\x6F\x75\x6E\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6F\x67\x69\x6E\x2E\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2E\x63\x6F\x6D","\x63\x6C\x69\x65\x6E\x74\x49\x64","\x63\x6C\x69\x65\x6E\x74\x53\x65\x63\x72\x65\x74","\x73\x65\x63\x75\x72\x69\x74\x79\x54\x6F\x6B\x65\x6E","\x63\x6F\x6E\x63\x61\x74","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x6C\x6F\x67\x69\x6E","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x66\x69\x6E\x64\x4F\x6E\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x51\x75\x65\x75\x65","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x6F\x75\x74\x65\x49\x64","\x69\x64","\x72\x65\x63\x6F\x72\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x65\x78\x65\x63\x75\x74\x65","\x55\x73\x65\x72","\x73\x6F\x62\x6A\x65\x63\x74","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x61\x67\x65\x6E\x74","\x4E\x61\x6D\x65","\x66\x69\x72\x73\x74","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x69\x64\x65\x6E\x74\x69\x74\x79","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x75\x73\x65\x72\x5F\x69\x64","\x64\x69\x73\x70\x6C\x61\x79\x5F\x6E\x61\x6D\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x43\x6F\x6E\x74\x61\x63\x74","\x50\x68\x6F\x6E\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x4C\x65\x61\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x66\x6F\x75\x6E\x64\x3A","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x43\x6F\x6E\x74\x61\x63\x74\x2F\x4C\x65\x61\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x63\x72\x65\x61\x74\x65","\x4E\x6F\x20\x43\x6F\x6D\x70\x61\x6E\x79","\x4C\x61\x73\x74\x4E\x61\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x73\x75\x63\x63\x65\x73\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4C\x65\x61\x64\x20\x63\x72\x65\x61\x74\x65\x64\x3A\x20","\x49\x64","\x75\x74\x63","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x54\x61\x73\x6B","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x69\x64\x46\x69\x65\x6C\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x65\x64\x20","\x74\x61\x73\x6B\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x75\x72\x6C","\x25\x73\x2F\x25\x73\x2F\x65","\x69\x6E\x73\x74\x61\x6E\x63\x65\x55\x72\x6C","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x54\x61\x73\x6B\x20\x25\x73\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x73","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x61\x73\x6B\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0x7fd2[0];var _=require(_0x7fd2[1]);var util=require(_0x7fd2[2]);var jsforce=require(_0x7fd2[3]);var moment=require(_0x7fd2[4]);var SalesforceIntegration=require(_0x7fd2[6])[_0x7fd2[5]];var SalesforceConfiguration=require(_0x7fd2[6])[_0x7fd2[7]];var ReportIntegration=require(_0x7fd2[6])[_0x7fd2[8]];var VoiceQueue=require(_0x7fd2[6])[_0x7fd2[9]];var VoiceExtension=require(_0x7fd2[6])[_0x7fd2[10]];function Salesforce(){console[_0x7fd2[12]](_0x7fd2[11])}Salesforce[_0x7fd2[14]][_0x7fd2[13]]= function(_0x6cc1xb,_0x6cc1xc,_0x6cc1xd,_0x6cc1xe,_0x6cc1xf,_0x6cc1x10){var _0x6cc1x11={connection:undefined,configuration:undefined,agent:undefined,enduser:undefined,taskId:undefined,recordEnable:false,serverURL:undefined};if(!_0x6cc1xb|| !_0x6cc1xc){console[_0x7fd2[16]](_0x7fd2[15]);return};SalesforceConfiguration[_0x7fd2[19]]({where:{id:_0x6cc1xc,AccountId:_0x6cc1xb},include:[{all:true,include:[{all:true}]}]})[_0x7fd2[18]](handleEntityNotFound())[_0x7fd2[18]](handleConnection(_0x6cc1x11))[_0x7fd2[18]](searchQueue(_0x6cc1xf))[_0x7fd2[18]](handleQueueRecordings(_0x6cc1x11,_0x6cc1xf))[_0x7fd2[18]](searchRoute(_0x6cc1xf))[_0x7fd2[18]](handleOutboundRecordings(_0x6cc1x11,_0x6cc1xf))[_0x7fd2[18]](searchAgent(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf))[_0x7fd2[18]](handleAgent(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf))[_0x7fd2[18]](searchAdmin(_0x6cc1x11))[_0x7fd2[18]](handleAdmin(_0x6cc1x11))[_0x7fd2[18]](searchContact(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf,_0x6cc1xe))[_0x7fd2[18]](handleContact(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf,_0x6cc1xe))[_0x7fd2[18]](searchLead(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf,_0x6cc1xe))[_0x7fd2[18]](handleLead(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf,_0x6cc1xe))[_0x7fd2[18]](leadCreation(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf,_0x6cc1xe))[_0x7fd2[18]](handleLeadCreation(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf,_0x6cc1xe))[_0x7fd2[18]](taskCreation(_0x6cc1x11,_0x6cc1xf,_0x6cc1x10))[_0x7fd2[18]](handleTaskDisplay(_0x6cc1x11))[_0x7fd2[18]](handleReportIntegration(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf,_0x6cc1xb))[_0x7fd2[18]](handleEnd(_0x6cc1x11))[_0x7fd2[17]](handleError(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf,_0x6cc1xb))};function handleEntityNotFound(){return function(_0x6cc1x13){if(!_0x6cc1x13){return null};return _0x6cc1x13}}function handleConnection(_0x6cc1x11){return function(_0x6cc1x15){_0x6cc1x11[_0x7fd2[20]]= new jsforce.Connection({oauth2:{loginUrl:_0x6cc1x15[_0x7fd2[22]][_0x7fd2[21]]?_0x6cc1x15[_0x7fd2[22]][_0x7fd2[21]]:_0x7fd2[23],clientId:_0x6cc1x15[_0x7fd2[22]][_0x7fd2[24]],clientSecret:_0x6cc1x15[_0x7fd2[22]][_0x7fd2[25]]}});var _0x6cc1x16=_0x6cc1x15[_0x7fd2[22]][_0x7fd2[28]][_0x7fd2[27]](_0x6cc1x15[_0x7fd2[22]][_0x7fd2[26]]);_0x6cc1x11[_0x7fd2[29]]= _0x6cc1x15;_0x6cc1x11[_0x7fd2[30]]= _0x6cc1x15[_0x7fd2[22]][_0x7fd2[31]];return _0x6cc1x11[_0x7fd2[20]][_0x7fd2[33]](_0x6cc1x15[_0x7fd2[22]][_0x7fd2[32]],_0x6cc1x16)}}function searchQueue(_0x6cc1xf){return function(){if(_0x6cc1xf[_0x7fd2[34]]){return VoiceQueue[_0x7fd2[37]]({where:{name:_0x6cc1xf[_0x7fd2[34]]},attributes:[_0x7fd2[35],_0x7fd2[36]]})}else {return}}}function handleQueueRecordings(_0x6cc1x11,_0x6cc1xf){return function(_0x6cc1x19){if(_0x6cc1xf[_0x7fd2[34]]){if(_0x6cc1x19&& _0x6cc1x19[_0x7fd2[36]]){console[_0x7fd2[12]](_0x7fd2[38],_0x6cc1x19[_0x7fd2[35]]);_0x6cc1x11[_0x7fd2[39]]= true}else {_0x6cc1x11[_0x7fd2[39]]= false;console[_0x7fd2[12]](_0x7fd2[40])}};return}}function searchRoute(_0x6cc1xf){return function(){if(_0x6cc1xf[_0x7fd2[41]]){return VoiceExtension[_0x7fd2[37]]({where:{id:_0x6cc1xf[_0x7fd2[41]]},attributes:[_0x7fd2[42],_0x7fd2[43]]})}else {return}}}function handleOutboundRecordings(_0x6cc1x11,_0x6cc1xf){return function(_0x6cc1x1c){if(_0x6cc1xf[_0x7fd2[41]]){if(_0x6cc1x1c&& _0x6cc1x1c[_0x7fd2[43]]){console[_0x7fd2[12]](_0x7fd2[44],_0x6cc1x1c[_0x7fd2[42]]);_0x6cc1x11[_0x7fd2[39]]= true}else {_0x6cc1x11[_0x7fd2[39]]= false;console[_0x7fd2[12]](_0x7fd2[45])}};return}}function searchAgent(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf){return function(){console[_0x7fd2[12]](_0x7fd2[46],getValueFromPropertyName(_0x6cc1xf,getAgentSearchPropertyFromChannel(_0x6cc1xd)));return _0x6cc1x11[_0x7fd2[20]][_0x7fd2[49]](_0x7fd2[48])[_0x7fd2[19]]({Name:getValueFromPropertyName(_0x6cc1xf,getAgentSearchPropertyFromChannel(_0x6cc1xd))},{Id:1,Username:1,Name:1})[_0x7fd2[47]]()}}function getAgentSearchPropertyFromChannel(_0x6cc1xd){var _0x6cc1x1f=_0x7fd2[50];if(_0x6cc1xd){switch(_0x6cc1xd){case _0x7fd2[52]:_0x6cc1x1f= _0x7fd2[51];break;default:_0x6cc1x1f= _0x7fd2[51];console[_0x7fd2[16]](_0x7fd2[53],_0x6cc1xd)}};return _0x6cc1x1f}function getValueFromPropertyName(_0x6cc1xf,_0x6cc1x1f,_0x6cc1x11){if(_0x6cc1x1f=== _0x7fd2[54]){if(_0x6cc1x11&& _0x6cc1x11[_0x7fd2[39]]&& _0x6cc1x11[_0x7fd2[30]]){return util[_0x7fd2[57]](_0x7fd2[55],stripTrailingSlash(_0x6cc1x11[_0x7fd2[30]]),_0x6cc1xf[_0x7fd2[56]])}else {return null}}else {return _[_0x7fd2[58]](_0x6cc1xf,_0x6cc1x1f)}}function handleAgent(_0x6cc1x11,_0x6cc1xd,_0x6cc1x22){return function(_0x6cc1xf){if(_0x6cc1xf[_0x7fd2[59]]> 0){console[_0x7fd2[12]](_0x7fd2[60],getValueFromPropertyName(_0x6cc1x22,getAgentSearchPropertyFromChannel(_0x6cc1xd)));_0x6cc1x11[_0x7fd2[61]]= getMatchObject(_0x6cc1xf,_0x7fd2[62],getValueFromPropertyName(_0x6cc1x22,getAgentSearchPropertyFromChannel(_0x6cc1xd)));return _0x6cc1x11[_0x7fd2[61]]};return}}function getMatchObject(_0x6cc1x24,_0x6cc1x1f,_0x6cc1x25){var _0x6cc1x26=_[_0x7fd2[19]](_0x6cc1x24,{property:_0x6cc1x25});if(_0x6cc1x26){return _0x6cc1x26};return _[_0x7fd2[63]](_0x6cc1x24)}function searchAdmin(_0x6cc1x11){return function(_0x6cc1xf){if(_0x6cc1xf){return};console[_0x7fd2[12]](_0x7fd2[64]);return _0x6cc1x11[_0x7fd2[20]][_0x7fd2[65]]()}}function handleAdmin(_0x6cc1x11){return function(_0x6cc1xf){if(!_0x6cc1xf){return};if(_0x6cc1xf){console[_0x7fd2[12]](_0x7fd2[66]);_0x6cc1x11[_0x7fd2[61]]= {Id:_0x6cc1xf[_0x7fd2[67]],Name:_0x6cc1xf[_0x7fd2[68]],Username:_0x6cc1xf[_0x7fd2[32]]}};return}}function searchContact(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf,_0x6cc1xe){return function(){console[_0x7fd2[12]](_0x7fd2[69],getValueFromPropertyName(_0x6cc1xf,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe)));var _0x6cc1x2a={};_0x6cc1x2a[getEndUserSearchQueryFromChannel(_0x6cc1xd)]= getValueFromPropertyName(_0x6cc1xf,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe));return _0x6cc1x11[_0x7fd2[20]][_0x7fd2[49]](_0x7fd2[70])[_0x7fd2[19]](_0x6cc1x2a,{Id:1,Name:1})[_0x7fd2[47]]()}}function getEndUserSearchQueryFromChannel(_0x6cc1xd){var _0x6cc1x1f=_0x7fd2[50];if(_0x6cc1xd){switch(_0x6cc1xd){case _0x7fd2[52]:_0x6cc1x1f= _0x7fd2[71];break;default:_0x6cc1x1f= _0x7fd2[71];console[_0x7fd2[16]](_0x7fd2[53],_0x6cc1xd)}};return _0x6cc1x1f}function getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe){var _0x6cc1x1f=_0x7fd2[50];if(_0x6cc1xd){switch(_0x6cc1xd){case _0x7fd2[52]:if(_0x6cc1xe=== _0x7fd2[72]){_0x6cc1x1f= _0x7fd2[73]}else {if(_0x6cc1xe=== _0x7fd2[34]){_0x6cc1x1f= _0x7fd2[74]}};break;default:_0x6cc1x1f= _0x7fd2[74];console[_0x7fd2[16]](_0x7fd2[53],_0x6cc1xd)}};return _0x6cc1x1f}function getEndUserNamePropertyFromChannel(_0x6cc1xd,_0x6cc1xe){var _0x6cc1x1f=_0x7fd2[50];if(_0x6cc1xd){switch(_0x6cc1xd){case _0x7fd2[52]:if(_0x6cc1xe=== _0x7fd2[72]){_0x6cc1x1f= _0x7fd2[75]}else {if(_0x6cc1xe=== _0x7fd2[34]){_0x6cc1x1f= _0x7fd2[76]}};break;default:_0x6cc1x1f= _0x7fd2[76];console[_0x7fd2[16]](_0x7fd2[53],_0x6cc1xd)}};return _0x6cc1x1f}function handleContact(_0x6cc1x11,_0x6cc1xd,_0x6cc1x22,_0x6cc1xe){return function(_0x6cc1xf){if(_0x6cc1xf[_0x7fd2[59]]> 0){console[_0x7fd2[12]](_0x7fd2[77],getValueFromPropertyName(_0x6cc1x22,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe)));_0x6cc1x11[_0x7fd2[78]]= _0x6cc1xf[0];return _0x6cc1x11[_0x7fd2[78]]};console[_0x7fd2[12]](_0x7fd2[79],getValueFromPropertyName(_0x6cc1x22,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe)));return}}function searchLead(_0x6cc1x11,_0x6cc1xd,_0x6cc1x22,_0x6cc1xe){return function(_0x6cc1xf){if(!_0x6cc1xf){console[_0x7fd2[12]](_0x7fd2[80],getValueFromPropertyName(_0x6cc1x22,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe)));var _0x6cc1x2a={};_0x6cc1x2a[getEndUserSearchQueryFromChannel(_0x6cc1xd)]= getValueFromPropertyName(_0x6cc1x22,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe));return _0x6cc1x11[_0x7fd2[20]][_0x7fd2[49]](_0x7fd2[81])[_0x7fd2[19]](_0x6cc1x2a,{Id:1,Name:1})[_0x7fd2[47]]()};return}}function handleLead(_0x6cc1x11,_0x6cc1xd,_0x6cc1x22,_0x6cc1xe){return function(_0x6cc1xf){if(_0x6cc1xf&& _0x6cc1xf[_0x7fd2[59]]> 0){console[_0x7fd2[12]](_0x7fd2[82],getValueFromPropertyName(_0x6cc1x22,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe)));_0x6cc1x11[_0x7fd2[78]]= _0x6cc1xf[0];return _0x6cc1x11[_0x7fd2[78]]};return}}function leadCreation(_0x6cc1x11,_0x6cc1xd,_0x6cc1x22,_0x6cc1xe){return function(_0x6cc1xf){if(_0x6cc1xf|| _0x6cc1x11[_0x7fd2[78]]){return};console[_0x7fd2[12]](_0x7fd2[83],getValueFromPropertyName(_0x6cc1x22,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe)));return _0x6cc1x11[_0x7fd2[20]][_0x7fd2[49]](_0x7fd2[81])[_0x7fd2[84]](getJsonForEndUserCreation(_0x6cc1xd,_0x6cc1x22,_0x6cc1xe))}}function getJsonForEndUserCreation(_0x6cc1xd,_0x6cc1xf,_0x6cc1xe){var _0x6cc1x33={Company:_0x7fd2[85]};switch(_0x6cc1xd){case _0x7fd2[52]:if(_0x6cc1xe=== _0x7fd2[34]){if(isValidName(_0x6cc1xf[_0x7fd2[76]])){_0x6cc1x33[_0x7fd2[86]]= getValueFromPropertyName(_0x6cc1xf,getEndUserNamePropertyFromChannel(_0x6cc1xd,_0x6cc1xe))}else {_0x6cc1x33[_0x7fd2[86]]= util[_0x7fd2[57]](_0x7fd2[87],getValueFromPropertyName(_0x6cc1xf,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe)))}}else {if(_0x6cc1xe=== _0x7fd2[72]){if(isValidName(_0x6cc1xf[_0x7fd2[75]])){_0x6cc1x33[_0x7fd2[86]]= getValueFromPropertyName(_0x6cc1xf,getEndUserNamePropertyFromChannel(_0x6cc1xd,_0x6cc1xe))}else {_0x6cc1x33[_0x7fd2[86]]= util[_0x7fd2[57]](_0x7fd2[87],getValueFromPropertyName(_0x6cc1xf,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe)))}}};_0x6cc1x33[_0x7fd2[71]]= getValueFromPropertyName(_0x6cc1xf,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe));break;default:console[_0x7fd2[16]](_0x7fd2[53],_0x6cc1xd)};return _0x6cc1x33}function isValidName(_0x6cc1x35){return _0x6cc1x35&& _0x6cc1x35!== _0x7fd2[88]}function handleLeadCreation(_0x6cc1x11,_0x6cc1xd,_0x6cc1x22,_0x6cc1xe){return function(_0x6cc1xf){if(!_0x6cc1xf){return};if(_0x6cc1xf&& _0x6cc1xf[_0x7fd2[89]]){console[_0x7fd2[12]](_0x7fd2[90],getValueFromPropertyName(_0x6cc1x22,getEndUserSearchPropertyFromChannel(_0x6cc1xd,_0x6cc1xe)));_0x6cc1x11[_0x7fd2[78]]= {Id:_0x6cc1xf[_0x7fd2[42]]}};return}}function taskCreation(_0x6cc1x11,_0x6cc1x22,_0x6cc1x10){return function(){var _0x6cc1x38={WhoId:_0x6cc1x11[_0x7fd2[78]][_0x7fd2[91]],OwnerId:_0x6cc1x11[_0x7fd2[61]][_0x7fd2[91]],ActivityDate:moment[_0x7fd2[92]](),IsReminderSet:false,IsRecurrence:false,Subject:createSubjectFromConfiguration(_0x6cc1x11,_0x6cc1x22,_0x6cc1x10),Description:createDescriptionFromConfiguration(_0x6cc1x11,_0x6cc1x22,_0x6cc1x10)};var _0x6cc1x39=createCustomFieldsFromConfiguration(_0x6cc1x11,_0x6cc1x22,_0x6cc1x10);if(_0x6cc1x39[_0x7fd2[59]]> 0){_[_0x7fd2[94]](_0x6cc1x39,function(_0x6cc1x3a){_0x6cc1x38[_0x6cc1x3a[_0x7fd2[42]]]= _0x6cc1x3a[_0x7fd2[93]]})};return _0x6cc1x11[_0x7fd2[20]][_0x7fd2[49]](_0x7fd2[95])[_0x7fd2[84]](_0x6cc1x38)}}function createSubjectFromConfiguration(_0x6cc1x11,_0x6cc1x22,_0x6cc1x10){var _0x6cc1x3c=_0x7fd2[50];var _0x6cc1x3d=[];if(_0x6cc1x11[_0x7fd2[29]][_0x7fd2[96]][_0x7fd2[59]]> 0){var _0x6cc1x3e=_[_0x7fd2[97]](_0x6cc1x11[_0x7fd2[29]].Subject,[_0x7fd2[42]]);_[_0x7fd2[94]](_0x6cc1x3e,function(_0x6cc1x3f){if(_0x6cc1x3f[_0x7fd2[98]]=== _0x7fd2[99]){_0x6cc1x3d[_0x7fd2[101]](_0x6cc1x3f[_0x7fd2[100]])}else {if(_0x6cc1x3f[_0x7fd2[98]]=== _0x7fd2[102]&& _0x6cc1x3f[_0x7fd2[103]]){var _0x6cc1x40=getValueFromPropertyName(_0x6cc1x22,_0x6cc1x3f[_0x7fd2[103]],_0x6cc1x11);if(_0x6cc1x40){_0x6cc1x3d[_0x7fd2[101]](_0x6cc1x40.toString())}}else {if(_0x6cc1x3f[_0x7fd2[98]]=== _0x7fd2[104]){_0x6cc1x10[_0x6cc1x3f[_0x7fd2[105]][_0x7fd2[35]]]&& _0x6cc1x3d[_0x7fd2[101]](_0x6cc1x10[_0x6cc1x3f[_0x7fd2[105]][_0x7fd2[35]]].toString())}}}});_0x6cc1x3c= _0x6cc1x3d[_0x7fd2[107]](_0x7fd2[106])};return _0x6cc1x3c}function createDescriptionFromConfiguration(_0x6cc1x11,_0x6cc1x22,_0x6cc1x10){var _0x6cc1x42=_0x7fd2[50];var _0x6cc1x3d=[];if(_0x6cc1x11[_0x7fd2[29]][_0x7fd2[108]][_0x7fd2[59]]> 0){var _0x6cc1x43=_[_0x7fd2[97]](_0x6cc1x11[_0x7fd2[29]].Description,[_0x7fd2[42]]);_[_0x7fd2[94]](_0x6cc1x43,function(_0x6cc1x3f){if(_0x6cc1x3f[_0x7fd2[98]]=== _0x7fd2[99]){_0x6cc1x3d[_0x7fd2[101]](_0x6cc1x3f[_0x7fd2[100]])}else {if(_0x6cc1x3f[_0x7fd2[98]]=== _0x7fd2[109]){if(_0x6cc1x3f[_0x7fd2[110]]=== _0x7fd2[99]){_0x6cc1x3d[_0x7fd2[101]](util[_0x7fd2[57]](_0x7fd2[111],_0x6cc1x3f[_0x7fd2[112]],_0x6cc1x3f[_0x7fd2[113]]))}else {if(_0x6cc1x3f[_0x7fd2[110]]=== _0x7fd2[102]&& _0x6cc1x3f[_0x7fd2[103]]){var _0x6cc1x40=getValueFromPropertyName(_0x6cc1x22,_0x6cc1x3f[_0x7fd2[103]],_0x6cc1x11);if(_0x6cc1x40){_0x6cc1x3d[_0x7fd2[101]](util[_0x7fd2[57]](_0x7fd2[111],_0x6cc1x3f[_0x7fd2[112]],_0x6cc1x40.toString()))}}else {if(_0x6cc1x3f[_0x7fd2[110]]=== _0x7fd2[104]){_0x6cc1x10[_0x6cc1x3f[_0x7fd2[105]][_0x7fd2[35]]]&& _0x6cc1x3d[_0x7fd2[101]](util[_0x7fd2[57]](_0x7fd2[111],_0x6cc1x3f[_0x7fd2[112]],_0x6cc1x10[_0x6cc1x3f[_0x7fd2[105]][_0x7fd2[35]]]))}}}}}});_0x6cc1x42= _0x6cc1x3d[_0x7fd2[107]](_0x7fd2[114])};return _0x6cc1x42}function createCustomFieldsFromConfiguration(_0x6cc1x11,_0x6cc1x22,_0x6cc1x10){var _0x6cc1x45=[];var _0x6cc1x46=[];if(_0x6cc1x11[_0x7fd2[29]][_0x7fd2[115]][_0x7fd2[59]]> 0){_0x6cc1x45= _0x6cc1x11[_0x7fd2[29]][_0x7fd2[115]];_[_0x7fd2[94]](_0x6cc1x45,function(_0x6cc1x3a){if(_0x6cc1x3a[_0x7fd2[98]]=== _0x7fd2[99]){_0x6cc1x46[_0x7fd2[101]]({id:_0x6cc1x3a[_0x7fd2[116]],value:_0x6cc1x3a[_0x7fd2[100]]})}else {if(_0x6cc1x3a[_0x7fd2[98]]=== _0x7fd2[102]){var _0x6cc1x40=getValueFromPropertyName(_0x6cc1x22,_0x6cc1x3a[_0x7fd2[103]],_0x6cc1x11);if(_0x6cc1x40){_0x6cc1x46[_0x7fd2[101]]({id:_0x6cc1x3a[_0x7fd2[116]],value:_0x6cc1x40.toString()})}}else {if(_0x6cc1x3a[_0x7fd2[98]]=== _0x7fd2[104]){_0x6cc1x10[_0x6cc1x3a[_0x7fd2[105]][_0x7fd2[35]]]&& _0x6cc1x46[_0x7fd2[101]]({id:_0x6cc1x3a[_0x7fd2[116]],value:_0x6cc1x10[_0x6cc1x3a[_0x7fd2[105]][_0x7fd2[35]]].toString()})}}}})};return _0x6cc1x46}function handleTaskDisplay(_0x6cc1x11){return function(_0x6cc1xf){if(_0x6cc1xf&& _0x6cc1xf[_0x7fd2[89]]){console[_0x7fd2[12]](_0x7fd2[117],_0x6cc1xf[_0x7fd2[42]]);_0x6cc1x11[_0x7fd2[118]]= _0x6cc1xf[_0x7fd2[42]];return};return}}function handleReportIntegration(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf,_0x6cc1xb){return function(){delete _0x6cc1xf[_0x7fd2[42]];_0x6cc1xf[_0x7fd2[119]]= _0x7fd2[120];_0x6cc1xf[_0x7fd2[121]]= _0x6cc1xd;_0x6cc1xf[_0x7fd2[122]]= _0x7fd2[89];_0x6cc1xf[_0x7fd2[123]]= _0x6cc1x11[_0x7fd2[118]];_0x6cc1xf[_0x7fd2[124]]= _0x6cc1xb;_0x6cc1xf[_0x7fd2[125]]= util[_0x7fd2[57]](_0x7fd2[126],_0x6cc1x11[_0x7fd2[20]][_0x7fd2[127]],_0x6cc1x11[_0x7fd2[118]]);return ReportIntegration[_0x7fd2[84]](_0x6cc1xf)}}function handleEnd(_0x6cc1x11,_0x6cc1xf,_0x6cc1xd){return function(){console[_0x7fd2[12]](util[_0x7fd2[57]](_0x7fd2[128],_0x6cc1x11[_0x7fd2[118]],_0x6cc1x11[_0x7fd2[61]].Id));_0x6cc1x11= undefined;return}}function handleError(_0x6cc1x11,_0x6cc1xd,_0x6cc1xf,_0x6cc1xb){return function(_0x6cc1x4b){console[_0x7fd2[16]](_0x7fd2[129]);console[_0x7fd2[16]](_0x7fd2[130],_0x6cc1x4b[_0x7fd2[131]]);console[_0x7fd2[16]](_0x7fd2[132],_0x6cc1x4b[_0x7fd2[133]]);_0x6cc1x11= undefined;delete _0x6cc1xf[_0x7fd2[42]];_0x6cc1xf[_0x7fd2[119]]= _0x7fd2[120];_0x6cc1xf[_0x7fd2[121]]= _0x6cc1xd;_0x6cc1xf[_0x7fd2[122]]= _0x7fd2[134];_0x6cc1xf[_0x7fd2[124]]= _0x6cc1xb;ReportIntegration[_0x7fd2[84]](_0x6cc1xf)[_0x7fd2[18]](function(){return})[_0x7fd2[17]](function(_0x6cc1x4b){console[_0x7fd2[16]](_0x7fd2[135]);return})}}function stripTrailingSlash(_0x6cc1x4d){if(_0x6cc1x4d[_0x7fd2[136]](-1) === _0x7fd2[137]){return _0x6cc1x4d[_0x7fd2[136]](0,_0x6cc1x4d[_0x7fd2[59]]- 1)};return _0x6cc1x4d}module[_0x7fd2[138]]= Salesforce \ No newline at end of file diff --git a/server/config/integrations/zendesk.js b/server/config/integrations/zendesk.js index a96b6a6..4010e04 100644 --- a/server/config/integrations/zendesk.js +++ b/server/config/integrations/zendesk.js @@ -1,637 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var rp = require('request-promise'); - -var ZendeskIntegration = require('../../models').ZendeskIntegration; -var ZendeskConfiguration = require('../../models').ZendeskConfiguration; -var ReportIntegration = require('../../models').ReportIntegration; -var VoiceQueue = require('../../models').VoiceQueue; -var VoiceExtension = require('../../models').VoiceExtension; -var Agent = require('../../models').User; - -function Zendesk() { - console.log('Zendesk integration initialization...'); -} - -Zendesk.prototype.handleEvent = function(integrationId, configurationId, channel, subtype, data, variables) { - - var zendeskData = { - uri: undefined, - headers: undefined, - agent: undefined, - enduser: undefined, - ticket: undefined, - configuration: undefined, - recordEnable: false, - serverURL: undefined, - agentName: undefined - }; - - if (!integrationId || !configurationId) { - console.error('Passed parameters are not enough to create a new ticket: miss IntegrationId or ConfigurationId'); - return; - } - - ZendeskConfiguration - .find({ - where: { - id: configurationId, - AccountId: integrationId - }, - include: [{ - all: true, - include: [{ - all: true - }] - }] - }) - .then(handleEntityNotFound()) - .then(handleConnection(zendeskData)) - .then(searchMotionAgent(channel, data)) - .then(handleMotionAgent(zendeskData)) - .then(searchQueue(data)) - .then(handleQueueRecordings(zendeskData, data)) - .then(searchRoute(data)) - .then(handleOutboundRecordings(zendeskData, data)) - .then(searchAgent(zendeskData)) - .then(handleAgent(zendeskData)) - .then(searchAdmin(zendeskData)) - .then(handleAdmin(zendeskData)) - .then(searchEndUser(zendeskData, channel, data, subtype)) - .then(handleEndUser(zendeskData, channel, data, subtype)) - .then(endUserCreation(zendeskData, channel, data, subtype)) - .then(handleEndUserCreation(zendeskData, channel, data, subtype)) - .then(ticketCreation(zendeskData, data, variables)) - .then(handleTicketDisplay(zendeskData)) - .then(handleReportIntegration(zendeskData, channel, data, integrationId)) - .then(handleEnd(zendeskData)) - .catch(handleError(zendeskData, channel, data, integrationId)); - -}; - -function handleEntityNotFound() { - return function(entity) { - if (!entity) { - return null; - } - return entity; - }; -} - -function handleConnection(zendeskData) { - return function(configuration) { - var accConfiguration = getAccountConfiguration(configuration.ZendeskAccount); - zendeskData.configuration = configuration; - zendeskData.uri = accConfiguration.uri; - zendeskData.headers = accConfiguration.headers; - zendeskData.serverURL = configuration.ZendeskAccount.serverUrl; - } -} - -function searchMotionAgent(channel, data) { - return function() { - return Agent - .scope('agent') - .findOne({ - where: { - name: getValueFromPropertyName(data, getAgentSearchPropertyFromChannel(channel)) - }, - attributes: ['fullname'] - }); - } -} - -function handleMotionAgent(zendeskData) { - return function(agent) { - if (agent && agent.fullname) { - zendeskData.agentName = agent.fullname; - } - return; - } -} - -function searchQueue(data) { - return function() { - console.log('Searching Queue...'); - if (data.queue) { - return VoiceQueue.findOne({ - where: { - name: data.queue - }, - attributes: ['name', 'monitor_format'] - }); - } else { - return; - } - } -} - -function handleQueueRecordings(zendeskData, data) { - return function(queue) { - if (data.queue) { - if (queue && queue.monitor_format) { - console.log('[Zendesk] Recording enabled for the Queue', queue.name); - zendeskData.recordEnable = true; - } else { - zendeskData.recordEnable = false; - console.log('[Zendesk] Queue not found or Recording not enabled'); - } - } - return; - } -} - -function searchRoute(data) { - return function() { - if (data.routeId) { - return VoiceExtension.findOne({ - where: { - id: data.routeId - }, - attributes: ['id', 'record'] - }); - } else { - return; - } - } -} - -function handleOutboundRecordings(zendeskData, data) { - return function(route) { - if (data.routeId) { - if (route && route.record) { - console.log('[Zendesk] Recording enabled for the Route Outbound', route.id); - zendeskData.recordEnable = true; - } else { - zendeskData.recordEnable = false; - console.log('[Zendesk] Route Outbound not found or Recording not enabled'); - } - } - return; - } -} - -function getAccountConfiguration(account) { - var authJson = { - uri: stripTrailingSlash(account.remoteUri), - headers: { - 'Authorization': undefined, - 'Content-Type': 'application/json', - 'Accept': 'application/json' - } - }; - var auth = account.username; - if (account.authType === 'password') { - auth = auth + ':' + account.password; - } else if (account.authType === 'token') { - auth = auth + '/token:' + account.token; - } - authJson.headers.Authorization = 'Basic ' + new Buffer(auth).toString('base64'); - return authJson; -} - -function searchAgent(zendeskData) { - return function() { - console.log('[Zendesk] Agent to search:', zendeskData.agentName); - return rp({ - uri: zendeskData.uri + '/search.json', - qs: { - // 'query': "type:user role:agent name:Andrea Bianco" - 'query': util.format("type:user role:agent name:%s", zendeskData.agentName) - }, - headers: zendeskData.headers, - json: true - }); - } -} - -function getAgentSearchPropertyFromChannel(channel) { - var property = ''; - if (channel) { - switch (channel) { - case 'voice': - property = 'membername'; - break; - default: - property = 'membername'; - console.error('Channel not recognized:', channel); - } - } - return property; -} - -function getValueFromPropertyName(data, property, zendeskData) { - if (property === 'recordingURL') { - if (zendeskData && zendeskData.recordEnable && zendeskData.serverURL) { - return util.format('%s/api/voice/recordings/%s/download?type=uniqueid', stripTrailingSlash(zendeskData.serverURL), data.uniqueid); - } else { - return null; - } - } else { - return _.result(data, property); - } -} - -function handleAgent(zendeskData) { - return function(data) { - if (data.results.length > 0 && data.count > 0) { - console.log('[Zendesk] Agent found:', zendeskData.agentName); - zendeskData.agent = getMatchObject(data.results, 'name', zendeskData.agentName); - return zendeskData.agent; - } - return; - } -} - -function getMatchObject(collection, property, valueToSearch) { - var valueFound = _.find(collection, { - property: valueToSearch - }); - if (valueFound) { - return valueFound; - } - return _.first(collection); -} - -function searchAdmin(zendeskData) { - return function(data) { - if (data) { - return; - } - console.log('[Zendesk] Agent not found. Use the admin account'); - return rp({ - uri: zendeskData.uri + '/users/me.json', - headers: zendeskData.headers, - json: true - }); - } -} - -function handleAdmin(zendeskData) { - return function(data) { - if (!data) { - return; - } - if (data.user) { - console.log('[Zendesk] Admin selected'); - zendeskData.agent = data.user; - } - return; - } -} - -function searchEndUser(zendeskData, channel, data, subtype) { - return function() { - console.log('[Zendesk] End User to search:', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype))); - return rp({ - uri: zendeskData.uri + '/search.json', - qs: { - 'query': util.format("type:user role:end-user %s:%s", getEndUserSearchQueryFromChannel(channel), getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype))) - }, - headers: zendeskData.headers, - json: true - }); - } -} - -function getEndUserSearchQueryFromChannel(channel) { - var property = ''; - if (channel) { - switch (channel) { - case 'voice': - property = 'phone'; - break; - default: - property = 'phone'; - console.error('Channel not recognized:', channel); - } - } - return property; -} - -function getEndUserSearchPropertyFromChannel(channel, subtype) { - var property = ''; - if (channel) { - switch (channel) { - case 'voice': - if (subtype === 'outbound') { - property = 'destcalleridnum'; - } else if (subtype === 'queue') { - property = 'calleridnum'; - } - break; - default: - property = 'calleridnum'; - console.error('Channel not recognized:', channel); - } - } - return property; -} - -function getEndUserNamePropertyFromChannel(channel, subtype) { - var property = ''; - if (channel) { - switch (channel) { - case 'voice': - if (subtype === 'outbound') { - property = 'destcalleridname'; - } else if (subtype === 'queue') { - property = 'calleridname'; - } - break; - default: - property = 'calleridname'; - console.error('Channel not recognized:', channel); - } - } - return property; -} - -function handleEndUser(zendeskData, channel, event, subtype) { - return function(data) { - if (data.results.length > 0 && data.count > 0) { - console.log('[Zendesk] End User found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype))); - zendeskData.enduser = data.results[0]; - return zendeskData.enduser; - } - return; - } -} - -function endUserCreation(zendeskData, channel, event, subtype) { - return function(data) { - if (data) { - return; - } - console.log('[Zendesk] End User not found:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype))); - console.log(getJsonForEndUserCreation(channel, event, subtype)); - return rp({ - uri: zendeskData.uri + '/users.json', - method: 'POST', - body: { - user: getJsonForEndUserCreation(channel, event, subtype) - }, - headers: zendeskData.headers, - json: true - }); - } -} - -function getJsonForEndUserCreation(channel, data, subtype) { - var user = { - role: 'end-user' - }; - - switch (channel) { - case 'voice': - if (subtype === 'queue') { - if (isValidName(data.calleridname)) { - user.name = getValueFromPropertyName(data, getEndUserNamePropertyFromChannel(channel, subtype)); - } else { - user.name = util.format('Caller - %s', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype))) - } - } else if (subtype === 'outbound') { - if (isValidName(data.destcalleridname)) { - user.name = getValueFromPropertyName(data, getEndUserNamePropertyFromChannel(channel, subtype)); - } else { - user.name = util.format('Caller - %s', getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype))) - } - } - user.phone = getValueFromPropertyName(data, getEndUserSearchPropertyFromChannel(channel, subtype)); - break; - default: - console.error('Channel not recognized:', channel); - } - - return user; -} - -function isValidName(name) { - return name && name !== ''; -} - -function handleEndUserCreation(zendeskData, channel, event, subtype) { - return function(data) { - if (!data) { - return; - } - if (data.user) { - console.log('[Zendesk] End User created:', getValueFromPropertyName(event, getEndUserSearchPropertyFromChannel(channel, subtype))); - zendeskData.enduser = data.user; - } - return; - } -} - -function ticketCreation(zendeskData, event, variables) { - return function() { - var ticketBody = { - //Standard Field - requester_id: zendeskData.agent.id, - submitter_id: zendeskData.enduser.id, - assignee_id: zendeskData.enduser.id, - //Tag - tags: createTagsFromConfiguration(zendeskData), - //Configurated Field - subject: createSubjectFromConfiguration(zendeskData, event, variables), - description: createDescriptionFromConfiguration(zendeskData, event, variables), - custom_fields: createCustomFieldsFromConfiguration(zendeskData, event, variables) - }; - var fields = createFieldsFromConfiguration(zendeskData); - if (fields.length > 0) { - _.forEach(fields, function(item) { - ticketBody[item.id] = item.value; - }); - } - console.log('[Zendesk] Ticket body:', ticketBody); - return rp({ - uri: zendeskData.uri + '/tickets.json', - method: 'POST', - body: { - ticket: ticketBody - }, - headers: zendeskData.headers, - json: true - }); - } -} - -function createTagsFromConfiguration(zendeskData) { - var tags = []; - if (zendeskData.configuration.Tags.length > 0) { - tags = _.map(zendeskData.configuration.Tags, 'name'); - } - return tags; -} - -function createSubjectFromConfiguration(zendeskData, event, variables) { - var subject = ''; - var stringsArray = []; - if (zendeskData.configuration.Subject.length > 0) { - var subjectConfiguration = _.sortBy(zendeskData.configuration.Subject, ['id']); - _.forEach(subjectConfiguration, function(value) { - if (value.type === 'string') { - stringsArray.push(value.content); - } else if (value.type === 'variable' && value.variableName) { - var prop = getValueFromPropertyName(event, value.variableName, zendeskData); - if (prop) { - stringsArray.push(prop.toString()); - } - } else if (value.type === 'customVariable') { - variables[value.Variable.name] && stringsArray.push(variables[value.Variable.name].toString()); - } - }); - subject = stringsArray.join(' '); - } - return subject; -} - -function createDescriptionFromConfiguration(zendeskData, event, variables) { - var description = ''; - var stringsArray = []; - if (zendeskData.configuration.Description.length > 0) { - var descriptionConfiguration = _.sortBy(zendeskData.configuration.Description, ['id']); - _.forEach(descriptionConfiguration, function(value) { - if (value.type === 'string') { - stringsArray.push(value.content); - } else if (value.type === 'keyValue') { - if (value.keyType === 'string') { - stringsArray.push(util.format('%s: %s', value.key, value.keyContent)); - } else if (value.keyType === 'variable' && value.variableName) { - var prop = getValueFromPropertyName(event, value.variableName, zendeskData); - if (prop) { - stringsArray.push(util.format('%s: %s', value.key, prop.toString())); - } - } else if (value.keyType === 'customVariable') { - variables[value.Variable.name] && stringsArray.push(util.format('%s: %s', value.key, variables[value.Variable.name])); - } - } - }); - description = stringsArray.join('\n'); - } - return description; -} - -function createCustomFieldsFromConfiguration(zendeskData, event, variables) { - var customFields = []; - var fieldArray = []; - if (zendeskData.configuration.Field.length > 0) { - customFields = _.filter(zendeskData.configuration.Field, { - 'customField': true - }); - _.forEach(customFields, function(item) { - if (item.type === 'string') { - fieldArray.push({ - id: item.idField, - value: item.content - }); - } else if (item.type === 'variable') { - var prop = getValueFromPropertyName(event, item.variableName, zendeskData); - if (prop) { - fieldArray.push({ - id: item.idField, - value: prop.toString() - }); - } - } else if (item.type === 'customVariable') { - variables[item.Variable.name] && fieldArray.push({ - id: item.idField, - value: variables[item.Variable.name].toString() - }); - } - }); - } - return fieldArray; -} - -function createFieldsFromConfiguration(zendeskData) { - var fields = []; - var fieldArray = []; - if (zendeskData.configuration.Field.length > 0) { - fields = _.filter(zendeskData.configuration.Field, { - 'customField': false - }); - _.forEach(fields, function(item) { - if (item.type === 'string') { - fieldArray.push({ - id: item.nameField, - value: item.content - }); - } - }); - } - return fieldArray; -} - -function handleTicketDisplay(zendeskData) { - return function(data) { - if (data.ticket) { - console.log('[Zendesk] Ticket created'); - zendeskData.ticket = data.ticket; - var urlDisplay = util.format('/channels/voice/agents/%d/tickets/%d/display.json', zendeskData.agent.id, zendeskData.ticket.id); - return rp({ - uri: zendeskData.uri + urlDisplay, - method: 'POST', - headers: zendeskData.headers, - json: true - }); - } - return; - } -} - -function handleReportIntegration(zendeskData, channel, data, integrationId) { - return function() { - delete data.id; - data.integration = 'zendesk'; - data.eventChannel = channel; - data.exitStatus = 'success'; - data.ticketId = zendeskData.ticket.id; - data.url = zendeskData.ticket.url; - data.integrationId = integrationId; - return ReportIntegration.create(data); - } -} - -function handleEnd(zendeskData, data, channel) { - return function() { - console.log(util.format('[Zendesk] Ticket %d displayed to agent %d', zendeskData.ticket.id, zendeskData.agent.id)); - zendeskData = undefined; - return; - } -} - -function handleError(zendeskData, channel, data, integrationId) { - return function(err) { - console.error('[Zendesk] Error in ticket creation'); - console.error('[Zendesk] Message:', err.message); - console.error('[Zendesk] Stack:', err.stack); - zendeskData = undefined; - - delete data.id; - data.integration = 'zendesk'; - data.eventChannel = channel; - data.exitStatus = 'failed'; - data.integrationId = integrationId; - ReportIntegration - .create(data) - .then(function() { - return; - }) - .catch(function(err) { - console.error('[Zendesk] Error in Report integration create'); - return; - }); - } -} - -function stripTrailingSlash(str) { - if (str.substr(-1) === '/') { - return str.substr(0, str.length - 1); - } - return str; -} - -module.exports = Zendesk; +var _0xb51a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x5A\x65\x6E\x64\x65\x73\x6B\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x5A\x65\x6E\x64\x65\x73\x6B\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x55\x73\x65\x72","\x5A\x65\x6E\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x68\x61\x6E\x64\x6C\x65\x45\x76\x65\x6E\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x50\x61\x73\x73\x65\x64\x20\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73\x20\x61\x72\x65\x20\x6E\x6F\x74\x20\x65\x6E\x6F\x75\x67\x68\x20\x74\x6F\x20\x63\x72\x65\x61\x74\x65\x20\x61\x20\x6E\x65\x77\x20\x74\x69\x63\x6B\x65\x74\x3A\x20\x6D\x69\x73\x73\x20\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64\x20\x6F\x72\x20\x43\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64","\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x75\x72\x69","\x68\x65\x61\x64\x65\x72\x73","\x73\x65\x72\x76\x65\x72\x55\x52\x4C","\x73\x65\x72\x76\x65\x72\x55\x72\x6C","\x5A\x65\x6E\x64\x65\x73\x6B\x41\x63\x63\x6F\x75\x6E\x74","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x61\x67\x65\x6E\x74\x4E\x61\x6D\x65","\x53\x65\x61\x72\x63\x68\x69\x6E\x67\x20\x51\x75\x65\x75\x65\x2E\x2E\x2E","\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x6D\x6F\x6E\x69\x74\x6F\x72\x5F\x66\x6F\x72\x6D\x61\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x51\x75\x65\x75\x65","\x72\x65\x63\x6F\x72\x64\x45\x6E\x61\x62\x6C\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x51\x75\x65\x75\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x6F\x75\x74\x65\x49\x64","\x69\x64","\x72\x65\x63\x6F\x72\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x65\x6E\x61\x62\x6C\x65\x64\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x52\x6F\x75\x74\x65\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x20\x6F\x72\x20\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x20\x6E\x6F\x74\x20\x65\x6E\x61\x62\x6C\x65\x64","\x72\x65\x6D\x6F\x74\x65\x55\x72\x69","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6A\x73\x6F\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x61\x75\x74\x68\x54\x79\x70\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x3A","\x74\x6F\x6B\x65\x6E","\x2F\x74\x6F\x6B\x65\x6E\x3A","\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E","\x42\x61\x73\x69\x63\x20","\x62\x61\x73\x65\x36\x34","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x2F\x73\x65\x61\x72\x63\x68\x2E\x6A\x73\x6F\x6E","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x61\x67\x65\x6E\x74\x20\x6E\x61\x6D\x65\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65","\x43\x68\x61\x6E\x6E\x65\x6C\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x3A","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x55\x52\x4C","\x25\x73\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x2F\x25\x73\x2F\x64\x6F\x77\x6E\x6C\x6F\x61\x64\x3F\x74\x79\x70\x65\x3D\x75\x6E\x69\x71\x75\x65\x69\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x72\x65\x73\x75\x6C\x74","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x73\x75\x6C\x74\x73","\x63\x6F\x75\x6E\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x66\x69\x72\x73\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x67\x65\x6E\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x55\x73\x65\x20\x74\x68\x65\x20\x61\x64\x6D\x69\x6E\x20\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x75\x73\x65\x72\x73\x2F\x6D\x65\x2E\x6A\x73\x6F\x6E","\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x41\x64\x6D\x69\x6E\x20\x73\x65\x6C\x65\x63\x74\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x74\x6F\x20\x73\x65\x61\x72\x63\x68\x3A","\x74\x79\x70\x65\x3A\x75\x73\x65\x72\x20\x72\x6F\x6C\x65\x3A\x65\x6E\x64\x2D\x75\x73\x65\x72\x20\x25\x73\x3A\x25\x73","\x70\x68\x6F\x6E\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x64\x65\x73\x74\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x66\x6F\x75\x6E\x64\x3A","\x65\x6E\x64\x75\x73\x65\x72","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x3A","\x2F\x75\x73\x65\x72\x73\x2E\x6A\x73\x6F\x6E","\x50\x4F\x53\x54","\x65\x6E\x64\x2D\x75\x73\x65\x72","\x43\x61\x6C\x6C\x65\x72\x20\x2D\x20\x25\x73","\x3C\x75\x6E\x6B\x6E\x6F\x77\x6E\x3E","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x6E\x64\x20\x55\x73\x65\x72\x20\x63\x72\x65\x61\x74\x65\x64\x3A","\x76\x61\x6C\x75\x65","\x66\x6F\x72\x45\x61\x63\x68","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x62\x6F\x64\x79\x3A","\x2F\x74\x69\x63\x6B\x65\x74\x73\x2E\x6A\x73\x6F\x6E","\x54\x61\x67\x73","\x6D\x61\x70","\x53\x75\x62\x6A\x65\x63\x74","\x73\x6F\x72\x74\x42\x79","\x74\x79\x70\x65","\x73\x74\x72\x69\x6E\x67","\x63\x6F\x6E\x74\x65\x6E\x74","\x70\x75\x73\x68","\x76\x61\x72\x69\x61\x62\x6C\x65","\x76\x61\x72\x69\x61\x62\x6C\x65\x4E\x61\x6D\x65","\x63\x75\x73\x74\x6F\x6D\x56\x61\x72\x69\x61\x62\x6C\x65","\x56\x61\x72\x69\x61\x62\x6C\x65","\x20","\x6A\x6F\x69\x6E","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x6B\x65\x79\x56\x61\x6C\x75\x65","\x6B\x65\x79\x54\x79\x70\x65","\x25\x73\x3A\x20\x25\x73","\x6B\x65\x79","\x6B\x65\x79\x43\x6F\x6E\x74\x65\x6E\x74","\x0A","\x46\x69\x65\x6C\x64","\x66\x69\x6C\x74\x65\x72","\x69\x64\x46\x69\x65\x6C\x64","\x6E\x61\x6D\x65\x46\x69\x65\x6C\x64","\x74\x69\x63\x6B\x65\x74","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x65\x64","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x61\x67\x65\x6E\x74\x73\x2F\x25\x64\x2F\x74\x69\x63\x6B\x65\x74\x73\x2F\x25\x64\x2F\x64\x69\x73\x70\x6C\x61\x79\x2E\x6A\x73\x6F\x6E","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x7A\x65\x6E\x64\x65\x73\x6B","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x75\x72\x6C","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x49\x64","\x63\x72\x65\x61\x74\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x54\x69\x63\x6B\x65\x74\x20\x25\x64\x20\x64\x69\x73\x70\x6C\x61\x79\x65\x64\x20\x74\x6F\x20\x61\x67\x65\x6E\x74\x20\x25\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x74\x69\x63\x6B\x65\x74\x20\x63\x72\x65\x61\x74\x69\x6F\x6E","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x4D\x65\x73\x73\x61\x67\x65\x3A","\x6D\x65\x73\x73\x61\x67\x65","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x53\x74\x61\x63\x6B\x3A","\x73\x74\x61\x63\x6B","\x66\x61\x69\x6C\x65\x64","\x5B\x5A\x65\x6E\x64\x65\x73\x6B\x5D\x20\x45\x72\x72\x6F\x72\x20\x69\x6E\x20\x52\x65\x70\x6F\x72\x74\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x20\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x73\x74\x72","\x2F","\x65\x78\x70\x6F\x72\x74\x73"];_0xb51a[0];var _=require(_0xb51a[1]);var util=require(_0xb51a[2]);var rp=require(_0xb51a[3]);var ZendeskIntegration=require(_0xb51a[5])[_0xb51a[4]];var ZendeskConfiguration=require(_0xb51a[5])[_0xb51a[6]];var ReportIntegration=require(_0xb51a[5])[_0xb51a[7]];var VoiceQueue=require(_0xb51a[5])[_0xb51a[8]];var VoiceExtension=require(_0xb51a[5])[_0xb51a[9]];var Agent=require(_0xb51a[5])[_0xb51a[10]];function Zendesk(){console[_0xb51a[12]](_0xb51a[11])}Zendesk[_0xb51a[14]][_0xb51a[13]]= function(_0x73cbxb,_0x73cbxc,_0x73cbxd,_0x73cbxe,_0x73cbxf,_0x73cbx10){var _0x73cbx11={uri:undefined,headers:undefined,agent:undefined,enduser:undefined,ticket:undefined,configuration:undefined,recordEnable:false,serverURL:undefined,agentName:undefined};if(!_0x73cbxb|| !_0x73cbxc){console[_0xb51a[16]](_0xb51a[15]);return};ZendeskConfiguration[_0xb51a[19]]({where:{id:_0x73cbxc,AccountId:_0x73cbxb},include:[{all:true,include:[{all:true}]}]})[_0xb51a[18]](handleEntityNotFound())[_0xb51a[18]](handleConnection(_0x73cbx11))[_0xb51a[18]](searchMotionAgent(_0x73cbxd,_0x73cbxf))[_0xb51a[18]](handleMotionAgent(_0x73cbx11))[_0xb51a[18]](searchQueue(_0x73cbxf))[_0xb51a[18]](handleQueueRecordings(_0x73cbx11,_0x73cbxf))[_0xb51a[18]](searchRoute(_0x73cbxf))[_0xb51a[18]](handleOutboundRecordings(_0x73cbx11,_0x73cbxf))[_0xb51a[18]](searchAgent(_0x73cbx11))[_0xb51a[18]](handleAgent(_0x73cbx11))[_0xb51a[18]](searchAdmin(_0x73cbx11))[_0xb51a[18]](handleAdmin(_0x73cbx11))[_0xb51a[18]](searchEndUser(_0x73cbx11,_0x73cbxd,_0x73cbxf,_0x73cbxe))[_0xb51a[18]](handleEndUser(_0x73cbx11,_0x73cbxd,_0x73cbxf,_0x73cbxe))[_0xb51a[18]](endUserCreation(_0x73cbx11,_0x73cbxd,_0x73cbxf,_0x73cbxe))[_0xb51a[18]](handleEndUserCreation(_0x73cbx11,_0x73cbxd,_0x73cbxf,_0x73cbxe))[_0xb51a[18]](ticketCreation(_0x73cbx11,_0x73cbxf,_0x73cbx10))[_0xb51a[18]](handleTicketDisplay(_0x73cbx11))[_0xb51a[18]](handleReportIntegration(_0x73cbx11,_0x73cbxd,_0x73cbxf,_0x73cbxb))[_0xb51a[18]](handleEnd(_0x73cbx11))[_0xb51a[17]](handleError(_0x73cbx11,_0x73cbxd,_0x73cbxf,_0x73cbxb))};function handleEntityNotFound(){return function(_0x73cbx13){if(!_0x73cbx13){return null};return _0x73cbx13}}function handleConnection(_0x73cbx11){return function(_0x73cbx15){var _0x73cbx16=getAccountConfiguration(_0x73cbx15.ZendeskAccount);_0x73cbx11[_0xb51a[20]]= _0x73cbx15;_0x73cbx11[_0xb51a[21]]= _0x73cbx16[_0xb51a[21]];_0x73cbx11[_0xb51a[22]]= _0x73cbx16[_0xb51a[22]];_0x73cbx11[_0xb51a[23]]= _0x73cbx15[_0xb51a[25]][_0xb51a[24]]}}function searchMotionAgent(_0x73cbxd,_0x73cbxf){return function(){return Agent[_0xb51a[29]](_0xb51a[28])[_0xb51a[27]]({where:{name:getValueFromPropertyName(_0x73cbxf,getAgentSearchPropertyFromChannel(_0x73cbxd))},attributes:[_0xb51a[26]]})}}function handleMotionAgent(_0x73cbx11){return function(_0x73cbx19){if(_0x73cbx19&& _0x73cbx19[_0xb51a[26]]){_0x73cbx11[_0xb51a[30]]= _0x73cbx19[_0xb51a[26]]};return}}function searchQueue(_0x73cbxf){return function(){console[_0xb51a[12]](_0xb51a[31]);if(_0x73cbxf[_0xb51a[32]]){return VoiceQueue[_0xb51a[27]]({where:{name:_0x73cbxf[_0xb51a[32]]},attributes:[_0xb51a[33],_0xb51a[34]]})}else {return}}}function handleQueueRecordings(_0x73cbx11,_0x73cbxf){return function(_0x73cbx1c){if(_0x73cbxf[_0xb51a[32]]){if(_0x73cbx1c&& _0x73cbx1c[_0xb51a[34]]){console[_0xb51a[12]](_0xb51a[35],_0x73cbx1c[_0xb51a[33]]);_0x73cbx11[_0xb51a[36]]= true}else {_0x73cbx11[_0xb51a[36]]= false;console[_0xb51a[12]](_0xb51a[37])}};return}}function searchRoute(_0x73cbxf){return function(){if(_0x73cbxf[_0xb51a[38]]){return VoiceExtension[_0xb51a[27]]({where:{id:_0x73cbxf[_0xb51a[38]]},attributes:[_0xb51a[39],_0xb51a[40]]})}else {return}}}function handleOutboundRecordings(_0x73cbx11,_0x73cbxf){return function(_0x73cbx1f){if(_0x73cbxf[_0xb51a[38]]){if(_0x73cbx1f&& _0x73cbx1f[_0xb51a[40]]){console[_0xb51a[12]](_0xb51a[41],_0x73cbx1f[_0xb51a[39]]);_0x73cbx11[_0xb51a[36]]= true}else {_0x73cbx11[_0xb51a[36]]= false;console[_0xb51a[12]](_0xb51a[42])}};return}}function getAccountConfiguration(_0x73cbx21){var _0x73cbx22={uri:stripTrailingSlash(_0x73cbx21[_0xb51a[43]]),headers:{"\x41\x75\x74\x68\x6F\x72\x69\x7A\x61\x74\x69\x6F\x6E":undefined,"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0xb51a[44],"\x41\x63\x63\x65\x70\x74":_0xb51a[44]}};var _0x73cbx23=_0x73cbx21[_0xb51a[45]];if(_0x73cbx21[_0xb51a[46]]=== _0xb51a[47]){_0x73cbx23= _0x73cbx23+ _0xb51a[48]+ _0x73cbx21[_0xb51a[47]]}else {if(_0x73cbx21[_0xb51a[46]]=== _0xb51a[49]){_0x73cbx23= _0x73cbx23+ _0xb51a[50]+ _0x73cbx21[_0xb51a[49]]}};_0x73cbx22[_0xb51a[22]][_0xb51a[51]]= _0xb51a[52]+ new Buffer(_0x73cbx23).toString(_0xb51a[53]);return _0x73cbx22}function searchAgent(_0x73cbx11){return function(){console[_0xb51a[12]](_0xb51a[54],_0x73cbx11[_0xb51a[30]]);return rp({uri:_0x73cbx11[_0xb51a[21]]+ _0xb51a[55],qs:{"\x71\x75\x65\x72\x79":util[_0xb51a[57]](_0xb51a[56],_0x73cbx11[_0xb51a[30]])},headers:_0x73cbx11[_0xb51a[22]],json:true})}}function getAgentSearchPropertyFromChannel(_0x73cbxd){var _0x73cbx26=_0xb51a[58];if(_0x73cbxd){switch(_0x73cbxd){case _0xb51a[60]:_0x73cbx26= _0xb51a[59];break;default:_0x73cbx26= _0xb51a[59];console[_0xb51a[16]](_0xb51a[61],_0x73cbxd)}};return _0x73cbx26}function getValueFromPropertyName(_0x73cbxf,_0x73cbx26,_0x73cbx11){if(_0x73cbx26=== _0xb51a[62]){if(_0x73cbx11&& _0x73cbx11[_0xb51a[36]]&& _0x73cbx11[_0xb51a[23]]){return util[_0xb51a[57]](_0xb51a[63],stripTrailingSlash(_0x73cbx11[_0xb51a[23]]),_0x73cbxf[_0xb51a[64]])}else {return null}}else {return _[_0xb51a[65]](_0x73cbxf,_0x73cbx26)}}function handleAgent(_0x73cbx11){return function(_0x73cbxf){if(_0x73cbxf[_0xb51a[67]][_0xb51a[66]]> 0&& _0x73cbxf[_0xb51a[68]]> 0){console[_0xb51a[12]](_0xb51a[69],_0x73cbx11[_0xb51a[30]]);_0x73cbx11[_0xb51a[28]]= getMatchObject(_0x73cbxf[_0xb51a[67]],_0xb51a[33],_0x73cbx11[_0xb51a[30]]);return _0x73cbx11[_0xb51a[28]]};return}}function getMatchObject(_0x73cbx2a,_0x73cbx26,_0x73cbx2b){var _0x73cbx2c=_[_0xb51a[19]](_0x73cbx2a,{property:_0x73cbx2b});if(_0x73cbx2c){return _0x73cbx2c};return _[_0xb51a[70]](_0x73cbx2a)}function searchAdmin(_0x73cbx11){return function(_0x73cbxf){if(_0x73cbxf){return};console[_0xb51a[12]](_0xb51a[71]);return rp({uri:_0x73cbx11[_0xb51a[21]]+ _0xb51a[72],headers:_0x73cbx11[_0xb51a[22]],json:true})}}function handleAdmin(_0x73cbx11){return function(_0x73cbxf){if(!_0x73cbxf){return};if(_0x73cbxf[_0xb51a[73]]){console[_0xb51a[12]](_0xb51a[74]);_0x73cbx11[_0xb51a[28]]= _0x73cbxf[_0xb51a[73]]};return}}function searchEndUser(_0x73cbx11,_0x73cbxd,_0x73cbxf,_0x73cbxe){return function(){console[_0xb51a[12]](_0xb51a[75],getValueFromPropertyName(_0x73cbxf,getEndUserSearchPropertyFromChannel(_0x73cbxd,_0x73cbxe)));return rp({uri:_0x73cbx11[_0xb51a[21]]+ _0xb51a[55],qs:{"\x71\x75\x65\x72\x79":util[_0xb51a[57]](_0xb51a[76],getEndUserSearchQueryFromChannel(_0x73cbxd),getValueFromPropertyName(_0x73cbxf,getEndUserSearchPropertyFromChannel(_0x73cbxd,_0x73cbxe)))},headers:_0x73cbx11[_0xb51a[22]],json:true})}}function getEndUserSearchQueryFromChannel(_0x73cbxd){var _0x73cbx26=_0xb51a[58];if(_0x73cbxd){switch(_0x73cbxd){case _0xb51a[60]:_0x73cbx26= _0xb51a[77];break;default:_0x73cbx26= _0xb51a[77];console[_0xb51a[16]](_0xb51a[61],_0x73cbxd)}};return _0x73cbx26}function getEndUserSearchPropertyFromChannel(_0x73cbxd,_0x73cbxe){var _0x73cbx26=_0xb51a[58];if(_0x73cbxd){switch(_0x73cbxd){case _0xb51a[60]:if(_0x73cbxe=== _0xb51a[78]){_0x73cbx26= _0xb51a[79]}else {if(_0x73cbxe=== _0xb51a[32]){_0x73cbx26= _0xb51a[80]}};break;default:_0x73cbx26= _0xb51a[80];console[_0xb51a[16]](_0xb51a[61],_0x73cbxd)}};return _0x73cbx26}function getEndUserNamePropertyFromChannel(_0x73cbxd,_0x73cbxe){var _0x73cbx26=_0xb51a[58];if(_0x73cbxd){switch(_0x73cbxd){case _0xb51a[60]:if(_0x73cbxe=== _0xb51a[78]){_0x73cbx26= _0xb51a[81]}else {if(_0x73cbxe=== _0xb51a[32]){_0x73cbx26= _0xb51a[82]}};break;default:_0x73cbx26= _0xb51a[82];console[_0xb51a[16]](_0xb51a[61],_0x73cbxd)}};return _0x73cbx26}function handleEndUser(_0x73cbx11,_0x73cbxd,_0x73cbx34,_0x73cbxe){return function(_0x73cbxf){if(_0x73cbxf[_0xb51a[67]][_0xb51a[66]]> 0&& _0x73cbxf[_0xb51a[68]]> 0){console[_0xb51a[12]](_0xb51a[83],getValueFromPropertyName(_0x73cbx34,getEndUserSearchPropertyFromChannel(_0x73cbxd,_0x73cbxe)));_0x73cbx11[_0xb51a[84]]= _0x73cbxf[_0xb51a[67]][0];return _0x73cbx11[_0xb51a[84]]};return}}function endUserCreation(_0x73cbx11,_0x73cbxd,_0x73cbx34,_0x73cbxe){return function(_0x73cbxf){if(_0x73cbxf){return};console[_0xb51a[12]](_0xb51a[85],getValueFromPropertyName(_0x73cbx34,getEndUserSearchPropertyFromChannel(_0x73cbxd,_0x73cbxe)));console[_0xb51a[12]](getJsonForEndUserCreation(_0x73cbxd,_0x73cbx34,_0x73cbxe));return rp({uri:_0x73cbx11[_0xb51a[21]]+ _0xb51a[86],method:_0xb51a[87],body:{user:getJsonForEndUserCreation(_0x73cbxd,_0x73cbx34,_0x73cbxe)},headers:_0x73cbx11[_0xb51a[22]],json:true})}}function getJsonForEndUserCreation(_0x73cbxd,_0x73cbxf,_0x73cbxe){var _0x73cbx37={role:_0xb51a[88]};switch(_0x73cbxd){case _0xb51a[60]:if(_0x73cbxe=== _0xb51a[32]){if(isValidName(_0x73cbxf[_0xb51a[82]])){_0x73cbx37[_0xb51a[33]]= getValueFromPropertyName(_0x73cbxf,getEndUserNamePropertyFromChannel(_0x73cbxd,_0x73cbxe))}else {_0x73cbx37[_0xb51a[33]]= util[_0xb51a[57]](_0xb51a[89],getValueFromPropertyName(_0x73cbxf,getEndUserSearchPropertyFromChannel(_0x73cbxd,_0x73cbxe)))}}else {if(_0x73cbxe=== _0xb51a[78]){if(isValidName(_0x73cbxf[_0xb51a[81]])){_0x73cbx37[_0xb51a[33]]= getValueFromPropertyName(_0x73cbxf,getEndUserNamePropertyFromChannel(_0x73cbxd,_0x73cbxe))}else {_0x73cbx37[_0xb51a[33]]= util[_0xb51a[57]](_0xb51a[89],getValueFromPropertyName(_0x73cbxf,getEndUserSearchPropertyFromChannel(_0x73cbxd,_0x73cbxe)))}}};_0x73cbx37[_0xb51a[77]]= getValueFromPropertyName(_0x73cbxf,getEndUserSearchPropertyFromChannel(_0x73cbxd,_0x73cbxe));break;default:console[_0xb51a[16]](_0xb51a[61],_0x73cbxd)};return _0x73cbx37}function isValidName(_0x73cbx39){return _0x73cbx39&& _0x73cbx39!== _0xb51a[90]}function handleEndUserCreation(_0x73cbx11,_0x73cbxd,_0x73cbx34,_0x73cbxe){return function(_0x73cbxf){if(!_0x73cbxf){return};if(_0x73cbxf[_0xb51a[73]]){console[_0xb51a[12]](_0xb51a[91],getValueFromPropertyName(_0x73cbx34,getEndUserSearchPropertyFromChannel(_0x73cbxd,_0x73cbxe)));_0x73cbx11[_0xb51a[84]]= _0x73cbxf[_0xb51a[73]]};return}}function ticketCreation(_0x73cbx11,_0x73cbx34,_0x73cbx10){return function(){var _0x73cbx3c={requester_id:_0x73cbx11[_0xb51a[28]][_0xb51a[39]],submitter_id:_0x73cbx11[_0xb51a[84]][_0xb51a[39]],assignee_id:_0x73cbx11[_0xb51a[84]][_0xb51a[39]],tags:createTagsFromConfiguration(_0x73cbx11),subject:createSubjectFromConfiguration(_0x73cbx11,_0x73cbx34,_0x73cbx10),description:createDescriptionFromConfiguration(_0x73cbx11,_0x73cbx34,_0x73cbx10),custom_fields:createCustomFieldsFromConfiguration(_0x73cbx11,_0x73cbx34,_0x73cbx10)};var _0x73cbx3d=createFieldsFromConfiguration(_0x73cbx11);if(_0x73cbx3d[_0xb51a[66]]> 0){_[_0xb51a[93]](_0x73cbx3d,function(_0x73cbx3e){_0x73cbx3c[_0x73cbx3e[_0xb51a[39]]]= _0x73cbx3e[_0xb51a[92]]})};console[_0xb51a[12]](_0xb51a[94],_0x73cbx3c);return rp({uri:_0x73cbx11[_0xb51a[21]]+ _0xb51a[95],method:_0xb51a[87],body:{ticket:_0x73cbx3c},headers:_0x73cbx11[_0xb51a[22]],json:true})}}function createTagsFromConfiguration(_0x73cbx11){var _0x73cbx40=[];if(_0x73cbx11[_0xb51a[20]][_0xb51a[96]][_0xb51a[66]]> 0){_0x73cbx40= _[_0xb51a[97]](_0x73cbx11[_0xb51a[20]].Tags,_0xb51a[33])};return _0x73cbx40}function createSubjectFromConfiguration(_0x73cbx11,_0x73cbx34,_0x73cbx10){var _0x73cbx42=_0xb51a[58];var _0x73cbx43=[];if(_0x73cbx11[_0xb51a[20]][_0xb51a[98]][_0xb51a[66]]> 0){var _0x73cbx44=_[_0xb51a[99]](_0x73cbx11[_0xb51a[20]].Subject,[_0xb51a[39]]);_[_0xb51a[93]](_0x73cbx44,function(_0x73cbx45){if(_0x73cbx45[_0xb51a[100]]=== _0xb51a[101]){_0x73cbx43[_0xb51a[103]](_0x73cbx45[_0xb51a[102]])}else {if(_0x73cbx45[_0xb51a[100]]=== _0xb51a[104]&& _0x73cbx45[_0xb51a[105]]){var _0x73cbx46=getValueFromPropertyName(_0x73cbx34,_0x73cbx45[_0xb51a[105]],_0x73cbx11);if(_0x73cbx46){_0x73cbx43[_0xb51a[103]](_0x73cbx46.toString())}}else {if(_0x73cbx45[_0xb51a[100]]=== _0xb51a[106]){_0x73cbx10[_0x73cbx45[_0xb51a[107]][_0xb51a[33]]]&& _0x73cbx43[_0xb51a[103]](_0x73cbx10[_0x73cbx45[_0xb51a[107]][_0xb51a[33]]].toString())}}}});_0x73cbx42= _0x73cbx43[_0xb51a[109]](_0xb51a[108])};return _0x73cbx42}function createDescriptionFromConfiguration(_0x73cbx11,_0x73cbx34,_0x73cbx10){var _0x73cbx48=_0xb51a[58];var _0x73cbx43=[];if(_0x73cbx11[_0xb51a[20]][_0xb51a[110]][_0xb51a[66]]> 0){var _0x73cbx49=_[_0xb51a[99]](_0x73cbx11[_0xb51a[20]].Description,[_0xb51a[39]]);_[_0xb51a[93]](_0x73cbx49,function(_0x73cbx45){if(_0x73cbx45[_0xb51a[100]]=== _0xb51a[101]){_0x73cbx43[_0xb51a[103]](_0x73cbx45[_0xb51a[102]])}else {if(_0x73cbx45[_0xb51a[100]]=== _0xb51a[111]){if(_0x73cbx45[_0xb51a[112]]=== _0xb51a[101]){_0x73cbx43[_0xb51a[103]](util[_0xb51a[57]](_0xb51a[113],_0x73cbx45[_0xb51a[114]],_0x73cbx45[_0xb51a[115]]))}else {if(_0x73cbx45[_0xb51a[112]]=== _0xb51a[104]&& _0x73cbx45[_0xb51a[105]]){var _0x73cbx46=getValueFromPropertyName(_0x73cbx34,_0x73cbx45[_0xb51a[105]],_0x73cbx11);if(_0x73cbx46){_0x73cbx43[_0xb51a[103]](util[_0xb51a[57]](_0xb51a[113],_0x73cbx45[_0xb51a[114]],_0x73cbx46.toString()))}}else {if(_0x73cbx45[_0xb51a[112]]=== _0xb51a[106]){_0x73cbx10[_0x73cbx45[_0xb51a[107]][_0xb51a[33]]]&& _0x73cbx43[_0xb51a[103]](util[_0xb51a[57]](_0xb51a[113],_0x73cbx45[_0xb51a[114]],_0x73cbx10[_0x73cbx45[_0xb51a[107]][_0xb51a[33]]]))}}}}}});_0x73cbx48= _0x73cbx43[_0xb51a[109]](_0xb51a[116])};return _0x73cbx48}function createCustomFieldsFromConfiguration(_0x73cbx11,_0x73cbx34,_0x73cbx10){var _0x73cbx4b=[];var _0x73cbx4c=[];if(_0x73cbx11[_0xb51a[20]][_0xb51a[117]][_0xb51a[66]]> 0){_0x73cbx4b= _[_0xb51a[118]](_0x73cbx11[_0xb51a[20]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":true});_[_0xb51a[93]](_0x73cbx4b,function(_0x73cbx3e){if(_0x73cbx3e[_0xb51a[100]]=== _0xb51a[101]){_0x73cbx4c[_0xb51a[103]]({id:_0x73cbx3e[_0xb51a[119]],value:_0x73cbx3e[_0xb51a[102]]})}else {if(_0x73cbx3e[_0xb51a[100]]=== _0xb51a[104]){var _0x73cbx46=getValueFromPropertyName(_0x73cbx34,_0x73cbx3e[_0xb51a[105]],_0x73cbx11);if(_0x73cbx46){_0x73cbx4c[_0xb51a[103]]({id:_0x73cbx3e[_0xb51a[119]],value:_0x73cbx46.toString()})}}else {if(_0x73cbx3e[_0xb51a[100]]=== _0xb51a[106]){_0x73cbx10[_0x73cbx3e[_0xb51a[107]][_0xb51a[33]]]&& _0x73cbx4c[_0xb51a[103]]({id:_0x73cbx3e[_0xb51a[119]],value:_0x73cbx10[_0x73cbx3e[_0xb51a[107]][_0xb51a[33]]].toString()})}}}})};return _0x73cbx4c}function createFieldsFromConfiguration(_0x73cbx11){var _0x73cbx3d=[];var _0x73cbx4c=[];if(_0x73cbx11[_0xb51a[20]][_0xb51a[117]][_0xb51a[66]]> 0){_0x73cbx3d= _[_0xb51a[118]](_0x73cbx11[_0xb51a[20]].Field,{"\x63\x75\x73\x74\x6F\x6D\x46\x69\x65\x6C\x64":false});_[_0xb51a[93]](_0x73cbx3d,function(_0x73cbx3e){if(_0x73cbx3e[_0xb51a[100]]=== _0xb51a[101]){_0x73cbx4c[_0xb51a[103]]({id:_0x73cbx3e[_0xb51a[120]],value:_0x73cbx3e[_0xb51a[102]]})}})};return _0x73cbx4c}function handleTicketDisplay(_0x73cbx11){return function(_0x73cbxf){if(_0x73cbxf[_0xb51a[121]]){console[_0xb51a[12]](_0xb51a[122]);_0x73cbx11[_0xb51a[121]]= _0x73cbxf[_0xb51a[121]];var _0x73cbx4f=util[_0xb51a[57]](_0xb51a[123],_0x73cbx11[_0xb51a[28]][_0xb51a[39]],_0x73cbx11[_0xb51a[121]][_0xb51a[39]]);return rp({uri:_0x73cbx11[_0xb51a[21]]+ _0x73cbx4f,method:_0xb51a[87],headers:_0x73cbx11[_0xb51a[22]],json:true})};return}}function handleReportIntegration(_0x73cbx11,_0x73cbxd,_0x73cbxf,_0x73cbxb){return function(){delete _0x73cbxf[_0xb51a[39]];_0x73cbxf[_0xb51a[124]]= _0xb51a[125];_0x73cbxf[_0xb51a[126]]= _0x73cbxd;_0x73cbxf[_0xb51a[127]]= _0xb51a[128];_0x73cbxf[_0xb51a[129]]= _0x73cbx11[_0xb51a[121]][_0xb51a[39]];_0x73cbxf[_0xb51a[130]]= _0x73cbx11[_0xb51a[121]][_0xb51a[130]];_0x73cbxf[_0xb51a[131]]= _0x73cbxb;return ReportIntegration[_0xb51a[132]](_0x73cbxf)}}function handleEnd(_0x73cbx11,_0x73cbxf,_0x73cbxd){return function(){console[_0xb51a[12]](util[_0xb51a[57]](_0xb51a[133],_0x73cbx11[_0xb51a[121]][_0xb51a[39]],_0x73cbx11[_0xb51a[28]][_0xb51a[39]]));_0x73cbx11= undefined;return}}function handleError(_0x73cbx11,_0x73cbxd,_0x73cbxf,_0x73cbxb){return function(_0x73cbx53){console[_0xb51a[16]](_0xb51a[134]);console[_0xb51a[16]](_0xb51a[135],_0x73cbx53[_0xb51a[136]]);console[_0xb51a[16]](_0xb51a[137],_0x73cbx53[_0xb51a[138]]);_0x73cbx11= undefined;delete _0x73cbxf[_0xb51a[39]];_0x73cbxf[_0xb51a[124]]= _0xb51a[125];_0x73cbxf[_0xb51a[126]]= _0x73cbxd;_0x73cbxf[_0xb51a[127]]= _0xb51a[139];_0x73cbxf[_0xb51a[131]]= _0x73cbxb;ReportIntegration[_0xb51a[132]](_0x73cbxf)[_0xb51a[18]](function(){return})[_0xb51a[17]](function(_0x73cbx53){console[_0xb51a[16]](_0xb51a[140]);return})}}function stripTrailingSlash(_0x73cbx55){if(_0x73cbx55[_0xb51a[141]](-1) === _0xb51a[142]){return _0x73cbx55[_0xb51a[141]](0,_0x73cbx55[_0xb51a[66]]- 1)};return _0x73cbx55}module[_0xb51a[143]]= Zendesk \ No newline at end of file diff --git a/server/config/license/hardware.js b/server/config/license/hardware.js index 57ddc35..1ff5bcb 100644 --- a/server/config/license/hardware.js +++ b/server/config/license/hardware.js @@ -1,59 +1 @@ -'use strict'; -/** - * Imports - */ -var os = require('os'), - crypto = require('crypto'), - path = require('path'), - machineId = require('machine-uuid'), - machine = require('bimedia-machine-uuid'), - async = require('async'); - - -function getInterfaces() { - var ifaces = []; - var interfaces = os.networkInterfaces(); - for (var dev in interfaces) { - // ... and find the one that matches the criteria - var iface = interfaces[dev].filter(function(details) { - return details.family === 'IPv4' && details.internal === false; - }); - ifaces = ifaces.concat(iface); - } - - return ifaces; -} - -/** - * Retrieve unique MAC addresses - * - * @returns {string} array of MAC addresses - */ -function macAddress() { - var ifaces = getInterfaces(); - return (ifaces.length > 0) ? ifaces[0].mac : '00:00:00:00:00:00'; -} - -/** - * Retrieve unique IP addresses - * - * @returns {string} array of IP addresses - */ -function ipAddress() { - var ifaces = getInterfaces(); - return (ifaces.length > 0) ? ifaces[0].address : '127.0.0.1'; -} - -/** - * Generate the machine ID - * - * @param {Bolean} [format] true to return a formatted ID - * @returns {String} machine ID - */ -module.exports = function(format) { - var s = machine.uuid + '|' + macAddress() + '|' + ipAddress(); - var ID = crypto.createHash('md5').update(s).digest('hex'); - var FORMATTED = ID.substring(0, 8) + '-' + ID.substring(8, 12) + '-' + ID.substring(12, 16) + '-' + ID.substring(16, 20) + '-' + ID.substring(20); - - return format === true ? FORMATTED : ID; -}; +var _0x933f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6F\x73","\x63\x72\x79\x70\x74\x6F","\x70\x61\x74\x68","\x6D\x61\x63\x68\x69\x6E\x65\x2D\x75\x75\x69\x64","\x62\x69\x6D\x65\x64\x69\x61\x2D\x6D\x61\x63\x68\x69\x6E\x65\x2D\x75\x75\x69\x64","\x61\x73\x79\x6E\x63","\x6E\x65\x74\x77\x6F\x72\x6B\x49\x6E\x74\x65\x72\x66\x61\x63\x65\x73","\x66\x61\x6D\x69\x6C\x79","\x49\x50\x76\x34","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x66\x69\x6C\x74\x65\x72","\x63\x6F\x6E\x63\x61\x74","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x63","\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30\x3A\x30\x30","\x61\x64\x64\x72\x65\x73\x73","\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31","\x65\x78\x70\x6F\x72\x74\x73","\x75\x75\x69\x64","\x7C","\x68\x65\x78","\x64\x69\x67\x65\x73\x74","\x75\x70\x64\x61\x74\x65","\x6D\x64\x35","\x63\x72\x65\x61\x74\x65\x48\x61\x73\x68","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x2D"];_0x933f[0];var os=require(_0x933f[1]),crypto=require(_0x933f[2]),path=require(_0x933f[3]),machineId=require(_0x933f[4]),machine=require(_0x933f[5]),async=require(_0x933f[6]);function getInterfaces(){var _0x68edx8=[];var _0x68edx9=os[_0x933f[7]]();for(var _0x68edxa in _0x68edx9){var _0x68edxb=_0x68edx9[_0x68edxa][_0x933f[11]](function(_0x68edxc){return _0x68edxc[_0x933f[8]]=== _0x933f[9]&& _0x68edxc[_0x933f[10]]=== false});_0x68edx8= _0x68edx8[_0x933f[12]](_0x68edxb)};return _0x68edx8}function macAddress(){var _0x68edx8=getInterfaces();return (_0x68edx8[_0x933f[13]]> 0)?_0x68edx8[0][_0x933f[14]]:_0x933f[15]}function ipAddress(){var _0x68edx8=getInterfaces();return (_0x68edx8[_0x933f[13]]> 0)?_0x68edx8[0][_0x933f[16]]:_0x933f[17]}module[_0x933f[18]]= function(_0x68edxf){var _0x68edx10=machine[_0x933f[19]]+ _0x933f[20]+ macAddress()+ _0x933f[20]+ ipAddress();var _0x68edx11=crypto[_0x933f[25]](_0x933f[24])[_0x933f[23]](_0x68edx10)[_0x933f[22]](_0x933f[21]);var _0x68edx12=_0x68edx11[_0x933f[26]](0,8)+ _0x933f[27]+ _0x68edx11[_0x933f[26]](8,12)+ _0x933f[27]+ _0x68edx11[_0x933f[26]](12,16)+ _0x933f[27]+ _0x68edx11[_0x933f[26]](16,20)+ _0x933f[27]+ _0x68edx11[_0x933f[26]](20);return _0x68edxf=== true?_0x68edx12:_0x68edx11} \ No newline at end of file diff --git a/server/config/license/index.js b/server/config/license/index.js index a134cf7..106faf5 100644 --- a/server/config/license/index.js +++ b/server/config/license/index.js @@ -1,87 +1 @@ -'use strict'; - -var rp = require('request-promise'); -var util = require('util'); -var url = require('url'); -var crypto = require('crypto'); -var moment = require('moment'); -var CronJob = require('cron').CronJob; -var licenseService = require('./license.service'); -var config = require('../environment'); -var License = require('../../models').License; -var session = require('../environment').session; - -const expirationTh = 7; - -// Define the factory -function licenseManager() { - // Store the settings in a closure - var job = new CronJob({ - cronTime: '* * * * *', - onTick: function() { - - return License - .findOrCreate({ - where: { - id: 1 - } - }) - .spread(function(license) { - var data = {}; - - if (license.data2) { - var decipher = crypto.createDecipher('aes-256-ctr', session.secret); - var dec = decipher.update(license.data2, 'base64', 'utf8') - dec += decipher.final('utf8'); - - if (moment().diff(dec, 'days') > expirationTh) { - data.data1 = licenseService.getUuid(); - data.data2 = null; - } - } - - if (!license.data1) { - // No token saved - data.data1 = licenseService.getUuid(); - } else { - // Token saved - if ((data.data1 !== licenseService.getUuid()) && !license.data2) { - - var cipher = crypto.createCipher('aes-256-ctr', session.secret); - data.data2 = cipher.update(moment().format("YYYY-MM-DD HH:mm"), 'utf8', 'base64'); - // moment().format("YYYY-MM-DD HH:mm") - data.data2 += cipher.final('base64'); - } - } - - return license - .update(data) - .then(function(data) { - return rp({ - uri: config.provisioning + '/servers/' + licenseService.getUuid() + '/check', - json: true // Automatically stringifies the body to JSON - }); - }) - .then(function(data) { - if (license.data1 === data.uuid) { - return license - .update({ - license: data.license, - data2: null - }); - } - }); - }) - .catch(function(err) { - console.error(err); - }); - }, - start: true - }); - - job.start(); - - return {}; -} - -module.exports = licenseManager; +var _0x8cc4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x75\x74\x69\x6C","\x75\x72\x6C","\x63\x72\x79\x70\x74\x6F","\x6D\x6F\x6D\x65\x6E\x74","\x43\x72\x6F\x6E\x4A\x6F\x62","\x63\x72\x6F\x6E","\x2E\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x4C\x69\x63\x65\x6E\x73\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x73\x73\x69\x6F\x6E","\x2A\x20\x2A\x20\x2A\x20\x2A\x20\x2A","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x61\x74\x61\x32","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x73\x65\x63\x72\x65\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x75\x74\x66\x38","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x61\x6C","\x64\x61\x79\x73","\x64\x69\x66\x66","\x64\x61\x74\x61\x31","\x67\x65\x74\x55\x75\x69\x64","\x63\x72\x65\x61\x74\x65\x43\x69\x70\x68\x65\x72","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x75\x75\x69\x64","\x6C\x69\x63\x65\x6E\x73\x65","\x74\x68\x65\x6E","\x70\x72\x6F\x76\x69\x73\x69\x6F\x6E\x69\x6E\x67","\x2F\x73\x65\x72\x76\x65\x72\x73\x2F","\x2F\x63\x68\x65\x63\x6B","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x72\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x8cc4[0];var rp=require(_0x8cc4[1]);var util=require(_0x8cc4[2]);var url=require(_0x8cc4[3]);var crypto=require(_0x8cc4[4]);var moment=require(_0x8cc4[5]);var CronJob=require(_0x8cc4[7])[_0x8cc4[6]];var licenseService=require(_0x8cc4[8]);var config=require(_0x8cc4[9]);var License=require(_0x8cc4[11])[_0x8cc4[10]];var session=require(_0x8cc4[9])[_0x8cc4[12]];const expirationTh=7;function licenseManager(){var _0xc71axd= new CronJob({cronTime:_0x8cc4[13],onTick:function(){return License[_0x8cc4[38]]({where:{id:1}})[_0x8cc4[37]](function(_0xc71axf){var _0xc71ax10={};if(_0xc71axf[_0x8cc4[16]]){var _0xc71ax11=crypto[_0x8cc4[19]](_0x8cc4[17],session[_0x8cc4[18]]);var _0xc71ax12=_0xc71ax11[_0x8cc4[22]](_0xc71axf[_0x8cc4[16]],_0x8cc4[20],_0x8cc4[21]);_0xc71ax12+= _0xc71ax11[_0x8cc4[23]](_0x8cc4[21]);if(moment()[_0x8cc4[25]](_0xc71ax12,_0x8cc4[24])> expirationTh){_0xc71ax10[_0x8cc4[26]]= licenseService[_0x8cc4[27]]();_0xc71ax10[_0x8cc4[16]]= null}};if(!_0xc71axf[_0x8cc4[26]]){_0xc71ax10[_0x8cc4[26]]= licenseService[_0x8cc4[27]]()}else {if((_0xc71ax10[_0x8cc4[26]]!== licenseService[_0x8cc4[27]]())&& !_0xc71axf[_0x8cc4[16]]){var _0xc71ax13=crypto[_0x8cc4[28]](_0x8cc4[17],session[_0x8cc4[18]]);_0xc71ax10[_0x8cc4[16]]= _0xc71ax13[_0x8cc4[22]](moment()[_0x8cc4[30]](_0x8cc4[29]),_0x8cc4[21],_0x8cc4[20]);_0xc71ax10[_0x8cc4[16]]+= _0xc71ax13[_0x8cc4[23]](_0x8cc4[20])}};return _0xc71axf[_0x8cc4[22]](_0xc71ax10)[_0x8cc4[33]](function(_0xc71ax10){return rp({uri:config[_0x8cc4[34]]+ _0x8cc4[35]+ licenseService[_0x8cc4[27]]()+ _0x8cc4[36],json:true})})[_0x8cc4[33]](function(_0xc71ax10){if(_0xc71axf[_0x8cc4[26]]=== _0xc71ax10[_0x8cc4[31]]){return _0xc71axf[_0x8cc4[22]]({license:_0xc71ax10[_0x8cc4[32]],data2:null})}})})[_0x8cc4[15]](function(_0xc71axe){console[_0x8cc4[14]](_0xc71axe)})},start:true});_0xc71axd[_0x8cc4[39]]();return {}}module[_0x8cc4[40]]= licenseManager \ No newline at end of file diff --git a/server/config/license/license.service.js b/server/config/license/license.service.js index 8a052d0..91488e0 100644 --- a/server/config/license/license.service.js +++ b/server/config/license/license.service.js @@ -1,365 +1 @@ -'use strict'; - -var compose = require('composable-middleware'); -var moment = require('moment'); -var crypto = require('crypto'); -var util = require('util'); -var os = require('os'); -var exec = require('child_process').execSync; -var config = require('../environment'); - -var User = require('../../models').User; -var Telephone = require('../../models').Telephone; -var Setting = require('../../models').Setting; -var License = require('../../models').License; - -var demoLicense = { - users: 1, - agents: 1, - telephones: 0, - chat: false, - mail: false, - fax: false, - jscripty: false, - messaging: false, - openchannel: false, - custom: false, - cm: false, - dialer: false, - update: false, - description: 'DEMO LICENSE' -}; - -function getUuid() { - switch (os.platform()) { - case 'win32': - return exec('dmidecode --string system-uuid', { - encoding: 'utf8' - }).replace('\r\n', ''); - default: - - return require('./hardware')(true); - } -} - -/** - * Checks if the chat meets the requirements - */ - -function checkLicense(type) { - return compose() - .use(function(req, res, next) { - return License - .findOrCreate({ - where: { - id: 1 - } - }) - .spread(function(license) { - var _license = null; - var validLicense = false; - - try { - if (license.license) { - _license = decrypt(license.license, license.data1); - _license = JSON.parse(_license); - } else { - _license = demoLicense; - } - } catch (err) { - console.log('decrypt error', err); - _license = demoLicense; - } - - validLicense = _license[type]; - - if (!validLicense) return res.sendStatus(403); - return next(); - }) - .catch(function(err) { - return next(err); - }); - }); - -} - -function hasChat() { - return checkLicense('chat'); -} - -/** - * Checks if the sms meets the requirements - */ -function hasSms() { - return checkLicense('messaging'); -} - -/** - * Checks if the cm meets the requirements - */ -function hasCm() { - return checkLicense('cm'); -} - -/** - * Checks if the update meets the requirements - */ -function hasUpdate() { - return checkLicense('update'); -} - -/** - * Checks if the mail meets the requirements - */ -function hasMail() { - return checkLicense('mail'); -} - -/** - * Checks if the fax meets the requirements - */ -function hasFax() { - return checkLicense('fax'); -} - -/** - * Checks if the jscripty meets the requirements - */ -function hasJscripty() { - return checkLicense('jscripty'); -} - -function hasCustom() { - return checkLicense('custom'); -} - -/** - * Checks if the openchannel meets the requirements - */ -function hasOpenchannel() { - return checkLicense('openchannel'); -} - -/** - * Checks if the date meets the requirements - */ -function isValidDate() { - return compose() - .use(function(req, res, next) { - return License - .findOrCreate({ - where: { - id: 1 - } - }) - .spread(function(license) { - var _license = null, - date = false; - - try { - if (license.license) { - _license = decrypt(license.license, license.data1); - _license = JSON.parse(_license); - - if (moment().isSameOrBefore(_license.expiration)) { - date = true; - } - } - } catch (err) { - console.log('decrypt error', err); - } - - if (!date) return res.sendStatus(403); - return next(); - }) - .catch(function(err) { - return next(err); - }); - }); -} - -/** - * Checks if the users meets the requirements - */ -function isUsersLimit() { - return compose() - .use(function(req, res, next) { - var license; - - return License - .findOrCreate({ - where: { - id: 1 - } - }) - .spread(function(myLicense) { - license = myLicense; - - return User - .count({ - where: { - $or: [{ - role: 'admin' - }, { - role: 'user' - }] - } - }); - }) - .then(function(users) { - var _license = null, - valid = false; - try { - if (license.license) { - _license = decrypt(license.license, license.data1); - _license = JSON.parse(_license); - } else { - _license = demoLicense; - } - } catch (err) { - console.log('decrypt error', err); - _license = demoLicense; - } - - if (_license.users > users) valid = true; - - if (!valid) return res.status(403).send({ - message: 'Maximum users limit have been reached' - }); - return next(); - }) - .catch(function(err) { - return next(err); - }); - }); -} - -/** - * Checks if the telephone meets the requirements - */ -function isTelephonesLimit() { - return compose() - .use(function(req, res, next) { - var license; - - return License - .findOrCreate({ - where: { - id: 1 - } - }) - .spread(function(myLicense) { - license = myLicense; - - return User - .count({ - where: { - role: 'telephone' - } - }); - }) - .then(function(telephones) { - var _license = null, - valid = false; - try { - if (license.license) { - _license = decrypt(license.license, license.data1); - _license = JSON.parse(_license); - } else { - _license = demoLicense; - } - } catch (err) { - console.log('decrypt error', err); - _license = demoLicense; - } - - if (_license.telephones > telephones) valid = true; - - if (!valid) return res.status(403).send({ - message: 'Maximum telephones limit have been reached' - }); - return next(); - }) - .catch(function(err) { - return next(err); - }); - }); -} - -/** - * Checks if the telephone meets the requirements - */ -function isValidAgent() { - return function(user) { - var license; - var _valid = false; - - if (user.role === 'admin' || user.role === 'user' || (user.role === 'agent' && user.online)) { - _valid = true; - } - - return License - .findOrCreate({ - where: { - id: 1 - } - }) - .spread(function(myLicense) { - license = myLicense; - - return User - .count({ - where: { - role: 'agent', - online: true - } - }); - }) - .then(function(agents) { - var _license = null; - try { - if (license.license) { - _license = decrypt(license.license, license.data1); - _license = JSON.parse(_license); - } else { - _license = demoLicense; - } - } catch (err) { - console.log('decrypt error', err); - _license = demoLicense; - } - - if (_license.agents > agents) _valid = true; - - return _valid; - }); - } -} - -function decrypt(cypher, uuid) { - // var uuid = getUuid(); - var prefix = uuid.split('-')[4]; - var suffix = uuid.split('-')[0]; - - var decipher = crypto.createDecipher('aes-256-ctr', util.format('%s:%s:%s', prefix, uuid, suffix)); - var license = decipher.update(cypher, 'base64', 'utf8') - license += decipher.final('utf8'); - - return license; -} - -exports.getUuid = getUuid; -exports.isValidDate = isValidDate; -exports.isUsersLimit = isUsersLimit; -exports.isTelephonesLimit = isTelephonesLimit; -exports.hasChat = hasChat; -exports.hasMail = hasMail; -exports.hasFax = hasFax; -exports.hasOpenchannel = hasOpenchannel; -exports.hasSms = hasSms; -exports.hasJscripty = hasJscripty; -exports.hasCm = hasCm; -exports.hasUpdate = hasUpdate; -exports.isValidAgent = isValidAgent; -exports.demoLicense = demoLicense; -exports.decrypt = decrypt; +var _0x11e8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x63\x6F\x6D\x70\x6F\x73\x61\x62\x6C\x65\x2D\x6D\x69\x64\x64\x6C\x65\x77\x61\x72\x65","\x6D\x6F\x6D\x65\x6E\x74","\x63\x72\x79\x70\x74\x6F","\x75\x74\x69\x6C","\x6F\x73","\x65\x78\x65\x63\x53\x79\x6E\x63","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x53\x65\x74\x74\x69\x6E\x67","\x4C\x69\x63\x65\x6E\x73\x65","\x44\x45\x4D\x4F\x20\x4C\x49\x43\x45\x4E\x53\x45","\x0D\x0A","","\x72\x65\x70\x6C\x61\x63\x65","\x64\x6D\x69\x64\x65\x63\x6F\x64\x65\x20\x2D\x2D\x73\x74\x72\x69\x6E\x67\x20\x73\x79\x73\x74\x65\x6D\x2D\x75\x75\x69\x64","\x75\x74\x66\x38","\x77\x69\x6E\x33\x32","\x2E\x2F\x68\x61\x72\x64\x77\x61\x72\x65","\x70\x6C\x61\x74\x66\x6F\x72\x6D","\x63\x61\x74\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x31","\x70\x61\x72\x73\x65","\x64\x65\x63\x72\x79\x70\x74\x20\x65\x72\x72\x6F\x72","\x6C\x6F\x67","\x73\x65\x6E\x64\x53\x74\x61\x74\x75\x73","\x73\x70\x72\x65\x61\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x75\x73\x65","\x63\x68\x61\x74","\x6D\x65\x73\x73\x61\x67\x69\x6E\x67","\x63\x6D","\x75\x70\x64\x61\x74\x65","\x6D\x61\x69\x6C","\x66\x61\x78","\x6A\x73\x63\x72\x69\x70\x74\x79","\x63\x75\x73\x74\x6F\x6D","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x65\x78\x70\x69\x72\x61\x74\x69\x6F\x6E","\x69\x73\x53\x61\x6D\x65\x4F\x72\x42\x65\x66\x6F\x72\x65","\x75\x73\x65\x72\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x75\x73\x65\x72\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x61\x64\x6D\x69\x6E","\x75\x73\x65\x72","\x63\x6F\x75\x6E\x74","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x4D\x61\x78\x69\x6D\x75\x6D\x20\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x20\x6C\x69\x6D\x69\x74\x20\x68\x61\x76\x65\x20\x62\x65\x65\x6E\x20\x72\x65\x61\x63\x68\x65\x64","\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x72\x6F\x6C\x65","\x61\x67\x65\x6E\x74","\x6F\x6E\x6C\x69\x6E\x65","\x61\x67\x65\x6E\x74\x73","\x2D","\x73\x70\x6C\x69\x74","\x61\x65\x73\x2D\x32\x35\x36\x2D\x63\x74\x72","\x25\x73\x3A\x25\x73\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x63\x72\x65\x61\x74\x65\x44\x65\x63\x69\x70\x68\x65\x72","\x62\x61\x73\x65\x36\x34","\x66\x69\x6E\x61\x6C","\x67\x65\x74\x55\x75\x69\x64","\x69\x73\x56\x61\x6C\x69\x64\x44\x61\x74\x65","\x69\x73\x55\x73\x65\x72\x73\x4C\x69\x6D\x69\x74","\x69\x73\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73\x4C\x69\x6D\x69\x74","\x68\x61\x73\x43\x68\x61\x74","\x68\x61\x73\x4D\x61\x69\x6C","\x68\x61\x73\x46\x61\x78","\x68\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x68\x61\x73\x53\x6D\x73","\x68\x61\x73\x4A\x73\x63\x72\x69\x70\x74\x79","\x68\x61\x73\x43\x6D","\x68\x61\x73\x55\x70\x64\x61\x74\x65","\x69\x73\x56\x61\x6C\x69\x64\x41\x67\x65\x6E\x74","\x64\x65\x6D\x6F\x4C\x69\x63\x65\x6E\x73\x65","\x64\x65\x63\x72\x79\x70\x74"];_0x11e8[0];var compose=require(_0x11e8[1]);var moment=require(_0x11e8[2]);var crypto=require(_0x11e8[3]);var util=require(_0x11e8[4]);var os=require(_0x11e8[5]);var exec=require(_0x11e8[7])[_0x11e8[6]];var config=require(_0x11e8[8]);var User=require(_0x11e8[10])[_0x11e8[9]];var Telephone=require(_0x11e8[10])[_0x11e8[11]];var Setting=require(_0x11e8[10])[_0x11e8[12]];var License=require(_0x11e8[10])[_0x11e8[13]];var demoLicense={users:1,agents:1,telephones:0,chat:false,mail:false,fax:false,jscripty:false,messaging:false,openchannel:false,custom:false,cm:false,dialer:false,update:false,description:_0x11e8[14]};function getUuid(){switch(os[_0x11e8[22]]()){case _0x11e8[20]:return exec(_0x11e8[18],{encoding:_0x11e8[19]})[_0x11e8[17]](_0x11e8[15],_0x11e8[16]);default:return require(_0x11e8[21])(true)}}function checkLicense(_0xeff5xf){return compose()[_0x11e8[32]](function(_0xeff5x10,_0xeff5x11,_0xeff5x12){return License[_0x11e8[31]]({where:{id:1}})[_0x11e8[30]](function(_0xeff5x14){var _0xeff5x15=null;var _0xeff5x16=false;try{if(_0xeff5x14[_0x11e8[24]]){_0xeff5x15= decrypt(_0xeff5x14[_0x11e8[24]],_0xeff5x14[_0x11e8[25]]);_0xeff5x15= JSON[_0x11e8[26]](_0xeff5x15)}else {_0xeff5x15= demoLicense}}catch(err){console[_0x11e8[28]](_0x11e8[27],err);_0xeff5x15= demoLicense};_0xeff5x16= _0xeff5x15[_0xeff5xf];if(!_0xeff5x16){return _0xeff5x11[_0x11e8[29]](403)};return _0xeff5x12()})[_0x11e8[23]](function(_0xeff5x13){return _0xeff5x12(_0xeff5x13)})})}function hasChat(){return checkLicense(_0x11e8[33])}function hasSms(){return checkLicense(_0x11e8[34])}function hasCm(){return checkLicense(_0x11e8[35])}function hasUpdate(){return checkLicense(_0x11e8[36])}function hasMail(){return checkLicense(_0x11e8[37])}function hasFax(){return checkLicense(_0x11e8[38])}function hasJscripty(){return checkLicense(_0x11e8[39])}function hasCustom(){return checkLicense(_0x11e8[40])}function hasOpenchannel(){return checkLicense(_0x11e8[41])}function isValidDate(){return compose()[_0x11e8[32]](function(_0xeff5x10,_0xeff5x11,_0xeff5x12){return License[_0x11e8[31]]({where:{id:1}})[_0x11e8[30]](function(_0xeff5x14){var _0xeff5x15=null,_0xeff5x21=false;try{if(_0xeff5x14[_0x11e8[24]]){_0xeff5x15= decrypt(_0xeff5x14[_0x11e8[24]],_0xeff5x14[_0x11e8[25]]);_0xeff5x15= JSON[_0x11e8[26]](_0xeff5x15);if(moment()[_0x11e8[43]](_0xeff5x15[_0x11e8[42]])){_0xeff5x21= true}}}catch(err){console[_0x11e8[28]](_0x11e8[27],err)};if(!_0xeff5x21){return _0xeff5x11[_0x11e8[29]](403)};return _0xeff5x12()})[_0x11e8[23]](function(_0xeff5x13){return _0xeff5x12(_0xeff5x13)})})}function isUsersLimit(){return compose()[_0x11e8[32]](function(_0xeff5x10,_0xeff5x11,_0xeff5x12){var _0xeff5x14;return License[_0x11e8[31]]({where:{id:1}})[_0x11e8[30]](function(_0xeff5x25){_0xeff5x14= _0xeff5x25;return User[_0x11e8[51]]({where:{$or:[{role:_0x11e8[49]},{role:_0x11e8[50]}]}})})[_0x11e8[48]](function(_0xeff5x23){var _0xeff5x15=null,_0xeff5x24=false;try{if(_0xeff5x14[_0x11e8[24]]){_0xeff5x15= decrypt(_0xeff5x14[_0x11e8[24]],_0xeff5x14[_0x11e8[25]]);_0xeff5x15= JSON[_0x11e8[26]](_0xeff5x15)}else {_0xeff5x15= demoLicense}}catch(err){console[_0x11e8[28]](_0x11e8[27],err);_0xeff5x15= demoLicense};if(_0xeff5x15[_0x11e8[44]]> _0xeff5x23){_0xeff5x24= true};if(!_0xeff5x24){return _0xeff5x11[_0x11e8[47]](403)[_0x11e8[46]]({message:_0x11e8[45]})};return _0xeff5x12()})[_0x11e8[23]](function(_0xeff5x13){return _0xeff5x12(_0xeff5x13)})})}function isTelephonesLimit(){return compose()[_0x11e8[32]](function(_0xeff5x10,_0xeff5x11,_0xeff5x12){var _0xeff5x14;return License[_0x11e8[31]]({where:{id:1}})[_0x11e8[30]](function(_0xeff5x25){_0xeff5x14= _0xeff5x25;return User[_0x11e8[51]]({where:{role:_0x11e8[54]}})})[_0x11e8[48]](function(_0xeff5x27){var _0xeff5x15=null,_0xeff5x24=false;try{if(_0xeff5x14[_0x11e8[24]]){_0xeff5x15= decrypt(_0xeff5x14[_0x11e8[24]],_0xeff5x14[_0x11e8[25]]);_0xeff5x15= JSON[_0x11e8[26]](_0xeff5x15)}else {_0xeff5x15= demoLicense}}catch(err){console[_0x11e8[28]](_0x11e8[27],err);_0xeff5x15= demoLicense};if(_0xeff5x15[_0x11e8[52]]> _0xeff5x27){_0xeff5x24= true};if(!_0xeff5x24){return _0xeff5x11[_0x11e8[47]](403)[_0x11e8[46]]({message:_0x11e8[53]})};return _0xeff5x12()})[_0x11e8[23]](function(_0xeff5x13){return _0xeff5x12(_0xeff5x13)})})}function isValidAgent(){return function(_0xeff5x29){var _0xeff5x14;var _0xeff5x2a=false;if(_0xeff5x29[_0x11e8[55]]=== _0x11e8[49]|| _0xeff5x29[_0x11e8[55]]=== _0x11e8[50]|| (_0xeff5x29[_0x11e8[55]]=== _0x11e8[56]&& _0xeff5x29[_0x11e8[57]])){_0xeff5x2a= true};return License[_0x11e8[31]]({where:{id:1}})[_0x11e8[30]](function(_0xeff5x25){_0xeff5x14= _0xeff5x25;return User[_0x11e8[51]]({where:{role:_0x11e8[56],online:true}})})[_0x11e8[48]](function(_0xeff5x2b){var _0xeff5x15=null;try{if(_0xeff5x14[_0x11e8[24]]){_0xeff5x15= decrypt(_0xeff5x14[_0x11e8[24]],_0xeff5x14[_0x11e8[25]]);_0xeff5x15= JSON[_0x11e8[26]](_0xeff5x15)}else {_0xeff5x15= demoLicense}}catch(err){console[_0x11e8[28]](_0x11e8[27],err);_0xeff5x15= demoLicense};if(_0xeff5x15[_0x11e8[58]]> _0xeff5x2b){_0xeff5x2a= true};return _0xeff5x2a})}}function decrypt(_0xeff5x2d,_0xeff5x2e){var _0xeff5x2f=_0xeff5x2e[_0x11e8[60]](_0x11e8[59])[4];var _0xeff5x30=_0xeff5x2e[_0x11e8[60]](_0x11e8[59])[0];var _0xeff5x31=crypto[_0x11e8[64]](_0x11e8[61],util[_0x11e8[63]](_0x11e8[62],_0xeff5x2f,_0xeff5x2e,_0xeff5x30));var _0xeff5x14=_0xeff5x31[_0x11e8[36]](_0xeff5x2d,_0x11e8[65],_0x11e8[19]);_0xeff5x14+= _0xeff5x31[_0x11e8[66]](_0x11e8[19]);return _0xeff5x14}exports[_0x11e8[67]]= getUuid;exports[_0x11e8[68]]= isValidDate;exports[_0x11e8[69]]= isUsersLimit;exports[_0x11e8[70]]= isTelephonesLimit;exports[_0x11e8[71]]= hasChat;exports[_0x11e8[72]]= hasMail;exports[_0x11e8[73]]= hasFax;exports[_0x11e8[74]]= hasOpenchannel;exports[_0x11e8[75]]= hasSms;exports[_0x11e8[76]]= hasJscripty;exports[_0x11e8[77]]= hasCm;exports[_0x11e8[78]]= hasUpdate;exports[_0x11e8[79]]= isValidAgent;exports[_0x11e8[80]]= demoLicense;exports[_0x11e8[81]]= decrypt \ No newline at end of file diff --git a/server/config/local.env.sample.js b/server/config/local.env.sample.js index 58ae668..f2e4711 100644 --- a/server/config/local.env.sample.js +++ b/server/config/local.env.sample.js @@ -1,23 +1 @@ -'use strict'; - -// Use local.env.js for environment variables that grunt will set when the server starts locally. -// Use for your api keys, secrets, etc. This file should not be tracked by git. -// -// You will need to set these on the server you deploy to. - -module.exports = { - DOMAIN: 'http://localhost:9000', - SESSION_SECRET: 'xcallyshuttle-secret', - - FACEBOOK_ID: 'app-id', - FACEBOOK_SECRET: 'secret', - - TWITTER_ID: 'app-id', - TWITTER_SECRET: 'secret', - - GOOGLE_ID: 'app-id', - GOOGLE_SECRET: 'secret', - - // Control debug level for modules using visionmedia/debug - DEBUG: '' -}; +var _0xd19e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x39\x30\x30\x30","\x78\x63\x61\x6C\x6C\x79\x73\x68\x75\x74\x74\x6C\x65\x2D\x73\x65\x63\x72\x65\x74","\x61\x70\x70\x2D\x69\x64","\x73\x65\x63\x72\x65\x74",""];_0xd19e[0];module[_0xd19e[1]]= {DOMAIN:_0xd19e[2],SESSION_SECRET:_0xd19e[3],FACEBOOK_ID:_0xd19e[4],FACEBOOK_SECRET:_0xd19e[5],TWITTER_ID:_0xd19e[4],TWITTER_SECRET:_0xd19e[5],GOOGLE_ID:_0xd19e[4],GOOGLE_SECRET:_0xd19e[5],DEBUG:_0xd19e[6]} \ No newline at end of file diff --git a/server/config/logger.js b/server/config/logger.js index 1542f7e..8837515 100644 --- a/server/config/logger.js +++ b/server/config/logger.js @@ -1,120 +1 @@ -var winston = require('winston'); -var path = require('path'); -var config = require('./environment'); - -winston.emitErrs = true; - -var debug = new winston.Logger({ - transports: [ - new winston.transports.Console({ - level: 'debug', - handleExceptions: true, - json: false, - colorize: true - }) - ] -}); - -if (config.logging.debugToFile) { - debug.add( - winston.transports.File, { - name: 'debug-file', - level: 'debug', - filename: config.logging.debug, - handleExceptions: true, - json: true, - maxsize: 5242880, //5MB - maxFiles: 5, - colorize: false - } - ); -} - -var info = new winston.Logger({ - transports: [ - new winston.transports.File({ - name: 'info-file', - level: 'info', - filename: config.logging.info, - handleExceptions: true, - json: true, - maxsize: 5242880, //5MB - maxFiles: 5, - colorize: false - }), - new winston.transports.Console({ - level: 'info', - handleExceptions: true, - json: false, - colorize: true - }) - ] -}); - -var warn = new winston.Logger({ - transports: [ - new winston.transports.File({ - name: 'warn-file', - level: 'warn', - filename: config.logging.warn, - handleExceptions: true, - json: true, - maxsize: 5242880, //5MB - maxFiles: 5, - colorize: false - }), - new winston.transports.Console({ - level: 'warn', - handleExceptions: true, - json: false, - colorize: true - }) - ] -}); - -var error = new winston.Logger({ - transports: [ - new winston.transports.File({ - name: 'error-file', - level: 'error', - filename: config.logging.error, - handleExceptions: true, - json: true, - maxsize: 5242880, //5MB - maxFiles: 5, - colorize: false - }), - new winston.transports.Console({ - level: 'error', - handleExceptions: true, - json: false, - colorize: true - }) - ] -}); - -var loggers = { - debug: function(msg, callback) { - debug.debug(msg, callback); - }, - info: function(msg, callback) { - info.info(msg, callback); - }, - warn: function(msg, callback) { - warn.warn(msg, callback); - }, - error: function(msg, callback) { - error.error(msg, callback); - }, - log: function(level, msg, callback) { - var lvl = exports[level]; - lvl(msg, callback); - } -}; - -module.exports = loggers; -module.exports.stream = { - write: function(message, encoding) { - loggers.info(message); - } -}; +var _0xedf3=["\x77\x69\x6E\x73\x74\x6F\x6E","\x70\x61\x74\x68","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x65\x6D\x69\x74\x45\x72\x72\x73","\x64\x65\x62\x75\x67","\x74\x72\x61\x6E\x73\x70\x6F\x72\x74\x73","\x64\x65\x62\x75\x67\x54\x6F\x46\x69\x6C\x65","\x6C\x6F\x67\x67\x69\x6E\x67","\x64\x65\x62\x75\x67\x2D\x66\x69\x6C\x65","\x61\x64\x64","\x69\x6E\x66\x6F\x2D\x66\x69\x6C\x65","\x69\x6E\x66\x6F","\x77\x61\x72\x6E\x2D\x66\x69\x6C\x65","\x77\x61\x72\x6E","\x65\x72\x72\x6F\x72\x2D\x66\x69\x6C\x65","\x65\x72\x72\x6F\x72","\x65\x78\x70\x6F\x72\x74\x73","\x73\x74\x72\x65\x61\x6D"];var winston=require(_0xedf3[0]);var path=require(_0xedf3[1]);var config=require(_0xedf3[2]);winston[_0xedf3[3]]= true;var debug= new winston.Logger({transports:[ new winston[_0xedf3[5]].Console({level:_0xedf3[4],handleExceptions:true,json:false,colorize:true})]});if(config[_0xedf3[7]][_0xedf3[6]]){debug[_0xedf3[9]](winston[_0xedf3[5]].File,{name:_0xedf3[8],level:_0xedf3[4],filename:config[_0xedf3[7]][_0xedf3[4]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false})};var info= new winston.Logger({transports:[ new winston[_0xedf3[5]].File({name:_0xedf3[10],level:_0xedf3[11],filename:config[_0xedf3[7]][_0xedf3[11]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0xedf3[5]].Console({level:_0xedf3[11],handleExceptions:true,json:false,colorize:true})]});var warn= new winston.Logger({transports:[ new winston[_0xedf3[5]].File({name:_0xedf3[12],level:_0xedf3[13],filename:config[_0xedf3[7]][_0xedf3[13]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0xedf3[5]].Console({level:_0xedf3[13],handleExceptions:true,json:false,colorize:true})]});var error= new winston.Logger({transports:[ new winston[_0xedf3[5]].File({name:_0xedf3[14],level:_0xedf3[15],filename:config[_0xedf3[7]][_0xedf3[15]],handleExceptions:true,json:true,maxsize:5242880,maxFiles:5,colorize:false}), new winston[_0xedf3[5]].Console({level:_0xedf3[15],handleExceptions:true,json:false,colorize:true})]});var loggers={debug:function(_0x5653x9,_0x5653xa){debug[_0xedf3[4]](_0x5653x9,_0x5653xa)},info:function(_0x5653x9,_0x5653xa){info[_0xedf3[11]](_0x5653x9,_0x5653xa)},warn:function(_0x5653x9,_0x5653xa){warn[_0xedf3[13]](_0x5653x9,_0x5653xa)},error:function(_0x5653x9,_0x5653xa){error[_0xedf3[15]](_0x5653x9,_0x5653xa)},log:function(_0x5653xb,_0x5653x9,_0x5653xa){var _0x5653xc=exports[_0x5653xb];_0x5653xc(_0x5653x9,_0x5653xa)}};module[_0xedf3[16]]= loggers;module[_0xedf3[16]][_0xedf3[17]]= {write:function(_0x5653xd,_0x5653xe){loggers[_0xedf3[11]](_0x5653xd)}} \ No newline at end of file diff --git a/server/config/openchannel/custom.js b/server/config/openchannel/custom.js index ba3c589..3ac41d9 100644 --- a/server/config/openchannel/custom.js +++ b/server/config/openchannel/custom.js @@ -1,274 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Promise = require('bluebird'); -var Util = require('../util'); -var moment = require('moment'); -var path = require('path'); -var util = require('util'); -var fs = require('fs'); -var Agent = require('../../models').User; -var OpenchannelRoom = require('../../models').OpenchannelRoom; -var OpenchannelMessage = require('../../models').OpenchannelMessage; -var OpenchannelAccount = require('../../models').OpenchannelAccount; -var ReportOpenchannel = require('../../models').ReportOpenchannel; -var Action = require('../../models').Action; -var path = require('path'); -var fs = require('fs'); -var Contact = require('../../models').Contact; - - -var Scheduler = require('../routing/scheduler'); - -function Custom() { - console.log('open channel Initialization...'); - this.account = null; -} - -Custom.prototype.init = function(doc) { - var self = this; - console.log("Open channel - Account " + doc.name + " CREATE"); - self.account = doc; - OpenchannelAccount.afterUpdate(function(doc) { - if (self.account && doc.id === self.account.id) { - self.onUpdate(doc); - } - }); - ReportOpenchannel.afterUpdate(function(doc) { - if (self.account && doc.accountid == self.account.id) { - if (doc.changed('connectid')) { - self.webhook(doc, 'accept'); - } - if (doc.changed('rejectedAt')) { - self.webhook(doc, 'reject'); - } - } - }); - OpenchannelRoom.afterUpdate(function(doc) { - if (self.account && doc.OpenchannelAccountId == self.account.id) { - if (doc.changed('status') && doc.status === 'CLOSED') { - self.webhook(doc, 'close'); - } - } - }) - OpenchannelAccount.afterDestroy(function(doc) { - if (self.account && doc.id === self.account.id) { - self.onRemove(doc); - } - }); - OpenchannelMessage.afterCreate(function(doc, opt) { - - if (self.account && self.account.id == doc.dataValues.OpenchannelAccountId) { - - if (doc.status === 'RECEIVED') { - var scheduler = new Scheduler({ - channel: 'openchannel', - uniqueid: util.format('%s.%s', moment().unix(), doc.OpenchannelRoomId), - messageid: doc.id, - roomid: doc.OpenchannelRoomId, - accountid: self.account.id, - accountname: self.account.name, - from: doc.from - }) - - scheduler.init(); - } - - self.onSend(doc, opt); - } - }); -}; - -Custom.prototype.onUpdate = function(doc) { - if (!doc.changed('state')) { - console.log("Open channel - Account " + doc.name + " UPDATE"); - this.account = null; - this.account = doc; - } -} - -Custom.prototype.onRemove = function(doc) { - console.log("[Open channel - Account " + doc.name + " DESTROY"); - this.account = null; -} - -Custom.prototype.onSend = function(Message, opt) { - // var self = this; - var _Account = this.account; - var _mMessage = Message; - var _Room; - var _mAgent; - - if (_mMessage.status === 'SENDING') { - - return Promise - .all([]) - .then(getRoom(_mMessage)) - .then(function(Room) { - _Room = Room; - return _mMessage - .setOpenchannelRoom(Room.id); - }) - .then(function() { - return _Room - .updateAttributes({ - status: 'PENDING', - lastEvent: 'SENDING', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'), - openchannelOut: ++_Room.openchannelOut - }, { - individualHooks: true, - user: opt.user - }); - }) - .then(function(message) { - return Agent. - findById(_mMessage.UserId); - }) - .then(function(mAgent) { - _mAgent = mAgent; - return _Room - .addUser(_mAgent); - }) - .then(function() { - console.log("SENDING Message..."); - if (_Account.replyMethod && _Account.replyUrl) { - var message = { - from: _mMessage.from, - to: _mMessage.to, - body: _mMessage.body, - UserId: _mMessage.UserId, - OpenchannelAccountId: _mMessage.OpenchannelAccountId, - OpenchannelRoomId: _mMessage.OpenchannelRoomId - }; - return Util - .sendRequest(message, _Account.replyMethod, _Account.replyUrl) - } else { - throw { - name: "ERROR", - message: " Account HTTP Method or URL is not configured. Contact your administrator!!" - }; - - } - }) - .then(function(res) { - // console.log('response', res); - console.log(" Message SENT..."); - return _mMessage - .update({ - status: 'SENT', - res_data: JSON.stringify(res) - }) - }) - .then(function() { - return _Room - .updateAttributes({ - lastEvent: 'SENT', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss') - }); - }) - .catch(function(err) { - console.log('err', err); - _mMessage - .update({ - status: 'FAILED', - res_data: JSON.stringify(err) - }) - .then(function() { - return _Room - .updateAttributes({ - lastEvent: 'FAILED', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss') - }); - }) - .catch(function(err) { - console.log('Error updating error status'); - }); - - }) - } -} - -function getRoom(_mMessage) { - return function() { - if (_mMessage.OpenchannelRoomId) { - return OpenchannelRoom - .findById(_mMessage.OpenchannelRoomId) - } else { - return OpenchannelRoom - .findAll({ - limit: 1, - where: { - contact: _mMessage.to, - OpenchannelAccountId: _mMessage.OpenchannelAccountId - }, - order: [ - ['createdAt', 'DESC'] - ] - }) - .then(function(room) { - var room = room[0]; - if (!room || room.status === 'CLOSED') { - var parentID = room ? room.id : null; - return OpenchannelRoom - .create({ - contact: _mMessage.to, - OpenchannelAccountId: _mMessage.OpenchannelAccountId, - status: 'PENDING', - ParentId: parentID - }) - } - return room; - }) - } - - } -} - - -function execRequest(doc, method, url) { - Util.sendRequest(doc, method, url) - .then(function(values) { - console.log('request successeful!'); - - }) - .catch(function(err) { - console.log('request failed!'); - - }) -} -Custom.prototype.webhook = function(doc, hook) { - var _Account = this.account; - - switch (hook) { - case 'accept': - if (_Account.acceptMethod && _Account.acceptUrl) { - console.log('Openchannel account <' + _Account.name + '> executing accept webhook'); - execRequest(doc.dataValues, _Account.acceptMethod, _Account.acceptUrl); - } - if (_Account.actions.length) { - _.forEach(_Account.actions, function(action) { - if (action.enabled) { - Util.execAction(action, doc); - } - }) - } - break; - case 'reject': - if (_Account.rejectMethod && _Account.rejectUrl) { - console.log('Openchannel account <' + _Account.name + '> executing reject webhook'); - execRequest(doc.dataValues, _Account.rejectMethod, _Account.rejectUrl); - } - break; - case 'close': - if (_Account.closeMethod && _Account.closeUrl) { - console.log('Openchannel account <' + _Account.name + '> executing close webhook'); - execRequest(doc.dataValues, _Account.closeMethod, _Account.closeUrl); - } - break; - default: - console.log('Webhook not recognized'); - } -} - -module.exports = Custom; +var _0x5cc4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x66\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x6F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x4F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x6E\x61\x6D\x65","\x20\x43\x52\x45\x41\x54\x45","\x69\x64","\x6F\x6E\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x61\x63\x63\x65\x70\x74","\x77\x65\x62\x68\x6F\x6F\x6B","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x72\x65\x6A\x65\x63\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x63\x6C\x6F\x73\x65","\x6F\x6E\x52\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x49\x64","\x66\x72\x6F\x6D","\x6F\x6E\x53\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x65","\x20\x55\x50\x44\x41\x54\x45","\x5B\x4F\x70\x65\x6E\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x20\x44\x45\x53\x54\x52\x4F\x59","\x53\x45\x4E\x44\x49\x4E\x47","\x65\x72\x72","\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x65\x72\x72\x6F\x72\x20\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x46\x41\x49\x4C\x45\x44","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x68\x65\x6E","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x75\x70\x64\x61\x74\x65","\x53\x45\x4E\x54","\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x53\x45\x4E\x54\x2E\x2E\x2E","\x53\x45\x4E\x44\x49\x4E\x47\x20\x4D\x65\x73\x73\x61\x67\x65\x2E\x2E\x2E","\x72\x65\x70\x6C\x79\x4D\x65\x74\x68\x6F\x64","\x72\x65\x70\x6C\x79\x55\x72\x6C","\x74\x6F","\x62\x6F\x64\x79","\x55\x73\x65\x72\x49\x64","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x45\x52\x52\x4F\x52","\x20\x41\x63\x63\x6F\x75\x6E\x74\x20\x48\x54\x54\x50\x20\x4D\x65\x74\x68\x6F\x64\x20\x6F\x72\x20\x55\x52\x4C\x20\x69\x73\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64\x2E\x20\x43\x6F\x6E\x74\x61\x63\x74\x20\x79\x6F\x75\x72\x20\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72\x21\x21","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x50\x45\x4E\x44\x49\x4E\x47","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4F\x75\x74","\x75\x73\x65\x72","\x73\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x61\x6C\x6C","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x3C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x5cc4[0];var _=require(_0x5cc4[1]);var Promise=require(_0x5cc4[2]);var Util=require(_0x5cc4[3]);var moment=require(_0x5cc4[4]);var path=require(_0x5cc4[5]);var util=require(_0x5cc4[6]);var fs=require(_0x5cc4[7]);var Agent=require(_0x5cc4[9])[_0x5cc4[8]];var OpenchannelRoom=require(_0x5cc4[9])[_0x5cc4[10]];var OpenchannelMessage=require(_0x5cc4[9])[_0x5cc4[11]];var OpenchannelAccount=require(_0x5cc4[9])[_0x5cc4[12]];var ReportOpenchannel=require(_0x5cc4[9])[_0x5cc4[13]];var Action=require(_0x5cc4[9])[_0x5cc4[14]];var path=require(_0x5cc4[5]);var fs=require(_0x5cc4[7]);var Contact=require(_0x5cc4[9])[_0x5cc4[15]];var Scheduler=require(_0x5cc4[16]);function Custom(){console[_0x5cc4[18]](_0x5cc4[17]);this[_0x5cc4[19]]= null}Custom[_0x5cc4[21]][_0x5cc4[20]]= function(_0xf6cex11){var _0xf6cex12=this;console[_0x5cc4[18]](_0x5cc4[22]+ _0xf6cex11[_0x5cc4[23]]+ _0x5cc4[24]);_0xf6cex12[_0x5cc4[19]]= _0xf6cex11;OpenchannelAccount[_0x5cc4[27]](function(_0xf6cex11){if(_0xf6cex12[_0x5cc4[19]]&& _0xf6cex11[_0x5cc4[25]]=== _0xf6cex12[_0x5cc4[19]][_0x5cc4[25]]){_0xf6cex12[_0x5cc4[26]](_0xf6cex11)}});ReportOpenchannel[_0x5cc4[27]](function(_0xf6cex11){if(_0xf6cex12[_0x5cc4[19]]&& _0xf6cex11[_0x5cc4[28]]== _0xf6cex12[_0x5cc4[19]][_0x5cc4[25]]){if(_0xf6cex11[_0x5cc4[30]](_0x5cc4[29])){_0xf6cex12[_0x5cc4[32]](_0xf6cex11,_0x5cc4[31])};if(_0xf6cex11[_0x5cc4[30]](_0x5cc4[33])){_0xf6cex12[_0x5cc4[32]](_0xf6cex11,_0x5cc4[34])}}});OpenchannelRoom[_0x5cc4[27]](function(_0xf6cex11){if(_0xf6cex12[_0x5cc4[19]]&& _0xf6cex11[_0x5cc4[35]]== _0xf6cex12[_0x5cc4[19]][_0x5cc4[25]]){if(_0xf6cex11[_0x5cc4[30]](_0x5cc4[36])&& _0xf6cex11[_0x5cc4[36]]=== _0x5cc4[37]){_0xf6cex12[_0x5cc4[32]](_0xf6cex11,_0x5cc4[38])}}});OpenchannelAccount[_0x5cc4[40]](function(_0xf6cex11){if(_0xf6cex12[_0x5cc4[19]]&& _0xf6cex11[_0x5cc4[25]]=== _0xf6cex12[_0x5cc4[19]][_0x5cc4[25]]){_0xf6cex12[_0x5cc4[39]](_0xf6cex11)}});OpenchannelMessage[_0x5cc4[50]](function(_0xf6cex11,_0xf6cex13){if(_0xf6cex12[_0x5cc4[19]]&& _0xf6cex12[_0x5cc4[19]][_0x5cc4[25]]== _0xf6cex11[_0x5cc4[41]][_0x5cc4[35]]){if(_0xf6cex11[_0x5cc4[36]]=== _0x5cc4[42]){var _0xf6cex14= new Scheduler({channel:_0x5cc4[43],uniqueid:util[_0x5cc4[46]](_0x5cc4[44],moment()[_0x5cc4[45]](),_0xf6cex11.OpenchannelRoomId),messageid:_0xf6cex11[_0x5cc4[25]],roomid:_0xf6cex11[_0x5cc4[47]],accountid:_0xf6cex12[_0x5cc4[19]][_0x5cc4[25]],accountname:_0xf6cex12[_0x5cc4[19]][_0x5cc4[23]],from:_0xf6cex11[_0x5cc4[48]]});_0xf6cex14[_0x5cc4[20]]()};_0xf6cex12[_0x5cc4[49]](_0xf6cex11,_0xf6cex13)}})};Custom[_0x5cc4[21]][_0x5cc4[26]]= function(_0xf6cex11){if(!_0xf6cex11[_0x5cc4[30]](_0x5cc4[51])){console[_0x5cc4[18]](_0x5cc4[22]+ _0xf6cex11[_0x5cc4[23]]+ _0x5cc4[52]);this[_0x5cc4[19]]= null;this[_0x5cc4[19]]= _0xf6cex11}};Custom[_0x5cc4[21]][_0x5cc4[39]]= function(_0xf6cex11){console[_0x5cc4[18]](_0x5cc4[53]+ _0xf6cex11[_0x5cc4[23]]+ _0x5cc4[54]);this[_0x5cc4[19]]= null};Custom[_0x5cc4[21]][_0x5cc4[49]]= function(_0xf6cex15,_0xf6cex13){var _0xf6cex16=this[_0x5cc4[19]];var _0xf6cex17=_0xf6cex15;var _0xf6cex18;var _0xf6cex19;if(_0xf6cex17[_0x5cc4[36]]=== _0x5cc4[55]){return Promise[_0x5cc4[82]]([])[_0x5cc4[62]](getRoom(_0xf6cex17))[_0x5cc4[62]](function(_0xf6cex1e){_0xf6cex18= _0xf6cex1e;return _0xf6cex17[_0x5cc4[81]](_0xf6cex1e[_0x5cc4[25]])})[_0x5cc4[62]](function(){return _0xf6cex18[_0x5cc4[61]]({status:_0x5cc4[78],lastEvent:_0x5cc4[55],lastEventAt:moment()[_0x5cc4[46]](_0x5cc4[60]),openchannelOut:++_0xf6cex18[_0x5cc4[79]]},{individualHooks:true,user:_0xf6cex13[_0x5cc4[80]]})})[_0x5cc4[62]](function(_0xf6cex1c){return Agent[_0x5cc4[77]](_0xf6cex17.UserId)})[_0x5cc4[62]](function(_0xf6cex1d){_0xf6cex19= _0xf6cex1d;return _0xf6cex18[_0x5cc4[76]](_0xf6cex19)})[_0x5cc4[62]](function(){console[_0x5cc4[18]](_0x5cc4[67]);if(_0xf6cex16[_0x5cc4[68]]&& _0xf6cex16[_0x5cc4[69]]){var _0xf6cex1c={from:_0xf6cex17[_0x5cc4[48]],to:_0xf6cex17[_0x5cc4[70]],body:_0xf6cex17[_0x5cc4[71]],UserId:_0xf6cex17[_0x5cc4[72]],OpenchannelAccountId:_0xf6cex17[_0x5cc4[35]],OpenchannelRoomId:_0xf6cex17[_0x5cc4[47]]};return Util[_0x5cc4[73]](_0xf6cex1c,_0xf6cex16[_0x5cc4[68]],_0xf6cex16[_0x5cc4[69]])}else {throw {name:_0x5cc4[74],message:_0x5cc4[75]}}})[_0x5cc4[62]](function(_0xf6cex1b){console[_0x5cc4[18]](_0x5cc4[66]);return _0xf6cex17[_0x5cc4[64]]({status:_0x5cc4[65],res_data:JSON[_0x5cc4[63]](_0xf6cex1b)})})[_0x5cc4[62]](function(){return _0xf6cex18[_0x5cc4[61]]({lastEvent:_0x5cc4[65],lastEventAt:moment()[_0x5cc4[46]](_0x5cc4[60])})})[_0x5cc4[58]](function(_0xf6cex1a){console[_0x5cc4[18]](_0x5cc4[56],_0xf6cex1a);_0xf6cex17[_0x5cc4[64]]({status:_0x5cc4[59],res_data:JSON[_0x5cc4[63]](_0xf6cex1a)})[_0x5cc4[62]](function(){return _0xf6cex18[_0x5cc4[61]]({lastEvent:_0x5cc4[59],lastEventAt:moment()[_0x5cc4[46]](_0x5cc4[60])})})[_0x5cc4[58]](function(_0xf6cex1a){console[_0x5cc4[18]](_0x5cc4[57])})})}};function getRoom(_0xf6cex17){return function(){if(_0xf6cex17[_0x5cc4[47]]){return OpenchannelRoom[_0x5cc4[77]](_0xf6cex17.OpenchannelRoomId)}else {return OpenchannelRoom[_0x5cc4[86]]({limit:1,where:{contact:_0xf6cex17[_0x5cc4[70]],OpenchannelAccountId:_0xf6cex17[_0x5cc4[35]]},order:[[_0x5cc4[84],_0x5cc4[85]]]})[_0x5cc4[62]](function(_0xf6cex20){var _0xf6cex20=_0xf6cex20[0];if(!_0xf6cex20|| _0xf6cex20[_0x5cc4[36]]=== _0x5cc4[37]){var _0xf6cex21=_0xf6cex20?_0xf6cex20[_0x5cc4[25]]:null;return OpenchannelRoom[_0x5cc4[83]]({contact:_0xf6cex17[_0x5cc4[70]],OpenchannelAccountId:_0xf6cex17[_0x5cc4[35]],status:_0x5cc4[78],ParentId:_0xf6cex21})};return _0xf6cex20})}}}function execRequest(_0xf6cex11,_0xf6cex23,_0xf6cex24){Util[_0x5cc4[73]](_0xf6cex11,_0xf6cex23,_0xf6cex24)[_0x5cc4[62]](function(_0xf6cex25){console[_0x5cc4[18]](_0x5cc4[88])})[_0x5cc4[58]](function(_0xf6cex1a){console[_0x5cc4[18]](_0x5cc4[87])})}Custom[_0x5cc4[21]][_0x5cc4[32]]= function(_0xf6cex11,_0xf6cex26){var _0xf6cex16=this[_0x5cc4[19]];switch(_0xf6cex26){case _0x5cc4[31]:if(_0xf6cex16[_0x5cc4[89]]&& _0xf6cex16[_0x5cc4[90]]){console[_0x5cc4[18]](_0x5cc4[91]+ _0xf6cex16[_0x5cc4[23]]+ _0x5cc4[92]);execRequest(_0xf6cex11[_0x5cc4[41]],_0xf6cex16[_0x5cc4[89]],_0xf6cex16[_0x5cc4[90]])};if(_0xf6cex16[_0x5cc4[94]][_0x5cc4[93]]){_[_0x5cc4[97]](_0xf6cex16[_0x5cc4[94]],function(_0xf6cex27){if(_0xf6cex27[_0x5cc4[95]]){Util[_0x5cc4[96]](_0xf6cex27,_0xf6cex11)}})};break;case _0x5cc4[34]:if(_0xf6cex16[_0x5cc4[98]]&& _0xf6cex16[_0x5cc4[99]]){console[_0x5cc4[18]](_0x5cc4[91]+ _0xf6cex16[_0x5cc4[23]]+ _0x5cc4[100]);execRequest(_0xf6cex11[_0x5cc4[41]],_0xf6cex16[_0x5cc4[98]],_0xf6cex16[_0x5cc4[99]])};break;case _0x5cc4[38]:if(_0xf6cex16[_0x5cc4[101]]&& _0xf6cex16[_0x5cc4[102]]){console[_0x5cc4[18]](_0x5cc4[91]+ _0xf6cex16[_0x5cc4[23]]+ _0x5cc4[103]);execRequest(_0xf6cex11[_0x5cc4[41]],_0xf6cex16[_0x5cc4[101]],_0xf6cex16[_0x5cc4[102]])};break;default:console[_0x5cc4[18]](_0x5cc4[104])}};module[_0x5cc4[105]]= Custom \ No newline at end of file diff --git a/server/config/openchannel/index.js b/server/config/openchannel/index.js index f6a56c3..94050dd 100644 --- a/server/config/openchannel/index.js +++ b/server/config/openchannel/index.js @@ -1,23 +1 @@ -'use strict'; -var OpenchannelAccount = require('../../models').OpenchannelAccount; -var Custom = require('./custom'); - - -module.exports = function() { - OpenchannelAccount.afterCreate(function(server) { - var custom = new Custom(); - custom.init(server); - }); - - return OpenchannelAccount - .findAll() - .then(function(accounts) { - accounts.forEach(function(account) { - var custom = new Custom(); - custom.init(account); - }); - }) - .catch(function(err) { - console.error(err); - }); -} +var _0x2191=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x63\x75\x73\x74\x6F\x6D","\x65\x78\x70\x6F\x72\x74\x73","\x69\x6E\x69\x74","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x2191[0];var OpenchannelAccount=require(_0x2191[2])[_0x2191[1]];var Custom=require(_0x2191[3]);module[_0x2191[4]]= function(){OpenchannelAccount[_0x2191[6]](function(_0xb4c6x3){var _0xb4c6x4= new Custom();_0xb4c6x4[_0x2191[5]](_0xb4c6x3)});return OpenchannelAccount[_0x2191[11]]()[_0x2191[10]](function(_0xb4c6x6){_0xb4c6x6[_0x2191[9]](function(_0xb4c6x7){var _0xb4c6x4= new Custom();_0xb4c6x4[_0x2191[5]](_0xb4c6x7)})})[_0x2191[8]](function(_0xb4c6x5){console[_0x2191[7]](_0xb4c6x5)})} \ No newline at end of file diff --git a/server/config/routing/agent.js b/server/config/routing/agent.js index d2231e5..646bf41 100644 --- a/server/config/routing/agent.js +++ b/server/config/routing/agent.js @@ -1,118 +1 @@ -'use strict'; - -const _ = require('lodash'); -const config = require('../environment'); -const structure = require('./structure'); - -// NODEJS API -const cp = require('child_process'); -const util = require('util'); -const moment = require('moment'); - -// MODELS -const User = require('../../models').User; - -// Define the factory -function Agent(app, data, next) { - this.app = app; - this.data = data; - this.called = []; - this.rejected = []; - //callbacks - this.next = next; -} - -Agent.prototype.init = function init() { - var self = this; - var query = { - where: { - id: self.app.UserId, - online: true - }, - include: [] - }; - - query.where[structure.labels.pauses[self.data.channel]] = false; - query.include.push({ - model: structure.models.rooms[self.data.channel], - attributes: ['id'] - }); - - return User - .findAll(query) - .then(function(agents) { - self._agents = agents; - - console.info(self.data.channel.toUpperCase(), 'APP AGENT, INTERACTION:', self.data.uniqueid, 'TIMEOUT', self.app.timeout, 'SEC'); - - if (self._agents.length && available( - self._agents[0].online, - self._agents[0][structure.labels.pauses[self.data.channel]], - _.filter(self._agents[0][structure.labels.rooms[self.data.channel]], { - status: 'OPEN' - }), - self._agents[0][structure.labels.capacities[self.data.channel]])) { - self.writeReport(); - - self.timeout = setTimeout(function() { - self.next(); - }, self.app.timeout * 1000); - } else { - console.info(self.data.channel.toUpperCase(), 'APP FIDELITY SKIP INTERACTION:', self.data.roomId); - self.next(); - } - }) - .then(function() { - return structure.models.rooms[self.data.channel] - .update({ - waiting: true - }, { - where: { - id: self.data.roomid, - }, - individualHooks: true - }) - .then(function() { - console.log('AGENT ACTION STARTED'); - }) - .catch(function(err) { - console.error(); - }); - }); -} - -Agent.prototype.writeReport = function writeReport() { - var self = this; - var values = _.map(self._agents, function(agent) { - return _.merge(self.data, { - timeslot: self.app.timeout, - application: 'agent', - membername: agent.name, - memberid: agent.id, - calledAt: moment().format("YYYY-MM-DD HH:mm:ss"), - joinAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - }); - - return structure.models.sessions[self.data.channel] - .bulkCreate(values, { - individualHooks: true - }) - .then(function() { - return structure.models.reports[self.data.channel] - .bulkCreate(values, { - individualHooks: true - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function available(online, pause, rooms, capacity) { - // CHECK CAPACITY - return online && !pause && ((rooms.length < capacity) || capacity === 0); -} - -// Export this file as a module -module.exports = Agent; +var _0x8ac8=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x63\x61\x6C\x6C\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x55\x73\x65\x72\x49\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x75\x73\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x77\x68\x65\x72\x65","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x69\x64","\x70\x75\x73\x68","\x69\x6E\x63\x6C\x75\x64\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x41\x47\x45\x4E\x54\x20\x41\x43\x54\x49\x4F\x4E\x20\x53\x54\x41\x52\x54\x45\x44","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x5F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50\x20\x41\x47\x45\x4E\x54\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x75\x6E\x69\x71\x75\x65\x69\x64","\x54\x49\x4D\x45\x4F\x55\x54","\x74\x69\x6D\x65\x6F\x75\x74","\x53\x45\x43","\x69\x6E\x66\x6F","\x6C\x65\x6E\x67\x74\x68","\x6F\x6E\x6C\x69\x6E\x65","\x4F\x50\x45\x4E","\x66\x69\x6C\x74\x65\x72","\x63\x61\x70\x61\x63\x69\x74\x69\x65\x73","\x77\x72\x69\x74\x65\x52\x65\x70\x6F\x72\x74","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x53\x4B\x49\x50\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x72\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x73","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0x8ac8[0];const _=require(_0x8ac8[1]);const config=require(_0x8ac8[2]);const structure=require(_0x8ac8[3]);const cp=require(_0x8ac8[4]);const util=require(_0x8ac8[5]);const moment=require(_0x8ac8[6]);const User=require(_0x8ac8[8])[_0x8ac8[7]];function Agent(_0x2322x9,_0x2322xa,_0x2322xb){this[_0x8ac8[9]]= _0x2322x9;this[_0x8ac8[10]]= _0x2322xa;this[_0x8ac8[11]]= [];this[_0x8ac8[12]]= [];this[_0x8ac8[13]]= _0x2322xb}Agent[_0x8ac8[15]][_0x8ac8[14]]= function init(){var _0x2322xd=this;var _0x2322xe={where:{id:_0x2322xd[_0x8ac8[9]][_0x8ac8[16]],online:true},include:[]};_0x2322xe[_0x8ac8[20]][structure[_0x8ac8[19]][_0x8ac8[18]][_0x2322xd[_0x8ac8[10]][_0x8ac8[17]]]]= false;_0x2322xe[_0x8ac8[25]][_0x8ac8[24]]({model:structure[_0x8ac8[22]][_0x8ac8[21]][_0x2322xd[_0x8ac8[10]][_0x8ac8[17]]],attributes:[_0x8ac8[23]]});return User[_0x8ac8[49]](_0x2322xe)[_0x8ac8[30]](function(_0x2322x10){_0x2322xd[_0x8ac8[33]]= _0x2322x10;console[_0x8ac8[40]](_0x2322xd[_0x8ac8[10]][_0x8ac8[17]][_0x8ac8[34]](),_0x8ac8[35],_0x2322xd[_0x8ac8[10]][_0x8ac8[36]],_0x8ac8[37],_0x2322xd[_0x8ac8[9]][_0x8ac8[38]],_0x8ac8[39]);if(_0x2322xd[_0x8ac8[33]][_0x8ac8[41]]&& available(_0x2322xd[_0x8ac8[33]][0][_0x8ac8[42]],_0x2322xd[_0x8ac8[33]][0][structure[_0x8ac8[19]][_0x8ac8[18]][_0x2322xd[_0x8ac8[10]][_0x8ac8[17]]]],_[_0x8ac8[44]](_0x2322xd[_0x8ac8[33]][0][structure[_0x8ac8[19]][_0x8ac8[21]][_0x2322xd[_0x8ac8[10]][_0x8ac8[17]]]],{status:_0x8ac8[43]}),_0x2322xd[_0x8ac8[33]][0][structure[_0x8ac8[19]][_0x8ac8[45]][_0x2322xd[_0x8ac8[10]][_0x8ac8[17]]]])){_0x2322xd[_0x8ac8[46]]();_0x2322xd[_0x8ac8[38]]= setTimeout(function(){_0x2322xd[_0x8ac8[13]]()},_0x2322xd[_0x8ac8[9]][_0x8ac8[38]]* 1000)}else {console[_0x8ac8[40]](_0x2322xd[_0x8ac8[10]][_0x8ac8[17]][_0x8ac8[34]](),_0x8ac8[47],_0x2322xd[_0x8ac8[10]][_0x8ac8[48]]);_0x2322xd[_0x8ac8[13]]()}})[_0x8ac8[30]](function(){return structure[_0x8ac8[22]][_0x8ac8[21]][_0x2322xd[_0x8ac8[10]][_0x8ac8[17]]][_0x8ac8[32]]({waiting:true},{where:{id:_0x2322xd[_0x8ac8[10]][_0x8ac8[31]]},individualHooks:true})[_0x8ac8[30]](function(){console[_0x8ac8[29]](_0x8ac8[28])})[_0x8ac8[27]](function(_0x2322xf){console[_0x8ac8[26]]()})})};Agent[_0x8ac8[15]][_0x8ac8[46]]= function writeReport(){var _0x2322xd=this;var _0x2322x12=_[_0x8ac8[55]](_0x2322xd._agents,function(_0x2322x13){return _[_0x8ac8[54]](_0x2322xd[_0x8ac8[10]],{timeslot:_0x2322xd[_0x8ac8[9]][_0x8ac8[38]],application:_0x8ac8[50],membername:_0x2322x13[_0x8ac8[51]],memberid:_0x2322x13[_0x8ac8[23]],calledAt:moment()[_0x8ac8[53]](_0x8ac8[52]),joinAt:moment()[_0x8ac8[53]](_0x8ac8[52])})});return structure[_0x8ac8[22]][_0x8ac8[58]][_0x2322xd[_0x8ac8[10]][_0x8ac8[17]]][_0x8ac8[56]](_0x2322x12,{individualHooks:true})[_0x8ac8[30]](function(){return structure[_0x8ac8[22]][_0x8ac8[57]][_0x2322xd[_0x8ac8[10]][_0x8ac8[17]]][_0x8ac8[56]](_0x2322x12,{individualHooks:true})})[_0x8ac8[27]](function(_0x2322xf){console[_0x8ac8[26]](_0x2322xf)})};function available(_0x2322x15,_0x2322x16,_0x2322x17,_0x2322x18){return _0x2322x15&& !_0x2322x16&& ((_0x2322x17[_0x8ac8[41]]< _0x2322x18)|| _0x2322x18=== 0)}module[_0x8ac8[59]]= Agent \ No newline at end of file diff --git a/server/config/routing/fidelity.js b/server/config/routing/fidelity.js index eef584f..99e3d93 100644 --- a/server/config/routing/fidelity.js +++ b/server/config/routing/fidelity.js @@ -1,105 +1 @@ -'use strict'; - -const _ = require('lodash'); -const config = require('../environment'); -const structure = require('./structure'); - -// NODEJS API -const cp = require('child_process'); -const util = require('util'); -const moment = require('moment'); - -// MODELS -const Agent = require('../../models').User; - -// Define the factory -function Fidelity(app, data, next) { - this.app = app; - this.data = data; - //callbacks - this.next = next; -} - -Fidelity.prototype.init = function init() { - var self = this; - var query = { - where: { - online: true - }, - attributes: ['id', 'name', 'fullname'], - raw: true - }; - - query.where[structure.labels.pauses[self.data.channel]] = false; - - return structure.models.rooms[self.data.channel] - .findById(self.data.roomid) - .then(function(room) { - return room - .getUsers(query); - }) - .then(function(agents) { - self._agents = agents; - console.info(self.data.channel.toUpperCase(), 'APP FIDELITY INTERACTION:', self.data.roomid, 'TIMEOUT', self.app.timeout, 'SEC'); - if (self._agents.length) { - self.writeReport(); - - self.timeout = setTimeout(function() { - self.next(); - }, self.app.timeout * 1000); - - } else { - console.info(self.data.channel.toUpperCase(), 'APP FIDELITY SKIP INTERACTION:', self.data.roomid); - self.next(); - } - }) - .then(function() { - return structure.models.rooms[self.data.channel] - .update({ - waiting: true - }, { - where: { - id: self.data.roomid, - }, - individualHooks: true - }) - .then(function() { - console.log('FIDELITY ACTION STARTED'); - }) - .catch(function(err) { - console.error(); - }); - }); -} - -Fidelity.prototype.writeReport = function writeReport() { - var self = this; - var values = _.map(self._agents, function(agent) { - return _.merge(self.data, { - timeslot: self.app.timeout, - application: 'fidelity', - membername: agent.name, - memberid: agent.id, - calledAt: moment().format("YYYY-MM-DD HH:mm:ss"), - joinAt: moment().format("YYYY-MM-DD HH:mm:ss"), - fidelity: self.app.timeout - }); - }); - - return structure.models.sessions[self.data.channel] - .bulkCreate(values, { - individualHooks: true - }) - .then(function() { - return structure.models.reports[self.data.channel] - .bulkCreate(values, { - individualHooks: true - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Export this file as a module -module.exports = Fidelity; +var _0xb19c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x64","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x70\x61\x75\x73\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x77\x68\x65\x72\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x41\x43\x54\x49\x4F\x4E\x20\x53\x54\x41\x52\x54\x45\x44","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x5F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x54\x49\x4D\x45\x4F\x55\x54","\x74\x69\x6D\x65\x6F\x75\x74","\x53\x45\x43","\x69\x6E\x66\x6F","\x6C\x65\x6E\x67\x74\x68","\x77\x72\x69\x74\x65\x52\x65\x70\x6F\x72\x74","\x41\x50\x50\x20\x46\x49\x44\x45\x4C\x49\x54\x59\x20\x53\x4B\x49\x50\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x67\x65\x74\x55\x73\x65\x72\x73","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x69\x64\x65\x6C\x69\x74\x79","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x6D\x61\x70","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x72\x65\x70\x6F\x72\x74\x73","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x65\x78\x70\x6F\x72\x74\x73"];_0xb19c[0];const _=require(_0xb19c[1]);const config=require(_0xb19c[2]);const structure=require(_0xb19c[3]);const cp=require(_0xb19c[4]);const util=require(_0xb19c[5]);const moment=require(_0xb19c[6]);const Agent=require(_0xb19c[8])[_0xb19c[7]];function Fidelity(_0x360dx9,_0x360dxa,_0x360dxb){this[_0xb19c[9]]= _0x360dx9;this[_0xb19c[10]]= _0x360dxa;this[_0xb19c[11]]= _0x360dxb}Fidelity[_0xb19c[13]][_0xb19c[12]]= function init(){var _0x360dxd=this;var _0x360dxe={where:{online:true},attributes:[_0xb19c[14],_0xb19c[15],_0xb19c[16]],raw:true};_0x360dxe[_0xb19c[20]][structure[_0xb19c[19]][_0xb19c[18]][_0x360dxd[_0xb19c[10]][_0xb19c[17]]]]= false;return structure[_0xb19c[29]][_0xb19c[28]][_0x360dxd[_0xb19c[10]][_0xb19c[17]]][_0xb19c[41]](_0x360dxd[_0xb19c[10]][_0xb19c[26]])[_0xb19c[25]](function(_0x360dx11){return _0x360dx11[_0xb19c[40]](_0x360dxe)})[_0xb19c[25]](function(_0x360dx10){_0x360dxd[_0xb19c[30]]= _0x360dx10;console[_0xb19c[36]](_0x360dxd[_0xb19c[10]][_0xb19c[17]][_0xb19c[31]](),_0xb19c[32],_0x360dxd[_0xb19c[10]][_0xb19c[26]],_0xb19c[33],_0x360dxd[_0xb19c[9]][_0xb19c[34]],_0xb19c[35]);if(_0x360dxd[_0xb19c[30]][_0xb19c[37]]){_0x360dxd[_0xb19c[38]]();_0x360dxd[_0xb19c[34]]= setTimeout(function(){_0x360dxd[_0xb19c[11]]()},_0x360dxd[_0xb19c[9]][_0xb19c[34]]* 1000)}else {console[_0xb19c[36]](_0x360dxd[_0xb19c[10]][_0xb19c[17]][_0xb19c[31]](),_0xb19c[39],_0x360dxd[_0xb19c[10]][_0xb19c[26]]);_0x360dxd[_0xb19c[11]]()}})[_0xb19c[25]](function(){return structure[_0xb19c[29]][_0xb19c[28]][_0x360dxd[_0xb19c[10]][_0xb19c[17]]][_0xb19c[27]]({waiting:true},{where:{id:_0x360dxd[_0xb19c[10]][_0xb19c[26]]},individualHooks:true})[_0xb19c[25]](function(){console[_0xb19c[24]](_0xb19c[23])})[_0xb19c[22]](function(_0x360dxf){console[_0xb19c[21]]()})})};Fidelity[_0xb19c[13]][_0xb19c[38]]= function writeReport(){var _0x360dxd=this;var _0x360dx13=_[_0xb19c[46]](_0x360dxd._agents,function(_0x360dx14){return _[_0xb19c[45]](_0x360dxd[_0xb19c[10]],{timeslot:_0x360dxd[_0xb19c[9]][_0xb19c[34]],application:_0xb19c[42],membername:_0x360dx14[_0xb19c[15]],memberid:_0x360dx14[_0xb19c[14]],calledAt:moment()[_0xb19c[44]](_0xb19c[43]),joinAt:moment()[_0xb19c[44]](_0xb19c[43]),fidelity:_0x360dxd[_0xb19c[9]][_0xb19c[34]]})});return structure[_0xb19c[29]][_0xb19c[49]][_0x360dxd[_0xb19c[10]][_0xb19c[17]]][_0xb19c[47]](_0x360dx13,{individualHooks:true})[_0xb19c[25]](function(){return structure[_0xb19c[29]][_0xb19c[48]][_0x360dxd[_0xb19c[10]][_0xb19c[17]]][_0xb19c[47]](_0x360dx13,{individualHooks:true})})[_0xb19c[22]](function(_0x360dxf){console[_0xb19c[21]](_0x360dxf)})};module[_0xb19c[50]]= Fidelity \ No newline at end of file diff --git a/server/config/routing/queue.js b/server/config/routing/queue.js index 250affd..3f6b838 100644 --- a/server/config/routing/queue.js +++ b/server/config/routing/queue.js @@ -1,301 +1 @@ -'use strict'; - -const _ = require('lodash'); -const config = require('../environment'); -const structure = require('./structure'); - -// NODEJS API -const cp = require('child_process'); -const util = require('util'); -const moment = require('moment'); - -const Agent = require('../../models').User; - -// Define the factory -function Queue(app, data, next) { - this.app = app; - this.data = data; - this.elapsed = 0; - //callbacks - this.next = next; - this.called = []; - this.rejected = []; -} - -Queue.prototype.init = function init() { - var self = this; - - return structure.models.queues[self.data.channel] - .findById(self.app[structure.labels.appQueues[self.data.channel]], { - attributes: ['id', 'name', 'timeout', 'strategy', 'lastAgent'], - include: [{ - model: Agent, - attributes: ['id'], - order: [ - ['penalty', 'ASC'] - ] - }] - }) - .then(function(queue) { - console.info(util.format('%s QUEUE INSTANCE FOR ACCOUNT %s', self.data.channel.toUpperCase(), self.data.accountname)); - - self._queue = queue; - self._duration = self.app.timeout; - - switch (self._queue.strategy) { - case 'beepall': - console.info(self.data.channel.toUpperCase(), 'QUEUE BEEPALL STRATEGY, DURATION', self.app.timeout); - - self._agents = _.values(_.groupBy(queue.Users, structure.labels.penaltyTables[self.data.channel])); - self.beepall(); - break; - case 'roundrobin': - console.info(self.data.channel.toUpperCase(), 'QUEUE ROUND ROBIN STRATEGY, DURATION', self.app.timeout); - self._agents = queue.Users; - self.rr(); - break; - case 'rrmemory': - console.info(self.data.channel.toUpperCase(), 'QUEUE RR MEMORY STRATEGY, DURATION', self.app.timeout); - self._agents = queue.Users; - if (self._queue.lastAgent) { - var agent; - for (var i = 0; i < self._agents.length; i++) { - agent = self._agents.shift(); - self._agents.push(agent); - - if (agent.id === self._queue.lastAgent) { - break; - } - } - } - - self.rr(); - break; - default: - } - }) - .then(function() { - var values = [_.merge(self.data, { - timeslot: self.app.timeout, - application: 'queue', - queue: self._queue.id, - queuename: self._queue.name, - calledAt: moment().format("YYYY-MM-DD HH:mm:ss"), - joinAt: moment().format("YYYY-MM-DD HH:mm:ss"), - membername: null, - memberid: null - })]; - return structure.models.sessions[self.data.channel] - .bulkCreate(values, { - individualHooks: true - }); - }) - .then(function() { - return structure.models.rooms[self.data.channel] - .update({ - waiting: true - }, { - where: { - id: self.data.roomid, - }, - individualHooks: true - }) - .then(function() { - console.log('QUEUE ACTION STARTED'); - }) - .catch(function(err) { - console.error(); - }); - }); -} - -Queue.prototype.beepall = function beepall() { - var self = this; - var attempts = self._agents.shift(); - self._agents.push(attempts); - - var query = { - where: { - id: { - $in: _.map(attempts, 'id') - }, - online: true - }, - include: [{ - model: structure.models.rooms[self.data.channel], - attributes: ['id', 'status'] - }], - attributes: ['id', 'name', 'fullname', 'online', 'mailPause', 'chatPause', 'faxPause', 'smsPause', 'openchannelPause', 'mailCapacity', 'chatCapacity', 'faxCapacity', 'smsCapacity', - 'openchannelCapacity' - ] - }; - - query.where[structure.labels.pauses[self.data.channel]] = false; - - var timeslot = ((self.app.timeout - self.elapsed) > self._queue.timeout) ? self._queue.timeout : (self.app.timeout - self.elapsed); - - self.timeout = setTimeout(function() { - self.elapsed += self._queue.timeout; - self.beepall(); - }, timeslot * 1000); - - if (timeslot > 0) { - Agent - .findAll(query) - .then(function(agents) { - // REMOVE AGENTS BY CAPACITY - agents = _.remove(agents, function(agent) { - if (available(agent, - agent[structure.labels.pauses[self.data.channel]], - self.rejected, - _.filter(agent[structure.labels.rooms[self.data.channel]], { - status: 'OPEN' - }), - agent[structure.labels.capacities[self.data.channel]])) { - return true; - } else { - return false; - } - }); - - var values = _.map(agents, function(agent) { - var value = _.merge(self.data, { - timeslot: timeslot, - application: 'queue', - membername: agent.name, - memberid: agent.id, - queue: self._queue.id, - queuename: self._queue.name, - calledAt: moment().format("YYYY-MM-DD HH:mm:ss") - }); - - return _.clone(value); - }); - - structure.models.reports[self.data.channel] - .bulkCreate(values, { - individualHooks: true - }) - .catch(function(err) { - console.error(err); - }); - }) - .catch(function(err) { - console.error(err); - }); - } else { - clearTimeout(self.timeout); - this.next(); - } -} - -Queue.prototype.rr = function rr() { - var self = this; - var timeslot = ((self.app.timeout - self.elapsed) > self._queue.timeout) ? self._queue.timeout : (self.app.timeout - self.elapsed); - - self.timeout = setTimeout(function() { - self.elapsed += self._queue.timeout; - self.rr(); - }, timeslot * 1000); - - var query = { - where: { - id: { - $in: _.map(self._agents, 'id') - } - }, - include: [{ - model: structure.models.rooms[self.data.channel], - attributes: ['id'] - }], - attributes: ['id', 'name', 'fullname', 'online', 'mailPause', 'chatPause', 'faxPause', 'smsPause', 'openchannelPause', 'mailCapacity', 'chatCapacity', 'faxCapacity', 'smsCapacity', - 'openchannelCapacity' - ] - }; - - if (_.map(self._agents, 'id').join().length) { - query.order = [ - [{ - raw: 'FIELD(User.id,' + _.map(self._agents, 'id').join() + ')' - }] - ]; - } - - if (timeslot > 0) { - Agent - .findAll(query) - .then(function(agents) { - if (agents.length) { - self._agents = agents; - - for (var i = 0; i < self._agents.length; i++) { - - if (available(self._agents[0], - self._agents[0][structure.labels.pauses[self.data.channel]], - self.rejected, - _.filter(self._agents[0][structure.labels.rooms[self.data.channel]], { - status: 'OPEN' - }), - self._agents[0][structure.labels.capacities[self.data.channel]] - )) { - - var values = [_.merge(self.data, { - timeslot: timeslot, - application: 'queue', - membername: self._agents[0].name, - memberid: self._agents[0].id, - queue: self._queue.id, - queuename: self._queue.name, - calledAt: moment().format("YYYY-MM-DD HH:mm:ss") - })]; - - return structure.models.reports[self.data.channel] - .bulkCreate(values, { - individualHooks: true - }) - .then(function() { - return structure.models.queues[self.data.channel] - .update({ - lastAgent: self._agents[0].id - }, { - where: { - id: self._queue.id - } - }); - }) - .catch(function(err) { - console.error(err); - }); - - } else { - var agent = self._agents.shift(); - self._agents.push(agent); - } - } - } - }) - .then(function() { - var agent = self._agents.shift(); - self._agents.push(agent); - }) - .catch(function(err) { - console.error(err); - }); - } else { - clearTimeout(self.timeout); - this.next(); - } -} - -function available(agent, pause, rejected, rooms, capacity) { - // CHECK REJECTED - var reject = _.find(rejected, { - id: agent.id - }) ? true : false; - // CHECK CAPACITY - - return agent.online && !pause && !reject && ((rooms.length < capacity) || (capacity === 0)); -} - -// Export this file as a module -module.exports = Queue; +var _0x45b0=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x61\x70\x70","\x64\x61\x74\x61","\x65\x6C\x61\x70\x73\x65\x64","\x6E\x65\x78\x74","\x63\x61\x6C\x6C\x65\x64","\x72\x65\x6A\x65\x63\x74\x65\x64","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x51\x55\x45\x55\x45\x20\x41\x43\x54\x49\x4F\x4E\x20\x53\x54\x41\x52\x54\x45\x44","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x69\x64","\x75\x70\x64\x61\x74\x65","\x63\x68\x61\x6E\x6E\x65\x6C","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x74\x69\x6D\x65\x6F\x75\x74","\x71\x75\x65\x75\x65","\x69\x64","\x5F\x71\x75\x65\x75\x65","\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x25\x73\x20\x51\x55\x45\x55\x45\x20\x49\x4E\x53\x54\x41\x4E\x43\x45\x20\x46\x4F\x52\x20\x41\x43\x43\x4F\x55\x4E\x54\x20\x25\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x69\x6E\x66\x6F","\x5F\x64\x75\x72\x61\x74\x69\x6F\x6E","\x51\x55\x45\x55\x45\x20\x42\x45\x45\x50\x41\x4C\x4C\x20\x53\x54\x52\x41\x54\x45\x47\x59\x2C\x20\x44\x55\x52\x41\x54\x49\x4F\x4E","\x5F\x61\x67\x65\x6E\x74\x73","\x70\x65\x6E\x61\x6C\x74\x79\x54\x61\x62\x6C\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x67\x72\x6F\x75\x70\x42\x79","\x76\x61\x6C\x75\x65\x73","\x62\x65\x65\x70\x61\x6C\x6C","\x51\x55\x45\x55\x45\x20\x52\x4F\x55\x4E\x44\x20\x52\x4F\x42\x49\x4E\x20\x53\x54\x52\x41\x54\x45\x47\x59\x2C\x20\x44\x55\x52\x41\x54\x49\x4F\x4E","\x55\x73\x65\x72\x73","\x72\x72","\x72\x6F\x75\x6E\x64\x72\x6F\x62\x69\x6E","\x51\x55\x45\x55\x45\x20\x52\x52\x20\x4D\x45\x4D\x4F\x52\x59\x20\x53\x54\x52\x41\x54\x45\x47\x59\x2C\x20\x44\x55\x52\x41\x54\x49\x4F\x4E","\x6C\x61\x73\x74\x41\x67\x65\x6E\x74","\x6C\x65\x6E\x67\x74\x68","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x73\x74\x72\x61\x74\x65\x67\x79","\x61\x70\x70\x51\x75\x65\x75\x65\x73","\x70\x65\x6E\x61\x6C\x74\x79","\x41\x53\x43","\x66\x69\x6E\x64\x42\x79\x49\x64","\x71\x75\x65\x75\x65\x73","\x6D\x61\x70","\x73\x74\x61\x74\x75\x73","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x6F\x6E\x6C\x69\x6E\x65","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x43\x61\x70\x61\x63\x69\x74\x79","\x73\x6D\x73\x43\x61\x70\x61\x63\x69\x74\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x70\x61\x75\x73\x65\x73","\x77\x68\x65\x72\x65","\x4F\x50\x45\x4E","\x66\x69\x6C\x74\x65\x72","\x63\x61\x70\x61\x63\x69\x74\x69\x65\x73","\x72\x65\x6D\x6F\x76\x65","\x63\x6C\x6F\x6E\x65","\x72\x65\x70\x6F\x72\x74\x73","\x66\x69\x6E\x64\x41\x6C\x6C","\x6A\x6F\x69\x6E","\x6F\x72\x64\x65\x72","\x46\x49\x45\x4C\x44\x28\x55\x73\x65\x72\x2E\x69\x64\x2C","\x29","\x66\x69\x6E\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0x45b0[0];const _=require(_0x45b0[1]);const config=require(_0x45b0[2]);const structure=require(_0x45b0[3]);const cp=require(_0x45b0[4]);const util=require(_0x45b0[5]);const moment=require(_0x45b0[6]);const Agent=require(_0x45b0[8])[_0x45b0[7]];function Queue(_0x3756x9,_0x3756xa,_0x3756xb){this[_0x45b0[9]]= _0x3756x9;this[_0x45b0[10]]= _0x3756xa;this[_0x45b0[11]]= 0;this[_0x45b0[12]]= _0x3756xb;this[_0x45b0[13]]= [];this[_0x45b0[14]]= []}Queue[_0x45b0[16]][_0x45b0[15]]= function init(){var _0x3756xd=this;return structure[_0x45b0[26]][_0x45b0[64]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]][_0x45b0[63]](_0x3756xd[_0x45b0[9]][structure[_0x45b0[45]][_0x45b0[60]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]]],{attributes:[_0x45b0[29],_0x45b0[31],_0x45b0[27],_0x45b0[59],_0x45b0[54]],include:[{model:Agent,attributes:[_0x45b0[29]],order:[[_0x45b0[61],_0x45b0[62]]]}]})[_0x45b0[21]](function(_0x3756x10){console[_0x45b0[40]](util[_0x45b0[33]](_0x45b0[37],_0x3756xd[_0x45b0[10]][_0x45b0[24]][_0x45b0[38]](),_0x3756xd[_0x45b0[10]][_0x45b0[39]]));_0x3756xd[_0x45b0[30]]= _0x3756x10;_0x3756xd[_0x45b0[41]]= _0x3756xd[_0x45b0[9]][_0x45b0[27]];switch(_0x3756xd[_0x45b0[30]][_0x45b0[59]]){case _0x45b0[48]:console[_0x45b0[40]](_0x3756xd[_0x45b0[10]][_0x45b0[24]][_0x45b0[38]](),_0x45b0[42],_0x3756xd[_0x45b0[9]][_0x45b0[27]]);_0x3756xd[_0x45b0[43]]= _[_0x45b0[47]](_[_0x45b0[46]](_0x3756x10.Users,structure[_0x45b0[45]][_0x45b0[44]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]]));_0x3756xd[_0x45b0[48]]();break;case _0x45b0[52]:console[_0x45b0[40]](_0x3756xd[_0x45b0[10]][_0x45b0[24]][_0x45b0[38]](),_0x45b0[49],_0x3756xd[_0x45b0[9]][_0x45b0[27]]);_0x3756xd[_0x45b0[43]]= _0x3756x10[_0x45b0[50]];_0x3756xd[_0x45b0[51]]();break;case _0x45b0[58]:console[_0x45b0[40]](_0x3756xd[_0x45b0[10]][_0x45b0[24]][_0x45b0[38]](),_0x45b0[53],_0x3756xd[_0x45b0[9]][_0x45b0[27]]);_0x3756xd[_0x45b0[43]]= _0x3756x10[_0x45b0[50]];if(_0x3756xd[_0x45b0[30]][_0x45b0[54]]){var _0x3756x11;for(var _0x3756x12=0;_0x3756x12< _0x3756xd[_0x45b0[43]][_0x45b0[55]];_0x3756x12++){_0x3756x11= _0x3756xd[_0x45b0[43]][_0x45b0[56]]();_0x3756xd[_0x45b0[43]][_0x45b0[57]](_0x3756x11);if(_0x3756x11[_0x45b0[29]]=== _0x3756xd[_0x45b0[30]][_0x45b0[54]]){break}}};_0x3756xd[_0x45b0[51]]();break;default:}})[_0x45b0[21]](function(){var _0x3756xf=[_[_0x45b0[34]](_0x3756xd[_0x45b0[10]],{timeslot:_0x3756xd[_0x45b0[9]][_0x45b0[27]],application:_0x45b0[28],queue:_0x3756xd[_0x45b0[30]][_0x45b0[29]],queuename:_0x3756xd[_0x45b0[30]][_0x45b0[31]],calledAt:moment()[_0x45b0[33]](_0x45b0[32]),joinAt:moment()[_0x45b0[33]](_0x45b0[32]),membername:null,memberid:null})];return structure[_0x45b0[26]][_0x45b0[36]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]][_0x45b0[35]](_0x3756xf,{individualHooks:true})})[_0x45b0[21]](function(){return structure[_0x45b0[26]][_0x45b0[25]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]][_0x45b0[23]]({waiting:true},{where:{id:_0x3756xd[_0x45b0[10]][_0x45b0[22]]},individualHooks:true})[_0x45b0[21]](function(){console[_0x45b0[20]](_0x45b0[19])})[_0x45b0[18]](function(_0x3756xe){console[_0x45b0[17]]()})})};Queue[_0x45b0[16]][_0x45b0[48]]= function beepall(){var _0x3756xd=this;var _0x3756x14=_0x3756xd[_0x45b0[43]][_0x45b0[56]]();_0x3756xd[_0x45b0[43]][_0x45b0[57]](_0x3756x14);var _0x3756x15={where:{id:{$in:_[_0x45b0[65]](_0x3756x14,_0x45b0[29])},online:true},include:[{model:structure[_0x45b0[26]][_0x45b0[25]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]],attributes:[_0x45b0[29],_0x45b0[66]]}],attributes:[_0x45b0[29],_0x45b0[31],_0x45b0[67],_0x45b0[68],_0x45b0[69],_0x45b0[70],_0x45b0[71],_0x45b0[72],_0x45b0[73],_0x45b0[74],_0x45b0[75],_0x45b0[76],_0x45b0[77],_0x45b0[78]]};_0x3756x15[_0x45b0[80]][structure[_0x45b0[45]][_0x45b0[79]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]]]= false;var _0x3756x16=((_0x3756xd[_0x45b0[9]][_0x45b0[27]]- _0x3756xd[_0x45b0[11]])> _0x3756xd[_0x45b0[30]][_0x45b0[27]])?_0x3756xd[_0x45b0[30]][_0x45b0[27]]:(_0x3756xd[_0x45b0[9]][_0x45b0[27]]- _0x3756xd[_0x45b0[11]]);_0x3756xd[_0x45b0[27]]= setTimeout(function(){_0x3756xd[_0x45b0[11]]+= _0x3756xd[_0x45b0[30]][_0x45b0[27]];_0x3756xd[_0x45b0[48]]()},_0x3756x16* 1000);if(_0x3756x16> 0){Agent[_0x45b0[87]](_0x3756x15)[_0x45b0[21]](function(_0x3756x17){_0x3756x17= _[_0x45b0[84]](_0x3756x17,function(_0x3756x11){if(available(_0x3756x11,_0x3756x11[structure[_0x45b0[45]][_0x45b0[79]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]]],_0x3756xd[_0x45b0[14]],_[_0x45b0[82]](_0x3756x11[structure[_0x45b0[45]][_0x45b0[25]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]]],{status:_0x45b0[81]}),_0x3756x11[structure[_0x45b0[45]][_0x45b0[83]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]]])){return true}else {return false}});var _0x3756xf=_[_0x45b0[65]](_0x3756x17,function(_0x3756x11){var _0x3756x18=_[_0x45b0[34]](_0x3756xd[_0x45b0[10]],{timeslot:_0x3756x16,application:_0x45b0[28],membername:_0x3756x11[_0x45b0[31]],memberid:_0x3756x11[_0x45b0[29]],queue:_0x3756xd[_0x45b0[30]][_0x45b0[29]],queuename:_0x3756xd[_0x45b0[30]][_0x45b0[31]],calledAt:moment()[_0x45b0[33]](_0x45b0[32])});return _[_0x45b0[85]](_0x3756x18)});structure[_0x45b0[26]][_0x45b0[86]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]][_0x45b0[35]](_0x3756xf,{individualHooks:true})[_0x45b0[18]](function(_0x3756xe){console[_0x45b0[17]](_0x3756xe)})})[_0x45b0[18]](function(_0x3756xe){console[_0x45b0[17]](_0x3756xe)})}else {clearTimeout(_0x3756xd[_0x45b0[27]]);this[_0x45b0[12]]()}};Queue[_0x45b0[16]][_0x45b0[51]]= function rr(){var _0x3756xd=this;var _0x3756x16=((_0x3756xd[_0x45b0[9]][_0x45b0[27]]- _0x3756xd[_0x45b0[11]])> _0x3756xd[_0x45b0[30]][_0x45b0[27]])?_0x3756xd[_0x45b0[30]][_0x45b0[27]]:(_0x3756xd[_0x45b0[9]][_0x45b0[27]]- _0x3756xd[_0x45b0[11]]);_0x3756xd[_0x45b0[27]]= setTimeout(function(){_0x3756xd[_0x45b0[11]]+= _0x3756xd[_0x45b0[30]][_0x45b0[27]];_0x3756xd[_0x45b0[51]]()},_0x3756x16* 1000);var _0x3756x15={where:{id:{$in:_[_0x45b0[65]](_0x3756xd._agents,_0x45b0[29])}},include:[{model:structure[_0x45b0[26]][_0x45b0[25]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]],attributes:[_0x45b0[29]]}],attributes:[_0x45b0[29],_0x45b0[31],_0x45b0[67],_0x45b0[68],_0x45b0[69],_0x45b0[70],_0x45b0[71],_0x45b0[72],_0x45b0[73],_0x45b0[74],_0x45b0[75],_0x45b0[76],_0x45b0[77],_0x45b0[78]]};if(_[_0x45b0[65]](_0x3756xd._agents,_0x45b0[29])[_0x45b0[88]]()[_0x45b0[55]]){_0x3756x15[_0x45b0[89]]= [[{raw:_0x45b0[90]+ _[_0x45b0[65]](_0x3756xd._agents,_0x45b0[29])[_0x45b0[88]]()+ _0x45b0[91]}]]};if(_0x3756x16> 0){Agent[_0x45b0[87]](_0x3756x15)[_0x45b0[21]](function(_0x3756x17){if(_0x3756x17[_0x45b0[55]]){_0x3756xd[_0x45b0[43]]= _0x3756x17;for(var _0x3756x12=0;_0x3756x12< _0x3756xd[_0x45b0[43]][_0x45b0[55]];_0x3756x12++){if(available(_0x3756xd[_0x45b0[43]][0],_0x3756xd[_0x45b0[43]][0][structure[_0x45b0[45]][_0x45b0[79]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]]],_0x3756xd[_0x45b0[14]],_[_0x45b0[82]](_0x3756xd[_0x45b0[43]][0][structure[_0x45b0[45]][_0x45b0[25]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]]],{status:_0x45b0[81]}),_0x3756xd[_0x45b0[43]][0][structure[_0x45b0[45]][_0x45b0[83]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]]])){var _0x3756xf=[_[_0x45b0[34]](_0x3756xd[_0x45b0[10]],{timeslot:_0x3756x16,application:_0x45b0[28],membername:_0x3756xd[_0x45b0[43]][0][_0x45b0[31]],memberid:_0x3756xd[_0x45b0[43]][0][_0x45b0[29]],queue:_0x3756xd[_0x45b0[30]][_0x45b0[29]],queuename:_0x3756xd[_0x45b0[30]][_0x45b0[31]],calledAt:moment()[_0x45b0[33]](_0x45b0[32])})];return structure[_0x45b0[26]][_0x45b0[86]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]][_0x45b0[35]](_0x3756xf,{individualHooks:true})[_0x45b0[21]](function(){return structure[_0x45b0[26]][_0x45b0[64]][_0x3756xd[_0x45b0[10]][_0x45b0[24]]][_0x45b0[23]]({lastAgent:_0x3756xd[_0x45b0[43]][0][_0x45b0[29]]},{where:{id:_0x3756xd[_0x45b0[30]][_0x45b0[29]]}})})[_0x45b0[18]](function(_0x3756xe){console[_0x45b0[17]](_0x3756xe)})}else {var _0x3756x11=_0x3756xd[_0x45b0[43]][_0x45b0[56]]();_0x3756xd[_0x45b0[43]][_0x45b0[57]](_0x3756x11)}}}})[_0x45b0[21]](function(){var _0x3756x11=_0x3756xd[_0x45b0[43]][_0x45b0[56]]();_0x3756xd[_0x45b0[43]][_0x45b0[57]](_0x3756x11)})[_0x45b0[18]](function(_0x3756xe){console[_0x45b0[17]](_0x3756xe)})}else {clearTimeout(_0x3756xd[_0x45b0[27]]);this[_0x45b0[12]]()}};function available(_0x3756x11,_0x3756x1b,_0x3756x1c,_0x3756x1d,_0x3756x1e){var _0x3756x1f=_[_0x45b0[92]](_0x3756x1c,{id:_0x3756x11[_0x45b0[29]]})?true:false;return _0x3756x11[_0x45b0[68]]&& !_0x3756x1b&& !_0x3756x1f&& ((_0x3756x1d[_0x45b0[55]]< _0x3756x1e)|| (_0x3756x1e=== 0))}module[_0x45b0[93]]= Queue \ No newline at end of file diff --git a/server/config/routing/replyMail.js b/server/config/routing/replyMail.js index 1dcc63a..666eb62 100644 --- a/server/config/routing/replyMail.js +++ b/server/config/routing/replyMail.js @@ -1,86 +1 @@ -'use strict'; - -const _ = require('lodash'); -const config = require('../environment'); -const structure = require('./structure'); - -// NODEJS API -const cp = require('child_process'); -const util = require('util'); -const moment = require('moment'); -const Mustache = require('mustache'); - -// MODELS -const User = require('../../models').User; -const Message = require('../../models').MailMessage; -const Account = require('../../models').MailAccount; -const Template = require('../../models').Template; - -// Define the factory -function ReplyMail(app, data, next, msg) { - this.app = app; - this.data = data; - this.msg = msg; - console.log(msg); - //callbacks - this.next = next; -} - -ReplyMail.prototype.init = function init() { - var self = this; - var _smtp; - var _message = { - from: [], - to: [] - }; - - return Account - .findById(self.app.data8) - .then(function(account) { - return account - .getMailServerOut(); - }) - .then(function(smtp) { - _smtp = smtp; - _message.from.push(_smtp.username); - _message.to.push(self.data.from); - - switch (self.app.data1) { - case 'replyAll': - _message.cc = self.data.cc; - break; - default: - } - - return Template - .findById(self.app.data9); - }) - .then(function(template) { - var msg = { - subject: self.msg.subject, - from: self.msg.from, - to: self.msg.to, - cc: self.msg.cc, - bcc: self.msg.bcc, - accountName: self.msg.accountName, - interactionId: self.msg.MailRoomId, - createdAt: self.msg.createdAt - } - _message.subject = template.subject ? Mustache.render(template.subject, msg) : null; - _message.html = template.html ? Mustache.render(template.html, msg) : null; - _message.auto = true; - _message.MailRoomId = self.data.roomid; - - return Message - .create(_message); - }) - .then(function() { - self.next(); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Export this file as a module -module.exports = ReplyMail; +var _0x9e0a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x61\x70\x70","\x64\x61\x74\x61","\x6D\x73\x67","\x6C\x6F\x67","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x73\x75\x62\x6A\x65\x63\x74","\x66\x72\x6F\x6D","\x74\x6F","\x63\x63","\x62\x63\x63","\x61\x63\x63\x6F\x75\x6E\x74\x4E\x61\x6D\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x72\x65\x6E\x64\x65\x72","\x68\x74\x6D\x6C","\x61\x75\x74\x6F","\x72\x6F\x6F\x6D\x69\x64","\x63\x72\x65\x61\x74\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x75\x73\x68","\x72\x65\x70\x6C\x79\x41\x6C\x6C","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x39","\x66\x69\x6E\x64\x42\x79\x49\x64","\x67\x65\x74\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x64\x61\x74\x61\x38","\x65\x78\x70\x6F\x72\x74\x73"];_0x9e0a[0];const _=require(_0x9e0a[1]);const config=require(_0x9e0a[2]);const structure=require(_0x9e0a[3]);const cp=require(_0x9e0a[4]);const util=require(_0x9e0a[5]);const moment=require(_0x9e0a[6]);const Mustache=require(_0x9e0a[7]);const User=require(_0x9e0a[9])[_0x9e0a[8]];const Message=require(_0x9e0a[9])[_0x9e0a[10]];const Account=require(_0x9e0a[9])[_0x9e0a[11]];const Template=require(_0x9e0a[9])[_0x9e0a[12]];function ReplyMail(_0x34cbxd,_0x34cbxe,_0x34cbxf,_0x34cbx10){this[_0x9e0a[13]]= _0x34cbxd;this[_0x9e0a[14]]= _0x34cbxe;this[_0x9e0a[15]]= _0x34cbx10;console[_0x9e0a[16]](_0x34cbx10);this[_0x9e0a[17]]= _0x34cbxf}ReplyMail[_0x9e0a[19]][_0x9e0a[18]]= function init(){var _0x34cbx12=this;var _0x34cbx13;var _0x34cbx14={from:[],to:[]};return Account[_0x9e0a[41]](_0x34cbx12[_0x9e0a[13]][_0x9e0a[43]])[_0x9e0a[22]](function(_0x34cbx18){return _0x34cbx18[_0x9e0a[42]]()})[_0x9e0a[22]](function(_0x34cbx17){_0x34cbx13= _0x34cbx17;_0x34cbx14[_0x9e0a[24]][_0x9e0a[37]](_0x34cbx13[_0x9e0a[36]]);_0x34cbx14[_0x9e0a[25]][_0x9e0a[37]](_0x34cbx12[_0x9e0a[14]][_0x9e0a[24]]);switch(_0x34cbx12[_0x9e0a[13]][_0x9e0a[39]]){case _0x9e0a[38]:_0x34cbx14[_0x9e0a[26]]= _0x34cbx12[_0x9e0a[14]][_0x9e0a[26]];break;default:};return Template[_0x9e0a[41]](_0x34cbx12[_0x9e0a[13]][_0x9e0a[40]])})[_0x9e0a[22]](function(_0x34cbx16){var _0x34cbx10={subject:_0x34cbx12[_0x9e0a[15]][_0x9e0a[23]],from:_0x34cbx12[_0x9e0a[15]][_0x9e0a[24]],to:_0x34cbx12[_0x9e0a[15]][_0x9e0a[25]],cc:_0x34cbx12[_0x9e0a[15]][_0x9e0a[26]],bcc:_0x34cbx12[_0x9e0a[15]][_0x9e0a[27]],accountName:_0x34cbx12[_0x9e0a[15]][_0x9e0a[28]],interactionId:_0x34cbx12[_0x9e0a[15]][_0x9e0a[29]],createdAt:_0x34cbx12[_0x9e0a[15]][_0x9e0a[30]]};_0x34cbx14[_0x9e0a[23]]= _0x34cbx16[_0x9e0a[23]]?Mustache[_0x9e0a[31]](_0x34cbx16[_0x9e0a[23]],_0x34cbx10):null;_0x34cbx14[_0x9e0a[32]]= _0x34cbx16[_0x9e0a[32]]?Mustache[_0x9e0a[31]](_0x34cbx16[_0x9e0a[32]],_0x34cbx10):null;_0x34cbx14[_0x9e0a[33]]= true;_0x34cbx14[_0x9e0a[29]]= _0x34cbx12[_0x9e0a[14]][_0x9e0a[34]];return Message[_0x9e0a[35]](_0x34cbx14)})[_0x9e0a[22]](function(){_0x34cbx12[_0x9e0a[17]]()})[_0x9e0a[21]](function(_0x34cbx15){console[_0x9e0a[20]](_0x34cbx15)})};module[_0x9e0a[44]]= ReplyMail \ No newline at end of file diff --git a/server/config/routing/scheduler.js b/server/config/routing/scheduler.js index 1adab18..ecf806c 100644 --- a/server/config/routing/scheduler.js +++ b/server/config/routing/scheduler.js @@ -1,482 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); -const config = require('../environment'); -const structure = require('./structure'); - -// NODEJS API -const cp = require('child_process'); -const util = require('util'); -// MODELS -const User = require('../../models').User; -const Interval = require('../../models').Interval; - -const MailAccount = require('../../models').MailAccount; - -const ReportMail = require('../../models').ReportMail; -const ReportChat = require('../../models').ReportChat; -const ReportSms = require('../../models').ReportSms; -const ReportFax = require('../../models').ReportFax; -const ReportOpenchannel = require('../../models').ReportOpenchannel; - -const weekDaysCollection = { - mon: 1, - tue: 2, - wed: 3, - thu: 4, - fri: 5, - sat: 6, - sun: 7 -}; - -const monthsCollection = { - jan: 1, - feb: 2, - mar: 3, - apr: 4, - may: 5, - jun: 6, - jul: 7, - aug: 8, - sep: 9, - oct: 10, - nov: 11, - dec: 12 -}; - -var Fidelity = require('./fidelity'); -var Agent = require('./agent'); -var Queue = require('./queue'); -var SendMail = require('./sendMail'); -var SendSms = require('./sendSms'); -var ReplyMail = require('./replyMail'); - -// Define the factory -function Scheduler(data, msg) { - this.data = data; - this.msg = msg; - - this._apps = []; -} - -function splitInterval(interval) { - console.log('splitInterval', interval); - var finalInterval = {}; - var splittedInterval = interval.split(','); - var intValues; - splittedInterval.forEach(function(element, index) { - switch (index) { - case 0: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.t_from = moment(intValues[0], 'HH:mm'); - finalInterval.t_to = moment(intValues[1], 'HH:mm'); - } else { - finalInterval.t_from = null; - finalInterval.t_to = null; - } - break; - case 1: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.wd_from = weekDaysCollection[intValues[0]]; - finalInterval.wd_to = intValues[1] ? weekDaysCollection[intValues[1]] : null; - } else { - finalInterval.wd_from = null; - finalInterval.wd_to = null; - } - break; - case 2: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.md_from = intValues[0]; - finalInterval.md_to = intValues[1] ? intValues[1] : null; - } else { - finalInterval.md_from = null; - finalInterval.md_to = null; - } - break; - case 3: - if (element !== '*') { - intValues = element.split('-'); - finalInterval.m_from = monthsCollection[intValues[0]]; - finalInterval.m_to = intValues[1] ? monthsCollection[intValues[1]] : null; - } else { - finalInterval.m_from = null; - finalInterval.m_to = null; - } - break; - default: - - } - - - }); - return finalInterval; -} - -function isIntervalValid(interval) { - var hour = moment().format("HH:mm"); - var day = moment().format("E"); - var monthDay = moment().format("D"); - var month = moment().format("M"); - - var tValid, wdValid, mdValid, mValid; - var monthsNumbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]; - var weekDaysNumbers = [1, 2, 3, 4, 5, 6, 7]; - var daysOfMonthsNumbers = []; - for (var i = 1; i <= 31; i++) { - daysOfMonthsNumbers.push(i); - } - tValid = (interval.t_from && interval.t_to) ? moment(hour, "HH:mm").isBetween(moment(interval.t_from, "HH:mm"), moment(interval.t_to, "HH:mm")) : true; - if (interval.wd_from) { - if (interval.wd_to) { - var validWeekdays = _.filter(weekDaysNumbers, function(elem) { - return (elem >= interval.wd_from) && (elem <= interval.wd_to); - }); - console.log('valid weekdays', validWeekdays); - wdValid = (validWeekdays.indexOf(parseInt(day)) !== -1) ? true : false; - } else { - wdValid = (parseInt(day) === interval.wd_from) ? true : false; - } - } else { - wdValid = true; - } - if (interval.md_from) { - if (interval.md_to) { - var validMonthsdays = _.filter(daysOfMonthsNumbers, function(elem) { - return (elem >= interval.md_from) && (elem <= interval.md_to); - }); - console.log('valid monthsdays', validMonthsdays); - mdValid = (validMonthsdays.indexOf(parseInt(monthDay)) !== -1) ? true : false; - } else { - mdValid = (parseInt(monthDay) === interval.md_from) ? true : false; - } - } else { - mdValid = true; - } - if (interval.m_from) { - if (interval.m_to) { - var validMonths = _.filter(monthsNumbers, function(elem) { - return (elem >= interval.m_from) && (elem <= interval.m_to); - }); - console.log('valid months', validMonths); - mValid = (validMonths.indexOf(parseInt(month)) !== -1) ? true : false; - } else { - mValid = (parseInt(month) === interval.m_from) ? true : false; - } - } else { - mValid = true; - } - console.log('Time is ', tValid, ', WeekDay is ', wdValid, ', MonthDay is ', mdValid, ', Month is ', mValid); - return tValid && wdValid && mdValid && mValid; -} - -// Define a method with async internals -Scheduler.prototype.init = function init() { - var self = this; // Use a closure to preserve `this` - var attributes = ['id', 'app', 'timeout', 'interval', 'UserId']; - // HOOKS - - attributes.push(structure.labels.appQueues[self.data.channel]); - structure.models.rooms[self.data.channel].addHook('afterUpdate', function(doc, options) { - if (self.data.roomid === doc.id) { - if (doc.changed('status')) { - console.info(util.format('STOP SCHEDULER INSTANCE, INTERACTION:', doc.id)); - - clearTimeout(self.app.timeout); - clearInterval(self.app.interval); - } - } - }); - - structure.models.reports[self.data.channel].addHook('afterUpdate', function(doc, options) { - if (self.data.roomid === doc.roomid) { - if (doc.changed('connectid')) { - console.info(util.format('STOP SCHEDULER INSTANCE, INTERACTION:', doc.roomid)); - - clearTimeout(self.app.timeout); - clearInterval(self.app.interval); - - return structure.models.sessions[self.data.channel] - .update({ - memberid: doc.memberid, - membername: doc.membername, - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss") - }, { - where: { - uniqueid: doc.uniqueid, - leaveAt: null - }, - individualHooks: true - }) - .then(function() { - return structure.models.rooms[self.data.channel] - .update({ - waiting: false - }, { - where: { - id: doc.roomid, - }, - individualHooks: true - }) - .then(function() { - console.log('dialplan ended'); - }) - .catch(function(err) { - console.error(); - }); - }); - } - - if (doc.changed('rejectedAt')) { - console.info(util.format('STOP SCHEDULER INSTANCE REJECTED, INTERACTION:', doc.roomid, 'AGENT:', doc.membername)); - - self.app.rejected.push({ - id: doc.memberid - }); - } - } - }); - - if (self.data.channel === 'chat') { - structure.models.sessions[self.data.channel].addHook('afterUpdate', function(doc, options) { - if (doc.changed('abandon') && doc.abandon) { - console.info(util.format('STOP SCHEDULER INSTANCE, INTERACTION:', doc.roomid)); - - clearTimeout(self.app.timeout); - clearInterval(self.app.interval); - - return structure.models.rooms[self.data.channel] - .update({ - status: 'ABANDON' - }, { - where: { - id: self.data.roomid, - }, - individualHooks: true - }) - .then(function() { - console.log('dialplan ended'); - }) - .catch(function(err) { - console.error(); - }); - } - }); - } - - return structure.models.accounts[self.data.channel] - .findById(self.data.accountid, { - attributes: ['id', 'name', 'fidelity', 'timeout'] - }) - .then(function(account) { - console.info(util.format('CREATE SCHEDULER INSTANCE FOR ACCOUNT %s', account.name)); - - if (account.fidelity) { - self._apps.push({ - app: 'fidelity', - timeout: account.timeout - }); - } - - switch (self.data.channel) { - case 'mail': - return account - .getMailApplications({ - order: 'MailApplication.priority ASC', - include: [{ - model: Interval, - include: [{ - all: true - }] - }] - }); - case 'chat': - return account - .getChatApplications({ - order: 'ChatApplication.priority ASC', - include: [{ - model: Interval, - include: [{ - all: true - }] - }] - }); - case 'fax': - return account - .getFaxApplications({ - order: 'FaxApplication.priority ASC', - include: [{ - model: Interval, - include: [{ - all: true - }] - }] - }); - case 'sms': - return account - .getSmsApplications({ - order: 'SmsApplication.priority ASC', - include: [{ - model: Interval, - include: [{ - all: true - }] - }] - }); - case 'openchannel': - return account - .getOpenchannelApplications({ - order: 'OpenchannelApplication.priority ASC', - include: [{ - model: Interval, - include: [{ - all: true - }] - }] - }); - default: - return []; - } - }) - .then(function(apps) { - var valid; - - for (var i = 0; i < apps.length; i++) { - valid = true; - - if (apps[i].Interval) { - for (var j = 0; j < apps[i].Interval.SubIntervals.length; j++) { - if (isIntervalValid(splitInterval(apps[i].Interval.SubIntervals[j].interval))) { - break; - } else { - console.info(self.data.channel.toUpperCase(), 'APP', apps[i].app.toUpperCase(), 'SKIP BY INTERVAL. INTERACTION:', self.data.roomid); - valid = false; - } - } - } else { - if (!isIntervalValid(splitInterval(apps[i].interval))) { - valid = false; - console.info(self.data.channel.toUpperCase(), 'APP', apps[i].app.toUpperCase(), 'SKIP BY INTERVAL. INTERACTION:', self.data.roomid); - } - } - - if (valid) { - self._apps.push(apps[i].dataValues) - } - } - - self.next(); - }); -}; - -// Define a method with async internals -Scheduler.prototype.next = function next() { - var self = this; // Use a closure to preserve `this` - var app = self._apps.shift(); - - if (app) { - structure.models.reports[self.data.channel].removeHook('afterUpdate', structure.labels.reports[self.data.channel]); - - switch (app.app) { - case 'fidelity': - self.app = new Fidelity(app, self.data, function() { - return structure.models.sessions[self.data.channel] - .update({ - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - timeout: true - }, { - where: { - leaveAt: null, - uniqueid: self.data.uniqueid, - }, - individualHooks: true - }) - .then(function() { - self.next(); - }); - }); - break; - case 'agent': - self.app = new Agent(app, self.data, function() { - return structure.models.sessions[self.data.channel] - .update({ - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - timeout: true - }, { - where: { - leaveAt: null, - uniqueid: self.data.uniqueid, - }, - individualHooks: true - }) - .then(function() { - self.next(); - }); - }); - break; - case 'queue': - self.app = new Queue(app, self.data, function() { - return structure.models.sessions[self.data.channel] - .update({ - leaveAt: moment().format("YYYY-MM-DD HH:mm:ss"), - timeout: true - }, { - where: { - leaveAt: null, - uniqueid: self.data.uniqueid, - }, - individualHooks: true - }) - .then(function() { - self.next(); - }); - }); - break; - case 'sendMail': - self.app = new SendMail(app, self.data, function() { - self.next(); - }); - break; - case 'replyMail': - self.app = new ReplyMail(app, self.data, function() { - self.next(); - }, self.msg); - break; - case 'sendSms': - self.app = new SendSms(app, self.data, function() { - self.next(); - }); - break; - default: - console.log('unknown app'); - } - - self.app.init(); - } else { - - var updated = { - waiting: false - }; - - if (self.data.channel === 'chat') { - updated.status = 'UNMANAGED'; - } - - structure.models.rooms[self.data.channel] - .update(updated, { - where: { - id: self.data.roomid, - }, - individualHooks: true - }) - .catch(function(err) { - console.error(); - }); - } -}; - -// Export this file as a module -module.exports = Scheduler; +var _0x34a9=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2F\x66\x69\x64\x65\x6C\x69\x74\x79","\x2E\x2F\x61\x67\x65\x6E\x74","\x2E\x2F\x71\x75\x65\x75\x65","\x2E\x2F\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x2E\x2F\x73\x65\x6E\x64\x53\x6D\x73","\x2E\x2F\x72\x65\x70\x6C\x79\x4D\x61\x69\x6C","\x64\x61\x74\x61","\x6D\x73\x67","\x5F\x61\x70\x70\x73","\x73\x70\x6C\x69\x74\x49\x6E\x74\x65\x72\x76\x61\x6C","\x6C\x6F\x67","\x2C","\x73\x70\x6C\x69\x74","\x2A","\x2D","\x74\x5F\x66\x72\x6F\x6D","\x48\x48\x3A\x6D\x6D","\x74\x5F\x74\x6F","\x77\x64\x5F\x66\x72\x6F\x6D","\x77\x64\x5F\x74\x6F","\x6D\x64\x5F\x66\x72\x6F\x6D","\x6D\x64\x5F\x74\x6F","\x6D\x5F\x66\x72\x6F\x6D","\x6D\x5F\x74\x6F","\x66\x6F\x72\x45\x61\x63\x68","\x66\x6F\x72\x6D\x61\x74","\x45","\x44","\x4D","\x70\x75\x73\x68","\x69\x73\x42\x65\x74\x77\x65\x65\x6E","\x66\x69\x6C\x74\x65\x72","\x76\x61\x6C\x69\x64\x20\x77\x65\x65\x6B\x64\x61\x79\x73","\x69\x6E\x64\x65\x78\x4F\x66","\x76\x61\x6C\x69\x64\x20\x6D\x6F\x6E\x74\x68\x73\x64\x61\x79\x73","\x76\x61\x6C\x69\x64\x20\x6D\x6F\x6E\x74\x68\x73","\x54\x69\x6D\x65\x20\x69\x73\x20","\x2C\x20\x57\x65\x65\x6B\x44\x61\x79\x20\x69\x73\x20","\x2C\x20\x4D\x6F\x6E\x74\x68\x44\x61\x79\x20\x69\x73\x20","\x2C\x20\x4D\x6F\x6E\x74\x68\x20\x69\x73\x20","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x69\x64","\x61\x70\x70","\x74\x69\x6D\x65\x6F\x75\x74","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x55\x73\x65\x72\x49\x64","\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x70\x70\x51\x75\x65\x75\x65\x73","\x6C\x61\x62\x65\x6C\x73","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x72\x6F\x6F\x6D\x69\x64","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x53\x54\x4F\x50\x20\x53\x43\x48\x45\x44\x55\x4C\x45\x52\x20\x49\x4E\x53\x54\x41\x4E\x43\x45\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x69\x6E\x66\x6F","\x61\x64\x64\x48\x6F\x6F\x6B","\x72\x6F\x6F\x6D\x73","\x6D\x6F\x64\x65\x6C\x73","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x64\x69\x61\x6C\x70\x6C\x61\x6E\x20\x65\x6E\x64\x65\x64","\x74\x68\x65\x6E","\x75\x70\x64\x61\x74\x65","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x73\x65\x73\x73\x69\x6F\x6E\x73","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x53\x54\x4F\x50\x20\x53\x43\x48\x45\x44\x55\x4C\x45\x52\x20\x49\x4E\x53\x54\x41\x4E\x43\x45\x20\x52\x45\x4A\x45\x43\x54\x45\x44\x2C\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x41\x47\x45\x4E\x54\x3A","\x72\x65\x6A\x65\x63\x74\x65\x64","\x72\x65\x70\x6F\x72\x74\x73","\x63\x68\x61\x74","\x61\x62\x61\x6E\x64\x6F\x6E","\x41\x42\x41\x4E\x44\x4F\x4E","\x6C\x65\x6E\x67\x74\x68","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x41\x50\x50","\x53\x4B\x49\x50\x20\x42\x59\x20\x49\x4E\x54\x45\x52\x56\x41\x4C\x2E\x20\x49\x4E\x54\x45\x52\x41\x43\x54\x49\x4F\x4E\x3A","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x6E\x65\x78\x74","\x43\x52\x45\x41\x54\x45\x20\x53\x43\x48\x45\x44\x55\x4C\x45\x52\x20\x49\x4E\x53\x54\x41\x4E\x43\x45\x20\x46\x4F\x52\x20\x41\x43\x43\x4F\x55\x4E\x54\x20\x25\x73","\x6E\x61\x6D\x65","\x66\x69\x64\x65\x6C\x69\x74\x79","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x67\x65\x74\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x67\x65\x74\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x67\x65\x74\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x66\x61\x78","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x67\x65\x74\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x73\x6D\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x70\x72\x69\x6F\x72\x69\x74\x79\x20\x41\x53\x43","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74\x73","\x73\x68\x69\x66\x74","\x72\x65\x6D\x6F\x76\x65\x48\x6F\x6F\x6B","\x61\x67\x65\x6E\x74","\x71\x75\x65\x75\x65","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x72\x65\x70\x6C\x79\x4D\x61\x69\x6C","\x73\x65\x6E\x64\x53\x6D\x73","\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x61\x70\x70","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x65\x78\x70\x6F\x72\x74\x73"];_0x34a9[0];const _=require(_0x34a9[1]);const moment=require(_0x34a9[2]);const config=require(_0x34a9[3]);const structure=require(_0x34a9[4]);const cp=require(_0x34a9[5]);const util=require(_0x34a9[6]);const User=require(_0x34a9[8])[_0x34a9[7]];const Interval=require(_0x34a9[8])[_0x34a9[9]];const MailAccount=require(_0x34a9[8])[_0x34a9[10]];const ReportMail=require(_0x34a9[8])[_0x34a9[11]];const ReportChat=require(_0x34a9[8])[_0x34a9[12]];const ReportSms=require(_0x34a9[8])[_0x34a9[13]];const ReportFax=require(_0x34a9[8])[_0x34a9[14]];const ReportOpenchannel=require(_0x34a9[8])[_0x34a9[15]];const weekDaysCollection={mon:1,tue:2,wed:3,thu:4,fri:5,sat:6,sun:7};const monthsCollection={jan:1,feb:2,mar:3,apr:4,may:5,jun:6,jul:7,aug:8,sep:9,oct:10,nov:11,dec:12};var Fidelity=require(_0x34a9[16]);var Agent=require(_0x34a9[17]);var Queue=require(_0x34a9[18]);var SendMail=require(_0x34a9[19]);var SendSms=require(_0x34a9[20]);var ReplyMail=require(_0x34a9[21]);function Scheduler(_0xcdbfx18,_0xcdbfx19){this[_0x34a9[22]]= _0xcdbfx18;this[_0x34a9[23]]= _0xcdbfx19;this[_0x34a9[24]]= []}function splitInterval(_0xcdbfx1b){console[_0x34a9[26]](_0x34a9[25],_0xcdbfx1b);var _0xcdbfx1c={};var _0xcdbfx1d=_0xcdbfx1b[_0x34a9[28]](_0x34a9[27]);var _0xcdbfx1e;_0xcdbfx1d[_0x34a9[40]](function(_0xcdbfx1f,_0xcdbfx20){switch(_0xcdbfx20){case 0:if(_0xcdbfx1f!== _0x34a9[29]){_0xcdbfx1e= _0xcdbfx1f[_0x34a9[28]](_0x34a9[30]);_0xcdbfx1c[_0x34a9[31]]= moment(_0xcdbfx1e[0],_0x34a9[32]);_0xcdbfx1c[_0x34a9[33]]= moment(_0xcdbfx1e[1],_0x34a9[32])}else {_0xcdbfx1c[_0x34a9[31]]= null;_0xcdbfx1c[_0x34a9[33]]= null};break;case 1:if(_0xcdbfx1f!== _0x34a9[29]){_0xcdbfx1e= _0xcdbfx1f[_0x34a9[28]](_0x34a9[30]);_0xcdbfx1c[_0x34a9[34]]= weekDaysCollection[_0xcdbfx1e[0]];_0xcdbfx1c[_0x34a9[35]]= _0xcdbfx1e[1]?weekDaysCollection[_0xcdbfx1e[1]]:null}else {_0xcdbfx1c[_0x34a9[34]]= null;_0xcdbfx1c[_0x34a9[35]]= null};break;case 2:if(_0xcdbfx1f!== _0x34a9[29]){_0xcdbfx1e= _0xcdbfx1f[_0x34a9[28]](_0x34a9[30]);_0xcdbfx1c[_0x34a9[36]]= _0xcdbfx1e[0];_0xcdbfx1c[_0x34a9[37]]= _0xcdbfx1e[1]?_0xcdbfx1e[1]:null}else {_0xcdbfx1c[_0x34a9[36]]= null;_0xcdbfx1c[_0x34a9[37]]= null};break;case 3:if(_0xcdbfx1f!== _0x34a9[29]){_0xcdbfx1e= _0xcdbfx1f[_0x34a9[28]](_0x34a9[30]);_0xcdbfx1c[_0x34a9[38]]= monthsCollection[_0xcdbfx1e[0]];_0xcdbfx1c[_0x34a9[39]]= _0xcdbfx1e[1]?monthsCollection[_0xcdbfx1e[1]]:null}else {_0xcdbfx1c[_0x34a9[38]]= null;_0xcdbfx1c[_0x34a9[39]]= null};break;default:}});return _0xcdbfx1c}function isIntervalValid(_0xcdbfx1b){var _0xcdbfx22=moment()[_0x34a9[41]](_0x34a9[32]);var _0xcdbfx23=moment()[_0x34a9[41]](_0x34a9[42]);var _0xcdbfx24=moment()[_0x34a9[41]](_0x34a9[43]);var _0xcdbfx25=moment()[_0x34a9[41]](_0x34a9[44]);var _0xcdbfx26,_0xcdbfx27,_0xcdbfx28,_0xcdbfx29;var _0xcdbfx2a=[1,2,3,4,5,6,7,8,9,10,11,12];var _0xcdbfx2b=[1,2,3,4,5,6,7];var _0xcdbfx2c=[];for(var _0xcdbfx2d=1;_0xcdbfx2d<= 31;_0xcdbfx2d++){_0xcdbfx2c[_0x34a9[45]](_0xcdbfx2d)};_0xcdbfx26= (_0xcdbfx1b[_0x34a9[31]]&& _0xcdbfx1b[_0x34a9[33]])?moment(_0xcdbfx22,_0x34a9[32])[_0x34a9[46]](moment(_0xcdbfx1b[_0x34a9[31]],_0x34a9[32]),moment(_0xcdbfx1b[_0x34a9[33]],_0x34a9[32])):true;if(_0xcdbfx1b[_0x34a9[34]]){if(_0xcdbfx1b[_0x34a9[35]]){var _0xcdbfx2e=_[_0x34a9[47]](_0xcdbfx2b,function(_0xcdbfx2f){return (_0xcdbfx2f>= _0xcdbfx1b[_0x34a9[34]])&& (_0xcdbfx2f<= _0xcdbfx1b[_0x34a9[35]])});console[_0x34a9[26]](_0x34a9[48],_0xcdbfx2e);_0xcdbfx27= (_0xcdbfx2e[_0x34a9[49]](parseInt(_0xcdbfx23))!== -1)?true:false}else {_0xcdbfx27= (parseInt(_0xcdbfx23)=== _0xcdbfx1b[_0x34a9[34]])?true:false}}else {_0xcdbfx27= true};if(_0xcdbfx1b[_0x34a9[36]]){if(_0xcdbfx1b[_0x34a9[37]]){var _0xcdbfx30=_[_0x34a9[47]](_0xcdbfx2c,function(_0xcdbfx2f){return (_0xcdbfx2f>= _0xcdbfx1b[_0x34a9[36]])&& (_0xcdbfx2f<= _0xcdbfx1b[_0x34a9[37]])});console[_0x34a9[26]](_0x34a9[50],_0xcdbfx30);_0xcdbfx28= (_0xcdbfx30[_0x34a9[49]](parseInt(_0xcdbfx24))!== -1)?true:false}else {_0xcdbfx28= (parseInt(_0xcdbfx24)=== _0xcdbfx1b[_0x34a9[36]])?true:false}}else {_0xcdbfx28= true};if(_0xcdbfx1b[_0x34a9[38]]){if(_0xcdbfx1b[_0x34a9[39]]){var _0xcdbfx31=_[_0x34a9[47]](_0xcdbfx2a,function(_0xcdbfx2f){return (_0xcdbfx2f>= _0xcdbfx1b[_0x34a9[38]])&& (_0xcdbfx2f<= _0xcdbfx1b[_0x34a9[39]])});console[_0x34a9[26]](_0x34a9[51],_0xcdbfx31);_0xcdbfx29= (_0xcdbfx31[_0x34a9[49]](parseInt(_0xcdbfx25))!== -1)?true:false}else {_0xcdbfx29= (parseInt(_0xcdbfx25)=== _0xcdbfx1b[_0x34a9[38]])?true:false}}else {_0xcdbfx29= true};console[_0x34a9[26]](_0x34a9[52],_0xcdbfx26,_0x34a9[53],_0xcdbfx27,_0x34a9[54],_0xcdbfx28,_0x34a9[55],_0xcdbfx29);return _0xcdbfx26&& _0xcdbfx27&& _0xcdbfx28&& _0xcdbfx29}Scheduler[_0x34a9[57]][_0x34a9[56]]= function init(){var _0xcdbfx33=this;var _0xcdbfx34=[_0x34a9[58],_0x34a9[59],_0x34a9[60],_0x34a9[61],_0x34a9[62]];_0xcdbfx34[_0x34a9[45]](structure[_0x34a9[65]][_0x34a9[64]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]]);structure[_0x34a9[74]][_0x34a9[73]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[72]](_0x34a9[66],function(_0xcdbfx35,_0xcdbfx36){if(_0xcdbfx33[_0x34a9[22]][_0x34a9[67]]=== _0xcdbfx35[_0x34a9[58]]){if(_0xcdbfx35[_0x34a9[69]](_0x34a9[68])){console[_0x34a9[71]](util[_0x34a9[41]](_0x34a9[70],_0xcdbfx35[_0x34a9[58]]));clearTimeout(_0xcdbfx33[_0x34a9[59]][_0x34a9[60]]);clearInterval(_0xcdbfx33[_0x34a9[59]][_0x34a9[61]])}}});structure[_0x34a9[74]][_0x34a9[90]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[72]](_0x34a9[66],function(_0xcdbfx35,_0xcdbfx36){if(_0xcdbfx33[_0x34a9[22]][_0x34a9[67]]=== _0xcdbfx35[_0x34a9[67]]){if(_0xcdbfx35[_0x34a9[69]](_0x34a9[75])){console[_0x34a9[71]](util[_0x34a9[41]](_0x34a9[70],_0xcdbfx35[_0x34a9[67]]));clearTimeout(_0xcdbfx33[_0x34a9[59]][_0x34a9[60]]);clearInterval(_0xcdbfx33[_0x34a9[59]][_0x34a9[61]]);return structure[_0x34a9[74]][_0x34a9[85]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[80]]({memberid:_0xcdbfx35[_0x34a9[81]],membername:_0xcdbfx35[_0x34a9[82]],leaveAt:moment()[_0x34a9[41]](_0x34a9[83])},{where:{uniqueid:_0xcdbfx35[_0x34a9[84]],leaveAt:null},individualHooks:true})[_0x34a9[79]](function(){return structure[_0x34a9[74]][_0x34a9[73]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[80]]({waiting:false},{where:{id:_0xcdbfx35[_0x34a9[67]]},individualHooks:true})[_0x34a9[79]](function(){console[_0x34a9[26]](_0x34a9[78])})[_0x34a9[77]](function(_0xcdbfx37){console[_0x34a9[76]]()})})};if(_0xcdbfx35[_0x34a9[69]](_0x34a9[86])){console[_0x34a9[71]](util[_0x34a9[41]](_0x34a9[87],_0xcdbfx35[_0x34a9[67]],_0x34a9[88],_0xcdbfx35[_0x34a9[82]]));_0xcdbfx33[_0x34a9[59]][_0x34a9[89]][_0x34a9[45]]({id:_0xcdbfx35[_0x34a9[81]]})}}});if(_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]=== _0x34a9[91]){structure[_0x34a9[74]][_0x34a9[85]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[72]](_0x34a9[66],function(_0xcdbfx35,_0xcdbfx36){if(_0xcdbfx35[_0x34a9[69]](_0x34a9[92])&& _0xcdbfx35[_0x34a9[92]]){console[_0x34a9[71]](util[_0x34a9[41]](_0x34a9[70],_0xcdbfx35[_0x34a9[67]]));clearTimeout(_0xcdbfx33[_0x34a9[59]][_0x34a9[60]]);clearInterval(_0xcdbfx33[_0x34a9[59]][_0x34a9[61]]);return structure[_0x34a9[74]][_0x34a9[73]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[80]]({status:_0x34a9[93]},{where:{id:_0xcdbfx33[_0x34a9[22]][_0x34a9[67]]},individualHooks:true})[_0x34a9[79]](function(){console[_0x34a9[26]](_0x34a9[78])})[_0x34a9[77]](function(_0xcdbfx37){console[_0x34a9[76]]()})}})};return structure[_0x34a9[74]][_0x34a9[120]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[119]](_0xcdbfx33[_0x34a9[22]][_0x34a9[118]],{attributes:[_0x34a9[58],_0x34a9[102],_0x34a9[103],_0x34a9[60]]})[_0x34a9[79]](function(_0xcdbfx3b){console[_0x34a9[71]](util[_0x34a9[41]](_0x34a9[101],_0xcdbfx3b[_0x34a9[102]]));if(_0xcdbfx3b[_0x34a9[103]]){_0xcdbfx33[_0x34a9[24]][_0x34a9[45]]({app:_0x34a9[103],timeout:_0xcdbfx3b[_0x34a9[60]]})};switch(_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]){case _0x34a9[106]:return _0xcdbfx3b[_0x34a9[105]]({order:_0x34a9[104],include:[{model:Interval,include:[{all:true}]}]});case _0x34a9[91]:return _0xcdbfx3b[_0x34a9[108]]({order:_0x34a9[107],include:[{model:Interval,include:[{all:true}]}]});case _0x34a9[111]:return _0xcdbfx3b[_0x34a9[110]]({order:_0x34a9[109],include:[{model:Interval,include:[{all:true}]}]});case _0x34a9[114]:return _0xcdbfx3b[_0x34a9[113]]({order:_0x34a9[112],include:[{model:Interval,include:[{all:true}]}]});case _0x34a9[117]:return _0xcdbfx3b[_0x34a9[116]]({order:_0x34a9[115],include:[{model:Interval,include:[{all:true}]}]});default:return []}})[_0x34a9[79]](function(_0xcdbfx38){var _0xcdbfx39;for(var _0xcdbfx2d=0;_0xcdbfx2d< _0xcdbfx38[_0x34a9[94]];_0xcdbfx2d++){_0xcdbfx39= true;if(_0xcdbfx38[_0xcdbfx2d][_0x34a9[9]]){for(var _0xcdbfx3a=0;_0xcdbfx3a< _0xcdbfx38[_0xcdbfx2d][_0x34a9[9]][_0x34a9[95]][_0x34a9[94]];_0xcdbfx3a++){if(isIntervalValid(splitInterval(_0xcdbfx38[_0xcdbfx2d][_0x34a9[9]][_0x34a9[95]][_0xcdbfx3a][_0x34a9[61]]))){break}else {console[_0x34a9[71]](_0xcdbfx33[_0x34a9[22]][_0x34a9[63]][_0x34a9[96]](),_0x34a9[97],_0xcdbfx38[_0xcdbfx2d][_0x34a9[59]][_0x34a9[96]](),_0x34a9[98],_0xcdbfx33[_0x34a9[22]][_0x34a9[67]]);_0xcdbfx39= false}}}else {if(!isIntervalValid(splitInterval(_0xcdbfx38[_0xcdbfx2d][_0x34a9[61]]))){_0xcdbfx39= false;console[_0x34a9[71]](_0xcdbfx33[_0x34a9[22]][_0x34a9[63]][_0x34a9[96]](),_0x34a9[97],_0xcdbfx38[_0xcdbfx2d][_0x34a9[59]][_0x34a9[96]](),_0x34a9[98],_0xcdbfx33[_0x34a9[22]][_0x34a9[67]])}};if(_0xcdbfx39){_0xcdbfx33[_0x34a9[24]][_0x34a9[45]](_0xcdbfx38[_0xcdbfx2d][_0x34a9[99]])}};_0xcdbfx33[_0x34a9[100]]()})};Scheduler[_0x34a9[57]][_0x34a9[100]]= function next(){var _0xcdbfx33=this;var _0xcdbfx3d=_0xcdbfx33[_0x34a9[24]][_0x34a9[121]]();if(_0xcdbfx3d){structure[_0x34a9[74]][_0x34a9[90]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[122]](_0x34a9[66],structure[_0x34a9[65]][_0x34a9[90]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]]);switch(_0xcdbfx3d[_0x34a9[59]]){case _0x34a9[103]:_0xcdbfx33[_0x34a9[59]]= new Fidelity(_0xcdbfx3d,_0xcdbfx33[_0x34a9[22]],function(){return structure[_0x34a9[74]][_0x34a9[85]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[80]]({leaveAt:moment()[_0x34a9[41]](_0x34a9[83]),timeout:true},{where:{leaveAt:null,uniqueid:_0xcdbfx33[_0x34a9[22]][_0x34a9[84]]},individualHooks:true})[_0x34a9[79]](function(){_0xcdbfx33[_0x34a9[100]]()})});break;case _0x34a9[123]:_0xcdbfx33[_0x34a9[59]]= new Agent(_0xcdbfx3d,_0xcdbfx33[_0x34a9[22]],function(){return structure[_0x34a9[74]][_0x34a9[85]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[80]]({leaveAt:moment()[_0x34a9[41]](_0x34a9[83]),timeout:true},{where:{leaveAt:null,uniqueid:_0xcdbfx33[_0x34a9[22]][_0x34a9[84]]},individualHooks:true})[_0x34a9[79]](function(){_0xcdbfx33[_0x34a9[100]]()})});break;case _0x34a9[124]:_0xcdbfx33[_0x34a9[59]]= new Queue(_0xcdbfx3d,_0xcdbfx33[_0x34a9[22]],function(){return structure[_0x34a9[74]][_0x34a9[85]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[80]]({leaveAt:moment()[_0x34a9[41]](_0x34a9[83]),timeout:true},{where:{leaveAt:null,uniqueid:_0xcdbfx33[_0x34a9[22]][_0x34a9[84]]},individualHooks:true})[_0x34a9[79]](function(){_0xcdbfx33[_0x34a9[100]]()})});break;case _0x34a9[125]:_0xcdbfx33[_0x34a9[59]]= new SendMail(_0xcdbfx3d,_0xcdbfx33[_0x34a9[22]],function(){_0xcdbfx33[_0x34a9[100]]()});break;case _0x34a9[126]:_0xcdbfx33[_0x34a9[59]]= new ReplyMail(_0xcdbfx3d,_0xcdbfx33[_0x34a9[22]],function(){_0xcdbfx33[_0x34a9[100]]()},_0xcdbfx33[_0x34a9[23]]);break;case _0x34a9[127]:_0xcdbfx33[_0x34a9[59]]= new SendSms(_0xcdbfx3d,_0xcdbfx33[_0x34a9[22]],function(){_0xcdbfx33[_0x34a9[100]]()});break;default:console[_0x34a9[26]](_0x34a9[128])};_0xcdbfx33[_0x34a9[59]][_0x34a9[56]]()}else {var _0xcdbfx3e={waiting:false};if(_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]=== _0x34a9[91]){_0xcdbfx3e[_0x34a9[68]]= _0x34a9[129]};structure[_0x34a9[74]][_0x34a9[73]][_0xcdbfx33[_0x34a9[22]][_0x34a9[63]]][_0x34a9[80]](_0xcdbfx3e,{where:{id:_0xcdbfx33[_0x34a9[22]][_0x34a9[67]]},individualHooks:true})[_0x34a9[77]](function(_0xcdbfx37){console[_0x34a9[76]]()})}};module[_0x34a9[130]]= Scheduler \ No newline at end of file diff --git a/server/config/routing/sendMail.js b/server/config/routing/sendMail.js index a726daa..92c5a94 100644 --- a/server/config/routing/sendMail.js +++ b/server/config/routing/sendMail.js @@ -1,86 +1 @@ -'use strict'; - -const _ = require('lodash'); -const config = require('../environment'); -const structure = require('./structure'); - -// NODEJS API -const cp = require('child_process'); -const util = require('util'); -const moment = require('moment'); -const Mustache = require('mustache'); - -// MODELS -const User = require('../../models').User; -const Message = require('../../models').MailMessage; -const Account = require('../../models').MailAccount; -const Template = require('../../models').Template; - -// Define the factory -function SendMail(app, data, next) { - this.app = app; - this.data = data; - //callbacks - this.next = next; -} - -SendMail.prototype.init = function init() { - var self = this; - - var _smtp; - var _message = { - from: [], - to: [] - }; - - return Account - .findById(self.app.data8) - .then(function(account) { - return account - .getMailServerOut(); - }) - .then(function(smtp) { - _smtp = smtp; - _message.from.push(_smtp.username); - _message.to.push(self.app.data2); - - return Template - .findById(self.app.data9); - }) - .then(function(template) { - switch (self.data.channel) { - case 'mail': - _message.subject = template.subject; - return Message - .findById(self.data.messageid) - .then(function(data) { - - _message.html = Mustache.render(template.html, { - interactionId: self.data.roomid, - subject: self.data.subject, - body: data.text, - accountName: self.data.accountname, - from: _message.from.join(', '), - to: _message.to.join(', '), - cc: self.data.cc.join(', '), - createdAt: self.app.createdAt - }); - }); - - default: - } - }) - .then(function() { - return Message - .create(_message); - }) - .then(function() { - self.next(); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Export this file as a module -module.exports = SendMail; +var _0x8a73=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x61\x70\x70","\x64\x61\x74\x61","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x72\x6F\x6F\x6D\x69\x64","\x74\x65\x78\x74","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x2C\x20","\x6A\x6F\x69\x6E","\x66\x72\x6F\x6D","\x74\x6F","\x63\x63","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x72\x65\x6E\x64\x65\x72","\x6D\x65\x73\x73\x61\x67\x65\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6D\x61\x69\x6C","\x63\x68\x61\x6E\x6E\x65\x6C","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x75\x73\x68","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x39","\x67\x65\x74\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x64\x61\x74\x61\x38","\x65\x78\x70\x6F\x72\x74\x73"];_0x8a73[0];const _=require(_0x8a73[1]);const config=require(_0x8a73[2]);const structure=require(_0x8a73[3]);const cp=require(_0x8a73[4]);const util=require(_0x8a73[5]);const moment=require(_0x8a73[6]);const Mustache=require(_0x8a73[7]);const User=require(_0x8a73[9])[_0x8a73[8]];const Message=require(_0x8a73[9])[_0x8a73[10]];const Account=require(_0x8a73[9])[_0x8a73[11]];const Template=require(_0x8a73[9])[_0x8a73[12]];function SendMail(_0xd8b5xd,_0xd8b5xe,_0xd8b5xf){this[_0x8a73[13]]= _0xd8b5xd;this[_0x8a73[14]]= _0xd8b5xe;this[_0x8a73[15]]= _0xd8b5xf}SendMail[_0x8a73[17]][_0x8a73[16]]= function init(){var _0xd8b5x11=this;var _0xd8b5x12;var _0xd8b5x13={from:[],to:[]};return Account[_0x8a73[35]](_0xd8b5x11[_0x8a73[13]][_0x8a73[43]])[_0x8a73[20]](function(_0xd8b5x17){return _0xd8b5x17[_0x8a73[42]]()})[_0x8a73[20]](function(_0xd8b5x16){_0xd8b5x12= _0xd8b5x16;_0xd8b5x13[_0x8a73[29]][_0x8a73[39]](_0xd8b5x12[_0x8a73[38]]);_0xd8b5x13[_0x8a73[30]][_0x8a73[39]](_0xd8b5x11[_0x8a73[13]][_0x8a73[40]]);return Template[_0x8a73[35]](_0xd8b5x11[_0x8a73[13]][_0x8a73[41]])})[_0x8a73[20]](function(_0xd8b5x15){switch(_0xd8b5x11[_0x8a73[14]][_0x8a73[37]]){case _0x8a73[36]:_0xd8b5x13[_0x8a73[22]]= _0xd8b5x15[_0x8a73[22]];return Message[_0x8a73[35]](_0xd8b5x11[_0x8a73[14]][_0x8a73[34]])[_0x8a73[20]](function(_0xd8b5xe){_0xd8b5x13[_0x8a73[23]]= Mustache[_0x8a73[33]](_0xd8b5x15[_0x8a73[23]],{interactionId:_0xd8b5x11[_0x8a73[14]][_0x8a73[24]],subject:_0xd8b5x11[_0x8a73[14]][_0x8a73[22]],body:_0xd8b5xe[_0x8a73[25]],accountName:_0xd8b5x11[_0x8a73[14]][_0x8a73[26]],from:_0xd8b5x13[_0x8a73[29]][_0x8a73[28]](_0x8a73[27]),to:_0xd8b5x13[_0x8a73[30]][_0x8a73[28]](_0x8a73[27]),cc:_0xd8b5x11[_0x8a73[14]][_0x8a73[31]][_0x8a73[28]](_0x8a73[27]),createdAt:_0xd8b5x11[_0x8a73[13]][_0x8a73[32]]})});default:}})[_0x8a73[20]](function(){return Message[_0x8a73[21]](_0xd8b5x13)})[_0x8a73[20]](function(){_0xd8b5x11[_0x8a73[15]]()})[_0x8a73[19]](function(_0xd8b5x14){console[_0x8a73[18]](_0xd8b5x14)})};module[_0x8a73[44]]= SendMail \ No newline at end of file diff --git a/server/config/routing/sendSms.js b/server/config/routing/sendSms.js index 133849f..6185117 100644 --- a/server/config/routing/sendSms.js +++ b/server/config/routing/sendSms.js @@ -1,54 +1 @@ -'use strict'; - -const _ = require('lodash'); -const config = require('../environment'); -const structure = require('./structure'); - -// NODEJS API -const cp = require('child_process'); -const util = require('util'); -const moment = require('moment'); -const Mustache = require('mustache'); - -// MODELS -const User = require('../../models').User; -const Message = require('../../models').SmsMessage; -const Account = require('../../models').SmsAccount; - -// Define the factory -function SendSms(app, data, next) { - this.app = app; - this.data = data; - //callbacks - this.next = next; -} - -SendSms.prototype.init = function init() { - var self = this; - var _smtp; - var _message = { - from: '', - to: '', - body: '' - }; - - return Account - .findById(self.app.data8) - .then(function(account) { - _message.SmsAccountId = account.id; - _message.from = account.phone; - _message.to = self.app.data2; - _message.body = self.app.data6; - return Message - .create(_message); - }) - .then(function(message) { - self.next(); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Export this file as a module -module.exports = SendSms; +var _0xc9de=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x73\x74\x72\x75\x63\x74\x75\x72\x65","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x61\x70\x70","\x64\x61\x74\x61","\x6E\x65\x78\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x74\x68\x65\x6E","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x69\x64","\x66\x72\x6F\x6D","\x70\x68\x6F\x6E\x65","\x74\x6F","\x64\x61\x74\x61\x32","\x62\x6F\x64\x79","\x64\x61\x74\x61\x36","\x63\x72\x65\x61\x74\x65","\x64\x61\x74\x61\x38","\x66\x69\x6E\x64\x42\x79\x49\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xc9de[0];const _=require(_0xc9de[1]);const config=require(_0xc9de[2]);const structure=require(_0xc9de[3]);const cp=require(_0xc9de[4]);const util=require(_0xc9de[5]);const moment=require(_0xc9de[6]);const Mustache=require(_0xc9de[7]);const User=require(_0xc9de[9])[_0xc9de[8]];const Message=require(_0xc9de[9])[_0xc9de[10]];const Account=require(_0xc9de[9])[_0xc9de[11]];function SendSms(_0x5b28xc,_0x5b28xd,_0x5b28xe){this[_0xc9de[12]]= _0x5b28xc;this[_0xc9de[13]]= _0x5b28xd;this[_0xc9de[14]]= _0x5b28xe}SendSms[_0xc9de[16]][_0xc9de[15]]= function init(){var _0x5b28x10=this;var _0x5b28x11;var _0x5b28x12={from:_0xc9de[17],to:_0xc9de[17],body:_0xc9de[17]};return Account[_0xc9de[31]](_0x5b28x10[_0xc9de[12]][_0xc9de[30]])[_0xc9de[20]](function(_0x5b28x15){_0x5b28x12[_0xc9de[21]]= _0x5b28x15[_0xc9de[22]];_0x5b28x12[_0xc9de[23]]= _0x5b28x15[_0xc9de[24]];_0x5b28x12[_0xc9de[25]]= _0x5b28x10[_0xc9de[12]][_0xc9de[26]];_0x5b28x12[_0xc9de[27]]= _0x5b28x10[_0xc9de[12]][_0xc9de[28]];return Message[_0xc9de[29]](_0x5b28x12)})[_0xc9de[20]](function(_0x5b28x14){_0x5b28x10[_0xc9de[14]]()})[_0xc9de[19]](function(_0x5b28x13){console[_0xc9de[18]](_0x5b28x13)})};module[_0xc9de[32]]= SendSms \ No newline at end of file diff --git a/server/config/routing/structure.js b/server/config/routing/structure.js index 1feb304..9729779 100644 --- a/server/config/routing/structure.js +++ b/server/config/routing/structure.js @@ -1,127 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); -const config = require('../environment'); -// NODEJS API -const cp = require('child_process'); -const util = require('util'); -// MODELS -const User = require('../../models').User; -const Interval = require('../../models').Interval; - -const ReportMail = require('../../models').ReportMail; -const ReportChat = require('../../models').ReportChat; -const ReportSms = require('../../models').ReportSms; -const ReportFax = require('../../models').ReportFax; -const ReportOpenchannel = require('../../models').ReportOpenchannel; - -const MailAccount = require('../../models').MailAccount; -const ChatWebsite = require('../../models').ChatWebsite; -const SmsAccount = require('../../models').SmsAccount; -const FaxAccount = require('../../models').FaxAccount; -const OpenchannelAccount = require('../../models').OpenchannelAccount; - -const MailQueue = require('../../models').MailQueue; -const ChatQueue = require('../../models').ChatQueue; -const SmsQueue = require('../../models').SmsQueue; -const FaxQueue = require('../../models').FaxQueue; -const OpenchannelQueue = require('../../models').OpenchannelQueue; - -const MailRoom = require('../../models').MailRoom; -const ChatRoom = require('../../models').ChatRoom; -const SmsRoom = require('../../models').SmsRoom; -const FaxRoom = require('../../models').FaxRoom; -const OpenchannelRoom = require('../../models').OpenchannelRoom; - -const MailSession = require('../../models').ReportMailSession; -const ChatSession = require('../../models').ReportChatSession; -const SmsSession = require('../../models').ReportSmsSession; -const FaxSession = require('../../models').ReportFaxSession; -const OpenchannelSession = require('../../models').ReportOpenchannelSession; - -// Export this file as a module -module.exports = { - labels: { - rooms: { - mail: 'MailRooms', - chat: 'ChatRooms', - sms: 'SmsRooms', - fax: 'FaxRooms', - openchannel: 'OpenchannelRooms' - }, - pauses: { - mail: 'mailPause', - chat: 'chatPause', - sms: 'smsPause', - fax: 'faxPause', - openchannel: 'openchannelPause' - }, - capacities: { - mail: 'mailCapacity', - chat: 'chatCapacity', - sms: 'smsCapacity', - fax: 'faxCapacity', - openchannel: 'openchannelCapacity' - }, - appQueues: { - mail: 'MailQueueId', - chat: 'ChatQueueId', - sms: 'SmsQueueId', - fax: 'FaxQueueId', - openchannel: 'OpenchannelQueueId' - }, - penaltyTables: { - mail: 'UserHasMailQueue.penalty', - chat: 'UserHasChatQueue.penalty', - sms: 'UserHasSmsQueue.penalty', - fax: 'UserHasFaxQueue.penalty', - openchannel: 'UserHasOpenchannelQueue.penalty' - }, - reports: { - mail: 'report_mail', - chat: 'report_chat', - sms: 'report_sms', - fax: 'report_fax', - openchannel: 'report_openchannel' - } - }, - - models: { - reports: { - mail: ReportMail, - chat: ReportChat, - sms: ReportSms, - fax: ReportFax, - openchannel: ReportOpenchannel - }, - accounts: { - mail: MailAccount, - chat: ChatWebsite, - sms: SmsAccount, - fax: FaxAccount, - openchannel: OpenchannelAccount - }, - queues: { - mail: MailQueue, - chat: ChatQueue, - sms: SmsQueue, - fax: FaxQueue, - openchannel: OpenchannelQueue - }, - rooms: { - mail: MailRoom, - chat: ChatRoom, - sms: SmsRoom, - fax: FaxRoom, - openchannel: OpenchannelRoom - }, - sessions: { - mail: MailSession, - chat: ChatSession, - sms: SmsSession, - fax: FaxSession, - openchannel: OpenchannelSession - } - } -}; +var _0x102b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x2E\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x52\x65\x70\x6F\x72\x74\x46\x61\x78","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x53\x6D\x73\x52\x6F\x6F\x6D","\x46\x61\x78\x52\x6F\x6F\x6D","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D\x73","\x53\x6D\x73\x52\x6F\x6F\x6D\x73","\x46\x61\x78\x52\x6F\x6F\x6D\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x73","\x6D\x61\x69\x6C\x50\x61\x75\x73\x65","\x63\x68\x61\x74\x50\x61\x75\x73\x65","\x73\x6D\x73\x50\x61\x75\x73\x65","\x66\x61\x78\x50\x61\x75\x73\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x50\x61\x75\x73\x65","\x6D\x61\x69\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x63\x68\x61\x74\x43\x61\x70\x61\x63\x69\x74\x79","\x73\x6D\x73\x43\x61\x70\x61\x63\x69\x74\x79","\x66\x61\x78\x43\x61\x70\x61\x63\x69\x74\x79","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x43\x61\x70\x61\x63\x69\x74\x79","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x49\x64","\x43\x68\x61\x74\x51\x75\x65\x75\x65\x49\x64","\x53\x6D\x73\x51\x75\x65\x75\x65\x49\x64","\x46\x61\x78\x51\x75\x65\x75\x65\x49\x64","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x49\x64","\x55\x73\x65\x72\x48\x61\x73\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x43\x68\x61\x74\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x53\x6D\x73\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x46\x61\x78\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x55\x73\x65\x72\x48\x61\x73\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x2E\x70\x65\x6E\x61\x6C\x74\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C"];_0x102b[0];const _=require(_0x102b[1]);const moment=require(_0x102b[2]);const config=require(_0x102b[3]);const cp=require(_0x102b[4]);const util=require(_0x102b[5]);const User=require(_0x102b[7])[_0x102b[6]];const Interval=require(_0x102b[7])[_0x102b[8]];const ReportMail=require(_0x102b[7])[_0x102b[9]];const ReportChat=require(_0x102b[7])[_0x102b[10]];const ReportSms=require(_0x102b[7])[_0x102b[11]];const ReportFax=require(_0x102b[7])[_0x102b[12]];const ReportOpenchannel=require(_0x102b[7])[_0x102b[13]];const MailAccount=require(_0x102b[7])[_0x102b[14]];const ChatWebsite=require(_0x102b[7])[_0x102b[15]];const SmsAccount=require(_0x102b[7])[_0x102b[16]];const FaxAccount=require(_0x102b[7])[_0x102b[17]];const OpenchannelAccount=require(_0x102b[7])[_0x102b[18]];const MailQueue=require(_0x102b[7])[_0x102b[19]];const ChatQueue=require(_0x102b[7])[_0x102b[20]];const SmsQueue=require(_0x102b[7])[_0x102b[21]];const FaxQueue=require(_0x102b[7])[_0x102b[22]];const OpenchannelQueue=require(_0x102b[7])[_0x102b[23]];const MailRoom=require(_0x102b[7])[_0x102b[24]];const ChatRoom=require(_0x102b[7])[_0x102b[25]];const SmsRoom=require(_0x102b[7])[_0x102b[26]];const FaxRoom=require(_0x102b[7])[_0x102b[27]];const OpenchannelRoom=require(_0x102b[7])[_0x102b[28]];const MailSession=require(_0x102b[7])[_0x102b[29]];const ChatSession=require(_0x102b[7])[_0x102b[30]];const SmsSession=require(_0x102b[7])[_0x102b[31]];const FaxSession=require(_0x102b[7])[_0x102b[32]];const OpenchannelSession=require(_0x102b[7])[_0x102b[33]];module[_0x102b[34]]= {labels:{rooms:{mail:_0x102b[35],chat:_0x102b[36],sms:_0x102b[37],fax:_0x102b[38],openchannel:_0x102b[39]},pauses:{mail:_0x102b[40],chat:_0x102b[41],sms:_0x102b[42],fax:_0x102b[43],openchannel:_0x102b[44]},capacities:{mail:_0x102b[45],chat:_0x102b[46],sms:_0x102b[47],fax:_0x102b[48],openchannel:_0x102b[49]},appQueues:{mail:_0x102b[50],chat:_0x102b[51],sms:_0x102b[52],fax:_0x102b[53],openchannel:_0x102b[54]},penaltyTables:{mail:_0x102b[55],chat:_0x102b[56],sms:_0x102b[57],fax:_0x102b[58],openchannel:_0x102b[59]},reports:{mail:_0x102b[60],chat:_0x102b[61],sms:_0x102b[62],fax:_0x102b[63],openchannel:_0x102b[64]}},models:{reports:{mail:ReportMail,chat:ReportChat,sms:ReportSms,fax:ReportFax,openchannel:ReportOpenchannel},accounts:{mail:MailAccount,chat:ChatWebsite,sms:SmsAccount,fax:FaxAccount,openchannel:OpenchannelAccount},queues:{mail:MailQueue,chat:ChatQueue,sms:SmsQueue,fax:FaxQueue,openchannel:OpenchannelQueue},rooms:{mail:MailRoom,chat:ChatRoom,sms:SmsRoom,fax:FaxRoom,openchannel:OpenchannelRoom},sessions:{mail:MailSession,chat:ChatSession,sms:SmsSession,fax:FaxSession,openchannel:OpenchannelSession}}} \ No newline at end of file diff --git a/server/config/scheduler/index.js b/server/config/scheduler/index.js index 429d7a2..91adc93 100644 --- a/server/config/scheduler/index.js +++ b/server/config/scheduler/index.js @@ -1,103 +1 @@ -var Schedule = require('../../models').Schedule; -var MailServerOut = require('../../models').MailServerOut; -var CronJobManager = require('cron-job-manager'); -var _ = require('lodash'); -var Reports = require('./reports'); - - -function deleteSchedule(data, manager) { - console.log("Deleting " + data.name + " job"); - if (manager.exists(data.id.toString())) { - manager.deleteJob(data.id.toString()); - console.log("I got the current jobs: " + manager); - } else { - console.log("Job " + data.name + " does not exist"); - } -} - -function updateSchedule(data, manager, reports) { - console.log("Updating " + data.name + " job"); - if (data.active) { - createJob(data, manager, reports); - } else { - deleteSchedule(data, manager); - } -} - -module.exports = function() { - var manager = new CronJobManager(); - var reports = new Reports(); - - Schedule - .findAll({ - where: { - active: true - }, - attributes: ['id', 'name', 'type', 'active'] - }) - .then(function(schedules) { - _.forEach(schedules.rows, function(schedule) { - createJob(schedule, manager, reports); - }); - }) - .finally(function() { - synchSchedules(manager, reports); - }) - .catch(function(err) { - console.log('Error getting/setting schedules'); - }); -}; - -function createJob(schedule, manager, reports) { - console.log("Creating '" + schedule.name + "' job"); - manager.add(schedule.id.toString(), - "00 " + schedule.cron, - // "00 */2 * * * *", - function() { - executeSchedule(schedule.id, reports); - }, { - start: true, - completion: function() { - console.log("Job " + schedule.name + " stopped"); - } - }); - console.log("Job '" + schedule.name + "' created!"); - console.log("I got the current jobs: " + manager); -} - -function executeSchedule(scheduleId, reports) { - console.log('Executing schedule ', scheduleId); - return Schedule - .findById(scheduleId, { - include: [MailServerOut] - }) - .then(function(schedule) { - if (!schedule) { - console.log('Schedule not found!'); - return; - } - switch (schedule.type) { - case 'report': - reports.extractReport(schedule); - break; - default: - } - }) - .catch(function(err) { - console.log('Error retrieving schedule!'); - }); -} - -function synchSchedules(manager, reports) { - Schedule.afterCreate(function(doc, options) { - if (doc.active) { - createJob(doc.dataValues, manager, reports); - } - }); - Schedule.afterUpdate(function(doc, options) { - updateSchedule(doc.dataValues, manager, reports); - }); - Schedule.afterDestroy(function(doc) { - deleteSchedule(doc.dataValues, manager); - }); -} +var _0xbb7a=["\x53\x63\x68\x65\x64\x75\x6C\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x63\x72\x6F\x6E\x2D\x6A\x6F\x62\x2D\x6D\x61\x6E\x61\x67\x65\x72","\x6C\x6F\x64\x61\x73\x68","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x73","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20","\x6E\x61\x6D\x65","\x20\x6A\x6F\x62","\x6C\x6F\x67","\x69\x64","\x65\x78\x69\x73\x74\x73","\x64\x65\x6C\x65\x74\x65\x4A\x6F\x62","\x49\x20\x67\x6F\x74\x20\x74\x68\x65\x20\x63\x75\x72\x72\x65\x6E\x74\x20\x6A\x6F\x62\x73\x3A\x20","\x4A\x6F\x62\x20","\x20\x64\x6F\x65\x73\x20\x6E\x6F\x74\x20\x65\x78\x69\x73\x74","\x55\x70\x64\x61\x74\x69\x6E\x67\x20","\x61\x63\x74\x69\x76\x65","\x65\x78\x70\x6F\x72\x74\x73","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x2F\x73\x65\x74\x74\x69\x6E\x67\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x73","\x63\x61\x74\x63\x68","\x66\x69\x6E\x61\x6C\x6C\x79","\x72\x6F\x77\x73","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x74\x79\x70\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x27","\x27\x20\x6A\x6F\x62","\x30\x30\x20","\x63\x72\x6F\x6E","\x20\x73\x74\x6F\x70\x70\x65\x64","\x61\x64\x64","\x4A\x6F\x62\x20\x27","\x27\x20\x63\x72\x65\x61\x74\x65\x64\x21","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x20","\x45\x72\x72\x6F\x72\x20\x72\x65\x74\x72\x69\x65\x76\x69\x6E\x67\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x21","\x53\x63\x68\x65\x64\x75\x6C\x65\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x65\x78\x74\x72\x61\x63\x74\x52\x65\x70\x6F\x72\x74","\x72\x65\x70\x6F\x72\x74","\x66\x69\x6E\x64\x42\x79\x49\x64","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79"];var Schedule=require(_0xbb7a[1])[_0xbb7a[0]];var MailServerOut=require(_0xbb7a[1])[_0xbb7a[2]];var CronJobManager=require(_0xbb7a[3]);var _=require(_0xbb7a[4]);var Reports=require(_0xbb7a[5]);function deleteSchedule(_0x4c3dx7,_0x4c3dx8){console[_0xbb7a[9]](_0xbb7a[6]+ _0x4c3dx7[_0xbb7a[7]]+ _0xbb7a[8]);if(_0x4c3dx8[_0xbb7a[11]](_0x4c3dx7[_0xbb7a[10]].toString())){_0x4c3dx8[_0xbb7a[12]](_0x4c3dx7[_0xbb7a[10]].toString());console[_0xbb7a[9]](_0xbb7a[13]+ _0x4c3dx8)}else {console[_0xbb7a[9]](_0xbb7a[14]+ _0x4c3dx7[_0xbb7a[7]]+ _0xbb7a[15])}}function updateSchedule(_0x4c3dx7,_0x4c3dx8,_0x4c3dxa){console[_0xbb7a[9]](_0xbb7a[16]+ _0x4c3dx7[_0xbb7a[7]]+ _0xbb7a[8]);if(_0x4c3dx7[_0xbb7a[17]]){createJob(_0x4c3dx7,_0x4c3dx8,_0x4c3dxa)}else {deleteSchedule(_0x4c3dx7,_0x4c3dx8)}}module[_0xbb7a[18]]= function(){var _0x4c3dx8= new CronJobManager();var _0x4c3dxa= new Reports();Schedule[_0xbb7a[26]]({where:{active:true},attributes:[_0xbb7a[10],_0xbb7a[7],_0xbb7a[25],_0xbb7a[17]]})[_0xbb7a[24]](function(_0x4c3dxc){_[_0xbb7a[23]](_0x4c3dxc[_0xbb7a[22]],function(_0x4c3dxd){createJob(_0x4c3dxd,_0x4c3dx8,_0x4c3dxa)})})[_0xbb7a[21]](function(){synchSchedules(_0x4c3dx8,_0x4c3dxa)})[_0xbb7a[20]](function(_0x4c3dxb){console[_0xbb7a[9]](_0xbb7a[19])})};function createJob(_0x4c3dxd,_0x4c3dx8,_0x4c3dxa){console[_0xbb7a[9]](_0xbb7a[27]+ _0x4c3dxd[_0xbb7a[7]]+ _0xbb7a[28]);_0x4c3dx8[_0xbb7a[32]](_0x4c3dxd[_0xbb7a[10]].toString(),_0xbb7a[29]+ _0x4c3dxd[_0xbb7a[30]],function(){executeSchedule(_0x4c3dxd[_0xbb7a[10]],_0x4c3dxa)},{start:true,completion:function(){console[_0xbb7a[9]](_0xbb7a[14]+ _0x4c3dxd[_0xbb7a[7]]+ _0xbb7a[31])}});console[_0xbb7a[9]](_0xbb7a[33]+ _0x4c3dxd[_0xbb7a[7]]+ _0xbb7a[34]);console[_0xbb7a[9]](_0xbb7a[13]+ _0x4c3dx8)}function executeSchedule(_0x4c3dx10,_0x4c3dxa){console[_0xbb7a[9]](_0xbb7a[35],_0x4c3dx10);return Schedule[_0xbb7a[40]](_0x4c3dx10,{include:[MailServerOut]})[_0xbb7a[24]](function(_0x4c3dxd){if(!_0x4c3dxd){console[_0xbb7a[9]](_0xbb7a[37]);return};switch(_0x4c3dxd[_0xbb7a[25]]){case _0xbb7a[39]:_0x4c3dxa[_0xbb7a[38]](_0x4c3dxd);break;default:}})[_0xbb7a[20]](function(_0x4c3dxb){console[_0xbb7a[9]](_0xbb7a[36])})}function synchSchedules(_0x4c3dx8,_0x4c3dxa){Schedule[_0xbb7a[42]](function(_0x4c3dx12,_0x4c3dx13){if(_0x4c3dx12[_0xbb7a[17]]){createJob(_0x4c3dx12[_0xbb7a[41]],_0x4c3dx8,_0x4c3dxa)}});Schedule[_0xbb7a[43]](function(_0x4c3dx12,_0x4c3dx13){updateSchedule(_0x4c3dx12[_0xbb7a[41]],_0x4c3dx8,_0x4c3dxa)});Schedule[_0xbb7a[44]](function(_0x4c3dx12){deleteSchedule(_0x4c3dx12[_0xbb7a[41]],_0x4c3dx8)})} \ No newline at end of file diff --git a/server/config/scheduler/reports.js b/server/config/scheduler/reports.js index 70e212f..458f25c 100644 --- a/server/config/scheduler/reports.js +++ b/server/config/scheduler/reports.js @@ -1,228 +1 @@ -var cp = require('child_process'); -var moment = require('moment'); -require('moment-range'); -var CustomReport = require('../../models').CustomReport; -var DefaultReport = require('../../models').DefaultReport; -var ExtractedReport = require('../../models').ExtractedReport; -var MailAttachment = require('../../models').MailAttachment; -var MailServerOut = require('../../models').MailServerOut; -var MailMessage = require('../../models').MailMessage; -var path = require('path'); -var config = require('../../config/environment'); -var fs = require('fs-extra'); -var _ = require('lodash'); -var ReportTree = require('../../models').ReportTree; - -function Reports() { - console.log('Reports schedules launcher Initialization...'); -} - -Reports.prototype.extractReport = function(schedule, user) { - console.log('Extracting report...'); - extract(schedule, user); -} - -function extract(schedule, user) { - switch (schedule.cronType) { - case 'currentDay': - extractTodayReport(schedule, user); - break; - default: - extractRangeReport(schedule, user); - break; - } -} - -function extractTodayReport(schedule, user) { - console.log('Checking today schedule range validity...'); - if (user || checkValidity(schedule.validityStart, schedule.validityEnd)) { - console.log('The hours range is valid, extracting today report...'); - docExtract(schedule, moment().format('YYYY-MM-DD'), moment().format('YYYY-MM-DD'), user, '00:00', '23:59'); - } else { - console.log('Out of hours range, skipping record extraction!'); - } -} - -function extractRangeReport(schedule, user) { - switch (schedule.reportRange) { - case 'yesterday': - docExtract(schedule, moment().subtract(1, 'days').format('YYYY-MM-DD'), moment().subtract(1, 'days').format('YYYY-MM-DD'), user) - break; - case 'last7': - docExtract(schedule, moment().subtract(7, 'days').format('YYYY-MM-DD'), moment().subtract(1, 'days').format('YYYY-MM-DD'), user) - break; - case 'last30': - docExtract(schedule, moment().subtract(30, 'days').format('YYYY-MM-DD'), moment().subtract(1, 'days').format('YYYY-MM-DD'), user) - break; - case 'lastMonth': - docExtract(schedule, moment().subtract(1, 'months').startOf('month').format('YYYY-MM-DD'), moment().subtract(1, 'months').endOf('month').format('YYYY-MM-DD'), user) - break; - } -} - -function checkValidity(startHour, endHour) { - return moment().range(moment(startHour, "h"), moment(endHour, "h")).contains(moment()); -} - -function getReportPath(folder, tree, path) { - path = folder.text + '/ ' + path; - if (folder.parent === '#') { - return path; - } else { - return getReportPath(_.find(tree, { - id: folder.parent - }), tree, path); - } -} - -function docExtract(schedule, startDate, endDate, user, startTime, endTime) { - // console.log('common docExtract api function'); - var resource = schedule.reportType === 'default' ? DefaultReport : CustomReport; - var report; - resource //DO NOT ADD RETURN CAUSE THE EXTRACTING FUNCTION WILL KEEP EXTRACTING AFTER THE API HAS RETURNED - .scope('fields') - .findById(schedule.reportId) - .then(function(_report) { - if (!_report) { - console.log('Report not found!'); - return; - } - report = _report; - return ReportTree - .findById(schedule.reportType === 'default' ? 1 : 2); - }) - .then(function(tree) { - tree = JSON.parse(tree.tree); - var folder = _.find(tree, { - id: report.parent - }); - var path = getReportPath(folder, tree, report.name); - // console.log('found the report, creating the new DB row for extracted reports..'); - //CREATE A DB ROW IN A TABLE WITH THE REPORT INFO, QUERY DATES, AND THE STATUS 'ELABORATING' - if (schedule.cronType === 'currentDay') { - report.dataValues.table = report.dataValues.table.replace('_history', ''); - } - return [report, ExtractedReport.create({ - name: report.name, - startDate: startDate, - endDate: endDate, - output: schedule.reportOutput, - type: user ? 'manual' : 'scheduled', - UserId: user ? user.id : null - })] - }) - .spread(function(report, extractedReport) { - // console.log('created new extracted reports db entry, calling external extraction function: ' + typeFunction); - var child = cp.fork(__dirname + '/../../utils/report_extraction.js'); - child.on('message', function(data) { - console.log('child message', data); - if (schedule.sendMail && data.status === 'completed') { - sendReportByMail(schedule, extractedReport.id, user, child); - } else { - child.kill(); - } - }).on('close', function() { - console.log('child close'); - }).on('error', function(err) { - console.log('child error', err); - }); - child.send({ - report: report, - query: { - startDate: startDate, - endDate: endDate, - startTime: startTime || null, - endTime: endTime || null - }, - extractedId: extractedReport.id, - user: user ? user : { - role: 'admin' - }, - type: schedule.reportOutput - }); - }) - .catch(function(err) { - console.log('Scheduled report extraction error: ', err); - }); -} - -function sendReportByMail(schedule, extractedId, user, child) { - var _extract; - return ExtractedReport - .findById(extractedId) - .then(function(extract) { - if (!extract) { - console.log('Extracted report not found!'); - return; - } - _extract = extract; - if (schedule.MailServerOut && schedule.MailServerOut.username) { - var attachment = getAttachment(_extract); - var message = { - subject: 'Scheduled Report', - from: [schedule.MailServerOut.username], - to: [schedule.email], - cc: [], - html: null, - text: null, - inReplyTo: null, - status: 'SENDING', - attachment: true, - UserId: user ? user.id : null, //how to get user if sent automatically?? - MailAttachments: [attachment] - }; - return MailMessage - .create(message, { - include: [{ - model: MailAttachment - }] - }) - } else { - throw new Error("No Account or SMTP address configured"); - } - }) - .then(function(mailMessage) { - return _extract.setMailMessage(mailMessage); - }) - .then(function() { - console.log('Scheduled message sent!'); - }) - .catch(function(err) { - console.log('Error sending extracted report by mail!', err); - }) - .finally(function() { - child.kill(); - }); -} - -function getAttachment(extract) { - var oldFile = path.join(config.root, 'server', 'files', 'reports', extract.savename); - var newPath = path.join(config.root, 'server', 'files', 'attachments'); - var newSavename = path.basename(extract.savename, '.' + extract.output.toLowerCase()); - try { - fs.copySync(oldFile, path.join(newPath, newSavename)); - console.log("success!"); - } catch (err) { - console.error('Error getting the extracted report attachment!'); - return null; - } - return { - size: getFilesizeInBytes(oldFile), - path: path.join(newPath, newSavename), - name: extract.name + '_' + moment(extract.startDate).format("DD-MM-YYYY") + '_' + moment(extract.endDate).format("DD-MM-YYYY") + '.' + extract.output.toLowerCase(), - type: 'application/' + extract.output.toLowerCase(), - basename: newSavename - }; -} - -function getFilesizeInBytes(filename) { - try { - var stats = fs.statSync(filename) - var fileSizeInBytes = stats.size; - return fileSizeInBytes - } catch (err) { - return 0; - } -} - -module.exports = Reports; +var _0xe276=["\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x6F\x6D\x65\x6E\x74\x2D\x72\x61\x6E\x67\x65","\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x66\x73\x2D\x65\x78\x74\x72\x61","\x6C\x6F\x64\x61\x73\x68","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x52\x65\x70\x6F\x72\x74\x73\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x73\x20\x6C\x61\x75\x6E\x63\x68\x65\x72\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x78\x74\x72\x61\x63\x74\x52\x65\x70\x6F\x72\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x45\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x2E\x2E\x2E","\x63\x75\x72\x72\x65\x6E\x74\x44\x61\x79","\x63\x72\x6F\x6E\x54\x79\x70\x65","\x43\x68\x65\x63\x6B\x69\x6E\x67\x20\x74\x6F\x64\x61\x79\x20\x73\x63\x68\x65\x64\x75\x6C\x65\x20\x72\x61\x6E\x67\x65\x20\x76\x61\x6C\x69\x64\x69\x74\x79\x2E\x2E\x2E","\x76\x61\x6C\x69\x64\x69\x74\x79\x53\x74\x61\x72\x74","\x76\x61\x6C\x69\x64\x69\x74\x79\x45\x6E\x64","\x54\x68\x65\x20\x68\x6F\x75\x72\x73\x20\x72\x61\x6E\x67\x65\x20\x69\x73\x20\x76\x61\x6C\x69\x64\x2C\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x74\x6F\x64\x61\x79\x20\x72\x65\x70\x6F\x72\x74\x2E\x2E\x2E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44","\x66\x6F\x72\x6D\x61\x74","\x30\x30\x3A\x30\x30","\x32\x33\x3A\x35\x39","\x4F\x75\x74\x20\x6F\x66\x20\x68\x6F\x75\x72\x73\x20\x72\x61\x6E\x67\x65\x2C\x20\x73\x6B\x69\x70\x70\x69\x6E\x67\x20\x72\x65\x63\x6F\x72\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x21","\x64\x61\x79\x73","\x73\x75\x62\x74\x72\x61\x63\x74","\x79\x65\x73\x74\x65\x72\x64\x61\x79","\x6C\x61\x73\x74\x37","\x6C\x61\x73\x74\x33\x30","\x6D\x6F\x6E\x74\x68","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x6F\x6E\x74\x68\x73","\x65\x6E\x64\x4F\x66","\x6C\x61\x73\x74\x4D\x6F\x6E\x74\x68","\x72\x65\x70\x6F\x72\x74\x52\x61\x6E\x67\x65","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x68","\x72\x61\x6E\x67\x65","\x74\x65\x78\x74","\x2F\x20","\x70\x61\x72\x65\x6E\x74","\x23","\x66\x69\x6E\x64","\x72\x65\x70\x6F\x72\x74\x54\x79\x70\x65","\x64\x65\x66\x61\x75\x6C\x74","\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72\x3A\x20","\x63\x61\x74\x63\x68","\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x2E\x6A\x73","\x66\x6F\x72\x6B","\x65\x72\x72\x6F\x72","\x63\x68\x69\x6C\x64\x20\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x63\x68\x69\x6C\x64\x20\x63\x6C\x6F\x73\x65","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x69\x6C\x64\x20\x6D\x65\x73\x73\x61\x67\x65","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x73\x74\x61\x74\x75\x73","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x69\x64","\x6B\x69\x6C\x6C","\x61\x64\x6D\x69\x6E","\x72\x65\x70\x6F\x72\x74\x4F\x75\x74\x70\x75\x74","\x73\x65\x6E\x64","\x73\x70\x72\x65\x61\x64","\x74\x72\x65\x65","\x70\x61\x72\x73\x65","\x6E\x61\x6D\x65","\x74\x61\x62\x6C\x65","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x5F\x68\x69\x73\x74\x6F\x72\x79","","\x72\x65\x70\x6C\x61\x63\x65","\x6D\x61\x6E\x75\x61\x6C","\x73\x63\x68\x65\x64\x75\x6C\x65\x64","\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x52\x65\x70\x6F\x72\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x66\x69\x6E\x64\x42\x79\x49\x64","\x72\x65\x70\x6F\x72\x74\x49\x64","\x66\x69\x65\x6C\x64\x73","\x73\x63\x6F\x70\x65","\x66\x69\x6E\x61\x6C\x6C\x79","\x45\x72\x72\x6F\x72\x20\x73\x65\x6E\x64\x69\x6E\x67\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x62\x79\x20\x6D\x61\x69\x6C\x21","\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x73\x65\x6E\x74\x21","\x73\x65\x74\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x53\x63\x68\x65\x64\x75\x6C\x65\x64\x20\x52\x65\x70\x6F\x72\x74","\x65\x6D\x61\x69\x6C","\x53\x45\x4E\x44\x49\x4E\x47","\x4E\x6F\x20\x41\x63\x63\x6F\x75\x6E\x74\x20\x6F\x72\x20\x53\x4D\x54\x50\x20\x61\x64\x64\x72\x65\x73\x73\x20\x63\x6F\x6E\x66\x69\x67\x75\x72\x65\x64","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x72\x65\x70\x6F\x72\x74\x73","\x73\x61\x76\x65\x6E\x61\x6D\x65","\x6A\x6F\x69\x6E","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x2E","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x6F\x75\x74\x70\x75\x74","\x62\x61\x73\x65\x6E\x61\x6D\x65","\x63\x6F\x70\x79\x53\x79\x6E\x63","\x73\x75\x63\x63\x65\x73\x73\x21","\x45\x72\x72\x6F\x72\x20\x67\x65\x74\x74\x69\x6E\x67\x20\x74\x68\x65\x20\x65\x78\x74\x72\x61\x63\x74\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x21","\x5F","\x44\x44\x2D\x4D\x4D\x2D\x59\x59\x59\x59","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F","\x73\x74\x61\x74\x53\x79\x6E\x63","\x73\x69\x7A\x65","\x65\x78\x70\x6F\x72\x74\x73"];var cp=require(_0xe276[0]);var moment=require(_0xe276[1]);require(_0xe276[2]);var CustomReport=require(_0xe276[4])[_0xe276[3]];var DefaultReport=require(_0xe276[4])[_0xe276[5]];var ExtractedReport=require(_0xe276[4])[_0xe276[6]];var MailAttachment=require(_0xe276[4])[_0xe276[7]];var MailServerOut=require(_0xe276[4])[_0xe276[8]];var MailMessage=require(_0xe276[4])[_0xe276[9]];var path=require(_0xe276[10]);var config=require(_0xe276[11]);var fs=require(_0xe276[12]);var _=require(_0xe276[13]);var ReportTree=require(_0xe276[4])[_0xe276[14]];function Reports(){console[_0xe276[16]](_0xe276[15])}Reports[_0xe276[18]][_0xe276[17]]= function(_0x39d7xf,_0x39d7x10){console[_0xe276[16]](_0xe276[19]);extract(_0x39d7xf,_0x39d7x10)};function extract(_0x39d7xf,_0x39d7x10){switch(_0x39d7xf[_0xe276[21]]){case _0xe276[20]:extractTodayReport(_0x39d7xf,_0x39d7x10);break;default:extractRangeReport(_0x39d7xf,_0x39d7x10);break}}function extractTodayReport(_0x39d7xf,_0x39d7x10){console[_0xe276[16]](_0xe276[22]);if(_0x39d7x10|| checkValidity(_0x39d7xf[_0xe276[23]],_0x39d7xf[_0xe276[24]])){console[_0xe276[16]](_0xe276[25]);docExtract(_0x39d7xf,moment()[_0xe276[27]](_0xe276[26]),moment()[_0xe276[27]](_0xe276[26]),_0x39d7x10,_0xe276[28],_0xe276[29])}else {console[_0xe276[16]](_0xe276[30])}}function extractRangeReport(_0x39d7xf,_0x39d7x10){switch(_0x39d7xf[_0xe276[41]]){case _0xe276[33]:docExtract(_0x39d7xf,moment()[_0xe276[32]](1,_0xe276[31])[_0xe276[27]](_0xe276[26]),moment()[_0xe276[32]](1,_0xe276[31])[_0xe276[27]](_0xe276[26]),_0x39d7x10);break;case _0xe276[34]:docExtract(_0x39d7xf,moment()[_0xe276[32]](7,_0xe276[31])[_0xe276[27]](_0xe276[26]),moment()[_0xe276[32]](1,_0xe276[31])[_0xe276[27]](_0xe276[26]),_0x39d7x10);break;case _0xe276[35]:docExtract(_0x39d7xf,moment()[_0xe276[32]](30,_0xe276[31])[_0xe276[27]](_0xe276[26]),moment()[_0xe276[32]](1,_0xe276[31])[_0xe276[27]](_0xe276[26]),_0x39d7x10);break;case _0xe276[40]:docExtract(_0x39d7xf,moment()[_0xe276[32]](1,_0xe276[38])[_0xe276[37]](_0xe276[36])[_0xe276[27]](_0xe276[26]),moment()[_0xe276[32]](1,_0xe276[38])[_0xe276[39]](_0xe276[36])[_0xe276[27]](_0xe276[26]),_0x39d7x10);break}}function checkValidity(_0x39d7x15,_0x39d7x16){return moment()[_0xe276[44]](moment(_0x39d7x15,_0xe276[43]),moment(_0x39d7x16,_0xe276[43]))[_0xe276[42]](moment())}function getReportPath(_0x39d7x18,_0x39d7x19,path){path= _0x39d7x18[_0xe276[45]]+ _0xe276[46]+ path;if(_0x39d7x18[_0xe276[47]]=== _0xe276[48]){return path}else {return getReportPath(_[_0xe276[49]](_0x39d7x19,{id:_0x39d7x18[_0xe276[47]]}),_0x39d7x19,path)}}function docExtract(_0x39d7xf,_0x39d7x1b,_0x39d7x1c,_0x39d7x10,_0x39d7x1d,_0x39d7x1e){var _0x39d7x1f=_0x39d7xf[_0xe276[50]]=== _0xe276[51]?DefaultReport:CustomReport;var _0x39d7x20;_0x39d7x1f[_0xe276[88]](_0xe276[87])[_0xe276[85]](_0x39d7xf[_0xe276[86]])[_0xe276[83]](function(_0x39d7x25){if(!_0x39d7x25){console[_0xe276[16]](_0xe276[84]);return};_0x39d7x20= _0x39d7x25;return ReportTree[_0xe276[85]](_0x39d7xf[_0xe276[50]]=== _0xe276[51]?1:2)})[_0xe276[83]](function(_0x39d7x19){_0x39d7x19= JSON[_0xe276[73]](_0x39d7x19[_0xe276[72]]);var _0x39d7x18=_[_0xe276[49]](_0x39d7x19,{id:_0x39d7x20[_0xe276[47]]});var path=getReportPath(_0x39d7x18,_0x39d7x19,_0x39d7x20[_0xe276[74]]);if(_0x39d7xf[_0xe276[21]]=== _0xe276[20]){_0x39d7x20[_0xe276[76]][_0xe276[75]]= _0x39d7x20[_0xe276[76]][_0xe276[75]][_0xe276[79]](_0xe276[77],_0xe276[78])};return [_0x39d7x20,ExtractedReport[_0xe276[82]]({name:_0x39d7x20[_0xe276[74]],startDate:_0x39d7x1b,endDate:_0x39d7x1c,output:_0x39d7xf[_0xe276[69]],type:_0x39d7x10?_0xe276[80]:_0xe276[81],UserId:_0x39d7x10?_0x39d7x10[_0xe276[66]]:null})]})[_0xe276[71]](function(_0x39d7x20,_0x39d7x22){var _0x39d7x23=cp[_0xe276[55]](__dirname+ _0xe276[54]);_0x39d7x23[_0xe276[58]](_0xe276[61],function(_0x39d7x24){console[_0xe276[16]](_0xe276[62],_0x39d7x24);if(_0x39d7xf[_0xe276[63]]&& _0x39d7x24[_0xe276[64]]=== _0xe276[65]){sendReportByMail(_0x39d7xf,_0x39d7x22[_0xe276[66]],_0x39d7x10,_0x39d7x23)}else {_0x39d7x23[_0xe276[67]]()}})[_0xe276[58]](_0xe276[59],function(){console[_0xe276[16]](_0xe276[60])})[_0xe276[58]](_0xe276[56],function(_0x39d7x21){console[_0xe276[16]](_0xe276[57],_0x39d7x21)});_0x39d7x23[_0xe276[70]]({report:_0x39d7x20,query:{startDate:_0x39d7x1b,endDate:_0x39d7x1c,startTime:_0x39d7x1d|| null,endTime:_0x39d7x1e|| null},extractedId:_0x39d7x22[_0xe276[66]],user:_0x39d7x10?_0x39d7x10:{role:_0xe276[68]},type:_0x39d7xf[_0xe276[69]]})})[_0xe276[53]](function(_0x39d7x21){console[_0xe276[16]](_0xe276[52],_0x39d7x21)})}function sendReportByMail(_0x39d7xf,_0x39d7x27,_0x39d7x10,_0x39d7x23){var _0x39d7x28;return ExtractedReport[_0xe276[85]](_0x39d7x27)[_0xe276[83]](function(extract){if(!extract){console[_0xe276[16]](_0xe276[93]);return};_0x39d7x28= extract;if(_0x39d7xf[_0xe276[8]]&& _0x39d7xf[_0xe276[8]][_0xe276[94]]){var _0x39d7x2a=getAttachment(_0x39d7x28);var _0x39d7x2b={subject:_0xe276[95],from:[_0x39d7xf[_0xe276[8]][_0xe276[94]]],to:[_0x39d7xf[_0xe276[96]]],cc:[],html:null,text:null,inReplyTo:null,status:_0xe276[97],attachment:true,UserId:_0x39d7x10?_0x39d7x10[_0xe276[66]]:null,MailAttachments:[_0x39d7x2a]};return MailMessage[_0xe276[82]](_0x39d7x2b,{include:[{model:MailAttachment}]})}else {throw new Error(_0xe276[98])}})[_0xe276[83]](function(_0x39d7x29){return _0x39d7x28[_0xe276[92]](_0x39d7x29)})[_0xe276[83]](function(){console[_0xe276[16]](_0xe276[91])})[_0xe276[53]](function(_0x39d7x21){console[_0xe276[16]](_0xe276[90],_0x39d7x21)})[_0xe276[89]](function(){_0x39d7x23[_0xe276[67]]()})}function getAttachment(extract){var _0x39d7x2d=path[_0xe276[104]](config[_0xe276[99]],_0xe276[100],_0xe276[101],_0xe276[102],extract[_0xe276[103]]);var _0x39d7x2e=path[_0xe276[104]](config[_0xe276[99]],_0xe276[100],_0xe276[101],_0xe276[105]);var _0x39d7x2f=path[_0xe276[109]](extract[_0xe276[103]],_0xe276[106]+ extract[_0xe276[108]][_0xe276[107]]());try{fs[_0xe276[110]](_0x39d7x2d,path[_0xe276[104]](_0x39d7x2e,_0x39d7x2f));console[_0xe276[16]](_0xe276[111])}catch(err){console[_0xe276[56]](_0xe276[112]);return null};return {size:getFilesizeInBytes(_0x39d7x2d),path:path[_0xe276[104]](_0x39d7x2e,_0x39d7x2f),name:extract[_0xe276[74]]+ _0xe276[113]+ moment(extract[_0xe276[115]])[_0xe276[27]](_0xe276[114])+ _0xe276[113]+ moment(extract[_0xe276[116]])[_0xe276[27]](_0xe276[114])+ _0xe276[106]+ extract[_0xe276[108]][_0xe276[107]](),type:_0xe276[117]+ extract[_0xe276[108]][_0xe276[107]](),basename:_0x39d7x2f}}function getFilesizeInBytes(_0x39d7x31){try{var _0x39d7x32=fs[_0xe276[118]](_0x39d7x31);var _0x39d7x33=_0x39d7x32[_0xe276[119]];return _0x39d7x33}catch(err){return 0}}module[_0xe276[120]]= Reports \ No newline at end of file diff --git a/server/config/seed.js b/server/config/seed.js index 33e666d..e58dd20 100644 --- a/server/config/seed.js +++ b/server/config/seed.js @@ -1,3957 +1 @@ -/** - * Populate DB with sample data on server start - * to disable, edit config/environment/index.js, and set `seedDB: false` - */ -'use strict'; - -var _ = require('lodash'); -var models = require('../models'); -var sequelize = require('../models').sequelize; - -models.User.bulkCreate([{ - provider: 'local', - role: 'agent', - fullname: 'Giuseppe Careri', - email: 'giuseppe.careri@xcally.com', - name: 'giuseppe.careri', - password: '75xcally75', - defaultuser: 'giuseppe.careri', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1000 -}, { - provider: 'local', - role: 'agent', - fullname: 'Daniele Cinti', - email: 'daniele.cinti@xcally.com', - name: 'daniele.cinti', - password: '75xcally75', - defaultuser: 'daniele.cinti', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1001 -}, { - provider: 'local', - role: 'agent', - fullname: 'Andrea Bianco', - email: 'andrea.bianco@xcally.com', - name: 'andrea.bianco', - password: '75xcally75', - defaultuser: 'andrea.bianco', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1002 -}, { - provider: 'local', - role: 'agent', - fullname: 'Massimiliano Bungaro', - email: 'massimiliano.bungaro@xcally.com', - name: 'massimiliano.bungaro', - password: '75xcally75', - defaultuser: 'massimiliano.bungaro', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1003 -}, { - provider: 'local', - role: 'agent', - fullname: 'Valerio Ciotta', - email: 'valerio.ciotta@xcally.com', - name: 'valerio.ciotta', - password: '75xcally75', - defaultuser: 'valerio.ciotta', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1004 -}, { - provider: 'local', - role: 'admin', - fullname: 'Clarotech', - email: 'clarotech@xcally.com', - name: 'clarotech', - password: 'clarotech', - defaultuser: 'clarotech', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1005 -}, { - provider: 'local', - role: 'agent', - fullname: 'Abigael', - email: 'abigael@xcally.com', - name: 'abigael', - password: '75xcally75', - defaultuser: 'abigael', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1006 -}, { - provider: 'local', - role: 'agent', - fullname: 'Tony Russell', - email: 'tonyr@xclarotech.co.za', - name: 'tony.russell', - password: 'clarotech', - defaultuser: 'tony.russell', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1007 -}, { - provider: 'local', - role: 'agent', - fullname: 'Colin Fair', - email: 'colinf@xclarotech.co.za', - name: 'colin.fair', - password: 'clarotech', - defaultuser: 'colin.fair', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1008 -}, { - provider: 'local', - role: 'agent', - fullname: 'Diego Gosmar', - email: 'diego.gosmar@xcally.com', - name: 'diego.gosmar', - password: '75xcally75', - defaultuser: 'diego.gosmar', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1009 -}, { - provider: 'local', - role: 'agent', - fullname: 'Giuseppe Innamorato', - email: 'giuseppe.innamorato@xcally.com', - name: 'giuseppe.innamorato', - password: '75xcally75', - defaultuser: 'giuseppe.innamorato', - host: 'dynamic', - type: 'FRIEND', - transport: 'upd', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1010 -}, { - provider: 'local', - role: 'agent', - fullname: 'Alessandra Bessone', - email: 'alessandra.bessone@xcally.com', - name: 'alessandra.bessone', - password: '75xcally75', - defaultuser: 'alessandra.bessone', - host: 'dynamic', - type: 'FRIEND', - transport: 'upd', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1011 -}, { - provider: 'local', - role: 'agent', - fullname: 'Felice Briscese', - email: 'felice.briscese@xcally.com', - name: 'felice.briscese', - password: '75xcally75', - defaultuser: 'felice.briscese', - host: 'dynamic', - type: 'FRIEND', - transport: 'upd', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1012 -}, { - provider: 'local', - role: 'admin', - fullname: 'xCally', - email: 'info.xcally@xcally.com', - name: 'xcally', - password: '388xshuttle388', - defaultuser: 'xcally', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1013 -}, { - provider: 'local', - role: 'agent', - fullname: 'John Doe', - email: 'john.doe@gmail.com', - name: 'john.doe', - password: '75xcally75', - defaultuser: 'john.doe', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1014 -}, { - provider: 'local', - role: 'agent', - fullname: 'Jane Miller', - email: 'jane.miller@gmail.com', - name: 'jane.miller', - password: '75xcally75', - defaultuser: 'jane.miller', - host: 'dynamic', - type: 'FRIEND', - transport: 'udp', - allow: 'alaw;ulaw;gsm', - qualify: 'yes', - nat: 'force_rport,comedia', - disallow: 'all', - context: 'from-sip', - internal: 1015 -}], { - ignoreDuplicates: true, - individualHooks: true -}).then(function() { - console.log('Finished populating users'); -}); - -models.Trunk.bulkCreate([{ - name: 'citalia', - type: 'friend', - insecure: 'port,invite', - defaultuser: '01119827770', - secret: 'T!NPnv-qjCMe9v', - password: 'T!NPnv-qjCMe9v', - context: 'from-voip-provider', - language: 'it', - host: 'voip.eutelia.it', - fromdomain: 'voip.eutelia.it', - dtmfmode: 'rfc2833', - qualify: 'yes', - nat: 'force_rport,comedia', - callerid: ' "" <>', - limitonpeers: 'yes', - callcounter: 'yes', - disallow: 'all', - allow: 'ulaw;alaw;gsm', - canreinvite: 'no', - directmedia: 'no' -}], { - ignoreDuplicates: true, - individualHooks: true -}).then(function() { - console.log('Finished populating trunks'); -}); - -// Init modules table -var newModules = [{ - id: 1, - name: "dashboard", - title: "APPLICATION_DASHBOARD", - ModuleId: null, - path: '/dashboard/voice' -}, { - id: 2, - name: "yourdashboards", - title: "APPLICATION_YOUR_DASHBOARDS", - ModuleId: null, - path: '/tools/yourdashboards/show/1' -}, { - id: 3, - name: "staff", - title: "APPLICATION_STAFF", - ModuleId: null, - path: '/staff/agents/list' -}, { - id: 4, - name: "agents", - title: "APPLICATION_AGENTS", - ModuleId: 3, - path: '/staff/agents/list' -}, { - id: 5, - name: "contactmanager", - title: "APPLICATION_CONTACT_MANAGER", - ModuleId: null, - path: '/contactmanager/contacts/list' -}, { - id: 6, - name: "channels", - title: "APPLICATION_CHANNELS", - ModuleId: null, - path: '/channels/voice/queues/list' -}, { - id: 7, - name: "voice", - title: "APPLICATION_VOICE", - ModuleId: 6, - path: '/channels/voice/queues/list' -}, { - id: 8, - name: "chat", - title: "APPLICATION_CHAT", - ModuleId: 6, - path: '/channels/chat/websites/list' -}, { - id: 9, - name: "mail", - title: "APPLICATION_MAIL", - ModuleId: 6, - path: '/channels/mail/accounts/list' -}, { - id: 10, - name: "fax", - title: "APPLICATION_FAX", - ModuleId: 6, - path: '/channels/fax/accounts/list' -}, { - id: 11, - name: "sms", - title: "APPLICATION_SMS", - ModuleId: 6, - path: '/channels/sms/accounts/list' -}, { - id: 12, - name: "realtime", - title: "APPLICATION_REALTIME", - ModuleId: 6, - path: '/channels/realtime/view/agents' -}, { - id: 13, - name: "tools", - title: "APPLICATION_TOOLS", - ModuleId: null, - path: '/tools/triggers/list' -}, { - id: 14, - name: "square", - title: "APPLICATION_CALLYSQUARE", - ModuleId: null, - path: '/square/projects/list' -}, { - id: 15, - name: "jscripty", - title: "APPLICATION_JSCRIPTY", - ModuleId: null, - path: '/jscripty/projects/list' -}, { - id: 16, - name: "motiondialer", - title: "APPLICATION_MOTION_DIALER", - ModuleId: null, - path: '/motiondialer/lists/list' -}, { - id: 17, - name: "analytics", - title: "APPLICATION_ANALYTICS", - ModuleId: null, - path: '/analytics/reports/list' -}, { - id: 18, - name: "setting", - title: "APPLICATION_SETTINGS", - ModuleId: null, - path: '/setting/updates/list' -}, { - id: 19, - name: "integration", - title: "APPLICATION_INTEGRATION", - ModuleId: null, - path: '/market' -}, { - id: 20, - name: "openchannel", - title: "APPLICATION_OPEN_CHANNEL", - ModuleId: 6, - path: '/channels/openchannel/accounts/list' -}]; - -models.Module.findAll().then(function(oldModules) { - var bulkModules = []; - oldModules = _.map(oldModules, 'id'); - newModules.forEach(function(module) { - if (_.includes(oldModules, module.id)) { - bulkModules.push(models.Module.update(module, { - where: { - id: module.id - } - })); - } else { - bulkModules.push(models.Module.create(module)); - } - }); - return bulkModules; -}).all().then(function() { - console.log('Finished populating modules'); -}).catch(function(err) { - console.log('Error populating modules:', err); -}); - -models.Team.create({ - name: "T1", - description: "Default Team", - defaultEntry: true -}).then(function(team) { - models.User.findAll({ - where: { - role: 'agent' - } - }).then(function(users) { - team.addUsers(_.map(users, 'id')).then(function() { - models.ChatQueue.create({ - name: "CQ1", - description: "CQ1 Desc", - timeout: 5, - strategy: "rrmemory" - }).then(function(chatQueue) { - console.log('Finished populating chat queue 1'); - models.Team.findOne({ - where: { - name: 'T1' - }, - include: [{ - all: true - }] - }).then(function(team) { - chatQueue.addUsers(_.map(team.Users, 'id')).catch(function(err) { - // console.error(err); - }); - }).catch(function(err) { - // console.error(err); - }); - }); - models.MailQueue.create({ - name: "MQ1", - description: "MQ1 Desc", - timeout: 5, - strategy: "rrmemory" - }).then(function(mailQueue) { - console.log('Finished populating mail queue 1'); - models.Team.findOne({ - where: { - name: 'T1' - }, - include: [{ - all: true - }] - }).then(function(team) { - if (team) { - console.log('team found'); - } else { - console.log('test'); - } - mailQueue.addUsers(_.map(team.Users, 'id')).catch(function(err) { - // console.error(err); - }); - }).catch(function(err) { - // console.error(err); - }); - }); - models.FaxQueue.create({ - name: "FQ1", - description: "FQ1 Desc", - timeout: 5, - strategy: "rrmemory" - }).then(function(faxQueue) { - console.log('Finished populating fax queue 1'); - models.Team.findOne({ - where: { - name: 'T1' - }, - include: [{ - all: true - }] - }).then(function(team) { - faxQueue.addUsers(_.map(team.Users, 'id')).catch(function(err) { - // console.error(err); - }); - }).catch(function(err) { - // console.error(err); - }); - }); - }).catch(function(err) { - // console.error(err); - }); - }).catch(function(err) { - // console.error(err); - }); -}).catch(function(err) { - // console.error(err); -}); - -models.MailAccount.create({ - name: "xCally Development", - description: "xCally Development", - address: "development@xcally.com" -}).then(function(mailAccount) { - console.log('Finished populating mail account'); - models.MailServerIn.create({ - description: 'xcally', - host: 'imap.xcally.com', - username: 'development@xcally.com', - password: 'phokucloka', - port: 143, - mailbox: 'INBOX', - ssl: false, - delete: false, - filter: 'UNSEEN', - protocol: 'IMAP', - MailAccountId: mailAccount.id - }).then(function() { - console.log('Finished populating mail server in'); - models.MailServerOut.create({ - description: 'xcally', - host: 'smtp.xcally.com', - username: 'development@xcally.com', - password: 'phokucloka', - port: 587, - ssl: false, - MailAccountId: mailAccount.id - }).then(function() { - console.log('Finished populating mail server out'); - }).catch(function(err) { - // console.error(err); - }); - }).catch(function(err) { - // console.error(err); - }); -}); -// models.FaxAccount -// .create({ -// description: 'FA1 Desc', -// name: 'FA1', -// phone: '01119827770', -// ecm: true, -// faxheader: 'xCALLY', -// localid: '01119827770', -// maxrate: '9600', -// minrate: '14400', -// }) -// .then(function(faxAccount) { -// console.log('Finished populating fax account'); -// -// models.Trunk -// .findOne({ -// where: { -// name: 'citalia' -// } -// }) -// .then(function(trunk) { -// faxAccount -// .setTrunk(trunk) -// .catch(function(err) { -// // console.error(err); -// }); -// -// -// models.VoiceExtension -// .create({ -// context: 'from-voip-provider', -// exten: '01119827770', -// priority: 1, -// app: 'Goto', -// appdata: 'inbound-fax,s,1', -// type: 'inbound-fax' -// }) -// -// }) -// .catch(function(err) { -// // console.error(err); -// }); -// -// models.FaxQueue -// .findAll() -// .then(function(faxQueues) { -// models.FaxApplication -// .create({ -// app: 'queue', -// appdata: faxQueues[0].id, -// priority: 1, -// timeout: 30, -// FaxAccountId: faxAccount.id, -// FaxQueueId: faxQueues[0].id -// }) -// .then(function() { -// console.log('Finished populating chat website application 1'); -// }) -// .catch(function(err) { -// // console.error(err); -// }); -// -// models.FaxApplication -// .create({ -// app: 'queue', -// appdata: faxQueues[1].id, -// priority: 2, -// timeout: 30, -// FaxAccountId: faxAccount.id, -// FaxQueueId: faxQueues[1].id -// }) -// .then(function() { -// console.log('Finished populating chat website application 2'); -// }) -// .catch(function(err) { -// // console.error(err); -// }); -// }) -// .catch(function(err) { -// // console.error(err); -// }); -// }) -// .catch(function(err) { -// // console.error(err); -// }); -// models.FaxAccount -// .create({ -// description: 'FA1 Desc', -// name: 'FA1', -// phone: '01119827770', -// ecm: true, -// faxheader: 'xCALLY', -// localid: '01119827770', -// maxrate: '9600', -// minrate: '14400', -// }) -// .then(function (faxAccount) { -// console.log('Finished populating fax account'); -// -// models.Trunk -// .findOne({ -// where: { -// name: 'citalia' -// } -// }) -// .then(function (trunk) { -// faxAccount -// .setTrunk(trunk) -// .catch(function (err) { -// // console.error(err); -// }); -// -// -// models.VoiceExtension -// .create({ -// context: 'from-voip-provider', -// exten: '01119827770', -// priority: 1, -// app: 'Goto', -// appdata: 'inbound-fax,s,1', -// type: 'inbound-fax', -// TrunkId: trunk.name -// }) -// -// }) -// .catch(function (err) { -// // console.error(err); -// }); -// -// models.FaxQueue -// .findAll() -// .then(function (faxQueues) { -// models.FaxApplication -// .create({ -// app: 'queue', -// appdata: faxQueues[0].id, -// priority: 1, -// timeout: 30, -// FaxAccountId: faxAccount.id, -// FaxQueueId: faxQueues[0].id -// }) -// .then(function () { -// console.log('Finished populating chat website application 1'); -// }) -// .catch(function (err) { -// // console.error(err); -// }); -// -// models.FaxApplication -// .create({ -// app: 'queue', -// appdata: faxQueues[1].id, -// priority: 2, -// timeout: 30, -// FaxAccountId: faxAccount.id, -// FaxQueueId: faxQueues[1].id -// }) -// .then(function () { -// console.log('Finished populating chat website application 2'); -// }) -// .catch(function (err) { -// // console.error(err); -// }); -// }) -// .catch(function (err) { -// // console.error(err); -// }); -// }) -// .catch(function (err) { -// // console.error(err); -// }); -// models.VoiceExtension -// .bulkCreate([{ -// context: 'outbound-fax', -// exten: 's', -// priority: 1, -// app: 'NoOp', -// appdata: 'Fax UUID: ${FAXUUID}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 's', -// priority: 2, -// app: 'UserEvent', -// appdata: 'Fax,uuid: ${FAXUUID}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 's', -// priority: 3, -// app: 'Set', -// appdata: 'FAXOPT(filename):${FAXFILE}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 's', -// priority: 4, -// app: 'Set', -// appdata: 'FAXOPT(ecm):${ECM}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 's', -// priority: 5, -// app: 'Set', -// appdata: 'FAXOPT(headerinfo):${FAXHEADER}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 's', -// priority: 6, -// app: 'Set', -// appdata: 'FAXOPT(localstationid):${LOCALID}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 's', -// priority: 7, -// app: 'Set', -// appdata: 'FAXOPT(maxrate):${MAXRATE}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 's', -// priority: 8, -// app: 'Set', -// appdata: 'FAXOPT(minrate):${MINRATE}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 's', -// priority: 9, -// app: 'SendFAX', -// appdata: '${FAXFILE},d', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 's', -// priority: 10, -// app: 'NoOp', -// appdata: 'ERROR "${TIMESTAMP}" "NO_STATUS" "NO_PAGES"', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 'h', -// priority: 1, -// app: 'NoOp', -// appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 'h', -// priority: 2, -// app: 'NoOp', -// appdata: 'FaxStatus : ${FAXSTATUS}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 'h', -// priority: 3, -// app: 'NoOp', -// appdata: 'FaxStatusString : ${FAXSTATUSSTRING}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 'h', -// priority: 4, -// app: 'NoOp', -// appdata: 'FaxError : ${FAXERROR}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 'h', -// priority: 5, -// app: 'NoOp', -// appdata: 'RemoteStationID : ${REMOTESTATIONID}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 'h', -// priority: 6, -// app: 'NoOp', -// appdata: 'FaxPages : ${FAXPAGES}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 'h', -// priority: 7, -// app: 'NoOp', -// appdata: 'FaxBitRate : ${FAXBITRATE}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 'h', -// priority: 8, -// app: 'NoOp', -// appdata: 'FaxResolution : ${FAXRESOLUTION}', -// type: 'outbound-fax' -// }, { -// context: 'outbound-fax', -// exten: 'h', -// priority: 9, -// app: 'NoOp', -// appdata: 'OK "${TIMESTAMP}" "${FAXSTATUSSTRING}" "${FAXPAGES}"', -// type: 'outbound-fax' -// }], { -// ignoreDuplicates: true -// }) -// .then(function() { -// console.log('Finished populating fax outbound voice extension'); -// }); -// -// models.VoiceExtension -// .bulkCreate([{ -// context: 'inbound-fax', -// exten: 's', -// priority: 1, -// app: 'NoOp', -// appdata: '**** FAX RECEIVED from ${CALLERID(num)} ${STRFTIME(${EPOCH},,%c)} ****', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 2, -// app: 'Set', -// appdata: 'FAXOPT(ecm):yes', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 3, -// app: 'Set', -// appdata: 'FILENAME:${UNIQUEID}', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 4, -// app: 'Set', -// appdata: 'FAXFILE:${FILENAME}.tif', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 5, -// app: 'Set', -// appdata: 'FAXOPT(headerinfo):Received by XeniaLAB ${STRFTIME(${EPOCH},,%Y-%m-%d %H:%M)}', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 6, -// app: 'Set', -// appdata: 'FAXOPT(localstationid):${LOCALID}', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 7, -// app: 'Set', -// appdata: 'FAXOPT(maxrate):${MAXRATE}', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 8, -// app: 'Set', -// appdata: 'FAXOPT(minrate):${MINRATE}', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 9, -// app: 'NoOp', -// appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 10, -// app: 'NoOp', -// appdata: 'FAXOPT(headerinfo) : ${FAXOPT(headerinfo)}', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 11, -// app: 'NoOp', -// appdata: 'FAXOPT(localstationid) : ${FAXOPT(localstationid)}', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 12, -// app: 'NoOp', -// appdata: 'FAXOPT(maxrate) : ${FAXOPT(maxrate)}', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 13, -// app: 'NoOp', -// appdata: 'FAXOPT(minrate) : ${FAXOPT(minrate)}', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 14, -// app: 'NoOp', -// appdata: '**** RECEIVING FAX : ${FAXFILE} ****', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 15, -// app: 'ReceiveFax', -// appdata: '/tmp/${FAXFILE}', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 's', -// priority: 16, -// app: 'Hangup', -// type: 'inbound-fax' -// }, { -// context: 'inbound-fax', -// exten: 'h', -// priority: 1, -// app: 'NoOp', -// appdata: 'FAXOPT(ecm) : ${FAXOPT(ecm)}', -// type: 'inbound-fax' -// }], { -// ignoreDuplicates: true -// }) -// .then(function() { -// console.log('Finished populating fax outbound voice extension'); -// }); - -models.SquareProject.bulkCreate([{ - name: "project1", - description: "description project" -}], { - ignoreDuplicates: true -}).then(function() { - console.log('Finished populating square projects'); -}); - -models.ChatWebsite.create({ - name: 'xCally Shop', - description: 'xCally Shop', - address: 'http://www.xcally.com/shop/', - color: '#f51111', - color_focus: '#f51111', - color_button: '#f51111', - remote: 'http://localhost:9000', - animation: true, - header_shape: 'squared', - header_online: 'We are here!', - online_message: 'Questions? Insert your name and email address to start a live-chat with our support team.', - username_placeholder: 'Your name', - email_placeholder: 'Your email address', - start_chat_button: 'Chat', - header_offline: 'Contact us', - offline_message: "We're not online.
It doesn't mean we're not there to help - leave your message below and we'll be in touch as soon as possible.'", - enquiry_message_placeholder: 'Your message...', - enquiry_button: 'Leave message', - download_transcript: true -}).then(function(chatWebsite) { - console.log('Finished populating chat website'); - models.ChatQueue.findAll().then(function(chatQueues) { - models.ChatApplication.create({ - app: 'queue', - appdata: chatQueues[0].id, - priority: 1, - timeout: 30, - ChatWebsiteId: chatWebsite.id, - ChatQueueId: chatQueues[0].id - }).then(function() { - console.log('Finished populating chat website application 1'); - }).catch(function(err) { - // console.error(err); - }); - models.ChatApplication.create({ - app: 'queue', - appdata: chatQueues[1].id, - priority: 2, - timeout: 30, - ChatWebsiteId: chatWebsite.id, - ChatQueueId: chatQueues[1].id - }).then(function() { - console.log('Finished populating chat website application 2'); - }).catch(function(err) { - // console.error(err); - }); - }).catch(function(err) { - // console.error(err); - }); -}).catch(function(err) { - // console.error(err); -}); - -models.Variable.bulkCreate([{ - name: "variable1", - description: "description project" -}], { - ignoreDuplicates: true -}).then(function() { - console.log('Finished populating variables'); -}); - -models.VoiceContext.bulkCreate([{ - name: "from-sip", - description: "Default context (DO NOT DELETE)", - defaultEntry: true -}, { - name: "from-voip-provider", - description: "Default context (DO NOT DELETE)", - defaultEntry: true -}, { - name: "inbound-fax", - description: "Default context (DO NOT DELETE)", - defaultEntry: true -}, { - name: "outbound-fax", - description: "Default context (DO NOT DELETE)", - defaultEntry: true -}, { - name: "from-voicemail", - description: "Default context (DO NOT DELETE)", - defaultEntry: true -}], { - ignoreDuplicates: true, - individualHooks: true -}).then(function() { - console.log('Finished populating context variables'); -}); - -models.VoiceMusicOnHold.bulkCreate([{ - name: "default", - mode: "files", - directory: 'var/lib/asterisk/moh', - sort: 'alpha', - format: 'wav', - defaultEntry: true -}], { - ignoreDuplicates: true, - individualHooks: true -}).then(function() { - console.log('Finished populating moh variables'); -}); - -models.Setting.bulkCreate([{ - id: 1, - min_internal: 1000, - soundPath: '/var/opt/motion/server/files/sounds/converted' -}], { - ignoreDuplicates: true, - individualHooks: true -}).then(function() { - console.log('Finished populating moh variables'); -}); - -models.Dashboard.bulkCreate([{ - id: 1, - name: 'Motion Dashboard', - model: JSON.stringify({ - title: 'Motion Dashboard', - rows: [{ - columns: [{ - styleClass: 'col-md-4', - widgets: [{ - type: 'clock', - title: 'Clock', - config: { - timePattern: 'hh:mm:ss a', - datePattern: 'dddd, MMMM Do YYYY' - } - }] - }, { - styleClass: 'col-md-8', - widgets: [{ - type: 'iframe', - title: 'Iframe', - config: { - url: 'https://demo.xcally.com/shop/' - } - }] - }] - }] - }), - defaultEntry: true, - editable: false -}], { - ignoreDuplicates: true, - individualHooks: true -}).then(function() { - console.log('Finished populating moh variables'); -}); - -var newIntegrations = [{ - name: 'Zendesk', - version: '1.0.0', - author: 'XeniaLAB s.r.l.', - logo: 'assets/images/media/zendesk2.png', - state: 'zendesk', - description: 'Start using xCALLY - Zendesk integration: Auto-Generated Tickets, fully customizable comments, Custom Fields management, Tag support and Simple Setup', - link: 'https://wiki.xcallymotion.com/display/XMD/Zendesk+integration' -}, { - name: 'Salesforce', - version: '1.0.0', - author: 'XeniaLAB s.r.l.', - logo: 'assets/images/media/salesforce2.png', - state: 'salesforce', - description: 'Start using xCALLY - Salesforce integration: Auto-Generated Tasks, fully customizable comments, Custom Fields management and OpenCTI support', - link: 'https://wiki.xcallymotion.com/display/XMD/Salesforce+integration' -}, { - name: 'iFrame', - version: '1.0.0', - author: 'XeniaLAB s.r.l.', - logo: 'assets/images/media/iframe.png', - state: 'iframe', - description: 'Start using iFrame integration: enable your agents to view external pages (like your CRM) directly from Motion GUI', - link: 'https://wiki.xcallymotion.com/display/XMD/iFrame+Integration' -}, { - name: 'Desk.com', - version: '1.0.0', - author: 'XeniaLAB s.r.l.', - logo: 'assets/images/media/desk2.png', - state: 'desk', - description: 'Description for Desk.com asdnvlsdbjv saeklbvqwoVBQ' -}, { - name: 'Freshdesk', - version: '1.0.0', - author: 'XeniaLAB s.r.l.', - logo: 'assets/images/media/freshdesk.png', - state: 'freshdesk', - description: 'Description for Freshdesk' -}, { - name: 'SugarCRM', - version: '1.0.0', - author: 'XeniaLAB s.r.l.', - logo: 'assets/images/media/sugarcrm2.png', - state: 'sugarcrm', - description: 'Description for SugarCRM' -}]; - -models.Integration - .findAll() - .then(function(oldIntegrations) { - var bulkIntegrations = []; - oldIntegrations = _.map(oldIntegrations, 'state'); - newIntegrations.forEach(function(integration) { - if (_.includes(oldIntegrations, integration.state)) { - bulkIntegrations.push(models.Integration.update(integration, { - where: { - state: integration.state - } - })); - } else { - bulkIntegrations.push(models.Integration.create(integration)); - } - }); - return bulkIntegrations; - }) - .all() - .then(function() { - console.log('Finished populating integrations'); - }) - .catch(function(err) { - console.log('Error populating integrations:', err); - }); - -var newDefaulReports = [{ - "id": 1, - "name": "Queue - Details", - "description": null, - "parent": "j4_3", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 2, - "name": "Details", - "description": "Calls details (cdr)", - "parent": "j20_1", - "table": "report_call_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 3, - "name": "Outbound", - "description": "Manual outbound calls detail", - "parent": "j20_1", - "table": "report_call_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"outbound\"}]}}" -}, { - "id": 4, - "name": "Calls by Queue", - "description": null, - "parent": "j4_7", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 5, - "name": "Details", - "description": null, - "parent": "j4_5", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\"}]}}" -}, { - "id": 6, - "name": "Calls by Agent", - "description": null, - "parent": "j4_5", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 7, - "name": "Calls by Queue", - "description": null, - "parent": "j4_5", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\"}]}}" -}, { - "id": 8, - "name": "Answer Time by Queue", - "description": null, - "parent": "j4_5", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\"}]}}" -}, { - "id": 9, - "name": "Disconnection Cause", - "description": null, - "parent": "j4_5", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\"}]}}" -}, { - "id": 10, - "name": "Details", - "description": null, - "parent": "j4_6", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallercomplete\",\"value\":\"0\"}]}}" -}, { - "id": 11, - "name": "Unanswered by Queue", - "description": null, - "parent": "j4_6", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallercomplete\",\"value\":\"0\"}]}}" -}, { - "id": 12, - "name": "Exit Cause", - "description": null, - "parent": "j4_6", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallerexit\",\"value\":\"1\"}]}}" -}, { - "id": 13, - "name": "Abandon Time by Queue", - "description": null, - "parent": "j4_6", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallerabandon\",\"value\":\"1\"}]}}" -}, { - "id": 14, - "name": "Calls by Date", - "description": null, - "parent": "j4_7", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 15, - "name": "Calls by Hour", - "description": null, - "parent": "j4_7", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 16, - "name": "Calls by Day", - "description": null, - "parent": "j4_7", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 17, - "name": "Calls by Type", - "description": null, - "parent": "j20_1", - "table": "report_call_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 18, - "name": "Outbound Calls Disposition", - "description": "Outbound calls grouped by disposition", - "parent": "j20_1", - "table": "report_call_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"outbound\"}]}}" -}, { - "id": 19, - "name": "Pause Time", - "description": null, - "parent": "j4_4", - "table": "report_member_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"PAUSE\"},{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"voice\"}]}}" -}, { - "id": 20, - "name": "Login Time", - "description": null, - "parent": "j4_4", - "table": "report_member_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"LOGIN\"},{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"voice\"}]}}" -}, { - "id": 21, - "name": "Website Summary", - "description": null, - "parent": "j4_1", - "table": "report_chat_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 22, - "name": "Session Detail", - "description": null, - "parent": "j4_1", - "table": "report_chat_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}", -}, { - "id": 23, - "name": "Chat by Agent", - "description": null, - "parent": "j4_1", - "table": "report_chat_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"complete\",\"value\":\"1\"}]}}" -}, { - "id": 24, - "name": "Chat by Queue", - "description": null, - "parent": "j4_1", - "table": "report_chat_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"application\",\"value\":\"queue\"}]}}" -}, { - "id": 25, - "name": "Details", - "description": "Agents status details", - "parent": "j4_4", - "table": "report_member_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"voice\"}]}}" -}, { - "id": 26, - "name": "Summary", - "description": "CallySquare Summary", - "parent": "j112_1", - "table": "report_square_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 27, - "name": "Blocks", - "description": "CallySquare Blocks", - "parent": "j112_1", - "table": "report_square_details_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 28, - "name": "Login Details", - "description": "Agents status details", - "parent": "j24_1", - "table": "report_member_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"voice\"},{\"condition\":\"=\",\"field\":\"type\",\"value\":\"LOGIN\"}]}}" -}, { - "id": 29, - "name": "Pause Time by Channel", - "description": "", - "parent": "j24_1", - "table": "report_member_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"PAUSE\"}]}}" -}, { - "id": 30, - "name": "Pause Details", - "description": "Agents status details", - "parent": "j4_4", - "table": "report_member_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"voice\"},{\"condition\":\"=\",\"field\":\"type\",\"value\":\"PAUSE\"}]}}" -}, { - "id": 31, - "name": "Rating by Agent", - "description": null, - "parent": "j20_3", - "table": "voice_recordings", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 32, - "name": "Rating by Queue", - "description": null, - "parent": "j20_3", - "table": "voice_recordings", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"IS NOT EMPTY\",\"field\":\"queue\",\"value\":\"\",\"required\":false}]}}" -}, { - "id": 33, - "name": "Queue - Calls", - "description": null, - "parent": "j4_3", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 34, - "name": "Answer Time by Hour", - "description": null, - "parent": "j4_5", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\"}]}}" -}, { - "id": 35, - "name": "Received emails by account", - "description": "Summary of the emails accepted by application for each account", - "parent": "j4_2", - "table": "report_mail_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 36, - "name": "Received emails by queue", - "description": "Summary of received email by queue", - "parent": "j4_2", - "table": "report_mail_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"application\",\"value\":\"queue\",\"required\":true}]}}" -}, { - "id": 37, - "name": "Accepted emails by agent", - "description": "Summary of accepted email by agent", - "parent": "j4_2", - "table": "report_mail_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"timeout\",\"value\":\"0\",\"required\":true}]}}" -}, { - "id": 38, - "name": "Messages Summary by Date", - "description": "Global messages summary by date", - "parent": "j4_2", - "table": "mail_messages", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"auto\",\"value\":false}]}}" -}, { - "id": 39, - "name": "Interactions detail", - "description": "Detailed report about the interactions", - "parent": "j4_2", - "table": "mail_rooms", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" -}, { - "id": 40, - "name": "Disposition Summary", - "description": "Closed interactions by disposition (filtered by disposition not null)", - "parent": "j4_2", - "table": "mail_rooms", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"IS NOT NULL\",\"field\":\"disposition\",\"value\":\"\",\"required\":false}]}}" -}, { - "id": 41, - "name": "Closed interactions by date", - "description": "Summary of closed interactions grouped by date + average handle time (from when the first email arrived to when the interaction has been closed)", - "parent": "j4_2", - "table": "mail_rooms", - "conditions": "{\"group\":{\"operator\":\"OR\",\"rules\":[{\"condition\":\"=\",\"field\":\"status\",\"value\":\"'CLOSED'\",\"required\":true}]}}" -}]; - -var newDefaultMetrics = [{ - "id": 1, - "name": "Queue - TalkTime", - "table": "report_queue_history", - "metric": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)" -}, { - "id": 2, - "name": "Queue - Abandon Time", - "table": "report_queue_history", - "metric": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)" -}, { - "id": 3, - "name": "Abandoned <10s", - "table": "report_queue_history", - "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <10,1,NULL))", - "description": "Count of abandoned calls within 10 seconds (Short Calls)" -}, { - "id": 4, - "name": "Queue - AnswerTime", - "table": "report_queue_history", - "metric": "IF(queuecallercomplete=1,holdtime,null)" -}, { - "id": 5, - "name": "Answered < 10s", - "table": "report_agent_history", - "metric": "COUNT(IF(holdtime<10,1,NULL))", - "description": "Count of answered calls within 10 seconds" -}, { - "id": 6, - "name": "Answered 10-20s", - "table": "report_agent_history", - "metric": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))", - "description": "Count of answered calls between 10 and 20 seconds" -}, { - "id": 7, - "name": "Answered 20-30s", - "table": "report_agent_history", - "metric": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))", - "description": "Count of answered calls between 20 and 30 seconds" -}, { - "id": 8, - "name": "Answered >30s", - "table": "report_agent_history", - "metric": "COUNT(IF(holdtime >=30,1,NULL))", - "description": "Count of answered calls over 30 seconds" -}, { - "id": 9, - "name": "Queue - Exit Time", - "table": "report_queue_history", - "metric": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)" -}, { - "id": 10, - "name": "Abandoned 10-60s", - "table": "report_queue_history", - "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=10 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <60,1,NULL))", - "description": "Count of abandoned calls between 10 and 60 seconds" -}, { - "id": 11, - "name": "Abandoned 60-120s", - "table": "report_queue_history", - "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=60 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <120,1,NULL))", - "description": "Count of abandoned calls between 60 and 120 seconds" -}, { - "id": 12, - "name": "Queue - Abandoned >120s", - "table": "report_queue_history", - "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=120,1,NULL))", - "description": "Count of abandoned calls over 120 seconds" -}, { - "id": 13, - "name": "Queue - JoinDate", - "table": "report_queue_history", - "metric": "DATE(queuecallerjoinat)", - "description": "Extract the date of the join queue" -}, { - "id": 14, - "name": "Queue - JoinHour", - "table": "report_queue_history", - "metric": "HOUR(queuecallerjoinat)", - "description": "Extract the hour of the join queue" -}, { - "id": 15, - "name": "Queue - JoinDay", - "table": "report_queue_history", - "metric": "DAY(queuecallerjoinat)", - "description": "Extract the day of the join queue" -}, { - "id": 16, - "name": "Member - Event Duration", - "table": "report_member_history", - "metric": "UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)", - "description": "Member event duration in seconds" -}, { - "id": 17, - "name": "Member - Total Event Duration", - "table": "report_member_history", - "metric": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))", - "description": "Total event duration" -}, { - "id": 18, - "name": "Chat - Session Time", - "table": "report_chat_session_history", - "metric": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)", - "description": "Session Time", -}, { - "id": 19, - "name": "Chat - Queue", - "table": "report_chat_session_history", - "metric": "COUNT(IF(application=\"queue\",1,NULL))", - "description": "Chat queue application count", -}, { - "id": 20, - "name": "Chat - Agent", - "table": "report_chat_session_history", - "metric": "COUNT(IF(application=\"agent\",1,NULL))", - "description": "Chat agent application count", -}, { - "id": 21, - "name": "Chat - Avg Session Time", - "table": "report_chat_session_history", - "metric": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))", - "description": "Average session time" -}, { - "id": 22, - "name": "Member - Event Duration (HH:mm:ss)", - "table": "report_member_history", - "metric": "SEC_TO_TIME(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt))", - "description": "Member events duration in time format" -}, { - "id": 23, - "name": "Square - Duration", - "table": "report_square_history", - "metric": "UNIX_TIMESTAMP(leaveAt)-UNIX_TIMESTAMP(joinAt)", - "description": "IVR Duration" -}, { - "id": 24, - "name": "Queue - EndTime Call", - "table": "report_queue_history", - "metric": "CASE WHEN queuecallercomplete=1 THEN queuecallercompleteAt ELSE queuecallerLeaveAt END", - "description": null -}, { - "id": 25, - "name": "Queue - Calls Result", - "table": "report_queue_history", - "metric": "CASE WHEN queuecallercomplete=1 THEN \"YES\" ELSE \"NO\" END", - "description": "Show if a call is answered or not" -}]; - -models.ReportTree.destroy({ - where: { - id: 1 - } - }) - .then(function() { - return models.ReportTree.create({ - id: 1, - tree: '[{"id":"1","parent":"#","text":"Motion Reports","icon":"icon-rocket","state":{"selected":true,"opened":true}},{"id":"2","text":"Voice","icon":true,"li_attr":{"id":"2"},"a_attr":{"href":"#","id":"2_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j4_3","text":"Queues","icon":true,"li_attr":{"id":"j4_3"},"a_attr":{"href":"#","id":"j4_3_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"2"},{"id":"j4_5","text":"Answered","icon":true,"li_attr":{"id":"j4_5"},"a_attr":{"href":"#","id":"j4_5_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j4_3"},{"id":"j4_6","text":"Unanswered","icon":true,"li_attr":{"id":"j4_6"},"a_attr":{"href":"#","id":"j4_6_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j4_3"},{"id":"j4_7","text":"Distribution","icon":true,"li_attr":{"id":"j4_7"},"a_attr":{"href":"#","id":"j4_7_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j4_3"},{"id":"j20_1","text":"Calls","icon":true,"li_attr":{"id":"j20_1"},"a_attr":{"href":"#","id":"j20_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"2"},{"id":"j4_4","text":"Agents","icon":true,"li_attr":{"id":"j4_4"},"a_attr":{"href":"#","id":"j4_4_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"2"},{"id":"j112_1","text":"CallySquare","icon":true,"li_attr":{"id":"j112_1"},"a_attr":{"href":"#","id":"j112_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"2"},{"id":"j20_2","text":"Integration","icon":true,"li_attr":{"id":"j20_2"},"a_attr":{"href":"#","id":"j20_2_anchor"},"state":{"loaded":true,"opened":false,"selected":true,"disabled":false},"data":{},"parent":"2"},{"id":"j20_3","text":"Recordings","icon":true,"li_attr":{"id":"j20_3"},"a_attr":{"href":"#","id":"j20_3_anchor"},"state":{"loaded":true,"opened":false,"selected":true,"disabled":false},"data":{},"parent":"2"},{"id":"j4_1","text":"Chat","icon":true,"li_attr":{"id":"j4_1"},"a_attr":{"href":"#","id":"j4_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j4_2","text":"Mail","icon":true,"li_attr":{"id":"j4_2"},"a_attr":{"href":"#","id":"j4_2_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j24_1","text":"Agents","icon":true,"li_attr":{"id":"j24_1"},"a_attr":{"href":"#","id":"j24_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"}]', - }) - }) - .then(function() { - return models.ReportTree.findOrCreate({ - where: { - id: 2 - }, - defaults: { - id: 2, - tree: '[{"id":"1","text":"Custom Reports","icon":"icon-book-open","li_attr":{"id":"1"},"a_attr":{"href":"#","id":"1_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"#"},{"id":"2","text":"Basic Node","icon":true,"li_attr":{"id":"2"},"a_attr":{"href":"#","id":"2_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"1"}]' - } - }) - }) - .then(function() { - return models.DefaultMetric.findAll(); - }) - .then(function(oldDefaultMetrics) { - var bulkDefaultMetrics = []; - oldDefaultMetrics = _.map(oldDefaultMetrics, 'id'); - newDefaultMetrics.forEach(function(defaultMet) { - if (_.includes(oldDefaultMetrics, defaultMet.id)) { - bulkDefaultMetrics.push(models.DefaultMetric.update(defaultMet, { - where: { - id: defaultMet.id - } - })); - } else { - bulkDefaultMetrics.push(models.DefaultMetric.create(defaultMet)); - } - }); - return bulkDefaultMetrics; - }) - .all() - .then(function() { - return models.DefaultReport.findAll() - }) - .then(function(oldDefaultReports) { - var bulkDefaultReports = []; - oldDefaultReports = _.map(oldDefaultReports, 'id'); - newDefaulReports.forEach(function(defaultRep) { - if (_.includes(oldDefaultReports, defaultRep.id)) { - bulkDefaultReports.push(models.DefaultReport.update(defaultRep, { - where: { - id: defaultRep.id - } - })); - } else { - bulkDefaultReports.push(models.DefaultReport.create(defaultRep)); - } - }); - return bulkDefaultReports; - }) - .all() - .then(function() { - return models.ReportField.destroy({ - where: { - DefaultReportId: { - $gt: 0 - } - } - }) - }) - .then(function() { - return models.ReportField.bulkCreate([{ - "field": "uniqueid", - "alias": "UniqueId", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "calleridnum", - "alias": "CallerIdNum", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "calleridname", - "alias": "CallerIdName", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "queue", - "alias": "Queue", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "queuecallerjoinAt", - "alias": "QueueJoinAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "queuecallerleaveAt", - "alias": "QueueLeaveAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "queuecallerabandon", - "alias": "QueueAbandon", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "queuecallerabandonAt", - "alias": "QueueAbandonAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "queuecallercomplete", - "alias": "Complete", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "queuecallercompleteAt", - "alias": "CompleteAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "queuecallerexit", - "alias": "QueueExit", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "queuecallerexitAt", - "alias": "QueueExitAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "queuecallerexitreason", - "alias": "QueueExitReason", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "exten", - "alias": "DID", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 1 - }, { - "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)", - "alias": "TalkTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 1, - "DefaultReportId": 1 - }, { - "field": "IF(queuecallercomplete=1,holdtime,null)", - "alias": "AnswerTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 4, - "DefaultReportId": 1 - }, { - "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "AbandonTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 2, - "DefaultReportId": 1 - }, { - "field": "uniqueid", - "alias": "UniqueID", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "type", - "alias": "Type", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "tag", - "alias": "Tag", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "source", - "alias": "Source", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "destination", - "alias": "Destination", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "callerid", - "alias": "CallerID", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "destinationchannel", - "alias": "DestChannel", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "lastapplication", - "alias": "LastApp", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "lastdata", - "alias": "LastData", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "starttime", - "alias": "StartTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "answertime", - "alias": "AnswerTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "endtime", - "alias": "EndTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "duration", - "alias": "Duration", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "disposition", - "alias": "Disposition", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 2 - }, { - "field": "uniqueid", - "alias": "UniqueID", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "accountcode", - "alias": "AgentExtension", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "source", - "alias": "Source", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "destination", - "alias": "Destination", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "callerid", - "alias": "CallerId", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "starttime", - "alias": "StartTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "answertime", - "alias": "AnswerTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "endtime", - "alias": "EndTIme", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "duration", - "alias": "Duration", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "billableseconds", - "alias": "Billsec", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "disposition", - "alias": "Disposition", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "tag", - "alias": "Tag", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 3 - }, { - "field": "queue", - "alias": "Queue", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 4 - }, { - "field": "uniqueid", - "alias": "Offered", - "function": "COUNT", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 4 - }, { - "field": "queuecallercomplete", - "alias": "Completed", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 4 - }, { - "field": "queuecallerabandon", - "alias": "Abandoned", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 4 - }, { - "field": "queuecallerexit", - "alias": "Unmanaged", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 4 - }, { - "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)", - "alias": "AvgTalkTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 1, - "DefaultReportId": 4 - }, { - "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "AvgAbandonTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 1, - "DefaultReportId": 4 - }, { - "field": "IF(queuecallercomplete=1,holdtime,null)", - "alias": "AvgAnswerTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 4, - "DefaultReportId": 4 - }, { - "field": "uniqueid", - "alias": "UniqueId", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "calleridnum", - "alias": "CallerIdNum", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "calleridname", - "alias": "CallerIdName", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "queue", - "alias": "Queue", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "membername", - "alias": "Agent", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "agentcalledAt", - "alias": "AgentCalledAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "agentconnectAt", - "alias": "AgentConnectAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "agentcompleteAt", - "alias": "AgentCompleteAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "holdtime", - "alias": "AnswerTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "talktime", - "alias": "TalkTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "agentacw", - "alias": "AgentACW", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "acwtime", - "alias": "AgentACWTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "agentcomplete", - "alias": "AgentComplete", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "reason", - "alias": "HangupReason", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "lastevent", - "alias": "LastEvent", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "exten", - "alias": "DID", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 5 - }, { - "field": "membername", - "alias": "Agent", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 6 - }, { - "field": "agentcomplete", - "alias": "Completed", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 6 - }, { - "field": "agentringnoanswer", - "alias": "RingNoAnswer", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 6 - }, { - "field": "talktime", - "alias": "TotTalkTime", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 6 - }, { - "field": "acwtime", - "alias": "TotACWTime", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 6 - }, { - "field": "talktime", - "alias": "AvgTalkTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 6 - }, { - "field": "acwtime", - "alias": "AvgACWTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 6 - }, { - "field": "queue", - "alias": "Queue", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 7 - }, { - "field": "agentcomplete", - "alias": "Completed", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 7 - }, { - "field": "talktime", - "alias": "Tot TalkTime", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 7 - }, { - "field": "talktime", - "alias": "Avg TalkTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 7 - }, { - "field": "holdtime", - "alias": "Tot HoldTime", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 7 - }, { - "field": "holdtime", - "alias": "Avg HoldTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 7 - }, { - "field": "acwtime", - "alias": "Tot ACWTime", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 7 - }, { - "field": "acwtime", - "alias": "Avg ACWTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 7 - }, { - "field": "queue", - "alias": "Queue", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 8 - }, { - "field": "agentcomplete", - "alias": "Tot Answered", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 8 - }, { - "field": "COUNT(IF(holdtime<10,1,NULL))", - "alias": "Answered <10s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 5, - "DefaultReportId": 8 - }, { - "field": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))", - "alias": "Answered 10-20s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 6, - "DefaultReportId": 8 - }, { - "field": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))", - "alias": "Answered 20-30s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 7, - "DefaultReportId": 8 - }, { - "field": "COUNT(IF(holdtime >=30,1,NULL))", - "alias": "Answered >30s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 8, - "DefaultReportId": 8 - }, { - "field": "reason", - "alias": "Reason", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 9 - }, { - "field": "uniqueid", - "alias": "Calls", - "function": "COUNT", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 9 - }, { - "field": "uniqueid", - "alias": "UniqueId", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "calleridnum", - "alias": "CallerIdNum", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "queue", - "alias": "Queue", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "queuecallerjoinAt", - "alias": "QueueJoinAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "queuecallerleaveAt", - "alias": "QueueLeaveAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "queuecallerabandon", - "alias": "QueueAbandon", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "queuecallerabandonAt", - "alias": "QueueAbandonAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "Abandon Time", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 2, - "DefaultReportId": 10 - }, { - "field": "queuecallerexit", - "alias": "QueueExit", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "queuecallerexitAt", - "alias": "QueueExitAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "queuecallerexitreason", - "alias": "QueueExitReason", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "Exit Time", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 9, - "DefaultReportId": 10 - }, { - "field": "position", - "alias": "QueuePosition", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "exten", - "alias": "DID", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 10 - }, { - "field": "queue", - "alias": "Queue", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 11 - }, { - "field": "queuecallerabandon", - "alias": "Abandoned", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 11 - }, { - "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "AvgAbandonTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 2, - "DefaultReportId": 11 - }, { - "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "Tot AbandonTime", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 2, - "DefaultReportId": 11 - }, { - "field": "queuecallerexit", - "alias": "Exited", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 11 - }, { - "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "Avg ExitedTIme", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 9, - "DefaultReportId": 11 - }, { - "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "Tot ExitedTime", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 9, - "DefaultReportId": 11 - }, { - "field": "queuecallerexitreason", - "alias": "Reason", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 12 - }, { - "field": "queuecallerexit", - "alias": "Calls", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 12 - }, { - "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "Tot ExitTime", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 9, - "DefaultReportId": 12 - }, { - "field": "queue", - "alias": "Queue", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 13 - }, { - "field": "queuecallerabandon", - "alias": "Tot Abandoned", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 13 - }, { - "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <10,1,NULL))", - "alias": "Abandoned<10s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 3, - "DefaultReportId": 13 - }, { - "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=10 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <60,1,NULL))", - "alias": "Abandoned 10-60s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 10, - "DefaultReportId": 13 - }, { - "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=60 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <120,1,NULL))", - "alias": "Abandoned 60-120s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 11, - "DefaultReportId": 13 - }, { - "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=120,1,NULL))", - "alias": "Abandoned>120s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 12, - "DefaultReportId": 13 - }, { - "field": "DATE(queuecallerjoinat)", - "alias": "Date", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultMetricId": 13, - "DefaultReportId": 14 - }, { - "field": "uniqueid", - "alias": "Offered", - "function": "COUNT", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 14 - }, { - "field": "queuecallercomplete", - "alias": "Completed", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 14 - }, { - "field": "queuecallerabandon", - "alias": "Abandoned", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 14 - }, { - "field": "queuecallerexit", - "alias": "Unmanaged", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 14 - }, { - "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)", - "alias": "AvgTalkTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 1, - "DefaultReportId": 14 - }, { - "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "AvgAbandonTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 2, - "DefaultReportId": 14 - }, { - "field": "IF(queuecallercomplete=1,holdtime,null)", - "alias": "AvgAnswerTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 4, - "DefaultReportId": 14 - }, { - "field": "HOUR(queuecallerjoinat)", - "alias": "Hour", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultMetricId": 14, - "DefaultReportId": 15 - }, { - "field": "uniqueid", - "alias": "Offered", - "function": "COUNT", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 15 - }, { - "field": "queuecallercomplete", - "alias": "Completed", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 15 - }, { - "field": "queuecallerabandon", - "alias": "Abandoned", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 15 - }, { - "field": "queuecallerexit", - "alias": "Unmanaged", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 15 - }, { - "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)", - "alias": "AvgTalkTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 1, - "DefaultReportId": 15 - }, { - "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "AvgAbandonTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 2, - "DefaultReportId": 15 - }, { - "field": "IF(queuecallercomplete=1,holdtime,null)", - "alias": "AvgAnswerTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 4, - "DefaultReportId": 15 - }, { - "field": "DAY(queuecallerjoinat)", - "alias": "Day", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultMetricId": 15, - "DefaultReportId": 16 - }, { - "field": "uniqueid", - "alias": "Offered", - "function": "COUNT", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 16 - }, { - "field": "queuecallercomplete", - "alias": "Completed", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 16 - }, { - "field": "queuecallerabandon", - "alias": "Abandoned", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 16 - }, { - "field": "queuecallerexit", - "alias": "Unmanaged", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 16 - }, { - "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)", - "alias": "AvgTalkTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 1, - "DefaultReportId": 16 - }, { - "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "AvgAbandonTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 2, - "DefaultReportId": 16 - }, { - "field": "IF(queuecallercomplete=1,holdtime,null)", - "alias": "AvgAnswerTime", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 4, - "DefaultReportId": 16 - }, { - "field": "type", - "alias": "Type", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 17 - }, { - "field": "uniqueid", - "alias": "Calls", - "function": "COUNT", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 17 - }, { - "field": "duration", - "alias": "Tot Duration", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 17 - }, { - "field": "duration", - "alias": "Avg Duration", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 17 - }, { - "field": "disposition", - "alias": "Disposition", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 18 - }, { - "field": "uniqueid", - "alias": "Calls", - "function": "COUNT", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 18 - }, { - "field": "duration", - "alias": "Tot Duration", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 18 - }, { - "field": "duration", - "alias": "Avg Duration", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 18 - }, { - "field": "membername", - "alias": "Agent", - "function": null, - "groupBy": 1, - "orderBy": "ASC", - "DefaultReportId": 19 - }, { - "field": "data1", - "alias": "PauseType", - "function": null, - "groupBy": 1, - "orderBy": "ASC", - "DefaultReportId": 19 - }, { - "field": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))", - "alias": "Duration", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 17, - "DefaultReportId": 19 - }, { - "field": "membername", - "alias": "Agent", - "function": null, - "groupBy": 1, - "orderBy": "ASC", - "DefaultReportId": 20, - }, { - "field": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))", - "alias": "Duration", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 17, - "DefaultReportId": 20, - }, { - "field": "uniqueid", - "alias": "UniqueId", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "websitename", - "alias": "Website", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "visitorname", - "alias": "VisitorName", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - }, { - "field": "visitoremail", - "alias": "VisitorEmail", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "membername", - "alias": "MemeberName", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "queuename", - "alias": "QueueName", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "joinAt", - "alias": "JoinAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "leaveAt", - "alias": "LeaveAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "completeAt", - "alias": "CompleteAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "complete", - "alias": "Complete", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "completeReason", - "alias": "CompleteReason", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "abandon", - "alias": "Abandon", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "unmanaged", - "alias": "Unmanage", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 22, - "format": null - }, { - "field": "membername", - "alias": "Agent", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 23, - "format": null - }, { - "field": "complete", - "alias": "Session", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 23, - "format": null - }, { - "field": "COUNT(IF(application=\"queue\",1,NULL))", - "alias": "FromQueue", - "function": null, - "groupBy": 0, - "orderBy": null, - "createdAt": "2016-05-14 18:13:01", - "updatedAt": "2016-05-14 18:13:01", - "DefaultMetricId": 19, - "DefaultReportId": 23, - "format": null - }, { - "field": "COUNT(IF(application=\"agent\",1,NULL))", - "alias": "DirectToAgent", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 20, - "DefaultReportId": 23, - "format": null - }, { - "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)", - "alias": "Tot Session Time", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 18, - "DefaultReportId": 23, - "format": "SEC_TO_TIME" - }, { - "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)", - "alias": "Avg Session Time", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 18, - "DefaultReportId": 23, - "format": "SEC_TO_TIME" - }, { - "field": "websitename", - "alias": "WebSite", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 21, - "format": null - }, { - "field": "uniqueid", - "alias": "Sessions", - "function": "COUNT DISTINCT", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 21, - "format": null - }, { - "field": "complete", - "alias": "Completed", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 21, - "format": null - }, { - "field": "abandon", - "alias": "Abandoned", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 21, - "format": null - }, { - "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)", - "alias": "Session Time", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 18, - "DefaultReportId": 21, - "format": "SEC_TO_TIME" - }, { - "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))", - "alias": "Avg Session Time", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 21, - "DefaultReportId": 21, - "format": "SEC_TO_TIME" - }, { - "field": "queuename", - "alias": "Queue", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 24, - "format": null - }, { - "field": "uniqueid", - "alias": "Sessions", - "function": "COUNT", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 24, - "format": null - }, { - "field": "complete", - "alias": "Completed", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 24, - "format": null - }, { - "field": "abandon", - "alias": "Abandoned", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 24, - "format": null - }, { - "field": "unmanaged", - "alias": "Unmanaged", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 24, - "format": null - }, { - "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)", - "alias": "Session Time", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 18, - "DefaultReportId": 24, - "format": "SEC_TO_TIME" - }, { - "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))", - "alias": "Avg Session Time", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 21, - "DefaultReportId": 24, - "format": "SEC_TO_TIME" - }, { - "field": "membername", - "alias": "Agent", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 25, - }, { - "field": "interface", - "alias": "Interface", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 25, - }, { - "field": "type", - "alias": "Event", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 25, - }, { - "field": "data1", - "alias": "Pause/ACW Queue", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 25, - }, { - "field": "enterAt", - "alias": "EnterAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 25, - }, { - "field": "exitAt", - "alias": "ExitAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 25, - }, { - "field": "SEC_TO_TIME(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt))", - "alias": "Duration", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 22, - "DefaultReportId": 25 - }, { - "field": "project_name", - "alias": "Project Name", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 26 - }, { - "field": "uniqueid", - "alias": "UniqueID", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 26, - }, { - "field": "callerid", - "alias": "CallerID", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 26, - }, { - "field": "dnid", - "alias": "DID", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 26, - }, { - "field": "joinAt", - "alias": "Start Time", - "function": null, - "groupBy": 0, - "orderBy": "ASC", - "DefaultReportId": 26, - }, { - "field": "leaveAt", - "alias": "End Time", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 26, - }, { - "field": "UNIX_TIMESTAMP(leaveAt)-UNIX_TIMESTAMP(joinAt)", - "alias": "Duration", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 23, - "DefaultReportId": 26, - "format": "SEC_TO_TIME" - }, { - "field": "project_name", - "alias": "Project Name", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 27, - }, { - "field": "callerid", - "alias": "Caller Id", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 27, - }, { - "field": "uniqueid", - "alias": "Unique Id", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 27, - }, { - "field": "node", - "alias": "Blocks", - "function": "GROUP_CONCAT", - "format": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 27, - }, { - "field": "membername", - "alias": "Agent", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 28, - }, { - "field": "enterAt", - "alias": "EnterAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 28, - }, { - "field": "exitAt", - "alias": "ExitAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 28, - }, { - "field": "duration", - "alias": "Duration", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 28, - "format": "SEC_TO_TIME" - }, { - "field": "channel", - "alias": "Channel", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 29, - }, { - "field": "data1", - "alias": "Type", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 29, - }, { - "field": "duration", - "alias": "Duration", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 29, - "format": "SEC_TO_TIME" - }, { - "field": "membername", - "alias": "Agent", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 30 - }, { - "field": "enterAt", - "alias": "EnterAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 30 - }, { - "field": "exitAt", - "alias": "ExitAt", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 30 - }, { - "field": "data1", - "alias": "Pause", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 30 - }, { - "field": "duration", - "alias": "Duration", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 30, - "format": "SEC_TO_TIME" - }, { - "field": "connectedlinename", - "alias": "Agent", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 31 - }, { - "field": "uniqueid", - "alias": "Recorded Calls", - "function": "COUNT", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 31 - }, { - "field": "rating", - "alias": "Total Rating", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 31 - }, { - "field": "rating", - "alias": "Avg Rating", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 31 - }, { - "field": "queue", - "alias": "Queue", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 32 - }, { - "field": "uniqueid", - "alias": "Recorded Calls", - "function": "COUNT", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 32 - }, { - "field": "rating", - "alias": "Total Rating", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 32 - }, { - "field": "rating", - "alias": "Avg Rating", - "function": "AVG", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 32 - }, { - "field": "calleridnum", - "alias": "CallerIdNum", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 33 - }, { - "field": "queue", - "alias": "Queue", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 33 - }, { - "field": "queuecallerjoinAt", - "alias": "StartTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 33 - }, { - "field": "CASE WHEN queuecallercomplete=1 THEN queuecallercompleteAt ELSE queuecallerLeaveAt END", - "alias": "EndTime", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 33, - "DefaultMetricId": 24 - }, { - "field": "CASE WHEN queuecallercomplete=1 THEN \"YES\" ELSE \"NO\" END", - "alias": "Answered", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 33, - "DefaultMetricId": 25 - }, { - "field": "agentconnectAt", - "alias": "Hour", - "function": null, - "groupBy": 1, - "orderBy": null, - "DefaultReportId": 34, - "format": "HOUR" - }, { - "field": "agentcomplete", - "alias": "Tot Answered", - "function": "SUM", - "groupBy": 0, - "orderBy": null, - "DefaultReportId": 34, - }, { - "field": "COUNT(IF(holdtime<10,1,NULL))", - "alias": "Answered <10s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 5, - "DefaultReportId": 34 - }, { - "field": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))", - "alias": "Answered 10-20s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 6, - "DefaultReportId": 34 - }, { - "field": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))", - "alias": "Answered 20-30s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 7, - "DefaultReportId": 34 - }, { - "field": "COUNT(IF(holdtime >=30,1,NULL))", - "alias": "Answered >30s", - "function": null, - "groupBy": 0, - "orderBy": null, - "DefaultMetricId": 8, - "DefaultReportId": 34 - }, { - "field": "accountname", - "alias": "Account", - "groupBy": 1, - "custom": 0, - "DefaultReportId": 35 - }, { - "field": "uniqueid", - "alias": "Received", - "function": "COUNT DISTINCT", - "groupBy": 0, - "custom": 0, - "DefaultReportId": 35 - }, { - "field": "IF(timeout=0,1,null)", - "alias": "Accepted", - "function": "SUM", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 35 - }, { - "field": "ROUND(SUM(IF(timeout=0,1,null))/COUNT(DISTINCT(uniqueid))*100,1)", - "alias": "Accept Rate", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 35 - }, { - "field": "IF(timeout=0 AND application=\"queue\",1,null)", - "alias": "Accepted by Queue", - "function": "SUM", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 35 - }, { - "field": "IF(timeout=0 AND application=\"fidelity\",1,null)", - "alias": "Accept by Fidelity", - "function": "SUM", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 35 - }, { - "field": "IF(timeout=0 AND application=\"agent\",1,null)", - "alias": "Accepted by Agent", - "function": "SUM", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 35 - }, { - "field": "queuename", - "alias": "Queue", - "groupBy": 1, - "custom": 0, - "DefaultReportId": 36 - }, { - "field": "uniqueid", - "alias": "Received", - "function": "COUNT", - "groupBy": 0, - "custom": 0, - "DefaultReportId": 36 - }, { - "field": "IF(timeout=0,1,0)", - "alias": "Accepted", - "function": "SUM", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 36 - }, { - "field": "timeout", - "alias": "Timeout", - "function": "SUM", - "groupBy": 0, - "DefaultReportId": 36 - }, { - "field": "ROUND(SUM(IF(timeout=0,1,null))/COUNT(uniqueid)*100,1)", - "alias": "Accept Rate", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 36 - }, { - "field": "ROUND(AVG(IF(timeout=0,UNIX_TIMESTAMP(leaveat)- UNIX_TIMESTAMP(joinat),NULL)))", - "alias": "Avg Accept Time", - "groupBy": 0, - "format": "SEC_TO_TIME", - "custom": 1, - "DefaultReportId": 36 - }, { - "field": "membername", - "alias": "membername", - "groupBy": 1, - "custom": 0, - "DefaultReportId": 36 - }, { - "field": "uniqueid", - "alias": "Tot Accepted", - "function": "COUNT", - "groupBy": 0, - "custom": 0, - "DefaultReportId": 37 - }, { - "field": "IF(application=\"fidelity\",1,0)", - "alias": "Fidelity", - "function": "SUM", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 37 - }, { - "field": "IF(application=\"agent\",1,0)", - "alias": "Agent", - "function": "SUM", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 37 - }, { - "field": "IF(application=\"queue\",1,0)", - "alias": "Queue", - "function": "SUM", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 37 - }, { - "field": "createdAt", - "alias": "Date", - "groupBy": 1, - "custom": 0, - "format": "DATE", - "DefaultReportId": 38 - }, { - "field": "IF(status=\"RECEIVED\",1,0)", - "alias": "Received", - "function": "SUM", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 38 - }, { - "field": "IF(status=\"SENT\",1,0)", - "alias": "Sent", - "function": "SUM", - "groupBy": 0, - "custom": 1, - "DefaultReportId": 38 - }, { - "field": "id", - "alias": "id", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "account", - "alias": "account", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "status", - "alias": "status", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "lastEvent", - "alias": "lastEvent", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "createdAt", - "alias": "createdAt", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "arrivedAt", - "alias": "arrivedAt", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "openedAt", - "alias": "openedAt", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "closedAt", - "alias": "closedAt", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "mailIn", - "alias": "mailIn", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "mailOut", - "alias": "mailOut", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "tags", - "alias": "tags", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "disposition", - "alias": "disposition", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "ParentId", - "alias": "ParentId", - "groupBy": 0, - "DefaultReportId": 39, - "custom": 0 - }, { - "field": "disposition", - "alias": "disposition", - "groupBy": 1, - "DefaultReportId": 40, - "custom": 0 - }, { - "field": "count(*)", - "alias": "interactions", - "groupBy": 0, - "DefaultReportId": 40, - "custom": 1 - }, { - "field": "closedAt", - "alias": "closedAt", - "groupBy": 1, - "DefaultReportId": 41, - "format": "DATE", - "custom": 0 - }, { - "field": "id", - "alias": "Interactions", - "function": "COUNT", - "groupBy": 0, - "DefaultReportId": 41, - "custom": 0 - }, { - "field": "ROUND(AVG(UNIX_TIMESTAMP(closedAt)-UNIX_TIMESTAMP(arrivedAt)))", - "alias": "Avg Handle Time", - "groupBy": 0, - "DefaultReportId": 41, - "format": "SEC_TO_TIME", - "custom": 1 - }], { - ignoreDuplicates: true, - individualHooks: true - }) - }).then(function() { - console.log('Populating Analytics'); - }).catch(function(err) { - console.log('Error populating Analytics:', err); - }); - -models.List.bulkCreate([{ - id: 1, - name: 'Motion Service', - defaultEntry: true -}], { - ignoreDuplicates: true, - individualHooks: true -}).then(function() { - console.log('Finished populating integrations'); -}); - -models.VoiceExtension - .destroy({ - where: { - context: 'outbound-fax' - } - }) - .then(function() { - models.VoiceExtension.bulkCreate([{ - context: 'outbound-fax', - exten: '_.', - priority: 1, - app: 'NoOp', - appdata: 'Outgoing fax to ${FAXNUMBER}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 2, - app: 'NoOp', - appdata: 'Account ${FAXNAME}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 3, - app: 'Set', - appdata: 'CDR(type)=outbound-fax', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 4, - app: 'Answer', - appdata: '', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 5, - app: 'Wait', - appdata: '2', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 6, - app: 'Set', - appdata: 'FAXOPT(ecm)=${FAXECM}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 7, - app: 'Set', - appdata: 'FAXOPT(headerinfo)=${FAXHEADERINFO}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 8, - app: 'Set', - appdata: 'FAXOPT(localstationid)=${FAXLOCALSTATIONID}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 9, - app: 'Set', - appdata: 'FAXOPT(minrate)=${FAXMINRATE}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 10, - app: 'Set', - appdata: 'FAXOPT(maxrate)=${FAXMAXRATE}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 11, - app: 'Set', - appdata: 'FAXOPT(modem)=${FAXMODEM}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 12, - app: 'Set', - appdata: 'FAXOPT(gateway)=${FAXGATEWAY}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 13, - app: 'Set', - appdata: 'FAXOPT(t38timeout)=${FAXT38TIMEOUT}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 14, - app: 'SendFAX', - appdata: '${FAXOUTFILE},ds', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 15, - app: 'Hangup', - appdata: '', - type: 'system' - }], { - ignoreDuplicates: true, - individualHooks: true - }) - }) - .then(function() { - console.log('Finished populating VoiceExtension for Outgoing Fax'); - }); - -models.User - .findAll({ - include: [{ - model: models.VoiceExtension, - as: 'UserExtensions', - where: { - app: 'Dial' - } - }] - }) - .then(function(users) { - console.log('Rewriting Users extensions...'); - var bulkUpdates = []; - _.forEach(users, function(user) { - _.forEach(user.UserExtensions, function(elem) { - elem.appdata = 'SIP/' + user.name + ',,tTxX'; - bulkUpdates.push(elem.save()); - // console.log('extension updated'); - }); - }); - return bulkUpdates; - }) - .all() - .catch(function(err) { - console.log(err); - }); +var _0x632e=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x75\x73\x65\x72\x73","\x6C\x6F\x67","\x74\x68\x65\x6E","\x6C\x6F\x63\x61\x6C","\x61\x67\x65\x6E\x74","\x47\x69\x75\x73\x65\x70\x70\x65\x20\x43\x61\x72\x65\x72\x69","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x63\x61\x72\x65\x72\x69\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x63\x61\x72\x65\x72\x69","\x37\x35\x78\x63\x61\x6C\x6C\x79\x37\x35","\x64\x79\x6E\x61\x6D\x69\x63","\x46\x52\x49\x45\x4E\x44","\x75\x64\x70","\x61\x6C\x61\x77\x3B\x75\x6C\x61\x77\x3B\x67\x73\x6D","\x79\x65\x73","\x66\x6F\x72\x63\x65\x5F\x72\x70\x6F\x72\x74\x2C\x63\x6F\x6D\x65\x64\x69\x61","\x61\x6C\x6C","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x44\x61\x6E\x69\x65\x6C\x65\x20\x43\x69\x6E\x74\x69","\x64\x61\x6E\x69\x65\x6C\x65\x2E\x63\x69\x6E\x74\x69\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x64\x61\x6E\x69\x65\x6C\x65\x2E\x63\x69\x6E\x74\x69","\x41\x6E\x64\x72\x65\x61\x20\x42\x69\x61\x6E\x63\x6F","\x61\x6E\x64\x72\x65\x61\x2E\x62\x69\x61\x6E\x63\x6F\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x61\x6E\x64\x72\x65\x61\x2E\x62\x69\x61\x6E\x63\x6F","\x4D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x20\x42\x75\x6E\x67\x61\x72\x6F","\x6D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x2E\x62\x75\x6E\x67\x61\x72\x6F\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x6D\x61\x73\x73\x69\x6D\x69\x6C\x69\x61\x6E\x6F\x2E\x62\x75\x6E\x67\x61\x72\x6F","\x56\x61\x6C\x65\x72\x69\x6F\x20\x43\x69\x6F\x74\x74\x61","\x76\x61\x6C\x65\x72\x69\x6F\x2E\x63\x69\x6F\x74\x74\x61\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x76\x61\x6C\x65\x72\x69\x6F\x2E\x63\x69\x6F\x74\x74\x61","\x61\x64\x6D\x69\x6E","\x43\x6C\x61\x72\x6F\x74\x65\x63\x68","\x63\x6C\x61\x72\x6F\x74\x65\x63\x68\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x63\x6C\x61\x72\x6F\x74\x65\x63\x68","\x41\x62\x69\x67\x61\x65\x6C","\x61\x62\x69\x67\x61\x65\x6C\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x61\x62\x69\x67\x61\x65\x6C","\x54\x6F\x6E\x79\x20\x52\x75\x73\x73\x65\x6C\x6C","\x74\x6F\x6E\x79\x72\x40\x78\x63\x6C\x61\x72\x6F\x74\x65\x63\x68\x2E\x63\x6F\x2E\x7A\x61","\x74\x6F\x6E\x79\x2E\x72\x75\x73\x73\x65\x6C\x6C","\x43\x6F\x6C\x69\x6E\x20\x46\x61\x69\x72","\x63\x6F\x6C\x69\x6E\x66\x40\x78\x63\x6C\x61\x72\x6F\x74\x65\x63\x68\x2E\x63\x6F\x2E\x7A\x61","\x63\x6F\x6C\x69\x6E\x2E\x66\x61\x69\x72","\x44\x69\x65\x67\x6F\x20\x47\x6F\x73\x6D\x61\x72","\x64\x69\x65\x67\x6F\x2E\x67\x6F\x73\x6D\x61\x72\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x64\x69\x65\x67\x6F\x2E\x67\x6F\x73\x6D\x61\x72","\x47\x69\x75\x73\x65\x70\x70\x65\x20\x49\x6E\x6E\x61\x6D\x6F\x72\x61\x74\x6F","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x69\x6E\x6E\x61\x6D\x6F\x72\x61\x74\x6F\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x67\x69\x75\x73\x65\x70\x70\x65\x2E\x69\x6E\x6E\x61\x6D\x6F\x72\x61\x74\x6F","\x75\x70\x64","\x41\x6C\x65\x73\x73\x61\x6E\x64\x72\x61\x20\x42\x65\x73\x73\x6F\x6E\x65","\x61\x6C\x65\x73\x73\x61\x6E\x64\x72\x61\x2E\x62\x65\x73\x73\x6F\x6E\x65\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x61\x6C\x65\x73\x73\x61\x6E\x64\x72\x61\x2E\x62\x65\x73\x73\x6F\x6E\x65","\x46\x65\x6C\x69\x63\x65\x20\x42\x72\x69\x73\x63\x65\x73\x65","\x66\x65\x6C\x69\x63\x65\x2E\x62\x72\x69\x73\x63\x65\x73\x65\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x66\x65\x6C\x69\x63\x65\x2E\x62\x72\x69\x73\x63\x65\x73\x65","\x78\x43\x61\x6C\x6C\x79","\x69\x6E\x66\x6F\x2E\x78\x63\x61\x6C\x6C\x79\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x78\x63\x61\x6C\x6C\x79","\x33\x38\x38\x78\x73\x68\x75\x74\x74\x6C\x65\x33\x38\x38","\x4A\x6F\x68\x6E\x20\x44\x6F\x65","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65\x40\x67\x6D\x61\x69\x6C\x2E\x63\x6F\x6D","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65","\x4A\x61\x6E\x65\x20\x4D\x69\x6C\x6C\x65\x72","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72\x40\x67\x6D\x61\x69\x6C\x2E\x63\x6F\x6D","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x55\x73\x65\x72","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x74\x72\x75\x6E\x6B\x73","\x63\x69\x74\x61\x6C\x69\x61","\x66\x72\x69\x65\x6E\x64","\x70\x6F\x72\x74\x2C\x69\x6E\x76\x69\x74\x65","\x30\x31\x31\x31\x39\x38\x32\x37\x37\x37\x30","\x54\x21\x4E\x50\x6E\x76\x2D\x71\x6A\x43\x4D\x65\x39\x76","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x69\x74","\x76\x6F\x69\x70\x2E\x65\x75\x74\x65\x6C\x69\x61\x2E\x69\x74","\x72\x66\x63\x32\x38\x33\x33","\x20\x22\x22\x20\x3C\x3E","\x75\x6C\x61\x77\x3B\x61\x6C\x61\x77\x3B\x67\x73\x6D","\x6E\x6F","\x54\x72\x75\x6E\x6B","\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x42\x4F\x41\x52\x44","\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2F\x76\x6F\x69\x63\x65","\x79\x6F\x75\x72\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x59\x4F\x55\x52\x5F\x44\x41\x53\x48\x42\x4F\x41\x52\x44\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x79\x6F\x75\x72\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73\x2F\x73\x68\x6F\x77\x2F\x31","\x73\x74\x61\x66\x66","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x54\x41\x46\x46","\x2F\x73\x74\x61\x66\x66\x2F\x61\x67\x65\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x61\x67\x65\x6E\x74\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x47\x45\x4E\x54\x53","\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x4F\x4E\x54\x41\x43\x54\x5F\x4D\x41\x4E\x41\x47\x45\x52","\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2F\x6C\x69\x73\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x4E\x4E\x45\x4C\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x6C\x69\x73\x74","\x76\x6F\x69\x63\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x56\x4F\x49\x43\x45","\x63\x68\x61\x74","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x54","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x6C\x69\x73\x74","\x6D\x61\x69\x6C","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x41\x49\x4C","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6D\x61\x69\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x66\x61\x78","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x46\x41\x58","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x73\x6D\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x4D\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x52\x45\x41\x4C\x54\x49\x4D\x45","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x69\x65\x77\x2F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x6F\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x54\x4F\x4F\x4C\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x74\x72\x69\x67\x67\x65\x72\x73\x2F\x6C\x69\x73\x74","\x73\x71\x75\x61\x72\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x41\x4C\x4C\x59\x53\x51\x55\x41\x52\x45","\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6C\x69\x73\x74","\x6A\x73\x63\x72\x69\x70\x74\x79","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4A\x53\x43\x52\x49\x50\x54\x59","\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6C\x69\x73\x74","\x6D\x6F\x74\x69\x6F\x6E\x64\x69\x61\x6C\x65\x72","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x4F\x54\x49\x4F\x4E\x5F\x44\x49\x41\x4C\x45\x52","\x2F\x6D\x6F\x74\x69\x6F\x6E\x64\x69\x61\x6C\x65\x72\x2F\x6C\x69\x73\x74\x73\x2F\x6C\x69\x73\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x4E\x41\x4C\x59\x54\x49\x43\x53","\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x6C\x69\x73\x74","\x73\x65\x74\x74\x69\x6E\x67","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x45\x54\x54\x49\x4E\x47\x53","\x2F\x73\x65\x74\x74\x69\x6E\x67\x2F\x75\x70\x64\x61\x74\x65\x73\x2F\x6C\x69\x73\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x49\x4E\x54\x45\x47\x52\x41\x54\x49\x4F\x4E","\x2F\x6D\x61\x72\x6B\x65\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4F\x50\x45\x4E\x5F\x43\x48\x41\x4E\x4E\x45\x4C","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65\x73\x3A","\x63\x61\x74\x63\x68","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65\x73","\x69\x64","\x6D\x61\x70","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x75\x70\x64\x61\x74\x65","\x4D\x6F\x64\x75\x6C\x65","\x70\x75\x73\x68","\x63\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x71\x75\x65\x75\x65\x20\x31","\x61\x64\x64\x55\x73\x65\x72\x73","\x54\x31","\x66\x69\x6E\x64\x4F\x6E\x65","\x54\x65\x61\x6D","\x43\x51\x31","\x43\x51\x31\x20\x44\x65\x73\x63","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x71\x75\x65\x75\x65\x20\x31","\x74\x65\x61\x6D\x20\x66\x6F\x75\x6E\x64","\x74\x65\x73\x74","\x4D\x51\x31","\x4D\x51\x31\x20\x44\x65\x73\x63","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x66\x61\x78\x20\x71\x75\x65\x75\x65\x20\x31","\x46\x51\x31","\x46\x51\x31\x20\x44\x65\x73\x63","\x46\x61\x78\x51\x75\x65\x75\x65","\x44\x65\x66\x61\x75\x6C\x74\x20\x54\x65\x61\x6D","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x61\x63\x63\x6F\x75\x6E\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x73\x65\x72\x76\x65\x72\x20\x69\x6E","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x61\x69\x6C\x20\x73\x65\x72\x76\x65\x72\x20\x6F\x75\x74","\x73\x6D\x74\x70\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x70\x68\x6F\x6B\x75\x63\x6C\x6F\x6B\x61","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x69\x6D\x61\x70\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x49\x4E\x42\x4F\x58","\x55\x4E\x53\x45\x45\x4E","\x49\x4D\x41\x50","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x49\x6E","\x78\x43\x61\x6C\x6C\x79\x20\x44\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x73\x71\x75\x61\x72\x65\x20\x70\x72\x6F\x6A\x65\x63\x74\x73","\x70\x72\x6F\x6A\x65\x63\x74\x31","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x70\x72\x6F\x6A\x65\x63\x74","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x31","\x71\x75\x65\x75\x65","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x74\x20\x77\x65\x62\x73\x69\x74\x65\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x32","\x78\x43\x61\x6C\x6C\x79\x20\x53\x68\x6F\x70","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D\x2F\x73\x68\x6F\x70\x2F","\x23\x66\x35\x31\x31\x31\x31","\x68\x74\x74\x70\x3A\x2F\x2F\x6C\x6F\x63\x61\x6C\x68\x6F\x73\x74\x3A\x39\x30\x30\x30","\x73\x71\x75\x61\x72\x65\x64","\x57\x65\x20\x61\x72\x65\x20\x68\x65\x72\x65\x21","\x51\x75\x65\x73\x74\x69\x6F\x6E\x73\x3F\x20\x49\x6E\x73\x65\x72\x74\x20\x79\x6F\x75\x72\x20\x6E\x61\x6D\x65\x20\x61\x6E\x64\x20\x65\x6D\x61\x69\x6C\x20\x61\x64\x64\x72\x65\x73\x73\x20\x74\x6F\x20\x73\x74\x61\x72\x74\x20\x61\x20\x6C\x69\x76\x65\x2D\x63\x68\x61\x74\x20\x77\x69\x74\x68\x20\x6F\x75\x72\x20\x73\x75\x70\x70\x6F\x72\x74\x20\x74\x65\x61\x6D\x2E","\x59\x6F\x75\x72\x20\x6E\x61\x6D\x65","\x59\x6F\x75\x72\x20\x65\x6D\x61\x69\x6C\x20\x61\x64\x64\x72\x65\x73\x73","\x43\x68\x61\x74","\x43\x6F\x6E\x74\x61\x63\x74\x20\x75\x73","\x3C\x73\x74\x72\x6F\x6E\x67\x3E\x57\x65\x27\x72\x65\x20\x6E\x6F\x74\x20\x6F\x6E\x6C\x69\x6E\x65\x2E\x3C\x2F\x73\x74\x72\x6F\x6E\x67\x3E\x3C\x62\x72\x20\x2F\x3E\x49\x74\x20\x64\x6F\x65\x73\x6E\x27\x74\x20\x6D\x65\x61\x6E\x20\x77\x65\x27\x72\x65\x20\x6E\x6F\x74\x20\x74\x68\x65\x72\x65\x20\x74\x6F\x20\x68\x65\x6C\x70\x20\x2D\x20\x6C\x65\x61\x76\x65\x20\x79\x6F\x75\x72\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x62\x65\x6C\x6F\x77\x20\x61\x6E\x64\x20\x77\x65\x27\x6C\x6C\x20\x62\x65\x20\x69\x6E\x20\x74\x6F\x75\x63\x68\x20\x61\x73\x20\x73\x6F\x6F\x6E\x20\x61\x73\x20\x70\x6F\x73\x73\x69\x62\x6C\x65\x2E\x27","\x59\x6F\x75\x72\x20\x6D\x65\x73\x73\x61\x67\x65\x2E\x2E\x2E","\x4C\x65\x61\x76\x65\x20\x6D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x76\x61\x72\x69\x61\x62\x6C\x65\x31","\x56\x61\x72\x69\x61\x62\x6C\x65","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x44\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x28\x44\x4F\x20\x4E\x4F\x54\x20\x44\x45\x4C\x45\x54\x45\x29","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x68\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x66\x69\x6C\x65\x73","\x76\x61\x72\x2F\x6C\x69\x62\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x6D\x6F\x68","\x61\x6C\x70\x68\x61","\x77\x61\x76","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x53\x65\x74\x74\x69\x6E\x67","\x4D\x6F\x74\x69\x6F\x6E\x20\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x63\x6F\x6C\x2D\x6D\x64\x2D\x34","\x63\x6C\x6F\x63\x6B","\x43\x6C\x6F\x63\x6B","\x68\x68\x3A\x6D\x6D\x3A\x73\x73\x20\x61","\x64\x64\x64\x64\x2C\x20\x4D\x4D\x4D\x4D\x20\x44\x6F\x20\x59\x59\x59\x59","\x63\x6F\x6C\x2D\x6D\x64\x2D\x38","\x69\x66\x72\x61\x6D\x65","\x49\x66\x72\x61\x6D\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x65\x6D\x6F\x2E\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D\x2F\x73\x68\x6F\x70\x2F","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x5A\x65\x6E\x64\x65\x73\x6B","\x31\x2E\x30\x2E\x30","\x58\x65\x6E\x69\x61\x4C\x41\x42\x20\x73\x2E\x72\x2E\x6C\x2E","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x32\x2E\x70\x6E\x67","\x7A\x65\x6E\x64\x65\x73\x6B","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x78\x43\x41\x4C\x4C\x59\x20\x2D\x20\x5A\x65\x6E\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x41\x75\x74\x6F\x2D\x47\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x54\x69\x63\x6B\x65\x74\x73\x2C\x20\x66\x75\x6C\x6C\x79\x20\x63\x75\x73\x74\x6F\x6D\x69\x7A\x61\x62\x6C\x65\x20\x63\x6F\x6D\x6D\x65\x6E\x74\x73\x2C\x20\x43\x75\x73\x74\x6F\x6D\x20\x46\x69\x65\x6C\x64\x73\x20\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2C\x20\x54\x61\x67\x20\x73\x75\x70\x70\x6F\x72\x74\x20\x61\x6E\x64\x20\x53\x69\x6D\x70\x6C\x65\x20\x53\x65\x74\x75\x70","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x5A\x65\x6E\x64\x65\x73\x6B\x2B\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x32\x2E\x70\x6E\x67","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x78\x43\x41\x4C\x4C\x59\x20\x2D\x20\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x41\x75\x74\x6F\x2D\x47\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x54\x61\x73\x6B\x73\x2C\x20\x66\x75\x6C\x6C\x79\x20\x63\x75\x73\x74\x6F\x6D\x69\x7A\x61\x62\x6C\x65\x20\x63\x6F\x6D\x6D\x65\x6E\x74\x73\x2C\x20\x43\x75\x73\x74\x6F\x6D\x20\x46\x69\x65\x6C\x64\x73\x20\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x20\x61\x6E\x64\x20\x4F\x70\x65\x6E\x43\x54\x49\x20\x73\x75\x70\x70\x6F\x72\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2B\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x69\x46\x72\x61\x6D\x65","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x69\x66\x72\x61\x6D\x65\x2E\x70\x6E\x67","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x69\x46\x72\x61\x6D\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x65\x6E\x61\x62\x6C\x65\x20\x79\x6F\x75\x72\x20\x61\x67\x65\x6E\x74\x73\x20\x74\x6F\x20\x76\x69\x65\x77\x20\x65\x78\x74\x65\x72\x6E\x61\x6C\x20\x70\x61\x67\x65\x73\x20\x28\x6C\x69\x6B\x65\x20\x79\x6F\x75\x72\x20\x43\x52\x4D\x29\x20\x64\x69\x72\x65\x63\x74\x6C\x79\x20\x66\x72\x6F\x6D\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x47\x55\x49","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x69\x46\x72\x61\x6D\x65\x2B\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x44\x65\x73\x6B\x2E\x63\x6F\x6D","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x64\x65\x73\x6B\x32\x2E\x70\x6E\x67","\x64\x65\x73\x6B","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x44\x65\x73\x6B\x2E\x63\x6F\x6D\x20\x61\x73\x64\x6E\x76\x6C\x73\x64\x62\x6A\x76\x20\x73\x61\x65\x6B\x6C\x62\x76\x71\x77\x6F\x56\x42\x51","\x46\x72\x65\x73\x68\x64\x65\x73\x6B","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2E\x70\x6E\x67","\x66\x72\x65\x73\x68\x64\x65\x73\x6B","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x46\x72\x65\x73\x68\x64\x65\x73\x6B","\x53\x75\x67\x61\x72\x43\x52\x4D","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x32\x2E\x70\x6E\x67","\x73\x75\x67\x61\x72\x63\x72\x6D","\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x53\x75\x67\x61\x72\x43\x52\x4D","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x3A","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x73\x74\x61\x74\x65","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x51\x75\x65\x75\x65\x20\x2D\x20\x44\x65\x74\x61\x69\x6C\x73","\x6A\x34\x5F\x33","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x5D\x7D\x7D","\x44\x65\x74\x61\x69\x6C\x73","\x43\x61\x6C\x6C\x73\x20\x64\x65\x74\x61\x69\x6C\x73\x20\x28\x63\x64\x72\x29","\x6A\x32\x30\x5F\x31","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x4D\x61\x6E\x75\x61\x6C\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x64\x65\x74\x61\x69\x6C","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x6A\x34\x5F\x37","\x6A\x34\x5F\x35","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x68\x69\x73\x74\x6F\x72\x79","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x43\x61\x75\x73\x65","\x6A\x34\x5F\x36","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x7D\x5D\x7D\x7D","\x55\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x45\x78\x69\x74\x20\x43\x61\x75\x73\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x7D\x5D\x7D\x7D","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x44\x61\x74\x65","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x48\x6F\x75\x72","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x44\x61\x79","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x54\x79\x70\x65","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73\x20\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x50\x61\x75\x73\x65\x20\x54\x69\x6D\x65","\x6A\x34\x5F\x34","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x50\x41\x55\x53\x45\x22\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x76\x6F\x69\x63\x65\x22\x7D\x5D\x7D\x7D","\x4C\x6F\x67\x69\x6E\x20\x54\x69\x6D\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x4C\x4F\x47\x49\x4E\x22\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x76\x6F\x69\x63\x65\x22\x7D\x5D\x7D\x7D","\x57\x65\x62\x73\x69\x74\x65\x20\x53\x75\x6D\x6D\x61\x72\x79","\x6A\x34\x5F\x31","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x53\x65\x73\x73\x69\x6F\x6E\x20\x44\x65\x74\x61\x69\x6C","\x43\x68\x61\x74\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x7D\x5D\x7D\x7D","\x43\x68\x61\x74\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x71\x75\x65\x75\x65\x22\x7D\x5D\x7D\x7D","\x41\x67\x65\x6E\x74\x73\x20\x73\x74\x61\x74\x75\x73\x20\x64\x65\x74\x61\x69\x6C\x73","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x76\x6F\x69\x63\x65\x22\x7D\x5D\x7D\x7D","\x53\x75\x6D\x6D\x61\x72\x79","\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x20\x53\x75\x6D\x6D\x61\x72\x79","\x6A\x31\x31\x32\x5F\x31","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x42\x6C\x6F\x63\x6B\x73","\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x20\x42\x6C\x6F\x63\x6B\x73","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73\x5F\x68\x69\x73\x74\x6F\x72\x79","\x4C\x6F\x67\x69\x6E\x20\x44\x65\x74\x61\x69\x6C\x73","\x6A\x32\x34\x5F\x31","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x76\x6F\x69\x63\x65\x22\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x4C\x4F\x47\x49\x4E\x22\x7D\x5D\x7D\x7D","\x50\x61\x75\x73\x65\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x43\x68\x61\x6E\x6E\x65\x6C","","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x50\x41\x55\x53\x45\x22\x7D\x5D\x7D\x7D","\x50\x61\x75\x73\x65\x20\x44\x65\x74\x61\x69\x6C\x73","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x76\x6F\x69\x63\x65\x22\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x50\x41\x55\x53\x45\x22\x7D\x5D\x7D\x7D","\x52\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x6A\x32\x30\x5F\x33","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x52\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x49\x53\x20\x4E\x4F\x54\x20\x45\x4D\x50\x54\x59\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x5D\x7D\x7D","\x51\x75\x65\x75\x65\x20\x2D\x20\x43\x61\x6C\x6C\x73","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x48\x6F\x75\x72","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x61\x63\x63\x6F\x75\x6E\x74","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x65\x6D\x61\x69\x6C\x73\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x65\x61\x63\x68\x20\x61\x63\x63\x6F\x75\x6E\x74","\x6A\x34\x5F\x32","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x72\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x71\x75\x65\x75\x65\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x69\x6D\x65\x6F\x75\x74\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x4D\x65\x73\x73\x61\x67\x65\x73\x20\x53\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x44\x61\x74\x65","\x47\x6C\x6F\x62\x61\x6C\x20\x6D\x65\x73\x73\x61\x67\x65\x73\x20\x73\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x64\x61\x74\x65","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x75\x74\x6F\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x66\x61\x6C\x73\x65\x7D\x5D\x7D\x7D","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x64\x65\x74\x61\x69\x6C","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x62\x6F\x75\x74\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73","\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x53\x75\x6D\x6D\x61\x72\x79","\x43\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x28\x66\x69\x6C\x74\x65\x72\x65\x64\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x6E\x75\x6C\x6C\x29","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x5D\x7D\x7D","\x43\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x62\x79\x20\x64\x61\x74\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x63\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x64\x61\x74\x65\x20\x2B\x20\x61\x76\x65\x72\x61\x67\x65\x20\x68\x61\x6E\x64\x6C\x65\x20\x74\x69\x6D\x65\x20\x28\x66\x72\x6F\x6D\x20\x77\x68\x65\x6E\x20\x74\x68\x65\x20\x66\x69\x72\x73\x74\x20\x65\x6D\x61\x69\x6C\x20\x61\x72\x72\x69\x76\x65\x64\x20\x74\x6F\x20\x77\x68\x65\x6E\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x63\x6C\x6F\x73\x65\x64\x29","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x4F\x52\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x73\x74\x61\x74\x75\x73\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x43\x4C\x4F\x53\x45\x44\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x51\x75\x65\x75\x65\x20\x2D\x20\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29","\x51\x75\x65\x75\x65\x20\x2D\x20\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x3C\x31\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x77\x69\x74\x68\x69\x6E\x20\x31\x30\x20\x73\x65\x63\x6F\x6E\x64\x73\x20\x28\x53\x68\x6F\x72\x74\x20\x43\x61\x6C\x6C\x73\x29","\x51\x75\x65\x75\x65\x20\x2D\x20\x41\x6E\x73\x77\x65\x72\x54\x69\x6D\x65","\x49\x46\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x2C\x68\x6F\x6C\x64\x74\x69\x6D\x65\x2C\x6E\x75\x6C\x6C\x29","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x3C\x20\x31\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x3C\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x77\x69\x74\x68\x69\x6E\x20\x31\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x31\x30\x2D\x32\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x31\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3C\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x31\x30\x20\x61\x6E\x64\x20\x32\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x32\x30\x2D\x33\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x32\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3C\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x32\x30\x20\x61\x6E\x64\x20\x33\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x3E\x33\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x3E\x3D\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x6F\x76\x65\x72\x20\x33\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x51\x75\x65\x75\x65\x20\x2D\x20\x45\x78\x69\x74\x20\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x45\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x31\x30\x2D\x36\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x31\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x36\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x31\x30\x20\x61\x6E\x64\x20\x36\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x36\x30\x2D\x31\x32\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x36\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x62\x65\x74\x77\x65\x65\x6E\x20\x36\x30\x20\x61\x6E\x64\x20\x31\x32\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x51\x75\x65\x75\x65\x20\x2D\x20\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x3E\x31\x32\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x3D\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x6F\x75\x6E\x74\x20\x6F\x66\x20\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x6F\x76\x65\x72\x20\x31\x32\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x51\x75\x65\x75\x65\x20\x2D\x20\x4A\x6F\x69\x6E\x44\x61\x74\x65","\x44\x41\x54\x45\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74\x29","\x45\x78\x74\x72\x61\x63\x74\x20\x74\x68\x65\x20\x64\x61\x74\x65\x20\x6F\x66\x20\x74\x68\x65\x20\x6A\x6F\x69\x6E\x20\x71\x75\x65\x75\x65","\x51\x75\x65\x75\x65\x20\x2D\x20\x4A\x6F\x69\x6E\x48\x6F\x75\x72","\x48\x4F\x55\x52\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74\x29","\x45\x78\x74\x72\x61\x63\x74\x20\x74\x68\x65\x20\x68\x6F\x75\x72\x20\x6F\x66\x20\x74\x68\x65\x20\x6A\x6F\x69\x6E\x20\x71\x75\x65\x75\x65","\x51\x75\x65\x75\x65\x20\x2D\x20\x4A\x6F\x69\x6E\x44\x61\x79","\x44\x41\x59\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74\x29","\x45\x78\x74\x72\x61\x63\x74\x20\x74\x68\x65\x20\x64\x61\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x6A\x6F\x69\x6E\x20\x71\x75\x65\x75\x65","\x4D\x65\x6D\x62\x65\x72\x20\x2D\x20\x45\x76\x65\x6E\x74\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29","\x4D\x65\x6D\x62\x65\x72\x20\x65\x76\x65\x6E\x74\x20\x64\x75\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x20\x73\x65\x63\x6F\x6E\x64\x73","\x4D\x65\x6D\x62\x65\x72\x20\x2D\x20\x54\x6F\x74\x61\x6C\x20\x45\x76\x65\x6E\x74\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x53\x55\x4D\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x29\x29","\x54\x6F\x74\x61\x6C\x20\x65\x76\x65\x6E\x74\x20\x64\x75\x72\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x20\x2D\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29","\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x43\x68\x61\x74\x20\x2D\x20\x51\x75\x65\x75\x65","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x68\x61\x74\x20\x71\x75\x65\x75\x65\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x63\x6F\x75\x6E\x74","\x43\x68\x61\x74\x20\x2D\x20\x41\x67\x65\x6E\x74","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x43\x68\x61\x74\x20\x61\x67\x65\x6E\x74\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x63\x6F\x75\x6E\x74","\x43\x68\x61\x74\x20\x2D\x20\x41\x76\x67\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29\x29\x29","\x41\x76\x65\x72\x61\x67\x65\x20\x73\x65\x73\x73\x69\x6F\x6E\x20\x74\x69\x6D\x65","\x4D\x65\x6D\x62\x65\x72\x20\x2D\x20\x45\x76\x65\x6E\x74\x20\x44\x75\x72\x61\x74\x69\x6F\x6E\x20\x28\x48\x48\x3A\x6D\x6D\x3A\x73\x73\x29","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x29","\x4D\x65\x6D\x62\x65\x72\x20\x65\x76\x65\x6E\x74\x73\x20\x64\x75\x72\x61\x74\x69\x6F\x6E\x20\x69\x6E\x20\x74\x69\x6D\x65\x20\x66\x6F\x72\x6D\x61\x74","\x53\x71\x75\x61\x72\x65\x20\x2D\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6A\x6F\x69\x6E\x41\x74\x29","\x49\x56\x52\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x51\x75\x65\x75\x65\x20\x2D\x20\x45\x6E\x64\x54\x69\x6D\x65\x20\x43\x61\x6C\x6C","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x54\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x20\x45\x4C\x53\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x4C\x65\x61\x76\x65\x41\x74\x20\x45\x4E\x44","\x51\x75\x65\x75\x65\x20\x2D\x20\x43\x61\x6C\x6C\x73\x20\x52\x65\x73\x75\x6C\x74","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x54\x48\x45\x4E\x20\x22\x59\x45\x53\x22\x20\x45\x4C\x53\x45\x20\x22\x4E\x4F\x22\x20\x45\x4E\x44","\x53\x68\x6F\x77\x20\x69\x66\x20\x61\x20\x63\x61\x6C\x6C\x20\x69\x73\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x6F\x72\x20\x6E\x6F\x74","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x41\x6E\x61\x6C\x79\x74\x69\x63\x73\x3A","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x41\x6E\x61\x6C\x79\x74\x69\x63\x73","\x75\x6E\x69\x71\x75\x65\x69\x64","\x55\x6E\x69\x71\x75\x65\x49\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x51\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x51\x75\x65\x75\x65\x4A\x6F\x69\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x51\x75\x65\x75\x65\x4C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x51\x75\x65\x75\x65\x41\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x51\x75\x65\x75\x65\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x51\x75\x65\x75\x65\x45\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x51\x75\x65\x75\x65\x45\x78\x69\x74\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x72\x65\x61\x73\x6F\x6E","\x51\x75\x65\x75\x65\x45\x78\x69\x74\x52\x65\x61\x73\x6F\x6E","\x65\x78\x74\x65\x6E","\x44\x49\x44","\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x41\x6E\x73\x77\x65\x72\x54\x69\x6D\x65","\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x55\x6E\x69\x71\x75\x65\x49\x44","\x74\x79\x70\x65","\x54\x79\x70\x65","\x74\x61\x67","\x54\x61\x67","\x73\x6F\x75\x72\x63\x65","\x53\x6F\x75\x72\x63\x65","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x43\x61\x6C\x6C\x65\x72\x49\x44","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x44\x65\x73\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x6C\x61\x73\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4C\x61\x73\x74\x41\x70\x70","\x6C\x61\x73\x74\x64\x61\x74\x61","\x4C\x61\x73\x74\x44\x61\x74\x61","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x53\x74\x61\x72\x74\x54\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x45\x6E\x64\x54\x69\x6D\x65","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x44\x75\x72\x61\x74\x69\x6F\x6E","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x41\x67\x65\x6E\x74\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x43\x61\x6C\x6C\x65\x72\x49\x64","\x45\x6E\x64\x54\x49\x6D\x65","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x42\x69\x6C\x6C\x73\x65\x63","\x4F\x66\x66\x65\x72\x65\x64","\x43\x4F\x55\x4E\x54","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x53\x55\x4D","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x41\x76\x67\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x41\x56\x47","\x41\x76\x67\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x41\x76\x67\x41\x6E\x73\x77\x65\x72\x54\x69\x6D\x65","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x41\x67\x65\x6E\x74\x43\x61\x6C\x6C\x65\x64\x41\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x61\x67\x65\x6E\x74\x61\x63\x77","\x41\x67\x65\x6E\x74\x41\x43\x57","\x61\x63\x77\x74\x69\x6D\x65","\x41\x67\x65\x6E\x74\x41\x43\x57\x54\x69\x6D\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x72\x65\x61\x73\x6F\x6E","\x48\x61\x6E\x67\x75\x70\x52\x65\x61\x73\x6F\x6E","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x4C\x61\x73\x74\x45\x76\x65\x6E\x74","\x61\x67\x65\x6E\x74\x72\x69\x6E\x67\x6E\x6F\x61\x6E\x73\x77\x65\x72","\x52\x69\x6E\x67\x4E\x6F\x41\x6E\x73\x77\x65\x72","\x54\x6F\x74\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x54\x6F\x74\x41\x43\x57\x54\x69\x6D\x65","\x41\x76\x67\x41\x43\x57\x54\x69\x6D\x65","\x54\x6F\x74\x20\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x41\x76\x67\x20\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x54\x6F\x74\x20\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x41\x76\x67\x20\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x43\x57\x54\x69\x6D\x65","\x41\x76\x67\x20\x41\x43\x57\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x6E\x73\x77\x65\x72\x65\x64","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x3C\x31\x30\x73","\x52\x65\x61\x73\x6F\x6E","\x43\x61\x6C\x6C\x73","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65","\x45\x78\x69\x74\x20\x54\x69\x6D\x65","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x51\x75\x65\x75\x65\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x54\x6F\x74\x20\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x45\x78\x69\x74\x65\x64","\x41\x76\x67\x20\x45\x78\x69\x74\x65\x64\x54\x49\x6D\x65","\x54\x6F\x74\x20\x45\x78\x69\x74\x65\x64\x54\x69\x6D\x65","\x54\x6F\x74\x20\x45\x78\x69\x74\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x3C\x31\x30\x73","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x3E\x31\x32\x30\x73","\x44\x61\x74\x65","\x48\x6F\x75\x72","\x44\x61\x79","\x54\x6F\x74\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x41\x76\x67\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x41\x53\x43","\x64\x61\x74\x61\x31","\x50\x61\x75\x73\x65\x54\x79\x70\x65","\x77\x65\x62\x73\x69\x74\x65\x6E\x61\x6D\x65","\x57\x65\x62\x73\x69\x74\x65","\x76\x69\x73\x69\x74\x6F\x72\x6E\x61\x6D\x65","\x56\x69\x73\x69\x74\x6F\x72\x4E\x61\x6D\x65","\x76\x69\x73\x69\x74\x6F\x72\x65\x6D\x61\x69\x6C","\x56\x69\x73\x69\x74\x6F\x72\x45\x6D\x61\x69\x6C","\x4D\x65\x6D\x65\x62\x65\x72\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x51\x75\x65\x75\x65\x4E\x61\x6D\x65","\x6A\x6F\x69\x6E\x41\x74","\x4A\x6F\x69\x6E\x41\x74","\x6C\x65\x61\x76\x65\x41\x74","\x4C\x65\x61\x76\x65\x41\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\x61\x62\x61\x6E\x64\x6F\x6E","\x41\x62\x61\x6E\x64\x6F\x6E","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x6E\x6D\x61\x6E\x61\x67\x65","\x53\x65\x73\x73\x69\x6F\x6E","\x46\x72\x6F\x6D\x51\x75\x65\x75\x65","\x32\x30\x31\x36\x2D\x30\x35\x2D\x31\x34\x20\x31\x38\x3A\x31\x33\x3A\x30\x31","\x44\x69\x72\x65\x63\x74\x54\x6F\x41\x67\x65\x6E\x74","\x54\x6F\x74\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45","\x41\x76\x67\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x57\x65\x62\x53\x69\x74\x65","\x53\x65\x73\x73\x69\x6F\x6E\x73","\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x49\x6E\x74\x65\x72\x66\x61\x63\x65","\x45\x76\x65\x6E\x74","\x50\x61\x75\x73\x65\x2F\x41\x43\x57\x20\x51\x75\x65\x75\x65","\x65\x6E\x74\x65\x72\x41\x74","\x45\x6E\x74\x65\x72\x41\x74","\x65\x78\x69\x74\x41\x74","\x45\x78\x69\x74\x41\x74","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x61\x6D\x65","\x50\x72\x6F\x6A\x65\x63\x74\x20\x4E\x61\x6D\x65","\x64\x6E\x69\x64","\x53\x74\x61\x72\x74\x20\x54\x69\x6D\x65","\x45\x6E\x64\x20\x54\x69\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x20\x49\x64","\x55\x6E\x69\x71\x75\x65\x20\x49\x64","\x6E\x6F\x64\x65","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54","\x63\x68\x61\x6E\x6E\x65\x6C","\x43\x68\x61\x6E\x6E\x65\x6C","\x50\x61\x75\x73\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x52\x65\x63\x6F\x72\x64\x65\x64\x20\x43\x61\x6C\x6C\x73","\x72\x61\x74\x69\x6E\x67","\x54\x6F\x74\x61\x6C\x20\x52\x61\x74\x69\x6E\x67","\x41\x76\x67\x20\x52\x61\x74\x69\x6E\x67","\x41\x6E\x73\x77\x65\x72\x65\x64","\x48\x4F\x55\x52","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x63\x65\x69\x76\x65\x64","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29\x29\x2F\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x28\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x29\x2A\x31\x30\x30\x2C\x31\x29","\x41\x63\x63\x65\x70\x74\x20\x52\x61\x74\x65","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x66\x69\x64\x65\x6C\x69\x74\x79\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x20\x62\x79\x20\x46\x69\x64\x65\x6C\x69\x74\x79","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x30\x29","\x74\x69\x6D\x65\x6F\x75\x74","\x54\x69\x6D\x65\x6F\x75\x74","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29\x29\x2F\x43\x4F\x55\x4E\x54\x28\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x2A\x31\x30\x30\x2C\x31\x29","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x61\x74\x29\x2D\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6A\x6F\x69\x6E\x61\x74\x29\x2C\x4E\x55\x4C\x4C\x29\x29\x29","\x41\x76\x67\x20\x41\x63\x63\x65\x70\x74\x20\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x63\x63\x65\x70\x74\x65\x64","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x66\x69\x64\x65\x6C\x69\x74\x79\x22\x2C\x31\x2C\x30\x29","\x46\x69\x64\x65\x6C\x69\x74\x79","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x30\x29","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x30\x29","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x41\x54\x45","\x49\x46\x28\x73\x74\x61\x74\x75\x73\x3D\x22\x52\x45\x43\x45\x49\x56\x45\x44\x22\x2C\x31\x2C\x30\x29","\x49\x46\x28\x73\x74\x61\x74\x75\x73\x3D\x22\x53\x45\x4E\x54\x22\x2C\x31\x2C\x30\x29","\x53\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x73\x74\x61\x74\x75\x73","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x61\x72\x72\x69\x76\x65\x64\x41\x74","\x6F\x70\x65\x6E\x65\x64\x41\x74","\x63\x6C\x6F\x73\x65\x64\x41\x74","\x6D\x61\x69\x6C\x49\x6E","\x6D\x61\x69\x6C\x4F\x75\x74","\x74\x61\x67\x73","\x50\x61\x72\x65\x6E\x74\x49\x64","\x63\x6F\x75\x6E\x74\x28\x2A\x29","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6C\x6F\x73\x65\x64\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x61\x72\x72\x69\x76\x65\x64\x41\x74\x29\x29\x29","\x41\x76\x67\x20\x48\x61\x6E\x64\x6C\x65\x20\x54\x69\x6D\x65","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x64\x65\x73\x74\x72\x6F\x79","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x75\x73\x74\x6F\x6D\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x62\x6F\x6F\x6B\x2D\x6F\x70\x65\x6E\x22\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x42\x61\x73\x69\x63\x20\x4E\x6F\x64\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x5D","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x4D\x6F\x74\x69\x6F\x6E\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x72\x6F\x63\x6B\x65\x74\x22\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x56\x6F\x69\x63\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x33\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x51\x75\x65\x75\x65\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x33\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x33\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x35\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x6E\x73\x77\x65\x72\x65\x64\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x35\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x35\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x34\x5F\x33\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x36\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x55\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x36\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x36\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x34\x5F\x33\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x37\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x44\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x37\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x37\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x34\x5F\x33\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x61\x6C\x6C\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x34\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x67\x65\x6E\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x34\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x34\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x32\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x32\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x32\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x33\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x33\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x32\x30\x5F\x33\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x68\x61\x74\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x4D\x61\x69\x6C\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x34\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x67\x65\x6E\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x32\x34\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x32\x34\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x5D","\x4D\x6F\x74\x69\x6F\x6E\x20\x53\x65\x72\x76\x69\x63\x65","\x4C\x69\x73\x74","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x66\x6F\x72\x20\x4F\x75\x74\x67\x6F\x69\x6E\x67\x20\x46\x61\x78","\x5F\x2E","\x4E\x6F\x4F\x70","\x4F\x75\x74\x67\x6F\x69\x6E\x67\x20\x66\x61\x78\x20\x74\x6F\x20\x24\x7B\x46\x41\x58\x4E\x55\x4D\x42\x45\x52\x7D","\x73\x79\x73\x74\x65\x6D","\x41\x63\x63\x6F\x75\x6E\x74\x20\x24\x7B\x46\x41\x58\x4E\x41\x4D\x45\x7D","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x41\x6E\x73\x77\x65\x72","\x57\x61\x69\x74","\x32","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x3D\x24\x7B\x46\x41\x58\x45\x43\x4D\x7D","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x3D\x24\x7B\x46\x41\x58\x48\x45\x41\x44\x45\x52\x49\x4E\x46\x4F\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x3D\x24\x7B\x46\x41\x58\x4C\x4F\x43\x41\x4C\x53\x54\x41\x54\x49\x4F\x4E\x49\x44\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x3D\x24\x7B\x46\x41\x58\x4D\x49\x4E\x52\x41\x54\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x3D\x24\x7B\x46\x41\x58\x4D\x41\x58\x52\x41\x54\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x6F\x64\x65\x6D\x29\x3D\x24\x7B\x46\x41\x58\x4D\x4F\x44\x45\x4D\x7D","\x46\x41\x58\x4F\x50\x54\x28\x67\x61\x74\x65\x77\x61\x79\x29\x3D\x24\x7B\x46\x41\x58\x47\x41\x54\x45\x57\x41\x59\x7D","\x46\x41\x58\x4F\x50\x54\x28\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74\x29\x3D\x24\x7B\x46\x41\x58\x54\x33\x38\x54\x49\x4D\x45\x4F\x55\x54\x7D","\x53\x65\x6E\x64\x46\x41\x58","\x24\x7B\x46\x41\x58\x4F\x55\x54\x46\x49\x4C\x45\x7D\x2C\x64\x73","\x48\x61\x6E\x67\x75\x70","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x52\x65\x77\x72\x69\x74\x69\x6E\x67\x20\x55\x73\x65\x72\x73\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x2E\x2E\x2E","\x61\x70\x70\x64\x61\x74\x61","\x53\x49\x50\x2F","\x6E\x61\x6D\x65","\x2C\x2C\x74\x54\x78\x58","\x73\x61\x76\x65","\x55\x73\x65\x72\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x44\x69\x61\x6C"];_0x632e[0];var _=require(_0x632e[1]);var models=require(_0x632e[2]);var sequelize=require(_0x632e[2])[_0x632e[3]];models[_0x632e[70]][_0x632e[69]]([{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[9],email:_0x632e[10],name:_0x632e[11],password:_0x632e[12],defaultuser:_0x632e[11],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1000},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[21],email:_0x632e[22],name:_0x632e[23],password:_0x632e[12],defaultuser:_0x632e[23],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1001},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[24],email:_0x632e[25],name:_0x632e[26],password:_0x632e[12],defaultuser:_0x632e[26],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1002},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[27],email:_0x632e[28],name:_0x632e[29],password:_0x632e[12],defaultuser:_0x632e[29],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1003},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[30],email:_0x632e[31],name:_0x632e[32],password:_0x632e[12],defaultuser:_0x632e[32],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1004},{provider:_0x632e[7],role:_0x632e[33],fullname:_0x632e[34],email:_0x632e[35],name:_0x632e[36],password:_0x632e[36],defaultuser:_0x632e[36],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1005},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[37],email:_0x632e[38],name:_0x632e[39],password:_0x632e[12],defaultuser:_0x632e[39],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1006},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[40],email:_0x632e[41],name:_0x632e[42],password:_0x632e[36],defaultuser:_0x632e[42],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1007},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[43],email:_0x632e[44],name:_0x632e[45],password:_0x632e[36],defaultuser:_0x632e[45],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1008},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[46],email:_0x632e[47],name:_0x632e[48],password:_0x632e[12],defaultuser:_0x632e[48],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1009},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[49],email:_0x632e[50],name:_0x632e[51],password:_0x632e[12],defaultuser:_0x632e[51],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[52],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1010},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[53],email:_0x632e[54],name:_0x632e[55],password:_0x632e[12],defaultuser:_0x632e[55],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[52],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1011},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[56],email:_0x632e[57],name:_0x632e[58],password:_0x632e[12],defaultuser:_0x632e[58],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[52],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1012},{provider:_0x632e[7],role:_0x632e[33],fullname:_0x632e[59],email:_0x632e[60],name:_0x632e[61],password:_0x632e[62],defaultuser:_0x632e[61],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1013},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[63],email:_0x632e[64],name:_0x632e[65],password:_0x632e[12],defaultuser:_0x632e[65],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1014},{provider:_0x632e[7],role:_0x632e[8],fullname:_0x632e[66],email:_0x632e[67],name:_0x632e[68],password:_0x632e[12],defaultuser:_0x632e[68],host:_0x632e[13],type:_0x632e[14],transport:_0x632e[15],allow:_0x632e[16],qualify:_0x632e[17],nat:_0x632e[18],disallow:_0x632e[19],context:_0x632e[20],internal:1015}],{ignoreDuplicates:true,individualHooks:true})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[4])});models[_0x632e[84]][_0x632e[69]]([{name:_0x632e[72],type:_0x632e[73],insecure:_0x632e[74],defaultuser:_0x632e[75],secret:_0x632e[76],password:_0x632e[76],context:_0x632e[77],language:_0x632e[78],host:_0x632e[79],fromdomain:_0x632e[79],dtmfmode:_0x632e[80],qualify:_0x632e[17],nat:_0x632e[18],callerid:_0x632e[81],limitonpeers:_0x632e[17],callcounter:_0x632e[17],disallow:_0x632e[19],allow:_0x632e[82],canreinvite:_0x632e[83],directmedia:_0x632e[83]}],{ignoreDuplicates:true,individualHooks:true})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[71])});var newModules=[{id:1,name:_0x632e[85],title:_0x632e[86],ModuleId:null,path:_0x632e[87]},{id:2,name:_0x632e[88],title:_0x632e[89],ModuleId:null,path:_0x632e[90]},{id:3,name:_0x632e[91],title:_0x632e[92],ModuleId:null,path:_0x632e[93]},{id:4,name:_0x632e[94],title:_0x632e[95],ModuleId:3,path:_0x632e[93]},{id:5,name:_0x632e[96],title:_0x632e[97],ModuleId:null,path:_0x632e[98]},{id:6,name:_0x632e[99],title:_0x632e[100],ModuleId:null,path:_0x632e[101]},{id:7,name:_0x632e[102],title:_0x632e[103],ModuleId:6,path:_0x632e[101]},{id:8,name:_0x632e[104],title:_0x632e[105],ModuleId:6,path:_0x632e[106]},{id:9,name:_0x632e[107],title:_0x632e[108],ModuleId:6,path:_0x632e[109]},{id:10,name:_0x632e[110],title:_0x632e[111],ModuleId:6,path:_0x632e[112]},{id:11,name:_0x632e[113],title:_0x632e[114],ModuleId:6,path:_0x632e[115]},{id:12,name:_0x632e[116],title:_0x632e[117],ModuleId:6,path:_0x632e[118]},{id:13,name:_0x632e[119],title:_0x632e[120],ModuleId:null,path:_0x632e[121]},{id:14,name:_0x632e[122],title:_0x632e[123],ModuleId:null,path:_0x632e[124]},{id:15,name:_0x632e[125],title:_0x632e[126],ModuleId:null,path:_0x632e[127]},{id:16,name:_0x632e[128],title:_0x632e[129],ModuleId:null,path:_0x632e[130]},{id:17,name:_0x632e[131],title:_0x632e[132],ModuleId:null,path:_0x632e[133]},{id:18,name:_0x632e[134],title:_0x632e[135],ModuleId:null,path:_0x632e[136]},{id:19,name:_0x632e[137],title:_0x632e[138],ModuleId:null,path:_0x632e[139]},{id:20,name:_0x632e[140],title:_0x632e[141],ModuleId:6,path:_0x632e[142]}];models[_0x632e[150]][_0x632e[154]]()[_0x632e[6]](function(_0x986fx6){var _0x986fx7=[];_0x986fx6= _[_0x632e[147]](_0x986fx6,_0x632e[146]);newModules[_0x632e[153]](function(_0x986fx8){if(_[_0x632e[148]](_0x986fx6,_0x986fx8[_0x632e[146]])){_0x986fx7[_0x632e[151]](models[_0x632e[150]][_0x632e[149]](_0x986fx8,{where:{id:_0x986fx8[_0x632e[146]]}}))}else {_0x986fx7[_0x632e[151]](models[_0x632e[150]][_0x632e[152]](_0x986fx8))}});return _0x986fx7})[_0x632e[19]]()[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[145])})[_0x632e[144]](function(_0x986fx5){console[_0x632e[5]](_0x632e[143],_0x986fx5)});models[_0x632e[159]][_0x632e[152]]({name:_0x632e[157],description:_0x632e[174],defaultEntry:true})[_0x632e[6]](function(_0x986fx9){models[_0x632e[70]][_0x632e[154]]({where:{role:_0x632e[8]}})[_0x632e[6]](function(_0x986fxa){_0x986fx9[_0x632e[156]](_[_0x632e[147]](_0x986fxa,_0x632e[146]))[_0x632e[6]](function(){models[_0x632e[163]][_0x632e[152]]({name:_0x632e[160],description:_0x632e[161],timeout:5,strategy:_0x632e[162]})[_0x632e[6]](function(_0x986fxb){console[_0x632e[5]](_0x632e[155]);models[_0x632e[159]][_0x632e[158]]({where:{name:_0x632e[157]},include:[{all:true}]})[_0x632e[6]](function(_0x986fx9){_0x986fxb[_0x632e[156]](_[_0x632e[147]](_0x986fx9.Users,_0x632e[146]))[_0x632e[144]](function(_0x986fx5){})})[_0x632e[144]](function(_0x986fx5){})});models[_0x632e[169]][_0x632e[152]]({name:_0x632e[167],description:_0x632e[168],timeout:5,strategy:_0x632e[162]})[_0x632e[6]](function(_0x986fxc){console[_0x632e[5]](_0x632e[164]);models[_0x632e[159]][_0x632e[158]]({where:{name:_0x632e[157]},include:[{all:true}]})[_0x632e[6]](function(_0x986fx9){if(_0x986fx9){console[_0x632e[5]](_0x632e[165])}else {console[_0x632e[5]](_0x632e[166])};_0x986fxc[_0x632e[156]](_[_0x632e[147]](_0x986fx9.Users,_0x632e[146]))[_0x632e[144]](function(_0x986fx5){})})[_0x632e[144]](function(_0x986fx5){})});models[_0x632e[173]][_0x632e[152]]({name:_0x632e[171],description:_0x632e[172],timeout:5,strategy:_0x632e[162]})[_0x632e[6]](function(_0x986fxd){console[_0x632e[5]](_0x632e[170]);models[_0x632e[159]][_0x632e[158]]({where:{name:_0x632e[157]},include:[{all:true}]})[_0x632e[6]](function(_0x986fx9){_0x986fxd[_0x632e[156]](_[_0x632e[147]](_0x986fx9.Users,_0x632e[146]))[_0x632e[144]](function(_0x986fx5){})})[_0x632e[144]](function(_0x986fx5){})})})[_0x632e[144]](function(_0x986fx5){})})[_0x632e[144]](function(_0x986fx5){})})[_0x632e[144]](function(_0x986fx5){});models[_0x632e[188]][_0x632e[152]]({name:_0x632e[187],description:_0x632e[187],address:_0x632e[179]})[_0x632e[6]](function(_0x986fxe){console[_0x632e[5]](_0x632e[175]);models[_0x632e[186]][_0x632e[152]]({description:_0x632e[61],host:_0x632e[182],username:_0x632e[179],password:_0x632e[180],port:143,mailbox:_0x632e[183],ssl:false,delete:false,filter:_0x632e[184],protocol:_0x632e[185],MailAccountId:_0x986fxe[_0x632e[146]]})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[176]);models[_0x632e[181]][_0x632e[152]]({description:_0x632e[61],host:_0x632e[178],username:_0x632e[179],password:_0x632e[180],port:587,ssl:false,MailAccountId:_0x986fxe[_0x632e[146]]})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[177])})[_0x632e[144]](function(_0x986fx5){})})[_0x632e[144]](function(_0x986fx5){})});models[_0x632e[192]][_0x632e[69]]([{name:_0x632e[190],description:_0x632e[191]}],{ignoreDuplicates:true})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[189])});models[_0x632e[212]][_0x632e[152]]({name:_0x632e[198],description:_0x632e[198],address:_0x632e[199],color:_0x632e[200],color_focus:_0x632e[200],color_button:_0x632e[200],remote:_0x632e[201],animation:true,header_shape:_0x632e[202],header_online:_0x632e[203],online_message:_0x632e[204],username_placeholder:_0x632e[205],email_placeholder:_0x632e[206],start_chat_button:_0x632e[207],header_offline:_0x632e[208],offline_message:_0x632e[209],enquiry_message_placeholder:_0x632e[210],enquiry_button:_0x632e[211],download_transcript:true})[_0x632e[6]](function(_0x986fxf){console[_0x632e[5]](_0x632e[193]);models[_0x632e[163]][_0x632e[154]]()[_0x632e[6]](function(_0x986fx10){models[_0x632e[196]][_0x632e[152]]({app:_0x632e[195],appdata:_0x986fx10[0][_0x632e[146]],priority:1,timeout:30,ChatWebsiteId:_0x986fxf[_0x632e[146]],ChatQueueId:_0x986fx10[0][_0x632e[146]]})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[194])})[_0x632e[144]](function(_0x986fx5){});models[_0x632e[196]][_0x632e[152]]({app:_0x632e[195],appdata:_0x986fx10[1][_0x632e[146]],priority:2,timeout:30,ChatWebsiteId:_0x986fxf[_0x632e[146]],ChatQueueId:_0x986fx10[1][_0x632e[146]]})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[197])})[_0x632e[144]](function(_0x986fx5){})})[_0x632e[144]](function(_0x986fx5){})})[_0x632e[144]](function(_0x986fx5){});models[_0x632e[215]][_0x632e[69]]([{name:_0x632e[214],description:_0x632e[191]}],{ignoreDuplicates:true})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[213])});models[_0x632e[221]][_0x632e[69]]([{name:_0x632e[20],description:_0x632e[217],defaultEntry:true},{name:_0x632e[77],description:_0x632e[217],defaultEntry:true},{name:_0x632e[218],description:_0x632e[217],defaultEntry:true},{name:_0x632e[219],description:_0x632e[217],defaultEntry:true},{name:_0x632e[220],description:_0x632e[217],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[216])});models[_0x632e[228]][_0x632e[69]]([{name:_0x632e[223],mode:_0x632e[224],directory:_0x632e[225],sort:_0x632e[226],format:_0x632e[227],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[222])});models[_0x632e[230]][_0x632e[69]]([{id:1,min_internal:1000,soundPath:_0x632e[229]}],{ignoreDuplicates:true,individualHooks:true})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[222])});models[_0x632e[242]][_0x632e[69]]([{id:1,name:_0x632e[231],model:JSON[_0x632e[241]]({title:_0x632e[231],rows:[{columns:[{styleClass:_0x632e[232],widgets:[{type:_0x632e[233],title:_0x632e[234],config:{timePattern:_0x632e[235],datePattern:_0x632e[236]}}]},{styleClass:_0x632e[237],widgets:[{type:_0x632e[238],title:_0x632e[239],config:{url:_0x632e[240]}}]}]}]}),defaultEntry:true,editable:false}],{ignoreDuplicates:true,individualHooks:true})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[222])});var newIntegrations=[{name:_0x632e[243],version:_0x632e[244],author:_0x632e[245],logo:_0x632e[246],state:_0x632e[247],description:_0x632e[248],link:_0x632e[249]},{name:_0x632e[250],version:_0x632e[244],author:_0x632e[245],logo:_0x632e[251],state:_0x632e[252],description:_0x632e[253],link:_0x632e[254]},{name:_0x632e[255],version:_0x632e[244],author:_0x632e[245],logo:_0x632e[256],state:_0x632e[238],description:_0x632e[257],link:_0x632e[258]},{name:_0x632e[259],version:_0x632e[244],author:_0x632e[245],logo:_0x632e[260],state:_0x632e[261],description:_0x632e[262]},{name:_0x632e[263],version:_0x632e[244],author:_0x632e[245],logo:_0x632e[264],state:_0x632e[265],description:_0x632e[266]},{name:_0x632e[267],version:_0x632e[244],author:_0x632e[245],logo:_0x632e[268],state:_0x632e[269],description:_0x632e[270]}];models[_0x632e[274]][_0x632e[154]]()[_0x632e[6]](function(_0x986fx12){var _0x986fx13=[];_0x986fx12= _[_0x632e[147]](_0x986fx12,_0x632e[273]);newIntegrations[_0x632e[153]](function(_0x986fx14){if(_[_0x632e[148]](_0x986fx12,_0x986fx14[_0x632e[273]])){_0x986fx13[_0x632e[151]](models[_0x632e[274]][_0x632e[149]](_0x986fx14,{where:{state:_0x986fx14[_0x632e[273]]}}))}else {_0x986fx13[_0x632e[151]](models[_0x632e[274]][_0x632e[152]](_0x986fx14))}});return _0x986fx13})[_0x632e[19]]()[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[272])})[_0x632e[144]](function(_0x986fx5){console[_0x632e[5]](_0x632e[271],_0x986fx5)});var newDefaulReports=[{"\x69\x64":1,"\x6E\x61\x6D\x65":_0x632e[275],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[276],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":2,"\x6E\x61\x6D\x65":_0x632e[279],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[280],"\x70\x61\x72\x65\x6E\x74":_0x632e[281],"\x74\x61\x62\x6C\x65":_0x632e[282],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":3,"\x6E\x61\x6D\x65":_0x632e[283],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[284],"\x70\x61\x72\x65\x6E\x74":_0x632e[281],"\x74\x61\x62\x6C\x65":_0x632e[282],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[285]},{"\x69\x64":4,"\x6E\x61\x6D\x65":_0x632e[286],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[287],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":5,"\x6E\x61\x6D\x65":_0x632e[279],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[288],"\x74\x61\x62\x6C\x65":_0x632e[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[290]},{"\x69\x64":6,"\x6E\x61\x6D\x65":_0x632e[291],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[288],"\x74\x61\x62\x6C\x65":_0x632e[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":7,"\x6E\x61\x6D\x65":_0x632e[286],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[288],"\x74\x61\x62\x6C\x65":_0x632e[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[290]},{"\x69\x64":8,"\x6E\x61\x6D\x65":_0x632e[292],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[288],"\x74\x61\x62\x6C\x65":_0x632e[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[290]},{"\x69\x64":9,"\x6E\x61\x6D\x65":_0x632e[293],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[288],"\x74\x61\x62\x6C\x65":_0x632e[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[290]},{"\x69\x64":10,"\x6E\x61\x6D\x65":_0x632e[279],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[294],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[295]},{"\x69\x64":11,"\x6E\x61\x6D\x65":_0x632e[296],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[294],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[295]},{"\x69\x64":12,"\x6E\x61\x6D\x65":_0x632e[297],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[294],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[298]},{"\x69\x64":13,"\x6E\x61\x6D\x65":_0x632e[299],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[294],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[300]},{"\x69\x64":14,"\x6E\x61\x6D\x65":_0x632e[301],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[287],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":15,"\x6E\x61\x6D\x65":_0x632e[302],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[287],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":16,"\x6E\x61\x6D\x65":_0x632e[303],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[287],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":17,"\x6E\x61\x6D\x65":_0x632e[304],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[281],"\x74\x61\x62\x6C\x65":_0x632e[282],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":18,"\x6E\x61\x6D\x65":_0x632e[305],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[306],"\x70\x61\x72\x65\x6E\x74":_0x632e[281],"\x74\x61\x62\x6C\x65":_0x632e[282],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[285]},{"\x69\x64":19,"\x6E\x61\x6D\x65":_0x632e[307],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[308],"\x74\x61\x62\x6C\x65":_0x632e[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[310]},{"\x69\x64":20,"\x6E\x61\x6D\x65":_0x632e[311],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[308],"\x74\x61\x62\x6C\x65":_0x632e[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[312]},{"\x69\x64":21,"\x6E\x61\x6D\x65":_0x632e[313],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[314],"\x74\x61\x62\x6C\x65":_0x632e[315],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":22,"\x6E\x61\x6D\x65":_0x632e[316],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[314],"\x74\x61\x62\x6C\x65":_0x632e[315],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":23,"\x6E\x61\x6D\x65":_0x632e[317],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[314],"\x74\x61\x62\x6C\x65":_0x632e[315],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[318]},{"\x69\x64":24,"\x6E\x61\x6D\x65":_0x632e[319],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[314],"\x74\x61\x62\x6C\x65":_0x632e[315],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[320]},{"\x69\x64":25,"\x6E\x61\x6D\x65":_0x632e[279],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[321],"\x70\x61\x72\x65\x6E\x74":_0x632e[308],"\x74\x61\x62\x6C\x65":_0x632e[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[322]},{"\x69\x64":26,"\x6E\x61\x6D\x65":_0x632e[323],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[324],"\x70\x61\x72\x65\x6E\x74":_0x632e[325],"\x74\x61\x62\x6C\x65":_0x632e[326],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":27,"\x6E\x61\x6D\x65":_0x632e[327],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[328],"\x70\x61\x72\x65\x6E\x74":_0x632e[325],"\x74\x61\x62\x6C\x65":_0x632e[329],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":28,"\x6E\x61\x6D\x65":_0x632e[330],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[321],"\x70\x61\x72\x65\x6E\x74":_0x632e[331],"\x74\x61\x62\x6C\x65":_0x632e[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[332]},{"\x69\x64":29,"\x6E\x61\x6D\x65":_0x632e[333],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[334],"\x70\x61\x72\x65\x6E\x74":_0x632e[331],"\x74\x61\x62\x6C\x65":_0x632e[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[335]},{"\x69\x64":30,"\x6E\x61\x6D\x65":_0x632e[336],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[321],"\x70\x61\x72\x65\x6E\x74":_0x632e[308],"\x74\x61\x62\x6C\x65":_0x632e[309],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[337]},{"\x69\x64":31,"\x6E\x61\x6D\x65":_0x632e[338],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[339],"\x74\x61\x62\x6C\x65":_0x632e[340],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":32,"\x6E\x61\x6D\x65":_0x632e[341],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[339],"\x74\x61\x62\x6C\x65":_0x632e[340],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[342]},{"\x69\x64":33,"\x6E\x61\x6D\x65":_0x632e[343],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[276],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":34,"\x6E\x61\x6D\x65":_0x632e[344],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0x632e[288],"\x74\x61\x62\x6C\x65":_0x632e[289],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[290]},{"\x69\x64":35,"\x6E\x61\x6D\x65":_0x632e[345],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[346],"\x70\x61\x72\x65\x6E\x74":_0x632e[347],"\x74\x61\x62\x6C\x65":_0x632e[348],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":36,"\x6E\x61\x6D\x65":_0x632e[349],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[350],"\x70\x61\x72\x65\x6E\x74":_0x632e[347],"\x74\x61\x62\x6C\x65":_0x632e[348],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[351]},{"\x69\x64":37,"\x6E\x61\x6D\x65":_0x632e[352],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[353],"\x70\x61\x72\x65\x6E\x74":_0x632e[347],"\x74\x61\x62\x6C\x65":_0x632e[348],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[354]},{"\x69\x64":38,"\x6E\x61\x6D\x65":_0x632e[355],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[356],"\x70\x61\x72\x65\x6E\x74":_0x632e[347],"\x74\x61\x62\x6C\x65":_0x632e[357],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[358]},{"\x69\x64":39,"\x6E\x61\x6D\x65":_0x632e[359],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[360],"\x70\x61\x72\x65\x6E\x74":_0x632e[347],"\x74\x61\x62\x6C\x65":_0x632e[361],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[278]},{"\x69\x64":40,"\x6E\x61\x6D\x65":_0x632e[362],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[363],"\x70\x61\x72\x65\x6E\x74":_0x632e[347],"\x74\x61\x62\x6C\x65":_0x632e[361],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[364]},{"\x69\x64":41,"\x6E\x61\x6D\x65":_0x632e[365],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[366],"\x70\x61\x72\x65\x6E\x74":_0x632e[347],"\x74\x61\x62\x6C\x65":_0x632e[361],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0x632e[367]}];var newDefaultMetrics=[{"\x69\x64":1,"\x6E\x61\x6D\x65":_0x632e[368],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[369]},{"\x69\x64":2,"\x6E\x61\x6D\x65":_0x632e[370],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[371]},{"\x69\x64":3,"\x6E\x61\x6D\x65":_0x632e[372],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[373],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[374]},{"\x69\x64":4,"\x6E\x61\x6D\x65":_0x632e[375],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[376]},{"\x69\x64":5,"\x6E\x61\x6D\x65":_0x632e[377],"\x74\x61\x62\x6C\x65":_0x632e[289],"\x6D\x65\x74\x72\x69\x63":_0x632e[378],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[379]},{"\x69\x64":6,"\x6E\x61\x6D\x65":_0x632e[380],"\x74\x61\x62\x6C\x65":_0x632e[289],"\x6D\x65\x74\x72\x69\x63":_0x632e[381],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[382]},{"\x69\x64":7,"\x6E\x61\x6D\x65":_0x632e[383],"\x74\x61\x62\x6C\x65":_0x632e[289],"\x6D\x65\x74\x72\x69\x63":_0x632e[384],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[385]},{"\x69\x64":8,"\x6E\x61\x6D\x65":_0x632e[386],"\x74\x61\x62\x6C\x65":_0x632e[289],"\x6D\x65\x74\x72\x69\x63":_0x632e[387],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[388]},{"\x69\x64":9,"\x6E\x61\x6D\x65":_0x632e[389],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[390]},{"\x69\x64":10,"\x6E\x61\x6D\x65":_0x632e[391],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[392],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[393]},{"\x69\x64":11,"\x6E\x61\x6D\x65":_0x632e[394],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[395],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[396]},{"\x69\x64":12,"\x6E\x61\x6D\x65":_0x632e[397],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[398],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[399]},{"\x69\x64":13,"\x6E\x61\x6D\x65":_0x632e[400],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[401],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[402]},{"\x69\x64":14,"\x6E\x61\x6D\x65":_0x632e[403],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[404],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[405]},{"\x69\x64":15,"\x6E\x61\x6D\x65":_0x632e[406],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[407],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[408]},{"\x69\x64":16,"\x6E\x61\x6D\x65":_0x632e[409],"\x74\x61\x62\x6C\x65":_0x632e[309],"\x6D\x65\x74\x72\x69\x63":_0x632e[410],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[411]},{"\x69\x64":17,"\x6E\x61\x6D\x65":_0x632e[412],"\x74\x61\x62\x6C\x65":_0x632e[309],"\x6D\x65\x74\x72\x69\x63":_0x632e[413],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[414]},{"\x69\x64":18,"\x6E\x61\x6D\x65":_0x632e[415],"\x74\x61\x62\x6C\x65":_0x632e[315],"\x6D\x65\x74\x72\x69\x63":_0x632e[416],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[417]},{"\x69\x64":19,"\x6E\x61\x6D\x65":_0x632e[418],"\x74\x61\x62\x6C\x65":_0x632e[315],"\x6D\x65\x74\x72\x69\x63":_0x632e[419],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[420]},{"\x69\x64":20,"\x6E\x61\x6D\x65":_0x632e[421],"\x74\x61\x62\x6C\x65":_0x632e[315],"\x6D\x65\x74\x72\x69\x63":_0x632e[422],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[423]},{"\x69\x64":21,"\x6E\x61\x6D\x65":_0x632e[424],"\x74\x61\x62\x6C\x65":_0x632e[315],"\x6D\x65\x74\x72\x69\x63":_0x632e[425],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[426]},{"\x69\x64":22,"\x6E\x61\x6D\x65":_0x632e[427],"\x74\x61\x62\x6C\x65":_0x632e[309],"\x6D\x65\x74\x72\x69\x63":_0x632e[428],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[429]},{"\x69\x64":23,"\x6E\x61\x6D\x65":_0x632e[430],"\x74\x61\x62\x6C\x65":_0x632e[326],"\x6D\x65\x74\x72\x69\x63":_0x632e[431],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[432]},{"\x69\x64":24,"\x6E\x61\x6D\x65":_0x632e[433],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[434],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null},{"\x69\x64":25,"\x6E\x61\x6D\x65":_0x632e[435],"\x74\x61\x62\x6C\x65":_0x632e[277],"\x6D\x65\x74\x72\x69\x63":_0x632e[436],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x632e[437]}];models[_0x632e[675]][_0x632e[670]]({where:{id:1}})[_0x632e[6]](function(){return models[_0x632e[675]][_0x632e[152]]({id:1,tree:_0x632e[676]})})[_0x632e[6]](function(){return models[_0x632e[675]][_0x632e[674]]({where:{id:2},defaults:{id:2,tree:_0x632e[673]}})})[_0x632e[6]](function(){return models[_0x632e[672]][_0x632e[154]]()})[_0x632e[6]](function(_0x986fx1a){var _0x986fx1b=[];_0x986fx1a= _[_0x632e[147]](_0x986fx1a,_0x632e[146]);newDefaultMetrics[_0x632e[153]](function(_0x986fx1c){if(_[_0x632e[148]](_0x986fx1a,_0x986fx1c[_0x632e[146]])){_0x986fx1b[_0x632e[151]](models[_0x632e[672]][_0x632e[149]](_0x986fx1c,{where:{id:_0x986fx1c[_0x632e[146]]}}))}else {_0x986fx1b[_0x632e[151]](models[_0x632e[672]][_0x632e[152]](_0x986fx1c))}});return _0x986fx1b})[_0x632e[19]]()[_0x632e[6]](function(){return models[_0x632e[671]][_0x632e[154]]()})[_0x632e[6]](function(_0x986fx17){var _0x986fx18=[];_0x986fx17= _[_0x632e[147]](_0x986fx17,_0x632e[146]);newDefaulReports[_0x632e[153]](function(_0x986fx19){if(_[_0x632e[148]](_0x986fx17,_0x986fx19[_0x632e[146]])){_0x986fx18[_0x632e[151]](models[_0x632e[671]][_0x632e[149]](_0x986fx19,{where:{id:_0x986fx19[_0x632e[146]]}}))}else {_0x986fx18[_0x632e[151]](models[_0x632e[671]][_0x632e[152]](_0x986fx19))}});return _0x986fx18})[_0x632e[19]]()[_0x632e[6]](function(){return models[_0x632e[669]][_0x632e[670]]({where:{DefaultReportId:{$gt:0}}})})[_0x632e[6]](function(){return models[_0x632e[669]][_0x632e[69]]([{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[441],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[442],"\x61\x6C\x69\x61\x73":_0x632e[443],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[444],"\x61\x6C\x69\x61\x73":_0x632e[445],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[195],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[447],"\x61\x6C\x69\x61\x73":_0x632e[448],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[449],"\x61\x6C\x69\x61\x73":_0x632e[450],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[451],"\x61\x6C\x69\x61\x73":_0x632e[452],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[453],"\x61\x6C\x69\x61\x73":_0x632e[454],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[455],"\x61\x6C\x69\x61\x73":_0x632e[456],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[457],"\x61\x6C\x69\x61\x73":_0x632e[458],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[459],"\x61\x6C\x69\x61\x73":_0x632e[460],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[461],"\x61\x6C\x69\x61\x73":_0x632e[462],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[463],"\x61\x6C\x69\x61\x73":_0x632e[464],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[465],"\x61\x6C\x69\x61\x73":_0x632e[466],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[369],"\x61\x6C\x69\x61\x73":_0x632e[467],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[376],"\x61\x6C\x69\x61\x73":_0x632e[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":4,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[371],"\x61\x6C\x69\x61\x73":_0x632e[469],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":1},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[470],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[471],"\x61\x6C\x69\x61\x73":_0x632e[472],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[473],"\x61\x6C\x69\x61\x73":_0x632e[474],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[475],"\x61\x6C\x69\x61\x73":_0x632e[476],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[477],"\x61\x6C\x69\x61\x73":_0x632e[478],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[479],"\x61\x6C\x69\x61\x73":_0x632e[480],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[481],"\x61\x6C\x69\x61\x73":_0x632e[482],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[483],"\x61\x6C\x69\x61\x73":_0x632e[484],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[485],"\x61\x6C\x69\x61\x73":_0x632e[486],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[487],"\x61\x6C\x69\x61\x73":_0x632e[488],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[489],"\x61\x6C\x69\x61\x73":_0x632e[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[490],"\x61\x6C\x69\x61\x73":_0x632e[491],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[492],"\x61\x6C\x69\x61\x73":_0x632e[493],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[494],"\x61\x6C\x69\x61\x73":_0x632e[495],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":2},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[470],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[496],"\x61\x6C\x69\x61\x73":_0x632e[497],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[475],"\x61\x6C\x69\x61\x73":_0x632e[476],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[477],"\x61\x6C\x69\x61\x73":_0x632e[478],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[479],"\x61\x6C\x69\x61\x73":_0x632e[498],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[487],"\x61\x6C\x69\x61\x73":_0x632e[488],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[489],"\x61\x6C\x69\x61\x73":_0x632e[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[490],"\x61\x6C\x69\x61\x73":_0x632e[499],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[492],"\x61\x6C\x69\x61\x73":_0x632e[493],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[500],"\x61\x6C\x69\x61\x73":_0x632e[501],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[494],"\x61\x6C\x69\x61\x73":_0x632e[495],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[473],"\x61\x6C\x69\x61\x73":_0x632e[474],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":3},{"\x66\x69\x65\x6C\x64":_0x632e[195],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[502],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x632e[455],"\x61\x6C\x69\x61\x73":_0x632e[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x632e[451],"\x61\x6C\x69\x61\x73":_0x632e[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x632e[459],"\x61\x6C\x69\x61\x73":_0x632e[507],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x632e[369],"\x61\x6C\x69\x61\x73":_0x632e[508],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x632e[371],"\x61\x6C\x69\x61\x73":_0x632e[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x632e[376],"\x61\x6C\x69\x61\x73":_0x632e[511],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":4,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":4},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[441],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[442],"\x61\x6C\x69\x61\x73":_0x632e[443],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[444],"\x61\x6C\x69\x61\x73":_0x632e[445],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[195],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[512],"\x61\x6C\x69\x61\x73":_0x632e[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[514],"\x61\x6C\x69\x61\x73":_0x632e[515],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[516],"\x61\x6C\x69\x61\x73":_0x632e[517],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[518],"\x61\x6C\x69\x61\x73":_0x632e[519],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[520],"\x61\x6C\x69\x61\x73":_0x632e[468],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[521],"\x61\x6C\x69\x61\x73":_0x632e[467],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[522],"\x61\x6C\x69\x61\x73":_0x632e[523],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[524],"\x61\x6C\x69\x61\x73":_0x632e[525],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[526],"\x61\x6C\x69\x61\x73":_0x632e[527],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[528],"\x61\x6C\x69\x61\x73":_0x632e[529],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[530],"\x61\x6C\x69\x61\x73":_0x632e[531],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[465],"\x61\x6C\x69\x61\x73":_0x632e[466],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":5},{"\x66\x69\x65\x6C\x64":_0x632e[512],"\x61\x6C\x69\x61\x73":_0x632e[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x632e[526],"\x61\x6C\x69\x61\x73":_0x632e[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x632e[532],"\x61\x6C\x69\x61\x73":_0x632e[533],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x632e[521],"\x61\x6C\x69\x61\x73":_0x632e[534],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x632e[524],"\x61\x6C\x69\x61\x73":_0x632e[535],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x632e[521],"\x61\x6C\x69\x61\x73":_0x632e[508],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x632e[524],"\x61\x6C\x69\x61\x73":_0x632e[536],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":6},{"\x66\x69\x65\x6C\x64":_0x632e[195],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x632e[526],"\x61\x6C\x69\x61\x73":_0x632e[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x632e[521],"\x61\x6C\x69\x61\x73":_0x632e[537],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x632e[521],"\x61\x6C\x69\x61\x73":_0x632e[538],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x632e[520],"\x61\x6C\x69\x61\x73":_0x632e[539],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x632e[520],"\x61\x6C\x69\x61\x73":_0x632e[540],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x632e[524],"\x61\x6C\x69\x61\x73":_0x632e[541],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x632e[524],"\x61\x6C\x69\x61\x73":_0x632e[542],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":7},{"\x66\x69\x65\x6C\x64":_0x632e[195],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x632e[526],"\x61\x6C\x69\x61\x73":_0x632e[543],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x632e[378],"\x61\x6C\x69\x61\x73":_0x632e[544],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":5,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x632e[381],"\x61\x6C\x69\x61\x73":_0x632e[380],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":6,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x632e[384],"\x61\x6C\x69\x61\x73":_0x632e[383],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":7,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x632e[387],"\x61\x6C\x69\x61\x73":_0x632e[386],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":8,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":8},{"\x66\x69\x65\x6C\x64":_0x632e[528],"\x61\x6C\x69\x61\x73":_0x632e[545],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":9},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[546],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":9},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[441],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[442],"\x61\x6C\x69\x61\x73":_0x632e[443],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[195],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[447],"\x61\x6C\x69\x61\x73":_0x632e[448],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[449],"\x61\x6C\x69\x61\x73":_0x632e[450],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[451],"\x61\x6C\x69\x61\x73":_0x632e[452],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[453],"\x61\x6C\x69\x61\x73":_0x632e[454],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[371],"\x61\x6C\x69\x61\x73":_0x632e[547],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[459],"\x61\x6C\x69\x61\x73":_0x632e[460],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[461],"\x61\x6C\x69\x61\x73":_0x632e[462],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[463],"\x61\x6C\x69\x61\x73":_0x632e[464],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[390],"\x61\x6C\x69\x61\x73":_0x632e[548],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":9,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[549],"\x61\x6C\x69\x61\x73":_0x632e[550],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[465],"\x61\x6C\x69\x61\x73":_0x632e[466],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":10},{"\x66\x69\x65\x6C\x64":_0x632e[195],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x632e[451],"\x61\x6C\x69\x61\x73":_0x632e[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x632e[371],"\x61\x6C\x69\x61\x73":_0x632e[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x632e[371],"\x61\x6C\x69\x61\x73":_0x632e[551],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x632e[459],"\x61\x6C\x69\x61\x73":_0x632e[552],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x632e[390],"\x61\x6C\x69\x61\x73":_0x632e[553],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":9,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x632e[390],"\x61\x6C\x69\x61\x73":_0x632e[554],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":9,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":11},{"\x66\x69\x65\x6C\x64":_0x632e[463],"\x61\x6C\x69\x61\x73":_0x632e[545],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":12},{"\x66\x69\x65\x6C\x64":_0x632e[459],"\x61\x6C\x69\x61\x73":_0x632e[546],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":12},{"\x66\x69\x65\x6C\x64":_0x632e[390],"\x61\x6C\x69\x61\x73":_0x632e[555],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":9,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":12},{"\x66\x69\x65\x6C\x64":_0x632e[195],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x632e[451],"\x61\x6C\x69\x61\x73":_0x632e[556],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x632e[373],"\x61\x6C\x69\x61\x73":_0x632e[557],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":3,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x632e[392],"\x61\x6C\x69\x61\x73":_0x632e[391],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":10,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x632e[395],"\x61\x6C\x69\x61\x73":_0x632e[394],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":11,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x632e[398],"\x61\x6C\x69\x61\x73":_0x632e[558],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":12,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":13},{"\x66\x69\x65\x6C\x64":_0x632e[401],"\x61\x6C\x69\x61\x73":_0x632e[559],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":13,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[502],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x632e[455],"\x61\x6C\x69\x61\x73":_0x632e[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x632e[451],"\x61\x6C\x69\x61\x73":_0x632e[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x632e[459],"\x61\x6C\x69\x61\x73":_0x632e[507],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x632e[369],"\x61\x6C\x69\x61\x73":_0x632e[508],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x632e[371],"\x61\x6C\x69\x61\x73":_0x632e[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x632e[376],"\x61\x6C\x69\x61\x73":_0x632e[511],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":4,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":14},{"\x66\x69\x65\x6C\x64":_0x632e[404],"\x61\x6C\x69\x61\x73":_0x632e[560],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":14,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[502],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x632e[455],"\x61\x6C\x69\x61\x73":_0x632e[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x632e[451],"\x61\x6C\x69\x61\x73":_0x632e[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x632e[459],"\x61\x6C\x69\x61\x73":_0x632e[507],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x632e[369],"\x61\x6C\x69\x61\x73":_0x632e[508],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x632e[371],"\x61\x6C\x69\x61\x73":_0x632e[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x632e[376],"\x61\x6C\x69\x61\x73":_0x632e[511],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":4,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":15},{"\x66\x69\x65\x6C\x64":_0x632e[407],"\x61\x6C\x69\x61\x73":_0x632e[561],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":15,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[502],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x632e[455],"\x61\x6C\x69\x61\x73":_0x632e[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x632e[451],"\x61\x6C\x69\x61\x73":_0x632e[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x632e[459],"\x61\x6C\x69\x61\x73":_0x632e[507],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x632e[369],"\x61\x6C\x69\x61\x73":_0x632e[508],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x632e[371],"\x61\x6C\x69\x61\x73":_0x632e[510],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":2,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x632e[376],"\x61\x6C\x69\x61\x73":_0x632e[511],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":4,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":16},{"\x66\x69\x65\x6C\x64":_0x632e[471],"\x61\x6C\x69\x61\x73":_0x632e[472],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":17},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[546],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":17},{"\x66\x69\x65\x6C\x64":_0x632e[492],"\x61\x6C\x69\x61\x73":_0x632e[562],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":17},{"\x66\x69\x65\x6C\x64":_0x632e[492],"\x61\x6C\x69\x61\x73":_0x632e[563],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":17},{"\x66\x69\x65\x6C\x64":_0x632e[494],"\x61\x6C\x69\x61\x73":_0x632e[495],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":18},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[546],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":18},{"\x66\x69\x65\x6C\x64":_0x632e[492],"\x61\x6C\x69\x61\x73":_0x632e[562],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":18},{"\x66\x69\x65\x6C\x64":_0x632e[492],"\x61\x6C\x69\x61\x73":_0x632e[563],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":18},{"\x66\x69\x65\x6C\x64":_0x632e[512],"\x61\x6C\x69\x61\x73":_0x632e[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0x632e[564],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":19},{"\x66\x69\x65\x6C\x64":_0x632e[565],"\x61\x6C\x69\x61\x73":_0x632e[566],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0x632e[564],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":19},{"\x66\x69\x65\x6C\x64":_0x632e[413],"\x61\x6C\x69\x61\x73":_0x632e[493],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":17,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":19},{"\x66\x69\x65\x6C\x64":_0x632e[512],"\x61\x6C\x69\x61\x73":_0x632e[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0x632e[564],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":20},{"\x66\x69\x65\x6C\x64":_0x632e[413],"\x61\x6C\x69\x61\x73":_0x632e[493],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":17,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":20},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[441],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[567],"\x61\x6C\x69\x61\x73":_0x632e[568],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[569],"\x61\x6C\x69\x61\x73":_0x632e[570],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22},{"\x66\x69\x65\x6C\x64":_0x632e[571],"\x61\x6C\x69\x61\x73":_0x632e[572],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[512],"\x61\x6C\x69\x61\x73":_0x632e[573],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[574],"\x61\x6C\x69\x61\x73":_0x632e[575],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[576],"\x61\x6C\x69\x61\x73":_0x632e[577],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[578],"\x61\x6C\x69\x61\x73":_0x632e[579],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[580],"\x61\x6C\x69\x61\x73":_0x632e[458],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[581],"\x61\x6C\x69\x61\x73":_0x632e[456],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[582],"\x61\x6C\x69\x61\x73":_0x632e[583],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[584],"\x61\x6C\x69\x61\x73":_0x632e[585],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[586],"\x61\x6C\x69\x61\x73":_0x632e[587],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":22,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[512],"\x61\x6C\x69\x61\x73":_0x632e[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[581],"\x61\x6C\x69\x61\x73":_0x632e[588],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[419],"\x61\x6C\x69\x61\x73":_0x632e[589],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x63\x72\x65\x61\x74\x65\x64\x41\x74":_0x632e[590],"\x75\x70\x64\x61\x74\x65\x64\x41\x74":_0x632e[590],"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":19,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[422],"\x61\x6C\x69\x61\x73":_0x632e[591],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":20,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[416],"\x61\x6C\x69\x61\x73":_0x632e[592],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":18,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593]},{"\x66\x69\x65\x6C\x64":_0x632e[416],"\x61\x6C\x69\x61\x73":_0x632e[594],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":18,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":23,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593]},{"\x66\x69\x65\x6C\x64":_0x632e[567],"\x61\x6C\x69\x61\x73":_0x632e[595],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[596],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[597],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[581],"\x61\x6C\x69\x61\x73":_0x632e[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[584],"\x61\x6C\x69\x61\x73":_0x632e[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[416],"\x61\x6C\x69\x61\x73":_0x632e[417],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":18,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593]},{"\x66\x69\x65\x6C\x64":_0x632e[425],"\x61\x6C\x69\x61\x73":_0x632e[594],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":21,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":21,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593]},{"\x66\x69\x65\x6C\x64":_0x632e[574],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[596],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[581],"\x61\x6C\x69\x61\x73":_0x632e[504],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[584],"\x61\x6C\x69\x61\x73":_0x632e[506],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[586],"\x61\x6C\x69\x61\x73":_0x632e[507],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":null},{"\x66\x69\x65\x6C\x64":_0x632e[416],"\x61\x6C\x69\x61\x73":_0x632e[417],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":18,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593]},{"\x66\x69\x65\x6C\x64":_0x632e[425],"\x61\x6C\x69\x61\x73":_0x632e[594],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":21,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":24,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593]},{"\x66\x69\x65\x6C\x64":_0x632e[512],"\x61\x6C\x69\x61\x73":_0x632e[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x632e[598],"\x61\x6C\x69\x61\x73":_0x632e[599],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x632e[471],"\x61\x6C\x69\x61\x73":_0x632e[600],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x632e[565],"\x61\x6C\x69\x61\x73":_0x632e[601],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x632e[602],"\x61\x6C\x69\x61\x73":_0x632e[603],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x632e[604],"\x61\x6C\x69\x61\x73":_0x632e[605],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x632e[428],"\x61\x6C\x69\x61\x73":_0x632e[493],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":22,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x632e[606],"\x61\x6C\x69\x61\x73":_0x632e[607],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[470],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x632e[479],"\x61\x6C\x69\x61\x73":_0x632e[480],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x632e[608],"\x61\x6C\x69\x61\x73":_0x632e[466],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x632e[576],"\x61\x6C\x69\x61\x73":_0x632e[609],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":_0x632e[564],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x632e[578],"\x61\x6C\x69\x61\x73":_0x632e[610],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26},{"\x66\x69\x65\x6C\x64":_0x632e[431],"\x61\x6C\x69\x61\x73":_0x632e[493],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":23,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593]},{"\x66\x69\x65\x6C\x64":_0x632e[606],"\x61\x6C\x69\x61\x73":_0x632e[607],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":27},{"\x66\x69\x65\x6C\x64":_0x632e[479],"\x61\x6C\x69\x61\x73":_0x632e[611],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":27},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[612],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":27},{"\x66\x69\x65\x6C\x64":_0x632e[613],"\x61\x6C\x69\x61\x73":_0x632e[327],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[614],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":27},{"\x66\x69\x65\x6C\x64":_0x632e[512],"\x61\x6C\x69\x61\x73":_0x632e[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28},{"\x66\x69\x65\x6C\x64":_0x632e[602],"\x61\x6C\x69\x61\x73":_0x632e[603],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28},{"\x66\x69\x65\x6C\x64":_0x632e[604],"\x61\x6C\x69\x61\x73":_0x632e[605],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28},{"\x66\x69\x65\x6C\x64":_0x632e[492],"\x61\x6C\x69\x61\x73":_0x632e[493],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593]},{"\x66\x69\x65\x6C\x64":_0x632e[615],"\x61\x6C\x69\x61\x73":_0x632e[616],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29},{"\x66\x69\x65\x6C\x64":_0x632e[565],"\x61\x6C\x69\x61\x73":_0x632e[472],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29},{"\x66\x69\x65\x6C\x64":_0x632e[492],"\x61\x6C\x69\x61\x73":_0x632e[493],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593]},{"\x66\x69\x65\x6C\x64":_0x632e[512],"\x61\x6C\x69\x61\x73":_0x632e[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30},{"\x66\x69\x65\x6C\x64":_0x632e[602],"\x61\x6C\x69\x61\x73":_0x632e[603],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30},{"\x66\x69\x65\x6C\x64":_0x632e[604],"\x61\x6C\x69\x61\x73":_0x632e[605],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30},{"\x66\x69\x65\x6C\x64":_0x632e[565],"\x61\x6C\x69\x61\x73":_0x632e[617],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30},{"\x66\x69\x65\x6C\x64":_0x632e[492],"\x61\x6C\x69\x61\x73":_0x632e[493],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593]},{"\x66\x69\x65\x6C\x64":_0x632e[618],"\x61\x6C\x69\x61\x73":_0x632e[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[619],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31},{"\x66\x69\x65\x6C\x64":_0x632e[620],"\x61\x6C\x69\x61\x73":_0x632e[621],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31},{"\x66\x69\x65\x6C\x64":_0x632e[620],"\x61\x6C\x69\x61\x73":_0x632e[622],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31},{"\x66\x69\x65\x6C\x64":_0x632e[195],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[619],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32},{"\x66\x69\x65\x6C\x64":_0x632e[620],"\x61\x6C\x69\x61\x73":_0x632e[621],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32},{"\x66\x69\x65\x6C\x64":_0x632e[620],"\x61\x6C\x69\x61\x73":_0x632e[622],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[509],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32},{"\x66\x69\x65\x6C\x64":_0x632e[442],"\x61\x6C\x69\x61\x73":_0x632e[443],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":33},{"\x66\x69\x65\x6C\x64":_0x632e[195],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":33},{"\x66\x69\x65\x6C\x64":_0x632e[447],"\x61\x6C\x69\x61\x73":_0x632e[488],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":33},{"\x66\x69\x65\x6C\x64":_0x632e[434],"\x61\x6C\x69\x61\x73":_0x632e[491],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":33,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":24},{"\x66\x69\x65\x6C\x64":_0x632e[436],"\x61\x6C\x69\x61\x73":_0x632e[623],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":33,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":25},{"\x66\x69\x65\x6C\x64":_0x632e[516],"\x61\x6C\x69\x61\x73":_0x632e[560],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x66\x6F\x72\x6D\x61\x74":_0x632e[624]},{"\x66\x69\x65\x6C\x64":_0x632e[526],"\x61\x6C\x69\x61\x73":_0x632e[543],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34},{"\x66\x69\x65\x6C\x64":_0x632e[378],"\x61\x6C\x69\x61\x73":_0x632e[544],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":5,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34},{"\x66\x69\x65\x6C\x64":_0x632e[381],"\x61\x6C\x69\x61\x73":_0x632e[380],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":6,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34},{"\x66\x69\x65\x6C\x64":_0x632e[384],"\x61\x6C\x69\x61\x73":_0x632e[383],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":7,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34},{"\x66\x69\x65\x6C\x64":_0x632e[387],"\x61\x6C\x69\x61\x73":_0x632e[386],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":8,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34},{"\x66\x69\x65\x6C\x64":_0x632e[625],"\x61\x6C\x69\x61\x73":_0x632e[626],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[627],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[597],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x632e[628],"\x61\x6C\x69\x61\x73":_0x632e[629],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x632e[630],"\x61\x6C\x69\x61\x73":_0x632e[631],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x632e[632],"\x61\x6C\x69\x61\x73":_0x632e[633],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x632e[634],"\x61\x6C\x69\x61\x73":_0x632e[635],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x632e[636],"\x61\x6C\x69\x61\x73":_0x632e[637],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35},{"\x66\x69\x65\x6C\x64":_0x632e[574],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[627],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x632e[638],"\x61\x6C\x69\x61\x73":_0x632e[629],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x632e[639],"\x61\x6C\x69\x61\x73":_0x632e[640],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x632e[641],"\x61\x6C\x69\x61\x73":_0x632e[631],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x632e[642],"\x61\x6C\x69\x61\x73":_0x632e[643],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593],"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x632e[512],"\x61\x6C\x69\x61\x73":_0x632e[512],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36},{"\x66\x69\x65\x6C\x64":_0x632e[440],"\x61\x6C\x69\x61\x73":_0x632e[644],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37},{"\x66\x69\x65\x6C\x64":_0x632e[645],"\x61\x6C\x69\x61\x73":_0x632e[646],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37},{"\x66\x69\x65\x6C\x64":_0x632e[647],"\x61\x6C\x69\x61\x73":_0x632e[513],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37},{"\x66\x69\x65\x6C\x64":_0x632e[648],"\x61\x6C\x69\x61\x73":_0x632e[446],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37},{"\x66\x69\x65\x6C\x64":_0x632e[649],"\x61\x6C\x69\x61\x73":_0x632e[559],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x63\x75\x73\x74\x6F\x6D":0,"\x66\x6F\x72\x6D\x61\x74":_0x632e[650],"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38},{"\x66\x69\x65\x6C\x64":_0x632e[651],"\x61\x6C\x69\x61\x73":_0x632e[627],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38},{"\x66\x69\x65\x6C\x64":_0x632e[652],"\x61\x6C\x69\x61\x73":_0x632e[653],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[505],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x63\x75\x73\x74\x6F\x6D":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38},{"\x66\x69\x65\x6C\x64":_0x632e[146],"\x61\x6C\x69\x61\x73":_0x632e[146],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[654],"\x61\x6C\x69\x61\x73":_0x632e[654],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[655],"\x61\x6C\x69\x61\x73":_0x632e[655],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[656],"\x61\x6C\x69\x61\x73":_0x632e[656],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[649],"\x61\x6C\x69\x61\x73":_0x632e[649],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[657],"\x61\x6C\x69\x61\x73":_0x632e[657],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[658],"\x61\x6C\x69\x61\x73":_0x632e[658],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[659],"\x61\x6C\x69\x61\x73":_0x632e[659],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[660],"\x61\x6C\x69\x61\x73":_0x632e[660],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[661],"\x61\x6C\x69\x61\x73":_0x632e[661],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[662],"\x61\x6C\x69\x61\x73":_0x632e[662],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[494],"\x61\x6C\x69\x61\x73":_0x632e[494],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[663],"\x61\x6C\x69\x61\x73":_0x632e[663],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":39,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[494],"\x61\x6C\x69\x61\x73":_0x632e[494],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[664],"\x61\x6C\x69\x61\x73":_0x632e[665],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x63\x75\x73\x74\x6F\x6D":1},{"\x66\x69\x65\x6C\x64":_0x632e[659],"\x61\x6C\x69\x61\x73":_0x632e[659],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x66\x6F\x72\x6D\x61\x74":_0x632e[650],"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[146],"\x61\x6C\x69\x61\x73":_0x632e[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0x632e[503],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x63\x75\x73\x74\x6F\x6D":0},{"\x66\x69\x65\x6C\x64":_0x632e[667],"\x61\x6C\x69\x61\x73":_0x632e[668],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x66\x6F\x72\x6D\x61\x74":_0x632e[593],"\x63\x75\x73\x74\x6F\x6D":1}],{ignoreDuplicates:true,individualHooks:true})})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[439])})[_0x632e[144]](function(_0x986fx5){console[_0x632e[5]](_0x632e[438],_0x986fx5)});models[_0x632e[678]][_0x632e[69]]([{id:1,name:_0x632e[677],defaultEntry:true}],{ignoreDuplicates:true,individualHooks:true})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[272])});models[_0x632e[701]][_0x632e[670]]({where:{context:_0x632e[219]}})[_0x632e[6]](function(){models[_0x632e[701]][_0x632e[69]]([{context:_0x632e[219],exten:_0x632e[680],priority:1,app:_0x632e[681],appdata:_0x632e[682],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:2,app:_0x632e[681],appdata:_0x632e[684],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:3,app:_0x632e[685],appdata:_0x632e[686],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:4,app:_0x632e[687],appdata:_0x632e[334],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:5,app:_0x632e[688],appdata:_0x632e[689],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:6,app:_0x632e[685],appdata:_0x632e[690],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:7,app:_0x632e[685],appdata:_0x632e[691],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:8,app:_0x632e[685],appdata:_0x632e[692],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:9,app:_0x632e[685],appdata:_0x632e[693],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:10,app:_0x632e[685],appdata:_0x632e[694],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:11,app:_0x632e[685],appdata:_0x632e[695],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:12,app:_0x632e[685],appdata:_0x632e[696],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:13,app:_0x632e[685],appdata:_0x632e[697],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:14,app:_0x632e[698],appdata:_0x632e[699],type:_0x632e[683]},{context:_0x632e[219],exten:_0x632e[680],priority:15,app:_0x632e[700],appdata:_0x632e[334],type:_0x632e[683]}],{ignoreDuplicates:true,individualHooks:true})})[_0x632e[6]](function(){console[_0x632e[5]](_0x632e[679])});models[_0x632e[70]][_0x632e[154]]({include:[{model:models[_0x632e[701]],as:_0x632e[708],where:{app:_0x632e[709]}}]})[_0x632e[6]](function(_0x986fxa){console[_0x632e[5]](_0x632e[702]);var _0x986fx1d=[];_[_0x632e[153]](_0x986fxa,function(_0x986fx1e){_[_0x632e[153]](_0x986fx1e.UserExtensions,function(_0x986fx1f){_0x986fx1f[_0x632e[703]]= _0x632e[704]+ _0x986fx1e[_0x632e[705]]+ _0x632e[706];_0x986fx1d[_0x632e[151]](_0x986fx1f[_0x632e[707]]())})});return _0x986fx1d})[_0x632e[19]]()[_0x632e[144]](function(_0x986fx5){console[_0x632e[5]](_0x986fx5)}) \ No newline at end of file diff --git a/server/config/seedp.js b/server/config/seedp.js index fcfab6f..6eea647 100644 --- a/server/config/seedp.js +++ b/server/config/seedp.js @@ -1,8105 +1 @@ -/** - * Populate DB with sample data on server start - * to disable, edit config/environment/index.js, and set `seedDB: false` - */ - -'use strict'; - -var _ = require('lodash'); -var util = require('util'); - -var models = require('../models'); -var sequelize = require('../models').sequelize; - -var _agents = []; -var _voiceQueues = []; -var _mailQueues = []; -var _chatQueues = []; -var _miller, _doe; -var _setting; - - -return models.Setting - .findOrCreate({ - where: { - id: 1 - }, - defaults: { - id: 1, - min_internal: 1000, - min_mailbox: 1000, - agi_port: 4573, - automation_timeout: 3600, - soundPath: '/var/opt/motion/server/files/sounds/converted' - } - }) - .spread(function(setting) { - console.log(util.format('Populating Setting - DONE ')); - return setting; - }) - .then(function(setting) { - _setting = setting - if (_setting.firstSetup) { - models.User - .bulkCreate([{ - role: 'admin', - fullname: 'Administrator', - email: 'admin@admin.com', - name: 'admin', - password: 'password', - defaultuser: 'admin', - internal: 1000 - }], { - ignoreDuplicates: true, - individualHooks: true - }) - .then(function(users) { - console.log(util.format('Populating Users: %s - DONE ', _.map(users, 'name').join())); - return models.Team - .create({ - name: "Default Team", - description: "Default Team", - defaultEntry: true, - Users: [{ - role: 'agent', - fullname: 'John Doe', - email: 'john.doe@xcally.com', - name: 'john.doe', - password: 'shuttle55', - defaultuser: 'john.doe', - internal: 1001 - }, { - role: 'agent', - fullname: 'Jane Miller', - email: 'jane.miller@xcally.com', - name: 'jane.miller', - password: 'shuttle55', - defaultuser: 'jane.miller', - internal: 1002 - }] - }, { - include: [{ - model: models.User - }] - }); - }) - .then(function(team) { - _agents = team.Users; - - console.log(util.format('Populating Agents: %s - DONE ', _.map(team.Users, 'name').join())); - console.log(util.format('Populating Teams: %s - DONE ', team.name)); - - return models.VoiceQueue - .bulkCreate([{ - name: 'Sales', - musiconhold: 'default', - strategy: 'rrmemory' - }, { - name: 'Support', - musiconhold: 'default', - strategy: 'ringall' - }], { - ignoreDuplicates: true, - individualHooks: true - }); - }) - .then(function(voiceQueues) { - console.log(util.format('Populating Voice Queues: %s - DONE ', _.map(voiceQueues, 'name').join())); - _voiceQueues = voiceQueues; - - _miller = _.find(_agents, { - name: 'jane.miller' - }); - _doe = _.find(_agents, { - name: 'john.doe' - }); - - return _voiceQueues[0] - .addUser(_miller.id); - }) - .then(function() { - return _voiceQueues[1] - .addUsers([_miller.id, _doe.id]); - }) - .then(function() { - return models.MailQueue - .bulkCreate([{ - name: 'Sales', - timeout: 5, - strategy: 'rrmemory' - }, { - name: 'Support', - timeout: 5, - strategy: 'beepall' - }], { - ignoreDuplicates: true, - individualHooks: true - }); - }) - .then(function(mailQueues) { - console.log(util.format('Populating Mail Queues: %s - DONE ', _.map(mailQueues, 'name').join())); - _mailQueues = mailQueues; - - return _mailQueues[0] - .addUser(_miller.id); - }) - .then(function() { - return _mailQueues[1] - .addUsers([_miller.id, _doe.id]); - }) - .then(function() { - return models.ChatQueue - .bulkCreate([{ - name: 'Sales', - timeout: 5, - strategy: 'rrmemory' - }, { - name: 'Support', - timeout: 5, - strategy: 'beepall' - }], { - ignoreDuplicates: true, - individualHooks: true - }); - }) - .then(function(chatQueues) { - console.log(util.format('Populating Mail Queues: %s - DONE ', _.map(chatQueues, 'name').join())); - _chatQueues = chatQueues; - - return _chatQueues[0] - .addUser(_miller.id); - }) - .then(function() { - return _chatQueues[1] - .addUsers([_miller.id, _doe.id]); - }) - .catch(function(err) { - console.log(err); - }); - - models.ChanSpy - .bulkCreate([{ - name: 'ChanSpy1', - prefix: 'spy1', - description: 'The supervisor can listen and talk to the agent. The customer will not listen to the supervisor voice.', - options: 'bw' - }, { - name: 'ChanSpy2', - prefix: 'spy2', - description: 'The supervisor can only listen the agent channel (neither the agent nor the customer will listen to the supervisor voice.', - options: 'bo' - }, { - name: 'ChanSpy3', - prefix: 'spy3', - description: 'The supervisor can listen and talk both to the agent and to the customer, like a pure 3 way conference room.', - options: 'bW' - }], { - ignoreDuplicates: true, - individualHooks: true - }) - .then(function(chanSpys) { - console.log(util.format('Populating ChanSpy: %s - DONE ', _.map(chanSpys, 'name').join())); - }); - - models.List - .create({ - name: 'System List', - description: 'Default List', - defaultEntry: true - }) - .then(function(list) { - console.log(util.format('Populating CM List: %s - DONE ', list.name)); - }); - - models.VoiceMusicOnHold - .create({ - name: 'default', - directory: '/var/lib/asterisk/moh/', - mode: 'files', - sort: 'random', - format: 'wav', - defaultEntry: true - }) - .then(function(voiceMusicOnHold) { - console.log(util.format('Populating Voice Music On Hold: %s - DONE ', voiceMusicOnHold.name)); - }); - - models.Variable - .bulkCreate([{ - name: 'CHOICE' - }, { - description: 'Order number', - name: 'ORDERNUM' - }, { - description: 'Data Base Query Result', - name: 'DBRESULT' - }, { - name: 'RATE' - }], { - ignoreDuplicates: true, - individualHooks: true - }) - .then(function(variables) { - console.log(util.format('Populating Variables: %s - DONE ', _.map(variables, 'name').join())); - }); - - models.Pause - .bulkCreate([{ - name: 'BACKOFFICE' - }, { - name: 'AFTERCALL' - }], { - ignoreDuplicates: true, - individualHooks: true - }) - .then(function(pauses) { - console.log(util.format('Populating Pauses: %s - DONE ', _.map(pauses, 'name').join())); - }); - - models.Trunk - .create({ - name: 'DemoTrunk', - context: 'from-voip-provider', - callingpres: 'ALLOWED_NOT_SCREENED', - deny: '0.0.0.0/0.0.0.0', - permit: '0.0.0.0/0.0.0.0', - secret: '55xcally55' - }) - .then(function(trunk) { - console.log(util.format('Populating Trunk: %s - DONE ', trunk.name)); - }); - - models.VoiceContext - .bulkCreate([{ - name: 'from-sip', - description: 'Default context (DO NOT DELETE)' - }, { - name: 'from-voip-provider', - description: 'Default context (DO NOT DELETE)' - }, { - name: 'inbound-fax', - description: 'Default context (DO NOT DELETE)' - }, { - name: 'outbound-fax', - description: 'Default context (DO NOT DELETE)' - }, { - name: 'from-voicemail', - description: 'Default context (DO NOT DELETE)' - }], { - ignoreDuplicates: true, - individualHooks: true - }) - .then(function(pauses) { - console.log(util.format('Populating Contexts: %s - DONE ', _.map(pauses, 'name').join())); - }); - - models.VoiceExtension - .create({ - context: 'from-sip', - exten: '_600', - priority: '1', - app: 'NoOp', - appdata: 'Internal Call', - type: 'internal', - description: 'Echo Test', - Applications: [{ - context: 'from-sip', - exten: '_600', - priority: '2', - app: 'Set', - appdata: 'CDR(type)=internal', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '3', - app: 'GotoIfTime', - appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '4', - app: 'NoOP', - appdata: 'Skipped CallerID Set', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '5', - app: 'NoOP', - appdata: 'Skipped MixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '6', - app: 'NoOP', - appdata: 'Skipped Progress', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '7', - app: 'Playback', - appdata: 'demo-echotest', - type: 'internal', - interval: '*,*,*,*', - isApp: true - }, { - context: 'from-sip', - exten: '_600', - priority: '8', - app: 'NoOP', - appdata: 'Skipped StopMixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '9', - app: 'NoOP', - appdata: 'Playback Application End', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '10', - app: 'GotoIfTime', - appdata: '*,*,*,*?from-sip,${EXTEN},11:from-sip,${EXTEN},16', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '11', - app: 'NoOP', - appdata: 'Skipped CallerID Set', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '12', - app: 'NoOP', - appdata: 'Skipped MixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '13', - app: 'NoOP', - appdata: 'Skipped Progress', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '14', - app: 'Echo', - appdata: '', - type: 'internal', - interval: '*,*,*,*', - isApp: true - }, { - context: 'from-sip', - exten: '_600', - priority: '15', - app: 'NoOP', - appdata: 'Skipped StopMixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '16', - app: 'NoOP', - appdata: 'Echo Application End', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '17', - app: 'GotoIfTime', - appdata: '*,*,*,*?from-sip,${EXTEN},18:from-sip,${EXTEN},23', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '18', - app: 'NoOP', - appdata: 'Skipped CallerID Set', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '19', - app: 'NoOP', - appdata: 'Skipped MixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '20', - app: 'NoOP', - appdata: 'Skipped Progress', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '21', - app: 'Playback', - appdata: 'demo-echotest', - type: 'internal', - interval: '*,*,*,*', - isApp: true - }, { - context: 'from-sip', - exten: '_600', - priority: '22', - app: 'NoOP', - appdata: 'Skipped StopMixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_600', - priority: '23', - app: 'NoOP', - appdata: 'Playback Application End', - type: 'internal' - }] - }, { - include: [{ - model: models.VoiceExtension, - as: 'Applications' - }] - }) - .then(function(voiceExtension) { - console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten)); - }); - - models.VoiceExtension - .create({ - context: 'from-sip', - exten: '_6000', - priority: '1', - app: 'NoOp', - appdata: 'Internal Call', - type: 'internal', - description: 'Support Queue', - Applications: [{ - context: 'from-sip', - exten: '_6000', - priority: '2', - app: 'Set', - appdata: 'CDR(type)=internal', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6000', - priority: '3', - app: 'GotoIfTime', - appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6000', - priority: '4', - app: 'NoOP', - appdata: 'Skipped CallerID Set', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6000', - priority: '5', - app: 'NoOP', - appdata: 'Skipped MixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6000', - priority: '6', - app: 'Progress', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6000', - priority: '7', - app: 'Queue', - appdata: 'Support,,,,', - type: 'internal', - interval: '*,*,*,*', - isApp: true - }, { - context: 'from-sip', - exten: '_6000', - priority: '8', - app: 'NoOP', - appdata: 'Skipped StopMixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6000', - priority: '9', - app: 'NoOP', - appdata: 'Queue Application End', - type: 'internal' - }] - }, { - include: [{ - model: models.VoiceExtension, - as: 'Applications' - }] - }) - .then(function(voiceExtension) { - console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten)); - }); - - models.VoiceExtension - .create({ - context: 'from-sip', - exten: '_6666', - priority: '1', - app: 'NoOp', - appdata: 'Internal Call', - type: 'internal', - description: 'Support Queue', - Applications: [{ - context: 'from-sip', - exten: '_6666', - priority: '2', - app: 'Set', - appdata: 'CDR(type)=internal', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6666', - priority: '3', - app: 'GotoIfTime', - appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6666', - priority: '4', - app: 'NoOP', - appdata: 'Skipped CallerID Set', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6666', - priority: '5', - app: 'NoOP', - appdata: 'Skipped MixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6666', - priority: '6', - app: 'NoOP', - appdata: 'Skipped Progress', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6666', - priority: '7', - app: 'AGI', - appdata: 'agi://127.0.0.1/square,Auto Attendant', - type: 'internal', - interval: '*,*,*,*', - isApp: true - }, { - context: 'from-sip', - exten: '_6666', - priority: '8', - app: 'NoOP', - appdata: 'Skipped StopMixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6666', - priority: '9', - app: 'NoOP', - appdata: 'AGI Application End', - type: 'internal' - }] - }, { - include: [{ - model: models.VoiceExtension, - as: 'Applications' - }] - }) - .then(function(voiceExtension) { - console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten)); - }); - - models.VoiceExtension - .create({ - context: 'from-sip', - exten: '_6667', - priority: '1', - app: 'NoOp', - appdata: 'Internal Call', - type: 'internal', - description: 'Support Queue', - Applications: [{ - context: 'from-sip', - exten: '_6667', - priority: '2', - app: 'Set', - appdata: 'CDR(type)=internal', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6667', - priority: '3', - app: 'GotoIfTime', - appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6667', - priority: '4', - app: 'NoOP', - appdata: 'Skipped CallerID Set', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6667', - priority: '5', - app: 'NoOP', - appdata: 'Skipped MixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6667', - priority: '6', - app: 'NoOP', - appdata: 'Skipped Progress', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6667', - priority: '7', - app: 'AGI', - appdata: 'agi://127.0.0.1/square,Orders', - type: 'internal', - interval: '*,*,*,*', - isApp: true - }, { - context: 'from-sip', - exten: '_6667', - priority: '8', - app: 'NoOP', - appdata: 'Skipped StopMixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6667', - priority: '9', - app: 'NoOP', - appdata: 'AGI Application End', - type: 'internal' - }] - }, { - include: [{ - model: models.VoiceExtension, - as: 'Applications' - }] - }) - .then(function(voiceExtension) { - console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten)); - }); - - models.VoiceExtension - .create({ - context: 'from-sip', - exten: '_6668', - priority: '1', - app: 'NoOp', - appdata: 'Internal Call', - type: 'internal', - description: 'Support Queue', - Applications: [{ - context: 'from-sip', - exten: '_6668', - priority: '2', - app: 'Set', - appdata: 'CDR(type)=internal', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6668', - priority: '3', - app: 'GotoIfTime', - appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6668', - priority: '4', - app: 'NoOP', - appdata: 'Skipped CallerID Set', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6668', - priority: '5', - app: 'NoOP', - appdata: 'Skipped MixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6668', - priority: '6', - app: 'NoOP', - appdata: 'Skipped Progress', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6668', - priority: '7', - app: 'AGI', - appdata: 'agi://127.0.0.1/square,CSI', - type: 'internal', - interval: '*,*,*,*', - isApp: true - }, { - context: 'from-sip', - exten: '_6668', - priority: '8', - app: 'NoOP', - appdata: 'Skipped StopMixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6668', - priority: '9', - app: 'NoOP', - appdata: 'AGI Application End', - type: 'internal' - }] - }, { - include: [{ - model: models.VoiceExtension, - as: 'Applications' - }] - }) - .then(function(voiceExtension) { - console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten)); - }); - - models.VoiceExtension - .create({ - context: 'from-sip', - exten: '_X.', - priority: '1', - app: 'NoOp', - appdata: 'Outbound Call', - type: 'outbound', - description: 'Support Queue', - Applications: [{ - context: 'from-sip', - exten: '_X.', - priority: '2', - app: 'Set', - appdata: 'CDR(type)=outbound', - type: 'outbound' - }, { - context: 'from-sip', - exten: '_X.', - priority: '3', - app: 'Set', - appdata: 'CDR(tag)=--', - type: 'outbound' - }, { - context: 'from-sip', - exten: '_X.', - priority: '4', - app: 'GotoIfTime', - appdata: '*,*,*,*?from-sip,${EXTEN},5:from-sip,${EXTEN},10', - type: 'outbound' - }, { - context: 'from-sip', - exten: '_X.', - priority: '5', - app: 'NoOP', - appdata: 'Skipped CallerID Set', - type: 'outbound' - }, { - context: 'from-sip', - exten: '_X.', - priority: '6', - app: 'NoOP', - appdata: 'Skipped MixMonitor', - type: 'outbound' - }, { - context: 'from-sip', - exten: '_X.', - priority: '7', - app: 'NoOP', - appdata: 'Skipped Progress', - type: 'outbound' - }, { - context: 'from-sip', - exten: '_X.', - priority: '8', - app: 'Dial', - appdata: 'SIP/Demo Trunk/${EXTEN:0}', - type: 'outbound', - interval: '*,*,*,*', - isApp: true - }, { - context: 'from-sip', - exten: '_X.', - priority: '9', - app: 'NoOP', - appdata: 'Skipped StopMixMonitor', - type: 'outbound' - }, { - context: 'from-sip', - exten: '_X.', - priority: '10', - app: 'NoOP', - appdata: 'Dial Application End', - type: 'outbound' - }] - }, { - include: [{ - model: models.VoiceExtension, - as: 'Applications' - }] - }) - .then(function(voiceExtension) { - console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten)); - }); - - models.VoiceExtension - .create({ - context: 'from-sip', - exten: '_6001', - priority: '1', - app: 'NoOp', - appdata: 'Internal Call', - type: 'internal', - description: 'Sales Queue', - Applications: [{ - context: 'from-sip', - exten: '_6001', - priority: '2', - app: 'Set', - appdata: 'CDR(type)=internal', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6001', - priority: '3', - app: 'GotoIfTime', - appdata: '*,*,*,*?from-sip,${EXTEN},4:from-sip,${EXTEN},9', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6001', - priority: '4', - app: 'NoOP', - appdata: 'Skipped CallerID Set', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6001', - priority: '5', - app: 'NoOP', - appdata: 'Skipped MixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6001', - priority: '6', - app: 'Progress', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6001', - priority: '7', - app: 'Queue', - appdata: 'Sales,,,,', - type: 'internal', - interval: '*,*,*,*', - isApp: true - }, { - context: 'from-sip', - exten: '_6001', - priority: '8', - app: 'NoOP', - appdata: 'Skipped StopMixMonitor', - type: 'internal' - }, { - context: 'from-sip', - exten: '_6001', - priority: '9', - app: 'NoOP', - appdata: 'Queue Application End', - type: 'internal' - }] - }, { - include: [{ - model: models.VoiceExtension, - as: 'Applications' - }] - }) - .then(function(voiceExtension) { - console.log(util.format('Populating Voice Extension: %s %s - DONE ', voiceExtension.context, voiceExtension.exten)); - }); - - models.SquareProject - .bulkCreate([{ - name: 'Auto Attendant', - description: 'IVR SAMPLE 1', - preproduction: '\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n', - production: '\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n' - }, { - name: 'CSI', - description: 'Customer Satisfaction Index example', - preproduction: '\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n', - production: '\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n' - }, { - name: 'Orders', - description: 'Order DB IVR Sample', - preproduction: '\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n', - production: '\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n' - }, { - name: 'Survey', - description: 'Survey IVR example', - preproduction: '\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n', - production: '\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n' - }]) - .then(function(projects) { - console.log(util.format('Populating Square Project: %s - DONE ', _.map(projects, 'name').join())); - }); - - models.SquareOdbc - .create({ - name: 'xcally', - dsn: 'DRIVER=MySQL;SERVER=127.0.0.1;UID=xcall;PWD=xC@LL1234;DATABASE=motion' - }) - .then(function(squareOdbc) { - console.log(util.format('Populating Square ODBC: %s - DONE ', squareOdbc.name)); - }); - - var newIntegrations = [{ - name: 'Zendesk', - version: '1.0.0', - author: 'XeniaLAB s.r.l.', - logo: 'assets/images/media/zendesk2.png', - state: 'zendesk', - description: 'Start using xCALLY - Zendesk integration: Auto-Generated Tickets, fully customizable comments, Custom Fields management, Tag support and Simple Setup', - link: 'https://wiki.xcallymotion.com/display/XMD/Zendesk+integration' - }, { - name: 'Salesforce', - version: '1.0.0', - author: 'XeniaLAB s.r.l.', - logo: 'assets/images/media/salesforce2.png', - state: 'salesforce', - description: 'Start using xCALLY - Salesforce integration: Auto-Generated Tasks, fully customizable comments, Custom Fields management and OpenCTI support', - link: 'https://wiki.xcallymotion.com/display/XMD/Salesforce+integration' - }, { - name: 'iFrame', - version: '1.0.0', - author: 'XeniaLAB s.r.l.', - logo: 'assets/images/media/iframe.png', - state: 'iframe', - description: 'Start using iFrame integration: enable your agents to view external pages (like your CRM) directly from Motion GUI', - link: 'https://wiki.xcallymotion.com/display/XMD/iFrame+Integration' - }]; - - models.Integration - .findAll() - .then(function(oldIntegrations) { - var bulkIntegrations = []; - oldIntegrations = _.map(oldIntegrations, 'state'); - newIntegrations.forEach(function(integration) { - if (_.includes(oldIntegrations, integration.state)) { - bulkIntegrations.push(models.Integration.update(integration, { - where: { - state: integration.state - } - })); - } else { - bulkIntegrations.push(models.Integration.create(integration)); - } - }); - return bulkIntegrations; - }) - .all() - .then(function() { - console.log('Finished populating integrations'); - }) - .catch(function(err) { - console.log('Error populating integrations:', err); - }); - - models.Company - .bulkCreate([{ - name: 'Acme', - type: 'ltd', - street: 'Acme Sreet', - }, { - name: 'Xenialab', - type: 'srl', - street: 'C.so Vittorio Emanuele II, 111', - postalCode: '10128', - country: 'Italy', - city: 'Turin', - vat: '09668910012', - website: 'http://www.xenialab.com/', - phone: '+39 011.19886500', - fax: '+39 011.0960070', - email: 'info@xcally.com' - }]) - .then(function(companies) { - console.log(util.format('Populating Companies: %s - DONE ', _.map(companies, 'name').join())); - }); - - models.Dashboard - .destroy({ - where: { - defaultEntry: true - } - }) - .then(function() { - return models.Dashboard - .bulkCreate([{ - name: 'Inbound Calls', - model: JSON.stringify({ - "title": "Voice Inbound", - "rows": [{ - "columns": [{ - "styleClass": "col-md-3", - "widgets": [{ - "type": "counter", - "config": { - "timeout": 5, - "color": "blue-madison", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "report": "report_queue_history", - "condition": "queuecallerabandon=0 AND queuecallercomplete=0 AND queuecallerexit=0 AND queuecallerleaveAt is not null", - "details": "Active Calls", - "select": "COUNT(*)" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1454772532346-10" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "blue-madison", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "report": "report_queue_history", - "condition": "queuecallercomplete=1", - "details": "Total Answered", - "select": "COUNT(*)" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1456841031111-8" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "blue-madison", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "ROUND(SUM(queuecallercomplete) / (SUM(queuecallercomplete)+SUM(queuecallerabandon)) *100,1)", - "report": "report_queue_history", - "condition": "1", - "details": "Answer Rate(%)" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457270124802-4" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "blue-madison", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "SEC_TO_TIME(ROUND(AVG(talktime),0))", - "report": "report_agent_history", - "condition": "agentcomplete=1", - "details": "Avg Talk Time" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457270214766-5" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "green-haze", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "ROUND(SUM(CASE WHEN queuecallercomplete=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) < 10) THEN 1 ELSE 0 END)/(SUM(queuecallercomplete) + SUM(CASE WHEN queuecallerabandon=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) > 10) THEN 1 ELSE 0 END)) *100,1)", - "report": "report_queue_history", - "condition": "1", - "details": "Service Level 10 (%)" - }, - "title": "SERVICE LEVEL", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457366965794-3" - }], - "cid": "1456841191661-21" - }, { - "styleClass": "col-md-3", - "widgets": [{ - "type": "counter", - "config": { - "timeout": 5, - "color": "red-intense", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "report": "report_queue_history", - "condition": "queuecallerleaveAt IS NULL", - "details": "Waiting Calls", - "select": "COUNT(*)" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1456839870449-5" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "red-intense", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "report": "report_queue_history", - "condition": "queuecallerabandon=1", - "details": "Total Abandoned", - "select": "COUNT(*)" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1456841244931-27" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "red-intense", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "ROUND(SUM(queuecallerabandon) / (SUM(queuecallercomplete)+SUM(queuecallerabandon)) *100,1)", - "report": "report_queue_history", - "condition": "1", - "details": "Abandon Rate (%)" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457269033923-3" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "yellow-casablanca", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "SEC_TO_TIME(ROUND(AVG(holdtime),0))", - "report": "report_agent_history", - "condition": "agentcomplete=1", - "details": "Avg Answer Time" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457270230324-8" - }, { - "type": "counter", - "config": { - "timeout": 5, - "condition": "1", - "color": "green-haze", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "ROUND(SUM(CASE WHEN queuecallercomplete=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) < 15) THEN 1 ELSE 0 END)/(SUM(queuecallercomplete) + SUM(CASE WHEN queuecallerabandon=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) > 15) THEN 1 ELSE 0 END)) *100,1)", - "report": "report_queue_history", - "details": "Service Level 15 (%)" - }, - "title": "SERVICE LEVEL 15", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457952734590-1" - }], - "cid": "1456841191662-22" - }, { - "styleClass": "col-md-3", - "widgets": [{ - "type": "counter", - "config": { - "timeout": 5, - "color": "blue-madison", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "SEC_TO_TIME(MAX(UNIX_TIMESTAMP()-UNIX_TIMESTAMP(queuecallerleaveAt)))", - "report": "report_queue_history", - "condition": "queuecallerabandon=0 AND queuecallercomplete=0 AND queuecallerexit=0 AND queuecallerleaveAt is not null", - "details": "Longest Active Call" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457275258494-11" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "yellow-casablanca", - "icon": "fa-bar-chart", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "COUNT(distinct uniqueid)", - "report": "report_queue_history", - "details": "Total Offered", - "condition": "1" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457269010616-1" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "yellow-casablanca", - "icon": "fa-bar-chart", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "ROUND(COUNT(DISTINCT uniqueid)/HOUR(CURRENT_TIMESTAMP()),1)", - "report": "report_queue_history", - "condition": "1", - "details": "Avg Offered Per Hour" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457275263022-12" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "red-intense", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "SEC_TO_TIME(ROUND(AVG(UNIX_TIMESTAMP(queuecallerabandonAt)- UNIX_TIMESTAMP(queuecallerJoinAt)),0))", - "report": "report_queue_history", - "condition": "queuecallerabandon=1", - "details": "Avg Abandon Time" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457270223870-7" - }, { - "type": "counter", - "config": { - "timeout": 5, - "condition": "1", - "color": "green-haze", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "ROUND(SUM(CASE WHEN queuecallercomplete=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) < 20) THEN 1 ELSE 0 END)/(SUM(queuecallercomplete) + SUM(CASE WHEN queuecallerabandon=1 AND (UNIX_TIMESTAMP(queuecallerleaveAt)-UNIX_TIMESTAMP(queuecallerjoinAt) > 20) THEN 1 ELSE 0 END)) *100,1)", - "report": "report_queue_history", - "details": "Service Level 20 (%)" - }, - "title": "SERVICE LEVEL 20", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457952751605-2" - }], - "cid": "1456841191663-23" - }, { - "styleClass": "col-md-3", - "widgets": [{ - "type": "counter", - "config": { - "timeout": 5, - "color": "red-intense", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "SEC_TO_TIME(MAX(UNIX_TIMESTAMP()-UNIX_TIMESTAMP(queuecallerjoinAt)))", - "report": "report_queue_history", - "condition": "queuecallerleaveAt IS NULL", - "details": "Oldest Waiting Call" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457275254061-10" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "red-intense", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "COUNT(*)", - "condition": "queuecallerexit=1", - "report": "report_queue_history", - "details": "Unmanaged" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457269022062-2" - }, { - "type": "counter", - "config": { - "timeout": 5, - "color": "yellow-crusta", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "SEC_TO_TIME(ROUND(AVG(acwtime),0))", - "report": "report_agent_history", - "condition": "agentcomplete=1", - "details": "Avg ACW Time" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457270219355-6" - }], - "cid": "1456841191664-24" - }] - }], - "titleTemplateUrl": "../src/templates/dashboard-title.html", - "structure": "3-3-3-3" - }), - defaultEntry: true, - editable: true - }, { - name: 'Outbound Calls', - model: JSON.stringify({ - "title": "Outbound Calls", - "rows": [{ - "columns": [{ - "styleClass": "col-md-3", - "widgets": [{ - "type": "counter", - "config": { - "timeout": 5, - "color": "purple-plum", - "icon": "fa-globe", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "COUNT(*)", - "report": "report_call_history", - "condition": "type=\"outbound\"", - "details": "Manual Outbound" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457276458424-14" - }, { - "type": "counter", - "config": { - "timeout": 5, - "condition": "type=\"outbound\" AND disposition=\"ANSWERED\"", - "color": "green-haze", - "icon": "fa-globe", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "COUNT(*)", - "report": "report_call_history", - "details": "Answered" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457718579522-2" - }], - "cid": "1456841191661-21" - }, { - "styleClass": "col-md-3", - "widgets": [{ - "type": "counter", - "config": { - "timeout": 5, - "color": "purple-plum", - "icon": "fa-globe", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "SEC_TO_TIME(SUM(duration))", - "report": "report_call_history", - "condition": "type=\"outbound\"", - "details": "Global Duration" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457276453465-13" - }, { - "type": "counter", - "config": { - "timeout": 5, - "condition": "type=\"outbound\"", - "color": "yellow-casablanca", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "ROUND(SUM(IF(disposition=\"ANSWERED\",1,0))/COUNT(*)*100,1)", - "report": "report_call_history", - "details": "Answer Rate (%)" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457718591243-3" - }], - "cid": "1456841191662-22" - }, { - "styleClass": "col-md-3", - "widgets": [{ - "type": "counter", - "config": { - "timeout": 5, - "condition": "type=\"outbound\"", - "color": "blue-madison", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "SEC_TO_TIME(ROUND(AVG(duration),0))", - "report": "report_call_history", - "details": "Avg Duration" - }, - "title": "CALLS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457718482396-1" - }], - "cid": "1456841191663-23" - }, { - "styleClass": "col-md-3", - "widgets": [], - "cid": "1456841191664-24" - }] - }], - "titleTemplateUrl": "../src/templates/dashboard-title.html", - "structure": "3-3-3-3" - }), - defaultEntry: true, - editable: true - }, { - name: 'Agents Status', - model: JSON.stringify({ - "title": "Agents Status", - "rows": [{ - "columns": [{ - "styleClass": "col-md-3", - "widgets": [{ - "type": "counter", - "config": { - "timeout": 5, - "color": "purple-plum", - "icon": "fa-globe", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "COUNT(*)", - "report": "users", - "condition": "online=1 AND role=\"agent\"", - "details": "Logged" - }, - "title": "AGENTS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457275248521-9" - }], - "cid": "1456841191661-21" - }, { - "styleClass": "col-md-3", - "widgets": [{ - "type": "counter", - "config": { - "timeout": 5, - "color": "yellow-crusta", - "icon": "fa-globe", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "COUNT(*)", - "report": "users", - "condition": "online=1 AND role=\"agent\" AND (voicePause=1 OR chatPause=1 OR mailPause=1 OR faxPAuse=1) and pauseType !=\"ACW\"", - "details": "Paused" - }, - "title": "AGENTS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457276462846-15" - }], - "cid": "1456841191662-22" - }, { - "styleClass": "col-md-3", - "widgets": [{ - "type": "counter", - "config": { - "timeout": 5, - "color": "yellow-casablanca", - "icon": "fa-comments", - "link": "#", - "linkText": "VIEW MORE", - "reportTables": [{ - "name": "Agents", - "value": "report_agent" - }, { - "name": "Calls", - "value": "report_call" - }, { - "name": "Dials", - "value": "report_dial" - }, { - "name": "Queues", - "value": "report_queue" - }, { - "name": "Users", - "value": "users" - }, { - "name": "Chat Sessions", - "value": "report_chat_session" - }, { - "name": "Mail Sessions", - "value": "report_mail_session" - }], - "colors": [{ - "name": "Blue", - "value": "blue-madison" - }, { - "name": "Red", - "value": "red-intense" - }, { - "name": "Green", - "value": "green-haze" - }, { - "name": "Purple", - "value": "purple-plum" - }, { - "name": "Orange", - "value": "yellow-casablanca" - }, { - "name": "Yellow", - "value": "yellow-crusta" - }], - "icons": [{ - "name": "Talk bubbles", - "value": "fa-comments" - }, { - "name": "Bar Chart", - "value": "fa-bar-chart" - }, { - "name": "Shopping Cart", - "value": "fa-shopping-cart" - }, { - "name": "Globe", - "value": "fa-globe" - }], - "select": "COUNT(*)", - "report": "users", - "condition": "voicePause=1 and pauseType=\"ACW\"", - "details": "ACW" - }, - "title": "AGENTS", - "titleTemplateUrl": "../src/templates/widget-title.html", - "wid": "1457360464208-1" - }], - "cid": "1456841191663-23" - }, { - "styleClass": "col-md-3", - "widgets": [], - "cid": "1456841191664-24" - }] - }], - "titleTemplateUrl": "../src/templates/dashboard-title.html", - "structure": "3-3-3-3" - }), - defaultEntry: true, - editable: true - }], { - ignoreDuplicates: true, - individualHooks: true - }); - }) - .then(function(dashboards) { - console.log(util.format('Populating Dashboards: %s - DONE ', _.map(dashboards, 'name').join())); - }); - - // Init modules table - - models.VoiceExtension.destroy({ - where: { - context: 'outbound-fax' - } - }) - .then(function() { - models.VoiceExtension.bulkCreate([{ - context: 'outbound-fax', - exten: '_.', - priority: 1, - app: 'NoOp', - appdata: 'Outgoing fax to ${FAXNUMBER}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 2, - app: 'NoOp', - appdata: 'Account ${FAXNAME}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 3, - app: 'Set', - appdata: 'CDR(type)=outbound-fax', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 4, - app: 'Answer', - appdata: '', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 5, - app: 'Wait', - appdata: '2', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 6, - app: 'Set', - appdata: 'FAXOPT(ecm)=${FAXECM}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 7, - app: 'Set', - appdata: 'FAXOPT(headerinfo)=${FAXHEADERINFO}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 8, - app: 'Set', - appdata: 'FAXOPT(localstationid)=${FAXLOCALSTATIONID}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 9, - app: 'Set', - appdata: 'FAXOPT(minrate)=${FAXMINRATE}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 10, - app: 'Set', - appdata: 'FAXOPT(maxrate)=${FAXMAXRATE}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 11, - app: 'Set', - appdata: 'FAXOPT(modem)=${FAXMODEM}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 12, - app: 'Set', - appdata: 'FAXOPT(gateway)=${FAXGATEWAY}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 13, - app: 'Set', - appdata: 'FAXOPT(t38timeout)=${FAXT38TIMEOUT}', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 14, - app: 'SendFAX', - appdata: '${FAXOUTFILE},ds', - type: 'system' - }, { - context: 'outbound-fax', - exten: '_.', - priority: 15, - app: 'Hangup', - appdata: '', - type: 'system' - }], { - ignoreDuplicates: true, - individualHooks: true - }) - }) - .then(function() { - console.log('Finished populating VoiceExtension for Outgoing Fax'); - }); - - models.User - .findAll({ - include: [{ - model: models.VoiceExtension, - as: 'UserExtensions', - where: { - app: 'Dial' - } - }] - }) - .then(function(users) { - console.log('Rewriting Users extensions...'); - var bulkUpdates = []; - _.forEach(users, function(user) { - _.forEach(user.UserExtensions, function(elem) { - elem.appdata = 'SIP/' + user.name + ',,tTxX'; - bulkUpdates.push(elem.save()); - // console.log('extension updated'); - }); - }); - return bulkUpdates; - }) - .all() - .catch(function(err) { - console.log(err); - }); - - _setting - .update({ - firstSetup: false - }); - } - - var newModules = [{ - id: 1, - name: "dashboard", - title: "APPLICATION_DASHBOARD", - ModuleId: null, - path: '/dashboard/voice' - }, { - id: 2, - name: "yourdashboards", - title: "APPLICATION_YOUR_DASHBOARDS", - ModuleId: null, - path: '/tools/yourdashboards/show/1' - }, { - id: 3, - name: "staff", - title: "APPLICATION_STAFF", - ModuleId: null, - path: '/staff/agents/list' - }, { - id: 4, - name: "agents", - title: "APPLICATION_AGENTS", - ModuleId: 3, - path: '/staff/agents/list' - }, { - id: 5, - name: "contactmanager", - title: "APPLICATION_CONTACT_MANAGER", - ModuleId: null, - path: '/contactmanager/contacts/list' - }, { - id: 6, - name: "channels", - title: "APPLICATION_CHANNELS", - ModuleId: null, - path: null - }, { - id: 7, - name: "voice", - title: "APPLICATION_VOICE", - ModuleId: 6, - path: '/channels/voice/queues/list' - }, { - id: 8, - name: "chat", - title: "APPLICATION_CHAT", - ModuleId: 6, - path: '/channels/chat/websites/list' - }, { - id: 9, - name: "mail", - title: "APPLICATION_MAIL", - ModuleId: 6, - path: '/channels/mail/accounts/list' - }, { - id: 10, - name: "fax", - title: "APPLICATION_FAX", - ModuleId: 6, - path: '/channels/fax/accounts/list' - }, { - id: 11, - name: "sms", - title: "APPLICATION_SMS", - ModuleId: 6, - path: '/channels/sms/accounts/list' - }, { - id: 12, - name: "realtime", - title: "APPLICATION_REALTIME", - ModuleId: 6, - path: '/channels/realtime/view/agents' - }, { - id: 13, - name: "tools", - title: "APPLICATION_TOOLS", - ModuleId: null, - path: '/tools/triggers/list' - }, { - id: 14, - name: "square", - title: "APPLICATION_CALLYSQUARE", - ModuleId: null, - path: '/square/projects/list' - }, { - id: 15, - name: "jscripty", - title: "APPLICATION_JSCRIPTY", - ModuleId: null, - path: '/jscripty/projects/list' - }, { - id: 16, - name: "motiondialer", - title: "APPLICATION_MOTION_DIALER", - ModuleId: null, - path: '/motiondialer/lists/list' - }, { - id: 17, - name: "analytics", - title: "APPLICATION_ANALYTICS", - ModuleId: null, - path: '/analytics/reports/list' - }, { - id: 18, - name: "setting", - title: "APPLICATION_SETTINGS", - ModuleId: null, - path: '/setting/updates/list' - }, { - id: 19, - name: "integration", - title: "APPLICATION_INTEGRATION", - ModuleId: null, - path: '/integrations/list' - }, { - id: 20, - name: "openchannel", - title: "APPLICATION_OPEN_CHANNEL", - ModuleId: 6, - path: '/channels/openchannel/accounts/list' - }]; - - - models.Module - .findAll() - .then(function(oldModules) { - var bulkModules = []; - oldModules = _.map(oldModules, 'id'); - newModules.forEach(function(module) { - if (_.includes(oldModules, module.id)) { - bulkModules.push(models.Module.update(module, { - where: { - id: module.id - } - })); - } else { - bulkModules.push(models.Module.create(module)); - } - }); - return bulkModules; - }) - .all() - .then(function() { - console.log('Finished populating modules'); - }) - .catch(function(err) { - console.log('Error populating modules:', err); - }); - - var newDefaultReports = [{ - "id": 25, - "name": "Details", - "description": "Detailed queues report", - "parent": "j12_7", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 26, - "name": "Calls Result", - "description": "Simple queue calls overview", - "parent": "j12_7", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 28, - "name": "Details", - "description": "Detailed report about answered queue calls", - "parent": "j60_1", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}" - }, { - "id": 29, - "name": "Calls by Agent", - "description": "Agent calls timer Handle time= talk time + ACW time", - "parent": "j60_1", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}" - }, { - "id": 30, - "name": "Calls by Queue", - "description": "Queue timer Handle Time= Talk Time + AVG TIme", - "parent": "j60_1", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}" - }, { - "id": 31, - "name": "Answer Time by Queue", - "description": "Queues answer time performance", - "parent": "j60_1", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}" - }, { - "id": 32, - "name": "Disconnection Cause", - "description": "Summary of the calls cdisconnection causes", - "parent": "j60_1", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}" - }, { - "id": 34, - "name": "Answer Time by Hour", - "description": "Answer time by hour", - "parent": "j60_1", - "table": "report_agent_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"agentcomplete\",\"value\":\"1\",\"required\":true}]}}" - }, { - "id": 35, - "name": "Details", - "description": "Detailed report about the unanswered calls", - "parent": "j60_2", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallercomplete\",\"value\":\"0\",\"required\":true}]}}" - }, { - "id": 36, - "name": "Unanswered by Queue", - "description": "Unanswered calls summary by queue", - "parent": "j60_2", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallercomplete\",\"value\":\"0\",\"required\":true}]}}" - }, { - "id": 37, - "name": "Unmanaged calls", - "description": "Unmanaged calls summary", - "parent": "j60_2", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallerexit\",\"value\":\"1\",\"required\":true}]}}" - }, { - "id": 38, - "name": "Abandon Time by Queue", - "description": "Abandon time performance by queue", - "parent": "j60_2", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"queuecallerabandon\",\"value\":\"1\",\"required\":true}]}}" - }, { - "id": 40, - "name": "Calls by Date", - "description": "Queue calls summary by date", - "parent": "j60_3", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 41, - "name": "Calls by Hour", - "description": "Calls distribution by hour", - "parent": "j60_3", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 46, - "name": "Calls by Day", - "description": "Calls distribution by day of the month", - "parent": "j60_3", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 47, - "name": "Calls by Weekday", - "description": "Calls distribution by day of the week", - "parent": "j60_3", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 49, - "name": "Summary", - "description": "Calls distribution by queue", - "parent": "j12_7", - "table": "report_queue_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 50, - "name": "Details", - "description": "Calls detail (cdr)", - "parent": "j51_1", - "table": "report_call_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 51, - "name": "Outbound", - "description": "Manual outbound calls detailed report", - "parent": "j51_1", - "table": "report_call_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'outbound'\",\"required\":true}]}}" - }, { - "id": 52, - "name": "Calls by Type", - "description": "Summary report of the calls type", - "parent": "j51_1", - "table": "report_call_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 53, - "name": "Outbound Calls Disposition", - "description": "Outbound calls grouped by disposition", - "parent": "j51_1", - "table": "report_call_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'outbound'\",\"required\":true}]}}" - }, { - "id": 54, - "name": "Outbound Calls by Agent", - "description": "Summary of outbound calls grouped by agent", - "parent": "j51_1", - "table": "report_call_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'outbound'\",\"required\":true}]}}" - }, { - "id": 55, - "name": "Outbound Calls by Date", - "description": "Summary of outbound calls grouped by date", - "parent": "j51_1", - "table": "report_call_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'outbound'\",\"required\":true}]}}" - }, { - "id": 57, - "name": "Login Time", - "description": "Agent's login time", - "parent": "j12_5", - "table": "report_member_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'LOGIN'\",\"required\":true},{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"'voice'\",\"required\":true}]}}" - }, { - "id": 61, - "name": "Activities Summary", - "description": "Agent's activities report", - "parent": "j87_1", - "table": "report_member_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"'voice'\",\"required\":true}]}}" - }, { - "id": 62, - "name": "Pause Details", - "description": "Agents status details", - "parent": "j87_1", - "table": "report_member_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"'voice'\",\"required\":true},{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'PAUSE'\",\"required\":true}]}}" - }, { - "id": 63, - "name": "Details", - "description": "Agent's status detail", - "parent": "j87_1", - "table": "report_member_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"'voice'\",\"required\":true}]}}" - }, { - "id": 64, - "name": "Pause Time", - "description": "Agent's pause time", - "parent": "j87_1", - "table": "report_member_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"type\",\"value\":\"'PAUSE'\",\"required\":true},{\"condition\":\"=\",\"field\":\"channel\",\"value\":\"'voice'\",\"required\":true}]}}" - }, { - "id": 65, - "name": "Summary", - "description": "CallySquare Summary", - "parent": "j87_2", - "table": "report_square_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 67, - "name": "Blocks", - "description": "CallySquare Blocks Detail", - "parent": "j87_2", - "table": "report_square_details_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 68, - "name": "Received emails by account", - "description": "Summary of the emails accepted by application for each account", - "parent": "j12_4", - "table": "report_mail_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 69, - "name": "Rating by Agent", - "description": "Records rating by agent", - "parent": "j110_1", - "table": "voice_recordings", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\">\",\"field\":\"rating\",\"value\":\"0\",\"required\":true}]}}" - }, { - "id": 70, - "name": "Rating by Queue", - "description": "Records rating by queue", - "parent": "j110_1", - "table": "voice_recordings", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"IS NOT NULL\",\"field\":\"queue\",\"value\":\"\",\"required\":false},{\"condition\":\">\",\"field\":\"rating\",\"value\":\"0\",\"required\":true}]}}" - }, { - "id": 72, - "name": "Website Summary", - "description": "Chat session information by website", - "parent": "j12_3", - "table": "report_chat_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 73, - "name": "Session Detail", - "description": "Detailed report about chat session", - "parent": "j12_3", - "table": "report_chat_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 74, - "name": "Chat by Agent", - "description": "Session chat by agent", - "parent": "j12_3", - "table": "report_chat_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"complete\",\"value\":\"1\",\"required\":true}]}}" - }, { - "id": 75, - "name": "Chat by Queue", - "description": "Chat sessions by queue", - "parent": "j12_3", - "table": "report_chat_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"application\",\"value\":\"'queue'\",\"required\":true}]}}" - }, { - "id": 76, - "name": "Chat by Date", - "description": "Session chat by date", - "parent": "j12_3", - "table": "report_chat_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 77, - "name": "Received emails by queue", - "description": "Summary of received email by queue", - "parent": "j12_4", - "table": "report_mail_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"application\",\"value\":\"'queue'\",\"required\":true}]}}" - }, { - "id": 79, - "name": "Accepted emails by agent", - "description": "Summary of accepted email by agent", - "parent": "j12_4", - "table": "report_mail_session_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"=\",\"field\":\"timeout\",\"value\":\"0\",\"required\":true}]}}" - }, { - "id": 81, - "name": "Messages Summary by Date", - "description": "Global messages summary by date", - "parent": "j12_4", - "table": "mail_messages", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 82, - "name": "Interactions detail", - "description": "Detailed report about the interactions", - "parent": "j12_4", - "table": "mail_rooms", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 83, - "name": "Disposition Summary", - "description": "Closed interactions by disposition (filtered by disposition not null)", - "parent": "j12_4", - "table": "mail_rooms", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[{\"condition\":\"IS NOT NULL\",\"field\":\"disposition\",\"value\":\"\",\"required\":false}]}}" - }, { - "id": 84, - "name": "Closed interactions by date", - "description": "Summary of closed interactions grouped by date + average handle time (from when the first email arrived to when the interaction has been closed)", - "parent": "j12_4", - "table": "mail_rooms", - "conditions": "{\"group\":{\"operator\":\"OR\",\"rules\":[{\"condition\":\"=\",\"field\":\"status\",\"value\":\"'CLOSED'\",\"required\":true}]}}" - }, { - "id": 85, - "name": "Details", - "description": null, - "parent": "j12_6", - "table": "sms_messages", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }, { - "id": 90, - "name": "Details", - "description": null, - "parent": "j4_10", - "table": "report_integration_history", - "conditions": "{\"group\":{\"operator\":\"AND\",\"rules\":[]}}" - }]; - - var newDefaulReportsFields = [{ - "id": 10128, - "field": "uniqueid", - "alias": "UniqueId", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10129, - "field": "calleridnum", - "alias": "CallerIdNum", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10130, - "field": "calleridname", - "alias": "CallerIdName", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10131, - "field": "queue", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10132, - "field": "queuecallerjoinAt", - "alias": "QueueJoinAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10133, - "field": "queuecallerleaveAt", - "alias": "QueueLeaveAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10134, - "field": "queuecallerabandon", - "alias": "QueueAbandon", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10135, - "field": "queuecallerabandonAt", - "alias": "QueueAbandonAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10136, - "field": "queuecallercomplete", - "alias": "Complete", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10137, - "field": "queuecallercompleteAt", - "alias": "CompleteAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10138, - "field": "queuecallerexit", - "alias": "QueueExit", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10139, - "field": "queuecallerexitAt", - "alias": "QueueExitAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10140, - "field": "queuecallerexitreason", - "alias": "QueueExitReason", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10141, - "field": "exten", - "alias": "DID", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 0 - }, { - "id": 10142, - "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)", - "alias": "TalkTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 1 - }, { - "id": 10143, - "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "AbandonTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 1 - }, { - "id": 10144, - "field": "IF(queuecallercomplete=1,holdtime,null)", - "alias": "AnswerTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 25, - "MetricId": null, - "custom": 1 - }, { - "id": 10188, - "field": "calleridnum", - "alias": "CallerID", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 26, - "MetricId": null, - "custom": 0 - }, { - "id": 10189, - "field": "queue", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 26, - "MetricId": null, - "custom": 0 - }, { - "id": 10190, - "field": "queuecallerjoinAt", - "alias": "StartTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 26, - "MetricId": null, - "custom": 0 - }, { - "id": 10191, - "field": "CASE WHEN queuecallercomplete=1 THEN queuecallercompleteAt ELSE queuecallerLeaveAt END", - "alias": "EndTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 26, - "MetricId": null, - "custom": 1 - }, { - "id": 10192, - "field": "holdtime", - "alias": "HoldTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 26, - "MetricId": null, - "custom": 0 - }, { - "id": 10193, - "field": "CASE WHEN queuecallercomplete=1 THEN \"YES\" ELSE \"NO\" END", - "alias": "Answered", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 26, - "MetricId": null, - "custom": 1 - }, { - "id": 20820, - "field": "uniqueid", - "alias": "UniqueId", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20821, - "field": "calleridnum", - "alias": "CallerIdNum", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20822, - "field": "calleridname", - "alias": "CallerIdName", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20823, - "field": "queue", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20824, - "field": "membername", - "alias": "Agent", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20825, - "field": "agentcalledAt", - "alias": "AgentCalledAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20826, - "field": "agentconnectAt", - "alias": "AgentConnectAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20827, - "field": "agentcompleteAt", - "alias": "AgentCompleteAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20828, - "field": "holdtime", - "alias": "AnswerTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20829, - "field": "talktime", - "alias": "TalkTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20830, - "field": "agentacw", - "alias": "AgentACW", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20831, - "field": "acwtime", - "alias": "AgentACWTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20832, - "field": "agentcomplete", - "alias": "AgentComplete", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20833, - "field": "reason", - "alias": "HangupReason", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20834, - "field": "lastevent", - "alias": "LastEvent", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 20835, - "field": "exten", - "alias": "DID", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 28, - "MetricId": null, - "custom": 0 - }, { - "id": 25504, - "field": "membername", - "alias": "Agent", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 29, - "MetricId": null, - "custom": 0 - }, { - "id": 25505, - "field": "agentcomplete", - "alias": "Completed", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 29, - "MetricId": null, - "custom": 0 - }, { - "id": 25506, - "field": "talktime", - "alias": "TotTalkTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 29, - "MetricId": null, - "custom": 0 - }, { - "id": 25507, - "field": "acwtime", - "alias": "TotACWTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 29, - "MetricId": null, - "custom": 0 - }, { - "id": 25508, - "field": "talktime + acwtime", - "alias": "TotHandleTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 29, - "MetricId": null, - "custom": 1 - }, { - "id": 25509, - "field": "ROUND(AVG(talktime))", - "alias": "AvgTalkTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 29, - "MetricId": null, - "custom": 1 - }, { - "id": 25510, - "field": "ROUND(AVG(acwtime))", - "alias": "AvgACWTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 29, - "MetricId": null, - "custom": 1 - }, { - "id": 25511, - "field": "ROUND(SUM(talktime + acwtime)/COUNT(agentcomplete))", - "alias": "AvgHandleTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 29, - "MetricId": null, - "custom": 1 - }, { - "id": 10470, - "field": "queue", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 30, - "MetricId": null, - "custom": 0 - }, { - "id": 10471, - "field": "agentcomplete", - "alias": "Completed", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 30, - "MetricId": null, - "custom": 0 - }, { - "id": 10472, - "field": "talktime", - "alias": "Tot TalkTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 30, - "MetricId": null, - "custom": 0 - }, { - "id": 10473, - "field": "holdtime", - "alias": "Tot HoldTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 30, - "MetricId": null, - "custom": 0 - }, { - "id": 10474, - "field": "acwtime", - "alias": "Tot ACWTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 30, - "MetricId": null, - "custom": 0 - }, { - "id": 10475, - "field": "talktime + acwtime", - "alias": "Tot Handle Time", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 30, - "MetricId": null, - "custom": 1 - }, { - "id": 10476, - "field": "ROUND(AVG(talktime))", - "alias": "Avg TalkTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 30, - "MetricId": null, - "custom": 1 - }, { - "id": 10477, - "field": "ROUND(AVG(holdtime))", - "alias": "Avg HoldTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 30, - "MetricId": null, - "custom": 1 - }, { - "id": 10478, - "field": "ROUND(AVG(acwtime))", - "alias": "Avg ACWTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 30, - "MetricId": null, - "custom": 1 - }, { - "id": 10479, - "field": "ROUND(SUM(talktime + acwtime)/COUNT(agentcomplete))", - "alias": "Avg Handle Time", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 30, - "MetricId": null, - "custom": 1 - }, { - "id": 10517, - "field": "queue", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 31, - "MetricId": null, - "custom": 0 - }, { - "id": 10518, - "field": "agentcomplete", - "alias": "Tot Answered", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 31, - "MetricId": null, - "custom": 0 - }, { - "id": 10519, - "field": "COUNT(IF(holdtime<10,1,NULL))", - "alias": "Answered <10s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 31, - "MetricId": null, - "custom": 1 - }, { - "id": 10520, - "field": "ROUND(COUNT(IF(holdtime<10,1,NULL)) / SUM(agentcomplete) *100,1)", - "alias": "Answer Rate <10s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 31, - "MetricId": null, - "custom": 1 - }, { - "id": 10521, - "field": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))", - "alias": "Answered 10-20s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 31, - "MetricId": null, - "custom": 1 - }, { - "id": 10522, - "field": "ROUND(COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL)) / SUM(agentcomplete) *100,1)", - "alias": "Answer Rate 10-20s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 31, - "MetricId": null, - "custom": 1 - }, { - "id": 10523, - "field": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))", - "alias": "Answered 20-30s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 31, - "MetricId": null, - "custom": 1 - }, { - "id": 10524, - "field": "ROUND(COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL)) / SUM(agentcomplete) *100,1)", - "alias": "Answer Rate 20-30s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 31, - "MetricId": null, - "custom": 1 - }, { - "id": 10525, - "field": "COUNT(IF(holdtime >=30,1,NULL))", - "alias": "Answered >30s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 31, - "MetricId": null, - "custom": 1 - }, { - "id": 10526, - "field": "ROUND(COUNT(IF(holdtime >=30,1,NULL)) / SUM(agentcomplete) *100,1)", - "alias": "Answer Rate >30s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 31, - "MetricId": null, - "custom": 1 - }, { - "id": 10765, - "field": "reason", - "alias": "Reason", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 32, - "MetricId": null, - "custom": 0 - }, { - "id": 10766, - "field": "uniqueid", - "alias": "Calls", - "function": "COUNT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 32, - "MetricId": null, - "custom": 0 - }, { - "id": 10813, - "field": "agentconnectAt", - "alias": "Hour", - "function": null, - "format": "HOUR", - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 34, - "MetricId": null, - "custom": 0 - }, { - "id": 10814, - "field": "agentcomplete", - "alias": "Tot Answered", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 34, - "MetricId": null, - "custom": 0 - }, { - "id": 10815, - "field": "COUNT(IF(holdtime<10,1,NULL))", - "alias": "Answered <10s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 34, - "MetricId": null, - "custom": 1 - }, { - "id": 10816, - "field": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))", - "alias": "Answered 10-20s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 34, - "MetricId": null, - "custom": 1 - }, { - "id": 10817, - "field": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))", - "alias": "Answered 20-30s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 34, - "MetricId": null, - "custom": 1 - }, { - "id": 10818, - "field": "COUNT(IF(holdtime >=30,1,NULL))", - "alias": "Answered >30s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 34, - "MetricId": null, - "custom": 1 - }, { - "id": 10905, - "field": "uniqueid", - "alias": "UniqueId", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10906, - "field": "calleridnum", - "alias": "CallerIdNum", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10907, - "field": "queue", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10908, - "field": "queuecallerjoinAt", - "alias": "JoinAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10909, - "field": "queuecallerleaveAt", - "alias": "LeaveAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10910, - "field": "queuecallerabandon", - "alias": "Abandon", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10911, - "field": "queuecallerabandonAt", - "alias": "AbandonAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10912, - "field": "queuecallerexit", - "alias": "Unmanaged", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10913, - "field": "queuecallerexitAt", - "alias": "UnmanagedAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10914, - "field": "queuecallerexitreason", - "alias": "UnmanagedReason", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10915, - "field": "position", - "alias": "QueuePosition", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10916, - "field": "exten", - "alias": "DID", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 0 - }, { - "id": 10917, - "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "Abandon Time", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 1 - }, { - "id": 10918, - "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "Unmanaged HoldTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 35, - "MetricId": null, - "custom": 1 - }, { - "id": 10947, - "field": "queue", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 36, - "MetricId": null, - "custom": 0 - }, { - "id": 10948, - "field": "queuecallerabandon", - "alias": "Abandoned", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 36, - "MetricId": null, - "custom": 0 - }, { - "id": 10949, - "field": "queuecallerexit", - "alias": "Unmanaged", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 36, - "MetricId": null, - "custom": 0 - }, { - "id": 10950, - "field": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "Tot AbandonTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 36, - "MetricId": null, - "custom": 1 - }, { - "id": 10951, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))", - "alias": "AvgAbandonTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 36, - "MetricId": null, - "custom": 1 - }, { - "id": 10952, - "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "Tot Unmanaged Time", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 36, - "MetricId": null, - "custom": 1 - }, { - "id": 10953, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))", - "alias": "Avg Unmanaged TIme", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 36, - "MetricId": null, - "custom": 1 - }, { - "id": 10957, - "field": "queuecallerexitreason", - "alias": "Reason", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 37, - "MetricId": null, - "custom": 0 - }, { - "id": 10958, - "field": "queuecallerexit", - "alias": "Calls", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 37, - "MetricId": null, - "custom": 0 - }, { - "id": 10959, - "field": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)", - "alias": "Tot Unmanaged Time", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 37, - "MetricId": null, - "custom": 1 - }, { - "id": 10983, - "field": "queue", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 38, - "MetricId": null, - "custom": 0 - }, { - "id": 10984, - "field": "queuecallerabandon", - "alias": "Tot Abandoned", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 38, - "MetricId": null, - "custom": 0 - }, { - "id": 10985, - "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <10,1,NULL))", - "alias": "Abandoned<10s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 38, - "MetricId": null, - "custom": 1 - }, { - "id": 10986, - "field": "ROUND(COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <10,1,NULL)) / SUM(queuecallerabandon) *100,1)", - "alias": "Abandoned Rate<10s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 38, - "MetricId": null, - "custom": 1 - }, { - "id": 10987, - "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=10 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <60,1,NULL))", - "alias": "Abandoned 10-60s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 38, - "MetricId": null, - "custom": 1 - }, { - "id": 10988, - "field": "ROUND(COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=10 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <60,1,NULL)) / SUM(queuecallerabandon) *100,1)", - "alias": "Abandoned Rate 10-60s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 38, - "MetricId": null, - "custom": 1 - }, { - "id": 10989, - "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=60 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <120,1,NULL))", - "alias": "Abandoned 60-120s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 38, - "MetricId": null, - "custom": 1 - }, { - "id": 10990, - "field": "ROUND(COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=60 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <120,1,NULL)) / SUM(queuecallerabandon) *100,1)", - "alias": "Abandoned Rate 60-120s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 38, - "MetricId": null, - "custom": 1 - }, { - "id": 10991, - "field": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=120,1,NULL))", - "alias": "Abandoned>120s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 38, - "MetricId": null, - "custom": 1 - }, { - "id": 10992, - "field": "ROUND(COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=120,1,NULL)) / SUM(queuecallerabandon) *100,1)", - "alias": "Abandoned Rate>120s", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 38, - "MetricId": null, - "custom": 1 - }, { - "id": 11892, - "field": "queuecallerjoinat", - "alias": "Date", - "function": null, - "format": "DATE", - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 40, - "MetricId": null, - "custom": 1 - }, { - "id": 11893, - "field": "uniqueid", - "alias": "Offered", - "function": "COUNT DISTINCT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 40, - "MetricId": null, - "custom": 0 - }, { - "id": 11894, - "field": "queuecallercomplete", - "alias": "Completed", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 40, - "MetricId": null, - "custom": 0 - }, { - "id": 11895, - "field": "queuecallerabandon", - "alias": "Abandoned", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 40, - "MetricId": null, - "custom": 1 - }, { - "id": 11896, - "field": "queuecallerexit", - "alias": "Unmanaged", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 40, - "MetricId": null, - "custom": 1 - }, { - "id": 11897, - "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)", - "alias": "Tot TalkTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 40, - "MetricId": null, - "custom": 1 - }, { - "id": 11898, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)))", - "alias": "AvgTalkTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 40, - "MetricId": null, - "custom": 1 - }, { - "id": 11899, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))", - "alias": "AvgAbandonTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 40, - "MetricId": null, - "custom": 1 - }, { - "id": 11629, - "field": "queuecallerjoinat", - "alias": "Hour", - "function": null, - "format": "HOUR", - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 41, - "MetricId": null, - "custom": 1 - }, { - "id": 11630, - "field": "uniqueid", - "alias": "Offered", - "function": "COUNT DISTINCT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 41, - "MetricId": null, - "custom": 0 - }, { - "id": 11631, - "field": "queuecallercomplete", - "alias": "Answered", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 41, - "MetricId": null, - "custom": 0 - }, { - "id": 11632, - "field": "ROUND(SUM(queuecallercomplete)/COUNT(DISTINCT uniqueid)*100,1)", - "alias": "Answer Rate", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 41, - "MetricId": null, - "custom": 1 - }, { - "id": 11633, - "field": "queuecallerabandon", - "alias": "Abandoned", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 41, - "MetricId": null, - "custom": 0 - }, { - "id": 11634, - "field": "queuecallerexit", - "alias": "Unmanaged", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 41, - "MetricId": null, - "custom": 0 - }, { - "id": 11635, - "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)", - "alias": "Tot TalkTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 41, - "MetricId": null, - "custom": 1 - }, { - "id": 11636, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)))", - "alias": "AvgTalkTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 41, - "MetricId": null, - "custom": 1 - }, { - "id": 11637, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))", - "alias": "AvgAbandonTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 41, - "MetricId": null, - "custom": 1 - }, { - "id": 11927, - "field": "DAY(queuecallerjoinat)", - "alias": "Day", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 46, - "MetricId": null, - "custom": 1 - }, { - "id": 11928, - "field": "uniqueid", - "alias": "Offered", - "function": "COUNT DISTINCT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 46, - "MetricId": null, - "custom": 0 - }, { - "id": 11929, - "field": "queuecallercomplete", - "alias": "Answered", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 46, - "MetricId": null, - "custom": 0 - }, { - "id": 11930, - "field": "ROUND(SUM(queuecallercomplete)/COUNT(DISTINCT uniqueid)*100,1)", - "alias": "Answer Rate", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 46, - "MetricId": null, - "custom": 1 - }, { - "id": 11931, - "field": "queuecallerabandon", - "alias": "Abandoned", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 46, - "MetricId": null, - "custom": 0 - }, { - "id": 11932, - "field": "queuecallerexit", - "alias": "Unmanaged", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 46, - "MetricId": null, - "custom": 0 - }, { - "id": 11933, - "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)", - "alias": "Tot TalkTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 46, - "MetricId": null, - "custom": 1 - }, { - "id": 11934, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)))", - "alias": "AvgTalkTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 46, - "MetricId": null, - "custom": 1 - }, { - "id": 11935, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))", - "alias": "AvgAbandonTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 46, - "MetricId": null, - "custom": 1 - }, { - "id": 25365, - "field": "DAYNAME(queuecallerjoinat)", - "alias": "DayOfWeek", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 47, - "MetricId": null, - "custom": 1 - }, { - "id": 25366, - "field": "uniqueid", - "alias": "Offered", - "function": "COUNT DISTINCT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 47, - "MetricId": null, - "custom": 0 - }, { - "id": 25367, - "field": "queuecallercomplete", - "alias": "Answered", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 47, - "MetricId": null, - "custom": 0 - }, { - "id": 25368, - "field": "ROUND(SUM(queuecallercomplete)/COUNT(DISTINCT uniqueid)*100,1)", - "alias": "Answer Rate", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 47, - "MetricId": null, - "custom": 1 - }, { - "id": 25369, - "field": "queuecallerabandon", - "alias": "Abandoned", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": "ASC", - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 47, - "MetricId": null, - "custom": 0 - }, { - "id": 25370, - "field": "queuecallerexit", - "alias": "Unmanaged", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 47, - "MetricId": null, - "custom": 0 - }, { - "id": 25371, - "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)", - "alias": "Tot TalkTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 47, - "MetricId": null, - "custom": 1 - }, { - "id": 25372, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)))", - "alias": "AvgTalkTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 47, - "MetricId": null, - "custom": 1 - }, { - "id": 25373, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))", - "alias": "AvgAbandonTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 47, - "MetricId": null, - "custom": 1 - }, { - "id": 11999, - "field": "queue", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 49, - "MetricId": null, - "custom": 0 - }, { - "id": 12000, - "field": "uniqueid", - "alias": "Offered", - "function": "COUNT DISTINCT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 49, - "MetricId": null, - "custom": 0 - }, { - "id": 12001, - "field": "queuecallercomplete", - "alias": "Answered", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 49, - "MetricId": null, - "custom": 0 - }, { - "id": 12002, - "field": "ROUND(SUM(queuecallercomplete)/COUNT(DISTINCT uniqueid)*100,1)", - "alias": "Answer Rate", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 49, - "MetricId": null, - "custom": 1 - }, { - "id": 12003, - "field": "queuecallerabandon", - "alias": "Abandoned", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 49, - "MetricId": null, - "custom": 0 - }, { - "id": 12004, - "field": "queuecallerexit", - "alias": "Unmanaged", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 49, - "MetricId": null, - "custom": 0 - }, { - "id": 12005, - "field": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)", - "alias": "Tot TalkTime", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 49, - "MetricId": null, - "custom": 1 - }, { - "id": 12006, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)))", - "alias": "AvgTalkTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 49, - "MetricId": null, - "custom": 1 - }, { - "id": 12007, - "field": "ROUND(AVG(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)))", - "alias": "AvgAbandonTime", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 49, - "MetricId": null, - "custom": 1 - }, { - "id": 15136, - "field": "uniqueid", - "alias": "UniqueID", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15137, - "field": "type", - "alias": "Type", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15138, - "field": "tag", - "alias": "Tag", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15139, - "field": "source", - "alias": "Source", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15140, - "field": "destination", - "alias": "Destination", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15141, - "field": "callerid", - "alias": "CallerID", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15142, - "field": "destinationchannel", - "alias": "DestChannel", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15143, - "field": "lastapplication", - "alias": "LastApp", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15144, - "field": "lastdata", - "alias": "LastData", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15145, - "field": "starttime", - "alias": "StartTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15146, - "field": "answertime", - "alias": "AnswerTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15147, - "field": "endtime", - "alias": "EndTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15148, - "field": "duration", - "alias": "Duration", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15149, - "field": "disposition", - "alias": "Disposition", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 50, - "MetricId": null, - "custom": 0 - }, { - "id": 15210, - "field": "uniqueid", - "alias": "UniqueID", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15211, - "field": "accountcode", - "alias": "AgentExtension", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15212, - "field": "source", - "alias": "Source", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15213, - "field": "destination", - "alias": "Destination", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15214, - "field": "callerid", - "alias": "CallerId", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15215, - "field": "starttime", - "alias": "StartTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15216, - "field": "answertime", - "alias": "AnswerTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15217, - "field": "endtime", - "alias": "EndTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15218, - "field": "duration", - "alias": "Duration", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15219, - "field": "billableseconds", - "alias": "Billsec", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15220, - "field": "disposition", - "alias": "Disposition", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15221, - "field": "tag", - "alias": "Tag", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 51, - "MetricId": null, - "custom": 0 - }, { - "id": 15234, - "field": "type", - "alias": "Type", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 52, - "MetricId": null, - "custom": 0 - }, { - "id": 15235, - "field": "uniqueid", - "alias": "Calls", - "function": "COUNT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 52, - "MetricId": null, - "custom": 0 - }, { - "id": 15236, - "field": "duration", - "alias": "Tot Duration", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 52, - "MetricId": null, - "custom": 0 - }, { - "id": 15237, - "field": "ROUND(AVG(duration))", - "alias": "Avg Duration", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 52, - "MetricId": null, - "custom": 1 - }, { - "id": 15242, - "field": "disposition", - "alias": "Disposition", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 53, - "MetricId": null, - "custom": 0 - }, { - "id": 15243, - "field": "uniqueid", - "alias": "Calls", - "function": "COUNT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 53, - "MetricId": null, - "custom": 0 - }, { - "id": 15244, - "field": "duration", - "alias": "Tot Duration", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 53, - "MetricId": null, - "custom": 0 - }, { - "id": 15245, - "field": "ROUND(AVG(duration))", - "alias": "Avg Duration", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 53, - "MetricId": null, - "custom": 1 - }, { - "id": 15262, - "field": "SUBSTRING_INDEX(channel, '-', 1)", - "alias": "Agent", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 54, - "MetricId": null, - "custom": 1 - }, { - "id": 15263, - "field": "uniqueid", - "alias": "Calls", - "function": "COUNT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 54, - "MetricId": null, - "custom": 0 - }, { - "id": 15264, - "field": "duration", - "alias": "Tot Duration", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 54, - "MetricId": null, - "custom": 0 - }, { - "id": 15265, - "field": "ROUND(AVG(duration))", - "alias": "Avg Duration", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 54, - "MetricId": null, - "custom": 1 - }, { - "id": 15274, - "field": "starttime", - "alias": "Date", - "function": null, - "format": "DATE", - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 55, - "MetricId": null, - "custom": 0 - }, { - "id": 15275, - "field": "uniqueid", - "alias": "Calls", - "function": "COUNT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 55, - "MetricId": null, - "custom": 0 - }, { - "id": 15276, - "field": "duration", - "alias": "Tot Duration", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 55, - "MetricId": null, - "custom": 0 - }, { - "id": 15277, - "field": "ROUND(AVG(duration))", - "alias": "Avg Duration", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 55, - "MetricId": null, - "custom": 1 - }, { - "id": 15303, - "field": "membername", - "alias": "Agent", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": "ASC", - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 57, - "MetricId": null, - "custom": 0 - }, { - "id": 15304, - "field": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))", - "alias": "Duration", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 57, - "MetricId": null, - "custom": 1 - }, { - "id": 15374, - "field": "membername", - "alias": "Agent", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 61, - "MetricId": null, - "custom": 0 - }, { - "id": 15375, - "field": "CASE WHEN type=\"LOGIN\" THEN UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt) END", - "alias": "Login Time", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 61, - "MetricId": null, - "custom": 1 - }, { - "id": 15376, - "field": "CASE WHEN type=\"TALKING\" THEN UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt) END", - "alias": "Talk Time", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 61, - "MetricId": null, - "custom": 1 - }, { - "id": 15377, - "field": "CASE WHEN type=\"PAUSE\" THEN UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt) END", - "alias": "Pause Time", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 61, - "MetricId": null, - "custom": 1 - }, { - "id": 15378, - "field": "membername", - "alias": "Agent", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 62, - "MetricId": null, - "custom": 0 - }, { - "id": 15379, - "field": "enterAt", - "alias": "EnterAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 62, - "MetricId": null, - "custom": 0 - }, { - "id": 15380, - "field": "exitAt", - "alias": "ExitAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 62, - "MetricId": null, - "custom": 0 - }, { - "id": 15381, - "field": "data1", - "alias": "Pause", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 62, - "MetricId": null, - "custom": 0 - }, { - "id": 15382, - "field": "duration", - "alias": "Duration", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 62, - "MetricId": null, - "custom": 0 - }, { - "id": 15383, - "field": "membername", - "alias": "Agent", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 63, - "MetricId": null, - "custom": 0 - }, { - "id": 15384, - "field": "interface", - "alias": "Interface", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 63, - "MetricId": null, - "custom": 0 - }, { - "id": 15385, - "field": "type", - "alias": "Event", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 63, - "MetricId": null, - "custom": 0 - }, { - "id": 15386, - "field": "data1", - "alias": "Type", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 63, - "MetricId": null, - "custom": 0 - }, { - "id": 15387, - "field": "enterAt", - "alias": "EnterAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 63, - "MetricId": null, - "custom": 0 - }, { - "id": 15388, - "field": "exitAt", - "alias": "ExitAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 63, - "MetricId": null, - "custom": 0 - }, { - "id": 15389, - "field": "SEC_TO_TIME(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt))", - "alias": "Duration", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 63, - "MetricId": null, - "custom": 1 - }, { - "id": 15390, - "field": "membername", - "alias": "Agent", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": "ASC", - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 64, - "MetricId": null, - "custom": 0 - }, { - "id": 15391, - "field": "data1", - "alias": "PauseType", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": "ASC", - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 64, - "MetricId": null, - "custom": 0 - }, { - "id": 15392, - "field": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))", - "alias": "Duration", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 64, - "MetricId": null, - "custom": 1 - }, { - "id": 25439, - "field": "project_name", - "alias": "Project Name", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 65, - "MetricId": null, - "custom": 0 - }, { - "id": 25440, - "field": "uniqueid", - "alias": "UniqueId", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 65, - "MetricId": null, - "custom": 0 - }, { - "id": 25441, - "field": "callerid", - "alias": "CallerId", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 65, - "MetricId": null, - "custom": 0 - }, { - "id": 25442, - "field": "dnid", - "alias": "DID", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 65, - "MetricId": null, - "custom": 0 - }, { - "id": 25443, - "field": "joinAt", - "alias": "Start Time", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": "ASC", - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 65, - "MetricId": null, - "custom": 0 - }, { - "id": 25444, - "field": "leaveAt", - "alias": "End Time", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 65, - "MetricId": null, - "custom": 0 - }, { - "id": 25445, - "field": "UNIX_TIMESTAMP(leaveAt)-UNIX_TIMESTAMP(joinAt)", - "alias": "Duration", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 65, - "MetricId": null, - "custom": 1 - }, { - "id": 15441, - "field": "uniqueid", - "alias": "Unique Id", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 67, - "MetricId": null, - "custom": 0 - }, { - "id": 15442, - "field": "project_name", - "alias": "Project Name", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 67, - "MetricId": null, - "custom": 0 - }, { - "id": 15443, - "field": "callerid", - "alias": "Caller Id", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 67, - "MetricId": null, - "custom": 0 - }, { - "id": 15444, - "field": "node", - "alias": "Block", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 67, - "MetricId": null, - "custom": 0 - }, { - "id": 15445, - "field": "data", - "alias": "Data", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 67, - "MetricId": null, - "custom": 0 - }, { - "id": 15998, - "field": "accountname", - "alias": "Account", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 68, - "MetricId": null, - "custom": 0 - }, { - "id": 15999, - "field": "uniqueid", - "alias": "Received", - "function": "COUNT DISTINCT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 68, - "MetricId": null, - "custom": 0 - }, { - "id": 16000, - "field": "IF(timeout=0,1,null)", - "alias": "Accepted", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 68, - "MetricId": null, - "custom": 1 - }, { - "id": 16001, - "field": "ROUND(SUM(IF(timeout=0,1,null))/COUNT(DISTINCT(uniqueid))*100,1)", - "alias": "Accept Rate", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 68, - "MetricId": null, - "custom": 1 - }, { - "id": 16002, - "field": "IF(timeout=0 AND application=\"queue\",1,null)", - "alias": "Accepted by Queue", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 68, - "MetricId": null, - "custom": 1 - }, { - "id": 16003, - "field": "IF(timeout=0 AND application=\"fidelity\",1,null)", - "alias": "Accept by Fidelity", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 68, - "MetricId": null, - "custom": 1 - }, { - "id": 16004, - "field": "IF(timeout=0 AND application=\"agent\",1,null)", - "alias": "Accepted by Agent", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 68, - "MetricId": null, - "custom": 1 - }, { - "id": 15458, - "field": "connectedlinename", - "alias": "Agent", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 69, - "MetricId": null, - "custom": 0 - }, { - "id": 15459, - "field": "uniqueid", - "alias": "Recorded Calls", - "function": "COUNT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 69, - "MetricId": null, - "custom": 0 - }, { - "id": 15460, - "field": "rating", - "alias": "Total Rating", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 69, - "MetricId": null, - "custom": 0 - }, { - "id": 15461, - "field": "rating", - "alias": "Avg Rating", - "function": "AVG", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 69, - "MetricId": null, - "custom": 0 - }, { - "id": 25446, - "field": "queue", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 70, - "MetricId": null, - "custom": 0 - }, { - "id": 25447, - "field": "uniqueid", - "alias": "Rated Calls", - "function": "COUNT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 70, - "MetricId": null, - "custom": 0 - }, { - "id": 25448, - "field": "rating", - "alias": "Total Rating", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 70, - "MetricId": null, - "custom": 0 - }, { - "id": 25449, - "field": "rating", - "alias": "Avg Rating", - "function": "AVG", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 70, - "MetricId": null, - "custom": 0 - }, { - "id": 25463, - "field": "websitename", - "alias": "WebSite", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 72, - "MetricId": null, - "custom": 0 - }, { - "id": 25464, - "field": "uniqueid", - "alias": "Sessions", - "function": "COUNT DISTINCT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 72, - "MetricId": null, - "custom": 0 - }, { - "id": 25465, - "field": "complete", - "alias": "Completed", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 72, - "MetricId": null, - "custom": 0 - }, { - "id": 25466, - "field": "abandon", - "alias": "Abandoned", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 72, - "MetricId": null, - "custom": 0 - }, { - "id": 25467, - "field": "timeout", - "alias": "Timeout", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 72, - "MetricId": null, - "custom": 0 - }, { - "id": 25468, - "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)", - "alias": "Tot Session Time", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 72, - "MetricId": null, - "custom": 1 - }, { - "id": 25469, - "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))", - "alias": "Avg Session Time", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 72, - "MetricId": null, - "custom": 1 - }, { - "id": 25470, - "field": "uniqueid", - "alias": "UniqueId", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25471, - "field": "websitename", - "alias": "Website", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25472, - "field": "visitorname", - "alias": "VisitorName", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25473, - "field": "visitoremail", - "alias": "VisitorEmail", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25474, - "field": "membername", - "alias": "MemeberName", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25475, - "field": "queuename", - "alias": "QueueName", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25476, - "field": "joinAt", - "alias": "JoinAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25477, - "field": "leaveAt", - "alias": "LeaveAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25478, - "field": "completeAt", - "alias": "CompleteAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25479, - "field": "complete", - "alias": "Completed", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25480, - "field": "completeReason", - "alias": "CompleteReason", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25481, - "field": "abandon", - "alias": "Abandoned", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25482, - "field": "timeout", - "alias": "Timeout", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 73, - "MetricId": null, - "custom": 0 - }, { - "id": 25483, - "field": "membername", - "alias": "Agent", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 74, - "MetricId": null, - "custom": 0 - }, { - "id": 25484, - "field": "complete", - "alias": "Session", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 74, - "MetricId": null, - "custom": 0 - }, { - "id": 25485, - "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)", - "alias": "Tot Session Time", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 74, - "MetricId": null, - "custom": 1 - }, { - "id": 25486, - "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))", - "alias": "Avg Session Time", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 74, - "MetricId": null, - "custom": 1 - }, { - "id": 25487, - "field": "COUNT(IF(application=\"queue\",1,NULL))", - "alias": "FromQueue", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 74, - "MetricId": null, - "custom": 1 - }, { - "id": 25488, - "field": "COUNT(IF(application=\"agent\",1,NULL))", - "alias": "DirectToAgent", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 74, - "MetricId": null, - "custom": 1 - }, { - "id": 25489, - "field": "queuename", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 75, - "MetricId": null, - "custom": 0 - }, { - "id": 25490, - "field": "uniqueid", - "alias": "Sessions", - "function": "COUNT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 75, - "MetricId": null, - "custom": 0 - }, { - "id": 25491, - "field": "complete", - "alias": "Completed", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 75, - "MetricId": null, - "custom": 0 - }, { - "id": 25492, - "field": "abandon", - "alias": "Abandoned", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 75, - "MetricId": null, - "custom": 0 - }, { - "id": 25493, - "field": "timeout", - "alias": "Timeout", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 75, - "MetricId": null, - "custom": 0 - }, { - "id": 25494, - "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)", - "alias": "Session Time", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 75, - "MetricId": null, - "custom": 1 - }, { - "id": 25495, - "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))", - "alias": "Avg Session Time", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 75, - "MetricId": null, - "custom": 1 - }, { - "id": 15623, - "field": "joinAt", - "alias": "Date", - "function": null, - "format": "DATE", - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 76, - "MetricId": null, - "custom": 0 - }, { - "id": 15624, - "field": "uniqueid", - "alias": "Sessions", - "function": "COUNT DISTINCT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 76, - "MetricId": null, - "custom": 0 - }, { - "id": 15625, - "field": "complete", - "alias": "Completed", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 76, - "MetricId": null, - "custom": 0 - }, { - "id": 15626, - "field": "ROUND(SUM(complete)/COUNT(DISTINCT uniqueid) *100,1)", - "alias": "Complete Rate", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 76, - "MetricId": null, - "custom": 1 - }, { - "id": 15627, - "field": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)", - "alias": "Tot Session Time", - "function": "SUM", - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 76, - "MetricId": null, - "custom": 1 - }, { - "id": 15628, - "field": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))", - "alias": "Avg Session Time", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 76, - "MetricId": null, - "custom": 1 - }, { - "id": 15953, - "field": "queuename", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 77, - "MetricId": null, - "custom": 0 - }, { - "id": 15954, - "field": "uniqueid", - "alias": "Received", - "function": "COUNT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 77, - "MetricId": null, - "custom": 0 - }, { - "id": 15955, - "field": "IF(timeout=0,1,0)", - "alias": "Accepted", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 77, - "MetricId": null, - "custom": 1 - }, { - "id": 15956, - "field": "timeout", - "alias": "Timeout", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 77, - "MetricId": null, - "custom": 0 - }, { - "id": 15957, - "field": "ROUND(SUM(IF(timeout=0,1,null))/COUNT(uniqueid)*100,1)", - "alias": "Accept Rate", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 77, - "MetricId": null, - "custom": 1 - }, { - "id": 15958, - "field": "ROUND(AVG(IF(timeout=0,UNIX_TIMESTAMP(leaveat)- UNIX_TIMESTAMP(joinat),NULL)))", - "alias": "Avg Accept Time", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 77, - "MetricId": null, - "custom": 1 - }, { - "id": 16310, - "field": "membername", - "alias": "membername", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 79, - "MetricId": null, - "custom": 0 - }, { - "id": 16311, - "field": "uniqueid", - "alias": "Tot Accepted", - "function": "COUNT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 79, - "MetricId": null, - "custom": 0 - }, { - "id": 16312, - "field": "IF(application=\"fidelity\",1,0)", - "alias": "Fidelity", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 79, - "MetricId": null, - "custom": 1 - }, { - "id": 16313, - "field": "IF(application=\"agent\",1,0)", - "alias": "Agent", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 79, - "MetricId": null, - "custom": 1 - }, { - "id": 16314, - "field": "IF(application=\"queue\",1,0)", - "alias": "Queue", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 79, - "MetricId": null, - "custom": 1 - }, { - "id": 16302, - "field": "createdAt", - "alias": "Date", - "function": null, - "format": "DATE", - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 81, - "MetricId": null, - "custom": 0 - }, { - "id": 16303, - "field": "IF(status=\"RECEIVED\",1,0)", - "alias": "Received", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 81, - "MetricId": null, - "custom": 1 - }, { - "id": 16304, - "field": "IF(status=\"SENT\",1,0)", - "alias": "Sent", - "function": "SUM", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 81, - "MetricId": null, - "custom": 1 - }, { - "id": 17281, - "field": "id", - "alias": "id", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17282, - "field": "account", - "alias": "account", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17283, - "field": "status", - "alias": "status", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17284, - "field": "lastEvent", - "alias": "lastEvent", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17285, - "field": "createdAt", - "alias": "createdAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17286, - "field": "arrivedAt", - "alias": "arrivedAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17287, - "field": "openedAt", - "alias": "openedAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17288, - "field": "closedAt", - "alias": "closedAt", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17289, - "field": "mailIn", - "alias": "mailIn", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17290, - "field": "mailOut", - "alias": "mailOut", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17291, - "field": "tags", - "alias": "tags", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17292, - "field": "disposition", - "alias": "disposition", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17293, - "field": "ParentId", - "alias": "ParentId", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 82, - "MetricId": null, - "custom": 0 - }, { - "id": 17300, - "field": "disposition", - "alias": "disposition", - "function": null, - "format": null, - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 83, - "MetricId": null, - "custom": 0 - }, { - "id": 17301, - "field": "count(*)", - "alias": "interactions", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 83, - "MetricId": null, - "custom": 1 - }, { - "id": 17333, - "field": "closedAt", - "alias": "closedAt", - "function": null, - "format": "DATE", - "groupBy": 1, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 84, - "MetricId": null, - "custom": 0 - }, { - "id": 17334, - "field": "id", - "alias": "Interactions", - "function": "COUNT", - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 84, - "MetricId": null, - "custom": 0 - }, { - "id": 17335, - "field": "ROUND(AVG(UNIX_TIMESTAMP(closedAt)-UNIX_TIMESTAMP(arrivedAt)))", - "alias": "Avg Handle Time", - "function": null, - "format": "SEC_TO_TIME", - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 84, - "MetricId": null, - "custom": 1 - }, { - "id": 25434, - "field": "createdAt", - "alias": "DateTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 85, - "MetricId": null, - "custom": 0 - }, { - "id": 25435, - "field": "id", - "alias": "Id", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 85, - "MetricId": null, - "custom": 0 - }, { - "id": 25436, - "field": "from", - "alias": "fromNumber", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 85, - "MetricId": null, - "custom": 0 - }, { - "id": 25437, - "field": "to", - "alias": "toNumber", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 85, - "MetricId": null, - "custom": 0 - }, { - "id": 25438, - "field": "status", - "alias": "Status", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 85, - "MetricId": null, - "custom": 0 - }, { - "id": 25386, - "field": "createdAt", - "alias": "DateTime", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 90, - "MetricId": null, - "custom": 0 - }, { - "id": 25387, - "field": "uniqueid", - "alias": "UniqueID", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 90, - "MetricId": null, - "custom": 0 - }, { - "id": 25388, - "field": "integration", - "alias": "Integration", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 90, - "MetricId": null, - "custom": 0 - }, { - "id": 25389, - "field": "queue", - "alias": "Queue", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 90, - "MetricId": null, - "custom": 0 - }, { - "id": 25390, - "field": "calleridnum", - "alias": "CallerID", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 90, - "MetricId": null, - "custom": 0 - }, { - "id": 25391, - "field": "membername", - "alias": "AgentName", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 90, - "MetricId": null, - "custom": 0 - }, { - "id": 25392, - "field": "exitStatus", - "alias": "exitStatus", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 90, - "MetricId": null, - "custom": 0 - }, { - "id": 25393, - "field": "ticketId", - "alias": "TicketID", - "function": null, - "format": null, - "groupBy": 0, - "orderBy": null, - "CustomReportId": null, - "DefaultMetricId": null, - "DefaultReportId": 90, - "MetricId": null, - "custom": 0 - }]; - - // var newDefaultMetrics = [{ - // "id": 1, - // "name": "Queue - TalkTime", - // "table": "report_queue_history", - // "metric": "UNIX_TIMESTAMP(queuecallercompleteAt)-UNIX_TIMESTAMP(queuecallerleaveAt)" - // }, { - // "id": 2, - // "name": "Queue - Abandon Time", - // "table": "report_queue_history", - // "metric": "UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt)" - // }, { - // "id": 3, - // "name": "Abandoned <10s", - // "table": "report_queue_history", - // "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <10,1,NULL))", - // "description": "Count of abandoned calls within 10 seconds (Short Calls)" - // }, { - // "id": 4, - // "name": "Queue - AnswerTime", - // "table": "report_queue_history", - // "metric": "IF(queuecallercomplete=1,holdtime,null)" - // }, { - // "id": 5, - // "name": "Answered < 10s", - // "table": "report_agent_history", - // "metric": "COUNT(IF(holdtime<10,1,NULL))", - // "description": "Count of answered calls within 10 seconds" - // }, { - // "id": 6, - // "name": "Answered 10-20s", - // "table": "report_agent_history", - // "metric": "COUNT(IF(holdtime >=10 AND holdtime <20,1,NULL))", - // "description": "Count of answered calls between 10 and 20 seconds" - // }, { - // "id": 7, - // "name": "Answered 20-30s", - // "table": "report_agent_history", - // "metric": "COUNT(IF(holdtime >=20 AND holdtime <30,1,NULL))", - // "description": "Count of answered calls between 20 and 30 seconds" - // }, { - // "id": 8, - // "name": "Answered >30s", - // "table": "report_agent_history", - // "metric": "COUNT(IF(holdtime >=30,1,NULL))", - // "description": "Count of answered calls over 30 seconds" - // }, { - // "id": 9, - // "name": "Queue - Exit Time", - // "table": "report_queue_history", - // "metric": "UNIX_TIMESTAMP(queuecallerExitAt)-UNIX_TIMESTAMP(queuecallerjoinAt)" - // }, { - // "id": 10, - // "name": "Abandoned 10-60s", - // "table": "report_queue_history", - // "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=10 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <60,1,NULL))", - // "description": "Count of abandoned calls between 10 and 60 seconds" - // }, { - // "id": 11, - // "name": "Abandoned 60-120s", - // "table": "report_queue_history", - // "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=60 AND UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) <120,1,NULL))", - // "description": "Count of abandoned calls between 60 and 120 seconds" - // }, { - // "id": 12, - // "name": "Queue - Abandoned >120s", - // "table": "report_queue_history", - // "metric": "COUNT(IF(UNIX_TIMESTAMP(queuecallerAbandonAt)-UNIX_TIMESTAMP(queuecallerjoinAt) >=120,1,NULL))", - // "description": "Count of abandoned calls over 120 seconds" - // }, { - // "id": 13, - // "name": "Queue - JoinDate", - // "table": "report_queue_history", - // "metric": "DATE(queuecallerjoinat)", - // "description": "Extract the date of the join queue" - // }, { - // "id": 14, - // "name": "Queue - JoinHour", - // "table": "report_queue_history", - // "metric": "HOUR(queuecallerjoinat)", - // "description": "Extract the hour of the join queue" - // }, { - // "id": 15, - // "name": "Queue - JoinDay", - // "table": "report_queue_history", - // "metric": "DAY(queuecallerjoinat)", - // "description": "Extract the day of the join queue" - // }, { - // "id": 16, - // "name": "Member - Event Duration", - // "table": "report_member_history", - // "metric": "UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)", - // "description": "Member event duration in seconds" - // }, { - // "id": 17, - // "name": "Member - Total Event Duration", - // "table": "report_member_history", - // "metric": "SEC_TO_TIME(SUM(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt)))", - // "description": "Total event duration" - // }, { - // "id": 18, - // "name": "Chat - Session Time", - // "table": "report_chat_session_history", - // "metric": "UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)", - // "description": "Session Time", - // }, { - // "id": 19, - // "name": "Chat - Queue", - // "table": "report_chat_session_history", - // "metric": "COUNT(IF(application=\"queue\",1,NULL))", - // "description": "Chat queue application count", - // }, { - // "id": 20, - // "name": "Chat - Agent", - // "table": "report_chat_session_history", - // "metric": "COUNT(IF(application=\"agent\",1,NULL))", - // "description": "Chat agent application count", - // }, { - // "id": 21, - // "name": "Chat - Avg Session Time", - // "table": "report_chat_session_history", - // "metric": "ROUND(AVG(UNIX_TIMESTAMP(completeAt)-UNIX_TIMESTAMP(leaveAt)))", - // "description": "Average session time" - // }, { - // "id": 22, - // "name": "Member - Event Duration (HH:mm:ss)", - // "table": "report_member_history", - // "metric": "SEC_TO_TIME(UNIX_TIMESTAMP(exitAt)-UNIX_TIMESTAMP(enterAt))", - // "description": "Member events duration in time format" - // }, { - // "id": 23, - // "name": "Square - Duration", - // "table": "report_square_history", - // "metric": "UNIX_TIMESTAMP(leaveAt)-UNIX_TIMESTAMP(joinAt)", - // "description": "IVR Duration" - // }, { - // "id": 24, - // "name": "Queue - EndTime Call", - // "table": "report_queue_history", - // "metric": "CASE WHEN queuecallercomplete=1 THEN queuecallercompleteAt ELSE queuecallerLeaveAt END", - // "description": null - // }, { - // "id": 25, - // "name": "Queue - Calls Result", - // "table": "report_queue_history", - // "metric": "CASE WHEN queuecallercomplete=1 THEN \"YES\" ELSE \"NO\" END", - // "description": "Show if a call is answered or not" - // }]; - - models.ReportTree.destroy({ - where: { - id: 1 - } - }) - .then(function() { - return models.ReportTree.create({ - id: 1, - tree: '[{"id":"1","text":"Motion Reports","icon":"icon-book-open","li_attr":{"id":"1"},"a_attr":{"href":"#","id":"1_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"#"},{"id":"j12_2","text":"Voice","icon":true,"li_attr":{"id":"j12_2"},"a_attr":{"href":"#","id":"j12_2_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j12_7","text":"Queues","icon":true,"li_attr":{"id":"j12_7"},"a_attr":{"href":"#","id":"j12_7_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j60_1","text":"Answered","icon":true,"li_attr":{"id":"j60_1"},"a_attr":{"href":"#","id":"j60_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_7"},{"id":"j60_2","text":"Unanswered","icon":true,"li_attr":{"id":"j60_2"},"a_attr":{"href":"#","id":"j60_2_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_7"},{"id":"j60_3","text":"Distribution","icon":true,"li_attr":{"id":"j60_3"},"a_attr":{"href":"#","id":"j60_3_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_7"},{"id":"j51_1","text":"Calls","icon":true,"li_attr":{"id":"j51_1"},"a_attr":{"href":"#","id":"j51_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j87_1","text":"Agents","icon":true,"li_attr":{"id":"j87_1"},"a_attr":{"href":"#","id":"j87_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j87_2","text":"CallySquare","icon":true,"li_attr":{"id":"j87_2"},"a_attr":{"href":"#","id":"j87_2_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j110_1","text":"Recordings","icon":true,"li_attr":{"id":"j110_1"},"a_attr":{"href":"#","id":"j110_1_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j4_10","text":"Integration","icon":true,"li_attr":{"id":"j4_10"},"a_attr":{"href":"#","id":"j4_10_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"j12_2"},{"id":"j12_3","text":"Chat","icon":true,"li_attr":{"id":"j12_3"},"a_attr":{"href":"#","id":"j12_3_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j12_4","text":"E-Mail","icon":true,"li_attr":{"id":"j12_4"},"a_attr":{"href":"#","id":"j12_4_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j12_6","text":"SMS","icon":true,"li_attr":{"id":"j12_6"},"a_attr":{"href":"#","id":"j12_6_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"},{"id":"j12_5","text":"Agents","icon":true,"li_attr":{"id":"j12_5"},"a_attr":{"href":"#","id":"j12_5_anchor"},"state":{"loaded":true,"opened":false,"selected":false,"disabled":false},"data":{},"parent":"1"}]', - }) - }) - .then(function() { - return models.ReportTree.findOrCreate({ - where: { - id: 2 - }, - defaults: { - id: 2, - tree: '[{"id":"1","text":"Custom Reports","icon":"icon-book-open","li_attr":{"id":"1"},"a_attr":{"href":"#","id":"1_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"#"},{"id":"2","text":"My Reports","icon":true,"li_attr":{"id":"2"},"a_attr":{"href":"#","id":"2_anchor"},"state":{"loaded":true,"opened":true,"selected":false,"disabled":false},"data":{},"parent":"1"}]' - } - }) - }) - // .then(function() { - // return models.DefaultMetric.findAll(); - // }) - // .then(function(oldDefaultMetrics) { - // var bulkDefaultMetrics = []; - // oldDefaultMetrics = _.map(oldDefaultMetrics, 'id'); - // newDefaultMetrics.forEach(function(defaultMet) { - // if (_.includes(oldDefaultMetrics, defaultMet.id)) { - // bulkDefaultMetrics.push(models.DefaultMetric.update(defaultMet, { - // where: { - // id: defaultMet.id - // } - // })); - // } else { - // bulkDefaultMetrics.push(models.DefaultMetric.create(defaultMet)); - // } - // }); - // return bulkDefaultMetrics; - // }) - // .all() - // .then(function() { - // return models.DefaultReport.findAll() - // }) - // .then(function(oldDefaultReports) { - // var bulkDefaultReports = []; - // oldDefaultReports = _.map(oldDefaultReports, 'id'); - // newDefaulReports.forEach(function(defaultRep) { - // if (_.includes(oldDefaultReports, defaultRep.id)) { - // bulkDefaultReports.push(models.DefaultReport.update(defaultRep, { - // where: { - // id: defaultRep.id - // } - // })); - // } else { - // bulkDefaultReports.push(models.DefaultReport.create(defaultRep)); - // } - // }); - // return bulkDefaultReports; - // }) - // .all() - .then(function() { - return models.ReportField.destroy({ - where: { - DefaultReportId: { - $ne: null - } - } - }) - }) - .then(function() { - return models.DefaultReport.destroy({ - where: { - id: { - $ne: null - } - } - }); - }) - .then(function() { - return models.DefaultReport.bulkCreate(newDefaultReports); - }) - .then(function() { - return models.ReportField.bulkCreate(newDefaulReportsFields, { - ignoreDuplicates: true, - individualHooks: true - }) - }).then(function() { - console.log('Populating Analytics'); - }).catch(function(err) { - console.log('Error populating Analytics:', err); - }); - - }) - .catch(function(err) { - console.error(err); - }); +var _0xa37b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x66\x69\x72\x73\x74\x53\x65\x74\x75\x70","\x6C\x6F\x67","\x69\x64","\x61\x64\x64\x55\x73\x65\x72\x73","\x74\x68\x65\x6E","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x4D\x61\x69\x6C\x20\x51\x75\x65\x75\x65\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x6A\x6F\x69\x6E","\x6E\x61\x6D\x65","\x6D\x61\x70","\x66\x6F\x72\x6D\x61\x74","\x61\x64\x64\x55\x73\x65\x72","\x53\x61\x6C\x65\x73","\x72\x72\x6D\x65\x6D\x6F\x72\x79","\x53\x75\x70\x70\x6F\x72\x74","\x62\x65\x65\x70\x61\x6C\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x6F\x69\x63\x65\x20\x51\x75\x65\x75\x65\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72","\x66\x69\x6E\x64","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65","\x55\x73\x65\x72\x73","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x41\x67\x65\x6E\x74\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x54\x65\x61\x6D\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x64\x65\x66\x61\x75\x6C\x74","\x72\x69\x6E\x67\x61\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x55\x73\x65\x72\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x44\x65\x66\x61\x75\x6C\x74\x20\x54\x65\x61\x6D","\x61\x67\x65\x6E\x74","\x4A\x6F\x68\x6E\x20\x44\x6F\x65","\x6A\x6F\x68\x6E\x2E\x64\x6F\x65\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x73\x68\x75\x74\x74\x6C\x65\x35\x35","\x4A\x61\x6E\x65\x20\x4D\x69\x6C\x6C\x65\x72","\x6A\x61\x6E\x65\x2E\x6D\x69\x6C\x6C\x65\x72\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x55\x73\x65\x72","\x63\x72\x65\x61\x74\x65","\x54\x65\x61\x6D","\x61\x64\x6D\x69\x6E","\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x6F\x72","\x61\x64\x6D\x69\x6E\x40\x61\x64\x6D\x69\x6E\x2E\x63\x6F\x6D","\x70\x61\x73\x73\x77\x6F\x72\x64","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x43\x68\x61\x6E\x53\x70\x79\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x43\x68\x61\x6E\x53\x70\x79\x31","\x73\x70\x79\x31","\x54\x68\x65\x20\x73\x75\x70\x65\x72\x76\x69\x73\x6F\x72\x20\x63\x61\x6E\x20\x6C\x69\x73\x74\x65\x6E\x20\x61\x6E\x64\x20\x74\x61\x6C\x6B\x20\x74\x6F\x20\x74\x68\x65\x20\x61\x67\x65\x6E\x74\x2E\x20\x54\x68\x65\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x20\x77\x69\x6C\x6C\x20\x6E\x6F\x74\x20\x6C\x69\x73\x74\x65\x6E\x20\x74\x6F\x20\x74\x68\x65\x20\x73\x75\x70\x65\x72\x76\x69\x73\x6F\x72\x20\x76\x6F\x69\x63\x65\x2E","\x62\x77","\x43\x68\x61\x6E\x53\x70\x79\x32","\x73\x70\x79\x32","\x54\x68\x65\x20\x73\x75\x70\x65\x72\x76\x69\x73\x6F\x72\x20\x63\x61\x6E\x20\x6F\x6E\x6C\x79\x20\x6C\x69\x73\x74\x65\x6E\x20\x74\x68\x65\x20\x61\x67\x65\x6E\x74\x20\x63\x68\x61\x6E\x6E\x65\x6C\x20\x28\x6E\x65\x69\x74\x68\x65\x72\x20\x74\x68\x65\x20\x61\x67\x65\x6E\x74\x20\x6E\x6F\x72\x20\x74\x68\x65\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x20\x77\x69\x6C\x6C\x20\x6C\x69\x73\x74\x65\x6E\x20\x74\x6F\x20\x74\x68\x65\x20\x73\x75\x70\x65\x72\x76\x69\x73\x6F\x72\x20\x76\x6F\x69\x63\x65\x2E","\x62\x6F","\x43\x68\x61\x6E\x53\x70\x79\x33","\x73\x70\x79\x33","\x54\x68\x65\x20\x73\x75\x70\x65\x72\x76\x69\x73\x6F\x72\x20\x63\x61\x6E\x20\x6C\x69\x73\x74\x65\x6E\x20\x61\x6E\x64\x20\x74\x61\x6C\x6B\x20\x62\x6F\x74\x68\x20\x74\x6F\x20\x74\x68\x65\x20\x61\x67\x65\x6E\x74\x20\x61\x6E\x64\x20\x74\x6F\x20\x74\x68\x65\x20\x63\x75\x73\x74\x6F\x6D\x65\x72\x2C\x20\x6C\x69\x6B\x65\x20\x61\x20\x70\x75\x72\x65\x20\x33\x20\x77\x61\x79\x20\x63\x6F\x6E\x66\x65\x72\x65\x6E\x63\x65\x20\x72\x6F\x6F\x6D\x2E","\x62\x57","\x43\x68\x61\x6E\x53\x70\x79","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x43\x4D\x20\x4C\x69\x73\x74\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x53\x79\x73\x74\x65\x6D\x20\x4C\x69\x73\x74","\x44\x65\x66\x61\x75\x6C\x74\x20\x4C\x69\x73\x74","\x4C\x69\x73\x74","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x6F\x69\x63\x65\x20\x4D\x75\x73\x69\x63\x20\x4F\x6E\x20\x48\x6F\x6C\x64\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x2F\x76\x61\x72\x2F\x6C\x69\x62\x2F\x61\x73\x74\x65\x72\x69\x73\x6B\x2F\x6D\x6F\x68\x2F","\x66\x69\x6C\x65\x73","\x72\x61\x6E\x64\x6F\x6D","\x77\x61\x76","\x56\x6F\x69\x63\x65\x4D\x75\x73\x69\x63\x4F\x6E\x48\x6F\x6C\x64","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x43\x48\x4F\x49\x43\x45","\x4F\x72\x64\x65\x72\x20\x6E\x75\x6D\x62\x65\x72","\x4F\x52\x44\x45\x52\x4E\x55\x4D","\x44\x61\x74\x61\x20\x42\x61\x73\x65\x20\x51\x75\x65\x72\x79\x20\x52\x65\x73\x75\x6C\x74","\x44\x42\x52\x45\x53\x55\x4C\x54","\x52\x41\x54\x45","\x56\x61\x72\x69\x61\x62\x6C\x65","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x50\x61\x75\x73\x65\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x42\x41\x43\x4B\x4F\x46\x46\x49\x43\x45","\x41\x46\x54\x45\x52\x43\x41\x4C\x4C","\x50\x61\x75\x73\x65","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x54\x72\x75\x6E\x6B\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x44\x65\x6D\x6F\x54\x72\x75\x6E\x6B","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x41\x4C\x4C\x4F\x57\x45\x44\x5F\x4E\x4F\x54\x5F\x53\x43\x52\x45\x45\x4E\x45\x44","\x30\x2E\x30\x2E\x30\x2E\x30\x2F\x30\x2E\x30\x2E\x30\x2E\x30","\x35\x35\x78\x63\x61\x6C\x6C\x79\x35\x35","\x54\x72\x75\x6E\x6B","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x43\x6F\x6E\x74\x65\x78\x74\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x44\x65\x66\x61\x75\x6C\x74\x20\x63\x6F\x6E\x74\x65\x78\x74\x20\x28\x44\x4F\x20\x4E\x4F\x54\x20\x44\x45\x4C\x45\x54\x45\x29","\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x56\x6F\x69\x63\x65\x43\x6F\x6E\x74\x65\x78\x74","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x6F\x69\x63\x65\x20\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x3A\x20\x25\x73\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x63\x6F\x6E\x74\x65\x78\x74","\x65\x78\x74\x65\x6E","\x5F\x36\x30\x30","\x31","\x4E\x6F\x4F\x70","\x49\x6E\x74\x65\x72\x6E\x61\x6C\x20\x43\x61\x6C\x6C","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x45\x63\x68\x6F\x20\x54\x65\x73\x74","\x32","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x33","\x47\x6F\x74\x6F\x49\x66\x54\x69\x6D\x65","\x2A\x2C\x2A\x2C\x2A\x2C\x2A\x3F\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x34\x3A\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x39","\x34","\x4E\x6F\x4F\x50","\x53\x6B\x69\x70\x70\x65\x64\x20\x43\x61\x6C\x6C\x65\x72\x49\x44\x20\x53\x65\x74","\x35","\x53\x6B\x69\x70\x70\x65\x64\x20\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x36","\x53\x6B\x69\x70\x70\x65\x64\x20\x50\x72\x6F\x67\x72\x65\x73\x73","\x37","\x50\x6C\x61\x79\x62\x61\x63\x6B","\x64\x65\x6D\x6F\x2D\x65\x63\x68\x6F\x74\x65\x73\x74","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x38","\x53\x6B\x69\x70\x70\x65\x64\x20\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x39","\x50\x6C\x61\x79\x62\x61\x63\x6B\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x31\x30","\x2A\x2C\x2A\x2C\x2A\x2C\x2A\x3F\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x31\x31\x3A\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x31\x36","\x31\x31","\x31\x32","\x31\x33","\x31\x34","\x45\x63\x68\x6F","","\x31\x35","\x31\x36","\x45\x63\x68\x6F\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x31\x37","\x2A\x2C\x2A\x2C\x2A\x2C\x2A\x3F\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x31\x38\x3A\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x32\x33","\x31\x38","\x31\x39","\x32\x30","\x32\x31","\x32\x32","\x32\x33","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x5F\x36\x30\x30\x30","\x53\x75\x70\x70\x6F\x72\x74\x20\x51\x75\x65\x75\x65","\x50\x72\x6F\x67\x72\x65\x73\x73","\x51\x75\x65\x75\x65","\x53\x75\x70\x70\x6F\x72\x74\x2C\x2C\x2C\x2C","\x51\x75\x65\x75\x65\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x5F\x36\x36\x36\x36","\x41\x47\x49","\x61\x67\x69\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x2F\x73\x71\x75\x61\x72\x65\x2C\x41\x75\x74\x6F\x20\x41\x74\x74\x65\x6E\x64\x61\x6E\x74","\x41\x47\x49\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x5F\x36\x36\x36\x37","\x61\x67\x69\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x2F\x73\x71\x75\x61\x72\x65\x2C\x4F\x72\x64\x65\x72\x73","\x5F\x36\x36\x36\x38","\x61\x67\x69\x3A\x2F\x2F\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x2F\x73\x71\x75\x61\x72\x65\x2C\x43\x53\x49","\x5F\x58\x2E","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x43\x44\x52\x28\x74\x61\x67\x29\x3D\x2D\x2D","\x2A\x2C\x2A\x2C\x2A\x2C\x2A\x3F\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x35\x3A\x66\x72\x6F\x6D\x2D\x73\x69\x70\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x31\x30","\x44\x69\x61\x6C","\x53\x49\x50\x2F\x44\x65\x6D\x6F\x20\x54\x72\x75\x6E\x6B\x2F\x24\x7B\x45\x58\x54\x45\x4E\x3A\x30\x7D","\x44\x69\x61\x6C\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x5F\x36\x30\x30\x31","\x53\x61\x6C\x65\x73\x20\x51\x75\x65\x75\x65","\x53\x61\x6C\x65\x73\x2C\x2C\x2C\x2C","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x53\x71\x75\x61\x72\x65\x20\x50\x72\x6F\x6A\x65\x63\x74\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x41\x75\x74\x6F\x20\x41\x74\x74\x65\x6E\x64\x61\x6E\x74","\x49\x56\x52\x20\x53\x41\x4D\x50\x4C\x45\x20\x31","\x3C\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x20\x67\x72\x69\x64\x3D\x22\x31\x22\x20\x67\x75\x69\x64\x65\x73\x3D\x22\x31\x22\x20\x74\x6F\x6F\x6C\x74\x69\x70\x73\x3D\x22\x31\x22\x20\x63\x6F\x6E\x6E\x65\x63\x74\x3D\x22\x31\x22\x20\x66\x6F\x6C\x64\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x3D\x22\x30\x22\x20\x70\x61\x67\x65\x53\x63\x61\x6C\x65\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x57\x69\x64\x74\x68\x3D\x22\x38\x32\x36\x22\x20\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74\x3D\x22\x31\x31\x36\x39\x22\x3E\x0A\x20\x20\x3C\x72\x6F\x6F\x74\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x73\x74\x61\x72\x74\x20\x6C\x61\x62\x65\x6C\x3D\x22\x53\x74\x61\x72\x74\x22\x20\x69\x64\x3D\x22\x32\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x73\x74\x61\x72\x74\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x32\x30\x22\x20\x79\x3D\x22\x31\x34\x39\x2E\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x37\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x73\x74\x61\x72\x74\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x65\x6E\x75\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4D\x65\x6E\x75\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x31\x22\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x3D\x22\x35\x22\x20\x64\x69\x67\x69\x74\x3D\x22\x31\x22\x20\x72\x65\x74\x72\x79\x3D\x22\x32\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64\x3D\x22\x31\x22\x20\x69\x64\x3D\x22\x33\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x6D\x65\x6E\x75\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x31\x33\x30\x22\x20\x79\x3D\x22\x31\x35\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x65\x6E\x75\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x34\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x32\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x33\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x71\x75\x65\x75\x65\x20\x6C\x61\x62\x65\x6C\x3D\x22\x51\x75\x65\x75\x65\x20\x53\x61\x6C\x65\x73\x22\x20\x71\x75\x65\x75\x65\x5F\x69\x64\x3D\x22\x31\x22\x20\x6F\x70\x74\x73\x3D\x22\x22\x20\x75\x72\x6C\x3D\x22\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x30\x22\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x22\x33\x30\x30\x22\x20\x61\x67\x69\x3D\x22\x22\x20\x6D\x61\x63\x72\x6F\x3D\x22\x22\x20\x67\x6F\x73\x75\x62\x3D\x22\x22\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x22\x20\x69\x64\x3D\x22\x35\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x71\x75\x65\x75\x65\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x34\x37\x30\x22\x20\x79\x3D\x22\x39\x2E\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x33\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x71\x75\x65\x75\x65\x3E\x0A\x20\x20\x20\x20\x3C\x71\x75\x65\x75\x65\x20\x6C\x61\x62\x65\x6C\x3D\x22\x51\x75\x65\x75\x65\x20\x53\x75\x70\x70\x6F\x72\x74\x22\x20\x71\x75\x65\x75\x65\x5F\x69\x64\x3D\x22\x32\x22\x20\x6F\x70\x74\x73\x3D\x22\x22\x20\x75\x72\x6C\x3D\x22\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x30\x22\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x22\x33\x30\x30\x22\x20\x61\x67\x69\x3D\x22\x22\x20\x6D\x61\x63\x72\x6F\x3D\x22\x22\x20\x67\x6F\x73\x75\x62\x3D\x22\x22\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x22\x20\x69\x64\x3D\x22\x36\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x71\x75\x65\x75\x65\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x35\x34\x30\x22\x20\x79\x3D\x22\x31\x34\x39\x2E\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x37\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x71\x75\x65\x75\x65\x3E\x0A\x20\x20\x20\x20\x3C\x64\x69\x61\x6C\x20\x6C\x61\x62\x65\x6C\x3D\x22\x49\x6E\x74\x65\x72\x6E\x61\x6C\x20\x44\x69\x61\x6C\x20\x4A\x6F\x68\x6E\x20\x44\x6F\x65\x22\x20\x73\x69\x70\x5F\x69\x64\x3D\x22\x31\x22\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x22\x36\x30\x22\x20\x6F\x70\x74\x73\x3D\x22\x22\x20\x75\x72\x6C\x3D\x22\x22\x20\x69\x64\x3D\x22\x37\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x64\x69\x61\x6C\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x34\x37\x30\x22\x20\x79\x3D\x22\x33\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x64\x69\x61\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x38\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x39\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x36\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x6E\x6F\x6F\x70\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4E\x6F\x4F\x70\x20\x63\x68\x6F\x69\x63\x65\x20\x76\x69\x65\x77\x22\x20\x6F\x75\x74\x70\x75\x74\x3D\x22\x43\x68\x6F\x69\x63\x65\x3A\x20\x7B\x43\x48\x4F\x49\x43\x45\x7D\x22\x20\x69\x64\x3D\x22\x31\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2F\x6E\x6F\x6F\x70\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x33\x30\x30\x22\x20\x79\x3D\x22\x33\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6E\x6F\x6F\x70\x3E\x0A\x20\x20\x20\x20\x3C\x65\x6E\x64\x20\x6C\x61\x62\x65\x6C\x3D\x22\x45\x6E\x64\x22\x20\x69\x64\x3D\x22\x31\x35\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x65\x6E\x64\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x37\x32\x30\x22\x20\x79\x3D\x22\x31\x35\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x65\x6E\x64\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x31\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x37\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x35\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x38\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x36\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x39\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x37\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x32\x30\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x31\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x37\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x72\x6F\x6F\x74\x3E\x0A\x3C\x2F\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x3E\x0A","\x43\x53\x49","\x43\x75\x73\x74\x6F\x6D\x65\x72\x20\x53\x61\x74\x69\x73\x66\x61\x63\x74\x69\x6F\x6E\x20\x49\x6E\x64\x65\x78\x20\x65\x78\x61\x6D\x70\x6C\x65","\x3C\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x20\x67\x72\x69\x64\x3D\x22\x31\x22\x20\x67\x75\x69\x64\x65\x73\x3D\x22\x31\x22\x20\x74\x6F\x6F\x6C\x74\x69\x70\x73\x3D\x22\x31\x22\x20\x63\x6F\x6E\x6E\x65\x63\x74\x3D\x22\x31\x22\x20\x66\x6F\x6C\x64\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x3D\x22\x30\x22\x20\x70\x61\x67\x65\x53\x63\x61\x6C\x65\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x57\x69\x64\x74\x68\x3D\x22\x38\x32\x36\x22\x20\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74\x3D\x22\x31\x31\x36\x39\x22\x3E\x0A\x20\x20\x3C\x72\x6F\x6F\x74\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x73\x74\x61\x72\x74\x20\x6C\x61\x62\x65\x6C\x3D\x22\x53\x74\x61\x72\x74\x22\x20\x69\x64\x3D\x22\x32\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x73\x74\x61\x72\x74\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x39\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x73\x74\x61\x72\x74\x3E\x0A\x20\x20\x20\x20\x3C\x71\x75\x65\x75\x65\x20\x6C\x61\x62\x65\x6C\x3D\x22\x51\x75\x65\x75\x65\x20\x4F\x50\x54\x49\x4F\x4E\x20\x43\x20\x74\x6F\x20\x63\x6F\x6E\x74\x69\x6E\x75\x65\x22\x20\x71\x75\x65\x75\x65\x5F\x69\x64\x3D\x22\x32\x22\x20\x6F\x70\x74\x73\x3D\x22\x63\x22\x20\x75\x72\x6C\x3D\x22\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x30\x22\x20\x74\x69\x6D\x65\x6F\x75\x74\x3D\x22\x31\x30\x22\x20\x61\x67\x69\x3D\x22\x22\x20\x6D\x61\x63\x72\x6F\x3D\x22\x22\x20\x67\x6F\x73\x75\x62\x3D\x22\x22\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x22\x20\x69\x64\x3D\x22\x33\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x71\x75\x65\x75\x65\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x32\x36\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x71\x75\x65\x75\x65\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x34\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x32\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x33\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x20\x6C\x61\x62\x65\x6C\x3D\x22\x53\x75\x62\x50\x72\x6F\x6A\x65\x63\x74\x20\x53\x75\x72\x76\x65\x79\x22\x20\x70\x72\x6F\x6A\x65\x63\x74\x5F\x69\x64\x3D\x22\x34\x22\x20\x69\x64\x3D\x22\x35\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2F\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x34\x33\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x73\x75\x62\x70\x72\x6F\x6A\x65\x63\x74\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x36\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x65\x6E\x64\x20\x6C\x61\x62\x65\x6C\x3D\x22\x45\x6E\x64\x22\x20\x69\x64\x3D\x22\x37\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x65\x6E\x64\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x36\x30\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x65\x6E\x64\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x38\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x35\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x37\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x72\x6F\x6F\x74\x3E\x0A\x3C\x2F\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x3E\x0A","\x4F\x72\x64\x65\x72\x73","\x4F\x72\x64\x65\x72\x20\x44\x42\x20\x49\x56\x52\x20\x53\x61\x6D\x70\x6C\x65","\x3C\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x20\x73\x63\x61\x6C\x65\x3D\x22\x30\x2E\x36\x39\x34\x22\x20\x67\x72\x69\x64\x3D\x22\x31\x22\x20\x67\x75\x69\x64\x65\x73\x3D\x22\x31\x22\x20\x74\x6F\x6F\x6C\x74\x69\x70\x73\x3D\x22\x31\x22\x20\x63\x6F\x6E\x6E\x65\x63\x74\x3D\x22\x31\x22\x20\x66\x6F\x6C\x64\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x3D\x22\x30\x22\x20\x70\x61\x67\x65\x53\x63\x61\x6C\x65\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x57\x69\x64\x74\x68\x3D\x22\x38\x32\x36\x22\x20\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74\x3D\x22\x31\x31\x36\x39\x22\x3E\x0A\x20\x20\x3C\x72\x6F\x6F\x74\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x73\x74\x61\x72\x74\x20\x6C\x61\x62\x65\x6C\x3D\x22\x53\x74\x61\x72\x74\x22\x20\x69\x64\x3D\x22\x32\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x73\x74\x61\x72\x74\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x39\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x73\x74\x61\x72\x74\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x65\x6E\x75\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4D\x65\x6E\x75\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x32\x22\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x3D\x22\x35\x22\x20\x64\x69\x67\x69\x74\x3D\x22\x35\x22\x20\x72\x65\x74\x72\x79\x3D\x22\x31\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64\x3D\x22\x32\x22\x20\x69\x64\x3D\x22\x34\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x6D\x65\x6E\x75\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x32\x35\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x65\x6E\x75\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x35\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x32\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x34\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x6E\x6F\x6F\x70\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4E\x6F\x4F\x70\x20\x44\x65\x62\x75\x67\x20\x4F\x52\x44\x45\x52\x4E\x55\x4D\x22\x20\x6F\x75\x74\x70\x75\x74\x3D\x22\x4F\x52\x44\x45\x52\x20\x4E\x55\x4D\x42\x45\x52\x3A\x20\x7B\x4F\x52\x44\x45\x52\x4E\x55\x4D\x7D\x22\x20\x69\x64\x3D\x22\x36\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2F\x6E\x6F\x6F\x70\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x34\x30\x30\x22\x20\x79\x3D\x22\x31\x30\x39\x2E\x35\x36\x37\x38\x32\x37\x31\x33\x30\x38\x35\x32\x33\x32\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6E\x6F\x6F\x70\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x37\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x2D\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x34\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x36\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x64\x61\x74\x61\x62\x61\x73\x65\x20\x6C\x61\x62\x65\x6C\x3D\x22\x44\x61\x74\x61\x62\x61\x73\x65\x20\x51\x75\x65\x72\x79\x20\x45\x58\x41\x4D\x50\x4C\x45\x22\x20\x64\x61\x74\x61\x62\x61\x73\x65\x5F\x69\x64\x3D\x22\x31\x22\x20\x71\x75\x65\x72\x79\x3D\x22\x53\x45\x4C\x45\x43\x54\x20\x73\x74\x61\x74\x75\x73\x20\x66\x72\x6F\x6D\x20\x6F\x72\x64\x65\x72\x73\x20\x57\x48\x45\x52\x45\x20\x69\x64\x3D\x7B\x4F\x52\x44\x45\x52\x4E\x55\x4D\x7D\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64\x3D\x22\x33\x22\x20\x69\x64\x3D\x22\x38\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x73\x65\x72\x76\x65\x72\x2F\x64\x61\x74\x61\x62\x61\x73\x65\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x35\x36\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x64\x61\x74\x61\x62\x61\x73\x65\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x39\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x36\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x38\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x67\x6F\x74\x6F\x69\x66\x20\x6C\x61\x62\x65\x6C\x3D\x22\x47\x6F\x74\x6F\x49\x66\x22\x20\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x3D\x22\x7B\x44\x42\x52\x45\x53\x55\x4C\x54\x7D\x20\x3D\x3D\x20\x31\x22\x20\x69\x64\x3D\x22\x31\x30\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x66\x6C\x6F\x77\x2F\x67\x6F\x74\x6F\x69\x66\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x37\x33\x30\x22\x20\x79\x3D\x22\x31\x30\x39\x2E\x35\x36\x37\x38\x32\x37\x31\x33\x30\x38\x35\x32\x33\x31\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x67\x6F\x74\x6F\x69\x66\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x38\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x30\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x70\x6C\x61\x79\x62\x61\x63\x6B\x20\x6C\x61\x62\x65\x6C\x3D\x22\x50\x6C\x61\x79\x62\x61\x63\x6B\x20\x4F\x72\x64\x65\x72\x20\x73\x68\x69\x70\x70\x65\x64\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x33\x22\x20\x73\x6B\x69\x70\x3D\x22\x30\x22\x20\x6E\x6F\x61\x6E\x73\x77\x65\x72\x3D\x22\x30\x22\x20\x69\x64\x3D\x22\x31\x32\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x31\x30\x31\x30\x22\x20\x79\x3D\x22\x35\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x74\x72\x75\x65\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x30\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x32\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x70\x6C\x61\x79\x62\x61\x63\x6B\x20\x6C\x61\x62\x65\x6C\x3D\x22\x50\x6C\x61\x79\x62\x61\x63\x6B\x20\x4F\x72\x64\x65\x72\x20\x6F\x6E\x20\x65\x6C\x61\x62\x6F\x72\x61\x74\x69\x6F\x6E\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x34\x22\x20\x73\x6B\x69\x70\x3D\x22\x30\x22\x20\x6E\x6F\x61\x6E\x73\x77\x65\x72\x3D\x22\x30\x22\x20\x69\x64\x3D\x22\x31\x34\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x31\x30\x31\x30\x22\x20\x79\x3D\x22\x31\x38\x39\x2E\x35\x36\x37\x38\x32\x37\x31\x33\x30\x38\x35\x32\x33\x32\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x30\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x34\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x68\x61\x6E\x67\x75\x70\x20\x6C\x61\x62\x65\x6C\x3D\x22\x48\x61\x6E\x67\x75\x70\x22\x20\x69\x64\x3D\x22\x31\x36\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x68\x61\x6E\x67\x75\x70\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x31\x31\x38\x30\x22\x20\x79\x3D\x22\x31\x30\x39\x2E\x35\x36\x37\x38\x32\x37\x31\x33\x30\x38\x35\x32\x33\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x68\x61\x6E\x67\x75\x70\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x37\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x32\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x36\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x38\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x34\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x36\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x72\x6F\x6F\x74\x3E\x0A\x3C\x2F\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x3E\x0A","\x53\x75\x72\x76\x65\x79","\x53\x75\x72\x76\x65\x79\x20\x49\x56\x52\x20\x65\x78\x61\x6D\x70\x6C\x65","\x3C\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x20\x73\x63\x61\x6C\x65\x3D\x22\x30\x2E\x38\x33\x33\x22\x20\x67\x72\x69\x64\x3D\x22\x31\x22\x20\x67\x75\x69\x64\x65\x73\x3D\x22\x31\x22\x20\x74\x6F\x6F\x6C\x74\x69\x70\x73\x3D\x22\x31\x22\x20\x63\x6F\x6E\x6E\x65\x63\x74\x3D\x22\x31\x22\x20\x66\x6F\x6C\x64\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x3D\x22\x30\x22\x20\x70\x61\x67\x65\x53\x63\x61\x6C\x65\x3D\x22\x31\x22\x20\x70\x61\x67\x65\x57\x69\x64\x74\x68\x3D\x22\x38\x32\x36\x22\x20\x70\x61\x67\x65\x48\x65\x69\x67\x68\x74\x3D\x22\x31\x31\x36\x39\x22\x3E\x0A\x20\x20\x3C\x72\x6F\x6F\x74\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x30\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x73\x74\x61\x72\x74\x20\x6C\x61\x62\x65\x6C\x3D\x22\x53\x74\x61\x72\x74\x22\x20\x69\x64\x3D\x22\x32\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x65\x6E\x74\x72\x79\x2F\x73\x74\x61\x72\x74\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x37\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x73\x74\x61\x72\x74\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x65\x6E\x75\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4D\x65\x6E\x75\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x35\x22\x20\x72\x65\x73\x70\x6F\x6E\x73\x65\x3D\x22\x35\x22\x20\x64\x69\x67\x69\x74\x3D\x22\x31\x22\x20\x72\x65\x74\x72\x79\x3D\x22\x31\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64\x3D\x22\x34\x22\x20\x69\x64\x3D\x22\x33\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x6D\x65\x6E\x75\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x32\x32\x32\x22\x20\x79\x3D\x22\x31\x31\x30\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x65\x6E\x75\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x34\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x32\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x33\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x6E\x6F\x6F\x70\x20\x6C\x61\x62\x65\x6C\x3D\x22\x4E\x6F\x4F\x70\x22\x20\x6F\x75\x74\x70\x75\x74\x3D\x22\x22\x20\x69\x64\x3D\x22\x35\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x67\x65\x6E\x65\x72\x61\x6C\x2F\x6E\x6F\x6F\x70\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x33\x37\x38\x2E\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x39\x34\x22\x20\x79\x3D\x22\x31\x31\x30\x2E\x31\x33\x35\x36\x35\x34\x32\x36\x31\x37\x30\x34\x36\x34\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6E\x6F\x6F\x70\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x2C\x32\x2C\x33\x2C\x34\x2C\x35\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x35\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x64\x61\x74\x61\x62\x61\x73\x65\x20\x6C\x61\x62\x65\x6C\x3D\x22\x44\x61\x74\x61\x62\x61\x73\x65\x22\x20\x64\x61\x74\x61\x62\x61\x73\x65\x5F\x69\x64\x3D\x22\x32\x22\x20\x71\x75\x65\x72\x79\x3D\x22\x49\x4E\x53\x45\x52\x54\x20\x49\x4E\x54\x4F\x20\x73\x75\x72\x76\x65\x79\x20\x28\x61\x67\x65\x6E\x74\x2C\x20\x71\x75\x65\x75\x65\x2C\x20\x72\x65\x73\x75\x6C\x74\x29\x26\x23\x78\x61\x3B\x56\x41\x4C\x55\x45\x53\x20\x28\x7B\x4D\x45\x4D\x42\x45\x52\x49\x4E\x54\x45\x52\x46\x41\x43\x45\x7D\x2C\x20\x7B\x51\x55\x45\x55\x45\x4E\x41\x4D\x45\x7D\x2C\x20\x7B\x52\x41\x54\x45\x7D\x29\x22\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x5F\x69\x64\x3D\x22\x34\x22\x20\x69\x64\x3D\x22\x37\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x73\x65\x72\x76\x65\x72\x2F\x64\x61\x74\x61\x62\x61\x73\x65\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x36\x37\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x2E\x31\x33\x35\x36\x35\x34\x32\x36\x31\x37\x30\x34\x36\x34\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x64\x61\x74\x61\x62\x61\x73\x65\x3E\x0A\x20\x20\x20\x20\x3C\x68\x61\x6E\x67\x75\x70\x20\x6C\x61\x62\x65\x6C\x3D\x22\x48\x61\x6E\x67\x75\x70\x22\x20\x69\x64\x3D\x22\x31\x30\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x63\x61\x6C\x6C\x5F\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2F\x68\x61\x6E\x67\x75\x70\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x38\x33\x38\x22\x20\x79\x3D\x22\x31\x31\x30\x2E\x31\x33\x35\x36\x35\x34\x32\x36\x31\x37\x30\x34\x36\x34\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x68\x61\x6E\x67\x75\x70\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x32\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x37\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x30\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x70\x6C\x61\x79\x62\x61\x63\x6B\x20\x6C\x61\x62\x65\x6C\x3D\x22\x50\x6C\x61\x79\x62\x61\x63\x6B\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x22\x20\x66\x69\x6C\x65\x5F\x69\x64\x3D\x22\x36\x22\x20\x73\x6B\x69\x70\x3D\x22\x30\x22\x20\x6E\x6F\x61\x6E\x73\x77\x65\x72\x3D\x22\x30\x22\x20\x69\x64\x3D\x22\x31\x33\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x69\x6D\x61\x67\x65\x3B\x69\x6D\x61\x67\x65\x3D\x2F\x61\x73\x73\x65\x74\x73\x2F\x70\x6C\x75\x67\x69\x6E\x73\x2F\x73\x71\x75\x61\x72\x65\x2F\x73\x74\x65\x6E\x63\x69\x6C\x73\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x5F\x31\x32\x38\x78\x31\x32\x38\x2E\x70\x6E\x67\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x76\x65\x72\x74\x65\x78\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x78\x3D\x22\x35\x32\x30\x22\x20\x79\x3D\x22\x31\x31\x30\x2E\x31\x33\x35\x36\x35\x34\x32\x36\x31\x37\x30\x34\x36\x34\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x38\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x38\x30\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x70\x6C\x61\x79\x62\x61\x63\x6B\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x34\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x35\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x31\x33\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x20\x20\x3C\x6D\x78\x43\x65\x6C\x6C\x20\x69\x64\x3D\x22\x31\x35\x22\x20\x70\x61\x72\x65\x6E\x74\x3D\x22\x31\x22\x20\x73\x6F\x75\x72\x63\x65\x3D\x22\x31\x33\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x37\x22\x20\x65\x64\x67\x65\x3D\x22\x31\x22\x3E\x0A\x20\x20\x20\x20\x20\x20\x3C\x6D\x78\x47\x65\x6F\x6D\x65\x74\x72\x79\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3D\x22\x31\x22\x20\x61\x73\x3D\x22\x67\x65\x6F\x6D\x65\x74\x72\x79\x22\x2F\x3E\x0A\x20\x20\x20\x20\x3C\x2F\x6D\x78\x43\x65\x6C\x6C\x3E\x0A\x20\x20\x3C\x2F\x72\x6F\x6F\x74\x3E\x0A\x3C\x2F\x6D\x78\x47\x72\x61\x70\x68\x4D\x6F\x64\x65\x6C\x3E\x0A","\x53\x71\x75\x61\x72\x65\x50\x72\x6F\x6A\x65\x63\x74","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x53\x71\x75\x61\x72\x65\x20\x4F\x44\x42\x43\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x78\x63\x61\x6C\x6C\x79","\x44\x52\x49\x56\x45\x52\x3D\x4D\x79\x53\x51\x4C\x3B\x53\x45\x52\x56\x45\x52\x3D\x31\x32\x37\x2E\x30\x2E\x30\x2E\x31\x3B\x55\x49\x44\x3D\x78\x63\x61\x6C\x6C\x3B\x50\x57\x44\x3D\x78\x43\x40\x4C\x4C\x31\x32\x33\x34\x3B\x44\x41\x54\x41\x42\x41\x53\x45\x3D\x6D\x6F\x74\x69\x6F\x6E","\x53\x71\x75\x61\x72\x65\x4F\x64\x62\x63","\x5A\x65\x6E\x64\x65\x73\x6B","\x31\x2E\x30\x2E\x30","\x58\x65\x6E\x69\x61\x4C\x41\x42\x20\x73\x2E\x72\x2E\x6C\x2E","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x32\x2E\x70\x6E\x67","\x7A\x65\x6E\x64\x65\x73\x6B","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x78\x43\x41\x4C\x4C\x59\x20\x2D\x20\x5A\x65\x6E\x64\x65\x73\x6B\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x41\x75\x74\x6F\x2D\x47\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x54\x69\x63\x6B\x65\x74\x73\x2C\x20\x66\x75\x6C\x6C\x79\x20\x63\x75\x73\x74\x6F\x6D\x69\x7A\x61\x62\x6C\x65\x20\x63\x6F\x6D\x6D\x65\x6E\x74\x73\x2C\x20\x43\x75\x73\x74\x6F\x6D\x20\x46\x69\x65\x6C\x64\x73\x20\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x2C\x20\x54\x61\x67\x20\x73\x75\x70\x70\x6F\x72\x74\x20\x61\x6E\x64\x20\x53\x69\x6D\x70\x6C\x65\x20\x53\x65\x74\x75\x70","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x5A\x65\x6E\x64\x65\x73\x6B\x2B\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x32\x2E\x70\x6E\x67","\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x78\x43\x41\x4C\x4C\x59\x20\x2D\x20\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x41\x75\x74\x6F\x2D\x47\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x54\x61\x73\x6B\x73\x2C\x20\x66\x75\x6C\x6C\x79\x20\x63\x75\x73\x74\x6F\x6D\x69\x7A\x61\x62\x6C\x65\x20\x63\x6F\x6D\x6D\x65\x6E\x74\x73\x2C\x20\x43\x75\x73\x74\x6F\x6D\x20\x46\x69\x65\x6C\x64\x73\x20\x6D\x61\x6E\x61\x67\x65\x6D\x65\x6E\x74\x20\x61\x6E\x64\x20\x4F\x70\x65\x6E\x43\x54\x49\x20\x73\x75\x70\x70\x6F\x72\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x53\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2B\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x69\x46\x72\x61\x6D\x65","\x61\x73\x73\x65\x74\x73\x2F\x69\x6D\x61\x67\x65\x73\x2F\x6D\x65\x64\x69\x61\x2F\x69\x66\x72\x61\x6D\x65\x2E\x70\x6E\x67","\x69\x66\x72\x61\x6D\x65","\x53\x74\x61\x72\x74\x20\x75\x73\x69\x6E\x67\x20\x69\x46\x72\x61\x6D\x65\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x3A\x20\x65\x6E\x61\x62\x6C\x65\x20\x79\x6F\x75\x72\x20\x61\x67\x65\x6E\x74\x73\x20\x74\x6F\x20\x76\x69\x65\x77\x20\x65\x78\x74\x65\x72\x6E\x61\x6C\x20\x70\x61\x67\x65\x73\x20\x28\x6C\x69\x6B\x65\x20\x79\x6F\x75\x72\x20\x43\x52\x4D\x29\x20\x64\x69\x72\x65\x63\x74\x6C\x79\x20\x66\x72\x6F\x6D\x20\x4D\x6F\x74\x69\x6F\x6E\x20\x47\x55\x49","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x69\x6B\x69\x2E\x78\x63\x61\x6C\x6C\x79\x6D\x6F\x74\x69\x6F\x6E\x2E\x63\x6F\x6D\x2F\x64\x69\x73\x70\x6C\x61\x79\x2F\x58\x4D\x44\x2F\x69\x46\x72\x61\x6D\x65\x2B\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x3A","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x61\x6C\x6C","\x73\x74\x61\x74\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x75\x70\x64\x61\x74\x65","\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x43\x6F\x6D\x70\x61\x6E\x69\x65\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x41\x63\x6D\x65","\x6C\x74\x64","\x41\x63\x6D\x65\x20\x53\x72\x65\x65\x74","\x58\x65\x6E\x69\x61\x6C\x61\x62","\x73\x72\x6C","\x43\x2E\x73\x6F\x20\x56\x69\x74\x74\x6F\x72\x69\x6F\x20\x45\x6D\x61\x6E\x75\x65\x6C\x65\x20\x49\x49\x2C\x20\x31\x31\x31","\x31\x30\x31\x32\x38","\x49\x74\x61\x6C\x79","\x54\x75\x72\x69\x6E","\x30\x39\x36\x36\x38\x39\x31\x30\x30\x31\x32","\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x78\x65\x6E\x69\x61\x6C\x61\x62\x2E\x63\x6F\x6D\x2F","\x2B\x33\x39\x20\x30\x31\x31\x2E\x31\x39\x38\x38\x36\x35\x30\x30","\x2B\x33\x39\x20\x30\x31\x31\x2E\x30\x39\x36\x30\x30\x37\x30","\x69\x6E\x66\x6F\x40\x78\x63\x61\x6C\x6C\x79\x2E\x63\x6F\x6D","\x43\x6F\x6D\x70\x61\x6E\x79","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x44\x61\x73\x68\x62\x6F\x61\x72\x64\x73\x3A\x20\x25\x73\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x49\x6E\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73","\x56\x6F\x69\x63\x65\x20\x49\x6E\x62\x6F\x75\x6E\x64","\x63\x6F\x6C\x2D\x6D\x64\x2D\x33","\x63\x6F\x75\x6E\x74\x65\x72","\x62\x6C\x75\x65\x2D\x6D\x61\x64\x69\x73\x6F\x6E","\x66\x61\x2D\x63\x6F\x6D\x6D\x65\x6E\x74\x73","\x23","\x56\x49\x45\x57\x20\x4D\x4F\x52\x45","\x41\x67\x65\x6E\x74\x73","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74","\x43\x61\x6C\x6C\x73","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C","\x44\x69\x61\x6C\x73","\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C","\x51\x75\x65\x75\x65\x73","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x75\x73\x65\x72\x73","\x43\x68\x61\x74\x20\x53\x65\x73\x73\x69\x6F\x6E\x73","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x4D\x61\x69\x6C\x20\x53\x65\x73\x73\x69\x6F\x6E\x73","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x42\x6C\x75\x65","\x52\x65\x64","\x72\x65\x64\x2D\x69\x6E\x74\x65\x6E\x73\x65","\x47\x72\x65\x65\x6E","\x67\x72\x65\x65\x6E\x2D\x68\x61\x7A\x65","\x50\x75\x72\x70\x6C\x65","\x70\x75\x72\x70\x6C\x65\x2D\x70\x6C\x75\x6D","\x4F\x72\x61\x6E\x67\x65","\x79\x65\x6C\x6C\x6F\x77\x2D\x63\x61\x73\x61\x62\x6C\x61\x6E\x63\x61","\x59\x65\x6C\x6C\x6F\x77","\x79\x65\x6C\x6C\x6F\x77\x2D\x63\x72\x75\x73\x74\x61","\x54\x61\x6C\x6B\x20\x62\x75\x62\x62\x6C\x65\x73","\x42\x61\x72\x20\x43\x68\x61\x72\x74","\x66\x61\x2D\x62\x61\x72\x2D\x63\x68\x61\x72\x74","\x53\x68\x6F\x70\x70\x69\x6E\x67\x20\x43\x61\x72\x74","\x66\x61\x2D\x73\x68\x6F\x70\x70\x69\x6E\x67\x2D\x63\x61\x72\x74","\x47\x6C\x6F\x62\x65","\x66\x61\x2D\x67\x6C\x6F\x62\x65","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x30\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x30\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x3D\x30\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x6E\x75\x6C\x6C","\x41\x63\x74\x69\x76\x65\x20\x43\x61\x6C\x6C\x73","\x43\x4F\x55\x4E\x54\x28\x2A\x29","\x43\x41\x4C\x4C\x53","\x2E\x2E\x2F\x73\x72\x63\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x77\x69\x64\x67\x65\x74\x2D\x74\x69\x74\x6C\x65\x2E\x68\x74\x6D\x6C","\x31\x34\x35\x34\x37\x37\x32\x35\x33\x32\x33\x34\x36\x2D\x31\x30","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31","\x54\x6F\x74\x61\x6C\x20\x41\x6E\x73\x77\x65\x72\x65\x64","\x31\x34\x35\x36\x38\x34\x31\x30\x33\x31\x31\x31\x31\x2D\x38","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x2B\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x28\x25\x29","\x31\x34\x35\x37\x32\x37\x30\x31\x32\x34\x38\x30\x32\x2D\x34","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x30\x29\x29","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x68\x69\x73\x74\x6F\x72\x79","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31","\x41\x76\x67\x20\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65","\x31\x34\x35\x37\x32\x37\x30\x32\x31\x34\x37\x36\x36\x2D\x35","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x20\x31\x30\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x2F\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x20\x31\x30\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x53\x65\x72\x76\x69\x63\x65\x20\x4C\x65\x76\x65\x6C\x20\x31\x30\x20\x28\x25\x29","\x53\x45\x52\x56\x49\x43\x45\x20\x4C\x45\x56\x45\x4C","\x31\x34\x35\x37\x33\x36\x36\x39\x36\x35\x37\x39\x34\x2D\x33","\x31\x34\x35\x36\x38\x34\x31\x31\x39\x31\x36\x36\x31\x2D\x32\x31","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C","\x57\x61\x69\x74\x69\x6E\x67\x20\x43\x61\x6C\x6C\x73","\x31\x34\x35\x36\x38\x33\x39\x38\x37\x30\x34\x34\x39\x2D\x35","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x31","\x54\x6F\x74\x61\x6C\x20\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x31\x34\x35\x36\x38\x34\x31\x32\x34\x34\x39\x33\x31\x2D\x32\x37","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2F\x20\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x2B\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x52\x61\x74\x65\x20\x28\x25\x29","\x31\x34\x35\x37\x32\x36\x39\x30\x33\x33\x39\x32\x33\x2D\x33","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x30\x29\x29","\x41\x76\x67\x20\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65","\x31\x34\x35\x37\x32\x37\x30\x32\x33\x30\x33\x32\x34\x2D\x38","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x20\x31\x35\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x2F\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x20\x31\x35\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x53\x65\x72\x76\x69\x63\x65\x20\x4C\x65\x76\x65\x6C\x20\x31\x35\x20\x28\x25\x29","\x53\x45\x52\x56\x49\x43\x45\x20\x4C\x45\x56\x45\x4C\x20\x31\x35","\x31\x34\x35\x37\x39\x35\x32\x37\x33\x34\x35\x39\x30\x2D\x31","\x31\x34\x35\x36\x38\x34\x31\x31\x39\x31\x36\x36\x32\x2D\x32\x32","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x4D\x41\x58\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x29\x29","\x4C\x6F\x6E\x67\x65\x73\x74\x20\x41\x63\x74\x69\x76\x65\x20\x43\x61\x6C\x6C","\x31\x34\x35\x37\x32\x37\x35\x32\x35\x38\x34\x39\x34\x2D\x31\x31","\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29","\x54\x6F\x74\x61\x6C\x20\x4F\x66\x66\x65\x72\x65\x64","\x31\x34\x35\x37\x32\x36\x39\x30\x31\x30\x36\x31\x36\x2D\x31","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x2F\x48\x4F\x55\x52\x28\x43\x55\x52\x52\x45\x4E\x54\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x29\x29\x2C\x31\x29","\x41\x76\x67\x20\x4F\x66\x66\x65\x72\x65\x64\x20\x50\x65\x72\x20\x48\x6F\x75\x72","\x31\x34\x35\x37\x32\x37\x35\x32\x36\x33\x30\x32\x32\x2D\x31\x32","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x4A\x6F\x69\x6E\x41\x74\x29\x29\x2C\x30\x29\x29","\x41\x76\x67\x20\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65","\x31\x34\x35\x37\x32\x37\x30\x32\x32\x33\x38\x37\x30\x2D\x37","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3C\x20\x32\x30\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x2F\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2B\x20\x53\x55\x4D\x28\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x3D\x31\x20\x41\x4E\x44\x20\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x3E\x20\x32\x30\x29\x20\x54\x48\x45\x4E\x20\x31\x20\x45\x4C\x53\x45\x20\x30\x20\x45\x4E\x44\x29\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x53\x65\x72\x76\x69\x63\x65\x20\x4C\x65\x76\x65\x6C\x20\x32\x30\x20\x28\x25\x29","\x53\x45\x52\x56\x49\x43\x45\x20\x4C\x45\x56\x45\x4C\x20\x32\x30","\x31\x34\x35\x37\x39\x35\x32\x37\x35\x31\x36\x30\x35\x2D\x32","\x31\x34\x35\x36\x38\x34\x31\x31\x39\x31\x36\x36\x33\x2D\x32\x33","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x4D\x41\x58\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x29\x29","\x4F\x6C\x64\x65\x73\x74\x20\x57\x61\x69\x74\x69\x6E\x67\x20\x43\x61\x6C\x6C","\x31\x34\x35\x37\x32\x37\x35\x32\x35\x34\x30\x36\x31\x2D\x31\x30","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x3D\x31","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x31\x34\x35\x37\x32\x36\x39\x30\x32\x32\x30\x36\x32\x2D\x32","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x61\x63\x77\x74\x69\x6D\x65\x29\x2C\x30\x29\x29","\x41\x76\x67\x20\x41\x43\x57\x20\x54\x69\x6D\x65","\x31\x34\x35\x37\x32\x37\x30\x32\x31\x39\x33\x35\x35\x2D\x36","\x31\x34\x35\x36\x38\x34\x31\x31\x39\x31\x36\x36\x34\x2D\x32\x34","\x2E\x2E\x2F\x73\x72\x63\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2D\x74\x69\x74\x6C\x65\x2E\x68\x74\x6D\x6C","\x33\x2D\x33\x2D\x33\x2D\x33","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22","\x4D\x61\x6E\x75\x61\x6C\x20\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x31\x34\x35\x37\x32\x37\x36\x34\x35\x38\x34\x32\x34\x2D\x31\x34","\x74\x79\x70\x65\x3D\x22\x6F\x75\x74\x62\x6F\x75\x6E\x64\x22\x20\x41\x4E\x44\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x41\x4E\x53\x57\x45\x52\x45\x44\x22","\x41\x6E\x73\x77\x65\x72\x65\x64","\x31\x34\x35\x37\x37\x31\x38\x35\x37\x39\x35\x32\x32\x2D\x32","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x53\x55\x4D\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x29","\x47\x6C\x6F\x62\x61\x6C\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x31\x34\x35\x37\x32\x37\x36\x34\x35\x33\x34\x36\x35\x2D\x31\x33","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3D\x22\x41\x4E\x53\x57\x45\x52\x45\x44\x22\x2C\x31\x2C\x30\x29\x29\x2F\x43\x4F\x55\x4E\x54\x28\x2A\x29\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x20\x28\x25\x29","\x31\x34\x35\x37\x37\x31\x38\x35\x39\x31\x32\x34\x33\x2D\x33","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x2C\x30\x29\x29","\x41\x76\x67\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x31\x34\x35\x37\x37\x31\x38\x34\x38\x32\x33\x39\x36\x2D\x31","\x41\x67\x65\x6E\x74\x73\x20\x53\x74\x61\x74\x75\x73","\x6F\x6E\x6C\x69\x6E\x65\x3D\x31\x20\x41\x4E\x44\x20\x72\x6F\x6C\x65\x3D\x22\x61\x67\x65\x6E\x74\x22","\x4C\x6F\x67\x67\x65\x64","\x41\x47\x45\x4E\x54\x53","\x31\x34\x35\x37\x32\x37\x35\x32\x34\x38\x35\x32\x31\x2D\x39","\x6F\x6E\x6C\x69\x6E\x65\x3D\x31\x20\x41\x4E\x44\x20\x72\x6F\x6C\x65\x3D\x22\x61\x67\x65\x6E\x74\x22\x20\x41\x4E\x44\x20\x28\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65\x3D\x31\x20\x4F\x52\x20\x63\x68\x61\x74\x50\x61\x75\x73\x65\x3D\x31\x20\x4F\x52\x20\x6D\x61\x69\x6C\x50\x61\x75\x73\x65\x3D\x31\x20\x4F\x52\x20\x66\x61\x78\x50\x41\x75\x73\x65\x3D\x31\x29\x20\x61\x6E\x64\x20\x70\x61\x75\x73\x65\x54\x79\x70\x65\x20\x21\x3D\x22\x41\x43\x57\x22","\x50\x61\x75\x73\x65\x64","\x31\x34\x35\x37\x32\x37\x36\x34\x36\x32\x38\x34\x36\x2D\x31\x35","\x76\x6F\x69\x63\x65\x50\x61\x75\x73\x65\x3D\x31\x20\x61\x6E\x64\x20\x70\x61\x75\x73\x65\x54\x79\x70\x65\x3D\x22\x41\x43\x57\x22","\x41\x43\x57","\x31\x34\x35\x37\x33\x36\x30\x34\x36\x34\x32\x30\x38\x2D\x31","\x44\x61\x73\x68\x62\x6F\x61\x72\x64","\x64\x65\x73\x74\x72\x6F\x79","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x20\x66\x6F\x72\x20\x4F\x75\x74\x67\x6F\x69\x6E\x67\x20\x46\x61\x78","\x5F\x2E","\x4F\x75\x74\x67\x6F\x69\x6E\x67\x20\x66\x61\x78\x20\x74\x6F\x20\x24\x7B\x46\x41\x58\x4E\x55\x4D\x42\x45\x52\x7D","\x73\x79\x73\x74\x65\x6D","\x41\x63\x63\x6F\x75\x6E\x74\x20\x24\x7B\x46\x41\x58\x4E\x41\x4D\x45\x7D","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x6F\x75\x74\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x41\x6E\x73\x77\x65\x72","\x57\x61\x69\x74","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x3D\x24\x7B\x46\x41\x58\x45\x43\x4D\x7D","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x3D\x24\x7B\x46\x41\x58\x48\x45\x41\x44\x45\x52\x49\x4E\x46\x4F\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x3D\x24\x7B\x46\x41\x58\x4C\x4F\x43\x41\x4C\x53\x54\x41\x54\x49\x4F\x4E\x49\x44\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x3D\x24\x7B\x46\x41\x58\x4D\x49\x4E\x52\x41\x54\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x3D\x24\x7B\x46\x41\x58\x4D\x41\x58\x52\x41\x54\x45\x7D","\x46\x41\x58\x4F\x50\x54\x28\x6D\x6F\x64\x65\x6D\x29\x3D\x24\x7B\x46\x41\x58\x4D\x4F\x44\x45\x4D\x7D","\x46\x41\x58\x4F\x50\x54\x28\x67\x61\x74\x65\x77\x61\x79\x29\x3D\x24\x7B\x46\x41\x58\x47\x41\x54\x45\x57\x41\x59\x7D","\x46\x41\x58\x4F\x50\x54\x28\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74\x29\x3D\x24\x7B\x46\x41\x58\x54\x33\x38\x54\x49\x4D\x45\x4F\x55\x54\x7D","\x53\x65\x6E\x64\x46\x41\x58","\x24\x7B\x46\x41\x58\x4F\x55\x54\x46\x49\x4C\x45\x7D\x2C\x64\x73","\x48\x61\x6E\x67\x75\x70","\x52\x65\x77\x72\x69\x74\x69\x6E\x67\x20\x55\x73\x65\x72\x73\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73\x2E\x2E\x2E","\x61\x70\x70\x64\x61\x74\x61","\x53\x49\x50\x2F","\x2C\x2C\x74\x54\x78\x58","\x73\x61\x76\x65","\x55\x73\x65\x72\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x44\x41\x53\x48\x42\x4F\x41\x52\x44","\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2F\x76\x6F\x69\x63\x65","\x79\x6F\x75\x72\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x59\x4F\x55\x52\x5F\x44\x41\x53\x48\x42\x4F\x41\x52\x44\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x79\x6F\x75\x72\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73\x2F\x73\x68\x6F\x77\x2F\x31","\x73\x74\x61\x66\x66","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x54\x41\x46\x46","\x2F\x73\x74\x61\x66\x66\x2F\x61\x67\x65\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x61\x67\x65\x6E\x74\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x47\x45\x4E\x54\x53","\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x4F\x4E\x54\x41\x43\x54\x5F\x4D\x41\x4E\x41\x47\x45\x52","\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73\x2F\x6C\x69\x73\x74","\x63\x68\x61\x6E\x6E\x65\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x4E\x4E\x45\x4C\x53","\x76\x6F\x69\x63\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x56\x4F\x49\x43\x45","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73\x2F\x6C\x69\x73\x74","\x63\x68\x61\x74","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x48\x41\x54","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x6C\x69\x73\x74","\x6D\x61\x69\x6C","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x41\x49\x4C","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6D\x61\x69\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x66\x61\x78","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x46\x41\x58","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x73\x6D\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x4D\x53","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x72\x65\x61\x6C\x74\x69\x6D\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x52\x45\x41\x4C\x54\x49\x4D\x45","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x76\x69\x65\x77\x2F\x61\x67\x65\x6E\x74\x73","\x74\x6F\x6F\x6C\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x54\x4F\x4F\x4C\x53","\x2F\x74\x6F\x6F\x6C\x73\x2F\x74\x72\x69\x67\x67\x65\x72\x73\x2F\x6C\x69\x73\x74","\x73\x71\x75\x61\x72\x65","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x43\x41\x4C\x4C\x59\x53\x51\x55\x41\x52\x45","\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6C\x69\x73\x74","\x6A\x73\x63\x72\x69\x70\x74\x79","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4A\x53\x43\x52\x49\x50\x54\x59","\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6C\x69\x73\x74","\x6D\x6F\x74\x69\x6F\x6E\x64\x69\x61\x6C\x65\x72","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4D\x4F\x54\x49\x4F\x4E\x5F\x44\x49\x41\x4C\x45\x52","\x2F\x6D\x6F\x74\x69\x6F\x6E\x64\x69\x61\x6C\x65\x72\x2F\x6C\x69\x73\x74\x73\x2F\x6C\x69\x73\x74","\x61\x6E\x61\x6C\x79\x74\x69\x63\x73","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x41\x4E\x41\x4C\x59\x54\x49\x43\x53","\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x6C\x69\x73\x74","\x73\x65\x74\x74\x69\x6E\x67","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x53\x45\x54\x54\x49\x4E\x47\x53","\x2F\x73\x65\x74\x74\x69\x6E\x67\x2F\x75\x70\x64\x61\x74\x65\x73\x2F\x6C\x69\x73\x74","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x49\x4E\x54\x45\x47\x52\x41\x54\x49\x4F\x4E","\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73\x2F\x6C\x69\x73\x74","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x41\x50\x50\x4C\x49\x43\x41\x54\x49\x4F\x4E\x5F\x4F\x50\x45\x4E\x5F\x43\x48\x41\x4E\x4E\x45\x4C","\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x73\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F\x6C\x69\x73\x74","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65\x73\x3A","\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x6D\x6F\x64\x75\x6C\x65\x73","\x4D\x6F\x64\x75\x6C\x65","\x44\x65\x74\x61\x69\x6C\x73","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x71\x75\x65\x75\x65\x73\x20\x72\x65\x70\x6F\x72\x74","\x6A\x31\x32\x5F\x37","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x52\x65\x73\x75\x6C\x74","\x53\x69\x6D\x70\x6C\x65\x20\x71\x75\x65\x75\x65\x20\x63\x61\x6C\x6C\x73\x20\x6F\x76\x65\x72\x76\x69\x65\x77","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x62\x6F\x75\x74\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x71\x75\x65\x75\x65\x20\x63\x61\x6C\x6C\x73","\x6A\x36\x30\x5F\x31","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x41\x67\x65\x6E\x74\x20\x63\x61\x6C\x6C\x73\x20\x74\x69\x6D\x65\x72\x20\x48\x61\x6E\x64\x6C\x65\x20\x74\x69\x6D\x65\x3D\x20\x74\x61\x6C\x6B\x20\x74\x69\x6D\x65\x20\x2B\x20\x41\x43\x57\x20\x74\x69\x6D\x65","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x51\x75\x65\x75\x65\x20\x74\x69\x6D\x65\x72\x20\x48\x61\x6E\x64\x6C\x65\x20\x54\x69\x6D\x65\x3D\x20\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65\x20\x2B\x20\x41\x56\x47\x20\x54\x49\x6D\x65","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x51\x75\x65\x75\x65\x73\x20\x61\x6E\x73\x77\x65\x72\x20\x74\x69\x6D\x65\x20\x70\x65\x72\x66\x6F\x72\x6D\x61\x6E\x63\x65","\x44\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x43\x61\x75\x73\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x73\x20\x63\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E\x20\x63\x61\x75\x73\x65\x73","\x41\x6E\x73\x77\x65\x72\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x48\x6F\x75\x72","\x41\x6E\x73\x77\x65\x72\x20\x74\x69\x6D\x65\x20\x20\x62\x79\x20\x68\x6F\x75\x72","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x62\x6F\x75\x74\x20\x74\x68\x65\x20\x75\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73","\x6A\x36\x30\x5F\x32","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x55\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x55\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x73\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x63\x61\x6C\x6C\x73","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x63\x61\x6C\x6C\x73\x20\x73\x75\x6D\x6D\x61\x72\x79","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x74\x69\x6D\x65\x20\x70\x65\x72\x66\x6F\x72\x6D\x61\x6E\x63\x65\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x44\x61\x74\x65","\x51\x75\x65\x75\x65\x20\x63\x61\x6C\x6C\x73\x20\x73\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x64\x61\x74\x65","\x6A\x36\x30\x5F\x33","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x48\x6F\x75\x72","\x43\x61\x6C\x6C\x73\x20\x64\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x20\x62\x79\x20\x68\x6F\x75\x72","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x44\x61\x79","\x43\x61\x6C\x6C\x73\x20\x64\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x20\x62\x79\x20\x64\x61\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x6D\x6F\x6E\x74\x68","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x57\x65\x65\x6B\x64\x61\x79","\x43\x61\x6C\x6C\x73\x20\x64\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x20\x62\x79\x20\x64\x61\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x77\x65\x65\x6B","\x53\x75\x6D\x6D\x61\x72\x79","\x43\x61\x6C\x6C\x73\x20\x64\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x43\x61\x6C\x6C\x73\x20\x64\x65\x74\x61\x69\x6C\x20\x28\x63\x64\x72\x29","\x6A\x35\x31\x5F\x31","\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x4D\x61\x6E\x75\x61\x6C\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x64\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x54\x79\x70\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x72\x65\x70\x6F\x72\x74\x20\x6F\x66\x20\x74\x68\x65\x20\x63\x61\x6C\x6C\x73\x20\x74\x79\x70\x65","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73\x20\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C\x73\x20\x62\x79\x20\x44\x61\x74\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x6F\x75\x74\x62\x6F\x75\x6E\x64\x20\x63\x61\x6C\x6C\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x64\x61\x74\x65","\x4C\x6F\x67\x69\x6E\x20\x54\x69\x6D\x65","\x41\x67\x65\x6E\x74\x27\x73\x20\x6C\x6F\x67\x69\x6E\x20\x74\x69\x6D\x65","\x6A\x31\x32\x5F\x35","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x4C\x4F\x47\x49\x4E\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x76\x6F\x69\x63\x65\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x41\x63\x74\x69\x76\x69\x74\x69\x65\x73\x20\x53\x75\x6D\x6D\x61\x72\x79","\x41\x67\x65\x6E\x74\x27\x73\x20\x61\x63\x74\x69\x76\x69\x74\x69\x65\x73\x20\x72\x65\x70\x6F\x72\x74","\x6A\x38\x37\x5F\x31","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x76\x6F\x69\x63\x65\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x50\x61\x75\x73\x65\x20\x44\x65\x74\x61\x69\x6C\x73","\x41\x67\x65\x6E\x74\x73\x20\x73\x74\x61\x74\x75\x73\x20\x64\x65\x74\x61\x69\x6C\x73","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x76\x6F\x69\x63\x65\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x50\x41\x55\x53\x45\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x41\x67\x65\x6E\x74\x27\x73\x20\x73\x74\x61\x74\x75\x73\x20\x64\x65\x74\x61\x69\x6C","\x50\x61\x75\x73\x65\x20\x54\x69\x6D\x65","\x41\x67\x65\x6E\x74\x27\x73\x20\x70\x61\x75\x73\x65\x20\x74\x69\x6D\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x79\x70\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x50\x41\x55\x53\x45\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x68\x61\x6E\x6E\x65\x6C\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x76\x6F\x69\x63\x65\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x20\x53\x75\x6D\x6D\x61\x72\x79","\x6A\x38\x37\x5F\x32","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x42\x6C\x6F\x63\x6B\x73","\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x20\x42\x6C\x6F\x63\x6B\x73\x20\x44\x65\x74\x61\x69\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x61\x63\x63\x6F\x75\x6E\x74","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x74\x68\x65\x20\x65\x6D\x61\x69\x6C\x73\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x65\x61\x63\x68\x20\x61\x63\x63\x6F\x75\x6E\x74","\x6A\x31\x32\x5F\x34","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x52\x65\x63\x6F\x72\x64\x73\x20\x72\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x6A\x31\x31\x30\x5F\x31","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x26\x67\x74\x3B\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x72\x61\x74\x69\x6E\x67\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x52\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x52\x65\x63\x6F\x72\x64\x73\x20\x72\x61\x74\x69\x6E\x67\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x71\x75\x65\x75\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x26\x67\x74\x3B\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x72\x61\x74\x69\x6E\x67\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x57\x65\x62\x73\x69\x74\x65\x20\x53\x75\x6D\x6D\x61\x72\x79","\x43\x68\x61\x74\x20\x73\x65\x73\x73\x69\x6F\x6E\x20\x69\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x62\x79\x20\x77\x65\x62\x73\x69\x74\x65","\x6A\x31\x32\x5F\x33","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x53\x65\x73\x73\x69\x6F\x6E\x20\x44\x65\x74\x61\x69\x6C","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x62\x6F\x75\x74\x20\x63\x68\x61\x74\x20\x73\x65\x73\x73\x69\x6F\x6E","\x43\x68\x61\x74\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x53\x65\x73\x73\x69\x6F\x6E\x20\x63\x68\x61\x74\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x63\x6F\x6D\x70\x6C\x65\x74\x65\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x31\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x68\x61\x74\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x20\x73\x65\x73\x73\x69\x6F\x6E\x73\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x71\x75\x65\x75\x65\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x43\x68\x61\x74\x20\x62\x79\x20\x44\x61\x74\x65","\x53\x65\x73\x73\x69\x6F\x6E\x20\x63\x68\x61\x74\x20\x62\x79\x20\x64\x61\x74\x65","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x72\x65\x63\x65\x69\x76\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\x62\x79\x20\x71\x75\x65\x75\x65","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x73\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x61\x63\x63\x65\x70\x74\x65\x64\x20\x65\x6D\x61\x69\x6C\x20\x62\x79\x20\x61\x67\x65\x6E\x74","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x74\x69\x6D\x65\x6F\x75\x74\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x30\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x4D\x65\x73\x73\x61\x67\x65\x73\x20\x53\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x44\x61\x74\x65","\x47\x6C\x6F\x62\x61\x6C\x20\x6D\x65\x73\x73\x61\x67\x65\x73\x20\x73\x75\x6D\x6D\x61\x72\x79\x20\x62\x79\x20\x64\x61\x74\x65","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x64\x65\x74\x61\x69\x6C","\x44\x65\x74\x61\x69\x6C\x65\x64\x20\x72\x65\x70\x6F\x72\x74\x20\x61\x62\x6F\x75\x74\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73","\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x53\x75\x6D\x6D\x61\x72\x79","\x43\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x28\x66\x69\x6C\x74\x65\x72\x65\x64\x20\x62\x79\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x6E\x75\x6C\x6C\x29","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x41\x4E\x44\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x5D\x7D\x7D","\x43\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x62\x79\x20\x64\x61\x74\x65","\x53\x75\x6D\x6D\x61\x72\x79\x20\x6F\x66\x20\x63\x6C\x6F\x73\x65\x64\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73\x20\x67\x72\x6F\x75\x70\x65\x64\x20\x62\x79\x20\x64\x61\x74\x65\x20\x2B\x20\x61\x76\x65\x72\x61\x67\x65\x20\x68\x61\x6E\x64\x6C\x65\x20\x74\x69\x6D\x65\x20\x28\x66\x72\x6F\x6D\x20\x77\x68\x65\x6E\x20\x74\x68\x65\x20\x66\x69\x72\x73\x74\x20\x65\x6D\x61\x69\x6C\x20\x61\x72\x72\x69\x76\x65\x64\x20\x74\x6F\x20\x77\x68\x65\x6E\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x20\x68\x61\x73\x20\x62\x65\x65\x6E\x20\x63\x6C\x6F\x73\x65\x64\x29","\x7B\x22\x67\x72\x6F\x75\x70\x22\x3A\x7B\x22\x6F\x70\x65\x72\x61\x74\x6F\x72\x22\x3A\x22\x4F\x52\x22\x2C\x22\x72\x75\x6C\x65\x73\x22\x3A\x5B\x7B\x22\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x22\x3A\x22\x3D\x22\x2C\x22\x66\x69\x65\x6C\x64\x22\x3A\x22\x73\x74\x61\x74\x75\x73\x22\x2C\x22\x76\x61\x6C\x75\x65\x22\x3A\x22\x27\x43\x4C\x4F\x53\x45\x44\x27\x22\x2C\x22\x72\x65\x71\x75\x69\x72\x65\x64\x22\x3A\x74\x72\x75\x65\x7D\x5D\x7D\x7D","\x6A\x31\x32\x5F\x36","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x6A\x34\x5F\x31\x30","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x75\x6E\x69\x71\x75\x65\x69\x64","\x55\x6E\x69\x71\x75\x65\x49\x64","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x75\x6D","\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x75\x6D","\x63\x61\x6C\x6C\x65\x72\x69\x64\x6E\x61\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x49\x64\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74","\x51\x75\x65\x75\x65\x4A\x6F\x69\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x51\x75\x65\x75\x65\x4C\x65\x61\x76\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x51\x75\x65\x75\x65\x41\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x51\x75\x65\x75\x65\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x51\x75\x65\x75\x65\x45\x78\x69\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x41\x74","\x51\x75\x65\x75\x65\x45\x78\x69\x74\x41\x74","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x72\x65\x61\x73\x6F\x6E","\x51\x75\x65\x75\x65\x45\x78\x69\x74\x52\x65\x61\x73\x6F\x6E","\x44\x49\x44","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29","\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x49\x46\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x2C\x68\x6F\x6C\x64\x74\x69\x6D\x65\x2C\x6E\x75\x6C\x6C\x29","\x41\x6E\x73\x77\x65\x72\x54\x69\x6D\x65","\x43\x61\x6C\x6C\x65\x72\x49\x44","\x53\x74\x61\x72\x74\x54\x69\x6D\x65","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x54\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x20\x45\x4C\x53\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x4C\x65\x61\x76\x65\x41\x74\x20\x45\x4E\x44","\x45\x6E\x64\x54\x69\x6D\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x31\x20\x54\x48\x45\x4E\x20\x22\x59\x45\x53\x22\x20\x45\x4C\x53\x45\x20\x22\x4E\x4F\x22\x20\x45\x4E\x44","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x41\x67\x65\x6E\x74","\x61\x67\x65\x6E\x74\x63\x61\x6C\x6C\x65\x64\x41\x74","\x41\x67\x65\x6E\x74\x43\x61\x6C\x6C\x65\x64\x41\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x41\x67\x65\x6E\x74\x43\x6F\x6E\x6E\x65\x63\x74\x41\x74","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x61\x67\x65\x6E\x74\x61\x63\x77","\x41\x67\x65\x6E\x74\x41\x43\x57","\x61\x63\x77\x74\x69\x6D\x65","\x41\x67\x65\x6E\x74\x41\x43\x57\x54\x69\x6D\x65","\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x41\x67\x65\x6E\x74\x43\x6F\x6D\x70\x6C\x65\x74\x65","\x72\x65\x61\x73\x6F\x6E","\x48\x61\x6E\x67\x75\x70\x52\x65\x61\x73\x6F\x6E","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x4C\x61\x73\x74\x45\x76\x65\x6E\x74","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x53\x55\x4D","\x54\x6F\x74\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x54\x6F\x74\x41\x43\x57\x54\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x2B\x20\x61\x63\x77\x74\x69\x6D\x65","\x54\x6F\x74\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x29","\x41\x76\x67\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x61\x63\x77\x74\x69\x6D\x65\x29\x29","\x41\x76\x67\x41\x43\x57\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x2B\x20\x61\x63\x77\x74\x69\x6D\x65\x29\x2F\x43\x4F\x55\x4E\x54\x28\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x29","\x41\x76\x67\x48\x61\x6E\x64\x6C\x65\x54\x69\x6D\x65","\x54\x6F\x74\x20\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x54\x6F\x74\x20\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x43\x57\x54\x69\x6D\x65","\x54\x6F\x74\x20\x48\x61\x6E\x64\x6C\x65\x20\x54\x69\x6D\x65","\x41\x76\x67\x20\x54\x61\x6C\x6B\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x29","\x41\x76\x67\x20\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x41\x76\x67\x20\x41\x43\x57\x54\x69\x6D\x65","\x41\x76\x67\x20\x48\x61\x6E\x64\x6C\x65\x20\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x6E\x73\x77\x65\x72\x65\x64","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x26\x6C\x74\x3B\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x26\x6C\x74\x3B\x31\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x26\x6C\x74\x3B\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x2F\x20\x53\x55\x4D\x28\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x20\x26\x6C\x74\x3B\x31\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x26\x67\x74\x3B\x3D\x31\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x26\x6C\x74\x3B\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x31\x30\x2D\x32\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x26\x67\x74\x3B\x3D\x31\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x26\x6C\x74\x3B\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x2F\x20\x53\x55\x4D\x28\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x20\x31\x30\x2D\x32\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x26\x67\x74\x3B\x3D\x32\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x26\x6C\x74\x3B\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x32\x30\x2D\x33\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x26\x67\x74\x3B\x3D\x32\x30\x20\x41\x4E\x44\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x26\x6C\x74\x3B\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x2F\x20\x53\x55\x4D\x28\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x20\x32\x30\x2D\x33\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x26\x67\x74\x3B\x3D\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x6E\x73\x77\x65\x72\x65\x64\x20\x26\x67\x74\x3B\x33\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x26\x67\x74\x3B\x3D\x33\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x2F\x20\x53\x55\x4D\x28\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65\x20\x26\x67\x74\x3B\x33\x30\x73","\x52\x65\x61\x73\x6F\x6E","\x43\x4F\x55\x4E\x54","\x48\x6F\x75\x72","\x48\x4F\x55\x52","\x4A\x6F\x69\x6E\x41\x74","\x4C\x65\x61\x76\x65\x41\x74","\x41\x62\x61\x6E\x64\x6F\x6E","\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x41\x74","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x52\x65\x61\x73\x6F\x6E","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x51\x75\x65\x75\x65\x50\x6F\x73\x69\x74\x69\x6F\x6E","\x41\x62\x61\x6E\x64\x6F\x6E\x20\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x45\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29","\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x48\x6F\x6C\x64\x54\x69\x6D\x65","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x54\x6F\x74\x20\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x29\x29","\x41\x76\x67\x41\x62\x61\x6E\x64\x6F\x6E\x54\x69\x6D\x65","\x54\x6F\x74\x20\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x45\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x29\x29","\x41\x76\x67\x20\x55\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x54\x49\x6D\x65","\x54\x6F\x74\x20\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x6C\x74\x3B\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x26\x6C\x74\x3B\x31\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x6C\x74\x3B\x31\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x2F\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x52\x61\x74\x65\x26\x6C\x74\x3B\x31\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x67\x74\x3B\x3D\x31\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x6C\x74\x3B\x36\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x31\x30\x2D\x36\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x67\x74\x3B\x3D\x31\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x6C\x74\x3B\x36\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x20\x2F\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x52\x61\x74\x65\x20\x31\x30\x2D\x36\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x67\x74\x3B\x3D\x36\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x6C\x74\x3B\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x36\x30\x2D\x31\x32\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x67\x74\x3B\x3D\x36\x30\x20\x41\x4E\x44\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x6C\x74\x3B\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x20\x20\x2F\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x52\x61\x74\x65\x20\x36\x30\x2D\x31\x32\x30\x73","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x67\x74\x3B\x3D\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x26\x67\x74\x3B\x31\x32\x30\x73","\x52\x4F\x55\x4E\x44\x28\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x41\x62\x61\x6E\x64\x6F\x6E\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x41\x74\x29\x20\x26\x67\x74\x3B\x3D\x31\x32\x30\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29\x20\x20\x2F\x20\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x41\x62\x61\x6E\x64\x6F\x6E\x65\x64\x20\x52\x61\x74\x65\x26\x67\x74\x3B\x31\x32\x30\x73","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74","\x44\x61\x74\x65","\x44\x41\x54\x45","\x4F\x66\x66\x65\x72\x65\x64","\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x29\x29\x29","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x2F\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x2A\x31\x30\x30\x2C\x31\x29","\x41\x6E\x73\x77\x65\x72\x20\x52\x61\x74\x65","\x44\x41\x59\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74\x29","\x44\x61\x79","\x44\x41\x59\x4E\x41\x4D\x45\x28\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6A\x6F\x69\x6E\x61\x74\x29","\x44\x61\x79\x4F\x66\x57\x65\x65\x6B","\x41\x53\x43","\x55\x6E\x69\x71\x75\x65\x49\x44","\x74\x79\x70\x65","\x54\x79\x70\x65","\x74\x61\x67","\x54\x61\x67","\x73\x6F\x75\x72\x63\x65","\x53\x6F\x75\x72\x63\x65","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x64\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x44\x65\x73\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x6C\x61\x73\x74\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4C\x61\x73\x74\x41\x70\x70","\x6C\x61\x73\x74\x64\x61\x74\x61","\x4C\x61\x73\x74\x44\x61\x74\x61","\x73\x74\x61\x72\x74\x74\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x65\x6E\x64\x74\x69\x6D\x65","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x44\x75\x72\x61\x74\x69\x6F\x6E","\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x44\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x63\x63\x6F\x75\x6E\x74\x63\x6F\x64\x65","\x41\x67\x65\x6E\x74\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x43\x61\x6C\x6C\x65\x72\x49\x64","\x62\x69\x6C\x6C\x61\x62\x6C\x65\x73\x65\x63\x6F\x6E\x64\x73","\x42\x69\x6C\x6C\x73\x65\x63","\x54\x6F\x74\x20\x44\x75\x72\x61\x74\x69\x6F\x6E","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x29","\x53\x55\x42\x53\x54\x52\x49\x4E\x47\x5F\x49\x4E\x44\x45\x58\x28\x63\x68\x61\x6E\x6E\x65\x6C\x2C\x20\x27\x2D\x27\x2C\x20\x31\x29","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x53\x55\x4D\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x29\x29","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x74\x79\x70\x65\x3D\x22\x4C\x4F\x47\x49\x4E\x22\x20\x54\x48\x45\x4E\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x20\x45\x4E\x44","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x74\x79\x70\x65\x3D\x22\x54\x41\x4C\x4B\x49\x4E\x47\x22\x20\x54\x48\x45\x4E\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x20\x45\x4E\x44","\x54\x61\x6C\x6B\x20\x54\x69\x6D\x65","\x43\x41\x53\x45\x20\x57\x48\x45\x4E\x20\x74\x79\x70\x65\x3D\x22\x50\x41\x55\x53\x45\x22\x20\x54\x48\x45\x4E\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x20\x45\x4E\x44","\x65\x6E\x74\x65\x72\x41\x74","\x45\x6E\x74\x65\x72\x41\x74","\x65\x78\x69\x74\x41\x74","\x45\x78\x69\x74\x41\x74","\x64\x61\x74\x61\x31","\x69\x6E\x74\x65\x72\x66\x61\x63\x65","\x49\x6E\x74\x65\x72\x66\x61\x63\x65","\x45\x76\x65\x6E\x74","\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x78\x69\x74\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x65\x6E\x74\x65\x72\x41\x74\x29\x29","\x50\x61\x75\x73\x65\x54\x79\x70\x65","\x70\x72\x6F\x6A\x65\x63\x74\x5F\x6E\x61\x6D\x65","\x50\x72\x6F\x6A\x65\x63\x74\x20\x4E\x61\x6D\x65","\x64\x6E\x69\x64","\x6A\x6F\x69\x6E\x41\x74","\x53\x74\x61\x72\x74\x20\x54\x69\x6D\x65","\x6C\x65\x61\x76\x65\x41\x74","\x45\x6E\x64\x20\x54\x69\x6D\x65","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6A\x6F\x69\x6E\x41\x74\x29","\x55\x6E\x69\x71\x75\x65\x20\x49\x64","\x43\x61\x6C\x6C\x65\x72\x20\x49\x64","\x6E\x6F\x64\x65","\x42\x6C\x6F\x63\x6B","\x64\x61\x74\x61","\x44\x61\x74\x61","\x61\x63\x63\x6F\x75\x6E\x74\x6E\x61\x6D\x65","\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x63\x65\x69\x76\x65\x64","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29\x29\x2F\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x28\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x29\x2A\x31\x30\x30\x2C\x31\x29","\x41\x63\x63\x65\x70\x74\x20\x52\x61\x74\x65","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x51\x75\x65\x75\x65","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x66\x69\x64\x65\x6C\x69\x74\x79\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x20\x62\x79\x20\x46\x69\x64\x65\x6C\x69\x74\x79","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x20\x41\x4E\x44\x20\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x6E\x75\x6C\x6C\x29","\x41\x63\x63\x65\x70\x74\x65\x64\x20\x62\x79\x20\x41\x67\x65\x6E\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x6C\x69\x6E\x65\x6E\x61\x6D\x65","\x52\x65\x63\x6F\x72\x64\x65\x64\x20\x43\x61\x6C\x6C\x73","\x72\x61\x74\x69\x6E\x67","\x54\x6F\x74\x61\x6C\x20\x52\x61\x74\x69\x6E\x67","\x41\x76\x67\x20\x52\x61\x74\x69\x6E\x67","\x41\x56\x47","\x52\x61\x74\x65\x64\x20\x43\x61\x6C\x6C\x73","\x77\x65\x62\x73\x69\x74\x65\x6E\x61\x6D\x65","\x57\x65\x62\x53\x69\x74\x65","\x53\x65\x73\x73\x69\x6F\x6E\x73","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x61\x62\x61\x6E\x64\x6F\x6E","\x74\x69\x6D\x65\x6F\x75\x74","\x54\x69\x6D\x65\x6F\x75\x74","\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29","\x54\x6F\x74\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x41\x74\x29\x29\x29","\x41\x76\x67\x20\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x57\x65\x62\x73\x69\x74\x65","\x76\x69\x73\x69\x74\x6F\x72\x6E\x61\x6D\x65","\x56\x69\x73\x69\x74\x6F\x72\x4E\x61\x6D\x65","\x76\x69\x73\x69\x74\x6F\x72\x65\x6D\x61\x69\x6C","\x56\x69\x73\x69\x74\x6F\x72\x45\x6D\x61\x69\x6C","\x4D\x65\x6D\x65\x62\x65\x72\x4E\x61\x6D\x65","\x71\x75\x65\x75\x65\x6E\x61\x6D\x65","\x51\x75\x65\x75\x65\x4E\x61\x6D\x65","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x41\x74","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\x53\x65\x73\x73\x69\x6F\x6E","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x46\x72\x6F\x6D\x51\x75\x65\x75\x65","\x43\x4F\x55\x4E\x54\x28\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x4E\x55\x4C\x4C\x29\x29","\x44\x69\x72\x65\x63\x74\x54\x6F\x41\x67\x65\x6E\x74","\x53\x65\x73\x73\x69\x6F\x6E\x20\x54\x69\x6D\x65","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x63\x6F\x6D\x70\x6C\x65\x74\x65\x29\x2F\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x2A\x31\x30\x30\x2C\x31\x29","\x43\x6F\x6D\x70\x6C\x65\x74\x65\x20\x52\x61\x74\x65","\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x30\x29","\x52\x4F\x55\x4E\x44\x28\x53\x55\x4D\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x31\x2C\x6E\x75\x6C\x6C\x29\x29\x2F\x43\x4F\x55\x4E\x54\x28\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x2A\x31\x30\x30\x2C\x31\x29","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x49\x46\x28\x74\x69\x6D\x65\x6F\x75\x74\x3D\x30\x2C\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6C\x65\x61\x76\x65\x61\x74\x29\x2D\x20\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x6A\x6F\x69\x6E\x61\x74\x29\x2C\x4E\x55\x4C\x4C\x29\x29\x29","\x41\x76\x67\x20\x41\x63\x63\x65\x70\x74\x20\x54\x69\x6D\x65","\x54\x6F\x74\x20\x41\x63\x63\x65\x70\x74\x65\x64","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x66\x69\x64\x65\x6C\x69\x74\x79\x22\x2C\x31\x2C\x30\x29","\x46\x69\x64\x65\x6C\x69\x74\x79","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x61\x67\x65\x6E\x74\x22\x2C\x31\x2C\x30\x29","\x49\x46\x28\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x3D\x22\x71\x75\x65\x75\x65\x22\x2C\x31\x2C\x30\x29","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x49\x46\x28\x73\x74\x61\x74\x75\x73\x3D\x22\x52\x45\x43\x45\x49\x56\x45\x44\x22\x2C\x31\x2C\x30\x29","\x49\x46\x28\x73\x74\x61\x74\x75\x73\x3D\x22\x53\x45\x4E\x54\x22\x2C\x31\x2C\x30\x29","\x53\x65\x6E\x74","\x61\x63\x63\x6F\x75\x6E\x74","\x73\x74\x61\x74\x75\x73","\x6C\x61\x73\x74\x45\x76\x65\x6E\x74","\x61\x72\x72\x69\x76\x65\x64\x41\x74","\x6F\x70\x65\x6E\x65\x64\x41\x74","\x63\x6C\x6F\x73\x65\x64\x41\x74","\x6D\x61\x69\x6C\x49\x6E","\x6D\x61\x69\x6C\x4F\x75\x74","\x74\x61\x67\x73","\x50\x61\x72\x65\x6E\x74\x49\x64","\x63\x6F\x75\x6E\x74\x28\x2A\x29","\x69\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x49\x6E\x74\x65\x72\x61\x63\x74\x69\x6F\x6E\x73","\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x63\x6C\x6F\x73\x65\x64\x41\x74\x29\x2D\x55\x4E\x49\x58\x5F\x54\x49\x4D\x45\x53\x54\x41\x4D\x50\x28\x61\x72\x72\x69\x76\x65\x64\x41\x74\x29\x29\x29","\x44\x61\x74\x65\x54\x69\x6D\x65","\x49\x64","\x66\x72\x6F\x6D","\x66\x72\x6F\x6D\x4E\x75\x6D\x62\x65\x72","\x74\x6F","\x74\x6F\x4E\x75\x6D\x62\x65\x72","\x53\x74\x61\x74\x75\x73","\x41\x67\x65\x6E\x74\x4E\x61\x6D\x65","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x74\x69\x63\x6B\x65\x74\x49\x64","\x54\x69\x63\x6B\x65\x74\x49\x44","\x45\x72\x72\x6F\x72\x20\x70\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x41\x6E\x61\x6C\x79\x74\x69\x63\x73\x3A","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x41\x6E\x61\x6C\x79\x74\x69\x63\x73","\x52\x65\x70\x6F\x72\x74\x46\x69\x65\x6C\x64","\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x75\x73\x74\x6F\x6D\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x62\x6F\x6F\x6B\x2D\x6F\x70\x65\x6E\x22\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x4D\x79\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x5D","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x54\x72\x65\x65","\x5B\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x4D\x6F\x74\x69\x6F\x6E\x20\x52\x65\x70\x6F\x72\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x22\x69\x63\x6F\x6E\x2D\x62\x6F\x6F\x6B\x2D\x6F\x70\x65\x6E\x22\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x23\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x56\x6F\x69\x63\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x37\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x51\x75\x65\x75\x65\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x37\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x37\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x6E\x73\x77\x65\x72\x65\x64\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x37\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x55\x6E\x61\x6E\x73\x77\x65\x72\x65\x64\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x37\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x33\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x44\x69\x73\x74\x72\x69\x62\x75\x74\x69\x6F\x6E\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x33\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x36\x30\x5F\x33\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x37\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x35\x31\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x61\x6C\x6C\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x35\x31\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x35\x31\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x67\x65\x6E\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x32\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x61\x6C\x6C\x79\x53\x71\x75\x61\x72\x65\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x32\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x38\x37\x5F\x32\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x30\x5F\x31\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x52\x65\x63\x6F\x72\x64\x69\x6E\x67\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x30\x5F\x31\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x31\x30\x5F\x31\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x30\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x30\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x34\x5F\x31\x30\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x6A\x31\x32\x5F\x32\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x33\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x43\x68\x61\x74\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x33\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x33\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x34\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x45\x2D\x4D\x61\x69\x6C\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x34\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x34\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x36\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x53\x4D\x53\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x36\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x36\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x2C\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x35\x22\x2C\x22\x74\x65\x78\x74\x22\x3A\x22\x41\x67\x65\x6E\x74\x73\x22\x2C\x22\x69\x63\x6F\x6E\x22\x3A\x74\x72\x75\x65\x2C\x22\x6C\x69\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x35\x22\x7D\x2C\x22\x61\x5F\x61\x74\x74\x72\x22\x3A\x7B\x22\x68\x72\x65\x66\x22\x3A\x22\x23\x22\x2C\x22\x69\x64\x22\x3A\x22\x6A\x31\x32\x5F\x35\x5F\x61\x6E\x63\x68\x6F\x72\x22\x7D\x2C\x22\x73\x74\x61\x74\x65\x22\x3A\x7B\x22\x6C\x6F\x61\x64\x65\x64\x22\x3A\x74\x72\x75\x65\x2C\x22\x6F\x70\x65\x6E\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x73\x65\x6C\x65\x63\x74\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x2C\x22\x64\x69\x73\x61\x62\x6C\x65\x64\x22\x3A\x66\x61\x6C\x73\x65\x7D\x2C\x22\x64\x61\x74\x61\x22\x3A\x7B\x7D\x2C\x22\x70\x61\x72\x65\x6E\x74\x22\x3A\x22\x31\x22\x7D\x5D","\x50\x6F\x70\x75\x6C\x61\x74\x69\x6E\x67\x20\x53\x65\x74\x74\x69\x6E\x67\x20\x2D\x20\x44\x4F\x4E\x45\x20","\x73\x70\x72\x65\x61\x64","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x73\x6F\x75\x6E\x64\x73\x2F\x63\x6F\x6E\x76\x65\x72\x74\x65\x64","\x53\x65\x74\x74\x69\x6E\x67"];_0xa37b[0];var _=require(_0xa37b[1]);var util=require(_0xa37b[2]);var models=require(_0xa37b[3]);var sequelize=require(_0xa37b[3])[_0xa37b[4]];var _agents=[];var _voiceQueues=[];var _mailQueues=[];var _chatQueues=[];var _miller,_doe;var _setting;return models[_0xa37b[895]][_0xa37b[889]]({where:{id:1},defaults:{id:1,min_internal:1000,min_mailbox:1000,agi_port:4573,automation_timeout:3600,soundPath:_0xa37b[894]}})[_0xa37b[893]](function(_0xdaecxd){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[892]));return _0xdaecxd})[_0xa37b[11]](function(_0xdaecxd){_setting= _0xdaecxd;if(_setting[_0xa37b[7]]){models[_0xa37b[43]][_0xa37b[22]]([{role:_0xa37b[46],fullname:_0xa37b[47],email:_0xa37b[48],name:_0xa37b[46],password:_0xa37b[49],defaultuser:_0xa37b[46],internal:1000}],{ignoreDuplicates:true,individualHooks:true})[_0xa37b[11]](function(_0xdaecx12){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[35],_[_0xa37b[15]](_0xdaecx12,_0xa37b[14])[_0xa37b[13]]()));return models[_0xa37b[45]][_0xa37b[44]]({name:_0xa37b[36],description:_0xa37b[36],defaultEntry:true,Users:[{role:_0xa37b[37],fullname:_0xa37b[38],email:_0xa37b[39],name:_0xa37b[28],password:_0xa37b[40],defaultuser:_0xa37b[28],internal:1001},{role:_0xa37b[37],fullname:_0xa37b[41],email:_0xa37b[42],name:_0xa37b[26],password:_0xa37b[40],defaultuser:_0xa37b[26],internal:1002}]},{include:[{model:models[_0xa37b[43]]}]})})[_0xa37b[11]](function(_0xdaecx11){_agents= _0xdaecx11[_0xa37b[29]];console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[30],_[_0xa37b[15]](_0xdaecx11.Users,_0xa37b[14])[_0xa37b[13]]()));console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[31],_0xdaecx11[_0xa37b[14]]));return models[_0xa37b[34]][_0xa37b[22]]([{name:_0xa37b[18],musiconhold:_0xa37b[32],strategy:_0xa37b[19]},{name:_0xa37b[20],musiconhold:_0xa37b[32],strategy:_0xa37b[33]}],{ignoreDuplicates:true,individualHooks:true})})[_0xa37b[11]](function(_0xdaecx10){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[25],_[_0xa37b[15]](_0xdaecx10,_0xa37b[14])[_0xa37b[13]]()));_voiceQueues= _0xdaecx10;_miller= _[_0xa37b[27]](_agents,{name:_0xa37b[26]});_doe= _[_0xa37b[27]](_agents,{name:_0xa37b[28]});return _voiceQueues[0][_0xa37b[17]](_miller[_0xa37b[9]])})[_0xa37b[11]](function(){return _voiceQueues[1][_0xa37b[10]]([_miller[_0xa37b[9]],_doe[_0xa37b[9]]])})[_0xa37b[11]](function(){return models[_0xa37b[24]][_0xa37b[22]]([{name:_0xa37b[18],timeout:5,strategy:_0xa37b[19]},{name:_0xa37b[20],timeout:5,strategy:_0xa37b[21]}],{ignoreDuplicates:true,individualHooks:true})})[_0xa37b[11]](function(_0xdaecxf){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[12],_[_0xa37b[15]](_0xdaecxf,_0xa37b[14])[_0xa37b[13]]()));_mailQueues= _0xdaecxf;return _mailQueues[0][_0xa37b[17]](_miller[_0xa37b[9]])})[_0xa37b[11]](function(){return _mailQueues[1][_0xa37b[10]]([_miller[_0xa37b[9]],_doe[_0xa37b[9]]])})[_0xa37b[11]](function(){return models[_0xa37b[23]][_0xa37b[22]]([{name:_0xa37b[18],timeout:5,strategy:_0xa37b[19]},{name:_0xa37b[20],timeout:5,strategy:_0xa37b[21]}],{ignoreDuplicates:true,individualHooks:true})})[_0xa37b[11]](function(_0xdaecxe){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[12],_[_0xa37b[15]](_0xdaecxe,_0xa37b[14])[_0xa37b[13]]()));_chatQueues= _0xdaecxe;return _chatQueues[0][_0xa37b[17]](_miller[_0xa37b[9]])})[_0xa37b[11]](function(){return _chatQueues[1][_0xa37b[10]]([_miller[_0xa37b[9]],_doe[_0xa37b[9]]])})[_0xa37b[6]](function(_0xdaecxc){console[_0xa37b[8]](_0xdaecxc)});models[_0xa37b[63]][_0xa37b[22]]([{name:_0xa37b[51],prefix:_0xa37b[52],description:_0xa37b[53],options:_0xa37b[54]},{name:_0xa37b[55],prefix:_0xa37b[56],description:_0xa37b[57],options:_0xa37b[58]},{name:_0xa37b[59],prefix:_0xa37b[60],description:_0xa37b[61],options:_0xa37b[62]}],{ignoreDuplicates:true,individualHooks:true})[_0xa37b[11]](function(_0xdaecx13){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[50],_[_0xa37b[15]](_0xdaecx13,_0xa37b[14])[_0xa37b[13]]()))});models[_0xa37b[67]][_0xa37b[44]]({name:_0xa37b[65],description:_0xa37b[66],defaultEntry:true})[_0xa37b[11]](function(_0xdaecx14){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[64],_0xdaecx14[_0xa37b[14]]))});models[_0xa37b[73]][_0xa37b[44]]({name:_0xa37b[32],directory:_0xa37b[69],mode:_0xa37b[70],sort:_0xa37b[71],format:_0xa37b[72],defaultEntry:true})[_0xa37b[11]](function(_0xdaecx15){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[68],_0xdaecx15[_0xa37b[14]]))});models[_0xa37b[81]][_0xa37b[22]]([{name:_0xa37b[75]},{description:_0xa37b[76],name:_0xa37b[77]},{description:_0xa37b[78],name:_0xa37b[79]},{name:_0xa37b[80]}],{ignoreDuplicates:true,individualHooks:true})[_0xa37b[11]](function(_0xdaecx16){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[74],_[_0xa37b[15]](_0xdaecx16,_0xa37b[14])[_0xa37b[13]]()))});models[_0xa37b[85]][_0xa37b[22]]([{name:_0xa37b[83]},{name:_0xa37b[84]}],{ignoreDuplicates:true,individualHooks:true})[_0xa37b[11]](function(_0xdaecx17){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[82],_[_0xa37b[15]](_0xdaecx17,_0xa37b[14])[_0xa37b[13]]()))});models[_0xa37b[92]][_0xa37b[44]]({name:_0xa37b[87],context:_0xa37b[88],callingpres:_0xa37b[89],deny:_0xa37b[90],permit:_0xa37b[90],secret:_0xa37b[91]})[_0xa37b[11]](function(_0xdaecx18){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[86],_0xdaecx18[_0xa37b[14]]))});models[_0xa37b[99]][_0xa37b[22]]([{name:_0xa37b[94],description:_0xa37b[95]},{name:_0xa37b[88],description:_0xa37b[95]},{name:_0xa37b[96],description:_0xa37b[95]},{name:_0xa37b[97],description:_0xa37b[95]},{name:_0xa37b[98],description:_0xa37b[95]}],{ignoreDuplicates:true,individualHooks:true})[_0xa37b[11]](function(_0xdaecx17){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[93],_[_0xa37b[15]](_0xdaecx17,_0xa37b[14])[_0xa37b[13]]()))});models[_0xa37b[149]][_0xa37b[44]]({context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[104],app:_0xa37b[105],appdata:_0xa37b[106],type:_0xa37b[107],description:_0xa37b[108],Applications:[{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[109],app:_0xa37b[110],appdata:_0xa37b[111],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[112],app:_0xa37b[113],appdata:_0xa37b[114],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[115],app:_0xa37b[116],appdata:_0xa37b[117],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[118],app:_0xa37b[116],appdata:_0xa37b[119],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[120],app:_0xa37b[116],appdata:_0xa37b[121],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[122],app:_0xa37b[123],appdata:_0xa37b[124],type:_0xa37b[107],interval:_0xa37b[125],isApp:true},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[126],app:_0xa37b[116],appdata:_0xa37b[127],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[128],app:_0xa37b[116],appdata:_0xa37b[129],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[130],app:_0xa37b[113],appdata:_0xa37b[131],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[132],app:_0xa37b[116],appdata:_0xa37b[117],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[133],app:_0xa37b[116],appdata:_0xa37b[119],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[134],app:_0xa37b[116],appdata:_0xa37b[121],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[135],app:_0xa37b[136],appdata:_0xa37b[137],type:_0xa37b[107],interval:_0xa37b[125],isApp:true},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[138],app:_0xa37b[116],appdata:_0xa37b[127],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[139],app:_0xa37b[116],appdata:_0xa37b[140],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[141],app:_0xa37b[113],appdata:_0xa37b[142],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[143],app:_0xa37b[116],appdata:_0xa37b[117],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[144],app:_0xa37b[116],appdata:_0xa37b[119],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[145],app:_0xa37b[116],appdata:_0xa37b[121],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[146],app:_0xa37b[123],appdata:_0xa37b[124],type:_0xa37b[107],interval:_0xa37b[125],isApp:true},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[147],app:_0xa37b[116],appdata:_0xa37b[127],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[103],priority:_0xa37b[148],app:_0xa37b[116],appdata:_0xa37b[129],type:_0xa37b[107]}]},{include:[{model:models[_0xa37b[149]],as:_0xa37b[150]}]})[_0xa37b[11]](function(_0xdaecx19){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[100],_0xdaecx19[_0xa37b[101]],_0xdaecx19[_0xa37b[102]]))});models[_0xa37b[149]][_0xa37b[44]]({context:_0xa37b[94],exten:_0xa37b[151],priority:_0xa37b[104],app:_0xa37b[105],appdata:_0xa37b[106],type:_0xa37b[107],description:_0xa37b[152],Applications:[{context:_0xa37b[94],exten:_0xa37b[151],priority:_0xa37b[109],app:_0xa37b[110],appdata:_0xa37b[111],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[151],priority:_0xa37b[112],app:_0xa37b[113],appdata:_0xa37b[114],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[151],priority:_0xa37b[115],app:_0xa37b[116],appdata:_0xa37b[117],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[151],priority:_0xa37b[118],app:_0xa37b[116],appdata:_0xa37b[119],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[151],priority:_0xa37b[120],app:_0xa37b[153],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[151],priority:_0xa37b[122],app:_0xa37b[154],appdata:_0xa37b[155],type:_0xa37b[107],interval:_0xa37b[125],isApp:true},{context:_0xa37b[94],exten:_0xa37b[151],priority:_0xa37b[126],app:_0xa37b[116],appdata:_0xa37b[127],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[151],priority:_0xa37b[128],app:_0xa37b[116],appdata:_0xa37b[156],type:_0xa37b[107]}]},{include:[{model:models[_0xa37b[149]],as:_0xa37b[150]}]})[_0xa37b[11]](function(_0xdaecx19){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[100],_0xdaecx19[_0xa37b[101]],_0xdaecx19[_0xa37b[102]]))});models[_0xa37b[149]][_0xa37b[44]]({context:_0xa37b[94],exten:_0xa37b[157],priority:_0xa37b[104],app:_0xa37b[105],appdata:_0xa37b[106],type:_0xa37b[107],description:_0xa37b[152],Applications:[{context:_0xa37b[94],exten:_0xa37b[157],priority:_0xa37b[109],app:_0xa37b[110],appdata:_0xa37b[111],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[157],priority:_0xa37b[112],app:_0xa37b[113],appdata:_0xa37b[114],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[157],priority:_0xa37b[115],app:_0xa37b[116],appdata:_0xa37b[117],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[157],priority:_0xa37b[118],app:_0xa37b[116],appdata:_0xa37b[119],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[157],priority:_0xa37b[120],app:_0xa37b[116],appdata:_0xa37b[121],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[157],priority:_0xa37b[122],app:_0xa37b[158],appdata:_0xa37b[159],type:_0xa37b[107],interval:_0xa37b[125],isApp:true},{context:_0xa37b[94],exten:_0xa37b[157],priority:_0xa37b[126],app:_0xa37b[116],appdata:_0xa37b[127],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[157],priority:_0xa37b[128],app:_0xa37b[116],appdata:_0xa37b[160],type:_0xa37b[107]}]},{include:[{model:models[_0xa37b[149]],as:_0xa37b[150]}]})[_0xa37b[11]](function(_0xdaecx19){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[100],_0xdaecx19[_0xa37b[101]],_0xdaecx19[_0xa37b[102]]))});models[_0xa37b[149]][_0xa37b[44]]({context:_0xa37b[94],exten:_0xa37b[161],priority:_0xa37b[104],app:_0xa37b[105],appdata:_0xa37b[106],type:_0xa37b[107],description:_0xa37b[152],Applications:[{context:_0xa37b[94],exten:_0xa37b[161],priority:_0xa37b[109],app:_0xa37b[110],appdata:_0xa37b[111],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[161],priority:_0xa37b[112],app:_0xa37b[113],appdata:_0xa37b[114],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[161],priority:_0xa37b[115],app:_0xa37b[116],appdata:_0xa37b[117],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[161],priority:_0xa37b[118],app:_0xa37b[116],appdata:_0xa37b[119],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[161],priority:_0xa37b[120],app:_0xa37b[116],appdata:_0xa37b[121],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[161],priority:_0xa37b[122],app:_0xa37b[158],appdata:_0xa37b[162],type:_0xa37b[107],interval:_0xa37b[125],isApp:true},{context:_0xa37b[94],exten:_0xa37b[161],priority:_0xa37b[126],app:_0xa37b[116],appdata:_0xa37b[127],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[161],priority:_0xa37b[128],app:_0xa37b[116],appdata:_0xa37b[160],type:_0xa37b[107]}]},{include:[{model:models[_0xa37b[149]],as:_0xa37b[150]}]})[_0xa37b[11]](function(_0xdaecx19){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[100],_0xdaecx19[_0xa37b[101]],_0xdaecx19[_0xa37b[102]]))});models[_0xa37b[149]][_0xa37b[44]]({context:_0xa37b[94],exten:_0xa37b[163],priority:_0xa37b[104],app:_0xa37b[105],appdata:_0xa37b[106],type:_0xa37b[107],description:_0xa37b[152],Applications:[{context:_0xa37b[94],exten:_0xa37b[163],priority:_0xa37b[109],app:_0xa37b[110],appdata:_0xa37b[111],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[163],priority:_0xa37b[112],app:_0xa37b[113],appdata:_0xa37b[114],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[163],priority:_0xa37b[115],app:_0xa37b[116],appdata:_0xa37b[117],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[163],priority:_0xa37b[118],app:_0xa37b[116],appdata:_0xa37b[119],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[163],priority:_0xa37b[120],app:_0xa37b[116],appdata:_0xa37b[121],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[163],priority:_0xa37b[122],app:_0xa37b[158],appdata:_0xa37b[164],type:_0xa37b[107],interval:_0xa37b[125],isApp:true},{context:_0xa37b[94],exten:_0xa37b[163],priority:_0xa37b[126],app:_0xa37b[116],appdata:_0xa37b[127],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[163],priority:_0xa37b[128],app:_0xa37b[116],appdata:_0xa37b[160],type:_0xa37b[107]}]},{include:[{model:models[_0xa37b[149]],as:_0xa37b[150]}]})[_0xa37b[11]](function(_0xdaecx19){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[100],_0xdaecx19[_0xa37b[101]],_0xdaecx19[_0xa37b[102]]))});models[_0xa37b[149]][_0xa37b[44]]({context:_0xa37b[94],exten:_0xa37b[165],priority:_0xa37b[104],app:_0xa37b[105],appdata:_0xa37b[166],type:_0xa37b[167],description:_0xa37b[152],Applications:[{context:_0xa37b[94],exten:_0xa37b[165],priority:_0xa37b[109],app:_0xa37b[110],appdata:_0xa37b[168],type:_0xa37b[167]},{context:_0xa37b[94],exten:_0xa37b[165],priority:_0xa37b[112],app:_0xa37b[110],appdata:_0xa37b[169],type:_0xa37b[167]},{context:_0xa37b[94],exten:_0xa37b[165],priority:_0xa37b[115],app:_0xa37b[113],appdata:_0xa37b[170],type:_0xa37b[167]},{context:_0xa37b[94],exten:_0xa37b[165],priority:_0xa37b[118],app:_0xa37b[116],appdata:_0xa37b[117],type:_0xa37b[167]},{context:_0xa37b[94],exten:_0xa37b[165],priority:_0xa37b[120],app:_0xa37b[116],appdata:_0xa37b[119],type:_0xa37b[167]},{context:_0xa37b[94],exten:_0xa37b[165],priority:_0xa37b[122],app:_0xa37b[116],appdata:_0xa37b[121],type:_0xa37b[167]},{context:_0xa37b[94],exten:_0xa37b[165],priority:_0xa37b[126],app:_0xa37b[171],appdata:_0xa37b[172],type:_0xa37b[167],interval:_0xa37b[125],isApp:true},{context:_0xa37b[94],exten:_0xa37b[165],priority:_0xa37b[128],app:_0xa37b[116],appdata:_0xa37b[127],type:_0xa37b[167]},{context:_0xa37b[94],exten:_0xa37b[165],priority:_0xa37b[130],app:_0xa37b[116],appdata:_0xa37b[173],type:_0xa37b[167]}]},{include:[{model:models[_0xa37b[149]],as:_0xa37b[150]}]})[_0xa37b[11]](function(_0xdaecx19){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[100],_0xdaecx19[_0xa37b[101]],_0xdaecx19[_0xa37b[102]]))});models[_0xa37b[149]][_0xa37b[44]]({context:_0xa37b[94],exten:_0xa37b[174],priority:_0xa37b[104],app:_0xa37b[105],appdata:_0xa37b[106],type:_0xa37b[107],description:_0xa37b[175],Applications:[{context:_0xa37b[94],exten:_0xa37b[174],priority:_0xa37b[109],app:_0xa37b[110],appdata:_0xa37b[111],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[174],priority:_0xa37b[112],app:_0xa37b[113],appdata:_0xa37b[114],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[174],priority:_0xa37b[115],app:_0xa37b[116],appdata:_0xa37b[117],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[174],priority:_0xa37b[118],app:_0xa37b[116],appdata:_0xa37b[119],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[174],priority:_0xa37b[120],app:_0xa37b[153],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[174],priority:_0xa37b[122],app:_0xa37b[154],appdata:_0xa37b[176],type:_0xa37b[107],interval:_0xa37b[125],isApp:true},{context:_0xa37b[94],exten:_0xa37b[174],priority:_0xa37b[126],app:_0xa37b[116],appdata:_0xa37b[127],type:_0xa37b[107]},{context:_0xa37b[94],exten:_0xa37b[174],priority:_0xa37b[128],app:_0xa37b[116],appdata:_0xa37b[156],type:_0xa37b[107]}]},{include:[{model:models[_0xa37b[149]],as:_0xa37b[150]}]})[_0xa37b[11]](function(_0xdaecx19){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[100],_0xdaecx19[_0xa37b[101]],_0xdaecx19[_0xa37b[102]]))});models[_0xa37b[190]][_0xa37b[22]]([{name:_0xa37b[178],description:_0xa37b[179],preproduction:_0xa37b[180],production:_0xa37b[180]},{name:_0xa37b[181],description:_0xa37b[182],preproduction:_0xa37b[183],production:_0xa37b[183]},{name:_0xa37b[184],description:_0xa37b[185],preproduction:_0xa37b[186],production:_0xa37b[186]},{name:_0xa37b[187],description:_0xa37b[188],preproduction:_0xa37b[189],production:_0xa37b[189]}])[_0xa37b[11]](function(_0xdaecx1a){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[177],_[_0xa37b[15]](_0xdaecx1a,_0xa37b[14])[_0xa37b[13]]()))});models[_0xa37b[194]][_0xa37b[44]]({name:_0xa37b[192],dsn:_0xa37b[193]})[_0xa37b[11]](function(_0xdaecx1b){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[191],_0xdaecx1b[_0xa37b[14]]))});var _0xdaecx1c=[{name:_0xa37b[195],version:_0xa37b[196],author:_0xa37b[197],logo:_0xa37b[198],state:_0xa37b[199],description:_0xa37b[200],link:_0xa37b[201]},{name:_0xa37b[202],version:_0xa37b[196],author:_0xa37b[197],logo:_0xa37b[203],state:_0xa37b[204],description:_0xa37b[205],link:_0xa37b[206]},{name:_0xa37b[207],version:_0xa37b[196],author:_0xa37b[197],logo:_0xa37b[208],state:_0xa37b[209],description:_0xa37b[210],link:_0xa37b[211]}];models[_0xa37b[218]][_0xa37b[221]]()[_0xa37b[11]](function(_0xdaecx1d){var _0xdaecx1e=[];_0xdaecx1d= _[_0xa37b[15]](_0xdaecx1d,_0xa37b[215]);_0xdaecx1c[_0xa37b[220]](function(_0xdaecx1f){if(_[_0xa37b[216]](_0xdaecx1d,_0xdaecx1f[_0xa37b[215]])){_0xdaecx1e[_0xa37b[219]](models[_0xa37b[218]][_0xa37b[217]](_0xdaecx1f,{where:{state:_0xdaecx1f[_0xa37b[215]]}}))}else {_0xdaecx1e[_0xa37b[219]](models[_0xa37b[218]][_0xa37b[44]](_0xdaecx1f))}});return _0xdaecx1e})[_0xa37b[214]]()[_0xa37b[11]](function(){console[_0xa37b[8]](_0xa37b[213])})[_0xa37b[6]](function(_0xdaecxc){console[_0xa37b[8]](_0xa37b[212],_0xdaecxc)});models[_0xa37b[237]][_0xa37b[22]]([{name:_0xa37b[223],type:_0xa37b[224],street:_0xa37b[225]},{name:_0xa37b[226],type:_0xa37b[227],street:_0xa37b[228],postalCode:_0xa37b[229],country:_0xa37b[230],city:_0xa37b[231],vat:_0xa37b[232],website:_0xa37b[233],phone:_0xa37b[234],fax:_0xa37b[235],email:_0xa37b[236]}])[_0xa37b[11]](function(_0xdaecx20){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[222],_[_0xa37b[15]](_0xdaecx20,_0xa37b[14])[_0xa37b[13]]()))});models[_0xa37b[376]][_0xa37b[377]]({where:{defaultEntry:true}})[_0xa37b[11]](function(){return models[_0xa37b[376]][_0xa37b[22]]([{name:_0xa37b[239],model:JSON[_0xa37b[347]]({"\x74\x69\x74\x6C\x65":_0xa37b[240],"\x72\x6F\x77\x73":[{"\x63\x6F\x6C\x75\x6D\x6E\x73":[{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[243],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[279],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[280],"\x73\x65\x6C\x65\x63\x74":_0xa37b[281]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[284]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[243],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[285],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[286],"\x73\x65\x6C\x65\x63\x74":_0xa37b[281]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[287]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[243],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[288],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[104],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[289]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[290]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[243],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[291],"\x72\x65\x70\x6F\x72\x74":_0xa37b[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[293],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[294]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[295]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[264],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[296],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[104],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[297]},"\x74\x69\x74\x6C\x65":_0xa37b[298],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[299]}],"\x63\x69\x64":_0xa37b[300]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[262],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[301],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[302],"\x73\x65\x6C\x65\x63\x74":_0xa37b[281]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[303]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[262],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[304],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[305],"\x73\x65\x6C\x65\x63\x74":_0xa37b[281]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[306]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[262],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[307],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[104],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[308]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[309]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[268],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[310],"\x72\x65\x70\x6F\x72\x74":_0xa37b[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[293],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[311]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[312]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[104],"\x63\x6F\x6C\x6F\x72":_0xa37b[264],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[313],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[314]},"\x74\x69\x74\x6C\x65":_0xa37b[315],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[316]}],"\x63\x69\x64":_0xa37b[317]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[243],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[318],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[279],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[319]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[320]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[268],"\x69\x63\x6F\x6E":_0xa37b[273],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[321],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[322],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[104]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[323]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[268],"\x69\x63\x6F\x6E":_0xa37b[273],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[324],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[104],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[325]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[326]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[262],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[327],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[304],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[328]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[329]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[104],"\x63\x6F\x6C\x6F\x72":_0xa37b[264],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[330],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[331]},"\x74\x69\x74\x6C\x65":_0xa37b[332],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[333]}],"\x63\x69\x64":_0xa37b[334]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[262],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[335],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[301],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[336]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[337]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[262],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[281],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[338],"\x72\x65\x70\x6F\x72\x74":_0xa37b[278],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[339]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[340]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[270],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[341],"\x72\x65\x70\x6F\x72\x74":_0xa37b[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[293],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[342]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[343]}],"\x63\x69\x64":_0xa37b[344]}]}],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[345],"\x73\x74\x72\x75\x63\x74\x75\x72\x65":_0xa37b[346]}),defaultEntry:true,editable:true},{name:_0xa37b[348],model:JSON[_0xa37b[347]]({"\x74\x69\x74\x6C\x65":_0xa37b[348],"\x72\x6F\x77\x73":[{"\x63\x6F\x6C\x75\x6D\x6E\x73":[{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[266],"\x69\x63\x6F\x6E":_0xa37b[277],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[281],"\x72\x65\x70\x6F\x72\x74":_0xa37b[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[350],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[351]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[352]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[353],"\x63\x6F\x6C\x6F\x72":_0xa37b[264],"\x69\x63\x6F\x6E":_0xa37b[277],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[281],"\x72\x65\x70\x6F\x72\x74":_0xa37b[349],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[354]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[355]}],"\x63\x69\x64":_0xa37b[300]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[266],"\x69\x63\x6F\x6E":_0xa37b[277],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[356],"\x72\x65\x70\x6F\x72\x74":_0xa37b[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[350],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[357]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[358]},{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[350],"\x63\x6F\x6C\x6F\x72":_0xa37b[268],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[359],"\x72\x65\x70\x6F\x72\x74":_0xa37b[349],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[360]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[361]}],"\x63\x69\x64":_0xa37b[317]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[350],"\x63\x6F\x6C\x6F\x72":_0xa37b[243],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[362],"\x72\x65\x70\x6F\x72\x74":_0xa37b[349],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[363]},"\x74\x69\x74\x6C\x65":_0xa37b[282],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[364]}],"\x63\x69\x64":_0xa37b[334]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[],"\x63\x69\x64":_0xa37b[344]}]}],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[345],"\x73\x74\x72\x75\x63\x74\x75\x72\x65":_0xa37b[346]}),defaultEntry:true,editable:true},{name:_0xa37b[365],model:JSON[_0xa37b[347]]({"\x74\x69\x74\x6C\x65":_0xa37b[365],"\x72\x6F\x77\x73":[{"\x63\x6F\x6C\x75\x6D\x6E\x73":[{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[266],"\x69\x63\x6F\x6E":_0xa37b[277],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[281],"\x72\x65\x70\x6F\x72\x74":_0xa37b[255],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[366],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[367]},"\x74\x69\x74\x6C\x65":_0xa37b[368],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[369]}],"\x63\x69\x64":_0xa37b[300]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[270],"\x69\x63\x6F\x6E":_0xa37b[277],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[281],"\x72\x65\x70\x6F\x72\x74":_0xa37b[255],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[370],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[371]},"\x74\x69\x74\x6C\x65":_0xa37b[368],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[372]}],"\x63\x69\x64":_0xa37b[317]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[{"\x74\x79\x70\x65":_0xa37b[242],"\x63\x6F\x6E\x66\x69\x67":{"\x74\x69\x6D\x65\x6F\x75\x74":5,"\x63\x6F\x6C\x6F\x72":_0xa37b[268],"\x69\x63\x6F\x6E":_0xa37b[244],"\x6C\x69\x6E\x6B":_0xa37b[245],"\x6C\x69\x6E\x6B\x54\x65\x78\x74":_0xa37b[246],"\x72\x65\x70\x6F\x72\x74\x54\x61\x62\x6C\x65\x73":[{"\x6E\x61\x6D\x65":_0xa37b[247],"\x76\x61\x6C\x75\x65":_0xa37b[248]},{"\x6E\x61\x6D\x65":_0xa37b[249],"\x76\x61\x6C\x75\x65":_0xa37b[250]},{"\x6E\x61\x6D\x65":_0xa37b[251],"\x76\x61\x6C\x75\x65":_0xa37b[252]},{"\x6E\x61\x6D\x65":_0xa37b[253],"\x76\x61\x6C\x75\x65":_0xa37b[254]},{"\x6E\x61\x6D\x65":_0xa37b[29],"\x76\x61\x6C\x75\x65":_0xa37b[255]},{"\x6E\x61\x6D\x65":_0xa37b[256],"\x76\x61\x6C\x75\x65":_0xa37b[257]},{"\x6E\x61\x6D\x65":_0xa37b[258],"\x76\x61\x6C\x75\x65":_0xa37b[259]}],"\x63\x6F\x6C\x6F\x72\x73":[{"\x6E\x61\x6D\x65":_0xa37b[260],"\x76\x61\x6C\x75\x65":_0xa37b[243]},{"\x6E\x61\x6D\x65":_0xa37b[261],"\x76\x61\x6C\x75\x65":_0xa37b[262]},{"\x6E\x61\x6D\x65":_0xa37b[263],"\x76\x61\x6C\x75\x65":_0xa37b[264]},{"\x6E\x61\x6D\x65":_0xa37b[265],"\x76\x61\x6C\x75\x65":_0xa37b[266]},{"\x6E\x61\x6D\x65":_0xa37b[267],"\x76\x61\x6C\x75\x65":_0xa37b[268]},{"\x6E\x61\x6D\x65":_0xa37b[269],"\x76\x61\x6C\x75\x65":_0xa37b[270]}],"\x69\x63\x6F\x6E\x73":[{"\x6E\x61\x6D\x65":_0xa37b[271],"\x76\x61\x6C\x75\x65":_0xa37b[244]},{"\x6E\x61\x6D\x65":_0xa37b[272],"\x76\x61\x6C\x75\x65":_0xa37b[273]},{"\x6E\x61\x6D\x65":_0xa37b[274],"\x76\x61\x6C\x75\x65":_0xa37b[275]},{"\x6E\x61\x6D\x65":_0xa37b[276],"\x76\x61\x6C\x75\x65":_0xa37b[277]}],"\x73\x65\x6C\x65\x63\x74":_0xa37b[281],"\x72\x65\x70\x6F\x72\x74":_0xa37b[255],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E":_0xa37b[373],"\x64\x65\x74\x61\x69\x6C\x73":_0xa37b[374]},"\x74\x69\x74\x6C\x65":_0xa37b[368],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[283],"\x77\x69\x64":_0xa37b[375]}],"\x63\x69\x64":_0xa37b[334]},{"\x73\x74\x79\x6C\x65\x43\x6C\x61\x73\x73":_0xa37b[241],"\x77\x69\x64\x67\x65\x74\x73":[],"\x63\x69\x64":_0xa37b[344]}]}],"\x74\x69\x74\x6C\x65\x54\x65\x6D\x70\x6C\x61\x74\x65\x55\x72\x6C":_0xa37b[345],"\x73\x74\x72\x75\x63\x74\x75\x72\x65":_0xa37b[346]}),defaultEntry:true,editable:true}],{ignoreDuplicates:true,individualHooks:true})})[_0xa37b[11]](function(_0xdaecx21){console[_0xa37b[8]](util[_0xa37b[16]](_0xa37b[238],_[_0xa37b[15]](_0xdaecx21,_0xa37b[14])[_0xa37b[13]]()))});models[_0xa37b[149]][_0xa37b[377]]({where:{context:_0xa37b[97]}})[_0xa37b[11]](function(){models[_0xa37b[149]][_0xa37b[22]]([{context:_0xa37b[97],exten:_0xa37b[379],priority:1,app:_0xa37b[105],appdata:_0xa37b[380],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:2,app:_0xa37b[105],appdata:_0xa37b[382],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:3,app:_0xa37b[110],appdata:_0xa37b[383],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:4,app:_0xa37b[384],appdata:_0xa37b[137],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:5,app:_0xa37b[385],appdata:_0xa37b[109],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:6,app:_0xa37b[110],appdata:_0xa37b[386],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:7,app:_0xa37b[110],appdata:_0xa37b[387],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:8,app:_0xa37b[110],appdata:_0xa37b[388],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:9,app:_0xa37b[110],appdata:_0xa37b[389],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:10,app:_0xa37b[110],appdata:_0xa37b[390],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:11,app:_0xa37b[110],appdata:_0xa37b[391],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:12,app:_0xa37b[110],appdata:_0xa37b[392],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:13,app:_0xa37b[110],appdata:_0xa37b[393],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:14,app:_0xa37b[394],appdata:_0xa37b[395],type:_0xa37b[381]},{context:_0xa37b[97],exten:_0xa37b[379],priority:15,app:_0xa37b[396],appdata:_0xa37b[137],type:_0xa37b[381]}],{ignoreDuplicates:true,individualHooks:true})})[_0xa37b[11]](function(){console[_0xa37b[8]](_0xa37b[378])});models[_0xa37b[43]][_0xa37b[221]]({include:[{model:models[_0xa37b[149]],as:_0xa37b[402],where:{app:_0xa37b[171]}}]})[_0xa37b[11]](function(_0xdaecx12){console[_0xa37b[8]](_0xa37b[397]);var _0xdaecx22=[];_[_0xa37b[220]](_0xdaecx12,function(_0xdaecx23){_[_0xa37b[220]](_0xdaecx23.UserExtensions,function(_0xdaecx24){_0xdaecx24[_0xa37b[398]]= _0xa37b[399]+ _0xdaecx23[_0xa37b[14]]+ _0xa37b[400];_0xdaecx22[_0xa37b[219]](_0xdaecx24[_0xa37b[401]]())})});return _0xdaecx22})[_0xa37b[214]]()[_0xa37b[6]](function(_0xdaecxc){console[_0xa37b[8]](_0xdaecxc)});_setting[_0xa37b[217]]({firstSetup:false})};var _0xdaecx25=[{id:1,name:_0xa37b[403],title:_0xa37b[404],ModuleId:null,path:_0xa37b[405]},{id:2,name:_0xa37b[406],title:_0xa37b[407],ModuleId:null,path:_0xa37b[408]},{id:3,name:_0xa37b[409],title:_0xa37b[410],ModuleId:null,path:_0xa37b[411]},{id:4,name:_0xa37b[412],title:_0xa37b[413],ModuleId:3,path:_0xa37b[411]},{id:5,name:_0xa37b[414],title:_0xa37b[415],ModuleId:null,path:_0xa37b[416]},{id:6,name:_0xa37b[417],title:_0xa37b[418],ModuleId:null,path:null},{id:7,name:_0xa37b[419],title:_0xa37b[420],ModuleId:6,path:_0xa37b[421]},{id:8,name:_0xa37b[422],title:_0xa37b[423],ModuleId:6,path:_0xa37b[424]},{id:9,name:_0xa37b[425],title:_0xa37b[426],ModuleId:6,path:_0xa37b[427]},{id:10,name:_0xa37b[428],title:_0xa37b[429],ModuleId:6,path:_0xa37b[430]},{id:11,name:_0xa37b[431],title:_0xa37b[432],ModuleId:6,path:_0xa37b[433]},{id:12,name:_0xa37b[434],title:_0xa37b[435],ModuleId:6,path:_0xa37b[436]},{id:13,name:_0xa37b[437],title:_0xa37b[438],ModuleId:null,path:_0xa37b[439]},{id:14,name:_0xa37b[440],title:_0xa37b[441],ModuleId:null,path:_0xa37b[442]},{id:15,name:_0xa37b[443],title:_0xa37b[444],ModuleId:null,path:_0xa37b[445]},{id:16,name:_0xa37b[446],title:_0xa37b[447],ModuleId:null,path:_0xa37b[448]},{id:17,name:_0xa37b[449],title:_0xa37b[450],ModuleId:null,path:_0xa37b[451]},{id:18,name:_0xa37b[452],title:_0xa37b[453],ModuleId:null,path:_0xa37b[454]},{id:19,name:_0xa37b[455],title:_0xa37b[456],ModuleId:null,path:_0xa37b[457]},{id:20,name:_0xa37b[458],title:_0xa37b[459],ModuleId:6,path:_0xa37b[460]}];models[_0xa37b[463]][_0xa37b[221]]()[_0xa37b[11]](function(_0xdaecx26){var _0xdaecx27=[];_0xdaecx26= _[_0xa37b[15]](_0xdaecx26,_0xa37b[9]);_0xdaecx25[_0xa37b[220]](function(_0xdaecx28){if(_[_0xa37b[216]](_0xdaecx26,_0xdaecx28[_0xa37b[9]])){_0xdaecx27[_0xa37b[219]](models[_0xa37b[463]][_0xa37b[217]](_0xdaecx28,{where:{id:_0xdaecx28[_0xa37b[9]]}}))}else {_0xdaecx27[_0xa37b[219]](models[_0xa37b[463]][_0xa37b[44]](_0xdaecx28))}});return _0xdaecx27})[_0xa37b[214]]()[_0xa37b[11]](function(){console[_0xa37b[8]](_0xa37b[462])})[_0xa37b[6]](function(_0xdaecxc){console[_0xa37b[8]](_0xa37b[461],_0xdaecxc)});var _0xdaecx29=[{"\x69\x64":25,"\x6E\x61\x6D\x65":_0xa37b[464],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[465],"\x70\x61\x72\x65\x6E\x74":_0xa37b[466],"\x74\x61\x62\x6C\x65":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":26,"\x6E\x61\x6D\x65":_0xa37b[468],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[469],"\x70\x61\x72\x65\x6E\x74":_0xa37b[466],"\x74\x61\x62\x6C\x65":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":28,"\x6E\x61\x6D\x65":_0xa37b[464],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[470],"\x70\x61\x72\x65\x6E\x74":_0xa37b[471],"\x74\x61\x62\x6C\x65":_0xa37b[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[472]},{"\x69\x64":29,"\x6E\x61\x6D\x65":_0xa37b[473],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[474],"\x70\x61\x72\x65\x6E\x74":_0xa37b[471],"\x74\x61\x62\x6C\x65":_0xa37b[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[472]},{"\x69\x64":30,"\x6E\x61\x6D\x65":_0xa37b[475],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[476],"\x70\x61\x72\x65\x6E\x74":_0xa37b[471],"\x74\x61\x62\x6C\x65":_0xa37b[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[472]},{"\x69\x64":31,"\x6E\x61\x6D\x65":_0xa37b[477],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[478],"\x70\x61\x72\x65\x6E\x74":_0xa37b[471],"\x74\x61\x62\x6C\x65":_0xa37b[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[472]},{"\x69\x64":32,"\x6E\x61\x6D\x65":_0xa37b[479],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[480],"\x70\x61\x72\x65\x6E\x74":_0xa37b[471],"\x74\x61\x62\x6C\x65":_0xa37b[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[472]},{"\x69\x64":34,"\x6E\x61\x6D\x65":_0xa37b[481],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[482],"\x70\x61\x72\x65\x6E\x74":_0xa37b[471],"\x74\x61\x62\x6C\x65":_0xa37b[292],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[472]},{"\x69\x64":35,"\x6E\x61\x6D\x65":_0xa37b[464],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[483],"\x70\x61\x72\x65\x6E\x74":_0xa37b[484],"\x74\x61\x62\x6C\x65":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[485]},{"\x69\x64":36,"\x6E\x61\x6D\x65":_0xa37b[486],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[487],"\x70\x61\x72\x65\x6E\x74":_0xa37b[484],"\x74\x61\x62\x6C\x65":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[485]},{"\x69\x64":37,"\x6E\x61\x6D\x65":_0xa37b[488],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[489],"\x70\x61\x72\x65\x6E\x74":_0xa37b[484],"\x74\x61\x62\x6C\x65":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[490]},{"\x69\x64":38,"\x6E\x61\x6D\x65":_0xa37b[491],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[492],"\x70\x61\x72\x65\x6E\x74":_0xa37b[484],"\x74\x61\x62\x6C\x65":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[493]},{"\x69\x64":40,"\x6E\x61\x6D\x65":_0xa37b[494],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[495],"\x70\x61\x72\x65\x6E\x74":_0xa37b[496],"\x74\x61\x62\x6C\x65":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":41,"\x6E\x61\x6D\x65":_0xa37b[497],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[498],"\x70\x61\x72\x65\x6E\x74":_0xa37b[496],"\x74\x61\x62\x6C\x65":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":46,"\x6E\x61\x6D\x65":_0xa37b[499],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[500],"\x70\x61\x72\x65\x6E\x74":_0xa37b[496],"\x74\x61\x62\x6C\x65":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":47,"\x6E\x61\x6D\x65":_0xa37b[501],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[502],"\x70\x61\x72\x65\x6E\x74":_0xa37b[496],"\x74\x61\x62\x6C\x65":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":49,"\x6E\x61\x6D\x65":_0xa37b[503],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[504],"\x70\x61\x72\x65\x6E\x74":_0xa37b[466],"\x74\x61\x62\x6C\x65":_0xa37b[278],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":50,"\x6E\x61\x6D\x65":_0xa37b[464],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[505],"\x70\x61\x72\x65\x6E\x74":_0xa37b[506],"\x74\x61\x62\x6C\x65":_0xa37b[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":51,"\x6E\x61\x6D\x65":_0xa37b[507],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[508],"\x70\x61\x72\x65\x6E\x74":_0xa37b[506],"\x74\x61\x62\x6C\x65":_0xa37b[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[509]},{"\x69\x64":52,"\x6E\x61\x6D\x65":_0xa37b[510],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[511],"\x70\x61\x72\x65\x6E\x74":_0xa37b[506],"\x74\x61\x62\x6C\x65":_0xa37b[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":53,"\x6E\x61\x6D\x65":_0xa37b[512],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[513],"\x70\x61\x72\x65\x6E\x74":_0xa37b[506],"\x74\x61\x62\x6C\x65":_0xa37b[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[509]},{"\x69\x64":54,"\x6E\x61\x6D\x65":_0xa37b[514],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[515],"\x70\x61\x72\x65\x6E\x74":_0xa37b[506],"\x74\x61\x62\x6C\x65":_0xa37b[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[509]},{"\x69\x64":55,"\x6E\x61\x6D\x65":_0xa37b[516],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[517],"\x70\x61\x72\x65\x6E\x74":_0xa37b[506],"\x74\x61\x62\x6C\x65":_0xa37b[349],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[509]},{"\x69\x64":57,"\x6E\x61\x6D\x65":_0xa37b[518],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[519],"\x70\x61\x72\x65\x6E\x74":_0xa37b[520],"\x74\x61\x62\x6C\x65":_0xa37b[521],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[522]},{"\x69\x64":61,"\x6E\x61\x6D\x65":_0xa37b[523],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[524],"\x70\x61\x72\x65\x6E\x74":_0xa37b[525],"\x74\x61\x62\x6C\x65":_0xa37b[521],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[526]},{"\x69\x64":62,"\x6E\x61\x6D\x65":_0xa37b[527],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[528],"\x70\x61\x72\x65\x6E\x74":_0xa37b[525],"\x74\x61\x62\x6C\x65":_0xa37b[521],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[529]},{"\x69\x64":63,"\x6E\x61\x6D\x65":_0xa37b[464],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[530],"\x70\x61\x72\x65\x6E\x74":_0xa37b[525],"\x74\x61\x62\x6C\x65":_0xa37b[521],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[526]},{"\x69\x64":64,"\x6E\x61\x6D\x65":_0xa37b[531],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[532],"\x70\x61\x72\x65\x6E\x74":_0xa37b[525],"\x74\x61\x62\x6C\x65":_0xa37b[521],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[533]},{"\x69\x64":65,"\x6E\x61\x6D\x65":_0xa37b[503],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[534],"\x70\x61\x72\x65\x6E\x74":_0xa37b[535],"\x74\x61\x62\x6C\x65":_0xa37b[536],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":67,"\x6E\x61\x6D\x65":_0xa37b[537],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[538],"\x70\x61\x72\x65\x6E\x74":_0xa37b[535],"\x74\x61\x62\x6C\x65":_0xa37b[539],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":68,"\x6E\x61\x6D\x65":_0xa37b[540],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[541],"\x70\x61\x72\x65\x6E\x74":_0xa37b[542],"\x74\x61\x62\x6C\x65":_0xa37b[543],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":69,"\x6E\x61\x6D\x65":_0xa37b[544],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[545],"\x70\x61\x72\x65\x6E\x74":_0xa37b[546],"\x74\x61\x62\x6C\x65":_0xa37b[547],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[548]},{"\x69\x64":70,"\x6E\x61\x6D\x65":_0xa37b[549],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[550],"\x70\x61\x72\x65\x6E\x74":_0xa37b[546],"\x74\x61\x62\x6C\x65":_0xa37b[547],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[551]},{"\x69\x64":72,"\x6E\x61\x6D\x65":_0xa37b[552],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[553],"\x70\x61\x72\x65\x6E\x74":_0xa37b[554],"\x74\x61\x62\x6C\x65":_0xa37b[555],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":73,"\x6E\x61\x6D\x65":_0xa37b[556],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[557],"\x70\x61\x72\x65\x6E\x74":_0xa37b[554],"\x74\x61\x62\x6C\x65":_0xa37b[555],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":74,"\x6E\x61\x6D\x65":_0xa37b[558],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[559],"\x70\x61\x72\x65\x6E\x74":_0xa37b[554],"\x74\x61\x62\x6C\x65":_0xa37b[555],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[560]},{"\x69\x64":75,"\x6E\x61\x6D\x65":_0xa37b[561],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[562],"\x70\x61\x72\x65\x6E\x74":_0xa37b[554],"\x74\x61\x62\x6C\x65":_0xa37b[555],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[563]},{"\x69\x64":76,"\x6E\x61\x6D\x65":_0xa37b[564],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[565],"\x70\x61\x72\x65\x6E\x74":_0xa37b[554],"\x74\x61\x62\x6C\x65":_0xa37b[555],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":77,"\x6E\x61\x6D\x65":_0xa37b[566],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[567],"\x70\x61\x72\x65\x6E\x74":_0xa37b[542],"\x74\x61\x62\x6C\x65":_0xa37b[543],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[563]},{"\x69\x64":79,"\x6E\x61\x6D\x65":_0xa37b[568],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[569],"\x70\x61\x72\x65\x6E\x74":_0xa37b[542],"\x74\x61\x62\x6C\x65":_0xa37b[543],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[570]},{"\x69\x64":81,"\x6E\x61\x6D\x65":_0xa37b[571],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[572],"\x70\x61\x72\x65\x6E\x74":_0xa37b[542],"\x74\x61\x62\x6C\x65":_0xa37b[573],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":82,"\x6E\x61\x6D\x65":_0xa37b[574],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[575],"\x70\x61\x72\x65\x6E\x74":_0xa37b[542],"\x74\x61\x62\x6C\x65":_0xa37b[576],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":83,"\x6E\x61\x6D\x65":_0xa37b[577],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[578],"\x70\x61\x72\x65\x6E\x74":_0xa37b[542],"\x74\x61\x62\x6C\x65":_0xa37b[576],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[579]},{"\x69\x64":84,"\x6E\x61\x6D\x65":_0xa37b[580],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0xa37b[581],"\x70\x61\x72\x65\x6E\x74":_0xa37b[542],"\x74\x61\x62\x6C\x65":_0xa37b[576],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[582]},{"\x69\x64":85,"\x6E\x61\x6D\x65":_0xa37b[464],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xa37b[583],"\x74\x61\x62\x6C\x65":_0xa37b[584],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]},{"\x69\x64":90,"\x6E\x61\x6D\x65":_0xa37b[464],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":null,"\x70\x61\x72\x65\x6E\x74":_0xa37b[585],"\x74\x61\x62\x6C\x65":_0xa37b[586],"\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73":_0xa37b[467]}];var _0xdaecx2a=[{"\x69\x64":10128,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[588],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10129,"\x66\x69\x65\x6C\x64":_0xa37b[589],"\x61\x6C\x69\x61\x73":_0xa37b[590],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10130,"\x66\x69\x65\x6C\x64":_0xa37b[591],"\x61\x6C\x69\x61\x73":_0xa37b[592],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10131,"\x66\x69\x65\x6C\x64":_0xa37b[593],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10132,"\x66\x69\x65\x6C\x64":_0xa37b[594],"\x61\x6C\x69\x61\x73":_0xa37b[595],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10133,"\x66\x69\x65\x6C\x64":_0xa37b[596],"\x61\x6C\x69\x61\x73":_0xa37b[597],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10134,"\x66\x69\x65\x6C\x64":_0xa37b[598],"\x61\x6C\x69\x61\x73":_0xa37b[599],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10135,"\x66\x69\x65\x6C\x64":_0xa37b[600],"\x61\x6C\x69\x61\x73":_0xa37b[601],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10136,"\x66\x69\x65\x6C\x64":_0xa37b[602],"\x61\x6C\x69\x61\x73":_0xa37b[603],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10137,"\x66\x69\x65\x6C\x64":_0xa37b[604],"\x61\x6C\x69\x61\x73":_0xa37b[605],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10138,"\x66\x69\x65\x6C\x64":_0xa37b[606],"\x61\x6C\x69\x61\x73":_0xa37b[607],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10139,"\x66\x69\x65\x6C\x64":_0xa37b[608],"\x61\x6C\x69\x61\x73":_0xa37b[609],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10140,"\x66\x69\x65\x6C\x64":_0xa37b[610],"\x61\x6C\x69\x61\x73":_0xa37b[611],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10141,"\x66\x69\x65\x6C\x64":_0xa37b[102],"\x61\x6C\x69\x61\x73":_0xa37b[612],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10142,"\x66\x69\x65\x6C\x64":_0xa37b[613],"\x61\x6C\x69\x61\x73":_0xa37b[614],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10143,"\x66\x69\x65\x6C\x64":_0xa37b[616],"\x61\x6C\x69\x61\x73":_0xa37b[617],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10144,"\x66\x69\x65\x6C\x64":_0xa37b[618],"\x61\x6C\x69\x61\x73":_0xa37b[619],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":25,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10188,"\x66\x69\x65\x6C\x64":_0xa37b[589],"\x61\x6C\x69\x61\x73":_0xa37b[620],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10189,"\x66\x69\x65\x6C\x64":_0xa37b[593],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10190,"\x66\x69\x65\x6C\x64":_0xa37b[594],"\x61\x6C\x69\x61\x73":_0xa37b[621],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10191,"\x66\x69\x65\x6C\x64":_0xa37b[622],"\x61\x6C\x69\x61\x73":_0xa37b[623],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10192,"\x66\x69\x65\x6C\x64":_0xa37b[624],"\x61\x6C\x69\x61\x73":_0xa37b[625],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10193,"\x66\x69\x65\x6C\x64":_0xa37b[626],"\x61\x6C\x69\x61\x73":_0xa37b[354],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":26,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":20820,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[588],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20821,"\x66\x69\x65\x6C\x64":_0xa37b[589],"\x61\x6C\x69\x61\x73":_0xa37b[590],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20822,"\x66\x69\x65\x6C\x64":_0xa37b[591],"\x61\x6C\x69\x61\x73":_0xa37b[592],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20823,"\x66\x69\x65\x6C\x64":_0xa37b[593],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20824,"\x66\x69\x65\x6C\x64":_0xa37b[627],"\x61\x6C\x69\x61\x73":_0xa37b[628],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20825,"\x66\x69\x65\x6C\x64":_0xa37b[629],"\x61\x6C\x69\x61\x73":_0xa37b[630],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20826,"\x66\x69\x65\x6C\x64":_0xa37b[631],"\x61\x6C\x69\x61\x73":_0xa37b[632],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20827,"\x66\x69\x65\x6C\x64":_0xa37b[633],"\x61\x6C\x69\x61\x73":_0xa37b[634],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20828,"\x66\x69\x65\x6C\x64":_0xa37b[624],"\x61\x6C\x69\x61\x73":_0xa37b[619],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20829,"\x66\x69\x65\x6C\x64":_0xa37b[635],"\x61\x6C\x69\x61\x73":_0xa37b[614],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20830,"\x66\x69\x65\x6C\x64":_0xa37b[636],"\x61\x6C\x69\x61\x73":_0xa37b[637],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20831,"\x66\x69\x65\x6C\x64":_0xa37b[638],"\x61\x6C\x69\x61\x73":_0xa37b[639],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20832,"\x66\x69\x65\x6C\x64":_0xa37b[640],"\x61\x6C\x69\x61\x73":_0xa37b[641],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20833,"\x66\x69\x65\x6C\x64":_0xa37b[642],"\x61\x6C\x69\x61\x73":_0xa37b[643],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20834,"\x66\x69\x65\x6C\x64":_0xa37b[644],"\x61\x6C\x69\x61\x73":_0xa37b[645],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":20835,"\x66\x69\x65\x6C\x64":_0xa37b[102],"\x61\x6C\x69\x61\x73":_0xa37b[612],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":28,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25504,"\x66\x69\x65\x6C\x64":_0xa37b[627],"\x61\x6C\x69\x61\x73":_0xa37b[628],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25505,"\x66\x69\x65\x6C\x64":_0xa37b[640],"\x61\x6C\x69\x61\x73":_0xa37b[646],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25506,"\x66\x69\x65\x6C\x64":_0xa37b[635],"\x61\x6C\x69\x61\x73":_0xa37b[648],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25507,"\x66\x69\x65\x6C\x64":_0xa37b[638],"\x61\x6C\x69\x61\x73":_0xa37b[649],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25508,"\x66\x69\x65\x6C\x64":_0xa37b[650],"\x61\x6C\x69\x61\x73":_0xa37b[651],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25509,"\x66\x69\x65\x6C\x64":_0xa37b[652],"\x61\x6C\x69\x61\x73":_0xa37b[653],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25510,"\x66\x69\x65\x6C\x64":_0xa37b[654],"\x61\x6C\x69\x61\x73":_0xa37b[655],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25511,"\x66\x69\x65\x6C\x64":_0xa37b[656],"\x61\x6C\x69\x61\x73":_0xa37b[657],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":29,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10470,"\x66\x69\x65\x6C\x64":_0xa37b[593],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10471,"\x66\x69\x65\x6C\x64":_0xa37b[640],"\x61\x6C\x69\x61\x73":_0xa37b[646],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10472,"\x66\x69\x65\x6C\x64":_0xa37b[635],"\x61\x6C\x69\x61\x73":_0xa37b[658],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10473,"\x66\x69\x65\x6C\x64":_0xa37b[624],"\x61\x6C\x69\x61\x73":_0xa37b[659],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10474,"\x66\x69\x65\x6C\x64":_0xa37b[638],"\x61\x6C\x69\x61\x73":_0xa37b[660],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10475,"\x66\x69\x65\x6C\x64":_0xa37b[650],"\x61\x6C\x69\x61\x73":_0xa37b[661],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10476,"\x66\x69\x65\x6C\x64":_0xa37b[652],"\x61\x6C\x69\x61\x73":_0xa37b[662],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10477,"\x66\x69\x65\x6C\x64":_0xa37b[663],"\x61\x6C\x69\x61\x73":_0xa37b[664],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10478,"\x66\x69\x65\x6C\x64":_0xa37b[654],"\x61\x6C\x69\x61\x73":_0xa37b[665],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10479,"\x66\x69\x65\x6C\x64":_0xa37b[656],"\x61\x6C\x69\x61\x73":_0xa37b[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":30,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10517,"\x66\x69\x65\x6C\x64":_0xa37b[593],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10518,"\x66\x69\x65\x6C\x64":_0xa37b[640],"\x61\x6C\x69\x61\x73":_0xa37b[667],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10519,"\x66\x69\x65\x6C\x64":_0xa37b[668],"\x61\x6C\x69\x61\x73":_0xa37b[669],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10520,"\x66\x69\x65\x6C\x64":_0xa37b[670],"\x61\x6C\x69\x61\x73":_0xa37b[671],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10521,"\x66\x69\x65\x6C\x64":_0xa37b[672],"\x61\x6C\x69\x61\x73":_0xa37b[673],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10522,"\x66\x69\x65\x6C\x64":_0xa37b[674],"\x61\x6C\x69\x61\x73":_0xa37b[675],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10523,"\x66\x69\x65\x6C\x64":_0xa37b[676],"\x61\x6C\x69\x61\x73":_0xa37b[677],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10524,"\x66\x69\x65\x6C\x64":_0xa37b[678],"\x61\x6C\x69\x61\x73":_0xa37b[679],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10525,"\x66\x69\x65\x6C\x64":_0xa37b[680],"\x61\x6C\x69\x61\x73":_0xa37b[681],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10526,"\x66\x69\x65\x6C\x64":_0xa37b[682],"\x61\x6C\x69\x61\x73":_0xa37b[683],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":31,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10765,"\x66\x69\x65\x6C\x64":_0xa37b[642],"\x61\x6C\x69\x61\x73":_0xa37b[684],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10766,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[249],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[685],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":32,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10813,"\x66\x69\x65\x6C\x64":_0xa37b[631],"\x61\x6C\x69\x61\x73":_0xa37b[686],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[687],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10814,"\x66\x69\x65\x6C\x64":_0xa37b[640],"\x61\x6C\x69\x61\x73":_0xa37b[667],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10815,"\x66\x69\x65\x6C\x64":_0xa37b[668],"\x61\x6C\x69\x61\x73":_0xa37b[669],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10816,"\x66\x69\x65\x6C\x64":_0xa37b[672],"\x61\x6C\x69\x61\x73":_0xa37b[673],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10817,"\x66\x69\x65\x6C\x64":_0xa37b[676],"\x61\x6C\x69\x61\x73":_0xa37b[677],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10818,"\x66\x69\x65\x6C\x64":_0xa37b[680],"\x61\x6C\x69\x61\x73":_0xa37b[681],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":34,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10905,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[588],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10906,"\x66\x69\x65\x6C\x64":_0xa37b[589],"\x61\x6C\x69\x61\x73":_0xa37b[590],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10907,"\x66\x69\x65\x6C\x64":_0xa37b[593],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10908,"\x66\x69\x65\x6C\x64":_0xa37b[594],"\x61\x6C\x69\x61\x73":_0xa37b[688],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10909,"\x66\x69\x65\x6C\x64":_0xa37b[596],"\x61\x6C\x69\x61\x73":_0xa37b[689],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10910,"\x66\x69\x65\x6C\x64":_0xa37b[598],"\x61\x6C\x69\x61\x73":_0xa37b[690],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10911,"\x66\x69\x65\x6C\x64":_0xa37b[600],"\x61\x6C\x69\x61\x73":_0xa37b[691],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10912,"\x66\x69\x65\x6C\x64":_0xa37b[606],"\x61\x6C\x69\x61\x73":_0xa37b[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10913,"\x66\x69\x65\x6C\x64":_0xa37b[608],"\x61\x6C\x69\x61\x73":_0xa37b[692],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10914,"\x66\x69\x65\x6C\x64":_0xa37b[610],"\x61\x6C\x69\x61\x73":_0xa37b[693],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10915,"\x66\x69\x65\x6C\x64":_0xa37b[694],"\x61\x6C\x69\x61\x73":_0xa37b[695],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10916,"\x66\x69\x65\x6C\x64":_0xa37b[102],"\x61\x6C\x69\x61\x73":_0xa37b[612],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10917,"\x66\x69\x65\x6C\x64":_0xa37b[616],"\x61\x6C\x69\x61\x73":_0xa37b[696],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10918,"\x66\x69\x65\x6C\x64":_0xa37b[697],"\x61\x6C\x69\x61\x73":_0xa37b[698],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":35,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10947,"\x66\x69\x65\x6C\x64":_0xa37b[593],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10948,"\x66\x69\x65\x6C\x64":_0xa37b[598],"\x61\x6C\x69\x61\x73":_0xa37b[699],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10949,"\x66\x69\x65\x6C\x64":_0xa37b[606],"\x61\x6C\x69\x61\x73":_0xa37b[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10950,"\x66\x69\x65\x6C\x64":_0xa37b[616],"\x61\x6C\x69\x61\x73":_0xa37b[700],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10951,"\x66\x69\x65\x6C\x64":_0xa37b[701],"\x61\x6C\x69\x61\x73":_0xa37b[702],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10952,"\x66\x69\x65\x6C\x64":_0xa37b[697],"\x61\x6C\x69\x61\x73":_0xa37b[703],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10953,"\x66\x69\x65\x6C\x64":_0xa37b[704],"\x61\x6C\x69\x61\x73":_0xa37b[705],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":36,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10957,"\x66\x69\x65\x6C\x64":_0xa37b[610],"\x61\x6C\x69\x61\x73":_0xa37b[684],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10958,"\x66\x69\x65\x6C\x64":_0xa37b[606],"\x61\x6C\x69\x61\x73":_0xa37b[249],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10959,"\x66\x69\x65\x6C\x64":_0xa37b[697],"\x61\x6C\x69\x61\x73":_0xa37b[703],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":37,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10983,"\x66\x69\x65\x6C\x64":_0xa37b[593],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10984,"\x66\x69\x65\x6C\x64":_0xa37b[598],"\x61\x6C\x69\x61\x73":_0xa37b[706],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":10985,"\x66\x69\x65\x6C\x64":_0xa37b[707],"\x61\x6C\x69\x61\x73":_0xa37b[708],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10986,"\x66\x69\x65\x6C\x64":_0xa37b[709],"\x61\x6C\x69\x61\x73":_0xa37b[710],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10987,"\x66\x69\x65\x6C\x64":_0xa37b[711],"\x61\x6C\x69\x61\x73":_0xa37b[712],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10988,"\x66\x69\x65\x6C\x64":_0xa37b[713],"\x61\x6C\x69\x61\x73":_0xa37b[714],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10989,"\x66\x69\x65\x6C\x64":_0xa37b[715],"\x61\x6C\x69\x61\x73":_0xa37b[716],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10990,"\x66\x69\x65\x6C\x64":_0xa37b[717],"\x61\x6C\x69\x61\x73":_0xa37b[718],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10991,"\x66\x69\x65\x6C\x64":_0xa37b[719],"\x61\x6C\x69\x61\x73":_0xa37b[720],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":10992,"\x66\x69\x65\x6C\x64":_0xa37b[721],"\x61\x6C\x69\x61\x73":_0xa37b[722],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":38,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11892,"\x66\x69\x65\x6C\x64":_0xa37b[723],"\x61\x6C\x69\x61\x73":_0xa37b[724],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[725],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11893,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[726],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[727],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":11894,"\x66\x69\x65\x6C\x64":_0xa37b[602],"\x61\x6C\x69\x61\x73":_0xa37b[646],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":11895,"\x66\x69\x65\x6C\x64":_0xa37b[598],"\x61\x6C\x69\x61\x73":_0xa37b[699],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11896,"\x66\x69\x65\x6C\x64":_0xa37b[606],"\x61\x6C\x69\x61\x73":_0xa37b[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11897,"\x66\x69\x65\x6C\x64":_0xa37b[613],"\x61\x6C\x69\x61\x73":_0xa37b[658],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11898,"\x66\x69\x65\x6C\x64":_0xa37b[728],"\x61\x6C\x69\x61\x73":_0xa37b[653],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11899,"\x66\x69\x65\x6C\x64":_0xa37b[701],"\x61\x6C\x69\x61\x73":_0xa37b[702],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":40,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11629,"\x66\x69\x65\x6C\x64":_0xa37b[723],"\x61\x6C\x69\x61\x73":_0xa37b[686],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[687],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11630,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[726],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[727],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":11631,"\x66\x69\x65\x6C\x64":_0xa37b[602],"\x61\x6C\x69\x61\x73":_0xa37b[354],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":11632,"\x66\x69\x65\x6C\x64":_0xa37b[729],"\x61\x6C\x69\x61\x73":_0xa37b[730],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11633,"\x66\x69\x65\x6C\x64":_0xa37b[598],"\x61\x6C\x69\x61\x73":_0xa37b[699],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":11634,"\x66\x69\x65\x6C\x64":_0xa37b[606],"\x61\x6C\x69\x61\x73":_0xa37b[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":11635,"\x66\x69\x65\x6C\x64":_0xa37b[613],"\x61\x6C\x69\x61\x73":_0xa37b[658],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11636,"\x66\x69\x65\x6C\x64":_0xa37b[728],"\x61\x6C\x69\x61\x73":_0xa37b[653],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11637,"\x66\x69\x65\x6C\x64":_0xa37b[701],"\x61\x6C\x69\x61\x73":_0xa37b[702],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":41,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11927,"\x66\x69\x65\x6C\x64":_0xa37b[731],"\x61\x6C\x69\x61\x73":_0xa37b[732],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11928,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[726],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[727],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":11929,"\x66\x69\x65\x6C\x64":_0xa37b[602],"\x61\x6C\x69\x61\x73":_0xa37b[354],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":11930,"\x66\x69\x65\x6C\x64":_0xa37b[729],"\x61\x6C\x69\x61\x73":_0xa37b[730],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11931,"\x66\x69\x65\x6C\x64":_0xa37b[598],"\x61\x6C\x69\x61\x73":_0xa37b[699],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":11932,"\x66\x69\x65\x6C\x64":_0xa37b[606],"\x61\x6C\x69\x61\x73":_0xa37b[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":11933,"\x66\x69\x65\x6C\x64":_0xa37b[613],"\x61\x6C\x69\x61\x73":_0xa37b[658],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11934,"\x66\x69\x65\x6C\x64":_0xa37b[728],"\x61\x6C\x69\x61\x73":_0xa37b[653],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11935,"\x66\x69\x65\x6C\x64":_0xa37b[701],"\x61\x6C\x69\x61\x73":_0xa37b[702],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":46,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25365,"\x66\x69\x65\x6C\x64":_0xa37b[733],"\x61\x6C\x69\x61\x73":_0xa37b[734],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25366,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[726],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[727],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25367,"\x66\x69\x65\x6C\x64":_0xa37b[602],"\x61\x6C\x69\x61\x73":_0xa37b[354],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25368,"\x66\x69\x65\x6C\x64":_0xa37b[729],"\x61\x6C\x69\x61\x73":_0xa37b[730],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25369,"\x66\x69\x65\x6C\x64":_0xa37b[598],"\x61\x6C\x69\x61\x73":_0xa37b[699],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":_0xa37b[735],"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25370,"\x66\x69\x65\x6C\x64":_0xa37b[606],"\x61\x6C\x69\x61\x73":_0xa37b[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25371,"\x66\x69\x65\x6C\x64":_0xa37b[613],"\x61\x6C\x69\x61\x73":_0xa37b[658],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25372,"\x66\x69\x65\x6C\x64":_0xa37b[728],"\x61\x6C\x69\x61\x73":_0xa37b[653],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25373,"\x66\x69\x65\x6C\x64":_0xa37b[701],"\x61\x6C\x69\x61\x73":_0xa37b[702],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":47,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":11999,"\x66\x69\x65\x6C\x64":_0xa37b[593],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":12000,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[726],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[727],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":12001,"\x66\x69\x65\x6C\x64":_0xa37b[602],"\x61\x6C\x69\x61\x73":_0xa37b[354],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":12002,"\x66\x69\x65\x6C\x64":_0xa37b[729],"\x61\x6C\x69\x61\x73":_0xa37b[730],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":12003,"\x66\x69\x65\x6C\x64":_0xa37b[598],"\x61\x6C\x69\x61\x73":_0xa37b[699],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":12004,"\x66\x69\x65\x6C\x64":_0xa37b[606],"\x61\x6C\x69\x61\x73":_0xa37b[339],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":12005,"\x66\x69\x65\x6C\x64":_0xa37b[613],"\x61\x6C\x69\x61\x73":_0xa37b[658],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":12006,"\x66\x69\x65\x6C\x64":_0xa37b[728],"\x61\x6C\x69\x61\x73":_0xa37b[653],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":12007,"\x66\x69\x65\x6C\x64":_0xa37b[701],"\x61\x6C\x69\x61\x73":_0xa37b[702],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":49,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15136,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[736],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15137,"\x66\x69\x65\x6C\x64":_0xa37b[737],"\x61\x6C\x69\x61\x73":_0xa37b[738],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15138,"\x66\x69\x65\x6C\x64":_0xa37b[739],"\x61\x6C\x69\x61\x73":_0xa37b[740],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15139,"\x66\x69\x65\x6C\x64":_0xa37b[741],"\x61\x6C\x69\x61\x73":_0xa37b[742],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15140,"\x66\x69\x65\x6C\x64":_0xa37b[743],"\x61\x6C\x69\x61\x73":_0xa37b[744],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15141,"\x66\x69\x65\x6C\x64":_0xa37b[745],"\x61\x6C\x69\x61\x73":_0xa37b[620],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15142,"\x66\x69\x65\x6C\x64":_0xa37b[746],"\x61\x6C\x69\x61\x73":_0xa37b[747],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15143,"\x66\x69\x65\x6C\x64":_0xa37b[748],"\x61\x6C\x69\x61\x73":_0xa37b[749],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15144,"\x66\x69\x65\x6C\x64":_0xa37b[750],"\x61\x6C\x69\x61\x73":_0xa37b[751],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15145,"\x66\x69\x65\x6C\x64":_0xa37b[752],"\x61\x6C\x69\x61\x73":_0xa37b[621],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15146,"\x66\x69\x65\x6C\x64":_0xa37b[753],"\x61\x6C\x69\x61\x73":_0xa37b[619],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15147,"\x66\x69\x65\x6C\x64":_0xa37b[754],"\x61\x6C\x69\x61\x73":_0xa37b[623],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15148,"\x66\x69\x65\x6C\x64":_0xa37b[755],"\x61\x6C\x69\x61\x73":_0xa37b[756],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15149,"\x66\x69\x65\x6C\x64":_0xa37b[757],"\x61\x6C\x69\x61\x73":_0xa37b[758],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":50,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15210,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[736],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15211,"\x66\x69\x65\x6C\x64":_0xa37b[759],"\x61\x6C\x69\x61\x73":_0xa37b[760],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15212,"\x66\x69\x65\x6C\x64":_0xa37b[741],"\x61\x6C\x69\x61\x73":_0xa37b[742],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15213,"\x66\x69\x65\x6C\x64":_0xa37b[743],"\x61\x6C\x69\x61\x73":_0xa37b[744],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15214,"\x66\x69\x65\x6C\x64":_0xa37b[745],"\x61\x6C\x69\x61\x73":_0xa37b[761],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15215,"\x66\x69\x65\x6C\x64":_0xa37b[752],"\x61\x6C\x69\x61\x73":_0xa37b[621],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15216,"\x66\x69\x65\x6C\x64":_0xa37b[753],"\x61\x6C\x69\x61\x73":_0xa37b[619],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15217,"\x66\x69\x65\x6C\x64":_0xa37b[754],"\x61\x6C\x69\x61\x73":_0xa37b[623],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15218,"\x66\x69\x65\x6C\x64":_0xa37b[755],"\x61\x6C\x69\x61\x73":_0xa37b[756],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15219,"\x66\x69\x65\x6C\x64":_0xa37b[762],"\x61\x6C\x69\x61\x73":_0xa37b[763],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15220,"\x66\x69\x65\x6C\x64":_0xa37b[757],"\x61\x6C\x69\x61\x73":_0xa37b[758],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15221,"\x66\x69\x65\x6C\x64":_0xa37b[739],"\x61\x6C\x69\x61\x73":_0xa37b[740],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":51,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15234,"\x66\x69\x65\x6C\x64":_0xa37b[737],"\x61\x6C\x69\x61\x73":_0xa37b[738],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":52,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15235,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[249],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[685],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":52,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15236,"\x66\x69\x65\x6C\x64":_0xa37b[755],"\x61\x6C\x69\x61\x73":_0xa37b[764],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":52,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15237,"\x66\x69\x65\x6C\x64":_0xa37b[765],"\x61\x6C\x69\x61\x73":_0xa37b[363],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":52,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15242,"\x66\x69\x65\x6C\x64":_0xa37b[757],"\x61\x6C\x69\x61\x73":_0xa37b[758],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":53,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15243,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[249],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[685],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":53,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15244,"\x66\x69\x65\x6C\x64":_0xa37b[755],"\x61\x6C\x69\x61\x73":_0xa37b[764],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":53,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15245,"\x66\x69\x65\x6C\x64":_0xa37b[765],"\x61\x6C\x69\x61\x73":_0xa37b[363],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":53,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15262,"\x66\x69\x65\x6C\x64":_0xa37b[766],"\x61\x6C\x69\x61\x73":_0xa37b[628],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":54,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15263,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[249],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[685],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":54,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15264,"\x66\x69\x65\x6C\x64":_0xa37b[755],"\x61\x6C\x69\x61\x73":_0xa37b[764],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":54,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15265,"\x66\x69\x65\x6C\x64":_0xa37b[765],"\x61\x6C\x69\x61\x73":_0xa37b[363],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":54,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15274,"\x66\x69\x65\x6C\x64":_0xa37b[752],"\x61\x6C\x69\x61\x73":_0xa37b[724],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[725],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":55,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15275,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[249],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[685],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":55,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15276,"\x66\x69\x65\x6C\x64":_0xa37b[755],"\x61\x6C\x69\x61\x73":_0xa37b[764],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":55,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15277,"\x66\x69\x65\x6C\x64":_0xa37b[765],"\x61\x6C\x69\x61\x73":_0xa37b[363],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":55,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15303,"\x66\x69\x65\x6C\x64":_0xa37b[627],"\x61\x6C\x69\x61\x73":_0xa37b[628],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0xa37b[735],"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":57,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15304,"\x66\x69\x65\x6C\x64":_0xa37b[767],"\x61\x6C\x69\x61\x73":_0xa37b[756],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":57,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15374,"\x66\x69\x65\x6C\x64":_0xa37b[627],"\x61\x6C\x69\x61\x73":_0xa37b[628],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":61,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15375,"\x66\x69\x65\x6C\x64":_0xa37b[768],"\x61\x6C\x69\x61\x73":_0xa37b[518],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":61,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15376,"\x66\x69\x65\x6C\x64":_0xa37b[769],"\x61\x6C\x69\x61\x73":_0xa37b[770],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":61,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15377,"\x66\x69\x65\x6C\x64":_0xa37b[771],"\x61\x6C\x69\x61\x73":_0xa37b[531],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":61,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15378,"\x66\x69\x65\x6C\x64":_0xa37b[627],"\x61\x6C\x69\x61\x73":_0xa37b[628],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":62,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15379,"\x66\x69\x65\x6C\x64":_0xa37b[772],"\x61\x6C\x69\x61\x73":_0xa37b[773],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":62,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15380,"\x66\x69\x65\x6C\x64":_0xa37b[774],"\x61\x6C\x69\x61\x73":_0xa37b[775],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":62,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15381,"\x66\x69\x65\x6C\x64":_0xa37b[776],"\x61\x6C\x69\x61\x73":_0xa37b[85],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":62,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15382,"\x66\x69\x65\x6C\x64":_0xa37b[755],"\x61\x6C\x69\x61\x73":_0xa37b[756],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":62,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15383,"\x66\x69\x65\x6C\x64":_0xa37b[627],"\x61\x6C\x69\x61\x73":_0xa37b[628],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15384,"\x66\x69\x65\x6C\x64":_0xa37b[777],"\x61\x6C\x69\x61\x73":_0xa37b[778],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15385,"\x66\x69\x65\x6C\x64":_0xa37b[737],"\x61\x6C\x69\x61\x73":_0xa37b[779],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15386,"\x66\x69\x65\x6C\x64":_0xa37b[776],"\x61\x6C\x69\x61\x73":_0xa37b[738],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15387,"\x66\x69\x65\x6C\x64":_0xa37b[772],"\x61\x6C\x69\x61\x73":_0xa37b[773],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15388,"\x66\x69\x65\x6C\x64":_0xa37b[774],"\x61\x6C\x69\x61\x73":_0xa37b[775],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15389,"\x66\x69\x65\x6C\x64":_0xa37b[780],"\x61\x6C\x69\x61\x73":_0xa37b[756],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":63,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15390,"\x66\x69\x65\x6C\x64":_0xa37b[627],"\x61\x6C\x69\x61\x73":_0xa37b[628],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0xa37b[735],"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":64,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15391,"\x66\x69\x65\x6C\x64":_0xa37b[776],"\x61\x6C\x69\x61\x73":_0xa37b[781],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":_0xa37b[735],"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":64,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15392,"\x66\x69\x65\x6C\x64":_0xa37b[767],"\x61\x6C\x69\x61\x73":_0xa37b[756],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":64,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25439,"\x66\x69\x65\x6C\x64":_0xa37b[782],"\x61\x6C\x69\x61\x73":_0xa37b[783],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25440,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[588],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25441,"\x66\x69\x65\x6C\x64":_0xa37b[745],"\x61\x6C\x69\x61\x73":_0xa37b[761],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25442,"\x66\x69\x65\x6C\x64":_0xa37b[784],"\x61\x6C\x69\x61\x73":_0xa37b[612],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25443,"\x66\x69\x65\x6C\x64":_0xa37b[785],"\x61\x6C\x69\x61\x73":_0xa37b[786],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":_0xa37b[735],"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25444,"\x66\x69\x65\x6C\x64":_0xa37b[787],"\x61\x6C\x69\x61\x73":_0xa37b[788],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25445,"\x66\x69\x65\x6C\x64":_0xa37b[789],"\x61\x6C\x69\x61\x73":_0xa37b[756],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":65,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15441,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[790],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":67,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15442,"\x66\x69\x65\x6C\x64":_0xa37b[782],"\x61\x6C\x69\x61\x73":_0xa37b[783],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":67,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15443,"\x66\x69\x65\x6C\x64":_0xa37b[745],"\x61\x6C\x69\x61\x73":_0xa37b[791],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":67,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15444,"\x66\x69\x65\x6C\x64":_0xa37b[792],"\x61\x6C\x69\x61\x73":_0xa37b[793],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":67,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15445,"\x66\x69\x65\x6C\x64":_0xa37b[794],"\x61\x6C\x69\x61\x73":_0xa37b[795],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":67,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15998,"\x66\x69\x65\x6C\x64":_0xa37b[796],"\x61\x6C\x69\x61\x73":_0xa37b[797],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15999,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[798],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[727],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":16000,"\x66\x69\x65\x6C\x64":_0xa37b[799],"\x61\x6C\x69\x61\x73":_0xa37b[800],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":16001,"\x66\x69\x65\x6C\x64":_0xa37b[801],"\x61\x6C\x69\x61\x73":_0xa37b[802],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":16002,"\x66\x69\x65\x6C\x64":_0xa37b[803],"\x61\x6C\x69\x61\x73":_0xa37b[804],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":16003,"\x66\x69\x65\x6C\x64":_0xa37b[805],"\x61\x6C\x69\x61\x73":_0xa37b[806],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":16004,"\x66\x69\x65\x6C\x64":_0xa37b[807],"\x61\x6C\x69\x61\x73":_0xa37b[808],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":68,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15458,"\x66\x69\x65\x6C\x64":_0xa37b[809],"\x61\x6C\x69\x61\x73":_0xa37b[628],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":69,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15459,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[810],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[685],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":69,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15460,"\x66\x69\x65\x6C\x64":_0xa37b[811],"\x61\x6C\x69\x61\x73":_0xa37b[812],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":69,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15461,"\x66\x69\x65\x6C\x64":_0xa37b[811],"\x61\x6C\x69\x61\x73":_0xa37b[813],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[814],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":69,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25446,"\x66\x69\x65\x6C\x64":_0xa37b[593],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":70,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25447,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[815],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[685],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":70,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25448,"\x66\x69\x65\x6C\x64":_0xa37b[811],"\x61\x6C\x69\x61\x73":_0xa37b[812],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":70,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25449,"\x66\x69\x65\x6C\x64":_0xa37b[811],"\x61\x6C\x69\x61\x73":_0xa37b[813],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[814],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":70,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25463,"\x66\x69\x65\x6C\x64":_0xa37b[816],"\x61\x6C\x69\x61\x73":_0xa37b[817],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25464,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[818],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[727],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25465,"\x66\x69\x65\x6C\x64":_0xa37b[819],"\x61\x6C\x69\x61\x73":_0xa37b[646],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25466,"\x66\x69\x65\x6C\x64":_0xa37b[820],"\x61\x6C\x69\x61\x73":_0xa37b[699],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25467,"\x66\x69\x65\x6C\x64":_0xa37b[821],"\x61\x6C\x69\x61\x73":_0xa37b[822],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25468,"\x66\x69\x65\x6C\x64":_0xa37b[823],"\x61\x6C\x69\x61\x73":_0xa37b[824],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25469,"\x66\x69\x65\x6C\x64":_0xa37b[825],"\x61\x6C\x69\x61\x73":_0xa37b[826],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":72,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25470,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[588],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25471,"\x66\x69\x65\x6C\x64":_0xa37b[816],"\x61\x6C\x69\x61\x73":_0xa37b[827],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25472,"\x66\x69\x65\x6C\x64":_0xa37b[828],"\x61\x6C\x69\x61\x73":_0xa37b[829],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25473,"\x66\x69\x65\x6C\x64":_0xa37b[830],"\x61\x6C\x69\x61\x73":_0xa37b[831],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25474,"\x66\x69\x65\x6C\x64":_0xa37b[627],"\x61\x6C\x69\x61\x73":_0xa37b[832],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25475,"\x66\x69\x65\x6C\x64":_0xa37b[833],"\x61\x6C\x69\x61\x73":_0xa37b[834],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25476,"\x66\x69\x65\x6C\x64":_0xa37b[785],"\x61\x6C\x69\x61\x73":_0xa37b[688],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25477,"\x66\x69\x65\x6C\x64":_0xa37b[787],"\x61\x6C\x69\x61\x73":_0xa37b[689],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25478,"\x66\x69\x65\x6C\x64":_0xa37b[835],"\x61\x6C\x69\x61\x73":_0xa37b[605],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25479,"\x66\x69\x65\x6C\x64":_0xa37b[819],"\x61\x6C\x69\x61\x73":_0xa37b[646],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25480,"\x66\x69\x65\x6C\x64":_0xa37b[836],"\x61\x6C\x69\x61\x73":_0xa37b[837],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25481,"\x66\x69\x65\x6C\x64":_0xa37b[820],"\x61\x6C\x69\x61\x73":_0xa37b[699],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25482,"\x66\x69\x65\x6C\x64":_0xa37b[821],"\x61\x6C\x69\x61\x73":_0xa37b[822],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":73,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25483,"\x66\x69\x65\x6C\x64":_0xa37b[627],"\x61\x6C\x69\x61\x73":_0xa37b[628],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25484,"\x66\x69\x65\x6C\x64":_0xa37b[819],"\x61\x6C\x69\x61\x73":_0xa37b[838],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25485,"\x66\x69\x65\x6C\x64":_0xa37b[823],"\x61\x6C\x69\x61\x73":_0xa37b[824],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25486,"\x66\x69\x65\x6C\x64":_0xa37b[825],"\x61\x6C\x69\x61\x73":_0xa37b[826],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25487,"\x66\x69\x65\x6C\x64":_0xa37b[839],"\x61\x6C\x69\x61\x73":_0xa37b[840],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25488,"\x66\x69\x65\x6C\x64":_0xa37b[841],"\x61\x6C\x69\x61\x73":_0xa37b[842],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":74,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25489,"\x66\x69\x65\x6C\x64":_0xa37b[833],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25490,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[818],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[685],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25491,"\x66\x69\x65\x6C\x64":_0xa37b[819],"\x61\x6C\x69\x61\x73":_0xa37b[646],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25492,"\x66\x69\x65\x6C\x64":_0xa37b[820],"\x61\x6C\x69\x61\x73":_0xa37b[699],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25493,"\x66\x69\x65\x6C\x64":_0xa37b[821],"\x61\x6C\x69\x61\x73":_0xa37b[822],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25494,"\x66\x69\x65\x6C\x64":_0xa37b[823],"\x61\x6C\x69\x61\x73":_0xa37b[843],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25495,"\x66\x69\x65\x6C\x64":_0xa37b[825],"\x61\x6C\x69\x61\x73":_0xa37b[826],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":75,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15623,"\x66\x69\x65\x6C\x64":_0xa37b[785],"\x61\x6C\x69\x61\x73":_0xa37b[724],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[725],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15624,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[818],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[727],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15625,"\x66\x69\x65\x6C\x64":_0xa37b[819],"\x61\x6C\x69\x61\x73":_0xa37b[646],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15626,"\x66\x69\x65\x6C\x64":_0xa37b[844],"\x61\x6C\x69\x61\x73":_0xa37b[845],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15627,"\x66\x69\x65\x6C\x64":_0xa37b[823],"\x61\x6C\x69\x61\x73":_0xa37b[824],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15628,"\x66\x69\x65\x6C\x64":_0xa37b[825],"\x61\x6C\x69\x61\x73":_0xa37b[826],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":76,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15953,"\x66\x69\x65\x6C\x64":_0xa37b[833],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15954,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[798],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[685],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15955,"\x66\x69\x65\x6C\x64":_0xa37b[846],"\x61\x6C\x69\x61\x73":_0xa37b[800],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15956,"\x66\x69\x65\x6C\x64":_0xa37b[821],"\x61\x6C\x69\x61\x73":_0xa37b[822],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":15957,"\x66\x69\x65\x6C\x64":_0xa37b[847],"\x61\x6C\x69\x61\x73":_0xa37b[802],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":15958,"\x66\x69\x65\x6C\x64":_0xa37b[848],"\x61\x6C\x69\x61\x73":_0xa37b[849],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":77,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":16310,"\x66\x69\x65\x6C\x64":_0xa37b[627],"\x61\x6C\x69\x61\x73":_0xa37b[627],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":79,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":16311,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[850],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[685],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":79,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":16312,"\x66\x69\x65\x6C\x64":_0xa37b[851],"\x61\x6C\x69\x61\x73":_0xa37b[852],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":79,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":16313,"\x66\x69\x65\x6C\x64":_0xa37b[853],"\x61\x6C\x69\x61\x73":_0xa37b[628],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":79,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":16314,"\x66\x69\x65\x6C\x64":_0xa37b[854],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":79,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":16302,"\x66\x69\x65\x6C\x64":_0xa37b[855],"\x61\x6C\x69\x61\x73":_0xa37b[724],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[725],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":81,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":16303,"\x66\x69\x65\x6C\x64":_0xa37b[856],"\x61\x6C\x69\x61\x73":_0xa37b[798],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":81,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":16304,"\x66\x69\x65\x6C\x64":_0xa37b[857],"\x61\x6C\x69\x61\x73":_0xa37b[858],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[647],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":81,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":17281,"\x66\x69\x65\x6C\x64":_0xa37b[9],"\x61\x6C\x69\x61\x73":_0xa37b[9],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17282,"\x66\x69\x65\x6C\x64":_0xa37b[859],"\x61\x6C\x69\x61\x73":_0xa37b[859],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17283,"\x66\x69\x65\x6C\x64":_0xa37b[860],"\x61\x6C\x69\x61\x73":_0xa37b[860],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17284,"\x66\x69\x65\x6C\x64":_0xa37b[861],"\x61\x6C\x69\x61\x73":_0xa37b[861],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17285,"\x66\x69\x65\x6C\x64":_0xa37b[855],"\x61\x6C\x69\x61\x73":_0xa37b[855],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17286,"\x66\x69\x65\x6C\x64":_0xa37b[862],"\x61\x6C\x69\x61\x73":_0xa37b[862],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17287,"\x66\x69\x65\x6C\x64":_0xa37b[863],"\x61\x6C\x69\x61\x73":_0xa37b[863],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17288,"\x66\x69\x65\x6C\x64":_0xa37b[864],"\x61\x6C\x69\x61\x73":_0xa37b[864],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17289,"\x66\x69\x65\x6C\x64":_0xa37b[865],"\x61\x6C\x69\x61\x73":_0xa37b[865],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17290,"\x66\x69\x65\x6C\x64":_0xa37b[866],"\x61\x6C\x69\x61\x73":_0xa37b[866],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17291,"\x66\x69\x65\x6C\x64":_0xa37b[867],"\x61\x6C\x69\x61\x73":_0xa37b[867],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17292,"\x66\x69\x65\x6C\x64":_0xa37b[757],"\x61\x6C\x69\x61\x73":_0xa37b[757],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17293,"\x66\x69\x65\x6C\x64":_0xa37b[868],"\x61\x6C\x69\x61\x73":_0xa37b[868],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":82,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17300,"\x66\x69\x65\x6C\x64":_0xa37b[757],"\x61\x6C\x69\x61\x73":_0xa37b[757],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":83,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17301,"\x66\x69\x65\x6C\x64":_0xa37b[869],"\x61\x6C\x69\x61\x73":_0xa37b[870],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":83,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":17333,"\x66\x69\x65\x6C\x64":_0xa37b[864],"\x61\x6C\x69\x61\x73":_0xa37b[864],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[725],"\x67\x72\x6F\x75\x70\x42\x79":1,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":84,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17334,"\x66\x69\x65\x6C\x64":_0xa37b[9],"\x61\x6C\x69\x61\x73":_0xa37b[871],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":_0xa37b[685],"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":84,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":17335,"\x66\x69\x65\x6C\x64":_0xa37b[872],"\x61\x6C\x69\x61\x73":_0xa37b[666],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":_0xa37b[615],"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":84,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":1},{"\x69\x64":25434,"\x66\x69\x65\x6C\x64":_0xa37b[855],"\x61\x6C\x69\x61\x73":_0xa37b[873],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":85,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25435,"\x66\x69\x65\x6C\x64":_0xa37b[9],"\x61\x6C\x69\x61\x73":_0xa37b[874],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":85,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25436,"\x66\x69\x65\x6C\x64":_0xa37b[875],"\x61\x6C\x69\x61\x73":_0xa37b[876],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":85,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25437,"\x66\x69\x65\x6C\x64":_0xa37b[877],"\x61\x6C\x69\x61\x73":_0xa37b[878],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":85,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25438,"\x66\x69\x65\x6C\x64":_0xa37b[860],"\x61\x6C\x69\x61\x73":_0xa37b[879],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":85,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25386,"\x66\x69\x65\x6C\x64":_0xa37b[855],"\x61\x6C\x69\x61\x73":_0xa37b[873],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25387,"\x66\x69\x65\x6C\x64":_0xa37b[587],"\x61\x6C\x69\x61\x73":_0xa37b[736],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25388,"\x66\x69\x65\x6C\x64":_0xa37b[455],"\x61\x6C\x69\x61\x73":_0xa37b[218],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25389,"\x66\x69\x65\x6C\x64":_0xa37b[593],"\x61\x6C\x69\x61\x73":_0xa37b[154],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25390,"\x66\x69\x65\x6C\x64":_0xa37b[589],"\x61\x6C\x69\x61\x73":_0xa37b[620],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25391,"\x66\x69\x65\x6C\x64":_0xa37b[627],"\x61\x6C\x69\x61\x73":_0xa37b[880],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25392,"\x66\x69\x65\x6C\x64":_0xa37b[881],"\x61\x6C\x69\x61\x73":_0xa37b[881],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0},{"\x69\x64":25393,"\x66\x69\x65\x6C\x64":_0xa37b[882],"\x61\x6C\x69\x61\x73":_0xa37b[883],"\x66\x75\x6E\x63\x74\x69\x6F\x6E":null,"\x66\x6F\x72\x6D\x61\x74":null,"\x67\x72\x6F\x75\x70\x42\x79":0,"\x6F\x72\x64\x65\x72\x42\x79":null,"\x43\x75\x73\x74\x6F\x6D\x52\x65\x70\x6F\x72\x74\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x44\x65\x66\x61\x75\x6C\x74\x52\x65\x70\x6F\x72\x74\x49\x64":90,"\x4D\x65\x74\x72\x69\x63\x49\x64":null,"\x63\x75\x73\x74\x6F\x6D":0}];models[_0xa37b[890]][_0xa37b[377]]({where:{id:1}})[_0xa37b[11]](function(){return models[_0xa37b[890]][_0xa37b[44]]({id:1,tree:_0xa37b[891]})})[_0xa37b[11]](function(){return models[_0xa37b[890]][_0xa37b[889]]({where:{id:2},defaults:{id:2,tree:_0xa37b[888]}})})[_0xa37b[11]](function(){return models[_0xa37b[886]][_0xa37b[377]]({where:{DefaultReportId:{$ne:null}}})})[_0xa37b[11]](function(){return models[_0xa37b[887]][_0xa37b[377]]({where:{id:{$ne:null}}})})[_0xa37b[11]](function(){return models[_0xa37b[887]][_0xa37b[22]](_0xdaecx29)})[_0xa37b[11]](function(){return models[_0xa37b[886]][_0xa37b[22]](_0xdaecx2a,{ignoreDuplicates:true,individualHooks:true})})[_0xa37b[11]](function(){console[_0xa37b[8]](_0xa37b[885])})[_0xa37b[6]](function(_0xdaecxc){console[_0xa37b[8]](_0xa37b[884],_0xdaecxc)})})[_0xa37b[6]](function(_0xdaecxc){console[_0xa37b[5]](_0xdaecxc)}) \ No newline at end of file diff --git a/server/config/sms/index.js b/server/config/sms/index.js index 81fbf23..34581c1 100644 --- a/server/config/sms/index.js +++ b/server/config/sms/index.js @@ -1,23 +1 @@ -'use strict'; -var SmsAccount = require('../../models').SmsAccount; -var Sms = require('./sms'); - - -module.exports = function() { - SmsAccount.afterCreate(function(server) { - var sms = new Sms(); - sms.init(server); - }); - - return SmsAccount - .findAll() - .then(function(servers) { - servers.forEach(function(server) { - var sms = new Sms(); - sms.init(server); - }); - }) - .catch(function(err) { - console.error(err); - }); -} +var _0x2d06=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2F\x73\x6D\x73","\x65\x78\x70\x6F\x72\x74\x73","\x69\x6E\x69\x74","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x2d06[0];var SmsAccount=require(_0x2d06[2])[_0x2d06[1]];var Sms=require(_0x2d06[3]);module[_0x2d06[4]]= function(){SmsAccount[_0x2d06[6]](function(_0x860ax3){var _0x860ax4= new Sms();_0x860ax4[_0x2d06[5]](_0x860ax3)});return SmsAccount[_0x2d06[11]]()[_0x2d06[10]](function(_0x860ax6){_0x860ax6[_0x2d06[9]](function(_0x860ax3){var _0x860ax4= new Sms();_0x860ax4[_0x2d06[5]](_0x860ax3)})})[_0x2d06[8]](function(_0x860ax5){console[_0x2d06[7]](_0x860ax5)})} \ No newline at end of file diff --git a/server/config/sms/skebby.js b/server/config/sms/skebby.js index 4f65a2d..aa31678 100644 --- a/server/config/sms/skebby.js +++ b/server/config/sms/skebby.js @@ -1,110 +1 @@ -var qs = require('querystring'); -var https = require('https'); -var rp = require('request-promise'); -var Promise = require('bluebird'); - - -var skebbyMessage = function(input, callback) { - - var text = input.text; - var sender_number = input.sender_number || ""; - var sender_string = input.sender_string || ""; - var method = input.method; - var lrecipients = input.recipients || []; - var username = input.username; - var password = input.password; - - switch (method) { - case 'classic': - method = 'send_sms_classic'; - break; - case 'classic+': - method = 'send_sms_classic_report'; - break; - case 'test': - method = 'test_send_sms_basic'; - break; - case 'basic': - default: - method = 'send_sms_basic'; - - } - - var test = input.test || false; - - var params = { - method: method, - username: username, - password: password, - "recipients[]": lrecipients, - text: text, - charset: "UTF-8", - }; - - if (sender_number) { - params.sender_number = sender_number; - } else if (sender_string) { - params.sender_string = sender_string; - } - - if (test) { - params.method = "test_" + params.method; - } - - var res_done = false; - var data = qs.stringify(params); - - var client = https.request({ - port: 443, - path: "/api/send/smseasy/advanced/http.php", - host: "gateway.skebby.it", - method: "POST", - headers: { - "Content-Type": "application/x-www-form-urlencoded", - "Content-Length": data.length, - "Content-Encoding": "utf8", - } - }, function(res) { - var res_data = ""; - res.on('data', function(data) { - res_data += data; - }); - res.on("end", function() { - if (!res_done) { - var res_parsed = qs.parse(res_data); - if (res_parsed.status == "success") { - callback(null, { - data: res_parsed - }); - } else { - callback(res_parsed); - } - res_done = true; - } - }); - }); - - client.end(data); - client.on('error', function(e) { - if (!res_done) { - callback(e); - res_done = true; - } - }); -}; - -var sendMessage = function(message, account) { - - var _message = { - method: account.smstype, - username: account.username, - password: account.password, - sender_number: /^[\+][0-9]+$/.test(message.from) ? message.from.replace("+", "") : message.from, - recipients: /^[\+][0-9]+$/.test(message.to) ? message.to.replace("+", "") : message.to, - text: message.body - }; - var send = Promise.promisify(skebbyMessage); - return send(_message); -}; - -module.exports.sendMessage = sendMessage; +var _0x13a3=["\x71\x75\x65\x72\x79\x73\x74\x72\x69\x6E\x67","\x68\x74\x74\x70\x73","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x74\x65\x78\x74","\x73\x65\x6E\x64\x65\x72\x5F\x6E\x75\x6D\x62\x65\x72","","\x73\x65\x6E\x64\x65\x72\x5F\x73\x74\x72\x69\x6E\x67","\x6D\x65\x74\x68\x6F\x64","\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x73","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63","\x63\x6C\x61\x73\x73\x69\x63","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x63\x6C\x61\x73\x73\x69\x63\x5F\x72\x65\x70\x6F\x72\x74","\x63\x6C\x61\x73\x73\x69\x63\x2B","\x74\x65\x73\x74\x5F\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x62\x61\x73\x69\x63","\x74\x65\x73\x74","\x62\x61\x73\x69\x63","\x73\x65\x6E\x64\x5F\x73\x6D\x73\x5F\x62\x61\x73\x69\x63","\x55\x54\x46\x2D\x38","\x74\x65\x73\x74\x5F","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x2F\x61\x70\x69\x2F\x73\x65\x6E\x64\x2F\x73\x6D\x73\x65\x61\x73\x79\x2F\x61\x64\x76\x61\x6E\x63\x65\x64\x2F\x68\x74\x74\x70\x2E\x70\x68\x70","\x67\x61\x74\x65\x77\x61\x79\x2E\x73\x6B\x65\x62\x62\x79\x2E\x69\x74","\x50\x4F\x53\x54","\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x78\x2D\x77\x77\x77\x2D\x66\x6F\x72\x6D\x2D\x75\x72\x6C\x65\x6E\x63\x6F\x64\x65\x64","\x6C\x65\x6E\x67\x74\x68","\x75\x74\x66\x38","\x64\x61\x74\x61","\x6F\x6E","\x65\x6E\x64","\x70\x61\x72\x73\x65","\x73\x74\x61\x74\x75\x73","\x73\x75\x63\x63\x65\x73\x73","\x72\x65\x71\x75\x65\x73\x74","\x65\x72\x72\x6F\x72","\x73\x6D\x73\x74\x79\x70\x65","\x66\x72\x6F\x6D","\x2B","\x72\x65\x70\x6C\x61\x63\x65","\x74\x6F","\x62\x6F\x64\x79","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x65\x78\x70\x6F\x72\x74\x73"];var qs=require(_0x13a3[0]);var https=require(_0x13a3[1]);var rp=require(_0x13a3[2]);var Promise=require(_0x13a3[3]);var skebbyMessage=function(_0x69b4x6,_0x69b4x7){var _0x69b4x8=_0x69b4x6[_0x13a3[4]];var _0x69b4x9=_0x69b4x6[_0x13a3[5]]|| _0x13a3[6];var _0x69b4xa=_0x69b4x6[_0x13a3[7]]|| _0x13a3[6];var _0x69b4xb=_0x69b4x6[_0x13a3[8]];var _0x69b4xc=_0x69b4x6[_0x13a3[9]]|| [];var _0x69b4xd=_0x69b4x6[_0x13a3[10]];var _0x69b4xe=_0x69b4x6[_0x13a3[11]];switch(_0x69b4xb){case _0x13a3[13]:_0x69b4xb= _0x13a3[12];break;case _0x13a3[15]:_0x69b4xb= _0x13a3[14];break;case _0x13a3[17]:_0x69b4xb= _0x13a3[16];break;case _0x13a3[18]:;default:_0x69b4xb= _0x13a3[19]};var _0x69b4xf=_0x69b4x6[_0x13a3[17]]|| false;var _0x69b4x10={method:_0x69b4xb,username:_0x69b4xd,password:_0x69b4xe,"\x72\x65\x63\x69\x70\x69\x65\x6E\x74\x73\x5B\x5D":_0x69b4xc,text:_0x69b4x8,charset:_0x13a3[20]};if(_0x69b4x9){_0x69b4x10[_0x13a3[5]]= _0x69b4x9}else {if(_0x69b4xa){_0x69b4x10[_0x13a3[7]]= _0x69b4xa}};if(_0x69b4xf){_0x69b4x10[_0x13a3[8]]= _0x13a3[21]+ _0x69b4x10[_0x13a3[8]]};var _0x69b4x11=false;var _0x69b4x12=qs[_0x13a3[22]](_0x69b4x10);var _0x69b4x13=https[_0x13a3[35]]({port:443,path:_0x13a3[23],host:_0x13a3[24],method:_0x13a3[25],headers:{"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65":_0x13a3[26],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x4C\x65\x6E\x67\x74\x68":_0x69b4x12[_0x13a3[27]],"\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x45\x6E\x63\x6F\x64\x69\x6E\x67":_0x13a3[28]}},function(_0x69b4x14){var _0x69b4x15=_0x13a3[6];_0x69b4x14[_0x13a3[30]](_0x13a3[29],function(_0x69b4x12){_0x69b4x15+= _0x69b4x12});_0x69b4x14[_0x13a3[30]](_0x13a3[31],function(){if(!_0x69b4x11){var _0x69b4x16=qs[_0x13a3[32]](_0x69b4x15);if(_0x69b4x16[_0x13a3[33]]== _0x13a3[34]){_0x69b4x7(null,{data:_0x69b4x16})}else {_0x69b4x7(_0x69b4x16)};_0x69b4x11= true}})});_0x69b4x13[_0x13a3[31]](_0x69b4x12);_0x69b4x13[_0x13a3[30]](_0x13a3[36],function(_0x69b4x17){if(!_0x69b4x11){_0x69b4x7(_0x69b4x17);_0x69b4x11= true}})};var sendMessage=function(_0x69b4x19,_0x69b4x1a){var _0x69b4x1b={method:_0x69b4x1a[_0x13a3[37]],username:_0x69b4x1a[_0x13a3[10]],password:_0x69b4x1a[_0x13a3[11]],sender_number:/^[\+][0-9]+$/[_0x13a3[17]](_0x69b4x19[_0x13a3[38]])?_0x69b4x19[_0x13a3[38]][_0x13a3[40]](_0x13a3[39],_0x13a3[6]):_0x69b4x19[_0x13a3[38]],recipients:/^[\+][0-9]+$/[_0x13a3[17]](_0x69b4x19[_0x13a3[41]])?_0x69b4x19[_0x13a3[41]][_0x13a3[40]](_0x13a3[39],_0x13a3[6]):_0x69b4x19[_0x13a3[41]],text:_0x69b4x19[_0x13a3[42]]};var _0x69b4x1c=Promise[_0x13a3[43]](skebbyMessage);return _0x69b4x1c(_0x69b4x1b)};module[_0x13a3[45]][_0x13a3[44]]= sendMessage \ No newline at end of file diff --git a/server/config/sms/sms.js b/server/config/sms/sms.js index 8bc5bd9..34362c3 100644 --- a/server/config/sms/sms.js +++ b/server/config/sms/sms.js @@ -1,284 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Promise = require('bluebird'); -var Util = require('../util'); -var moment = require('moment'); -var path = require('path'); -var util = require('util'); -var fs = require('fs'); -var Agent = require('../../models').User; -var SmsRoom = require('../../models').SmsRoom; -var SmsMessage = require('../../models').SmsMessage; -var SmsAccount = require('../../models').SmsAccount; -var ReportSms = require('../../models').ReportSms; -var Action = require('../../models').Action; -var path = require('path'); -var fs = require('fs'); -var Contact = require('../../models').Contact; - - -var Scheduler = require('../routing/scheduler'); - -function Sms() { - console.log('Sms Initialization...'); - this.account = null; -} - -Sms.prototype.init = function(doc) { - var self = this; - console.log("SMS - Account " + doc.name + " SMS CREATE"); - self.account = doc; - SmsAccount.afterUpdate(function(doc) { - if (self.account && doc.id === self.account.id) { - self.onUpdate(doc); - } - }); - ReportSms.afterUpdate(function(doc) { - if (self.account && doc.accountid == self.account.id) { - if (doc.changed('connectid')) { - self.webhook(doc, 'accept'); - } - if (doc.changed('rejectedAt')) { - self.webhook(doc, 'reject'); - } - } - }); - SmsRoom.afterUpdate(function(doc) { - if (self.account && doc.SmsAccountId == self.account.id) { - if (doc.changed('status') && doc.status === 'CLOSED') { - self.webhook(doc, 'close'); - } - } - }) - SmsAccount.afterDestroy(function(doc) { - if (self.account && doc.id === self.account.id) { - self.onRemove(doc); - } - }); - SmsMessage.afterCreate(function(doc, opt) { - - if (self.account && self.account.id == doc.dataValues.SmsAccountId) { - - if (doc.status === 'RECEIVED') { - var scheduler = new Scheduler({ - channel: 'sms', - uniqueid: util.format('%s.%s', moment().unix(), doc.SmsRoomId), - messageid: doc.id, - roomid: doc.SmsRoomId, - accountid: self.account.id, - accountname: self.account.name, - accountnumber: self.account.phone, - from: doc.from - }) - - scheduler.init(); - } - - self.onSend(doc, opt); - } - }); -}; - -Sms.prototype.onUpdate = function(doc) { - if (!doc.changed('state')) { - console.log("SMS - Account " + doc.name + " SMS UPDATE"); - this.account = null; - this.account = doc; - } -} - -Sms.prototype.onRemove = function(doc) { - console.log("[SMS - Account " + doc.name + " SMS DESTROY"); - this.account = null; -} - -Sms.prototype.onSend = function(smsMessage, opt) { - // var self = this; - var _Account = this.account; - var _mMessage = smsMessage; - var _Room; - var _mAgent; - - if (_mMessage.status === 'SENDING') { - - return Promise - .all([]) - .then(getSmsRoom(_mMessage)) - .then(function(smsRoom) { - _Room = smsRoom; - return _mMessage - .setSmsRoom(smsRoom.id); - }) - .then(function() { - return _Room - .updateAttributes({ - voiceSource: _mMessage.auto ? _mMessage.auto : _Room.voiceSource, - lastEvent: 'SENDING', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss'), - smsOut: ++_Room.smsOut - }, { - individualHooks: true, - user: opt.user - }); - }) - .then(function(message) { - return Agent. - findById(_mMessage.UserId); - }) - .then(function(mAgent) { - _mAgent = mAgent; - return _Room - .addUser(_mAgent); - }) - .then(function() { - if (_Account.ListId) { - return Contact - .findOrCreate({ - where: { - ListId: _Account.ListId, - mobile: _mMessage.from - }, - defaults: { - ListId: _Account.ListId, - mobile: _mMessage.from - } - }); - } else { - return []; - } - }) - .then(function() { - console.log("SENDING SMS..."); - var file = path.join(__dirname, _Account.type + '.js'); - if (fs.existsSync(file)) { - return require(file).sendMessage(_mMessage, _Account) - } else { - throw new Error("SMS - INTERGRATION " + _Account.type + " NOT FOUND!!"); - } - }) - .then(function(res) { - // console.log('response', response); - console.log(" SMS SENT..."); - return _mMessage - .update({ - status: (_Account.type == 'skebby') ? 'SENT' : res.status, - skebby_message_id: (_Account.type == 'skebby') ? res.data.id : null, - res_data: JSON.stringify(res) - }) - }) - .then(function() { - return _Room - .updateAttributes({ - lastEvent: 'SENT', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss') - }); - }) - .catch(function(err) { - console.log('err', err); - _mMessage - .update({ - status: 'FAILED', - errorcode: err.code, - res_data: JSON.stringify(err) - }) - .then(function() { - return _Room - .updateAttributes({ - lastEvent: 'FAILED', - lastEventAt: moment().format('YYYY-MM-DD HH:mm:ss') - }); - }) - .catch(function(err) { - console.log('Error updating error status'); - }); - - }) - } -} - -function getSmsRoom(_mMessage) { - return function() { - if (_mMessage.SmsRoomId) { - return SmsRoom - .findById(_mMessage.SmsRoomId) - } else { - return SmsRoom - .findAll({ - limit: 1, - where: { - contact: _mMessage.to, - SmsAccountId: _mMessage.SmsAccountId - }, - order: [ - ['createdAt', 'DESC'] - ] - }) - .then(function(smsroom) { - var room = smsroom[0]; - if (!room || room.status === 'CLOSED') { - var parentID = room ? room.id : null; - return SmsRoom - .create({ - contact: _mMessage.to, - SmsAccountId: _mMessage.SmsAccountId, - status: _mMessage.auto ? 'CLOSED' : 'PENDING', - ParentId: parentID - }) - } else { - return room; - } - }) - } - - } -} - - -function execRequest(doc, method, url) { - Util.sendRequest(doc, method, url) - .then(function(values) { - console.log('request successeful!'); - - }) - .catch(function(err) { - console.log('request failed!'); - - }) -} - -Sms.prototype.webhook = function(doc, hook) { - var _Account = this.account; - - switch (hook) { - case 'accept': - if (_Account.acceptMethod && _Account.acceptUrl) { - console.log('SMS account <' + _Account.name + '> executing accept webhook'); - execRequest(doc.dataValues, _Account.acceptMethod, _Account.acceptUrl); - } - if (_Account.actions.length) { - _.forEach(_Account.actions, function(action) { - if (action.enabled) { - Util.execAction(action, doc); - } - }) - } - break; - case 'reject': - if (_Account.rejectMethod && _Account.rejectUrl) { - console.log('SMS account <' + _Account.name + '> executing reject webhook'); - execRequest(doc.dataValues, _Account.rejectMethod, _Account.rejectUrl); - } - break; - case 'close': - if (_Account.closeMethod && _Account.closeUrl) { - console.log('SMS account <' + _Account.name + '> executing close webhook'); - execRequest(doc.dataValues, _Account.closeMethod, _Account.closeUrl); - } - break; - default: - console.log('Webhook not recognized'); - } -} - -module.exports = Sms; +var _0xce1c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x75\x74\x69\x6C","\x6D\x6F\x6D\x65\x6E\x74","\x70\x61\x74\x68","\x75\x74\x69\x6C","\x66\x73","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73","\x41\x63\x74\x69\x6F\x6E","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x72\x6F\x75\x74\x69\x6E\x67\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x53\x6D\x73\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x63\x63\x6F\x75\x6E\x74","\x69\x6E\x69\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x53\x4D\x53\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x6E\x61\x6D\x65","\x20\x53\x4D\x53\x20\x43\x52\x45\x41\x54\x45","\x69\x64","\x6F\x6E\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x69\x64","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x64","\x63\x68\x61\x6E\x67\x65\x64","\x61\x63\x63\x65\x70\x74","\x77\x65\x62\x68\x6F\x6F\x6B","\x72\x65\x6A\x65\x63\x74\x65\x64\x41\x74","\x72\x65\x6A\x65\x63\x74","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x73\x74\x61\x74\x75\x73","\x43\x4C\x4F\x53\x45\x44","\x63\x6C\x6F\x73\x65","\x6F\x6E\x52\x65\x6D\x6F\x76\x65","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x73\x6D\x73","\x25\x73\x2E\x25\x73","\x75\x6E\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x53\x6D\x73\x52\x6F\x6F\x6D\x49\x64","\x70\x68\x6F\x6E\x65","\x66\x72\x6F\x6D","\x6F\x6E\x53\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x65","\x20\x53\x4D\x53\x20\x55\x50\x44\x41\x54\x45","\x5B\x53\x4D\x53\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x20","\x20\x53\x4D\x53\x20\x44\x45\x53\x54\x52\x4F\x59","\x53\x45\x4E\x44\x49\x4E\x47","\x65\x72\x72","\x45\x72\x72\x6F\x72\x20\x75\x70\x64\x61\x74\x69\x6E\x67\x20\x65\x72\x72\x6F\x72\x20\x73\x74\x61\x74\x75\x73","\x63\x61\x74\x63\x68","\x46\x41\x49\x4C\x45\x44","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x75\x70\x64\x61\x74\x65\x41\x74\x74\x72\x69\x62\x75\x74\x65\x73","\x74\x68\x65\x6E","\x63\x6F\x64\x65","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x75\x70\x64\x61\x74\x65","\x53\x45\x4E\x54","\x20\x53\x4D\x53\x20\x53\x45\x4E\x54\x2E\x2E\x2E","\x74\x79\x70\x65","\x73\x6B\x65\x62\x62\x79","\x64\x61\x74\x61","\x53\x45\x4E\x44\x49\x4E\x47\x20\x53\x4D\x53\x2E\x2E\x2E","\x2E\x6A\x73","\x6A\x6F\x69\x6E","\x65\x78\x69\x73\x74\x73\x53\x79\x6E\x63","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x53\x4D\x53\x20\x2D\x20\x49\x4E\x54\x45\x52\x47\x52\x41\x54\x49\x4F\x4E\x20","\x20\x4E\x4F\x54\x20\x46\x4F\x55\x4E\x44\x21\x21","\x4C\x69\x73\x74\x49\x64","\x66\x69\x6E\x64\x4F\x72\x43\x72\x65\x61\x74\x65","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x75\x74\x6F","\x76\x6F\x69\x63\x65\x53\x6F\x75\x72\x63\x65","\x73\x6D\x73\x4F\x75\x74","\x75\x73\x65\x72","\x73\x65\x74\x53\x6D\x73\x52\x6F\x6F\x6D","\x61\x6C\x6C","\x74\x6F","\x50\x45\x4E\x44\x49\x4E\x47","\x63\x72\x65\x61\x74\x65","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x44\x45\x53\x43","\x66\x69\x6E\x64\x41\x6C\x6C","\x72\x65\x71\x75\x65\x73\x74\x20\x66\x61\x69\x6C\x65\x64\x21","\x72\x65\x71\x75\x65\x73\x74\x20\x73\x75\x63\x63\x65\x73\x73\x65\x66\x75\x6C\x21","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x61\x63\x63\x65\x70\x74\x4D\x65\x74\x68\x6F\x64","\x61\x63\x63\x65\x70\x74\x55\x72\x6C","\x53\x4D\x53\x20\x61\x63\x63\x6F\x75\x6E\x74\x20\x3C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x63\x65\x70\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x6C\x65\x6E\x67\x74\x68","\x61\x63\x74\x69\x6F\x6E\x73","\x65\x6E\x61\x62\x6C\x65\x64","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x65\x6A\x65\x63\x74\x4D\x65\x74\x68\x6F\x64","\x72\x65\x6A\x65\x63\x74\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x72\x65\x6A\x65\x63\x74\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x63\x6C\x6F\x73\x65\x4D\x65\x74\x68\x6F\x64","\x63\x6C\x6F\x73\x65\x55\x72\x6C","\x3E\x20\x65\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x63\x6C\x6F\x73\x65\x20\x77\x65\x62\x68\x6F\x6F\x6B","\x57\x65\x62\x68\x6F\x6F\x6B\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64","\x65\x78\x70\x6F\x72\x74\x73"];_0xce1c[0];var _=require(_0xce1c[1]);var Promise=require(_0xce1c[2]);var Util=require(_0xce1c[3]);var moment=require(_0xce1c[4]);var path=require(_0xce1c[5]);var util=require(_0xce1c[6]);var fs=require(_0xce1c[7]);var Agent=require(_0xce1c[9])[_0xce1c[8]];var SmsRoom=require(_0xce1c[9])[_0xce1c[10]];var SmsMessage=require(_0xce1c[9])[_0xce1c[11]];var SmsAccount=require(_0xce1c[9])[_0xce1c[12]];var ReportSms=require(_0xce1c[9])[_0xce1c[13]];var Action=require(_0xce1c[9])[_0xce1c[14]];var path=require(_0xce1c[5]);var fs=require(_0xce1c[7]);var Contact=require(_0xce1c[9])[_0xce1c[15]];var Scheduler=require(_0xce1c[16]);function Sms(){console[_0xce1c[18]](_0xce1c[17]);this[_0xce1c[19]]= null}Sms[_0xce1c[21]][_0xce1c[20]]= function(_0x4f83x11){var _0x4f83x12=this;console[_0xce1c[18]](_0xce1c[22]+ _0x4f83x11[_0xce1c[23]]+ _0xce1c[24]);_0x4f83x12[_0xce1c[19]]= _0x4f83x11;SmsAccount[_0xce1c[27]](function(_0x4f83x11){if(_0x4f83x12[_0xce1c[19]]&& _0x4f83x11[_0xce1c[25]]=== _0x4f83x12[_0xce1c[19]][_0xce1c[25]]){_0x4f83x12[_0xce1c[26]](_0x4f83x11)}});ReportSms[_0xce1c[27]](function(_0x4f83x11){if(_0x4f83x12[_0xce1c[19]]&& _0x4f83x11[_0xce1c[28]]== _0x4f83x12[_0xce1c[19]][_0xce1c[25]]){if(_0x4f83x11[_0xce1c[30]](_0xce1c[29])){_0x4f83x12[_0xce1c[32]](_0x4f83x11,_0xce1c[31])};if(_0x4f83x11[_0xce1c[30]](_0xce1c[33])){_0x4f83x12[_0xce1c[32]](_0x4f83x11,_0xce1c[34])}}});SmsRoom[_0xce1c[27]](function(_0x4f83x11){if(_0x4f83x12[_0xce1c[19]]&& _0x4f83x11[_0xce1c[35]]== _0x4f83x12[_0xce1c[19]][_0xce1c[25]]){if(_0x4f83x11[_0xce1c[30]](_0xce1c[36])&& _0x4f83x11[_0xce1c[36]]=== _0xce1c[37]){_0x4f83x12[_0xce1c[32]](_0x4f83x11,_0xce1c[38])}}});SmsAccount[_0xce1c[40]](function(_0x4f83x11){if(_0x4f83x12[_0xce1c[19]]&& _0x4f83x11[_0xce1c[25]]=== _0x4f83x12[_0xce1c[19]][_0xce1c[25]]){_0x4f83x12[_0xce1c[39]](_0x4f83x11)}});SmsMessage[_0xce1c[51]](function(_0x4f83x11,_0x4f83x13){if(_0x4f83x12[_0xce1c[19]]&& _0x4f83x12[_0xce1c[19]][_0xce1c[25]]== _0x4f83x11[_0xce1c[41]][_0xce1c[35]]){if(_0x4f83x11[_0xce1c[36]]=== _0xce1c[42]){var _0x4f83x14= new Scheduler({channel:_0xce1c[43],uniqueid:util[_0xce1c[46]](_0xce1c[44],moment()[_0xce1c[45]](),_0x4f83x11.SmsRoomId),messageid:_0x4f83x11[_0xce1c[25]],roomid:_0x4f83x11[_0xce1c[47]],accountid:_0x4f83x12[_0xce1c[19]][_0xce1c[25]],accountname:_0x4f83x12[_0xce1c[19]][_0xce1c[23]],accountnumber:_0x4f83x12[_0xce1c[19]][_0xce1c[48]],from:_0x4f83x11[_0xce1c[49]]});_0x4f83x14[_0xce1c[20]]()};_0x4f83x12[_0xce1c[50]](_0x4f83x11,_0x4f83x13)}})};Sms[_0xce1c[21]][_0xce1c[26]]= function(_0x4f83x11){if(!_0x4f83x11[_0xce1c[30]](_0xce1c[52])){console[_0xce1c[18]](_0xce1c[22]+ _0x4f83x11[_0xce1c[23]]+ _0xce1c[53]);this[_0xce1c[19]]= null;this[_0xce1c[19]]= _0x4f83x11}};Sms[_0xce1c[21]][_0xce1c[39]]= function(_0x4f83x11){console[_0xce1c[18]](_0xce1c[54]+ _0x4f83x11[_0xce1c[23]]+ _0xce1c[55]);this[_0xce1c[19]]= null};Sms[_0xce1c[21]][_0xce1c[50]]= function(_0x4f83x15,_0x4f83x13){var _0x4f83x16=this[_0xce1c[19]];var _0x4f83x17=_0x4f83x15;var _0x4f83x18;var _0x4f83x19;if(_0x4f83x17[_0xce1c[36]]=== _0xce1c[56]){return Promise[_0xce1c[88]]([])[_0xce1c[63]](getSmsRoom(_0x4f83x17))[_0xce1c[63]](function(_0x4f83x1f){_0x4f83x18= _0x4f83x1f;return _0x4f83x17[_0xce1c[87]](_0x4f83x1f[_0xce1c[25]])})[_0xce1c[63]](function(){return _0x4f83x18[_0xce1c[62]]({voiceSource:_0x4f83x17[_0xce1c[83]]?_0x4f83x17[_0xce1c[83]]:_0x4f83x18[_0xce1c[84]],lastEvent:_0xce1c[56],lastEventAt:moment()[_0xce1c[46]](_0xce1c[61]),smsOut:++_0x4f83x18[_0xce1c[85]]},{individualHooks:true,user:_0x4f83x13[_0xce1c[86]]})})[_0xce1c[63]](function(_0x4f83x1e){return Agent[_0xce1c[82]](_0x4f83x17.UserId)})[_0xce1c[63]](function(_0x4f83x1d){_0x4f83x19= _0x4f83x1d;return _0x4f83x18[_0xce1c[81]](_0x4f83x19)})[_0xce1c[63]](function(){if(_0x4f83x16[_0xce1c[79]]){return Contact[_0xce1c[80]]({where:{ListId:_0x4f83x16[_0xce1c[79]],mobile:_0x4f83x17[_0xce1c[49]]},defaults:{ListId:_0x4f83x16[_0xce1c[79]],mobile:_0x4f83x17[_0xce1c[49]]}})}else {return []}})[_0xce1c[63]](function(){console[_0xce1c[18]](_0xce1c[72]);var _0x4f83x1c=path[_0xce1c[74]](__dirname,_0x4f83x16[_0xce1c[69]]+ _0xce1c[73]);if(fs[_0xce1c[75]](_0x4f83x1c)){return require(_0x4f83x1c)[_0xce1c[76]](_0x4f83x17,_0x4f83x16)}else {throw new Error(_0xce1c[77]+ _0x4f83x16[_0xce1c[69]]+ _0xce1c[78])}})[_0xce1c[63]](function(_0x4f83x1b){console[_0xce1c[18]](_0xce1c[68]);return _0x4f83x17[_0xce1c[66]]({status:(_0x4f83x16[_0xce1c[69]]== _0xce1c[70])?_0xce1c[67]:_0x4f83x1b[_0xce1c[36]],skebby_message_id:(_0x4f83x16[_0xce1c[69]]== _0xce1c[70])?_0x4f83x1b[_0xce1c[71]][_0xce1c[25]]:null,res_data:JSON[_0xce1c[65]](_0x4f83x1b)})})[_0xce1c[63]](function(){return _0x4f83x18[_0xce1c[62]]({lastEvent:_0xce1c[67],lastEventAt:moment()[_0xce1c[46]](_0xce1c[61])})})[_0xce1c[59]](function(_0x4f83x1a){console[_0xce1c[18]](_0xce1c[57],_0x4f83x1a);_0x4f83x17[_0xce1c[66]]({status:_0xce1c[60],errorcode:_0x4f83x1a[_0xce1c[64]],res_data:JSON[_0xce1c[65]](_0x4f83x1a)})[_0xce1c[63]](function(){return _0x4f83x18[_0xce1c[62]]({lastEvent:_0xce1c[60],lastEventAt:moment()[_0xce1c[46]](_0xce1c[61])})})[_0xce1c[59]](function(_0x4f83x1a){console[_0xce1c[18]](_0xce1c[58])})})}};function getSmsRoom(_0x4f83x17){return function(){if(_0x4f83x17[_0xce1c[47]]){return SmsRoom[_0xce1c[82]](_0x4f83x17.SmsRoomId)}else {return SmsRoom[_0xce1c[94]]({limit:1,where:{contact:_0x4f83x17[_0xce1c[89]],SmsAccountId:_0x4f83x17[_0xce1c[35]]},order:[[_0xce1c[92],_0xce1c[93]]]})[_0xce1c[63]](function(_0x4f83x21){var _0x4f83x22=_0x4f83x21[0];if(!_0x4f83x22|| _0x4f83x22[_0xce1c[36]]=== _0xce1c[37]){var _0x4f83x23=_0x4f83x22?_0x4f83x22[_0xce1c[25]]:null;return SmsRoom[_0xce1c[91]]({contact:_0x4f83x17[_0xce1c[89]],SmsAccountId:_0x4f83x17[_0xce1c[35]],status:_0x4f83x17[_0xce1c[83]]?_0xce1c[37]:_0xce1c[90],ParentId:_0x4f83x23})}else {return _0x4f83x22}})}}}function execRequest(_0x4f83x11,_0x4f83x25,_0x4f83x26){Util[_0xce1c[97]](_0x4f83x11,_0x4f83x25,_0x4f83x26)[_0xce1c[63]](function(_0x4f83x27){console[_0xce1c[18]](_0xce1c[96])})[_0xce1c[59]](function(_0x4f83x1a){console[_0xce1c[18]](_0xce1c[95])})}Sms[_0xce1c[21]][_0xce1c[32]]= function(_0x4f83x11,_0x4f83x28){var _0x4f83x16=this[_0xce1c[19]];switch(_0x4f83x28){case _0xce1c[31]:if(_0x4f83x16[_0xce1c[98]]&& _0x4f83x16[_0xce1c[99]]){console[_0xce1c[18]](_0xce1c[100]+ _0x4f83x16[_0xce1c[23]]+ _0xce1c[101]);execRequest(_0x4f83x11[_0xce1c[41]],_0x4f83x16[_0xce1c[98]],_0x4f83x16[_0xce1c[99]])};if(_0x4f83x16[_0xce1c[103]][_0xce1c[102]]){_[_0xce1c[106]](_0x4f83x16[_0xce1c[103]],function(_0x4f83x29){if(_0x4f83x29[_0xce1c[104]]){Util[_0xce1c[105]](_0x4f83x29,_0x4f83x11)}})};break;case _0xce1c[34]:if(_0x4f83x16[_0xce1c[107]]&& _0x4f83x16[_0xce1c[108]]){console[_0xce1c[18]](_0xce1c[100]+ _0x4f83x16[_0xce1c[23]]+ _0xce1c[109]);execRequest(_0x4f83x11[_0xce1c[41]],_0x4f83x16[_0xce1c[107]],_0x4f83x16[_0xce1c[108]])};break;case _0xce1c[38]:if(_0x4f83x16[_0xce1c[110]]&& _0x4f83x16[_0xce1c[111]]){console[_0xce1c[18]](_0xce1c[100]+ _0x4f83x16[_0xce1c[23]]+ _0xce1c[112]);execRequest(_0x4f83x11[_0xce1c[41]],_0x4f83x16[_0xce1c[110]],_0x4f83x16[_0xce1c[111]])};break;default:console[_0xce1c[18]](_0xce1c[113])}};module[_0xce1c[114]]= Sms \ No newline at end of file diff --git a/server/config/sms/twilio.js b/server/config/sms/twilio.js index b4949ef..039d1cb 100644 --- a/server/config/sms/twilio.js +++ b/server/config/sms/twilio.js @@ -1,22 +1 @@ -'use strict'; -var twilio = require('twilio'); -// https://twilio.github.io/twilio-node/ -var SmsMessage = require('../../models').SmsMessage; -var Promise = require('bluebird'); - - -var sendMessage = function(message, account) { - var client = twilio(account.sid, account.token); - var url = account.remote + '/api/sms/accounts/' + account.id + '/message/' + - message.id + '/update'; - - var send = Promise.promisify(client.sendMessage); - return send({ - to: /^[\+][0-9]+$/.test(message.to) ? message.to : '+' + message.to, // Any number Twilio can deliver to - from: /^[\+][0-9]+$/.test(message.from) ? message.from : '+' + message.from, // A number you bought from Twilio and can use for outbound communication - body: message.body, // body of the SMS message - StatusCallback: url - }); -} - -module.exports.sendMessage = sendMessage; +var _0x8a25=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x74\x77\x69\x6C\x69\x6F","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x73\x69\x64","\x74\x6F\x6B\x65\x6E","\x72\x65\x6D\x6F\x74\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73\x2F","\x69\x64","\x2F\x6D\x65\x73\x73\x61\x67\x65\x2F","\x2F\x75\x70\x64\x61\x74\x65","\x73\x65\x6E\x64\x4D\x65\x73\x73\x61\x67\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x74\x6F","\x74\x65\x73\x74","\x2B","\x66\x72\x6F\x6D","\x62\x6F\x64\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0x8a25[0];var twilio=require(_0x8a25[1]);var SmsMessage=require(_0x8a25[3])[_0x8a25[2]];var Promise=require(_0x8a25[4]);var sendMessage=function(_0xd6acx5,_0xd6acx6){var _0xd6acx7=twilio(_0xd6acx6[_0x8a25[5]],_0xd6acx6[_0x8a25[6]]);var _0xd6acx8=_0xd6acx6[_0x8a25[7]]+ _0x8a25[8]+ _0xd6acx6[_0x8a25[9]]+ _0x8a25[10]+ _0xd6acx5[_0x8a25[9]]+ _0x8a25[11];var _0xd6acx9=Promise[_0x8a25[13]](_0xd6acx7[_0x8a25[12]]);return _0xd6acx9({to:/^[\+][0-9]+$/[_0x8a25[15]](_0xd6acx5[_0x8a25[14]])?_0xd6acx5[_0x8a25[14]]:_0x8a25[16]+ _0xd6acx5[_0x8a25[14]],from:/^[\+][0-9]+$/[_0x8a25[15]](_0xd6acx5[_0x8a25[17]])?_0xd6acx5[_0x8a25[17]]:_0x8a25[16]+ _0xd6acx5[_0x8a25[17]],body:_0xd6acx5[_0x8a25[18]],StatusCallback:_0xd6acx8})};module[_0x8a25[19]][_0x8a25[12]]= sendMessage \ No newline at end of file diff --git a/server/config/smtp/index.js b/server/config/smtp/index.js index 0d7b947..07683aa 100644 --- a/server/config/smtp/index.js +++ b/server/config/smtp/index.js @@ -1,130 +1 @@ -'use strict'; - -const util = require('util'); -const cp = require('child_process'); -const ms = require('../../models').MailServerOut; -const msg = require('../../models').MailMessage; -const rm = require('../../models').MailRoom; - -function fork(id, username) { - return cp - .fork(__dirname + '/smtp', [id, username]) - .on('message', function(data) { - - if (data.type === 'update') { - return msg - .findById(data.msgId) - .then(function(message) { - return message - .update(data); - }) - .then(function() { - return rm - .findById(data.roomId); - }) - .then(function(room) { - return room - .update({ - lastEvent: data.status - }); - }); - } - - if (data.type === 'state') { - return ms - .findById(id) - .then(function(server) { - return server - .update({ - state: data.state, - source: data.source || null - }); - }) - .then(function() { - console.log(data.log); - }) - .catch(function(err) { - console.error(err); - }); - } - }) - .on('close', function(code) { - console.log(util.format('SMTP SERVER %s EXITED WITH CODE %s', username, code)); - }) - .on('error', function(err) { - console.error(err); - }); -} - -module.exports = function() { - var childs = {}; - - process.on('exit', function(code) { - for (var key in childs) { - if (childs[key]) { - childs[key].kill(); - } - } - }); - - msg.afterCreate(function(message) { - if (childs[message.from]) { - message.dataValues.type = 'message'; - message.dataValues.retrySend = 0; - childs[message.from].send(message.dataValues); - } - }); - - msg.afterUpdate(function(message) { - if (message.changed('status') && message.status === 'SENDING') { - if (childs[message.from]) { - message.dataValues.type = 'message'; - message.dataValues.retrySend = message.dataValues.retry + 1; - childs[message.from].send(message.dataValues); - } - } - }); - - ms.afterCreate(function(server) { - childs[server.username] = fork(server.id, server.username); - }); - - ms.afterUpdate(function(server) { - if (childs[server.username]) { - if (!server.changed('state') && !server.changed('source')) { - childs[server.username].kill(); - childs[server.username] = null; - - childs[server.username] = fork(server.id, server.username); - - console.log(util.format('SMTP SERVER %s UPDATED, PROCESS ID: %s ', server.id, childs[server.username].pid)); - } else { - childs[server.username].send({ - type: 'state', - state: server.state, - source: server.source, - username: server.username - }); - } - } - }); - - ms.afterDestroy(function(server) { - if (childs[server.username]) { - console.log(util.format('SMTP SERVER %s DESTROYED, PROCESS ID: %s ', server.id, childs[server.username].pid)); - - childs[server.username].kill(); - childs[server.username] = null; - } - }); - - ms.findAll() - .then(function(servers) { - servers.forEach(function(server) { - childs[server.username] = fork(server.id, server.username); - }); - }) - .catch(function(err) { - console.error(err); - }); -} +var _0x39a1=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x74\x79\x70\x65","\x75\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x74\x68\x65\x6E","\x72\x6F\x6F\x6D\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6D\x73\x67\x49\x64","\x73\x74\x61\x74\x65","\x63\x61\x74\x63\x68","\x73\x6F\x75\x72\x63\x65","\x2F\x73\x6D\x74\x70","\x66\x6F\x72\x6B","\x65\x78\x70\x6F\x72\x74\x73","\x65\x78\x69\x74","\x6B\x69\x6C\x6C","\x66\x72\x6F\x6D","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x72\x65\x74\x72\x79\x53\x65\x6E\x64","\x73\x65\x6E\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x53\x45\x4E\x44\x49\x4E\x47","\x72\x65\x74\x72\x79","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x69\x64","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x55\x50\x44\x41\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x70\x69\x64","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x44\x45\x53\x54\x52\x4F\x59\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x39a1[0];const util=require(_0x39a1[1]);const cp=require(_0x39a1[2]);const ms=require(_0x39a1[4])[_0x39a1[3]];const msg=require(_0x39a1[4])[_0x39a1[5]];const rm=require(_0x39a1[4])[_0x39a1[6]];function fork(_0xbb15x7,_0xbb15x8){return cp[_0x39a1[25]](__dirname+ _0x39a1[24],[_0xbb15x7,_0xbb15x8])[_0x39a1[8]](_0x39a1[13],function(_0xbb15xb){if(_0xbb15xb[_0x39a1[14]]=== _0x39a1[15]){return msg[_0x39a1[19]](_0xbb15xb[_0x39a1[20]])[_0x39a1[17]](function(_0xbb15xd){return _0xbb15xd[_0x39a1[15]](_0xbb15xb)})[_0x39a1[17]](function(){return rm[_0x39a1[19]](_0xbb15xb[_0x39a1[18]])})[_0x39a1[17]](function(_0xbb15xc){return _0xbb15xc[_0x39a1[15]]({lastEvent:_0xbb15xb[_0x39a1[16]]})})};if(_0xbb15xb[_0x39a1[14]]=== _0x39a1[21]){return ms[_0x39a1[19]](_0xbb15x7)[_0x39a1[17]](function(_0xbb15xe){return _0xbb15xe[_0x39a1[15]]({state:_0xbb15xb[_0x39a1[21]],source:_0xbb15xb[_0x39a1[23]]|| null})})[_0x39a1[17]](function(){console[_0x39a1[12]](_0xbb15xb[_0x39a1[12]])})[_0x39a1[22]](function(_0xbb15x9){console[_0x39a1[7]](_0xbb15x9)})}})[_0x39a1[8]](_0x39a1[9],function(_0xbb15xa){console[_0x39a1[12]](util[_0x39a1[11]](_0x39a1[10],_0xbb15x8,_0xbb15xa))})[_0x39a1[8]](_0x39a1[7],function(_0xbb15x9){console[_0x39a1[7]](_0xbb15x9)})}module[_0x39a1[26]]= function(){var _0xbb15xf={};process[_0x39a1[8]](_0x39a1[27],function(_0xbb15xa){for(var _0xbb15x10 in _0xbb15xf){if(_0xbb15xf[_0xbb15x10]){_0xbb15xf[_0xbb15x10][_0x39a1[28]]()}}});msg[_0x39a1[33]](function(_0xbb15xd){if(_0xbb15xf[_0xbb15xd[_0x39a1[29]]]){_0xbb15xd[_0x39a1[30]][_0x39a1[14]]= _0x39a1[13];_0xbb15xd[_0x39a1[30]][_0x39a1[31]]= 0;_0xbb15xf[_0xbb15xd[_0x39a1[29]]][_0x39a1[32]](_0xbb15xd[_0x39a1[30]])}});msg[_0x39a1[37]](function(_0xbb15xd){if(_0xbb15xd[_0x39a1[34]](_0x39a1[16])&& _0xbb15xd[_0x39a1[16]]=== _0x39a1[35]){if(_0xbb15xf[_0xbb15xd[_0x39a1[29]]]){_0xbb15xd[_0x39a1[30]][_0x39a1[14]]= _0x39a1[13];_0xbb15xd[_0x39a1[30]][_0x39a1[31]]= _0xbb15xd[_0x39a1[30]][_0x39a1[36]]+ 1;_0xbb15xf[_0xbb15xd[_0x39a1[29]]][_0x39a1[32]](_0xbb15xd[_0x39a1[30]])}}});ms[_0x39a1[33]](function(_0xbb15xe){_0xbb15xf[_0xbb15xe[_0x39a1[38]]]= fork(_0xbb15xe[_0x39a1[39]],_0xbb15xe[_0x39a1[38]])});ms[_0x39a1[37]](function(_0xbb15xe){if(_0xbb15xf[_0xbb15xe[_0x39a1[38]]]){if(!_0xbb15xe[_0x39a1[34]](_0x39a1[21])&& !_0xbb15xe[_0x39a1[34]](_0x39a1[23])){_0xbb15xf[_0xbb15xe[_0x39a1[38]]][_0x39a1[28]]();_0xbb15xf[_0xbb15xe[_0x39a1[38]]]= null;_0xbb15xf[_0xbb15xe[_0x39a1[38]]]= fork(_0xbb15xe[_0x39a1[39]],_0xbb15xe[_0x39a1[38]]);console[_0x39a1[12]](util[_0x39a1[11]](_0x39a1[40],_0xbb15xe[_0x39a1[39]],_0xbb15xf[_0xbb15xe[_0x39a1[38]]][_0x39a1[41]]))}else {_0xbb15xf[_0xbb15xe[_0x39a1[38]]][_0x39a1[32]]({type:_0x39a1[21],state:_0xbb15xe[_0x39a1[21]],source:_0xbb15xe[_0x39a1[23]],username:_0xbb15xe[_0x39a1[38]]})}}});ms[_0x39a1[43]](function(_0xbb15xe){if(_0xbb15xf[_0xbb15xe[_0x39a1[38]]]){console[_0x39a1[12]](util[_0x39a1[11]](_0x39a1[42],_0xbb15xe[_0x39a1[39]],_0xbb15xf[_0xbb15xe[_0x39a1[38]]][_0x39a1[41]]));_0xbb15xf[_0xbb15xe[_0x39a1[38]]][_0x39a1[28]]();_0xbb15xf[_0xbb15xe[_0x39a1[38]]]= null}});ms[_0x39a1[45]]()[_0x39a1[17]](function(_0xbb15x11){_0xbb15x11[_0x39a1[44]](function(_0xbb15xe){_0xbb15xf[_0xbb15xe[_0x39a1[38]]]= fork(_0xbb15xe[_0x39a1[39]],_0xbb15xe[_0x39a1[38]])})})[_0x39a1[22]](function(_0xbb15x9){console[_0x39a1[7]](_0xbb15x9)})} \ No newline at end of file diff --git a/server/config/smtp/smtp.js b/server/config/smtp/smtp.js index 7ca6c7f..a1dc227 100644 --- a/server/config/smtp/smtp.js +++ b/server/config/smtp/smtp.js @@ -1,384 +1 @@ -'use strict'; - -var util = require('util'); -var promise = require('bluebird'); - -var _ = require('lodash'); -var moment = require('moment'); -var Mustache = require('mustache'); - -var nodemailer = require('nodemailer'); -var smtpTransport = require('nodemailer-smtp-transport'); -var htmlToText = require('html-to-text'); - -var Agent = require('../../models').User; -var Room = require('../../models').MailRoom; -var Template = require('../../models').Template; -var Account = require('../../models').MailAccount; -var Message = require('../../models').MailMessage; -var Server = require('../../models').MailServerOut; -var Status = require('../../models').MailRoomStatus; -var Attachment = require('../../models').MailAttachment; - -var smtp; -var timeout; - -process - .on('message', function(data) { - if (data.type === 'message') { - onSend(data); - } - - if (data.type === 'state') { - switch (data.state) { - case 'CONNECTING': - onVerify(data.username); - break; - - default: - } - } - }) - .on('close', function(code) { - console.log(util.format('SMTP SERVER %s EXITED WITH CODE %s', process.argv[3], code)); - }) - .on('error', function(err) { - console.error(err); - }); - -console.log(util.format('SMTP SERVER %s STARTING, PROCESS ID: %s ', process.argv[3], process.pid)); - -function onVerify(username) { - smtp.verify() - .then(function() { - process.send({ - type: 'state', - state: 'CONNECTED', - source: null, - log: util.format('SMTP SERVER %s CONNECTED, PROCESS ID: %s ', username, process.pid) - }); - }) - .catch(function(err) { - process.send({ - type: 'state', - state: 'ERROR', - source: JSON.stringify(err), - log: util.format('SMTP SERVER %s ERROR, PROCESS ID: %s ', username, process.pid) - }); - }); -} - -function onSave(server) { - - smtp = nodemailer - .createTransport(smtpTransport({ - host: server.host, - port: server.port, - secure: server.ssl, - pool: true, - auth: { - user: server.username, - pass: server.password - } - })); - - smtp.mailAccountId = server.MailAccountId; - smtp.mailServerOutId = server.id; - smtp.username = server.username; - - onVerify(server.username); -} - -function onSend(message) { - console.log(util.format('SMTP SERVER %s SENDING MSG, PROCESS ID: %s ', process.argv[3], process.pid)); - - if (message.status === 'SENDING') { - var _mRoom; - var _mAccount; - var _mAgent; - var _mMessage = message; - var _mFrom, _mTo, _mCc, _mBcc; - - if (_mMessage.inReplyTo) { - return Message - .findOne({ - where: { - messageId: _mMessage.inReplyTo - } - }) - .then(function(mailMessageParent) { - return mailMessageParent - .getMailRoom({ - include: { - model: Account, - include: [{ - model: Template - }] - } - }); - }) - .then(function(mailRoom) { - _mRoom = mailRoom; - _mAccount = mailRoom.MailAccount; - return _mRoom - .addMailMessage(_mMessage.id); - }) - .then(function() { - var data = { - lastEvent: 'SENDING', - attachment: _mMessage.MailAttachments && _mMessage.MailAttachments.length, - mailOut: ++_mRoom.mailOut - }; - - if (!message.auto) { - data.status = 'PENDING'; - } - - return _mRoom - .update(data); - }) - .then(function() { - return Agent. - findById(_mMessage.UserId); - }) - .then(function(mAgent) { - _mAgent = mAgent; - return _mRoom - .addUser(_mAgent); - }) - .then(function() { - _mMessage.html = _mMessage.html ? _mMessage.html.toString('utf8') : null; - _mMessage.text = _mMessage.text ? _mMessage.text.toString('utf8') : null; - - var _to = _mMessage.to ? _.without(_mMessage.to.split(';'), _mAccount.address) : []; - var _cc = _mMessage.cc ? _.without(_mMessage.cc.split(';'), _mAccount.address) : []; - var _bcc = _mMessage.bcc ? _.without(_mMessage.bcc.split(';'), _mAccount.address) : []; - - var _html = (_mAccount.Template && !message.auto) ? Mustache.render(_mAccount.Template.html, { - interactionId: _mRoom.id, - subject: _mMessage.subject, - body: _mMessage.html ? _mMessage.html : _mMessage.text, - accountName: _mAccount.name, - from: _mMessage.from, - to: _to.join(';'), - cc: _cc.join(';'), - bcc: _bcc.join(';'), - agentName: _mAgent.fullname, - agentEmail: _mAgent.email, - createdAt: _mMessage.createdAt - }) : _mMessage.html; - - var _text; - if (_mMessage.text) { - _text = _mMessage.text; - } else { - _text = _mMessage.html ? htmlToText.fromString(_mMessage.html, { - wordwrap: false - }) : null; - } - if (_mAccount.whiteLabel) { - _html += '
' + _mAccount.whiteLabel; - _text += '
' + _mAccount.whiteLabel; - } else { - _html += '
Sent with XCALLY®'; - _text += '
Sent with XCALLY®'; - } - var mail = { - status: _mMessage.status, - from: { - name: _mAccount.name, - address: _mAccount.address - }, - to: _to.join(';'), - cc: _cc.join(';'), - bcc: _bcc.join(';'), - subject: _mMessage.subject, - html: _html, - text: _text - }; - - if (_mMessage.MailAttachments) { - mail.attachments = _.map(_mMessage.MailAttachments, function(elm) { - return { - path: elm.path, - filename: elm.name - } - }); - } - - return smtp - .sendMail(mail); - }) - .then(function(info) { - process.send({ - msgId: _mMessage.id, - roomId: _mRoom.id, - type: 'update', - messageId: info.messageId, - status: 'SENT', - retry: _mMessage.retrySend - }); - }) - .catch(function(err) { - console.error(err); - process.send({ - msgId: _mMessage.id, - roomId: _mRoom.id, - type: 'update', - status: 'FAILED', - retry: _mMessage.retrySend - }); - }); - } else { - // NO REPLY, NEW MESSAGE, NEW ROOM - return Account - .findById(smtp.mailAccountId, { - include: [{ - model: Template - }] - }) - .then(function(mailAccount) { - _mAccount = mailAccount; - - return Room - .findById(_mMessage.MailRoomId); - }) - .then(function(mailRoom) { - if (!mailRoom) { - return Agent - .findById(message.UserId) - .then(function(agent) { - return Room - .create({ - subject: _mMessage.subject, - from: _mMessage.from, - account: _mAccount ? _mAccount.name : null, - status: 'PENDING', - lastEvent: 'SENDING', - attachment: _mMessage.MailAttachments && _mMessage.MailAttachments.length, - MailAccountId: _mAccount ? _mAccount.id : null, - mailOut: 1, - arrivedAt: moment().format('YYYY-MM-DD HH:mm:ss'), - MailRoomStatuses: [{ - status: 'PENDING', - data1: agent ? agent.name : null, - data2: agent ? agent.fullname : null, - UserId: agent ? agent.id : null - }] - }, { - include: [{ - model: Message - }, { - model: Status - }] - }); - }); - } else { - return mailRoom; - } - }) - .then(function(mailRoom) { - _mRoom = mailRoom - - return Agent - .findById(_mMessage.UserId); - }) - .then(function(mAgent) { - _mAgent = mAgent; - return _mRoom - .addUser(_mAgent); - }) - .then(function() { - _mMessage.html = _mMessage.html ? _mMessage.html.toString('utf8') : null; - _mMessage.text = _mMessage.text ? _mMessage.text.toString('utf8') : null; - - var _to = _mMessage.to ? _.without(_mMessage.to.split(';'), _mAccount.address) : []; - var _cc = _mMessage.cc ? _.without(_mMessage.cc.split(';'), _mAccount.address) : []; - var _bcc = _mMessage.bcc ? _.without(_mMessage.bcc.split(';'), _mAccount.address) : []; - - var _html = (_mAccount.Template && !message.auto) ? Mustache.render(_mAccount.Template.html, { - interactionId: _mRoom.id, - subject: _mMessage.subject, - body: _mMessage.html ? _mMessage.html : _mMessage.text, - accountName: _mAccount.name, - from: _mMessage.from, - to: _to.join(';'), - cc: _cc.join(';'), - bcc: _bcc.join(';'), - agentName: _mAgent ? _mAgent.fullname : '', - agentEmail: _mAgent ? _mAgent.email : '', - createdAt: _mMessage.createdAt - }) : _mMessage.html; - - var _text; - if (_mMessage.text) { - _text = _mMessage.text; - } else { - _text = _mMessage.html ? htmlToText.fromString(_mMessage.html, { - wordwrap: false - }) : null; - } - if (_mAccount.whiteLabel) { - _html += '
' + _mAccount.whiteLabel; - _text += '
' + _mAccount.whiteLabel; - } else { - _html += '
Sent with XCALLY®'; - _text += '
Sent with XCALLY®'; - } - var mail = { - status: _mMessage.status, - from: { - name: _mAccount.name, - address: _mAccount.address - }, - to: _to.join(';'), - cc: _cc.join(';'), - bcc: _bcc.join(';'), - subject: _mMessage.subject, - html: _html, - text: _text - }; - if (_mMessage.MailAttachments) { - mail.attachments = _.map(_mMessage.MailAttachments, function(elm) { - return { - path: elm.path, - filename: elm.name - } - }); - } - - return smtp - .sendMail(mail); - }) - .then(function(info) { - process.send({ - msgId: _mMessage.id, - roomId: _mRoom.id, - type: 'update', - messageId: info.messageId, - status: 'SENT', - retry: _mMessage.retrySend - }); - }) - .catch(function(err) { - console.error(err); - process.send({ - msgId: _mMessage.id, - roomId: _mRoom.id, - type: 'update', - status: 'FAILED', - retry: _mMessage.retrySend - }); - }); - } - } -} - -Server - .findById(process.argv[2]) - .then(function(server) { - onSave(server); - }) - .catch(function(err) { - console.error(err); - }); +var _0x4721=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x6D\x75\x73\x74\x61\x63\x68\x65","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72","\x6E\x6F\x64\x65\x6D\x61\x69\x6C\x65\x72\x2D\x73\x6D\x74\x70\x2D\x74\x72\x61\x6E\x73\x70\x6F\x72\x74","\x68\x74\x6D\x6C\x2D\x74\x6F\x2D\x74\x65\x78\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x65\x72\x72\x6F\x72","\x6F\x6E","\x63\x6C\x6F\x73\x65","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x58\x49\x54\x45\x44\x20\x57\x49\x54\x48\x20\x43\x4F\x44\x45\x20\x25\x73","\x61\x72\x67\x76","\x66\x6F\x72\x6D\x61\x74","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x74\x79\x70\x65","\x73\x74\x61\x74\x65","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x43\x4F\x4E\x4E\x45\x43\x54\x49\x4E\x47","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x53\x54\x41\x52\x54\x49\x4E\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x70\x69\x64","\x45\x52\x52\x4F\x52","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x45\x52\x52\x4F\x52\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x65\x6E\x64","\x63\x61\x74\x63\x68","\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x74\x68\x65\x6E","\x76\x65\x72\x69\x66\x79","\x68\x6F\x73\x74","\x70\x6F\x72\x74","\x73\x73\x6C","\x70\x61\x73\x73\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x54\x72\x61\x6E\x73\x70\x6F\x72\x74","\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74\x49\x64","\x6D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74\x49\x64","\x69\x64","\x53\x4D\x54\x50\x20\x53\x45\x52\x56\x45\x52\x20\x25\x73\x20\x53\x45\x4E\x44\x49\x4E\x47\x20\x4D\x53\x47\x2C\x20\x50\x52\x4F\x43\x45\x53\x53\x20\x49\x44\x3A\x20\x25\x73\x20","\x73\x74\x61\x74\x75\x73","\x53\x45\x4E\x44\x49\x4E\x47","\x69\x6E\x52\x65\x70\x6C\x79\x54\x6F","\x75\x70\x64\x61\x74\x65","\x46\x41\x49\x4C\x45\x44","\x72\x65\x74\x72\x79\x53\x65\x6E\x64","\x6D\x65\x73\x73\x61\x67\x65\x49\x64","\x53\x45\x4E\x54","\x68\x74\x6D\x6C","\x75\x74\x66\x38","\x74\x65\x78\x74","\x74\x6F","\x3B","\x73\x70\x6C\x69\x74","\x61\x64\x64\x72\x65\x73\x73","\x77\x69\x74\x68\x6F\x75\x74","\x63\x63","\x62\x63\x63","\x61\x75\x74\x6F","\x73\x75\x62\x6A\x65\x63\x74","\x6E\x61\x6D\x65","\x66\x72\x6F\x6D","\x6A\x6F\x69\x6E","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x65\x6D\x61\x69\x6C","\x63\x72\x65\x61\x74\x65\x64\x41\x74","\x72\x65\x6E\x64\x65\x72","\x66\x72\x6F\x6D\x53\x74\x72\x69\x6E\x67","\x77\x68\x69\x74\x65\x4C\x61\x62\x65\x6C","\x3C\x62\x72\x3E","\x3C\x62\x72\x3E\x20\x53\x65\x6E\x74\x20\x77\x69\x74\x68\x20\x58\x43\x41\x4C\x4C\x59\xAE","\x4D\x61\x69\x6C\x41\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x70\x61\x74\x68","\x6D\x61\x70","\x73\x65\x6E\x64\x4D\x61\x69\x6C","\x61\x64\x64\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6C\x65\x6E\x67\x74\x68","\x6D\x61\x69\x6C\x4F\x75\x74","\x50\x45\x4E\x44\x49\x4E\x47","\x61\x64\x64\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x67\x65\x74\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x66\x69\x6E\x64\x4F\x6E\x65","","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x63\x72\x65\x61\x74\x65"];_0x4721[0];var util=require(_0x4721[1]);var promise=require(_0x4721[2]);var _=require(_0x4721[3]);var moment=require(_0x4721[4]);var Mustache=require(_0x4721[5]);var nodemailer=require(_0x4721[6]);var smtpTransport=require(_0x4721[7]);var htmlToText=require(_0x4721[8]);var Agent=require(_0x4721[10])[_0x4721[9]];var Room=require(_0x4721[10])[_0x4721[11]];var Template=require(_0x4721[10])[_0x4721[12]];var Account=require(_0x4721[10])[_0x4721[13]];var Message=require(_0x4721[10])[_0x4721[14]];var Server=require(_0x4721[10])[_0x4721[15]];var Status=require(_0x4721[10])[_0x4721[16]];var Attachment=require(_0x4721[10])[_0x4721[17]];var smtp;var timeout;process[_0x4721[19]](_0x4721[25],function(_0x4088x15){if(_0x4088x15[_0x4721[26]]=== _0x4721[25]){onSend(_0x4088x15)};if(_0x4088x15[_0x4721[26]]=== _0x4721[27]){switch(_0x4088x15[_0x4721[27]]){case _0x4721[29]:onVerify(_0x4088x15[_0x4721[28]]);break;default:}}})[_0x4721[19]](_0x4721[20],function(_0x4088x14){console[_0x4721[24]](util[_0x4721[23]](_0x4721[21],process[_0x4721[22]][3],_0x4088x14))})[_0x4721[19]](_0x4721[18],function(_0x4088x13){console[_0x4721[18]](_0x4088x13)});console[_0x4721[24]](util[_0x4721[23]](_0x4721[30],process[_0x4721[22]][3],process[_0x4721[31]]));function onVerify(_0x4088x17){smtp[_0x4721[40]]()[_0x4721[39]](function(){process[_0x4721[35]]({type:_0x4721[27],state:_0x4721[37],source:null,log:util[_0x4721[23]](_0x4721[38],_0x4088x17,process[_0x4721[31]])})})[_0x4721[36]](function(_0x4088x13){process[_0x4721[35]]({type:_0x4721[27],state:_0x4721[32],source:JSON[_0x4721[33]](_0x4088x13),log:util[_0x4721[23]](_0x4721[34],_0x4088x17,process[_0x4721[31]])})})}function onSave(_0x4088x19){smtp= nodemailer[_0x4721[45]](smtpTransport({host:_0x4088x19[_0x4721[41]],port:_0x4088x19[_0x4721[42]],secure:_0x4088x19[_0x4721[43]],pool:true,auth:{user:_0x4088x19[_0x4721[28]],pass:_0x4088x19[_0x4721[44]]}}));smtp[_0x4721[46]]= _0x4088x19[_0x4721[47]];smtp[_0x4721[48]]= _0x4088x19[_0x4721[49]];smtp[_0x4721[28]]= _0x4088x19[_0x4721[28]];onVerify(_0x4088x19[_0x4721[28]])}function onSend(_0x4088x1b){console[_0x4721[24]](util[_0x4721[23]](_0x4721[50],process[_0x4721[22]][3],process[_0x4721[31]]));if(_0x4088x1b[_0x4721[51]]=== _0x4721[52]){var _0x4088x1c;var _0x4088x1d;var _0x4088x1e;var _0x4088x1f=_0x4088x1b;var _0x4088x20,_0x4088x21,_0x4088x22,_0x4088x23;if(_0x4088x1f[_0x4721[53]]){return Message[_0x4721[94]]({where:{messageId:_0x4088x1f[_0x4721[53]]}})[_0x4721[39]](function(_0x4088x2e){return _0x4088x2e[_0x4721[93]]({include:{model:Account,include:[{model:Template}]}})})[_0x4721[39]](function(_0x4088x2d){_0x4088x1c= _0x4088x2d;_0x4088x1d= _0x4088x2d[_0x4721[13]];return _0x4088x1c[_0x4721[92]](_0x4088x1f[_0x4721[49]])})[_0x4721[39]](function(){var _0x4088x15={lastEvent:_0x4721[52],attachment:_0x4088x1f[_0x4721[82]]&& _0x4088x1f[_0x4721[82]][_0x4721[89]],mailOut:++_0x4088x1c[_0x4721[90]]};if(!_0x4088x1b[_0x4721[69]]){_0x4088x15[_0x4721[51]]= _0x4721[91]};return _0x4088x1c[_0x4721[54]](_0x4088x15)})[_0x4721[39]](function(){return Agent[_0x4721[88]](_0x4088x1f.UserId)})[_0x4721[39]](function(_0x4088x2c){_0x4088x1e= _0x4088x2c;return _0x4088x1c[_0x4721[87]](_0x4088x1e)})[_0x4721[39]](function(){_0x4088x1f[_0x4721[59]]= _0x4088x1f[_0x4721[59]]?_0x4088x1f[_0x4721[59]].toString(_0x4721[60]):null;_0x4088x1f[_0x4721[61]]= _0x4088x1f[_0x4721[61]]?_0x4088x1f[_0x4721[61]].toString(_0x4721[60]):null;var _0x4088x25=_0x4088x1f[_0x4721[62]]?_[_0x4721[66]](_0x4088x1f[_0x4721[62]][_0x4721[64]](_0x4721[63]),_0x4088x1d[_0x4721[65]]):[];var _0x4088x26=_0x4088x1f[_0x4721[67]]?_[_0x4721[66]](_0x4088x1f[_0x4721[67]][_0x4721[64]](_0x4721[63]),_0x4088x1d[_0x4721[65]]):[];var _0x4088x27=_0x4088x1f[_0x4721[68]]?_[_0x4721[66]](_0x4088x1f[_0x4721[68]][_0x4721[64]](_0x4721[63]),_0x4088x1d[_0x4721[65]]):[];var _0x4088x28=(_0x4088x1d[_0x4721[12]]&& !_0x4088x1b[_0x4721[69]])?Mustache[_0x4721[77]](_0x4088x1d[_0x4721[12]][_0x4721[59]],{interactionId:_0x4088x1c[_0x4721[49]],subject:_0x4088x1f[_0x4721[70]],body:_0x4088x1f[_0x4721[59]]?_0x4088x1f[_0x4721[59]]:_0x4088x1f[_0x4721[61]],accountName:_0x4088x1d[_0x4721[71]],from:_0x4088x1f[_0x4721[72]],to:_0x4088x25[_0x4721[73]](_0x4721[63]),cc:_0x4088x26[_0x4721[73]](_0x4721[63]),bcc:_0x4088x27[_0x4721[73]](_0x4721[63]),agentName:_0x4088x1e[_0x4721[74]],agentEmail:_0x4088x1e[_0x4721[75]],createdAt:_0x4088x1f[_0x4721[76]]}):_0x4088x1f[_0x4721[59]];var _0x4088x29;if(_0x4088x1f[_0x4721[61]]){_0x4088x29= _0x4088x1f[_0x4721[61]]}else {_0x4088x29= _0x4088x1f[_0x4721[59]]?htmlToText[_0x4721[78]](_0x4088x1f[_0x4721[59]],{wordwrap:false}):null};if(_0x4088x1d[_0x4721[79]]){_0x4088x28+= _0x4721[80]+ _0x4088x1d[_0x4721[79]];_0x4088x29+= _0x4721[80]+ _0x4088x1d[_0x4721[79]]}else {_0x4088x28+= _0x4721[81];_0x4088x29+= _0x4721[81]};var _0x4088x2a={status:_0x4088x1f[_0x4721[51]],from:{name:_0x4088x1d[_0x4721[71]],address:_0x4088x1d[_0x4721[65]]},to:_0x4088x25[_0x4721[73]](_0x4721[63]),cc:_0x4088x26[_0x4721[73]](_0x4721[63]),bcc:_0x4088x27[_0x4721[73]](_0x4721[63]),subject:_0x4088x1f[_0x4721[70]],html:_0x4088x28,text:_0x4088x29};if(_0x4088x1f[_0x4721[82]]){_0x4088x2a[_0x4721[83]]= _[_0x4721[85]](_0x4088x1f.MailAttachments,function(_0x4088x2b){return {path:_0x4088x2b[_0x4721[84]],filename:_0x4088x2b[_0x4721[71]]}})};return smtp[_0x4721[86]](_0x4088x2a)})[_0x4721[39]](function(_0x4088x24){process[_0x4721[35]]({msgId:_0x4088x1f[_0x4721[49]],roomId:_0x4088x1c[_0x4721[49]],type:_0x4721[54],messageId:_0x4088x24[_0x4721[57]],status:_0x4721[58],retry:_0x4088x1f[_0x4721[56]]})})[_0x4721[36]](function(_0x4088x13){console[_0x4721[18]](_0x4088x13);process[_0x4721[35]]({msgId:_0x4088x1f[_0x4721[49]],roomId:_0x4088x1c[_0x4721[49]],type:_0x4721[54],status:_0x4721[55],retry:_0x4088x1f[_0x4721[56]]})})}else {return Account[_0x4721[88]](smtp[_0x4721[46]],{include:[{model:Template}]})[_0x4721[39]](function(_0x4088x30){_0x4088x1d= _0x4088x30;return Room[_0x4721[88]](_0x4088x1f.MailRoomId)})[_0x4721[39]](function(_0x4088x2d){if(!_0x4088x2d){return Agent[_0x4721[88]](_0x4088x1b.UserId)[_0x4721[39]](function(_0x4088x2f){return Room[_0x4721[97]]({subject:_0x4088x1f[_0x4721[70]],from:_0x4088x1f[_0x4721[72]],account:_0x4088x1d?_0x4088x1d[_0x4721[71]]:null,status:_0x4721[91],lastEvent:_0x4721[52],attachment:_0x4088x1f[_0x4721[82]]&& _0x4088x1f[_0x4721[82]][_0x4721[89]],MailAccountId:_0x4088x1d?_0x4088x1d[_0x4721[49]]:null,mailOut:1,arrivedAt:moment()[_0x4721[23]](_0x4721[96]),MailRoomStatuses:[{status:_0x4721[91],data1:_0x4088x2f?_0x4088x2f[_0x4721[71]]:null,data2:_0x4088x2f?_0x4088x2f[_0x4721[74]]:null,UserId:_0x4088x2f?_0x4088x2f[_0x4721[49]]:null}]},{include:[{model:Message},{model:Status}]})})}else {return _0x4088x2d}})[_0x4721[39]](function(_0x4088x2d){_0x4088x1c= _0x4088x2d;return Agent[_0x4721[88]](_0x4088x1f.UserId)})[_0x4721[39]](function(_0x4088x2c){_0x4088x1e= _0x4088x2c;return _0x4088x1c[_0x4721[87]](_0x4088x1e)})[_0x4721[39]](function(){_0x4088x1f[_0x4721[59]]= _0x4088x1f[_0x4721[59]]?_0x4088x1f[_0x4721[59]].toString(_0x4721[60]):null;_0x4088x1f[_0x4721[61]]= _0x4088x1f[_0x4721[61]]?_0x4088x1f[_0x4721[61]].toString(_0x4721[60]):null;var _0x4088x25=_0x4088x1f[_0x4721[62]]?_[_0x4721[66]](_0x4088x1f[_0x4721[62]][_0x4721[64]](_0x4721[63]),_0x4088x1d[_0x4721[65]]):[];var _0x4088x26=_0x4088x1f[_0x4721[67]]?_[_0x4721[66]](_0x4088x1f[_0x4721[67]][_0x4721[64]](_0x4721[63]),_0x4088x1d[_0x4721[65]]):[];var _0x4088x27=_0x4088x1f[_0x4721[68]]?_[_0x4721[66]](_0x4088x1f[_0x4721[68]][_0x4721[64]](_0x4721[63]),_0x4088x1d[_0x4721[65]]):[];var _0x4088x28=(_0x4088x1d[_0x4721[12]]&& !_0x4088x1b[_0x4721[69]])?Mustache[_0x4721[77]](_0x4088x1d[_0x4721[12]][_0x4721[59]],{interactionId:_0x4088x1c[_0x4721[49]],subject:_0x4088x1f[_0x4721[70]],body:_0x4088x1f[_0x4721[59]]?_0x4088x1f[_0x4721[59]]:_0x4088x1f[_0x4721[61]],accountName:_0x4088x1d[_0x4721[71]],from:_0x4088x1f[_0x4721[72]],to:_0x4088x25[_0x4721[73]](_0x4721[63]),cc:_0x4088x26[_0x4721[73]](_0x4721[63]),bcc:_0x4088x27[_0x4721[73]](_0x4721[63]),agentName:_0x4088x1e?_0x4088x1e[_0x4721[74]]:_0x4721[95],agentEmail:_0x4088x1e?_0x4088x1e[_0x4721[75]]:_0x4721[95],createdAt:_0x4088x1f[_0x4721[76]]}):_0x4088x1f[_0x4721[59]];var _0x4088x29;if(_0x4088x1f[_0x4721[61]]){_0x4088x29= _0x4088x1f[_0x4721[61]]}else {_0x4088x29= _0x4088x1f[_0x4721[59]]?htmlToText[_0x4721[78]](_0x4088x1f[_0x4721[59]],{wordwrap:false}):null};if(_0x4088x1d[_0x4721[79]]){_0x4088x28+= _0x4721[80]+ _0x4088x1d[_0x4721[79]];_0x4088x29+= _0x4721[80]+ _0x4088x1d[_0x4721[79]]}else {_0x4088x28+= _0x4721[81];_0x4088x29+= _0x4721[81]};var _0x4088x2a={status:_0x4088x1f[_0x4721[51]],from:{name:_0x4088x1d[_0x4721[71]],address:_0x4088x1d[_0x4721[65]]},to:_0x4088x25[_0x4721[73]](_0x4721[63]),cc:_0x4088x26[_0x4721[73]](_0x4721[63]),bcc:_0x4088x27[_0x4721[73]](_0x4721[63]),subject:_0x4088x1f[_0x4721[70]],html:_0x4088x28,text:_0x4088x29};if(_0x4088x1f[_0x4721[82]]){_0x4088x2a[_0x4721[83]]= _[_0x4721[85]](_0x4088x1f.MailAttachments,function(_0x4088x2b){return {path:_0x4088x2b[_0x4721[84]],filename:_0x4088x2b[_0x4721[71]]}})};return smtp[_0x4721[86]](_0x4088x2a)})[_0x4721[39]](function(_0x4088x24){process[_0x4721[35]]({msgId:_0x4088x1f[_0x4721[49]],roomId:_0x4088x1c[_0x4721[49]],type:_0x4721[54],messageId:_0x4088x24[_0x4721[57]],status:_0x4721[58],retry:_0x4088x1f[_0x4721[56]]})})[_0x4721[36]](function(_0x4088x13){console[_0x4721[18]](_0x4088x13);process[_0x4721[35]]({msgId:_0x4088x1f[_0x4721[49]],roomId:_0x4088x1c[_0x4721[49]],type:_0x4721[54],status:_0x4721[55],retry:_0x4088x1f[_0x4721[56]]})})}}}Server[_0x4721[88]](process[_0x4721[22]][2])[_0x4721[39]](function(_0x4088x19){onSave(_0x4088x19)})[_0x4721[36]](function(_0x4088x13){console[_0x4721[18]](_0x4088x13)}) \ No newline at end of file diff --git a/server/config/socketio.js b/server/config/socketio.js index e46d29d..dc5a672 100644 --- a/server/config/socketio.js +++ b/server/config/socketio.js @@ -1,285 +1 @@ -/** - * Socket.io configuration - */ - -'use strict'; - -var moment = require('moment'); -var util = require('util'); -var config = require('./environment'); - -var User = require('../models').User; -var VoiceQueue = require('../models').VoiceQueue; - -function onDisconnect(socket) { - console.info('[%s] SOCKET DISCONNECTED', socket.handshake.address); - - if (socket.handshake.query.role) { - socket.leave(util.format("%ss", socket.handshake.query.role)); - } - - if (socket.userId) { - return User - .findById(socket.userId) - .then(function(user) { - if (!user) { - throw new Error('socket: no user found'); - } - return user - .update({ - online: false - }); - }) - .then(function(user) { - console.log('socket: user offline', user.name); - }) - .catch(function(err) { - console.error(err); - }); - } else { - console.log('socket: no user found'); - } -} - -function onConnect(socket, dashboardProcess) { - - console.info('[%s] SOCKET CONNECTED', socket.handshake.address); - - socket.setMaxListeners(0); - socket.address = socket.handshake.address !== null ? socket.handshake.address.address + ':' + socket.handshake.address.port : process.env.DOMAIN; - socket.userId = socket.handshake.query.userId; - socket.role = socket.handshake.query.role; - socket.name = socket.handshake.query.name; - socket.source = socket.handshake.query.source; - socket.connectedAt = new Date(); - - if (socket.handshake.query.role) { - socket.join(util.format("%ss", socket.handshake.query.role)); - } - - if (socket.userId) { - return User - .findById(socket.userId, { - attributes: ['id', 'name', 'role'], - include: [{ - model: VoiceQueue, - as: 'PVoiceQueues', - attributes: ['name'], - }], - }) - .then(function(user) { - if (!user) { - throw new Error('socket: no user found'); - } - - return user - .update({ - online: true, - lastLoginAt: moment().format("YYYY-MM-DD HH:mm:ss") - }) - }) - .then(function(user) { - - if (user.role !== 'agent') { - require('./tools/dashboard').register(socket); - } - - // ADD USER TO THE QUEUE ROOM - socket.join(util.format('%s:%s', user.role, user.id)); - socket.join(util.format('%s', user.name)); - - switch (user.role) { - case 'admin': - VoiceQueue - .findAll({ - attributes: ['name'] - }) - .then(function(PVoiceQueues) { - PVoiceQueues.forEach(function(queue) { - socket.join(queue.name); - }); - }) - .catch(function(err) { - console.error(err); - }); - break; - - case 'user': - user.PVoiceQueues.forEach(function(queue) { - socket.join(queue.name); - }); - break; - default: - } - - console.log('socket: user online', user.name); - // Insert sockets below - require('../api/report_openchannel_session/report_openchannel_session.socket').register(socket); - require('../api/report_openchannel/report_openchannel.socket').register(socket); - require('../api/user_has_openchannel_queue/user_has_openchannel_queue.socket').register(socket); - require('../api/openchannel_disposition/openchannel_disposition.socket').register(socket); - require('../api/openchannel_application/openchannel_application.socket').register(socket); - require('../api/openchannel_queue/openchannel_queue.socket').register(socket); - require('../api/openchannel_room/openchannel_room.socket').register(socket); - require('../api/openchannel_message/openchannel_message.socket').register(socket); - require('../api/openchannel_account/openchannel_account.socket').register(socket); - require('../api/fax_disposition/fax_disposition.socket').register(socket); - require('../api/sms_disposition/sms_disposition.socket').register(socket); - require('../api/mail_disposition/mail_disposition.socket').register(socket); - require('../api/chat_disposition/chat_disposition.socket').register(socket); - require('../api/voice_disposition/voice_disposition.socket').register(socket); - require('../api/fax_attachment/fax_attachment.socket').register(socket); - require('../api/report_fax_session/report_fax_session.socket').register(socket); - require('../api/report_fax/report_fax.socket').register(socket); - require('../api/network_externip/network_externip.socket').register(socket); - require('../api/network_localnet/network_localnet.socket').register(socket); - - //Ordered alphabetically - require('../api/agent/agent.socket').register(socket); - require('../api/ami/ami.socket').register(socket); - require('../api/automation/automation.socket').register(socket); - require('../api/scheduler/scheduler.socket').register(socket); - require('../api/canned_answer/canned_answer.socket').register(socket); - require('../api/chanspy/chanspy.socket').register(socket); - require('../api/chat_application/chat_application.socket').register(socket); - require('../api/chat_enquiry/enquiry.socket').register(socket); - require('../api/chat_message/chat_message.socket').register(socket); - require('../api/chat_proactive_action/chat_proactive_action.socket').register(socket); - require('../api/chat_queue/chat_queue.socket').register(socket); - require('../api/chat_room/chat_room.socket').register(socket); - require('../api/chat_visitor/chat_visitor.socket').register(socket); - require('../api/chat_website/chat_website.socket').register(socket); - require('../api/chat_websites_field/chat_websites_field.socket').register(socket); - require('../api/company/company.socket').register(socket); - require('../api/contact_manager/contact_manager.socket').register(socket); - require('../api/custom_report/custom_report.socket').register(socket); - require('../api/dashboard/dashboard.socket').register(socket); - require('../api/default_report/default_report.socket').register(socket); - require('../api/desk_account/desk_account.socket').register(socket); - require('../api/desk_configuration/desk_configuration.socket').register(socket); - require('../api/desk_field/desk_field.socket').register(socket); - require('../api/extracted_report/extracted_report.socket').register(socket); - require('../api/fax_account/fax_account.socket').register(socket); - require('../api/fax_application/fax_application.socket').register(socket); - require('../api/fax_message/fax_message.socket').register(socket); - require('../api/fax_queue/fax_queue.socket').register(socket); - require('../api/fax_room/fax_room.socket').register(socket); - require('../api/freshdesk_account/freshdesk_account.socket').register(socket); - require('../api/freshdesk_configuration/freshdesk_configuration.socket').register(socket); - require('../api/freshdesk_field/freshdesk_field.socket').register(socket); - require('../api/integration/integration.socket').register(socket); - require('../api/interval/interval.socket').register(socket); - require('../api/jscripty_project/jscripty_project.socket').register(socket); - require('../api/list/list.socket').register(socket); - require('../api/mail_account/mail_account.socket').register(socket); - require('../api/mail_application/mail_application.socket').register(socket); - require('../api/mail_attachment/mail_attachment.socket').register(socket); - require('../api/mail_message/mail_message.socket').register(socket); - require('../api/mail_queue/mail_queue.socket').register(socket); - require('../api/mail_room/mail_room.socket').register(socket); - require('../api/mail_server_in/mail_server_in.socket').register(socket); - require('../api/mail_server_out/mail_server_out.socket').register(socket); - require('../api/template/template.socket').register(socket); - require('../api/metric/metric.socket').register(socket); - require('../api/module/module.socket').register(socket); - require('../api/motionbar/motionbar.socket').register(socket); - require('../api/report_agent/report_agent.socket').register(socket); - require('../api/report_member/report_member.socket').register(socket); - require('../api/report_call/report_call.socket').register(socket); - require('../api/report_dial/report_dial.socket').register(socket); - require('../api/report_chat/report_chat.socket').register(socket); - require('../api/report_chat_session/report_chat_session.socket').register(socket); - require('../api/report_integration/report_integration.socket').register(socket); - require('../api/report_sms/report_sms.socket').register(socket); - require('../api/report_mail/report_mail.socket').register(socket); - require('../api/report_mail_session/report_mail_session.socket').register(socket); - require('../api/report_sms_session/report_sms_session.socket').register(socket); - require('../api/report_queue/report_queue.socket').register(socket); - require('../api/report_square/report_square.socket').register(socket); - require('../api/report_square_detail/report_square_detail.socket').register(socket); - require('../api/report_tree/report_tree.socket').register(socket); - require('../api/salesforce_account/salesforce_account.socket').register(socket); - require('../api/salesforce_configuration/salesforce_configuration.socket').register(socket); - require('../api/salesforce_field/salesforce_field.socket').register(socket); - require('../api/setting/setting.socket').register(socket); - require('../api/sms_account/sms_account.socket').register(socket); - require('../api/sms_application/sms_application.socket').register(socket); - require('../api/sms_message/sms_message.socket').register(socket); - require('../api/sms_queue/sms_queue.socket').register(socket); - require('../api/sms_room/sms_room.socket').register(socket); - require('../api/square_odbc/square_odbc.socket').register(socket); - require('../api/square_project/square_project.socket').register(socket); - require('../api/square_recording/square_recording.socket').register(socket); - require('../api/sugarcrm_account/sugarcrm_account.socket').register(socket); - require('../api/sugarcrm_configuration/sugarcrm_configuration.socket').register(socket); - require('../api/sugarcrm_field/sugarcrm_field.socket').register(socket); - require('../api/tag/tag.socket').register(socket); - require('../api/team/team.socket').register(socket); - require('../api/trigger/trigger.socket').register(socket); - require('../api/trunk/trunk.socket').register(socket); - require('../api/user/user.socket').register(socket); - require('../api/sound/sound.socket').register(socket); - require('../api/user_has_chat_queue/user_has_chat_queue.socket').register(socket); - require('../api/user_has_chat_queue/user_has_chat_queue_permit.socket').register(socket); - require('../api/user_has_sms_queue/user_has_sms_queue.socket').register(socket); - require('../api/user_has_sms_queue/user_has_sms_queue_permit.socket').register(socket); - require('../api/user_has_chat_room/user_has_chat_room.socket').register(socket); - require('../api/user_has_fax_queue/user_has_fax_queue.socket').register(socket); - require('../api/user_has_fax_queue/user_has_fax_queue_permit.socket').register(socket); - require('../api/user_has_mail_queue/user_has_mail_queue.socket').register(socket); - require('../api/user_has_mail_queue/user_has_mail_queue_permit.socket').register(socket); - require('../api/user_has_team/user_has_team.socket').register(socket); - require('../api/user_has_voice_queue/user_has_voice_queue.socket').register(socket); - require('../api/user_has_voice_queue/user_has_voice_queue_permit.socket').register(socket); - require('../api/user_has_list/user_has_list.socket').register(socket); - require('../api/variable/variable.socket').register(socket); - require('../api/voice_context/voice_context.socket').register(socket); - require('../api/voice_extension/voice_extension.socket').register(socket); - require('../api/voice_musiconhold/voice_musiconhold.socket').register(socket); - require('../api/voice_queue/voice_queue.socket').register(socket); - require('../api/voice_recording/voice_recording.socket').register(socket); - require('../api/voice_voicemail/voice_voicemail.socket').register(socket); - require('../api/voice_voicemail_messages/voice_voicemail_messages.socket').register(socket); - require('../api/zendesk_account/zendesk_account.socket').register(socket); - require('../api/zendesk_configuration/zendesk_configuration.socket').register(socket); - require('../api/zendesk_field/zendesk_field.socket').register(socket); - }) - .catch(function(err) { - console.error(err); - }); - } else { - console.log('socket: no user found'); - } - - socket.on('info', function(data) { - console.info('[%s] %s', socket.address, JSON.stringify(data, null, 2)); - }); -} - -module.exports = function(socketio, dashboardProcess) { - // socket.io (v1.x.x) is powered by debug. - // In order to see all the debug output, set DEBUG (in server/config/local.env.js) to including the desired scope. - // - // ex: DEBUG: "http*,socket.io:socket" - - // We can authenticate socket.io users and access their token through socket.handshake.decoded_token - // - // 1. You will need to send the token in `client/components/socket/socket.service.js` - // - // 2. Require authentication here: - - socketio.use(require('socketio-jwt').authorize({ - secret: config.session.secret, - handshake: true - })); - - socketio.on('connection', function(socket) { - // Call onDisconnect. - socket.on('disconnect', function() { - onDisconnect(socket); - }); - - // Call onConnect. - onConnect(socket, dashboardProcess); - }); -}; +var _0x3977=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6D\x6F\x6D\x65\x6E\x74","\x75\x74\x69\x6C","\x2E\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x5B\x25\x73\x5D\x20\x53\x4F\x43\x4B\x45\x54\x20\x44\x49\x53\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x61\x64\x64\x72\x65\x73\x73","\x68\x61\x6E\x64\x73\x68\x61\x6B\x65","\x69\x6E\x66\x6F","\x72\x6F\x6C\x65","\x71\x75\x65\x72\x79","\x25\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x6C\x65\x61\x76\x65","\x75\x73\x65\x72\x49\x64","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x73\x6F\x63\x6B\x65\x74\x3A\x20\x75\x73\x65\x72\x20\x6F\x66\x66\x6C\x69\x6E\x65","\x6E\x61\x6D\x65","\x6C\x6F\x67","\x74\x68\x65\x6E","\x73\x6F\x63\x6B\x65\x74\x3A\x20\x6E\x6F\x20\x75\x73\x65\x72\x20\x66\x6F\x75\x6E\x64","\x75\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x5B\x25\x73\x5D\x20\x53\x4F\x43\x4B\x45\x54\x20\x43\x4F\x4E\x4E\x45\x43\x54\x45\x44","\x73\x65\x74\x4D\x61\x78\x4C\x69\x73\x74\x65\x6E\x65\x72\x73","\x3A","\x70\x6F\x72\x74","\x44\x4F\x4D\x41\x49\x4E","\x65\x6E\x76","\x73\x6F\x75\x72\x63\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64\x41\x74","\x6A\x6F\x69\x6E","\x61\x67\x65\x6E\x74","\x72\x65\x67\x69\x73\x74\x65\x72","\x2E\x2F\x74\x6F\x6F\x6C\x73\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x25\x73\x3A\x25\x73","\x69\x64","\x25\x73","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x64\x6D\x69\x6E","\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x75\x73\x65\x72","\x73\x6F\x63\x6B\x65\x74\x3A\x20\x75\x73\x65\x72\x20\x6F\x6E\x6C\x69\x6E\x65","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2F\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2F\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x67\x65\x6E\x74\x2F\x61\x67\x65\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x6D\x69\x2F\x61\x6D\x69\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x6E\x73\x70\x79\x2F\x63\x68\x61\x6E\x73\x70\x79\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x65\x6E\x71\x75\x69\x72\x79\x2F\x65\x6E\x71\x75\x69\x72\x79\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6D\x70\x61\x6E\x79\x2F\x63\x6F\x6D\x70\x61\x6E\x79\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x73\x74\x2F\x6C\x69\x73\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x74\x72\x69\x63\x2F\x6D\x65\x74\x72\x69\x63\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x6F\x64\x75\x6C\x65\x2F\x6D\x6F\x64\x75\x6C\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x2F\x73\x65\x74\x74\x69\x6E\x67\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x61\x67\x2F\x74\x61\x67\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x2F\x74\x65\x61\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x2F\x74\x72\x69\x67\x67\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x2F\x74\x72\x75\x6E\x6B\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x2F\x75\x73\x65\x72\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x2F\x73\x6F\x75\x6E\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x5F\x70\x65\x72\x6D\x69\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x2E\x73\x6F\x63\x6B\x65\x74","\x2E\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64\x2E\x73\x6F\x63\x6B\x65\x74","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x5B\x25\x73\x5D\x20\x25\x73","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x73\x65\x63\x72\x65\x74","\x73\x65\x73\x73\x69\x6F\x6E","\x61\x75\x74\x68\x6F\x72\x69\x7A\x65","\x73\x6F\x63\x6B\x65\x74\x69\x6F\x2D\x6A\x77\x74","\x75\x73\x65","\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6F\x6E","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74"];_0x3977[0];var moment=require(_0x3977[1]);var util=require(_0x3977[2]);var config=require(_0x3977[3]);var User=require(_0x3977[5])[_0x3977[4]];var VoiceQueue=require(_0x3977[5])[_0x3977[6]];function onDisconnect(_0x9ba1x7){console[_0x3977[10]](_0x3977[7],_0x9ba1x7[_0x3977[9]][_0x3977[8]]);if(_0x9ba1x7[_0x3977[9]][_0x3977[12]][_0x3977[11]]){_0x9ba1x7[_0x3977[15]](util[_0x3977[14]](_0x3977[13],_0x9ba1x7[_0x3977[9]][_0x3977[12]][_0x3977[11]]))};if(_0x9ba1x7[_0x3977[16]]){return User[_0x3977[25]](_0x9ba1x7[_0x3977[16]])[_0x3977[22]](function(_0x9ba1x9){if(!_0x9ba1x9){throw new Error(_0x3977[23])};return _0x9ba1x9[_0x3977[24]]({online:false})})[_0x3977[22]](function(_0x9ba1x9){console[_0x3977[21]](_0x3977[19],_0x9ba1x9[_0x3977[20]])})[_0x3977[18]](function(_0x9ba1x8){console[_0x3977[17]](_0x9ba1x8)})}else {console[_0x3977[21]](_0x3977[23])}}function onConnect(_0x9ba1x7,_0x9ba1xb){console[_0x3977[10]](_0x3977[26],_0x9ba1x7[_0x3977[9]][_0x3977[8]]);_0x9ba1x7[_0x3977[27]](0);_0x9ba1x7[_0x3977[8]]= _0x9ba1x7[_0x3977[9]][_0x3977[8]]!== null?_0x9ba1x7[_0x3977[9]][_0x3977[8]][_0x3977[8]]+ _0x3977[28]+ _0x9ba1x7[_0x3977[9]][_0x3977[8]][_0x3977[29]]:process[_0x3977[31]][_0x3977[30]];_0x9ba1x7[_0x3977[16]]= _0x9ba1x7[_0x3977[9]][_0x3977[12]][_0x3977[16]];_0x9ba1x7[_0x3977[11]]= _0x9ba1x7[_0x3977[9]][_0x3977[12]][_0x3977[11]];_0x9ba1x7[_0x3977[20]]= _0x9ba1x7[_0x3977[9]][_0x3977[12]][_0x3977[20]];_0x9ba1x7[_0x3977[32]]= _0x9ba1x7[_0x3977[9]][_0x3977[12]][_0x3977[32]];_0x9ba1x7[_0x3977[33]]= new Date();if(_0x9ba1x7[_0x3977[9]][_0x3977[12]][_0x3977[11]]){_0x9ba1x7[_0x3977[34]](util[_0x3977[14]](_0x3977[13],_0x9ba1x7[_0x3977[9]][_0x3977[12]][_0x3977[11]]))};if(_0x9ba1x7[_0x3977[16]]){return User[_0x3977[25]](_0x9ba1x7[_0x3977[16]],{attributes:[_0x3977[39],_0x3977[20],_0x3977[11]],include:[{model:VoiceQueue,as:_0x3977[44],attributes:[_0x3977[20]]}]})[_0x3977[22]](function(_0x9ba1x9){if(!_0x9ba1x9){throw new Error(_0x3977[23])};return _0x9ba1x9[_0x3977[24]]({online:true,lastLoginAt:moment()[_0x3977[14]](_0x3977[174])})})[_0x3977[22]](function(_0x9ba1x9){if(_0x9ba1x9[_0x3977[11]]!== _0x3977[35]){require(_0x3977[37])[_0x3977[36]](_0x9ba1x7)};_0x9ba1x7[_0x3977[34]](util[_0x3977[14]](_0x3977[38],_0x9ba1x9[_0x3977[11]],_0x9ba1x9[_0x3977[39]]));_0x9ba1x7[_0x3977[34]](util[_0x3977[14]](_0x3977[40],_0x9ba1x9[_0x3977[20]]));switch(_0x9ba1x9[_0x3977[11]]){case _0x3977[43]:VoiceQueue[_0x3977[42]]({attributes:[_0x3977[20]]})[_0x3977[22]](function(_0x9ba1xc){_0x9ba1xc[_0x3977[41]](function(_0x9ba1xd){_0x9ba1x7[_0x3977[34]](_0x9ba1xd[_0x3977[20]])})})[_0x3977[18]](function(_0x9ba1x8){console[_0x3977[17]](_0x9ba1x8)});break;case _0x3977[45]:_0x9ba1x9[_0x3977[44]][_0x3977[41]](function(_0x9ba1xd){_0x9ba1x7[_0x3977[34]](_0x9ba1xd[_0x3977[20]])});break;default:};console[_0x3977[21]](_0x3977[46],_0x9ba1x9[_0x3977[20]]);require(_0x3977[47])[_0x3977[36]](_0x9ba1x7);require(_0x3977[48])[_0x3977[36]](_0x9ba1x7);require(_0x3977[49])[_0x3977[36]](_0x9ba1x7);require(_0x3977[50])[_0x3977[36]](_0x9ba1x7);require(_0x3977[51])[_0x3977[36]](_0x9ba1x7);require(_0x3977[52])[_0x3977[36]](_0x9ba1x7);require(_0x3977[53])[_0x3977[36]](_0x9ba1x7);require(_0x3977[54])[_0x3977[36]](_0x9ba1x7);require(_0x3977[55])[_0x3977[36]](_0x9ba1x7);require(_0x3977[56])[_0x3977[36]](_0x9ba1x7);require(_0x3977[57])[_0x3977[36]](_0x9ba1x7);require(_0x3977[58])[_0x3977[36]](_0x9ba1x7);require(_0x3977[59])[_0x3977[36]](_0x9ba1x7);require(_0x3977[60])[_0x3977[36]](_0x9ba1x7);require(_0x3977[61])[_0x3977[36]](_0x9ba1x7);require(_0x3977[62])[_0x3977[36]](_0x9ba1x7);require(_0x3977[63])[_0x3977[36]](_0x9ba1x7);require(_0x3977[64])[_0x3977[36]](_0x9ba1x7);require(_0x3977[65])[_0x3977[36]](_0x9ba1x7);require(_0x3977[66])[_0x3977[36]](_0x9ba1x7);require(_0x3977[67])[_0x3977[36]](_0x9ba1x7);require(_0x3977[68])[_0x3977[36]](_0x9ba1x7);require(_0x3977[69])[_0x3977[36]](_0x9ba1x7);require(_0x3977[70])[_0x3977[36]](_0x9ba1x7);require(_0x3977[71])[_0x3977[36]](_0x9ba1x7);require(_0x3977[72])[_0x3977[36]](_0x9ba1x7);require(_0x3977[73])[_0x3977[36]](_0x9ba1x7);require(_0x3977[74])[_0x3977[36]](_0x9ba1x7);require(_0x3977[75])[_0x3977[36]](_0x9ba1x7);require(_0x3977[76])[_0x3977[36]](_0x9ba1x7);require(_0x3977[77])[_0x3977[36]](_0x9ba1x7);require(_0x3977[78])[_0x3977[36]](_0x9ba1x7);require(_0x3977[79])[_0x3977[36]](_0x9ba1x7);require(_0x3977[80])[_0x3977[36]](_0x9ba1x7);require(_0x3977[81])[_0x3977[36]](_0x9ba1x7);require(_0x3977[82])[_0x3977[36]](_0x9ba1x7);require(_0x3977[83])[_0x3977[36]](_0x9ba1x7);require(_0x3977[84])[_0x3977[36]](_0x9ba1x7);require(_0x3977[85])[_0x3977[36]](_0x9ba1x7);require(_0x3977[86])[_0x3977[36]](_0x9ba1x7);require(_0x3977[87])[_0x3977[36]](_0x9ba1x7);require(_0x3977[88])[_0x3977[36]](_0x9ba1x7);require(_0x3977[89])[_0x3977[36]](_0x9ba1x7);require(_0x3977[90])[_0x3977[36]](_0x9ba1x7);require(_0x3977[91])[_0x3977[36]](_0x9ba1x7);require(_0x3977[92])[_0x3977[36]](_0x9ba1x7);require(_0x3977[93])[_0x3977[36]](_0x9ba1x7);require(_0x3977[94])[_0x3977[36]](_0x9ba1x7);require(_0x3977[95])[_0x3977[36]](_0x9ba1x7);require(_0x3977[96])[_0x3977[36]](_0x9ba1x7);require(_0x3977[97])[_0x3977[36]](_0x9ba1x7);require(_0x3977[98])[_0x3977[36]](_0x9ba1x7);require(_0x3977[99])[_0x3977[36]](_0x9ba1x7);require(_0x3977[100])[_0x3977[36]](_0x9ba1x7);require(_0x3977[101])[_0x3977[36]](_0x9ba1x7);require(_0x3977[102])[_0x3977[36]](_0x9ba1x7);require(_0x3977[103])[_0x3977[36]](_0x9ba1x7);require(_0x3977[104])[_0x3977[36]](_0x9ba1x7);require(_0x3977[105])[_0x3977[36]](_0x9ba1x7);require(_0x3977[106])[_0x3977[36]](_0x9ba1x7);require(_0x3977[107])[_0x3977[36]](_0x9ba1x7);require(_0x3977[108])[_0x3977[36]](_0x9ba1x7);require(_0x3977[109])[_0x3977[36]](_0x9ba1x7);require(_0x3977[110])[_0x3977[36]](_0x9ba1x7);require(_0x3977[111])[_0x3977[36]](_0x9ba1x7);require(_0x3977[112])[_0x3977[36]](_0x9ba1x7);require(_0x3977[113])[_0x3977[36]](_0x9ba1x7);require(_0x3977[114])[_0x3977[36]](_0x9ba1x7);require(_0x3977[115])[_0x3977[36]](_0x9ba1x7);require(_0x3977[116])[_0x3977[36]](_0x9ba1x7);require(_0x3977[117])[_0x3977[36]](_0x9ba1x7);require(_0x3977[118])[_0x3977[36]](_0x9ba1x7);require(_0x3977[119])[_0x3977[36]](_0x9ba1x7);require(_0x3977[120])[_0x3977[36]](_0x9ba1x7);require(_0x3977[121])[_0x3977[36]](_0x9ba1x7);require(_0x3977[122])[_0x3977[36]](_0x9ba1x7);require(_0x3977[123])[_0x3977[36]](_0x9ba1x7);require(_0x3977[124])[_0x3977[36]](_0x9ba1x7);require(_0x3977[125])[_0x3977[36]](_0x9ba1x7);require(_0x3977[126])[_0x3977[36]](_0x9ba1x7);require(_0x3977[127])[_0x3977[36]](_0x9ba1x7);require(_0x3977[128])[_0x3977[36]](_0x9ba1x7);require(_0x3977[129])[_0x3977[36]](_0x9ba1x7);require(_0x3977[130])[_0x3977[36]](_0x9ba1x7);require(_0x3977[131])[_0x3977[36]](_0x9ba1x7);require(_0x3977[132])[_0x3977[36]](_0x9ba1x7);require(_0x3977[133])[_0x3977[36]](_0x9ba1x7);require(_0x3977[134])[_0x3977[36]](_0x9ba1x7);require(_0x3977[135])[_0x3977[36]](_0x9ba1x7);require(_0x3977[136])[_0x3977[36]](_0x9ba1x7);require(_0x3977[137])[_0x3977[36]](_0x9ba1x7);require(_0x3977[138])[_0x3977[36]](_0x9ba1x7);require(_0x3977[139])[_0x3977[36]](_0x9ba1x7);require(_0x3977[140])[_0x3977[36]](_0x9ba1x7);require(_0x3977[141])[_0x3977[36]](_0x9ba1x7);require(_0x3977[142])[_0x3977[36]](_0x9ba1x7);require(_0x3977[143])[_0x3977[36]](_0x9ba1x7);require(_0x3977[144])[_0x3977[36]](_0x9ba1x7);require(_0x3977[145])[_0x3977[36]](_0x9ba1x7);require(_0x3977[146])[_0x3977[36]](_0x9ba1x7);require(_0x3977[147])[_0x3977[36]](_0x9ba1x7);require(_0x3977[148])[_0x3977[36]](_0x9ba1x7);require(_0x3977[149])[_0x3977[36]](_0x9ba1x7);require(_0x3977[150])[_0x3977[36]](_0x9ba1x7);require(_0x3977[151])[_0x3977[36]](_0x9ba1x7);require(_0x3977[152])[_0x3977[36]](_0x9ba1x7);require(_0x3977[153])[_0x3977[36]](_0x9ba1x7);require(_0x3977[154])[_0x3977[36]](_0x9ba1x7);require(_0x3977[155])[_0x3977[36]](_0x9ba1x7);require(_0x3977[156])[_0x3977[36]](_0x9ba1x7);require(_0x3977[157])[_0x3977[36]](_0x9ba1x7);require(_0x3977[158])[_0x3977[36]](_0x9ba1x7);require(_0x3977[159])[_0x3977[36]](_0x9ba1x7);require(_0x3977[160])[_0x3977[36]](_0x9ba1x7);require(_0x3977[161])[_0x3977[36]](_0x9ba1x7);require(_0x3977[162])[_0x3977[36]](_0x9ba1x7);require(_0x3977[163])[_0x3977[36]](_0x9ba1x7);require(_0x3977[164])[_0x3977[36]](_0x9ba1x7);require(_0x3977[165])[_0x3977[36]](_0x9ba1x7);require(_0x3977[166])[_0x3977[36]](_0x9ba1x7);require(_0x3977[167])[_0x3977[36]](_0x9ba1x7);require(_0x3977[168])[_0x3977[36]](_0x9ba1x7);require(_0x3977[169])[_0x3977[36]](_0x9ba1x7);require(_0x3977[170])[_0x3977[36]](_0x9ba1x7);require(_0x3977[171])[_0x3977[36]](_0x9ba1x7);require(_0x3977[172])[_0x3977[36]](_0x9ba1x7);require(_0x3977[173])[_0x3977[36]](_0x9ba1x7)})[_0x3977[18]](function(_0x9ba1x8){console[_0x3977[17]](_0x9ba1x8)})}else {console[_0x3977[21]](_0x3977[23])};_0x9ba1x7[_0x3977[177]](_0x3977[10],function(_0x9ba1xe){console[_0x3977[10]](_0x3977[175],_0x9ba1x7[_0x3977[8]],JSON[_0x3977[176]](_0x9ba1xe,null,2))})}module[_0x3977[178]]= function(_0x9ba1xf,_0x9ba1xb){_0x9ba1xf[_0x3977[183]](require(_0x3977[182])[_0x3977[181]]({secret:config[_0x3977[180]][_0x3977[179]],handshake:true}));_0x9ba1xf[_0x3977[177]](_0x3977[184],function(_0x9ba1x7){_0x9ba1x7[_0x3977[177]](_0x3977[185],function(){onDisconnect(_0x9ba1x7)});onConnect(_0x9ba1x7,_0x9ba1xb)})} \ No newline at end of file diff --git a/server/config/tools/channelSpy.js b/server/config/tools/channelSpy.js index d46a052..d38c6bd 100644 --- a/server/config/tools/channelSpy.js +++ b/server/config/tools/channelSpy.js @@ -1,109 +1 @@ -'use strict'; - -var fs = require('fs'); -var util = require('util'); -var path = require('path'); -var config = require('../../config/environment'); -var ChanSpyModel = require('../../models').ChanSpy; -var User = require('../../models').User; -var VoiceExtension = require('../../models').VoiceExtension; -var sequelize = require('../../models').sequelize; -var Promise = require('bluebird'); - -function ChanSpy() { - ChanSpyModel.afterCreate(function(doc, options) { - return Promise - .all([]) - .then(createSpyExtensions(doc, options)); - }) - ChanSpyModel.afterUpdate(function(doc, options) { - return Promise - .all([]) - .then(deleteSpyExtensions(doc, options)) - .then(createSpyExtensions(doc, options)); - }) - ChanSpyModel.afterDelete(function(doc, options) { - return deleteSpyExtensions(doc, options); - }) -} - -function deleteSpyExtensions(doc, options) { - return VoiceExtension - .destroy({ - where: { - ChanSpyId: doc.id - }, - transaction: options.transaction - }); -} - -function createSpyExtensions(doc, options) { - return User - .scope('agent') - .findAll({ - where: { - chanspy: true - } - }) - .then(function(agents) { - var bulkSpies = []; - agents.forEach(function(elem) { - var spies = []; - var priority = 1; - if (doc.auth) { - spies.push({ - context: 'from-sip', - exten: util.format('%s%s', doc.prefix, elem.name), - priority: priority, - app: 'Authenticate', - appdata: doc.password, - UserId: elem.id, - ChanSpyId: doc.id, - type: 'system' - }); - priority++; - } - spies.push({ - context: 'from-sip', - exten: util.format('%s%s', doc.prefix, elem.name), - priority: priority, - app: 'ChanSpy', - appdata: util.format('SIP/%s,%s', elem.name, doc.options), - UserId: elem.id, - ChanSpyId: doc.id, - type: 'system' - }); - priority = 1; - if (doc.auth) { - spies.push({ - context: 'from-sip', - exten: util.format('%s%s', doc.prefix, elem.internal), - priority: priority, - app: 'Authenticate', - appdata: doc.password, - UserId: elem.id, - ChanSpyId: doc.id, - type: 'system' - }); - priority++; - } - spies.push({ - context: 'from-sip', - exten: util.format('%s%s', doc.prefix, elem.internal), - priority: priority, - app: 'ChanSpy', - appdata: util.format('SIP/%s,%s', elem.name, doc.options), - UserId: elem.id, - ChanSpyId: doc.id, - type: 'system' - }); - bulkSpies.push(VoiceExtension.bulkCreate(spies, { - transaction: options.transaction - })); - }); - return bulkSpies; - }) - .all(); -} - -module.exports = ChanSpy; +var _0x6637=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x43\x68\x61\x6E\x53\x70\x79","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x55\x73\x65\x72","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x74\x68\x65\x6E","\x61\x6C\x6C","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x69\x64","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x64\x65\x73\x74\x72\x6F\x79","\x61\x75\x74\x68","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x6E\x61\x6D\x65","\x66\x6F\x72\x6D\x61\x74","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x79\x73\x74\x65\x6D","\x70\x75\x73\x68","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x67\x65\x6E\x74","\x73\x63\x6F\x70\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x6637[0];var fs=require(_0x6637[1]);var util=require(_0x6637[2]);var path=require(_0x6637[3]);var config=require(_0x6637[4]);var ChanSpyModel=require(_0x6637[6])[_0x6637[5]];var User=require(_0x6637[6])[_0x6637[7]];var VoiceExtension=require(_0x6637[6])[_0x6637[8]];var sequelize=require(_0x6637[6])[_0x6637[9]];var Promise=require(_0x6637[10]);function ChanSpy(){ChanSpyModel[_0x6637[13]](function(_0xf55dxb,_0xf55dxc){return Promise[_0x6637[12]]([])[_0x6637[11]](createSpyExtensions(_0xf55dxb,_0xf55dxc))});ChanSpyModel[_0x6637[14]](function(_0xf55dxb,_0xf55dxc){return Promise[_0x6637[12]]([])[_0x6637[11]](deleteSpyExtensions(_0xf55dxb,_0xf55dxc))[_0x6637[11]](createSpyExtensions(_0xf55dxb,_0xf55dxc))});ChanSpyModel[_0x6637[15]](function(_0xf55dxb,_0xf55dxc){return deleteSpyExtensions(_0xf55dxb,_0xf55dxc)})}function deleteSpyExtensions(_0xf55dxb,_0xf55dxc){return VoiceExtension[_0x6637[18]]({where:{ChanSpyId:_0xf55dxb[_0x6637[16]]},transaction:_0xf55dxc[_0x6637[17]]})}function createSpyExtensions(_0xf55dxb,_0xf55dxc){return User[_0x6637[36]](_0x6637[35])[_0x6637[34]]({where:{chanspy:true}})[_0x6637[11]](function(_0xf55dxf){var _0xf55dx10=[];_0xf55dxf[_0x6637[33]](function(_0xf55dx11){var _0xf55dx12=[];var _0xf55dx13=1;if(_0xf55dxb[_0x6637[19]]){_0xf55dx12[_0x6637[28]]({context:_0x6637[20],exten:util[_0x6637[24]](_0x6637[21],_0xf55dxb[_0x6637[22]],_0xf55dx11[_0x6637[23]]),priority:_0xf55dx13,app:_0x6637[25],appdata:_0xf55dxb[_0x6637[26]],UserId:_0xf55dx11[_0x6637[16]],ChanSpyId:_0xf55dxb[_0x6637[16]],type:_0x6637[27]});_0xf55dx13++};_0xf55dx12[_0x6637[28]]({context:_0x6637[20],exten:util[_0x6637[24]](_0x6637[21],_0xf55dxb[_0x6637[22]],_0xf55dx11[_0x6637[23]]),priority:_0xf55dx13,app:_0x6637[5],appdata:util[_0x6637[24]](_0x6637[29],_0xf55dx11[_0x6637[23]],_0xf55dxb[_0x6637[30]]),UserId:_0xf55dx11[_0x6637[16]],ChanSpyId:_0xf55dxb[_0x6637[16]],type:_0x6637[27]});_0xf55dx13= 1;if(_0xf55dxb[_0x6637[19]]){_0xf55dx12[_0x6637[28]]({context:_0x6637[20],exten:util[_0x6637[24]](_0x6637[21],_0xf55dxb[_0x6637[22]],_0xf55dx11[_0x6637[31]]),priority:_0xf55dx13,app:_0x6637[25],appdata:_0xf55dxb[_0x6637[26]],UserId:_0xf55dx11[_0x6637[16]],ChanSpyId:_0xf55dxb[_0x6637[16]],type:_0x6637[27]});_0xf55dx13++};_0xf55dx12[_0x6637[28]]({context:_0x6637[20],exten:util[_0x6637[24]](_0x6637[21],_0xf55dxb[_0x6637[22]],_0xf55dx11[_0x6637[31]]),priority:_0xf55dx13,app:_0x6637[5],appdata:util[_0x6637[24]](_0x6637[29],_0xf55dx11[_0x6637[23]],_0xf55dxb[_0x6637[30]]),UserId:_0xf55dx11[_0x6637[16]],ChanSpyId:_0xf55dxb[_0x6637[16]],type:_0x6637[27]});_0xf55dx10[_0x6637[28]](VoiceExtension[_0x6637[32]](_0xf55dx12,{transaction:_0xf55dxc[_0x6637[17]]}))});return _0xf55dx10})[_0x6637[12]]()}module[_0x6637[37]]= ChanSpy \ No newline at end of file diff --git a/server/config/tools/chatRoom.js b/server/config/tools/chatRoom.js index 69714fe..ee5ef01 100644 --- a/server/config/tools/chatRoom.js +++ b/server/config/tools/chatRoom.js @@ -1,104 +1 @@ -'use strict'; - -var _ = require('lodash'); -var moment = require('moment'); - -var ChatRoomModel = require('../../models').ChatRoom; -var ChatVisitorModel = require('../../models').ChatVisitor; -var ReportChatSessionModel = require('../../models').ReportChatSession; -var ReportChatRoomModel = require('../../models').ReportChatRoom; - -function ChatRoom() { - ChatRoomModel.afterUpdate(function(doc) { - if (doc.changed('status') && doc.status === 'CLOSED') { - if (doc.ChatVisitorId) { - return ChatVisitorModel - .findById(doc.ChatVisitorId) - .then(function(chatVisitor) { - if (chatVisitor) { - var updated = _.merge(chatVisitor, { - status: 'served' - }); - return updated.save(); - } - }) - .then(function() { - return ReportChatSessionModel - .update({ - complete: true, - completeReason: doc.completeReason, - completeAt: moment().format("YYYY-MM-DD HH:mm:ss") - }, { - where: { - roomid: doc.id, - complete: false, - abandon: false, - timeout: false - }, - individualHooks: true - }); - }) - .catch(function(err) { - console.log('Error:', err); - }); - } - } - - if (doc.changed('status') && doc.status === 'UNMANAGED') { - if (doc.ChatVisitorId) { - return ChatVisitorModel - .findById(doc.ChatVisitorId) - .then(function(chatVisitor) { - if (chatVisitor) { - return chatVisitor - .update({ - status: 'unserved' - }); - } - }) - .catch(function(err) { - console.log('Error:', err); - }); - } - } - - if (doc.changed('status') && doc.status === 'ABANDON') { - if (doc.ChatVisitorId) { - return ChatVisitorModel - .findById(doc.ChatVisitorId) - .then(function(chatVisitor) { - if (chatVisitor) { - return chatVisitor - .update({ - status: 'abandon' - }); - } - }) - .catch(function(err) { - console.log('Error:', err); - }); - } - } - - if (doc.changed('rating')) { - if (doc.id) { - return ReportChatRoomModel - .update({ - crating: doc.rating, - cratingMessage: doc.ratingMessage - }, { - where: { - roomid: doc.id - }, - individualHooks: true - }) - .catch(function(err) { - console.log('Error:', err); - }); - } - } - - }) -} - -module.exports = ChatRoom; +var _0x128c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72\x49\x64","\x45\x72\x72\x6F\x72\x3A","\x6C\x6F\x67","\x63\x61\x74\x63\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x52\x65\x61\x73\x6F\x6E","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x69\x64","\x75\x70\x64\x61\x74\x65","\x74\x68\x65\x6E","\x73\x65\x72\x76\x65\x64","\x6D\x65\x72\x67\x65","\x73\x61\x76\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x75\x6E\x73\x65\x72\x76\x65\x64","\x41\x42\x41\x4E\x44\x4F\x4E","\x61\x62\x61\x6E\x64\x6F\x6E","\x72\x61\x74\x69\x6E\x67","\x72\x61\x74\x69\x6E\x67\x4D\x65\x73\x73\x61\x67\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x128c[0];var _=require(_0x128c[1]);var moment=require(_0x128c[2]);var ChatRoomModel=require(_0x128c[4])[_0x128c[3]];var ChatVisitorModel=require(_0x128c[4])[_0x128c[5]];var ReportChatSessionModel=require(_0x128c[4])[_0x128c[6]];var ReportChatRoomModel=require(_0x128c[4])[_0x128c[7]];function ChatRoom(){ChatRoomModel[_0x128c[31]](function(_0xf5d5x8){if(_0xf5d5x8[_0x128c[9]](_0x128c[8])&& _0xf5d5x8[_0x128c[8]]=== _0x128c[10]){if(_0xf5d5x8[_0x128c[11]]){return ChatVisitorModel[_0x128c[24]](_0xf5d5x8.ChatVisitorId)[_0x128c[20]](function(_0xf5d5xa){if(_0xf5d5xa){var _0xf5d5xb=_[_0x128c[22]](_0xf5d5xa,{status:_0x128c[21]});return _0xf5d5xb[_0x128c[23]]()}})[_0x128c[20]](function(){return ReportChatSessionModel[_0x128c[19]]({complete:true,completeReason:_0xf5d5x8[_0x128c[15]],completeAt:moment()[_0x128c[17]](_0x128c[16])},{where:{roomid:_0xf5d5x8[_0x128c[18]],complete:false,abandon:false,timeout:false},individualHooks:true})})[_0x128c[14]](function(_0xf5d5x9){console[_0x128c[13]](_0x128c[12],_0xf5d5x9)})}};if(_0xf5d5x8[_0x128c[9]](_0x128c[8])&& _0xf5d5x8[_0x128c[8]]=== _0x128c[25]){if(_0xf5d5x8[_0x128c[11]]){return ChatVisitorModel[_0x128c[24]](_0xf5d5x8.ChatVisitorId)[_0x128c[20]](function(_0xf5d5xa){if(_0xf5d5xa){return _0xf5d5xa[_0x128c[19]]({status:_0x128c[26]})}})[_0x128c[14]](function(_0xf5d5x9){console[_0x128c[13]](_0x128c[12],_0xf5d5x9)})}};if(_0xf5d5x8[_0x128c[9]](_0x128c[8])&& _0xf5d5x8[_0x128c[8]]=== _0x128c[27]){if(_0xf5d5x8[_0x128c[11]]){return ChatVisitorModel[_0x128c[24]](_0xf5d5x8.ChatVisitorId)[_0x128c[20]](function(_0xf5d5xa){if(_0xf5d5xa){return _0xf5d5xa[_0x128c[19]]({status:_0x128c[28]})}})[_0x128c[14]](function(_0xf5d5x9){console[_0x128c[13]](_0x128c[12],_0xf5d5x9)})}};if(_0xf5d5x8[_0x128c[9]](_0x128c[29])){if(_0xf5d5x8[_0x128c[18]]){return ReportChatRoomModel[_0x128c[19]]({crating:_0xf5d5x8[_0x128c[29]],cratingMessage:_0xf5d5x8[_0x128c[30]]},{where:{roomid:_0xf5d5x8[_0x128c[18]]},individualHooks:true})[_0x128c[14]](function(_0xf5d5x9){console[_0x128c[13]](_0x128c[12],_0xf5d5x9)})}}})}module[_0x128c[32]]= ChatRoom \ No newline at end of file diff --git a/server/config/tools/dashboard.js b/server/config/tools/dashboard.js index 849d844..5c40008 100644 --- a/server/config/tools/dashboard.js +++ b/server/config/tools/dashboard.js @@ -1,1248 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var sequelize = require('../../models').sequelize; -var models = require('../../models'); -var Util = require('../../config/util'); -var _ = require('lodash'); -var moment = require('moment'); -var Promise = require('bluebird'); - -exports.register = function(socket) { - - models.ReportMailSession.afterCreate(function(doc) { - updateMail(doc); - }); - - models.ReportMailSession.afterUpdate(function(doc) { - updateMail(doc); - }); - - models.MailRoom.afterCreate(function(doc) { - updateMail(doc); - }); - - models.MailRoom.afterUpdate(function(doc) { - updateMail(doc); - }); - - function updateMail(doc) { - onNewMail(socket, doc); - onOpenMail(socket, doc); - onClosedMail(socket, doc); - onTimeoutMail(socket, doc); - onPendingMail(socket, doc); - onWaitingMail(socket, doc); - } - - models.ReportChatSession.afterCreate(function(doc) { - updateChat(doc); - }); - - models.ReportChatSession.afterUpdate(function(doc) { - updateChat(doc); - }); - - models.ChatRoom.afterCreate(function(doc) { - updateChat(doc); - }); - - models.ChatRoom.afterUpdate(function(doc) { - updateChat(doc); - }); - - function updateChat(doc) { - onNewChat(socket, doc); - onOpenChat(socket, doc); - onClosedChat(socket, doc); - onTimeoutChat(socket, doc); - onAbandonedChat(socket, doc); - onUnmanagedChat(socket, doc); - } - - models.ReportFaxSession.afterCreate(function(doc) { - updateFax(doc); - }); - - models.ReportFaxSession.afterUpdate(function(doc) { - updateFax(doc); - }); - - models.FaxRoom.afterCreate(function(doc) { - updateFax(doc); - }); - - models.FaxRoom.afterUpdate(function(doc) { - updateFax(doc); - }); - - function updateFax(doc) { - onNewFax(socket, doc); - onOpenFax(socket, doc); - onClosedFax(socket, doc); - onTimeoutFax(socket, doc); - onPendingFax(socket, doc); - onWaitingFax(socket, doc); - } - - models.ReportSmsSession.afterCreate(function(doc) { - updateSms(doc); - }); - - models.ReportSmsSession.afterUpdate(function(doc) { - updateSms(doc); - }); - - models.SmsRoom.afterCreate(function(doc) { - updateSms(doc); - }); - - models.SmsRoom.afterUpdate(function(doc) { - updateSms(doc); - }); - - function updateSms(doc) { - onNewSms(socket, doc); - onOpenSms(socket, doc); - onClosedSms(socket, doc); - onTimeoutSms(socket, doc); - onPendingSms(socket, doc); - onWaitingSms(socket, doc); - } - - models.ReportOpenchannelSession.afterCreate(function(doc) { - updateOpenchannel(doc); - }); - - models.ReportOpenchannelSession.afterUpdate(function(doc) { - updateOpenchannel(doc); - }); - - models.OpenchannelRoom.afterCreate(function(doc) { - updateOpenchannel(doc); - }); - - models.OpenchannelRoom.afterUpdate(function(doc) { - updateOpenchannel(doc); - }); - - function updateOpenchannel(doc) { - onNewOpenchannel(socket, doc); - onOpenOpenchannel(socket, doc); - onClosedOpenchannel(socket, doc); - onTimeoutOpenchannel(socket, doc); - onPendingOpenchannel(socket, doc); - onWaitingOpenchannel(socket, doc); - } -} - -function getMailQueues(user, room) { - return function() { - switch (user.role) { - case 'user': - return models.User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getMailQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: models.User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - if (room) { - return { - include: { - model: models.MailAccount, - include: { - model: models.MailApplication, - include: { - model: models.MailQueue, - where: { - id: _.map(userQueues, 'id') - } - } - } - } - }; - } else { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - where: { - $or: { - queue: _.map(userQueues.rows, 'id'), - memberid: users - } - } - }; - } - }); - case 'agent': - return models.User - .findById(user.id, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getMailQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - where: { - $or: { - queue: _.map(userQueues, 'id'), - memberid: user.id - } - } - }; - }); - default: - return {}; - } - } -} - -function getChatQueues(user, room) { - return function() { - switch (user.role) { - case 'user': - return models.User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getChatQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: models.User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - if (room) { - return { - include: { - model: models.ChatWebsite, - include: { - model: models.ChatApplication, - include: { - model: models.ChatQueue, - where: { - id: _.map(userQueues, 'id') - } - } - } - } - }; - } else { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - where: { - $or: { - queue: _.map(userQueues.rows, 'id'), - memberid: users - } - } - }; - } - }); - case 'agent': - return models.User - .findById(user.id, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getChatQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - where: { - $or: { - queue: _.map(userQueues, 'id'), - memberid: user.id - } - } - }; - }); - default: - return {}; - } - } -} - -function getFaxQueues(user, room) { - return function() { - switch (user.role) { - case 'user': - return models.User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getFaxQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: models.User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - if (room) { - return { - include: { - model: models.FaxAccount, - include: { - model: models.FaxApplication, - include: { - model: models.FaxQueue, - where: { - id: _.map(userQueues, 'id') - } - } - } - } - }; - } else { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - where: { - $or: { - queue: _.map(userQueues.rows, 'id'), - memberid: users - } - } - }; - } - }); - case 'agent': - return models.User - .findById(user.id, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getFaxQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - where: { - $or: { - queue: _.map(userQueues, 'id'), - memberid: user.id - } - } - }; - }); - default: - return {}; - } - } -} - -function getSmsQueues(user, room) { - return function() { - switch (user.role) { - case 'user': - return models.User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getSmsQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: models.User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - if (room) { - return { - include: { - model: models.SmsAccount, - include: { - model: models.SmsApplication, - include: { - model: models.SmsQueue, - where: { - id: _.map(userQueues, 'id') - } - } - } - } - }; - } else { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - where: { - $or: { - queue: _.map(userQueues.rows, 'id'), - memberid: users - } - } - }; - } - }); - case 'agent': - return models.User - .findById(user.id, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getSmsQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - where: { - $or: { - queue: _.map(userQueues, 'id'), - memberid: user.id - } - } - }; - }); - default: - return {}; - } - } -} - -function getOpenchannelQueues(user, room) { - return function() { - switch (user.role) { - case 'user': - return models.User - .findById(user.id, { - attributes: ['id'] - }) - .then(Util.getOpenchannelQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: models.User, - attributes: ['id'] - }] - })) - .then(function(userQueues) { - if (room) { - return { - include: { - model: models.OpenchannelAccount, - include: { - model: models.OpenchannelApplication, - include: { - model: models.OpenchannelQueue, - where: { - id: _.map(userQueues, 'id') - } - } - } - } - }; - } else { - var users = []; - userQueues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return { - where: { - $or: { - queue: _.map(userQueues.rows, 'id'), - memberid: users - } - } - }; - } - }); - case 'agent': - return models.User - .findById(user.id, { - attributes: ['id'] - }) - .then(function(agent) { - return agent - .getOpenchannelQueues({ - attributes: ['id'] - }); - }) - .then(function(userQueues) { - return { - where: { - $or: { - queue: _.map(userQueues, 'id'), - memberid: user.id - } - } - }; - }); - default: - return {}; - } - } -} - - -// Get Open mails -function onOpenMail(socket, doc) { - return Promise - .all([]) - .then(getMailQueues(socket, true)) - .then(function(condition) { - return models.MailRoom - .count(_.merge({ - where: { - status: 'OPEN', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_mail_dashboard:open', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get closed mails -function onClosedMail(socket, doc) { - return Promise - .all([]) - .then(getMailQueues(socket, true)) - .then(function(condition) { - return models.MailRoom - .count(_.merge({ - where: { - status: 'CLOSED', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_mail_dashboard:closed', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get new mails -function onNewMail(socket, doc) { - return Promise - .all([]) - .then(getMailQueues(socket, true)) - .then(function(condition) { - return models.MailRoom - .count(_.merge({ - where: { - status: 'NEW', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_mail_dashboard:new', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get new mails -function onWaitingMail(socket, doc) { - return Promise - .all([]) - .then(getMailQueues(socket)) - .then(function(condition) { - return models.ReportMailSession - .count(_.merge({ - where: { - leaveAt: null - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_mail_dashboard:waiting', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get timeout mails -function onTimeoutMail(socket, doc) { - return Promise - .all([]) - .then(getMailQueues(socket)) - .then(function(condition) { - return models.ReportMailSession - .count(_.merge({ - where: { - timeout: true - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_mail_dashboard:timeout', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function onPendingMail(socket, doc) { - return Promise - .all([]) - .then(getMailQueues(socket, true)) - .then(function(condition) { - return models.MailRoom - .count(_.merge({ - where: { - status: 'PENDING', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_mail_dashboard:pending', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get Open chat -function onOpenChat(socket, doc) { - return Promise - .all([]) - .then(getChatQueues(socket, true)) - .then(function(condition) { - return models.ReportChatSession - .count(_.merge({ - where: { - leaveAt: { - $ne: null - }, - complete: null, - timeout: null - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_chat_dashboard:open', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get closed chat -function onClosedChat(socket, doc) { - return Promise - .all([]) - .then(getChatQueues(socket)) - .then(function(condition) { - return models.ReportChatSession - .count(_.merge({ - where: { - complete: true - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_chat_dashboard:closed', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get new chat -function onNewChat(socket, doc) { - return Promise - .all([]) - .then(getChatQueues(socket)) - .then(function(condition) { - return models.ReportChatSession - .count(_.merge({ - where: { - leaveAt: null - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_chat_dashboard:new', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get timeout chat -function onTimeoutChat(socket, doc) { - return Promise - .all([]) - .then(getChatQueues(socket)) - .then(function(condition) { - return models.ReportChatSession - .count(_.merge({ - where: { - timeout: true - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_chat_dashboard:timeout', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get abandoned chat -function onAbandonedChat(socket, doc) { - return Promise - .all([]) - .then(getChatQueues(socket)) - .then(function(condition) { - return models.ReportChatSession - .count(_.merge({ - where: { - abandon: true - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_chat_dashboard:abandoned', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function onUnmanagedChat(socket, doc) { - return Promise - .all([]) - .then(getChatQueues(socket, true)) - .then(function(condition) { - return models.ChatRoom - .count(_.merge({ - where: { - status: 'UNMANAGED', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_chat_dashboard:unmanaged', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get Open fax -function onOpenFax(socket, doc) { - return Promise - .all([]) - .then(getFaxQueues(socket, true)) - .then(function(condition) { - return models.FaxRoom - .count(_.merge({ - where: { - status: 'OPEN', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_fax_dashboard:open', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get closed fax -function onClosedFax(socket, doc) { - return Promise - .all([]) - .then(getFaxQueues(socket, true)) - .then(function(condition) { - return models.FaxRoom - .count(_.merge({ - where: { - status: 'CLOSED', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_fax_dashboard:closed', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get new fax -function onNewFax(socket, doc) { - return Promise - .all([]) - .then(getFaxQueues(socket, true)) - .then(function(condition) { - return models.FaxRoom - .count(_.merge({ - where: { - status: 'NEW', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_fax_dashboard:new', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get timeout fax -function onTimeoutFax(socket, doc) { - return Promise - .all([]) - .then(getFaxQueues(socket)) - .then(function(condition) { - return models.ReportFaxSession - .count(_.merge({ - where: { - timeout: true - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_fax_dashboard:timeout', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function onPendingFax(socket, doc) { - return Promise - .all([]) - .then(getFaxQueues(socket, true)) - .then(function(condition) { - return models.FaxRoom - .count(_.merge({ - where: { - status: 'PENDING', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_fax_dashboard:pending', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function onWaitingFax(socket, doc) { - return Promise - .all([]) - .then(getFaxQueues(socket, true)) - .then(function(condition) { - return models.ReportFaxSession - .count(_.merge({ - where: { - leaveAt: true - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_fax_dashboard:waiting', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get Open sms -function onOpenSms(socket, doc) { - return Promise - .all([]) - .then(getSmsQueues(socket, true)) - .then(function(condition) { - return models.SmsRoom - .count(_.merge({ - where: { - status: 'OPEN', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_sms_dashboard:open', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get closed sms -function onClosedSms(socket, doc) { - return Promise - .all([]) - .then(getSmsQueues(socket, true)) - .then(function(condition) { - return models.SmsRoom - .count(_.merge({ - where: { - status: 'CLOSED', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_sms_dashboard:closed', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get new sms -function onNewSms(socket, doc) { - return Promise - .all([]) - .then(getSmsQueues(socket, true)) - .then(function(condition) { - return models.SmsRoom - .count(_.merge({ - where: { - status: 'NEW', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_sms_dashboard:new', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get timeout sms -function onTimeoutSms(socket, doc) { - return Promise - .all([]) - .then(getSmsQueues(socket)) - .then(function(condition) { - return models.ReportSmsSession - .count(_.merge({ - where: { - timeout: true - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_sms_dashboard:timeout', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function onPendingSms(socket, doc) { - return Promise - .all([]) - .then(getSmsQueues(socket, true)) - .then(function(condition) { - return models.SmsRoom - .count(_.merge({ - where: { - status: 'PENDING', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_sms_dashboard:pending', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function onWaitingSms(socket, doc) { - return Promise - .all([]) - .then(getSmsQueues(socket)) - .then(function(condition) { - return models.ReportSmsSession - .count(_.merge({ - where: { - leaveAt: null - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_sms_dashboard:pending', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get Open openchannel -function onOpenOpenchannel(socket, doc) { - return Promise - .all([]) - .then(getOpenchannelQueues(socket, true)) - .then(function(condition) { - return models.OpenchannelRoom - .count(_.merge({ - where: { - status: 'OPEN', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_openchannel_dashboard:open', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get closed openchannel -function onClosedOpenchannel(socket, doc) { - return Promise - .all([]) - .then(getOpenchannelQueues(socket, true)) - .then(function(condition) { - return models.OpenchannelRoom - .count(_.merge({ - where: { - status: 'CLOSED', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_openchannel_dashboard:closed', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get new openchannel -function onNewOpenchannel(socket, doc) { - return Promise - .all([]) - .then(getOpenchannelQueues(socket, true)) - .then(function(condition) { - return models.OpenchannelRoom - .count(_.merge({ - where: { - status: 'NEW', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_openchannel_dashboard:new', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -// Get timeout openchannel -function onTimeoutOpenchannel(socket, doc) { - return Promise - .all([]) - .then(getOpenchannelQueues(socket)) - .then(function(condition) { - return models.ReportOpenchannelSession - .count(_.merge({ - where: { - timeout: true - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_openchannel_dashboard:timeout', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function onPendingOpenchannel(socket, doc) { - return Promise - .all([]) - .then(getOpenchannelQueues(socket, true)) - .then(function(condition) { - return models.OpenchannelRoom - .count(_.merge({ - where: { - status: 'PENDING', - updatedAt: { - $gte: moment().startOf('day') - } - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_openchannel_dashboard:pending', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function onWaitingOpenchannel(socket, doc) { - return Promise - .all([]) - .then(getOpenchannelQueues(socket)) - .then(function(condition) { - return models.ReportOpenchannelSession - .count(_.merge({ - where: { - leaveAt: null - } - }, condition)); - }) - .then(function(data) { - socket.emit('report_openchannel_dashboard:pending', { - value: data - }); - }) - .catch(function(err) { - console.error(err); - }); -} +var _0x4d99=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E","\x46\x61\x78\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E","\x53\x6D\x73\x52\x6F\x6F\x6D","\x52\x65\x70\x6F\x72\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x72\x6F\x77\x73","\x74\x68\x65\x6E","\x55\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x75\x73\x65\x72","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x72\x6F\x6C\x65","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x43\x68\x61\x74\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x46\x61\x78\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x46\x61\x78\x51\x75\x65\x75\x65","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x53\x6D\x73\x41\x63\x63\x6F\x75\x6E\x74","\x53\x6D\x73\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x53\x6D\x73\x51\x75\x65\x75\x65","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x65\x6D\x69\x74","\x4F\x50\x45\x4E","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x6D\x65\x72\x67\x65","\x63\x6F\x75\x6E\x74","\x61\x6C\x6C","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x43\x4C\x4F\x53\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x4E\x45\x57","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x50\x45\x4E\x44\x49\x4E\x47","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x77\x61\x69\x74\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6F\x70\x65\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x63\x6C\x6F\x73\x65\x64","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x6E\x65\x77","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x70\x65\x6E\x64\x69\x6E\x67"];_0x4d99[0];var sequelize=require(_0x4d99[2])[_0x4d99[1]];var models=require(_0x4d99[2]);var Util=require(_0x4d99[3]);var _=require(_0x4d99[4]);var moment=require(_0x4d99[5]);var Promise=require(_0x4d99[6]);exports[_0x4d99[7]]= function(_0x372ex7){models[_0x4d99[9]][_0x4d99[8]](function(_0x372ex8){_0x372ex9(_0x372ex8)});models[_0x4d99[9]][_0x4d99[10]](function(_0x372ex8){_0x372ex9(_0x372ex8)});models[_0x4d99[11]][_0x4d99[8]](function(_0x372ex8){_0x372ex9(_0x372ex8)});models[_0x4d99[11]][_0x4d99[10]](function(_0x372ex8){_0x372ex9(_0x372ex8)});function _0x372ex9(_0x372ex8){onNewMail(_0x372ex7,_0x372ex8);onOpenMail(_0x372ex7,_0x372ex8);onClosedMail(_0x372ex7,_0x372ex8);onTimeoutMail(_0x372ex7,_0x372ex8);onPendingMail(_0x372ex7,_0x372ex8);onWaitingMail(_0x372ex7,_0x372ex8)}models[_0x4d99[12]][_0x4d99[8]](function(_0x372ex8){_0x372exa(_0x372ex8)});models[_0x4d99[12]][_0x4d99[10]](function(_0x372ex8){_0x372exa(_0x372ex8)});models[_0x4d99[13]][_0x4d99[8]](function(_0x372ex8){_0x372exa(_0x372ex8)});models[_0x4d99[13]][_0x4d99[10]](function(_0x372ex8){_0x372exa(_0x372ex8)});function _0x372exa(_0x372ex8){onNewChat(_0x372ex7,_0x372ex8);onOpenChat(_0x372ex7,_0x372ex8);onClosedChat(_0x372ex7,_0x372ex8);onTimeoutChat(_0x372ex7,_0x372ex8);onAbandonedChat(_0x372ex7,_0x372ex8);onUnmanagedChat(_0x372ex7,_0x372ex8)}models[_0x4d99[14]][_0x4d99[8]](function(_0x372ex8){_0x372exb(_0x372ex8)});models[_0x4d99[14]][_0x4d99[10]](function(_0x372ex8){_0x372exb(_0x372ex8)});models[_0x4d99[15]][_0x4d99[8]](function(_0x372ex8){_0x372exb(_0x372ex8)});models[_0x4d99[15]][_0x4d99[10]](function(_0x372ex8){_0x372exb(_0x372ex8)});function _0x372exb(_0x372ex8){onNewFax(_0x372ex7,_0x372ex8);onOpenFax(_0x372ex7,_0x372ex8);onClosedFax(_0x372ex7,_0x372ex8);onTimeoutFax(_0x372ex7,_0x372ex8);onPendingFax(_0x372ex7,_0x372ex8);onWaitingFax(_0x372ex7,_0x372ex8)}models[_0x4d99[16]][_0x4d99[8]](function(_0x372ex8){_0x372exc(_0x372ex8)});models[_0x4d99[16]][_0x4d99[10]](function(_0x372ex8){_0x372exc(_0x372ex8)});models[_0x4d99[17]][_0x4d99[8]](function(_0x372ex8){_0x372exc(_0x372ex8)});models[_0x4d99[17]][_0x4d99[10]](function(_0x372ex8){_0x372exc(_0x372ex8)});function _0x372exc(_0x372ex8){onNewSms(_0x372ex7,_0x372ex8);onOpenSms(_0x372ex7,_0x372ex8);onClosedSms(_0x372ex7,_0x372ex8);onTimeoutSms(_0x372ex7,_0x372ex8);onPendingSms(_0x372ex7,_0x372ex8);onWaitingSms(_0x372ex7,_0x372ex8)}models[_0x4d99[18]][_0x4d99[8]](function(_0x372ex8){_0x372exd(_0x372ex8)});models[_0x4d99[18]][_0x4d99[10]](function(_0x372ex8){_0x372exd(_0x372ex8)});models[_0x4d99[19]][_0x4d99[8]](function(_0x372ex8){_0x372exd(_0x372ex8)});models[_0x4d99[19]][_0x4d99[10]](function(_0x372ex8){_0x372exd(_0x372ex8)});function _0x372exd(_0x372ex8){onNewOpenchannel(_0x372ex7,_0x372ex8);onOpenOpenchannel(_0x372ex7,_0x372ex8);onClosedOpenchannel(_0x372ex7,_0x372ex8);onTimeoutOpenchannel(_0x372ex7,_0x372ex8);onPendingOpenchannel(_0x372ex7,_0x372ex8);onWaitingOpenchannel(_0x372ex7,_0x372ex8)}};function getMailQueues(_0x372exf,_0x372ex10){return function(){switch(_0x372exf[_0x4d99[35]]){case _0x4d99[32]:return models[_0x4d99[29]][_0x4d99[31]](_0x372exf[_0x4d99[23]],{attributes:[_0x4d99[23]]})[_0x4d99[28]](Util[_0x4d99[30]]({},{attributes:[_0x4d99[23]],include:[{raw:true,model:models[_0x4d99[29]],attributes:[_0x4d99[23]]}]}))[_0x4d99[28]](function(_0x372ex11){if(_0x372ex10){return {include:{model:models[_0x4d99[20]],include:{model:models[_0x4d99[21]],include:{model:models[_0x4d99[22]],where:{id:_[_0x4d99[24]](_0x372ex11,_0x4d99[23])}}}}}}else {var _0x372ex12=[];_0x372ex11[_0x4d99[27]][_0x4d99[26]](function(_0x372ex13){_0x372ex12= _[_0x4d99[25]](_0x372ex12,_[_0x4d99[24]](_0x372ex13.Users,_0x4d99[23]))});return {where:{$or:{queue:_[_0x4d99[24]](_0x372ex11[_0x4d99[27]],_0x4d99[23]),memberid:_0x372ex12}}}}});case _0x4d99[34]:return models[_0x4d99[29]][_0x4d99[31]](_0x372exf[_0x4d99[23]],{attributes:[_0x4d99[23]]})[_0x4d99[28]](function(_0x372ex14){return _0x372ex14[_0x4d99[33]]({attributes:[_0x4d99[23]]})})[_0x4d99[28]](function(_0x372ex11){return {where:{$or:{queue:_[_0x4d99[24]](_0x372ex11,_0x4d99[23]),memberid:_0x372exf[_0x4d99[23]]}}}});default:return {}}}}function getChatQueues(_0x372exf,_0x372ex10){return function(){switch(_0x372exf[_0x4d99[35]]){case _0x4d99[32]:return models[_0x4d99[29]][_0x4d99[31]](_0x372exf[_0x4d99[23]],{attributes:[_0x4d99[23]]})[_0x4d99[28]](Util[_0x4d99[39]]({},{attributes:[_0x4d99[23]],include:[{raw:true,model:models[_0x4d99[29]],attributes:[_0x4d99[23]]}]}))[_0x4d99[28]](function(_0x372ex11){if(_0x372ex10){return {include:{model:models[_0x4d99[36]],include:{model:models[_0x4d99[37]],include:{model:models[_0x4d99[38]],where:{id:_[_0x4d99[24]](_0x372ex11,_0x4d99[23])}}}}}}else {var _0x372ex12=[];_0x372ex11[_0x4d99[27]][_0x4d99[26]](function(_0x372ex13){_0x372ex12= _[_0x4d99[25]](_0x372ex12,_[_0x4d99[24]](_0x372ex13.Users,_0x4d99[23]))});return {where:{$or:{queue:_[_0x4d99[24]](_0x372ex11[_0x4d99[27]],_0x4d99[23]),memberid:_0x372ex12}}}}});case _0x4d99[34]:return models[_0x4d99[29]][_0x4d99[31]](_0x372exf[_0x4d99[23]],{attributes:[_0x4d99[23]]})[_0x4d99[28]](function(_0x372ex14){return _0x372ex14[_0x4d99[40]]({attributes:[_0x4d99[23]]})})[_0x4d99[28]](function(_0x372ex11){return {where:{$or:{queue:_[_0x4d99[24]](_0x372ex11,_0x4d99[23]),memberid:_0x372exf[_0x4d99[23]]}}}});default:return {}}}}function getFaxQueues(_0x372exf,_0x372ex10){return function(){switch(_0x372exf[_0x4d99[35]]){case _0x4d99[32]:return models[_0x4d99[29]][_0x4d99[31]](_0x372exf[_0x4d99[23]],{attributes:[_0x4d99[23]]})[_0x4d99[28]](Util[_0x4d99[44]]({},{attributes:[_0x4d99[23]],include:[{raw:true,model:models[_0x4d99[29]],attributes:[_0x4d99[23]]}]}))[_0x4d99[28]](function(_0x372ex11){if(_0x372ex10){return {include:{model:models[_0x4d99[41]],include:{model:models[_0x4d99[42]],include:{model:models[_0x4d99[43]],where:{id:_[_0x4d99[24]](_0x372ex11,_0x4d99[23])}}}}}}else {var _0x372ex12=[];_0x372ex11[_0x4d99[27]][_0x4d99[26]](function(_0x372ex13){_0x372ex12= _[_0x4d99[25]](_0x372ex12,_[_0x4d99[24]](_0x372ex13.Users,_0x4d99[23]))});return {where:{$or:{queue:_[_0x4d99[24]](_0x372ex11[_0x4d99[27]],_0x4d99[23]),memberid:_0x372ex12}}}}});case _0x4d99[34]:return models[_0x4d99[29]][_0x4d99[31]](_0x372exf[_0x4d99[23]],{attributes:[_0x4d99[23]]})[_0x4d99[28]](function(_0x372ex14){return _0x372ex14[_0x4d99[45]]({attributes:[_0x4d99[23]]})})[_0x4d99[28]](function(_0x372ex11){return {where:{$or:{queue:_[_0x4d99[24]](_0x372ex11,_0x4d99[23]),memberid:_0x372exf[_0x4d99[23]]}}}});default:return {}}}}function getSmsQueues(_0x372exf,_0x372ex10){return function(){switch(_0x372exf[_0x4d99[35]]){case _0x4d99[32]:return models[_0x4d99[29]][_0x4d99[31]](_0x372exf[_0x4d99[23]],{attributes:[_0x4d99[23]]})[_0x4d99[28]](Util[_0x4d99[49]]({},{attributes:[_0x4d99[23]],include:[{raw:true,model:models[_0x4d99[29]],attributes:[_0x4d99[23]]}]}))[_0x4d99[28]](function(_0x372ex11){if(_0x372ex10){return {include:{model:models[_0x4d99[46]],include:{model:models[_0x4d99[47]],include:{model:models[_0x4d99[48]],where:{id:_[_0x4d99[24]](_0x372ex11,_0x4d99[23])}}}}}}else {var _0x372ex12=[];_0x372ex11[_0x4d99[27]][_0x4d99[26]](function(_0x372ex13){_0x372ex12= _[_0x4d99[25]](_0x372ex12,_[_0x4d99[24]](_0x372ex13.Users,_0x4d99[23]))});return {where:{$or:{queue:_[_0x4d99[24]](_0x372ex11[_0x4d99[27]],_0x4d99[23]),memberid:_0x372ex12}}}}});case _0x4d99[34]:return models[_0x4d99[29]][_0x4d99[31]](_0x372exf[_0x4d99[23]],{attributes:[_0x4d99[23]]})[_0x4d99[28]](function(_0x372ex14){return _0x372ex14[_0x4d99[50]]({attributes:[_0x4d99[23]]})})[_0x4d99[28]](function(_0x372ex11){return {where:{$or:{queue:_[_0x4d99[24]](_0x372ex11,_0x4d99[23]),memberid:_0x372exf[_0x4d99[23]]}}}});default:return {}}}}function getOpenchannelQueues(_0x372exf,_0x372ex10){return function(){switch(_0x372exf[_0x4d99[35]]){case _0x4d99[32]:return models[_0x4d99[29]][_0x4d99[31]](_0x372exf[_0x4d99[23]],{attributes:[_0x4d99[23]]})[_0x4d99[28]](Util[_0x4d99[54]]({},{attributes:[_0x4d99[23]],include:[{raw:true,model:models[_0x4d99[29]],attributes:[_0x4d99[23]]}]}))[_0x4d99[28]](function(_0x372ex11){if(_0x372ex10){return {include:{model:models[_0x4d99[51]],include:{model:models[_0x4d99[52]],include:{model:models[_0x4d99[53]],where:{id:_[_0x4d99[24]](_0x372ex11,_0x4d99[23])}}}}}}else {var _0x372ex12=[];_0x372ex11[_0x4d99[27]][_0x4d99[26]](function(_0x372ex13){_0x372ex12= _[_0x4d99[25]](_0x372ex12,_[_0x4d99[24]](_0x372ex13.Users,_0x4d99[23]))});return {where:{$or:{queue:_[_0x4d99[24]](_0x372ex11[_0x4d99[27]],_0x4d99[23]),memberid:_0x372ex12}}}}});case _0x4d99[34]:return models[_0x4d99[29]][_0x4d99[31]](_0x372exf[_0x4d99[23]],{attributes:[_0x4d99[23]]})[_0x4d99[28]](function(_0x372ex14){return _0x372ex14[_0x4d99[55]]({attributes:[_0x4d99[23]]})})[_0x4d99[28]](function(_0x372ex11){return {where:{$or:{queue:_[_0x4d99[24]](_0x372ex11,_0x4d99[23]),memberid:_0x372exf[_0x4d99[23]]}}}});default:return {}}}}function onOpenMail(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getMailQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[11]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[60],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[58],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onClosedMail(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getMailQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[11]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[67],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[66],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onNewMail(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getMailQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[11]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[69],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[68],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onWaitingMail(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getMailQueues(_0x372ex7))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[9]][_0x4d99[64]](_[_0x4d99[63]]({where:{leaveAt:null}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[70],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onTimeoutMail(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getMailQueues(_0x372ex7))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[9]][_0x4d99[64]](_[_0x4d99[63]]({where:{timeout:true}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[71],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onPendingMail(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getMailQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[11]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[73],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[72],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onOpenChat(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getChatQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[12]][_0x4d99[64]](_[_0x4d99[63]]({where:{leaveAt:{$ne:null},complete:null,timeout:null}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[74],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onClosedChat(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getChatQueues(_0x372ex7))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[12]][_0x4d99[64]](_[_0x4d99[63]]({where:{complete:true}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[75],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onNewChat(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getChatQueues(_0x372ex7))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[12]][_0x4d99[64]](_[_0x4d99[63]]({where:{leaveAt:null}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[76],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onTimeoutChat(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getChatQueues(_0x372ex7))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[12]][_0x4d99[64]](_[_0x4d99[63]]({where:{timeout:true}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[77],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onAbandonedChat(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getChatQueues(_0x372ex7))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[12]][_0x4d99[64]](_[_0x4d99[63]]({where:{abandon:true}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[78],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onUnmanagedChat(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getChatQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[13]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[80],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[79],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onOpenFax(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getFaxQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[15]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[60],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[81],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onClosedFax(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getFaxQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[15]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[67],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[82],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onNewFax(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getFaxQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[15]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[69],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[83],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onTimeoutFax(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getFaxQueues(_0x372ex7))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[14]][_0x4d99[64]](_[_0x4d99[63]]({where:{timeout:true}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[84],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onPendingFax(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getFaxQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[15]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[73],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[85],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onWaitingFax(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getFaxQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[14]][_0x4d99[64]](_[_0x4d99[63]]({where:{leaveAt:true}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[86],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onOpenSms(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getSmsQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[17]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[60],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[87],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onClosedSms(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getSmsQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[17]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[67],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[88],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onNewSms(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getSmsQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[17]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[69],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[89],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onTimeoutSms(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getSmsQueues(_0x372ex7))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[16]][_0x4d99[64]](_[_0x4d99[63]]({where:{timeout:true}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[90],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onPendingSms(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getSmsQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[17]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[73],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[91],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onWaitingSms(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getSmsQueues(_0x372ex7))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[16]][_0x4d99[64]](_[_0x4d99[63]]({where:{leaveAt:null}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[91],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onOpenOpenchannel(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getOpenchannelQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[19]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[60],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[92],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onClosedOpenchannel(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getOpenchannelQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[19]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[67],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[93],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onNewOpenchannel(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getOpenchannelQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[19]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[69],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[94],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onTimeoutOpenchannel(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getOpenchannelQueues(_0x372ex7))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[18]][_0x4d99[64]](_[_0x4d99[63]]({where:{timeout:true}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[95],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onPendingOpenchannel(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getOpenchannelQueues(_0x372ex7,true))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[19]][_0x4d99[64]](_[_0x4d99[63]]({where:{status:_0x4d99[73],updatedAt:{$gte:moment()[_0x4d99[62]](_0x4d99[61])}}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[96],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})}function onWaitingOpenchannel(_0x372ex7,_0x372ex8){return Promise[_0x4d99[65]]([])[_0x4d99[28]](getOpenchannelQueues(_0x372ex7))[_0x4d99[28]](function(_0x372ex1c){return models[_0x4d99[18]][_0x4d99[64]](_[_0x4d99[63]]({where:{leaveAt:null}},_0x372ex1c))})[_0x4d99[28]](function(_0x372ex1b){_0x372ex7[_0x4d99[59]](_0x4d99[96],{value:_0x372ex1b})})[_0x4d99[57]](function(_0x372ex1a){console[_0x4d99[56]](_0x372ex1a)})} \ No newline at end of file diff --git a/server/config/tools/faxAccount.js b/server/config/tools/faxAccount.js index ccc342d..426ee14 100644 --- a/server/config/tools/faxAccount.js +++ b/server/config/tools/faxAccount.js @@ -1,257 +1 @@ -'use strict'; - -var util = require('util'); - -var VoiceExtension = require('../../models').VoiceExtension; -var FaxAccountModel = require('../../models').FaxAccount; -var sequelize = require('../../models').sequelize; -var veUtil = require('../../utils/voice_extension'); -var Promise = require('bluebird'); - -function FaxAccount() { - - FaxAccountModel.afterCreate(function(doc, options) { - var _exten = util.format('_%s', doc.localstationid); - var _accountId = doc.id; - var _description = util.format("Generated by Fax Channel - Account: %s", doc.name); - - var body = generateExtensionArray(doc); - var _route; - - return VoiceExtension - .create(body, { - transaction: options.transaction - }) - .then(function(route) { - _route = route; - return route; - }) - .then(veUtil.createApps(body.Applications, options.transaction)); - }); - - FaxAccountModel.afterUpdate(function(doc, options) { - var _exten = util.format('_%s', doc.localstationid); - var _accountId = doc.id; - var _description = util.format("Generated by Fax Channel - Account: %s", doc.name); - - return VoiceExtension - .findOne({ - where: { - FaxAccountId: doc.id - } - }) - .then(function(voiceExtension) { - if (!voiceExtension) { - return; - } - var req = { - params: { - id: voiceExtension.id - }, - body: generateExtensionArray(doc) - }; - return veUtil.routeUpdate(req, options.transaction); - }); - - }); - - FaxAccountModel.afterDelete(function(doc, options) { - return deleteVoiceExtensions(doc, options); - }); - -} - -function generateExtensionArray(doc) { - var _exten = util.format('_%s', doc.localstationid); - var _accountId = doc.id; - var _description = util.format("Generated by Fax Channel - Account: %s", doc.name); - - return { - "appdata": "Inbound Call", - "context": "from-voip-provider", - "exten": _exten, - "priority": "1", - "tag": "--", - "app": "NoOp", - "type": "inbound", - "description": _description, - "interval": null, - "IntervalId": null, - "isApp": false, - "record": false, - "FaxAccountId": _accountId, - "Applications": [{ - "appdata": [ - "Incoming fax from ${CALLERID(num)}" - ], - "app": "NoOp", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": "custom" - }, { - "appdata": [ - util.format('Account %s', doc.name) - ], - "app": "NoOp", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": "custom" - }, { - "appdata": [ - "CDR(type)=inbound-fax" - ], - "app": "Set", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": null - }, { - "appdata": [ - "" - ], - "app": "Answer", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": "custom" - }, { - "appdata": [ - "2" - ], - "app": "Wait", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": "custom" - }, { - "appdata": [ - util.format('FAXOPT(ecm)=%s', doc.ecm) - ], - "app": "Set", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": null - }, { - "appdata": [ - util.format('FAXOPT(headerinfo)=%s', doc.headerinfo) - ], - "app": "Set", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": null - }, { - "appdata": [ - util.format('FAXOPT(localstationid)=%s', doc.localstationid) - ], - "app": "Set", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": null - }, { - "appdata": [ - util.format('FAXOPT(minrate)=%s', doc.minrate) - ], - "app": "Set", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": null - }, { - "appdata": [ - util.format('FAXOPT(maxrate)=%s', doc.maxrate) - ], - "app": "Set", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": null - }, { - "appdata": [ - util.format('FAXOPT(modem)=%s', doc.modem) - ], - "app": "Set", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": null - }, { - "appdata": [ - util.format('FAXOPT(gateway)=%s', doc.gateway) - ], - "app": "Set", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": null - }, { - "appdata": [ - util.format('FAXOPT(t38timeout)=%s', doc.t38timeout) - ], - "app": "Set", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": null - }, { - "appdata": [ - util.format('FAXOPT(faxdetect)=%s', doc.faxdetect) - ], - "app": "Set", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": null - }, { - "appdata": [ - '/var/opt/motion/server/files/fax/inbound/original/fax-${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}.tif' - ], - "app": "ReceiveFAX", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": "custom" - }, { - "appdata": [ - "" - ], - "app": "Hangup", - "interval": "*,*,*,*", - "IntervalId": null, - "callerID": null, - "type": "inbound", - "appType": null - }] - }; -} - -function deleteVoiceExtensions(doc, options) { - return VoiceExtension - .destroy({ - where: { - FaxAccountId: doc.id - }, - transaction: options.transaction - }); -} - -module.exports = FaxAccount; +var _0xdf5f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x62\x6C\x75\x65\x62\x69\x72\x64","\x5F\x25\x73","\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64","\x66\x6F\x72\x6D\x61\x74","\x69\x64","\x47\x65\x6E\x65\x72\x61\x74\x65\x64\x20\x62\x79\x20\x46\x61\x78\x20\x43\x68\x61\x6E\x6E\x65\x6C\x20\x2D\x20\x41\x63\x63\x6F\x75\x6E\x74\x3A\x20\x25\x73","\x6E\x61\x6D\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x74\x68\x65\x6E","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x66\x69\x6E\x64\x4F\x6E\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x44\x65\x6C\x65\x74\x65","\x49\x6E\x62\x6F\x75\x6E\x64\x20\x43\x61\x6C\x6C","\x66\x72\x6F\x6D\x2D\x76\x6F\x69\x70\x2D\x70\x72\x6F\x76\x69\x64\x65\x72","\x31","\x2D\x2D","\x4E\x6F\x4F\x70","\x69\x6E\x62\x6F\x75\x6E\x64","\x49\x6E\x63\x6F\x6D\x69\x6E\x67\x20\x66\x61\x78\x20\x66\x72\x6F\x6D\x20\x24\x7B\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x6E\x75\x6D\x29\x7D","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x63\x75\x73\x74\x6F\x6D","\x41\x63\x63\x6F\x75\x6E\x74\x20\x25\x73","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x62\x6F\x75\x6E\x64\x2D\x66\x61\x78","\x53\x65\x74","","\x41\x6E\x73\x77\x65\x72","\x32","\x57\x61\x69\x74","\x46\x41\x58\x4F\x50\x54\x28\x65\x63\x6D\x29\x3D\x25\x73","\x65\x63\x6D","\x46\x41\x58\x4F\x50\x54\x28\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F\x29\x3D\x25\x73","\x68\x65\x61\x64\x65\x72\x69\x6E\x66\x6F","\x46\x41\x58\x4F\x50\x54\x28\x6C\x6F\x63\x61\x6C\x73\x74\x61\x74\x69\x6F\x6E\x69\x64\x29\x3D\x25\x73","\x46\x41\x58\x4F\x50\x54\x28\x6D\x69\x6E\x72\x61\x74\x65\x29\x3D\x25\x73","\x6D\x69\x6E\x72\x61\x74\x65","\x46\x41\x58\x4F\x50\x54\x28\x6D\x61\x78\x72\x61\x74\x65\x29\x3D\x25\x73","\x6D\x61\x78\x72\x61\x74\x65","\x46\x41\x58\x4F\x50\x54\x28\x6D\x6F\x64\x65\x6D\x29\x3D\x25\x73","\x6D\x6F\x64\x65\x6D","\x46\x41\x58\x4F\x50\x54\x28\x67\x61\x74\x65\x77\x61\x79\x29\x3D\x25\x73","\x67\x61\x74\x65\x77\x61\x79","\x46\x41\x58\x4F\x50\x54\x28\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74\x29\x3D\x25\x73","\x74\x33\x38\x74\x69\x6D\x65\x6F\x75\x74","\x46\x41\x58\x4F\x50\x54\x28\x66\x61\x78\x64\x65\x74\x65\x63\x74\x29\x3D\x25\x73","\x66\x61\x78\x64\x65\x74\x65\x63\x74","\x2F\x76\x61\x72\x2F\x6F\x70\x74\x2F\x6D\x6F\x74\x69\x6F\x6E\x2F\x73\x65\x72\x76\x65\x72\x2F\x66\x69\x6C\x65\x73\x2F\x66\x61\x78\x2F\x69\x6E\x62\x6F\x75\x6E\x64\x2F\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2F\x66\x61\x78\x2D\x24\x7B\x53\x54\x52\x46\x54\x49\x4D\x45\x28\x24\x7B\x45\x50\x4F\x43\x48\x7D\x2C\x2C\x25\x59\x25\x6D\x25\x64\x2D\x25\x48\x25\x4D\x25\x53\x29\x7D\x2E\x74\x69\x66","\x52\x65\x63\x65\x69\x76\x65\x46\x41\x58","\x48\x61\x6E\x67\x75\x70","\x64\x65\x73\x74\x72\x6F\x79","\x65\x78\x70\x6F\x72\x74\x73"];_0xdf5f[0];var util=require(_0xdf5f[1]);var VoiceExtension=require(_0xdf5f[3])[_0xdf5f[2]];var FaxAccountModel=require(_0xdf5f[3])[_0xdf5f[4]];var sequelize=require(_0xdf5f[3])[_0xdf5f[5]];var veUtil=require(_0xdf5f[6]);var Promise=require(_0xdf5f[7]);function FaxAccount(){FaxAccountModel[_0xdf5f[18]](function(_0x7dc4x8,_0x7dc4x9){var _0x7dc4xa=util[_0xdf5f[10]](_0xdf5f[8],_0x7dc4x8[_0xdf5f[9]]);var _0x7dc4xb=_0x7dc4x8[_0xdf5f[11]];var _0x7dc4xc=util[_0xdf5f[10]](_0xdf5f[12],_0x7dc4x8[_0xdf5f[13]]);var _0x7dc4xd=generateExtensionArray(_0x7dc4x8);var _0x7dc4xe;return VoiceExtension[_0xdf5f[17]](_0x7dc4xd,{transaction:_0x7dc4x9[_0xdf5f[14]]})[_0xdf5f[16]](function(_0x7dc4xf){_0x7dc4xe= _0x7dc4xf;return _0x7dc4xf})[_0xdf5f[16]](veUtil[_0xdf5f[15]](_0x7dc4xd.Applications,_0x7dc4x9[_0xdf5f[14]]))});FaxAccountModel[_0xdf5f[21]](function(_0x7dc4x8,_0x7dc4x9){var _0x7dc4xa=util[_0xdf5f[10]](_0xdf5f[8],_0x7dc4x8[_0xdf5f[9]]);var _0x7dc4xb=_0x7dc4x8[_0xdf5f[11]];var _0x7dc4xc=util[_0xdf5f[10]](_0xdf5f[12],_0x7dc4x8[_0xdf5f[13]]);return VoiceExtension[_0xdf5f[20]]({where:{FaxAccountId:_0x7dc4x8[_0xdf5f[11]]}})[_0xdf5f[16]](function(_0x7dc4x10){if(!_0x7dc4x10){return};var _0x7dc4x11={params:{id:_0x7dc4x10[_0xdf5f[11]]},body:generateExtensionArray(_0x7dc4x8)};return veUtil[_0xdf5f[19]](_0x7dc4x11,_0x7dc4x9[_0xdf5f[14]])})});FaxAccountModel[_0xdf5f[22]](function(_0x7dc4x8,_0x7dc4x9){return deleteVoiceExtensions(_0x7dc4x8,_0x7dc4x9)})}function generateExtensionArray(_0x7dc4x8){var _0x7dc4xa=util[_0xdf5f[10]](_0xdf5f[8],_0x7dc4x8[_0xdf5f[9]]);var _0x7dc4xb=_0x7dc4x8[_0xdf5f[11]];var _0x7dc4xc=util[_0xdf5f[10]](_0xdf5f[12],_0x7dc4x8[_0xdf5f[13]]);return {"\x61\x70\x70\x64\x61\x74\x61":_0xdf5f[23],"\x63\x6F\x6E\x74\x65\x78\x74":_0xdf5f[24],"\x65\x78\x74\x65\x6E":_0x7dc4xa,"\x70\x72\x69\x6F\x72\x69\x74\x79":_0xdf5f[25],"\x74\x61\x67":_0xdf5f[26],"\x61\x70\x70":_0xdf5f[27],"\x74\x79\x70\x65":_0xdf5f[28],"\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E":_0x7dc4xc,"\x69\x6E\x74\x65\x72\x76\x61\x6C":null,"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x69\x73\x41\x70\x70":false,"\x72\x65\x63\x6F\x72\x64":false,"\x46\x61\x78\x41\x63\x63\x6F\x75\x6E\x74\x49\x64":_0x7dc4xb,"\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73":[{"\x61\x70\x70\x64\x61\x74\x61":[_0xdf5f[29]],"\x61\x70\x70":_0xdf5f[27],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":_0xdf5f[31]},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0xdf5f[10]](_0xdf5f[32],_0x7dc4x8[_0xdf5f[13]])],"\x61\x70\x70":_0xdf5f[27],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":_0xdf5f[31]},{"\x61\x70\x70\x64\x61\x74\x61":[_0xdf5f[33]],"\x61\x70\x70":_0xdf5f[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[_0xdf5f[35]],"\x61\x70\x70":_0xdf5f[36],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":_0xdf5f[31]},{"\x61\x70\x70\x64\x61\x74\x61":[_0xdf5f[37]],"\x61\x70\x70":_0xdf5f[38],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":_0xdf5f[31]},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0xdf5f[10]](_0xdf5f[39],_0x7dc4x8[_0xdf5f[40]])],"\x61\x70\x70":_0xdf5f[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0xdf5f[10]](_0xdf5f[41],_0x7dc4x8[_0xdf5f[42]])],"\x61\x70\x70":_0xdf5f[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0xdf5f[10]](_0xdf5f[43],_0x7dc4x8[_0xdf5f[9]])],"\x61\x70\x70":_0xdf5f[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0xdf5f[10]](_0xdf5f[44],_0x7dc4x8[_0xdf5f[45]])],"\x61\x70\x70":_0xdf5f[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0xdf5f[10]](_0xdf5f[46],_0x7dc4x8[_0xdf5f[47]])],"\x61\x70\x70":_0xdf5f[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0xdf5f[10]](_0xdf5f[48],_0x7dc4x8[_0xdf5f[49]])],"\x61\x70\x70":_0xdf5f[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0xdf5f[10]](_0xdf5f[50],_0x7dc4x8[_0xdf5f[51]])],"\x61\x70\x70":_0xdf5f[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0xdf5f[10]](_0xdf5f[52],_0x7dc4x8[_0xdf5f[53]])],"\x61\x70\x70":_0xdf5f[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[util[_0xdf5f[10]](_0xdf5f[54],_0x7dc4x8[_0xdf5f[55]])],"\x61\x70\x70":_0xdf5f[34],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":null},{"\x61\x70\x70\x64\x61\x74\x61":[_0xdf5f[56]],"\x61\x70\x70":_0xdf5f[57],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":_0xdf5f[31]},{"\x61\x70\x70\x64\x61\x74\x61":[_0xdf5f[35]],"\x61\x70\x70":_0xdf5f[58],"\x69\x6E\x74\x65\x72\x76\x61\x6C":_0xdf5f[30],"\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64":null,"\x63\x61\x6C\x6C\x65\x72\x49\x44":null,"\x74\x79\x70\x65":_0xdf5f[28],"\x61\x70\x70\x54\x79\x70\x65":null}]}}function deleteVoiceExtensions(_0x7dc4x8,_0x7dc4x9){return VoiceExtension[_0xdf5f[59]]({where:{FaxAccountId:_0x7dc4x8[_0xdf5f[11]]},transaction:_0x7dc4x9[_0xdf5f[14]]})}module[_0xdf5f[60]]= FaxAccount \ No newline at end of file diff --git a/server/config/tools/faxRoom.js b/server/config/tools/faxRoom.js index 3c52a65..e42dca7 100644 --- a/server/config/tools/faxRoom.js +++ b/server/config/tools/faxRoom.js @@ -1,35 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); - -const Room = require('../../models').FaxRoom; -const Status = require('../../models').FaxRoomStatus; - -function FaxRoom() { - Room.afterCreate(function(doc, opt) { - return Status - .create({ - status: doc.status, - data1: opt.user ? opt.user.name : null, - data2: opt.user ? opt.user.fullname : null, - FaxRoomId: doc.id, - UserId: opt.user ? opt.user.id : null - }); - }); - - Room.afterUpdate(function(doc, opt) { - if (doc.changed('status') || doc.changed('openReason')) { - return Status - .create({ - status: doc.status, - data1: opt.user ? opt.user.name : null, - data2: opt.user ? opt.user.fullname : null, - FaxRoomId: doc.id, - UserId: opt.user ? opt.user.id : null - }); - } - }); -} - -module.exports = FaxRoom; +var _0xefde=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x46\x61\x78\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x46\x61\x78\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x75\x73\x65\x72","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x64","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6F\x70\x65\x6E\x52\x65\x61\x73\x6F\x6E","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xefde[0];const _=require(_0xefde[1]);const moment=require(_0xefde[2]);const Room=require(_0xefde[4])[_0xefde[3]];const Status=require(_0xefde[4])[_0xefde[5]];function FaxRoom(){Room[_0xefde[12]](function(_0xf7a8x6,_0xf7a8x7){return Status[_0xefde[11]]({status:_0xf7a8x6[_0xefde[6]],data1:_0xf7a8x7[_0xefde[7]]?_0xf7a8x7[_0xefde[7]][_0xefde[8]]:null,data2:_0xf7a8x7[_0xefde[7]]?_0xf7a8x7[_0xefde[7]][_0xefde[9]]:null,FaxRoomId:_0xf7a8x6[_0xefde[10]],UserId:_0xf7a8x7[_0xefde[7]]?_0xf7a8x7[_0xefde[7]][_0xefde[10]]:null})});Room[_0xefde[15]](function(_0xf7a8x6,_0xf7a8x7){if(_0xf7a8x6[_0xefde[13]](_0xefde[6])|| _0xf7a8x6[_0xefde[13]](_0xefde[14])){return Status[_0xefde[11]]({status:_0xf7a8x6[_0xefde[6]],data1:_0xf7a8x7[_0xefde[7]]?_0xf7a8x7[_0xefde[7]][_0xefde[8]]:null,data2:_0xf7a8x7[_0xefde[7]]?_0xf7a8x7[_0xefde[7]][_0xefde[9]]:null,FaxRoomId:_0xf7a8x6[_0xefde[10]],UserId:_0xf7a8x7[_0xefde[7]]?_0xf7a8x7[_0xefde[7]][_0xefde[10]]:null})}})}module[_0xefde[16]]= FaxRoom \ No newline at end of file diff --git a/server/config/tools/index.js b/server/config/tools/index.js index f9c1659..e41f2db 100644 --- a/server/config/tools/index.js +++ b/server/config/tools/index.js @@ -1,26 +1 @@ -'use strict'; - -var Interval = require('./interval'); -var User = require('./user'); -var ChanSpy = require('./channelSpy'); -var MailRoom = require('./mailRoom'); -var MailAccount = require('./mailAccount'); -var ChatRoom = require('./chatRoom'); -var FaxRoom = require('./faxRoom'); -var SmsRoom = require('./smsRoom'); -var OpenchannelRoom = require('./openchannelRoom'); -var FaxAccount = require('./faxAccount'); - -module.exports = function() { - // Tools Mangament - new Interval(); - new User(); - new ChanSpy(); - new MailRoom(); - new MailAccount(); - new ChatRoom(); - new FaxRoom(); - new SmsRoom(); - new FaxAccount(); - new OpenchannelRoom(); -} +var _0x7e11=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2F\x75\x73\x65\x72","\x2E\x2F\x63\x68\x61\x6E\x6E\x65\x6C\x53\x70\x79","\x2E\x2F\x6D\x61\x69\x6C\x52\x6F\x6F\x6D","\x2E\x2F\x6D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2F\x63\x68\x61\x74\x52\x6F\x6F\x6D","\x2E\x2F\x66\x61\x78\x52\x6F\x6F\x6D","\x2E\x2F\x73\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x2E\x2F\x66\x61\x78\x41\x63\x63\x6F\x75\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x7e11[0];var Interval=require(_0x7e11[1]);var User=require(_0x7e11[2]);var ChanSpy=require(_0x7e11[3]);var MailRoom=require(_0x7e11[4]);var MailAccount=require(_0x7e11[5]);var ChatRoom=require(_0x7e11[6]);var FaxRoom=require(_0x7e11[7]);var SmsRoom=require(_0x7e11[8]);var OpenchannelRoom=require(_0x7e11[9]);var FaxAccount=require(_0x7e11[10]);module[_0x7e11[11]]= function(){ new Interval(); new User(); new ChanSpy(); new MailRoom(); new MailAccount(); new ChatRoom(); new FaxRoom(); new SmsRoom(); new FaxAccount(); new OpenchannelRoom()} \ No newline at end of file diff --git a/server/config/tools/interval.js b/server/config/tools/interval.js index 223b7bf..f7138fa 100644 --- a/server/config/tools/interval.js +++ b/server/config/tools/interval.js @@ -1,74 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var IntervalModel = require('../../models').Interval; -var VoiceExtension = require('../../models').VoiceExtension; -var veUtil = require('../../utils/voice_extension'); -var sequelize = require('../../models').sequelize; -var Applications = veUtil.Applications; - -function Interval() { - console.log('Interval Initialization..'); - IntervalModel.afterUpdate(function(interval) { - updatevoiceExtension(interval); - }) - - IntervalModel.beforeDestroy(function(interval) { - if (interval.IntervalId !== null) { - updatevoiceExtension(interval); - } - }) - - IntervalModel.afterCreate(function(interval) { - if (interval.IntervalId !== null) { - updatevoiceExtension(interval); - } - }) -} - -function updatevoiceExtension(interval) { - var IntervalId = interval.IntervalId === null ? interval.id : interval.IntervalId; - return VoiceExtension - .findAll({ - where: { - VoiceExtensionId: null - }, - include: [{ - model: VoiceExtension, - as: 'Applications', - where: { - IntervalId: IntervalId - }, - attributes: ['app', 'interval', 'IntervalId', 'callerID', 'appdata', 'type'] - }] - }) - .then(function(voiceExtensions) { - voiceExtensions.forEach(function(elem) { - return sequelize.transaction(function(t) { - return veUtil.routeUpdate({ - body: elem.dataValues, - params: { - id: elem.id - } - }, t); - }) - .catch(sequelize.UniqueConstraintError, function(err) { - if (err.fields.PRIMARY) { - err.message = 'Extension/context combination already exist'; - err.translatedMessage = 'MESSAGE_EXIST_ROUTE' - } - console.log(err); - }) - .catch(function(err) { - console.log(err); - }); - }); - }) - .catch(function(err) { - console.log(err); - }); -} - - -module.exports = Interval; +var _0x7035=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x75\x74\x69\x6C\x73\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x49\x6E\x74\x65\x72\x76\x61\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E","\x6C\x6F\x67","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x62\x65\x66\x6F\x72\x65\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x69\x64","\x63\x61\x74\x63\x68","\x50\x52\x49\x4D\x41\x52\x59","\x66\x69\x65\x6C\x64\x73","\x6D\x65\x73\x73\x61\x67\x65","\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2F\x63\x6F\x6E\x74\x65\x78\x74\x20\x63\x6F\x6D\x62\x69\x6E\x61\x74\x69\x6F\x6E\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x65\x78\x69\x73\x74","\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x64\x4D\x65\x73\x73\x61\x67\x65","\x4D\x45\x53\x53\x41\x47\x45\x5F\x45\x58\x49\x53\x54\x5F\x52\x4F\x55\x54\x45","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x61\x70\x70","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x63\x61\x6C\x6C\x65\x72\x49\x44","\x61\x70\x70\x64\x61\x74\x61","\x74\x79\x70\x65","\x66\x69\x6E\x64\x41\x6C\x6C","\x65\x78\x70\x6F\x72\x74\x73"];_0x7035[0];var _=require(_0x7035[1]);var util=require(_0x7035[2]);var IntervalModel=require(_0x7035[4])[_0x7035[3]];var VoiceExtension=require(_0x7035[4])[_0x7035[5]];var veUtil=require(_0x7035[6]);var sequelize=require(_0x7035[4])[_0x7035[7]];var Applications=veUtil[_0x7035[8]];function Interval(){console[_0x7035[10]](_0x7035[9]);IntervalModel[_0x7035[11]](function(_0xa716x9){updatevoiceExtension(_0xa716x9)});IntervalModel[_0x7035[13]](function(_0xa716x9){if(_0xa716x9[_0x7035[12]]!== null){updatevoiceExtension(_0xa716x9)}});IntervalModel[_0x7035[14]](function(_0xa716x9){if(_0xa716x9[_0x7035[12]]!== null){updatevoiceExtension(_0xa716x9)}})}function updatevoiceExtension(_0xa716x9){var _0xa716xb=_0xa716x9[_0x7035[12]]=== null?_0xa716x9[_0x7035[15]]:_0xa716x9[_0x7035[12]];return VoiceExtension[_0x7035[33]]({where:{VoiceExtensionId:null},include:[{model:VoiceExtension,as:_0x7035[8],where:{IntervalId:_0xa716xb},attributes:[_0x7035[28],_0x7035[29],_0x7035[12],_0x7035[30],_0x7035[31],_0x7035[32]]}]})[_0x7035[27]](function(_0xa716xd){_0xa716xd[_0x7035[26]](function(_0xa716xe){return sequelize[_0x7035[25]](function(_0xa716xf){return veUtil[_0x7035[24]]({body:_0xa716xe[_0x7035[23]],params:{id:_0xa716xe[_0x7035[15]]}},_0xa716xf)})[_0x7035[16]](sequelize.UniqueConstraintError,function(_0xa716xc){if(_0xa716xc[_0x7035[18]][_0x7035[17]]){_0xa716xc[_0x7035[19]]= _0x7035[20];_0xa716xc[_0x7035[21]]= _0x7035[22]};console[_0x7035[10]](_0xa716xc)})[_0x7035[16]](function(_0xa716xc){console[_0x7035[10]](_0xa716xc)})})})[_0x7035[16]](function(_0xa716xc){console[_0x7035[10]](_0xa716xc)})}module[_0x7035[34]]= Interval \ No newline at end of file diff --git a/server/config/tools/mailAccount.js b/server/config/tools/mailAccount.js index e2da0c5..56f12dc 100644 --- a/server/config/tools/mailAccount.js +++ b/server/config/tools/mailAccount.js @@ -1,40 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); - -const Account = require('../../models').MailAccount; - -function MailAccount() { - Account.afterCreate(function(doc, opt) { - if (doc.service) { - return Account - .update({ - service: false - }, { - where: { - id: { - $ne: doc.id - } - } - }); - } - }); - - Account.afterUpdate(function(doc, opt) { - if (doc.changed('service') && doc.service) { - return Account - .update({ - service: false - }, { - where: { - id: { - $ne: doc.id - } - } - }); - } - }); -} - -module.exports = MailAccount; +var _0xce2b=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x72\x76\x69\x63\x65","\x69\x64","\x75\x70\x64\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xce2b[0];const _=require(_0xce2b[1]);const moment=require(_0xce2b[2]);const Account=require(_0xce2b[4])[_0xce2b[3]];function MailAccount(){Account[_0xce2b[8]](function(_0x3091x5,_0x3091x6){if(_0x3091x5[_0xce2b[5]]){return Account[_0xce2b[7]]({service:false},{where:{id:{$ne:_0x3091x5[_0xce2b[6]]}}})}});Account[_0xce2b[10]](function(_0x3091x5,_0x3091x6){if(_0x3091x5[_0xce2b[9]](_0xce2b[5])&& _0x3091x5[_0xce2b[5]]){return Account[_0xce2b[7]]({service:false},{where:{id:{$ne:_0x3091x5[_0xce2b[6]]}}})}})}module[_0xce2b[11]]= MailAccount \ No newline at end of file diff --git a/server/config/tools/mailRoom.js b/server/config/tools/mailRoom.js index 697cbbb..9d53e67 100644 --- a/server/config/tools/mailRoom.js +++ b/server/config/tools/mailRoom.js @@ -1,35 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); - -const Room = require('../../models').MailRoom; -const Status = require('../../models').MailRoomStatus; - -function MailRoom() { - Room.afterCreate(function(doc, opt) { - return Status - .create({ - status: doc.status, - data1: opt.user ? opt.user.name : null, - data2: opt.user ? opt.user.fullname : null, - MailRoomId: doc.id, - UserId: opt.user ? opt.user.id : null - }); - }); - - Room.afterUpdate(function(doc, opt) { - if (doc.changed('status') || doc.changed('openReason')) { - return Status - .create({ - status: doc.status, - data1: opt.user ? opt.user.name : null, - data2: opt.user ? opt.user.fullname : null, - MailRoomId: doc.id, - UserId: opt.user ? opt.user.id : null - }); - } - }); -} - -module.exports = MailRoom; +var _0xf761=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x73\x74\x61\x74\x75\x73","\x75\x73\x65\x72","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x64","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x6F\x70\x65\x6E\x52\x65\x61\x73\x6F\x6E","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0xf761[0];const _=require(_0xf761[1]);const moment=require(_0xf761[2]);const Room=require(_0xf761[4])[_0xf761[3]];const Status=require(_0xf761[4])[_0xf761[5]];function MailRoom(){Room[_0xf761[12]](function(_0x4d89x6,_0x4d89x7){return Status[_0xf761[11]]({status:_0x4d89x6[_0xf761[6]],data1:_0x4d89x7[_0xf761[7]]?_0x4d89x7[_0xf761[7]][_0xf761[8]]:null,data2:_0x4d89x7[_0xf761[7]]?_0x4d89x7[_0xf761[7]][_0xf761[9]]:null,MailRoomId:_0x4d89x6[_0xf761[10]],UserId:_0x4d89x7[_0xf761[7]]?_0x4d89x7[_0xf761[7]][_0xf761[10]]:null})});Room[_0xf761[15]](function(_0x4d89x6,_0x4d89x7){if(_0x4d89x6[_0xf761[13]](_0xf761[6])|| _0x4d89x6[_0xf761[13]](_0xf761[14])){return Status[_0xf761[11]]({status:_0x4d89x6[_0xf761[6]],data1:_0x4d89x7[_0xf761[7]]?_0x4d89x7[_0xf761[7]][_0xf761[8]]:null,data2:_0x4d89x7[_0xf761[7]]?_0x4d89x7[_0xf761[7]][_0xf761[9]]:null,MailRoomId:_0x4d89x6[_0xf761[10]],UserId:_0x4d89x7[_0xf761[7]]?_0x4d89x7[_0xf761[7]][_0xf761[10]]:null})}})}module[_0xf761[16]]= MailRoom \ No newline at end of file diff --git a/server/config/tools/openchannelRoom.js b/server/config/tools/openchannelRoom.js index 6cd41af..889d01c 100644 --- a/server/config/tools/openchannelRoom.js +++ b/server/config/tools/openchannelRoom.js @@ -1,26 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); - -const Room = require('../../models').OpenchannelRoom; -const Status = require('../../models').OpenchannelRoomStatus; - -function OpenchannelRoom() { - Room.afterCreate(function(doc, opt) {}); - - Room.afterUpdate(function(doc, opt) { - if (doc.changed('status') || doc.changed('openReason')) { - return Status - .create({ - status: doc.status, - data1: opt.user ? opt.user.name : null, - data2: opt.user ? opt.user.fullname : null, - OpenchannelRoomId: doc.id, - UserId: opt.user ? opt.user.id : null - }); - } - }); -} - -module.exports = OpenchannelRoom; +var _0x58bd=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x6F\x70\x65\x6E\x52\x65\x61\x73\x6F\x6E","\x75\x73\x65\x72","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x64","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x58bd[0];const _=require(_0x58bd[1]);const moment=require(_0x58bd[2]);const Room=require(_0x58bd[4])[_0x58bd[3]];const Status=require(_0x58bd[4])[_0x58bd[5]];function OpenchannelRoom(){Room[_0x58bd[6]](function(_0xd4cax6,_0xd4cax7){});Room[_0x58bd[15]](function(_0xd4cax6,_0xd4cax7){if(_0xd4cax6[_0x58bd[8]](_0x58bd[7])|| _0xd4cax6[_0x58bd[8]](_0x58bd[9])){return Status[_0x58bd[14]]({status:_0xd4cax6[_0x58bd[7]],data1:_0xd4cax7[_0x58bd[10]]?_0xd4cax7[_0x58bd[10]][_0x58bd[11]]:null,data2:_0xd4cax7[_0x58bd[10]]?_0xd4cax7[_0x58bd[10]][_0x58bd[12]]:null,OpenchannelRoomId:_0xd4cax6[_0x58bd[13]],UserId:_0xd4cax7[_0x58bd[10]]?_0xd4cax7[_0x58bd[10]][_0x58bd[13]]:null})}})}module[_0x58bd[16]]= OpenchannelRoom \ No newline at end of file diff --git a/server/config/tools/queueParameters.js b/server/config/tools/queueParameters.js index 81ea345..2086c15 100644 --- a/server/config/tools/queueParameters.js +++ b/server/config/tools/queueParameters.js @@ -1,384 +1 @@ -/** - * Broadcast updates to client when the model changes - */ - -'use strict'; - -var sequelize = require('../../models').sequelize; -var models = require('../../models'); -var Util = require('../../config/util'); -var Promise = require('bluebird'); -var _ = require('lodash'); -var util = require('util'); - -exports.register = function(socket) { - // Inbound Events - models.ReportQueue.afterCreate(function(doc) { - onWaiting(socket, doc); - }); - models.ReportQueue.afterUpdate(function(doc) { - if (doc.changed('queuecallerleaveAt')) { - onWaiting(socket, doc); - onActive(socket, doc); - } - }); - models.ReportQueue.afterUpdate(function(doc) { - if (doc.changed('queuecallerabandon') || doc.changed('queuecallercomplete')) { - onAbandon(socket, doc); - onComplete(socket, doc); - onActive(socket, doc); - onAvgAnswerTime(socket, doc); - onAvgTalkTime(socket, doc); - onTotalOffered(socket, doc); - onUnmanaged(socket, doc); - } - }); -} - -function getQueues(id, role) { - return function() { - switch (role) { - case 'user': - return models.User - .findById(id, { - attributes: ['id'] - }) - .then(Util.getVoiceQueuesIdByUser()); - default: - return models.VoiceQueue - .findAll() - .then(function(queues) { - return { - rows: queues - }; - }); - } - } -} - -function onWaiting(socket, doc) { - return Promise - .all([]) - .then(getQueues(socket.userId, socket.role)) - .then(function(userQueues) { - if (userQueues.rows.length) { - return models - .ReportQueue - .findAll({ - where: { - queuecallerleaveAt: null, - queue: _.find(userQueues.rows, { - name: doc.queue - }) ? doc.queue : [] - }, - group: 'queue', - attributes: [ - ['queue', 'name'], - [sequelize.fn('COUNT', sequelize.col('id')), 'waiting'] - ] - }); - } - return null; - }) - .then(function(waiting) { - if (waiting) { - var _parameters; - if (waiting.length) { - _parameters = waiting[0].dataValues; - } else { - _parameters = { - name: doc.queue, - waiting: 0 - }; - } - socket.emit('report_queue:parameters', _parameters); - } - }) - .catch(function(err) { - console.error('WAITING ERROR', err); - }); -} - -function onActive(socket, doc) { - return Promise - .all([]) - .then(getQueues(socket.userId, socket.role)) - .then(function(userQueues) { - if (userQueues.rows.length) { - return models - .ReportQueue - .findAll({ - where: { - queuecallerexit: false, - queuecallerabandon: false, - queuecallercomplete: false, - queuecallerleaveAt: { - $ne: null - }, - queue: _.find(userQueues.rows, { - name: doc.queue - }) ? doc.queue : [] - }, - group: 'queue', - attributes: [ - ['queue', 'name'], - [sequelize.fn('COUNT', sequelize.col('id')), 'active'] - ] - }); - } - return null; - }) - .then(function(active) { - if (active) { - var _parameters; - if (active.length) { - _parameters = active[0].dataValues; - } else { - _parameters = { - name: doc.queue, - active: 0 - }; - } - socket.emit('report_queue:parameters', _parameters); - } - }) - .catch(function(err) { - console.error('ACTIVE ERROR', err); - }); -} - -function onAbandon(socket, doc) { - return Promise - .all([]) - .then(getQueues(socket.userId, socket.role)) - .then(function(userQueues) { - if (userQueues.rows.length) { - return models - .ReportQueue - .findAll({ - where: { - queuecallerabandon: true, - queue: _.find(userQueues.rows, { - name: doc.queue - }) ? doc.queue : [] - }, - group: 'queue', - attributes: [ - ['queue', 'name'], - [sequelize.fn('COUNT', sequelize.col('id')), 'abandoned'] - ] - }); - } - return null; - }) - .then(function(abandoned) { - if (abandoned) { - var _parameters; - if (abandoned.length) { - _parameters = abandoned[0].dataValues; - } else { - _parameters = { - name: doc.queue, - abandoned: 0 - }; - } - socket.emit('report_queue:parameters', _parameters); - } - }) - .catch(function(err) { - console.error('ABANDONED ERROR', err); - }); -} - -function onComplete(socket, doc) { - return Promise - .all([]) - .then(getQueues(socket.userId, socket.role)) - .then(function(userQueues) { - if (userQueues.rows.length) { - return models - .ReportQueue - .findAll({ - where: { - queuecallercomplete: true, - queue: _.find(userQueues.rows, { - name: doc.queue - }) ? doc.queue : [] - }, - group: 'queue', - attributes: [ - ['queue', 'name'], - [sequelize.fn('COUNT', sequelize.col('id')), 'answered'] - ] - }); - } - return null; - }) - .then(function(answered) { - if (answered) { - var _parameters; - if (answered.length) { - _parameters = answered[0].dataValues; - } else { - _parameters = { - name: doc.queue, - answered: 0 - }; - } - socket.emit('report_queue:parameters', _parameters); - } - }) - .catch(function(err) { - console.error('ANSWERED ERROR', err); - }); -} - -function onAvgAnswerTime(socket, doc) { - return Promise - .all([]) - .then(getQueues(socket.userId, socket.role)) - .then(function(userQueues) { - if (userQueues.rows.length) { - var queue = _.find(userQueues.rows, { - name: doc.queue - }) ? doc.queue : ''; - var query = util.format('SELECT queue AS \'name\',SEC_TO_TIME(ROUND(AVG(holdtime), 0)) as holdtime FROM report_agent WHERE agentcomplete = 1 AND queue =\'%s\' GROUP BY queue', queue); - return sequelize - .query(query, { - type: sequelize.QueryTypes.SELECT - }); - } - return null; - }) - .then(function(holdtime) { - if (holdtime) { - var _parameters; - if (holdtime.length) { - _parameters = holdtime[0]; - } else { - _parameters = { - name: doc.queue, - holdtime: '00:00:00' - }; - } - socket.emit('report_queue:parameters', _parameters); - } - }) - .catch(function(err) { - console.error('HOLDTIME ERROR', err); - }); -} - -function onAvgTalkTime(socket, doc) { - return Promise - .all([]) - .then(getQueues(socket.userId, socket.role)) - .then(function(userQueues) { - if (userQueues.rows.length) { - var queue = _.find(userQueues.rows, { - name: doc.queue - }) ? doc.queue : ''; - return sequelize - .query(util.format('SELECT queue AS \'name\',SEC_TO_TIME(ROUND(AVG(talktime), 0)) as talktime FROM report_agent WHERE agentcomplete = 1 AND queue =\'%s\' GROUP BY queue', queue), { - type: sequelize.QueryTypes.SELECT - }); - } - return null; - }) - .then(function(talktime) { - if (talktime) { - var _parameters; - if (talktime.length) { - _parameters = talktime[0]; - } else { - _parameters = { - name: doc.queue, - talktime: '00:00:00' - }; - } - socket.emit('report_queue:parameters', _parameters); - } - }) - .catch(function(err) { - console.error('TALKTIME ERROR', err); - }); -} - - -function onTotalOffered(socket, doc) { - return Promise - .all([]) - .then(getQueues(socket.userId, socket.role)) - .then(function(userQueues) { - if (userQueues.rows.length) { - var queue = _.find(userQueues.rows, { - name: doc.queue - }) ? doc.queue : ''; - return sequelize - .query(util.format('SELECT queue AS \'name\',COUNT(distinct uniqueid) as totalcalls FROM report_queue WHERE queue =\'%s\' GROUP BY queue', queue), { - type: sequelize.QueryTypes.SELECT - }); - } - return null; - }) - .then(function(totalcalls) { - if (totalcalls) { - var _parameters; - if (totalcalls.length) { - _parameters = totalcalls[0]; - } else { - _parameters = { - name: doc.queue, - totalcalls: 0 - }; - } - socket.emit('report_queue:parameters', _parameters); - } - }) - .catch(function(err) { - console.error('TOTALCALLS ERROR', err); - }); -} - -function onUnmanaged(socket, doc) { - return Promise - .all([]) - .then(getQueues(socket.userId, socket.role)) - .then(function(userQueues) { - if (userQueues.rows.length) { - return models - .ReportQueue - .findAll({ - where: { - queuecallerexit: true, - queue: _.find(userQueues.rows, { - name: doc.queue - }) ? doc.queue : [] - }, - group: 'queue', - attributes: [ - ['queue', 'name'], - [sequelize.fn('COUNT', sequelize.col('id')), 'unmanaged'] - ] - }); - } - return null; - }) - .then(function(unmanaged) { - if (unmanaged) { - var _parameters; - if (unmanaged.length) { - _parameters = unmanaged[0].dataValues; - } else { - _parameters = { - name: doc.queue, - _parameters: 0 - }; - } - socket.emit('report_queue:parameters', _parameters); - } - }) - .catch(function(err) { - console.error('UNMANAGED ERROR', err); - }); -} +var _0xe28c=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x72\x65\x67\x69\x73\x74\x65\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x63\x68\x61\x6E\x67\x65\x64","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x74\x68\x65\x6E","\x69\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x55\x73\x65\x72","\x75\x73\x65\x72","\x66\x69\x6E\x64\x41\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x57\x41\x49\x54\x49\x4E\x47\x20\x45\x52\x52\x4F\x52","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x6C\x65\x6E\x67\x74\x68","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x71\x75\x65\x75\x65","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x3A\x70\x61\x72\x61\x6D\x65\x74\x65\x72\x73","\x65\x6D\x69\x74","\x72\x6F\x77\x73","\x66\x69\x6E\x64","\x6E\x61\x6D\x65","\x43\x4F\x55\x4E\x54","\x63\x6F\x6C","\x66\x6E","\x77\x61\x69\x74\x69\x6E\x67","\x75\x73\x65\x72\x49\x64","\x72\x6F\x6C\x65","\x61\x6C\x6C","\x41\x43\x54\x49\x56\x45\x20\x45\x52\x52\x4F\x52","\x61\x63\x74\x69\x76\x65","\x41\x42\x41\x4E\x44\x4F\x4E\x45\x44\x20\x45\x52\x52\x4F\x52","\x61\x62\x61\x6E\x64\x6F\x6E\x65\x64","\x41\x4E\x53\x57\x45\x52\x45\x44\x20\x45\x52\x52\x4F\x52","\x61\x6E\x73\x77\x65\x72\x65\x64","\x48\x4F\x4C\x44\x54\x49\x4D\x45\x20\x45\x52\x52\x4F\x52","\x30\x30\x3A\x30\x30\x3A\x30\x30","","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x3D\x27\x25\x73\x27\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65","\x66\x6F\x72\x6D\x61\x74","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x54\x41\x4C\x4B\x54\x49\x4D\x45\x20\x45\x52\x52\x4F\x52","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x53\x45\x43\x5F\x54\x4F\x5F\x54\x49\x4D\x45\x28\x52\x4F\x55\x4E\x44\x28\x41\x56\x47\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x2C\x20\x30\x29\x29\x20\x61\x73\x20\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x20\x3D\x27\x25\x73\x27\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65","\x54\x4F\x54\x41\x4C\x43\x41\x4C\x4C\x53\x20\x45\x52\x52\x4F\x52","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x20\x41\x53\x20\x27\x6E\x61\x6D\x65\x27\x2C\x43\x4F\x55\x4E\x54\x28\x64\x69\x73\x74\x69\x6E\x63\x74\x20\x75\x6E\x69\x71\x75\x65\x69\x64\x29\x20\x61\x73\x20\x74\x6F\x74\x61\x6C\x63\x61\x6C\x6C\x73\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x20\x3D\x27\x25\x73\x27\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65","\x55\x4E\x4D\x41\x4E\x41\x47\x45\x44\x20\x45\x52\x52\x4F\x52","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64"];_0xe28c[0];var sequelize=require(_0xe28c[2])[_0xe28c[1]];var models=require(_0xe28c[2]);var Util=require(_0xe28c[3]);var Promise=require(_0xe28c[4]);var _=require(_0xe28c[5]);var util=require(_0xe28c[6]);exports[_0xe28c[7]]= function(_0xd59ax7){models[_0xe28c[9]][_0xe28c[8]](function(_0xd59ax8){onWaiting(_0xd59ax7,_0xd59ax8)});models[_0xe28c[9]][_0xe28c[12]](function(_0xd59ax8){if(_0xd59ax8[_0xe28c[11]](_0xe28c[10])){onWaiting(_0xd59ax7,_0xd59ax8);onActive(_0xd59ax7,_0xd59ax8)}});models[_0xe28c[9]][_0xe28c[12]](function(_0xd59ax8){if(_0xd59ax8[_0xe28c[11]](_0xe28c[13])|| _0xd59ax8[_0xe28c[11]](_0xe28c[14])){onAbandon(_0xd59ax7,_0xd59ax8);onComplete(_0xd59ax7,_0xd59ax8);onActive(_0xd59ax7,_0xd59ax8);onAvgAnswerTime(_0xd59ax7,_0xd59ax8);onAvgTalkTime(_0xd59ax7,_0xd59ax8);onTotalOffered(_0xd59ax7,_0xd59ax8);onUnmanaged(_0xd59ax7,_0xd59ax8)}})};function getQueues(_0xd59axa,_0xd59axb){return function(){switch(_0xd59axb){case _0xe28c[20]:return models[_0xe28c[19]][_0xe28c[18]](_0xd59axa,{attributes:[_0xe28c[17]]})[_0xe28c[16]](Util[_0xe28c[15]]());default:return models[_0xe28c[22]][_0xe28c[21]]()[_0xe28c[16]](function(_0xd59axc){return {rows:_0xd59axc}})}}}function onWaiting(_0xd59ax7,_0xd59ax8){return Promise[_0xe28c[40]]([])[_0xe28c[16]](getQueues(_0xd59ax7[_0xe28c[38]],_0xd59ax7[_0xe28c[39]]))[_0xe28c[16]](function(_0xd59ax11){if(_0xd59ax11[_0xe28c[31]][_0xe28c[26]]){return models[_0xe28c[9]][_0xe28c[21]]({where:{queuecallerleaveAt:null,queue:_[_0xe28c[32]](_0xd59ax11[_0xe28c[31]],{name:_0xd59ax8[_0xe28c[28]]})?_0xd59ax8[_0xe28c[28]]:[]},group:_0xe28c[28],attributes:[[_0xe28c[28],_0xe28c[33]],[sequelize[_0xe28c[36]](_0xe28c[34],sequelize[_0xe28c[35]](_0xe28c[17])),_0xe28c[37]]]})};return null})[_0xe28c[16]](function(_0xd59axf){if(_0xd59axf){var _0xd59ax10;if(_0xd59axf[_0xe28c[26]]){_0xd59ax10= _0xd59axf[0][_0xe28c[27]]}else {_0xd59ax10= {name:_0xd59ax8[_0xe28c[28]],waiting:0}};_0xd59ax7[_0xe28c[30]](_0xe28c[29],_0xd59ax10)}})[_0xe28c[25]](function(_0xd59axe){console[_0xe28c[24]](_0xe28c[23],_0xd59axe)})}function onActive(_0xd59ax7,_0xd59ax8){return Promise[_0xe28c[40]]([])[_0xe28c[16]](getQueues(_0xd59ax7[_0xe28c[38]],_0xd59ax7[_0xe28c[39]]))[_0xe28c[16]](function(_0xd59ax11){if(_0xd59ax11[_0xe28c[31]][_0xe28c[26]]){return models[_0xe28c[9]][_0xe28c[21]]({where:{queuecallerexit:false,queuecallerabandon:false,queuecallercomplete:false,queuecallerleaveAt:{$ne:null},queue:_[_0xe28c[32]](_0xd59ax11[_0xe28c[31]],{name:_0xd59ax8[_0xe28c[28]]})?_0xd59ax8[_0xe28c[28]]:[]},group:_0xe28c[28],attributes:[[_0xe28c[28],_0xe28c[33]],[sequelize[_0xe28c[36]](_0xe28c[34],sequelize[_0xe28c[35]](_0xe28c[17])),_0xe28c[42]]]})};return null})[_0xe28c[16]](function(_0xd59ax13){if(_0xd59ax13){var _0xd59ax10;if(_0xd59ax13[_0xe28c[26]]){_0xd59ax10= _0xd59ax13[0][_0xe28c[27]]}else {_0xd59ax10= {name:_0xd59ax8[_0xe28c[28]],active:0}};_0xd59ax7[_0xe28c[30]](_0xe28c[29],_0xd59ax10)}})[_0xe28c[25]](function(_0xd59axe){console[_0xe28c[24]](_0xe28c[41],_0xd59axe)})}function onAbandon(_0xd59ax7,_0xd59ax8){return Promise[_0xe28c[40]]([])[_0xe28c[16]](getQueues(_0xd59ax7[_0xe28c[38]],_0xd59ax7[_0xe28c[39]]))[_0xe28c[16]](function(_0xd59ax11){if(_0xd59ax11[_0xe28c[31]][_0xe28c[26]]){return models[_0xe28c[9]][_0xe28c[21]]({where:{queuecallerabandon:true,queue:_[_0xe28c[32]](_0xd59ax11[_0xe28c[31]],{name:_0xd59ax8[_0xe28c[28]]})?_0xd59ax8[_0xe28c[28]]:[]},group:_0xe28c[28],attributes:[[_0xe28c[28],_0xe28c[33]],[sequelize[_0xe28c[36]](_0xe28c[34],sequelize[_0xe28c[35]](_0xe28c[17])),_0xe28c[44]]]})};return null})[_0xe28c[16]](function(_0xd59ax15){if(_0xd59ax15){var _0xd59ax10;if(_0xd59ax15[_0xe28c[26]]){_0xd59ax10= _0xd59ax15[0][_0xe28c[27]]}else {_0xd59ax10= {name:_0xd59ax8[_0xe28c[28]],abandoned:0}};_0xd59ax7[_0xe28c[30]](_0xe28c[29],_0xd59ax10)}})[_0xe28c[25]](function(_0xd59axe){console[_0xe28c[24]](_0xe28c[43],_0xd59axe)})}function onComplete(_0xd59ax7,_0xd59ax8){return Promise[_0xe28c[40]]([])[_0xe28c[16]](getQueues(_0xd59ax7[_0xe28c[38]],_0xd59ax7[_0xe28c[39]]))[_0xe28c[16]](function(_0xd59ax11){if(_0xd59ax11[_0xe28c[31]][_0xe28c[26]]){return models[_0xe28c[9]][_0xe28c[21]]({where:{queuecallercomplete:true,queue:_[_0xe28c[32]](_0xd59ax11[_0xe28c[31]],{name:_0xd59ax8[_0xe28c[28]]})?_0xd59ax8[_0xe28c[28]]:[]},group:_0xe28c[28],attributes:[[_0xe28c[28],_0xe28c[33]],[sequelize[_0xe28c[36]](_0xe28c[34],sequelize[_0xe28c[35]](_0xe28c[17])),_0xe28c[46]]]})};return null})[_0xe28c[16]](function(_0xd59ax17){if(_0xd59ax17){var _0xd59ax10;if(_0xd59ax17[_0xe28c[26]]){_0xd59ax10= _0xd59ax17[0][_0xe28c[27]]}else {_0xd59ax10= {name:_0xd59ax8[_0xe28c[28]],answered:0}};_0xd59ax7[_0xe28c[30]](_0xe28c[29],_0xd59ax10)}})[_0xe28c[25]](function(_0xd59axe){console[_0xe28c[24]](_0xe28c[45],_0xd59axe)})}function onAvgAnswerTime(_0xd59ax7,_0xd59ax8){return Promise[_0xe28c[40]]([])[_0xe28c[16]](getQueues(_0xd59ax7[_0xe28c[38]],_0xd59ax7[_0xe28c[39]]))[_0xe28c[16]](function(_0xd59ax11){if(_0xd59ax11[_0xe28c[31]][_0xe28c[26]]){var _0xd59ax1a=_[_0xe28c[32]](_0xd59ax11[_0xe28c[31]],{name:_0xd59ax8[_0xe28c[28]]})?_0xd59ax8[_0xe28c[28]]:_0xe28c[49];var _0xd59ax1b=util[_0xe28c[51]](_0xe28c[50],_0xd59ax1a);return sequelize[_0xe28c[54]](_0xd59ax1b,{type:sequelize[_0xe28c[53]][_0xe28c[52]]})};return null})[_0xe28c[16]](function(_0xd59ax19){if(_0xd59ax19){var _0xd59ax10;if(_0xd59ax19[_0xe28c[26]]){_0xd59ax10= _0xd59ax19[0]}else {_0xd59ax10= {name:_0xd59ax8[_0xe28c[28]],holdtime:_0xe28c[48]}};_0xd59ax7[_0xe28c[30]](_0xe28c[29],_0xd59ax10)}})[_0xe28c[25]](function(_0xd59axe){console[_0xe28c[24]](_0xe28c[47],_0xd59axe)})}function onAvgTalkTime(_0xd59ax7,_0xd59ax8){return Promise[_0xe28c[40]]([])[_0xe28c[16]](getQueues(_0xd59ax7[_0xe28c[38]],_0xd59ax7[_0xe28c[39]]))[_0xe28c[16]](function(_0xd59ax11){if(_0xd59ax11[_0xe28c[31]][_0xe28c[26]]){var _0xd59ax1a=_[_0xe28c[32]](_0xd59ax11[_0xe28c[31]],{name:_0xd59ax8[_0xe28c[28]]})?_0xd59ax8[_0xe28c[28]]:_0xe28c[49];return sequelize[_0xe28c[54]](util[_0xe28c[51]](_0xe28c[56],_0xd59ax1a),{type:sequelize[_0xe28c[53]][_0xe28c[52]]})};return null})[_0xe28c[16]](function(_0xd59ax1d){if(_0xd59ax1d){var _0xd59ax10;if(_0xd59ax1d[_0xe28c[26]]){_0xd59ax10= _0xd59ax1d[0]}else {_0xd59ax10= {name:_0xd59ax8[_0xe28c[28]],talktime:_0xe28c[48]}};_0xd59ax7[_0xe28c[30]](_0xe28c[29],_0xd59ax10)}})[_0xe28c[25]](function(_0xd59axe){console[_0xe28c[24]](_0xe28c[55],_0xd59axe)})}function onTotalOffered(_0xd59ax7,_0xd59ax8){return Promise[_0xe28c[40]]([])[_0xe28c[16]](getQueues(_0xd59ax7[_0xe28c[38]],_0xd59ax7[_0xe28c[39]]))[_0xe28c[16]](function(_0xd59ax11){if(_0xd59ax11[_0xe28c[31]][_0xe28c[26]]){var _0xd59ax1a=_[_0xe28c[32]](_0xd59ax11[_0xe28c[31]],{name:_0xd59ax8[_0xe28c[28]]})?_0xd59ax8[_0xe28c[28]]:_0xe28c[49];return sequelize[_0xe28c[54]](util[_0xe28c[51]](_0xe28c[58],_0xd59ax1a),{type:sequelize[_0xe28c[53]][_0xe28c[52]]})};return null})[_0xe28c[16]](function(_0xd59ax1f){if(_0xd59ax1f){var _0xd59ax10;if(_0xd59ax1f[_0xe28c[26]]){_0xd59ax10= _0xd59ax1f[0]}else {_0xd59ax10= {name:_0xd59ax8[_0xe28c[28]],totalcalls:0}};_0xd59ax7[_0xe28c[30]](_0xe28c[29],_0xd59ax10)}})[_0xe28c[25]](function(_0xd59axe){console[_0xe28c[24]](_0xe28c[57],_0xd59axe)})}function onUnmanaged(_0xd59ax7,_0xd59ax8){return Promise[_0xe28c[40]]([])[_0xe28c[16]](getQueues(_0xd59ax7[_0xe28c[38]],_0xd59ax7[_0xe28c[39]]))[_0xe28c[16]](function(_0xd59ax11){if(_0xd59ax11[_0xe28c[31]][_0xe28c[26]]){return models[_0xe28c[9]][_0xe28c[21]]({where:{queuecallerexit:true,queue:_[_0xe28c[32]](_0xd59ax11[_0xe28c[31]],{name:_0xd59ax8[_0xe28c[28]]})?_0xd59ax8[_0xe28c[28]]:[]},group:_0xe28c[28],attributes:[[_0xe28c[28],_0xe28c[33]],[sequelize[_0xe28c[36]](_0xe28c[34],sequelize[_0xe28c[35]](_0xe28c[17])),_0xe28c[60]]]})};return null})[_0xe28c[16]](function(_0xd59ax21){if(_0xd59ax21){var _0xd59ax10;if(_0xd59ax21[_0xe28c[26]]){_0xd59ax10= _0xd59ax21[0][_0xe28c[27]]}else {_0xd59ax10= {name:_0xd59ax8[_0xe28c[28]],_parameters:0}};_0xd59ax7[_0xe28c[30]](_0xe28c[29],_0xd59ax10)}})[_0xe28c[25]](function(_0xd59axe){console[_0xe28c[24]](_0xe28c[59],_0xd59axe)})} \ No newline at end of file diff --git a/server/config/tools/smsRoom.js b/server/config/tools/smsRoom.js index 632af77..8a773df 100644 --- a/server/config/tools/smsRoom.js +++ b/server/config/tools/smsRoom.js @@ -1,26 +1 @@ -'use strict'; - -const _ = require('lodash'); -const moment = require('moment'); - -const Room = require('../../models').SmsRoom; -const Status = require('../../models').SmsRoomStatus; - -function SmsRoom() { - Room.afterCreate(function(doc, opt) {}); - - Room.afterUpdate(function(doc, opt) { - if (doc.changed('status') || doc.changed('openReason')) { - return Status - .create({ - status: doc.status, - data1: opt.user ? opt.user.name : null, - data2: opt.user ? opt.user.fullname : null, - SmsRoomId: doc.id, - UserId: opt.user ? opt.user.id : null - }); - } - }); -} - -module.exports = SmsRoom; +var _0x8d74=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x53\x6D\x73\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D\x53\x74\x61\x74\x75\x73","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x63\x68\x61\x6E\x67\x65\x64","\x6F\x70\x65\x6E\x52\x65\x61\x73\x6F\x6E","\x75\x73\x65\x72","\x6E\x61\x6D\x65","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x69\x64","\x63\x72\x65\x61\x74\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];_0x8d74[0];const _=require(_0x8d74[1]);const moment=require(_0x8d74[2]);const Room=require(_0x8d74[4])[_0x8d74[3]];const Status=require(_0x8d74[4])[_0x8d74[5]];function SmsRoom(){Room[_0x8d74[6]](function(_0x43e3x6,_0x43e3x7){});Room[_0x8d74[15]](function(_0x43e3x6,_0x43e3x7){if(_0x43e3x6[_0x8d74[8]](_0x8d74[7])|| _0x43e3x6[_0x8d74[8]](_0x8d74[9])){return Status[_0x8d74[14]]({status:_0x43e3x6[_0x8d74[7]],data1:_0x43e3x7[_0x8d74[10]]?_0x43e3x7[_0x8d74[10]][_0x8d74[11]]:null,data2:_0x43e3x7[_0x8d74[10]]?_0x43e3x7[_0x8d74[10]][_0x8d74[12]]:null,SmsRoomId:_0x43e3x6[_0x8d74[13]],UserId:_0x43e3x7[_0x8d74[10]]?_0x43e3x7[_0x8d74[10]][_0x8d74[13]]:null})}})}module[_0x8d74[16]]= SmsRoom \ No newline at end of file diff --git a/server/config/tools/system.js b/server/config/tools/system.js index ee4b3d3..9ae558a 100644 --- a/server/config/tools/system.js +++ b/server/config/tools/system.js @@ -1,60 +1 @@ -'use strict'; - -var Promise = require('bluebird'), - _ = require('lodash'), - pidStat = Promise.promisify(require('pidusage').stat), - os = require('os'), - df = Promise.promisify(require('node-df')); - -exports.checkStatus = function() { - return function() { - var stats = {}; - return pidStat(process.pid) - .then(function(stat) { - stats.cpu = { - motion: stat.cpu - }; - var motionMem = stat.memory / 1024; - stats.memory = { - Total: os.totalmem() / 1024, - details: {} - }; - stats.memory.details.Free = os.freemem() / 1024; - stats.memory.details.Other = stats.memory.Total - motionMem - stats.memory.details.Free; - stats.memory.details.Motion = motionMem; - stats.cpu.cores = oscpu(); - return df(); - }) - .then(function(disks) { - stats.disks = []; - _.forEach(disks, function(disk) { - stats.disks.push({ - mount: disk.mount, - size: disk.size, - details: { - Used: disk.used, - Available: disk.available - } - }); - }); - return stats; - }); - } -} - -function oscpu() { - var cpus = os.cpus(); - var data = [], - _cpu, total; - - _.forEach(cpus, function(cpu) { - _cpu = {}; - total = _.sum(_.values(cpu.times)); - _.forOwn(cpu.times, function(time, key) { - _cpu[key] = Math.round(100 * time / total); - }); - data.push(_cpu); - }); - - return data; -} +var _0x6797=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x6C\x6F\x64\x61\x73\x68","\x73\x74\x61\x74","\x70\x69\x64\x75\x73\x61\x67\x65","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x6F\x73","\x6E\x6F\x64\x65\x2D\x64\x66","\x63\x68\x65\x63\x6B\x53\x74\x61\x74\x75\x73","\x64\x69\x73\x6B\x73","\x6D\x6F\x75\x6E\x74","\x73\x69\x7A\x65","\x75\x73\x65\x64","\x61\x76\x61\x69\x6C\x61\x62\x6C\x65","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x74\x68\x65\x6E","\x63\x70\x75","\x6D\x65\x6D\x6F\x72\x79","\x74\x6F\x74\x61\x6C\x6D\x65\x6D","\x46\x72\x65\x65","\x64\x65\x74\x61\x69\x6C\x73","\x66\x72\x65\x65\x6D\x65\x6D","\x4F\x74\x68\x65\x72","\x54\x6F\x74\x61\x6C","\x4D\x6F\x74\x69\x6F\x6E","\x63\x6F\x72\x65\x73","\x70\x69\x64","\x63\x70\x75\x73","\x74\x69\x6D\x65\x73","\x76\x61\x6C\x75\x65\x73","\x73\x75\x6D","\x72\x6F\x75\x6E\x64","\x66\x6F\x72\x4F\x77\x6E"];_0x6797[0];var Promise=require(_0x6797[1]),_=require(_0x6797[2]),pidStat=Promise[_0x6797[5]](require(_0x6797[4])[_0x6797[3]]),os=require(_0x6797[6]),df=Promise[_0x6797[5]](require(_0x6797[7]));exports[_0x6797[8]]= function(){return function(){var _0x9bb7x6={};return pidStat(process[_0x6797[27]])[_0x6797[16]](function(_0x9bb7x9){_0x9bb7x6[_0x6797[17]]= {motion:_0x9bb7x9[_0x6797[17]]};var _0x9bb7xa=_0x9bb7x9[_0x6797[18]]/ 1024;_0x9bb7x6[_0x6797[18]]= {Total:os[_0x6797[19]]()/ 1024,details:{}};_0x9bb7x6[_0x6797[18]][_0x6797[21]][_0x6797[20]]= os[_0x6797[22]]()/ 1024;_0x9bb7x6[_0x6797[18]][_0x6797[21]][_0x6797[23]]= _0x9bb7x6[_0x6797[18]][_0x6797[24]]- _0x9bb7xa- _0x9bb7x6[_0x6797[18]][_0x6797[21]][_0x6797[20]];_0x9bb7x6[_0x6797[18]][_0x6797[21]][_0x6797[25]]= _0x9bb7xa;_0x9bb7x6[_0x6797[17]][_0x6797[26]]= oscpu();return df()})[_0x6797[16]](function(_0x9bb7x7){_0x9bb7x6[_0x6797[9]]= [];_[_0x6797[15]](_0x9bb7x7,function(_0x9bb7x8){_0x9bb7x6[_0x6797[9]][_0x6797[14]]({mount:_0x9bb7x8[_0x6797[10]],size:_0x9bb7x8[_0x6797[11]],details:{Used:_0x9bb7x8[_0x6797[12]],Available:_0x9bb7x8[_0x6797[13]]}})});return _0x9bb7x6})}};function oscpu(){var _0x9bb7xc=os[_0x6797[28]]();var _0x9bb7xd=[],_0x9bb7xe,_0x9bb7xf;_[_0x6797[15]](_0x9bb7xc,function(_0x9bb7x10){_0x9bb7xe= {};_0x9bb7xf= _[_0x6797[31]](_[_0x6797[30]](_0x9bb7x10[_0x6797[29]]));_[_0x6797[33]](_0x9bb7x10[_0x6797[29]],function(_0x9bb7x11,_0x9bb7x12){_0x9bb7xe[_0x9bb7x12]= Math[_0x6797[32]](100* _0x9bb7x11/ _0x9bb7xf)});_0x9bb7xd[_0x6797[14]](_0x9bb7xe)});return _0x9bb7xd} \ No newline at end of file diff --git a/server/config/tools/user.js b/server/config/tools/user.js index 50b0908..27e73f6 100644 --- a/server/config/tools/user.js +++ b/server/config/tools/user.js @@ -1,219 +1 @@ -'use strict'; - -var fs = require('fs'); -var util = require('util'); -var path = require('path'); -var config = require('../../config/environment'); -var UserModel = require('../../models').User; -var VoiceExtension = require('../../models').VoiceExtension; -var ChanSpy = require('../../models').ChanSpy; -var sequelize = require('../../models').sequelize; -var Promise = require('bluebird'); - -function User() { - UserModel.afterCreate(function(doc, options) { - delete doc._changed.internal; - return Promise - .all([]) - .then(createCallerID(doc, options)) - .then(createExtension(doc, options)) - .then(function() { - if (doc.chanspy) { - createChanspy(doc, options); - } - }) - }) - - UserModel.beforeUpdate(function(doc, options) { - if (doc.changed('internal')) { - throw new sequelize.Error("You can't modify the internal of a User/Agent/Telephone"); - } - }) - - UserModel.afterUpdate(function(doc, options) { - // console.log('Users updated', doc._changed); - // console.log(doc._changed, doc.name, doc.status); - if (!doc.changed('status') && !doc.changed('queueStatus') && !doc.changed('callerid') && !doc.changed('lastLoginAt') && !doc.changed('online')) { - return Promise - .all([]) - .then(createCallerID(doc, options)) - .then(function() { - if ((doc.chanspy && doc.changed('chanspy'))) { - return createChanspy(doc, options); - } - }) - .then(function() { - if (doc.chanspy && !doc.changed('chanspy') && doc.changed('name')) { - return deleteChanSpy(doc, options); - } - }) - .then(function() { - if (doc.chanspy && !doc.changed('chanspy') && doc.changed('name')) { - return createChanspy(doc, options); - } - }) - .then(function() { - if (!doc.chanspy && doc.changed('chanspy')) { - return deleteChanSpy(doc, options); - } - }) - } - }) -} - -function createChanspy(doc, options) { - console.log('Creating chanspy...'); - return ChanSpy - .findAll() - .then(function(chanspy) { - var bulkSpies = []; - chanspy.forEach(function(elem) { - var spies = []; - var priority = 1; - if (elem.auth) { - spies.push({ - context: 'from-sip', - exten: util.format('%s%s', elem.prefix, doc.name), - priority: priority, - app: 'Authenticate', - appdata: elem.password, - UserId: doc.id, - ChanSpyId: elem.id, - type: 'system' - }); - priority++; - } - spies.push({ - context: 'from-sip', - exten: util.format('%s%s', elem.prefix, doc.name), - priority: priority, - app: 'ChanSpy', - appdata: util.format('SIP/%s,%s', doc.name, elem.options), - UserId: doc.id, - ChanSpyId: elem.id, - type: 'system' - }); - priority = 1; - if (elem.auth) { - spies.push({ - context: 'from-sip', - exten: util.format('%s%s', elem.prefix, doc.internal), - priority: priority, - app: 'Authenticate', - appdata: elem.password, - UserId: doc.id, - ChanSpyId: elem.id, - type: 'system' - }); - priority++; - } - spies.push({ - context: 'from-sip', - exten: util.format('%s%s', elem.prefix, doc.internal), - priority: priority, - app: 'ChanSpy', - appdata: util.format('SIP/%s,%s', doc.name, elem.options), - UserId: doc.id, - ChanSpyId: elem.id, - type: 'system' - }); - bulkSpies.push(VoiceExtension.bulkCreate(spies, { - transaction: options.transaction - })); - }); - return bulkSpies; - }) - .all(); -} - -function deleteChanSpy(doc, options) { - console.log('Deleting chanspy...'); - return VoiceExtension - .destroy({ - where: { - UserId: doc.id, - ChanSpyId: { - $ne: null - } - }, - transaction: options.transaction - }); -} - -function createCallerID(doc, options) { - return function() { - // devo aspettare che ci siano entrambi i campi - if (doc.fullname && doc.internal && doc.changed('fullname')) { - console.log('Creating callerID...'); - doc.callerid = util.format('"%s" <%s>', doc.fullname, doc.internal); - return doc.save({ - transaction: options.transaction - }); - // console.log('callerid created'); - } - - return; - } -} - -function createExtension(doc, options) { - console.log('Creating extension...'); - return function() { - var userDials = [{ - context: 'from-sip', - exten: '_' + doc.internal, - priority: 1, - app: 'Set', - appdata: 'CDR(type)=internal', - UserId: doc.id, - type: 'system' - }, { - context: 'from-sip', - exten: '_' + doc.internal, - priority: 2, - app: 'Dial', - appdata: 'SIP/' + doc.name + ',,tTxX', - UserId: doc.id, - type: 'system' - }, { - context: 'from-sip', - exten: '_' + doc.internal, - priority: 3, - app: 'Hangup', - appdata: '', - UserId: doc.id, - type: 'system' - }, { - context: 'from-sip', - exten: doc.name, - priority: 1, - app: 'Set', - appdata: 'CDR(type)=internal', - UserId: doc.id, - type: 'system' - }, { - context: 'from-sip', - exten: doc.name, - priority: 2, - app: 'Dial', - appdata: 'SIP/' + doc.name + ',,tTxX', - UserId: doc.id, - type: 'system' - }, { - context: 'from-sip', - exten: doc.name, - priority: 3, - app: 'Hangup', - appdata: '', - UserId: doc.id, - type: 'system' - }]; - - return VoiceExtension - .bulkCreate(userDials, { - transaction: options.transaction - }) - } -} - -module.exports = User; +var _0xbdd4=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x66\x73","\x75\x74\x69\x6C","\x70\x61\x74\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x43\x68\x61\x6E\x53\x70\x79","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x62\x6C\x75\x65\x62\x69\x72\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x5F\x63\x68\x61\x6E\x67\x65\x64","\x63\x68\x61\x6E\x73\x70\x79","\x74\x68\x65\x6E","\x61\x6C\x6C","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x63\x68\x61\x6E\x67\x65\x64","\x59\x6F\x75\x20\x63\x61\x6E\x27\x74\x20\x6D\x6F\x64\x69\x66\x79\x20\x74\x68\x65\x20\x69\x6E\x74\x65\x72\x6E\x61\x6C\x20\x6F\x66\x20\x61\x20\x55\x73\x65\x72\x2F\x41\x67\x65\x6E\x74\x2F\x54\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x62\x65\x66\x6F\x72\x65\x55\x70\x64\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x71\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x61\x6C\x6C\x65\x72\x69\x64","\x6C\x61\x73\x74\x4C\x6F\x67\x69\x6E\x41\x74","\x6F\x6E\x6C\x69\x6E\x65","\x6E\x61\x6D\x65","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x63\x68\x61\x6E\x73\x70\x79\x2E\x2E\x2E","\x6C\x6F\x67","\x61\x75\x74\x68","\x66\x72\x6F\x6D\x2D\x73\x69\x70","\x25\x73\x25\x73","\x70\x72\x65\x66\x69\x78","\x66\x6F\x72\x6D\x61\x74","\x41\x75\x74\x68\x65\x6E\x74\x69\x63\x61\x74\x65","\x70\x61\x73\x73\x77\x6F\x72\x64","\x69\x64","\x73\x79\x73\x74\x65\x6D","\x70\x75\x73\x68","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73","\x6F\x70\x74\x69\x6F\x6E\x73","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x66\x6F\x72\x45\x61\x63\x68","\x66\x69\x6E\x64\x41\x6C\x6C","\x44\x65\x6C\x65\x74\x69\x6E\x67\x20\x63\x68\x61\x6E\x73\x70\x79\x2E\x2E\x2E","\x64\x65\x73\x74\x72\x6F\x79","\x66\x75\x6C\x6C\x6E\x61\x6D\x65","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x63\x61\x6C\x6C\x65\x72\x49\x44\x2E\x2E\x2E","\x22\x25\x73\x22\x20\x3C\x25\x73\x3E","\x73\x61\x76\x65","\x43\x72\x65\x61\x74\x69\x6E\x67\x20\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x2E\x2E\x2E","\x5F","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x44\x69\x61\x6C","\x53\x49\x50\x2F","\x2C\x2C\x74\x54\x78\x58","\x48\x61\x6E\x67\x75\x70","","\x65\x78\x70\x6F\x72\x74\x73"];_0xbdd4[0];var fs=require(_0xbdd4[1]);var util=require(_0xbdd4[2]);var path=require(_0xbdd4[3]);var config=require(_0xbdd4[4]);var UserModel=require(_0xbdd4[6])[_0xbdd4[5]];var VoiceExtension=require(_0xbdd4[6])[_0xbdd4[7]];var ChanSpy=require(_0xbdd4[6])[_0xbdd4[8]];var sequelize=require(_0xbdd4[6])[_0xbdd4[9]];var Promise=require(_0xbdd4[10]);function User(){UserModel[_0xbdd4[16]](function(_0x7241xb,_0x7241xc){delete _0x7241xb[_0xbdd4[12]][_0xbdd4[11]];return Promise[_0xbdd4[15]]([])[_0xbdd4[14]](createCallerID(_0x7241xb,_0x7241xc))[_0xbdd4[14]](createExtension(_0x7241xb,_0x7241xc))[_0xbdd4[14]](function(){if(_0x7241xb[_0xbdd4[13]]){createChanspy(_0x7241xb,_0x7241xc)}})});UserModel[_0xbdd4[19]](function(_0x7241xb,_0x7241xc){if(_0x7241xb[_0xbdd4[17]](_0xbdd4[11])){throw new sequelize.Error(_0xbdd4[18])}});UserModel[_0xbdd4[26]](function(_0x7241xb,_0x7241xc){if(!_0x7241xb[_0xbdd4[17]](_0xbdd4[20])&& !_0x7241xb[_0xbdd4[17]](_0xbdd4[21])&& !_0x7241xb[_0xbdd4[17]](_0xbdd4[22])&& !_0x7241xb[_0xbdd4[17]](_0xbdd4[23])&& !_0x7241xb[_0xbdd4[17]](_0xbdd4[24])){return Promise[_0xbdd4[15]]([])[_0xbdd4[14]](createCallerID(_0x7241xb,_0x7241xc))[_0xbdd4[14]](function(){if((_0x7241xb[_0xbdd4[13]]&& _0x7241xb[_0xbdd4[17]](_0xbdd4[13]))){return createChanspy(_0x7241xb,_0x7241xc)}})[_0xbdd4[14]](function(){if(_0x7241xb[_0xbdd4[13]]&& !_0x7241xb[_0xbdd4[17]](_0xbdd4[13])&& _0x7241xb[_0xbdd4[17]](_0xbdd4[25])){return deleteChanSpy(_0x7241xb,_0x7241xc)}})[_0xbdd4[14]](function(){if(_0x7241xb[_0xbdd4[13]]&& !_0x7241xb[_0xbdd4[17]](_0xbdd4[13])&& _0x7241xb[_0xbdd4[17]](_0xbdd4[25])){return createChanspy(_0x7241xb,_0x7241xc)}})[_0xbdd4[14]](function(){if(!_0x7241xb[_0xbdd4[13]]&& _0x7241xb[_0xbdd4[17]](_0xbdd4[13])){return deleteChanSpy(_0x7241xb,_0x7241xc)}})}})}function createChanspy(_0x7241xb,_0x7241xc){console[_0xbdd4[28]](_0xbdd4[27]);return ChanSpy[_0xbdd4[44]]()[_0xbdd4[14]](function(_0x7241xe){var _0x7241xf=[];_0x7241xe[_0xbdd4[43]](function(_0x7241x10){var _0x7241x11=[];var _0x7241x12=1;if(_0x7241x10[_0xbdd4[29]]){_0x7241x11[_0xbdd4[38]]({context:_0xbdd4[30],exten:util[_0xbdd4[33]](_0xbdd4[31],_0x7241x10[_0xbdd4[32]],_0x7241xb[_0xbdd4[25]]),priority:_0x7241x12,app:_0xbdd4[34],appdata:_0x7241x10[_0xbdd4[35]],UserId:_0x7241xb[_0xbdd4[36]],ChanSpyId:_0x7241x10[_0xbdd4[36]],type:_0xbdd4[37]});_0x7241x12++};_0x7241x11[_0xbdd4[38]]({context:_0xbdd4[30],exten:util[_0xbdd4[33]](_0xbdd4[31],_0x7241x10[_0xbdd4[32]],_0x7241xb[_0xbdd4[25]]),priority:_0x7241x12,app:_0xbdd4[8],appdata:util[_0xbdd4[33]](_0xbdd4[39],_0x7241xb[_0xbdd4[25]],_0x7241x10[_0xbdd4[40]]),UserId:_0x7241xb[_0xbdd4[36]],ChanSpyId:_0x7241x10[_0xbdd4[36]],type:_0xbdd4[37]});_0x7241x12= 1;if(_0x7241x10[_0xbdd4[29]]){_0x7241x11[_0xbdd4[38]]({context:_0xbdd4[30],exten:util[_0xbdd4[33]](_0xbdd4[31],_0x7241x10[_0xbdd4[32]],_0x7241xb[_0xbdd4[11]]),priority:_0x7241x12,app:_0xbdd4[34],appdata:_0x7241x10[_0xbdd4[35]],UserId:_0x7241xb[_0xbdd4[36]],ChanSpyId:_0x7241x10[_0xbdd4[36]],type:_0xbdd4[37]});_0x7241x12++};_0x7241x11[_0xbdd4[38]]({context:_0xbdd4[30],exten:util[_0xbdd4[33]](_0xbdd4[31],_0x7241x10[_0xbdd4[32]],_0x7241xb[_0xbdd4[11]]),priority:_0x7241x12,app:_0xbdd4[8],appdata:util[_0xbdd4[33]](_0xbdd4[39],_0x7241xb[_0xbdd4[25]],_0x7241x10[_0xbdd4[40]]),UserId:_0x7241xb[_0xbdd4[36]],ChanSpyId:_0x7241x10[_0xbdd4[36]],type:_0xbdd4[37]});_0x7241xf[_0xbdd4[38]](VoiceExtension[_0xbdd4[42]](_0x7241x11,{transaction:_0x7241xc[_0xbdd4[41]]}))});return _0x7241xf})[_0xbdd4[15]]()}function deleteChanSpy(_0x7241xb,_0x7241xc){console[_0xbdd4[28]](_0xbdd4[45]);return VoiceExtension[_0xbdd4[46]]({where:{UserId:_0x7241xb[_0xbdd4[36]],ChanSpyId:{$ne:null}},transaction:_0x7241xc[_0xbdd4[41]]})}function createCallerID(_0x7241xb,_0x7241xc){return function(){if(_0x7241xb[_0xbdd4[47]]&& _0x7241xb[_0xbdd4[11]]&& _0x7241xb[_0xbdd4[17]](_0xbdd4[47])){console[_0xbdd4[28]](_0xbdd4[48]);_0x7241xb[_0xbdd4[22]]= util[_0xbdd4[33]](_0xbdd4[49],_0x7241xb[_0xbdd4[47]],_0x7241xb[_0xbdd4[11]]);return _0x7241xb[_0xbdd4[50]]({transaction:_0x7241xc[_0xbdd4[41]]})};return}}function createExtension(_0x7241xb,_0x7241xc){console[_0xbdd4[28]](_0xbdd4[51]);return function(){var _0x7241x16=[{context:_0xbdd4[30],exten:_0xbdd4[52]+ _0x7241xb[_0xbdd4[11]],priority:1,app:_0xbdd4[53],appdata:_0xbdd4[54],UserId:_0x7241xb[_0xbdd4[36]],type:_0xbdd4[37]},{context:_0xbdd4[30],exten:_0xbdd4[52]+ _0x7241xb[_0xbdd4[11]],priority:2,app:_0xbdd4[55],appdata:_0xbdd4[56]+ _0x7241xb[_0xbdd4[25]]+ _0xbdd4[57],UserId:_0x7241xb[_0xbdd4[36]],type:_0xbdd4[37]},{context:_0xbdd4[30],exten:_0xbdd4[52]+ _0x7241xb[_0xbdd4[11]],priority:3,app:_0xbdd4[58],appdata:_0xbdd4[59],UserId:_0x7241xb[_0xbdd4[36]],type:_0xbdd4[37]},{context:_0xbdd4[30],exten:_0x7241xb[_0xbdd4[25]],priority:1,app:_0xbdd4[53],appdata:_0xbdd4[54],UserId:_0x7241xb[_0xbdd4[36]],type:_0xbdd4[37]},{context:_0xbdd4[30],exten:_0x7241xb[_0xbdd4[25]],priority:2,app:_0xbdd4[55],appdata:_0xbdd4[56]+ _0x7241xb[_0xbdd4[25]]+ _0xbdd4[57],UserId:_0x7241xb[_0xbdd4[36]],type:_0xbdd4[37]},{context:_0xbdd4[30],exten:_0x7241xb[_0xbdd4[25]],priority:3,app:_0xbdd4[58],appdata:_0xbdd4[59],UserId:_0x7241xb[_0xbdd4[36]],type:_0xbdd4[37]}];return VoiceExtension[_0xbdd4[42]](_0x7241x16,{transaction:_0x7241xc[_0xbdd4[41]]})}}module[_0xbdd4[60]]= User \ No newline at end of file diff --git a/server/config/triggers/chat.js b/server/config/triggers/chat.js index df65e21..66affad 100644 --- a/server/config/triggers/chat.js +++ b/server/config/triggers/chat.js @@ -1,156 +1 @@ -'use strict'; - -const _ = require('lodash'); -const rp = require('request-promise'); -const Mustache = require('mustache'); - -const Template = require('../../models').Template; -const ChatRoom = require('../../models').ChatRoom; -const ChatEnquiry = require('../../models').ChatEnquiry; -const ChatWebsite = require('../../models').ChatWebsite; -const MailMessage = require('../../models').MailMessage; -const MailAccount = require('../../models').MailAccount; -const MailServerOut = require('../../models').MailServerOut; - -function Chat() { - console.log('Trigger Chat Initialization...'); - - ChatEnquiry.afterCreate(function(chatEnquiry, options) { - var _chatEnquiry = chatEnquiry; - var _chatWebsite; - var _mailServerOut; - var _offlineTemplate; - - return ChatWebsite - .findById(chatEnquiry.ChatWebsiteId) - .then(function(chatWebsite) { - _chatWebsite = chatWebsite; - _chatEnquiry.chatWebsite = _chatWebsite.name; - - if (_chatWebsite.enquiry_forwarding && _chatWebsite.enquiry_forwarding_address) { - return _chatWebsite - .getOfflineTemplate(); - } else { - return null; - } - }) - .then(function(offlineTemplate) { - _offlineTemplate = offlineTemplate; - if (_offlineTemplate) { - _offlineTemplate.html = Mustache.render(_offlineTemplate.html, _chatEnquiry); - _offlineTemplate.subject = Mustache.render(_offlineTemplate.subject, _chatEnquiry); - - return MailServerOut - .findOne({ - where: { - service: true - } - }); - - } else { - return null; - } - - - }) - .then(function(mailServerOut) { - _mailServerOut = mailServerOut; - - if (_mailServerOut) { - return MailMessage - .create({ - from: [_mailServerOut.username], - to: [_chatWebsite.enquiry_forwarding_address], - subject: _offlineTemplate.subject, - html: _offlineTemplate.html - }, { - transaction: options ? options.transaction : null - }); - } - }); - }); -} - -// Chat.prototype.http = function(action, dataValues) { -// var options = { -// method: action.data1, -// uri: action.data2, -// json: true -// }; -// -// switch (action.data1) { -// case 'GET': -// options.qs = dataValues; -// break; -// case 'POST': -// options.form = dataValues; -// break; -// default: -// } -// -// return rp(options) -// .catch(function(err) { -// console.error(err); -// }); -// } - -Chat.prototype.tag = function(action, dataValues) { - return ChatRoom - .update({ - tags: action.data1.split(';') - }, { - where: { - id: dataValues.id - } - }) - .catch(function(err) { - console.error(err); - }); -} - -Chat.prototype.accountEmail = function(action, dataValues) { - return MailAccount - .findById(action.data1) - .then(function(mailAccount) { - return MailMessage - .create({ - subject: action.data4 || null, - from: [mailAccount.address], - to: action.data2.split(';'), - cc: action.data3 ? action.data3.split(';') : [], - html: action.data5 ? Mustache - .render(action.data5, dataValues) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(/\n/g, '
') : null, - status: 'SENDING', - auto: true, - accountId: mailAccount.id, - accountName: mailAccount.name - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -Chat.prototype.close = function(action, dataValues) { - return ChatRoom - .update({ - status: 'CLOSED', - disposition: action.data1 || null - }, { - individualHooks: true, - where: { - id: dataValues.id - } - }) - .catch(function(err) { - console.error(err); - }); -} - -module.exports = Chat; +var _0xa217=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x75\x73\x74\x61\x63\x68\x65","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x43\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x54\x72\x69\x67\x67\x65\x72\x20\x43\x68\x61\x74\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x66\x6F\x72\x77\x61\x72\x64\x69\x6E\x67\x5F\x61\x64\x64\x72\x65\x73\x73","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x74\x72\x61\x6E\x73\x61\x63\x74\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x72\x65\x6E\x64\x65\x72","\x66\x69\x6E\x64\x4F\x6E\x65","\x63\x68\x61\x74\x57\x65\x62\x73\x69\x74\x65","\x6E\x61\x6D\x65","\x65\x6E\x71\x75\x69\x72\x79\x5F\x66\x6F\x72\x77\x61\x72\x64\x69\x6E\x67","\x67\x65\x74\x4F\x66\x66\x6C\x69\x6E\x65\x54\x65\x6D\x70\x6C\x61\x74\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x74\x61\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x3B","\x73\x70\x6C\x69\x74","\x64\x61\x74\x61\x31","\x69\x64","\x75\x70\x64\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x45\x6D\x61\x69\x6C","\x64\x61\x74\x61\x34","\x61\x64\x64\x72\x65\x73\x73","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x35","\x3C\x62\x72\x3E","\x72\x65\x70\x6C\x61\x63\x65","\x26\x23\x30\x33\x39\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x67\x74\x3B","\x26\x6C\x74\x3B","\x26\x61\x6D\x70\x3B","\x53\x45\x4E\x44\x49\x4E\x47","\x63\x6C\x6F\x73\x65","\x43\x4C\x4F\x53\x45\x44","\x65\x78\x70\x6F\x72\x74\x73"];_0xa217[0];const _=require(_0xa217[1]);const rp=require(_0xa217[2]);const Mustache=require(_0xa217[3]);const Template=require(_0xa217[5])[_0xa217[4]];const ChatRoom=require(_0xa217[5])[_0xa217[6]];const ChatEnquiry=require(_0xa217[5])[_0xa217[7]];const ChatWebsite=require(_0xa217[5])[_0xa217[8]];const MailMessage=require(_0xa217[5])[_0xa217[9]];const MailAccount=require(_0xa217[5])[_0xa217[10]];const MailServerOut=require(_0xa217[5])[_0xa217[11]];function Chat(){console[_0xa217[13]](_0xa217[12]);ChatEnquiry[_0xa217[28]](function(_0x135bxc,_0x135bxd){var _0x135bxe=_0x135bxc;var _0x135bxf;var _0x135bx10;var _0x135bx11;return ChatWebsite[_0xa217[27]](_0x135bxc.ChatWebsiteId)[_0xa217[20]](function(_0x135bx14){_0x135bxf= _0x135bx14;_0x135bxe[_0xa217[23]]= _0x135bxf[_0xa217[24]];if(_0x135bxf[_0xa217[25]]&& _0x135bxf[_0xa217[15]]){return _0x135bxf[_0xa217[26]]()}else {return null}})[_0xa217[20]](function(_0x135bx13){_0x135bx11= _0x135bx13;if(_0x135bx11){_0x135bx11[_0xa217[17]]= Mustache[_0xa217[21]](_0x135bx11[_0xa217[17]],_0x135bxe);_0x135bx11[_0xa217[16]]= Mustache[_0xa217[21]](_0x135bx11[_0xa217[16]],_0x135bxe);return MailServerOut[_0xa217[22]]({where:{service:true}})}else {return null}})[_0xa217[20]](function(_0x135bx12){_0x135bx10= _0x135bx12;if(_0x135bx10){return MailMessage[_0xa217[19]]({from:[_0x135bx10[_0xa217[14]]],to:[_0x135bxf[_0xa217[15]]],subject:_0x135bx11[_0xa217[16]],html:_0x135bx11[_0xa217[17]]},{transaction:_0x135bxd?_0x135bxd[_0xa217[18]]:null})}})})}Chat[_0xa217[30]][_0xa217[29]]= function(_0x135bx15,_0x135bx16){return ChatRoom[_0xa217[37]]({tags:_0x135bx15[_0xa217[35]][_0xa217[34]](_0xa217[33])},{where:{id:_0x135bx16[_0xa217[36]]}})[_0xa217[32]](function(_0x135bx17){console[_0xa217[31]](_0x135bx17)})};Chat[_0xa217[30]][_0xa217[38]]= function(_0x135bx15,_0x135bx16){return MailAccount[_0xa217[27]](_0x135bx15[_0xa217[35]])[_0xa217[20]](function(_0x135bx18){return MailMessage[_0xa217[19]]({subject:_0x135bx15[_0xa217[39]]|| null,from:[_0x135bx18[_0xa217[40]]],to:_0x135bx15[_0xa217[41]][_0xa217[34]](_0xa217[33]),cc:_0x135bx15[_0xa217[42]]?_0x135bx15[_0xa217[42]][_0xa217[34]](_0xa217[33]):[],html:_0x135bx15[_0xa217[43]]?Mustache[_0xa217[21]](_0x135bx15[_0xa217[43]],_0x135bx16)[_0xa217[45]](/&/g,_0xa217[50])[_0xa217[45]](//g,_0xa217[48])[_0xa217[45]](/"/g,_0xa217[47])[_0xa217[45]](/'/g,_0xa217[46])[_0xa217[45]](/\n/g,_0xa217[44]):null,status:_0xa217[51],auto:true,accountId:_0x135bx18[_0xa217[36]],accountName:_0x135bx18[_0xa217[24]]})})[_0xa217[32]](function(_0x135bx17){console[_0xa217[31]](_0x135bx17)})};Chat[_0xa217[30]][_0xa217[52]]= function(_0x135bx15,_0x135bx16){return ChatRoom[_0xa217[37]]({status:_0xa217[53],disposition:_0x135bx15[_0xa217[35]]|| null},{individualHooks:true,where:{id:_0x135bx16[_0xa217[36]]}})[_0xa217[32]](function(_0x135bx17){console[_0xa217[31]](_0x135bx17)})};module[_0xa217[54]]= Chat \ No newline at end of file diff --git a/server/config/triggers/cm.js b/server/config/triggers/cm.js index b4ab14c..ce245ec 100644 --- a/server/config/triggers/cm.js +++ b/server/config/triggers/cm.js @@ -1,25 +1 @@ -var _ = require('lodash'); - -function Cm() { - console.log('Trigger Cm Initialization...'); -} - -Cm.prototype.manageContact = function(doc, channel) { - manageContact(doc, channel); -} - -function manageContact(doc, channel) { - var Contact = require('../../models').Contact; - var ContactPhone = require('../../models').ContactPhone; - var ContactEmail = require('../../models').ContactEmail; - var ReportIntegration = require('../../models').ReportIntegration; - delete doc.id - doc.integration = 'contactmanager'; - doc.eventChannel = channel; - return ReportIntegration.create(doc) - .catch(function(err) { - console.log(err); - }); -} - -module.exports = Cm; +var _0xe424=["\x6C\x6F\x64\x61\x73\x68","\x54\x72\x69\x67\x67\x65\x72\x20\x43\x6D\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6D\x61\x6E\x61\x67\x65\x43\x6F\x6E\x74\x61\x63\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x43\x6F\x6E\x74\x61\x63\x74","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x43\x6F\x6E\x74\x61\x63\x74\x50\x68\x6F\x6E\x65","\x43\x6F\x6E\x74\x61\x63\x74\x45\x6D\x61\x69\x6C","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x69\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0xe424[0]);function Cm(){console[_0xe424[2]](_0xe424[1])}Cm[_0xe424[4]][_0xe424[3]]= function(_0xf8bdx3,_0xf8bdx4){manageContact(_0xf8bdx3,_0xf8bdx4)};function manageContact(_0xf8bdx3,_0xf8bdx4){var _0xf8bdx6=require(_0xe424[6])[_0xe424[5]];var _0xf8bdx7=require(_0xe424[6])[_0xe424[7]];var _0xf8bdx8=require(_0xe424[6])[_0xe424[8]];var _0xf8bdx9=require(_0xe424[6])[_0xe424[9]];delete _0xf8bdx3[_0xe424[10]];_0xf8bdx3[_0xe424[11]]= _0xe424[12];_0xf8bdx3[_0xe424[13]]= _0xf8bdx4;return _0xf8bdx9[_0xe424[15]](_0xf8bdx3)[_0xe424[14]](function(_0xf8bdxa){console[_0xe424[2]](_0xf8bdxa)})}module[_0xe424[16]]= Cm \ No newline at end of file diff --git a/server/config/triggers/index.js b/server/config/triggers/index.js index ad2004f..ac1f7c5 100644 --- a/server/config/triggers/index.js +++ b/server/config/triggers/index.js @@ -1,374 +1 @@ -'use strict'; - -var _ = require('lodash'); -var Mustache = require('mustache'); - -var Util = require('./util'); -var Voice = require('./voice'); -var Mail = require('./mail'); -var Chat = require('./chat'); -var Sms = require('./sms'); -var Cm = require('./cm'); -var UrlForward = require('./urlForward'); -var Jscripty = require('./jscripty'); -var Integration = require('../integrations'); - -var Trigger = require('../../models').Trigger; -var ToolsAction = require('../../models').ToolsAction; -var ToolsCondition = require('../../models').ToolsCondition; -var ReportAgent = require('../../models').ReportAgent; -var ReportDial = require('../../models').ReportDial; -var MailMessage = require('../../models').MailMessage; -var ChatRoom = require('../../models').ChatRoom; -var SmsMessage = require('../../models').SmsMessage; -var ChatVisitor = require('../../models').ChatVisitor; -var ChatEnquiry = require('../../models').ChatEnquiry; -var Variable = require('../../models').Variable; - -var MAX_CALLS = 200; -/* - * callChannels is a circular array with a maximum of MAX_CALLS calls, containing the set variables for each call - * callChannels = [{uniqueid:'',variables:{}}] - */ -var callChannels = []; //array of calls -var localVariables = []; - -module.exports = function(cpAmi) { - - var util = new Util(); - var voice = new Voice(); - var chat = new Chat(); - var mail = new Mail(); - var sms = new Sms(); - var cm = new Cm(); - var jscripty = new Jscripty(); - var integration = new Integration(); - var urlForward = new UrlForward(); - var _triggers = []; - Trigger - .scope('all') - .findAll() - .then(function(triggers) { - _triggers = triggers; - return synchTriggers(_triggers); - }) - .then(function() { - return synchVars(); - }) - .then(function() { - console.log('Triggers are ', _triggers.length); - cpAmi.on('message', function(data) { - var actions = []; - switch (data.evt) { - case 'varset': - if (data.hasOwnProperty('variable') && data.hasOwnProperty('value')) { - var foundVar = _.find(localVariables, function(variable) { //search varset variable in local db variables - return (variable.name === _.head(_.keys(data.variable))) || (_.toLower(variable.name) === _.head(_.keys(data.variable))); - }); - if (foundVar) { //if local db variable exist - var callFound = _.find(callChannels, { - uniqueid: data.uniqueid - }); //check if there is already an object relative to the call, where the variable has been set, in the calls array - if (callFound) { //if the call exist, I add the new variable to the list of the call variables or update the old value - callFound.variables[foundVar.name] = data.value; - } else { //otherwise - if (callChannels.length >= MAX_CALLS) { //If I exceed the max lenght of the calls array I pop the oldest element (FIFO) - callChannels.shift(); - } - var call = { - uniqueid: data.uniqueid, - variables: {} - }; - call.variables[foundVar.name] = data.value; - callChannels.push(call); //Insert the new call in the calls array - } - } - } - break; - case 'ReportDial.afterUpdate': - if (data.channel) { - actions = util.getActionsByTriggers(data, _.filter(_triggers, { - channel: 'voice' - })); - data.membername = data.channel.split(/\/|-/)[1]; - console.log('After dial update, Actions are ', actions.length); - execActions(actions, data, 'voice', 'outbound', util, voice, mail, cm, jscripty, integration, urlForward); - } - break; - case 'ReportAgent.afterCreate': - actions = util.getActionsByTriggers(data, _.filter(_triggers, { - channel: 'voice' - })); - console.log('After agent create, Actions are ', actions.length); - execActions(actions, data, 'voice', 'queue', util, voice, mail, cm, jscripty, integration, urlForward); - break; - case 'ReportAgent.afterUpdate': - if (data.changed.lastevent) { - actions = util.getActionsByTriggers(data, _.filter(_triggers, { - channel: 'voice' - })); - console.log('After agent update, Actions are ', actions.length); - execActions(actions, data, 'voice', 'queue', util, voice, mail, cm, jscripty, integration, urlForward); - } - break; - default: - } - }); - ChatRoom.afterCreate(function(chatRoom) { - return chatRoom - .getChatVisitor() - .then(function(chatVisitor) { - var actions = util.getActionsByTriggers(chatVisitor.dataValues, _.filter(_triggers, { - channel: 'chat' - })); - execActions(actions, _.merge(chatVisitor.dataValues, chatRoom.dataValues), 'chat', null, util, voice, mail, cm, jscripty, integration, urlForward, chat); - }) - .catch(function(err) { - console.error(err); - }); - }); - SmsMessage.afterCreate(function(smsMessage) { - if (smsMessage.status === 'RECEIVED') { - var actions = util.getActionsByTriggers(smsMessage.dataValues, _.filter(_triggers, { - channel: 'sms' - })); - execActions(actions, smsMessage.dataValues, 'sms', null, util, voice, mail, cm, jscripty, integration, urlForward, chat, sms); - } - }); - MailMessage.afterCreate(function(doc) { - if (doc.status === 'RECEIVED') { - var actions = util.getActionsByTriggers(doc.dataValues, _.filter(_triggers, { - channel: 'mail', - status: true - })); - - execActions(actions, doc.dataValues, 'mail', null, util, voice, mail, cm, jscripty, integration, urlForward); - } - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -function synchVars() { - return Variable - .findAll() - .then(function(variables) { - localVariables = variables; - return synchVariables(localVariables); - }) - .catch(function(err) { - console.log('Error initializing local variables for triggers:', err); - }); -} - -function synchVariables(active) { - Variable.afterCreate(function(doc) { - updateCollection(active, doc); - console.log('After create, Variables are ', active.length); - }); - Variable.afterUpdate(function(doc) { - updateCollection(active, doc); - console.log('After update, Variables are ', active.length); - }); - Variable.afterDestroy(function(doc) { - _.remove(active, { - id: doc.id - }); - console.log('After destroy, Variables are ', active.length); - }); -} - -function getActionVariables(doc, channel) { - var actionVariables = {}; - if (channel === 'voice') { - var channelVariables = _.find(callChannels, { - uniqueid: doc.uniqueid - }); - return channelVariables ? _.merge(_.clone(doc), channelVariables.variables) : _.clone(doc); - } else { - return _.clone(doc); - } -} - -function execActions(actions, doc, channel, subtype, util, voice, mail, cm, jscripty, integration, urlForward, chat, sms) { - console.log('execActions'); - actions.forEach(function(action) { - console.log('Executing action "' + action.action + '"'); - switch (action.action) { - case 'contactManager': - cm.manageContact(doc, channel); - break; - case 'urlForward': - case 'http': - urlForward.sendRequest(doc, channel, action, getActionVariables(doc, channel)); - break; - case 'jscripty': - jscripty.manageJscripty(action.data1, doc, channel); - break; - case 'integration': - case 'motionbar': - integration.manageEvent(action, doc, channel, subtype, getActionVariables(doc, channel)); - break; - case 'tag': - switch (channel) { - case 'mail': - mail.tag(action, doc); - break; - case 'chat': - chat.tag(action, doc); - break; - case 'sms': - sms.tag(action, doc); - break; - default: - } - - break; - // case 'http': //commented cause urlforward does the same, so we don't repeat the same function - // switch (channel) { - // case 'mail': - // mail.http(action, doc); - // break; - // case 'chat': - // chat.http(action, doc); - // break; - // case 'sms': - // sms.http(action, doc); - // break; - // default: - // } - // - // break; - case 'email': - mail.email(action, doc); - break; - case 'accountEmail': - switch (channel) { - case 'chat': - chat.accountEmail(action, doc); - break; - case 'sms': - sms.accountEmail(action, doc); - break; - default: - } - - break; - case 'forward': - mail.forward(action, doc); - break; - case 'template': - mail.template(action, doc); - break; - case 'accountTemplate': - mail.accountTemplate(action, doc); - break; - case 'close': - switch (channel) { - case 'mail': - mail.close(action, doc); - break; - case 'chat': - chat.close(action, doc); - break; - case 'sms': - sms.close(action, doc); - break; - default: - } - - break; - - default: - console.log('Trigger: Action not recognized ', action.action); - } - }); -} - -function synchTriggers(triggers) { - Trigger.afterCreate(function(doc, options) { - options.newTrigger.id = doc.id; - triggers.push(options.newTrigger); - }); - Trigger.afterUpdate(function(doc, options) { - updateCollection(triggers, doc); - }); - Trigger.afterDestroy(function(doc) { - _.remove(triggers, { - id: doc.id - }); - }); - ToolsAction.afterBulkDestroy(function(doc) { - var triggerId = parseInt(doc.where.TriggerId); - var triggerFound = _.find(triggers, function(obj) { - return obj.id === triggerId; - }); - if (triggerFound) { - triggerFound.Actions = []; - } - }); - ToolsAction.afterBulkCreate(function(doc) { - _.forEach(doc, function(action) { - var triggerFound = _.find(triggers, function(obj) { - return obj.id === parseInt(action.TriggerId); - }); - if (triggerFound) { - triggerFound.Actions.push(action); - } - }); - }); - ToolsCondition.afterBulkDestroy(function(doc) { - if (doc.where.hasOwnProperty('TriggerAllId')) { - var triggerAllId = parseInt(doc.where.TriggerAllId); - var triggerAllFound = _.find(triggers, function(obj) { - return obj.id === triggerAllId; - }); - if (triggerAllFound) { - triggerAllFound.All = []; - } - } else if (doc.where.hasOwnProperty('TriggerAnyId')) { - var triggerAnyId = parseInt(doc.where.TriggerAnyId); - var triggerAnyFound = _.find(triggers, function(obj) { - return obj.id === triggerAnyId; - }); - if (triggerAnyFound) { - triggerAnyFound.Any = []; - } - } - }); - ToolsCondition.afterBulkCreate(function(doc) { - _.forEach(doc, function(condition) { - if (condition.dataValues.hasOwnProperty('TriggerAllId')) { - var triggerAllId = parseInt(condition.dataValues.TriggerAllId); - var triggerAllFound = _.find(triggers, function(obj) { - return obj.id === triggerAllId; - }); - if (triggerAllFound) { - triggerAllFound.All.push(condition); - } - } else if (condition.dataValues.hasOwnProperty('TriggerAnyId')) { - var triggerAnyId = parseInt(condition.dataValues.TriggerAnyId); - var triggerAnyFound = _.find(triggers, function(obj) { - return obj.id === triggerAnyId; - }); - if (triggerAnyFound) { - triggerAnyFound.Any.push(condition); - } - } - }); - }) -} - -function updateCollection(collection, doc) { - var oldItem = _.find(collection, { - id: doc.id - }); - var index = collection.indexOf(oldItem); - if (oldItem) { - collection[index] = _.merge(collection[index], doc); - } else { - collection.unshift(doc); - } -} +var _0x32df=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x75\x73\x74\x61\x63\x68\x65","\x2E\x2F\x75\x74\x69\x6C","\x2E\x2F\x76\x6F\x69\x63\x65","\x2E\x2F\x6D\x61\x69\x6C","\x2E\x2F\x63\x68\x61\x74","\x2E\x2F\x73\x6D\x73","\x2E\x2F\x63\x6D","\x2E\x2F\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64","\x2E\x2F\x6A\x73\x63\x72\x69\x70\x74\x79","\x2E\x2E\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x54\x72\x69\x67\x67\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x6F\x6F\x6C\x73\x41\x63\x74\x69\x6F\x6E","\x54\x6F\x6F\x6C\x73\x43\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x43\x68\x61\x74\x45\x6E\x71\x75\x69\x72\x79","\x56\x61\x72\x69\x61\x62\x6C\x65","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x54\x72\x69\x67\x67\x65\x72\x73\x20\x61\x72\x65\x20","\x6C\x65\x6E\x67\x74\x68","\x6C\x6F\x67","\x6D\x65\x73\x73\x61\x67\x65","\x76\x61\x72\x69\x61\x62\x6C\x65","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x76\x61\x6C\x75\x65","\x6E\x61\x6D\x65","\x6B\x65\x79\x73","\x68\x65\x61\x64","\x74\x6F\x4C\x6F\x77\x65\x72","\x66\x69\x6E\x64","\x75\x6E\x69\x71\x75\x65\x69\x64","\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x76\x61\x72\x73\x65\x74","\x63\x68\x61\x6E\x6E\x65\x6C","\x76\x6F\x69\x63\x65","\x66\x69\x6C\x74\x65\x72","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x54\x72\x69\x67\x67\x65\x72\x73","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x73\x70\x6C\x69\x74","\x41\x66\x74\x65\x72\x20\x64\x69\x61\x6C\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x41\x63\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x52\x65\x70\x6F\x72\x74\x44\x69\x61\x6C\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x41\x66\x74\x65\x72\x20\x61\x67\x65\x6E\x74\x20\x63\x72\x65\x61\x74\x65\x2C\x20\x41\x63\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x71\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x6C\x61\x73\x74\x65\x76\x65\x6E\x74","\x63\x68\x61\x6E\x67\x65\x64","\x41\x66\x74\x65\x72\x20\x61\x67\x65\x6E\x74\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x41\x63\x74\x69\x6F\x6E\x73\x20\x61\x72\x65\x20","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x76\x74","\x6F\x6E","\x64\x61\x74\x61\x56\x61\x6C\x75\x65\x73","\x63\x68\x61\x74","\x6D\x65\x72\x67\x65","\x74\x68\x65\x6E","\x67\x65\x74\x43\x68\x61\x74\x56\x69\x73\x69\x74\x6F\x72","\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x73\x74\x61\x74\x75\x73","\x52\x45\x43\x45\x49\x56\x45\x44","\x73\x6D\x73","\x6D\x61\x69\x6C","\x66\x69\x6E\x64\x41\x6C\x6C","\x61\x6C\x6C","\x73\x63\x6F\x70\x65","\x45\x72\x72\x6F\x72\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x69\x6E\x67\x20\x6C\x6F\x63\x61\x6C\x20\x76\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x66\x6F\x72\x20\x74\x72\x69\x67\x67\x65\x72\x73\x3A","\x41\x66\x74\x65\x72\x20\x63\x72\x65\x61\x74\x65\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x41\x66\x74\x65\x72\x20\x75\x70\x64\x61\x74\x65\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x69\x64","\x72\x65\x6D\x6F\x76\x65","\x41\x66\x74\x65\x72\x20\x64\x65\x73\x74\x72\x6F\x79\x2C\x20\x56\x61\x72\x69\x61\x62\x6C\x65\x73\x20\x61\x72\x65\x20","\x61\x66\x74\x65\x72\x44\x65\x73\x74\x72\x6F\x79","\x63\x6C\x6F\x6E\x65","\x65\x78\x65\x63\x41\x63\x74\x69\x6F\x6E\x73","\x45\x78\x65\x63\x75\x74\x69\x6E\x67\x20\x61\x63\x74\x69\x6F\x6E\x20\x22","\x61\x63\x74\x69\x6F\x6E","\x22","\x6D\x61\x6E\x61\x67\x65\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6F\x6E\x74\x61\x63\x74\x4D\x61\x6E\x61\x67\x65\x72","\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x68\x74\x74\x70","\x64\x61\x74\x61\x31","\x6D\x61\x6E\x61\x67\x65\x4A\x73\x63\x72\x69\x70\x74\x79","\x6A\x73\x63\x72\x69\x70\x74\x79","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x6D\x61\x6E\x61\x67\x65\x45\x76\x65\x6E\x74","\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x74\x61\x67","\x65\x6D\x61\x69\x6C","\x61\x63\x63\x6F\x75\x6E\x74\x45\x6D\x61\x69\x6C","\x66\x6F\x72\x77\x61\x72\x64","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x63\x6C\x6F\x73\x65","\x54\x72\x69\x67\x67\x65\x72\x3A\x20\x41\x63\x74\x69\x6F\x6E\x20\x6E\x6F\x74\x20\x72\x65\x63\x6F\x67\x6E\x69\x7A\x65\x64\x20","\x66\x6F\x72\x45\x61\x63\x68","\x6E\x65\x77\x54\x72\x69\x67\x67\x65\x72","\x77\x68\x65\x72\x65","\x41\x63\x74\x69\x6F\x6E\x73","\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x54\x72\x69\x67\x67\x65\x72\x41\x6C\x6C\x49\x64","\x41\x6C\x6C","\x54\x72\x69\x67\x67\x65\x72\x41\x6E\x79\x49\x64","\x41\x6E\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x75\x6E\x73\x68\x69\x66\x74"];_0x32df[0];var _=require(_0x32df[1]);var Mustache=require(_0x32df[2]);var Util=require(_0x32df[3]);var Voice=require(_0x32df[4]);var Mail=require(_0x32df[5]);var Chat=require(_0x32df[6]);var Sms=require(_0x32df[7]);var Cm=require(_0x32df[8]);var UrlForward=require(_0x32df[9]);var Jscripty=require(_0x32df[10]);var Integration=require(_0x32df[11]);var Trigger=require(_0x32df[13])[_0x32df[12]];var ToolsAction=require(_0x32df[13])[_0x32df[14]];var ToolsCondition=require(_0x32df[13])[_0x32df[15]];var ReportAgent=require(_0x32df[13])[_0x32df[16]];var ReportDial=require(_0x32df[13])[_0x32df[17]];var MailMessage=require(_0x32df[13])[_0x32df[18]];var ChatRoom=require(_0x32df[13])[_0x32df[19]];var SmsMessage=require(_0x32df[13])[_0x32df[20]];var ChatVisitor=require(_0x32df[13])[_0x32df[21]];var ChatEnquiry=require(_0x32df[13])[_0x32df[22]];var Variable=require(_0x32df[13])[_0x32df[23]];var MAX_CALLS=200;var callChannels=[];var localVariables=[];module[_0x32df[24]]= function(_0x627bx1a){var _0x627bx1b= new Util();var _0x627bx1c= new Voice();var _0x627bx1d= new Chat();var _0x627bx1e= new Mail();var _0x627bx1f= new Sms();var _0x627bx20= new Cm();var _0x627bx21= new Jscripty();var _0x627bx22= new Integration();var _0x627bx23= new UrlForward();var _0x627bx24=[];Trigger[_0x32df[74]](_0x32df[73])[_0x32df[72]]()[_0x32df[65]](function(_0x627bx30){_0x627bx24= _0x627bx30;return synchTriggers(_0x627bx24)})[_0x32df[65]](function(){return synchVars()})[_0x32df[65]](function(){console[_0x32df[29]](_0x32df[27],_0x627bx24[_0x32df[28]]);_0x627bx1a[_0x32df[61]](_0x32df[30],function(_0x627bx26){var _0x627bx27=[];switch(_0x627bx26[_0x32df[60]]){case _0x32df[43]:if(_0x627bx26[_0x32df[32]](_0x32df[31])&& _0x627bx26[_0x32df[32]](_0x32df[33])){var _0x627bx28=_[_0x32df[38]](localVariables,function(_0x627bx29){return (_0x627bx29[_0x32df[34]]=== _[_0x32df[36]](_[_0x32df[35]](_0x627bx26[_0x32df[31]])))|| (_[_0x32df[37]](_0x627bx29[_0x32df[34]])=== _[_0x32df[36]](_[_0x32df[35]](_0x627bx26[_0x32df[31]])))});if(_0x627bx28){var _0x627bx2a=_[_0x32df[38]](callChannels,{uniqueid:_0x627bx26[_0x32df[39]]});if(_0x627bx2a){_0x627bx2a[_0x32df[40]][_0x627bx28[_0x32df[34]]]= _0x627bx26[_0x32df[33]]}else {if(callChannels[_0x32df[28]]>= MAX_CALLS){callChannels[_0x32df[41]]()};var _0x627bx2b={uniqueid:_0x627bx26[_0x32df[39]],variables:{}};_0x627bx2b[_0x32df[40]][_0x627bx28[_0x32df[34]]]= _0x627bx26[_0x32df[33]];callChannels[_0x32df[42]](_0x627bx2b)}}};break;case _0x32df[52]:if(_0x627bx26[_0x32df[44]]){_0x627bx27= _0x627bx1b[_0x32df[47]](_0x627bx26,_[_0x32df[46]](_0x627bx24,{channel:_0x32df[45]}));_0x627bx26[_0x32df[48]]= _0x627bx26[_0x32df[44]][_0x32df[49]](/\/|-/)[1];console[_0x32df[29]](_0x32df[50],_0x627bx27[_0x32df[28]]);execActions(_0x627bx27,_0x627bx26,_0x32df[45],_0x32df[51],_0x627bx1b,_0x627bx1c,_0x627bx1e,_0x627bx20,_0x627bx21,_0x627bx22,_0x627bx23)};break;case _0x32df[55]:_0x627bx27= _0x627bx1b[_0x32df[47]](_0x627bx26,_[_0x32df[46]](_0x627bx24,{channel:_0x32df[45]}));console[_0x32df[29]](_0x32df[53],_0x627bx27[_0x32df[28]]);execActions(_0x627bx27,_0x627bx26,_0x32df[45],_0x32df[54],_0x627bx1b,_0x627bx1c,_0x627bx1e,_0x627bx20,_0x627bx21,_0x627bx22,_0x627bx23);break;case _0x32df[59]:if(_0x627bx26[_0x32df[57]][_0x32df[56]]){_0x627bx27= _0x627bx1b[_0x32df[47]](_0x627bx26,_[_0x32df[46]](_0x627bx24,{channel:_0x32df[45]}));console[_0x32df[29]](_0x32df[58],_0x627bx27[_0x32df[28]]);execActions(_0x627bx27,_0x627bx26,_0x32df[45],_0x32df[54],_0x627bx1b,_0x627bx1c,_0x627bx1e,_0x627bx20,_0x627bx21,_0x627bx22,_0x627bx23)};break;default:}});ChatRoom[_0x32df[67]](function(_0x627bx2c){return _0x627bx2c[_0x32df[66]]()[_0x32df[65]](function(_0x627bx2d){var _0x627bx27=_0x627bx1b[_0x32df[47]](_0x627bx2d[_0x32df[62]],_[_0x32df[46]](_0x627bx24,{channel:_0x32df[63]}));execActions(_0x627bx27,_[_0x32df[64]](_0x627bx2d[_0x32df[62]],_0x627bx2c[_0x32df[62]]),_0x32df[63],null,_0x627bx1b,_0x627bx1c,_0x627bx1e,_0x627bx20,_0x627bx21,_0x627bx22,_0x627bx23,_0x627bx1d)})[_0x32df[26]](function(_0x627bx25){console[_0x32df[25]](_0x627bx25)})});SmsMessage[_0x32df[67]](function(_0x627bx2e){if(_0x627bx2e[_0x32df[68]]=== _0x32df[69]){var _0x627bx27=_0x627bx1b[_0x32df[47]](_0x627bx2e[_0x32df[62]],_[_0x32df[46]](_0x627bx24,{channel:_0x32df[70]}));execActions(_0x627bx27,_0x627bx2e[_0x32df[62]],_0x32df[70],null,_0x627bx1b,_0x627bx1c,_0x627bx1e,_0x627bx20,_0x627bx21,_0x627bx22,_0x627bx23,_0x627bx1d,_0x627bx1f)}});MailMessage[_0x32df[67]](function(_0x627bx2f){if(_0x627bx2f[_0x32df[68]]=== _0x32df[69]){var _0x627bx27=_0x627bx1b[_0x32df[47]](_0x627bx2f[_0x32df[62]],_[_0x32df[46]](_0x627bx24,{channel:_0x32df[71],status:true}));execActions(_0x627bx27,_0x627bx2f[_0x32df[62]],_0x32df[71],null,_0x627bx1b,_0x627bx1c,_0x627bx1e,_0x627bx20,_0x627bx21,_0x627bx22,_0x627bx23)}})})[_0x32df[26]](function(_0x627bx25){console[_0x32df[25]](_0x627bx25)})};function synchVars(){return Variable[_0x32df[72]]()[_0x32df[65]](function(_0x627bx32){localVariables= _0x627bx32;return synchVariables(localVariables)})[_0x32df[26]](function(_0x627bx25){console[_0x32df[29]](_0x32df[75],_0x627bx25)})}function synchVariables(_0x627bx34){Variable[_0x32df[67]](function(_0x627bx2f){updateCollection(_0x627bx34,_0x627bx2f);console[_0x32df[29]](_0x32df[76],_0x627bx34[_0x32df[28]])});Variable[_0x32df[78]](function(_0x627bx2f){updateCollection(_0x627bx34,_0x627bx2f);console[_0x32df[29]](_0x32df[77],_0x627bx34[_0x32df[28]])});Variable[_0x32df[82]](function(_0x627bx2f){_[_0x32df[80]](_0x627bx34,{id:_0x627bx2f[_0x32df[79]]});console[_0x32df[29]](_0x32df[81],_0x627bx34[_0x32df[28]])})}function getActionVariables(_0x627bx2f,_0x627bx36){var _0x627bx37={};if(_0x627bx36=== _0x32df[45]){var _0x627bx38=_[_0x32df[38]](callChannels,{uniqueid:_0x627bx2f[_0x32df[39]]});return _0x627bx38?_[_0x32df[64]](_[_0x32df[83]](_0x627bx2f),_0x627bx38[_0x32df[40]]):_[_0x32df[83]](_0x627bx2f)}else {return _[_0x32df[83]](_0x627bx2f)}}function execActions(_0x627bx27,_0x627bx2f,_0x627bx36,_0x627bx3a,_0x627bx1b,_0x627bx1c,_0x627bx1e,_0x627bx20,_0x627bx21,_0x627bx22,_0x627bx23,_0x627bx1d,_0x627bx1f){console[_0x32df[29]](_0x32df[84]);_0x627bx27[_0x32df[107]](function(_0x627bx3b){console[_0x32df[29]](_0x32df[85]+ _0x627bx3b[_0x32df[86]]+ _0x32df[87]);switch(_0x627bx3b[_0x32df[86]]){case _0x32df[89]:_0x627bx20[_0x32df[88]](_0x627bx2f,_0x627bx36);break;case _0x32df[90]:;case _0x32df[92]:_0x627bx23[_0x32df[91]](_0x627bx2f,_0x627bx36,_0x627bx3b,getActionVariables(_0x627bx2f,_0x627bx36));break;case _0x32df[95]:_0x627bx21[_0x32df[94]](_0x627bx3b[_0x32df[93]],_0x627bx2f,_0x627bx36);break;case _0x32df[96]:;case _0x32df[98]:_0x627bx22[_0x32df[97]](_0x627bx3b,_0x627bx2f,_0x627bx36,_0x627bx3a,getActionVariables(_0x627bx2f,_0x627bx36));break;case _0x32df[99]:switch(_0x627bx36){case _0x32df[71]:_0x627bx1e[_0x32df[99]](_0x627bx3b,_0x627bx2f);break;case _0x32df[63]:_0x627bx1d[_0x32df[99]](_0x627bx3b,_0x627bx2f);break;case _0x32df[70]:_0x627bx1f[_0x32df[99]](_0x627bx3b,_0x627bx2f);break;default:};break;case _0x32df[100]:_0x627bx1e[_0x32df[100]](_0x627bx3b,_0x627bx2f);break;case _0x32df[101]:switch(_0x627bx36){case _0x32df[63]:_0x627bx1d[_0x32df[101]](_0x627bx3b,_0x627bx2f);break;case _0x32df[70]:_0x627bx1f[_0x32df[101]](_0x627bx3b,_0x627bx2f);break;default:};break;case _0x32df[102]:_0x627bx1e[_0x32df[102]](_0x627bx3b,_0x627bx2f);break;case _0x32df[103]:_0x627bx1e[_0x32df[103]](_0x627bx3b,_0x627bx2f);break;case _0x32df[104]:_0x627bx1e[_0x32df[104]](_0x627bx3b,_0x627bx2f);break;case _0x32df[105]:switch(_0x627bx36){case _0x32df[71]:_0x627bx1e[_0x32df[105]](_0x627bx3b,_0x627bx2f);break;case _0x32df[63]:_0x627bx1d[_0x32df[105]](_0x627bx3b,_0x627bx2f);break;case _0x32df[70]:_0x627bx1f[_0x32df[105]](_0x627bx3b,_0x627bx2f);break;default:};break;default:console[_0x32df[29]](_0x32df[106],_0x627bx3b[_0x32df[86]])}})}function synchTriggers(_0x627bx30){Trigger[_0x32df[67]](function(_0x627bx2f,_0x627bx3d){_0x627bx3d[_0x32df[108]][_0x32df[79]]= _0x627bx2f[_0x32df[79]];_0x627bx30[_0x32df[42]](_0x627bx3d[_0x32df[108]])});Trigger[_0x32df[78]](function(_0x627bx2f,_0x627bx3d){updateCollection(_0x627bx30,_0x627bx2f)});Trigger[_0x32df[82]](function(_0x627bx2f){_[_0x32df[80]](_0x627bx30,{id:_0x627bx2f[_0x32df[79]]})});ToolsAction[_0x32df[111]](function(_0x627bx2f){var _0x627bx3e=parseInt(_0x627bx2f[_0x32df[109]].TriggerId);var _0x627bx3f=_[_0x32df[38]](_0x627bx30,function(_0x627bx40){return _0x627bx40[_0x32df[79]]=== _0x627bx3e});if(_0x627bx3f){_0x627bx3f[_0x32df[110]]= []}});ToolsAction[_0x32df[112]](function(_0x627bx2f){_[_0x32df[107]](_0x627bx2f,function(_0x627bx3b){var _0x627bx3f=_[_0x32df[38]](_0x627bx30,function(_0x627bx40){return _0x627bx40[_0x32df[79]]=== parseInt(_0x627bx3b.TriggerId)});if(_0x627bx3f){_0x627bx3f[_0x32df[110]][_0x32df[42]](_0x627bx3b)}})});ToolsCondition[_0x32df[111]](function(_0x627bx2f){if(_0x627bx2f[_0x32df[109]][_0x32df[32]](_0x32df[113])){var _0x627bx41=parseInt(_0x627bx2f[_0x32df[109]].TriggerAllId);var _0x627bx42=_[_0x32df[38]](_0x627bx30,function(_0x627bx40){return _0x627bx40[_0x32df[79]]=== _0x627bx41});if(_0x627bx42){_0x627bx42[_0x32df[114]]= []}}else {if(_0x627bx2f[_0x32df[109]][_0x32df[32]](_0x32df[115])){var _0x627bx43=parseInt(_0x627bx2f[_0x32df[109]].TriggerAnyId);var _0x627bx44=_[_0x32df[38]](_0x627bx30,function(_0x627bx40){return _0x627bx40[_0x32df[79]]=== _0x627bx43});if(_0x627bx44){_0x627bx44[_0x32df[116]]= []}}}});ToolsCondition[_0x32df[112]](function(_0x627bx2f){_[_0x32df[107]](_0x627bx2f,function(_0x627bx45){if(_0x627bx45[_0x32df[62]][_0x32df[32]](_0x32df[113])){var _0x627bx41=parseInt(_0x627bx45[_0x32df[62]].TriggerAllId);var _0x627bx42=_[_0x32df[38]](_0x627bx30,function(_0x627bx40){return _0x627bx40[_0x32df[79]]=== _0x627bx41});if(_0x627bx42){_0x627bx42[_0x32df[114]][_0x32df[42]](_0x627bx45)}}else {if(_0x627bx45[_0x32df[62]][_0x32df[32]](_0x32df[115])){var _0x627bx43=parseInt(_0x627bx45[_0x32df[62]].TriggerAnyId);var _0x627bx44=_[_0x32df[38]](_0x627bx30,function(_0x627bx40){return _0x627bx40[_0x32df[79]]=== _0x627bx43});if(_0x627bx44){_0x627bx44[_0x32df[116]][_0x32df[42]](_0x627bx45)}}}})})}function updateCollection(_0x627bx47,_0x627bx2f){var _0x627bx48=_[_0x32df[38]](_0x627bx47,{id:_0x627bx2f[_0x32df[79]]});var _0x627bx49=_0x627bx47[_0x32df[117]](_0x627bx48);if(_0x627bx48){_0x627bx47[_0x627bx49]= _[_0x32df[64]](_0x627bx47[_0x627bx49],_0x627bx2f)}else {_0x627bx47[_0x32df[118]](_0x627bx2f)}} \ No newline at end of file diff --git a/server/config/triggers/jscripty.js b/server/config/triggers/jscripty.js index fcd0bd3..33d9af9 100644 --- a/server/config/triggers/jscripty.js +++ b/server/config/triggers/jscripty.js @@ -1,21 +1 @@ -var _ = require('lodash'); - -function Jscripty() { - console.log('Trigger Jscripty Initialization...'); -} - -Jscripty.prototype.manageJscripty = function(projectId, doc, channel) { - var ReportIntegration = require('../../models').ReportIntegration; - delete doc.id; - doc.integration = 'jscripty'; - doc.eventChannel = channel; - doc.projectId = projectId; - - return ReportIntegration - .create(doc) - .catch(function(err) { - console.log(err); - }); -} - -module.exports = Jscripty; +var _0x2f87=["\x6C\x6F\x64\x61\x73\x68","\x54\x72\x69\x67\x67\x65\x72\x20\x4A\x73\x63\x72\x69\x70\x74\x79\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x6D\x61\x6E\x61\x67\x65\x4A\x73\x63\x72\x69\x70\x74\x79","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x6A\x73\x63\x72\x69\x70\x74\x79","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x70\x72\x6F\x6A\x65\x63\x74\x49\x64","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0x2f87[0]);function Jscripty(){console[_0x2f87[2]](_0x2f87[1])}Jscripty[_0x2f87[4]][_0x2f87[3]]= function(_0x64f9x3,_0x64f9x4,_0x64f9x5){var _0x64f9x6=require(_0x2f87[6])[_0x2f87[5]];delete _0x64f9x4[_0x2f87[7]];_0x64f9x4[_0x2f87[8]]= _0x2f87[9];_0x64f9x4[_0x2f87[10]]= _0x64f9x5;_0x64f9x4[_0x2f87[11]]= _0x64f9x3;return _0x64f9x6[_0x2f87[13]](_0x64f9x4)[_0x2f87[12]](function(_0x64f9x7){console[_0x2f87[2]](_0x64f9x7)})};module[_0x2f87[14]]= Jscripty \ No newline at end of file diff --git a/server/config/triggers/mail.js b/server/config/triggers/mail.js index 4b521e4..6806960 100644 --- a/server/config/triggers/mail.js +++ b/server/config/triggers/mail.js @@ -1,184 +1 @@ -const _ = require('lodash'); -const rp = require('request-promise'); -const Mustache = require('mustache'); - -const MailRoom = require('../../models').MailRoom; -const Template = require('../../models').Template; -const MailMessage = require('../../models').MailMessage; -const MailAccount = require('../../models').MailAccount; -const MailServerOut = require('../../models').MailServerOut; - -function Mail() { - console.log('Trigger Mail Initialization...'); -} - -Mail.prototype.tag = function(action, dataValues, channel, subtype) { - return MailRoom - .update({ - tags: action.data1.split(';') - }, { - where: { - id: dataValues.MailRoomId - } - }) - .catch(function(err) { - console.error(err); - }); -} - -// Mail.prototype.http = function(action, dataValues) { -// var options = { -// method: action.data1, -// uri: action.data2, -// json: true -// }; -// -// switch (action.data1) { -// case 'GET': -// options.qs = dataValues; -// break; -// case 'POST': -// options.form = dataValues; -// break; -// default: -// } -// -// return rp(options) -// .catch(function(err) { -// console.error(err); -// }); -// } - -Mail.prototype.email = function(action, dataValues) { - return MailAccount - .findById(dataValues.accountId) - .then(function(mailAccount) { - - return MailMessage - .create({ - subject: action.data3 || null, - from: [mailAccount.address], - to: action.data1.split(';'), - cc: action.data2 ? action.data2.split(';') : [], - html: action.data4 ? Mustache - .render(action.data4, dataValues) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(/\n/g, '
') : null, - status: 'SENDING', - auto: true, - accountId: mailAccount.id, - accountName: mailAccount.name - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -Mail.prototype.forward = function(action, dataValues) { - return MailAccount - .findById(dataValues.accountId) - .then(function(mailAccount) { - return MailMessage - .create({ - subject: dataValues.subject || null, - from: [mailAccount.address], - fromId: dataValues.fromId, - to: action.data1.split(';'), - text: dataValues - .text - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(/\n/g, '
'), - html: dataValues.html, - status: 'SENDING', - auto: true, - accountId: mailAccount.id, - accountName: mailAccount.name - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -Mail.prototype.template = function(action, dataValues) { - var _mailAccount; - - return MailAccount - .findById(dataValues.accountId) - .then(function(mailAccount) { - _mailAccount = mailAccount; - return Template - .findById(action.data1); - }) - .then(function(template) { - return MailMessage - .create({ - status: 'SENDING', - subject: template.subject, - from: [_mailAccount.address], - to: action.data2.split(';'), - html: template.html ? Mustache.render(template.html, dataValues) : null, - auto: true, - accountId: _mailAccount.id, - accountName: _mailAccount.name - }) - .catch(function(err) { - console.log(err); - }); - }); -} - -Mail.prototype.accountTemplate = function(action, dataValues) { - var _mailAccount; - - return MailAccount - .findById(action.data1) - .then(function(mailAccount) { - _mailAccount = mailAccount; - return Template - .findById(action.data2); - }) - .then(function(template) { - return MailMessage - .create({ - status: 'SENDING', - subject: template.subject, - from: [_mailAccount.address], - to: action.data3.split(';'), - html: template.html ? Mustache.render(template.html, dataValues) : null, - auto: true, - accountId: _mailAccount.id, - accountName: _mailAccount.name, - }) - .catch(function(err) { - console.log(err); - }); - }); -} - -Mail.prototype.close = function(action, dataValues) { - return MailRoom - .update({ - status: 'CLOSED', - disposition: action.data1 || null - }, { - individualHooks: true, - where: { - id: dataValues.MailRoomId - } - }) - .catch(function(err) { - console.error(err); - }); -} - -module.exports = Mail; +var _0xf241=["\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x75\x73\x74\x61\x63\x68\x65","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x53\x65\x72\x76\x65\x72\x4F\x75\x74","\x54\x72\x69\x67\x67\x65\x72\x20\x4D\x61\x69\x6C\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x74\x61\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x3B","\x73\x70\x6C\x69\x74","\x64\x61\x74\x61\x31","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x65\x6D\x61\x69\x6C","\x64\x61\x74\x61\x33","\x61\x64\x64\x72\x65\x73\x73","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x34","\x3C\x62\x72\x3E","\x72\x65\x70\x6C\x61\x63\x65","\x26\x23\x30\x33\x39\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x67\x74\x3B","\x26\x6C\x74\x3B","\x26\x61\x6D\x70\x3B","\x72\x65\x6E\x64\x65\x72","\x53\x45\x4E\x44\x49\x4E\x47","\x69\x64","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x61\x63\x63\x6F\x75\x6E\x74\x49\x64","\x66\x69\x6E\x64\x42\x79\x49\x64","\x66\x6F\x72\x77\x61\x72\x64","\x73\x75\x62\x6A\x65\x63\x74","\x66\x72\x6F\x6D\x49\x64","\x74\x65\x78\x74","\x68\x74\x6D\x6C","\x74\x65\x6D\x70\x6C\x61\x74\x65","\x61\x63\x63\x6F\x75\x6E\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x63\x6C\x6F\x73\x65","\x43\x4C\x4F\x53\x45\x44","\x65\x78\x70\x6F\x72\x74\x73"];const _=require(_0xf241[0]);const rp=require(_0xf241[1]);const Mustache=require(_0xf241[2]);const MailRoom=require(_0xf241[4])[_0xf241[3]];const Template=require(_0xf241[4])[_0xf241[5]];const MailMessage=require(_0xf241[4])[_0xf241[6]];const MailAccount=require(_0xf241[4])[_0xf241[7]];const MailServerOut=require(_0xf241[4])[_0xf241[8]];function Mail(){console[_0xf241[10]](_0xf241[9])}Mail[_0xf241[12]][_0xf241[11]]= function(_0x9e19xa,_0x9e19xb,_0x9e19xc,_0x9e19xd){return MailRoom[_0xf241[19]]({tags:_0x9e19xa[_0xf241[17]][_0xf241[16]](_0xf241[15])},{where:{id:_0x9e19xb[_0xf241[18]]}})[_0xf241[14]](function(_0x9e19xe){console[_0xf241[13]](_0x9e19xe)})};Mail[_0xf241[12]][_0xf241[20]]= function(_0x9e19xa,_0x9e19xb){return MailAccount[_0xf241[39]](_0x9e19xb[_0xf241[38]])[_0xf241[37]](function(_0x9e19xf){return MailMessage[_0xf241[36]]({subject:_0x9e19xa[_0xf241[21]]|| null,from:[_0x9e19xf[_0xf241[22]]],to:_0x9e19xa[_0xf241[17]][_0xf241[16]](_0xf241[15]),cc:_0x9e19xa[_0xf241[23]]?_0x9e19xa[_0xf241[23]][_0xf241[16]](_0xf241[15]):[],html:_0x9e19xa[_0xf241[24]]?Mustache[_0xf241[32]](_0x9e19xa[_0xf241[24]],_0x9e19xb)[_0xf241[26]](/&/g,_0xf241[31])[_0xf241[26]](//g,_0xf241[29])[_0xf241[26]](/"/g,_0xf241[28])[_0xf241[26]](/'/g,_0xf241[27])[_0xf241[26]](/\n/g,_0xf241[25]):null,status:_0xf241[33],auto:true,accountId:_0x9e19xf[_0xf241[34]],accountName:_0x9e19xf[_0xf241[35]]})})[_0xf241[14]](function(_0x9e19xe){console[_0xf241[13]](_0x9e19xe)})};Mail[_0xf241[12]][_0xf241[40]]= function(_0x9e19xa,_0x9e19xb){return MailAccount[_0xf241[39]](_0x9e19xb[_0xf241[38]])[_0xf241[37]](function(_0x9e19xf){return MailMessage[_0xf241[36]]({subject:_0x9e19xb[_0xf241[41]]|| null,from:[_0x9e19xf[_0xf241[22]]],fromId:_0x9e19xb[_0xf241[42]],to:_0x9e19xa[_0xf241[17]][_0xf241[16]](_0xf241[15]),text:_0x9e19xb[_0xf241[43]][_0xf241[26]](/&/g,_0xf241[31])[_0xf241[26]](//g,_0xf241[29])[_0xf241[26]](/"/g,_0xf241[28])[_0xf241[26]](/'/g,_0xf241[27])[_0xf241[26]](/\n/g,_0xf241[25]),html:_0x9e19xb[_0xf241[44]],status:_0xf241[33],auto:true,accountId:_0x9e19xf[_0xf241[34]],accountName:_0x9e19xf[_0xf241[35]]})})[_0xf241[14]](function(_0x9e19xe){console[_0xf241[13]](_0x9e19xe)})};Mail[_0xf241[12]][_0xf241[45]]= function(_0x9e19xa,_0x9e19xb){var _0x9e19x10;return MailAccount[_0xf241[39]](_0x9e19xb[_0xf241[38]])[_0xf241[37]](function(_0x9e19xf){_0x9e19x10= _0x9e19xf;return Template[_0xf241[39]](_0x9e19xa[_0xf241[17]])})[_0xf241[37]](function(_0x9e19x11){return MailMessage[_0xf241[36]]({status:_0xf241[33],subject:_0x9e19x11[_0xf241[41]],from:[_0x9e19x10[_0xf241[22]]],to:_0x9e19xa[_0xf241[23]][_0xf241[16]](_0xf241[15]),html:_0x9e19x11[_0xf241[44]]?Mustache[_0xf241[32]](_0x9e19x11[_0xf241[44]],_0x9e19xb):null,auto:true,accountId:_0x9e19x10[_0xf241[34]],accountName:_0x9e19x10[_0xf241[35]]})[_0xf241[14]](function(_0x9e19xe){console[_0xf241[10]](_0x9e19xe)})})};Mail[_0xf241[12]][_0xf241[46]]= function(_0x9e19xa,_0x9e19xb){var _0x9e19x10;return MailAccount[_0xf241[39]](_0x9e19xa[_0xf241[17]])[_0xf241[37]](function(_0x9e19xf){_0x9e19x10= _0x9e19xf;return Template[_0xf241[39]](_0x9e19xa[_0xf241[23]])})[_0xf241[37]](function(_0x9e19x11){return MailMessage[_0xf241[36]]({status:_0xf241[33],subject:_0x9e19x11[_0xf241[41]],from:[_0x9e19x10[_0xf241[22]]],to:_0x9e19xa[_0xf241[21]][_0xf241[16]](_0xf241[15]),html:_0x9e19x11[_0xf241[44]]?Mustache[_0xf241[32]](_0x9e19x11[_0xf241[44]],_0x9e19xb):null,auto:true,accountId:_0x9e19x10[_0xf241[34]],accountName:_0x9e19x10[_0xf241[35]]})[_0xf241[14]](function(_0x9e19xe){console[_0xf241[10]](_0x9e19xe)})})};Mail[_0xf241[12]][_0xf241[47]]= function(_0x9e19xa,_0x9e19xb){return MailRoom[_0xf241[19]]({status:_0xf241[48],disposition:_0x9e19xa[_0xf241[17]]|| null},{individualHooks:true,where:{id:_0x9e19xb[_0xf241[18]]}})[_0xf241[14]](function(_0x9e19xe){console[_0xf241[13]](_0x9e19xe)})};module[_0xf241[49]]= Mail \ No newline at end of file diff --git a/server/config/triggers/sms.js b/server/config/triggers/sms.js index 3a2dff7..60685ac 100644 --- a/server/config/triggers/sms.js +++ b/server/config/triggers/sms.js @@ -1,124 +1 @@ -const _ = require('lodash'); -const rp = require('request-promise'); -const Mustache = require('mustache'); - -const Template = require('../../models').Template; -const SmsRoom = require('../../models').SmsRoom; -const MailAccount = require('../../models').MailAccount; -const MailMessage = require('../../models').MailMessage; - -function Sms() { - console.log('Trigger Sms Initialization...'); -} - -// Sms.prototype.http = function(action, dataValues) { -// var options = { -// method: action.data1, -// uri: action.data2, -// json: true -// }; -// -// switch (action.data1) { -// case 'GET': -// options.qs = dataValues; -// break; -// case 'POST': -// options.form = dataValues; -// break; -// default: -// } -// -// return rp(options) -// .catch(function(err) { -// console.error(err); -// }); -// } - -Sms.prototype.tag = function(action, dataValues) { - return SmsRoom - .update({ - tags: action.data1.split(';') - }, { - where: { - id: dataValues.SmsRoomId - } - }) - .catch(function(err) { - console.error(err); - }); -} - -Sms.prototype.close = function(action, dataValues) { - return SmsRoom - .update({ - status: 'CLOSED', - disposition: action.data1 || null - }, { - individualHooks: true, - where: { - id: dataValues.SmsRoomId - } - }) - .catch(function(err) { - console.error(err); - }); -} - -Sms.prototype.accountEmail = function(action, dataValues) { - return MailAccount - .findById(action.data1) - .then(function(mailAccount) { - return MailMessage - .create({ - subject: action.data4 || null, - from: [mailAccount.address], - to: action.data2.split(';'), - cc: action.data3 ? action.data3.split(';') : [], - html: action.data5 ? Mustache - .render(action.data5, dataValues) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"') - .replace(/'/g, ''') - .replace(/\n/g, '
') : null, - status: 'SENDING', - auto: true, - accountId: mailAccount.id, - accountName: mailAccount.name - }); - }) - .catch(function(err) { - console.error(err); - }); -} - -Sms.prototype.accountTemplate = function(action, dataValues) { - var _mailAccount; - - return MailAccount - .findById(action.data1) - .then(function(mailAccount) { - _mailAccount = mailAccount; - return Template - .findById(action.data2); - }) - .then(function(template) { - return MailMessage - .create({ - status: 'SENDING', - subject: template.subject, - from: [_mailAccount.address], - to: action.data3.split(';'), - html: template.html ? Mustache.render(template.html, dataValues) : null, - auto: true, - accountId: _mailAccount.id, - accountName: _mailAccount.name, - }) - .catch(function(err) { - console.log(err); - }); - }); -} - -module.exports = Sms; +var _0xc7fb=["\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x75\x73\x74\x61\x63\x68\x65","\x54\x65\x6D\x70\x6C\x61\x74\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x4D\x61\x69\x6C\x41\x63\x63\x6F\x75\x6E\x74","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x54\x72\x69\x67\x67\x65\x72\x20\x53\x6D\x73\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x74\x61\x67","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x3B","\x73\x70\x6C\x69\x74","\x64\x61\x74\x61\x31","\x53\x6D\x73\x52\x6F\x6F\x6D\x49\x64","\x75\x70\x64\x61\x74\x65","\x63\x6C\x6F\x73\x65","\x43\x4C\x4F\x53\x45\x44","\x61\x63\x63\x6F\x75\x6E\x74\x45\x6D\x61\x69\x6C","\x64\x61\x74\x61\x34","\x61\x64\x64\x72\x65\x73\x73","\x64\x61\x74\x61\x32","\x64\x61\x74\x61\x33","\x64\x61\x74\x61\x35","\x3C\x62\x72\x3E","\x72\x65\x70\x6C\x61\x63\x65","\x26\x23\x30\x33\x39\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x67\x74\x3B","\x26\x6C\x74\x3B","\x26\x61\x6D\x70\x3B","\x72\x65\x6E\x64\x65\x72","\x53\x45\x4E\x44\x49\x4E\x47","\x69\x64","\x6E\x61\x6D\x65","\x63\x72\x65\x61\x74\x65","\x74\x68\x65\x6E","\x66\x69\x6E\x64\x42\x79\x49\x64","\x61\x63\x63\x6F\x75\x6E\x74\x54\x65\x6D\x70\x6C\x61\x74\x65","\x73\x75\x62\x6A\x65\x63\x74","\x68\x74\x6D\x6C","\x65\x78\x70\x6F\x72\x74\x73"];const _=require(_0xc7fb[0]);const rp=require(_0xc7fb[1]);const Mustache=require(_0xc7fb[2]);const Template=require(_0xc7fb[4])[_0xc7fb[3]];const SmsRoom=require(_0xc7fb[4])[_0xc7fb[5]];const MailAccount=require(_0xc7fb[4])[_0xc7fb[6]];const MailMessage=require(_0xc7fb[4])[_0xc7fb[7]];function Sms(){console[_0xc7fb[9]](_0xc7fb[8])}Sms[_0xc7fb[11]][_0xc7fb[10]]= function(_0x734fx9,_0x734fxa){return SmsRoom[_0xc7fb[18]]({tags:_0x734fx9[_0xc7fb[16]][_0xc7fb[15]](_0xc7fb[14])},{where:{id:_0x734fxa[_0xc7fb[17]]}})[_0xc7fb[13]](function(_0x734fxb){console[_0xc7fb[12]](_0x734fxb)})};Sms[_0xc7fb[11]][_0xc7fb[19]]= function(_0x734fx9,_0x734fxa){return SmsRoom[_0xc7fb[18]]({status:_0xc7fb[20],disposition:_0x734fx9[_0xc7fb[16]]|| null},{individualHooks:true,where:{id:_0x734fxa[_0xc7fb[17]]}})[_0xc7fb[13]](function(_0x734fxb){console[_0xc7fb[12]](_0x734fxb)})};Sms[_0xc7fb[11]][_0xc7fb[21]]= function(_0x734fx9,_0x734fxa){return MailAccount[_0xc7fb[40]](_0x734fx9[_0xc7fb[16]])[_0xc7fb[39]](function(_0x734fxc){return MailMessage[_0xc7fb[38]]({subject:_0x734fx9[_0xc7fb[22]]|| null,from:[_0x734fxc[_0xc7fb[23]]],to:_0x734fx9[_0xc7fb[24]][_0xc7fb[15]](_0xc7fb[14]),cc:_0x734fx9[_0xc7fb[25]]?_0x734fx9[_0xc7fb[25]][_0xc7fb[15]](_0xc7fb[14]):[],html:_0x734fx9[_0xc7fb[26]]?Mustache[_0xc7fb[34]](_0x734fx9[_0xc7fb[26]],_0x734fxa)[_0xc7fb[28]](/&/g,_0xc7fb[33])[_0xc7fb[28]](//g,_0xc7fb[31])[_0xc7fb[28]](/"/g,_0xc7fb[30])[_0xc7fb[28]](/'/g,_0xc7fb[29])[_0xc7fb[28]](/\n/g,_0xc7fb[27]):null,status:_0xc7fb[35],auto:true,accountId:_0x734fxc[_0xc7fb[36]],accountName:_0x734fxc[_0xc7fb[37]]})})[_0xc7fb[13]](function(_0x734fxb){console[_0xc7fb[12]](_0x734fxb)})};Sms[_0xc7fb[11]][_0xc7fb[41]]= function(_0x734fx9,_0x734fxa){var _0x734fxd;return MailAccount[_0xc7fb[40]](_0x734fx9[_0xc7fb[16]])[_0xc7fb[39]](function(_0x734fxc){_0x734fxd= _0x734fxc;return Template[_0xc7fb[40]](_0x734fx9[_0xc7fb[24]])})[_0xc7fb[39]](function(_0x734fxe){return MailMessage[_0xc7fb[38]]({status:_0xc7fb[35],subject:_0x734fxe[_0xc7fb[42]],from:[_0x734fxd[_0xc7fb[23]]],to:_0x734fx9[_0xc7fb[25]][_0xc7fb[15]](_0xc7fb[14]),html:_0x734fxe[_0xc7fb[43]]?Mustache[_0xc7fb[34]](_0x734fxe[_0xc7fb[43]],_0x734fxa):null,auto:true,accountId:_0x734fxd[_0xc7fb[36]],accountName:_0x734fxd[_0xc7fb[37]]})[_0xc7fb[13]](function(_0x734fxb){console[_0xc7fb[9]](_0x734fxb)})})};module[_0xc7fb[44]]= Sms \ No newline at end of file diff --git a/server/config/triggers/urlForward.js b/server/config/triggers/urlForward.js index 5852a31..d7c6b9c 100644 --- a/server/config/triggers/urlForward.js +++ b/server/config/triggers/urlForward.js @@ -1,48 +1 @@ -var _ = require('lodash'); -var rp = require('request-promise'); -var Mustache = require('mustache'); - -function UrlForward() { - console.log('Trigger URL Forward Initialization...'); -} - -UrlForward.prototype.sendRequest = function(doc, channel, action, variables) { - switch (action.data1) { - case 'GET': - case 'POST': - httpRequest(doc, channel, action.data1, Mustache.render(action.data2, variables)); - break; - default: - } -} - -function httpRequest(doc, channel, method, uri) { - var ReportIntegration = require('../../models').ReportIntegration; - var options = { - method: method, - uri: uri, - body: doc, - json: true // Automatically stringifies the body to JSON - }; - - rp(options) - .then(function(parsedBody) { - console.log('URL Forward successful!'); - doc.exitStatus = "success"; - }) - .catch(function(err) { - console.error('URL Forward failed!'); //error to be written on log files - doc.exitStatus = "failed"; - }) - .finally(function() { - delete doc.id - doc.integration = 'urlForward'; - doc.eventChannel = channel; - return ReportIntegration.create(doc) - .catch(function(err) { - console.log(err); - }); - }); -} - -module.exports = UrlForward; +var _0x37e7=["\x6C\x6F\x64\x61\x73\x68","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x6D\x75\x73\x74\x61\x63\x68\x65","\x54\x72\x69\x67\x67\x65\x72\x20\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x73\x65\x6E\x64\x52\x65\x71\x75\x65\x73\x74","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x47\x45\x54","\x64\x61\x74\x61\x31","\x64\x61\x74\x61\x32","\x72\x65\x6E\x64\x65\x72","\x50\x4F\x53\x54","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x69\x64","\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x75\x72\x6C\x46\x6F\x72\x77\x61\x72\x64","\x65\x76\x65\x6E\x74\x43\x68\x61\x6E\x6E\x65\x6C","\x63\x61\x74\x63\x68","\x63\x72\x65\x61\x74\x65","\x66\x69\x6E\x61\x6C\x6C\x79","\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x20\x66\x61\x69\x6C\x65\x64\x21","\x65\x72\x72\x6F\x72","\x65\x78\x69\x74\x53\x74\x61\x74\x75\x73","\x66\x61\x69\x6C\x65\x64","\x55\x52\x4C\x20\x46\x6F\x72\x77\x61\x72\x64\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x21","\x73\x75\x63\x63\x65\x73\x73","\x74\x68\x65\x6E","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0x37e7[0]);var rp=require(_0x37e7[1]);var Mustache=require(_0x37e7[2]);function UrlForward(){console[_0x37e7[4]](_0x37e7[3])}UrlForward[_0x37e7[6]][_0x37e7[5]]= function(_0x1cc7x5,_0x1cc7x6,_0x1cc7x7,_0x1cc7x8){switch(_0x1cc7x7[_0x37e7[8]]){case _0x37e7[7]:;case _0x37e7[11]:httpRequest(_0x1cc7x5,_0x1cc7x6,_0x1cc7x7[_0x37e7[8]],Mustache[_0x37e7[10]](_0x1cc7x7[_0x37e7[9]],_0x1cc7x8));break;default:}};function httpRequest(_0x1cc7x5,_0x1cc7x6,_0x1cc7xa,_0x1cc7xb){var _0x1cc7xc=require(_0x37e7[13])[_0x37e7[12]];var _0x1cc7xd={method:_0x1cc7xa,uri:_0x1cc7xb,body:_0x1cc7x5,json:true};rp(_0x1cc7xd)[_0x37e7[27]](function(_0x1cc7xf){console[_0x37e7[4]](_0x37e7[25]);_0x1cc7x5[_0x37e7[23]]= _0x37e7[26]})[_0x37e7[18]](function(_0x1cc7xe){console[_0x37e7[22]](_0x37e7[21]);_0x1cc7x5[_0x37e7[23]]= _0x37e7[24]})[_0x37e7[20]](function(){delete _0x1cc7x5[_0x37e7[14]];_0x1cc7x5[_0x37e7[15]]= _0x37e7[16];_0x1cc7x5[_0x37e7[17]]= _0x1cc7x6;return _0x1cc7xc[_0x37e7[19]](_0x1cc7x5)[_0x37e7[18]](function(_0x1cc7xe){console[_0x37e7[4]](_0x1cc7xe)})})}module[_0x37e7[28]]= UrlForward \ No newline at end of file diff --git a/server/config/triggers/util.js b/server/config/triggers/util.js index 1bff931..f5e4273 100644 --- a/server/config/triggers/util.js +++ b/server/config/triggers/util.js @@ -1,118 +1 @@ -'use strict'; - -var _ = require('lodash'); - -function Util() { - console.log('Trigger Utils Initialization...'); -} - -Util.prototype.getActionsByTriggers = function(doc, triggers) { - var actions = []; - doc = doc.datavalues || doc; //in case I forgot something - doc.from = doc.from ? doc.from.split(';') : []; - doc.cc = doc.cc ? doc.cc.split(';') : []; - doc.to = doc.to ? doc.to.split(';') : []; - triggers.forEach(function(trigger) { - if (trigger.status) { - var All = []; - var Any = []; - trigger.All.forEach(function(condition) { - All.push(checkCondition(condition || condition, doc)); - }); - trigger.Any.forEach(function(condition) { - Any.push(checkCondition(condition || condition, doc)); - }); - - var allResult = [], - anyResult = []; - allResult.push(_.reduce(All.length ? All : [true], function(total, n) { - return total && n; - })); - anyResult.push(_.reduce(Any.length ? Any : [true], function(total, n) { - return total || n; - })); - var lastResults = allResult.concat(anyResult); - var finalResult = _.reduce(lastResults.length ? lastResults : [true], function(total, n) { - return total && n; - }) - // console.log('final result is', finalResult); - - if (finalResult) { - //push rules into array to return - actions = actions.concat(trigger.Actions); - } - } - }); - doc.from = doc.from.join(';'); - doc.cc = doc.cc.join(';'); - doc.to = doc.to.join(';'); - //return actions array - return actions; -} - -function checkCondition(condition, doc) { - - // console.log('CONDITION', condition); - // console.log('DOC FIELD', doc[condition.field]); - // console.log('trigger value ', trigger[rule.field.value]); - // console.log('rule data ', rule.data); - var result = false; - var i = 0; - - if (doc[condition.field]) { - switch (condition.operator) { - case 'equals': - result = (doc[condition.field] == condition.value); - break; - case 'not_equals': - result = (doc[condition.field] != condition.value); - break; - case 'contains': - result = false; - - if (_.isArray(doc[condition.field])) { - for (i = 0; i < doc[condition.field].length; i++) { - if (doc[condition.field][i].includes(condition.value)) { - result = true; - break; - } - } - } else { - result = doc[condition.field].includes(condition.value); - } - - break; - case 'not_contains': - result = true; - - if (_.isArray(doc[condition.field])) { - for (i = 0; i < doc[condition.field].length; i++) { - if (doc[condition.field][i].includes(condition.value)) { - result = false; - break; - } - } - } else { - result = !(doc[condition.field].includes(condition.value)); - } - - break; - case 'greater_or_equal': - result = (doc[condition.field] >= Number(condition.value)); - break; - case 'less_or_equal': - result = (doc[condition.field] <= Number(condition.value)); - break; - case 'greater': - result = (doc[condition.field] > Number(condition.value)); - break; - case 'less': - result = (doc[condition.field] < Number(condition.value)); - break; - default: - } - } - return result; -} - -module.exports = Util; +var _0xcd12=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x54\x72\x69\x67\x67\x65\x72\x20\x55\x74\x69\x6C\x73\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x67\x65\x74\x41\x63\x74\x69\x6F\x6E\x73\x42\x79\x54\x72\x69\x67\x67\x65\x72\x73","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x64\x61\x74\x61\x76\x61\x6C\x75\x65\x73","\x66\x72\x6F\x6D","\x3B","\x73\x70\x6C\x69\x74","\x63\x63","\x74\x6F","\x73\x74\x61\x74\x75\x73","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x41\x6C\x6C","\x41\x6E\x79","\x6C\x65\x6E\x67\x74\x68","\x72\x65\x64\x75\x63\x65","\x63\x6F\x6E\x63\x61\x74","\x6A\x6F\x69\x6E","\x66\x69\x65\x6C\x64","\x76\x61\x6C\x75\x65","\x65\x71\x75\x61\x6C\x73","\x6E\x6F\x74\x5F\x65\x71\x75\x61\x6C\x73","\x69\x73\x41\x72\x72\x61\x79","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x6E\x6F\x74\x5F\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x67\x72\x65\x61\x74\x65\x72\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x6C\x65\x73\x73\x5F\x6F\x72\x5F\x65\x71\x75\x61\x6C","\x67\x72\x65\x61\x74\x65\x72","\x6C\x65\x73\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x65\x78\x70\x6F\x72\x74\x73"];_0xcd12[0];var _=require(_0xcd12[1]);function Util(){console[_0xcd12[3]](_0xcd12[2])}Util[_0xcd12[5]][_0xcd12[4]]= function(_0x4179x3,_0x4179x4){var _0x4179x5=[];_0x4179x3= _0x4179x3[_0xcd12[6]]|| _0x4179x3;_0x4179x3[_0xcd12[7]]= _0x4179x3[_0xcd12[7]]?_0x4179x3[_0xcd12[7]][_0xcd12[9]](_0xcd12[8]):[];_0x4179x3[_0xcd12[10]]= _0x4179x3[_0xcd12[10]]?_0x4179x3[_0xcd12[10]][_0xcd12[9]](_0xcd12[8]):[];_0x4179x3[_0xcd12[11]]= _0x4179x3[_0xcd12[11]]?_0x4179x3[_0xcd12[11]][_0xcd12[9]](_0xcd12[8]):[];_0x4179x4[_0xcd12[14]](function(_0x4179x6){if(_0x4179x6[_0xcd12[12]]){var _0x4179x7=[];var _0x4179x8=[];_0x4179x6[_0xcd12[15]][_0xcd12[14]](function(_0x4179x9){_0x4179x7[_0xcd12[13]](checkCondition(_0x4179x9|| _0x4179x9,_0x4179x3))});_0x4179x6[_0xcd12[16]][_0xcd12[14]](function(_0x4179x9){_0x4179x8[_0xcd12[13]](checkCondition(_0x4179x9|| _0x4179x9,_0x4179x3))});var _0x4179xa=[],_0x4179xb=[];_0x4179xa[_0xcd12[13]](_[_0xcd12[18]](_0x4179x7[_0xcd12[17]]?_0x4179x7:[true],function(_0x4179xc,_0x4179xd){return _0x4179xc&& _0x4179xd}));_0x4179xb[_0xcd12[13]](_[_0xcd12[18]](_0x4179x8[_0xcd12[17]]?_0x4179x8:[true],function(_0x4179xc,_0x4179xd){return _0x4179xc|| _0x4179xd}));var _0x4179xe=_0x4179xa[_0xcd12[19]](_0x4179xb);var _0x4179xf=_[_0xcd12[18]](_0x4179xe[_0xcd12[17]]?_0x4179xe:[true],function(_0x4179xc,_0x4179xd){return _0x4179xc&& _0x4179xd});if(_0x4179xf){_0x4179x5= _0x4179x5[_0xcd12[19]](_0x4179x6.Actions)}}});_0x4179x3[_0xcd12[7]]= _0x4179x3[_0xcd12[7]][_0xcd12[20]](_0xcd12[8]);_0x4179x3[_0xcd12[10]]= _0x4179x3[_0xcd12[10]][_0xcd12[20]](_0xcd12[8]);_0x4179x3[_0xcd12[11]]= _0x4179x3[_0xcd12[11]][_0xcd12[20]](_0xcd12[8]);return _0x4179x5};function checkCondition(_0x4179x9,_0x4179x3){var _0x4179x11=false;var _0x4179x12=0;if(_0x4179x3[_0x4179x9[_0xcd12[21]]]){switch(_0x4179x9[_0xcd12[33]]){case _0xcd12[23]:_0x4179x11= (_0x4179x3[_0x4179x9[_0xcd12[21]]]== _0x4179x9[_0xcd12[22]]);break;case _0xcd12[24]:_0x4179x11= (_0x4179x3[_0x4179x9[_0xcd12[21]]]!= _0x4179x9[_0xcd12[22]]);break;case _0xcd12[27]:_0x4179x11= false;if(_[_0xcd12[25]](_0x4179x3[_0x4179x9[_0xcd12[21]]])){for(_0x4179x12= 0;_0x4179x12< _0x4179x3[_0x4179x9[_0xcd12[21]]][_0xcd12[17]];_0x4179x12++){if(_0x4179x3[_0x4179x9[_0xcd12[21]]][_0x4179x12][_0xcd12[26]](_0x4179x9[_0xcd12[22]])){_0x4179x11= true;break}}}else {_0x4179x11= _0x4179x3[_0x4179x9[_0xcd12[21]]][_0xcd12[26]](_0x4179x9[_0xcd12[22]])};break;case _0xcd12[28]:_0x4179x11= true;if(_[_0xcd12[25]](_0x4179x3[_0x4179x9[_0xcd12[21]]])){for(_0x4179x12= 0;_0x4179x12< _0x4179x3[_0x4179x9[_0xcd12[21]]][_0xcd12[17]];_0x4179x12++){if(_0x4179x3[_0x4179x9[_0xcd12[21]]][_0x4179x12][_0xcd12[26]](_0x4179x9[_0xcd12[22]])){_0x4179x11= false;break}}}else {_0x4179x11= !(_0x4179x3[_0x4179x9[_0xcd12[21]]][_0xcd12[26]](_0x4179x9[_0xcd12[22]]))};break;case _0xcd12[29]:_0x4179x11= (_0x4179x3[_0x4179x9[_0xcd12[21]]]>= Number(_0x4179x9[_0xcd12[22]]));break;case _0xcd12[30]:_0x4179x11= (_0x4179x3[_0x4179x9[_0xcd12[21]]]<= Number(_0x4179x9[_0xcd12[22]]));break;case _0xcd12[31]:_0x4179x11= (_0x4179x3[_0x4179x9[_0xcd12[21]]]> Number(_0x4179x9[_0xcd12[22]]));break;case _0xcd12[32]:_0x4179x11= (_0x4179x3[_0x4179x9[_0xcd12[21]]]< Number(_0x4179x9[_0xcd12[22]]));break;default:}};return _0x4179x11}module[_0xcd12[34]]= Util \ No newline at end of file diff --git a/server/config/triggers/voice.js b/server/config/triggers/voice.js index 2465c50..828df95 100644 --- a/server/config/triggers/voice.js +++ b/server/config/triggers/voice.js @@ -1,7 +1 @@ -var _ = require('lodash'); - -function Voice() { - console.log('Trigger Voice Initialization...'); -} - -module.exports = Voice; +var _0x10fe=["\x6C\x6F\x64\x61\x73\x68","\x54\x72\x69\x67\x67\x65\x72\x20\x56\x6F\x69\x63\x65\x20\x49\x6E\x69\x74\x69\x61\x6C\x69\x7A\x61\x74\x69\x6F\x6E\x2E\x2E\x2E","\x6C\x6F\x67","\x65\x78\x70\x6F\x72\x74\x73"];var _=require(_0x10fe[0]);function Voice(){console[_0x10fe[2]](_0x10fe[1])}module[_0x10fe[3]]= Voice \ No newline at end of file diff --git a/server/config/util/error.js b/server/config/util/error.js index e265f76..bb3dd0b 100644 --- a/server/config/util/error.js +++ b/server/config/util/error.js @@ -1,24 +1 @@ -'use strict'; - -var util = require('util'); - -module.exports = { - handleUniqueConstraintError: function(res, err) { - var paths = []; - - err.errors.forEach(function(error) { - switch (error.path) { - default: paths.push(error.path); - } - }); - - paths.push(' must be unique'); - err.message = paths.join(); - - return res.status(500).send(err); - }, - handleForeignKeyConstraintError: function(res, app, name, err) { - err.message = util.format('Impossible to remove %s %s because of an existing association', app, name); - return res.status(500).send(err); - } -}; +var _0xba59=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x65\x78\x70\x6F\x72\x74\x73","\x70\x61\x74\x68","\x70\x75\x73\x68","\x66\x6F\x72\x45\x61\x63\x68","\x65\x72\x72\x6F\x72\x73","\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x75\x6E\x69\x71\x75\x65","\x6D\x65\x73\x73\x61\x67\x65","\x6A\x6F\x69\x6E","\x73\x65\x6E\x64","\x73\x74\x61\x74\x75\x73","\x49\x6D\x70\x6F\x73\x73\x69\x62\x6C\x65\x20\x74\x6F\x20\x72\x65\x6D\x6F\x76\x65\x20\x25\x73\x20\x25\x73\x20\x62\x65\x63\x61\x75\x73\x65\x20\x6F\x66\x20\x61\x6E\x20\x65\x78\x69\x73\x74\x69\x6E\x67\x20\x61\x73\x73\x6F\x63\x69\x61\x74\x69\x6F\x6E","\x66\x6F\x72\x6D\x61\x74"];_0xba59[0];var util=require(_0xba59[1]);module[_0xba59[2]]= {handleUniqueConstraintError:function(_0xb75fx2,_0xb75fx3){var _0xb75fx4=[];_0xb75fx3[_0xba59[6]][_0xba59[5]](function(_0xb75fx5){switch(_0xb75fx5[_0xba59[3]]){default:_0xb75fx4[_0xba59[4]](_0xb75fx5[_0xba59[3]])}});_0xb75fx4[_0xba59[4]](_0xba59[7]);_0xb75fx3[_0xba59[8]]= _0xb75fx4[_0xba59[9]]();return _0xb75fx2[_0xba59[11]](500)[_0xba59[10]](_0xb75fx3)},handleForeignKeyConstraintError:function(_0xb75fx2,_0xb75fx6,_0xb75fx7,_0xb75fx3){_0xb75fx3[_0xba59[8]]= util[_0xba59[13]](_0xba59[12],_0xb75fx6,_0xb75fx7);return _0xb75fx2[_0xba59[11]](500)[_0xba59[10]](_0xb75fx3)}} \ No newline at end of file diff --git a/server/config/util/index.js b/server/config/util/index.js index 5a2ccc7..142ff7f 100644 --- a/server/config/util/index.js +++ b/server/config/util/index.js @@ -1,621 +1 @@ -'use strict'; - -var _ = require('lodash'); -var moment = require('moment'); -var request = require('request-promise'); - -var User = require('../../models').User; -var VoiceQueue = require('../../models').VoiceQueue; -var ChatQueue = require('../../models').ChatQueue; -var MailQueue = require('../../models').MailQueue; -var FaxQueue = require('../../models').FaxQueue; -var SmsQueue = require('../../models').SmsQueue; -var OpenchannelQueue = require('../../models').OpenchannelQueue; -var Action = require('../../models').Action; - -var checkInterval = function(interval) { - - var daysOfWeek = ['sun', 'mon', 'tue', 'wed', 'thu', 'fri', 'sat']; - var daysOfMonth = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]; - var months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec']; - var i, shift; - - var tRange = interval.split(',')[0]; - var dwRange = interval.split(',')[1]; - var dmRange = interval.split(',')[2]; - var mRange = interval.split(',')[3]; - // TIME RANGE CHECKING - if (tRange !== '*') { - var time = moment().format("HH:mm"); - var tFrom = tRange.split('-')[0]; - var tTo = tRange.split('-')[1]; - - if ((time < tFrom) || (time > tTo)) { - console.log('TRANGE KO'); - return false; - } - } - // DAYS OF WEEK RANGE CHECKING - if (dwRange !== '*') { - var cWeekDay = daysOfWeek[moment().day()]; - var dwFrom = _.indexOf(daysOfWeek, dwRange.split('-')[0]); - var dwTo = _.indexOf(daysOfWeek, dwRange.split('-')[1]); - - for (i = 0; i < dwFrom; i++) { - shift = daysOfWeek.shift(); - daysOfWeek.push(shift); - } - - dwFrom = _.indexOf(daysOfWeek, dwRange.split('-')[0]); - dwTo = _.indexOf(daysOfWeek, dwRange.split('-')[1]) + 1; - - daysOfWeek = daysOfWeek.slice(dwFrom, dwTo); - - if (!_.includes(daysOfWeek, cWeekDay)) { - console.log('DWRANGE KO'); - return false; - } - } - // DAYS OF MONTH RANGE CHECKING - if (dmRange !== '*') { - var cMonthDay = moment().date(); - var dmFrom = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[0], 10)); - var dmTo = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[1])); - - for (i = 0; i < dmFrom; i++) { - shift = daysOfMonth.shift(); - daysOfMonth.push(shift); - } - - dmFrom = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[0], 10)); - dmTo = _.indexOf(daysOfMonth, parseInt(dmRange.split('-')[1]), 10) + 1; - - daysOfMonth = daysOfMonth.slice(dmFrom, dmTo); - - if (!_.includes(daysOfMonth, cMonthDay)) { - console.log('DMRANGE KO'); - return false; - } - } - // MONTHS RANGE CHECKING - if (mRange !== '*') { - var cMonth = months[moment().month()]; - var mFrom = _.indexOf(months, mRange.split('-')[0]); - var mTo = _.indexOf(months, mRange.split('-')[1]); - - for (i = 0; i < mFrom; i++) { - shift = months.shift(); - months.push(shift); - } - - mFrom = _.indexOf(months, mRange.split('-')[0]); - mTo = _.indexOf(months, mRange.split('-')[1]) + 1; - - months = months.slice(mFrom, mTo); - - if (!_.includes(months, cMonth)) { - console.log('MRANGE KO'); - return false; - } - } - - console.log('INTERVAL OK'); - - return true; -} - -var isValidInterval = function(interval) { - if (_.isObject(interval)) { - for (var i = 0; i < interval.SubIntervals.length; i++) { - if (!checkInterval(interval.SubIntervals[i].interval)) { - return false; - } - } - return true; - } else { - return checkInterval(interval); - } -} - -var getDate = function(dateString, when) { - var dateTimeFormat = 'YYYY-MM-DD HH:mm'; - if (moment(dateString, dateTimeFormat, true).isValid()) { - return moment(dateString); - } else { - switch (when) { - case 'dayStart': - return moment(dateString).startOf('day'); - case 'dayEnd': - return moment(dateString).endOf('day'); - default: - return moment(dateString); - } - } -} - -var getQuery = function(query, extraWhere) { - var _query = { - where: {} - }; - - if (query) { - var realKey, condition = {}; - for (var key in query) { //DO NOT change with lodash forEach, or the properties will not be removed from the query object! - if (_.includes(key, '_uiFrom')) { - realKey = key.replace('_uiFrom', ''); - if (query[realKey + '_uiTo']) { - _query.where.$and = _query.where.$and || []; - condition = {}; - condition[realKey] = { - $gte: getDate(query[key], 'dayStart') - }; - _query.where.$and.push(condition); - condition = {}; - condition[realKey] = { - $lte: getDate(query[realKey + '_uiTo'], 'dayEnd') - }; - _query.where.$and.push(condition); - delete query[realKey + '_uiTo']; - } else { - _query.where[key.replace('_uiFrom', '')] = { - $gte: getDate(query[key], 'dayStart') - }; - } - delete query[key]; - } else if (_.includes(key, '_uiTo')) { - realKey = key.replace('_uiTo', ''); - if (query[realKey + '_uiFrom']) { - _query.where.$and = _query.where.$and || []; - condition = {}; - condition[realKey] = { - $lte: getDate(query[key], 'dayEnd') - }; - _query.where.$and.push(condition); - condition[realKey] = { - $gte: getDate(query[realKey + '_uiFrom'], 'dayStart') - }; - _query.where.$and.push(condition); - delete query[realKey + '_uiFrom']; - } else { - _query.where[key.replace('_uiTo', '')] = { - $lte: getDate(query[key], 'dayEnd') - }; - } - delete query[key]; - } - } - - _.forEach(query, function(value, key) { - switch (key) { - case 'offset': - case 'limit': - _query[key] = Number(value); - break; - case 'order': - _query[key] = value; - break; - case 'type': - case 'parent': - _query.where[key] = value; - break; - default: - _query.where[key] = { - $like: '%' + value + '%' - }; - } - }); - } - - - - if (extraWhere) { - _.merge(_query.where, extraWhere); - } - - return _query; -} - -var getVoiceQueuesIdByUser = function(query, extraQuery) { //differently from the extraWhere, this will be merged with all the query options, not just the where. Useful for inclusions and other query options - return function(user) { - var _queues = []; - var _user = user; - var _query = query || {}; - var _extraQuery = extraQuery || {}; - - return _user - .getPVoiceQueues({ - attributes: ['name'] - }) - .then(function(queues) { - _queues = _.map(queues, 'name'); - }) - .then(function() { - return VoiceQueue - .findAndCountAll(_.merge(getQuery(query, { - name: { - $in: _queues - } - }), _extraQuery)); - }); - }; -} - -var getChatQueuesIdByUser = function(query, extraQuery) { - return function(user) { - var _queues = []; - var _user = user; - var _query = query || {}; - var _extraQuery = _.merge(extraQuery || {}, { - distinct: true - }); - - return _user - .getPChatQueues({ - attributes: ['id'] - }) - .then(function(queues) { - _queues = _.map(queues, 'id'); - }) - .then(function() { - return ChatQueue - .scope('default') - .findAndCountAll(_.merge(getQuery(_query, { - id: { - $in: _queues - } - }), _extraQuery)); - }); - }; -} - -var getMailQueuesIdByUser = function(query, extraQuery) { - return function(user) { - var _queues = []; - var _user = user; - var _query = query || {}; - var _extraQuery = _.merge(extraQuery || {}, { - distinct: true - }); - - return _user - .getPMailQueues({ - attributes: ['id'] - }) - .then(function(queues) { - _queues = _.map(queues, 'id'); - }) - .then(function() { - return MailQueue - .scope('default') - .findAndCountAll(_.merge(getQuery(_query, { - id: { - $in: _queues - } - }), _extraQuery)); - }); - }; -} -var getSmsQueuesIdByUser = function(query, extraQuery) { - return function(user) { - var _queues = []; - var _user = user; - var _query = query || {}; - var _extraQuery = _.merge(extraQuery || {}, { - distinct: true - }); - - return _user - .getPSmsQueues({ - attributes: ['id'] - }) - .then(function(queues) { - _queues = _.map(queues, 'id'); - }) - .then(function() { - return SmsQueue - .scope('default') - .findAndCountAll(_.merge(getQuery(_query, { - id: { - $in: _queues - } - }), _extraQuery)); - }); - }; -} - -var getFaxQueuesIdByUser = function(query, extraQuery) { - return function(user) { - var _queues = []; - var _user = user; - var _query = query || {}; - var _extraQuery = _.merge(extraQuery || {}, { - distinct: true - }); - - return _user - .getPFaxQueues({ - attributes: ['id'] - }) - .then(function(queues) { - _queues = _.map(queues, 'id'); - }) - .then(function() { - return FaxQueue - .scope('default') - .findAndCountAll(_.merge(getQuery(_query, { - id: { - $in: _queues - } - }), _extraQuery)); - }); - }; -} -var getOpenchannelQueuesIdByUser = function(query, extraQuery) { - return function(user) { - var _queues = []; - var _user = user; - var _query = query || {}; - var _extraQuery = _.merge(extraQuery || {}, { - distinct: true - }); - - return _user - .getPOpenchannelQueues({ - attributes: ['id'] - }) - .then(function(queues) { - _queues = _.map(queues, 'id'); - }) - .then(function() { - return OpenchannelQueue - .scope('default') - .findAndCountAll(_.merge(getQuery(_query, { - id: { - $in: _queues - } - }), _extraQuery)); - }); - }; -} -var getAgentsIdByUser = function(query) { - return function(user) { - var _users = []; - var _user = user; - var _query = query || {}; - var _voiceQueues = [], - _chatQueues = [], - _mailQueues = [], - _faxQueues = [], - _openchannelQueues = [], - _smsQueues = []; - - return _user - .getPVoiceQueues({ - attributes: ['name'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - }) - .then(function(queues) { - _voiceQueues = _.map(queues, 'name'); - queues.forEach(function(queue) { - _users = _.union(_users, _.map(queue.Users, 'id')); - }); - }) - .then(function() { - return _user - .getPChatQueues({ - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - }); - }) - .then(function(queues) { - _chatQueues = _.map(queues, 'id'); - queues.forEach(function(queue) { - _users = _.union(_users, _.map(queue.Users, 'id')); - }); - }) - .then(function() { - return _user - .getPMailQueues({ - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - }); - }) - .then(function(queues) { - _mailQueues = _.map(queues, 'id'); - queues.forEach(function(queue) { - _users = _.union(_users, _.map(queue.Users, 'id')); - }); - }) - .then(function() { - return _user - .getPFaxQueues({ - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - }); - }) - .then(function(queues) { - _faxQueues = _.map(queues, 'id'); - queues.forEach(function(queue) { - _users = _.union(_users, _.map(queue.Users, 'id')); - }); - }) - .then(function() { - return _user - .getPSmsQueues({ - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - }); - }) - .then(function(queues) { - _smsQueues = _.map(queues, 'id'); - queues.forEach(function(queue) { - _users = _.union(_users, _.map(queue.Users, 'id')); - }); - }) - .then(function() { - return _user - .getPOpenchannelQueues({ - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - }); - }) - .then(function(queues) { - _openchannelQueues = _.map(queues, 'id'); - queues.forEach(function(queue) { - _users = _.union(_users, _.map(queue.Users, 'id')); - }); - }) - .then(function() { - return User - .scope('agent', { - method: ['checkPauseStatus', _query] - }, { - method: ['checkQueueStatus', _query] - }, { - method: ['checkOnlineStatus', _query] - }, { - method: ['checkSipStatus', _query] - }) - .findAndCountAll(_.merge(getQuery(_query, { - id: { - $in: _users - } - }), { - include: [{ - model: VoiceQueue, - where: { - name: { - $in: _voiceQueues - } - }, - required: false - }, { - model: ChatQueue, - where: { - id: { - $in: _chatQueues - } - }, - required: false - }, { - model: MailQueue, - where: { - id: { - $in: _mailQueues - } - }, - required: false - }, { - model: FaxQueue, - where: { - id: { - $in: _faxQueues - } - }, - required: false - }, { - model: SmsQueue, - where: { - id: { - $in: _smsQueues - } - }, - required: false - }, { - model: OpenchannelQueue, - where: { - id: { - $in: _openchannelQueues - } - }, - required: false - }] - })); - }) - }; -} - -var stripTrailingSlash = function(str) { - if (str.substr(-1) === '/') { - return str.substr(0, str.length - 1); - } - return str; -} -var sendRequest = function(data, method, uri) { - if (method == 'GET' || method == 'POST') { - var options = { - method: method, - uri: uri, - body: data, - json: true // Automatically stringifies the body to JSON - }; - return request(options); - } else { - console.log('Unknown Method'); - } - } - // HANDLE action -var execAction = function(action, data) { - switch (action.action) { - case 'pause': - Action - .create({ - name: action.action, - data4: action.type || 'DEFAULT PAUSE' //to track the pause type in the actions table - }, { - body: { - name: action.action, - agent: data.memberid, - type: action.type || 'DEFAULT PAUSE', // to set the pauseType in the user record - } - }) - .then(function() { - console.log('Action Successful'); - }) - .catch(function(err) { - console.log('Action Failed', err); - }); - break; - default: - console.log('Unknown Action'); - } -} -module.exports = { - getQuery: getQuery, - getVoiceQueuesIdByUser: getVoiceQueuesIdByUser, - getChatQueuesIdByUser: getChatQueuesIdByUser, - getMailQueuesIdByUser: getMailQueuesIdByUser, - getFaxQueuesIdByUser: getFaxQueuesIdByUser, - getSmsQueuesIdByUser: getSmsQueuesIdByUser, - getOpenchannelQueuesIdByUser: getOpenchannelQueuesIdByUser, - getAgentsIdByUser: getAgentsIdByUser, - stripTrailingSlash: stripTrailingSlash, - isValidInterval: isValidInterval, - sendRequest: sendRequest, - execAction: execAction, - errorManager: require('./error') -}; +var _0x4635=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x6D\x6F\x6D\x65\x6E\x74","\x72\x65\x71\x75\x65\x73\x74\x2D\x70\x72\x6F\x6D\x69\x73\x65","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x43\x68\x61\x74\x51\x75\x65\x75\x65","\x4D\x61\x69\x6C\x51\x75\x65\x75\x65","\x46\x61\x78\x51\x75\x65\x75\x65","\x53\x6D\x73\x51\x75\x65\x75\x65","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65","\x41\x63\x74\x69\x6F\x6E","\x73\x75\x6E","\x6D\x6F\x6E","\x74\x75\x65","\x77\x65\x64","\x74\x68\x75","\x66\x72\x69","\x73\x61\x74","\x6A\x61\x6E","\x66\x65\x62","\x6D\x61\x72","\x61\x70\x72","\x6D\x61\x79","\x6A\x75\x6E","\x6A\x75\x6C","\x61\x75\x67","\x73\x65\x70","\x6F\x63\x74","\x6E\x6F\x76","\x64\x65\x63","\x2C","\x73\x70\x6C\x69\x74","\x2A","\x48\x48\x3A\x6D\x6D","\x66\x6F\x72\x6D\x61\x74","\x2D","\x54\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x6C\x6F\x67","\x64\x61\x79","\x69\x6E\x64\x65\x78\x4F\x66","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x73\x6C\x69\x63\x65","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x44\x57\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x64\x61\x74\x65","\x44\x4D\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x6D\x6F\x6E\x74\x68","\x4D\x52\x41\x4E\x47\x45\x20\x4B\x4F","\x49\x4E\x54\x45\x52\x56\x41\x4C\x20\x4F\x4B","\x69\x73\x4F\x62\x6A\x65\x63\x74","\x6C\x65\x6E\x67\x74\x68","\x53\x75\x62\x49\x6E\x74\x65\x72\x76\x61\x6C\x73","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x69\x73\x56\x61\x6C\x69\x64","\x73\x74\x61\x72\x74\x4F\x66","\x64\x61\x79\x53\x74\x61\x72\x74","\x65\x6E\x64\x4F\x66","\x64\x61\x79\x45\x6E\x64","\x5F\x75\x69\x46\x72\x6F\x6D","","\x72\x65\x70\x6C\x61\x63\x65","\x5F\x75\x69\x54\x6F","\x24\x61\x6E\x64","\x77\x68\x65\x72\x65","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x6F\x72\x64\x65\x72","\x74\x79\x70\x65","\x70\x61\x72\x65\x6E\x74","\x25","\x66\x6F\x72\x45\x61\x63\x68","\x6D\x65\x72\x67\x65","\x66\x69\x6E\x64\x41\x6E\x64\x43\x6F\x75\x6E\x74\x41\x6C\x6C","\x74\x68\x65\x6E","\x6E\x61\x6D\x65","\x6D\x61\x70","\x67\x65\x74\x50\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x73\x63\x6F\x70\x65","\x69\x64","\x67\x65\x74\x50\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x53\x6D\x73\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x46\x61\x78\x51\x75\x65\x75\x65\x73","\x67\x65\x74\x50\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73","\x61\x67\x65\x6E\x74","\x63\x68\x65\x63\x6B\x50\x61\x75\x73\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x51\x75\x65\x75\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x4F\x6E\x6C\x69\x6E\x65\x53\x74\x61\x74\x75\x73","\x63\x68\x65\x63\x6B\x53\x69\x70\x53\x74\x61\x74\x75\x73","\x75\x6E\x69\x6F\x6E","\x73\x75\x62\x73\x74\x72","\x2F","\x47\x45\x54","\x50\x4F\x53\x54","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x4D\x65\x74\x68\x6F\x64","\x41\x63\x74\x69\x6F\x6E\x20\x46\x61\x69\x6C\x65\x64","\x63\x61\x74\x63\x68","\x41\x63\x74\x69\x6F\x6E\x20\x53\x75\x63\x63\x65\x73\x73\x66\x75\x6C","\x61\x63\x74\x69\x6F\x6E","\x44\x45\x46\x41\x55\x4C\x54\x20\x50\x41\x55\x53\x45","\x6D\x65\x6D\x62\x65\x72\x69\x64","\x63\x72\x65\x61\x74\x65","\x70\x61\x75\x73\x65","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x41\x63\x74\x69\x6F\x6E","\x65\x78\x70\x6F\x72\x74\x73","\x2E\x2F\x65\x72\x72\x6F\x72"];_0x4635[0];var _=require(_0x4635[1]);var moment=require(_0x4635[2]);var request=require(_0x4635[3]);var User=require(_0x4635[5])[_0x4635[4]];var VoiceQueue=require(_0x4635[5])[_0x4635[6]];var ChatQueue=require(_0x4635[5])[_0x4635[7]];var MailQueue=require(_0x4635[5])[_0x4635[8]];var FaxQueue=require(_0x4635[5])[_0x4635[9]];var SmsQueue=require(_0x4635[5])[_0x4635[10]];var OpenchannelQueue=require(_0x4635[5])[_0x4635[11]];var Action=require(_0x4635[5])[_0x4635[12]];var checkInterval=function(_0x5d7axd){var _0x5d7axe=[_0x4635[13],_0x4635[14],_0x4635[15],_0x4635[16],_0x4635[17],_0x4635[18],_0x4635[19]];var _0x5d7axf=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31];var _0x5d7ax10=[_0x4635[20],_0x4635[21],_0x4635[22],_0x4635[23],_0x4635[24],_0x4635[25],_0x4635[26],_0x4635[27],_0x4635[28],_0x4635[29],_0x4635[30],_0x4635[31]];var _0x5d7ax11,_0x5d7ax12;var _0x5d7ax13=_0x5d7axd[_0x4635[33]](_0x4635[32])[0];var _0x5d7ax14=_0x5d7axd[_0x4635[33]](_0x4635[32])[1];var _0x5d7ax15=_0x5d7axd[_0x4635[33]](_0x4635[32])[2];var _0x5d7ax16=_0x5d7axd[_0x4635[33]](_0x4635[32])[3];if(_0x5d7ax13!== _0x4635[34]){var _0x5d7ax17=moment()[_0x4635[36]](_0x4635[35]);var _0x5d7ax18=_0x5d7ax13[_0x4635[33]](_0x4635[37])[0];var _0x5d7ax19=_0x5d7ax13[_0x4635[33]](_0x4635[37])[1];if((_0x5d7ax17< _0x5d7ax18)|| (_0x5d7ax17> _0x5d7ax19)){console[_0x4635[39]](_0x4635[38]);return false}};if(_0x5d7ax14!== _0x4635[34]){var _0x5d7ax1a=_0x5d7axe[moment()[_0x4635[40]]()];var _0x5d7ax1b=_[_0x4635[41]](_0x5d7axe,_0x5d7ax14[_0x4635[33]](_0x4635[37])[0]);var _0x5d7ax1c=_[_0x4635[41]](_0x5d7axe,_0x5d7ax14[_0x4635[33]](_0x4635[37])[1]);for(_0x5d7ax11= 0;_0x5d7ax11< _0x5d7ax1b;_0x5d7ax11++){_0x5d7ax12= _0x5d7axe[_0x4635[42]]();_0x5d7axe[_0x4635[43]](_0x5d7ax12)};_0x5d7ax1b= _[_0x4635[41]](_0x5d7axe,_0x5d7ax14[_0x4635[33]](_0x4635[37])[0]);_0x5d7ax1c= _[_0x4635[41]](_0x5d7axe,_0x5d7ax14[_0x4635[33]](_0x4635[37])[1])+ 1;_0x5d7axe= _0x5d7axe[_0x4635[44]](_0x5d7ax1b,_0x5d7ax1c);if(!_[_0x4635[45]](_0x5d7axe,_0x5d7ax1a)){console[_0x4635[39]](_0x4635[46]);return false}};if(_0x5d7ax15!== _0x4635[34]){var _0x5d7ax1d=moment()[_0x4635[47]]();var _0x5d7ax1e=_[_0x4635[41]](_0x5d7axf,parseInt(_0x5d7ax15[_0x4635[33]](_0x4635[37])[0],10));var _0x5d7ax1f=_[_0x4635[41]](_0x5d7axf,parseInt(_0x5d7ax15[_0x4635[33]](_0x4635[37])[1]));for(_0x5d7ax11= 0;_0x5d7ax11< _0x5d7ax1e;_0x5d7ax11++){_0x5d7ax12= _0x5d7axf[_0x4635[42]]();_0x5d7axf[_0x4635[43]](_0x5d7ax12)};_0x5d7ax1e= _[_0x4635[41]](_0x5d7axf,parseInt(_0x5d7ax15[_0x4635[33]](_0x4635[37])[0],10));_0x5d7ax1f= _[_0x4635[41]](_0x5d7axf,parseInt(_0x5d7ax15[_0x4635[33]](_0x4635[37])[1]),10)+ 1;_0x5d7axf= _0x5d7axf[_0x4635[44]](_0x5d7ax1e,_0x5d7ax1f);if(!_[_0x4635[45]](_0x5d7axf,_0x5d7ax1d)){console[_0x4635[39]](_0x4635[48]);return false}};if(_0x5d7ax16!== _0x4635[34]){var _0x5d7ax20=_0x5d7ax10[moment()[_0x4635[49]]()];var _0x5d7ax21=_[_0x4635[41]](_0x5d7ax10,_0x5d7ax16[_0x4635[33]](_0x4635[37])[0]);var _0x5d7ax22=_[_0x4635[41]](_0x5d7ax10,_0x5d7ax16[_0x4635[33]](_0x4635[37])[1]);for(_0x5d7ax11= 0;_0x5d7ax11< _0x5d7ax21;_0x5d7ax11++){_0x5d7ax12= _0x5d7ax10[_0x4635[42]]();_0x5d7ax10[_0x4635[43]](_0x5d7ax12)};_0x5d7ax21= _[_0x4635[41]](_0x5d7ax10,_0x5d7ax16[_0x4635[33]](_0x4635[37])[0]);_0x5d7ax22= _[_0x4635[41]](_0x5d7ax10,_0x5d7ax16[_0x4635[33]](_0x4635[37])[1])+ 1;_0x5d7ax10= _0x5d7ax10[_0x4635[44]](_0x5d7ax21,_0x5d7ax22);if(!_[_0x4635[45]](_0x5d7ax10,_0x5d7ax20)){console[_0x4635[39]](_0x4635[50]);return false}};console[_0x4635[39]](_0x4635[51]);return true};var isValidInterval=function(_0x5d7axd){if(_[_0x4635[52]](_0x5d7axd)){for(var _0x5d7ax11=0;_0x5d7ax11< _0x5d7axd[_0x4635[54]][_0x4635[53]];_0x5d7ax11++){if(!checkInterval(_0x5d7axd[_0x4635[54]][_0x5d7ax11][_0x4635[55]])){return false}};return true}else {return checkInterval(_0x5d7axd)}};var getDate=function(_0x5d7ax25,_0x5d7ax26){var _0x5d7ax27=_0x4635[56];if(moment(_0x5d7ax25,_0x5d7ax27,true)[_0x4635[57]]()){return moment(_0x5d7ax25)}else {switch(_0x5d7ax26){case _0x4635[59]:return moment(_0x5d7ax25)[_0x4635[58]](_0x4635[40]);case _0x4635[61]:return moment(_0x5d7ax25)[_0x4635[60]](_0x4635[40]);default:return moment(_0x5d7ax25)}}};var getQuery=function(_0x5d7ax29,_0x5d7ax2a){var _0x5d7ax2b={where:{}};if(_0x5d7ax29){var _0x5d7ax2c,_0x5d7ax2d={};for(var _0x5d7ax2e in _0x5d7ax29){if(_[_0x4635[45]](_0x5d7ax2e,_0x4635[62])){_0x5d7ax2c= _0x5d7ax2e[_0x4635[64]](_0x4635[62],_0x4635[63]);if(_0x5d7ax29[_0x5d7ax2c+ _0x4635[65]]){_0x5d7ax2b[_0x4635[67]][_0x4635[66]]= _0x5d7ax2b[_0x4635[67]][_0x4635[66]]|| [];_0x5d7ax2d= {};_0x5d7ax2d[_0x5d7ax2c]= {$gte:getDate(_0x5d7ax29[_0x5d7ax2e],_0x4635[59])};_0x5d7ax2b[_0x4635[67]][_0x4635[66]][_0x4635[43]](_0x5d7ax2d);_0x5d7ax2d= {};_0x5d7ax2d[_0x5d7ax2c]= {$lte:getDate(_0x5d7ax29[_0x5d7ax2c+ _0x4635[65]],_0x4635[61])};_0x5d7ax2b[_0x4635[67]][_0x4635[66]][_0x4635[43]](_0x5d7ax2d);delete _0x5d7ax29[_0x5d7ax2c+ _0x4635[65]]}else {_0x5d7ax2b[_0x4635[67]][_0x5d7ax2e[_0x4635[64]](_0x4635[62],_0x4635[63])]= {$gte:getDate(_0x5d7ax29[_0x5d7ax2e],_0x4635[59])}};delete _0x5d7ax29[_0x5d7ax2e]}else {if(_[_0x4635[45]](_0x5d7ax2e,_0x4635[65])){_0x5d7ax2c= _0x5d7ax2e[_0x4635[64]](_0x4635[65],_0x4635[63]);if(_0x5d7ax29[_0x5d7ax2c+ _0x4635[62]]){_0x5d7ax2b[_0x4635[67]][_0x4635[66]]= _0x5d7ax2b[_0x4635[67]][_0x4635[66]]|| [];_0x5d7ax2d= {};_0x5d7ax2d[_0x5d7ax2c]= {$lte:getDate(_0x5d7ax29[_0x5d7ax2e],_0x4635[61])};_0x5d7ax2b[_0x4635[67]][_0x4635[66]][_0x4635[43]](_0x5d7ax2d);_0x5d7ax2d[_0x5d7ax2c]= {$gte:getDate(_0x5d7ax29[_0x5d7ax2c+ _0x4635[62]],_0x4635[59])};_0x5d7ax2b[_0x4635[67]][_0x4635[66]][_0x4635[43]](_0x5d7ax2d);delete _0x5d7ax29[_0x5d7ax2c+ _0x4635[62]]}else {_0x5d7ax2b[_0x4635[67]][_0x5d7ax2e[_0x4635[64]](_0x4635[65],_0x4635[63])]= {$lte:getDate(_0x5d7ax29[_0x5d7ax2e],_0x4635[61])}};delete _0x5d7ax29[_0x5d7ax2e]}}};_[_0x4635[74]](_0x5d7ax29,function(_0x5d7ax2f,_0x5d7ax2e){switch(_0x5d7ax2e){case _0x4635[68]:;case _0x4635[69]:_0x5d7ax2b[_0x5d7ax2e]= Number(_0x5d7ax2f);break;case _0x4635[70]:_0x5d7ax2b[_0x5d7ax2e]= _0x5d7ax2f;break;case _0x4635[71]:;case _0x4635[72]:_0x5d7ax2b[_0x4635[67]][_0x5d7ax2e]= _0x5d7ax2f;break;default:_0x5d7ax2b[_0x4635[67]][_0x5d7ax2e]= {$like:_0x4635[73]+ _0x5d7ax2f+ _0x4635[73]}}})};if(_0x5d7ax2a){_[_0x4635[75]](_0x5d7ax2b[_0x4635[67]],_0x5d7ax2a)};return _0x5d7ax2b};var getVoiceQueuesIdByUser=function(_0x5d7ax29,_0x5d7ax31){return function(_0x5d7ax32){var _0x5d7ax33=[];var _0x5d7ax34=_0x5d7ax32;var _0x5d7ax2b=_0x5d7ax29|| {};var _0x5d7ax35=_0x5d7ax31|| {};return _0x5d7ax34[_0x4635[80]]({attributes:[_0x4635[78]]})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax33= _[_0x4635[79]](_0x5d7ax36,_0x4635[78])})[_0x4635[77]](function(){return VoiceQueue[_0x4635[76]](_[_0x4635[75]](getQuery(_0x5d7ax29,{name:{$in:_0x5d7ax33}}),_0x5d7ax35))})}};var getChatQueuesIdByUser=function(_0x5d7ax29,_0x5d7ax31){return function(_0x5d7ax32){var _0x5d7ax33=[];var _0x5d7ax34=_0x5d7ax32;var _0x5d7ax2b=_0x5d7ax29|| {};var _0x5d7ax35=_[_0x4635[75]](_0x5d7ax31|| {},{distinct:true});return _0x5d7ax34[_0x4635[84]]({attributes:[_0x4635[83]]})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax33= _[_0x4635[79]](_0x5d7ax36,_0x4635[83])})[_0x4635[77]](function(){return ChatQueue[_0x4635[82]](_0x4635[81])[_0x4635[76]](_[_0x4635[75]](getQuery(_0x5d7ax2b,{id:{$in:_0x5d7ax33}}),_0x5d7ax35))})}};var getMailQueuesIdByUser=function(_0x5d7ax29,_0x5d7ax31){return function(_0x5d7ax32){var _0x5d7ax33=[];var _0x5d7ax34=_0x5d7ax32;var _0x5d7ax2b=_0x5d7ax29|| {};var _0x5d7ax35=_[_0x4635[75]](_0x5d7ax31|| {},{distinct:true});return _0x5d7ax34[_0x4635[85]]({attributes:[_0x4635[83]]})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax33= _[_0x4635[79]](_0x5d7ax36,_0x4635[83])})[_0x4635[77]](function(){return MailQueue[_0x4635[82]](_0x4635[81])[_0x4635[76]](_[_0x4635[75]](getQuery(_0x5d7ax2b,{id:{$in:_0x5d7ax33}}),_0x5d7ax35))})}};var getSmsQueuesIdByUser=function(_0x5d7ax29,_0x5d7ax31){return function(_0x5d7ax32){var _0x5d7ax33=[];var _0x5d7ax34=_0x5d7ax32;var _0x5d7ax2b=_0x5d7ax29|| {};var _0x5d7ax35=_[_0x4635[75]](_0x5d7ax31|| {},{distinct:true});return _0x5d7ax34[_0x4635[86]]({attributes:[_0x4635[83]]})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax33= _[_0x4635[79]](_0x5d7ax36,_0x4635[83])})[_0x4635[77]](function(){return SmsQueue[_0x4635[82]](_0x4635[81])[_0x4635[76]](_[_0x4635[75]](getQuery(_0x5d7ax2b,{id:{$in:_0x5d7ax33}}),_0x5d7ax35))})}};var getFaxQueuesIdByUser=function(_0x5d7ax29,_0x5d7ax31){return function(_0x5d7ax32){var _0x5d7ax33=[];var _0x5d7ax34=_0x5d7ax32;var _0x5d7ax2b=_0x5d7ax29|| {};var _0x5d7ax35=_[_0x4635[75]](_0x5d7ax31|| {},{distinct:true});return _0x5d7ax34[_0x4635[87]]({attributes:[_0x4635[83]]})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax33= _[_0x4635[79]](_0x5d7ax36,_0x4635[83])})[_0x4635[77]](function(){return FaxQueue[_0x4635[82]](_0x4635[81])[_0x4635[76]](_[_0x4635[75]](getQuery(_0x5d7ax2b,{id:{$in:_0x5d7ax33}}),_0x5d7ax35))})}};var getOpenchannelQueuesIdByUser=function(_0x5d7ax29,_0x5d7ax31){return function(_0x5d7ax32){var _0x5d7ax33=[];var _0x5d7ax34=_0x5d7ax32;var _0x5d7ax2b=_0x5d7ax29|| {};var _0x5d7ax35=_[_0x4635[75]](_0x5d7ax31|| {},{distinct:true});return _0x5d7ax34[_0x4635[88]]({attributes:[_0x4635[83]]})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax33= _[_0x4635[79]](_0x5d7ax36,_0x4635[83])})[_0x4635[77]](function(){return OpenchannelQueue[_0x4635[82]](_0x4635[81])[_0x4635[76]](_[_0x4635[75]](getQuery(_0x5d7ax2b,{id:{$in:_0x5d7ax33}}),_0x5d7ax35))})}};var getAgentsIdByUser=function(_0x5d7ax29){return function(_0x5d7ax32){var _0x5d7ax3d=[];var _0x5d7ax34=_0x5d7ax32;var _0x5d7ax2b=_0x5d7ax29|| {};var _0x5d7ax3e=[],_0x5d7ax3f=[],_0x5d7ax40=[],_0x5d7ax41=[],_0x5d7ax42=[],_0x5d7ax43=[];return _0x5d7ax34[_0x4635[80]]({attributes:[_0x4635[78]],include:[{raw:true,model:User,attributes:[_0x4635[83]]}]})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax3e= _[_0x4635[79]](_0x5d7ax36,_0x4635[78]);_0x5d7ax36[_0x4635[74]](function(_0x5d7ax44){_0x5d7ax3d= _[_0x4635[94]](_0x5d7ax3d,_[_0x4635[79]](_0x5d7ax44.Users,_0x4635[83]))})})[_0x4635[77]](function(){return _0x5d7ax34[_0x4635[84]]({attributes:[_0x4635[83]],include:[{raw:true,model:User,attributes:[_0x4635[83]]}]})})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax3f= _[_0x4635[79]](_0x5d7ax36,_0x4635[83]);_0x5d7ax36[_0x4635[74]](function(_0x5d7ax44){_0x5d7ax3d= _[_0x4635[94]](_0x5d7ax3d,_[_0x4635[79]](_0x5d7ax44.Users,_0x4635[83]))})})[_0x4635[77]](function(){return _0x5d7ax34[_0x4635[85]]({attributes:[_0x4635[83]],include:[{raw:true,model:User,attributes:[_0x4635[83]]}]})})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax40= _[_0x4635[79]](_0x5d7ax36,_0x4635[83]);_0x5d7ax36[_0x4635[74]](function(_0x5d7ax44){_0x5d7ax3d= _[_0x4635[94]](_0x5d7ax3d,_[_0x4635[79]](_0x5d7ax44.Users,_0x4635[83]))})})[_0x4635[77]](function(){return _0x5d7ax34[_0x4635[87]]({attributes:[_0x4635[83]],include:[{raw:true,model:User,attributes:[_0x4635[83]]}]})})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax41= _[_0x4635[79]](_0x5d7ax36,_0x4635[83]);_0x5d7ax36[_0x4635[74]](function(_0x5d7ax44){_0x5d7ax3d= _[_0x4635[94]](_0x5d7ax3d,_[_0x4635[79]](_0x5d7ax44.Users,_0x4635[83]))})})[_0x4635[77]](function(){return _0x5d7ax34[_0x4635[86]]({attributes:[_0x4635[83]],include:[{raw:true,model:User,attributes:[_0x4635[83]]}]})})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax43= _[_0x4635[79]](_0x5d7ax36,_0x4635[83]);_0x5d7ax36[_0x4635[74]](function(_0x5d7ax44){_0x5d7ax3d= _[_0x4635[94]](_0x5d7ax3d,_[_0x4635[79]](_0x5d7ax44.Users,_0x4635[83]))})})[_0x4635[77]](function(){return _0x5d7ax34[_0x4635[88]]({attributes:[_0x4635[83]],include:[{raw:true,model:User,attributes:[_0x4635[83]]}]})})[_0x4635[77]](function(_0x5d7ax36){_0x5d7ax42= _[_0x4635[79]](_0x5d7ax36,_0x4635[83]);_0x5d7ax36[_0x4635[74]](function(_0x5d7ax44){_0x5d7ax3d= _[_0x4635[94]](_0x5d7ax3d,_[_0x4635[79]](_0x5d7ax44.Users,_0x4635[83]))})})[_0x4635[77]](function(){return User[_0x4635[82]](_0x4635[89],{method:[_0x4635[90],_0x5d7ax2b]},{method:[_0x4635[91],_0x5d7ax2b]},{method:[_0x4635[92],_0x5d7ax2b]},{method:[_0x4635[93],_0x5d7ax2b]})[_0x4635[76]](_[_0x4635[75]](getQuery(_0x5d7ax2b,{id:{$in:_0x5d7ax3d}}),{include:[{model:VoiceQueue,where:{name:{$in:_0x5d7ax3e}},required:false},{model:ChatQueue,where:{id:{$in:_0x5d7ax3f}},required:false},{model:MailQueue,where:{id:{$in:_0x5d7ax40}},required:false},{model:FaxQueue,where:{id:{$in:_0x5d7ax41}},required:false},{model:SmsQueue,where:{id:{$in:_0x5d7ax43}},required:false},{model:OpenchannelQueue,where:{id:{$in:_0x5d7ax42}},required:false}]}))})}};var stripTrailingSlash=function(_0x5d7ax46){if(_0x5d7ax46[_0x4635[95]](-1) === _0x4635[96]){return _0x5d7ax46[_0x4635[95]](0,_0x5d7ax46[_0x4635[53]]- 1)};return _0x5d7ax46};var sendRequest=function(_0x5d7ax48,_0x5d7ax49,_0x5d7ax4a){if(_0x5d7ax49== _0x4635[97]|| _0x5d7ax49== _0x4635[98]){var _0x5d7ax4b={method:_0x5d7ax49,uri:_0x5d7ax4a,body:_0x5d7ax48,json:true};return request(_0x5d7ax4b)}else {console[_0x4635[39]](_0x4635[99])}};var execAction=function(_0x5d7ax4d,_0x5d7ax48){switch(_0x5d7ax4d[_0x4635[103]]){case _0x4635[107]:Action[_0x4635[106]]({name:_0x5d7ax4d[_0x4635[103]],data4:_0x5d7ax4d[_0x4635[71]]|| _0x4635[104]},{body:{name:_0x5d7ax4d[_0x4635[103]],agent:_0x5d7ax48[_0x4635[105]],type:_0x5d7ax4d[_0x4635[71]]|| _0x4635[104]}})[_0x4635[77]](function(){console[_0x4635[39]](_0x4635[102])})[_0x4635[101]](function(_0x5d7ax4e){console[_0x4635[39]](_0x4635[100],_0x5d7ax4e)});break;default:console[_0x4635[39]](_0x4635[108])}};module[_0x4635[109]]= {getQuery:getQuery,getVoiceQueuesIdByUser:getVoiceQueuesIdByUser,getChatQueuesIdByUser:getChatQueuesIdByUser,getMailQueuesIdByUser:getMailQueuesIdByUser,getFaxQueuesIdByUser:getFaxQueuesIdByUser,getSmsQueuesIdByUser:getSmsQueuesIdByUser,getOpenchannelQueuesIdByUser:getOpenchannelQueuesIdByUser,getAgentsIdByUser:getAgentsIdByUser,stripTrailingSlash:stripTrailingSlash,isValidInterval:isValidInterval,sendRequest:sendRequest,execAction:execAction,errorManager:require(_0x4635[110])} \ No newline at end of file diff --git a/server/migrations-history/20160801125118-placeholder.js b/server/migrations-history/20160801125118-placeholder.js index f9b590d..d769486 100644 --- a/server/migrations-history/20160801125118-placeholder.js +++ b/server/migrations-history/20160801125118-placeholder.js @@ -1,23 +1 @@ -'use strict'; - -module.exports = { - up: function (queryInterface, Sequelize) { - /* - Add altering commands here. - Return a promise to correctly handle asynchronicity. - - Example: - return queryInterface.createTable('users', { id: Sequelize.INTEGER }); - */ - }, - - down: function (queryInterface, Sequelize) { - /* - Add reverting commands here. - Return a promise to correctly handle asynchronicity. - - Example: - return queryInterface.dropTable('users'); - */ - } -}; +var _0x729f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73"];_0x729f[0];module[_0x729f[1]]= {up:function(_0x7f85x1,_0x7f85x2){},down:function(_0x7f85x1,_0x7f85x2){}} \ No newline at end of file diff --git a/server/routes.js b/server/routes.js index cf15ac7..07b9ec0 100644 --- a/server/routes.js +++ b/server/routes.js @@ -1,167 +1 @@ -/** - * Main application routes - */ - -'use strict'; - -var config = require('./config/environment'); -var errors = require('./components/errors'); -var path = require('path'); -var moment = require('moment'); - -module.exports = function(app) { - var env = app.get('env'); - - // Insert routes below - app.use('/api/report/openchannel/sessions', require('./api/report_openchannel_session')); - app.use('/api/report/openchannel', require('./api/report_openchannel')); - app.use('/api/openchannel/user_has_queues', require('./api/user_has_openchannel_queue')); - app.use('/api/openchannel/disposition', require('./api/openchannel_disposition')); - app.use('/api/openchannel/applications', require('./api/openchannel_application')); - app.use('/api/openchannel/queues', require('./api/openchannel_queue')); - app.use('/api/openchannel/rooms', require('./api/openchannel_room')); - app.use('/api/openchannel/messages', require('./api/openchannel_message')); - app.use('/api/openchannel/accounts', require('./api/openchannel_account')); - app.use('/api/fax/dispositions', require('./api/fax_disposition')); - app.use('/api/sms/dispositions', require('./api/sms_disposition')); - app.use('/api/mail/dispositions', require('./api/mail_disposition')); - app.use('/api/chat/dispositions', require('./api/chat_disposition')); - app.use('/api/voice/dispositions', require('./api/voice_disposition')); - app.use('/api/scheduler', require('./api/scheduler')); - app.use('/api/fax/attachments', require('./api/fax_attachment')); - app.use('/api/report/fax/sessions', require('./api/report_fax_session')); - app.use('/api/report/faxs', require('./api/report_fax')); - app.use('/api/network/externips', require('./api/network_externip')); - app.use('/api/network/localnets', require('./api/network_localnet')); - app.use('/api/sms/queues', require('./api/sms_queue')); - app.use('/api/sms/applications', require('./api/sms_application')); - app.use('/api/sms/messages', require('./api/sms_message')); - app.use('/api/sms/rooms', require('./api/sms_room')); - app.use('/api/sms/accounts', require('./api/sms_account')); - app.use('/api/report/calls', require('./api/report_call')); - app.use('/api/report/dials', require('./api/report_dial')); - app.use('/api/chat/proactives', require('./api/chat_proactive_action')); - app.use('/api/chat/websites/fields', require('./api/chat_websites_field')); - app.use('/api/answers', require('./api/canned_answer')); - app.use('/api/actions', require('./api/action')); - app.use('/api/pauses', require('./api/pause')); - app.use('/api/voice/recordings', require('./api/voice_recording')); - app.use('/api/jscripty/projects', require('./api/jscripty_project')); - app.use('/api/telephones', require('./api/telephone')); - app.use('/api/licenses', require('./api/license')); - app.use('/api/sugarcrm/fields', require('./api/sugarcrm_field')); - app.use('/api/sugarcrm/configurations', require('./api/sugarcrm_configuration')); - app.use('/api/sugarcrm/accounts', require('./api/sugarcrm_account')); - app.use('/api/freshdesk/fields', require('./api/freshdesk_field')); - app.use('/api/freshdesk/configurations', require('./api/freshdesk_configuration')); - app.use('/api/freshdesk/accounts', require('./api/freshdesk_account')); - app.use('/api/salesforce/fields', require('./api/salesforce_field')); - app.use('/api/salesforce/configurations', require('./api/salesforce_configuration')); - app.use('/api/salesforce/accounts', require('./api/salesforce_account')); - app.use('/api/desk/fields', require('./api/desk_field')); - app.use('/api/desk/configurations', require('./api/desk_configuration')); - app.use('/api/desk/accounts', require('./api/desk_account')); - app.use('/api/analytics/reports/default', require('./api/default_report')); - app.use('/api/analytics/reports/custom', require('./api/custom_report')); - app.use('/api/analytics/reports/trees', require('./api/report_tree')); - app.use('/api/analytics/metrics/default', require('./api/default_metric')); - app.use('/api/analytics/metrics', require('./api/metric')); - app.use('/api/modules', require('./api/module')); - app.use('/api/analytics/extracted', require('./api/extracted_report')); - app.use('/api/updates', require('./api/update')); - app.use('/api/report/chat/sessions', require('./api/report_chat_session')); - app.use('/api/zendesk/fields', require('./api/zendesk_field')); - app.use('/api/report/chats', require('./api/report_chat')); - app.use('/api/zendesk/configurations', require('./api/zendesk_configuration')); - app.use('/api/motionbar', require('./api/motionbar')); - app.use('/api/report/mail/sessions', require('./api/report_mail_session')); - app.use('/api/report/sms/sessions', require('./api/report_sms_session')); - app.use('/api/report/mails', require('./api/report_mail')); - app.use('/api/report/sms', require('./api/report_sms')); - app.use('/api/widgets', require('./api/widget')); - app.use('/api/zendesk/accounts', require('./api/zendesk_account')); - app.use('/api/report/queues', require('./api/report_queue')); - app.use('/api/report/integrations', require('./api/report_integration')); - app.use('/api/report/agents', require('./api/report_agent')); - app.use('/api/report/members', require('./api/report_member')); - app.use('/api/report/square', require('./api/report_square')); - app.use('/api/report/square/details', require('./api/report_square_detail')); - app.use('/api/dashboards', require('./api/dashboard')); - app.use('/api/settings', require('./api/setting')); - app.use('/api/triggers', require('./api/trigger')); - app.use('/api/automations', require('./api/automation')); - app.use('/api/templates', require('./api/template')); - app.use('/api/ami', require('./api/ami')); - app.use('/api/integrations', require('./api/integration')); - app.use('/api/voice/musiconholds', require('./api/voice_musiconhold')); - app.use('/api/voice/voicemails/messages', require('./api/voice_voicemail_messages')); - app.use('/api/voice/voicemails', require('./api/voice_voicemail')); - app.use('/api/contactmanager/contacts', require('./api/contact_manager')); - app.use('/api/contactmanager/companies', require('./api/company')); - app.use('/api/contactmanager/lists', require('./api/list')); - app.use('/api/contactmanager/user_has_lists', require('./api/user_has_list')); - app.use('/api/intervals', require('./api/interval')); - app.use('/api/voice/extensions', require('./api/voice_extension')); - app.use('/api/voice/contexts', require('./api/voice_context')); - app.use('/api/voice/user_has_queues', require('./api/user_has_voice_queue')); - app.use('/api/voice/queues', require('./api/voice_queue')); - app.use('/api/trunks', require('./api/trunk')); - app.use('/api/chat/applications', require('./api/chat_application')); - app.use('/api/chat/user_has_queues', require('./api/user_has_chat_queue')); - app.use('/api/square/odbc', require('./api/square_odbc')); - app.use('/api/square/recordings', require('./api/square_recording')); - app.use('/api/fax/applications', require('./api/fax_application')); - app.use('/api/fax/user_has_queues', require('./api/user_has_fax_queue')); - app.use('/api/sms/user_has_queues', require('./api/user_has_sms_queue')); - app.use('/api/fax/queues', require('./api/fax_queue')); - app.use('/api/mail/attachments', require('./api/mail_attachment')); - app.use('/api/user_has_teams', require('./api/user_has_team')); - app.use('/api/variables', require('./api/variable')); - app.use('/api/chanspy', require('./api/chanspy')); - app.use('/api/tags', require('./api/tag')); - app.use('/api/square/projects', require('./api/square_project')); - app.use('/api/chat/queues', require('./api/chat_queue')); - app.use('/api/fax/messages', require('./api/fax_message')); - app.use('/api/fax/rooms', require('./api/fax_room')); - app.use('/api/fax/accounts', require('./api/fax_account')); - app.use('/api/agents', require('./api/agent')); - app.use('/api/chat/enquiries', require('./api/chat_enquiry')); - app.use('/api/chat/messages', require('./api/chat_message')); - app.use('/api/chat/rooms', require('./api/chat_room')); - app.use('/api/chat/visitors', require('./api/chat_visitor')); - app.use('/api/chat/websites', require('./api/chat_website')); - app.use('/api/chat/queues', require('./api/chat_queue')); - app.use('/api/mail/accounts', require('./api/mail_account')); - app.use('/api/mail/messages', require('./api/mail_message')); - app.use('/api/mail/rooms', require('./api/mail_room')); - app.use('/api/mail/servers/in', require('./api/mail_server_in')); - app.use('/api/mail/servers/out', require('./api/mail_server_out')); - app.use('/api/mail/queues', require('./api/mail_queue')); - app.use('/api/mail/user_has_queues', require('./api/user_has_mail_queue')); - app.use('/api/mail/applications', require('./api/mail_application')); - app.use('/api/teams', require('./api/team')); - app.use('/api/sounds', require('./api/sound')); - app.use('/api/users', require('./api/user')); - app.use('/api/chat/user_has_rooms', require('./api/user_has_chat_room')); - app.use('/api/xchatty', require('./api/xchatty')); - app.use('/auth', require('./auth')); - - // All undefined asset or api routes should return a 404 - app.route('/:url(api|auth|components|app|bower_components|assets)/*').get(errors[404]); - - // All other routes should redirect to the index.html - app.all("/*", function(req, res, next) { - - var options = {}; - - if ('production' === env) { - options.root = path.join(config.root, 'public'); - } - - if ('development' === env || 'test' === env) { - options.root = path.join(config.root, 'client'); - } - - res.sendFile('index.html', options); - }); -}; +var _0x508f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x2F\x65\x72\x72\x6F\x72\x73","\x70\x61\x74\x68","\x6D\x6F\x6D\x65\x6E\x74","\x65\x78\x70\x6F\x72\x74\x73","\x65\x6E\x76","\x67\x65\x74","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x75\x73\x65","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2E\x2F\x61\x70\x69\x2F\x73\x63\x68\x65\x64\x75\x6C\x65\x72","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x66\x61\x78\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x66\x61\x78\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78","\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x65\x78\x74\x65\x72\x6E\x69\x70\x73","\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x65\x78\x74\x65\x72\x6E\x69\x70","\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x2F\x6C\x6F\x63\x61\x6C\x6E\x65\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6E\x65\x74\x77\x6F\x72\x6B\x5F\x6C\x6F\x63\x61\x6C\x6E\x65\x74","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6D\x73\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x63\x61\x6C\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x64\x69\x61\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x64\x69\x61\x6C","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x70\x72\x6F\x61\x63\x74\x69\x76\x65\x5F\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65\x73\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x61\x6E\x73\x77\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x61\x6E\x6E\x65\x64\x5F\x61\x6E\x73\x77\x65\x72","\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x63\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x70\x61\x75\x73\x65","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6A\x73\x63\x72\x69\x70\x74\x79\x5F\x70\x72\x6F\x6A\x65\x63\x74","\x2F\x61\x70\x69\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6C\x65\x70\x68\x6F\x6E\x65","\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x63\x65\x6E\x73\x65","\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x75\x67\x61\x72\x63\x72\x6D\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x72\x65\x73\x68\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x61\x6C\x65\x73\x66\x6F\x72\x63\x65\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x64\x65\x66\x61\x75\x6C\x74","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x72\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x63\x75\x73\x74\x6F\x6D","\x2E\x2F\x61\x70\x69\x2F\x63\x75\x73\x74\x6F\x6D\x5F\x72\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x72\x65\x70\x6F\x72\x74\x73\x2F\x74\x72\x65\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x74\x72\x65\x65","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x6D\x65\x74\x72\x69\x63\x73\x2F\x64\x65\x66\x61\x75\x6C\x74","\x2E\x2F\x61\x70\x69\x2F\x64\x65\x66\x61\x75\x6C\x74\x5F\x6D\x65\x74\x72\x69\x63","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x6D\x65\x74\x72\x69\x63\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x65\x74\x72\x69\x63","\x2F\x61\x70\x69\x2F\x6D\x6F\x64\x75\x6C\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x6F\x64\x75\x6C\x65","\x2F\x61\x70\x69\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64","\x2E\x2F\x61\x70\x69\x2F\x65\x78\x74\x72\x61\x63\x74\x65\x64\x5F\x72\x65\x70\x6F\x72\x74","\x2F\x61\x70\x69\x2F\x75\x70\x64\x61\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x70\x64\x61\x74\x65","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x63\x68\x61\x74\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x66\x69\x65\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x66\x69\x65\x6C\x64","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x63\x68\x61\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x63\x6F\x6E\x66\x69\x67\x75\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2E\x2F\x61\x70\x69\x2F\x6D\x6F\x74\x69\x6F\x6E\x62\x61\x72","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6D\x61\x69\x6C\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x73\x6D\x73\x2F\x73\x65\x73\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6D\x61\x69\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x73\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73","\x2F\x61\x70\x69\x2F\x77\x69\x64\x67\x65\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x77\x69\x64\x67\x65\x74","\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x7A\x65\x6E\x64\x65\x73\x6B\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x61\x67\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x6D\x65\x6D\x62\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x73\x71\x75\x61\x72\x65","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65","\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x2F\x73\x71\x75\x61\x72\x65\x2F\x64\x65\x74\x61\x69\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64","\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x65\x74\x74\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x72\x69\x67\x67\x65\x72","\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x75\x74\x6F\x6D\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x6D\x70\x6C\x61\x74\x65","\x2F\x61\x70\x69\x2F\x61\x6D\x69","\x2E\x2F\x61\x70\x69\x2F\x61\x6D\x69","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x6D\x75\x73\x69\x63\x6F\x6E\x68\x6F\x6C\x64","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x76\x6F\x69\x63\x65\x6D\x61\x69\x6C","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x5F\x6D\x61\x6E\x61\x67\x65\x72","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x63\x6F\x6D\x70\x61\x6E\x69\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x6F\x6D\x70\x61\x6E\x79","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x6C\x69\x73\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6C\x69\x73\x74","\x2F\x61\x70\x69\x2F\x63\x6F\x6E\x74\x61\x63\x74\x6D\x61\x6E\x61\x67\x65\x72\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6C\x69\x73\x74","\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C\x73","\x2E\x2F\x61\x70\x69\x2F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x65\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x63\x6F\x6E\x74\x65\x78\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x63\x6F\x6E\x74\x65\x78\x74","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x6F\x69\x63\x65\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x72\x75\x6E\x6B","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x6F\x64\x62\x63","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x6F\x64\x62\x63","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x66\x61\x78\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x73\x6D\x73\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x73\x6D\x73\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x74\x74\x61\x63\x68\x6D\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x74\x65\x61\x6D","\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x76\x61\x72\x69\x61\x62\x6C\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x6E\x73\x70\x79","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x6E\x73\x70\x79","\x2F\x61\x70\x69\x2F\x74\x61\x67\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x61\x67","\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x71\x75\x61\x72\x65\x5F\x70\x72\x6F\x6A\x65\x63\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x66\x61\x78\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x66\x61\x78\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x61\x67\x65\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x61\x67\x65\x6E\x74","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x65\x6E\x71\x75\x69\x72\x69\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x65\x6E\x71\x75\x69\x72\x79","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x76\x69\x73\x69\x74\x6F\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x76\x69\x73\x69\x74\x6F\x72","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x77\x65\x62\x73\x69\x74\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x5F\x77\x65\x62\x73\x69\x74\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x63\x63\x6F\x75\x6E\x74\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x63\x63\x6F\x75\x6E\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x6D\x65\x73\x73\x61\x67\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x69\x6E","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x69\x6E","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x73\x65\x72\x76\x65\x72\x73\x2F\x6F\x75\x74","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x73\x65\x72\x76\x65\x72\x5F\x6F\x75\x74","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x71\x75\x65\x75\x65\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x6D\x61\x69\x6C\x5F\x71\x75\x65\x75\x65","\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x2F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x2E\x2F\x61\x70\x69\x2F\x6D\x61\x69\x6C\x5F\x61\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E","\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x74\x65\x61\x6D","\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64\x73","\x2E\x2F\x61\x70\x69\x2F\x73\x6F\x75\x6E\x64","\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72","\x2F\x61\x70\x69\x2F\x63\x68\x61\x74\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x72\x6F\x6F\x6D\x73","\x2E\x2F\x61\x70\x69\x2F\x75\x73\x65\x72\x5F\x68\x61\x73\x5F\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D","\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79","\x2E\x2F\x61\x70\x69\x2F\x78\x63\x68\x61\x74\x74\x79","\x2F\x61\x75\x74\x68","\x2E\x2F\x61\x75\x74\x68","\x2F\x3A\x75\x72\x6C\x28\x61\x70\x69\x7C\x61\x75\x74\x68\x7C\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x7C\x61\x70\x70\x7C\x62\x6F\x77\x65\x72\x5F\x63\x6F\x6D\x70\x6F\x6E\x65\x6E\x74\x73\x7C\x61\x73\x73\x65\x74\x73\x29\x2F\x2A","\x72\x6F\x75\x74\x65","\x2F\x2A","\x70\x72\x6F\x64\x75\x63\x74\x69\x6F\x6E","\x72\x6F\x6F\x74","\x70\x75\x62\x6C\x69\x63","\x6A\x6F\x69\x6E","\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x74\x65\x73\x74","\x63\x6C\x69\x65\x6E\x74","\x69\x6E\x64\x65\x78\x2E\x68\x74\x6D\x6C","\x73\x65\x6E\x64\x46\x69\x6C\x65","\x61\x6C\x6C"];_0x508f[0];var config=require(_0x508f[1]);var errors=require(_0x508f[2]);var path=require(_0x508f[3]);var moment=require(_0x508f[4]);module[_0x508f[5]]= function(_0xe54ex5){var _0xe54ex6=_0xe54ex5[_0x508f[7]](_0x508f[6]);_0xe54ex5[_0x508f[10]](_0x508f[8],require(_0x508f[9]));_0xe54ex5[_0x508f[10]](_0x508f[11],require(_0x508f[12]));_0xe54ex5[_0x508f[10]](_0x508f[13],require(_0x508f[14]));_0xe54ex5[_0x508f[10]](_0x508f[15],require(_0x508f[16]));_0xe54ex5[_0x508f[10]](_0x508f[17],require(_0x508f[18]));_0xe54ex5[_0x508f[10]](_0x508f[19],require(_0x508f[20]));_0xe54ex5[_0x508f[10]](_0x508f[21],require(_0x508f[22]));_0xe54ex5[_0x508f[10]](_0x508f[23],require(_0x508f[24]));_0xe54ex5[_0x508f[10]](_0x508f[25],require(_0x508f[26]));_0xe54ex5[_0x508f[10]](_0x508f[27],require(_0x508f[28]));_0xe54ex5[_0x508f[10]](_0x508f[29],require(_0x508f[30]));_0xe54ex5[_0x508f[10]](_0x508f[31],require(_0x508f[32]));_0xe54ex5[_0x508f[10]](_0x508f[33],require(_0x508f[34]));_0xe54ex5[_0x508f[10]](_0x508f[35],require(_0x508f[36]));_0xe54ex5[_0x508f[10]](_0x508f[37],require(_0x508f[38]));_0xe54ex5[_0x508f[10]](_0x508f[39],require(_0x508f[40]));_0xe54ex5[_0x508f[10]](_0x508f[41],require(_0x508f[42]));_0xe54ex5[_0x508f[10]](_0x508f[43],require(_0x508f[44]));_0xe54ex5[_0x508f[10]](_0x508f[45],require(_0x508f[46]));_0xe54ex5[_0x508f[10]](_0x508f[47],require(_0x508f[48]));_0xe54ex5[_0x508f[10]](_0x508f[49],require(_0x508f[50]));_0xe54ex5[_0x508f[10]](_0x508f[51],require(_0x508f[52]));_0xe54ex5[_0x508f[10]](_0x508f[53],require(_0x508f[54]));_0xe54ex5[_0x508f[10]](_0x508f[55],require(_0x508f[56]));_0xe54ex5[_0x508f[10]](_0x508f[57],require(_0x508f[58]));_0xe54ex5[_0x508f[10]](_0x508f[59],require(_0x508f[60]));_0xe54ex5[_0x508f[10]](_0x508f[61],require(_0x508f[62]));_0xe54ex5[_0x508f[10]](_0x508f[63],require(_0x508f[64]));_0xe54ex5[_0x508f[10]](_0x508f[65],require(_0x508f[66]));_0xe54ex5[_0x508f[10]](_0x508f[67],require(_0x508f[68]));_0xe54ex5[_0x508f[10]](_0x508f[69],require(_0x508f[70]));_0xe54ex5[_0x508f[10]](_0x508f[71],require(_0x508f[72]));_0xe54ex5[_0x508f[10]](_0x508f[73],require(_0x508f[74]));_0xe54ex5[_0x508f[10]](_0x508f[75],require(_0x508f[76]));_0xe54ex5[_0x508f[10]](_0x508f[77],require(_0x508f[78]));_0xe54ex5[_0x508f[10]](_0x508f[79],require(_0x508f[80]));_0xe54ex5[_0x508f[10]](_0x508f[81],require(_0x508f[82]));_0xe54ex5[_0x508f[10]](_0x508f[83],require(_0x508f[84]));_0xe54ex5[_0x508f[10]](_0x508f[85],require(_0x508f[86]));_0xe54ex5[_0x508f[10]](_0x508f[87],require(_0x508f[88]));_0xe54ex5[_0x508f[10]](_0x508f[89],require(_0x508f[90]));_0xe54ex5[_0x508f[10]](_0x508f[91],require(_0x508f[92]));_0xe54ex5[_0x508f[10]](_0x508f[93],require(_0x508f[94]));_0xe54ex5[_0x508f[10]](_0x508f[95],require(_0x508f[96]));_0xe54ex5[_0x508f[10]](_0x508f[97],require(_0x508f[98]));_0xe54ex5[_0x508f[10]](_0x508f[99],require(_0x508f[100]));_0xe54ex5[_0x508f[10]](_0x508f[101],require(_0x508f[102]));_0xe54ex5[_0x508f[10]](_0x508f[103],require(_0x508f[104]));_0xe54ex5[_0x508f[10]](_0x508f[105],require(_0x508f[106]));_0xe54ex5[_0x508f[10]](_0x508f[107],require(_0x508f[108]));_0xe54ex5[_0x508f[10]](_0x508f[109],require(_0x508f[110]));_0xe54ex5[_0x508f[10]](_0x508f[111],require(_0x508f[112]));_0xe54ex5[_0x508f[10]](_0x508f[113],require(_0x508f[114]));_0xe54ex5[_0x508f[10]](_0x508f[115],require(_0x508f[116]));_0xe54ex5[_0x508f[10]](_0x508f[117],require(_0x508f[118]));_0xe54ex5[_0x508f[10]](_0x508f[119],require(_0x508f[120]));_0xe54ex5[_0x508f[10]](_0x508f[121],require(_0x508f[122]));_0xe54ex5[_0x508f[10]](_0x508f[123],require(_0x508f[124]));_0xe54ex5[_0x508f[10]](_0x508f[125],require(_0x508f[126]));_0xe54ex5[_0x508f[10]](_0x508f[127],require(_0x508f[128]));_0xe54ex5[_0x508f[10]](_0x508f[129],require(_0x508f[130]));_0xe54ex5[_0x508f[10]](_0x508f[131],require(_0x508f[132]));_0xe54ex5[_0x508f[10]](_0x508f[133],require(_0x508f[134]));_0xe54ex5[_0x508f[10]](_0x508f[135],require(_0x508f[136]));_0xe54ex5[_0x508f[10]](_0x508f[137],require(_0x508f[138]));_0xe54ex5[_0x508f[10]](_0x508f[139],require(_0x508f[140]));_0xe54ex5[_0x508f[10]](_0x508f[141],require(_0x508f[142]));_0xe54ex5[_0x508f[10]](_0x508f[143],require(_0x508f[144]));_0xe54ex5[_0x508f[10]](_0x508f[145],require(_0x508f[146]));_0xe54ex5[_0x508f[10]](_0x508f[147],require(_0x508f[148]));_0xe54ex5[_0x508f[10]](_0x508f[149],require(_0x508f[150]));_0xe54ex5[_0x508f[10]](_0x508f[151],require(_0x508f[152]));_0xe54ex5[_0x508f[10]](_0x508f[153],require(_0x508f[154]));_0xe54ex5[_0x508f[10]](_0x508f[155],require(_0x508f[156]));_0xe54ex5[_0x508f[10]](_0x508f[157],require(_0x508f[158]));_0xe54ex5[_0x508f[10]](_0x508f[159],require(_0x508f[160]));_0xe54ex5[_0x508f[10]](_0x508f[161],require(_0x508f[162]));_0xe54ex5[_0x508f[10]](_0x508f[163],require(_0x508f[164]));_0xe54ex5[_0x508f[10]](_0x508f[165],require(_0x508f[166]));_0xe54ex5[_0x508f[10]](_0x508f[167],require(_0x508f[168]));_0xe54ex5[_0x508f[10]](_0x508f[169],require(_0x508f[170]));_0xe54ex5[_0x508f[10]](_0x508f[171],require(_0x508f[172]));_0xe54ex5[_0x508f[10]](_0x508f[173],require(_0x508f[174]));_0xe54ex5[_0x508f[10]](_0x508f[175],require(_0x508f[176]));_0xe54ex5[_0x508f[10]](_0x508f[177],require(_0x508f[178]));_0xe54ex5[_0x508f[10]](_0x508f[179],require(_0x508f[180]));_0xe54ex5[_0x508f[10]](_0x508f[181],require(_0x508f[182]));_0xe54ex5[_0x508f[10]](_0x508f[183],require(_0x508f[184]));_0xe54ex5[_0x508f[10]](_0x508f[185],require(_0x508f[186]));_0xe54ex5[_0x508f[10]](_0x508f[187],require(_0x508f[188]));_0xe54ex5[_0x508f[10]](_0x508f[189],require(_0x508f[190]));_0xe54ex5[_0x508f[10]](_0x508f[191],require(_0x508f[192]));_0xe54ex5[_0x508f[10]](_0x508f[193],require(_0x508f[194]));_0xe54ex5[_0x508f[10]](_0x508f[195],require(_0x508f[196]));_0xe54ex5[_0x508f[10]](_0x508f[197],require(_0x508f[198]));_0xe54ex5[_0x508f[10]](_0x508f[199],require(_0x508f[200]));_0xe54ex5[_0x508f[10]](_0x508f[201],require(_0x508f[202]));_0xe54ex5[_0x508f[10]](_0x508f[203],require(_0x508f[204]));_0xe54ex5[_0x508f[10]](_0x508f[205],require(_0x508f[206]));_0xe54ex5[_0x508f[10]](_0x508f[207],require(_0x508f[208]));_0xe54ex5[_0x508f[10]](_0x508f[209],require(_0x508f[210]));_0xe54ex5[_0x508f[10]](_0x508f[211],require(_0x508f[212]));_0xe54ex5[_0x508f[10]](_0x508f[213],require(_0x508f[214]));_0xe54ex5[_0x508f[10]](_0x508f[215],require(_0x508f[216]));_0xe54ex5[_0x508f[10]](_0x508f[217],require(_0x508f[218]));_0xe54ex5[_0x508f[10]](_0x508f[219],require(_0x508f[220]));_0xe54ex5[_0x508f[10]](_0x508f[221],require(_0x508f[222]));_0xe54ex5[_0x508f[10]](_0x508f[223],require(_0x508f[224]));_0xe54ex5[_0x508f[10]](_0x508f[225],require(_0x508f[226]));_0xe54ex5[_0x508f[10]](_0x508f[227],require(_0x508f[228]));_0xe54ex5[_0x508f[10]](_0x508f[229],require(_0x508f[230]));_0xe54ex5[_0x508f[10]](_0x508f[231],require(_0x508f[232]));_0xe54ex5[_0x508f[10]](_0x508f[233],require(_0x508f[234]));_0xe54ex5[_0x508f[10]](_0x508f[235],require(_0x508f[236]));_0xe54ex5[_0x508f[10]](_0x508f[237],require(_0x508f[238]));_0xe54ex5[_0x508f[10]](_0x508f[239],require(_0x508f[240]));_0xe54ex5[_0x508f[10]](_0x508f[241],require(_0x508f[242]));_0xe54ex5[_0x508f[10]](_0x508f[223],require(_0x508f[224]));_0xe54ex5[_0x508f[10]](_0x508f[243],require(_0x508f[244]));_0xe54ex5[_0x508f[10]](_0x508f[245],require(_0x508f[246]));_0xe54ex5[_0x508f[10]](_0x508f[247],require(_0x508f[248]));_0xe54ex5[_0x508f[10]](_0x508f[249],require(_0x508f[250]));_0xe54ex5[_0x508f[10]](_0x508f[251],require(_0x508f[252]));_0xe54ex5[_0x508f[10]](_0x508f[253],require(_0x508f[254]));_0xe54ex5[_0x508f[10]](_0x508f[255],require(_0x508f[256]));_0xe54ex5[_0x508f[10]](_0x508f[257],require(_0x508f[258]));_0xe54ex5[_0x508f[10]](_0x508f[259],require(_0x508f[260]));_0xe54ex5[_0x508f[10]](_0x508f[261],require(_0x508f[262]));_0xe54ex5[_0x508f[10]](_0x508f[263],require(_0x508f[264]));_0xe54ex5[_0x508f[10]](_0x508f[265],require(_0x508f[266]));_0xe54ex5[_0x508f[10]](_0x508f[267],require(_0x508f[268]));_0xe54ex5[_0x508f[10]](_0x508f[269],require(_0x508f[270]));_0xe54ex5[_0x508f[272]](_0x508f[271])[_0x508f[7]](errors[404]);_0xe54ex5[_0x508f[283]](_0x508f[273],function(_0xe54ex7,_0xe54ex8,_0xe54ex9){var _0xe54exa={};if(_0x508f[274]=== _0xe54ex6){_0xe54exa[_0x508f[275]]= path[_0x508f[277]](config[_0x508f[275]],_0x508f[276])};if(_0x508f[278]=== _0xe54ex6|| _0x508f[279]=== _0xe54ex6){_0xe54exa[_0x508f[275]]= path[_0x508f[277]](config[_0x508f[275]],_0x508f[280])};_0xe54ex8[_0x508f[282]](_0x508f[281],_0xe54exa)})} \ No newline at end of file diff --git a/server/services/dashboard/hooks/index.js b/server/services/dashboard/hooks/index.js index b5011ab..c6635a8 100644 --- a/server/services/dashboard/hooks/index.js +++ b/server/services/dashboard/hooks/index.js @@ -1,12 +1 @@ -'use strict'; - -const User = require('../../../models').User; -const VoiceQueue = require('../../../models').VoiceQueue; - -const _ = require('lodash'); - -module.exports = function(n, cpAmi) { - console.log('services/dashboard/hooks'); - - require('./voice')(n, cpAmi); -}; +var _0x10f7=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x6C\x6F\x64\x61\x73\x68","\x65\x78\x70\x6F\x72\x74\x73","\x73\x65\x72\x76\x69\x63\x65\x73\x2F\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x2F\x68\x6F\x6F\x6B\x73","\x6C\x6F\x67","\x2E\x2F\x76\x6F\x69\x63\x65"];_0x10f7[0];const User=require(_0x10f7[2])[_0x10f7[1]];const VoiceQueue=require(_0x10f7[2])[_0x10f7[3]];const _=require(_0x10f7[4]);module[_0x10f7[5]]= function(_0x7457x4,_0x7457x5){console[_0x10f7[7]](_0x10f7[6]);require(_0x10f7[8])(_0x7457x4,_0x7457x5)} \ No newline at end of file diff --git a/server/services/dashboard/hooks/voice.js b/server/services/dashboard/hooks/voice.js index 851df1c..da948c2 100644 --- a/server/services/dashboard/hooks/voice.js +++ b/server/services/dashboard/hooks/voice.js @@ -1,99 +1 @@ -'use strict'; - -const UserHasVoiceQueue = require('../../../models').UserHasVoiceQueue; - -const ReportAgent = require('../../../models').ReportAgent; -const ReportQueue = require('../../../models').ReportQueue; -const ReportCall = require('../../../models').ReportCall; -const VoiceQueue = require('../../../models').VoiceQueue; -const sequelize = require('../../../models').sequelize; - -const _ = require('lodash'); - -function onSend(process, type, doc) { - doc.type = type; - process.send(doc); -} - -module.exports = function(n, cpAmi) { - - cpAmi.on('message', function(doc) { - switch (doc.evt) { - case 'ReportAgent.afterUpdate': - if (doc.changed.holdtime) { - onSend(n, 'holdtime', doc); // OK - } - - if (doc.changed.talktime) { - onSend(n, 'talktime', doc); - } - break; - - case 'ReportQueue.afterCreate': // OK - onSend(n, 'waiting:up', doc); - break; - - case 'ReportQueue.afterUpdate': // OK - if (doc.changed.queuecallerexit) { - onSend(n, 'unmanaged:up', doc) - } - - if (doc.changed.queuecallerleaveAt) { - onSend(n, 'waiting:down', doc) - - if (!doc.queuecallercomplete && !doc.queuecallerabandon && !doc.queuecallerexit && doc.queuecallerleaveAt) { - if (!doc.changed.queuecallerabandon) { - onSend(n, 'active:up', doc); - } - } - } - - if (doc.changed.queuecallercomplete && doc.queuecallercomplete) { - onSend(n, 'active:down', doc); - onSend(n, 'complete:up', doc); - } - - if (doc.changed.queuecallerabandon && doc.queuecallerabandon) { - onSend(n, 'abandon:up', doc); - } - break; - - case 'ReportCall.afterCreate': - if (doc.type === 'outbound') { - onSend(n, 'outbound:up', doc); - } - break; - - case 'ReportCall.afterCreate': - if (doc.type === 'outbound') { - onSend(n, 'outbound:up', doc); - } - break; - - case 'UserHasVoiceQueue.afterBulkCreate': - doc.forEach(function(elm) { - onSend(n, 'agent:join', elm); - }); - break; - - case 'UserHasVoiceQueue.afterBulkDestroy': - doc.where.queue.forEach(function(elm) { - onSend(n, 'agent:leave', { - dataValues: { - UserId: doc.where.UserId, - queue: elm - } - }); - }); - break; - - case 'UserHasVoiceQueue.afterUpdate': - if (doc.changed.lastcall) { - onSend(n, 'lastcall', doc); - } - break; - - default: - } - }); -}; +var _0x98ff=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x6C\x6F\x64\x61\x73\x68","\x74\x79\x70\x65","\x73\x65\x6E\x64","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x65\x73\x73\x61\x67\x65","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x63\x68\x61\x6E\x67\x65\x64","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x77\x61\x69\x74\x69\x6E\x67\x3A\x75\x70","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x3A\x75\x70","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74","\x77\x61\x69\x74\x69\x6E\x67\x3A\x64\x6F\x77\x6E","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E","\x61\x63\x74\x69\x76\x65\x3A\x75\x70","\x61\x63\x74\x69\x76\x65\x3A\x64\x6F\x77\x6E","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3A\x75\x70","\x61\x62\x61\x6E\x64\x6F\x6E\x3A\x75\x70","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x3A\x75\x70","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x2E\x61\x66\x74\x65\x72\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x3A\x6A\x6F\x69\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x61\x67\x65\x6E\x74\x3A\x6C\x65\x61\x76\x65","\x55\x73\x65\x72\x49\x64","\x77\x68\x65\x72\x65","\x71\x75\x65\x75\x65","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x42\x75\x6C\x6B\x44\x65\x73\x74\x72\x6F\x79","\x6C\x61\x73\x74\x63\x61\x6C\x6C","\x55\x73\x65\x72\x48\x61\x73\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x2E\x61\x66\x74\x65\x72\x55\x70\x64\x61\x74\x65","\x65\x76\x74","\x6F\x6E"];_0x98ff[0];const UserHasVoiceQueue=require(_0x98ff[2])[_0x98ff[1]];const ReportAgent=require(_0x98ff[2])[_0x98ff[3]];const ReportQueue=require(_0x98ff[2])[_0x98ff[4]];const ReportCall=require(_0x98ff[2])[_0x98ff[5]];const VoiceQueue=require(_0x98ff[2])[_0x98ff[6]];const sequelize=require(_0x98ff[2])[_0x98ff[7]];const _=require(_0x98ff[8]);function onSend(_0xa99fx9,_0xa99fxa,_0xa99fxb){_0xa99fxb[_0x98ff[9]]= _0xa99fxa;_0xa99fx9[_0x98ff[10]](_0xa99fxb)}module[_0x98ff[11]]= function(_0xa99fxc,_0xa99fxd){_0xa99fxd[_0x98ff[44]](_0x98ff[12],function(_0xa99fxb){switch(_0xa99fxb[_0x98ff[43]]){case _0x98ff[16]:if(_0xa99fxb[_0x98ff[14]][_0x98ff[13]]){onSend(_0xa99fxc,_0x98ff[13],_0xa99fxb)};if(_0xa99fxb[_0x98ff[14]][_0x98ff[15]]){onSend(_0xa99fxc,_0x98ff[15],_0xa99fxb)};break;case _0x98ff[18]:onSend(_0xa99fxc,_0x98ff[17],_0xa99fxb);break;case _0x98ff[29]:if(_0xa99fxb[_0x98ff[14]][_0x98ff[19]]){onSend(_0xa99fxc,_0x98ff[20],_0xa99fxb)};if(_0xa99fxb[_0x98ff[14]][_0x98ff[21]]){onSend(_0xa99fxc,_0x98ff[22],_0xa99fxb);if(!_0xa99fxb[_0x98ff[23]]&& !_0xa99fxb[_0x98ff[24]]&& !_0xa99fxb[_0x98ff[19]]&& _0xa99fxb[_0x98ff[21]]){if(!_0xa99fxb[_0x98ff[14]][_0x98ff[24]]){onSend(_0xa99fxc,_0x98ff[25],_0xa99fxb)}}};if(_0xa99fxb[_0x98ff[14]][_0x98ff[23]]&& _0xa99fxb[_0x98ff[23]]){onSend(_0xa99fxc,_0x98ff[26],_0xa99fxb);onSend(_0xa99fxc,_0x98ff[27],_0xa99fxb)};if(_0xa99fxb[_0x98ff[14]][_0x98ff[24]]&& _0xa99fxb[_0x98ff[24]]){onSend(_0xa99fxc,_0x98ff[28],_0xa99fxb)};break;case _0x98ff[32]:if(_0xa99fxb[_0x98ff[9]]=== _0x98ff[30]){onSend(_0xa99fxc,_0x98ff[31],_0xa99fxb)};break;case _0x98ff[32]:if(_0xa99fxb[_0x98ff[9]]=== _0x98ff[30]){onSend(_0xa99fxc,_0x98ff[31],_0xa99fxb)};break;case _0x98ff[35]:_0xa99fxb[_0x98ff[34]](function(_0xa99fxe){onSend(_0xa99fxc,_0x98ff[33],_0xa99fxe)});break;case _0x98ff[40]:_0xa99fxb[_0x98ff[38]][_0x98ff[39]][_0x98ff[34]](function(_0xa99fxe){onSend(_0xa99fxc,_0x98ff[36],{dataValues:{UserId:_0xa99fxb[_0x98ff[38]][_0x98ff[37]],queue:_0xa99fxe}})});break;case _0x98ff[42]:if(_0xa99fxb[_0x98ff[14]][_0x98ff[41]]){onSend(_0xa99fxc,_0x98ff[41],_0xa99fxb)};break;default:}})} \ No newline at end of file diff --git a/server/services/dashboard/index.js b/server/services/dashboard/index.js index 9807e6a..e438ce7 100644 --- a/server/services/dashboard/index.js +++ b/server/services/dashboard/index.js @@ -1,19 +1 @@ -'use strict'; - -const util = require('util'); -const cp = require('child_process'); - -module.exports = function(cpAmi) { - const n = cp - .fork(__dirname + '/workers') - .on('message', function(data) { - console.log('child process message', data); - }) - .on('error', function(err) { - console.error(err); - }); - - require('./hooks')(n, cpAmi); - - return n; -}; +var _0x7608=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x75\x74\x69\x6C","\x63\x68\x69\x6C\x64\x5F\x70\x72\x6F\x63\x65\x73\x73","\x65\x78\x70\x6F\x72\x74\x73","\x65\x72\x72\x6F\x72","\x6F\x6E","\x6D\x65\x73\x73\x61\x67\x65","\x63\x68\x69\x6C\x64\x20\x70\x72\x6F\x63\x65\x73\x73\x20\x6D\x65\x73\x73\x61\x67\x65","\x6C\x6F\x67","\x2F\x77\x6F\x72\x6B\x65\x72\x73","\x66\x6F\x72\x6B","\x2E\x2F\x68\x6F\x6F\x6B\x73"];_0x7608[0];const util=require(_0x7608[1]);const cp=require(_0x7608[2]);module[_0x7608[3]]= function(_0xbdf9x3){const _0xbdf9x4=cp[_0x7608[10]](__dirname+ _0x7608[9])[_0x7608[5]](_0x7608[6],function(_0xbdf9x6){console[_0x7608[8]](_0x7608[7],_0xbdf9x6)})[_0x7608[5]](_0x7608[4],function(_0xbdf9x5){console[_0x7608[4]](_0xbdf9x5)});require(_0x7608[11])(_0xbdf9x4,_0xbdf9x3);return _0xbdf9x4} \ No newline at end of file diff --git a/server/services/dashboard/workers/index.js b/server/services/dashboard/workers/index.js index 9048c74..436f0ae 100644 --- a/server/services/dashboard/workers/index.js +++ b/server/services/dashboard/workers/index.js @@ -1,188 +1 @@ -'use strict'; - -/*jshint multistr:true */ - -const _ = require('lodash'); - -const config = require('../../../config/environment'); -const sequelize = require('../../../models').sequelize; - -const VoiceQueue = require('../../../models').VoiceQueue; -const ReportQueue = require('../../../models').ReportQueue; - -// SOCKET IO CHILD CONNETION -var io = require('socket.io-emitter')({ - host: config.ip, - port: 6379 -}); - -// QUEUE SET -var queues = {}; -var outbound = {}; - -VoiceQueue - .findAll({ - attributes: ['name'], - raw: true - }) - .then(function(data) { - queues = _.keyBy(data, 'name'); - - return sequelize - .query('SELECT queue, count(*) as waiting \ - FROM report_queue \ - WHERE queuecallerleaveAt IS NULL \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (queues[elm.queue]) { - queues[elm.queue].waiting = elm.waiting; - } - }); - - return sequelize - .query( - 'SELECT queue, count(*) as active \ - FROM report_queue \ - WHERE queuecallerexit = 0 \ - AND queuecallerabandon = 0 \ - AND queuecallercomplete = 0 \ - AND queuecallerleaveAt IS NOT NULL \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (queues[elm.queue]) { - queues[elm.queue].active = elm.active; - } - }); - - return sequelize - .query( - 'SELECT queue, count(*) as abandon \ - FROM report_queue \ - WHERE queuecallerabandon = 1 \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (queues[elm.queue]) { - queues[elm.queue].abandon = elm.abandon; - } - }); - - return sequelize - .query( - 'SELECT queue, count(*) as complete \ - FROM report_queue \ - WHERE queuecallercomplete = 1 \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (queues[elm.queue]) { - queues[elm.queue].complete = elm.complete; - } - }); - - return sequelize - .query('SELECT queue, count(*) as calls, SUM(holdtime) as holdtime \ - FROM report_agent \ - WHERE agentcomplete = 1 \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (queues[elm.queue]) { - queues[elm.queue].holdtime = elm.holdtime; - } - }); - - return sequelize - .query('SELECT queue, count(*) as calls, SUM(talktime) as talktime \ - FROM report_agent \ - WHERE agentcomplete = 1 \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (queues[elm.queue]) { - queues[elm.queue].talktime = elm.talktime; - } - }); - - return sequelize - .query('SELECT queue, count(*) as unmanaged \ - FROM report_queue \ - WHERE queuecallerexit = 1 \ - GROUP BY queue;', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - data.forEach(function(elm) { - if (queues[elm.queue]) { - queues[elm.queue].unmanaged = elm.unmanaged; - } - }); - - return sequelize - .query('SELECT count(*) as answered \ - FROM report_call \ - WHERE disposition = \'ANSWERED\' \ - AND type = \'outbound\';', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - outbound.answered = data[0].answered; - - return sequelize - .query('SELECT count(*) as manualOutbound \ - FROM report_call \ - WHERE type = \'outbound\';', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - outbound.manualOutbound = data[0].manualOutbound; - - return sequelize - .query('SELECT SUM(duration) as globalDuration \ - FROM report_call \ - WHERE type = \'outbound\';', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - outbound.globalDuration = data[0].globalDuration || 0; - - return sequelize - .query('SELECT AVG(duration) as avgDuration \ - FROM report_call \ - WHERE type=\'outbound\';', { - type: sequelize.QueryTypes.SELECT - }); - }) - .then(function(data) { - outbound.avgDuration = data[0].avgDuration || 0; - outbound.answerRate = outbound.avgDuration ? ((outbound.answered / outbound.globalDuration) * 100) : 0; - - require('./voice')(queues, outbound, io); - }) - .catch(function(err) { - console.error(err); - }); +var _0xb7cc=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x69\x70","\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F\x2D\x65\x6D\x69\x74\x74\x65\x72","\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x61\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x61\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x61\x6E\x73\x77\x65\x72\x65\x64","\x67\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x2E\x2F\x76\x6F\x69\x63\x65","\x74\x68\x65\x6E","\x53\x45\x4C\x45\x43\x54\x20\x41\x56\x47\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x20\x61\x73\x20\x61\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E\x20\x0A\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x3D\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x53\x45\x4C\x45\x43\x54","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x53\x45\x4C\x45\x43\x54\x20\x53\x55\x4D\x28\x64\x75\x72\x61\x74\x69\x6F\x6E\x29\x20\x61\x73\x20\x67\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x53\x45\x4C\x45\x43\x54\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x71\x75\x65\x75\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x66\x6F\x72\x45\x61\x63\x68","\x53\x45\x4C\x45\x43\x54\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x6E\x73\x77\x65\x72\x65\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x64\x69\x73\x70\x6F\x73\x69\x74\x69\x6F\x6E\x20\x3D\x20\x27\x41\x4E\x53\x57\x45\x52\x45\x44\x27\x20\x0A\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x74\x79\x70\x65\x20\x3D\x20\x27\x6F\x75\x74\x62\x6F\x75\x6E\x64\x27\x3B","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x61\x6C\x6C\x73\x2C\x20\x53\x55\x4D\x28\x74\x61\x6C\x6B\x74\x69\x6D\x65\x29\x20\x61\x73\x20\x74\x61\x6C\x6B\x74\x69\x6D\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x61\x6C\x6C\x73\x2C\x20\x53\x55\x4D\x28\x68\x6F\x6C\x64\x74\x69\x6D\x65\x29\x20\x61\x73\x20\x68\x6F\x6C\x64\x74\x69\x6D\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x61\x67\x65\x6E\x74\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x61\x62\x61\x6E\x64\x6F\x6E","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x61\x63\x74\x69\x76\x65","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x62\x61\x6E\x64\x6F\x6E\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x20\x3D\x20\x31\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x77\x61\x69\x74\x69\x6E\x67","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x61\x63\x74\x69\x76\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x65\x78\x69\x74\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x61\x62\x61\x6E\x64\x6F\x6E\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x63\x6F\x6D\x70\x6C\x65\x74\x65\x20\x3D\x20\x30\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x41\x4E\x44\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C\x20\x0A\x20\x20\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x6E\x61\x6D\x65","\x6B\x65\x79\x42\x79","\x53\x45\x4C\x45\x43\x54\x20\x71\x75\x65\x75\x65\x2C\x20\x63\x6F\x75\x6E\x74\x28\x2A\x29\x20\x61\x73\x20\x77\x61\x69\x74\x69\x6E\x67\x20\x0A\x20\x20\x20\x20\x20\x20\x46\x52\x4F\x4D\x20\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x20\x0A\x20\x20\x20\x20\x20\x20\x57\x48\x45\x52\x45\x20\x71\x75\x65\x75\x65\x63\x61\x6C\x6C\x65\x72\x6C\x65\x61\x76\x65\x41\x74\x20\x49\x53\x20\x4E\x55\x4C\x4C\x20\x0A\x20\x20\x20\x20\x20\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20\x71\x75\x65\x75\x65\x3B","\x66\x69\x6E\x64\x41\x6C\x6C"];_0xb7cc[0];const _=require(_0xb7cc[1]);const config=require(_0xb7cc[2]);const sequelize=require(_0xb7cc[4])[_0xb7cc[3]];const VoiceQueue=require(_0xb7cc[4])[_0xb7cc[5]];const ReportQueue=require(_0xb7cc[4])[_0xb7cc[6]];var io=require(_0xb7cc[8])({host:config[_0xb7cc[7]],port:6379});var queues={};var outbound={};VoiceQueue[_0xb7cc[43]]({attributes:[_0xb7cc[40]],raw:true})[_0xb7cc[16]](function(_0xb3e7xa){queues= _[_0xb7cc[41]](_0xb3e7xa,_0xb7cc[40]);return sequelize[_0xb7cc[20]](_0xb7cc[42],{type:sequelize[_0xb7cc[19]][_0xb7cc[18]]})})[_0xb7cc[16]](function(_0xb3e7xa){_0xb3e7xa[_0xb7cc[26]](function(_0xb3e7xb){if(queues[_0xb3e7xb[_0xb7cc[24]]]){queues[_0xb3e7xb[_0xb7cc[24]]][_0xb7cc[38]]= _0xb3e7xb[_0xb7cc[38]]}});return sequelize[_0xb7cc[20]](_0xb7cc[39],{type:sequelize[_0xb7cc[19]][_0xb7cc[18]]})})[_0xb7cc[16]](function(_0xb3e7xa){_0xb3e7xa[_0xb7cc[26]](function(_0xb3e7xb){if(queues[_0xb3e7xb[_0xb7cc[24]]]){queues[_0xb3e7xb[_0xb7cc[24]]][_0xb7cc[36]]= _0xb3e7xb[_0xb7cc[36]]}});return sequelize[_0xb7cc[20]](_0xb7cc[37],{type:sequelize[_0xb7cc[19]][_0xb7cc[18]]})})[_0xb7cc[16]](function(_0xb3e7xa){_0xb3e7xa[_0xb7cc[26]](function(_0xb3e7xb){if(queues[_0xb3e7xb[_0xb7cc[24]]]){queues[_0xb3e7xb[_0xb7cc[24]]][_0xb7cc[34]]= _0xb3e7xb[_0xb7cc[34]]}});return sequelize[_0xb7cc[20]](_0xb7cc[35],{type:sequelize[_0xb7cc[19]][_0xb7cc[18]]})})[_0xb7cc[16]](function(_0xb3e7xa){_0xb3e7xa[_0xb7cc[26]](function(_0xb3e7xb){if(queues[_0xb3e7xb[_0xb7cc[24]]]){queues[_0xb3e7xb[_0xb7cc[24]]][_0xb7cc[32]]= _0xb3e7xb[_0xb7cc[32]]}});return sequelize[_0xb7cc[20]](_0xb7cc[33],{type:sequelize[_0xb7cc[19]][_0xb7cc[18]]})})[_0xb7cc[16]](function(_0xb3e7xa){_0xb3e7xa[_0xb7cc[26]](function(_0xb3e7xb){if(queues[_0xb3e7xb[_0xb7cc[24]]]){queues[_0xb3e7xb[_0xb7cc[24]]][_0xb7cc[30]]= _0xb3e7xb[_0xb7cc[30]]}});return sequelize[_0xb7cc[20]](_0xb7cc[31],{type:sequelize[_0xb7cc[19]][_0xb7cc[18]]})})[_0xb7cc[16]](function(_0xb3e7xa){_0xb3e7xa[_0xb7cc[26]](function(_0xb3e7xb){if(queues[_0xb3e7xb[_0xb7cc[24]]]){queues[_0xb3e7xb[_0xb7cc[24]]][_0xb7cc[28]]= _0xb3e7xb[_0xb7cc[28]]}});return sequelize[_0xb7cc[20]](_0xb7cc[29],{type:sequelize[_0xb7cc[19]][_0xb7cc[18]]})})[_0xb7cc[16]](function(_0xb3e7xa){_0xb3e7xa[_0xb7cc[26]](function(_0xb3e7xb){if(queues[_0xb3e7xb[_0xb7cc[24]]]){queues[_0xb3e7xb[_0xb7cc[24]]][_0xb7cc[25]]= _0xb3e7xb[_0xb7cc[25]]}});return sequelize[_0xb7cc[20]](_0xb7cc[27],{type:sequelize[_0xb7cc[19]][_0xb7cc[18]]})})[_0xb7cc[16]](function(_0xb3e7xa){outbound[_0xb7cc[13]]= _0xb3e7xa[0][_0xb7cc[13]];return sequelize[_0xb7cc[20]](_0xb7cc[23],{type:sequelize[_0xb7cc[19]][_0xb7cc[18]]})})[_0xb7cc[16]](function(_0xb3e7xa){outbound[_0xb7cc[21]]= _0xb3e7xa[0][_0xb7cc[21]];return sequelize[_0xb7cc[20]](_0xb7cc[22],{type:sequelize[_0xb7cc[19]][_0xb7cc[18]]})})[_0xb7cc[16]](function(_0xb3e7xa){outbound[_0xb7cc[14]]= _0xb3e7xa[0][_0xb7cc[14]]|| 0;return sequelize[_0xb7cc[20]](_0xb7cc[17],{type:sequelize[_0xb7cc[19]][_0xb7cc[18]]})})[_0xb7cc[16]](function(_0xb3e7xa){outbound[_0xb7cc[11]]= _0xb3e7xa[0][_0xb7cc[11]]|| 0;outbound[_0xb7cc[12]]= outbound[_0xb7cc[11]]?((outbound[_0xb7cc[13]]/ outbound[_0xb7cc[14]])* 100):0;require(_0xb7cc[15])(queues,outbound,io)})[_0xb7cc[10]](function(_0xb3e7x9){console[_0xb7cc[9]](_0xb3e7x9)}) \ No newline at end of file diff --git a/server/services/dashboard/workers/voice.js b/server/services/dashboard/workers/voice.js index 5f8efaf..0859358 100644 --- a/server/services/dashboard/workers/voice.js +++ b/server/services/dashboard/workers/voice.js @@ -1,226 +1 @@ -'use strict'; - -/*jshint multistr:true */ - -const _ = require('lodash'); -const util = require('util'); - -const config = require('../../../config/environment'); -const User = require('../../../models').User; -const sequelize = require('../../../models').sequelize; - -const VoiceQueue = require('../../../models').VoiceQueue; -const ReportQueue = require('../../../models').ReportQueue; - -module.exports = function(queues, outbound, io) { - function onVoiceWaitingUp(data) { - if (queues[data.queue]) { - if (!queues[data.queue].waiting) { - queues[data.queue].waiting = 0; - } - } else { - queues[data.queue] = {}; - queues[data.queue].waiting = 0; - } - - queues[data.queue].waiting++; - io.to(data.queue).emit('dashboard:voice:waiting', queues[data.queue]); - } - - function onVoiceWaitingDown(data) { - if (queues[data.queue]) { - if (!queues[data.queue].waiting) { - queues[data.queue].waiting = 0; - } else { - queues[data.queue].waiting--; - } - } else { - queues[data.queue] = {}; - queues[data.queue].waiting = 0; - } - - io.to(data.queue).emit('dashboard:voice:waiting', queues[data.queue]); - } - - function onVoiceActiveUp(data) { - if (queues[data.queue]) { - if (!queues[data.queue].active) { - queues[data.queue].active = 0; - } - } else { - queues[data.queue] = {}; - queues[data.queue].active = 0; - } - - queues[data.queue].active++; - io.to(data.queue).emit('dashboard:voice:active', queues[data.queue]); - } - - function onVoiceActiveDown(data) { - if (queues[data.queue]) { - if (!queues[data.queue].active) { - queues[data.queue].active = 0; - } else { - queues[data.queue].active--; - } - } else { - queues[data.queue] = {}; - queues[data.queue].active = 0; - } - - io.to(data.queue).emit('dashboard:voice:active', queues[data.queue]); - } - - function onVoiceAbandonUp(data) { - if (queues[data.queue]) { - if (!queues[data.queue].abandon) { - queues[data.queue].abandon = 0; - } - } else { - queues[data.queue] = {}; - queues[data.queue].abandon = 0; - } - - queues[data.queue].abandon++; - io.to(data.queue).emit('dashboard:voice:abandon', queues[data.queue]); - } - - function onVoiceCompleteUp(data) { - if (queues[data.queue]) { - if (!queues[data.queue].complete) { - queues[data.queue].complete = 0; - } - } else { - queues[data.queue] = {}; - queues[data.queue].complete = 0; - } - - queues[data.queue].complete++; - io.to(data.queue).emit('dashboard:voice:complete', queues[data.queue]); - } - - function onVoiceUnmanagedUp(data) { - if (queues[data.queue]) { - if (!queues[data.queue].unmanaged) { - queues[data.queue].unmanaged = 0; - } - } else { - queues[data.queue] = {}; - queues[data.queue].unmanaged = 0; - } - - queues[data.queue].unmanaged++; - io.to(data.queue).emit('dashboard:voice:unmanaged', queues[data.queue]); - } - - function onHoldtime(data) { - if (queues[data.queue]) { - if (!queues[data.queue].holdtime) { - queues[data.queue].holdtime = 0; - } - } else { - queues[data.queue] = {}; - queues[data.queue].holdtime = 0; - } - - queues[data.queue].holdtime += Number(data.holdtime); - - io.to(data.queue).emit('dashboard:voice:holdtime', queues[data.queue]); - } - - function onTalktime(data) { - if (queues[data.queue]) { - if (!queues[data.queue].talktime) { - queues[data.queue].talktime = 0; - } - } else { - queues[data.queue] = {}; - queues[data.queue].talktime = 0; - } - - queues[data.queue].talktime += Number(data.talktime); - - io.to(data.queue).emit('dashboard:voice:talktime', queues[data.queue]); - } - - function onOutboundUp(data) { - outbound.manualOutbound++; - if (data.answertime) { - outbound.answered++; - } - outbound.globalDuration += Number(data.duration); - outbound.avgDuration = Number(outbound.globalDuration) / Number(outbound.manualOutbound); - outbound.answerRate = (outbound.answered / outbound.manualOutbound) * 100; - - io.to('users').emit('dashboard:voice:outbound', outbound); - io.to('admins').emit('dashboard:voice:outbound', outbound); - } - - function onUpdateQueue(data) { - io.to(data.membername).emit('voice:queue:update', { - queue: data.queue, - lastcall: data.lastcall, - callstaken: data.callstaken, - loggedAt: data.loggedAt - }); - } - - function onAgentJoin(data) { - io.to(util.format('agent:%s', data.UserId)).emit('voice:queue:agent:join', { - agent: data.UserId, - queue: data.queue - }); - } - - function onAgentLeave(data) { - io.to(util.format('agent:%s', data.UserId)).emit('voice:queue:agent:leave', { - agent: data.UserId, - queue: data.queue - }); - } - - process.on('message', function(data) { - switch (data.type) { - case 'waiting:up': - onVoiceWaitingUp(data); - break; - case 'waiting:down': - onVoiceWaitingDown(data); - break; - case 'active:up': - onVoiceActiveUp(data); - break; - case 'active:down': - onVoiceActiveDown(data); - break; - case 'abandon:up': - onVoiceAbandonUp(data); - break; - case 'complete:up': - onVoiceCompleteUp(data); - break; - case 'unmanaged:up': - onVoiceUnmanagedUp(data); - break; - case 'holdtime': - onHoldtime(data); - break; - case 'talktime': - onTalktime(data); - break; - case 'outbound:up': - onOutboundUp(data); - break; - case 'lastcall': - onUpdateQueue(data); - break; - case 'agent:join': - onAgentJoin(data); - break; - case 'agent:leave': - onAgentLeave(data); - break; - default: - } - }); -}; +var _0x705a=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x55\x73\x65\x72","\x2E\x2E\x2F\x2E\x2E\x2F\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65","\x65\x78\x70\x6F\x72\x74\x73","\x71\x75\x65\x75\x65","\x77\x61\x69\x74\x69\x6E\x67","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x77\x61\x69\x74\x69\x6E\x67","\x65\x6D\x69\x74","\x74\x6F","\x61\x63\x74\x69\x76\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x61\x63\x74\x69\x76\x65","\x61\x62\x61\x6E\x64\x6F\x6E","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x61\x62\x61\x6E\x64\x6F\x6E","\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x63\x6F\x6D\x70\x6C\x65\x74\x65","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x68\x6F\x6C\x64\x74\x69\x6D\x65","\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x74\x61\x6C\x6B\x74\x69\x6D\x65","\x6D\x61\x6E\x75\x61\x6C\x4F\x75\x74\x62\x6F\x75\x6E\x64","\x61\x6E\x73\x77\x65\x72\x74\x69\x6D\x65","\x61\x6E\x73\x77\x65\x72\x65\x64","\x67\x6C\x6F\x62\x61\x6C\x44\x75\x72\x61\x74\x69\x6F\x6E","\x64\x75\x72\x61\x74\x69\x6F\x6E","\x61\x76\x67\x44\x75\x72\x61\x74\x69\x6F\x6E","\x61\x6E\x73\x77\x65\x72\x52\x61\x74\x65","\x64\x61\x73\x68\x62\x6F\x61\x72\x64\x3A\x76\x6F\x69\x63\x65\x3A\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x75\x73\x65\x72\x73","\x61\x64\x6D\x69\x6E\x73","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x75\x70\x64\x61\x74\x65","\x6C\x61\x73\x74\x63\x61\x6C\x6C","\x63\x61\x6C\x6C\x73\x74\x61\x6B\x65\x6E","\x6C\x6F\x67\x67\x65\x64\x41\x74","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x61\x67\x65\x6E\x74\x3A\x6A\x6F\x69\x6E","\x55\x73\x65\x72\x49\x64","\x61\x67\x65\x6E\x74\x3A\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x76\x6F\x69\x63\x65\x3A\x71\x75\x65\x75\x65\x3A\x61\x67\x65\x6E\x74\x3A\x6C\x65\x61\x76\x65","\x6D\x65\x73\x73\x61\x67\x65","\x77\x61\x69\x74\x69\x6E\x67\x3A\x75\x70","\x77\x61\x69\x74\x69\x6E\x67\x3A\x64\x6F\x77\x6E","\x61\x63\x74\x69\x76\x65\x3A\x75\x70","\x61\x63\x74\x69\x76\x65\x3A\x64\x6F\x77\x6E","\x61\x62\x61\x6E\x64\x6F\x6E\x3A\x75\x70","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3A\x75\x70","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64\x3A\x75\x70","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x3A\x75\x70","\x61\x67\x65\x6E\x74\x3A\x6A\x6F\x69\x6E","\x61\x67\x65\x6E\x74\x3A\x6C\x65\x61\x76\x65","\x74\x79\x70\x65","\x6F\x6E"];_0x705a[0];const _=require(_0x705a[1]);const util=require(_0x705a[2]);const config=require(_0x705a[3]);const User=require(_0x705a[5])[_0x705a[4]];const sequelize=require(_0x705a[5])[_0x705a[6]];const VoiceQueue=require(_0x705a[5])[_0x705a[7]];const ReportQueue=require(_0x705a[5])[_0x705a[8]];module[_0x705a[9]]= function(_0x8c45x8,_0x8c45x9,_0x8c45xa){function _0x8c45xb(_0x8c45xc){if(_0x8c45x8[_0x8c45xc[_0x705a[10]]]){if(!_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[11]]){_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[11]]= 0}}else {_0x8c45x8[_0x8c45xc[_0x705a[10]]]= {};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[11]]= 0};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[11]]++;_0x8c45xa[_0x705a[14]](_0x8c45xc[_0x705a[10]])[_0x705a[13]](_0x705a[12],_0x8c45x8[_0x8c45xc[_0x705a[10]]])}function _0x8c45xd(_0x8c45xc){if(_0x8c45x8[_0x8c45xc[_0x705a[10]]]){if(!_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[11]]){_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[11]]= 0}else {_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[11]]--}}else {_0x8c45x8[_0x8c45xc[_0x705a[10]]]= {};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[11]]= 0};_0x8c45xa[_0x705a[14]](_0x8c45xc[_0x705a[10]])[_0x705a[13]](_0x705a[12],_0x8c45x8[_0x8c45xc[_0x705a[10]]])}function _0x8c45xe(_0x8c45xc){if(_0x8c45x8[_0x8c45xc[_0x705a[10]]]){if(!_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[15]]){_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[15]]= 0}}else {_0x8c45x8[_0x8c45xc[_0x705a[10]]]= {};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[15]]= 0};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[15]]++;_0x8c45xa[_0x705a[14]](_0x8c45xc[_0x705a[10]])[_0x705a[13]](_0x705a[16],_0x8c45x8[_0x8c45xc[_0x705a[10]]])}function _0x8c45xf(_0x8c45xc){if(_0x8c45x8[_0x8c45xc[_0x705a[10]]]){if(!_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[15]]){_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[15]]= 0}else {_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[15]]--}}else {_0x8c45x8[_0x8c45xc[_0x705a[10]]]= {};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[15]]= 0};_0x8c45xa[_0x705a[14]](_0x8c45xc[_0x705a[10]])[_0x705a[13]](_0x705a[16],_0x8c45x8[_0x8c45xc[_0x705a[10]]])}function _0x8c45x10(_0x8c45xc){if(_0x8c45x8[_0x8c45xc[_0x705a[10]]]){if(!_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[17]]){_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[17]]= 0}}else {_0x8c45x8[_0x8c45xc[_0x705a[10]]]= {};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[17]]= 0};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[17]]++;_0x8c45xa[_0x705a[14]](_0x8c45xc[_0x705a[10]])[_0x705a[13]](_0x705a[18],_0x8c45x8[_0x8c45xc[_0x705a[10]]])}function _0x8c45x11(_0x8c45xc){if(_0x8c45x8[_0x8c45xc[_0x705a[10]]]){if(!_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[19]]){_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[19]]= 0}}else {_0x8c45x8[_0x8c45xc[_0x705a[10]]]= {};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[19]]= 0};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[19]]++;_0x8c45xa[_0x705a[14]](_0x8c45xc[_0x705a[10]])[_0x705a[13]](_0x705a[20],_0x8c45x8[_0x8c45xc[_0x705a[10]]])}function _0x8c45x12(_0x8c45xc){if(_0x8c45x8[_0x8c45xc[_0x705a[10]]]){if(!_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[21]]){_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[21]]= 0}}else {_0x8c45x8[_0x8c45xc[_0x705a[10]]]= {};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[21]]= 0};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[21]]++;_0x8c45xa[_0x705a[14]](_0x8c45xc[_0x705a[10]])[_0x705a[13]](_0x705a[22],_0x8c45x8[_0x8c45xc[_0x705a[10]]])}function _0x8c45x13(_0x8c45xc){if(_0x8c45x8[_0x8c45xc[_0x705a[10]]]){if(!_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[23]]){_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[23]]= 0}}else {_0x8c45x8[_0x8c45xc[_0x705a[10]]]= {};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[23]]= 0};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[23]]+= Number(_0x8c45xc[_0x705a[23]]);_0x8c45xa[_0x705a[14]](_0x8c45xc[_0x705a[10]])[_0x705a[13]](_0x705a[24],_0x8c45x8[_0x8c45xc[_0x705a[10]]])}function _0x8c45x14(_0x8c45xc){if(_0x8c45x8[_0x8c45xc[_0x705a[10]]]){if(!_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[25]]){_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[25]]= 0}}else {_0x8c45x8[_0x8c45xc[_0x705a[10]]]= {};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[25]]= 0};_0x8c45x8[_0x8c45xc[_0x705a[10]]][_0x705a[25]]+= Number(_0x8c45xc[_0x705a[25]]);_0x8c45xa[_0x705a[14]](_0x8c45xc[_0x705a[10]])[_0x705a[13]](_0x705a[26],_0x8c45x8[_0x8c45xc[_0x705a[10]]])}function _0x8c45x15(_0x8c45xc){_0x8c45x9[_0x705a[27]]++;if(_0x8c45xc[_0x705a[28]]){_0x8c45x9[_0x705a[29]]++};_0x8c45x9[_0x705a[30]]+= Number(_0x8c45xc[_0x705a[31]]);_0x8c45x9[_0x705a[32]]= Number(_0x8c45x9[_0x705a[30]])/ Number(_0x8c45x9[_0x705a[27]]);_0x8c45x9[_0x705a[33]]= (_0x8c45x9[_0x705a[29]]/ _0x8c45x9[_0x705a[27]])* 100;_0x8c45xa[_0x705a[14]](_0x705a[35])[_0x705a[13]](_0x705a[34],_0x8c45x9);_0x8c45xa[_0x705a[14]](_0x705a[36])[_0x705a[13]](_0x705a[34],_0x8c45x9)}function _0x8c45x16(_0x8c45xc){_0x8c45xa[_0x705a[14]](_0x8c45xc[_0x705a[41]])[_0x705a[13]](_0x705a[37],{queue:_0x8c45xc[_0x705a[10]],lastcall:_0x8c45xc[_0x705a[38]],callstaken:_0x8c45xc[_0x705a[39]],loggedAt:_0x8c45xc[_0x705a[40]]})}function _0x8c45x17(_0x8c45xc){_0x8c45xa[_0x705a[14]](util[_0x705a[45]](_0x705a[44],_0x8c45xc.UserId))[_0x705a[13]](_0x705a[42],{agent:_0x8c45xc[_0x705a[43]],queue:_0x8c45xc[_0x705a[10]]})}function _0x8c45x18(_0x8c45xc){_0x8c45xa[_0x705a[14]](util[_0x705a[45]](_0x705a[44],_0x8c45xc.UserId))[_0x705a[13]](_0x705a[46],{agent:_0x8c45xc[_0x705a[43]],queue:_0x8c45xc[_0x705a[10]]})}process[_0x705a[59]](_0x705a[47],function(_0x8c45xc){switch(_0x8c45xc[_0x705a[58]]){case _0x705a[48]:_0x8c45xb(_0x8c45xc);break;case _0x705a[49]:_0x8c45xd(_0x8c45xc);break;case _0x705a[50]:_0x8c45xe(_0x8c45xc);break;case _0x705a[51]:_0x8c45xf(_0x8c45xc);break;case _0x705a[52]:_0x8c45x10(_0x8c45xc);break;case _0x705a[53]:_0x8c45x11(_0x8c45xc);break;case _0x705a[54]:_0x8c45x12(_0x8c45xc);break;case _0x705a[23]:_0x8c45x13(_0x8c45xc);break;case _0x705a[25]:_0x8c45x14(_0x8c45xc);break;case _0x705a[55]:_0x8c45x15(_0x8c45xc);break;case _0x705a[38]:_0x8c45x16(_0x8c45xc);break;case _0x705a[56]:_0x8c45x17(_0x8c45xc);break;case _0x705a[57]:_0x8c45x18(_0x8c45xc);break;default:}})} \ No newline at end of file diff --git a/server/utils/report_build.js b/server/utils/report_build.js index e53c3c3..7888dfb 100644 --- a/server/utils/report_build.js +++ b/server/utils/report_build.js @@ -1,539 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var User = require('../models').User; -var Promise = require('bluebird'); -var Util = require('../config/util'); -var sequelize = require('../models').sequelize; - -function getTable(table) { - var tableModel; - switch (table) { - case 'report_agent_history': - case 'report_agent_history': - tableModel = require('../models').history.ReportAgentHistory; - break; - case 'report_mail_session': - case 'report_mail_session_history': - tableModel = require('../models').ReportMailSession; - break; - case 'report_queue': - case 'report_queue_history': - tableModel = require('../models').history.ReportQueueHistory; - break; - case 'report_chat_session': - case 'report_chat_session_history': - tableModel = require('../models').history.ReportChatSessionHistory; - break; - case 'report_call': - case 'report_call_history': - tableModel = require('../models').history.ReportCallHistory; - break; - case 'report_member': - case 'report_member_history': - tableModel = require('../models').history.ReportMemberHistory; - break; - case 'report_integration': - case 'report_integration_history': - tableModel = require('../models').history.ReportIntegrationHistory; - break; - case 'report_sms_session': - case 'report_sms_session_history': - tableModel = require('../models').history.ReportSmsSessionHistory; - break; - case 'cm_contacts': - tableModel = require('../models').Contact; - break; - case 'voice_recordings': - tableModel = require('../models').VoiceRecording; - break; - case 'report_square': - case 'report_square_history': - tableModel = require('../models').history.ReportSquareHistory; - break; - case 'report_square_details': - case 'report_square_details_history': - tableModel = require('../models').history.ReportSquareDetailHistory; - break; - case 'users': - tableModel = require('../models').User; - break; - case 'report_fax_session': - case 'report_fax_session_history': - tableModel = require('../models').history.ReportFaxSessionHistory; - break; - case 'mail_rooms': - tableModel = require('../models').MailRoom; - break; - case 'mail_messages': - tableModel = require('../models').MailMessage; - break; - case 'fax_rooms': - tableModel = require('../models').FaxRoom; - break; - case 'fax_messages': - tableModel = require('../models').FaxMessage; - break; - case 'chat_rooms': - tableModel = require('../models').ChatRoom; - break; - case 'chat_messages': - tableModel = require('../models').ChatMessage; - break; - case 'sms_rooms': - tableModel = require('../models').SmsRoom; - break; - case 'sms_messages': - tableModel = require('../models').SmsMessage; - break; - case 'openchannel_rooms': - tableModel = require('../models').OpenchannelRoom; - break; - case 'openchannel_messages': - tableModel = require('../models').OpenchannelMessage; - break; - default: - } - return tableModel; -} - -exports.getTable = getTable; - -exports.buildFilter = function(reqUser) { - return function(table) { - switch (reqUser.role) { - case 'user': - var filter = ''; - var checkTable = table.replace('_history', ''); - - switch (checkTable) { - case 'report_mail_session': - var _mailQueues; - return User - .findById(reqUser.id, { - attributes: ['id'] - }) - .then(Util.getMailQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var users = []; - _mailQueues = _.map(queues.rows, 'id'); - queues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return users; - }) - .then(function(agents) { - if (_mailQueues.length && agents.length) { - filter = '(queue IN (' + _mailQueues.join(",") + ')'; - filter += ' OR memberid IN (\'' + agents.join("','") + '\'))'; - } else if (_mailQueues.length) { - filter = 'queue IN (' + _mailQueues.join(",") + ')'; - } else { - filter = 'empty'; - } - console.log('==== USER FILTER ====', filter); - return filter; - }) - case 'report_member': - var _voiceQueues; - return User - .findById(reqUser.id, { - attributes: ['id'] - }) - .then(Util.getVoiceQueuesIdByUser({}, { - attributes: ['name'], - include: [{ - raw: true, - model: User, - attributes: ['name'] - }] - })) - .then(function(queues) { - var users = []; - queues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'name')); - }); - return users; - }) - .then(function(agents) { - if (agents.length) { - filter = 'membername IN (\'' + agents.join("','") + '\')'; - } else { - filter = 'empty'; - } - console.log('==== USER FILTER ====', filter); - return filter; - }) - case 'report_agent': - case 'report_queue': - return User - .findById(reqUser.id, { - attributes: ['id'] - }) - .then(Util.getVoiceQueuesIdByUser()) - .then(function(voiceQueues) { - if (voiceQueues.rows.length) { - voiceQueues = _.map(voiceQueues.rows, 'name'); - filter = 'queue IN (\'' + voiceQueues.join("','") + '\')'; - } else { - filter = 'empty'; - } - console.log('==== USER FILTER ====', filter); - return filter; - }) - case 'report_chat_session': - var _chatQueues; - return User - .findById(reqUser.id, { - attributes: ['id'] - }) - .then(Util.getChatQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var users = []; - _chatQueues = _.map(queues.rows, 'id'); - queues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return users; - }) - .then(function(agents) { - if (_chatQueues.length && agents.length) { - filter = '(queue IN (' + _chatQueues.join(",") + ')'; - filter += ' OR memberid IN (\'' + agents.join("','") + '\'))'; - } else if (_chatQueues.length) { - filter = 'queue IN (' + _chatQueues.join(",") + ')'; - } else { - filter = 'empty'; - } - console.log('==== USER FILTER ====', filter); - return filter; - }) - case 'report_fax_session': - var _faxQueues; - return User - .findById(reqUser.id, { - attributes: ['id'] - }) - .then(Util.getFaxQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var users = []; - _faxQueues = _.map(queues.rows, 'id'); - queues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return users; - }) - .then(function(agents) { - if (_faxQueues.length && agents.length) { - filter = '(queue IN (' + _faxQueues.join(",") + ')'; - filter += ' OR memberid IN (\'' + agents.join("','") + '\'))'; - } else if (_faxQueues.length) { - filter = 'queue IN (' + _faxQueues.join(",") + ')'; - } else { - filter = 'empty'; - } - console.log('==== USER FILTER ====', filter); - return filter; - }) - case 'report_sms_session': - var _smsQueues; - return User - .findById(reqUser.id, { - attributes: ['id'] - }) - .then(Util.getSmsQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var users = []; - _smsQueues = _.map(queues.rows, 'id'); - queues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return users; - }) - .then(function(agents) { - if (_smsQueues.length && agents.length) { - filter = '(queue IN (' + _smsQueues.join(",") + ')'; - filter += ' OR memberid IN (\'' + agents.join("','") + '\'))'; - } else if (_smsQueues.length) { - filter = 'queue IN (' + _smsQueues.join(",") + ')'; - } else { - filter = 'empty'; - } - console.log('==== USER FILTER ====', filter); - return filter; - }) - case 'report_openchannel_session': - var _openchannelQueues; - return User - .findById(reqUser.id, { - attributes: ['id'] - }) - .then(Util.getOpenchannelQueuesIdByUser({}, { - attributes: ['id'], - include: [{ - raw: true, - model: User, - attributes: ['id'] - }] - })) - .then(function(queues) { - var users = []; - _openchannelQueues = _.map(queues.rows, 'id'); - queues.rows.forEach(function(queue) { - users = _.union(users, _.map(queue.Users, 'id')); - }); - return users; - }) - .then(function(agents) { - if (_openchannelQueues.length && agents.length) { - filter = '(queue IN (' + _openchannelQueues.join(",") + ')'; - filter += ' OR memberid IN (\'' + agents.join("','") + '\'))'; - } else if (_openchannelQueues.length) { - filter = 'queue IN (' + _openchannelQueues.join(",") + ')'; - } else { - filter = 'empty'; - } - console.log('==== USER FILTER ====', filter); - return filter; - }) - case 'report_integration': - case 'report_call': - return Promise - .all([]) - .then(function() { - return null; - }) - default: - return Promise - .all([]) - .then(function() { - return null; - }) - } - break; - default: - return Promise - .all([]) - .then(function() { - return null; - }) - } - } -} - -exports.buildQuery = function(query) { - return function(userFilter, report) { - var tableModel = getTable(report.table); - return tableModel - .describe() - .then(function(tableFields) { - var _tableFields = _.keys(tableFields); - var fields = [], - groupBy = [], - orderBy = []; - _.forEach(report.Fields, function(elem) { - if (!elem.MetricId && !elem.custom) { - elem.field = '`' + elem.field + '`'; - } - var field = ''; - if (elem.function) { - switch (elem.function) { - case 'COUNT DISTINCT': - field = util.format('COUNT(DISTINCT %s)', elem.field); - break; - case 'GROUP_CONCAT ASC': - field = util.format('GROUP_CONCAT(%s ORDER BY %s ASC)', elem.field, elem.field); - break; - case 'GROUP_CONCAT DESC': - field = util.format('GROUP_CONCAT(%s ORDER BY %s DESC)', elem.field, elem.field); - break; - default: - field = util.format('%s(%s)', elem.function, elem.field); - } - } else { - field = elem.field; - } - if (field.indexOf('DATE(') === 0) { - field = util.format('CAST(%s AS char)', field); //same cast as the previous switch in case of custom field with DATE function - } - if (elem.format) { - switch (elem.format) { - case 'DATE': - field = util.format('CAST(%s(%s) AS char)', elem.format, field); //CAST return the date as string instead of as a Date object, so the latter processing will not convert it in the standard choosen format - break; - default: - field = util.format('%s(%s)', elem.format, field); - } - - } - fields.push(util.format('%s AS \'%s\'', field, elem.alias)); - if (elem.groupBy) { - groupBy.push(field); - } - if (elem.orderBy) { - orderBy.push(util.format('%s %s', field, elem.orderBy)); - } - }); - - var conditions = report.conditions ? getConditions(JSON.parse(report.conditions).group, _tableFields) : '()'; - var resultQuery = 'SELECT'; - // query += fields.length ? ' ' + fields.join(',') : ' *';//right if you want to select all fields also - resultQuery += ' ' + fields.join(','); //generate a wrong query if there isn' t any field - switch (report.table) { - case 'report_mail_session_history': - report.table = report.table.replace('_history', ''); - break; - default: - } - resultQuery += ' FROM ' + report.table; - resultQuery += conditions !== '()' ? ' WHERE ' + conditions : ''; - var startDate, endDate, startTime, endTime; - var otherConditions = []; - if (query) { - _.forOwn(query, function(value, key) { - switch (key) { - case 'startDate': - startDate = value; - break; - case 'endDate': - endDate = value; - break; - case 'startTime': - startTime = value; - break; - case 'endTime': - endTime = value; - break; - case 'offset': - case 'limit': - break; - default: - var column = _.find(report.Fields, { - alias: key - }); - if (column) { - otherConditions.push(column.field + ' LIKE \'%' + value + '%\''); - } else { - otherConditions.push(key + ' LIKE \'%' + value + '%\''); - } - } - }); - } - var fieldFormat = 'DATE_FORMAT(createdAt,\'%Y-%m-%d %H:%i\')'; - console.log(startDate, endDate, startTime, endTime); - if (startDate && endDate) { - if (startDate === endDate) { - if (startTime || endTime) { - console.log(startDate, endDate, startTime, endTime); - otherConditions.push(util.format(' (%s BETWEEN \'%s\' AND \'%s\')', fieldFormat, startDate + (startTime ? ' ' + startTime : ' 00:00'), endDate + (endTime ? ' ' + endTime : - ' 23:59'))); - } else { - otherConditions.push(util.format(' %s = \'%s\'', fieldFormat, startDate)); - } - } else { - otherConditions.push(util.format(' (%s BETWEEN \'%s\' AND \'%s\')', fieldFormat, startDate + (startTime ? ' ' + startTime : ' 00:00'), endDate + (endTime ? ' ' + endTime : ' 23:59'))); - } - } else if (startDate) { - otherConditions.push(util.format(' %s >= \'%s\')', fieldFormat, startDate + (startTime ? ' ' + startTime : ' 00:00'))); - } else if (endDate) { - otherConditions.push(util.format(' %s <= \'%s\')', fieldFormat, endDate + (endTime ? ' ' + endTime : ' 23:59'))); - } - if (otherConditions.length) { - resultQuery += ((conditions !== '()') ? ' AND ' : ' WHERE ') + otherConditions.join(' AND '); - } - - - if (userFilter) { - if (userFilter === 'empty') { - console.log(' ==== RESULTING QUERY ===='); - console.log('NO SUFFICIENT PERMISSIONS'); - console.log(' ========================='); - return 'permission'; - } - resultQuery += ((conditions !== '()' || otherConditions.length) ? ' AND ' : ' WHERE ') + userFilter; - } - resultQuery += groupBy.length ? ' GROUP BY ' + groupBy.join(',') : ''; - resultQuery += orderBy.length ? ' ORDER BY ' + orderBy.join(',') : ''; - - console.log(' ==== RESULTING QUERY ===='); - console.log(resultQuery); - console.log(' ========================='); - return resultQuery; - }) - } -} - -exports.checkQuery = function() { - return function(query) { - if (query) { - var result = ''; - switch (query) { - case 'permission': - result = 'No sufficient queue permissions for the user'; - break; - default: - result = sequelize.query(query, { - type: sequelize.QueryTypes.SELECT - }); - } - return result; - } - return query; - } -} - -function getConditions(group, tableFields) { - if (!group) return '()'; - for (var str = '(', i = 0; i < group.rules.length; i++) { - i > 0 && (str += ' ' + group.operator + ' '); - if (group.rules[i].group) { - str += getConditions(group.rules[i].group, tableFields); - } else { - str += _.includes(tableFields, group.rules[i].field) ? '`' + group.rules[i].field + '`' : group.rules[i].field; - switch (group.rules[i].condition) { - case 'IS NULL': - case 'IS NOT NULL': - str += " " + group.rules[i].condition; - break; - case 'IS EMPTY': - str += " = ''"; - break; - case 'IS NOT EMPTY': - str += " != ''"; - break; - default: - str += " " + group.rules[i].condition + " " + group.rules[i].value + ""; - } - } - } - return str + ')'; -} +var _0x8d84=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x55\x73\x65\x72","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x62\x6C\x75\x65\x62\x69\x72\x64","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x75\x74\x69\x6C","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74\x5F\x68\x69\x73\x74\x6F\x72\x79","\x52\x65\x70\x6F\x72\x74\x41\x67\x65\x6E\x74\x48\x69\x73\x74\x6F\x72\x79","\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x4D\x61\x69\x6C\x53\x65\x73\x73\x69\x6F\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65","\x52\x65\x70\x6F\x72\x74\x51\x75\x65\x75\x65\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x71\x75\x65\x75\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x43\x68\x61\x74\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C","\x52\x65\x70\x6F\x72\x74\x43\x61\x6C\x6C\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x63\x61\x6C\x6C\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72","\x52\x65\x70\x6F\x72\x74\x4D\x65\x6D\x62\x65\x72\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x65\x6D\x62\x65\x72\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x49\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x69\x6E\x74\x65\x67\x72\x61\x74\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x53\x6D\x73\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x43\x6F\x6E\x74\x61\x63\x74","\x63\x6D\x5F\x63\x6F\x6E\x74\x61\x63\x74\x73","\x56\x6F\x69\x63\x65\x52\x65\x63\x6F\x72\x64\x69\x6E\x67","\x76\x6F\x69\x63\x65\x5F\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x73","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73","\x52\x65\x70\x6F\x72\x74\x53\x71\x75\x61\x72\x65\x44\x65\x74\x61\x69\x6C\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x73\x71\x75\x61\x72\x65\x5F\x64\x65\x74\x61\x69\x6C\x73\x5F\x68\x69\x73\x74\x6F\x72\x79","\x75\x73\x65\x72\x73","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x52\x65\x70\x6F\x72\x74\x46\x61\x78\x53\x65\x73\x73\x69\x6F\x6E\x48\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E\x5F\x68\x69\x73\x74\x6F\x72\x79","\x4D\x61\x69\x6C\x52\x6F\x6F\x6D","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73","\x4D\x61\x69\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6D\x61\x69\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x46\x61\x78\x52\x6F\x6F\x6D","\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73","\x46\x61\x78\x4D\x65\x73\x73\x61\x67\x65","\x66\x61\x78\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x43\x68\x61\x74\x52\x6F\x6F\x6D","\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x73","\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x68\x61\x74\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x53\x6D\x73\x52\x6F\x6F\x6D","\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x73","\x53\x6D\x73\x4D\x65\x73\x73\x61\x67\x65","\x73\x6D\x73\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x52\x6F\x6F\x6D","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x72\x6F\x6F\x6D\x73","\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x4D\x65\x73\x73\x61\x67\x65","\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x6D\x65\x73\x73\x61\x67\x65\x73","\x67\x65\x74\x54\x61\x62\x6C\x65","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","","\x5F\x68\x69\x73\x74\x6F\x72\x79","\x72\x65\x70\x6C\x61\x63\x65","\x6C\x65\x6E\x67\x74\x68","\x28\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28","\x2C","\x6A\x6F\x69\x6E","\x29","\x20\x4F\x52\x20\x6D\x65\x6D\x62\x65\x72\x69\x64\x20\x49\x4E\x20\x28\x27","\x27\x2C\x27","\x27\x29\x29","\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28","\x65\x6D\x70\x74\x79","\x3D\x3D\x3D\x3D\x20\x55\x53\x45\x52\x20\x46\x49\x4C\x54\x45\x52\x20\x3D\x3D\x3D\x3D","\x6C\x6F\x67","\x74\x68\x65\x6E","\x72\x6F\x77\x73","\x69\x64","\x6D\x61\x70","\x75\x6E\x69\x6F\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x67\x65\x74\x4D\x61\x69\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6D\x65\x6D\x62\x65\x72\x6E\x61\x6D\x65\x20\x49\x4E\x20\x28\x27","\x27\x29","\x6E\x61\x6D\x65","\x67\x65\x74\x56\x6F\x69\x63\x65\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x70\x6F\x72\x74\x5F\x61\x67\x65\x6E\x74","\x71\x75\x65\x75\x65\x20\x49\x4E\x20\x28\x27","\x67\x65\x74\x43\x68\x61\x74\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x46\x61\x78\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x53\x6D\x73\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x67\x65\x74\x4F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x51\x75\x65\x75\x65\x73\x49\x64\x42\x79\x55\x73\x65\x72","\x72\x65\x70\x6F\x72\x74\x5F\x6F\x70\x65\x6E\x63\x68\x61\x6E\x6E\x65\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x61\x6C\x6C","\x75\x73\x65\x72","\x72\x6F\x6C\x65","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x74\x61\x62\x6C\x65","\x6B\x65\x79\x73","\x4D\x65\x74\x72\x69\x63\x49\x64","\x63\x75\x73\x74\x6F\x6D","\x66\x69\x65\x6C\x64","\x60","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x43\x4F\x55\x4E\x54\x28\x44\x49\x53\x54\x49\x4E\x43\x54\x20\x25\x73\x29","\x66\x6F\x72\x6D\x61\x74","\x43\x4F\x55\x4E\x54\x20\x44\x49\x53\x54\x49\x4E\x43\x54","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x41\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x41\x53\x43","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x28\x25\x73\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20\x25\x73\x20\x44\x45\x53\x43\x29","\x47\x52\x4F\x55\x50\x5F\x43\x4F\x4E\x43\x41\x54\x20\x44\x45\x53\x43","\x25\x73\x28\x25\x73\x29","\x44\x41\x54\x45\x28","\x69\x6E\x64\x65\x78\x4F\x66","\x43\x41\x53\x54\x28\x25\x73\x20\x41\x53\x20\x63\x68\x61\x72\x29","\x43\x41\x53\x54\x28\x25\x73\x28\x25\x73\x29\x20\x41\x53\x20\x63\x68\x61\x72\x29","\x44\x41\x54\x45","\x25\x73\x20\x41\x53\x20\x27\x25\x73\x27","\x61\x6C\x69\x61\x73","\x70\x75\x73\x68","\x67\x72\x6F\x75\x70\x42\x79","\x6F\x72\x64\x65\x72\x42\x79","\x25\x73\x20\x25\x73","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E\x73","\x67\x72\x6F\x75\x70","\x70\x61\x72\x73\x65","\x28\x29","\x53\x45\x4C\x45\x43\x54","\x20","\x20\x46\x52\x4F\x4D\x20","\x20\x57\x48\x45\x52\x45\x20","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x65\x6E\x64\x44\x61\x74\x65","\x73\x74\x61\x72\x74\x54\x69\x6D\x65","\x65\x6E\x64\x54\x69\x6D\x65","\x6F\x66\x66\x73\x65\x74","\x6C\x69\x6D\x69\x74","\x66\x69\x6E\x64","\x20\x4C\x49\x4B\x45\x20\x27\x25","\x25\x27","\x66\x6F\x72\x4F\x77\x6E","\x44\x41\x54\x45\x5F\x46\x4F\x52\x4D\x41\x54\x28\x63\x72\x65\x61\x74\x65\x64\x41\x74\x2C\x27\x25\x59\x2D\x25\x6D\x2D\x25\x64\x20\x25\x48\x3A\x25\x69\x27\x29","\x20\x28\x25\x73\x20\x42\x45\x54\x57\x45\x45\x4E\x20\x27\x25\x73\x27\x20\x41\x4E\x44\x20\x27\x25\x73\x27\x29","\x20\x30\x30\x3A\x30\x30","\x20\x32\x33\x3A\x35\x39","\x20\x25\x73\x20\x3D\x20\x27\x25\x73\x27","\x20\x25\x73\x20\x3E\x3D\x20\x27\x25\x73\x27\x29","\x20\x25\x73\x20\x3C\x3D\x20\x27\x25\x73\x27\x29","\x20\x41\x4E\x44\x20","\x20\x3D\x3D\x3D\x3D\x20\x52\x45\x53\x55\x4C\x54\x49\x4E\x47\x20\x51\x55\x45\x52\x59\x20\x3D\x3D\x3D\x3D","\x4E\x4F\x20\x53\x55\x46\x46\x49\x43\x49\x45\x4E\x54\x20\x50\x45\x52\x4D\x49\x53\x53\x49\x4F\x4E\x53","\x20\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D\x3D","\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E","\x20\x47\x52\x4F\x55\x50\x20\x42\x59\x20","\x20\x4F\x52\x44\x45\x52\x20\x42\x59\x20","\x64\x65\x73\x63\x72\x69\x62\x65","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x4E\x6F\x20\x73\x75\x66\x66\x69\x63\x69\x65\x6E\x74\x20\x71\x75\x65\x75\x65\x20\x70\x65\x72\x6D\x69\x73\x73\x69\x6F\x6E\x73\x20\x66\x6F\x72\x20\x74\x68\x65\x20\x75\x73\x65\x72","\x51\x75\x65\x72\x79\x54\x79\x70\x65\x73","\x71\x75\x65\x72\x79","\x28","\x72\x75\x6C\x65\x73","\x6F\x70\x65\x72\x61\x74\x6F\x72","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x49\x53\x20\x4E\x55\x4C\x4C","\x63\x6F\x6E\x64\x69\x74\x69\x6F\x6E","\x49\x53\x20\x4E\x4F\x54\x20\x4E\x55\x4C\x4C","\x20\x3D\x20\x27\x27","\x49\x53\x20\x45\x4D\x50\x54\x59","\x20\x21\x3D\x20\x27\x27","\x49\x53\x20\x4E\x4F\x54\x20\x45\x4D\x50\x54\x59","\x76\x61\x6C\x75\x65"];_0x8d84[0];var _=require(_0x8d84[1]);var util=require(_0x8d84[2]);var User=require(_0x8d84[4])[_0x8d84[3]];var Promise=require(_0x8d84[5]);var Util=require(_0x8d84[6]);var sequelize=require(_0x8d84[4])[_0x8d84[7]];function getTable(_0x5ffdx8){var _0x5ffdx9;switch(_0x5ffdx8){case _0x8d84[8]:;case _0x8d84[8]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[10]][_0x8d84[9]];break;case _0x8d84[11]:;case _0x8d84[13]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[12]];break;case _0x8d84[14]:;case _0x8d84[16]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[10]][_0x8d84[15]];break;case _0x8d84[17]:;case _0x8d84[19]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[10]][_0x8d84[18]];break;case _0x8d84[20]:;case _0x8d84[22]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[10]][_0x8d84[21]];break;case _0x8d84[23]:;case _0x8d84[25]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[10]][_0x8d84[24]];break;case _0x8d84[26]:;case _0x8d84[28]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[10]][_0x8d84[27]];break;case _0x8d84[29]:;case _0x8d84[31]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[10]][_0x8d84[30]];break;case _0x8d84[33]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[32]];break;case _0x8d84[35]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[34]];break;case _0x8d84[36]:;case _0x8d84[38]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[10]][_0x8d84[37]];break;case _0x8d84[39]:;case _0x8d84[41]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[10]][_0x8d84[40]];break;case _0x8d84[42]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[3]];break;case _0x8d84[43]:;case _0x8d84[45]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[10]][_0x8d84[44]];break;case _0x8d84[47]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[46]];break;case _0x8d84[49]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[48]];break;case _0x8d84[51]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[50]];break;case _0x8d84[53]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[52]];break;case _0x8d84[55]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[54]];break;case _0x8d84[57]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[56]];break;case _0x8d84[59]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[58]];break;case _0x8d84[61]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[60]];break;case _0x8d84[63]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[62]];break;case _0x8d84[65]:_0x5ffdx9= require(_0x8d84[4])[_0x8d84[64]];break;default:};return _0x5ffdx9}exports[_0x8d84[66]]= getTable;exports[_0x8d84[67]]= function(_0x5ffdxa){return function(_0x5ffdx8){switch(_0x5ffdxa[_0x8d84[104]]){case _0x8d84[103]:var _0x5ffdxb=_0x8d84[68];var _0x5ffdxc=_0x5ffdx8[_0x8d84[70]](_0x8d84[69],_0x8d84[68]);switch(_0x5ffdxc){case _0x8d84[11]:var _0x5ffdxd;return User[_0x8d84[90]](_0x5ffdxa[_0x8d84[85]],{attributes:[_0x8d84[85]]})[_0x8d84[83]](Util[_0x8d84[89]]({},{attributes:[_0x8d84[85]],include:[{raw:true,model:User,attributes:[_0x8d84[85]]}]}))[_0x8d84[83]](function(_0x5ffdxf){var _0x5ffdx10=[];_0x5ffdxd= _[_0x8d84[86]](_0x5ffdxf[_0x8d84[84]],_0x8d84[85]);_0x5ffdxf[_0x8d84[84]][_0x8d84[88]](function(_0x5ffdx11){_0x5ffdx10= _[_0x8d84[87]](_0x5ffdx10,_[_0x8d84[86]](_0x5ffdx11.Users,_0x8d84[85]))});return _0x5ffdx10})[_0x8d84[83]](function(_0x5ffdxe){if(_0x5ffdxd[_0x8d84[71]]&& _0x5ffdxe[_0x8d84[71]]){_0x5ffdxb= _0x8d84[72]+ _0x5ffdxd[_0x8d84[74]](_0x8d84[73])+ _0x8d84[75];_0x5ffdxb+= _0x8d84[76]+ _0x5ffdxe[_0x8d84[74]](_0x8d84[77])+ _0x8d84[78]}else {if(_0x5ffdxd[_0x8d84[71]]){_0x5ffdxb= _0x8d84[79]+ _0x5ffdxd[_0x8d84[74]](_0x8d84[73])+ _0x8d84[75]}else {_0x5ffdxb= _0x8d84[80]}};console[_0x8d84[82]](_0x8d84[81],_0x5ffdxb);return _0x5ffdxb});case _0x8d84[23]:var _0x5ffdx12;return User[_0x8d84[90]](_0x5ffdxa[_0x8d84[85]],{attributes:[_0x8d84[85]]})[_0x8d84[83]](Util[_0x8d84[94]]({},{attributes:[_0x8d84[93]],include:[{raw:true,model:User,attributes:[_0x8d84[93]]}]}))[_0x8d84[83]](function(_0x5ffdxf){var _0x5ffdx10=[];_0x5ffdxf[_0x8d84[84]][_0x8d84[88]](function(_0x5ffdx11){_0x5ffdx10= _[_0x8d84[87]](_0x5ffdx10,_[_0x8d84[86]](_0x5ffdx11.Users,_0x8d84[93]))});return _0x5ffdx10})[_0x8d84[83]](function(_0x5ffdxe){if(_0x5ffdxe[_0x8d84[71]]){_0x5ffdxb= _0x8d84[91]+ _0x5ffdxe[_0x8d84[74]](_0x8d84[77])+ _0x8d84[92]}else {_0x5ffdxb= _0x8d84[80]};console[_0x8d84[82]](_0x8d84[81],_0x5ffdxb);return _0x5ffdxb});case _0x8d84[95]:;case _0x8d84[14]:return User[_0x8d84[90]](_0x5ffdxa[_0x8d84[85]],{attributes:[_0x8d84[85]]})[_0x8d84[83]](Util[_0x8d84[94]]())[_0x8d84[83]](function(_0x5ffdx13){if(_0x5ffdx13[_0x8d84[84]][_0x8d84[71]]){_0x5ffdx13= _[_0x8d84[86]](_0x5ffdx13[_0x8d84[84]],_0x8d84[93]);_0x5ffdxb= _0x8d84[96]+ _0x5ffdx13[_0x8d84[74]](_0x8d84[77])+ _0x8d84[92]}else {_0x5ffdxb= _0x8d84[80]};console[_0x8d84[82]](_0x8d84[81],_0x5ffdxb);return _0x5ffdxb});case _0x8d84[17]:var _0x5ffdx14;return User[_0x8d84[90]](_0x5ffdxa[_0x8d84[85]],{attributes:[_0x8d84[85]]})[_0x8d84[83]](Util[_0x8d84[97]]({},{attributes:[_0x8d84[85]],include:[{raw:true,model:User,attributes:[_0x8d84[85]]}]}))[_0x8d84[83]](function(_0x5ffdxf){var _0x5ffdx10=[];_0x5ffdx14= _[_0x8d84[86]](_0x5ffdxf[_0x8d84[84]],_0x8d84[85]);_0x5ffdxf[_0x8d84[84]][_0x8d84[88]](function(_0x5ffdx11){_0x5ffdx10= _[_0x8d84[87]](_0x5ffdx10,_[_0x8d84[86]](_0x5ffdx11.Users,_0x8d84[85]))});return _0x5ffdx10})[_0x8d84[83]](function(_0x5ffdxe){if(_0x5ffdx14[_0x8d84[71]]&& _0x5ffdxe[_0x8d84[71]]){_0x5ffdxb= _0x8d84[72]+ _0x5ffdx14[_0x8d84[74]](_0x8d84[73])+ _0x8d84[75];_0x5ffdxb+= _0x8d84[76]+ _0x5ffdxe[_0x8d84[74]](_0x8d84[77])+ _0x8d84[78]}else {if(_0x5ffdx14[_0x8d84[71]]){_0x5ffdxb= _0x8d84[79]+ _0x5ffdx14[_0x8d84[74]](_0x8d84[73])+ _0x8d84[75]}else {_0x5ffdxb= _0x8d84[80]}};console[_0x8d84[82]](_0x8d84[81],_0x5ffdxb);return _0x5ffdxb});case _0x8d84[43]:var _0x5ffdx15;return User[_0x8d84[90]](_0x5ffdxa[_0x8d84[85]],{attributes:[_0x8d84[85]]})[_0x8d84[83]](Util[_0x8d84[98]]({},{attributes:[_0x8d84[85]],include:[{raw:true,model:User,attributes:[_0x8d84[85]]}]}))[_0x8d84[83]](function(_0x5ffdxf){var _0x5ffdx10=[];_0x5ffdx15= _[_0x8d84[86]](_0x5ffdxf[_0x8d84[84]],_0x8d84[85]);_0x5ffdxf[_0x8d84[84]][_0x8d84[88]](function(_0x5ffdx11){_0x5ffdx10= _[_0x8d84[87]](_0x5ffdx10,_[_0x8d84[86]](_0x5ffdx11.Users,_0x8d84[85]))});return _0x5ffdx10})[_0x8d84[83]](function(_0x5ffdxe){if(_0x5ffdx15[_0x8d84[71]]&& _0x5ffdxe[_0x8d84[71]]){_0x5ffdxb= _0x8d84[72]+ _0x5ffdx15[_0x8d84[74]](_0x8d84[73])+ _0x8d84[75];_0x5ffdxb+= _0x8d84[76]+ _0x5ffdxe[_0x8d84[74]](_0x8d84[77])+ _0x8d84[78]}else {if(_0x5ffdx15[_0x8d84[71]]){_0x5ffdxb= _0x8d84[79]+ _0x5ffdx15[_0x8d84[74]](_0x8d84[73])+ _0x8d84[75]}else {_0x5ffdxb= _0x8d84[80]}};console[_0x8d84[82]](_0x8d84[81],_0x5ffdxb);return _0x5ffdxb});case _0x8d84[29]:var _0x5ffdx16;return User[_0x8d84[90]](_0x5ffdxa[_0x8d84[85]],{attributes:[_0x8d84[85]]})[_0x8d84[83]](Util[_0x8d84[99]]({},{attributes:[_0x8d84[85]],include:[{raw:true,model:User,attributes:[_0x8d84[85]]}]}))[_0x8d84[83]](function(_0x5ffdxf){var _0x5ffdx10=[];_0x5ffdx16= _[_0x8d84[86]](_0x5ffdxf[_0x8d84[84]],_0x8d84[85]);_0x5ffdxf[_0x8d84[84]][_0x8d84[88]](function(_0x5ffdx11){_0x5ffdx10= _[_0x8d84[87]](_0x5ffdx10,_[_0x8d84[86]](_0x5ffdx11.Users,_0x8d84[85]))});return _0x5ffdx10})[_0x8d84[83]](function(_0x5ffdxe){if(_0x5ffdx16[_0x8d84[71]]&& _0x5ffdxe[_0x8d84[71]]){_0x5ffdxb= _0x8d84[72]+ _0x5ffdx16[_0x8d84[74]](_0x8d84[73])+ _0x8d84[75];_0x5ffdxb+= _0x8d84[76]+ _0x5ffdxe[_0x8d84[74]](_0x8d84[77])+ _0x8d84[78]}else {if(_0x5ffdx16[_0x8d84[71]]){_0x5ffdxb= _0x8d84[79]+ _0x5ffdx16[_0x8d84[74]](_0x8d84[73])+ _0x8d84[75]}else {_0x5ffdxb= _0x8d84[80]}};console[_0x8d84[82]](_0x8d84[81],_0x5ffdxb);return _0x5ffdxb});case _0x8d84[101]:var _0x5ffdx17;return User[_0x8d84[90]](_0x5ffdxa[_0x8d84[85]],{attributes:[_0x8d84[85]]})[_0x8d84[83]](Util[_0x8d84[100]]({},{attributes:[_0x8d84[85]],include:[{raw:true,model:User,attributes:[_0x8d84[85]]}]}))[_0x8d84[83]](function(_0x5ffdxf){var _0x5ffdx10=[];_0x5ffdx17= _[_0x8d84[86]](_0x5ffdxf[_0x8d84[84]],_0x8d84[85]);_0x5ffdxf[_0x8d84[84]][_0x8d84[88]](function(_0x5ffdx11){_0x5ffdx10= _[_0x8d84[87]](_0x5ffdx10,_[_0x8d84[86]](_0x5ffdx11.Users,_0x8d84[85]))});return _0x5ffdx10})[_0x8d84[83]](function(_0x5ffdxe){if(_0x5ffdx17[_0x8d84[71]]&& _0x5ffdxe[_0x8d84[71]]){_0x5ffdxb= _0x8d84[72]+ _0x5ffdx17[_0x8d84[74]](_0x8d84[73])+ _0x8d84[75];_0x5ffdxb+= _0x8d84[76]+ _0x5ffdxe[_0x8d84[74]](_0x8d84[77])+ _0x8d84[78]}else {if(_0x5ffdx17[_0x8d84[71]]){_0x5ffdxb= _0x8d84[79]+ _0x5ffdx17[_0x8d84[74]](_0x8d84[73])+ _0x8d84[75]}else {_0x5ffdxb= _0x8d84[80]}};console[_0x8d84[82]](_0x8d84[81],_0x5ffdxb);return _0x5ffdxb});case _0x8d84[26]:;case _0x8d84[20]:return Promise[_0x8d84[102]]([])[_0x8d84[83]](function(){return null});default:return Promise[_0x8d84[102]]([])[_0x8d84[83]](function(){return null})};break;default:return Promise[_0x8d84[102]]([])[_0x8d84[83]](function(){return null})}}};exports[_0x8d84[105]]= function(_0x5ffdx18){return function(_0x5ffdx19,_0x5ffdx1a){var _0x5ffdx9=getTable(_0x5ffdx1a[_0x8d84[106]]);return _0x5ffdx9[_0x8d84[164]]()[_0x8d84[83]](function(_0x5ffdx1b){var _0x5ffdx1c=_[_0x8d84[107]](_0x5ffdx1b);var _0x5ffdx1d=[],_0x5ffdx1e=[],_0x5ffdx1f=[];_[_0x8d84[88]](_0x5ffdx1a.Fields,function(_0x5ffdx20){if(!_0x5ffdx20[_0x8d84[108]]&& !_0x5ffdx20[_0x8d84[109]]){_0x5ffdx20[_0x8d84[110]]= _0x8d84[111]+ _0x5ffdx20[_0x8d84[110]]+ _0x8d84[111]};var _0x5ffdx21=_0x8d84[68];if(_0x5ffdx20[_0x8d84[112]]){switch(_0x5ffdx20[_0x8d84[112]]){case _0x8d84[115]:_0x5ffdx21= util[_0x8d84[114]](_0x8d84[113],_0x5ffdx20[_0x8d84[110]]);break;case _0x8d84[117]:_0x5ffdx21= util[_0x8d84[114]](_0x8d84[116],_0x5ffdx20[_0x8d84[110]],_0x5ffdx20[_0x8d84[110]]);break;case _0x8d84[119]:_0x5ffdx21= util[_0x8d84[114]](_0x8d84[118],_0x5ffdx20[_0x8d84[110]],_0x5ffdx20[_0x8d84[110]]);break;default:_0x5ffdx21= util[_0x8d84[114]](_0x8d84[120],_0x5ffdx20[_0x8d84[112]],_0x5ffdx20[_0x8d84[110]])}}else {_0x5ffdx21= _0x5ffdx20[_0x8d84[110]]};if(_0x5ffdx21[_0x8d84[122]](_0x8d84[121])=== 0){_0x5ffdx21= util[_0x8d84[114]](_0x8d84[123],_0x5ffdx21)};if(_0x5ffdx20[_0x8d84[114]]){switch(_0x5ffdx20[_0x8d84[114]]){case _0x8d84[125]:_0x5ffdx21= util[_0x8d84[114]](_0x8d84[124],_0x5ffdx20[_0x8d84[114]],_0x5ffdx21);break;default:_0x5ffdx21= util[_0x8d84[114]](_0x8d84[120],_0x5ffdx20[_0x8d84[114]],_0x5ffdx21)}};_0x5ffdx1d[_0x8d84[128]](util[_0x8d84[114]](_0x8d84[126],_0x5ffdx21,_0x5ffdx20[_0x8d84[127]]));if(_0x5ffdx20[_0x8d84[129]]){_0x5ffdx1e[_0x8d84[128]](_0x5ffdx21)};if(_0x5ffdx20[_0x8d84[130]]){_0x5ffdx1f[_0x8d84[128]](util[_0x8d84[114]](_0x8d84[131],_0x5ffdx21,_0x5ffdx20[_0x8d84[130]]))}});var _0x5ffdx22=_0x5ffdx1a[_0x8d84[132]]?getConditions(JSON[_0x8d84[134]](_0x5ffdx1a[_0x8d84[132]])[_0x8d84[133]],_0x5ffdx1c):_0x8d84[135];var _0x5ffdx23=_0x8d84[136];_0x5ffdx23+= _0x8d84[137]+ _0x5ffdx1d[_0x8d84[74]](_0x8d84[73]);switch(_0x5ffdx1a[_0x8d84[106]]){case _0x8d84[13]:_0x5ffdx1a[_0x8d84[106]]= _0x5ffdx1a[_0x8d84[106]][_0x8d84[70]](_0x8d84[69],_0x8d84[68]);break;default:};_0x5ffdx23+= _0x8d84[138]+ _0x5ffdx1a[_0x8d84[106]];_0x5ffdx23+= _0x5ffdx22!== _0x8d84[135]?_0x8d84[139]+ _0x5ffdx22:_0x8d84[68];var _0x5ffdx24,_0x5ffdx25,_0x5ffdx26,_0x5ffdx27;var _0x5ffdx28=[];if(_0x5ffdx18){_[_0x8d84[149]](_0x5ffdx18,function(_0x5ffdx29,_0x5ffdx2a){switch(_0x5ffdx2a){case _0x8d84[140]:_0x5ffdx24= _0x5ffdx29;break;case _0x8d84[141]:_0x5ffdx25= _0x5ffdx29;break;case _0x8d84[142]:_0x5ffdx26= _0x5ffdx29;break;case _0x8d84[143]:_0x5ffdx27= _0x5ffdx29;break;case _0x8d84[144]:;case _0x8d84[145]:break;default:var _0x5ffdx2b=_[_0x8d84[146]](_0x5ffdx1a.Fields,{alias:_0x5ffdx2a});if(_0x5ffdx2b){_0x5ffdx28[_0x8d84[128]](_0x5ffdx2b[_0x8d84[110]]+ _0x8d84[147]+ _0x5ffdx29+ _0x8d84[148])}else {_0x5ffdx28[_0x8d84[128]](_0x5ffdx2a+ _0x8d84[147]+ _0x5ffdx29+ _0x8d84[148])}}})};var _0x5ffdx2c=_0x8d84[150];console[_0x8d84[82]](_0x5ffdx24,_0x5ffdx25,_0x5ffdx26,_0x5ffdx27);if(_0x5ffdx24&& _0x5ffdx25){if(_0x5ffdx24=== _0x5ffdx25){if(_0x5ffdx26|| _0x5ffdx27){console[_0x8d84[82]](_0x5ffdx24,_0x5ffdx25,_0x5ffdx26,_0x5ffdx27);_0x5ffdx28[_0x8d84[128]](util[_0x8d84[114]](_0x8d84[151],_0x5ffdx2c,_0x5ffdx24+ (_0x5ffdx26?_0x8d84[137]+ _0x5ffdx26:_0x8d84[152]),_0x5ffdx25+ (_0x5ffdx27?_0x8d84[137]+ _0x5ffdx27:_0x8d84[153])))}else {_0x5ffdx28[_0x8d84[128]](util[_0x8d84[114]](_0x8d84[154],_0x5ffdx2c,_0x5ffdx24))}}else {_0x5ffdx28[_0x8d84[128]](util[_0x8d84[114]](_0x8d84[151],_0x5ffdx2c,_0x5ffdx24+ (_0x5ffdx26?_0x8d84[137]+ _0x5ffdx26:_0x8d84[152]),_0x5ffdx25+ (_0x5ffdx27?_0x8d84[137]+ _0x5ffdx27:_0x8d84[153])))}}else {if(_0x5ffdx24){_0x5ffdx28[_0x8d84[128]](util[_0x8d84[114]](_0x8d84[155],_0x5ffdx2c,_0x5ffdx24+ (_0x5ffdx26?_0x8d84[137]+ _0x5ffdx26:_0x8d84[152])))}else {if(_0x5ffdx25){_0x5ffdx28[_0x8d84[128]](util[_0x8d84[114]](_0x8d84[156],_0x5ffdx2c,_0x5ffdx25+ (_0x5ffdx27?_0x8d84[137]+ _0x5ffdx27:_0x8d84[153])))}}};if(_0x5ffdx28[_0x8d84[71]]){_0x5ffdx23+= ((_0x5ffdx22!== _0x8d84[135])?_0x8d84[157]:_0x8d84[139])+ _0x5ffdx28[_0x8d84[74]](_0x8d84[157])};if(_0x5ffdx19){if(_0x5ffdx19=== _0x8d84[80]){console[_0x8d84[82]](_0x8d84[158]);console[_0x8d84[82]](_0x8d84[159]);console[_0x8d84[82]](_0x8d84[160]);return _0x8d84[161]};_0x5ffdx23+= ((_0x5ffdx22!== _0x8d84[135]|| _0x5ffdx28[_0x8d84[71]])?_0x8d84[157]:_0x8d84[139])+ _0x5ffdx19};_0x5ffdx23+= _0x5ffdx1e[_0x8d84[71]]?_0x8d84[162]+ _0x5ffdx1e[_0x8d84[74]](_0x8d84[73]):_0x8d84[68];_0x5ffdx23+= _0x5ffdx1f[_0x8d84[71]]?_0x8d84[163]+ _0x5ffdx1f[_0x8d84[74]](_0x8d84[73]):_0x8d84[68];console[_0x8d84[82]](_0x8d84[158]);console[_0x8d84[82]](_0x5ffdx23);console[_0x8d84[82]](_0x8d84[160]);return _0x5ffdx23})}};exports[_0x8d84[165]]= function(){return function(_0x5ffdx18){if(_0x5ffdx18){var _0x5ffdx2d=_0x8d84[68];switch(_0x5ffdx18){case _0x8d84[161]:_0x5ffdx2d= _0x8d84[166];break;default:_0x5ffdx2d= sequelize[_0x8d84[168]](_0x5ffdx18,{type:sequelize[_0x8d84[167]][_0x8d84[136]]})};return _0x5ffdx2d};return _0x5ffdx18}};function getConditions(_0x5ffdx2f,_0x5ffdx1b){if(!_0x5ffdx2f){return _0x8d84[135]};for(var _0x5ffdx30=_0x8d84[169],_0x5ffdx31=0;_0x5ffdx31< _0x5ffdx2f[_0x8d84[170]][_0x8d84[71]];_0x5ffdx31++){_0x5ffdx31> 0&& (_0x5ffdx30+= _0x8d84[137]+ _0x5ffdx2f[_0x8d84[171]]+ _0x8d84[137]);if(_0x5ffdx2f[_0x8d84[170]][_0x5ffdx31][_0x8d84[133]]){_0x5ffdx30+= getConditions(_0x5ffdx2f[_0x8d84[170]][_0x5ffdx31][_0x8d84[133]],_0x5ffdx1b)}else {_0x5ffdx30+= _[_0x8d84[172]](_0x5ffdx1b,_0x5ffdx2f[_0x8d84[170]][_0x5ffdx31][_0x8d84[110]])?_0x8d84[111]+ _0x5ffdx2f[_0x8d84[170]][_0x5ffdx31][_0x8d84[110]]+ _0x8d84[111]:_0x5ffdx2f[_0x8d84[170]][_0x5ffdx31][_0x8d84[110]];switch(_0x5ffdx2f[_0x8d84[170]][_0x5ffdx31][_0x8d84[174]]){case _0x8d84[173]:;case _0x8d84[175]:_0x5ffdx30+= _0x8d84[137]+ _0x5ffdx2f[_0x8d84[170]][_0x5ffdx31][_0x8d84[174]];break;case _0x8d84[177]:_0x5ffdx30+= _0x8d84[176];break;case _0x8d84[179]:_0x5ffdx30+= _0x8d84[178];break;default:_0x5ffdx30+= _0x8d84[137]+ _0x5ffdx2f[_0x8d84[170]][_0x5ffdx31][_0x8d84[174]]+ _0x8d84[137]+ _0x5ffdx2f[_0x8d84[170]][_0x5ffdx31][_0x8d84[180]]+ _0x8d84[68]}}};return _0x5ffdx30+ _0x8d84[75]} \ No newline at end of file diff --git a/server/utils/report_extraction.js b/server/utils/report_extraction.js index 0f3a172..7c9bd8b 100644 --- a/server/utils/report_extraction.js +++ b/server/utils/report_extraction.js @@ -1,299 +1 @@ -'use strict'; - -var csv = require('to-csv'); -var PdfMake = require('pdfmake'); -var _ = require('lodash'); -var util = require('util'); -var ExtractedReport = require('../models').ExtractedReport; -var License = require('../models').License; -var Setting = require('../models').Setting; -var sequelize = require('../models').sequelize; -var fs = require('fs'); -var moment = require('moment'); -var Promise = require('bluebird'); -var base64 = Promise.promisify(require('file-base64').encode); -var sr = require('simple-random'); -var path = require('path'); -var config = require('../config/environment'); -var reportBuildUtils = require('./report_build'); -var license = require('../config/license/license.service'); - -var fonts = { - Roboto: { - normal: path.join(config.fonts, 'Roboto-Regular.ttf'), - bold: path.join(config.fonts, 'Roboto-Medium.ttf'), - italics: path.join(config.fonts, 'Roboto-Italic.ttf'), - bolditalics: path.join(config.fonts, 'Roboto-Italic.ttf') - } -}; - -process.on('message', function(data) { - if (data !== 'sticky:balance') { - general(data.report, data.query, data.extractedId, data.type.toLowerCase(), data.user) - } -}); - -function general(report, query, extractedId, type, user) { - // console.log('--general function, calling extract function...'); - extract(report, query, extractedId, type, user); -} - -function extract(report, dataQuery, extractedId, type, user) { - // console.log('--extract function, building query...'); - var _license, _settings; - return License - .findById(1) - .then(function(myLicense) { - _license = myLicense; - return Setting - .findById(1); - }) - .then(function(settings) { - _settings = settings; - return report.table; - }) - .then(reportBuildUtils.buildFilter(user)) - .then(function(filter) { - return [filter, report]; - }) - .spread(reportBuildUtils.buildQuery(dataQuery)) - .then(reportBuildUtils.checkQuery()) - .then(function(res) { - if (res) { - if (_.isArray(res)) { - if (res.length) { - _.forEach(res, function(row) { - _.forOwn(row, function(property, key) { - if (property instanceof Date) { - row[key] = moment(property).format("YYYY-MM-DD HH:mm:ss").toString(); - } - }); - }); - // console.log('--report extracted, creating output as: ' + type); - switch (type) { - case 'pdf': - var myLicense = _license ? JSON.parse(license.decrypt(_license.license, _settings.data1)) : null; - var imagePath = (_settings && !_settings.defaultLoginLogo && _settings.loginLogo && myLicense && myLicense.custom) ? path.join(config.root, 'server', 'files', 'images', _settings.loginLogo) : - path.join(config.root, 'server', 'files', 'images', 'default', 'logo-big-pdf.png') - return base64(imagePath) - .then(function(base64String) { - var extension = imagePath.split('.').pop(); - return createPdf(res, report, dataQuery, extractedId, base64String, extension); - }) - case 'csv': - return createCsv(res, report, dataQuery, extractedId); - default: - return createCsv(res, report, dataQuery, extractedId); - } - } else { - return updateExtracted(extractedId, null, 'empty'); - } - } else { - return updateExtracted(extractedId, null, res); - } - } else { - // console.log('--error executing the report query'); - return updateExtracted(extractedId, null, 'query extraction error'); - - } - }) - .catch(function(err) { - console.log(err); - return updateExtracted(extractedId, null, 'query error'); - }); -} - -function createPdf(res, report, dataQuery, id, logo, extension) { - switch (extension) { - case 'jpg': - extension = 'jpeg'; - break; - default: - } - // console.log('--pdf function, creating pdf output...'); - var filename = sr({ - length: 20, - prefix: "report_" + report.name + '_', - suffix: ".pdf" - }); - var tableHeader = []; - // width = 100 / report.Fields.length, - // widths = []; - _.forEach(report.Fields, function(elem) { - tableHeader.push({ - text: String(elem.alias), - style: 'tableHeader' - }); - // widths.push(width + '%'); - }); - // console.log(widths); - var tableBody = [tableHeader]; - _.forEach(res, function(elem) { - var row = []; - _.forOwn(elem, function(value, key) { - row.push(value ? String(value) : ''); - }); - tableBody.push(row); - }); - - var headerColumns = [{ - text: report.name, - style: 'header', - }]; - if (report.description) { - headerColumns.push({ - text: report.description || '', - color: '#828682', - margin: [0, 0, 0, 5] - }); - } - if (dataQuery.startDate) { - headerColumns.push({ - text: [{ - text: 'From: ', - style: 'label' - }, - moment(dataQuery.startDate).startOf('day').format("YYYY-MM-DD HH:mm").toString(), { - text: ' To: ', - style: 'label' - }, - moment(dataQuery.endDate || dataQuery.startDate).endOf('day').format("YYYY-MM-DD HH:mm").toString() - ] - }); - } - var content = []; - content.push({ - style: 'tableExample', - table: { - headerRows: 1, - dontBreakRows: true, - // widths: widths, - // keepWithHeaderRows: 1, - // dontBreakRows: true, - body: tableBody, - - } - }); - var pdfContent = { - pageOrientation: 'landscape', - pageMargins: [15, 90, 15, 25], - header: function() { - return { - margin: [15, 15, 0, 0], - columns: [{ - table: { - widths: [100, '*'], - body: [ - [{ - image: 'data:image/' + extension + ';base64,' + logo, - fit: [100, 60] - }, - headerColumns - ] - ] - }, - layout: 'noBorders' - }] - }; - }, - content: content, - footer: function(currentPage, pageCount) { - return { - columns: [{ - text: currentPage.toString() + ' of ' + pageCount, - alignment: 'center' - }] - } - }, - styles: { - header: { - fontSize: 18, - bold: true, - margin: [0, 0, 0, 5] - }, - tableExample: { - margin: [0, 0, 0, 5], - fontSize: 8, - }, - tableHeader: { - bold: true, - fontSize: 8, - color: 'black', - wordWrap: 'break-word' - }, - label: { - bold: true, - color: 'black' - } - } - }; - var printer = new PdfMake(fonts); - var pdfDoc = printer.createPdfKitDocument(pdfContent); - if (pdfDoc) { - // pdfDoc is a stream so you can pipe it to the file system - var writeStream = fs.createWriteStream(config.reports + filename); - writeStream.on('error', function() { - // console.log('--pdf write error'); - return updateExtracted(id, null, 'pdf write error') - }); - writeStream.on('finish', function() { - // console.log('--pdf write finished'); - return updateExtracted(id, filename, 'completed') - }); - pdfDoc.pipe(writeStream); - pdfDoc.end(); - } else { - // console.log('--pdf creation error'); - return updateExtracted(id, null, 'pdf creation error') - } -} - -function createCsv(res, report, dataQuery, id) { - // console.log(res); - // console.log('--csv function, creating pdf output...'); - var filename = sr({ - length: 20, - prefix: "report_" + report.name + '_', - suffix: ".csv" - }); - var csv_report = csv(res); - if (csv_report) { - fs.writeFile(config.reports + filename, csv_report, function(err) { - if (err) { - // console.log('--csv write error'); - console.log(err); - return updateExtracted(id, null, 'csv write error') - } else { - // console.log('--csv write completed'); - return updateExtracted(id, filename, 'completed') - } - }); - } else { - // console.log('--csv creation error'); - return updateExtracted(id, null, 'csv creation error') - } -} - -function updateExtracted(id, filename, status) { - // console.log('--updating the extracted report db row..'); - return ExtractedReport.update({ - status: status, - savename: filename - }, { - where: { - id: id - } - }) - .then(function() { - console.log('--Finished extracting report'); - }) - .catch(function(err) { - console.log('--Finished extracting report with error : ' + err); - }) - .finally(function() { - process.send({ - message: 'finished', - status: status - }); - }); -} +var _0x2629=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x74\x6F\x2D\x63\x73\x76","\x70\x64\x66\x6D\x61\x6B\x65","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x45\x78\x74\x72\x61\x63\x74\x65\x64\x52\x65\x70\x6F\x72\x74","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x4C\x69\x63\x65\x6E\x73\x65","\x53\x65\x74\x74\x69\x6E\x67","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x66\x73","\x6D\x6F\x6D\x65\x6E\x74","\x62\x6C\x75\x65\x62\x69\x72\x64","\x65\x6E\x63\x6F\x64\x65","\x66\x69\x6C\x65\x2D\x62\x61\x73\x65\x36\x34","\x70\x72\x6F\x6D\x69\x73\x69\x66\x79","\x73\x69\x6D\x70\x6C\x65\x2D\x72\x61\x6E\x64\x6F\x6D","\x70\x61\x74\x68","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x65\x6E\x76\x69\x72\x6F\x6E\x6D\x65\x6E\x74","\x2E\x2F\x72\x65\x70\x6F\x72\x74\x5F\x62\x75\x69\x6C\x64","\x2E\x2E\x2F\x63\x6F\x6E\x66\x69\x67\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2F\x6C\x69\x63\x65\x6E\x73\x65\x2E\x73\x65\x72\x76\x69\x63\x65","\x66\x6F\x6E\x74\x73","\x52\x6F\x62\x6F\x74\x6F\x2D\x52\x65\x67\x75\x6C\x61\x72\x2E\x74\x74\x66","\x6A\x6F\x69\x6E","\x52\x6F\x62\x6F\x74\x6F\x2D\x4D\x65\x64\x69\x75\x6D\x2E\x74\x74\x66","\x52\x6F\x62\x6F\x74\x6F\x2D\x49\x74\x61\x6C\x69\x63\x2E\x74\x74\x66","\x6D\x65\x73\x73\x61\x67\x65","\x73\x74\x69\x63\x6B\x79\x3A\x62\x61\x6C\x61\x6E\x63\x65","\x72\x65\x70\x6F\x72\x74","\x71\x75\x65\x72\x79","\x65\x78\x74\x72\x61\x63\x74\x65\x64\x49\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x74\x79\x70\x65","\x75\x73\x65\x72","\x6F\x6E","\x6C\x6F\x67","\x71\x75\x65\x72\x79\x20\x65\x72\x72\x6F\x72","\x63\x61\x74\x63\x68","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D\x3A\x73\x73","\x66\x6F\x72\x6D\x61\x74","\x66\x6F\x72\x4F\x77\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6C\x69\x63\x65\x6E\x73\x65","\x64\x61\x74\x61\x31","\x64\x65\x63\x72\x79\x70\x74","\x70\x61\x72\x73\x65","\x64\x65\x66\x61\x75\x6C\x74\x4C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x6C\x6F\x67\x69\x6E\x4C\x6F\x67\x6F","\x63\x75\x73\x74\x6F\x6D","\x72\x6F\x6F\x74","\x73\x65\x72\x76\x65\x72","\x66\x69\x6C\x65\x73","\x69\x6D\x61\x67\x65\x73","\x64\x65\x66\x61\x75\x6C\x74","\x6C\x6F\x67\x6F\x2D\x62\x69\x67\x2D\x70\x64\x66\x2E\x70\x6E\x67","\x70\x6F\x70","\x2E","\x73\x70\x6C\x69\x74","\x74\x68\x65\x6E","\x70\x64\x66","\x63\x73\x76","\x65\x6D\x70\x74\x79","\x71\x75\x65\x72\x79\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x63\x68\x65\x63\x6B\x51\x75\x65\x72\x79","\x62\x75\x69\x6C\x64\x51\x75\x65\x72\x79","\x73\x70\x72\x65\x61\x64","\x62\x75\x69\x6C\x64\x46\x69\x6C\x74\x65\x72","\x74\x61\x62\x6C\x65","\x66\x69\x6E\x64\x42\x79\x49\x64","\x6A\x70\x65\x67","\x6A\x70\x67","\x72\x65\x70\x6F\x72\x74\x5F","\x6E\x61\x6D\x65","\x5F","\x2E\x70\x64\x66","\x61\x6C\x69\x61\x73","\x74\x61\x62\x6C\x65\x48\x65\x61\x64\x65\x72","\x70\x75\x73\x68","","\x68\x65\x61\x64\x65\x72","\x64\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E","\x23\x38\x32\x38\x36\x38\x32","\x73\x74\x61\x72\x74\x44\x61\x74\x65","\x46\x72\x6F\x6D\x3A\x20","\x6C\x61\x62\x65\x6C","\x59\x59\x59\x59\x2D\x4D\x4D\x2D\x44\x44\x20\x48\x48\x3A\x6D\x6D","\x64\x61\x79","\x73\x74\x61\x72\x74\x4F\x66","\x20\x20\x54\x6F\x3A\x20","\x65\x6E\x64\x4F\x66","\x65\x6E\x64\x44\x61\x74\x65","\x74\x61\x62\x6C\x65\x45\x78\x61\x6D\x70\x6C\x65","\x6C\x61\x6E\x64\x73\x63\x61\x70\x65","\x2A","\x64\x61\x74\x61\x3A\x69\x6D\x61\x67\x65\x2F","\x3B\x62\x61\x73\x65\x36\x34\x2C","\x6E\x6F\x42\x6F\x72\x64\x65\x72\x73","\x20\x6F\x66\x20","\x63\x65\x6E\x74\x65\x72","\x62\x6C\x61\x63\x6B","\x62\x72\x65\x61\x6B\x2D\x77\x6F\x72\x64","\x63\x72\x65\x61\x74\x65\x50\x64\x66\x4B\x69\x74\x44\x6F\x63\x75\x6D\x65\x6E\x74","\x72\x65\x70\x6F\x72\x74\x73","\x63\x72\x65\x61\x74\x65\x57\x72\x69\x74\x65\x53\x74\x72\x65\x61\x6D","\x65\x72\x72\x6F\x72","\x70\x64\x66\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68","\x63\x6F\x6D\x70\x6C\x65\x74\x65\x64","\x70\x69\x70\x65","\x65\x6E\x64","\x70\x64\x66\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x2E\x63\x73\x76","\x63\x73\x76\x20\x77\x72\x69\x74\x65\x20\x65\x72\x72\x6F\x72","\x77\x72\x69\x74\x65\x46\x69\x6C\x65","\x63\x73\x76\x20\x63\x72\x65\x61\x74\x69\x6F\x6E\x20\x65\x72\x72\x6F\x72","\x66\x69\x6E\x69\x73\x68\x65\x64","\x73\x65\x6E\x64","\x66\x69\x6E\x61\x6C\x6C\x79","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74\x20\x77\x69\x74\x68\x20\x65\x72\x72\x6F\x72\x20\x3A\x20","\x2D\x2D\x46\x69\x6E\x69\x73\x68\x65\x64\x20\x65\x78\x74\x72\x61\x63\x74\x69\x6E\x67\x20\x72\x65\x70\x6F\x72\x74","\x75\x70\x64\x61\x74\x65"];_0x2629[0];var csv=require(_0x2629[1]);var PdfMake=require(_0x2629[2]);var _=require(_0x2629[3]);var util=require(_0x2629[4]);var ExtractedReport=require(_0x2629[6])[_0x2629[5]];var License=require(_0x2629[6])[_0x2629[7]];var Setting=require(_0x2629[6])[_0x2629[8]];var sequelize=require(_0x2629[6])[_0x2629[9]];var fs=require(_0x2629[10]);var moment=require(_0x2629[11]);var Promise=require(_0x2629[12]);var base64=Promise[_0x2629[15]](require(_0x2629[14])[_0x2629[13]]);var sr=require(_0x2629[16]);var path=require(_0x2629[17]);var config=require(_0x2629[18]);var reportBuildUtils=require(_0x2629[19]);var license=require(_0x2629[20]);var fonts={Roboto:{normal:path[_0x2629[23]](config[_0x2629[21]],_0x2629[22]),bold:path[_0x2629[23]](config[_0x2629[21]],_0x2629[24]),italics:path[_0x2629[23]](config[_0x2629[21]],_0x2629[25]),bolditalics:path[_0x2629[23]](config[_0x2629[21]],_0x2629[25])}};process[_0x2629[34]](_0x2629[26],function(_0x8132x13){if(_0x8132x13!== _0x2629[27]){general(_0x8132x13[_0x2629[28]],_0x8132x13[_0x2629[29]],_0x8132x13[_0x2629[30]],_0x8132x13[_0x2629[32]][_0x2629[31]](),_0x8132x13[_0x2629[33]])}});function general(_0x8132x15,_0x8132x16,_0x8132x17,_0x8132x18,_0x8132x19){extract(_0x8132x15,_0x8132x16,_0x8132x17,_0x8132x18,_0x8132x19)}function extract(_0x8132x15,_0x8132x1b,_0x8132x17,_0x8132x18,_0x8132x19){var _0x8132x1c,_0x8132x1d;return License[_0x2629[70]](1)[_0x2629[60]](function(_0x8132x23){_0x8132x1c= _0x8132x23;return Setting[_0x2629[70]](1)})[_0x2629[60]](function(_0x8132x28){_0x8132x1d= _0x8132x28;return _0x8132x15[_0x2629[69]]})[_0x2629[60]](reportBuildUtils[_0x2629[68]](_0x8132x19))[_0x2629[60]](function(_0x8132x27){return [_0x8132x27,_0x8132x15]})[_0x2629[67]](reportBuildUtils[_0x2629[66]](_0x8132x1b))[_0x2629[60]](reportBuildUtils[_0x2629[65]]())[_0x2629[60]](function(_0x8132x1f){if(_0x8132x1f){if(_[_0x2629[38]](_0x8132x1f)){if(_0x8132x1f[_0x2629[39]]){_[_0x2629[43]](_0x8132x1f,function(_0x8132x20){_[_0x2629[42]](_0x8132x20,function(_0x8132x21,_0x8132x22){if(_0x8132x21 instanceof Date){_0x8132x20[_0x8132x22]= moment(_0x8132x21)[_0x2629[41]](_0x2629[40]).toString()}})});switch(_0x8132x18){case _0x2629[61]:var _0x8132x23=_0x8132x1c?JSON[_0x2629[47]](license[_0x2629[46]](_0x8132x1c[_0x2629[44]],_0x8132x1d[_0x2629[45]])):null;var _0x8132x24=(_0x8132x1d&& !_0x8132x1d[_0x2629[48]]&& _0x8132x1d[_0x2629[49]]&& _0x8132x23&& _0x8132x23[_0x2629[50]])?path[_0x2629[23]](config[_0x2629[51]],_0x2629[52],_0x2629[53],_0x2629[54],_0x8132x1d[_0x2629[49]]):path[_0x2629[23]](config[_0x2629[51]],_0x2629[52],_0x2629[53],_0x2629[54],_0x2629[55],_0x2629[56]);return base64(_0x8132x24)[_0x2629[60]](function(_0x8132x25){var _0x8132x26=_0x8132x24[_0x2629[59]](_0x2629[58])[_0x2629[57]]();return createPdf(_0x8132x1f,_0x8132x15,_0x8132x1b,_0x8132x17,_0x8132x25,_0x8132x26)});case _0x2629[62]:return createCsv(_0x8132x1f,_0x8132x15,_0x8132x1b,_0x8132x17);default:return createCsv(_0x8132x1f,_0x8132x15,_0x8132x1b,_0x8132x17)}}else {return updateExtracted(_0x8132x17,null,_0x2629[63])}}else {return updateExtracted(_0x8132x17,null,_0x8132x1f)}}else {return updateExtracted(_0x8132x17,null,_0x2629[64])}})[_0x2629[37]](function(_0x8132x1e){console[_0x2629[35]](_0x8132x1e);return updateExtracted(_0x8132x17,null,_0x2629[36])})}function createPdf(_0x8132x1f,_0x8132x15,_0x8132x1b,_0x8132x2a,_0x8132x2b,_0x8132x26){switch(_0x8132x26){case _0x2629[72]:_0x8132x26= _0x2629[71];break;default:};var _0x8132x2c=sr({length:20,prefix:_0x2629[73]+ _0x8132x15[_0x2629[74]]+ _0x2629[75],suffix:_0x2629[76]});var _0x8132x2d=[];_[_0x2629[43]](_0x8132x15.Fields,function(_0x8132x2e){_0x8132x2d[_0x2629[79]]({text:String(_0x8132x2e[_0x2629[77]]),style:_0x2629[78]})});var _0x8132x2f=[_0x8132x2d];_[_0x2629[43]](_0x8132x1f,function(_0x8132x2e){var _0x8132x20=[];_[_0x2629[42]](_0x8132x2e,function(_0x8132x30,_0x8132x22){_0x8132x20[_0x2629[79]](_0x8132x30?String(_0x8132x30):_0x2629[80])});_0x8132x2f[_0x2629[79]](_0x8132x20)});var _0x8132x31=[{text:_0x8132x15[_0x2629[74]],style:_0x2629[81]}];if(_0x8132x15[_0x2629[82]]){_0x8132x31[_0x2629[79]]({text:_0x8132x15[_0x2629[82]]|| _0x2629[80],color:_0x2629[83],margin:[0,0,0,5]})};if(_0x8132x1b[_0x2629[84]]){_0x8132x31[_0x2629[79]]({text:[{text:_0x2629[85],style:_0x2629[86]},moment(_0x8132x1b[_0x2629[84]])[_0x2629[89]](_0x2629[88])[_0x2629[41]](_0x2629[87]).toString(),{text:_0x2629[90],style:_0x2629[86]},moment(_0x8132x1b[_0x2629[92]]|| _0x8132x1b[_0x2629[84]])[_0x2629[91]](_0x2629[88])[_0x2629[41]](_0x2629[87]).toString()]})};var _0x8132x32=[];_0x8132x32[_0x2629[79]]({style:_0x2629[93],table:{headerRows:1,dontBreakRows:true,body:_0x8132x2f}});var _0x8132x33={pageOrientation:_0x2629[94],pageMargins:[15,90,15,25],header:function(){return {margin:[15,15,0,0],columns:[{table:{widths:[100,_0x2629[95]],body:[[{image:_0x2629[96]+ _0x8132x26+ _0x2629[97]+ _0x8132x2b,fit:[100,60]},_0x8132x31]]},layout:_0x2629[98]}]}},content:_0x8132x32,footer:function(_0x8132x34,_0x8132x35){return {columns:[{text:_0x8132x34.toString()+ _0x2629[99]+ _0x8132x35,alignment:_0x2629[100]}]}},styles:{header:{fontSize:18,bold:true,margin:[0,0,0,5]},tableExample:{margin:[0,0,0,5],fontSize:8},tableHeader:{bold:true,fontSize:8,color:_0x2629[101],wordWrap:_0x2629[102]},label:{bold:true,color:_0x2629[101]}}};var _0x8132x36= new PdfMake(fonts);var _0x8132x37=_0x8132x36[_0x2629[103]](_0x8132x33);if(_0x8132x37){var _0x8132x38=fs[_0x2629[105]](config[_0x2629[104]]+ _0x8132x2c);_0x8132x38[_0x2629[34]](_0x2629[106],function(){return updateExtracted(_0x8132x2a,null,_0x2629[107])});_0x8132x38[_0x2629[34]](_0x2629[108],function(){return updateExtracted(_0x8132x2a,_0x8132x2c,_0x2629[109])});_0x8132x37[_0x2629[110]](_0x8132x38);_0x8132x37[_0x2629[111]]()}else {return updateExtracted(_0x8132x2a,null,_0x2629[112])}}function createCsv(_0x8132x1f,_0x8132x15,_0x8132x1b,_0x8132x2a){var _0x8132x2c=sr({length:20,prefix:_0x2629[73]+ _0x8132x15[_0x2629[74]]+ _0x2629[75],suffix:_0x2629[113]});var _0x8132x3a=csv(_0x8132x1f);if(_0x8132x3a){fs[_0x2629[115]](config[_0x2629[104]]+ _0x8132x2c,_0x8132x3a,function(_0x8132x1e){if(_0x8132x1e){console[_0x2629[35]](_0x8132x1e);return updateExtracted(_0x8132x2a,null,_0x2629[114])}else {return updateExtracted(_0x8132x2a,_0x8132x2c,_0x2629[109])}})}else {return updateExtracted(_0x8132x2a,null,_0x2629[116])}}function updateExtracted(_0x8132x2a,_0x8132x2c,_0x8132x3c){return ExtractedReport[_0x2629[122]]({status:_0x8132x3c,savename:_0x8132x2c},{where:{id:_0x8132x2a}})[_0x2629[60]](function(){console[_0x2629[35]](_0x2629[121])})[_0x2629[37]](function(_0x8132x1e){console[_0x2629[35]](_0x2629[120]+ _0x8132x1e)})[_0x2629[119]](function(){process[_0x2629[118]]({message:_0x2629[117],status:_0x8132x3c})})} \ No newline at end of file diff --git a/server/utils/voice_extension.js b/server/utils/voice_extension.js index e027fce..7987374 100644 --- a/server/utils/voice_extension.js +++ b/server/utils/voice_extension.js @@ -1,292 +1 @@ -'use strict'; - -var _ = require('lodash'); -var util = require('util'); -var Interval = require('../models').Interval; -var sequelize = require('../models').sequelize; -var VoiceExtension = require('../models').VoiceExtension; - -exports.createApps = createApplications; - -exports.routeUpdate = function(req, t) { - var sequelize = require('../models').sequelize; - var VoiceExtension = require('../models').VoiceExtension; - if (req.body.id) { - delete req.body.id; - } - return VoiceExtension - .update(req.body, { - where: { - id: req.params.id - }, - transaction: t - }) - .then(function(route) { - if (req.body.Applications) { - req.body.id = req.params.id; - return VoiceExtension - .destroy({ - where: { - VoiceExtensionId: req.params.id - }, - transaction: t - }); - } - }) - .then(function() { - if (req.body.Applications && Array.isArray(req.body.Applications) && req.body.Applications.length) { - return req.body; - } - }) - .then(createApplications(req.body.Applications, t)); -} - - -function createApplications(applications, t) { - var Interval = require('../models').Interval; - var VoiceExtension = require('../models').VoiceExtension; - return function(route) { - if (route) { - return Interval - .findAll() //find all existing intervals - .then(function(intervals) { - var priority = 2; - var routeDefault = { - exten: route.exten, - type: route.type, - context: route.context, - VoiceExtensionId: route.id - }; - var bulkApps = []; - var applicationLength = 7; //update in case of adding other rows in the extension - var firstRows = [], - lastRows = []; - firstRows.push(_.merge({ - app: 'Set', - appdata: util.format('CDR(type)=%s', route.type), - priority: priority - }, - routeDefault)); - priority++; - if (route.type === 'outbound') { - firstRows.push(_.merge({ - app: 'Set', - appdata: util.format('CDR(tag)=%s', route.tag || '--'), - priority: priority - }, - routeDefault)); - priority++; - } - bulkApps.push(VoiceExtension.bulkCreate(firstRows, { - transaction: t - })); - applications.forEach(function(application) { - var appIntervals = []; - var extension = []; - if (application.IntervalId) { //if the interval for the app is chosen by a list we search for the subintervals - var foundIntervals = _.filter(intervals, { - IntervalId: application.IntervalId - }); - appIntervals = foundIntervals.length ? _.map(foundIntervals, 'interval') : ['*,*,*,*']; //if the interval list has no subintervals the interval is always - var parentInterval = _.find(intervals, { - id: application.IntervalId - }); - application.interval = parentInterval ? parentInterval.name : '*,*,*,*'; - } else { //otherwise i will have the interval directly from the app, i still use an array to keep the creation logic the same - appIntervals = [application.interval]; - } - extension.push(_.merge({ - app: 'NoOP', - appdata: application.app + ' Application Start', - priority: priority - }, - routeDefault)); - priority++; - var intLength = appIntervals.length; - appIntervals.forEach(function(elem, index) { - extension.push(_.merge({ - app: 'GotoIfTime', - appdata: util.format('%s?%s,${EXTEN},%s:%s,${EXTEN},%s', elem, route.context, priority + (intLength - index), route.context, ((index + 1) < intLength) ? priority + - 1 : priority + - applicationLength), - priority: priority - }, - routeDefault)); - priority++; - }); - if (application.app.toLowerCase() === 'dial' && route.type === 'outbound' && application.appdata[1]) { - extension.push(_.merge({ - app: 'Set', - appdata: util.format('CALLERID(all)=%s', application.appdata[1]), - priority: priority - }, - routeDefault)); - } else { - extension.push(_.merge({ - app: 'NoOP', - appdata: 'Skipped CallerID Set', - priority: priority - }, - routeDefault)); - } - priority++; - if (application.app.toLowerCase() === 'dial' && route.record && route.type === 'outbound') { - extension.push(_.merge({ - app: 'MixMonitor', - appdata: '${UNIQUEID}.' + (route.recordingFormat || 'wav') + ',ab', - priority: priority - }, - routeDefault)); - } else { - extension.push(_.merge({ - app: 'NoOP', - appdata: 'Skipped MixMonitor', - priority: priority - }, - routeDefault)); - } - priority++; - if (application.app.toLowerCase() === 'queue' && application.appType !== 'custom') { - extension.push(_.merge({ - app: 'Progress', - appdata: '', - priority: priority - }, - routeDefault)); - } else { - extension.push(_.merge({ - app: 'NoOP', - appdata: 'Skipped Progress', - priority: priority - }, - routeDefault)); - } - priority++; - if (application.app.toLowerCase() === 'dial' && route.type === 'outbound') { - extension.push(_.merge({ - app: 'Set', - appdata: util.format('outboundrouteid=%d', route.id || ''), - priority: priority - }, - routeDefault)); - } else { - extension.push(_.merge({ - app: 'NoOP', - appdata: 'Skipped Outound Route Id Set', - priority: priority - }, - routeDefault)); - } - priority++; - if (application.app.toLowerCase() === 'dial' && application.appType === 'outboundDial') { - application.appdata[4] = application.appdata[4] || ''; - application.appdata[4] += (_.includes(application.appdata[4], 'x') ? '' : 'x') + (_.includes(application.appdata[4], 'X') ? '' : 'X'); - extension.push(_.merge({ - app: application.app, - appdata: util.format('SIP/%s/%s${EXTEN:%s},%s,%s,%s', application.appdata[0], application.appdata[2] || '', route.cutdigits || 0, application.appdata[3] || '', - application.appdata[4] || '', application.appdata[5] || ''), - priority: priority, - IntervalId: application.IntervalId || null, - interval: application.interval || '*,*,*,*', - isApp: true, - callerID: application.appdata[1] || null, - appType: application.appType - }, - routeDefault)); - } else if (application.app.toLowerCase() === 'dial' && application.appType === 'externalDial') { - application.appdata[3] = application.appdata[3] || ''; - application.appdata[3] += (_.includes(application.appdata[3], 'x') ? '' : 'x') + (_.includes(application.appdata[3], 'X') ? '' : 'X'); - extension.push(_.merge({ - app: application.app, - appdata: util.format('SIP/%s/%s,%s,%s,%s', application.appdata[0], application.appdata[1], application.appdata[2] || '', application.appdata[3] || '', application.appdata[ - 4] || ''), - priority: priority, - IntervalId: application.IntervalId || null, - interval: application.interval || '*,*,*,*', - isApp: true, - appType: application.appType - }, - routeDefault)); - } else if (application.app.toLowerCase() === 'dial' && application.appType === 'internalDial') { - application.appdata[2] = application.appdata[2] || ''; - application.appdata[2] += (_.includes(application.appdata[2], 'x') ? '' : 'x') + (_.includes(application.appdata[2], 'X') ? '' : 'X'); - extension.push(_.merge({ - app: application.app, - appdata: util.format('SIP/%s,%s,%s,%s', application.appdata[0], application.appdata[1] || '', application.appdata[2] || '', application.appdata[3] || ''), - priority: priority, - IntervalId: application.IntervalId || null, - interval: application.interval || '*,*,*,*', - isApp: true, - appType: application.appType - }, - routeDefault)); - } else { - if ((application.app.toLowerCase() === 'dial' || application.app.toLowerCase() === 'queue') && application.appType !== 'custom') { - var appdataIndex = application.app.toLowerCase() === 'dial' ? 2 : 1; - application.appdata[appdataIndex] = application.appdata[appdataIndex] || ''; - application.appdata[appdataIndex] += (_.includes(application.appdata[appdataIndex], 'x') ? '' : 'x') + (_.includes(application.appdata[appdataIndex], 'X') ? '' : 'X'); - } - extension.push(_.merge({ - app: application.app, - appdata: application.appdata.join(','), - priority: priority, - IntervalId: application.IntervalId, - interval: application.interval || '*,*,*,*', - isApp: true, - appType: application.appType || null - }, - routeDefault)); - } - priority++; - if (application.app.toLowerCase() === 'dial' && route.record && route.type === 'outbound') { - extension.push(_.merge({ - app: 'StopMixMonitor', - appdata: '', - priority: priority - }, - routeDefault)); - } else { - extension.push(_.merge({ - app: 'NoOP', - appdata: 'Skipped StopMixMonitor', - priority: priority - }, - routeDefault)); - } - priority++; - extension.push(_.merge({ - app: 'NoOP', - appdata: application.app + ' Application End', - priority: priority - }, - routeDefault)); - priority++; - bulkApps.push(VoiceExtension.bulkCreate(extension, { - transaction: t - })); - }); - lastRows.push(_.merge({ - app: 'NoOP', - appdata: route.type + ' call end', - priority: priority - }, - routeDefault)); - priority++; - if (route.type === 'internal' || route.type === 'outbound') { - lastRows.push(_.merge({ - app: 'Hangup', - appdata: '', - priority: priority - }, - routeDefault)); - priority++; - } - bulkApps.push(VoiceExtension.bulkCreate(lastRows, { - transaction: t - })); - return bulkApps; - }) - .all(); - } - } -} +var _0x660f=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x6C\x6F\x64\x61\x73\x68","\x75\x74\x69\x6C","\x49\x6E\x74\x65\x72\x76\x61\x6C","\x2E\x2E\x2F\x6D\x6F\x64\x65\x6C\x73","\x73\x65\x71\x75\x65\x6C\x69\x7A\x65","\x56\x6F\x69\x63\x65\x45\x78\x74\x65\x6E\x73\x69\x6F\x6E","\x63\x72\x65\x61\x74\x65\x41\x70\x70\x73","\x72\x6F\x75\x74\x65\x55\x70\x64\x61\x74\x65","\x69\x64","\x62\x6F\x64\x79","\x74\x68\x65\x6E","\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x73","\x69\x73\x41\x72\x72\x61\x79","\x6C\x65\x6E\x67\x74\x68","\x70\x61\x72\x61\x6D\x73","\x64\x65\x73\x74\x72\x6F\x79","\x75\x70\x64\x61\x74\x65","\x61\x6C\x6C","\x65\x78\x74\x65\x6E","\x74\x79\x70\x65","\x63\x6F\x6E\x74\x65\x78\x74","\x53\x65\x74","\x43\x44\x52\x28\x74\x79\x70\x65\x29\x3D\x25\x73","\x66\x6F\x72\x6D\x61\x74","\x6D\x65\x72\x67\x65","\x70\x75\x73\x68","\x6F\x75\x74\x62\x6F\x75\x6E\x64","\x43\x44\x52\x28\x74\x61\x67\x29\x3D\x25\x73","\x74\x61\x67","\x2D\x2D","\x62\x75\x6C\x6B\x43\x72\x65\x61\x74\x65","\x49\x6E\x74\x65\x72\x76\x61\x6C\x49\x64","\x66\x69\x6C\x74\x65\x72","\x69\x6E\x74\x65\x72\x76\x61\x6C","\x6D\x61\x70","\x2A\x2C\x2A\x2C\x2A\x2C\x2A","\x66\x69\x6E\x64","\x6E\x61\x6D\x65","\x4E\x6F\x4F\x50","\x61\x70\x70","\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x53\x74\x61\x72\x74","\x47\x6F\x74\x6F\x49\x66\x54\x69\x6D\x65","\x25\x73\x3F\x25\x73\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x25\x73\x3A\x25\x73\x2C\x24\x7B\x45\x58\x54\x45\x4E\x7D\x2C\x25\x73","\x66\x6F\x72\x45\x61\x63\x68","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x64\x69\x61\x6C","\x61\x70\x70\x64\x61\x74\x61","\x43\x41\x4C\x4C\x45\x52\x49\x44\x28\x61\x6C\x6C\x29\x3D\x25\x73","\x53\x6B\x69\x70\x70\x65\x64\x20\x43\x61\x6C\x6C\x65\x72\x49\x44\x20\x53\x65\x74","\x72\x65\x63\x6F\x72\x64","\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x24\x7B\x55\x4E\x49\x51\x55\x45\x49\x44\x7D\x2E","\x72\x65\x63\x6F\x72\x64\x69\x6E\x67\x46\x6F\x72\x6D\x61\x74","\x77\x61\x76","\x2C\x61\x62","\x53\x6B\x69\x70\x70\x65\x64\x20\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x71\x75\x65\x75\x65","\x61\x70\x70\x54\x79\x70\x65","\x63\x75\x73\x74\x6F\x6D","\x50\x72\x6F\x67\x72\x65\x73\x73","","\x53\x6B\x69\x70\x70\x65\x64\x20\x50\x72\x6F\x67\x72\x65\x73\x73","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x72\x6F\x75\x74\x65\x69\x64\x3D\x25\x64","\x53\x6B\x69\x70\x70\x65\x64\x20\x4F\x75\x74\x6F\x75\x6E\x64\x20\x52\x6F\x75\x74\x65\x20\x49\x64\x20\x53\x65\x74","\x6F\x75\x74\x62\x6F\x75\x6E\x64\x44\x69\x61\x6C","\x78","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x58","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x24\x7B\x45\x58\x54\x45\x4E\x3A\x25\x73\x7D\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x63\x75\x74\x64\x69\x67\x69\x74\x73","\x65\x78\x74\x65\x72\x6E\x61\x6C\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2F\x25\x73\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x69\x6E\x74\x65\x72\x6E\x61\x6C\x44\x69\x61\x6C","\x53\x49\x50\x2F\x25\x73\x2C\x25\x73\x2C\x25\x73\x2C\x25\x73","\x2C","\x6A\x6F\x69\x6E","\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x53\x6B\x69\x70\x70\x65\x64\x20\x53\x74\x6F\x70\x4D\x69\x78\x4D\x6F\x6E\x69\x74\x6F\x72","\x20\x41\x70\x70\x6C\x69\x63\x61\x74\x69\x6F\x6E\x20\x45\x6E\x64","\x20\x63\x61\x6C\x6C\x20\x65\x6E\x64","\x69\x6E\x74\x65\x72\x6E\x61\x6C","\x48\x61\x6E\x67\x75\x70","\x66\x69\x6E\x64\x41\x6C\x6C"];_0x660f[0];var _=require(_0x660f[1]);var util=require(_0x660f[2]);var Interval=require(_0x660f[4])[_0x660f[3]];var sequelize=require(_0x660f[4])[_0x660f[5]];var VoiceExtension=require(_0x660f[4])[_0x660f[6]];exports[_0x660f[7]]= createApplications;exports[_0x660f[8]]= function(_0xc210x6,_0xc210x7){var sequelize=require(_0x660f[4])[_0x660f[5]];var VoiceExtension=require(_0x660f[4])[_0x660f[6]];if(_0xc210x6[_0x660f[10]][_0x660f[9]]){delete _0xc210x6[_0x660f[10]][_0x660f[9]]};return VoiceExtension[_0x660f[17]](_0xc210x6[_0x660f[10]],{where:{id:_0xc210x6[_0x660f[15]][_0x660f[9]]},transaction:_0xc210x7})[_0x660f[11]](function(_0xc210x8){if(_0xc210x6[_0x660f[10]][_0x660f[12]]){_0xc210x6[_0x660f[10]][_0x660f[9]]= _0xc210x6[_0x660f[15]][_0x660f[9]];return VoiceExtension[_0x660f[16]]({where:{VoiceExtensionId:_0xc210x6[_0x660f[15]][_0x660f[9]]},transaction:_0xc210x7})}})[_0x660f[11]](function(){if(_0xc210x6[_0x660f[10]][_0x660f[12]]&& Array[_0x660f[13]](_0xc210x6[_0x660f[10]].Applications)&& _0xc210x6[_0x660f[10]][_0x660f[12]][_0x660f[14]]){return _0xc210x6[_0x660f[10]]}})[_0x660f[11]](createApplications(_0xc210x6[_0x660f[10]].Applications,_0xc210x7))};function createApplications(_0xc210xa,_0xc210x7){var Interval=require(_0x660f[4])[_0x660f[3]];var VoiceExtension=require(_0x660f[4])[_0x660f[6]];return function(_0xc210x8){if(_0xc210x8){return Interval[_0x660f[83]]()[_0x660f[11]](function(_0xc210xb){var _0xc210xc=2;var _0xc210xd={exten:_0xc210x8[_0x660f[19]],type:_0xc210x8[_0x660f[20]],context:_0xc210x8[_0x660f[21]],VoiceExtensionId:_0xc210x8[_0x660f[9]]};var _0xc210xe=[];var _0xc210xf=7;var _0xc210x10=[],_0xc210x11=[];_0xc210x10[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[22],appdata:util[_0x660f[24]](_0x660f[23],_0xc210x8[_0x660f[20]]),priority:_0xc210xc},_0xc210xd));_0xc210xc++;if(_0xc210x8[_0x660f[20]]=== _0x660f[27]){_0xc210x10[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[22],appdata:util[_0x660f[24]](_0x660f[28],_0xc210x8[_0x660f[29]]|| _0x660f[30]),priority:_0xc210xc},_0xc210xd));_0xc210xc++};_0xc210xe[_0x660f[26]](VoiceExtension[_0x660f[31]](_0xc210x10,{transaction:_0xc210x7}));_0xc210xa[_0x660f[44]](function(_0xc210x12){var _0xc210x13=[];var _0xc210x14=[];if(_0xc210x12[_0x660f[32]]){var _0xc210x15=_[_0x660f[33]](_0xc210xb,{IntervalId:_0xc210x12[_0x660f[32]]});_0xc210x13= _0xc210x15[_0x660f[14]]?_[_0x660f[35]](_0xc210x15,_0x660f[34]):[_0x660f[36]];var _0xc210x16=_[_0x660f[37]](_0xc210xb,{id:_0xc210x12[_0x660f[32]]});_0xc210x12[_0x660f[34]]= _0xc210x16?_0xc210x16[_0x660f[38]]:_0x660f[36]}else {_0xc210x13= [_0xc210x12[_0x660f[34]]]};_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[39],appdata:_0xc210x12[_0x660f[40]]+ _0x660f[41],priority:_0xc210xc},_0xc210xd));_0xc210xc++;var _0xc210x17=_0xc210x13[_0x660f[14]];_0xc210x13[_0x660f[44]](function(_0xc210x18,_0xc210x19){_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[42],appdata:util[_0x660f[24]](_0x660f[43],_0xc210x18,_0xc210x8[_0x660f[21]],_0xc210xc+ (_0xc210x17- _0xc210x19),_0xc210x8[_0x660f[21]],((_0xc210x19+ 1)< _0xc210x17)?_0xc210xc+ 1:_0xc210xc+ _0xc210xf),priority:_0xc210xc},_0xc210xd));_0xc210xc++});if(_0xc210x12[_0x660f[40]][_0x660f[45]]()=== _0x660f[46]&& _0xc210x8[_0x660f[20]]=== _0x660f[27]&& _0xc210x12[_0x660f[47]][1]){_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[22],appdata:util[_0x660f[24]](_0x660f[48],_0xc210x12[_0x660f[47]][1]),priority:_0xc210xc},_0xc210xd))}else {_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[39],appdata:_0x660f[49],priority:_0xc210xc},_0xc210xd))};_0xc210xc++;if(_0xc210x12[_0x660f[40]][_0x660f[45]]()=== _0x660f[46]&& _0xc210x8[_0x660f[50]]&& _0xc210x8[_0x660f[20]]=== _0x660f[27]){_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[51],appdata:_0x660f[52]+ (_0xc210x8[_0x660f[53]]|| _0x660f[54])+ _0x660f[55],priority:_0xc210xc},_0xc210xd))}else {_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[39],appdata:_0x660f[56],priority:_0xc210xc},_0xc210xd))};_0xc210xc++;if(_0xc210x12[_0x660f[40]][_0x660f[45]]()=== _0x660f[57]&& _0xc210x12[_0x660f[58]]!== _0x660f[59]){_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[60],appdata:_0x660f[61],priority:_0xc210xc},_0xc210xd))}else {_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[39],appdata:_0x660f[62],priority:_0xc210xc},_0xc210xd))};_0xc210xc++;if(_0xc210x12[_0x660f[40]][_0x660f[45]]()=== _0x660f[46]&& _0xc210x8[_0x660f[20]]=== _0x660f[27]){_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[22],appdata:util[_0x660f[24]](_0x660f[63],_0xc210x8[_0x660f[9]]|| _0x660f[61]),priority:_0xc210xc},_0xc210xd))}else {_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[39],appdata:_0x660f[64],priority:_0xc210xc},_0xc210xd))};_0xc210xc++;if(_0xc210x12[_0x660f[40]][_0x660f[45]]()=== _0x660f[46]&& _0xc210x12[_0x660f[58]]=== _0x660f[65]){_0xc210x12[_0x660f[47]][4]= _0xc210x12[_0x660f[47]][4]|| _0x660f[61];_0xc210x12[_0x660f[47]][4]+= (_[_0x660f[67]](_0xc210x12[_0x660f[47]][4],_0x660f[66])?_0x660f[61]:_0x660f[66])+ (_[_0x660f[67]](_0xc210x12[_0x660f[47]][4],_0x660f[68])?_0x660f[61]:_0x660f[68]);_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0xc210x12[_0x660f[40]],appdata:util[_0x660f[24]](_0x660f[69],_0xc210x12[_0x660f[47]][0],_0xc210x12[_0x660f[47]][2]|| _0x660f[61],_0xc210x8[_0x660f[70]]|| 0,_0xc210x12[_0x660f[47]][3]|| _0x660f[61],_0xc210x12[_0x660f[47]][4]|| _0x660f[61],_0xc210x12[_0x660f[47]][5]|| _0x660f[61]),priority:_0xc210xc,IntervalId:_0xc210x12[_0x660f[32]]|| null,interval:_0xc210x12[_0x660f[34]]|| _0x660f[36],isApp:true,callerID:_0xc210x12[_0x660f[47]][1]|| null,appType:_0xc210x12[_0x660f[58]]},_0xc210xd))}else {if(_0xc210x12[_0x660f[40]][_0x660f[45]]()=== _0x660f[46]&& _0xc210x12[_0x660f[58]]=== _0x660f[71]){_0xc210x12[_0x660f[47]][3]= _0xc210x12[_0x660f[47]][3]|| _0x660f[61];_0xc210x12[_0x660f[47]][3]+= (_[_0x660f[67]](_0xc210x12[_0x660f[47]][3],_0x660f[66])?_0x660f[61]:_0x660f[66])+ (_[_0x660f[67]](_0xc210x12[_0x660f[47]][3],_0x660f[68])?_0x660f[61]:_0x660f[68]);_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0xc210x12[_0x660f[40]],appdata:util[_0x660f[24]](_0x660f[72],_0xc210x12[_0x660f[47]][0],_0xc210x12[_0x660f[47]][1],_0xc210x12[_0x660f[47]][2]|| _0x660f[61],_0xc210x12[_0x660f[47]][3]|| _0x660f[61],_0xc210x12[_0x660f[47]][4]|| _0x660f[61]),priority:_0xc210xc,IntervalId:_0xc210x12[_0x660f[32]]|| null,interval:_0xc210x12[_0x660f[34]]|| _0x660f[36],isApp:true,appType:_0xc210x12[_0x660f[58]]},_0xc210xd))}else {if(_0xc210x12[_0x660f[40]][_0x660f[45]]()=== _0x660f[46]&& _0xc210x12[_0x660f[58]]=== _0x660f[73]){_0xc210x12[_0x660f[47]][2]= _0xc210x12[_0x660f[47]][2]|| _0x660f[61];_0xc210x12[_0x660f[47]][2]+= (_[_0x660f[67]](_0xc210x12[_0x660f[47]][2],_0x660f[66])?_0x660f[61]:_0x660f[66])+ (_[_0x660f[67]](_0xc210x12[_0x660f[47]][2],_0x660f[68])?_0x660f[61]:_0x660f[68]);_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0xc210x12[_0x660f[40]],appdata:util[_0x660f[24]](_0x660f[74],_0xc210x12[_0x660f[47]][0],_0xc210x12[_0x660f[47]][1]|| _0x660f[61],_0xc210x12[_0x660f[47]][2]|| _0x660f[61],_0xc210x12[_0x660f[47]][3]|| _0x660f[61]),priority:_0xc210xc,IntervalId:_0xc210x12[_0x660f[32]]|| null,interval:_0xc210x12[_0x660f[34]]|| _0x660f[36],isApp:true,appType:_0xc210x12[_0x660f[58]]},_0xc210xd))}else {if((_0xc210x12[_0x660f[40]][_0x660f[45]]()=== _0x660f[46]|| _0xc210x12[_0x660f[40]][_0x660f[45]]()=== _0x660f[57])&& _0xc210x12[_0x660f[58]]!== _0x660f[59]){var _0xc210x1a=_0xc210x12[_0x660f[40]][_0x660f[45]]()=== _0x660f[46]?2:1;_0xc210x12[_0x660f[47]][_0xc210x1a]= _0xc210x12[_0x660f[47]][_0xc210x1a]|| _0x660f[61];_0xc210x12[_0x660f[47]][_0xc210x1a]+= (_[_0x660f[67]](_0xc210x12[_0x660f[47]][_0xc210x1a],_0x660f[66])?_0x660f[61]:_0x660f[66])+ (_[_0x660f[67]](_0xc210x12[_0x660f[47]][_0xc210x1a],_0x660f[68])?_0x660f[61]:_0x660f[68])};_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0xc210x12[_0x660f[40]],appdata:_0xc210x12[_0x660f[47]][_0x660f[76]](_0x660f[75]),priority:_0xc210xc,IntervalId:_0xc210x12[_0x660f[32]],interval:_0xc210x12[_0x660f[34]]|| _0x660f[36],isApp:true,appType:_0xc210x12[_0x660f[58]]|| null},_0xc210xd))}}};_0xc210xc++;if(_0xc210x12[_0x660f[40]][_0x660f[45]]()=== _0x660f[46]&& _0xc210x8[_0x660f[50]]&& _0xc210x8[_0x660f[20]]=== _0x660f[27]){_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[77],appdata:_0x660f[61],priority:_0xc210xc},_0xc210xd))}else {_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[39],appdata:_0x660f[78],priority:_0xc210xc},_0xc210xd))};_0xc210xc++;_0xc210x14[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[39],appdata:_0xc210x12[_0x660f[40]]+ _0x660f[79],priority:_0xc210xc},_0xc210xd));_0xc210xc++;_0xc210xe[_0x660f[26]](VoiceExtension[_0x660f[31]](_0xc210x14,{transaction:_0xc210x7}))});_0xc210x11[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[39],appdata:_0xc210x8[_0x660f[20]]+ _0x660f[80],priority:_0xc210xc},_0xc210xd));_0xc210xc++;if(_0xc210x8[_0x660f[20]]=== _0x660f[81]|| _0xc210x8[_0x660f[20]]=== _0x660f[27]){_0xc210x11[_0x660f[26]](_[_0x660f[25]]({app:_0x660f[82],appdata:_0x660f[61],priority:_0xc210xc},_0xc210xd));_0xc210xc++};_0xc210xe[_0x660f[26]](VoiceExtension[_0x660f[31]](_0xc210x11,{transaction:_0xc210x7}));return _0xc210xe})[_0x660f[18]]()}}} \ No newline at end of file